@guihz/trading-vue-editor-tes 0.0.139 → 0.0.140
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/assets/{parserTccWorker-CEYO20yY.js → parserTccWorker-CILIfaWz.js} +1 -1
- package/lib/assets/{scriptsRunWorker-DTH9vYgp.js → scriptsRunWorker-DRaLHxRb.js} +18 -18
- package/lib/components/editor/parseScript/buildInFuncNamespace/chartPoint.d.ts +1 -1
- package/lib/components/editor/parseScript/constants.d.ts +8 -0
- package/lib/trading-vue-editor.js +1681 -1680
- package/lib/trading-vue-editor.umd.cjs +37 -37
- package/package.json +1 -1
@@ -8,7 +8,7 @@ var t1=Object.defineProperty;var n1=(bo,vi,Fr)=>vi in bo?t1(bo,vi,{enumerable:!0
|
|
8
8
|
`+o.toString(C,M))}return k}},{key:"addDFAState",value:function(o,u){if(u===Ni.ERROR)return u;var S=o.states.get(u);return S!==null?(this.trace_atn_sim&&console.log("addDFAState "+u+" exists"),S):(u.stateNumber=o.states.length,u.configs.readOnly||(u.configs.optimizeConfigs(this),u.configs.setReadonly(!0)),this.trace_atn_sim&&console.log("addDFAState new "+u),o.states.add(u),this.debug&&console.log("adding new DFA state: "+u),u)}},{key:"reportAttemptingFullContext",value:function(o,u,S,k,C){if(this.debug||this.retry_debug){var M=new _e(k,C+1);console.log("reportAttemptingFullContext decision="+o.decision+":"+S+", input="+this.parser.getTokenStream().getText(M))}this.parser!==null&&this.parser.getErrorListenerDispatch().reportAttemptingFullContext(this.parser,o,k,C,u,S)}},{key:"reportContextSensitivity",value:function(o,u,S,k,C){if(this.debug||this.retry_debug){var M=new _e(k,C+1);console.log("reportContextSensitivity decision="+o.decision+":"+S+", input="+this.parser.getTokenStream().getText(M))}this.parser!==null&&this.parser.getErrorListenerDispatch().reportContextSensitivity(this.parser,o,k,C,u,S)}},{key:"reportAmbiguity",value:function(o,u,S,k,C,M,fe){if(this.debug||this.retry_debug){var Ne=new _e(S,k+1);console.log("reportAmbiguity "+M+":"+fe+", input="+this.parser.getTokenStream().getText(Ne))}this.parser!==null&&this.parser.getErrorListenerDispatch().reportAmbiguity(this.parser,o,S,k,C,M,fe)}}],m&&xb(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),y}(Ni);function Xs(f){return Xs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Xs(f)}function Sb(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,(_=function(l,y){if(Xs(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(Xs(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),Xs(_)==="symbol"?_:String(_)),s)}var _}var am=function(){function f(){(function(s,_){if(!(s instanceof _))throw new TypeError("Cannot call a class as a function")})(this,f),this.cache=new io}var i,m;return i=f,(m=[{key:"add",value:function(s){if(s===st.EMPTY)return st.EMPTY;var _=this.cache.get(s)||null;return _!==null?_:(this.cache.set(s,s),s)}},{key:"get",value:function(s){return this.cache.get(s)||null}},{key:"length",get:function(){return this.cache.length}}])&&Sb(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),f}();const Tb={ATN:bn,ATNDeserializer:t0,LexerATNSimulator:Wa,ParserATNSimulator:om,PredictionMode:Wn,PredictionContextCache:am};function Ys(f){return Ys=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Ys(f)}function Ab(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,(_=function(l,y){if(Ys(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(Ys(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),Ys(_)==="symbol"?_:String(_)),s)}var _}var S0=function(){function f(s,_,l){(function(y,o){if(!(y instanceof o))throw new TypeError("Cannot call a class as a function")})(this,f),this.dfa=s,this.literalNames=_||[],this.symbolicNames=l||[]}var i,m;return i=f,(m=[{key:"toString",value:function(){if(this.dfa.s0===null)return null;for(var s="",_=this.dfa.sortedStates(),l=0;l<_.length;l++){var y=_[l];if(y.edges!==null)for(var o=y.edges.length,u=0;u<o;u++){var S=y.edges[u]||null;S!==null&&S.stateNumber!==2147483647&&(s=(s=(s=(s=(s=(s=s.concat(this.getStateString(y))).concat("-")).concat(this.getEdgeLabel(u))).concat("->")).concat(this.getStateString(S))).concat(`
|
9
9
|
`))}}return s.length===0?null:s}},{key:"getEdgeLabel",value:function(s){return s===0?"EOF":this.literalNames!==null||this.symbolicNames!==null?this.literalNames[s-1]||this.symbolicNames[s-1]:String.fromCharCode(s-1)}},{key:"getStateString",value:function(s){var _=(s.isAcceptState?":":"")+"s"+s.stateNumber+(s.requiresFullContext?"^":"");return s.isAcceptState?s.predicates!==null?_+"=>"+F(s.predicates):_+"=>"+s.prediction.toString():_}}])&&Ab(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),f}();function Xa(f){return Xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Xa(f)}function Cb(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,(_=function(l,y){if(Xa(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(Xa(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),Xa(_)==="symbol"?_:String(_)),s)}var _}function T0(f,i){return T0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,s){return m.__proto__=s,m},T0(f,i)}function Kc(f){return Kc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Kc(f)}var sm=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&T0(o,u)})(y,f);var i,m,s,_,l=(s=y,_=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=Kc(s);if(_){var S=Kc(this).constructor;o=Reflect.construct(u,arguments,S)}else o=u.apply(this,arguments);return function(k,C){if(C&&(Xa(C)==="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}(k)}(this,o)});function y(o){return function(u,S){if(!(u instanceof S))throw new TypeError("Cannot call a class as a function")}(this,y),l.call(this,o,null)}return i=y,(m=[{key:"getEdgeLabel",value:function(o){return"'"+String.fromCharCode(o)+"'"}}])&&Cb(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),y}(S0);function Zs(f){return Zs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Zs(f)}function Db(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,(_=function(l,y){if(Zs(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(Zs(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),Zs(_)==="symbol"?_:String(_)),s)}var _}var um=function(){function f(s,_){if(function(y,o){if(!(y instanceof o))throw new TypeError("Cannot call a class as a function")}(this,f),_===void 0&&(_=0),this.atnStartState=s,this.decision=_,this._states=new g,this.s0=null,this.precedenceDfa=!1,s instanceof Ko&&s.isPrecedenceDecision){this.precedenceDfa=!0;var l=new Wo(null,new Wr);l.edges=[],l.isAcceptState=!1,l.requiresFullContext=!1,this.s0=l}}var i,m;return i=f,(m=[{key:"getPrecedenceStartState",value:function(s){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";return s<0||s>=this.s0.edges.length?null:this.s0.edges[s]||null}},{key:"setPrecedenceStartState",value:function(s,_){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";s<0||(this.s0.edges[s]=_)}},{key:"setPrecedenceDfa",value:function(s){if(this.precedenceDfa!==s){if(this._states=new g,s){var _=new Wo(null,new Wr);_.edges=[],_.isAcceptState=!1,_.requiresFullContext=!1,this.s0=_}else this.s0=null;this.precedenceDfa=s}}},{key:"sortedStates",value:function(){return this._states.values().sort(function(s,_){return s.stateNumber-_.stateNumber})}},{key:"toString",value:function(s,_){return s=s||null,_=_||null,this.s0===null?"":new S0(this,s,_).toString()}},{key:"toLexerString",value:function(){return this.s0===null?"":new sm(this).toString()}},{key:"states",get:function(){return this._states}}])&&Db(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),f}();const kb={DFA:um,DFASerializer:S0,LexerDFASerializer:sm,PredPrediction:im},Ob={PredictionContext:st},wb={Interval:_e,IntervalSet:J};function Qs(f){return Qs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Qs(f)}function Rb(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,(_=function(l,y){if(Qs(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(Qs(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),Qs(_)==="symbol"?_:String(_)),s)}var _}var A0=function(){function f(){(function(s,_){if(!(s instanceof _))throw new TypeError("Cannot call a class as a function")})(this,f)}var i,m;return i=f,(m=[{key:"visitTerminal",value:function(s){}},{key:"visitErrorNode",value:function(s){}},{key:"enterEveryRule",value:function(s){}},{key:"exitEveryRule",value:function(s){}}])&&Rb(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),f}();function Js(f){return Js=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Js(f)}function Fb(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,(_=function(l,y){if(Js(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(Js(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),Js(_)==="symbol"?_:String(_)),s)}var _}var cm=function(){function f(){(function(s,_){if(!(s instanceof _))throw new TypeError("Cannot call a class as a function")})(this,f)}var i,m;return i=f,(m=[{key:"visit",value:function(s){return Array.isArray(s)?s.map(function(_){return _.accept(this)},this):s.accept(this)}},{key:"visitChildren",value:function(s){return s.children?this.visit(s.children):null}},{key:"visitTerminal",value:function(s){}},{key:"visitErrorNode",value:function(s){}}])&&Fb(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),f}();function eu(f){return eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},eu(f)}function Nb(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,(_=function(l,y){if(eu(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(eu(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),eu(_)==="symbol"?_:String(_)),s)}var _}var zc=function(){function f(){(function(s,_){if(!(s instanceof _))throw new TypeError("Cannot call a class as a function")})(this,f)}var i,m;return i=f,(m=[{key:"walk",value:function(s,_){if(_ instanceof ti||_.isErrorNode!==void 0&&_.isErrorNode())s.visitErrorNode(_);else if(_ instanceof hn)s.visitTerminal(_);else{this.enterRule(s,_);for(var l=0;l<_.getChildCount();l++){var y=_.getChild(l);this.walk(s,y)}this.exitRule(s,_)}}},{key:"enterRule",value:function(s,_){var l=_.ruleContext;s.enterEveryRule(l),l.enterRule(s)}},{key:"exitRule",value:function(s,_){var l=_.ruleContext;l.exitRule(s),s.exitEveryRule(l)}}])&&Nb(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),f}();zc.DEFAULT=new zc;const Ib={Trees:Ju,RuleNode:Le,ErrorNode:ti,TerminalNode:hn,ParseTreeListener:A0,ParseTreeVisitor:cm,ParseTreeWalker:zc};function C0(f){return C0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},C0(f)}function D0(f,i){return D0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,s){return m.__proto__=s,m},D0(f,i)}function Wc(f){return Wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Wc(f)}var tu=function(f){(function(y,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(o&&o.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),Object.defineProperty(y,"prototype",{writable:!1}),o&&D0(y,o)})(l,f);var i,m,s,_=(m=l,s=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var y,o=Wc(m);if(s){var u=Wc(this).constructor;y=Reflect.construct(o,arguments,u)}else y=o.apply(this,arguments);return function(S,k){if(k&&(C0(k)==="object"||typeof k=="function"))return k;if(k!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(C){if(C===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C}(S)}(this,y)});function l(y){var o;return function(u,S){if(!(u instanceof S))throw new TypeError("Cannot call a class as a function")}(this,l),(o=_.call(this,{message:"",recognizer:y,input:y.getInputStream(),ctx:y._ctx})).offendingToken=y.getCurrentToken(),o}return i=l,Object.defineProperty(i,"prototype",{writable:!1}),i}(zo);function k0(f){return k0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},k0(f)}function O0(f,i){return O0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,s){return m.__proto__=s,m},O0(f,i)}function qc(f){return qc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},qc(f)}var w0=function(f){(function(y,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(o&&o.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),Object.defineProperty(y,"prototype",{writable:!1}),o&&O0(y,o)})(l,f);var i,m,s,_=(m=l,s=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var y,o=qc(m);if(s){var u=qc(this).constructor;y=Reflect.construct(o,arguments,u)}else y=o.apply(this,arguments);return function(S,k){if(k&&(k0(k)==="object"||typeof k=="function"))return k;if(k!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(C){if(C===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C}(S)}(this,y)});function l(y,o,u){var S;(function(C,M){if(!(C instanceof M))throw new TypeError("Cannot call a class as a function")})(this,l),S=_.call(this,{message:Pb(o,u||null),recognizer:y,input:y.getInputStream(),ctx:y._ctx});var k=y._interp.atn.states[y.state].transitions[0];return k instanceof U_?(S.ruleIndex=k.ruleIndex,S.predicateIndex=k.predIndex):(S.ruleIndex=0,S.predicateIndex=0),S.predicate=o,S.offendingToken=y.getCurrentToken(),S}return i=l,Object.defineProperty(i,"prototype",{writable:!1}),i}(zo);function Pb(f,i){return i!==null?i:"failed predicate: {"+f+"}?"}function Ya(f){return Ya=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Ya(f)}function Bb(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,(_=function(l,y){if(Ya(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(Ya(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),Ya(_)==="symbol"?_:String(_)),s)}var _}function R0(f,i){return R0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,s){return m.__proto__=s,m},R0(f,i)}function Xc(f){return Xc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Xc(f)}var lm=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&R0(o,u)})(y,f);var i,m,s,_,l=(s=y,_=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=Xc(s);if(_){var S=Xc(this).constructor;o=Reflect.construct(u,arguments,S)}else o=u.apply(this,arguments);return function(k,C){if(C&&(Ya(C)==="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}(k)}(this,o)});function y(o){var u;return function(S,k){if(!(S instanceof k))throw new TypeError("Cannot call a class as a function")}(this,y),o=o||!0,(u=l.call(this)).exactOnly=o,u}return i=y,m=[{key:"reportAmbiguity",value:function(o,u,S,k,C,M,fe){if(!this.exactOnly||C){var Ne="reportAmbiguity d="+this.getDecisionDescription(o,u)+": ambigAlts="+this.getConflictingAlts(M,fe)+", input='"+o.getTokenStream().getText(new _e(S,k))+"'";o.notifyErrorListeners(Ne)}}},{key:"reportAttemptingFullContext",value:function(o,u,S,k,C,M){var fe="reportAttemptingFullContext d="+this.getDecisionDescription(o,u)+", input='"+o.getTokenStream().getText(new _e(S,k))+"'";o.notifyErrorListeners(fe)}},{key:"reportContextSensitivity",value:function(o,u,S,k,C,M){var fe="reportContextSensitivity d="+this.getDecisionDescription(o,u)+", input='"+o.getTokenStream().getText(new _e(S,k))+"'";o.notifyErrorListeners(fe)}},{key:"getDecisionDescription",value:function(o,u){var S=u.decision,k=u.atnStartState.ruleIndex,C=o.ruleNames;if(k<0||k>=C.length)return""+S;var M=C[k]||null;return M===null||M.length===0?""+S:"".concat(S," (").concat(M,")")}},{key:"getConflictingAlts",value:function(o,u){if(o!==null)return o;for(var S=new zr,k=0;k<u.items.length;k++)S.add(u.items[k].alt);return"{".concat(S.values().join(", "),"}")}}],m&&Bb(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),y}(Ls);function F0(f){return F0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},F0(f)}function fm(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}function N0(f){var i=typeof Map=="function"?new Map:void 0;return N0=function(m){if(m===null||(s=m,Function.toString.call(s).indexOf("[native code]")===-1))return m;var s;if(typeof m!="function")throw new TypeError("Super expression must either be null or a function");if(i!==void 0){if(i.has(m))return i.get(m);i.set(m,_)}function _(){return I0(m,arguments,ru(this).constructor)}return _.prototype=Object.create(m.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),nu(_,m)},N0(f)}function I0(f,i,m){return I0=hm()?Reflect.construct.bind():function(s,_,l){var y=[null];y.push.apply(y,_);var o=new(Function.bind.apply(s,y));return l&&nu(o,l.prototype),o},I0.apply(null,arguments)}function hm(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nu(f,i){return nu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,s){return m.__proto__=s,m},nu(f,i)}function ru(f){return ru=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},ru(f)}var Lb=function(f){(function(y,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(o&&o.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),Object.defineProperty(y,"prototype",{writable:!1}),o&&nu(y,o)})(l,f);var i,m,s,_=(m=l,s=hm(),function(){var y,o=ru(m);if(s){var u=ru(this).constructor;y=Reflect.construct(o,arguments,u)}else y=o.apply(this,arguments);return function(S,k){if(k&&(F0(k)==="object"||typeof k=="function"))return k;if(k!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fm(S)}(this,y)});function l(){var y;return function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")}(this,l),y=_.call(this),Error.captureStackTrace(fm(y),l),y}return i=l,Object.defineProperty(i,"prototype",{writable:!1}),i}(N0(Error));function iu(f){return iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},iu(f)}function Mb(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,(_=function(l,y){if(iu(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(iu(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),iu(_)==="symbol"?_:String(_)),s)}var _}function Za(f){return Za=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Za(f)}function Ub(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,(_=function(l,y){if(Za(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(Za(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),Za(_)==="symbol"?_:String(_)),s)}var _}function P0(f,i){return P0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,s){return m.__proto__=s,m},P0(f,i)}function Yc(f){return Yc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Yc(f)}var B0=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&P0(o,u)})(y,f);var i,m,s,_,l=(s=y,_=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=Yc(s);if(_){var S=Yc(this).constructor;o=Reflect.construct(u,arguments,S)}else o=u.apply(this,arguments);return function(k,C){if(C&&(Za(C)==="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}(k)}(this,o)});function y(){var o;return function(u,S){if(!(u instanceof S))throw new TypeError("Cannot call a class as a function")}(this,y),(o=l.call(this)).errorRecoveryMode=!1,o.lastErrorIndex=-1,o.lastErrorStates=null,o.nextTokensContext=null,o.nextTokenState=0,o}return i=y,m=[{key:"reset",value:function(o){this.endErrorCondition(o)}},{key:"beginErrorCondition",value:function(o){this.errorRecoveryMode=!0}},{key:"inErrorRecoveryMode",value:function(o){return this.errorRecoveryMode}},{key:"endErrorCondition",value:function(o){this.errorRecoveryMode=!1,this.lastErrorStates=null,this.lastErrorIndex=-1}},{key:"reportMatch",value:function(o){this.endErrorCondition(o)}},{key:"reportError",value:function(o,u){this.inErrorRecoveryMode(o)||(this.beginErrorCondition(o),u instanceof Hc?this.reportNoViableAlternative(o,u):u instanceof tu?this.reportInputMismatch(o,u):u instanceof w0?this.reportFailedPredicate(o,u):(console.log("unknown recognition error type: "+u.constructor.name),console.log(u.stack),o.notifyErrorListeners(u.getOffendingToken(),u.getMessage(),u)))}},{key:"recover",value:function(o,u){this.lastErrorIndex===o.getInputStream().index&&this.lastErrorStates!==null&&this.lastErrorStates.indexOf(o.state)>=0&&o.consume(),this.lastErrorIndex=o._input.index,this.lastErrorStates===null&&(this.lastErrorStates=[]),this.lastErrorStates.push(o.state);var S=this.getErrorRecoverySet(o);this.consumeUntil(o,S)}},{key:"sync",value:function(o){if(!this.inErrorRecoveryMode(o)){var u=o._interp.atn.states[o.state],S=o.getTokenStream().LA(1),k=o.atn.nextTokens(u);if(k.contains(S))return this.nextTokensContext=null,void(this.nextTokenState=me.INVALID_STATE_NUMBER);if(k.contains(n.EPSILON))this.nextTokensContext===null&&(this.nextTokensContext=o._ctx,this.nextTokensState=o._stateNumber);else switch(u.stateType){case me.BLOCK_START:case me.STAR_BLOCK_START:case me.PLUS_BLOCK_START:case me.STAR_LOOP_ENTRY:if(this.singleTokenDeletion(o)!==null)return;throw new tu(o);case me.PLUS_LOOP_BACK:case me.STAR_LOOP_BACK:this.reportUnwantedToken(o);var C=new J;C.addSet(o.getExpectedTokens());var M=C.addSet(this.getErrorRecoverySet(o));this.consumeUntil(o,M)}}}},{key:"reportNoViableAlternative",value:function(o,u){var S,k=o.getTokenStream();S=k!==null?u.startToken.type===n.EOF?"<EOF>":k.getText(new _e(u.startToken.tokenIndex,u.offendingToken.tokenIndex)):"<unknown input>";var C="no viable alternative at input "+this.escapeWSAndQuote(S);o.notifyErrorListeners(C,u.offendingToken,u)}},{key:"reportInputMismatch",value:function(o,u){var S="mismatched input "+this.getTokenErrorDisplay(u.offendingToken)+" expecting "+u.getExpectedTokens().toString(o.literalNames,o.symbolicNames);o.notifyErrorListeners(S,u.offendingToken,u)}},{key:"reportFailedPredicate",value:function(o,u){var S="rule "+o.ruleNames[o._ctx.ruleIndex]+" "+u.message;o.notifyErrorListeners(S,u.offendingToken,u)}},{key:"reportUnwantedToken",value:function(o){if(!this.inErrorRecoveryMode(o)){this.beginErrorCondition(o);var u=o.getCurrentToken(),S="extraneous input "+this.getTokenErrorDisplay(u)+" expecting "+this.getExpectedTokens(o).toString(o.literalNames,o.symbolicNames);o.notifyErrorListeners(S,u,null)}}},{key:"reportMissingToken",value:function(o){if(!this.inErrorRecoveryMode(o)){this.beginErrorCondition(o);var u=o.getCurrentToken(),S="missing "+this.getExpectedTokens(o).toString(o.literalNames,o.symbolicNames)+" at "+this.getTokenErrorDisplay(u);o.notifyErrorListeners(S,u,null)}}},{key:"recoverInline",value:function(o){var u=this.singleTokenDeletion(o);if(u!==null)return o.consume(),u;if(this.singleTokenInsertion(o))return this.getMissingSymbol(o);throw new tu(o)}},{key:"singleTokenInsertion",value:function(o){var u=o.getTokenStream().LA(1),S=o._interp.atn,k=S.states[o.state].transitions[0].target;return!!S.nextTokens(k,o._ctx).contains(u)&&(this.reportMissingToken(o),!0)}},{key:"singleTokenDeletion",value:function(o){var u=o.getTokenStream().LA(2);if(this.getExpectedTokens(o).contains(u)){this.reportUnwantedToken(o),o.consume();var S=o.getCurrentToken();return this.reportMatch(o),S}return null}},{key:"getMissingSymbol",value:function(o){var u,S=o.getCurrentToken(),k=this.getExpectedTokens(o).first();u=k===n.EOF?"<missing EOF>":"<missing "+o.literalNames[k]+">";var C=S,M=o.getTokenStream().LT(-1);return C.type===n.EOF&&M!==null&&(C=M),o.getTokenFactory().create(C.source,k,u,n.DEFAULT_CHANNEL,-1,-1,C.line,C.column)}},{key:"getExpectedTokens",value:function(o){return o.getExpectedTokens()}},{key:"getTokenErrorDisplay",value:function(o){if(o===null)return"<no token>";var u=o.text;return u===null&&(u=o.type===n.EOF?"<EOF>":"<"+o.type+">"),this.escapeWSAndQuote(u)}},{key:"escapeWSAndQuote",value:function(o){return"'"+(o=(o=(o=o.replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t"))+"'"}},{key:"getErrorRecoverySet",value:function(o){for(var u=o._interp.atn,S=o._ctx,k=new J;S!==null&&S.invokingState>=0;){var C=u.states[S.invokingState].transitions[0],M=u.nextTokens(C.followState);k.addSet(M),S=S.parentCtx}return k.removeOne(n.EPSILON),k}},{key:"consumeUntil",value:function(o,u){for(var S=o.getTokenStream().LA(1);S!==n.EOF&&!u.contains(S);)o.consume(),S=o.getTokenStream().LA(1)}}],m&&Ub(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),y}(function(){function f(){(function(s,_){if(!(s instanceof _))throw new TypeError("Cannot call a class as a function")})(this,f)}var i,m;return i=f,(m=[{key:"reset",value:function(s){}},{key:"recoverInline",value:function(s){}},{key:"recover",value:function(s,_){}},{key:"sync",value:function(s){}},{key:"inErrorRecoveryMode",value:function(s){}},{key:"reportError",value:function(s){}}])&&Mb(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),f}());function Qa(f){return Qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Qa(f)}function Vb(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,(_=function(l,y){if(Qa(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(Qa(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),Qa(_)==="symbol"?_:String(_)),s)}var _}function L0(f,i){return L0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,s){return m.__proto__=s,m},L0(f,i)}function Zc(f){return Zc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Zc(f)}var pm=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&L0(o,u)})(y,f);var i,m,s,_,l=(s=y,_=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=Zc(s);if(_){var S=Zc(this).constructor;o=Reflect.construct(u,arguments,S)}else o=u.apply(this,arguments);return function(k,C){if(C&&(Qa(C)==="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}(k)}(this,o)});function y(){return function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")}(this,y),l.call(this)}return i=y,m=[{key:"recover",value:function(o,u){for(var S=o._ctx;S!==null;)S.exception=u,S=S.parentCtx;throw new Lb(u)}},{key:"recoverInline",value:function(o){this.recover(o,new tu(o))}},{key:"sync",value:function(o){}}],m&&Vb(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),y}(B0);const jb={RecognitionException:zo,NoViableAltException:Hc,LexerNoViableAltException:f0,InputMismatchException:tu,FailedPredicateException:w0,DiagnosticErrorListener:lm,BailErrorStrategy:pm,DefaultErrorStrategy:B0,ErrorListener:Ls};function ou(f){return ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ou(f)}function $b(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,(_=function(l,y){if(ou(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(ou(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),ou(_)==="symbol"?_:String(_)),s)}var _}var au=function(){function f(s,_){if(function(u,S){if(!(u instanceof S))throw new TypeError("Cannot call a class as a function")}(this,f),this.name="<empty>",this.strdata=s,this.decodeToUnicodeCodePoints=_||!1,this._index=0,this.data=[],this.decodeToUnicodeCodePoints)for(var l=0;l<this.strdata.length;){var y=this.strdata.codePointAt(l);this.data.push(y),l+=y<=65535?1:2}else{this.data=new Array(this.strdata.length);for(var o=0;o<this.strdata.length;o++)this.data[o]=this.strdata.charCodeAt(o)}this._size=this.data.length}var i,m;return i=f,(m=[{key:"reset",value:function(){this._index=0}},{key:"consume",value:function(){if(this._index>=this._size)throw"cannot consume EOF";this._index+=1}},{key:"LA",value:function(s){if(s===0)return 0;s<0&&(s+=1);var _=this._index+s-1;return _<0||_>=this._size?n.EOF:this.data[_]}},{key:"LT",value:function(s){return this.LA(s)}},{key:"mark",value:function(){return-1}},{key:"release",value:function(s){}},{key:"seek",value:function(s){s<=this._index?this._index=s:this._index=Math.min(s,this._size)}},{key:"getText",value:function(s,_){if(_>=this._size&&(_=this._size-1),s>=this._size)return"";if(this.decodeToUnicodeCodePoints){for(var l="",y=s;y<=_;y++)l+=String.fromCodePoint(this.data[y]);return l}return this.strdata.slice(s,_+1)}},{key:"toString",value:function(){return this.strdata}},{key:"index",get:function(){return this._index}},{key:"size",get:function(){return this._size}}])&&$b(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),f}();function M0(f){return M0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},M0(f)}function U0(f,i){return U0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,s){return m.__proto__=s,m},U0(f,i)}function Qc(f){return Qc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Qc(f)}var su=function(f){(function(y,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(o&&o.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),Object.defineProperty(y,"prototype",{writable:!1}),o&&U0(y,o)})(l,f);var i,m,s,_=(m=l,s=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var y,o=Qc(m);if(s){var u=Qc(this).constructor;y=Reflect.construct(o,arguments,u)}else y=o.apply(this,arguments);return function(S,k){if(k&&(M0(k)==="object"||typeof k=="function"))return k;if(k!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(C){if(C===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C}(S)}(this,y)});function l(y,o){return function(u,S){if(!(u instanceof S))throw new TypeError("Cannot call a class as a function")}(this,l),_.call(this,y,o)}return i=l,Object.defineProperty(i,"prototype",{writable:!1}),i}(au),dm=Fr(92);function Ja(f){return Ja=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Ja(f)}function Hb(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,(_=function(l,y){if(Ja(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(Ja(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),Ja(_)==="symbol"?_:String(_)),s)}var _}function V0(f,i){return V0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,s){return m.__proto__=s,m},V0(f,i)}function Jc(f){return Jc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Jc(f)}var _m=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,mm=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&V0(o,u)})(y,f);var i,m,s,_,l=(s=y,_=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=Jc(s);if(_){var S=Jc(this).constructor;o=Reflect.construct(u,arguments,S)}else o=u.apply(this,arguments);return function(k,C){if(C&&(Ja(C)==="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}(k)}(this,o)});function y(o,u,S){var k;if(function(M,fe){if(!(M instanceof fe))throw new TypeError("Cannot call a class as a function")}(this,y),!_m)throw new Error("FileStream is only available when running in Node!");var C=dm.readFileSync(o,u||"utf-8");return(k=l.call(this,C,S)).fileName=o,k}return i=y,m=[{key:"fromPath",value:function(o,u,S){if(!_m)throw new Error("FileStream is only available when running in Node!");dm.readFile(o,u,function(k,C){var M=null;C!==null&&(M=new au(C,!0)),S(k,M)})}}],m&&Hb(i,m),Object.defineProperty(i,"prototype",{writable:!1}),y}(su);const ym={fromString:function(f){return new au(f,!0)},fromBlob:function(f,i,m,s){var _=new window.FileReader;_.onload=function(l){var y=new au(l.target.result,!0);m(y)},_.onerror=s,_.readAsText(f,i)},fromBuffer:function(f,i){return new au(f.toString(i),!0)},fromPath:function(f,i,m){mm.fromPath(f,i,m)},fromPathSync:function(f,i){return new mm(f,i)}},Gb={arrayToString:F,stringToCharArray:function(f){for(var i=new Uint16Array(f.length),m=0;m<f.length;m++)i[m]=f.charCodeAt(m);return i}};function uu(f){return uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},uu(f)}function gm(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,(_=function(l,y){if(uu(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(uu(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),uu(_)==="symbol"?_:String(_)),s)}var _}function Kb(f,i,m){return i&&gm(f.prototype,i),m&&gm(f,m),Object.defineProperty(f,"prototype",{writable:!1}),f}function es(f){return es=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},es(f)}function zb(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,(_=function(l,y){if(es(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(es(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),es(_)==="symbol"?_:String(_)),s)}var _}function j0(f,i){return j0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,s){return m.__proto__=s,m},j0(f,i)}function el(f){return el=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},el(f)}var vm=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&j0(o,u)})(y,f);var i,m,s,_,l=(s=y,_=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=el(s);if(_){var S=el(this).constructor;o=Reflect.construct(u,arguments,S)}else o=u.apply(this,arguments);return function(k,C){if(C&&(es(C)==="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}(k)}(this,o)});function y(o){var u;return function(S,k){if(!(S instanceof k))throw new TypeError("Cannot call a class as a function")}(this,y),(u=l.call(this)).tokenSource=o,u.tokens=[],u.index=-1,u.fetchedEOF=!1,u}return i=y,(m=[{key:"mark",value:function(){return 0}},{key:"release",value:function(o){}},{key:"reset",value:function(){this.seek(0)}},{key:"seek",value:function(o){this.lazyInit(),this.index=this.adjustSeekIndex(o)}},{key:"size",get:function(){return this.tokens.length}},{key:"get",value:function(o){return this.lazyInit(),this.tokens[o]}},{key:"consume",value:function(){if(!(this.index>=0&&(this.fetchedEOF?this.index<this.tokens.length-1:this.index<this.tokens.length))&&this.LA(1)===n.EOF)throw"cannot consume EOF";this.sync(this.index+1)&&(this.index=this.adjustSeekIndex(this.index+1))}},{key:"sync",value:function(o){var u=o-this.tokens.length+1;return!(u>0)||this.fetch(u)>=u}},{key:"fetch",value:function(o){if(this.fetchedEOF)return 0;for(var u=0;u<o;u++){var S=this.tokenSource.nextToken();if(S.tokenIndex=this.tokens.length,this.tokens.push(S),S.type===n.EOF)return this.fetchedEOF=!0,u+1}return o}},{key:"getTokens",value:function(o,u,S){if(S===void 0&&(S=null),o<0||u<0)return null;this.lazyInit();var k=[];u>=this.tokens.length&&(u=this.tokens.length-1);for(var C=o;C<u;C++){var M=this.tokens[C];if(M.type===n.EOF)break;(S===null||S.contains(M.type))&&k.push(M)}return k}},{key:"LA",value:function(o){return this.LT(o).type}},{key:"LB",value:function(o){return this.index-o<0?null:this.tokens[this.index-o]}},{key:"LT",value:function(o){if(this.lazyInit(),o===0)return null;if(o<0)return this.LB(-o);var u=this.index+o-1;return this.sync(u),u>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[u]}},{key:"adjustSeekIndex",value:function(o){return o}},{key:"lazyInit",value:function(){this.index===-1&&this.setup()}},{key:"setup",value:function(){this.sync(0),this.index=this.adjustSeekIndex(0)}},{key:"setTokenSource",value:function(o){this.tokenSource=o,this.tokens=[],this.index=-1,this.fetchedEOF=!1}},{key:"nextTokenOnChannel",value:function(o,u){if(this.sync(o),o>=this.tokens.length)return-1;for(var S=this.tokens[o];S.channel!==this.channel;){if(S.type===n.EOF)return-1;o+=1,this.sync(o),S=this.tokens[o]}return o}},{key:"previousTokenOnChannel",value:function(o,u){for(;o>=0&&this.tokens[o].channel!==u;)o-=1;return o}},{key:"getHiddenTokensToRight",value:function(o,u){if(u===void 0&&(u=-1),this.lazyInit(),o<0||o>=this.tokens.length)throw o+" not in 0.."+this.tokens.length-1;var S=this.nextTokenOnChannel(o+1,hr.DEFAULT_TOKEN_CHANNEL),k=o+1,C=S===-1?this.tokens.length-1:S;return this.filterForChannel(k,C,u)}},{key:"getHiddenTokensToLeft",value:function(o,u){if(u===void 0&&(u=-1),this.lazyInit(),o<0||o>=this.tokens.length)throw o+" not in 0.."+this.tokens.length-1;var S=this.previousTokenOnChannel(o-1,hr.DEFAULT_TOKEN_CHANNEL);if(S===o-1)return null;var k=S+1,C=o-1;return this.filterForChannel(k,C,u)}},{key:"filterForChannel",value:function(o,u,S){for(var k=[],C=o;C<u+1;C++){var M=this.tokens[C];S===-1?M.channel!==hr.DEFAULT_TOKEN_CHANNEL&&k.push(M):M.channel===S&&k.push(M)}return k.length===0?null:k}},{key:"getSourceName",value:function(){return this.tokenSource.getSourceName()}},{key:"getText",value:function(o){this.lazyInit(),this.fill(),o||(o=new _e(0,this.tokens.length-1));var u=o.start;u instanceof n&&(u=u.tokenIndex);var S=o.stop;if(S instanceof n&&(S=S.tokenIndex),u===null||S===null||u<0||S<0)return"";S>=this.tokens.length&&(S=this.tokens.length-1);for(var k="",C=u;C<S+1;C++){var M=this.tokens[C];if(M.type===n.EOF)break;k+=M.text}return k}},{key:"fill",value:function(){for(this.lazyInit();this.fetch(1e3)===1e3;);}}])&&zb(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),y}(Kb(function f(){(function(i,m){if(!(i instanceof m))throw new TypeError("Cannot call a class as a function")})(this,f)}));function ts(f){return ts=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ts(f)}function Wb(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,(_=function(l,y){if(ts(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(ts(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),ts(_)==="symbol"?_:String(_)),s)}var _}function $0(f,i){return $0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,s){return m.__proto__=s,m},$0(f,i)}function tl(f){return tl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},tl(f)}Object.defineProperty(vm,"size",{get:function(){return this.tokens.length}});var bm=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&$0(o,u)})(y,f);var i,m,s,_,l=(s=y,_=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=tl(s);if(_){var S=tl(this).constructor;o=Reflect.construct(u,arguments,S)}else o=u.apply(this,arguments);return function(k,C){if(C&&(ts(C)==="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}(k)}(this,o)});function y(o,u){var S;return function(k,C){if(!(k instanceof C))throw new TypeError("Cannot call a class as a function")}(this,y),(S=l.call(this,o)).channel=u===void 0?n.DEFAULT_CHANNEL:u,S}return i=y,(m=[{key:"adjustSeekIndex",value:function(o){return this.nextTokenOnChannel(o,this.channel)}},{key:"LB",value:function(o){if(o===0||this.index-o<0)return null;for(var u=this.index,S=1;S<=o;)u=this.previousTokenOnChannel(u-1,this.channel),S+=1;return u<0?null:this.tokens[u]}},{key:"LT",value:function(o){if(this.lazyInit(),o===0)return null;if(o<0)return this.LB(-o);for(var u=this.index,S=1;S<o;)this.sync(u+1)&&(u=this.nextTokenOnChannel(u+1,this.channel)),S+=1;return this.tokens[u]}},{key:"getNumberOfOnChannelTokens",value:function(){var o=0;this.fill();for(var u=0;u<this.tokens.length;u++){var S=this.tokens[u];if(S.channel===this.channel&&(o+=1),S.type===n.EOF)break}return o}}])&&Wb(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),y}(vm);function ns(f){return ns=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ns(f)}function qb(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,(_=function(l,y){if(ns(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(ns(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),ns(_)==="symbol"?_:String(_)),s)}var _}function H0(f,i){return H0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,s){return m.__proto__=s,m},H0(f,i)}function nl(f){return nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},nl(f)}var Xb=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&H0(o,u)})(y,f);var i,m,s,_,l=(s=y,_=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=nl(s);if(_){var S=nl(this).constructor;o=Reflect.construct(u,arguments,S)}else o=u.apply(this,arguments);return function(k,C){if(C&&(ns(C)==="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}(k)}(this,o)});function y(o){var u;return function(S,k){if(!(S instanceof k))throw new TypeError("Cannot call a class as a function")}(this,y),(u=l.call(this)).parser=o,u}return i=y,(m=[{key:"enterEveryRule",value:function(o){console.log("enter "+this.parser.ruleNames[o.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)}},{key:"visitTerminal",value:function(o){console.log("consume "+o.symbol+" rule "+this.parser.ruleNames[this.parser._ctx.ruleIndex])}},{key:"exitEveryRule",value:function(o){console.log("exit "+this.parser.ruleNames[o.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)}}])&&qb(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),y}(A0);function rs(f){return rs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},rs(f)}function Yb(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,(_=function(l,y){if(rs(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(rs(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),rs(_)==="symbol"?_:String(_)),s)}var _}function G0(f,i){return G0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,s){return m.__proto__=s,m},G0(f,i)}function rl(f){return rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},rl(f)}var K0=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&G0(o,u)})(y,f);var i,m,s,_,l=(s=y,_=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=rl(s);if(_){var S=rl(this).constructor;o=Reflect.construct(u,arguments,S)}else o=u.apply(this,arguments);return function(k,C){if(C&&(rs(C)==="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}(k)}(this,o)});function y(o){var u;return function(S,k){if(!(S instanceof k))throw new TypeError("Cannot call a class as a function")}(this,y),(u=l.call(this))._input=null,u._errHandler=new B0,u._precedenceStack=[],u._precedenceStack.push(0),u._ctx=null,u.buildParseTrees=!0,u._tracer=null,u._parseListeners=null,u._syntaxErrors=0,u.setInputStream(o),u}return i=y,m=[{key:"reset",value:function(){this._input!==null&&this._input.seek(0),this._errHandler.reset(this),this._ctx=null,this._syntaxErrors=0,this.setTrace(!1),this._precedenceStack=[],this._precedenceStack.push(0),this._interp!==null&&this._interp.reset()}},{key:"match",value:function(o){var u=this.getCurrentToken();return u.type===o?(this._errHandler.reportMatch(this),this.consume()):(u=this._errHandler.recoverInline(this),this.buildParseTrees&&u.tokenIndex===-1&&this._ctx.addErrorNode(u)),u}},{key:"matchWildcard",value:function(){var o=this.getCurrentToken();return o.type>0?(this._errHandler.reportMatch(this),this.consume()):(o=this._errHandler.recoverInline(this),this.buildParseTrees&&o.tokenIndex===-1&&this._ctx.addErrorNode(o)),o}},{key:"getParseListeners",value:function(){return this._parseListeners||[]}},{key:"addParseListener",value:function(o){if(o===null)throw"listener";this._parseListeners===null&&(this._parseListeners=[]),this._parseListeners.push(o)}},{key:"removeParseListener",value:function(o){if(this._parseListeners!==null){var u=this._parseListeners.indexOf(o);u>=0&&this._parseListeners.splice(u,1),this._parseListeners.length===0&&(this._parseListeners=null)}}},{key:"removeParseListeners",value:function(){this._parseListeners=null}},{key:"triggerEnterRuleEvent",value:function(){if(this._parseListeners!==null){var o=this._ctx;this._parseListeners.forEach(function(u){u.enterEveryRule(o),o.enterRule(u)})}}},{key:"triggerExitRuleEvent",value:function(){if(this._parseListeners!==null){var o=this._ctx;this._parseListeners.slice(0).reverse().forEach(function(u){o.exitRule(u),u.exitEveryRule(o)})}}},{key:"getTokenFactory",value:function(){return this._input.tokenSource._factory}},{key:"setTokenFactory",value:function(o){this._input.tokenSource._factory=o}},{key:"getATNWithBypassAlts",value:function(){var o=this.getSerializedATN();if(o===null)throw"The current parser does not support an ATN with bypass alternatives.";var u=this.bypassAltsAtnCache[o];if(u===null){var S=new Ns;S.generateRuleBypassTransitions=!0,u=new t0(S).deserialize(o),this.bypassAltsAtnCache[o]=u}return u}},{key:"getInputStream",value:function(){return this.getTokenStream()}},{key:"setInputStream",value:function(o){this.setTokenStream(o)}},{key:"getTokenStream",value:function(){return this._input}},{key:"setTokenStream",value:function(o){this._input=null,this.reset(),this._input=o}},{key:"syntaxErrorsCount",get:function(){return this._syntaxErrors}},{key:"getCurrentToken",value:function(){return this._input.LT(1)}},{key:"notifyErrorListeners",value:function(o,u,S){S=S||null,(u=u||null)===null&&(u=this.getCurrentToken()),this._syntaxErrors+=1;var k=u.line,C=u.column;this.getErrorListenerDispatch().syntaxError(this,u,k,C,o,S)}},{key:"consume",value:function(){var o=this.getCurrentToken();o.type!==n.EOF&&this.getInputStream().consume();var u,S=this._parseListeners!==null&&this._parseListeners.length>0;return(this.buildParseTrees||S)&&((u=this._errHandler.inErrorRecoveryMode(this)?this._ctx.addErrorNode(o):this._ctx.addTokenNode(o)).invokingState=this.state,S&&this._parseListeners.forEach(function(k){u instanceof ti||u.isErrorNode!==void 0&&u.isErrorNode()?k.visitErrorNode(u):u instanceof hn&&k.visitTerminal(u)})),o}},{key:"addContextToParseTree",value:function(){this._ctx.parentCtx!==null&&this._ctx.parentCtx.addChild(this._ctx)}},{key:"enterRule",value:function(o,u,S){this.state=u,this._ctx=o,this._ctx.start=this._input.LT(1),this.buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}},{key:"exitRule",value:function(){this._ctx.stop=this._input.LT(-1),this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx.parentCtx}},{key:"enterOuterAlt",value:function(o,u){o.setAltNumber(u),this.buildParseTrees&&this._ctx!==o&&this._ctx.parentCtx!==null&&(this._ctx.parentCtx.removeLastChild(),this._ctx.parentCtx.addChild(o)),this._ctx=o}},{key:"getPrecedence",value:function(){return this._precedenceStack.length===0?-1:this._precedenceStack[this._precedenceStack.length-1]}},{key:"enterRecursionRule",value:function(o,u,S,k){this.state=u,this._precedenceStack.push(k),this._ctx=o,this._ctx.start=this._input.LT(1),this.triggerEnterRuleEvent()}},{key:"pushNewRecursionContext",value:function(o,u,S){var k=this._ctx;k.parentCtx=o,k.invokingState=u,k.stop=this._input.LT(-1),this._ctx=o,this._ctx.start=k.start,this.buildParseTrees&&this._ctx.addChild(k),this.triggerEnterRuleEvent()}},{key:"unrollRecursionContexts",value:function(o){this._precedenceStack.pop(),this._ctx.stop=this._input.LT(-1);var u=this._ctx,S=this.getParseListeners();if(S!==null&&S.length>0)for(;this._ctx!==o;)this.triggerExitRuleEvent(),this._ctx=this._ctx.parentCtx;else this._ctx=o;u.parentCtx=o,this.buildParseTrees&&o!==null&&o.addChild(u)}},{key:"getInvokingContext",value:function(o){for(var u=this._ctx;u!==null;){if(u.ruleIndex===o)return u;u=u.parentCtx}return null}},{key:"precpred",value:function(o,u){return u>=this._precedenceStack[this._precedenceStack.length-1]}},{key:"inContext",value:function(o){return!1}},{key:"isExpectedToken",value:function(o){var u=this._interp.atn,S=this._ctx,k=u.states[this.state],C=u.nextTokens(k);if(C.contains(o))return!0;if(!C.contains(n.EPSILON))return!1;for(;S!==null&&S.invokingState>=0&&C.contains(n.EPSILON);){var M=u.states[S.invokingState].transitions[0];if((C=u.nextTokens(M.followState)).contains(o))return!0;S=S.parentCtx}return!(!C.contains(n.EPSILON)||o!==n.EOF)}},{key:"getExpectedTokens",value:function(){return this._interp.atn.getExpectedTokens(this.state,this._ctx)}},{key:"getExpectedTokensWithinCurrentRule",value:function(){var o=this._interp.atn,u=o.states[this.state];return o.nextTokens(u)}},{key:"getRuleIndex",value:function(o){var u=this.getRuleIndexMap()[o];return u!==null?u:-1}},{key:"getRuleInvocationStack",value:function(o){(o=o||null)===null&&(o=this._ctx);for(var u=[];o!==null;){var S=o.ruleIndex;S<0?u.push("n/a"):u.push(this.ruleNames[S]),o=o.parentCtx}return u}},{key:"getDFAStrings",value:function(){return this._interp.decisionToDFA.toString()}},{key:"dumpDFA",value:function(){for(var o=!1,u=0;u<this._interp.decisionToDFA.length;u++){var S=this._interp.decisionToDFA[u];S.states.length>0&&(o&&console.log(),this.printer.println("Decision "+S.decision+":"),this.printer.print(S.toString(this.literalNames,this.symbolicNames)),o=!0)}}},{key:"getSourceName",value:function(){return this._input.sourceName}},{key:"setTrace",value:function(o){o?(this._tracer!==null&&this.removeParseListener(this._tracer),this._tracer=new Xb(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null)}}],m&&Yb(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),y}(Ic);function is(f){return is=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},is(f)}function Zb(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,(_=function(l,y){if(is(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(is(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),is(_)==="symbol"?_:String(_)),s)}var _}function z0(f,i){return z0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,s){return m.__proto__=s,m},z0(f,i)}function il(f){return il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},il(f)}K0.bypassAltsAtnCache={};var Em=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&z0(o,u)})(y,f);var i,m,s,_,l=(s=y,_=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=il(s);if(_){var S=il(this).constructor;o=Reflect.construct(u,arguments,S)}else o=u.apply(this,arguments);return function(k,C){if(C&&(is(C)==="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}(k)}(this,o)});function y(o){var u;return function(S,k){if(!(S instanceof k))throw new TypeError("Cannot call a class as a function")}(this,y),(u=l.call(this)).parentCtx=null,u.symbol=o,u}return i=y,(m=[{key:"getChild",value:function(o){return null}},{key:"getSymbol",value:function(){return this.symbol}},{key:"getParent",value:function(){return this.parentCtx}},{key:"getPayload",value:function(){return this.symbol}},{key:"getSourceInterval",value:function(){if(this.symbol===null)return _e.INVALID_INTERVAL;var o=this.symbol.tokenIndex;return new _e(o,o)}},{key:"getChildCount",value:function(){return 0}},{key:"accept",value:function(o){return o.visitTerminal(this)}},{key:"getText",value:function(){return this.symbol.text}},{key:"toString",value:function(){return this.symbol.type===n.EOF?"<EOF>":this.symbol.text}}])&&Zb(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),y}(hn);function os(f){return os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},os(f)}function Qb(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,(_=function(l,y){if(os(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(os(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),os(_)==="symbol"?_:String(_)),s)}var _}function W0(f,i){return W0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,s){return m.__proto__=s,m},W0(f,i)}function ol(f){return ol=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},ol(f)}var xm=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&W0(o,u)})(y,f);var i,m,s,_,l=(s=y,_=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=ol(s);if(_){var S=ol(this).constructor;o=Reflect.construct(u,arguments,S)}else o=u.apply(this,arguments);return function(k,C){if(C&&(os(C)==="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}(k)}(this,o)});function y(o){return function(u,S){if(!(u instanceof S))throw new TypeError("Cannot call a class as a function")}(this,y),l.call(this,o)}return i=y,(m=[{key:"isErrorNode",value:function(){return!0}},{key:"accept",value:function(o){return o.visitErrorNode(this)}}])&&Qb(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),y}(Em);function as(f){return as=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},as(f)}function Jb(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,(_=function(l,y){if(as(l)!=="object"||l===null)return l;var o=l[Symbol.toPrimitive];if(o!==void 0){var u=o.call(l,"string");if(as(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(s.key),as(_)==="symbol"?_:String(_)),s)}var _}function q0(f,i){return q0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,s){return m.__proto__=s,m},q0(f,i)}function al(f){return al=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},al(f)}var X0=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&q0(o,u)})(y,f);var i,m,s,_,l=(s=y,_=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=al(s);if(_){var S=al(this).constructor;o=Reflect.construct(u,arguments,S)}else o=u.apply(this,arguments);return function(k,C){if(C&&(as(C)==="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}(k)}(this,o)});function y(o,u){var S;return function(k,C){if(!(k instanceof C))throw new TypeError("Cannot call a class as a function")}(this,y),(S=l.call(this,o,u)).children=null,S.start=null,S.stop=null,S.exception=null,S}return i=y,(m=[{key:"copyFrom",value:function(o){this.parentCtx=o.parentCtx,this.invokingState=o.invokingState,this.children=null,this.start=o.start,this.stop=o.stop,o.children&&(this.children=[],o.children.map(function(u){u instanceof xm&&(this.children.push(u),u.parentCtx=this)},this))}},{key:"enterRule",value:function(o){}},{key:"exitRule",value:function(o){}},{key:"addChild",value:function(o){return this.children===null&&(this.children=[]),this.children.push(o),o}},{key:"removeLastChild",value:function(){this.children!==null&&this.children.pop()}},{key:"addTokenNode",value:function(o){var u=new Em(o);return this.addChild(u),u.parentCtx=this,u}},{key:"addErrorNode",value:function(o){var u=new xm(o);return this.addChild(u),u.parentCtx=this,u}},{key:"getChild",value:function(o,u){if(u=u||null,this.children===null||o<0||o>=this.children.length)return null;if(u===null)return this.children[o];for(var S=0;S<this.children.length;S++){var k=this.children[S];if(k instanceof u){if(o===0)return k;o-=1}}return null}},{key:"getToken",value:function(o,u){if(this.children===null||u<0||u>=this.children.length)return null;for(var S=0;S<this.children.length;S++){var k=this.children[S];if(k instanceof hn&&k.symbol.type===o){if(u===0)return k;u-=1}}return null}},{key:"getTokens",value:function(o){if(this.children===null)return[];for(var u=[],S=0;S<this.children.length;S++){var k=this.children[S];k instanceof hn&&k.symbol.type===o&&u.push(k)}return u}},{key:"getTypedRuleContext",value:function(o,u){return this.getChild(u,o)}},{key:"getTypedRuleContexts",value:function(o){if(this.children===null)return[];for(var u=[],S=0;S<this.children.length;S++){var k=this.children[S];k instanceof o&&u.push(k)}return u}},{key:"getChildCount",value:function(){return this.children===null?0:this.children.length}},{key:"getSourceInterval",value:function(){return this.start===null||this.stop===null?_e.INVALID_INTERVAL:new _e(this.start.tokenIndex,this.stop.tokenIndex)}}])&&Jb(i.prototype,m),Object.defineProperty(i,"prototype",{writable:!1}),y}(ro);function Y0(f,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(i&&i.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),Object.defineProperty(f,"prototype",{writable:!1}),i&&Z0(f,i)}function Z0(f,i){return Z0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,s){return m.__proto__=s,m},Z0(f,i)}function Q0(f){var i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var m,s=sl(f);if(i){var _=sl(this).constructor;m=Reflect.construct(s,arguments,_)}else m=s.apply(this,arguments);return function(l,y){if(y&&(ss(y)==="object"||typeof y=="function"))return y;if(y!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(l)}(this,m)}}function sl(f){return sl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},sl(f)}function ss(f){return ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ss(f)}function us(f,i){var m=typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(!m){if(Array.isArray(f)||(m=function(u,S){if(u){if(typeof u=="string")return Sm(u,S);var k=Object.prototype.toString.call(u).slice(8,-1);return k==="Object"&&u.constructor&&(k=u.constructor.name),k==="Map"||k==="Set"?Array.from(u):k==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k)?Sm(u,S):void 0}}(f))||i&&f&&typeof f.length=="number"){m&&(f=m);var s=0,_=function(){};return{s:_,n:function(){return s>=f.length?{done:!0}:{done:!1,value:f[s++]}},e:function(u){throw u},f:_}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
10
10
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var l,y=!0,o=!1;return{s:function(){m=m.call(f)},n:function(){var u=m.next();return y=u.done,u},e:function(u){o=!0,l=u},f:function(){try{y||m.return==null||m.return()}finally{if(o)throw l}}}}function Sm(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 cu(f,i){if(!(f instanceof i))throw new TypeError("Cannot call a class as a function")}function Tm(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,Am(s.key),s)}}function lu(f,i,m){return i&&Tm(f.prototype,i),m&&Tm(f,m),Object.defineProperty(f,"prototype",{writable:!1}),f}function Am(f){var i=function(m,s){if(ss(m)!=="object"||m===null)return m;var _=m[Symbol.toPrimitive];if(_!==void 0){var l=_.call(m,"string");if(ss(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(m)}(f);return ss(i)==="symbol"?i:String(i)}ro.EMPTY=new X0;var ul,cl,J0,Cm=function(){function f(i){cu(this,f),this.tokens=i,this.programs=new Map}return lu(f,[{key:"getTokenStream",value:function(){return this.tokens}},{key:"insertAfter",value:function(i,m){var s,_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.DEFAULT_PROGRAM_NAME;s=typeof i=="number"?i:i.tokenIndex;var l=this.getProgram(_),y=new km(this.tokens,s,l.length,m);l.push(y)}},{key:"insertBefore",value:function(i,m){var s,_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.DEFAULT_PROGRAM_NAME;s=typeof i=="number"?i:i.tokenIndex;var l=this.getProgram(_),y=new cs(this.tokens,s,l.length,m);l.push(y)}},{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 _=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(_),y=new ll(this.tokens,i,m,l.length,s);l.push(y)}},{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 _e?i:new _e(0,this.tokens.size-1),typeof i=="string"&&(s=i);var _=this.programs.get(s),l=m.start,y=m.stop;if(y>this.tokens.size-1&&(y=this.tokens.size-1),l<0&&(l=0),_==null||_.length===0)return this.tokens.getText(new _e(l,y));for(var o=[],u=this.reduceToSingleOperationPerIndex(_),S=l;S<=y&&S<this.tokens.size;){var k=u.get(S);u.delete(S);var C=this.tokens.get(S);k==null?(C.type!==n.EOF&&o.push(String(C.text)),S++):S=k.execute(o)}if(y===this.tokens.size-1){var M,fe=us(u.values());try{for(fe.s();!(M=fe.n()).done;){var Ne=M.value;Ne.index>=this.tokens.size-1&&o.push(Ne.text.toString())}}catch(Re){fe.e(Re)}finally{fe.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 ll){var _,l=s,y=us(this.getKindOfOps(i,cs,m));try{for(y.s();!(_=y.n()).done;){var o=_.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(Rr){y.e(Rr)}finally{y.f()}var u,S=us(this.getKindOfOps(i,ll,m));try{for(S.s();!(u=S.n()).done;){var k=u.value;if(k.index>=l.index&&k.lastIndex<=l.lastIndex)i[k.instructionIndex]=void 0;else{var C=k.lastIndex<l.index||k.index>l.lastIndex;if(k.text!=null||l.text!=null||C){if(!C)throw new Error("replace op boundaries of ".concat(l," overlap with previous ").concat(k))}else i[k.instructionIndex]=void 0,l.index=Math.min(k.index,l.index),l.lastIndex=Math.max(k.lastIndex,l.lastIndex)}}}catch(Rr){S.e(Rr)}finally{S.f()}}}for(var M=0;M<i.length;M++){var fe=i[M];if(fe!=null&&fe instanceof cs){var Ne,Re=fe,Ge=us(this.getKindOfOps(i,cs,M));try{for(Ge.s();!(Ne=Ge.n()).done;){var ct=Ne.value;ct.index===Re.index&&(ct instanceof km?(Re.text=this.catOpText(ct.text,Re.text),i[ct.instructionIndex]=void 0):ct instanceof cs&&(Re.text=this.catOpText(Re.text,ct.text),i[ct.instructionIndex]=void 0))}}catch(Rr){Ge.e(Rr)}finally{Ge.f()}var We,En=us(this.getKindOfOps(i,ll,M));try{for(En.s();!(We=En.n()).done;){var vn=We.value;if(Re.index!==vn.index){if(Re.index>=vn.index&&Re.index<=vn.lastIndex)throw new Error("insert op ".concat(Re," within boundaries of previous ").concat(vn))}else vn.text=this.catOpText(Re.text,vn.text),i[M]=void 0}}catch(Rr){En.e(Rr)}finally{En.f()}}}var qn,qr=new Map,Bi=us(i);try{for(Bi.s();!(qn=Bi.n()).done;){var Li=qn.value;if(Li!=null){if(qr.get(Li.index)!=null)throw new Error("should only be one op per index");qr.set(Li.index,Li)}}}catch(Rr){Bi.e(Rr)}finally{Bi.f()}return qr}},{key:"catOpText",value:function(i,m){var s="",_="";return i!=null&&(s=i.toString()),m!=null&&(_=m.toString()),s+_}},{key:"getKindOfOps",value:function(i,m,s){return i.slice(0,s).filter(function(_){return _&&_ instanceof m})}}]),f}();ul=Cm,J0="default",(cl=Am(cl="DEFAULT_PROGRAM_NAME"))in ul?Object.defineProperty(ul,cl,{value:J0,enumerable:!0,configurable:!0,writable:!0}):ul[cl]=J0;var Dm=function(){function f(i,m,s,_){cu(this,f),this.tokens=i,this.instructionIndex=s,this.index=m,this.text=_===void 0?"":_}return lu(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}(),cs=function(f){Y0(m,f);var i=Q0(m);function m(s,_,l,y){return cu(this,m),i.call(this,s,_,l,y)}return lu(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}(Dm),km=function(f){Y0(m,f);var i=Q0(m);function m(s,_,l,y){return cu(this,m),i.call(this,s,_+1,l,y)}return lu(m)}(cs),ll=function(f){Y0(m,f);var i=Q0(m);function m(s,_,l,y,o){var u;return cu(this,m),(u=i.call(this,s,_,y,o)).lastIndex=l,u}return lu(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}(Dm);const e1={atn:Tb,dfa:kb,context:Ob,misc:wb,tree:Ib,error:jb,Token:n,CommonToken:Us,CharStreams:ym,CharStream:su,InputStream:su,CommonTokenStream:bm,Lexer:hr,Parser:K0,ParserRuleContext:X0,Interval:_e,IntervalSet:J,LL1Analyzer:Go,Utils:Gb,TokenStreamRewriter:Cm}})();var Nr=Mt.dx,ep=Mt.q2;Mt.FO,Mt.xf,Mt.Gy;var Om=Mt.s4,wm=Mt.c7,tp=Mt._7;Mt.gp;var Rm=Mt.cK,Fm=Mt.zs,Nm=Mt.AV;Mt.Xp,Mt.VS,Mt.ul;var Im=Mt.hW,Pm=Mt.x1,bi=Mt.z5;Mt.oN;var Bm=Mt.TB;Mt.u1;var Lm=Mt._b,Mm=Mt.$F,Je=Mt._T,np=Mt.db,Um=Mt.Zx,et=Mt._x;Mt.r8,Mt.JI,Mt.TP;var rp=Mt.WU;Mt.Nj,Mt.ZP;const $=class $ extends Lm{get grammarFileName(){return"tccScriptParser.g4"}get literalNames(){return $.literalNames}get symbolicNames(){return $.symbolicNames}get ruleNames(){return $.ruleNames}get serializedATN(){return $._serializedATN}createFailedPredicateException(e,n){return new Fm(this,e,n)}constructor(e){super(e),this._interp=new Mm(this,$._ATN,$.DecisionsToDFA,new np)}program(){let e=new Vm(this,this._ctx,this.state);this.enterRule(e,0,$.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($.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 bi(this)}this.state=108,this._errHandler.sync(this),n=this._input.LA(1)}this.state=109,this.match($.EOF)}}catch(r){if(r instanceof et)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 fl(this,this._ctx,this.state);this.enterRule(e,2,$.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($.Comma)),this.state=115,this.match($.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 et)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 ip(this,this._ctx,this.state);this.enterRule(e,4,$.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!==Nr.INVALID_ALT_NUMBER;)n===1&&(this.state=125,this.variableDeclarationStmt(),this.state=126,this.match($.Comma)),this.state=132,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,4,this._ctx);switch(this.state=135,this._errHandler.sync(this),this._input.LA(1)){case 4:case 6:case 38:case 40:case 51:case 54:case 55:case 58:this.state=133,this.varBlockStmt();break;case 37:case 41:case 42:case 43:this.state=134,this.blockExpression();break;default:throw new bi(this)}}}catch(n){if(n instanceof et)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 hl(this,this._ctx,this.state);this.enterRule(e,6,$.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($.Comma)),this.state=141,this.match($.NEWLINE);break;case 2:this.enterOuterAlt(e,2),this.state=143,this.expressionBlockSequence();break}}catch(r){if(r instanceof et)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 pl(this,this._ctx,this.state);this.enterRule(e,8,$.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 et)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 op(this,this._ctx,this.state);this.enterRule(e,10,$.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 et)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 ls(this,this._ctx,this.state);this.enterRule(e,12,$.RULE_block);let n;try{switch(this.state=161,this._errHandler.sync(this),this._input.LA(1)){case 4:case 6:case 12:case 13:case 31:case 32:case 33:case 34:case 38:case 39:case 40:case 46:case 51:case 54:case 55:case 56:case 57:case 58:this.enterOuterAlt(e,1),this.state=154,this.simpleStmt(),this.state=156,this._errHandler.sync(this),n=this._input.LA(1),n===8&&(this.state=155,this.match($.Comma)),this.state=158,this.match($.NEWLINE);break;case 61:this.enterOuterAlt(e,2),this.state=160,this.blockLine();break;default:throw new bi(this)}}catch(r){if(r instanceof et)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 Eo(this,this._ctx,this.state);this.enterRule(e,14,$.RULE_blockLine);let n;try{this.enterOuterAlt(e,1);{this.state=163,this.match($.NEWLINE),this.state=164,this.match($.INDENT),this.state=166,this._errHandler.sync(this),n=this._input.LA(1);do this.state=165,this.stmt(),this.state=168,this._errHandler.sync(this),n=this._input.LA(1);while(!(n&-32)&&1<<n&2147496016||!(n-32&-32)&&1<<n-32&130568167);this.state=170,this.match($.DEDENT)}}catch(r){if(r instanceof et)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 fu(this,this._ctx,this.state);this.enterRule(e,16,$.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!==Nr.INVALID_ALT_NUMBER;){if(n===1)switch(this.state=176,this.match($.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 et)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 Mi(this,this._ctx,this.state);this.enterRule(e,18,$.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($.Assign),this.state=188,this.singleExpression(0);break;case 2:e=new jm(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 et)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 dl(this,this._ctx,this.state);this.enterRule(e,20,$.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 et)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 ap(this,this._ctx,this.state);this.enterRule(e,22,$.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!==Nr.INVALID_ALT_NUMBER;){if(n===1)switch(this.state=202,this.match($.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 et)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 _l(this,this._ctx,this.state);this.enterRule(e,24,$.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!==Nr.INVALID_ALT_NUMBER;)n===1&&(this.state=213,this.match($.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 et)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 sp(this,this._ctx,this.state);this.enterRule(e,26,$.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!==Nr.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($.Comma)}this.state=230,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,21,this._ctx)}switch(this.state=233,this._errHandler.sync(this),this._input.LA(1)){case 4:case 6:case 38:case 40:case 51:case 54:case 55:case 58:this.state=231,this.varBlockStmt();break;case 37:case 41:case 42:case 43:this.state=232,this.blockExpression();break;default:throw new bi(this)}}}catch(n){if(n instanceof et)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 ml(this,this._ctx,this.state);this.enterRule(e,28,$.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($.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 et)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 fs(this,this._ctx,this.state);this.enterRule(e,30,$.RULE_varArrayDeclaration);let n;try{switch(this.state=263,this._errHandler.sync(this),this._input.LA(1)){case 38:case 40:case 51:case 54:case 55:case 58:e=new Gm(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 Hm(this,e),this.enterOuterAlt(e,2);{for(this.state=252,this.match($.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($.Comma),this.state=255,this.identifier(),this.state=260,this._errHandler.sync(this),n=this._input.LA(1);this.state=261,this.match($.CloseBracket)}break;default:throw new bi(this)}}catch(r){if(r instanceof et)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 hu(this,this._ctx,this.state);this.enterRule(e,32,$.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 bi(this)}}catch(n){if(n instanceof et)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 je(this,this._ctx,r),c=a,h=34;this.enterRecursionRule(a,34,$.RULE_singleExpression,e);let p;try{let E;this.enterOuterAlt(a,1);{switch(this.state=283,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,29,this._ctx)){case 1:a=new ny(this,a),this._ctx=a,c=a,this.state=272,this.methodStmt();break;case 2:a=new Jm(this,a),this._ctx=a,c=a,this.state=273,p=this._input.LA(1),p===12||p===13?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=274,this.singleExpression(12);break;case 3:a=new ey(this,a),this._ctx=a,c=a,this.state=275,this.match($.Not),this.state=276,this.singleExpression(11);break;case 4:a=new Ym(this,a),this._ctx=a,c=a,this.state=277,this.name();break;case 5:a=new Zm(this,a),this._ctx=a,c=a,this.state=278,this.literal();break;case 6:a=new Km(this,a),this._ctx=a,c=a,this.state=279,this.match($.OpenParen),this.state=280,this.singleExpression(0),this.state=281,this.match($.CloseParen);break}for(this._ctx.stop=this._input.LT(-1),this.state=316,this._errHandler.sync(this),E=this._interp.adaptivePredict(this._input,31,this._ctx);E!==2&&E!==Nr.INVALID_ALT_NUMBER;){if(E===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 iy(this,new je(this,n,r)),this.pushNewRecursionContext(a,h,$.RULE_singleExpression),this.state=285,!this.precpred(this._ctx,10))throw this.createFailedPredicateException("this.precpred(this._ctx, 10)");this.state=286,p=this._input.LA(1),!(p&-32)&&1<<p&114688?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=287,this.singleExpression(11)}break;case 2:{if(a=new zm(this,new je(this,n,r)),this.pushNewRecursionContext(a,h,$.RULE_singleExpression),this.state=288,!this.precpred(this._ctx,9))throw this.createFailedPredicateException("this.precpred(this._ctx, 9)");this.state=289,p=this._input.LA(1),p===12||p===13?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=290,this.singleExpression(10)}break;case 3:{if(a=new Wm(this,new je(this,n,r)),this.pushNewRecursionContext(a,h,$.RULE_singleExpression),this.state=291,!this.precpred(this._ctx,8))throw this.createFailedPredicateException("this.precpred(this._ctx, 8)");this.state=292,p=this._input.LA(1),!(p&-32)&&1<<p&3932160?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=293,this.singleExpression(9)}break;case 4:{if(a=new ry(this,new je(this,n,r)),this.pushNewRecursionContext(a,h,$.RULE_singleExpression),this.state=294,!this.precpred(this._ctx,7))throw this.createFailedPredicateException("this.precpred(this._ctx, 7)");this.state=295,p=this._input.LA(1),p===22||p===23?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=296,this.singleExpression(8)}break;case 5:{if(a=new Xm(this,new je(this,n,r)),this.pushNewRecursionContext(a,h,$.RULE_singleExpression),this.state=297,!this.precpred(this._ctx,6))throw this.createFailedPredicateException("this.precpred(this._ctx, 6)");this.state=298,this.match($.And),this.state=299,this.singleExpression(7)}break;case 6:{if(a=new Qm(this,new je(this,n,r)),this.pushNewRecursionContext(a,h,$.RULE_singleExpression),this.state=300,!this.precpred(this._ctx,5))throw this.createFailedPredicateException("this.precpred(this._ctx, 5)");this.state=301,this.match($.Or),this.state=302,this.singleExpression(6)}break;case 7:{if(a=new qm(this,new je(this,n,r)),this.pushNewRecursionContext(a,h,$.RULE_singleExpression),this.state=303,!this.precpred(this._ctx,4))throw this.createFailedPredicateException("this.precpred(this._ctx, 4)");this.state=304,this.match($.QuestionMark),this.state=305,this.singleExpression(0),this.state=306,this.match($.Colon),this.state=307,this.singleExpression(4)}break;case 8:{if(a=new ty(this,new je(this,n,r)),this.pushNewRecursionContext(a,h,$.RULE_singleExpression),this.state=309,!this.precpred(this._ctx,13))throw this.createFailedPredicateException("this.precpred(this._ctx, 13)");this.state=310,this.match($.OpenBracket),this.state=311,this.singleExpression(0),this.state=312,this.match($.CloseBracket)}break}this.state=318,this._errHandler.sync(this),E=this._interp.adaptivePredict(this._input,31,this._ctx)}}}catch(E){if(E instanceof et)a.exception=E,this._errHandler.reportError(this,E),this._errHandler.recover(this,E);else throw E}finally{this.unrollRecursionContexts(n)}return a}brackethesized(){let e=new yl(this,this._ctx,this.state);this.enterRule(e,36,$.RULE_brackethesized);try{this.enterOuterAlt(e,1),this.state=319,this.match($.OpenBracket),this.state=320,this.expressionSequence(),this.state=321,this.match($.CloseBracket)}catch(n){if(n instanceof et)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 up(this,this._ctx,this.state);this.enterRule(e,38,$.RULE_arguments);let n;try{let r;this.enterOuterAlt(e,1);{if(this.state=323,this.match($.OpenParen),this.state=335,this._errHandler.sync(this),n=this._input.LA(1),!(n&-32)&&1<<n&2147496016||!(n-32&-32)&&1<<n-32&130564099){for(this.state=324,this.argument(),this.state=329,this._errHandler.sync(this),r=this._interp.adaptivePredict(this._input,32,this._ctx);r!==2&&r!==Nr.INVALID_ALT_NUMBER;)r===1&&(this.state=325,this.match($.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($.Comma))}this.state=337,this.match($.CloseParen)}}catch(r){if(r instanceof et)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 gl(this,this._ctx,this.state);this.enterRule(e,40,$.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($.Assign);break}switch(this.state=346,this._errHandler.sync(this),this._input.LA(1)){case 6:case 12:case 13:case 31:case 32:case 33:case 46:case 51:case 54:case 55:case 56:case 57:case 58:this.state=344,this.singleExpression(0);break;case 4:this.state=345,this.brackethesized();break;default:throw new bi(this)}}}catch(n){if(n instanceof et)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 cp(this,this._ctx,this.state);this.enterRule(e,42,$.RULE_ifStatement);let n;try{let r;this.enterOuterAlt(e,1);{for(this.state=348,this.match($.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!==Nr.INVALID_ALT_NUMBER;)r===1&&(this.state=351,this.match($.Else),this.state=352,this.match($.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($.Else),this.state=362,this.blockLine())}}catch(r){if(r instanceof et)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 pu(this,this._ctx,this.state);this.enterRule(e,44,$.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 oy(this,e),this.enterOuterAlt(e,1);{switch(this.state=365,this.match($.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($.Assign),this.state=374,this.singleExpression(0),this.state=375,this.match($.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($.By),this.state=378,this.singleExpression(0)),this.state=381,this.blockLine()}break;case 2:e=new ay(this,e),this.enterOuterAlt(e,2);{switch(this.state=383,this.match($.For),this.state=391,this._errHandler.sync(this),this._input.LA(1)){case 51:case 54:case 55:case 58:this.state=384,this.identifier();break;case 4:this.state=385,this.match($.OpenBracket),this.state=386,this.identifier(),this.state=387,this.match($.Comma),this.state=388,this.identifier(),this.state=389,this.match($.CloseBracket);break;default:throw new bi(this)}this.state=393,this.match($.In),this.state=394,this.singleExpression(0),this.state=395,this.blockLine()}break}}catch(r){if(r instanceof et)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 lp(this,this._ctx,this.state);this.enterRule(e,46,$.RULE_switchStatement);let n;try{this.enterOuterAlt(e,1);{switch(this.state=399,this.match($.Switch),this.state=401,this._errHandler.sync(this),n=this._input.LA(1),(!(n&-32)&&1<<n&2147496e3||!(n-32&-32)&&1<<n-32&130564099)&&(this.state=400,this.singleExpression(0)),this.state=403,this.match($.NEWLINE),this.state=404,this.match($.INDENT),this.state=417,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,47,this._ctx)){case 1:{this.state=406,this._errHandler.sync(this),n=this._input.LA(1);do this.state=405,this.caseClause(),this.state=408,this._errHandler.sync(this),n=this._input.LA(1);while(!(n&-32)&&1<<n&2147496e3||!(n-32&-32)&&1<<n-32&130564099)}break;case 2:{for(this.state=413,this._errHandler.sync(this),n=this._input.LA(1);!(n&-32)&&1<<n&2147496e3||!(n-32&-32)&&1<<n-32&130564099;)this.state=410,this.caseClause(),this.state=415,this._errHandler.sync(this),n=this._input.LA(1);this.state=416,this.defaultCaluse()}break}this.state=419,this.match($.DEDENT)}}catch(r){if(r instanceof et)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 vl(this,this._ctx,this.state);this.enterRule(e,48,$.RULE_caseClause);try{this.enterOuterAlt(e,1),this.state=421,this.singleExpression(0),this.state=422,this.match($.ARROW),this.state=423,this.block()}catch(n){if(n instanceof et)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 fp(this,this._ctx,this.state);this.enterRule(e,50,$.RULE_defaultCaluse);try{this.enterOuterAlt(e,1),this.state=425,this.match($.ARROW),this.state=426,this.block()}catch(n){if(n instanceof et)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 hp(this,this._ctx,this.state);this.enterRule(e,52,$.RULE_whileStatement);try{this.enterOuterAlt(e,1),this.state=428,this.match($.While),this.state=429,this.singleExpression(0),this.state=430,this.blockLine()}catch(n){if(n instanceof et)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 pp(this,this._ctx,this.state);this.enterRule(e,54,$.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!==Nr.INVALID_ALT_NUMBER;)r===1&&(this.state=433,this.match($.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($.Comma)),this.state=443,this.match($.NEWLINE)}}catch(r){if(r instanceof et)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 bl(this,this._ctx,this.state);this.enterRule(e,56,$.RULE_importElement);let n;try{this.enterOuterAlt(e,1),this.state=445,this.match($.Import),this.state=446,this.identifier(),this.state=447,this.match($.Divide),this.state=448,this.identifier(),this.state=449,this.match($.Divide),this.state=450,this.match($.IntegerLiteral),this.state=453,this._errHandler.sync(this),n=this._input.LA(1),n===53&&(this.state=451,this.match($.As),this.state=452,this.identifier())}catch(r){if(r instanceof et)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 dp(this,this._ctx,this.state);this.enterRule(e,58,$.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 et)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 du(this,this._ctx,this.state);this.enterRule(e,60,$.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!==Nr.INVALID_ALT_NUMBER;)n===1&&(this.state=458,this.match($.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 et)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 hs(this,this._ctx,this.state);this.enterRule(e,62,$.RULE_methodElement);try{this.enterOuterAlt(e,1),this.state=465,this.methodName(),this.state=466,this.arguments()}catch(n){if(n instanceof et)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 _p(this,this._ctx,this.state);this.enterRule(e,64,$.RULE_methodName);let n;try{let r;this.enterOuterAlt(e,1);{switch(this.state=481,this._errHandler.sync(this),this._input.LA(1)){case 51:case 54:case 55:case 58:for(this.state=473,this._errHandler.sync(this),r=this._interp.adaptivePredict(this._input,52,this._ctx);r!==2&&r!==Nr.INVALID_ALT_NUMBER;)r===1&&(this.state=468,this.identifier(),this.state=469,this.match($.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($.OpenParen),this.state=477,this.singleExpression(0),this.state=478,this.match($.CloseParen),this.state=479,this.match($.Point);break;default:throw new bi(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($.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($.Comma),this.state=487,this.typeName()),this.state=490,this.match($.MoreThan))}}catch(r){if(r instanceof et)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 mp(this,this._ctx,this.state);this.enterRule(e,66,$.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($.Export)),this.state=497,this.identifier(),this.state=498,this.arrowFunctionParameters(),this.state=499,this.match($.ARROW),this.state=500,this.block()}catch(r){if(r instanceof et)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 yp(this,this._ctx,this.state);this.enterRule(e,68,$.RULE_arrowFunctionParameters);let n;try{this.enterOuterAlt(e,1),this.state=502,this.match($.OpenParen),this.state=504,this._errHandler.sync(this),n=this._input.LA(1),!(n-51&-32)&&1<<n-51&153&&(this.state=503,this.formalParameterList()),this.state=506,this.match($.CloseParen)}catch(r){if(r instanceof et)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 El(this,this._ctx,this.state);this.enterRule(e,70,$.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($.Comma),this.state=510,this.formalParameterArg(),this.state=515,this._errHandler.sync(this),n=this._input.LA(1)}catch(r){if(r instanceof et)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 xl(this,this._ctx,this.state);this.enterRule(e,72,$.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($.Assign),this.state=521,this.singleExpression(0))}}catch(r){if(r instanceof et)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 gp(this,this._ctx,this.state);this.enterRule(e,74,$.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($.Export)),this.state=527,this.match($.Method),this.state=528,this.identifier(),this.state=529,this.arrowMethodParameters(),this.state=530,this.match($.ARROW),this.state=531,this.block()}catch(r){if(r instanceof et)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 vp(this,this._ctx,this.state);this.enterRule(e,76,$.RULE_arrowMethodParameters);let n;try{this.enterOuterAlt(e,1),this.state=533,this.match($.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($.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($.Comma),this.state=541,this.formalParameterList()),this.state=544,this.match($.CloseParen)}catch(r){if(r instanceof et)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 bp(this,this._ctx,this.state);this.enterRule(e,78,$.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($.Export)),this.state=549,this.match($.Type),this.state=550,this.identifier(),this.state=551,this.match($.NEWLINE),this.state=552,this.match($.INDENT),this.state=554,this._errHandler.sync(this),n=this._input.LA(1);do this.state=553,this.typeElement(),this.state=556,this._errHandler.sync(this),n=this._input.LA(1);while(!(n-40&-32)&&1<<n-40&313345);this.state=558,this.match($.DEDENT)}}catch(r){if(r instanceof et)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 Sl(this,this._ctx,this.state);this.enterRule(e,80,$.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($.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($.Assign),this.state=568,this.singleExpression(0)),this.state=571,this.match($.NEWLINE)}}catch(r){if(r instanceof et)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 Tl(this,this._ctx,this.state);this.enterRule(e,82,$.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 et)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 Al(this,this._ctx,this.state);this.enterRule(e,84,$.RULE_typeMap);try{this.enterOuterAlt(e,1),this.state=575,this.match($.Map),this.state=576,this.match($.LessThan),this.state=577,this.typeName(),this.state=578,this.match($.Comma),this.state=579,this.typeName(),this.state=580,this.match($.MoreThan)}catch(n){if(n instanceof et)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 Ep(this,this._ctx,this.state);this.enterRule(e,86,$.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 et)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 Cl(this,this._ctx,this.state);this.enterRule(e,88,$.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($.LessThan),this.state=590,this.typeName(),this.state=591,this.match($.MoreThan);break;case 2:this.enterOuterAlt(e,2),this.state=593,this.typeName(),this.state=594,this.match($.OpenBracket),this.state=595,this.match($.CloseBracket);break}}catch(n){if(n instanceof et)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 qo(this,this._ctx,this.state);this.enterRule(e,90,$.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 et)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 xn(this,this._ctx,this.state);this.enterRule(e,92,$.RULE_identifier);let n;try{this.enterOuterAlt(e,1),this.state=605,n=this._input.LA(1),!(n-51&-32)&&1<<n-51&153?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(r){if(r instanceof et)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 Ei(this,this._ctx,this.state);this.enterRule(e,94,$.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($.Point),this.state=609,this.identifier())}catch(r){if(r instanceof et)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 _u(this,this._ctx,this.state);this.enterRule(e,96,$.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!==Nr.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($.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($.OpenParen),this.state=625,this.singleExpression(0),this.state=626,this.match($.CloseParen),this.state=629,this._errHandler.sync(this),n=1;do{switch(n){case 1:this.state=627,this.match($.Point),this.state=628,this.identifier();break;default:throw new bi(this)}this.state=631,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,75,this._ctx)}while(n!==2&&n!==Nr.INVALID_ALT_NUMBER)}break}}catch(n){if(n instanceof et)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 xp(this,this._ctx,this.state);this.enterRule(e,98,$.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($.Export)),this.state=638,this.match($.Enum),this.state=639,this.identifier(),this.state=640,this.match($.NEWLINE),this.state=641,this.match($.INDENT),this.state=643,this._errHandler.sync(this),n=this._input.LA(1);do this.state=642,this.enumElement(),this.state=645,this._errHandler.sync(this),n=this._input.LA(1);while(!(n-51&-32)&&1<<n-51&153);this.state=647,this.match($.DEDENT)}}catch(r){if(r instanceof et)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 Dl(this,this._ctx,this.state);this.enterRule(e,100,$.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($.Assign),this.state=651,this.match($.StringLiteral)),this.state=654,this.match($.NEWLINE)}catch(r){if(r instanceof et)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 $.__ATN||($.__ATN=new ep().deserialize($._serializedATN)),$.__ATN}};I($,"INDENT",1),I($,"DEDENT",2),I($,"Point",3),I($,"OpenBracket",4),I($,"CloseBracket",5),I($,"OpenParen",6),I($,"CloseParen",7),I($,"Comma",8),I($,"Assign",9),I($,"QuestionMark",10),I($,"Colon",11),I($,"Plus",12),I($,"Minus",13),I($,"Multiply",14),I($,"Divide",15),I($,"Modulus",16),I($,"Hashtag",17),I($,"LessThan",18),I($,"MoreThan",19),I($,"LessThanEquals",20),I($,"GreaterThanEquals",21),I($,"Equals_",22),I($,"NotEquals",23),I($,"MultiplyAssign",24),I($,"DivideAssign",25),I($,"ModulusAssign",26),I($,"PlusAssign",27),I($,"MinusAssign",28),I($,"ARROW",29),I($,"ColonEquals",30),I($,"BooleanLiteral",31),I($,"IntegerLiteral",32),I($,"DecimalLiteral",33),I($,"Break",34),I($,"And",35),I($,"Export",36),I($,"For",37),I($,"Var",38),I($,"Continue",39),I($,"Varip",40),I($,"Switch",41),I($,"While",42),I($,"If",43),I($,"In",44),I($,"Or",45),I($,"Not",46),I($,"Method",47),I($,"Else",48),I($,"To",49),I($,"By",50),I($,"Type",51),I($,"Import",52),I($,"As",53),I($,"Enum",54),I($,"Map",55),I($,"ColorLiteral",56),I($,"StringLiteral",57),I($,"Identifier",58),I($,"HIDDEN_",59),I($,"COMMENT_",60),I($,"NEWLINE",61),I($,"EOF",rp.EOF),I($,"RULE_program",0),I($,"RULE_globalStmt",1),I($,"RULE_blockStmt",2),I($,"RULE_stmt",3),I($,"RULE_simpleStmt",4),I($,"RULE_flowStmt",5),I($,"RULE_block",6),I($,"RULE_blockLine",7),I($,"RULE_variableDeclarationStmt",8),I($,"RULE_variableDeclarationList",9),I($,"RULE_varModifier",10),I($,"RULE_blockSequence",11),I($,"RULE_expressionSequence",12),I($,"RULE_expressionBlockSequence",13),I($,"RULE_varBlockStmt",14),I($,"RULE_varArrayDeclaration",15),I($,"RULE_blockExpression",16),I($,"RULE_singleExpression",17),I($,"RULE_brackethesized",18),I($,"RULE_arguments",19),I($,"RULE_argument",20),I($,"RULE_ifStatement",21),I($,"RULE_forStatement",22),I($,"RULE_switchStatement",23),I($,"RULE_caseClause",24),I($,"RULE_defaultCaluse",25),I($,"RULE_whileStatement",26),I($,"RULE_importStmt",27),I($,"RULE_importElement",28),I($,"RULE_literal",29),I($,"RULE_methodStmt",30),I($,"RULE_methodElement",31),I($,"RULE_methodName",32),I($,"RULE_arrowFunction",33),I($,"RULE_arrowFunctionParameters",34),I($,"RULE_formalParameterList",35),I($,"RULE_formalParameterArg",36),I($,"RULE_arrowMethod",37),I($,"RULE_arrowMethodParameters",38),I($,"RULE_typeStatement",39),I($,"RULE_typeElement",40),I($,"RULE_assignmentOperator",41),I($,"RULE_typeMap",42),I($,"RULE_typeSeries",43),I($,"RULE_typeArray",44),I($,"RULE_typeGather",45),I($,"RULE_identifier",46),I($,"RULE_typeName",47),I($,"RULE_name",48),I($,"RULE_enumStatement",49),I($,"RULE_enumElement",50),I($,"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'"]),I($,"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"]),I($,"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"]),I($,"_serializedATN",[4,1,61,657,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,1,0,1,0,5,0,105,8,0,10,0,12,0,108,9,0,1,0,1,0,1,1,1,1,3,1,114,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,124,8,1,1,2,1,2,1,2,5,2,129,8,2,10,2,12,2,132,9,2,1,2,1,2,3,2,136,8,2,1,3,1,3,3,3,140,8,3,1,3,1,3,1,3,3,3,145,8,3,1,4,1,4,1,4,1,4,3,4,151,8,4,1,5,1,5,1,6,1,6,3,6,157,8,6,1,6,1,6,1,6,3,6,162,8,6,1,7,1,7,1,7,4,7,167,8,7,11,7,12,7,168,1,7,1,7,1,8,1,8,3,8,175,8,8,1,8,1,8,1,8,3,8,180,8,8,5,8,182,8,8,10,8,12,8,185,9,8,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,3,9,195,8,9,1,10,1,10,1,11,1,11,3,11,201,8,11,1,11,1,11,1,11,3,11,206,8,11,5,11,208,8,11,10,11,12,11,211,9,11,1,12,1,12,1,12,5,12,216,8,12,10,12,12,12,219,9,12,1,13,1,13,3,13,223,8,13,1,13,1,13,5,13,227,8,13,10,13,12,13,230,9,13,1,13,1,13,3,13,234,8,13,1,14,1,14,1,14,1,14,1,14,1,14,3,14,242,8,14,1,14,1,14,1,15,3,15,247,8,15,1,15,3,15,250,8,15,1,15,1,15,1,15,1,15,1,15,5,15,257,8,15,10,15,12,15,260,9,15,1,15,1,15,3,15,264,8,15,1,16,1,16,1,16,1,16,3,16,270,8,16,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,3,17,284,8,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,5,17,315,8,17,10,17,12,17,318,9,17,1,18,1,18,1,18,1,18,1,19,1,19,1,19,1,19,5,19,328,8,19,10,19,12,19,331,9,19,1,19,3,19,334,8,19,3,19,336,8,19,1,19,1,19,1,20,1,20,1,20,3,20,343,8,20,1,20,1,20,3,20,347,8,20,1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,21,5,21,357,8,21,10,21,12,21,360,9,21,1,21,1,21,3,21,364,8,21,1,22,1,22,3,22,368,8,22,1,22,3,22,371,8,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,3,22,380,8,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,3,22,392,8,22,1,22,1,22,1,22,1,22,3,22,398,8,22,1,23,1,23,3,23,402,8,23,1,23,1,23,1,23,4,23,407,8,23,11,23,12,23,408,1,23,5,23,412,8,23,10,23,12,23,415,9,23,1,23,3,23,418,8,23,1,23,1,23,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,27,1,27,1,27,5,27,436,8,27,10,27,12,27,439,9,27,1,27,3,27,442,8,27,1,27,1,27,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,3,28,454,8,28,1,29,1,29,1,30,1,30,1,30,5,30,461,8,30,10,30,12,30,464,9,30,1,31,1,31,1,31,1,32,1,32,1,32,5,32,472,8,32,10,32,12,32,475,9,32,1,32,1,32,1,32,1,32,1,32,3,32,482,8,32,1,32,1,32,1,32,1,32,1,32,3,32,489,8,32,1,32,1,32,3,32,493,8,32,1,33,3,33,496,8,33,1,33,1,33,1,33,1,33,1,33,1,34,1,34,3,34,505,8,34,1,34,1,34,1,35,1,35,1,35,5,35,512,8,35,10,35,12,35,515,9,35,1,36,3,36,518,8,36,1,36,1,36,1,36,3,36,523,8,36,1,37,3,37,526,8,37,1,37,1,37,1,37,1,37,1,37,1,37,1,38,1,38,1,38,1,38,1,38,3,38,539,8,38,1,38,1,38,3,38,543,8,38,1,38,1,38,1,39,3,39,548,8,39,1,39,1,39,1,39,1,39,1,39,4,39,555,8,39,11,39,12,39,556,1,39,1,39,1,40,3,40,562,8,40,1,40,3,40,565,8,40,1,40,1,40,1,40,3,40,570,8,40,1,40,1,40,1,41,1,41,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,43,1,43,1,43,1,43,3,43,587,8,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,3,44,598,8,44,1,45,1,45,1,45,1,45,3,45,604,8,45,1,46,1,46,1,47,1,47,1,47,3,47,611,8,47,1,48,1,48,3,48,615,8,48,1,48,1,48,5,48,619,8,48,10,48,12,48,622,9,48,1,48,1,48,1,48,1,48,1,48,1,48,4,48,630,8,48,11,48,12,48,631,3,48,634,8,48,1,49,3,49,637,8,49,1,49,1,49,1,49,1,49,1,49,4,49,644,8,49,11,49,12,49,645,1,49,1,49,1,50,1,50,1,50,3,50,653,8,50,1,50,1,50,1,50,0,1,34,51,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,0,9,2,0,34,34,39,39,2,0,38,38,40,40,1,0,12,13,1,0,14,16,1,0,18,21,1,0,22,23,2,0,31,33,56,57,2,0,24,28,30,30,3,0,51,51,54,55,58,58,707,0,106,1,0,0,0,2,123,1,0,0,0,4,130,1,0,0,0,6,144,1,0,0,0,8,150,1,0,0,0,10,152,1,0,0,0,12,161,1,0,0,0,14,163,1,0,0,0,16,174,1,0,0,0,18,194,1,0,0,0,20,196,1,0,0,0,22,200,1,0,0,0,24,212,1,0,0,0,26,228,1,0,0,0,28,241,1,0,0,0,30,263,1,0,0,0,32,269,1,0,0,0,34,283,1,0,0,0,36,319,1,0,0,0,38,323,1,0,0,0,40,342,1,0,0,0,42,348,1,0,0,0,44,397,1,0,0,0,46,399,1,0,0,0,48,421,1,0,0,0,50,425,1,0,0,0,52,428,1,0,0,0,54,432,1,0,0,0,56,445,1,0,0,0,58,455,1,0,0,0,60,457,1,0,0,0,62,465,1,0,0,0,64,481,1,0,0,0,66,495,1,0,0,0,68,502,1,0,0,0,70,508,1,0,0,0,72,517,1,0,0,0,74,525,1,0,0,0,76,533,1,0,0,0,78,547,1,0,0,0,80,561,1,0,0,0,82,573,1,0,0,0,84,575,1,0,0,0,86,582,1,0,0,0,88,597,1,0,0,0,90,603,1,0,0,0,92,605,1,0,0,0,94,607,1,0,0,0,96,633,1,0,0,0,98,636,1,0,0,0,100,649,1,0,0,0,102,105,5,61,0,0,103,105,3,2,1,0,104,102,1,0,0,0,104,103,1,0,0,0,105,108,1,0,0,0,106,104,1,0,0,0,106,107,1,0,0,0,107,109,1,0,0,0,108,106,1,0,0,0,109,110,5,0,0,1,110,1,1,0,0,0,111,113,3,16,8,0,112,114,5,8,0,0,113,112,1,0,0,0,113,114,1,0,0,0,114,115,1,0,0,0,115,116,5,61,0,0,116,124,1,0,0,0,117,124,3,4,2,0,118,124,3,54,27,0,119,124,3,66,33,0,120,124,3,74,37,0,121,124,3,78,39,0,122,124,3,98,49,0,123,111,1,0,0,0,123,117,1,0,0,0,123,118,1,0,0,0,123,119,1,0,0,0,123,120,1,0,0,0,123,121,1,0,0,0,123,122,1,0,0,0,124,3,1,0,0,0,125,126,3,16,8,0,126,127,5,8,0,0,127,129,1,0,0,0,128,125,1,0,0,0,129,132,1,0,0,0,130,128,1,0,0,0,130,131,1,0,0,0,131,135,1,0,0,0,132,130,1,0,0,0,133,136,3,28,14,0,134,136,3,32,16,0,135,133,1,0,0,0,135,134,1,0,0,0,136,5,1,0,0,0,137,139,3,8,4,0,138,140,5,8,0,0,139,138,1,0,0,0,139,140,1,0,0,0,140,141,1,0,0,0,141,142,5,61,0,0,142,145,1,0,0,0,143,145,3,26,13,0,144,137,1,0,0,0,144,143,1,0,0,0,145,7,1,0,0,0,146,151,3,24,12,0,147,151,3,22,11,0,148,151,3,36,18,0,149,151,3,10,5,0,150,146,1,0,0,0,150,147,1,0,0,0,150,148,1,0,0,0,150,149,1,0,0,0,151,9,1,0,0,0,152,153,7,0,0,0,153,11,1,0,0,0,154,156,3,8,4,0,155,157,5,8,0,0,156,155,1,0,0,0,156,157,1,0,0,0,157,158,1,0,0,0,158,159,5,61,0,0,159,162,1,0,0,0,160,162,3,14,7,0,161,154,1,0,0,0,161,160,1,0,0,0,162,13,1,0,0,0,163,164,5,61,0,0,164,166,5,1,0,0,165,167,3,6,3,0,166,165,1,0,0,0,167,168,1,0,0,0,168,166,1,0,0,0,168,169,1,0,0,0,169,170,1,0,0,0,170,171,5,2,0,0,171,15,1,0,0,0,172,175,3,60,30,0,173,175,3,18,9,0,174,172,1,0,0,0,174,173,1,0,0,0,175,183,1,0,0,0,176,179,5,8,0,0,177,180,3,60,30,0,178,180,3,18,9,0,179,177,1,0,0,0,179,178,1,0,0,0,180,182,1,0,0,0,181,176,1,0,0,0,182,185,1,0,0,0,183,181,1,0,0,0,183,184,1,0,0,0,184,17,1,0,0,0,185,183,1,0,0,0,186,187,3,30,15,0,187,188,5,9,0,0,188,189,3,34,17,0,189,195,1,0,0,0,190,191,3,96,48,0,191,192,3,82,41,0,192,193,3,34,17,0,193,195,1,0,0,0,194,186,1,0,0,0,194,190,1,0,0,0,195,19,1,0,0,0,196,197,7,1,0,0,197,21,1,0,0,0,198,201,3,34,17,0,199,201,3,18,9,0,200,198,1,0,0,0,200,199,1,0,0,0,201,209,1,0,0,0,202,205,5,8,0,0,203,206,3,34,17,0,204,206,3,18,9,0,205,203,1,0,0,0,205,204,1,0,0,0,206,208,1,0,0,0,207,202,1,0,0,0,208,211,1,0,0,0,209,207,1,0,0,0,209,210,1,0,0,0,210,23,1,0,0,0,211,209,1,0,0,0,212,217,3,34,17,0,213,214,5,8,0,0,214,216,3,34,17,0,215,213,1,0,0,0,216,219,1,0,0,0,217,215,1,0,0,0,217,218,1,0,0,0,218,25,1,0,0,0,219,217,1,0,0,0,220,223,3,34,17,0,221,223,3,18,9,0,222,220,1,0,0,0,222,221,1,0,0,0,223,224,1,0,0,0,224,225,5,8,0,0,225,227,1,0,0,0,226,222,1,0,0,0,227,230,1,0,0,0,228,226,1,0,0,0,228,229,1,0,0,0,229,233,1,0,0,0,230,228,1,0,0,0,231,234,3,28,14,0,232,234,3,32,16,0,233,231,1,0,0,0,233,232,1,0,0,0,234,27,1,0,0,0,235,236,3,30,15,0,236,237,5,9,0,0,237,242,1,0,0,0,238,239,3,96,48,0,239,240,3,82,41,0,240,242,1,0,0,0,241,235,1,0,0,0,241,238,1,0,0,0,242,243,1,0,0,0,243,244,3,32,16,0,244,29,1,0,0,0,245,247,3,20,10,0,246,245,1,0,0,0,246,247,1,0,0,0,247,249,1,0,0,0,248,250,3,90,45,0,249,248,1,0,0,0,249,250,1,0,0,0,250,251,1,0,0,0,251,264,3,92,46,0,252,253,5,4,0,0,253,258,3,92,46,0,254,255,5,8,0,0,255,257,3,92,46,0,256,254,1,0,0,0,257,260,1,0,0,0,258,256,1,0,0,0,258,259,1,0,0,0,259,261,1,0,0,0,260,258,1,0,0,0,261,262,5,5,0,0,262,264,1,0,0,0,263,246,1,0,0,0,263,252,1,0,0,0,264,31,1,0,0,0,265,270,3,42,21,0,266,270,3,44,22,0,267,270,3,52,26,0,268,270,3,46,23,0,269,265,1,0,0,0,269,266,1,0,0,0,269,267,1,0,0,0,269,268,1,0,0,0,270,33,1,0,0,0,271,272,6,17,-1,0,272,284,3,60,30,0,273,274,7,2,0,0,274,284,3,34,17,12,275,276,5,46,0,0,276,284,3,34,17,11,277,284,3,96,48,0,278,284,3,58,29,0,279,280,5,6,0,0,280,281,3,34,17,0,281,282,5,7,0,0,282,284,1,0,0,0,283,271,1,0,0,0,283,273,1,0,0,0,283,275,1,0,0,0,283,277,1,0,0,0,283,278,1,0,0,0,283,279,1,0,0,0,284,316,1,0,0,0,285,286,10,10,0,0,286,287,7,3,0,0,287,315,3,34,17,11,288,289,10,9,0,0,289,290,7,2,0,0,290,315,3,34,17,10,291,292,10,8,0,0,292,293,7,4,0,0,293,315,3,34,17,9,294,295,10,7,0,0,295,296,7,5,0,0,296,315,3,34,17,8,297,298,10,6,0,0,298,299,5,35,0,0,299,315,3,34,17,7,300,301,10,5,0,0,301,302,5,45,0,0,302,315,3,34,17,6,303,304,10,4,0,0,304,305,5,10,0,0,305,306,3,34,17,0,306,307,5,11,0,0,307,308,3,34,17,4,308,315,1,0,0,0,309,310,10,13,0,0,310,311,5,4,0,0,311,312,3,34,17,0,312,313,5,5,0,0,313,315,1,0,0,0,314,285,1,0,0,0,314,288,1,0,0,0,314,291,1,0,0,0,314,294,1,0,0,0,314,297,1,0,0,0,314,300,1,0,0,0,314,303,1,0,0,0,314,309,1,0,0,0,315,318,1,0,0,0,316,314,1,0,0,0,316,317,1,0,0,0,317,35,1,0,0,0,318,316,1,0,0,0,319,320,5,4,0,0,320,321,3,24,12,0,321,322,5,5,0,0,322,37,1,0,0,0,323,335,5,6,0,0,324,329,3,40,20,0,325,326,5,8,0,0,326,328,3,40,20,0,327,325,1,0,0,0,328,331,1,0,0,0,329,327,1,0,0,0,329,330,1,0,0,0,330,333,1,0,0,0,331,329,1,0,0,0,332,334,5,8,0,0,333,332,1,0,0,0,333,334,1,0,0,0,334,336,1,0,0,0,335,324,1,0,0,0,335,336,1,0,0,0,336,337,1,0,0,0,337,338,5,7,0,0,338,39,1,0,0,0,339,340,3,92,46,0,340,341,5,9,0,0,341,343,1,0,0,0,342,339,1,0,0,0,342,343,1,0,0,0,343,346,1,0,0,0,344,347,3,34,17,0,345,347,3,36,18,0,346,344,1,0,0,0,346,345,1,0,0,0,347,41,1,0,0,0,348,349,5,43,0,0,349,350,3,34,17,0,350,358,3,14,7,0,351,352,5,48,0,0,352,353,5,43,0,0,353,354,3,34,17,0,354,355,3,14,7,0,355,357,1,0,0,0,356,351,1,0,0,0,357,360,1,0,0,0,358,356,1,0,0,0,358,359,1,0,0,0,359,363,1,0,0,0,360,358,1,0,0,0,361,362,5,48,0,0,362,364,3,14,7,0,363,361,1,0,0,0,363,364,1,0,0,0,364,43,1,0,0,0,365,367,5,37,0,0,366,368,3,20,10,0,367,366,1,0,0,0,367,368,1,0,0,0,368,370,1,0,0,0,369,371,3,90,45,0,370,369,1,0,0,0,370,371,1,0,0,0,371,372,1,0,0,0,372,373,3,92,46,0,373,374,5,9,0,0,374,375,3,34,17,0,375,376,5,49,0,0,376,379,3,34,17,0,377,378,5,50,0,0,378,380,3,34,17,0,379,377,1,0,0,0,379,380,1,0,0,0,380,381,1,0,0,0,381,382,3,14,7,0,382,398,1,0,0,0,383,391,5,37,0,0,384,392,3,92,46,0,385,386,5,4,0,0,386,387,3,92,46,0,387,388,5,8,0,0,388,389,3,92,46,0,389,390,5,5,0,0,390,392,1,0,0,0,391,384,1,0,0,0,391,385,1,0,0,0,392,393,1,0,0,0,393,394,5,44,0,0,394,395,3,34,17,0,395,396,3,14,7,0,396,398,1,0,0,0,397,365,1,0,0,0,397,383,1,0,0,0,398,45,1,0,0,0,399,401,5,41,0,0,400,402,3,34,17,0,401,400,1,0,0,0,401,402,1,0,0,0,402,403,1,0,0,0,403,404,5,61,0,0,404,417,5,1,0,0,405,407,3,48,24,0,406,405,1,0,0,0,407,408,1,0,0,0,408,406,1,0,0,0,408,409,1,0,0,0,409,418,1,0,0,0,410,412,3,48,24,0,411,410,1,0,0,0,412,415,1,0,0,0,413,411,1,0,0,0,413,414,1,0,0,0,414,416,1,0,0,0,415,413,1,0,0,0,416,418,3,50,25,0,417,406,1,0,0,0,417,413,1,0,0,0,418,419,1,0,0,0,419,420,5,2,0,0,420,47,1,0,0,0,421,422,3,34,17,0,422,423,5,29,0,0,423,424,3,12,6,0,424,49,1,0,0,0,425,426,5,29,0,0,426,427,3,12,6,0,427,51,1,0,0,0,428,429,5,42,0,0,429,430,3,34,17,0,430,431,3,14,7,0,431,53,1,0,0,0,432,437,3,56,28,0,433,434,5,8,0,0,434,436,3,56,28,0,435,433,1,0,0,0,436,439,1,0,0,0,437,435,1,0,0,0,437,438,1,0,0,0,438,441,1,0,0,0,439,437,1,0,0,0,440,442,5,8,0,0,441,440,1,0,0,0,441,442,1,0,0,0,442,443,1,0,0,0,443,444,5,61,0,0,444,55,1,0,0,0,445,446,5,52,0,0,446,447,3,92,46,0,447,448,5,15,0,0,448,449,3,92,46,0,449,450,5,15,0,0,450,453,5,32,0,0,451,452,5,53,0,0,452,454,3,92,46,0,453,451,1,0,0,0,453,454,1,0,0,0,454,57,1,0,0,0,455,456,7,6,0,0,456,59,1,0,0,0,457,462,3,62,31,0,458,459,5,3,0,0,459,461,3,62,31,0,460,458,1,0,0,0,461,464,1,0,0,0,462,460,1,0,0,0,462,463,1,0,0,0,463,61,1,0,0,0,464,462,1,0,0,0,465,466,3,64,32,0,466,467,3,38,19,0,467,63,1,0,0,0,468,469,3,92,46,0,469,470,5,3,0,0,470,472,1,0,0,0,471,468,1,0,0,0,472,475,1,0,0,0,473,471,1,0,0,0,473,474,1,0,0,0,474,482,1,0,0,0,475,473,1,0,0,0,476,477,5,6,0,0,477,478,3,34,17,0,478,479,5,7,0,0,479,480,5,3,0,0,480,482,1,0,0,0,481,473,1,0,0,0,481,476,1,0,0,0,482,483,1,0,0,0,483,492,3,92,46,0,484,485,5,18,0,0,485,488,3,94,47,0,486,487,5,8,0,0,487,489,3,94,47,0,488,486,1,0,0,0,488,489,1,0,0,0,489,490,1,0,0,0,490,491,5,19,0,0,491,493,1,0,0,0,492,484,1,0,0,0,492,493,1,0,0,0,493,65,1,0,0,0,494,496,5,36,0,0,495,494,1,0,0,0,495,496,1,0,0,0,496,497,1,0,0,0,497,498,3,92,46,0,498,499,3,68,34,0,499,500,5,29,0,0,500,501,3,12,6,0,501,67,1,0,0,0,502,504,5,6,0,0,503,505,3,70,35,0,504,503,1,0,0,0,504,505,1,0,0,0,505,506,1,0,0,0,506,507,5,7,0,0,507,69,1,0,0,0,508,513,3,72,36,0,509,510,5,8,0,0,510,512,3,72,36,0,511,509,1,0,0,0,512,515,1,0,0,0,513,511,1,0,0,0,513,514,1,0,0,0,514,71,1,0,0,0,515,513,1,0,0,0,516,518,3,90,45,0,517,516,1,0,0,0,517,518,1,0,0,0,518,519,1,0,0,0,519,522,3,92,46,0,520,521,5,9,0,0,521,523,3,34,17,0,522,520,1,0,0,0,522,523,1,0,0,0,523,73,1,0,0,0,524,526,5,36,0,0,525,524,1,0,0,0,525,526,1,0,0,0,526,527,1,0,0,0,527,528,5,47,0,0,528,529,3,92,46,0,529,530,3,76,38,0,530,531,5,29,0,0,531,532,3,12,6,0,532,75,1,0,0,0,533,534,5,6,0,0,534,535,3,90,45,0,535,538,3,92,46,0,536,537,5,9,0,0,537,539,3,34,17,0,538,536,1,0,0,0,538,539,1,0,0,0,539,542,1,0,0,0,540,541,5,8,0,0,541,543,3,70,35,0,542,540,1,0,0,0,542,543,1,0,0,0,543,544,1,0,0,0,544,545,5,7,0,0,545,77,1,0,0,0,546,548,5,36,0,0,547,546,1,0,0,0,547,548,1,0,0,0,548,549,1,0,0,0,549,550,5,51,0,0,550,551,3,92,46,0,551,552,5,61,0,0,552,554,5,1,0,0,553,555,3,80,40,0,554,553,1,0,0,0,555,556,1,0,0,0,556,554,1,0,0,0,556,557,1,0,0,0,557,558,1,0,0,0,558,559,5,2,0,0,559,79,1,0,0,0,560,562,5,40,0,0,561,560,1,0,0,0,561,562,1,0,0,0,562,564,1,0,0,0,563,565,3,90,45,0,564,563,1,0,0,0,564,565,1,0,0,0,565,566,1,0,0,0,566,569,3,92,46,0,567,568,5,9,0,0,568,570,3,34,17,0,569,567,1,0,0,0,569,570,1,0,0,0,570,571,1,0,0,0,571,572,5,61,0,0,572,81,1,0,0,0,573,574,7,7,0,0,574,83,1,0,0,0,575,576,5,55,0,0,576,577,5,18,0,0,577,578,3,94,47,0,578,579,5,8,0,0,579,580,3,94,47,0,580,581,5,19,0,0,581,85,1,0,0,0,582,586,3,94,47,0,583,587,3,94,47,0,584,587,3,88,44,0,585,587,3,84,42,0,586,583,1,0,0,0,586,584,1,0,0,0,586,585,1,0,0,0,587,87,1,0,0,0,588,589,3,94,47,0,589,590,5,18,0,0,590,591,3,94,47,0,591,592,5,19,0,0,592,598,1,0,0,0,593,594,3,94,47,0,594,595,5,4,0,0,595,596,5,5,0,0,596,598,1,0,0,0,597,588,1,0,0,0,597,593,1,0,0,0,598,89,1,0,0,0,599,604,3,94,47,0,600,604,3,88,44,0,601,604,3,84,42,0,602,604,3,86,43,0,603,599,1,0,0,0,603,600,1,0,0,0,603,601,1,0,0,0,603,602,1,0,0,0,604,91,1,0,0,0,605,606,7,8,0,0,606,93,1,0,0,0,607,610,3,92,46,0,608,609,5,3,0,0,609,611,3,92,46,0,610,608,1,0,0,0,610,611,1,0,0,0,611,95,1,0,0,0,612,615,3,92,46,0,613,615,3,62,31,0,614,612,1,0,0,0,614,613,1,0,0,0,615,616,1,0,0,0,616,617,5,3,0,0,617,619,1,0,0,0,618,614,1,0,0,0,619,622,1,0,0,0,620,618,1,0,0,0,620,621,1,0,0,0,621,623,1,0,0,0,622,620,1,0,0,0,623,634,3,92,46,0,624,625,5,6,0,0,625,626,3,34,17,0,626,629,5,7,0,0,627,628,5,3,0,0,628,630,3,92,46,0,629,627,1,0,0,0,630,631,1,0,0,0,631,629,1,0,0,0,631,632,1,0,0,0,632,634,1,0,0,0,633,620,1,0,0,0,633,624,1,0,0,0,634,97,1,0,0,0,635,637,5,36,0,0,636,635,1,0,0,0,636,637,1,0,0,0,637,638,1,0,0,0,638,639,5,54,0,0,639,640,3,92,46,0,640,641,5,61,0,0,641,643,5,1,0,0,642,644,3,100,50,0,643,642,1,0,0,0,644,645,1,0,0,0,645,643,1,0,0,0,645,646,1,0,0,0,646,647,1,0,0,0,647,648,5,2,0,0,648,99,1,0,0,0,649,652,3,92,46,0,650,651,5,9,0,0,651,653,5,57,0,0,652,650,1,0,0,0,652,653,1,0,0,0,653,654,1,0,0,0,654,655,5,61,0,0,655,101,1,0,0,0,80,104,106,113,123,130,135,139,144,150,156,161,168,174,179,183,194,200,205,209,217,222,228,233,241,246,249,258,263,269,283,314,316,329,333,335,342,346,358,363,367,370,379,391,397,401,408,413,417,437,441,453,462,473,481,488,492,495,504,513,517,522,525,538,542,547,556,561,564,569,586,597,603,610,614,620,631,633,636,645,652]),I($,"__ATN"),I($,"DecisionsToDFA",$._ATN.decisionToState.map((e,n)=>new tp(e,n)));let j=$;class Vm extends Je{constructor(e,n,r){super(n,r),this.parser=e}EOF(){return this.getToken(j.EOF,0)}NEWLINE_list(){return this.getTokens(j.NEWLINE)}NEWLINE(e){return this.getToken(j.NEWLINE,e)}globalStmt_list(){return this.getTypedRuleContexts(fl)}globalStmt(e){return this.getTypedRuleContext(fl,e)}get ruleIndex(){return j.RULE_program}accept(e){return e.visitProgram?e.visitProgram(this):e.visitChildren(this)}}class fl extends Je{constructor(e,n,r){super(n,r),this.parser=e}variableDeclarationStmt(){return this.getTypedRuleContext(fu,0)}NEWLINE(){return this.getToken(j.NEWLINE,0)}Comma(){return this.getToken(j.Comma,0)}blockStmt(){return this.getTypedRuleContext(ip,0)}importStmt(){return this.getTypedRuleContext(pp,0)}arrowFunction(){return this.getTypedRuleContext(mp,0)}arrowMethod(){return this.getTypedRuleContext(gp,0)}typeStatement(){return this.getTypedRuleContext(bp,0)}enumStatement(){return this.getTypedRuleContext(xp,0)}get ruleIndex(){return j.RULE_globalStmt}accept(e){return e.visitGlobalStmt?e.visitGlobalStmt(this):e.visitChildren(this)}}class ip extends Je{constructor(e,n,r){super(n,r),this.parser=e}varBlockStmt(){return this.getTypedRuleContext(ml,0)}blockExpression(){return this.getTypedRuleContext(hu,0)}variableDeclarationStmt_list(){return this.getTypedRuleContexts(fu)}variableDeclarationStmt(e){return this.getTypedRuleContext(fu,e)}Comma_list(){return this.getTokens(j.Comma)}Comma(e){return this.getToken(j.Comma,e)}get ruleIndex(){return j.RULE_blockStmt}accept(e){return e.visitBlockStmt?e.visitBlockStmt(this):e.visitChildren(this)}}class hl extends Je{constructor(e,n,r){super(n,r),this.parser=e}simpleStmt(){return this.getTypedRuleContext(pl,0)}NEWLINE(){return this.getToken(j.NEWLINE,0)}Comma(){return this.getToken(j.Comma,0)}expressionBlockSequence(){return this.getTypedRuleContext(sp,0)}get ruleIndex(){return j.RULE_stmt}accept(e){return e.visitStmt?e.visitStmt(this):e.visitChildren(this)}}class pl extends Je{constructor(e,n,r){super(n,r),this.parser=e}expressionSequence(){return this.getTypedRuleContext(_l,0)}blockSequence(){return this.getTypedRuleContext(ap,0)}brackethesized(){return this.getTypedRuleContext(yl,0)}flowStmt(){return this.getTypedRuleContext(op,0)}get ruleIndex(){return j.RULE_simpleStmt}accept(e){return e.visitSimpleStmt?e.visitSimpleStmt(this):e.visitChildren(this)}}class op extends Je{constructor(e,n,r){super(n,r),this.parser=e}Break(){return this.getToken(j.Break,0)}Continue(){return this.getToken(j.Continue,0)}get ruleIndex(){return j.RULE_flowStmt}accept(e){return e.visitFlowStmt?e.visitFlowStmt(this):e.visitChildren(this)}}class ls extends Je{constructor(e,n,r){super(n,r),this.parser=e}simpleStmt(){return this.getTypedRuleContext(pl,0)}NEWLINE(){return this.getToken(j.NEWLINE,0)}Comma(){return this.getToken(j.Comma,0)}blockLine(){return this.getTypedRuleContext(Eo,0)}get ruleIndex(){return j.RULE_block}accept(e){return e.visitBlock?e.visitBlock(this):e.visitChildren(this)}}class Eo extends Je{constructor(e,n,r){super(n,r),this.parser=e}NEWLINE(){return this.getToken(j.NEWLINE,0)}INDENT(){return this.getToken(j.INDENT,0)}DEDENT(){return this.getToken(j.DEDENT,0)}stmt_list(){return this.getTypedRuleContexts(hl)}stmt(e){return this.getTypedRuleContext(hl,e)}get ruleIndex(){return j.RULE_blockLine}accept(e){return e.visitBlockLine?e.visitBlockLine(this):e.visitChildren(this)}}class fu extends Je{constructor(e,n,r){super(n,r),this.parser=e}methodStmt_list(){return this.getTypedRuleContexts(du)}methodStmt(e){return this.getTypedRuleContext(du,e)}variableDeclarationList_list(){return this.getTypedRuleContexts(Mi)}variableDeclarationList(e){return this.getTypedRuleContext(Mi,e)}Comma_list(){return this.getTokens(j.Comma)}Comma(e){return this.getToken(j.Comma,e)}get ruleIndex(){return j.RULE_variableDeclarationStmt}accept(e){return e.visitVariableDeclarationStmt?e.visitVariableDeclarationStmt(this):e.visitChildren(this)}}class Mi extends Je{constructor(e,n,r){super(n,r),this.parser=e}get ruleIndex(){return j.RULE_variableDeclarationList}copyFrom(e){super.copyFrom(e)}}class jm extends Mi{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}name(){return this.getTypedRuleContext(_u,0)}assignmentOperator(){return this.getTypedRuleContext(Tl,0)}singleExpression(){return this.getTypedRuleContext(je,0)}accept(e){return e.visitAgainAssign?e.visitAgainAssign(this):e.visitChildren(this)}}class $m extends Mi{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}varArrayDeclaration(){return this.getTypedRuleContext(fs,0)}Assign(){return this.getToken(j.Assign,0)}singleExpression(){return this.getTypedRuleContext(je,0)}accept(e){return e.visitDeclareAssign?e.visitDeclareAssign(this):e.visitChildren(this)}}class dl extends Je{constructor(e,n,r){super(n,r),this.parser=e}Var(){return this.getToken(j.Var,0)}Varip(){return this.getToken(j.Varip,0)}get ruleIndex(){return j.RULE_varModifier}accept(e){return e.visitVarModifier?e.visitVarModifier(this):e.visitChildren(this)}}class ap extends Je{constructor(e,n,r){super(n,r),this.parser=e}singleExpression_list(){return this.getTypedRuleContexts(je)}singleExpression(e){return this.getTypedRuleContext(je,e)}variableDeclarationList_list(){return this.getTypedRuleContexts(Mi)}variableDeclarationList(e){return this.getTypedRuleContext(Mi,e)}Comma_list(){return this.getTokens(j.Comma)}Comma(e){return this.getToken(j.Comma,e)}get ruleIndex(){return j.RULE_blockSequence}accept(e){return e.visitBlockSequence?e.visitBlockSequence(this):e.visitChildren(this)}}class _l extends Je{constructor(e,n,r){super(n,r),this.parser=e}singleExpression_list(){return this.getTypedRuleContexts(je)}singleExpression(e){return this.getTypedRuleContext(je,e)}Comma_list(){return this.getTokens(j.Comma)}Comma(e){return this.getToken(j.Comma,e)}get ruleIndex(){return j.RULE_expressionSequence}accept(e){return e.visitExpressionSequence?e.visitExpressionSequence(this):e.visitChildren(this)}}class sp extends Je{constructor(e,n,r){super(n,r),this.parser=e}varBlockStmt(){return this.getTypedRuleContext(ml,0)}blockExpression(){return this.getTypedRuleContext(hu,0)}Comma_list(){return this.getTokens(j.Comma)}Comma(e){return this.getToken(j.Comma,e)}singleExpression_list(){return this.getTypedRuleContexts(je)}singleExpression(e){return this.getTypedRuleContext(je,e)}variableDeclarationList_list(){return this.getTypedRuleContexts(Mi)}variableDeclarationList(e){return this.getTypedRuleContext(Mi,e)}get ruleIndex(){return j.RULE_expressionBlockSequence}accept(e){return e.visitExpressionBlockSequence?e.visitExpressionBlockSequence(this):e.visitChildren(this)}}class ml extends Je{constructor(e,n,r){super(n,r),this.parser=e}blockExpression(){return this.getTypedRuleContext(hu,0)}varArrayDeclaration(){return this.getTypedRuleContext(fs,0)}Assign(){return this.getToken(j.Assign,0)}name(){return this.getTypedRuleContext(_u,0)}assignmentOperator(){return this.getTypedRuleContext(Tl,0)}get ruleIndex(){return j.RULE_varBlockStmt}accept(e){return e.visitVarBlockStmt?e.visitVarBlockStmt(this):e.visitChildren(this)}}class fs extends Je{constructor(e,n,r){super(n,r),this.parser=e}get ruleIndex(){return j.RULE_varArrayDeclaration}copyFrom(e){super.copyFrom(e)}}class Hm extends fs{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}OpenBracket(){return this.getToken(j.OpenBracket,0)}identifier_list(){return this.getTypedRuleContexts(xn)}identifier(e){return this.getTypedRuleContext(xn,e)}CloseBracket(){return this.getToken(j.CloseBracket,0)}Comma_list(){return this.getTokens(j.Comma)}Comma(e){return this.getToken(j.Comma,e)}accept(e){return e.visitVarMultiple?e.visitVarMultiple(this):e.visitChildren(this)}}class Gm extends fs{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}identifier(){return this.getTypedRuleContext(xn,0)}varModifier(){return this.getTypedRuleContext(dl,0)}typeGather(){return this.getTypedRuleContext(qo,0)}accept(e){return e.visitVarSingle?e.visitVarSingle(this):e.visitChildren(this)}}class hu extends Je{constructor(e,n,r){super(n,r),this.parser=e}ifStatement(){return this.getTypedRuleContext(cp,0)}forStatement(){return this.getTypedRuleContext(pu,0)}whileStatement(){return this.getTypedRuleContext(hp,0)}switchStatement(){return this.getTypedRuleContext(lp,0)}get ruleIndex(){return j.RULE_blockExpression}accept(e){return e.visitBlockExpression?e.visitBlockExpression(this):e.visitChildren(this)}}class je extends Je{constructor(e,n,r){super(n,r),this.parser=e}get ruleIndex(){return j.RULE_singleExpression}copyFrom(e){super.copyFrom(e)}}class Km extends je{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}OpenParen(){return this.getToken(j.OpenParen,0)}singleExpression(){return this.getTypedRuleContext(je,0)}CloseParen(){return this.getToken(j.CloseParen,0)}accept(e){return e.visitParenthesizedExpression?e.visitParenthesizedExpression(this):e.visitChildren(this)}}class zm extends je{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts(je)}singleExpression(e){return this.getTypedRuleContext(je,e)}Plus(){return this.getToken(j.Plus,0)}Minus(){return this.getToken(j.Minus,0)}accept(e){return e.visitAdditiveExpression?e.visitAdditiveExpression(this):e.visitChildren(this)}}class Wm extends je{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts(je)}singleExpression(e){return this.getTypedRuleContext(je,e)}LessThan(){return this.getToken(j.LessThan,0)}MoreThan(){return this.getToken(j.MoreThan,0)}LessThanEquals(){return this.getToken(j.LessThanEquals,0)}GreaterThanEquals(){return this.getToken(j.GreaterThanEquals,0)}accept(e){return e.visitRelationalExpression?e.visitRelationalExpression(this):e.visitChildren(this)}}class qm extends je{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts(je)}singleExpression(e){return this.getTypedRuleContext(je,e)}QuestionMark(){return this.getToken(j.QuestionMark,0)}Colon(){return this.getToken(j.Colon,0)}accept(e){return e.visitTernaryExpression?e.visitTernaryExpression(this):e.visitChildren(this)}}class Xm extends je{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts(je)}singleExpression(e){return this.getTypedRuleContext(je,e)}And(){return this.getToken(j.And,0)}accept(e){return e.visitLogicalAndExpression?e.visitLogicalAndExpression(this):e.visitChildren(this)}}class Ym extends je{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}name(){return this.getTypedRuleContext(_u,0)}accept(e){return e.visitNameExpression?e.visitNameExpression(this):e.visitChildren(this)}}class Zm extends je{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}literal(){return this.getTypedRuleContext(dp,0)}accept(e){return e.visitLiteralExpression?e.visitLiteralExpression(this):e.visitChildren(this)}}class Qm extends je{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts(je)}singleExpression(e){return this.getTypedRuleContext(je,e)}Or(){return this.getToken(j.Or,0)}accept(e){return e.visitLogicalOrExpression?e.visitLogicalOrExpression(this):e.visitChildren(this)}}class Jm extends je{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression(){return this.getTypedRuleContext(je,0)}Minus(){return this.getToken(j.Minus,0)}Plus(){return this.getToken(j.Plus,0)}accept(e){return e.visitUnaryExpression?e.visitUnaryExpression(this):e.visitChildren(this)}}class ey extends je{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}Not(){return this.getToken(j.Not,0)}singleExpression(){return this.getTypedRuleContext(je,0)}accept(e){return e.visitNotExpression?e.visitNotExpression(this):e.visitChildren(this)}}class ty extends je{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts(je)}singleExpression(e){return this.getTypedRuleContext(je,e)}OpenBracket(){return this.getToken(j.OpenBracket,0)}CloseBracket(){return this.getToken(j.CloseBracket,0)}accept(e){return e.visitMemberIndexExpression?e.visitMemberIndexExpression(this):e.visitChildren(this)}}class ny extends je{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}methodStmt(){return this.getTypedRuleContext(du,0)}accept(e){return e.visitMethodExpression?e.visitMethodExpression(this):e.visitChildren(this)}}class ry extends je{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts(je)}singleExpression(e){return this.getTypedRuleContext(je,e)}Equals_(){return this.getToken(j.Equals_,0)}NotEquals(){return this.getToken(j.NotEquals,0)}accept(e){return e.visitEqualityExpression?e.visitEqualityExpression(this):e.visitChildren(this)}}class iy extends je{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts(je)}singleExpression(e){return this.getTypedRuleContext(je,e)}Multiply(){return this.getToken(j.Multiply,0)}Divide(){return this.getToken(j.Divide,0)}Modulus(){return this.getToken(j.Modulus,0)}accept(e){return e.visitMultiplicativeExpression?e.visitMultiplicativeExpression(this):e.visitChildren(this)}}class yl extends Je{constructor(e,n,r){super(n,r),this.parser=e}OpenBracket(){return this.getToken(j.OpenBracket,0)}expressionSequence(){return this.getTypedRuleContext(_l,0)}CloseBracket(){return this.getToken(j.CloseBracket,0)}get ruleIndex(){return j.RULE_brackethesized}accept(e){return e.visitBrackethesized?e.visitBrackethesized(this):e.visitChildren(this)}}class up extends Je{constructor(e,n,r){super(n,r),this.parser=e}OpenParen(){return this.getToken(j.OpenParen,0)}CloseParen(){return this.getToken(j.CloseParen,0)}argument_list(){return this.getTypedRuleContexts(gl)}argument(e){return this.getTypedRuleContext(gl,e)}Comma_list(){return this.getTokens(j.Comma)}Comma(e){return this.getToken(j.Comma,e)}get ruleIndex(){return j.RULE_arguments}accept(e){return e.visitArguments?e.visitArguments(this):e.visitChildren(this)}}class gl extends Je{constructor(e,n,r){super(n,r),this.parser=e}singleExpression(){return this.getTypedRuleContext(je,0)}brackethesized(){return this.getTypedRuleContext(yl,0)}identifier(){return this.getTypedRuleContext(xn,0)}Assign(){return this.getToken(j.Assign,0)}get ruleIndex(){return j.RULE_argument}accept(e){return e.visitArgument?e.visitArgument(this):e.visitChildren(this)}}class cp extends Je{constructor(e,n,r){super(n,r),this.parser=e}If_list(){return this.getTokens(j.If)}If(e){return this.getToken(j.If,e)}singleExpression_list(){return this.getTypedRuleContexts(je)}singleExpression(e){return this.getTypedRuleContext(je,e)}blockLine_list(){return this.getTypedRuleContexts(Eo)}blockLine(e){return this.getTypedRuleContext(Eo,e)}Else_list(){return this.getTokens(j.Else)}Else(e){return this.getToken(j.Else,e)}get ruleIndex(){return j.RULE_ifStatement}accept(e){return e.visitIfStatement?e.visitIfStatement(this):e.visitChildren(this)}}class pu extends Je{constructor(e,n,r){super(n,r),this.parser=e}get ruleIndex(){return j.RULE_forStatement}copyFrom(e){super.copyFrom(e)}}class oy extends pu{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}For(){return this.getToken(j.For,0)}identifier(){return this.getTypedRuleContext(xn,0)}Assign(){return this.getToken(j.Assign,0)}singleExpression_list(){return this.getTypedRuleContexts(je)}singleExpression(e){return this.getTypedRuleContext(je,e)}To(){return this.getToken(j.To,0)}blockLine(){return this.getTypedRuleContext(Eo,0)}varModifier(){return this.getTypedRuleContext(dl,0)}typeGather(){return this.getTypedRuleContext(qo,0)}By(){return this.getToken(j.By,0)}accept(e){return e.visitForToStatement?e.visitForToStatement(this):e.visitChildren(this)}}class ay extends pu{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}For(){return this.getToken(j.For,0)}In(){return this.getToken(j.In,0)}singleExpression(){return this.getTypedRuleContext(je,0)}blockLine(){return this.getTypedRuleContext(Eo,0)}identifier_list(){return this.getTypedRuleContexts(xn)}identifier(e){return this.getTypedRuleContext(xn,e)}OpenBracket(){return this.getToken(j.OpenBracket,0)}Comma(){return this.getToken(j.Comma,0)}CloseBracket(){return this.getToken(j.CloseBracket,0)}accept(e){return e.visitForInStatement?e.visitForInStatement(this):e.visitChildren(this)}}class lp extends Je{constructor(e,n,r){super(n,r),this.parser=e}Switch(){return this.getToken(j.Switch,0)}NEWLINE(){return this.getToken(j.NEWLINE,0)}INDENT(){return this.getToken(j.INDENT,0)}DEDENT(){return this.getToken(j.DEDENT,0)}singleExpression(){return this.getTypedRuleContext(je,0)}defaultCaluse(){return this.getTypedRuleContext(fp,0)}caseClause_list(){return this.getTypedRuleContexts(vl)}caseClause(e){return this.getTypedRuleContext(vl,e)}get ruleIndex(){return j.RULE_switchStatement}accept(e){return e.visitSwitchStatement?e.visitSwitchStatement(this):e.visitChildren(this)}}class vl extends Je{constructor(e,n,r){super(n,r),this.parser=e}singleExpression(){return this.getTypedRuleContext(je,0)}ARROW(){return this.getToken(j.ARROW,0)}block(){return this.getTypedRuleContext(ls,0)}get ruleIndex(){return j.RULE_caseClause}accept(e){return e.visitCaseClause?e.visitCaseClause(this):e.visitChildren(this)}}class fp extends Je{constructor(e,n,r){super(n,r),this.parser=e}ARROW(){return this.getToken(j.ARROW,0)}block(){return this.getTypedRuleContext(ls,0)}get ruleIndex(){return j.RULE_defaultCaluse}accept(e){return e.visitDefaultCaluse?e.visitDefaultCaluse(this):e.visitChildren(this)}}class hp extends Je{constructor(e,n,r){super(n,r),this.parser=e}While(){return this.getToken(j.While,0)}singleExpression(){return this.getTypedRuleContext(je,0)}blockLine(){return this.getTypedRuleContext(Eo,0)}get ruleIndex(){return j.RULE_whileStatement}accept(e){return e.visitWhileStatement?e.visitWhileStatement(this):e.visitChildren(this)}}class pp extends Je{constructor(e,n,r){super(n,r),this.parser=e}importElement_list(){return this.getTypedRuleContexts(bl)}importElement(e){return this.getTypedRuleContext(bl,e)}NEWLINE(){return this.getToken(j.NEWLINE,0)}Comma_list(){return this.getTokens(j.Comma)}Comma(e){return this.getToken(j.Comma,e)}get ruleIndex(){return j.RULE_importStmt}accept(e){return e.visitImportStmt?e.visitImportStmt(this):e.visitChildren(this)}}class bl extends Je{constructor(e,n,r){super(n,r),this.parser=e}Import(){return this.getToken(j.Import,0)}identifier_list(){return this.getTypedRuleContexts(xn)}identifier(e){return this.getTypedRuleContext(xn,e)}Divide_list(){return this.getTokens(j.Divide)}Divide(e){return this.getToken(j.Divide,e)}IntegerLiteral(){return this.getToken(j.IntegerLiteral,0)}As(){return this.getToken(j.As,0)}get ruleIndex(){return j.RULE_importElement}accept(e){return e.visitImportElement?e.visitImportElement(this):e.visitChildren(this)}}class dp extends Je{constructor(e,n,r){super(n,r),this.parser=e}BooleanLiteral(){return this.getToken(j.BooleanLiteral,0)}ColorLiteral(){return this.getToken(j.ColorLiteral,0)}StringLiteral(){return this.getToken(j.StringLiteral,0)}IntegerLiteral(){return this.getToken(j.IntegerLiteral,0)}DecimalLiteral(){return this.getToken(j.DecimalLiteral,0)}get ruleIndex(){return j.RULE_literal}accept(e){return e.visitLiteral?e.visitLiteral(this):e.visitChildren(this)}}class du extends Je{constructor(e,n,r){super(n,r),this.parser=e}methodElement_list(){return this.getTypedRuleContexts(hs)}methodElement(e){return this.getTypedRuleContext(hs,e)}Point_list(){return this.getTokens(j.Point)}Point(e){return this.getToken(j.Point,e)}get ruleIndex(){return j.RULE_methodStmt}accept(e){return e.visitMethodStmt?e.visitMethodStmt(this):e.visitChildren(this)}}class hs extends Je{constructor(e,n,r){super(n,r),this.parser=e}methodName(){return this.getTypedRuleContext(_p,0)}arguments(){return this.getTypedRuleContext(up,0)}get ruleIndex(){return j.RULE_methodElement}accept(e){return e.visitMethodElement?e.visitMethodElement(this):e.visitChildren(this)}}class _p extends Je{constructor(e,n,r){super(n,r),this.parser=e}identifier_list(){return this.getTypedRuleContexts(xn)}identifier(e){return this.getTypedRuleContext(xn,e)}OpenParen(){return this.getToken(j.OpenParen,0)}singleExpression(){return this.getTypedRuleContext(je,0)}CloseParen(){return this.getToken(j.CloseParen,0)}Point_list(){return this.getTokens(j.Point)}Point(e){return this.getToken(j.Point,e)}LessThan(){return this.getToken(j.LessThan,0)}typeName_list(){return this.getTypedRuleContexts(Ei)}typeName(e){return this.getTypedRuleContext(Ei,e)}MoreThan(){return this.getToken(j.MoreThan,0)}Comma(){return this.getToken(j.Comma,0)}get ruleIndex(){return j.RULE_methodName}accept(e){return e.visitMethodName?e.visitMethodName(this):e.visitChildren(this)}}class mp extends Je{constructor(e,n,r){super(n,r),this.parser=e}identifier(){return this.getTypedRuleContext(xn,0)}arrowFunctionParameters(){return this.getTypedRuleContext(yp,0)}ARROW(){return this.getToken(j.ARROW,0)}block(){return this.getTypedRuleContext(ls,0)}Export(){return this.getToken(j.Export,0)}get ruleIndex(){return j.RULE_arrowFunction}accept(e){return e.visitArrowFunction?e.visitArrowFunction(this):e.visitChildren(this)}}class yp extends Je{constructor(e,n,r){super(n,r),this.parser=e}OpenParen(){return this.getToken(j.OpenParen,0)}CloseParen(){return this.getToken(j.CloseParen,0)}formalParameterList(){return this.getTypedRuleContext(El,0)}get ruleIndex(){return j.RULE_arrowFunctionParameters}accept(e){return e.visitArrowFunctionParameters?e.visitArrowFunctionParameters(this):e.visitChildren(this)}}class El extends Je{constructor(e,n,r){super(n,r),this.parser=e}formalParameterArg_list(){return this.getTypedRuleContexts(xl)}formalParameterArg(e){return this.getTypedRuleContext(xl,e)}Comma_list(){return this.getTokens(j.Comma)}Comma(e){return this.getToken(j.Comma,e)}get ruleIndex(){return j.RULE_formalParameterList}accept(e){return e.visitFormalParameterList?e.visitFormalParameterList(this):e.visitChildren(this)}}class xl extends Je{constructor(e,n,r){super(n,r),this.parser=e}identifier(){return this.getTypedRuleContext(xn,0)}typeGather(){return this.getTypedRuleContext(qo,0)}Assign(){return this.getToken(j.Assign,0)}singleExpression(){return this.getTypedRuleContext(je,0)}get ruleIndex(){return j.RULE_formalParameterArg}accept(e){return e.visitFormalParameterArg?e.visitFormalParameterArg(this):e.visitChildren(this)}}class gp extends Je{constructor(e,n,r){super(n,r),this.parser=e}Method(){return this.getToken(j.Method,0)}identifier(){return this.getTypedRuleContext(xn,0)}arrowMethodParameters(){return this.getTypedRuleContext(vp,0)}ARROW(){return this.getToken(j.ARROW,0)}block(){return this.getTypedRuleContext(ls,0)}Export(){return this.getToken(j.Export,0)}get ruleIndex(){return j.RULE_arrowMethod}accept(e){return e.visitArrowMethod?e.visitArrowMethod(this):e.visitChildren(this)}}class vp extends Je{constructor(e,n,r){super(n,r),this.parser=e}OpenParen(){return this.getToken(j.OpenParen,0)}typeGather(){return this.getTypedRuleContext(qo,0)}identifier(){return this.getTypedRuleContext(xn,0)}CloseParen(){return this.getToken(j.CloseParen,0)}Assign(){return this.getToken(j.Assign,0)}singleExpression(){return this.getTypedRuleContext(je,0)}Comma(){return this.getToken(j.Comma,0)}formalParameterList(){return this.getTypedRuleContext(El,0)}get ruleIndex(){return j.RULE_arrowMethodParameters}accept(e){return e.visitArrowMethodParameters?e.visitArrowMethodParameters(this):e.visitChildren(this)}}class bp extends Je{constructor(e,n,r){super(n,r),this.parser=e}Type(){return this.getToken(j.Type,0)}identifier(){return this.getTypedRuleContext(xn,0)}NEWLINE(){return this.getToken(j.NEWLINE,0)}INDENT(){return this.getToken(j.INDENT,0)}DEDENT(){return this.getToken(j.DEDENT,0)}Export(){return this.getToken(j.Export,0)}typeElement_list(){return this.getTypedRuleContexts(Sl)}typeElement(e){return this.getTypedRuleContext(Sl,e)}get ruleIndex(){return j.RULE_typeStatement}accept(e){return e.visitTypeStatement?e.visitTypeStatement(this):e.visitChildren(this)}}class Sl extends Je{constructor(e,n,r){super(n,r),this.parser=e}identifier(){return this.getTypedRuleContext(xn,0)}NEWLINE(){return this.getToken(j.NEWLINE,0)}Varip(){return this.getToken(j.Varip,0)}typeGather(){return this.getTypedRuleContext(qo,0)}Assign(){return this.getToken(j.Assign,0)}singleExpression(){return this.getTypedRuleContext(je,0)}get ruleIndex(){return j.RULE_typeElement}accept(e){return e.visitTypeElement?e.visitTypeElement(this):e.visitChildren(this)}}class Tl extends Je{constructor(e,n,r){super(n,r),this.parser=e}ColonEquals(){return this.getToken(j.ColonEquals,0)}MultiplyAssign(){return this.getToken(j.MultiplyAssign,0)}DivideAssign(){return this.getToken(j.DivideAssign,0)}ModulusAssign(){return this.getToken(j.ModulusAssign,0)}PlusAssign(){return this.getToken(j.PlusAssign,0)}MinusAssign(){return this.getToken(j.MinusAssign,0)}get ruleIndex(){return j.RULE_assignmentOperator}accept(e){return e.visitAssignmentOperator?e.visitAssignmentOperator(this):e.visitChildren(this)}}class Al extends Je{constructor(e,n,r){super(n,r),this.parser=e}Map(){return this.getToken(j.Map,0)}LessThan(){return this.getToken(j.LessThan,0)}Comma(){return this.getToken(j.Comma,0)}typeName_list(){return this.getTypedRuleContexts(Ei)}typeName(e){return this.getTypedRuleContext(Ei,e)}MoreThan(){return this.getToken(j.MoreThan,0)}get ruleIndex(){return j.RULE_typeMap}accept(e){return e.visitTypeMap?e.visitTypeMap(this):e.visitChildren(this)}}class Ep extends Je{constructor(e,n,r){super(n,r),this.parser=e}typeName_list(){return this.getTypedRuleContexts(Ei)}typeName(e){return this.getTypedRuleContext(Ei,e)}typeArray(){return this.getTypedRuleContext(Cl,0)}typeMap(){return this.getTypedRuleContext(Al,0)}get ruleIndex(){return j.RULE_typeSeries}accept(e){return e.visitTypeSeries?e.visitTypeSeries(this):e.visitChildren(this)}}class Cl extends Je{constructor(e,n,r){super(n,r),this.parser=e}typeName_list(){return this.getTypedRuleContexts(Ei)}typeName(e){return this.getTypedRuleContext(Ei,e)}LessThan(){return this.getToken(j.LessThan,0)}MoreThan(){return this.getToken(j.MoreThan,0)}OpenBracket(){return this.getToken(j.OpenBracket,0)}CloseBracket(){return this.getToken(j.CloseBracket,0)}get ruleIndex(){return j.RULE_typeArray}accept(e){return e.visitTypeArray?e.visitTypeArray(this):e.visitChildren(this)}}class qo extends Je{constructor(e,n,r){super(n,r),this.parser=e}typeName(){return this.getTypedRuleContext(Ei,0)}typeArray(){return this.getTypedRuleContext(Cl,0)}typeMap(){return this.getTypedRuleContext(Al,0)}typeSeries(){return this.getTypedRuleContext(Ep,0)}get ruleIndex(){return j.RULE_typeGather}accept(e){return e.visitTypeGather?e.visitTypeGather(this):e.visitChildren(this)}}class xn extends Je{constructor(e,n,r){super(n,r),this.parser=e}Identifier(){return this.getToken(j.Identifier,0)}Map(){return this.getToken(j.Map,0)}Type(){return this.getToken(j.Type,0)}Enum(){return this.getToken(j.Enum,0)}get ruleIndex(){return j.RULE_identifier}accept(e){return e.visitIdentifier?e.visitIdentifier(this):e.visitChildren(this)}}class Ei extends Je{constructor(e,n,r){super(n,r),this.parser=e}identifier_list(){return this.getTypedRuleContexts(xn)}identifier(e){return this.getTypedRuleContext(xn,e)}Point(){return this.getToken(j.Point,0)}get ruleIndex(){return j.RULE_typeName}accept(e){return e.visitTypeName?e.visitTypeName(this):e.visitChildren(this)}}class _u extends Je{constructor(e,n,r){super(n,r),this.parser=e}identifier_list(){return this.getTypedRuleContexts(xn)}identifier(e){return this.getTypedRuleContext(xn,e)}Point_list(){return this.getTokens(j.Point)}Point(e){return this.getToken(j.Point,e)}methodElement_list(){return this.getTypedRuleContexts(hs)}methodElement(e){return this.getTypedRuleContext(hs,e)}OpenParen(){return this.getToken(j.OpenParen,0)}singleExpression(){return this.getTypedRuleContext(je,0)}CloseParen(){return this.getToken(j.CloseParen,0)}get ruleIndex(){return j.RULE_name}accept(e){return e.visitName?e.visitName(this):e.visitChildren(this)}}class xp extends Je{constructor(e,n,r){super(n,r),this.parser=e}Enum(){return this.getToken(j.Enum,0)}identifier(){return this.getTypedRuleContext(xn,0)}NEWLINE(){return this.getToken(j.NEWLINE,0)}INDENT(){return this.getToken(j.INDENT,0)}DEDENT(){return this.getToken(j.DEDENT,0)}Export(){return this.getToken(j.Export,0)}enumElement_list(){return this.getTypedRuleContexts(Dl)}enumElement(e){return this.getTypedRuleContext(Dl,e)}get ruleIndex(){return j.RULE_enumStatement}accept(e){return e.visitEnumStatement?e.visitEnumStatement(this):e.visitChildren(this)}}class Dl extends Je{constructor(e,n,r){super(n,r),this.parser=e}identifier(){return this.getTypedRuleContext(xn,0)}NEWLINE(){return this.getToken(j.NEWLINE,0)}Assign(){return this.getToken(j.Assign,0)}StringLiteral(){return this.getToken(j.StringLiteral,0)}get ruleIndex(){return j.RULE_enumElement}accept(e){return e.visitEnumElement?e.visitEnumElement(this):e.visitChildren(this)}}class sy extends Im{constructor(n){super(n);I(this,"tokens");I(this,"indents");I(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)===j.EOF&&this.indents.length){for(this.tokens=this.tokens.filter(function(r){return r.type!==j.EOF}),this.emitToken(this.commonToken(j.NEWLINE,`
|
11
|
-
`));this.indents.length;)this.emitToken(this.createDedent()),this.indents.pop();this.emitToken(this.commonToken(j.EOF,"<EOF>"))}const n=super.nextToken();return this.tokens.length?this.tokens.shift():n}createDedent(){return this.commonToken(j.DEDENT,"")}getCharIndex(){return this._input.index}commonToken(n,r){const a=this.getCharIndex()-1,c=r.length?a-r.length+1:a;return new Om([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(j.NEWLINE,n));const p=this.indents.length?this.indents[this.indents.length-1]:0;if(h===p)this.skip();else if(h>p)this.indents.push(h),this.emitToken(this.commonToken(j.INDENT,r));else for(;this.indents.length&&this.indents[this.indents.length-1]>h;)this.emitToken(this.createDedent()),this.indents.pop()}}}const Ie=class Ie extends sy{constructor(e){super(e),this._interp=new Pm(this,Ie._ATN,Ie.DecisionsToDFA,new np)}get grammarFileName(){return"tccScriptLexer.g4"}get literalNames(){return Ie.literalNames}get symbolicNames(){return Ie.symbolicNames}get ruleNames(){return Ie.ruleNames}get serializedATN(){return Ie._serializedATN}get channelNames(){return Ie.channelNames}get modeNames(){return Ie.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 Ie.__ATN||(Ie.__ATN=new ep().deserialize(Ie._serializedATN)),Ie.__ATN}};I(Ie,"INDENT",1),I(Ie,"DEDENT",2),I(Ie,"Point",3),I(Ie,"OpenBracket",4),I(Ie,"CloseBracket",5),I(Ie,"OpenParen",6),I(Ie,"CloseParen",7),I(Ie,"Comma",8),I(Ie,"Assign",9),I(Ie,"QuestionMark",10),I(Ie,"Colon",11),I(Ie,"Plus",12),I(Ie,"Minus",13),I(Ie,"Multiply",14),I(Ie,"Divide",15),I(Ie,"Modulus",16),I(Ie,"Hashtag",17),I(Ie,"LessThan",18),I(Ie,"MoreThan",19),I(Ie,"LessThanEquals",20),I(Ie,"GreaterThanEquals",21),I(Ie,"Equals_",22),I(Ie,"NotEquals",23),I(Ie,"MultiplyAssign",24),I(Ie,"DivideAssign",25),I(Ie,"ModulusAssign",26),I(Ie,"PlusAssign",27),I(Ie,"MinusAssign",28),I(Ie,"ARROW",29),I(Ie,"ColonEquals",30),I(Ie,"BooleanLiteral",31),I(Ie,"IntegerLiteral",32),I(Ie,"DecimalLiteral",33),I(Ie,"Break",34),I(Ie,"And",35),I(Ie,"Export",36),I(Ie,"For",37),I(Ie,"Var",38),I(Ie,"Continue",39),I(Ie,"Varip",40),I(Ie,"Switch",41),I(Ie,"While",42),I(Ie,"If",43),I(Ie,"In",44),I(Ie,"Or",45),I(Ie,"Not",46),I(Ie,"Method",47),I(Ie,"Else",48),I(Ie,"To",49),I(Ie,"By",50),I(Ie,"Type",51),I(Ie,"Import",52),I(Ie,"As",53),I(Ie,"Enum",54),I(Ie,"Map",55),I(Ie,"ColorLiteral",56),I(Ie,"StringLiteral",57),I(Ie,"Identifier",58),I(Ie,"HIDDEN_",59),I(Ie,"COMMENT_",60),I(Ie,"NEWLINE",61),I(Ie,"EOF",rp.EOF),I(Ie,"channelNames",["DEFAULT_TOKEN_CHANNEL","HIDDEN"]),I(Ie,"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'"]),I(Ie,"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"]),I(Ie,"modeNames",["DEFAULT_MODE"]),I(Ie,"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"]),I(Ie,"_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]),I(Ie,"__ATN"),I(Ie,"DecisionsToDFA",Ie._ATN.decisionToState.map((e,n)=>new tp(e,n)));let kl=Ie;var z=(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))(z||{}),ye=(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))(ye||{}),Zt=(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))(Zt||{}),Ui=(t=>(t.library="library",t.indicator="indicator",t.strategy="strategy",t))(Ui||{});const xe={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."},Ir={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."},Vi=[z.SERIES,z.SIMPLE,z.INPUT,z.CONST],mu=[z.INT,z.FLOAT,z.BOOL,z.COLOR,z.STRING],Ol=["indicator","strategy","library"],wl=["plot","plotbar","plotchar","plotarrow","plotshape","plotcandle","hline","alertcondition","barcolor","bgcolor","fill"],uy=[...wl,"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"],cy=[...wl,"table.new","label.new","line.new","box.new","polyline.new","linefill.new"],ly=["strategy.entry","strategy.order","strategy.exit","strategy.close","strategy.cancel","strategy.close_all","strategy.cancel_all"],Sp=["strategy","input","table","color","line","linefill","label","box"],Rl=["close","open","high","low","hl2","hlc3","hlcc4","ohlc4","volume"],fy=/^\/\/\s*@(description|field|function|param|returns|type|enum|variable)/,Nn=["case","catch","default","delete","do","finally","function","instanceof","new","return","this","throw","try","typeof","void","with"],Tp=["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 Tt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hy(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return t[r]}})}),n}var py={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Tt,function(){var n=1e3,r=6e4,a=36e5,c="millisecond",h="second",p="minute",E="hour",b="day",T="week",x="month",w="quarter",F="year",R="date",v="Invalid Date",d=/^(\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,A={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(se){var re=["th","st","nd","rd"],ue=se%100;return"["+se+(re[(ue-20)%10]||re[ue]||re[0])+"]"}},O=function(se,re,ue){var ce=String(se);return!ce||ce.length>=re?se:""+Array(re+1-ce.length).join(ue)+se},D={s:O,z:function(se){var re=-se.utcOffset(),ue=Math.abs(re),ce=Math.floor(ue/60),Ee=ue%60;return(re<=0?"+":"-")+O(ce,2,"0")+":"+O(Ee,2,"0")},m:function se(re,ue){if(re.date()<ue.date())return-se(ue,re);var ce=12*(ue.year()-re.year())+(ue.month()-re.month()),Ee=re.clone().add(ce,x),Te=ue-Ee<0,_e=re.clone().add(ce+(Te?-1:1),x);return+(-(ce+(ue-Ee)/(Te?Ee-_e:_e-Ee))||0)},a:function(se){return se<0?Math.ceil(se)||0:Math.floor(se)},p:function(se){return{M:x,y:F,w:T,d:b,D:R,h:E,m:p,s:h,ms:c,Q:w}[se]||String(se||"").toLowerCase().replace(/s$/,"")},u:function(se){return se===void 0}},P="en",U={};U[P]=A;var H="$isDayjsObject",B=function(se){return se instanceof Y||!(!se||!se[H])},G=function se(re,ue,ce){var Ee;if(!re)return P;if(typeof re=="string"){var Te=re.toLowerCase();U[Te]&&(Ee=Te),ue&&(U[Te]=ue,Ee=Te);var _e=re.split("-");if(!Ee&&_e.length>1)return se(_e[0])}else{var oe=re.name;U[oe]=re,Ee=oe}return!ce&&Ee&&(P=Ee),Ee||!ce&&P},N=function(se,re){if(B(se))return se.clone();var ue=typeof re=="object"?re:{};return ue.date=se,ue.args=arguments,new Y(ue)},K=D;K.l=G,K.i=B,K.w=function(se,re){return N(se,{locale:re.$L,utc:re.$u,x:re.$x,$offset:re.$offset})};var Y=function(){function se(ue){this.$L=G(ue.locale,null,!0),this.parse(ue),this.$x=this.$x||ue.x||{},this[H]=!0}var re=se.prototype;return re.parse=function(ue){this.$d=function(ce){var Ee=ce.date,Te=ce.utc;if(Ee===null)return new Date(NaN);if(K.u(Ee))return new Date;if(Ee instanceof Date)return new Date(Ee);if(typeof Ee=="string"&&!/Z$/i.test(Ee)){var _e=Ee.match(d);if(_e){var oe=_e[2]-1||0,Z=(_e[7]||"0").substring(0,3);return Te?new Date(Date.UTC(_e[1],oe,_e[3]||1,_e[4]||0,_e[5]||0,_e[6]||0,Z)):new Date(_e[1],oe,_e[3]||1,_e[4]||0,_e[5]||0,_e[6]||0,Z)}}return new Date(Ee)}(ue),this.init()},re.init=function(){var ue=this.$d;this.$y=ue.getFullYear(),this.$M=ue.getMonth(),this.$D=ue.getDate(),this.$W=ue.getDay(),this.$H=ue.getHours(),this.$m=ue.getMinutes(),this.$s=ue.getSeconds(),this.$ms=ue.getMilliseconds()},re.$utils=function(){return K},re.isValid=function(){return this.$d.toString()!==v},re.isSame=function(ue,ce){var Ee=N(ue);return this.startOf(ce)<=Ee&&Ee<=this.endOf(ce)},re.isAfter=function(ue,ce){return N(ue)<this.startOf(ce)},re.isBefore=function(ue,ce){return this.endOf(ce)<N(ue)},re.$g=function(ue,ce,Ee){return K.u(ue)?this[ce]:this.set(Ee,ue)},re.unix=function(){return Math.floor(this.valueOf()/1e3)},re.valueOf=function(){return this.$d.getTime()},re.startOf=function(ue,ce){var Ee=this,Te=!!K.u(ce)||ce,_e=K.p(ue),oe=function(ht,wt){var yt=K.w(Ee.$u?Date.UTC(Ee.$y,wt,ht):new Date(Ee.$y,wt,ht),Ee);return Te?yt:yt.endOf(b)},Z=function(ht,wt){return K.w(Ee.toDate()[ht].apply(Ee.toDate("s"),(Te?[0,0,0,0]:[23,59,59,999]).slice(wt)),Ee)},J=this.$W,te=this.$M,ve=this.$D,me="set"+(this.$u?"UTC":"");switch(_e){case F:return Te?oe(1,0):oe(31,11);case x:return Te?oe(1,te):oe(0,te+1);case T:var Ze=this.$locale().weekStart||0,Ve=(J<Ze?J+7:J)-Ze;return oe(Te?ve-Ve:ve+(6-Ve),te);case b:case R:return Z(me+"Hours",0);case E:return Z(me+"Minutes",1);case p:return Z(me+"Seconds",2);case h:return Z(me+"Milliseconds",3);default:return this.clone()}},re.endOf=function(ue){return this.startOf(ue,!1)},re.$set=function(ue,ce){var Ee,Te=K.p(ue),_e="set"+(this.$u?"UTC":""),oe=(Ee={},Ee[b]=_e+"Date",Ee[R]=_e+"Date",Ee[x]=_e+"Month",Ee[F]=_e+"FullYear",Ee[E]=_e+"Hours",Ee[p]=_e+"Minutes",Ee[h]=_e+"Seconds",Ee[c]=_e+"Milliseconds",Ee)[Te],Z=Te===b?this.$D+(ce-this.$W):ce;if(Te===x||Te===F){var J=this.clone().set(R,1);J.$d[oe](Z),J.init(),this.$d=J.set(R,Math.min(this.$D,J.daysInMonth())).$d}else oe&&this.$d[oe](Z);return this.init(),this},re.set=function(ue,ce){return this.clone().$set(ue,ce)},re.get=function(ue){return this[K.p(ue)]()},re.add=function(ue,ce){var Ee,Te=this;ue=Number(ue);var _e=K.p(ce),oe=function(te){var ve=N(Te);return K.w(ve.date(ve.date()+Math.round(te*ue)),Te)};if(_e===x)return this.set(x,this.$M+ue);if(_e===F)return this.set(F,this.$y+ue);if(_e===b)return oe(1);if(_e===T)return oe(7);var Z=(Ee={},Ee[p]=r,Ee[E]=a,Ee[h]=n,Ee)[_e]||1,J=this.$d.getTime()+ue*Z;return K.w(J,this)},re.subtract=function(ue,ce){return this.add(-1*ue,ce)},re.format=function(ue){var ce=this,Ee=this.$locale();if(!this.isValid())return Ee.invalidDate||v;var Te=ue||"YYYY-MM-DDTHH:mm:ssZ",_e=K.z(this),oe=this.$H,Z=this.$m,J=this.$M,te=Ee.weekdays,ve=Ee.months,me=Ee.meridiem,Ze=function(wt,yt,St,Ct){return wt&&(wt[yt]||wt(ce,Te))||St[yt].slice(0,Ct)},Ve=function(wt){return K.s(oe%12||12,wt,"0")},ht=me||function(wt,yt,St){var Ct=wt<12?"AM":"PM";return St?Ct.toLowerCase():Ct};return Te.replace(g,function(wt,yt){return yt||function(St){switch(St){case"YY":return String(ce.$y).slice(-2);case"YYYY":return K.s(ce.$y,4,"0");case"M":return J+1;case"MM":return K.s(J+1,2,"0");case"MMM":return Ze(Ee.monthsShort,J,ve,3);case"MMMM":return Ze(ve,J);case"D":return ce.$D;case"DD":return K.s(ce.$D,2,"0");case"d":return String(ce.$W);case"dd":return Ze(Ee.weekdaysMin,ce.$W,te,2);case"ddd":return Ze(Ee.weekdaysShort,ce.$W,te,3);case"dddd":return te[ce.$W];case"H":return String(oe);case"HH":return K.s(oe,2,"0");case"h":return Ve(1);case"hh":return Ve(2);case"a":return ht(oe,Z,!0);case"A":return ht(oe,Z,!1);case"m":return String(Z);case"mm":return K.s(Z,2,"0");case"s":return String(ce.$s);case"ss":return K.s(ce.$s,2,"0");case"SSS":return K.s(ce.$ms,3,"0");case"Z":return _e}return null}(wt)||_e.replace(":","")})},re.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},re.diff=function(ue,ce,Ee){var Te,_e=this,oe=K.p(ce),Z=N(ue),J=(Z.utcOffset()-this.utcOffset())*r,te=this-Z,ve=function(){return K.m(_e,Z)};switch(oe){case F:Te=ve()/12;break;case x:Te=ve();break;case w:Te=ve()/3;break;case T:Te=(te-J)/6048e5;break;case b:Te=(te-J)/864e5;break;case E:Te=te/a;break;case p:Te=te/r;break;case h:Te=te/n;break;default:Te=te}return Ee?Te:K.a(Te)},re.daysInMonth=function(){return this.endOf(x).$D},re.$locale=function(){return U[this.$L]},re.locale=function(ue,ce){if(!ue)return this.$L;var Ee=this.clone(),Te=G(ue,ce,!0);return Te&&(Ee.$L=Te),Ee},re.clone=function(){return K.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()},se}(),ne=Y.prototype;return N.prototype=ne,[["$ms",c],["$s",h],["$m",p],["$H",E],["$W",b],["$M",x],["$y",F],["$D",R]].forEach(function(se){ne[se[1]]=function(re){return this.$g(re,se[0],se[1])}}),N.extend=function(se,re){return se.$i||(se(re,Y,N),se.$i=!0),N},N.locale=G,N.isDayjs=B,N.unix=function(se){return N(1e3*se)},N.en=U[P],N.Ls=U,N.p={},N})})(py);function Se(t,e){return t.replace(/\$(\w+)/g,(n,r)=>String(e[r])||n)}class dy extends Bm{constructor(){super(...arguments);I(this,"visitProgram");I(this,"visitGlobalStmt");I(this,"visitBlockStmt");I(this,"visitStmt");I(this,"visitSimpleStmt");I(this,"visitFlowStmt");I(this,"visitBlock");I(this,"visitBlockLine");I(this,"visitVariableDeclarationStmt");I(this,"visitDeclareAssign");I(this,"visitAgainAssign");I(this,"visitVarModifier");I(this,"visitBlockSequence");I(this,"visitExpressionSequence");I(this,"visitExpressionBlockSequence");I(this,"visitVarBlockStmt");I(this,"visitVarSingle");I(this,"visitVarMultiple");I(this,"visitBlockExpression");I(this,"visitParenthesizedExpression");I(this,"visitAdditiveExpression");I(this,"visitRelationalExpression");I(this,"visitTernaryExpression");I(this,"visitLogicalAndExpression");I(this,"visitNameExpression");I(this,"visitLiteralExpression");I(this,"visitLogicalOrExpression");I(this,"visitUnaryExpression");I(this,"visitNotExpression");I(this,"visitMemberIndexExpression");I(this,"visitMethodExpression");I(this,"visitEqualityExpression");I(this,"visitMultiplicativeExpression");I(this,"visitBrackethesized");I(this,"visitArguments");I(this,"visitArgument");I(this,"visitIfStatement");I(this,"visitForToStatement");I(this,"visitForInStatement");I(this,"visitSwitchStatement");I(this,"visitCaseClause");I(this,"visitDefaultCaluse");I(this,"visitWhileStatement");I(this,"visitImportStmt");I(this,"visitImportElement");I(this,"visitLiteral");I(this,"visitMethodStmt");I(this,"visitMethodElement");I(this,"visitMethodName");I(this,"visitArrowFunction");I(this,"visitArrowFunctionParameters");I(this,"visitFormalParameterList");I(this,"visitFormalParameterArg");I(this,"visitArrowMethod");I(this,"visitArrowMethodParameters");I(this,"visitTypeStatement");I(this,"visitTypeElement");I(this,"visitAssignmentOperator");I(this,"visitTypeMap");I(this,"visitTypeSeries");I(this,"visitTypeArray");I(this,"visitTypeGather");I(this,"visitIdentifier");I(this,"visitTypeName");I(this,"visitName");I(this,"visitEnumStatement");I(this,"visitEnumElement")}}class _y extends dy{constructor(n){super();I(this,"_buildinVariables");I(this,"_buildinTypes");I(this,"_buildinConstants");I(this,"_buildinMethods");I(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 z.UNDETERMINED;if(n=n.filter(h=>!h.endsWith(z.NA)),!n.length)return`${z.SIMPLE} ${z.NA}`;let a=100,c="";for(const h of n){if(h===z.UNDETERMINED)return z.UNDETERMINED;h.startsWith(z.SERIES)?a=0:h.startsWith(z.SIMPLE)&&a>0?a=1:h.startsWith(z.INPUT)&&a>1?a=2:h.startsWith(z.CONST)&&a>2&&(a=3);const p=this._removePrefix(h);(p!==z.INT||!c)&&(c=p)}return a===100?c:`${Vi[a]} ${r||c}`}_returnTypesOtherHandle(n,r,a,c){if(!a.length||a[0].includes("<>")){const h=n.type;let p=h;if(!h||h===z.UNDETERMINED)return[z.UNDETERMINED];switch(r){case"series <type>":p=this._getArrayType(h),p||(p=this._removePrefix(h)),a=[this._typeAddSeries(p)];break;case"array<type>":case"matrix<type>":case"type[]":if(this._isMapType(h)){const E=this._getMapType(h)||[];c.includes("keys")?p=E[0]:p=E[1]}else p=this._getArrayType(h),p||(p=this._removePrefix(h));a=[this._typeReplace(r,p)];break;case"<matrix_type>":p=this._getArrayType(h),a=[this._typeAddSeries(p)];break;case"map<keyType, valueType>":a=[p];break;case"<value_type>":p=this._getMapType(h),a=[p[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)!==z.INT;{const a=this._getPrefix(n),c=this._getPrefix(r);return a===c?!!n.endsWith(z.INT):!(Vi.indexOf(a)<Vi.indexOf(c))}}_compareType(n,r){if(n===z.UNDETERMINED||r===z.UNDETERMINED)return!0;const a=[z.FLOAT,z.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===z.NA||h===z.NA||c===h||a.includes(c)&&a.includes(h)}}_typeAddSeries(n){return this._buildinTypes.get(n)&&n!==z.CHART_POINT?`${z.SERIES} ${n}`:n}_typeAddConst(n){return mu.includes(n)?`${z.CONST} ${n}`:this._typeAddSeries(n)}_getOriginMethodName(n,r){let a="";return this._isArrayType(n)?a=`${z.ARRAY}.${r}`:this._isMatrixType(n)?a=`${z.MATRIX}.${r}`:this._isMapType(n)?a=`${z.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 Vi.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)?z.ARRAY:this._isMapType(n)?z.MAP:this._isMatrixType(n)?z.MATRIX:this._removePrefix(n)}_typeReplace(n,r){return r===z.UNDETERMINED?r:(r=this._removePrefix(r),this._arrayTypeConvert(n.startsWith(z.SERIES)?n.replace("<type>",r):n.replace("type",r)))}}var Vn=(t=>(t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error",t))(Vn||{});class Ap extends _y{constructor(n,r,a){super(n);I(this,"_loopCount");I(this,"_errors");I(this,"_variables");I(this,"_functions");I(this,"_methods");I(this,"_types");I(this,"_enums");I(this,"_currentBlockVars");I(this,"_currentFuncParams");I(this,"_isNeedCalc");I(this,"_blockCount");I(this,"_isInFunc");I(this,"_currentExportFunc");I(this,"_onlyStatementsCount");I(this,"_blockRanges");I(this,"_overloadsFuncs");I(this,"_hasMemberIndex");I(this,"_isInLocalScop");I(this,"_comments");I(this,"_currentLine",0);I(this,"_hasDrawFunc",!1);I(this,"_hasCreateOrderFunc",!1);I(this,"_scriptType");I(this,"_exportFunctions");I(this,"_exportMethods");I(this,"_exportTypes");I(this,"_exportEnums");I(this,"_exportPositions");I(this,"_description","");I(this,"_endExport");I(this,"_importLibs");I(this,"_getImportLibraryFunc");I(this,"_isEndExpr");I(this,"_inputVarName");I(this,"_hasRequest");I(this,"_strategyFuncName");I(this,"_strategyVarName");I(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===j.RULE_globalStmt&&c.push(await this.visit(h))}return this._onlyStatementsCount<=0?this._errors.push({startColumn:0,endColumn:0,startLineNumber:0,endLineNumber:0,type:Vn.Error,message:Se(xe.onlyStatementErr,{count:this._onlyStatementsCount})}):this._scriptType===Ui.indicator&&(this._strategyFuncName?this._errorHandle(Se(xe.indicatorUseStrategyFuncErr,{name:this._strategyFuncName.name,type:"functions"}),this._strategyFuncName.ctx):this._strategyVarName&&this._errorHandle(Se(xe.indicatorUseStrategyFuncErr,{name:this._strategyVarName.name,type:"variables"}),this._strategyVarName.ctx)),c});I(this,"visitGlobalStmt",async n=>{const{children:r}=n;if(r&&r.length){const a=r[0],c=await this.visit(a);return a.ruleIndex===j.RULE_methodStmt&&Ol.includes(c.exprs[0].name)&&(this._onlyStatementsCount++,this._onlyStatementsCount>1?this._errorHandle(Se(xe.onlyStatementErr,{count:this._onlyStatementsCount}),a):this._scriptType=c.exprs[0].name),c}return null});I(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 j.RULE_variableDeclarationStmt:c.push(...this.visit(h));break;case j.RULE_varBlockStmt:c.push(this.visit(h));break;case j.RULE_blockExpression:c.push(this.visit(h));break}}return c});I(this,"visitStmt",n=>{const{children:r}=n;if(r&&r.length){const a=r[0];return this.visit(a)}return null});I(this,"visitSimpleStmt",n=>{const{children:r}=n;if(r&&r.length){const a=r[0];return this.visit(a)}return null});I(this,"visitFlowStmt",n=>{const{children:r}=n,{column:a,line:c,text:h}=r[0].symbol;if(this._currentLine=c,this._loopCount<=0){const p=a+1;this._errors.push({startColumn:p,endColumn:parseInt(p+h.length),startLineNumber:c,endLineNumber:c,message:Se(xe.onlyInLoop,{text:h})})}return{ruleType:ye.FlowStmt,value:h}});I(this,"visitBlock",n=>{const{children:r}=n;if(r&&r.length){const a=r[0];return a.ruleIndex===j.RULE_simpleStmt?this._inBlock(a):this.visit(a)}return null});I(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 p=r[a];p.ruleIndex===j.RULE_stmt&&(this._isInFunc&&(this._isEndExpr=r.length-2===a&&h),c.push(this.visit(p)))}return this._blockCount--,this._blockRanges.pop(),this._currentBlockVars.splice(this._blockCount+1),c});I(this,"visitDeclareAssign",n=>{var h;const{children:r}=n;let a=0;const c={ruleType:ye.DeclareAssign};for(;a<r.length;a++){const p=r[a];switch(p.ruleIndex){case j.RULE_varArrayDeclaration:c.nameList=this.visit(p),this._inputVarName=(h=c.nameList)==null?void 0:h.name;break;case j.RULE_singleExpression:c.value=this.visit(p),this._inputVarName=void 0;break}}return this._variablesHandle(c,n),c});I(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]),p=this.visit(r[1]);return c.type?this._againAssignHandle([c,h],[r[0],r[2]],p):null}return null});I(this,"visitVarModifier",n=>{const{children:r}=n;return r[0].symbol.text});I(this,"visitExpressionSequence",n=>{const{children:r,start:a}=n;let c=0;const h=[];for(this._currentLine=a.line;c<r.length;c++){const p=r[c];if(p.ruleIndex===j.RULE_singleExpression){const E=this.visit(p);E&&(E.ctx=p,h.push(E))}}return h});I(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 j.RULE_singleExpression:c.push(this.visit(h));break;case j.RULE_variableDeclarationList:c.push(this.visit(h));break;case j.RULE_blockExpression:c.push(this.visit(h));break;case j.RULE_varBlockStmt:c.push(this.visit(h));break}}return c});I(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 j.RULE_variableDeclarationList:c.push(this.visit(h));break;case j.RULE_singleExpression:c.push(this.visit(h));break}}return c});I(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 j.RULE_variableDeclarationList:c.push(this.visit(h));break;case j.RULE_methodStmt:const p=this.visit(h);Ol.includes(p.exprs[0].name)&&(this._onlyStatementsCount++,this._onlyStatementsCount>1?this._errorHandle(Se(xe.onlyStatementErr,{count:this._onlyStatementsCount}),h):this._scriptType=p.exprs[0].name),c.push(p);break}}return c});I(this,"visitVarBlockStmt",n=>{const{children:r}=n;let a=0;const c={ruleType:ye.VarBlockStmt,ctx:n},h=[];for(;a<r.length;a++){const p=r[a];switch(p.ruleIndex){case j.RULE_varArrayDeclaration:c.nameList=this.visit(p);break;case j.RULE_assignmentOperator:c.operator=this.visit(p);break;case j.RULE_name:h.push(p),c.name=this.visit(p);break;case j.RULE_blockExpression:if(this._isNeedCalc=!0,c.value=this.visit(p),!c.value)break;h.push(p);const E=this._getBlockReturnTypes(c.value);E.length===1?c.value.type=E[0]:c.value.types=E,this._isNeedCalc=!1;break}}return c.name?this._againAssignHandle([c.name,c.value],h,c.operator):(this._variablesHandle(c,n),c)});I(this,"visitVarSingle",n=>{const{children:r,start:a}=n,c={ruleType:ye.VarSingle};let h=0;const p=this._commentsParser(a.line,[Zt.variable]);c.desc=p==null?void 0:p[Zt.variable],this._currentLine=a.line;let E={lineNumber:0,column:0};for(;h<r.length;h++){const b=r[h];switch(b.ruleIndex){case j.RULE_varModifier:c.declare=this.visit(b);break;case j.RULE_typeGather:const T=this.visit(b);c.prefix=this._getPrefix(T),c.type=T&&this._typeAddConst(T);break;case j.RULE_identifier:const x=this.visit(b);this._repeatVarJudge(x,b),E={lineNumber:b.start.line,column:b.start.column},c.name=x,c.pos=E;break}}return c});I(this,"_commentsParser",(n,r,a=!1)=>{var b;const c=this._comments.filter(T=>T.line<n&&T.line>=this._currentLine),h={},p={line:0,key:"",secKey:""},E=[Zt.field,Zt.param];for(const T of c){const[x,w]=fy.exec(T.text)||[];if(w&&r.includes(w)){const F=T.text.replace(x,"").trim();if(Object.assign(p,{line:T.line,key:w}),E.includes(w)){const[R,...v]=F.split(" ");R&&(Object.assign(p,{secKey:R}),h[w]=Object.assign(h[w]||{},{[R]:v.join(" ").trim()}))}else h[w]=[F]}else if(a&&p.key){const F=T.text.replace("//","").trim();E.includes(p.key)?h[p.key][p.secKey]+=` ${F}`:(b=h[p.key])==null||b.push(F)}}return h});I(this,"visitVarMultiple",n=>{const{children:r,start:a}=n;let c=0;const h=[],p=[];for(this._currentLine=a.line;c<r.length;c++){const E=r[c];if(E.ruleIndex===j.RULE_identifier){const b=this.visit(E);this._repeatVarJudge(b,E),h.push(b),p.push({lineNumber:E.start.line,column:E.start.column})}}return{ruleType:ye.VarMultiple,names:h,posList:p}});I(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});I(this,"visitParenthesizedExpression",n=>{const{children:r}=n,a=r[1],c=this.visit(a);return{ruleType:ye.ParenthesizedExpression,type:c.type,ctx:n,exprs:c}});I(this,"visitAdditiveExpression",n=>{const{children:r}=n;let a=0,c="";const h=[];for(;a<r.length;a++){const E=r[a];E.ruleIndex===j.RULE_singleExpression?h.push(this.visit(E)):c=E.symbol.text}const p={ruleType:ye.AdditiveExpression,operator:c,ctx:n,exprs:h};if(["+","-"].includes(c)){const E=[z.UNDETERMINED,z.INT,z.FLOAT];c==="+"&&E.push(z.STRING);const b=this._sameTypeJudge(h,[r[0],r[2]],c,E);p.type=this._typeHandle(b)}else{const E=this._calcTypeJudge(h[0],r[0],c),b=this._calcTypeJudge(h[1],r[2],c,1);p.type=this._typeHandle([E,b])}return p});I(this,"visitRelationalExpression",n=>{const{children:r}=n;let a=0,c="";const h=[];for(;a<r.length;a++){const b=r[a];b.ruleIndex===j.RULE_singleExpression?h.push(this.visit(b)):c=b.symbol.text}const p=this._calcTypeJudge(h[0],r[0],c),E=this._calcTypeJudge(h[1],r[2],c,1);return{ruleType:ye.RelationalExpression,operator:c,ctx:n,type:this._typeHandle([p,E],z.BOOL),exprs:h}});I(this,"visitEqualityExpression",n=>{const{children:r}=n;let a=0,c="";const h=[];for(;a<r.length;a++){const E=r[a];E.ruleIndex===j.RULE_singleExpression?h.push(this.visit(E)):c=E.symbol.text}const p=this._sameTypeJudge(h,[r[0],r[2]],c,[z.UNDETERMINED,z.COLOR,z.STRING,z.BOOL,z.INT,z.FLOAT]);return{ruleType:ye.EqualityExpression,operator:c,ctx:n,type:this._typeHandle(p,z.BOOL),exprs:h}});I(this,"visitTernaryExpression",n=>{const{children:r}=n;let a=0;const c=[];for(;a<r.length;a++){const p=r[a];p.ruleIndex===j.RULE_singleExpression&&c.push(this.visit(p))}let h=z.UNDETERMINED;if(c.length>=3){this._boolTypeJudge(c[0],r[0],"?:");const p=this._sameTypeJudge(c.slice(1),[r[2],r[4]],"?:",[]),E=this._getPrefix(c[0].type);h=this._typeHandle(p),E&&this._getPrefix(h)&&(h=this._typeHandle([h,`${E} ${this._removePrefix(h)}`]))}return{ruleType:ye.TernaryExpression,type:h,ctx:n,exprs:c}});I(this,"visitNameExpression",n=>{const{children:r}=n;if(r&&r.length){const a=r[0];return this.visit(a)}return null});I(this,"visitLiteralExpression",n=>{const{children:r}=n;if(r&&r.length){const a=r[0];return this.visit(a)}return null});I(this,"visitUnaryExpression",n=>{var b;const{children:r}=n,[a,c]=r,h=[this.visit(c)],p=a.symbol.text,E=this._calcTypeJudge(h[0],c,p);return((b=h[0])==null?void 0:b.ruleType)===ye.UnaryExpression&&this._errors.push({message:Se(xe.unaryErr,{sign:p}),startColumn:a.symbol.column+1,startLineNumber:a.symbol.line,endColumn:a.symbol.column+2,endLineNumber:a.symbol.line}),{ruleType:ye.UnaryExpression,operator:p,type:E,ctx:n,exprs:h}});I(this,"visitNotExpression",n=>{const{children:r}=n,a=r[1],c=[this.visit(a)],h=this._boolTypeJudge(c[0],a,"not");return{ruleType:ye.NotExpression,ctx:n,type:this._typeHandle([h],z.BOOL),exprs:c}});I(this,"visitMemberIndexExpression",n=>{var h,p;const{children:r}=n;let a=0;const c=[];for(;a<r.length;a++){const E=r[a];E.ruleIndex===j.RULE_singleExpression&&c.push(this.visit(E))}if(this._memberIndexVerify(c[0],n),this._hasMemberIndex=!0,((h=c[0])==null?void 0:h.ruleType)===ye.MemberIndexExpression){const E=r[1];this._errors.push({message:Se(xe.unaryErr,{sign:"["}),startColumn:E.symbol.column+1,startLineNumber:E.symbol.line,endColumn:E.symbol.column+2,endLineNumber:E.symbol.line}),this._hasMemberIndex=!1}return{ruleType:ye.MemberIndexExpression,type:(p=c[0])==null?void 0:p.type,ctx:n,isInFunc:this._isInFunc,exprs:c}});I(this,"visitMethodStmt",n=>{var T;const{children:r,start:a}=n;let c=0;const h=[],p=[],E=this._commentsParser(a.line,[Zt.description],!0);this._currentLine=a.line;let b;for(;c<r.length;c++){const x=r[c];x.ruleIndex===j.RULE_methodElement&&(h.push(this.visit(x)),p.push(x))}return((T=h[0])==null?void 0:T.name)===Ui.library&&E.description&&(this._description=E.description.join(`
|
11
|
+
`));this.indents.length;)this.emitToken(this.createDedent()),this.indents.pop();this.emitToken(this.commonToken(j.EOF,"<EOF>"))}const n=super.nextToken();return this.tokens.length?this.tokens.shift():n}createDedent(){return this.commonToken(j.DEDENT,"")}getCharIndex(){return this._input.index}commonToken(n,r){const a=this.getCharIndex()-1,c=r.length?a-r.length+1:a;return new Om([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(j.NEWLINE,n));const p=this.indents.length?this.indents[this.indents.length-1]:0;if(h===p)this.skip();else if(h>p)this.indents.push(h),this.emitToken(this.commonToken(j.INDENT,r));else for(;this.indents.length&&this.indents[this.indents.length-1]>h;)this.emitToken(this.createDedent()),this.indents.pop()}}}const Ie=class Ie extends sy{constructor(e){super(e),this._interp=new Pm(this,Ie._ATN,Ie.DecisionsToDFA,new np)}get grammarFileName(){return"tccScriptLexer.g4"}get literalNames(){return Ie.literalNames}get symbolicNames(){return Ie.symbolicNames}get ruleNames(){return Ie.ruleNames}get serializedATN(){return Ie._serializedATN}get channelNames(){return Ie.channelNames}get modeNames(){return Ie.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 Ie.__ATN||(Ie.__ATN=new ep().deserialize(Ie._serializedATN)),Ie.__ATN}};I(Ie,"INDENT",1),I(Ie,"DEDENT",2),I(Ie,"Point",3),I(Ie,"OpenBracket",4),I(Ie,"CloseBracket",5),I(Ie,"OpenParen",6),I(Ie,"CloseParen",7),I(Ie,"Comma",8),I(Ie,"Assign",9),I(Ie,"QuestionMark",10),I(Ie,"Colon",11),I(Ie,"Plus",12),I(Ie,"Minus",13),I(Ie,"Multiply",14),I(Ie,"Divide",15),I(Ie,"Modulus",16),I(Ie,"Hashtag",17),I(Ie,"LessThan",18),I(Ie,"MoreThan",19),I(Ie,"LessThanEquals",20),I(Ie,"GreaterThanEquals",21),I(Ie,"Equals_",22),I(Ie,"NotEquals",23),I(Ie,"MultiplyAssign",24),I(Ie,"DivideAssign",25),I(Ie,"ModulusAssign",26),I(Ie,"PlusAssign",27),I(Ie,"MinusAssign",28),I(Ie,"ARROW",29),I(Ie,"ColonEquals",30),I(Ie,"BooleanLiteral",31),I(Ie,"IntegerLiteral",32),I(Ie,"DecimalLiteral",33),I(Ie,"Break",34),I(Ie,"And",35),I(Ie,"Export",36),I(Ie,"For",37),I(Ie,"Var",38),I(Ie,"Continue",39),I(Ie,"Varip",40),I(Ie,"Switch",41),I(Ie,"While",42),I(Ie,"If",43),I(Ie,"In",44),I(Ie,"Or",45),I(Ie,"Not",46),I(Ie,"Method",47),I(Ie,"Else",48),I(Ie,"To",49),I(Ie,"By",50),I(Ie,"Type",51),I(Ie,"Import",52),I(Ie,"As",53),I(Ie,"Enum",54),I(Ie,"Map",55),I(Ie,"ColorLiteral",56),I(Ie,"StringLiteral",57),I(Ie,"Identifier",58),I(Ie,"HIDDEN_",59),I(Ie,"COMMENT_",60),I(Ie,"NEWLINE",61),I(Ie,"EOF",rp.EOF),I(Ie,"channelNames",["DEFAULT_TOKEN_CHANNEL","HIDDEN"]),I(Ie,"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'"]),I(Ie,"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"]),I(Ie,"modeNames",["DEFAULT_MODE"]),I(Ie,"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"]),I(Ie,"_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]),I(Ie,"__ATN"),I(Ie,"DecisionsToDFA",Ie._ATN.decisionToState.map((e,n)=>new tp(e,n)));let kl=Ie;var z=(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))(z||{}),ye=(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))(ye||{}),Zt=(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))(Zt||{}),Ui=(t=>(t.library="library",t.indicator="indicator",t.strategy="strategy",t))(Ui||{});const xe={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"},Ir={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."},Vi=[z.SERIES,z.SIMPLE,z.INPUT,z.CONST],mu=[z.INT,z.FLOAT,z.BOOL,z.COLOR,z.STRING],Ol=["indicator","strategy","library"],wl=["plot","plotbar","plotchar","plotarrow","plotshape","plotcandle","hline","alertcondition","barcolor","bgcolor","fill"],uy=[...wl,"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"],cy=[...wl,"table.new","label.new","line.new","box.new","polyline.new","linefill.new"],ly=["strategy.entry","strategy.order","strategy.exit","strategy.close","strategy.cancel","strategy.close_all","strategy.cancel_all"],Sp=["strategy","input","table","color","line","linefill","label","box"],Rl=["close","open","high","low","hl2","hlc3","hlcc4","ohlc4","volume"],fy=/^\/\/\s*@(description|field|function|param|returns|type|enum|variable)/,Nn=["case","catch","default","delete","do","finally","function","instanceof","new","return","this","throw","try","typeof","void","with"],Tp=["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 Tt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hy(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return t[r]}})}),n}var py={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Tt,function(){var n=1e3,r=6e4,a=36e5,c="millisecond",h="second",p="minute",E="hour",b="day",T="week",x="month",w="quarter",F="year",R="date",v="Invalid Date",d=/^(\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,A={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(se){var re=["th","st","nd","rd"],ue=se%100;return"["+se+(re[(ue-20)%10]||re[ue]||re[0])+"]"}},O=function(se,re,ue){var ce=String(se);return!ce||ce.length>=re?se:""+Array(re+1-ce.length).join(ue)+se},D={s:O,z:function(se){var re=-se.utcOffset(),ue=Math.abs(re),ce=Math.floor(ue/60),Ee=ue%60;return(re<=0?"+":"-")+O(ce,2,"0")+":"+O(Ee,2,"0")},m:function se(re,ue){if(re.date()<ue.date())return-se(ue,re);var ce=12*(ue.year()-re.year())+(ue.month()-re.month()),Ee=re.clone().add(ce,x),Te=ue-Ee<0,_e=re.clone().add(ce+(Te?-1:1),x);return+(-(ce+(ue-Ee)/(Te?Ee-_e:_e-Ee))||0)},a:function(se){return se<0?Math.ceil(se)||0:Math.floor(se)},p:function(se){return{M:x,y:F,w:T,d:b,D:R,h:E,m:p,s:h,ms:c,Q:w}[se]||String(se||"").toLowerCase().replace(/s$/,"")},u:function(se){return se===void 0}},P="en",U={};U[P]=A;var H="$isDayjsObject",B=function(se){return se instanceof Y||!(!se||!se[H])},G=function se(re,ue,ce){var Ee;if(!re)return P;if(typeof re=="string"){var Te=re.toLowerCase();U[Te]&&(Ee=Te),ue&&(U[Te]=ue,Ee=Te);var _e=re.split("-");if(!Ee&&_e.length>1)return se(_e[0])}else{var oe=re.name;U[oe]=re,Ee=oe}return!ce&&Ee&&(P=Ee),Ee||!ce&&P},N=function(se,re){if(B(se))return se.clone();var ue=typeof re=="object"?re:{};return ue.date=se,ue.args=arguments,new Y(ue)},K=D;K.l=G,K.i=B,K.w=function(se,re){return N(se,{locale:re.$L,utc:re.$u,x:re.$x,$offset:re.$offset})};var Y=function(){function se(ue){this.$L=G(ue.locale,null,!0),this.parse(ue),this.$x=this.$x||ue.x||{},this[H]=!0}var re=se.prototype;return re.parse=function(ue){this.$d=function(ce){var Ee=ce.date,Te=ce.utc;if(Ee===null)return new Date(NaN);if(K.u(Ee))return new Date;if(Ee instanceof Date)return new Date(Ee);if(typeof Ee=="string"&&!/Z$/i.test(Ee)){var _e=Ee.match(d);if(_e){var oe=_e[2]-1||0,Z=(_e[7]||"0").substring(0,3);return Te?new Date(Date.UTC(_e[1],oe,_e[3]||1,_e[4]||0,_e[5]||0,_e[6]||0,Z)):new Date(_e[1],oe,_e[3]||1,_e[4]||0,_e[5]||0,_e[6]||0,Z)}}return new Date(Ee)}(ue),this.init()},re.init=function(){var ue=this.$d;this.$y=ue.getFullYear(),this.$M=ue.getMonth(),this.$D=ue.getDate(),this.$W=ue.getDay(),this.$H=ue.getHours(),this.$m=ue.getMinutes(),this.$s=ue.getSeconds(),this.$ms=ue.getMilliseconds()},re.$utils=function(){return K},re.isValid=function(){return this.$d.toString()!==v},re.isSame=function(ue,ce){var Ee=N(ue);return this.startOf(ce)<=Ee&&Ee<=this.endOf(ce)},re.isAfter=function(ue,ce){return N(ue)<this.startOf(ce)},re.isBefore=function(ue,ce){return this.endOf(ce)<N(ue)},re.$g=function(ue,ce,Ee){return K.u(ue)?this[ce]:this.set(Ee,ue)},re.unix=function(){return Math.floor(this.valueOf()/1e3)},re.valueOf=function(){return this.$d.getTime()},re.startOf=function(ue,ce){var Ee=this,Te=!!K.u(ce)||ce,_e=K.p(ue),oe=function(ht,wt){var yt=K.w(Ee.$u?Date.UTC(Ee.$y,wt,ht):new Date(Ee.$y,wt,ht),Ee);return Te?yt:yt.endOf(b)},Z=function(ht,wt){return K.w(Ee.toDate()[ht].apply(Ee.toDate("s"),(Te?[0,0,0,0]:[23,59,59,999]).slice(wt)),Ee)},J=this.$W,te=this.$M,ve=this.$D,me="set"+(this.$u?"UTC":"");switch(_e){case F:return Te?oe(1,0):oe(31,11);case x:return Te?oe(1,te):oe(0,te+1);case T:var Ze=this.$locale().weekStart||0,Ve=(J<Ze?J+7:J)-Ze;return oe(Te?ve-Ve:ve+(6-Ve),te);case b:case R:return Z(me+"Hours",0);case E:return Z(me+"Minutes",1);case p:return Z(me+"Seconds",2);case h:return Z(me+"Milliseconds",3);default:return this.clone()}},re.endOf=function(ue){return this.startOf(ue,!1)},re.$set=function(ue,ce){var Ee,Te=K.p(ue),_e="set"+(this.$u?"UTC":""),oe=(Ee={},Ee[b]=_e+"Date",Ee[R]=_e+"Date",Ee[x]=_e+"Month",Ee[F]=_e+"FullYear",Ee[E]=_e+"Hours",Ee[p]=_e+"Minutes",Ee[h]=_e+"Seconds",Ee[c]=_e+"Milliseconds",Ee)[Te],Z=Te===b?this.$D+(ce-this.$W):ce;if(Te===x||Te===F){var J=this.clone().set(R,1);J.$d[oe](Z),J.init(),this.$d=J.set(R,Math.min(this.$D,J.daysInMonth())).$d}else oe&&this.$d[oe](Z);return this.init(),this},re.set=function(ue,ce){return this.clone().$set(ue,ce)},re.get=function(ue){return this[K.p(ue)]()},re.add=function(ue,ce){var Ee,Te=this;ue=Number(ue);var _e=K.p(ce),oe=function(te){var ve=N(Te);return K.w(ve.date(ve.date()+Math.round(te*ue)),Te)};if(_e===x)return this.set(x,this.$M+ue);if(_e===F)return this.set(F,this.$y+ue);if(_e===b)return oe(1);if(_e===T)return oe(7);var Z=(Ee={},Ee[p]=r,Ee[E]=a,Ee[h]=n,Ee)[_e]||1,J=this.$d.getTime()+ue*Z;return K.w(J,this)},re.subtract=function(ue,ce){return this.add(-1*ue,ce)},re.format=function(ue){var ce=this,Ee=this.$locale();if(!this.isValid())return Ee.invalidDate||v;var Te=ue||"YYYY-MM-DDTHH:mm:ssZ",_e=K.z(this),oe=this.$H,Z=this.$m,J=this.$M,te=Ee.weekdays,ve=Ee.months,me=Ee.meridiem,Ze=function(wt,yt,St,Ct){return wt&&(wt[yt]||wt(ce,Te))||St[yt].slice(0,Ct)},Ve=function(wt){return K.s(oe%12||12,wt,"0")},ht=me||function(wt,yt,St){var Ct=wt<12?"AM":"PM";return St?Ct.toLowerCase():Ct};return Te.replace(g,function(wt,yt){return yt||function(St){switch(St){case"YY":return String(ce.$y).slice(-2);case"YYYY":return K.s(ce.$y,4,"0");case"M":return J+1;case"MM":return K.s(J+1,2,"0");case"MMM":return Ze(Ee.monthsShort,J,ve,3);case"MMMM":return Ze(ve,J);case"D":return ce.$D;case"DD":return K.s(ce.$D,2,"0");case"d":return String(ce.$W);case"dd":return Ze(Ee.weekdaysMin,ce.$W,te,2);case"ddd":return Ze(Ee.weekdaysShort,ce.$W,te,3);case"dddd":return te[ce.$W];case"H":return String(oe);case"HH":return K.s(oe,2,"0");case"h":return Ve(1);case"hh":return Ve(2);case"a":return ht(oe,Z,!0);case"A":return ht(oe,Z,!1);case"m":return String(Z);case"mm":return K.s(Z,2,"0");case"s":return String(ce.$s);case"ss":return K.s(ce.$s,2,"0");case"SSS":return K.s(ce.$ms,3,"0");case"Z":return _e}return null}(wt)||_e.replace(":","")})},re.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},re.diff=function(ue,ce,Ee){var Te,_e=this,oe=K.p(ce),Z=N(ue),J=(Z.utcOffset()-this.utcOffset())*r,te=this-Z,ve=function(){return K.m(_e,Z)};switch(oe){case F:Te=ve()/12;break;case x:Te=ve();break;case w:Te=ve()/3;break;case T:Te=(te-J)/6048e5;break;case b:Te=(te-J)/864e5;break;case E:Te=te/a;break;case p:Te=te/r;break;case h:Te=te/n;break;default:Te=te}return Ee?Te:K.a(Te)},re.daysInMonth=function(){return this.endOf(x).$D},re.$locale=function(){return U[this.$L]},re.locale=function(ue,ce){if(!ue)return this.$L;var Ee=this.clone(),Te=G(ue,ce,!0);return Te&&(Ee.$L=Te),Ee},re.clone=function(){return K.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()},se}(),ne=Y.prototype;return N.prototype=ne,[["$ms",c],["$s",h],["$m",p],["$H",E],["$W",b],["$M",x],["$y",F],["$D",R]].forEach(function(se){ne[se[1]]=function(re){return this.$g(re,se[0],se[1])}}),N.extend=function(se,re){return se.$i||(se(re,Y,N),se.$i=!0),N},N.locale=G,N.isDayjs=B,N.unix=function(se){return N(1e3*se)},N.en=U[P],N.Ls=U,N.p={},N})})(py);function Se(t,e){return t.replace(/\$(\w+)/g,(n,r)=>String(e[r])||n)}class dy extends Bm{constructor(){super(...arguments);I(this,"visitProgram");I(this,"visitGlobalStmt");I(this,"visitBlockStmt");I(this,"visitStmt");I(this,"visitSimpleStmt");I(this,"visitFlowStmt");I(this,"visitBlock");I(this,"visitBlockLine");I(this,"visitVariableDeclarationStmt");I(this,"visitDeclareAssign");I(this,"visitAgainAssign");I(this,"visitVarModifier");I(this,"visitBlockSequence");I(this,"visitExpressionSequence");I(this,"visitExpressionBlockSequence");I(this,"visitVarBlockStmt");I(this,"visitVarSingle");I(this,"visitVarMultiple");I(this,"visitBlockExpression");I(this,"visitParenthesizedExpression");I(this,"visitAdditiveExpression");I(this,"visitRelationalExpression");I(this,"visitTernaryExpression");I(this,"visitLogicalAndExpression");I(this,"visitNameExpression");I(this,"visitLiteralExpression");I(this,"visitLogicalOrExpression");I(this,"visitUnaryExpression");I(this,"visitNotExpression");I(this,"visitMemberIndexExpression");I(this,"visitMethodExpression");I(this,"visitEqualityExpression");I(this,"visitMultiplicativeExpression");I(this,"visitBrackethesized");I(this,"visitArguments");I(this,"visitArgument");I(this,"visitIfStatement");I(this,"visitForToStatement");I(this,"visitForInStatement");I(this,"visitSwitchStatement");I(this,"visitCaseClause");I(this,"visitDefaultCaluse");I(this,"visitWhileStatement");I(this,"visitImportStmt");I(this,"visitImportElement");I(this,"visitLiteral");I(this,"visitMethodStmt");I(this,"visitMethodElement");I(this,"visitMethodName");I(this,"visitArrowFunction");I(this,"visitArrowFunctionParameters");I(this,"visitFormalParameterList");I(this,"visitFormalParameterArg");I(this,"visitArrowMethod");I(this,"visitArrowMethodParameters");I(this,"visitTypeStatement");I(this,"visitTypeElement");I(this,"visitAssignmentOperator");I(this,"visitTypeMap");I(this,"visitTypeSeries");I(this,"visitTypeArray");I(this,"visitTypeGather");I(this,"visitIdentifier");I(this,"visitTypeName");I(this,"visitName");I(this,"visitEnumStatement");I(this,"visitEnumElement")}}class _y extends dy{constructor(n){super();I(this,"_buildinVariables");I(this,"_buildinTypes");I(this,"_buildinConstants");I(this,"_buildinMethods");I(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 z.UNDETERMINED;if(n=n.filter(h=>!h.endsWith(z.NA)),!n.length)return`${z.SIMPLE} ${z.NA}`;let a=100,c="";for(const h of n){if(h===z.UNDETERMINED)return z.UNDETERMINED;h.startsWith(z.SERIES)?a=0:h.startsWith(z.SIMPLE)&&a>0?a=1:h.startsWith(z.INPUT)&&a>1?a=2:h.startsWith(z.CONST)&&a>2&&(a=3);const p=this._removePrefix(h);(p!==z.INT||!c)&&(c=p)}return a===100?c:`${Vi[a]} ${r||c}`}_returnTypesOtherHandle(n,r,a,c){if(!a.length||a[0].includes("<>")){const h=n.type;let p=h;if(!h||h===z.UNDETERMINED)return[z.UNDETERMINED];switch(r){case"series <type>":p=this._getArrayType(h),p||(p=this._removePrefix(h)),a=[this._typeAddSeries(p)];break;case"array<type>":case"matrix<type>":case"type[]":if(this._isMapType(h)){const E=this._getMapType(h)||[];c.includes("keys")?p=E[0]:p=E[1]}else p=this._getArrayType(h),p||(p=this._removePrefix(h));a=[this._typeReplace(r,p)];break;case"<matrix_type>":p=this._getArrayType(h),a=[this._typeAddSeries(p)];break;case"map<keyType, valueType>":a=[p];break;case"<value_type>":p=this._getMapType(h),a=[p[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)!==z.INT;{const a=this._getPrefix(n),c=this._getPrefix(r);return a===c?!!n.endsWith(z.INT):!(Vi.indexOf(a)<Vi.indexOf(c))}}_compareType(n,r){if(n===z.UNDETERMINED||r===z.UNDETERMINED)return!0;const a=[z.FLOAT,z.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===z.NA||h===z.NA||c===h||a.includes(c)&&a.includes(h)}}_typeAddSeries(n){return this._buildinTypes.get(n)&&n!==z.CHART_POINT?`${z.SERIES} ${n}`:n}_typeAddConst(n){return mu.includes(n)?`${z.CONST} ${n}`:this._typeAddSeries(n)}_getOriginMethodName(n,r){let a="";return this._isArrayType(n)?a=`${z.ARRAY}.${r}`:this._isMatrixType(n)?a=`${z.MATRIX}.${r}`:this._isMapType(n)?a=`${z.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 Vi.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)?z.ARRAY:this._isMapType(n)?z.MAP:this._isMatrixType(n)?z.MATRIX:this._removePrefix(n)}_typeReplace(n,r){return r===z.UNDETERMINED?r:(r=this._removePrefix(r),this._arrayTypeConvert(n.startsWith(z.SERIES)?n.replace("<type>",r):n.replace("type",r)))}}var Vn=(t=>(t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error",t))(Vn||{});class Ap extends _y{constructor(n,r,a){super(n);I(this,"_loopCount");I(this,"_errors");I(this,"_variables");I(this,"_functions");I(this,"_methods");I(this,"_types");I(this,"_enums");I(this,"_currentBlockVars");I(this,"_currentFuncParams");I(this,"_isNeedCalc");I(this,"_blockCount");I(this,"_isInFunc");I(this,"_currentExportFunc");I(this,"_onlyStatementsCount");I(this,"_blockRanges");I(this,"_overloadsFuncs");I(this,"_hasMemberIndex");I(this,"_isInLocalScop");I(this,"_comments");I(this,"_currentLine",0);I(this,"_hasDrawFunc",!1);I(this,"_hasCreateOrderFunc",!1);I(this,"_scriptType");I(this,"_exportFunctions");I(this,"_exportMethods");I(this,"_exportTypes");I(this,"_exportEnums");I(this,"_exportPositions");I(this,"_description","");I(this,"_endExport");I(this,"_importLibs");I(this,"_getImportLibraryFunc");I(this,"_isEndExpr");I(this,"_inputVarName");I(this,"_hasRequest");I(this,"_strategyFuncName");I(this,"_strategyVarName");I(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===j.RULE_globalStmt&&c.push(await this.visit(h))}return this._onlyStatementsCount<=0?this._errors.push({startColumn:0,endColumn:0,startLineNumber:0,endLineNumber:0,type:Vn.Error,message:Se(xe.onlyStatementErr,{count:this._onlyStatementsCount})}):this._scriptType===Ui.indicator&&(this._strategyFuncName?this._errorHandle(Se(xe.indicatorUseStrategyFuncErr,{name:this._strategyFuncName.name,type:"functions"}),this._strategyFuncName.ctx):this._strategyVarName&&this._errorHandle(Se(xe.indicatorUseStrategyFuncErr,{name:this._strategyVarName.name,type:"variables"}),this._strategyVarName.ctx)),c});I(this,"visitGlobalStmt",async n=>{const{children:r}=n;if(r&&r.length){const a=r[0],c=await this.visit(a);return a.ruleIndex===j.RULE_methodStmt&&Ol.includes(c.exprs[0].name)&&(this._onlyStatementsCount++,this._onlyStatementsCount>1?this._errorHandle(Se(xe.onlyStatementErr,{count:this._onlyStatementsCount}),a):this._scriptType=c.exprs[0].name),c}return null});I(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 j.RULE_variableDeclarationStmt:c.push(...this.visit(h));break;case j.RULE_varBlockStmt:c.push(this.visit(h));break;case j.RULE_blockExpression:c.push(this.visit(h));break}}return c});I(this,"visitStmt",n=>{const{children:r}=n;if(r&&r.length){const a=r[0];return this.visit(a)}return null});I(this,"visitSimpleStmt",n=>{const{children:r}=n;if(r&&r.length){const a=r[0];return this.visit(a)}return null});I(this,"visitFlowStmt",n=>{const{children:r}=n,{column:a,line:c,text:h}=r[0].symbol;if(this._currentLine=c,this._loopCount<=0){const p=a+1;this._errors.push({startColumn:p,endColumn:parseInt(p+h.length),startLineNumber:c,endLineNumber:c,message:Se(xe.onlyInLoop,{text:h})})}return{ruleType:ye.FlowStmt,value:h}});I(this,"visitBlock",n=>{const{children:r}=n;if(r&&r.length){const a=r[0];return a.ruleIndex===j.RULE_simpleStmt?this._inBlock(a):this.visit(a)}return null});I(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 p=r[a];p.ruleIndex===j.RULE_stmt&&(this._isInFunc&&(this._isEndExpr=r.length-2===a&&h),c.push(this.visit(p)))}return this._blockCount--,this._blockRanges.pop(),this._currentBlockVars.splice(this._blockCount+1),c});I(this,"visitDeclareAssign",n=>{var h;const{children:r}=n;let a=0;const c={ruleType:ye.DeclareAssign};for(;a<r.length;a++){const p=r[a];switch(p.ruleIndex){case j.RULE_varArrayDeclaration:c.nameList=this.visit(p),this._inputVarName=(h=c.nameList)==null?void 0:h.name;break;case j.RULE_singleExpression:c.value=this.visit(p),this._inputVarName=void 0;break}}return this._variablesHandle(c,n),c});I(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]),p=this.visit(r[1]);return c.type?this._againAssignHandle([c,h],[r[0],r[2]],p):null}return null});I(this,"visitVarModifier",n=>{const{children:r}=n;return r[0].symbol.text});I(this,"visitExpressionSequence",n=>{const{children:r,start:a}=n;let c=0;const h=[];for(this._currentLine=a.line;c<r.length;c++){const p=r[c];if(p.ruleIndex===j.RULE_singleExpression){const E=this.visit(p);E&&(E.ctx=p,h.push(E))}}return h});I(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 j.RULE_singleExpression:c.push(this.visit(h));break;case j.RULE_variableDeclarationList:c.push(this.visit(h));break;case j.RULE_blockExpression:c.push(this.visit(h));break;case j.RULE_varBlockStmt:c.push(this.visit(h));break}}return c});I(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 j.RULE_variableDeclarationList:c.push(this.visit(h));break;case j.RULE_singleExpression:c.push(this.visit(h));break}}return c});I(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 j.RULE_variableDeclarationList:c.push(this.visit(h));break;case j.RULE_methodStmt:const p=this.visit(h);Ol.includes(p.exprs[0].name)&&(this._onlyStatementsCount++,this._onlyStatementsCount>1?this._errorHandle(Se(xe.onlyStatementErr,{count:this._onlyStatementsCount}),h):this._scriptType=p.exprs[0].name),c.push(p);break}}return c});I(this,"visitVarBlockStmt",n=>{const{children:r}=n;let a=0;const c={ruleType:ye.VarBlockStmt,ctx:n},h=[];for(;a<r.length;a++){const p=r[a];switch(p.ruleIndex){case j.RULE_varArrayDeclaration:c.nameList=this.visit(p);break;case j.RULE_assignmentOperator:c.operator=this.visit(p);break;case j.RULE_name:h.push(p),c.name=this.visit(p);break;case j.RULE_blockExpression:if(this._isNeedCalc=!0,c.value=this.visit(p),!c.value)break;h.push(p);const E=this._getBlockReturnTypes(c.value);E.length===1?c.value.type=E[0]:c.value.types=E,this._isNeedCalc=!1;break}}return c.name?this._againAssignHandle([c.name,c.value],h,c.operator):(this._variablesHandle(c,n),c)});I(this,"visitVarSingle",n=>{const{children:r,start:a}=n,c={ruleType:ye.VarSingle};let h=0;const p=this._commentsParser(a.line,[Zt.variable]);c.desc=p==null?void 0:p[Zt.variable],this._currentLine=a.line;let E={lineNumber:0,column:0};for(;h<r.length;h++){const b=r[h];switch(b.ruleIndex){case j.RULE_varModifier:c.declare=this.visit(b);break;case j.RULE_typeGather:const T=this.visit(b);c.prefix=this._getPrefix(T),c.type=T&&this._typeAddConst(T);break;case j.RULE_identifier:const x=this.visit(b);this._repeatVarJudge(x,b),E={lineNumber:b.start.line,column:b.start.column},c.name=x,c.pos=E;break}}return c});I(this,"_commentsParser",(n,r,a=!1)=>{var b;const c=this._comments.filter(T=>T.line<n&&T.line>=this._currentLine),h={},p={line:0,key:"",secKey:""},E=[Zt.field,Zt.param];for(const T of c){const[x,w]=fy.exec(T.text)||[];if(w&&r.includes(w)){const F=T.text.replace(x,"").trim();if(Object.assign(p,{line:T.line,key:w}),E.includes(w)){const[R,...v]=F.split(" ");R&&(Object.assign(p,{secKey:R}),h[w]=Object.assign(h[w]||{},{[R]:v.join(" ").trim()}))}else h[w]=[F]}else if(a&&p.key){const F=T.text.replace("//","").trim();E.includes(p.key)?h[p.key][p.secKey]+=` ${F}`:(b=h[p.key])==null||b.push(F)}}return h});I(this,"visitVarMultiple",n=>{const{children:r,start:a}=n;let c=0;const h=[],p=[];for(this._currentLine=a.line;c<r.length;c++){const E=r[c];if(E.ruleIndex===j.RULE_identifier){const b=this.visit(E);this._repeatVarJudge(b,E),h.push(b),p.push({lineNumber:E.start.line,column:E.start.column})}}return{ruleType:ye.VarMultiple,names:h,posList:p}});I(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});I(this,"visitParenthesizedExpression",n=>{const{children:r}=n,a=r[1],c=this.visit(a);return{ruleType:ye.ParenthesizedExpression,type:c.type,ctx:n,exprs:c}});I(this,"visitAdditiveExpression",n=>{const{children:r}=n;let a=0,c="";const h=[];for(;a<r.length;a++){const E=r[a];E.ruleIndex===j.RULE_singleExpression?h.push(this.visit(E)):c=E.symbol.text}const p={ruleType:ye.AdditiveExpression,operator:c,ctx:n,exprs:h};if(["+","-"].includes(c)){const E=[z.UNDETERMINED,z.INT,z.FLOAT];c==="+"&&E.push(z.STRING);const b=this._sameTypeJudge(h,[r[0],r[2]],c,E);p.type=this._typeHandle(b)}else{const E=this._calcTypeJudge(h[0],r[0],c),b=this._calcTypeJudge(h[1],r[2],c,1);p.type=this._typeHandle([E,b])}return p});I(this,"visitRelationalExpression",n=>{const{children:r}=n;let a=0,c="";const h=[];for(;a<r.length;a++){const b=r[a];b.ruleIndex===j.RULE_singleExpression?h.push(this.visit(b)):c=b.symbol.text}const p=this._calcTypeJudge(h[0],r[0],c),E=this._calcTypeJudge(h[1],r[2],c,1);return{ruleType:ye.RelationalExpression,operator:c,ctx:n,type:this._typeHandle([p,E],z.BOOL),exprs:h}});I(this,"visitEqualityExpression",n=>{const{children:r}=n;let a=0,c="";const h=[];for(;a<r.length;a++){const E=r[a];E.ruleIndex===j.RULE_singleExpression?h.push(this.visit(E)):c=E.symbol.text}const p=this._sameTypeJudge(h,[r[0],r[2]],c,[z.UNDETERMINED,z.COLOR,z.STRING,z.BOOL,z.INT,z.FLOAT]);return{ruleType:ye.EqualityExpression,operator:c,ctx:n,type:this._typeHandle(p,z.BOOL),exprs:h}});I(this,"visitTernaryExpression",n=>{const{children:r}=n;let a=0;const c=[];for(;a<r.length;a++){const p=r[a];p.ruleIndex===j.RULE_singleExpression&&c.push(this.visit(p))}let h=z.UNDETERMINED;if(c.length>=3){this._boolTypeJudge(c[0],r[0],"?:");const p=this._sameTypeJudge(c.slice(1),[r[2],r[4]],"?:",[]),E=this._getPrefix(c[0].type);h=this._typeHandle(p),E&&this._getPrefix(h)&&(h=this._typeHandle([h,`${E} ${this._removePrefix(h)}`]))}return{ruleType:ye.TernaryExpression,type:h,ctx:n,exprs:c}});I(this,"visitNameExpression",n=>{const{children:r}=n;if(r&&r.length){const a=r[0];return this.visit(a)}return null});I(this,"visitLiteralExpression",n=>{const{children:r}=n;if(r&&r.length){const a=r[0];return this.visit(a)}return null});I(this,"visitUnaryExpression",n=>{var b;const{children:r}=n,[a,c]=r,h=[this.visit(c)],p=a.symbol.text,E=this._calcTypeJudge(h[0],c,p);return((b=h[0])==null?void 0:b.ruleType)===ye.UnaryExpression&&this._errors.push({message:Se(xe.unaryErr,{sign:p}),startColumn:a.symbol.column+1,startLineNumber:a.symbol.line,endColumn:a.symbol.column+2,endLineNumber:a.symbol.line}),{ruleType:ye.UnaryExpression,operator:p,type:E,ctx:n,exprs:h}});I(this,"visitNotExpression",n=>{const{children:r}=n,a=r[1],c=[this.visit(a)],h=this._boolTypeJudge(c[0],a,"not");return{ruleType:ye.NotExpression,ctx:n,type:this._typeHandle([h],z.BOOL),exprs:c}});I(this,"visitMemberIndexExpression",n=>{var h,p;const{children:r}=n;let a=0;const c=[];for(;a<r.length;a++){const E=r[a];E.ruleIndex===j.RULE_singleExpression&&c.push(this.visit(E))}if(this._memberIndexVerify(c[0],n),this._hasMemberIndex=!0,((h=c[0])==null?void 0:h.ruleType)===ye.MemberIndexExpression){const E=r[1];this._errors.push({message:Se(xe.unaryErr,{sign:"["}),startColumn:E.symbol.column+1,startLineNumber:E.symbol.line,endColumn:E.symbol.column+2,endLineNumber:E.symbol.line}),this._hasMemberIndex=!1}return{ruleType:ye.MemberIndexExpression,type:(p=c[0])==null?void 0:p.type,ctx:n,isInFunc:this._isInFunc,exprs:c}});I(this,"visitMethodStmt",n=>{var T;const{children:r,start:a}=n;let c=0;const h=[],p=[],E=this._commentsParser(a.line,[Zt.description],!0);this._currentLine=a.line;let b;for(;c<r.length;c++){const x=r[c];x.ruleIndex===j.RULE_methodElement&&(h.push(this.visit(x)),p.push(x))}return((T=h[0])==null?void 0:T.name)===Ui.library&&E.description&&(this._description=E.description.join(`
|
12
12
|
`)),b=this._getMethodTypes(h,p)||[],this._inputFuncTitleVerify(h,n),{ruleType:ye.MethodExpression,types:b.length>1||b.isBrackethesized||b.isUnknown?b:void 0,ctx:n,type:b.length===1?b[0]:void 0,exprs:h}});I(this,"visitMethodExpression",n=>{const{children:r}=n;if(r&&r.length){const a=r[0];return this.visit(a)}return null});I(this,"visitLogicalAndExpression",n=>{const{children:r}=n;let a=0,c="";const h=[];for(;a<r.length;a++){const b=r[a];b.ruleIndex===j.RULE_singleExpression?h.push(this.visit(b)):c=b.symbol.text}const p=this._boolTypeJudge(h[0],r[0],c),E=this._boolTypeJudge(h[1],r[2],c,1);return{ruleType:ye.LogicalAndExpression,type:this._typeHandle([p,E],z.BOOL),operator:c,ctx:n,exprs:h}});I(this,"visitLogicalOrExpression",n=>{const{children:r}=n;let a=0,c="";const h=[];for(;a<r.length;a++){const b=r[a];b.ruleIndex===j.RULE_singleExpression?h.push(this.visit(b)):c=b.symbol.text}const p=this._boolTypeJudge(h[0],r[0],c),E=this._boolTypeJudge(h[1],r[2],c,1);return{ruleType:ye.LogicalOrExpression,operator:c,ctx:n,type:this._typeHandle([p,E],z.BOOL),exprs:h}});I(this,"visitMultiplicativeExpression",n=>{const{children:r}=n;let a=0,c="";const h=[];for(;a<r.length;a++){const b=r[a];b.ruleIndex===j.RULE_singleExpression?h.push(this.visit(b)):c=b.symbol.text}const p=this._calcTypeJudge(h[0],r[0],c),E=this._calcTypeJudge(h[1],r[2],c,1);return{ruleType:ye.MultiplicativeExpression,operator:c,ctx:n,type:this._typeHandle([p,E]),exprs:h}});I(this,"visitBrackethesized",n=>{const{children:r,start:a}=n,c=r[1];return this._currentLine=a.line,{ruleType:ye.Brackethesized,ctx:n,exprs:this.visit(c)}});I(this,"visitArguments",n=>{const{children:r}=n;let a=0;const c={params:[]};let h="";for(;a<r.length;a++){const p=r[a];if(p.ruleIndex===j.RULE_argument){const E=this.visit(p),b=E.paramKey;b?(h=b,c[b]?this._errorHandle(Se(Ir.moreSameArg,{arg:b}),n.parentCtx,Vn.Warning):(c[b]=E.param,c[b].ctx=p)):h?this._errorHandle(Se(xe.argsSyntaxErr,{argName:h}),p):(E.ctx=p,c.params.push(E))}}return c});I(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])}});I(this,"visitIfStatement",n=>{const{children:r}=n;let a=0;const c={ruleType:ye.IfStatement,condition:[],block:[],ctx:n,typeList:[]};for(;a<r.length;a++){const h=r[a];switch(h.ruleIndex){case j.RULE_singleExpression:const p=this.visit(h);if(!p)break;p.ctx=h,c.condition.push(p);break;case j.RULE_blockLine:const E=this._isInLocalScop;this._isInLocalScop=!0;const b=this.visit(h);c.typeList.push(this._getBlockReturnTypes(b)),c.block.push(b),this._isInLocalScop=E;break}}return this._verifyIf(c),c});I(this,"visitForToStatement",n=>{const{children:r}=n;let a=0;const c={ruleType:ye.ForToStatement,numerical:[],ctx:n,block:[]};for(;a<r.length;a++){const h=r[a];switch(h.ruleIndex){case j.RULE_varModifier:c.declare=this.visit(h);break;case j.RULE_typeGather:const p=this.visit(h);c.type=p&&this._typeAddSeries(p);break;case j.RULE_identifier:c.name=this.visit(h);break;case j.RULE_singleExpression:const E=this.visit(h);E&&(E.ctx=h,c.numerical.push(E));break;case j.RULE_blockLine:if(this._blockCount++,this._pushBlockRanges(n),c.name){const T=c.numerical[0].type;this._variablesHandle({nameList:{name:c.name,isForVar:!0,type:c.type},value:{type:T||`${z.SERIES} ${z.INT}`}},n)}this._blockCount--,this._blockRanges.pop(),this._loopCount++;const b=this._isInLocalScop;this._isInLocalScop=!0,c.block=this.visit(h),this._loopCount--,this._isInLocalScop=b,c.returnedTypes=this._getBlockReturnTypes(c.block);break}}return this._verifyForTo(c),c});I(this,"visitForInStatement",n=>{const{children:r}=n;let a=0;const c={ruleType:ye.ForInStatement,ctx:n,names:[]};for(;a<r.length;a++){const h=r[a];switch(h.ruleIndex){case j.RULE_identifier:const p=this.visit(h);c.names.push(p);break;case j.RULE_singleExpression:c.array=this.visit(h);const E=c.array.type;this._isArrayType(E)||this._isMatrixType(E)||E===z.UNDETERMINED||this._errorHandle(Se(xe.typeMismatch,{operator:"foreach",index:"id",typeE:E,typeR:"array<fun_arg>"}),h);break;case j.RULE_blockLine:if(this._blockCount++,this._pushBlockRanges(n),c.names.length){let[T,x]=c.names;const w=c.array.type;x?this._variablesHandle({nameList:{name:T,isForVar:!0,type:`${z.SERIES} ${z.INT}`},value:{type:`${z.SERIES} ${z.INT}`}},n):x=T;const F=w===z.UNDETERMINED?w:this._isMatrixType(w)?`${this._getArrayType(w)}[]`:this._typeAddSeries(this._getArrayType(w));this._variablesHandle({nameList:{name:x,isForVar:!0,type:F},value:{type:F}},n)}this._blockCount--,this._blockRanges.pop(),this._loopCount++;const b=this._isInLocalScop;this._isInLocalScop=!0,c.block=this.visit(h),this._isInLocalScop=b,this._loopCount--,c.returnedTypes=this._getBlockReturnTypes(c.block);break}}return c});I(this,"visitSwitchStatement",n=>{const{children:r}=n;let a=0;const c={ruleType:ye.SwitchStatement,condition:!0,ctx:n,cases:[],defaultCase:void 0};for(;a<r.length;a++){const h=r[a];switch(h.ruleIndex){case j.RULE_singleExpression:if(c.condition=this.visit(h),!h.children)break;c.condition.ctx=h;break;case j.RULE_caseClause:c.cases.push(this.visit(h));break;case j.RULE_defaultCaluse:c.defaultCase=this.visit(h);break}}return this._verifySwitch(c),c});I(this,"visitCaseClause",n=>{const{children:r}=n,a={ruleType:ye.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});I(this,"visitDefaultCaluse",n=>{const{children:r}=n,a={ruleType:ye.DefaultCaluse},c=this._isInLocalScop;return this._isInLocalScop=!0,a.block=this.visit(r[1]),this._isInLocalScop=c,a.returnedTypes=this._getBlockReturnTypes(a.block),a});I(this,"visitWhileStatement",n=>{const{children:r}=n,a={ruleType:ye.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});I(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 p=r[c];if(p.ruleIndex===j.RULE_importElement){const E=await this.visit(p);E&&h.push(E)}}return h});I(this,"visitImportElement",async n=>{const{children:r}=n;if(!r||!r.length)return;let a=0;const c=[],h={ruleType:ye.ImportElement,ctx:n};for(;a<r.length;a++){const p=r[a];p.ruleIndex===j.RULE_identifier?c.push(this.visit(p)):p.symbol&&p.symbol.type===j.IntegerLiteral&&(h.libraryVersion=p.symbol.text)}return h.username=c[0],h.libraryName=c[1],h.name=c[2],await this._importHandle(h,n),h});I(this,"visitLiteral",n=>{const{children:r}=n,a=r[0],{type:c,text:h}=a.symbol,p={ruleType:ye.Literal,ctx:n,type:"",value:h};switch(c){case j.ColorLiteral:p.type=z.COLOR;break;case j.BooleanLiteral:p.type=z.BOOL;break;case j.StringLiteral:if(p.type=z.STRING,h.includes(`
|
13
13
|
`)){const E=h.replace(/\s*(\n|\r)\s*/g," ");p.value=`\`${E.substring(1,E.length-1)}\``}break;case j.IntegerLiteral:p.type=z.INT;break;case j.DecimalLiteral:p.type=z.FLOAT;break}return p.type&&(p.type=`${z.CONST} ${p.type}`),p});I(this,"visitMethodElement",n=>{const{children:r}=n,[a,c]=r,[h,p,E]=this.visit(a),b=this.visit(c);return h.startsWith("request.")&&this._isInFunc&&(this._currentExportFunc&&this._errorHandle(Se(xe.exportFuncUseReqErr,{name:h}),n),this._hasRequest=!0),{name:h,type:p,args:b,expr:E}});I(this,"visitMethodName",n=>{const{children:r}=n,a=[],c=[];let h=0,p=null;for(;h<r.length;h++){const b=r[h],T=b.ruleIndex,x=b.symbol;switch(T){case j.RULE_identifier:a.push(this.visit(b));break;case j.RULE_singleExpression:p=this.visit(b);break;case j.RULE_typeName:const w=this.visit(b);c.push(w),this._typeCheck(w,j.RULE_typeName,b);break;default:x&&x.text==="."&&a.push(".")}}const E=a.join("");return cy.includes(E)?this._hasDrawFunc=!0:ly.includes(E)&&(this._hasCreateOrderFunc=!0),[E,c,p]});I(this,"visitArrowFunction",n=>{const{children:r,start:a,stop:c}=n,h={ruleType:ye.ArrowFunction,returnedTypes:[]};let p=0,E={lineNumber:0,column:0};const b=this._commentsParser(a.line,[Zt.function,Zt.param,Zt.returns],!0);Object.assign(h,{desc:b[Zt.function],paramsDesc:b[Zt.param],returnsDesc:b[Zt.returns]}),this._currentLine=a.line;let T=null;for(;p<r.length;p++){const x=r[p],w=x.ruleIndex,F=x.symbol;switch(w){case j.RULE_identifier:E={lineNumber:x.start.line,column:x.start.column},h.name=this.visit(x);break;case j.RULE_arrowFunctionParameters:h.params=this.visit(x),h.isExport&&this._exportArgsTypeVerify(h.params),this._setFuncParams(h,{endColumn:c.column,endLineNumber:c.line-1,startColumn:a.column,startLineNumber:a.line}),T=x;break;case j.RULE_block:this._isInFunc=!0,h.isExport&&(this._currentExportFunc=h.name),this._hasMemberIndex=!1,this._hasRequest=!1,h.block=this.visit(x),h.hasMemberIndex=this._hasMemberIndex,h.returnedTypes=this._getBlockReturnTypes(h.block),this._isInFunc=!1,this._currentExportFunc="";break;default:F&&F.type===j.Export&&(h.isExport=!0,this._addExportPos(F,"functions"))}}return h.hasRequest=this._hasRequest,this._setFunc(h,E,T,c.line-1),this._hasRequest=!1,this._currentFuncParams.clear(),h});I(this,"visitArrowFunctionParameters",n=>{const{children:r}=n;let a=0,c=[];for(;a<r.length;a++){const h=r[a];h.ruleIndex===j.RULE_formalParameterList&&(c=this.visit(h))}return c});I(this,"visitFormalParameterList",n=>{const{children:r}=n;let a=0;const c=[];for(;a<r.length;a++){const h=r[a];h.ruleIndex===j.RULE_formalParameterArg&&c.push(this.visit(h))}return c});I(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 j.RULE_typeGather:const p=this.visit(h);c.type=p&&this._typeAddSeries(p);break;case j.RULE_identifier:c.name=this.visit(h);break;case j.RULE_singleExpression:c.defaultValue=this.visit(h),delete c.defaultValue.ctx}}return c.ctx=n,this._verifyArgsDefaultValue(c,n),c.type=c.type||z.UNDETERMINED,c});I(this,"visitArrowMethod",n=>{const{children:r,start:a,stop:c}=n;let h=0;const p={ruleType:ye.ArrowMethod,returnedTypes:[]};let E={lineNumber:0,column:0};const b=this._commentsParser(a.line,[Zt.function,Zt.param,Zt.returns],!0);Object.assign(p,{desc:b[Zt.function],paramsDesc:b[Zt.param],returnsDesc:b[Zt.returns]}),this._currentLine=a.line;let T=null;for(;h<r.length;h++){const x=r[h];switch(x.ruleIndex){case j.RULE_identifier:E={lineNumber:x.start.line,column:x.start.column},p.name=this.visit(x);break;case j.RULE_arrowMethodParameters:p.params=this.visit(x),p.isExport&&this._exportArgsTypeVerify(p.params),this._setFuncParams(p,{endColumn:c.column,endLineNumber:c.line-1,startColumn:a.column,startLineNumber:a.line}),T=x;break;case j.RULE_block:this._isInFunc=!0,p.isExport&&(this._currentExportFunc=p.name),this._hasMemberIndex=!1,this._hasRequest=!1,p.block=this.visit(x),p.hasMemberIndex=this._hasMemberIndex,p.returnedTypes=this._getBlockReturnTypes(p.block),this._isInFunc=!1,this._currentExportFunc="";break;default:x.symbol&&x.symbol.type===j.Export&&(p.isExport=!0,this._addExportPos(x.symbol,"methods"));break}}return p.hasRequest=this._hasRequest,this._setFunc(p,E,T,c.line-1),this._setMethod(p,E),this._hasRequest=!1,this._currentFuncParams.clear(),p});I(this,"visitArrowMethodParameters",n=>{const{children:r}=n;let a=0;const c={};let h=[];for(;a<r.length;a++){const p=r[a];switch(p.ruleIndex){case j.RULE_typeGather:const E=this.visit(p);c.type=E&&this._typeAddSeries(E);break;case j.RULE_identifier:c.ctx=p,c.name=this.visit(p);break;case j.RULE_formalParameterList:h=this.visit(p);break}}return[c,...h]});I(this,"visitTypeStatement",n=>{const{children:r,start:a,stop:c}=n;let h=0;const p={ruleType:ye.TypeStatement,fields:[]},E=this._commentsParser(a.line,[Zt.type,Zt.field]);Object.assign(p,{desc:E[Zt.type],fieldsDesc:E[Zt.field]}),this._currentLine=a.line;let b={lineNumber:0,column:0},T=null;for(;h<r.length;h++){const x=r[h];switch(x.ruleIndex){case j.RULE_identifier:b={lineNumber:x.start.line,column:x.start.column},T=x,p.name=this.visit(x),this._verifyTypeName(p.name,x);break;case j.RULE_typeElement:p.fields.push(this.visit(x));break;default:x.symbol&&x.symbol.type===j.Export&&(p.isExport=!0,this._addExportPos(x.symbol,"types"));break}}if(p.isExport){const x=c.line-1,{line:w=0}=this._endExport;x>w&&(this._endExport={line:x,name:p.name})}return this._setUserType(p,b,T),this._setNewFunc(p,b),this._setCopyFunc(p,b),this._setCopyMethod(p,b),p});I(this,"visitTypeElement",n=>{const{children:r,start:a}=n;let c=0;const h={};let p=null,E=null;for(this._currentLine=a.line;c<r.length;c++){const b=r[c];switch(b.ruleIndex){case j.RULE_typeGather:const T=this.visit(b);if(b.children[0].ruleIndex===j.RULE_typeSeries){const{column:x,line:w,text:F}=b.start,R=x+1;this._errors.push({startColumn:R,endColumn:parseInt(R+F.length),startLineNumber:w,endLineNumber:w,message:Se(this._buildinTypes.has(F)?xe.typeUseError:xe.notTypeKeyword,{text:F})}),h.type=z.UNDETERMINED}else h.type=T&&this._typeAddSeries(T);break;case j.RULE_identifier:h.name=this.visit(b),E=b;break;case j.RULE_singleExpression:p=b,h.value=this.visit(b);break;default:b.symbol&&b.symbol.type===j.Varip&&(h.isVarip=!0);break}}return this._typeElementVerify(h,p,E),h});I(this,"visitAssignmentOperator",n=>{const{children:r}=n;return r&&r[0].symbol.text});I(this,"visitTypeMap",n=>{const{children:r}=n;let a=0;const c=[];for(;a<r.length;a++){const h=r[a];if(h.ruleIndex===j.RULE_typeName){const p=this.visit(h);c.push(p),this._typeCheck(p,j.RULE_typeName,h)}}return`map<${c[0]},${c[1]}>`});I(this,"visitTypeSeries",n=>{const{children:r}=n,[a,c]=r,h=this.visit(a),p=this.visit(c);return this._typeCheck(h,j.RULE_typeSeries,a),this._typeCheck(p,j.RULE_typeName,c),`${h} ${p}`});I(this,"visitTypeArray",n=>{const{children:r}=n,a=r[0];let c=this.visit(a),h=c;if(r.length===3)c=z.ARRAY;else{this._typeCheck(c,j.RULE_typeArray,a);let p=1;for(;p<r.length;p++){const E=r[p];E.ruleIndex===j.RULE_typeName&&(h=this.visit(E),this._typeCheck(h,j.RULE_typeName,E))}}return this._arrayTypeConvert(`${c}<${h}>`)});I(this,"visitTypeGather",n=>{const{children:r}=n;if(r&&r.length){const a=r[0],c=this.visit(a);return a.ruleIndex===j.RULE_typeName&&this._typeCheck(c,j.RULE_typeName,a),c}return null});I(this,"visitIdentifier",n=>n.children&&n.children[0].symbol.text);I(this,"visitTypeName",n=>{const{children:r}=n;let a=0,c="";for(;a<r.length;a++){const h=r[a];h.ruleIndex===j.RULE_identifier?c=`${c}${this.visit(h)}`:c=`${c}.`}return c});I(this,"visitEnumStatement",n=>{const{children:r,start:a,stop:c}=n;let h=0;const p={ruleType:ye.EnumStatement,fields:[]},E=this._commentsParser(a.line,[Zt.enum,Zt.field]);Object.assign(p,{desc:E[Zt.enum],fieldsDesc:E[Zt.field]}),this._currentLine=a.line;let b={lineNumber:0,column:0},T=null;for(;h<r.length;h++){const x=r[h];switch(x.ruleIndex){case j.RULE_identifier:b={lineNumber:x.start.line,column:x.start.column},T=x,p.name=this.visit(x),this._verifyEnumName(p.name,x);break;case j.RULE_enumElement:p.fields.push(this.visit(x));break;default:x.symbol&&x.symbol.type===j.Export&&(p.isExport=!0,this._addExportPos(x.symbol,"enums"));break}}if(p.isExport){const x=c.line-1,{line:w=0}=this._endExport;x>w&&(this._endExport={line:x,name:p.name})}return this._setUserEnum(p,b,T),p});I(this,"visitEnumElement",n=>{const{children:r,start:a}=n;let c=0;const h={};for(this._currentLine=a.line;c<r.length;c++){const p=r[c];switch(p.ruleIndex){case j.RULE_identifier:h.name=this.visit(p);break;default:p.symbol&&p.symbol.type===j.StringLiteral&&(h.value=p.symbol.text);break}}return h});I(this,"visitName",n=>{const{children:r}=n;let a=0,c=!1;const h=[];let p=null;for(;a<r.length;a++){const E=r[a];switch(E.ruleIndex){case j.RULE_identifier:h.push(this.visit(E));break;case j.RULE_singleExpression:p=this.visit(E);break;case j.RULE_methodElement:c=!0;const b=this.visit(E);b.ctx=E,h.push(b);break}}return this._nameHandle(c,h,p,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(Se(xe.buidinAssignErr,{name:a}),r),!c)return;const p=this._currentBlockVars[0].get(a);if(!p)return;const{column:E,lineNumber:b}=p.pos||{};this._isInFunc&&E===c.column&&b===c.lineNumber&&this._errorHandle(Se(xe.modifyGlobalVarErr,{name:a}),r)}_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(Ui.strategy))this._strategyFuncName={ctx:r,name:a};else if(!a.startsWith(z.INPUT))return;this._inputVarName&&!(c.params.some(p=>p.originName==="title")||c.title)&&(c.title={value:`"${this._inputVarName}"`,ruleType:ye.Literal,type:`${z.CONST} ${z.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===z.UNDETERMINED)continue;const p=this._removePrefix(c);[z.INT,z.FLOAT].includes(p)?this._errorHandle(Se(Ir.conditionWarning,{name:"if"}),h,Vn.Warning):p!==z.BOOL&&this._errorHandle(Se(xe.conditionalErr,{name:"if"}),h)}}_verifyForTo(n){const{numerical:r}=n;if(r!=null&&r.length)for(const a of r){const{type:c,ctx:h}=a;if(c===z.UNDETERMINED)continue;const p=this._removePrefix(c);[z.INT,z.FLOAT].includes(p)||this._errorHandle(xe.fortoErr,h)}}_verifySwitch(n){var r;if(n.cases){const a=(r=n.condition)==null?void 0:r.type;if(a===z.UNDETERMINED)return;if(a&&this._types.has(a)){this._errorHandle(Se(xe.typeMismatch,{operator:"switch",index:"expr0",typeE:a,typeR:`${z.SIMPLE} ${z.STRING}`}),n.condition.ctx);return}for(const c of n.cases){const{condition:{type:h,ctx:p}}=c;if(h!==z.UNDETERMINED)if(this._types.has(h))this._errorHandle(Se(xe.typeMismatch,{operator:"case",index:"expr1",typeE:h,typeR:`${z.SIMPLE} ${z.STRING}`}),p);else if(a){if(!this._compareType(a,h)){const E=this._removePrefix(a),b=this._removePrefix(h);E===z.BOOL&&[z.INT,z.FLOAT].includes(b)?this._errorHandle(Se(Ir.conditionWarning,{name:"switch"}),p,Vn.Warning):[z.INT,z.FLOAT].includes(E)&&b===z.BOOL?this._errorHandle(Se(Ir.conditionWarning,{name:"switch"}),n.condition.ctx,Vn.Warning):this._errorHandle(Se(xe.typeMismatch,{operator:"case",index:"expr1",typeE:h,typeR:`${a}`}),p)}}else{const E=this._removePrefix(h);[z.INT,z.FLOAT].includes(E)?this._errorHandle(Se(Ir.conditionWarning,{name:"switch"}),p,Vn.Warning):E!==z.BOOL&&this._errorHandle(Se(xe.conditionalErr,{name:"switch"}),p)}}}}_verifyWhile(n){const{condition:r}=n;if(r){const{type:a,ctx:c}=r;if(a===z.UNDETERMINED)return;const h=this._removePrefix(a);[z.INT,z.FLOAT].includes(h)?this._errorHandle(Se(Ir.conditionWarning,{name:"while"}),c,Vn.Warning):h!==z.BOOL&&this._errorHandle(Se(xe.conditionalErr,{name:"while"}),c)}}async _importHandle(n,r){const{stop:a,start:c}=r,{username:h,libraryName:p,libraryVersion:E,name:b}=n,T=`${h}/${p}/${E}`;if(this._importLibs.has(T))return this._errorHandle(xe.importMultipleErr,r),n;for(const[F,R]of this._importLibs)if(R.name&&R.name===b||!R.name&&!b&&R.libraryName===p)return this._errorHandle(Se(xe.importNameRepeatErr,{name:b,line:R.startLine}),r),n;let x=b||p;const w=await this._getImportLibraryFunc({...n,libraryId:T,ctx:void 0,startLine:c.line,endLine:a.line,startColumn:c.column,endColumn:a.column+a.text.length+1});if(w){const{codeStr:F,description:R}=w;this._importLibs.set(T,{...n,libraryId:T,startLine:c.line,endLine:a.line,ctx:void 0,desc:R}),this._importDataHandle(w,x),Nn.includes(x)&&(x=`$${x}`),n.code=F.replace("$name",x)}else this._errorHandle(Se(xe.importNotExitErr,{username:h,libraryName:p}),r)}_importDataHandle(n,r){const{functions:a,methods:c,types:h}=n;for(const p of a){const{name:E}=p,b=`${r}.${E}`,T=this._functions.get(b)||[];T.push({...this._importTypeUpdate(p,h,r),name:b,isUser:void 0,isImport:!0}),this._functions.set(b,T)}for(const p of c){const E=this._importTypeUpdate(p,h,r),b=E.originalName||E.name,T=this._methods.get(b)||[];T.push({...E,isImport:!0,isUser:void 0}),this._methods.set(b,T)}for(const p of h){const E=`${r}.${p.name}`,b=this._types.get(E)||[];b.push({...this._importTypeUpdate(p,h,r),name:E,isImport:!0}),this._types.set(E,b)}}_importTypeUpdate(n,r,a){var F;let{args:c,returnedTypes:h,thisType:p,fields:E,name:b,originalName:T}=n,x="";if(c&&c.length&&(c=c.map(R=>{const{allowedTypeIDs:v,displayType:d,name:g}=R,A=d&&this._replaceTypeName(d,r,a);return x=x?`${x}, ${A} ${g}`:`${A} ${g}`,{...R,allowedTypeIDs:v==null?void 0:v.map(O=>this._replaceTypeName(O,r,a)),displayType:A}})),h!=null&&h.length&&(h=[this._replaceTypeName(h[0],r,a)]),p!=null&&p.length){const R=this._replaceTypeName(p[0],r,a);R!==p[0]&&(T=`${a}.${T||b}`),p=[R]}E!=null&&E.length&&(E=E.map(R=>{const{type:v}=R;return{...R,type:v&&this._replaceTypeName(v,r,a)}}));const w={...n,args:c,returnedTypes:h,thisType:p,fields:E,originalName:T};return(F=w.syntax)!=null&&F.length&&(w.syntax=[`${T||`${a}.${b}`}(${x}) → ${(h==null?void 0:h[0])||"void"}`]),w}_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:p,type:E}=a,b=this._removePrefix(E);if(h!==ye.Literal&&!p)delete n.defaultValue,this._errorHandle(xe.argDefaultErr,r);else if(c&&c!==z.UNDETERMINED&&E!==z.UNDETERMINED){const T=this._removePrefix(c);if(T===z.FLOAT&&b===z.INT)return;b!==T&&this._errorHandle(Se(xe.defaultValueTypeErr,{typeE:E,typeR:c}),r)}else c||(n.type=this._typeAddSeries(b===z.INT?z.FLOAT:b))}_exportArgsTypeVerify(n){for(const r of n)(r.type===z.UNDETERMINED||!r.type)&&this._errorHandle(xe.exportFuncArgErr,r.ctx)}_verifyTypeName(n,r){mu.includes(n)?this._errorHandle(Se(xe.typeNameErr,{name:n}),r):Tp.includes(n)&&this._errorHandle(Se(xe.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){mu.includes(n)?this._errorHandle(Se(xe.enumVarNameErr,{name:n}),r):Tp.includes(n)&&this._errorHandle(Se(xe.enumVarNameBuiltinErr,{name:n}),r)}_nameHandle(n,r,a,c){var p,E;const h={ruleType:ye.Name,hasMethod:n,exprs:r,expr:a};if(n){let b="";const T=[];for(const w of r)typeof w=="string"?b=b?`${b}.${w}`:w:(b&&(w.name=`${b}.${w.name}`),T.push(w),b="");h.exprs=[...T,b];const x=this._getMethodTypes(T,Array.from(T,()=>c));if(x&&x.length){const w=Se(xe.noFiledErr,{name:b});x.length>1&&this._errorHandle(w,c),h.type=((E=this._nameCheck(this._getOriginMethodName(x[0],b),c,w))==null?void 0:E.type)||z.UNDETERMINED}}else{let b=r.join(".");if(a&&a.type&&a.type===z.UNDETERMINED)h.type=z.UNDETERMINED,b=`expr0.${b}`;else{a&&a.type&&(b=`${this._getMethodTypeName(a.type)}.${b}`);const T=this._nameCheck(b,c)||{};(p=T.title)!=null&&p.startsWith("built-in")&&(h.isBuiltIn=!0,h.isConst=T.isConst,!this._strategyVarName&&b.startsWith(Ui.strategy)&&(this._strategyVarName={ctx:c,name:b})),h.enumName=T.enumName,h.varPos=T.pos,h.varScope=T.scope,h.declare=T.declare,h.type=(T==null?void 0:T.type)||z.UNDETERMINED,T!=null&&T.isArg&&(h.arg=T),h.scope=this._blockCount,T.isEnum?this._errorHandle(Se(xe.enumUseErr,{name:b}),c):this._isInFunc&&this._currentExportFunc&&(h.type.startsWith(z.INPUT)?this._errorHandle(Se(xe.exportFuncHasInputErr,{name:b,func:this._currentExportFunc}),c):T.scope===0&&this._errorHandle(Se(xe.exportFuncUseGlobalVarErr,{func:this._currentExportFunc}),c))}h.name=b}return h}_typeElementVerify(n,r,a){var E,b;const{type:c,value:h}=n;if(!h){c||this._errorHandle(xe.typeFieldErr,a);return}if(![ye.Literal,ye.UnaryExpression].includes(h.ruleType)&&!h.isBuiltIn){this._errorHandle(xe.defaultValueErr,r);return}else if(h.ruleType===ye.UnaryExpression){const{exprs:T}=h;if(![ye.Literal,ye.UnaryExpression].includes((E=T[0])==null?void 0:E.ruleType)&&!((b=T[0])!=null&&b.isBuiltIn)){this._errorHandle(xe.defaultValueErr,r);return}}if(!c){const T=h.type,x=this._getPrefix(T);n.type=x?this._typeAddSeries(this._removePrefix(T)):T;return}(!this._compareType(c,h.type)||c.endsWith(z.INT)&&h.type.endsWith(z.FLOAT))&&this._errorHandle(Se(xe.defaultValueTypeErr,{typeE:h.type,typeR:c}),r)}_memberIndexVerify(n,r){if(n.ruleType===ye.Name&&!n.hasMethod&&this._blockCount){const c=this._currentBlockVars[this._blockCount],h=c&&c.get(n.name);h&&(h.isForVar?this._errorHandle(Se(xe.notHistoryErr,{name:n.name}),r):!(this._blockCount===1&&this._isInFunc)&&this._errorHandle(Se(Ir.localScopeGetHistory,{name:n.name}),r,Vn.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!==z.UNDETERMINED&&this._errorHandle(Se(xe.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 p of h.fields){const E=`${c.name}.${p.name}`;this._currentFuncParams.set(E,{...p,originName:E,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:p,fieldsDesc:E}=n,b={members:c.map(T=>({name:T.name,value:T.value,enumName:h,isEnumMember:!0,desc:E==null?void 0:E[T.name],type:`${z.CONST} ${h}`})),name:h,desc:p,pos:r};if(this._enums.has(h)){this._errorHandle(Se(xe.typeRepeatErr,{name:h,keyword:Zt.enum}),a);return}else if(this._types.has(h)){this._errorHandle(Se(xe.typeRepeatErr,{name:h,keyword:Zt.type}),a);return}n.isExport&&this._exportEnums.push(b),this._enums.set(h,[{...b}]),this._addEnumToMap(h,h,r)}_setUserType(n,r,a){const{fields:c,name:h,desc:p,fieldsDesc:E}=n,b={fields:c.map(T=>({name:T.name,desc:E==null?void 0:E[T.name],type:T.type})),name:h,desc:p,pos:r};if(this._enums.has(h)){this._errorHandle(Se(xe.typeRepeatErr,{name:h,keyword:Zt.enum}),a);return}else if(this._types.has(h)){this._errorHandle(Se(xe.typeRepeatErr,{name:h,keyword:Zt.type}),a);return}n.isExport&&this._exportTypes.push(b),this._types.set(h,[{...b}]),this._addVarToMap(h,h,r,!1,!1)}_againAssignHandle(n,r,a){const c=a!==":="?a.replace("=",""):a,h=a!==":="?[z.UNDETERMINED,z.INT,z.FLOAT]:[];c==="+"&&h.push(z.STRING);const[p,E]=n;p.arg&&!p.name.includes(".")&&this._errorHandle(Se(xe.funcArgAssignErr,{name:p.name}),r[0]);const b=this._sameTypeJudge(n,r,c,h);let T=this._typeHandle(b);return this._updateUserVar(p.name,T,E.type),p.type=T,{ruleType:ye.AgainAssign,name:p,operator:a,type:T,value:E}}_typeCheck(n,r,a){const c=[z.SERIES,z.SIMPLE,z.CONST];switch(r){case j.RULE_typeName:const h=this._buildinTypes.get(n);h&&![...c,z.ARRAY,z.MATRIX,z.MAP].includes(h[0].name)||this._types.get(n)||this._errorHandle(Se(xe.notTypeKeyword,{text:n}),a);break;case j.RULE_typeArray:[z.ARRAY,z.MATRIX].includes(n)||this._errorHandle(xe.tempateTypeErr,a);break;case j.RULE_typeSeries:c.includes(n)||this._errorHandle(Se(xe.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(),p=c.join(".");return(((a=(r=this._buildinTypes.get(p))==null?void 0:r[0])==null?void 0:a.fields)||[]).find(b=>b.name===h)}}_verifyName(n,r){var c,h;const a=this._getBuildVar(n);if(a)return a;if(n.includes(".")){const p=n.split("."),E=p.pop(),b=p.join(".");let T=this._blockCount;for(;T>=0;){if(!this._currentBlockVars[T]){T--;continue}const w=this._currentBlockVars[T].get(b);if(r&&this._judgeGatherValue(E||"",r,w==null?void 0:w.valueType,!0),(w==null?void 0:w.type)==="chart.point"){const R=(((h=(c=this._buildinTypes.get(w.type))==null?void 0:c[0])==null?void 0:h.fields)||[]).find(v=>v.name===E);if(R)return Object.assign(R,{pos:w.pos})}T--}const x=this._specialTreatmentChartPoint(n);if(x)return x}return this._getUserVar(n)}_judgeGatherValue(n,r,a,c){return a!==`${z.SIMPLE} ${z.NA}`?!0:(c&&this._errorHandle(Se(xe.objectIsNaErr,{name:n,type:"field"}),r),!1)}_nameCheck(n,r,a=Se(xe.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=Vn.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,z.BOOL,[z.UNDETERMINED,z.INT,z.FLOAT,z.BOOL],c)}_calcTypeJudge(n,r,a,c=0){return this._typeJudge(n,r,a,"int/float",[z.UNDETERMINED,z.INT,z.FLOAT],c)}_typeJudge(n,r,a,c,h,p=0){const E=n&&n.type;if(E){const b=this._removePrefix(E);if(!h.includes(b)&&b!==z.NA)return this._errorHandle(Se(xe.typeMismatch,{operator:`operator ${a}`,index:`expr${p}`,typeE:b,typeR:c}),r),z.UNDETERMINED;c===z.BOOL&&[z.INT,z.FLOAT].includes(b)&&this._errorHandle(Se(Ir.typeMismatch,{operator:`operator ${a}`,index:`expr${p}`,type:z.BOOL}),r,Vn.Warning)}return E||z.UNDETERMINED}_sameTypeJudge(n,r,a,c){let h="";const p=[],E=["plot_display","plot_simple_display"];["+","-","+=","-="].includes(a)&&(c=c.concat(E));for(const[b,T]of n.entries()){let x=T&&T.type||z.UNDETERMINED;const w=this._removePrefix(x);if(h||(h=w),!c.includes(w)&&c.length&&w!==z.NA){this._errorHandle(Se(xe.typeMismatch,{operator:`operator ${a}`,index:`expr${b}`,typeE:x,typeR:c.slice(1).join("/")}),r[b]),h=z.UNDETERMINED,p.push(h);continue}if(h===z.UNDETERMINED||w===z.UNDETERMINED)x=h=z.UNDETERMINED;else if(h!==w&&h!==z.NA&&w!==z.NA&&(![z.INT,z.FLOAT].includes(h)||![z.INT,z.FLOAT].includes(w)))if(a===":=")this._errorHandle(Se(xe.assignTypeMismatch,{typeE:w,name:n[0].name,typeR:h}),r[0]),x=h=z.UNDETERMINED;else if(["==","!=","?:"].includes(a)&&[z.INT,z.FLOAT,z.BOOL].includes(h)&&[z.INT,z.FLOAT,z.BOOL].includes(w))this._errorHandle(Se(Ir.typeMismatch,{operator:`operator ${a}`,index:`expr${b}`,type:h}),r[b],Vn.Warning),x=h=z.UNDETERMINED;else if(E.includes(h)&&E.includes(w)){if(h!==w){const F=this._getPrefix(x);p[b-1]=`${this._getPrefix(p[b-1])} ${E[0]}`,x=h=`${F} ${E[0]}`}}else this._errorHandle(Se(xe.typeMismatch,{operator:`operator ${a}`,index:`expr${b}`,typeE:w,typeR:h}),r[b]),x=h=z.UNDETERMINED;p.push(x)}return p}_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,p)=>{let E=h?`${h}.${p}`:p;const b=this._getUserVar(E,!0);return b!=null&&b.type?b.type===z.UNDETERMINED?a=!0:(E=b.type,c=b):c=null,E},""),a)return{name:n,type:z.UNDETERMINED};if(c)return c}return null}_repeatVarJudge(n,r){this._getBuildVar(n)&&this._errorHandle(Se(xe.buidinVarErr,{name:n}),r);for(let c=0;c<=this._blockCount;c++){const h=this._currentBlockVars[c];if(h&&h.get(n)){if(this._blockCount===c)return this._errorHandle(Se(xe.repeatVar,{name:n}),r),!0;this._errorHandle(Se(Ir.repeatVar,{name:n}),r,Vn.Warning)}}}_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 p=h.get(n);if(p){p.type=r,p.valueType=a;return}}}}_variablesHandle(n,r){var h,p,E,b;if(!(n&&n.nameList))return;const a=n.nameList;if(a.name==="_")return;const c=n.value;if(a.ruleType===ye.VarMultiple){a.types=[],this._checkVarMultiple(a.names,c,r);for(const[T,x]of a.names.entries()){const w=this._varTypeJudge("",((h=c==null?void 0:c.types)==null?void 0:h[T])||z.UNDETERMINED,r);a.types.push(w),this._addVarToMap(x,w,a.posList[T],!0)}}else{const T=(c==null?void 0:c.type)||((p=c==null?void 0:c.returnedTypes)==null?void 0:p[0]);((E=c==null?void 0:c.types)!=null&&E.isBrackethesized||(b=c==null?void 0:c.returnedTypes)!=null&&b.isBrackethesized)&&this._errorHandle(Se(xe.tupleLeftVarErr,{name:a.name}),r),!a.type&&T===`${z.SIMPLE} ${z.NA}`&&this._errorHandle(xe.naVarErr,r),a.prefix&&Vi.indexOf(a.prefix)>Vi.indexOf(this._getPrefix(T))&&this._errorHandle(Se(xe.declaredErr,{prefix:a.prefix,type:T}),r);const x=this._varTypeJudge(a.type,T||z.UNDETERMINED,r);a.type=x,this._addVarToMap(a.name,x,a.pos,!0,a.isForVar,a.declare,c==null?void 0:c.type,a.desc)}}_checkVarMultiple(n,r,a){var b,T,x,w;const c=n.length,h=((r==null?void 0:r.types)||(r==null?void 0:r.returnedTypes)||[]).length,p=((b=r==null?void 0:r.types)==null?void 0:b.isBrackethesized)||((T=r==null?void 0:r.returnedTypes)==null?void 0:T.isBrackethesized);(x=r==null?void 0:r.types)!=null&&x.isUnknown||(w=r==null?void 0:r.returnedTypes)!=null&&w.isUnknown||(h===1&&!p||!h?this._errorHandle(xe.tupleRightVarErr,a):c!==h&&this._errorHandle(Se(xe.tupleVarErr,{indexA:h,indexB:c}),a))}_addEnumToMap(n,r,a){var E;const c=this._currentBlockVars[this._blockCount]||new Map,h=(E=this._enums.get(n))==null?void 0:E[0];if(h&&h.members)for(const b of h.members)c.set(`${n}.${b.name}`,b);const p={name:n,isEnum:!0,type:`${z.CONST} ${r}`,pos:a};c.set(n,p),this._currentBlockVars[this._blockCount]=c}_addVarToMap(n,r,a,c=!0,h=!1,p,E,b){var F;const T=this._currentBlockVars[this._blockCount]||new Map,x=(F=this._types.get(r))==null?void 0:F[0];if(x&&x.fields)for(const R of x.fields)T.set(`${n}.${R.name}`,R);const w={name:n,type:r,pos:a,valueType:E,desc:b};c&&this._setVariablesMap(w),T.set(n,Object.assign(w,{isForVar:h,declare:p})),this._currentBlockVars[this._blockCount]=T}_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){if(r===z.VOID)return this._errorHandle(xe.voidNotVar,a),z.UNDETERMINED;if(n&&r!==z.UNDETERMINED){const c=this._removePrefix(n),h=this._removePrefix(r);return h!==c&&h!==z.NA&&!(c===z.FLOAT&&h===z.INT)?(this._errorHandle(Se(xe.declareTypeErr,{type:n,valueType:r}),a),z.UNDETERMINED):this._typeHandle([n,r])}else if(r===z.UNDETERMINED)return z.UNDETERMINED;return n||r||z.UNDETERMINED}_getAllowTypes(n){const r=[];if(n===z.UNDETERMINED)return r;const a=this._getPrefix(n);if(a){const c=this._removePrefix(n);let h=-1;for(const[p,E]of Vi.entries())E===a&&(h=p),h>=0&&h<=p&&(c===z.FLOAT&&r.push(`${E} ${z.INT}`),r.push(`${E} ${c}`))}else n=this._arrayTypeConvert(n)||"",r.push(n),n.includes(z.FLOAT)&&r.push(n.replace(/float/,z.INT));return r}_setNewFunc(n,r){const a=`${n.name}.new`,c=[],h=[];for(const E of n.fields)c.push({name:E.name,required:!1,allowedTypeIDs:this._getAllowTypes(E.type),displayType:E.type}),h.push(`${E.type} ${E.name}`);const p={name:a,args:c,returnedTypes:[n.name],pos:r,syntax:[`${a}(${h.join(", ")}) → ${n.name}`]};n.isExport&&this._exportFunctions.push(p),this._functions.set(a,[{...p,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=[],p=[],{desc:E,paramsDesc:b,returnsDesc:T,params:x,hasMemberIndex:w}=n;for(const A of x){const{type:O,name:D,defaultValue:P}=A;h.push({name:D,desc:b==null?void 0:b[D],required:!P,allowedTypeIDs:this._getAllowTypes(O),displayType:O}),p.push(`${O===z.UNDETERMINED?"":`${O} `}${D}`)}const{returnedTypes:F=[]}=n,R=n.name,v=F.length>1?`[${F.join(", ")}]`:F.toString(),d={name:R,desc:E,args:h,syntax:[`${R}(${p.join(", ")}) → ${v||"void"}`],hasMemberIndex:w,pos:r,isUser:!0,returnedTypes:F,returns:T,hasRequest:this._hasRequest};let g=this._functions.get(R);if(g){const A=g.length;d.index=A,n.index=A,this._verifyFuncRepeat(g,d,a),g.push(d),this._overloadsFuncs.push({name:R,index:A,line:r.lineNumber,startColumn:r.column+1,endColumn:r.column+R.length})}else g=[d];if(n.isExport){const{line:A=0}=this._endExport;c>A&&(this._endExport={line:c,name:R,index:d.index}),this._exportFunctions.push(d)}this._functions.set(R,g)}_setMethod(n,r){var O;const{name:a,returnedTypes:c,params:h,desc:p,paramsDesc:E,returnsDesc:b}=n,T=h[0].type,x=[],w=[];for(const D of h.slice(1)){const{type:P,name:U,defaultValue:H}=D;x.push({name:U,desc:E==null?void 0:E[U],required:!H,allowedTypeIDs:this._getAllowTypes(P),displayType:P}),w.push(`${P} ${U}`)}const F=c.length>1?`[${c.join(", ")}]`:c.toString(),R=this._getMethodTypeName(T),v=`${R}.${a}`;n.typeName=R;const d={name:a,args:x,desc:p,originalName:v,syntax:[`${a}(${w.join(", ")}) → ${F||"void"}`],returnedTypes:c,hasMemberIndex:n.hasMemberIndex,pos:r,thisType:[T],returns:b,hasRequest:this._hasRequest};let g=this._methods.get(v),A=this._functions.get(a);if(A){const D=A.filter(H=>!H.isImport).length,P=((O=g==null?void 0:g.filter(H=>!H.isImport))==null?void 0:O.length)||0;let U=D;D>P&&(U=D-1),d.index=U,n.index=U}g?g.push(d):g=[d],n.isExport&&this._exportMethods.push(d),this._methods.set(v,g)}_verifyFuncRepeat(n,r,a){const{args:c}=r;n.some(p=>{const{args:E}=p;return(E==null?void 0:E.length)!=(c==null?void 0:c.length)?!1:!(E!=null&&E.length)&&!(c!=null&&c.length)?!0:E==null?void 0:E.every((b,T)=>{var x;return b.displayType===((x=c==null?void 0:c[T])==null?void 0:x.displayType)})})&&this._errorHandle(Se(xe.funcRepeatErr,{name:r.name}),a)}_getMethodTypes(n,r){let a;for(const[c,h]of n.entries()){const{type:p,expr:E,args:b}=h;let{name:T}=h;const x=r[c];if(E){if(E.type===z.UNDETERMINED)return[z.UNDETERMINED];T=`${this._getMethodTypeName(E.type)}${T}`,b.params.unshift(E)}if(a&&a.length>=1)if(a.length===1){const w=a[0];if(w===z.UNDETERMINED)return[z.UNDETERMINED];const F=this._getOriginMethodName(w,T);T.includes(".")?a=this._getOtherNamesMethodType(F,a,x,b,h):a=this._expandMethodHandle(F,x,b,{type:w},w,h)}else this._errorHandle(Se(xe.noFiledErr,{name:T}),x);else{const[w,F]=this._tempFuncNameHandle(T,x,p);T=F;const R=this._buildinFunctions.get(w);if(R)this._globalFuncVerify(R[0],x),this._hasMemberIndexVerify(R[0],x,h),h.isBuiltIn=!0,a=this._getBuildInReturnTypes(R,b,T,x,void 0,p);else{const v=this._functions.get(T);if(v)if(v.length<=1){this._hasMemberIndexVerify(v[0],x,h),a=v[0].returnedTypes;const{hasErr:d}=this._checkArgs(b,v[0].args||[],T,x,a[0]);if(d)return[z.UNDETERMINED]}else{const d=this._overloadsFuncGetTypes(v,b,x,void 0,h);a=this._returnedTypesParse([d])}else a=this._getOtherNamesMethodType(T,a,x,b,h)}}h.returnTypes=a}return a===void 0&&this._errorHandle(Se(xe.notFindFuncErr,{name:n[0].name}),r[0]),a}_globalFuncVerify(n,r){this._blockCount!==0&&uy.includes(n.name)&&this._errorHandle(Se(xe.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(xe.requestUserInLoopErr,r)}_tempFuncNameHandle(n,r,a){let c=n;if(a&&a.length>=1){const h=["array.new","matrix.new"].includes(n),p=n==="map.new";if(a.length===1)if(h)c=`${n}<type>`,n=`${n}<${a[0]}>`;else return p?this._errorHandle(Se(xe.templateErr,{countA:2,countB:1}),r):this._errorHandle(Se(xe.templateNoSupportErr,{name:n}),r),[z.UNDETERMINED];else{if(!p)return h?this._errorHandle(Se(xe.templateErr,{countA:1,countB:2}),r):this._errorHandle(Se(xe.templateNoSupportErr,{name:n}),r),[z.UNDETERMINED];if(!mu.includes(a[0]))return this._errorHandle(Se(xe.mapKeyErr,{type:this._typeAddSeries(a[0])}),r),[z.UNDETERMINED];c=`${n}<type,type>`,n=`${n}<${a[0]},${a[1]}>`}}return[c,n]}_getOtherNamesMethodType(n,r,a,c,h){const p=n.split("."),E=p.length-1,b=p.slice(0,E).join("."),T=this._getUserVar(b);this._judgeGatherValue(p[E],a,T==null?void 0:T.valueType)||(h.name=`${b}?.${p[E]}`);const w=T==null?void 0:T.type;if(w){if(w===z.UNDETERMINED)return r=[z.UNDETERMINED],r.isUnknown=!0,r;const F=this._getOriginMethodName(w,p[E]);h.varScope=T.scope,r=this._expandMethodHandle(F,a,c,T,b,h)}else{let F="",R="",v="";for(const d of p.slice(0,E)){F?R=this._getOriginMethodName(F,d):R=R?`${R}.${d}`:d;const g=this._verifyName(R);g!=null&&g.type?(F=g.type,v=""):this._buildinTypes.get(R)?v=Se(xe.methodNotExistErr,{name:R,methodName:p[E]}):v=Se(xe.noFiledErr,{name:d})}v&&this._errorHandle(v,a)}return r}_expandMethodHandle(n,r,a,c,h,p){var T,x;let E;const b=this._buildinMethods.get(n);if(b)p.name=p.name.split(".").join("?."),E=this._getBuildInReturnTypes(b,a,n,r,c);else{const w=this._methods.get(n);if(w&&w.length)if(w.length<=1){const F=w[0],R=this._getMethodTypeName(((T=F.thisType)==null?void 0:T[0])||"");if(this._types.get(R))p.name=p.name.split(".").join("?.");else{const g=this._functions.get(F.name);g&&(p.selfArg=(x=g[F.index||0].args)==null?void 0:x[0])}p.funcName=F.name,p.index=F.index,this._hasMemberIndexVerify(F,r,p),E=F.returnedTypes;const{hasErr:d}=this._checkArgs(a,F.args||[],n,r,(E==null?void 0:E[0])||"");if(d)return[z.UNDETERMINED]}else{const F=this._overloadsFuncGetTypes(w,a,r,c,p);E=this._returnedTypesParse([F])}else this._errorHandle(Se(xe.methodNotExistErr,{methodName:n.split(".").slice(-1)[0],name:h}),r)}return E}_getBuildInReturnTypes(n,r,a,c,h,p){var b;let E;if(n.length===1){const{returnedTypes:T,syntax:x,args:w=[],thisType:F}=n[0],R=x[0].split("→")[1].trim(),v=h||r.params[0]||((b=w[0])==null?void 0:b.name)&&r[w[0].name];v&&!this._checkMethodThisType(F,v.type)&&this._errorHandle(Se(xe.typeMismatch,{operator:a,index:v.name||"id",typeE:v.type,typeR:F[0]}),c);const{hasErr:d,types:g}=this._checkArgs(r,w,a,c,R,v);if(d)return[z.UNDETERMINED];if(E=g.length&&g||this._returnedTypesParse(T),E.length>1)return E;(p==null?void 0:p.length)===1?E=[this._typeReplace(R,p[0])]:(p==null?void 0:p.length)===2&&(E=[`${z.MAP}<${p[0]},${p[1]}>`]),E=this._returnTypesOtherHandle(v,R,E,a)}else{const T=this._overloadsFuncGetTypes(n,r,c,h);E=this._returnedTypesParse([T])}return E}_overloadsFuncGetTypes(n,r,a,c,h){var R,v,d;let p="",E=[],b=[],T=0,x=0;for(const[g,A]of n.entries()){const{args:O,returnedTypes:D,name:P,thisType:U}=A,H=c||r.params[0]||r[O[0].name],{errMsg:B,warnMsg:G,matchCount:N}=this._overloadsCheckArgs(r,O,P,a,H);N>x&&(T=g,x=N),H&&!this._checkMethodThisType(U,H.type)&&B.unshift({msg:Se(xe.typeMismatch,{operator:P,index:H.name||"id",typeE:H.type,typeR:U[0]}),ctx:a}),g===0?(E=B,b=G,!B.length&&(p=D[0])):B.length?((R=E[0])!=null&&R.isLenErr&&!((v=B[0])!=null&&v.isLenErr)||E.length>B.length)&&(E=B,b=G,T=g):this._priorityComparison(p,D[0])||(D[0]===`${z.ARRAY}<>`?p=`${H.type}[]`:p=D[0],E=B,b=G,T=g)}for(const g of E)this._errorHandle(g.msg,g.ctx);for(const g of b)this._errorHandle(g.msg,g.ctx,Vn.Warning);const w=a.children[0],F=n[0].name;if(w&&this._overloadsFuncs.push({name:F,index:T,line:w.start.line,startColumn:w.start.column+1,endColumn:w.start.column+F.length}),h){const g=n[T],{thisType:A,name:O,index:D}=g;if(this._hasMemberIndexVerify(g,a,h),h.index=D||T,A){const P=this._getMethodTypeName((A==null?void 0:A[0])||"");if(this._types.get(P))h.name=h.name.split(".").join("?.");else{const H=this._functions.get(O);H&&(h.selfArg=(d=H[0].args)==null?void 0:d[0])}}}return this._funcArgsAddOriginName(r,n[T].args,F),p||z.UNDETERMINED}_funcArgsAddOriginName(n,r,a){const c=n.params||[];for(const[h,p]of r.entries())h<c.length&&(c[h].originName=p.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 p={...n},E=p.params;delete p.params;const b=Object.keys(p).length+E.length,T=r.length,x=[],w=[];let F=0;b>T&&(r.some(v=>["arg0, arg1, ...","number0, number1, ..."].includes(v.name))||x.push({msg:Se(xe.argsLenErr,{name:a,lenA:b,lenB:T}),isLenErr:!0,ctx:c}));for(const[R,v]of r.entries()){let d=p[v.name];if(R<E.length&&(d&&w.push({msg:Se(Ir.moreSameArg,{arg:v.name}),ctx:c}),d=E[R]),!d)v.required&&x.push({msg:Se(xe.requiredParamErr,{name:a,argName:v.name}),ctx:c});else{const g=d.type!==`${z.SIMPLE} na`?this._checkArg(d,v,a,h,d.ctx,!0):"";g?x.push({msg:g,ctx:d.ctx}):g!==!1&&F++,delete p[v.name]}if(["arg0, arg1, ...","number0, number1, ..."].includes(v.name)&&E.length>R+1){const g=E.slice(R+1);let A=E[R];for(const O of g){A.type===`${z.SIMPLE} ${z.NA}`&&(A=O);const D=O.type!==`${z.SIMPLE} ${z.NA}`?this._checkArg(O,v,a,A,O.ctx,!0):"";D&&x.push({msg:D,ctx:O.ctx})}}}if(Object.keys(p).length)for(const R of Object.keys(p))x.push({msg:Se(xe.argsNameErr,{name:a,argName:R}),ctx:p[R].ctx});return{errMsg:x,warnMsg:w,matchCount:F}}_checkArgs(n,r,a,c,h,p){var R;const E={...n},b=E.params;delete E.params;const T=Object.keys(E).length+b.length,x=r.length;let w=!1,F=[];if(T>x&&!r.some(d=>["arg0, arg1, ...","number0, number1, ..."].includes(d.name)))return this._errorHandle(Se(xe.argsLenErr,{name:a,lenA:T,lenB:x}),c),w=!0,{hasErr:w,types:F};for(const[v,d]of r.entries()){let g=E[d.name];if(v<b.length&&(g&&this._errorHandle(Se(Ir.moreSameArg,{arg:d.name}),c,Vn.Warning),g=b[v],g.originName=d.name),!g)d.required&&(this._errorHandle(Se(xe.requiredParamErr,{name:a,argName:d.name}),c),w=!0);else{const A=g.type!==`${z.SIMPLE} ${z.NA}`?this._checkArg(g,d,a,p,g.ctx):"";if(A)this._errorHandle(A,g.ctx),w=!0;else if(A===!1)w=!0;else if(a.startsWith("request.")&&d.name==="expression")if(g.ruleType===ye.Brackethesized)F=g.exprs.map(O=>this._typeReplace(h,O.type));else if((R=g.types||g.returnedTypes)!=null&&R.isBrackethesized)F=(g.types||g.returnedTypes).map(O=>this._typeReplace(h,O));else{const O=this._typeReplace(h,g.type);F.push(O)}else if(a==="input.enum"&&d.name==="defval"){const O=this._removePrefix(g.type);F.push(`${z.INPUT} ${O}`)}delete E[d.name]}}if(Object.keys(E).length)for(const v of Object.keys(E))this._errorHandle(Se(xe.argsNameErr,{name:a,argName:v}),E[v].ctx),w=!0;return{hasErr:w,types:F}}_checkArg(n,r,a,c,h,p){var v,d;const{ruleType:E,exprs:b,name:T}=n;let x=n.type;E===ye.Brackethesized&&(x=`[${b.map(g=>g.type).join(", ")}]`);const{allowedTypeIDs:w=[],displayType:F,name:R}=r;if(!(!x||x===z.UNDETERMINED||F===z.UNDETERMINED)){if(a==="input"&&R==="defval"&&!x.startsWith(z.CONST))if(Rl.includes(T))n.isSourceType=!0;else return xe.inputDefvalErr;if(!(this._checkMethodThisType(w,this._arrayTypeConvert(x))&&!(["input.source","input.enum"].includes(a)&&R==="defval"))){if(R==="condition"&&(F!=null&&F.endsWith(z.BOOL))){if(x.endsWith(z.INT)||x.endsWith(z.FLOAT)){h&&this._errorHandle(Se(Ir.typeMismatch,{index:R,operator:a,type:z.BOOL}),h,Vn.Warning);return}}else if(a==="str.tostring"&&R==="value"){const g=this._removePrefix(x);if(this._enums.get(g))return}switch(F){case"tuple of const string values: [val1, val2, ...]":return this._tupleToCheck(n,r,[`${z.CONST} ${z.STRING}`],a,x);case"tuple of const int/float values: [val1, val2, ...]":return this._tupleToCheck(n,r,[`${z.CONST} ${z.FLOAT}`,`${z.CONST} ${z.INT}`],a,x);case"tuple of const int values: [val1, val2, ...]":return this._tupleToCheck(n,r,[`${z.CONST} ${z.INT}`],a,x);case"open/high/low/close/hl2/hlc3/ohlc4/hlcc4":if(!T||!Rl.includes(T))return Se(xe.inputSourceErr,{name:R,funcName:a});if(this._judgeVarBuildIn(T))return Se(xe.buildInUseErr,{name:T});n.isSourceType=!0;break;case"<matrix_type>":case"<array_type>":const g=this._getArrayType(a)||"";if(!x.endsWith(g)&&!(x.endsWith(z.INT)&&g===z.FLOAT))return Se(xe.typeMismatch,{operator:a,index:R,typeE:x,typeR:this._typeAddSeries(g)});break;case"any matrix type":if(this._isMatrixType(x)){if(R==="id2"){const G=this._getArrayType(c==null?void 0:c.type);if(!G)return;const N=this._getArrayType(x)||"";if(G!==N)return Se(xe.typeMismatch,{operator:a,index:R,typeE:N,typeR:G})}}else return Se(xe.typeMismatch,{operator:a,index:R,typeE:x,typeR:"matrix<fun_arg>"});break;case"any array type":if(this._isArrayType(x)){if(R==="id2"){const G=this._getArrayType(c==null?void 0:c.type);if(!G)return;const N=this._getArrayType(x)||"";if(G!==N)return Se(xe.typeMismatch,{operator:a,index:R,typeE:N,typeR:G})}}else return Se(xe.typeMismatch,{operator:a,index:R,typeE:x,typeR:"array<fun_arg>"});break;case"series <type of the matrix's elements>":case"series <type of the array's elements>":const A=this._getArrayType(c==null?void 0:c.type)||"";if(!x.endsWith(A)&&!(x.endsWith(z.INT)&&A===z.FLOAT))return Se(xe.typeMismatch,{operator:a,index:R,typeE:x,typeR:this._typeAddSeries(A)});break;case"any map type":if(this._isMapType(x)){if(R==="id2"){const G=this._getMapType(c==null?void 0:c.type);if(!G)return;const N=this._getMapType(x)||[];if(G[0]!==N[0]||G[1]!==N[1])return Se(xe.mapKeyValErr,{typeA:this._typeAddSeries(N[0]),typeB:this._typeAddSeries(N[1]),typeC:this._typeAddSeries(G[0]),typeD:this._typeAddSeries(G[1]),name:a})}}else return Se(xe.typeMismatch,{operator:a,index:R,typeE:x,typeR:"map<type, type>"});break;case"series <type of the map's elements>":const O=this._getMapType(c==null?void 0:c.type);if(!O)return;const D=R==="key"?0:1;if(!x.endsWith(O[D])&&!(x.endsWith(z.INT)&&O[D]===z.FLOAT))return Se(xe.typeMismatch,{operator:a,index:R,typeE:x,typeR:this._typeAddSeries(O[D])});break;case"<arg_expr_type>":if(E===ye.Brackethesized)return Se(xe.typeMismatch,{operator:a,index:R,typeE:x,typeR:F||""});break;case"<arg_type>":case"variable, function, object, array or matrix of series int/float/bool/string/color, or a tuple of these":const P=this._removePrefix(x);if([z.BOX,z.LABEL,z.LINE,z.LINEFILL,z.POLYLINE,z.TABLE].includes(P))return h&&this._errorHandle(Se(xe.requestExprErr,{type:P,name:a}),h),!1;break;case"variable, object or function of series int/float/bool/string/color, or a tuple of these":if(E===ye.Brackethesized){for(const G of b)if(!w.includes(G.type))return this._errorHandle(Se(xe.requestArgsErr,{name:a,argName:R,type:G.type}),G.ctx),!1}break;case"const int/float/bool/string/color or source-type built-ins":if(Rl.includes(n.name)&&w[0].endsWith(this._removePrefix(x)))n.isSourceType=!0;else return Se(xe.typeMismatch,{operator:a,index:R,typeE:x,typeR:"const int/float/bool/string/color"});break;case"<arg..._type>":if(E===ye.Brackethesized||this._isArrayType(x)||this._isMapType(x)||this._isMatrixType(x))return Se(xe.typeMismatch,{operator:a,index:R,typeE:x,typeR:`${z.SERIES} ${z.INT}`});if(x!==(c==null?void 0:c.type))return Se(xe.typeMismatch,{operator:a,index:R,typeE:x,typeR:c==null?void 0:c.type});break;case"simple enum":const U=this._removePrefix(x);if(!this._enums.has(U))return Se(xe.typeMismatch,{operator:a,index:R,typeE:x,typeR:"const enum"});break;case"tuple of enum fields: [enumName.field1, enumName.field2, ...]":const H=c==null?void 0:c.enumName;if(H&&!((v=n.exprs)==null?void 0:v.every(N=>N.enumName===H)))return Se(xe.typeMismatch,{operator:a,index:R,typeE:`${n.exprs?`[${(d=n.exprs)==null?void 0:d.map(N=>N.type).join(", ")}]`:n.type}`,typeR:`[const ${H}...]`});break;default:const B=this._removePrefix(n.type);if(n.arg&&n.arg.isArg&&!p){const G=w.find(N=>N.endsWith(B));if(G){n.type=G,n.arg.type=G;return}}if(w.length===1&&this._removePrefix(w[0])===B){const G=this._getPrefix(n.type),N=this._getPrefix(w[0]);if(Vi.indexOf(G)>=Vi.indexOf(N))return}if(F)return Se(xe.typeMismatch,{operator:a,index:R,typeE:x,typeR:F})}}}}_tupleToCheck(n,r,a,c,h){var p,E;if(a.push(`${z.SIMPLE} ${z.NA}`),n.ruleType===ye.Brackethesized){const b=[];let T=!1;for(const x of n.exprs)b.push(x.type),a.includes(x.type)||(T=!0);if(T)return Se(xe.typeMismatch,{operator:c,index:r.name,typeE:`[${b.join(", ")}]`,typeR:((p=r.allowedTypeIDs)==null?void 0:p[0])||""})}else return Se(xe.typeMismatch,{operator:c,index:r.name,typeE:h,typeR:((E=r.allowedTypeIDs)==null?void 0:E[0])||""})}_getBlockReturnTypes(n){var w,F;let r=n;if(Array.isArray(n)&&(r=n.slice(-1)[0],Array.isArray(r)&&(r=r.slice(-1)[0])),!r)return[z.UNDETERMINED];const{ruleType:a,type:c,types:h,returnedTypes:p,exprs:E,nameList:b,typeList:T,block:x}=r;if(h&&h.length)return h;if(p&&p.length)return p;if(c)return[c];switch(a){case ye.Brackethesized:const R=E.map(H=>H.type);return R.isBrackethesized=!0,R;case ye.VarBlockStmt:case ye.DeclareAssign:return b?b.ruleType===ye.VarMultiple?b.types:[b.type]:[((w=r.name)==null?void 0:w.type)||z.UNDETERMINED];case ye.SwitchStatement:if(!this._isNeedCalc&&this._isInFunc&&this._isEndExpr===!1)return[z.UNDETERMINED];const v=[...r.cases];r.defaultCase&&v.push(r.defaultCase);let d=((F=v[0])==null?void 0:F.returnedTypes)||[],g=d.length<=1?d[0]:`[${d.join(", ")}]`,A=null;for(const H of v.slice(1)){const B=H.returnedTypes||[z.UNDETERMINED];g+=B.length<=1?`; ${B[0]}`:`; [${B.join(", ")}]`;const G=Array.isArray(H.block)?H.block.slice(-1)[0]:H.block;if(B.length!==d.length)A=G.ctx;else for(const[N,K]of d.entries())if(this._compareType(B[N],K))(B[N].includes(z.FLOAT)&&!K.includes(z.FLOAT)||d[N]===`${z.SIMPLE} ${z.NA}`||d[N]===z.UNDETERMINED)&&(d[N]=B[N]);else{A=G.ctx;break}}return A&&(this._errorHandle(Se(xe.ifOrSwitchTypeErr,{keyword:"switch",types:g}),A),d=d.map(()=>z.UNDETERMINED)),r.returnedTypes=d,d;case ye.IfStatement:if(!this._isNeedCalc&&!this._isInFunc)return[z.UNDETERMINED];if(!T.filter(H=>H&&H.length).length)return[z.UNDETERMINED];let O=T[0]||[],D=O.length<=1?O[0]:`[${O.join(", ")}]`,P=0,U=0;for(const H of T.slice(1))if(H)if(P++,D+=H.length<=1?`; ${H[0]}`:`; [${H.join(", ")}]`,H.length!==O.length)U=P;else for(const[B,G]of O.entries())if(this._compareType(H[B],G))(H[B].includes(z.FLOAT)&&!G.includes(z.FLOAT)||O[B]===`${z.SIMPLE} ${z.NA}`)&&(O[B]=H[B]);else{U=P;break}if(U){const H=x[U].slice(-1)[0],B=Array.isArray(H)?H.slice(-1)[0]:H;this._errorHandle(Se(xe.ifOrSwitchTypeErr,{keyword:"if",types:D}),B.ctx),O=O.map(()=>z.UNDETERMINED)}return r.returnedTypes=O,O}return[z.UNDETERMINED]}}var Cp={exports:{}};function my(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Fl={exports:{}},yy={},gy=Object.freeze({__proto__:null,default:yy}),vy=hy(gy),Dp;function Lt(){return Dp||(Dp=1,function(t,e){(function(n,r){t.exports=r()})(Tt,function(){var n=n||function(r,a){var c;if(typeof window<"u"&&window.crypto&&(c=window.crypto),typeof self<"u"&&self.crypto&&(c=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(c=globalThis.crypto),!c&&typeof window<"u"&&window.msCrypto&&(c=window.msCrypto),!c&&typeof Tt<"u"&&Tt.crypto&&(c=Tt.crypto),!c&&typeof my=="function")try{c=vy}catch{}var h=function(){if(c){if(typeof c.getRandomValues=="function")try{return c.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof c.randomBytes=="function")try{return c.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},p=Object.create||function(){function A(){}return function(O){var D;return A.prototype=O,D=new A,A.prototype=null,D}}(),E={},b=E.lib={},T=b.Base=function(){return{extend:function(A){var O=p(this);return A&&O.mixIn(A),(!O.hasOwnProperty("init")||this.init===O.init)&&(O.init=function(){O.$super.init.apply(this,arguments)}),O.init.prototype=O,O.$super=this,O},create:function(){var A=this.extend();return A.init.apply(A,arguments),A},init:function(){},mixIn:function(A){for(var O in A)A.hasOwnProperty(O)&&(this[O]=A[O]);A.hasOwnProperty("toString")&&(this.toString=A.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),x=b.WordArray=T.extend({init:function(A,O){A=this.words=A||[],O!=a?this.sigBytes=O:this.sigBytes=A.length*4},toString:function(A){return(A||F).stringify(this)},concat:function(A){var O=this.words,D=A.words,P=this.sigBytes,U=A.sigBytes;if(this.clamp(),P%4)for(var H=0;H<U;H++){var B=D[H>>>2]>>>24-H%4*8&255;O[P+H>>>2]|=B<<24-(P+H)%4*8}else for(var G=0;G<U;G+=4)O[P+G>>>2]=D[G>>>2];return this.sigBytes+=U,this},clamp:function(){var A=this.words,O=this.sigBytes;A[O>>>2]&=4294967295<<32-O%4*8,A.length=r.ceil(O/4)},clone:function(){var A=T.clone.call(this);return A.words=this.words.slice(0),A},random:function(A){for(var O=[],D=0;D<A;D+=4)O.push(h());return new x.init(O,A)}}),w=E.enc={},F=w.Hex={stringify:function(A){for(var O=A.words,D=A.sigBytes,P=[],U=0;U<D;U++){var H=O[U>>>2]>>>24-U%4*8&255;P.push((H>>>4).toString(16)),P.push((H&15).toString(16))}return P.join("")},parse:function(A){for(var O=A.length,D=[],P=0;P<O;P+=2)D[P>>>3]|=parseInt(A.substr(P,2),16)<<24-P%8*4;return new x.init(D,O/2)}},R=w.Latin1={stringify:function(A){for(var O=A.words,D=A.sigBytes,P=[],U=0;U<D;U++){var H=O[U>>>2]>>>24-U%4*8&255;P.push(String.fromCharCode(H))}return P.join("")},parse:function(A){for(var O=A.length,D=[],P=0;P<O;P++)D[P>>>2]|=(A.charCodeAt(P)&255)<<24-P%4*8;return new x.init(D,O)}},v=w.Utf8={stringify:function(A){try{return decodeURIComponent(escape(R.stringify(A)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(A){return R.parse(unescape(encodeURIComponent(A)))}},d=b.BufferedBlockAlgorithm=T.extend({reset:function(){this._data=new x.init,this._nDataBytes=0},_append:function(A){typeof A=="string"&&(A=v.parse(A)),this._data.concat(A),this._nDataBytes+=A.sigBytes},_process:function(A){var O,D=this._data,P=D.words,U=D.sigBytes,H=this.blockSize,B=H*4,G=U/B;A?G=r.ceil(G):G=r.max((G|0)-this._minBufferSize,0);var N=G*H,K=r.min(N*4,U);if(N){for(var Y=0;Y<N;Y+=H)this._doProcessBlock(P,Y);O=P.splice(0,N),D.sigBytes-=K}return new x.init(O,K)},clone:function(){var A=T.clone.call(this);return A._data=this._data.clone(),A},_minBufferSize:0});b.Hasher=d.extend({cfg:T.extend(),init:function(A){this.cfg=this.cfg.extend(A),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(A){return this._append(A),this._process(),this},finalize:function(A){A&&this._append(A);var O=this._doFinalize();return O},blockSize:16,_createHelper:function(A){return function(O,D){return new A.init(D).finalize(O)}},_createHmacHelper:function(A){return function(O,D){return new g.HMAC.init(A,D).finalize(O)}}});var g=E.algo={};return E}(Math);return n})}(Fl)),Fl.exports}var Nl={exports:{}},kp;function yu(){return kp||(kp=1,function(t,e){(function(n,r){t.exports=r(Lt())})(Tt,function(n){return function(r){var a=n,c=a.lib,h=c.Base,p=c.WordArray,E=a.x64={};E.Word=h.extend({init:function(b,T){this.high=b,this.low=T}}),E.WordArray=h.extend({init:function(b,T){b=this.words=b||[],T!=r?this.sigBytes=T:this.sigBytes=b.length*8},toX32:function(){for(var b=this.words,T=b.length,x=[],w=0;w<T;w++){var F=b[w];x.push(F.high),x.push(F.low)}return p.create(x,this.sigBytes)},clone:function(){for(var b=h.clone.call(this),T=b.words=this.words.slice(0),x=T.length,w=0;w<x;w++)T[w]=T[w].clone();return b}})}(),n})}(Nl)),Nl.exports}var Il={exports:{}},Op;function by(){return Op||(Op=1,function(t,e){(function(n,r){t.exports=r(Lt())})(Tt,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,a=r.lib,c=a.WordArray,h=c.init,p=c.init=function(E){if(E instanceof ArrayBuffer&&(E=new Uint8Array(E)),(E instanceof Int8Array||typeof Uint8ClampedArray<"u"&&E instanceof Uint8ClampedArray||E instanceof Int16Array||E instanceof Uint16Array||E instanceof Int32Array||E instanceof Uint32Array||E instanceof Float32Array||E instanceof Float64Array)&&(E=new Uint8Array(E.buffer,E.byteOffset,E.byteLength)),E instanceof Uint8Array){for(var b=E.byteLength,T=[],x=0;x<b;x++)T[x>>>2]|=E[x]<<24-x%4*8;h.call(this,T,b)}else h.apply(this,arguments)};p.prototype=c}}(),n.lib.WordArray})}(Il)),Il.exports}var Pl={exports:{}},wp;function Ey(){return wp||(wp=1,function(t,e){(function(n,r){t.exports=r(Lt())})(Tt,function(n){return function(){var r=n,a=r.lib,c=a.WordArray,h=r.enc;h.Utf16=h.Utf16BE={stringify:function(E){for(var b=E.words,T=E.sigBytes,x=[],w=0;w<T;w+=2){var F=b[w>>>2]>>>16-w%4*8&65535;x.push(String.fromCharCode(F))}return x.join("")},parse:function(E){for(var b=E.length,T=[],x=0;x<b;x++)T[x>>>1]|=E.charCodeAt(x)<<16-x%2*16;return c.create(T,b*2)}},h.Utf16LE={stringify:function(E){for(var b=E.words,T=E.sigBytes,x=[],w=0;w<T;w+=2){var F=p(b[w>>>2]>>>16-w%4*8&65535);x.push(String.fromCharCode(F))}return x.join("")},parse:function(E){for(var b=E.length,T=[],x=0;x<b;x++)T[x>>>1]|=p(E.charCodeAt(x)<<16-x%2*16);return c.create(T,b*2)}};function p(E){return E<<8&4278255360|E>>>8&16711935}}(),n.enc.Utf16})}(Pl)),Pl.exports}var Bl={exports:{}},Rp;function xo(){return Rp||(Rp=1,function(t,e){(function(n,r){t.exports=r(Lt())})(Tt,function(n){return function(){var r=n,a=r.lib,c=a.WordArray,h=r.enc;h.Base64={stringify:function(E){var b=E.words,T=E.sigBytes,x=this._map;E.clamp();for(var w=[],F=0;F<T;F+=3)for(var R=b[F>>>2]>>>24-F%4*8&255,v=b[F+1>>>2]>>>24-(F+1)%4*8&255,d=b[F+2>>>2]>>>24-(F+2)%4*8&255,g=R<<16|v<<8|d,A=0;A<4&&F+A*.75<T;A++)w.push(x.charAt(g>>>6*(3-A)&63));var O=x.charAt(64);if(O)for(;w.length%4;)w.push(O);return w.join("")},parse:function(E){var b=E.length,T=this._map,x=this._reverseMap;if(!x){x=this._reverseMap=[];for(var w=0;w<T.length;w++)x[T.charCodeAt(w)]=w}var F=T.charAt(64);if(F){var R=E.indexOf(F);R!==-1&&(b=R)}return p(E,b,x)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function p(E,b,T){for(var x=[],w=0,F=0;F<b;F++)if(F%4){var R=T[E.charCodeAt(F-1)]<<F%4*2,v=T[E.charCodeAt(F)]>>>6-F%4*2,d=R|v;x[w>>>2]|=d<<24-w%4*8,w++}return c.create(x,w)}}(),n.enc.Base64})}(Bl)),Bl.exports}var Ll={exports:{}},Fp;function xy(){return Fp||(Fp=1,function(t,e){(function(n,r){t.exports=r(Lt())})(Tt,function(n){return function(){var r=n,a=r.lib,c=a.WordArray,h=r.enc;h.Base64url={stringify:function(E,b){b===void 0&&(b=!0);var T=E.words,x=E.sigBytes,w=b?this._safe_map:this._map;E.clamp();for(var F=[],R=0;R<x;R+=3)for(var v=T[R>>>2]>>>24-R%4*8&255,d=T[R+1>>>2]>>>24-(R+1)%4*8&255,g=T[R+2>>>2]>>>24-(R+2)%4*8&255,A=v<<16|d<<8|g,O=0;O<4&&R+O*.75<x;O++)F.push(w.charAt(A>>>6*(3-O)&63));var D=w.charAt(64);if(D)for(;F.length%4;)F.push(D);return F.join("")},parse:function(E,b){b===void 0&&(b=!0);var T=E.length,x=b?this._safe_map:this._map,w=this._reverseMap;if(!w){w=this._reverseMap=[];for(var F=0;F<x.length;F++)w[x.charCodeAt(F)]=F}var R=x.charAt(64);if(R){var v=E.indexOf(R);v!==-1&&(T=v)}return p(E,T,w)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function p(E,b,T){for(var x=[],w=0,F=0;F<b;F++)if(F%4){var R=T[E.charCodeAt(F-1)]<<F%4*2,v=T[E.charCodeAt(F)]>>>6-F%4*2,d=R|v;x[w>>>2]|=d<<24-w%4*8,w++}return c.create(x,w)}}(),n.enc.Base64url})}(Ll)),Ll.exports}var Ml={exports:{}},Np;function So(){return Np||(Np=1,function(t,e){(function(n,r){t.exports=r(Lt())})(Tt,function(n){return function(r){var a=n,c=a.lib,h=c.WordArray,p=c.Hasher,E=a.algo,b=[];(function(){for(var v=0;v<64;v++)b[v]=r.abs(r.sin(v+1))*4294967296|0})();var T=E.MD5=p.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(v,d){for(var g=0;g<16;g++){var A=d+g,O=v[A];v[A]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}var D=this._hash.words,P=v[d+0],U=v[d+1],H=v[d+2],B=v[d+3],G=v[d+4],N=v[d+5],K=v[d+6],Y=v[d+7],ne=v[d+8],se=v[d+9],re=v[d+10],ue=v[d+11],ce=v[d+12],Ee=v[d+13],Te=v[d+14],_e=v[d+15],oe=D[0],Z=D[1],J=D[2],te=D[3];oe=x(oe,Z,J,te,P,7,b[0]),te=x(te,oe,Z,J,U,12,b[1]),J=x(J,te,oe,Z,H,17,b[2]),Z=x(Z,J,te,oe,B,22,b[3]),oe=x(oe,Z,J,te,G,7,b[4]),te=x(te,oe,Z,J,N,12,b[5]),J=x(J,te,oe,Z,K,17,b[6]),Z=x(Z,J,te,oe,Y,22,b[7]),oe=x(oe,Z,J,te,ne,7,b[8]),te=x(te,oe,Z,J,se,12,b[9]),J=x(J,te,oe,Z,re,17,b[10]),Z=x(Z,J,te,oe,ue,22,b[11]),oe=x(oe,Z,J,te,ce,7,b[12]),te=x(te,oe,Z,J,Ee,12,b[13]),J=x(J,te,oe,Z,Te,17,b[14]),Z=x(Z,J,te,oe,_e,22,b[15]),oe=w(oe,Z,J,te,U,5,b[16]),te=w(te,oe,Z,J,K,9,b[17]),J=w(J,te,oe,Z,ue,14,b[18]),Z=w(Z,J,te,oe,P,20,b[19]),oe=w(oe,Z,J,te,N,5,b[20]),te=w(te,oe,Z,J,re,9,b[21]),J=w(J,te,oe,Z,_e,14,b[22]),Z=w(Z,J,te,oe,G,20,b[23]),oe=w(oe,Z,J,te,se,5,b[24]),te=w(te,oe,Z,J,Te,9,b[25]),J=w(J,te,oe,Z,B,14,b[26]),Z=w(Z,J,te,oe,ne,20,b[27]),oe=w(oe,Z,J,te,Ee,5,b[28]),te=w(te,oe,Z,J,H,9,b[29]),J=w(J,te,oe,Z,Y,14,b[30]),Z=w(Z,J,te,oe,ce,20,b[31]),oe=F(oe,Z,J,te,N,4,b[32]),te=F(te,oe,Z,J,ne,11,b[33]),J=F(J,te,oe,Z,ue,16,b[34]),Z=F(Z,J,te,oe,Te,23,b[35]),oe=F(oe,Z,J,te,U,4,b[36]),te=F(te,oe,Z,J,G,11,b[37]),J=F(J,te,oe,Z,Y,16,b[38]),Z=F(Z,J,te,oe,re,23,b[39]),oe=F(oe,Z,J,te,Ee,4,b[40]),te=F(te,oe,Z,J,P,11,b[41]),J=F(J,te,oe,Z,B,16,b[42]),Z=F(Z,J,te,oe,K,23,b[43]),oe=F(oe,Z,J,te,se,4,b[44]),te=F(te,oe,Z,J,ce,11,b[45]),J=F(J,te,oe,Z,_e,16,b[46]),Z=F(Z,J,te,oe,H,23,b[47]),oe=R(oe,Z,J,te,P,6,b[48]),te=R(te,oe,Z,J,Y,10,b[49]),J=R(J,te,oe,Z,Te,15,b[50]),Z=R(Z,J,te,oe,N,21,b[51]),oe=R(oe,Z,J,te,ce,6,b[52]),te=R(te,oe,Z,J,B,10,b[53]),J=R(J,te,oe,Z,re,15,b[54]),Z=R(Z,J,te,oe,U,21,b[55]),oe=R(oe,Z,J,te,ne,6,b[56]),te=R(te,oe,Z,J,_e,10,b[57]),J=R(J,te,oe,Z,K,15,b[58]),Z=R(Z,J,te,oe,Ee,21,b[59]),oe=R(oe,Z,J,te,G,6,b[60]),te=R(te,oe,Z,J,ue,10,b[61]),J=R(J,te,oe,Z,H,15,b[62]),Z=R(Z,J,te,oe,se,21,b[63]),D[0]=D[0]+oe|0,D[1]=D[1]+Z|0,D[2]=D[2]+J|0,D[3]=D[3]+te|0},_doFinalize:function(){var v=this._data,d=v.words,g=this._nDataBytes*8,A=v.sigBytes*8;d[A>>>5]|=128<<24-A%32;var O=r.floor(g/4294967296),D=g;d[(A+64>>>9<<4)+15]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,d[(A+64>>>9<<4)+14]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,v.sigBytes=(d.length+1)*4,this._process();for(var P=this._hash,U=P.words,H=0;H<4;H++){var B=U[H];U[H]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360}return P},clone:function(){var v=p.clone.call(this);return v._hash=this._hash.clone(),v}});function x(v,d,g,A,O,D,P){var U=v+(d&g|~d&A)+O+P;return(U<<D|U>>>32-D)+d}function w(v,d,g,A,O,D,P){var U=v+(d&A|g&~A)+O+P;return(U<<D|U>>>32-D)+d}function F(v,d,g,A,O,D,P){var U=v+(d^g^A)+O+P;return(U<<D|U>>>32-D)+d}function R(v,d,g,A,O,D,P){var U=v+(g^(d|~A))+O+P;return(U<<D|U>>>32-D)+d}a.MD5=p._createHelper(T),a.HmacMD5=p._createHmacHelper(T)}(Math),n.MD5})}(Ml)),Ml.exports}var Ul={exports:{}},Ip;function Pp(){return Ip||(Ip=1,function(t,e){(function(n,r){t.exports=r(Lt())})(Tt,function(n){return function(){var r=n,a=r.lib,c=a.WordArray,h=a.Hasher,p=r.algo,E=[],b=p.SHA1=h.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(T,x){for(var w=this._hash.words,F=w[0],R=w[1],v=w[2],d=w[3],g=w[4],A=0;A<80;A++){if(A<16)E[A]=T[x+A]|0;else{var O=E[A-3]^E[A-8]^E[A-14]^E[A-16];E[A]=O<<1|O>>>31}var D=(F<<5|F>>>27)+g+E[A];A<20?D+=(R&v|~R&d)+1518500249:A<40?D+=(R^v^d)+1859775393:A<60?D+=(R&v|R&d|v&d)-1894007588:D+=(R^v^d)-899497514,g=d,d=v,v=R<<30|R>>>2,R=F,F=D}w[0]=w[0]+F|0,w[1]=w[1]+R|0,w[2]=w[2]+v|0,w[3]=w[3]+d|0,w[4]=w[4]+g|0},_doFinalize:function(){var T=this._data,x=T.words,w=this._nDataBytes*8,F=T.sigBytes*8;return x[F>>>5]|=128<<24-F%32,x[(F+64>>>9<<4)+14]=Math.floor(w/4294967296),x[(F+64>>>9<<4)+15]=w,T.sigBytes=x.length*4,this._process(),this._hash},clone:function(){var T=h.clone.call(this);return T._hash=this._hash.clone(),T}});r.SHA1=h._createHelper(b),r.HmacSHA1=h._createHmacHelper(b)}(),n.SHA1})}(Ul)),Ul.exports}var Vl={exports:{}},Bp;function jl(){return Bp||(Bp=1,function(t,e){(function(n,r){t.exports=r(Lt())})(Tt,function(n){return function(r){var a=n,c=a.lib,h=c.WordArray,p=c.Hasher,E=a.algo,b=[],T=[];(function(){function F(g){for(var A=r.sqrt(g),O=2;O<=A;O++)if(!(g%O))return!1;return!0}function R(g){return(g-(g|0))*4294967296|0}for(var v=2,d=0;d<64;)F(v)&&(d<8&&(b[d]=R(r.pow(v,1/2))),T[d]=R(r.pow(v,1/3)),d++),v++})();var x=[],w=E.SHA256=p.extend({_doReset:function(){this._hash=new h.init(b.slice(0))},_doProcessBlock:function(F,R){for(var v=this._hash.words,d=v[0],g=v[1],A=v[2],O=v[3],D=v[4],P=v[5],U=v[6],H=v[7],B=0;B<64;B++){if(B<16)x[B]=F[R+B]|0;else{var G=x[B-15],N=(G<<25|G>>>7)^(G<<14|G>>>18)^G>>>3,K=x[B-2],Y=(K<<15|K>>>17)^(K<<13|K>>>19)^K>>>10;x[B]=N+x[B-7]+Y+x[B-16]}var ne=D&P^~D&U,se=d&g^d&A^g&A,re=(d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22),ue=(D<<26|D>>>6)^(D<<21|D>>>11)^(D<<7|D>>>25),ce=H+ue+ne+T[B]+x[B],Ee=re+se;H=U,U=P,P=D,D=O+ce|0,O=A,A=g,g=d,d=ce+Ee|0}v[0]=v[0]+d|0,v[1]=v[1]+g|0,v[2]=v[2]+A|0,v[3]=v[3]+O|0,v[4]=v[4]+D|0,v[5]=v[5]+P|0,v[6]=v[6]+U|0,v[7]=v[7]+H|0},_doFinalize:function(){var F=this._data,R=F.words,v=this._nDataBytes*8,d=F.sigBytes*8;return R[d>>>5]|=128<<24-d%32,R[(d+64>>>9<<4)+14]=r.floor(v/4294967296),R[(d+64>>>9<<4)+15]=v,F.sigBytes=R.length*4,this._process(),this._hash},clone:function(){var F=p.clone.call(this);return F._hash=this._hash.clone(),F}});a.SHA256=p._createHelper(w),a.HmacSHA256=p._createHmacHelper(w)}(Math),n.SHA256})}(Vl)),Vl.exports}var $l={exports:{}},Lp;function Sy(){return Lp||(Lp=1,function(t,e){(function(n,r,a){t.exports=r(Lt(),jl())})(Tt,function(n){return function(){var r=n,a=r.lib,c=a.WordArray,h=r.algo,p=h.SHA256,E=h.SHA224=p.extend({_doReset:function(){this._hash=new c.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var b=p._doFinalize.call(this);return b.sigBytes-=4,b}});r.SHA224=p._createHelper(E),r.HmacSHA224=p._createHmacHelper(E)}(),n.SHA224})}($l)),$l.exports}var Hl={exports:{}},Mp;function Up(){return Mp||(Mp=1,function(t,e){(function(n,r,a){t.exports=r(Lt(),yu())})(Tt,function(n){return function(){var r=n,a=r.lib,c=a.Hasher,h=r.x64,p=h.Word,E=h.WordArray,b=r.algo;function T(){return p.create.apply(p,arguments)}var x=[T(1116352408,3609767458),T(1899447441,602891725),T(3049323471,3964484399),T(3921009573,2173295548),T(961987163,4081628472),T(1508970993,3053834265),T(2453635748,2937671579),T(2870763221,3664609560),T(3624381080,2734883394),T(310598401,1164996542),T(607225278,1323610764),T(1426881987,3590304994),T(1925078388,4068182383),T(2162078206,991336113),T(2614888103,633803317),T(3248222580,3479774868),T(3835390401,2666613458),T(4022224774,944711139),T(264347078,2341262773),T(604807628,2007800933),T(770255983,1495990901),T(1249150122,1856431235),T(1555081692,3175218132),T(1996064986,2198950837),T(2554220882,3999719339),T(2821834349,766784016),T(2952996808,2566594879),T(3210313671,3203337956),T(3336571891,1034457026),T(3584528711,2466948901),T(113926993,3758326383),T(338241895,168717936),T(666307205,1188179964),T(773529912,1546045734),T(1294757372,1522805485),T(1396182291,2643833823),T(1695183700,2343527390),T(1986661051,1014477480),T(2177026350,1206759142),T(2456956037,344077627),T(2730485921,1290863460),T(2820302411,3158454273),T(3259730800,3505952657),T(3345764771,106217008),T(3516065817,3606008344),T(3600352804,1432725776),T(4094571909,1467031594),T(275423344,851169720),T(430227734,3100823752),T(506948616,1363258195),T(659060556,3750685593),T(883997877,3785050280),T(958139571,3318307427),T(1322822218,3812723403),T(1537002063,2003034995),T(1747873779,3602036899),T(1955562222,1575990012),T(2024104815,1125592928),T(2227730452,2716904306),T(2361852424,442776044),T(2428436474,593698344),T(2756734187,3733110249),T(3204031479,2999351573),T(3329325298,3815920427),T(3391569614,3928383900),T(3515267271,566280711),T(3940187606,3454069534),T(4118630271,4000239992),T(116418474,1914138554),T(174292421,2731055270),T(289380356,3203993006),T(460393269,320620315),T(685471733,587496836),T(852142971,1086792851),T(1017036298,365543100),T(1126000580,2618297676),T(1288033470,3409855158),T(1501505948,4234509866),T(1607167915,987167468),T(1816402316,1246189591)],w=[];(function(){for(var R=0;R<80;R++)w[R]=T()})();var F=b.SHA512=c.extend({_doReset:function(){this._hash=new E.init([new p.init(1779033703,4089235720),new p.init(3144134277,2227873595),new p.init(1013904242,4271175723),new p.init(2773480762,1595750129),new p.init(1359893119,2917565137),new p.init(2600822924,725511199),new p.init(528734635,4215389547),new p.init(1541459225,327033209)])},_doProcessBlock:function(R,v){for(var d=this._hash.words,g=d[0],A=d[1],O=d[2],D=d[3],P=d[4],U=d[5],H=d[6],B=d[7],G=g.high,N=g.low,K=A.high,Y=A.low,ne=O.high,se=O.low,re=D.high,ue=D.low,ce=P.high,Ee=P.low,Te=U.high,_e=U.low,oe=H.high,Z=H.low,J=B.high,te=B.low,ve=G,me=N,Ze=K,Ve=Y,ht=ne,wt=se,yt=re,St=ue,Ct=ce,le=Ee,we=Te,be=_e,pt=oe,Et=Z,Rt=J,yn=te,Dt=0;Dt<80;Dt++){var It,kt,Pt=w[Dt];if(Dt<16)kt=Pt.high=R[v+Dt*2]|0,It=Pt.low=R[v+Dt*2+1]|0;else{var nn=w[Dt-15],ir=nn.high,W=nn.low,Fe=(ir>>>1|W<<31)^(ir>>>8|W<<24)^ir>>>7,Ue=(W>>>1|ir<<31)^(W>>>8|ir<<24)^(W>>>7|ir<<25),Pe=w[Dt-2],Qe=Pe.high,Ht=Pe.low,ft=(Qe>>>19|Ht<<13)^(Qe<<3|Ht>>>29)^Qe>>>6,fn=(Ht>>>19|Qe<<13)^(Ht<<3|Qe>>>29)^(Ht>>>6|Qe<<26),gn=w[Dt-7],jr=gn.high,On=gn.low,rn=w[Dt-16],Ri=rn.high,$r=rn.low;It=Ue+On,kt=Fe+jr+(It>>>0<Ue>>>0?1:0),It=It+fn,kt=kt+ft+(It>>>0<fn>>>0?1:0),It=It+$r,kt=kt+Ri+(It>>>0<$r>>>0?1:0),Pt.high=kt,Pt.low=It}var Fi=Ct&we^~Ct&pt,or=le&be^~le&Et,Or=ve&Ze^ve&ht^Ze&ht,eo=me&Ve^me&wt^Ve&wt,gi=(ve>>>28|me<<4)^(ve<<30|me>>>2)^(ve<<25|me>>>7),fr=(me>>>28|ve<<4)^(me<<30|ve>>>2)^(me<<25|ve>>>7),Hr=(Ct>>>14|le<<18)^(Ct>>>18|le<<14)^(Ct<<23|le>>>9),to=(le>>>14|Ct<<18)^(le>>>18|Ct<<14)^(le<<23|Ct>>>9),dt=x[Dt],er=dt.high,L=dt.low,q=yn+to,ee=Rt+Hr+(q>>>0<yn>>>0?1:0),q=q+or,ee=ee+Fi+(q>>>0<or>>>0?1:0),q=q+L,ee=ee+er+(q>>>0<L>>>0?1:0),q=q+It,ee=ee+kt+(q>>>0<It>>>0?1:0),ae=fr+eo,he=gi+Or+(ae>>>0<fr>>>0?1:0);Rt=pt,yn=Et,pt=we,Et=be,we=Ct,be=le,le=St+q|0,Ct=yt+ee+(le>>>0<St>>>0?1:0)|0,yt=ht,St=wt,ht=Ze,wt=Ve,Ze=ve,Ve=me,me=q+ae|0,ve=ee+he+(me>>>0<q>>>0?1:0)|0}N=g.low=N+me,g.high=G+ve+(N>>>0<me>>>0?1:0),Y=A.low=Y+Ve,A.high=K+Ze+(Y>>>0<Ve>>>0?1:0),se=O.low=se+wt,O.high=ne+ht+(se>>>0<wt>>>0?1:0),ue=D.low=ue+St,D.high=re+yt+(ue>>>0<St>>>0?1:0),Ee=P.low=Ee+le,P.high=ce+Ct+(Ee>>>0<le>>>0?1:0),_e=U.low=_e+be,U.high=Te+we+(_e>>>0<be>>>0?1:0),Z=H.low=Z+Et,H.high=oe+pt+(Z>>>0<Et>>>0?1:0),te=B.low=te+yn,B.high=J+Rt+(te>>>0<yn>>>0?1:0)},_doFinalize:function(){var R=this._data,v=R.words,d=this._nDataBytes*8,g=R.sigBytes*8;v[g>>>5]|=128<<24-g%32,v[(g+128>>>10<<5)+30]=Math.floor(d/4294967296),v[(g+128>>>10<<5)+31]=d,R.sigBytes=v.length*4,this._process();var A=this._hash.toX32();return A},clone:function(){var R=c.clone.call(this);return R._hash=this._hash.clone(),R},blockSize:1024/32});r.SHA512=c._createHelper(F),r.HmacSHA512=c._createHmacHelper(F)}(),n.SHA512})}(Hl)),Hl.exports}var Gl={exports:{}},Vp;function Ty(){return Vp||(Vp=1,function(t,e){(function(n,r,a){t.exports=r(Lt(),yu(),Up())})(Tt,function(n){return function(){var r=n,a=r.x64,c=a.Word,h=a.WordArray,p=r.algo,E=p.SHA512,b=p.SHA384=E.extend({_doReset:function(){this._hash=new h.init([new c.init(3418070365,3238371032),new c.init(1654270250,914150663),new c.init(2438529370,812702999),new c.init(355462360,4144912697),new c.init(1731405415,4290775857),new c.init(2394180231,1750603025),new c.init(3675008525,1694076839),new c.init(1203062813,3204075428)])},_doFinalize:function(){var T=E._doFinalize.call(this);return T.sigBytes-=16,T}});r.SHA384=E._createHelper(b),r.HmacSHA384=E._createHmacHelper(b)}(),n.SHA384})}(Gl)),Gl.exports}var Kl={exports:{}},jp;function Ay(){return jp||(jp=1,function(t,e){(function(n,r,a){t.exports=r(Lt(),yu())})(Tt,function(n){return function(r){var a=n,c=a.lib,h=c.WordArray,p=c.Hasher,E=a.x64,b=E.Word,T=a.algo,x=[],w=[],F=[];(function(){for(var d=1,g=0,A=0;A<24;A++){x[d+5*g]=(A+1)*(A+2)/2%64;var O=g%5,D=(2*d+3*g)%5;d=O,g=D}for(var d=0;d<5;d++)for(var g=0;g<5;g++)w[d+5*g]=g+(2*d+3*g)%5*5;for(var P=1,U=0;U<24;U++){for(var H=0,B=0,G=0;G<7;G++){if(P&1){var N=(1<<G)-1;N<32?B^=1<<N:H^=1<<N-32}P&128?P=P<<1^113:P<<=1}F[U]=b.create(H,B)}})();var R=[];(function(){for(var d=0;d<25;d++)R[d]=b.create()})();var v=T.SHA3=p.extend({cfg:p.cfg.extend({outputLength:512}),_doReset:function(){for(var d=this._state=[],g=0;g<25;g++)d[g]=new b.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(d,g){for(var A=this._state,O=this.blockSize/2,D=0;D<O;D++){var P=d[g+2*D],U=d[g+2*D+1];P=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,U=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360;var H=A[D];H.high^=U,H.low^=P}for(var B=0;B<24;B++){for(var G=0;G<5;G++){for(var N=0,K=0,Y=0;Y<5;Y++){var H=A[G+5*Y];N^=H.high,K^=H.low}var ne=R[G];ne.high=N,ne.low=K}for(var G=0;G<5;G++)for(var se=R[(G+4)%5],re=R[(G+1)%5],ue=re.high,ce=re.low,N=se.high^(ue<<1|ce>>>31),K=se.low^(ce<<1|ue>>>31),Y=0;Y<5;Y++){var H=A[G+5*Y];H.high^=N,H.low^=K}for(var Ee=1;Ee<25;Ee++){var N,K,H=A[Ee],Te=H.high,_e=H.low,oe=x[Ee];oe<32?(N=Te<<oe|_e>>>32-oe,K=_e<<oe|Te>>>32-oe):(N=_e<<oe-32|Te>>>64-oe,K=Te<<oe-32|_e>>>64-oe);var Z=R[w[Ee]];Z.high=N,Z.low=K}var J=R[0],te=A[0];J.high=te.high,J.low=te.low;for(var G=0;G<5;G++)for(var Y=0;Y<5;Y++){var Ee=G+5*Y,H=A[Ee],ve=R[Ee],me=R[(G+1)%5+5*Y],Ze=R[(G+2)%5+5*Y];H.high=ve.high^~me.high&Ze.high,H.low=ve.low^~me.low&Ze.low}var H=A[0],Ve=F[B];H.high^=Ve.high,H.low^=Ve.low}},_doFinalize:function(){var d=this._data,g=d.words;this._nDataBytes*8;var A=d.sigBytes*8,O=this.blockSize*32;g[A>>>5]|=1<<24-A%32,g[(r.ceil((A+1)/O)*O>>>5)-1]|=128,d.sigBytes=g.length*4,this._process();for(var D=this._state,P=this.cfg.outputLength/8,U=P/8,H=[],B=0;B<U;B++){var G=D[B],N=G.high,K=G.low;N=(N<<8|N>>>24)&16711935|(N<<24|N>>>8)&4278255360,K=(K<<8|K>>>24)&16711935|(K<<24|K>>>8)&4278255360,H.push(K),H.push(N)}return new h.init(H,P)},clone:function(){for(var d=p.clone.call(this),g=d._state=this._state.slice(0),A=0;A<25;A++)g[A]=g[A].clone();return d}});a.SHA3=p._createHelper(v),a.HmacSHA3=p._createHmacHelper(v)}(Math),n.SHA3})}(Kl)),Kl.exports}var zl={exports:{}},$p;function Cy(){return $p||($p=1,function(t,e){(function(n,r){t.exports=r(Lt())})(Tt,function(n){/** @preserve
|
14
14
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|