greybel-languageserver-browser 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +19 -19
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -28,11 +28,11 @@ ${JSON.stringify(R,null,4)}`);let F=R;if(He.string(F.id)||He.number(F.id)){let W
28
28
 
29
29
  `:R.error===void 0&&(W=`No result returned.
30
30
 
31
- `)),F){let X=R.error?` Request failed: ${R.error.message} (${R.error.code}).`:"";k.log(`Received response '${F.method} - (${R.id})' in ${Date.now()-F.timerStart}ms.${X}`,W)}else k.log(`Received response ${R.id} without active response promise.`,W)}else xi("receive-response",R)}function xi(R,F){if(!k||_===_e.Off)return;let W={isLSPMessage:!0,type:R,message:F,timestamp:Date.now()};k.log(W)}function Hs(){if(oe())throw new Ci(Zs.Closed,"Connection is closed.");if(Pe())throw new Ci(Zs.Disposed,"Connection is disposed.")}function QI(){if(ce())throw new Ci(Zs.AlreadyListening,"Connection is already listening")}function JI(){if(!ce())throw new Error("Call listen() first.")}function zs(R){return R===void 0?null:R}function _v(R){if(R!==null)return R}function wv(R){return R!=null&&!Array.isArray(R)&&typeof R=="object"}function _p(R,F){switch(R){case ae.ParameterStructures.auto:return wv(F)?_v(F):[zs(F)];case ae.ParameterStructures.byName:if(!wv(F))throw new Error("Received parameters by name but param is not an object literal.");return _v(F);case ae.ParameterStructures.byPosition:return[zs(F)];default:throw new Error(`Unknown parameter structure ${R.toString()}`)}}function xv(R,F){let W,X=R.numberOfParams;switch(X){case 0:W=void 0;break;case 1:W=_p(R.parameterStructures,F[0]);break;default:W=[];for(let Me=0;Me<F.length&&Me<X;Me++)W.push(zs(F[Me]));if(F.length<X)for(let Me=F.length;Me<X;Me++)W.push(null);break}return W}let ki={sendNotification:(R,...F)=>{Hs();let W,X;if(He.string(R)){W=R;let Ce=F[0],Ae=0,Ze=ae.ParameterStructures.auto;ae.ParameterStructures.is(Ce)&&(Ae=1,Ze=Ce);let _t=F.length,Se=_t-Ae;switch(Se){case 0:X=void 0;break;case 1:X=_p(Ze,F[Ae]);break;default:if(Ze===ae.ParameterStructures.byName)throw new Error(`Received ${Se} parameters for 'by Name' notification parameter structure.`);X=F.slice(Ae,_t).map(Xe=>zs(Xe));break}}else{let Ce=F;W=R.method,X=xv(R,Ce)}let Me={jsonrpc:u,method:W,params:X};return GI(Me),e.write(Me).catch(Ce=>{throw i.error("Sending notification failed."),Ce})},onNotification:(R,F)=>{Hs();let W;return He.func(R)?p=R:F&&(He.string(R)?(W=R,d.set(R,{type:void 0,handler:F})):(W=R.method,d.set(R.method,{type:R,handler:F}))),{dispose:()=>{W!==void 0?d.delete(W):p=void 0}}},onProgress:(R,F,W)=>{if(h.has(F))throw new Error(`Progress handler for token ${F} already registered`);return h.set(F,W),{dispose:()=>{h.delete(F)}}},sendProgress:(R,F,W)=>ki.sendNotification(Js.type,{token:F,value:W}),onUnhandledProgress:A.event,sendRequest:(R,...F)=>{Hs(),JI();let W,X,Me;if(He.string(R)){W=R;let _t=F[0],Se=F[F.length-1],Xe=0,De=ae.ParameterStructures.auto;ae.ParameterStructures.is(_t)&&(Xe=1,De=_t);let et=F.length;md.CancellationToken.is(Se)&&(et=et-1,Me=Se);let ft=et-Xe;switch(ft){case 0:X=void 0;break;case 1:X=_p(De,F[Xe]);break;default:if(De===ae.ParameterStructures.byName)throw new Error(`Received ${ft} parameters for 'by Name' request parameter structure.`);X=F.slice(Xe,et).map(ZI=>zs(ZI));break}}else{let _t=F;W=R.method,X=xv(R,_t);let Se=R.numberOfParams;Me=md.CancellationToken.is(_t[Se])?_t[Se]:void 0}let Ce=s++,Ae;Me&&(Ae=Me.onCancellationRequested(()=>{let _t=C.sender.sendCancellation(ki,Ce);return _t===void 0?(i.log(`Received no promise from cancellation strategy when cancelling id ${Ce}`),Promise.resolve()):_t.catch(()=>{i.log(`Sending cancellation messages for id ${Ce} failed`)})}));let Ze={jsonrpc:u,id:Ce,method:W,params:X};return zI(Ze),typeof C.sender.enableCancellation=="function"&&C.sender.enableCancellation(Ze),new Promise((_t,Se)=>B(this,null,function*(){let Xe=ft=>{_t(ft),C.sender.cleanup(Ce),Ae==null||Ae.dispose()},De=ft=>{Se(ft),C.sender.cleanup(Ce),Ae==null||Ae.dispose()},et={method:W,timerStart:Date.now(),resolve:Xe,reject:De};try{yield e.write(Ze),m.set(Ce,et)}catch(ft){throw i.error("Sending request failed."),et.reject(new ae.ResponseError(ae.ErrorCodes.MessageWriteError,ft.message?ft.message:"Unknown reason")),ft}}))},onRequest:(R,F)=>{Hs();let W=null;return bd.is(R)?(W=void 0,a=R):He.string(R)?(W=null,F!==void 0&&(W=R,c.set(R,{handler:F,type:void 0}))):F!==void 0&&(W=R.method,c.set(R.method,{type:R,handler:F})),{dispose:()=>{W!==null&&(W!==void 0?c.delete(W):a=void 0)}}},hasPendingResponse:()=>m.size>0,trace:(R,F,W)=>B(this,null,function*(){let X=!1,Me=Qt.Text;W!==void 0&&(He.boolean(W)?X=W:(X=W.sendNotification||!1,Me=W.traceFormat||Qt.Text)),_=R,w=Me,_===_e.Off?k=void 0:k=F,X&&!oe()&&!Pe()&&(yield ki.sendNotification(vd.type,{value:_e.toString(R)}))}),onError:x.event,onClose:T.event,onUnhandledNotification:P.event,onDispose:I.event,end:()=>{e.end()},dispose:()=>{if(Pe())return;y=bn.Disposed,I.fire(void 0);let R=new ae.ResponseError(ae.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let F of m.values())F.reject(R);m=new Map,v=new Map,b=new Set,f=new Bv.LinkedMap,He.func(e.dispose)&&e.dispose(),He.func(n.dispose)&&n.dispose()},listen:()=>{Hs(),QI(),y=bn.Listening,n.listen(UI)},inspect:()=>{(0,Uv.default)().console.log("inspect")}};return ki.onNotification(La.type,R=>{if(_===_e.Off||!k)return;let F=_===_e.Verbose||_===_e.Compact;k.log(R.message,F?R.verbose:void 0)}),ki.onNotification(Js.type,R=>{let F=h.get(R.token);F?F(R.value):A.fire(R)}),ki}pe.createMessageConnection=wE});var Ua=S(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.ProgressType=M.ProgressToken=M.createMessageConnection=M.NullLogger=M.ConnectionOptions=M.ConnectionStrategy=M.AbstractMessageBuffer=M.WriteableStreamMessageWriter=M.AbstractMessageWriter=M.MessageWriter=M.ReadableStreamMessageReader=M.AbstractMessageReader=M.MessageReader=M.SharedArrayReceiverStrategy=M.SharedArraySenderStrategy=M.CancellationToken=M.CancellationTokenSource=M.Emitter=M.Event=M.Disposable=M.LRUCache=M.Touch=M.LinkedMap=M.ParameterStructures=M.NotificationType9=M.NotificationType8=M.NotificationType7=M.NotificationType6=M.NotificationType5=M.NotificationType4=M.NotificationType3=M.NotificationType2=M.NotificationType1=M.NotificationType0=M.NotificationType=M.ErrorCodes=M.ResponseError=M.RequestType9=M.RequestType8=M.RequestType7=M.RequestType6=M.RequestType5=M.RequestType4=M.RequestType3=M.RequestType2=M.RequestType1=M.RequestType0=M.RequestType=M.Message=M.RAL=void 0;M.MessageStrategy=M.CancellationStrategy=M.CancellationSenderStrategy=M.CancellationReceiverStrategy=M.ConnectionError=M.ConnectionErrors=M.LogTraceNotification=M.SetTraceNotification=M.TraceFormat=M.TraceValues=M.Trace=void 0;var je=Gp();Object.defineProperty(M,"Message",{enumerable:!0,get:function(){return je.Message}});Object.defineProperty(M,"RequestType",{enumerable:!0,get:function(){return je.RequestType}});Object.defineProperty(M,"RequestType0",{enumerable:!0,get:function(){return je.RequestType0}});Object.defineProperty(M,"RequestType1",{enumerable:!0,get:function(){return je.RequestType1}});Object.defineProperty(M,"RequestType2",{enumerable:!0,get:function(){return je.RequestType2}});Object.defineProperty(M,"RequestType3",{enumerable:!0,get:function(){return je.RequestType3}});Object.defineProperty(M,"RequestType4",{enumerable:!0,get:function(){return je.RequestType4}});Object.defineProperty(M,"RequestType5",{enumerable:!0,get:function(){return je.RequestType5}});Object.defineProperty(M,"RequestType6",{enumerable:!0,get:function(){return je.RequestType6}});Object.defineProperty(M,"RequestType7",{enumerable:!0,get:function(){return je.RequestType7}});Object.defineProperty(M,"RequestType8",{enumerable:!0,get:function(){return je.RequestType8}});Object.defineProperty(M,"RequestType9",{enumerable:!0,get:function(){return je.RequestType9}});Object.defineProperty(M,"ResponseError",{enumerable:!0,get:function(){return je.ResponseError}});Object.defineProperty(M,"ErrorCodes",{enumerable:!0,get:function(){return je.ErrorCodes}});Object.defineProperty(M,"NotificationType",{enumerable:!0,get:function(){return je.NotificationType}});Object.defineProperty(M,"NotificationType0",{enumerable:!0,get:function(){return je.NotificationType0}});Object.defineProperty(M,"NotificationType1",{enumerable:!0,get:function(){return je.NotificationType1}});Object.defineProperty(M,"NotificationType2",{enumerable:!0,get:function(){return je.NotificationType2}});Object.defineProperty(M,"NotificationType3",{enumerable:!0,get:function(){return je.NotificationType3}});Object.defineProperty(M,"NotificationType4",{enumerable:!0,get:function(){return je.NotificationType4}});Object.defineProperty(M,"NotificationType5",{enumerable:!0,get:function(){return je.NotificationType5}});Object.defineProperty(M,"NotificationType6",{enumerable:!0,get:function(){return je.NotificationType6}});Object.defineProperty(M,"NotificationType7",{enumerable:!0,get:function(){return je.NotificationType7}});Object.defineProperty(M,"NotificationType8",{enumerable:!0,get:function(){return je.NotificationType8}});Object.defineProperty(M,"NotificationType9",{enumerable:!0,get:function(){return je.NotificationType9}});Object.defineProperty(M,"ParameterStructures",{enumerable:!0,get:function(){return je.ParameterStructures}});var xd=Yp();Object.defineProperty(M,"LinkedMap",{enumerable:!0,get:function(){return xd.LinkedMap}});Object.defineProperty(M,"LRUCache",{enumerable:!0,get:function(){return xd.LRUCache}});Object.defineProperty(M,"Touch",{enumerable:!0,get:function(){return xd.Touch}});var xE=Cv();Object.defineProperty(M,"Disposable",{enumerable:!0,get:function(){return xE.Disposable}});var zv=Ii();Object.defineProperty(M,"Event",{enumerable:!0,get:function(){return zv.Event}});Object.defineProperty(M,"Emitter",{enumerable:!0,get:function(){return zv.Emitter}});var Gv=Ca();Object.defineProperty(M,"CancellationTokenSource",{enumerable:!0,get:function(){return Gv.CancellationTokenSource}});Object.defineProperty(M,"CancellationToken",{enumerable:!0,get:function(){return Gv.CancellationToken}});var Kv=Av();Object.defineProperty(M,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return Kv.SharedArraySenderStrategy}});Object.defineProperty(M,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return Kv.SharedArrayReceiverStrategy}});var kd=jv();Object.defineProperty(M,"MessageReader",{enumerable:!0,get:function(){return kd.MessageReader}});Object.defineProperty(M,"AbstractMessageReader",{enumerable:!0,get:function(){return kd.AbstractMessageReader}});Object.defineProperty(M,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return kd.ReadableStreamMessageReader}});var Td=Nv();Object.defineProperty(M,"MessageWriter",{enumerable:!0,get:function(){return Td.MessageWriter}});Object.defineProperty(M,"AbstractMessageWriter",{enumerable:!0,get:function(){return Td.AbstractMessageWriter}});Object.defineProperty(M,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Td.WriteableStreamMessageWriter}});var kE=$v();Object.defineProperty(M,"AbstractMessageBuffer",{enumerable:!0,get:function(){return kE.AbstractMessageBuffer}});var wt=Hv();Object.defineProperty(M,"ConnectionStrategy",{enumerable:!0,get:function(){return wt.ConnectionStrategy}});Object.defineProperty(M,"ConnectionOptions",{enumerable:!0,get:function(){return wt.ConnectionOptions}});Object.defineProperty(M,"NullLogger",{enumerable:!0,get:function(){return wt.NullLogger}});Object.defineProperty(M,"createMessageConnection",{enumerable:!0,get:function(){return wt.createMessageConnection}});Object.defineProperty(M,"ProgressToken",{enumerable:!0,get:function(){return wt.ProgressToken}});Object.defineProperty(M,"ProgressType",{enumerable:!0,get:function(){return wt.ProgressType}});Object.defineProperty(M,"Trace",{enumerable:!0,get:function(){return wt.Trace}});Object.defineProperty(M,"TraceValues",{enumerable:!0,get:function(){return wt.TraceValues}});Object.defineProperty(M,"TraceFormat",{enumerable:!0,get:function(){return wt.TraceFormat}});Object.defineProperty(M,"SetTraceNotification",{enumerable:!0,get:function(){return wt.SetTraceNotification}});Object.defineProperty(M,"LogTraceNotification",{enumerable:!0,get:function(){return wt.LogTraceNotification}});Object.defineProperty(M,"ConnectionErrors",{enumerable:!0,get:function(){return wt.ConnectionErrors}});Object.defineProperty(M,"ConnectionError",{enumerable:!0,get:function(){return wt.ConnectionError}});Object.defineProperty(M,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return wt.CancellationReceiverStrategy}});Object.defineProperty(M,"CancellationSenderStrategy",{enumerable:!0,get:function(){return wt.CancellationSenderStrategy}});Object.defineProperty(M,"CancellationStrategy",{enumerable:!0,get:function(){return wt.CancellationStrategy}});Object.defineProperty(M,"MessageStrategy",{enumerable:!0,get:function(){return wt.MessageStrategy}});var TE=hr();M.RAL=TE.default});var Qv=S(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});var Pn=Ua(),Ba=class n extends Pn.AbstractMessageBuffer{constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return n.emptyBuffer}fromString(e,r){return new TextEncoder().encode(e)}toString(e,r){return r==="ascii"?this.asciiDecoder.decode(e):new TextDecoder(r).decode(e)}asNative(e,r){return r===void 0?e:e.slice(0,r)}allocNative(e){return new Uint8Array(e)}};Ba.emptyBuffer=new Uint8Array(0);var Sd=class{constructor(e){this.socket=e,this._onData=new Pn.Emitter,this._messageListener=r=>{r.data.arrayBuffer().then(i=>{this._onData.fire(new Uint8Array(i))},()=>{(0,Pn.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),Pn.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),Pn.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),Pn.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}},Id=class{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),Pn.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),Pn.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),Pn.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,r){if(typeof e=="string"){if(r!==void 0&&r!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${r}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}},SE=new TextEncoder,Yv=Object.freeze({messageBuffer:Object.freeze({create:n=>new Ba(n)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(n,e)=>{if(e.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${e.charset}`);return Promise.resolve(SE.encode(JSON.stringify(n,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(n,e)=>{if(!(n instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(e.charset).decode(n)))}})}),stream:Object.freeze({asReadableStream:n=>new Sd(n),asWritableStream:n=>new Id(n)}),console,timer:Object.freeze({setTimeout(n,e,...r){let t=setTimeout(n,e,...r);return{dispose:()=>clearTimeout(t)}},setImmediate(n,...e){let r=setTimeout(n,0,...e);return{dispose:()=>clearTimeout(r)}},setInterval(n,e,...r){let t=setInterval(n,e,...r);return{dispose:()=>clearInterval(t)}}})});function Ed(){return Yv}(function(n){function e(){Pn.RAL.install(Yv)}n.install=e})(Ed||(Ed={}));Rd.default=Ed});var zr=S(Jt=>{"use strict";var IE=Jt&&Jt.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),EE=Jt&&Jt.__exportStar||function(n,e){for(var r in n)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&IE(e,n,r)};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.createMessageConnection=Jt.BrowserMessageWriter=Jt.BrowserMessageReader=void 0;var RE=Qv();RE.default.install();var Oi=Ua();EE(Ua(),Jt);var Pd=class extends Oi.AbstractMessageReader{constructor(e){super(),this._onData=new Oi.Emitter,this._messageListener=r=>{this._onData.fire(r.data)},e.addEventListener("error",r=>this.fireError(r)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}};Jt.BrowserMessageReader=Pd;var Cd=class extends Oi.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",r=>this.fireError(r))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(r){return this.handleError(r,e),Promise.reject(r)}}handleError(e,r){this.errorCount++,this.fireError(e,r,this.errorCount)}end(){}};Jt.BrowserMessageWriter=Cd;function PE(n,e,r,t){return r===void 0&&(r=Oi.NullLogger),Oi.ConnectionStrategy.is(t)&&(t={connectionStrategy:t}),(0,Oi.createMessageConnection)(n,e,r,t)}Jt.createMessageConnection=PE});var Od=S((L2,Jv)=>{"use strict";Jv.exports=zr()});var Ja={};Gs(Ja,{AnnotatedTextEdit:()=>Qn,ChangeAnnotation:()=>Gr,ChangeAnnotationIdentifier:()=>xt,CodeAction:()=>dh,CodeActionContext:()=>ph,CodeActionKind:()=>ch,CodeActionTriggerKind:()=>oo,CodeDescription:()=>Ud,CodeLens:()=>hh,Color:()=>Va,ColorInformation:()=>Ld,ColorPresentation:()=>Md,Command:()=>Kr,CompletionItem:()=>Zd,CompletionItemKind:()=>zd,CompletionItemLabelDetails:()=>Jd,CompletionItemTag:()=>Kd,CompletionList:()=>Xd,CreateFile:()=>Di,DeleteFile:()=>Li,Diagnostic:()=>no,DiagnosticRelatedInformation:()=>Ha,DiagnosticSeverity:()=>Nd,DiagnosticTag:()=>$d,DocumentHighlight:()=>ih,DocumentHighlightKind:()=>rh,DocumentLink:()=>mh,DocumentSymbol:()=>uh,DocumentUri:()=>Ad,EOL:()=>CE,FoldingRange:()=>Fd,FoldingRangeKind:()=>qd,FormattingOptions:()=>fh,Hover:()=>eh,InlayHint:()=>Th,InlayHintKind:()=>Ya,InlayHintLabelPart:()=>Qa,InlineCompletionContext:()=>Ch,InlineCompletionItem:()=>Ih,InlineCompletionList:()=>Eh,InlineCompletionTriggerKind:()=>Rh,InlineValueContext:()=>kh,InlineValueEvaluatableExpression:()=>xh,InlineValueText:()=>_h,InlineValueVariableLookup:()=>wh,InsertReplaceEdit:()=>Yd,InsertTextFormat:()=>Gd,InsertTextMode:()=>Qd,Location:()=>to,LocationLink:()=>jd,MarkedString:()=>so,MarkupContent:()=>Mi,MarkupKind:()=>Ka,OptionalVersionedTextDocumentIdentifier:()=>io,ParameterInformation:()=>th,Position:()=>an,Range:()=>ze,RenameFile:()=>ji,SelectedCompletionInfo:()=>Ph,SelectionRange:()=>gh,SemanticTokenModifiers:()=>bh,SemanticTokenTypes:()=>yh,SemanticTokens:()=>vh,SignatureInformation:()=>nh,StringValue:()=>Sh,SymbolInformation:()=>ah,SymbolKind:()=>sh,SymbolTag:()=>oh,TextDocument:()=>Ah,TextDocumentEdit:()=>ro,TextDocumentIdentifier:()=>Wd,TextDocumentItem:()=>Hd,TextEdit:()=>Cn,URI:()=>Wa,VersionedTextDocumentIdentifier:()=>Vd,WorkspaceChange:()=>Bd,WorkspaceEdit:()=>za,WorkspaceFolder:()=>Oh,WorkspaceSymbol:()=>lh,integer:()=>Dd,uinteger:()=>eo});var Ad,Wa,Dd,eo,an,ze,to,jd,Va,Ld,Md,qd,Fd,Ha,Nd,$d,Ud,no,Kr,Cn,Gr,xt,Qn,ro,Di,ji,Li,za,Ai,Ga,Bd,Wd,Vd,io,Hd,Ka,Mi,zd,Gd,Kd,Yd,Qd,Jd,Zd,Xd,so,eh,th,nh,rh,ih,sh,oh,ah,lh,uh,ch,oo,ph,dh,hh,fh,mh,gh,yh,bh,vh,_h,wh,xh,kh,Ya,Qa,Th,Sh,Ih,Eh,Rh,Ph,Ch,Oh,CE,Ah,Dh,D,Za=cr(()=>{"use strict";(function(n){function e(r){return typeof r=="string"}n.is=e})(Ad||(Ad={}));(function(n){function e(r){return typeof r=="string"}n.is=e})(Wa||(Wa={}));(function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&n.MIN_VALUE<=r&&r<=n.MAX_VALUE}n.is=e})(Dd||(Dd={}));(function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&n.MIN_VALUE<=r&&r<=n.MAX_VALUE}n.is=e})(eo||(eo={}));(function(n){function e(t,i){return t===Number.MAX_VALUE&&(t=eo.MAX_VALUE),i===Number.MAX_VALUE&&(i=eo.MAX_VALUE),{line:t,character:i}}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&D.uinteger(i.line)&&D.uinteger(i.character)}n.is=r})(an||(an={}));(function(n){function e(t,i,s,o){if(D.uinteger(t)&&D.uinteger(i)&&D.uinteger(s)&&D.uinteger(o))return{start:an.create(t,i),end:an.create(s,o)};if(an.is(t)&&an.is(i))return{start:t,end:i};throw new Error(`Range#create called with invalid arguments[${t}, ${i}, ${s}, ${o}]`)}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&an.is(i.start)&&an.is(i.end)}n.is=r})(ze||(ze={}));(function(n){function e(t,i){return{uri:t,range:i}}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&ze.is(i.range)&&(D.string(i.uri)||D.undefined(i.uri))}n.is=r})(to||(to={}));(function(n){function e(t,i,s,o){return{targetUri:t,targetRange:i,targetSelectionRange:s,originSelectionRange:o}}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&ze.is(i.targetRange)&&D.string(i.targetUri)&&ze.is(i.targetSelectionRange)&&(ze.is(i.originSelectionRange)||D.undefined(i.originSelectionRange))}n.is=r})(jd||(jd={}));(function(n){function e(t,i,s,o){return{red:t,green:i,blue:s,alpha:o}}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&D.numberRange(i.red,0,1)&&D.numberRange(i.green,0,1)&&D.numberRange(i.blue,0,1)&&D.numberRange(i.alpha,0,1)}n.is=r})(Va||(Va={}));(function(n){function e(t,i){return{range:t,color:i}}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&ze.is(i.range)&&Va.is(i.color)}n.is=r})(Ld||(Ld={}));(function(n){function e(t,i,s){return{label:t,textEdit:i,additionalTextEdits:s}}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&D.string(i.label)&&(D.undefined(i.textEdit)||Cn.is(i))&&(D.undefined(i.additionalTextEdits)||D.typedArray(i.additionalTextEdits,Cn.is))}n.is=r})(Md||(Md={}));(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(qd||(qd={}));(function(n){function e(t,i,s,o,l,u){let a={startLine:t,endLine:i};return D.defined(s)&&(a.startCharacter=s),D.defined(o)&&(a.endCharacter=o),D.defined(l)&&(a.kind=l),D.defined(u)&&(a.collapsedText=u),a}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&D.uinteger(i.startLine)&&D.uinteger(i.startLine)&&(D.undefined(i.startCharacter)||D.uinteger(i.startCharacter))&&(D.undefined(i.endCharacter)||D.uinteger(i.endCharacter))&&(D.undefined(i.kind)||D.string(i.kind))}n.is=r})(Fd||(Fd={}));(function(n){function e(t,i){return{location:t,message:i}}n.create=e;function r(t){let i=t;return D.defined(i)&&to.is(i.location)&&D.string(i.message)}n.is=r})(Ha||(Ha={}));(function(n){n.Error=1,n.Warning=2,n.Information=3,n.Hint=4})(Nd||(Nd={}));(function(n){n.Unnecessary=1,n.Deprecated=2})($d||($d={}));(function(n){function e(r){let t=r;return D.objectLiteral(t)&&D.string(t.href)}n.is=e})(Ud||(Ud={}));(function(n){function e(t,i,s,o,l,u){let a={range:t,message:i};return D.defined(s)&&(a.severity=s),D.defined(o)&&(a.code=o),D.defined(l)&&(a.source=l),D.defined(u)&&(a.relatedInformation=u),a}n.create=e;function r(t){var i;let s=t;return D.defined(s)&&ze.is(s.range)&&D.string(s.message)&&(D.number(s.severity)||D.undefined(s.severity))&&(D.integer(s.code)||D.string(s.code)||D.undefined(s.code))&&(D.undefined(s.codeDescription)||D.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(D.string(s.source)||D.undefined(s.source))&&(D.undefined(s.relatedInformation)||D.typedArray(s.relatedInformation,Ha.is))}n.is=r})(no||(no={}));(function(n){function e(t,i,...s){let o={title:t,command:i};return D.defined(s)&&s.length>0&&(o.arguments=s),o}n.create=e;function r(t){let i=t;return D.defined(i)&&D.string(i.title)&&D.string(i.command)}n.is=r})(Kr||(Kr={}));(function(n){function e(s,o){return{range:s,newText:o}}n.replace=e;function r(s,o){return{range:{start:s,end:s},newText:o}}n.insert=r;function t(s){return{range:s,newText:""}}n.del=t;function i(s){let o=s;return D.objectLiteral(o)&&D.string(o.newText)&&ze.is(o.range)}n.is=i})(Cn||(Cn={}));(function(n){function e(t,i,s){let o={label:t};return i!==void 0&&(o.needsConfirmation=i),s!==void 0&&(o.description=s),o}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&D.string(i.label)&&(D.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(D.string(i.description)||i.description===void 0)}n.is=r})(Gr||(Gr={}));(function(n){function e(r){let t=r;return D.string(t)}n.is=e})(xt||(xt={}));(function(n){function e(s,o,l){return{range:s,newText:o,annotationId:l}}n.replace=e;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}n.insert=r;function t(s,o){return{range:s,newText:"",annotationId:o}}n.del=t;function i(s){let o=s;return Cn.is(o)&&(Gr.is(o.annotationId)||xt.is(o.annotationId))}n.is=i})(Qn||(Qn={}));(function(n){function e(t,i){return{textDocument:t,edits:i}}n.create=e;function r(t){let i=t;return D.defined(i)&&io.is(i.textDocument)&&Array.isArray(i.edits)}n.is=r})(ro||(ro={}));(function(n){function e(t,i,s){let o={kind:"create",uri:t};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}n.create=e;function r(t){let i=t;return i&&i.kind==="create"&&D.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||D.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||D.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||xt.is(i.annotationId))}n.is=r})(Di||(Di={}));(function(n){function e(t,i,s,o){let l={kind:"rename",oldUri:t,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}n.create=e;function r(t){let i=t;return i&&i.kind==="rename"&&D.string(i.oldUri)&&D.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||D.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||D.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||xt.is(i.annotationId))}n.is=r})(ji||(ji={}));(function(n){function e(t,i,s){let o={kind:"delete",uri:t};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}n.create=e;function r(t){let i=t;return i&&i.kind==="delete"&&D.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||D.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||D.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||xt.is(i.annotationId))}n.is=r})(Li||(Li={}));(function(n){function e(r){let t=r;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(i=>D.string(i.kind)?Di.is(i)||ji.is(i)||Li.is(i):ro.is(i)))}n.is=e})(za||(za={}));Ai=class{constructor(e,r){this.edits=e,this.changeAnnotations=r}insert(e,r,t){let i,s;if(t===void 0?i=Cn.insert(e,r):xt.is(t)?(s=t,i=Qn.insert(e,r,t)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(t),i=Qn.insert(e,r,s)),this.edits.push(i),s!==void 0)return s}replace(e,r,t){let i,s;if(t===void 0?i=Cn.replace(e,r):xt.is(t)?(s=t,i=Qn.replace(e,r,t)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(t),i=Qn.replace(e,r,s)),this.edits.push(i),s!==void 0)return s}delete(e,r){let t,i;if(r===void 0?t=Cn.del(e):xt.is(r)?(i=r,t=Qn.del(e,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),t=Qn.del(e,i)),this.edits.push(t),i!==void 0)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},Ga=class{constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,r){let t;if(xt.is(e)?t=e:(t=this.nextId(),r=e),this._annotations[t]!==void 0)throw new Error(`Id ${t} is already in use.`);if(r===void 0)throw new Error(`No annotation provided for id ${t}`);return this._annotations[t]=r,this._size++,t}nextId(){return this._counter++,this._counter.toString()}},Bd=class{constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ga(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(r=>{if(ro.is(r)){let t=new Ai(r.edits,this._changeAnnotations);this._textEditChanges[r.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(r=>{let t=new Ai(e.changes[r]);this._textEditChanges[r]=t})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(io.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let r={uri:e.uri,version:e.version},t=this._textEditChanges[r.uri];if(!t){let i=[],s={textDocument:r,edits:i};this._workspaceEdit.documentChanges.push(s),t=new Ai(i,this._changeAnnotations),this._textEditChanges[r.uri]=t}return t}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let r=this._textEditChanges[e];if(!r){let t=[];this._workspaceEdit.changes[e]=t,r=new Ai(t),this._textEditChanges[e]=r}return r}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ga,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,r,t){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;Gr.is(r)||xt.is(r)?i=r:t=r;let s,o;if(i===void 0?s=Di.create(e,t):(o=xt.is(i)?i:this._changeAnnotations.manage(i),s=Di.create(e,t,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}renameFile(e,r,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let s;Gr.is(t)||xt.is(t)?s=t:i=t;let o,l;if(s===void 0?o=ji.create(e,r,i):(l=xt.is(s)?s:this._changeAnnotations.manage(s),o=ji.create(e,r,i,l)),this._workspaceEdit.documentChanges.push(o),l!==void 0)return l}deleteFile(e,r,t){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;Gr.is(r)||xt.is(r)?i=r:t=r;let s,o;if(i===void 0?s=Li.create(e,t):(o=xt.is(i)?i:this._changeAnnotations.manage(i),s=Li.create(e,t,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}};(function(n){function e(t){return{uri:t}}n.create=e;function r(t){let i=t;return D.defined(i)&&D.string(i.uri)}n.is=r})(Wd||(Wd={}));(function(n){function e(t,i){return{uri:t,version:i}}n.create=e;function r(t){let i=t;return D.defined(i)&&D.string(i.uri)&&D.integer(i.version)}n.is=r})(Vd||(Vd={}));(function(n){function e(t,i){return{uri:t,version:i}}n.create=e;function r(t){let i=t;return D.defined(i)&&D.string(i.uri)&&(i.version===null||D.integer(i.version))}n.is=r})(io||(io={}));(function(n){function e(t,i,s,o){return{uri:t,languageId:i,version:s,text:o}}n.create=e;function r(t){let i=t;return D.defined(i)&&D.string(i.uri)&&D.string(i.languageId)&&D.integer(i.version)&&D.string(i.text)}n.is=r})(Hd||(Hd={}));(function(n){n.PlainText="plaintext",n.Markdown="markdown";function e(r){let t=r;return t===n.PlainText||t===n.Markdown}n.is=e})(Ka||(Ka={}));(function(n){function e(r){let t=r;return D.objectLiteral(r)&&Ka.is(t.kind)&&D.string(t.value)}n.is=e})(Mi||(Mi={}));(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(zd||(zd={}));(function(n){n.PlainText=1,n.Snippet=2})(Gd||(Gd={}));(function(n){n.Deprecated=1})(Kd||(Kd={}));(function(n){function e(t,i,s){return{newText:t,insert:i,replace:s}}n.create=e;function r(t){let i=t;return i&&D.string(i.newText)&&ze.is(i.insert)&&ze.is(i.replace)}n.is=r})(Yd||(Yd={}));(function(n){n.asIs=1,n.adjustIndentation=2})(Qd||(Qd={}));(function(n){function e(r){let t=r;return t&&(D.string(t.detail)||t.detail===void 0)&&(D.string(t.description)||t.description===void 0)}n.is=e})(Jd||(Jd={}));(function(n){function e(r){return{label:r}}n.create=e})(Zd||(Zd={}));(function(n){function e(r,t){return{items:r||[],isIncomplete:!!t}}n.create=e})(Xd||(Xd={}));(function(n){function e(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=e;function r(t){let i=t;return D.string(i)||D.objectLiteral(i)&&D.string(i.language)&&D.string(i.value)}n.is=r})(so||(so={}));(function(n){function e(r){let t=r;return!!t&&D.objectLiteral(t)&&(Mi.is(t.contents)||so.is(t.contents)||D.typedArray(t.contents,so.is))&&(r.range===void 0||ze.is(r.range))}n.is=e})(eh||(eh={}));(function(n){function e(r,t){return t?{label:r,documentation:t}:{label:r}}n.create=e})(th||(th={}));(function(n){function e(r,t,...i){let s={label:r};return D.defined(t)&&(s.documentation=t),D.defined(i)?s.parameters=i:s.parameters=[],s}n.create=e})(nh||(nh={}));(function(n){n.Text=1,n.Read=2,n.Write=3})(rh||(rh={}));(function(n){function e(r,t){let i={range:r};return D.number(t)&&(i.kind=t),i}n.create=e})(ih||(ih={}));(function(n){n.File=1,n.Module=2,n.Namespace=3,n.Package=4,n.Class=5,n.Method=6,n.Property=7,n.Field=8,n.Constructor=9,n.Enum=10,n.Interface=11,n.Function=12,n.Variable=13,n.Constant=14,n.String=15,n.Number=16,n.Boolean=17,n.Array=18,n.Object=19,n.Key=20,n.Null=21,n.EnumMember=22,n.Struct=23,n.Event=24,n.Operator=25,n.TypeParameter=26})(sh||(sh={}));(function(n){n.Deprecated=1})(oh||(oh={}));(function(n){function e(r,t,i,s,o){let l={name:r,kind:t,location:{uri:s,range:i}};return o&&(l.containerName=o),l}n.create=e})(ah||(ah={}));(function(n){function e(r,t,i,s){return s!==void 0?{name:r,kind:t,location:{uri:i,range:s}}:{name:r,kind:t,location:{uri:i}}}n.create=e})(lh||(lh={}));(function(n){function e(t,i,s,o,l,u){let a={name:t,detail:i,kind:s,range:o,selectionRange:l};return u!==void 0&&(a.children=u),a}n.create=e;function r(t){let i=t;return i&&D.string(i.name)&&D.number(i.kind)&&ze.is(i.range)&&ze.is(i.selectionRange)&&(i.detail===void 0||D.string(i.detail))&&(i.deprecated===void 0||D.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}n.is=r})(uh||(uh={}));(function(n){n.Empty="",n.QuickFix="quickfix",n.Refactor="refactor",n.RefactorExtract="refactor.extract",n.RefactorInline="refactor.inline",n.RefactorRewrite="refactor.rewrite",n.Source="source",n.SourceOrganizeImports="source.organizeImports",n.SourceFixAll="source.fixAll"})(ch||(ch={}));(function(n){n.Invoked=1,n.Automatic=2})(oo||(oo={}));(function(n){function e(t,i,s){let o={diagnostics:t};return i!=null&&(o.only=i),s!=null&&(o.triggerKind=s),o}n.create=e;function r(t){let i=t;return D.defined(i)&&D.typedArray(i.diagnostics,no.is)&&(i.only===void 0||D.typedArray(i.only,D.string))&&(i.triggerKind===void 0||i.triggerKind===oo.Invoked||i.triggerKind===oo.Automatic)}n.is=r})(ph||(ph={}));(function(n){function e(t,i,s){let o={title:t},l=!0;return typeof i=="string"?(l=!1,o.kind=i):Kr.is(i)?o.command=i:o.edit=i,l&&s!==void 0&&(o.kind=s),o}n.create=e;function r(t){let i=t;return i&&D.string(i.title)&&(i.diagnostics===void 0||D.typedArray(i.diagnostics,no.is))&&(i.kind===void 0||D.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Kr.is(i.command))&&(i.isPreferred===void 0||D.boolean(i.isPreferred))&&(i.edit===void 0||za.is(i.edit))}n.is=r})(dh||(dh={}));(function(n){function e(t,i){let s={range:t};return D.defined(i)&&(s.data=i),s}n.create=e;function r(t){let i=t;return D.defined(i)&&ze.is(i.range)&&(D.undefined(i.command)||Kr.is(i.command))}n.is=r})(hh||(hh={}));(function(n){function e(t,i){return{tabSize:t,insertSpaces:i}}n.create=e;function r(t){let i=t;return D.defined(i)&&D.uinteger(i.tabSize)&&D.boolean(i.insertSpaces)}n.is=r})(fh||(fh={}));(function(n){function e(t,i,s){return{range:t,target:i,data:s}}n.create=e;function r(t){let i=t;return D.defined(i)&&ze.is(i.range)&&(D.undefined(i.target)||D.string(i.target))}n.is=r})(mh||(mh={}));(function(n){function e(t,i){return{range:t,parent:i}}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&ze.is(i.range)&&(i.parent===void 0||n.is(i.parent))}n.is=r})(gh||(gh={}));(function(n){n.namespace="namespace",n.type="type",n.class="class",n.enum="enum",n.interface="interface",n.struct="struct",n.typeParameter="typeParameter",n.parameter="parameter",n.variable="variable",n.property="property",n.enumMember="enumMember",n.event="event",n.function="function",n.method="method",n.macro="macro",n.keyword="keyword",n.modifier="modifier",n.comment="comment",n.string="string",n.number="number",n.regexp="regexp",n.operator="operator",n.decorator="decorator"})(yh||(yh={}));(function(n){n.declaration="declaration",n.definition="definition",n.readonly="readonly",n.static="static",n.deprecated="deprecated",n.abstract="abstract",n.async="async",n.modification="modification",n.documentation="documentation",n.defaultLibrary="defaultLibrary"})(bh||(bh={}));(function(n){function e(r){let t=r;return D.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId=="string")&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]=="number")}n.is=e})(vh||(vh={}));(function(n){function e(t,i){return{range:t,text:i}}n.create=e;function r(t){let i=t;return i!=null&&ze.is(i.range)&&D.string(i.text)}n.is=r})(_h||(_h={}));(function(n){function e(t,i,s){return{range:t,variableName:i,caseSensitiveLookup:s}}n.create=e;function r(t){let i=t;return i!=null&&ze.is(i.range)&&D.boolean(i.caseSensitiveLookup)&&(D.string(i.variableName)||i.variableName===void 0)}n.is=r})(wh||(wh={}));(function(n){function e(t,i){return{range:t,expression:i}}n.create=e;function r(t){let i=t;return i!=null&&ze.is(i.range)&&(D.string(i.expression)||i.expression===void 0)}n.is=r})(xh||(xh={}));(function(n){function e(t,i){return{frameId:t,stoppedLocation:i}}n.create=e;function r(t){let i=t;return D.defined(i)&&ze.is(t.stoppedLocation)}n.is=r})(kh||(kh={}));(function(n){n.Type=1,n.Parameter=2;function e(r){return r===1||r===2}n.is=e})(Ya||(Ya={}));(function(n){function e(t){return{value:t}}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&(i.tooltip===void 0||D.string(i.tooltip)||Mi.is(i.tooltip))&&(i.location===void 0||to.is(i.location))&&(i.command===void 0||Kr.is(i.command))}n.is=r})(Qa||(Qa={}));(function(n){function e(t,i,s){let o={position:t,label:i};return s!==void 0&&(o.kind=s),o}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&an.is(i.position)&&(D.string(i.label)||D.typedArray(i.label,Qa.is))&&(i.kind===void 0||Ya.is(i.kind))&&i.textEdits===void 0||D.typedArray(i.textEdits,Cn.is)&&(i.tooltip===void 0||D.string(i.tooltip)||Mi.is(i.tooltip))&&(i.paddingLeft===void 0||D.boolean(i.paddingLeft))&&(i.paddingRight===void 0||D.boolean(i.paddingRight))}n.is=r})(Th||(Th={}));(function(n){function e(r){return{kind:"snippet",value:r}}n.createSnippet=e})(Sh||(Sh={}));(function(n){function e(r,t,i,s){return{insertText:r,filterText:t,range:i,command:s}}n.create=e})(Ih||(Ih={}));(function(n){function e(r){return{items:r}}n.create=e})(Eh||(Eh={}));(function(n){n.Invoked=0,n.Automatic=1})(Rh||(Rh={}));(function(n){function e(r,t){return{range:r,text:t}}n.create=e})(Ph||(Ph={}));(function(n){function e(r,t){return{triggerKind:r,selectedCompletionInfo:t}}n.create=e})(Ch||(Ch={}));(function(n){function e(r){let t=r;return D.objectLiteral(t)&&Wa.is(t.uri)&&D.string(t.name)}n.is=e})(Oh||(Oh={}));CE=[`
31
+ `)),F){let X=R.error?` Request failed: ${R.error.message} (${R.error.code}).`:"";k.log(`Received response '${F.method} - (${R.id})' in ${Date.now()-F.timerStart}ms.${X}`,W)}else k.log(`Received response ${R.id} without active response promise.`,W)}else xi("receive-response",R)}function xi(R,F){if(!k||_===_e.Off)return;let W={isLSPMessage:!0,type:R,message:F,timestamp:Date.now()};k.log(W)}function Hs(){if(oe())throw new Ci(Zs.Closed,"Connection is closed.");if(Pe())throw new Ci(Zs.Disposed,"Connection is disposed.")}function QI(){if(ce())throw new Ci(Zs.AlreadyListening,"Connection is already listening")}function JI(){if(!ce())throw new Error("Call listen() first.")}function zs(R){return R===void 0?null:R}function _v(R){if(R!==null)return R}function wv(R){return R!=null&&!Array.isArray(R)&&typeof R=="object"}function _p(R,F){switch(R){case ae.ParameterStructures.auto:return wv(F)?_v(F):[zs(F)];case ae.ParameterStructures.byName:if(!wv(F))throw new Error("Received parameters by name but param is not an object literal.");return _v(F);case ae.ParameterStructures.byPosition:return[zs(F)];default:throw new Error(`Unknown parameter structure ${R.toString()}`)}}function xv(R,F){let W,X=R.numberOfParams;switch(X){case 0:W=void 0;break;case 1:W=_p(R.parameterStructures,F[0]);break;default:W=[];for(let Me=0;Me<F.length&&Me<X;Me++)W.push(zs(F[Me]));if(F.length<X)for(let Me=F.length;Me<X;Me++)W.push(null);break}return W}let ki={sendNotification:(R,...F)=>{Hs();let W,X;if(He.string(R)){W=R;let Ce=F[0],Ae=0,Ze=ae.ParameterStructures.auto;ae.ParameterStructures.is(Ce)&&(Ae=1,Ze=Ce);let _t=F.length,Se=_t-Ae;switch(Se){case 0:X=void 0;break;case 1:X=_p(Ze,F[Ae]);break;default:if(Ze===ae.ParameterStructures.byName)throw new Error(`Received ${Se} parameters for 'by Name' notification parameter structure.`);X=F.slice(Ae,_t).map(Xe=>zs(Xe));break}}else{let Ce=F;W=R.method,X=xv(R,Ce)}let Me={jsonrpc:u,method:W,params:X};return GI(Me),e.write(Me).catch(Ce=>{throw i.error("Sending notification failed."),Ce})},onNotification:(R,F)=>{Hs();let W;return He.func(R)?p=R:F&&(He.string(R)?(W=R,d.set(R,{type:void 0,handler:F})):(W=R.method,d.set(R.method,{type:R,handler:F}))),{dispose:()=>{W!==void 0?d.delete(W):p=void 0}}},onProgress:(R,F,W)=>{if(h.has(F))throw new Error(`Progress handler for token ${F} already registered`);return h.set(F,W),{dispose:()=>{h.delete(F)}}},sendProgress:(R,F,W)=>ki.sendNotification(Js.type,{token:F,value:W}),onUnhandledProgress:A.event,sendRequest:(R,...F)=>{Hs(),JI();let W,X,Me;if(He.string(R)){W=R;let _t=F[0],Se=F[F.length-1],Xe=0,De=ae.ParameterStructures.auto;ae.ParameterStructures.is(_t)&&(Xe=1,De=_t);let et=F.length;md.CancellationToken.is(Se)&&(et=et-1,Me=Se);let ft=et-Xe;switch(ft){case 0:X=void 0;break;case 1:X=_p(De,F[Xe]);break;default:if(De===ae.ParameterStructures.byName)throw new Error(`Received ${ft} parameters for 'by Name' request parameter structure.`);X=F.slice(Xe,et).map(ZI=>zs(ZI));break}}else{let _t=F;W=R.method,X=xv(R,_t);let Se=R.numberOfParams;Me=md.CancellationToken.is(_t[Se])?_t[Se]:void 0}let Ce=s++,Ae;Me&&(Ae=Me.onCancellationRequested(()=>{let _t=C.sender.sendCancellation(ki,Ce);return _t===void 0?(i.log(`Received no promise from cancellation strategy when cancelling id ${Ce}`),Promise.resolve()):_t.catch(()=>{i.log(`Sending cancellation messages for id ${Ce} failed`)})}));let Ze={jsonrpc:u,id:Ce,method:W,params:X};return zI(Ze),typeof C.sender.enableCancellation=="function"&&C.sender.enableCancellation(Ze),new Promise((_t,Se)=>B(this,null,function*(){let Xe=ft=>{_t(ft),C.sender.cleanup(Ce),Ae==null||Ae.dispose()},De=ft=>{Se(ft),C.sender.cleanup(Ce),Ae==null||Ae.dispose()},et={method:W,timerStart:Date.now(),resolve:Xe,reject:De};try{yield e.write(Ze),m.set(Ce,et)}catch(ft){throw i.error("Sending request failed."),et.reject(new ae.ResponseError(ae.ErrorCodes.MessageWriteError,ft.message?ft.message:"Unknown reason")),ft}}))},onRequest:(R,F)=>{Hs();let W=null;return bd.is(R)?(W=void 0,a=R):He.string(R)?(W=null,F!==void 0&&(W=R,c.set(R,{handler:F,type:void 0}))):F!==void 0&&(W=R.method,c.set(R.method,{type:R,handler:F})),{dispose:()=>{W!==null&&(W!==void 0?c.delete(W):a=void 0)}}},hasPendingResponse:()=>m.size>0,trace:(R,F,W)=>B(this,null,function*(){let X=!1,Me=Qt.Text;W!==void 0&&(He.boolean(W)?X=W:(X=W.sendNotification||!1,Me=W.traceFormat||Qt.Text)),_=R,w=Me,_===_e.Off?k=void 0:k=F,X&&!oe()&&!Pe()&&(yield ki.sendNotification(vd.type,{value:_e.toString(R)}))}),onError:x.event,onClose:T.event,onUnhandledNotification:P.event,onDispose:I.event,end:()=>{e.end()},dispose:()=>{if(Pe())return;y=bn.Disposed,I.fire(void 0);let R=new ae.ResponseError(ae.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let F of m.values())F.reject(R);m=new Map,v=new Map,b=new Set,f=new Bv.LinkedMap,He.func(e.dispose)&&e.dispose(),He.func(n.dispose)&&n.dispose()},listen:()=>{Hs(),QI(),y=bn.Listening,n.listen(UI)},inspect:()=>{(0,Uv.default)().console.log("inspect")}};return ki.onNotification(La.type,R=>{if(_===_e.Off||!k)return;let F=_===_e.Verbose||_===_e.Compact;k.log(R.message,F?R.verbose:void 0)}),ki.onNotification(Js.type,R=>{let F=h.get(R.token);F?F(R.value):A.fire(R)}),ki}pe.createMessageConnection=wE});var Ua=S(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.ProgressType=M.ProgressToken=M.createMessageConnection=M.NullLogger=M.ConnectionOptions=M.ConnectionStrategy=M.AbstractMessageBuffer=M.WriteableStreamMessageWriter=M.AbstractMessageWriter=M.MessageWriter=M.ReadableStreamMessageReader=M.AbstractMessageReader=M.MessageReader=M.SharedArrayReceiverStrategy=M.SharedArraySenderStrategy=M.CancellationToken=M.CancellationTokenSource=M.Emitter=M.Event=M.Disposable=M.LRUCache=M.Touch=M.LinkedMap=M.ParameterStructures=M.NotificationType9=M.NotificationType8=M.NotificationType7=M.NotificationType6=M.NotificationType5=M.NotificationType4=M.NotificationType3=M.NotificationType2=M.NotificationType1=M.NotificationType0=M.NotificationType=M.ErrorCodes=M.ResponseError=M.RequestType9=M.RequestType8=M.RequestType7=M.RequestType6=M.RequestType5=M.RequestType4=M.RequestType3=M.RequestType2=M.RequestType1=M.RequestType0=M.RequestType=M.Message=M.RAL=void 0;M.MessageStrategy=M.CancellationStrategy=M.CancellationSenderStrategy=M.CancellationReceiverStrategy=M.ConnectionError=M.ConnectionErrors=M.LogTraceNotification=M.SetTraceNotification=M.TraceFormat=M.TraceValues=M.Trace=void 0;var je=Gp();Object.defineProperty(M,"Message",{enumerable:!0,get:function(){return je.Message}});Object.defineProperty(M,"RequestType",{enumerable:!0,get:function(){return je.RequestType}});Object.defineProperty(M,"RequestType0",{enumerable:!0,get:function(){return je.RequestType0}});Object.defineProperty(M,"RequestType1",{enumerable:!0,get:function(){return je.RequestType1}});Object.defineProperty(M,"RequestType2",{enumerable:!0,get:function(){return je.RequestType2}});Object.defineProperty(M,"RequestType3",{enumerable:!0,get:function(){return je.RequestType3}});Object.defineProperty(M,"RequestType4",{enumerable:!0,get:function(){return je.RequestType4}});Object.defineProperty(M,"RequestType5",{enumerable:!0,get:function(){return je.RequestType5}});Object.defineProperty(M,"RequestType6",{enumerable:!0,get:function(){return je.RequestType6}});Object.defineProperty(M,"RequestType7",{enumerable:!0,get:function(){return je.RequestType7}});Object.defineProperty(M,"RequestType8",{enumerable:!0,get:function(){return je.RequestType8}});Object.defineProperty(M,"RequestType9",{enumerable:!0,get:function(){return je.RequestType9}});Object.defineProperty(M,"ResponseError",{enumerable:!0,get:function(){return je.ResponseError}});Object.defineProperty(M,"ErrorCodes",{enumerable:!0,get:function(){return je.ErrorCodes}});Object.defineProperty(M,"NotificationType",{enumerable:!0,get:function(){return je.NotificationType}});Object.defineProperty(M,"NotificationType0",{enumerable:!0,get:function(){return je.NotificationType0}});Object.defineProperty(M,"NotificationType1",{enumerable:!0,get:function(){return je.NotificationType1}});Object.defineProperty(M,"NotificationType2",{enumerable:!0,get:function(){return je.NotificationType2}});Object.defineProperty(M,"NotificationType3",{enumerable:!0,get:function(){return je.NotificationType3}});Object.defineProperty(M,"NotificationType4",{enumerable:!0,get:function(){return je.NotificationType4}});Object.defineProperty(M,"NotificationType5",{enumerable:!0,get:function(){return je.NotificationType5}});Object.defineProperty(M,"NotificationType6",{enumerable:!0,get:function(){return je.NotificationType6}});Object.defineProperty(M,"NotificationType7",{enumerable:!0,get:function(){return je.NotificationType7}});Object.defineProperty(M,"NotificationType8",{enumerable:!0,get:function(){return je.NotificationType8}});Object.defineProperty(M,"NotificationType9",{enumerable:!0,get:function(){return je.NotificationType9}});Object.defineProperty(M,"ParameterStructures",{enumerable:!0,get:function(){return je.ParameterStructures}});var xd=Yp();Object.defineProperty(M,"LinkedMap",{enumerable:!0,get:function(){return xd.LinkedMap}});Object.defineProperty(M,"LRUCache",{enumerable:!0,get:function(){return xd.LRUCache}});Object.defineProperty(M,"Touch",{enumerable:!0,get:function(){return xd.Touch}});var xE=Cv();Object.defineProperty(M,"Disposable",{enumerable:!0,get:function(){return xE.Disposable}});var zv=Ii();Object.defineProperty(M,"Event",{enumerable:!0,get:function(){return zv.Event}});Object.defineProperty(M,"Emitter",{enumerable:!0,get:function(){return zv.Emitter}});var Gv=Ca();Object.defineProperty(M,"CancellationTokenSource",{enumerable:!0,get:function(){return Gv.CancellationTokenSource}});Object.defineProperty(M,"CancellationToken",{enumerable:!0,get:function(){return Gv.CancellationToken}});var Kv=Av();Object.defineProperty(M,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return Kv.SharedArraySenderStrategy}});Object.defineProperty(M,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return Kv.SharedArrayReceiverStrategy}});var kd=jv();Object.defineProperty(M,"MessageReader",{enumerable:!0,get:function(){return kd.MessageReader}});Object.defineProperty(M,"AbstractMessageReader",{enumerable:!0,get:function(){return kd.AbstractMessageReader}});Object.defineProperty(M,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return kd.ReadableStreamMessageReader}});var Td=Nv();Object.defineProperty(M,"MessageWriter",{enumerable:!0,get:function(){return Td.MessageWriter}});Object.defineProperty(M,"AbstractMessageWriter",{enumerable:!0,get:function(){return Td.AbstractMessageWriter}});Object.defineProperty(M,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Td.WriteableStreamMessageWriter}});var kE=$v();Object.defineProperty(M,"AbstractMessageBuffer",{enumerable:!0,get:function(){return kE.AbstractMessageBuffer}});var wt=Hv();Object.defineProperty(M,"ConnectionStrategy",{enumerable:!0,get:function(){return wt.ConnectionStrategy}});Object.defineProperty(M,"ConnectionOptions",{enumerable:!0,get:function(){return wt.ConnectionOptions}});Object.defineProperty(M,"NullLogger",{enumerable:!0,get:function(){return wt.NullLogger}});Object.defineProperty(M,"createMessageConnection",{enumerable:!0,get:function(){return wt.createMessageConnection}});Object.defineProperty(M,"ProgressToken",{enumerable:!0,get:function(){return wt.ProgressToken}});Object.defineProperty(M,"ProgressType",{enumerable:!0,get:function(){return wt.ProgressType}});Object.defineProperty(M,"Trace",{enumerable:!0,get:function(){return wt.Trace}});Object.defineProperty(M,"TraceValues",{enumerable:!0,get:function(){return wt.TraceValues}});Object.defineProperty(M,"TraceFormat",{enumerable:!0,get:function(){return wt.TraceFormat}});Object.defineProperty(M,"SetTraceNotification",{enumerable:!0,get:function(){return wt.SetTraceNotification}});Object.defineProperty(M,"LogTraceNotification",{enumerable:!0,get:function(){return wt.LogTraceNotification}});Object.defineProperty(M,"ConnectionErrors",{enumerable:!0,get:function(){return wt.ConnectionErrors}});Object.defineProperty(M,"ConnectionError",{enumerable:!0,get:function(){return wt.ConnectionError}});Object.defineProperty(M,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return wt.CancellationReceiverStrategy}});Object.defineProperty(M,"CancellationSenderStrategy",{enumerable:!0,get:function(){return wt.CancellationSenderStrategy}});Object.defineProperty(M,"CancellationStrategy",{enumerable:!0,get:function(){return wt.CancellationStrategy}});Object.defineProperty(M,"MessageStrategy",{enumerable:!0,get:function(){return wt.MessageStrategy}});var TE=hr();M.RAL=TE.default});var Qv=S(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});var Pn=Ua(),Ba=class n extends Pn.AbstractMessageBuffer{constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return n.emptyBuffer}fromString(e,r){return new TextEncoder().encode(e)}toString(e,r){return r==="ascii"?this.asciiDecoder.decode(e):new TextDecoder(r).decode(e)}asNative(e,r){return r===void 0?e:e.slice(0,r)}allocNative(e){return new Uint8Array(e)}};Ba.emptyBuffer=new Uint8Array(0);var Sd=class{constructor(e){this.socket=e,this._onData=new Pn.Emitter,this._messageListener=r=>{r.data.arrayBuffer().then(i=>{this._onData.fire(new Uint8Array(i))},()=>{(0,Pn.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),Pn.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),Pn.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),Pn.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}},Id=class{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),Pn.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),Pn.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),Pn.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,r){if(typeof e=="string"){if(r!==void 0&&r!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${r}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}},SE=new TextEncoder,Yv=Object.freeze({messageBuffer:Object.freeze({create:n=>new Ba(n)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(n,e)=>{if(e.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${e.charset}`);return Promise.resolve(SE.encode(JSON.stringify(n,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(n,e)=>{if(!(n instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(e.charset).decode(n)))}})}),stream:Object.freeze({asReadableStream:n=>new Sd(n),asWritableStream:n=>new Id(n)}),console,timer:Object.freeze({setTimeout(n,e,...r){let t=setTimeout(n,e,...r);return{dispose:()=>clearTimeout(t)}},setImmediate(n,...e){let r=setTimeout(n,0,...e);return{dispose:()=>clearTimeout(r)}},setInterval(n,e,...r){let t=setInterval(n,e,...r);return{dispose:()=>clearInterval(t)}}})});function Ed(){return Yv}(function(n){function e(){Pn.RAL.install(Yv)}n.install=e})(Ed||(Ed={}));Rd.default=Ed});var zr=S(Jt=>{"use strict";var IE=Jt&&Jt.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),EE=Jt&&Jt.__exportStar||function(n,e){for(var r in n)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&IE(e,n,r)};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.createMessageConnection=Jt.BrowserMessageWriter=Jt.BrowserMessageReader=void 0;var RE=Qv();RE.default.install();var Oi=Ua();EE(Ua(),Jt);var Pd=class extends Oi.AbstractMessageReader{constructor(e){super(),this._onData=new Oi.Emitter,this._messageListener=r=>{this._onData.fire(r.data)},e.addEventListener("error",r=>this.fireError(r)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}};Jt.BrowserMessageReader=Pd;var Cd=class extends Oi.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",r=>this.fireError(r))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(r){return this.handleError(r,e),Promise.reject(r)}}handleError(e,r){this.errorCount++,this.fireError(e,r,this.errorCount)}end(){}};Jt.BrowserMessageWriter=Cd;function PE(n,e,r,t){return r===void 0&&(r=Oi.NullLogger),Oi.ConnectionStrategy.is(t)&&(t={connectionStrategy:t}),(0,Oi.createMessageConnection)(n,e,r,t)}Jt.createMessageConnection=PE});var Od=S((M2,Jv)=>{"use strict";Jv.exports=zr()});var Ja={};Gs(Ja,{AnnotatedTextEdit:()=>Qn,ChangeAnnotation:()=>Gr,ChangeAnnotationIdentifier:()=>xt,CodeAction:()=>dh,CodeActionContext:()=>ph,CodeActionKind:()=>ch,CodeActionTriggerKind:()=>oo,CodeDescription:()=>Ud,CodeLens:()=>hh,Color:()=>Va,ColorInformation:()=>Ld,ColorPresentation:()=>Md,Command:()=>Kr,CompletionItem:()=>Zd,CompletionItemKind:()=>zd,CompletionItemLabelDetails:()=>Jd,CompletionItemTag:()=>Kd,CompletionList:()=>Xd,CreateFile:()=>Di,DeleteFile:()=>Li,Diagnostic:()=>no,DiagnosticRelatedInformation:()=>Ha,DiagnosticSeverity:()=>Nd,DiagnosticTag:()=>$d,DocumentHighlight:()=>ih,DocumentHighlightKind:()=>rh,DocumentLink:()=>mh,DocumentSymbol:()=>uh,DocumentUri:()=>Ad,EOL:()=>CE,FoldingRange:()=>Fd,FoldingRangeKind:()=>qd,FormattingOptions:()=>fh,Hover:()=>eh,InlayHint:()=>Th,InlayHintKind:()=>Ya,InlayHintLabelPart:()=>Qa,InlineCompletionContext:()=>Ch,InlineCompletionItem:()=>Ih,InlineCompletionList:()=>Eh,InlineCompletionTriggerKind:()=>Rh,InlineValueContext:()=>kh,InlineValueEvaluatableExpression:()=>xh,InlineValueText:()=>_h,InlineValueVariableLookup:()=>wh,InsertReplaceEdit:()=>Yd,InsertTextFormat:()=>Gd,InsertTextMode:()=>Qd,Location:()=>to,LocationLink:()=>jd,MarkedString:()=>so,MarkupContent:()=>Mi,MarkupKind:()=>Ka,OptionalVersionedTextDocumentIdentifier:()=>io,ParameterInformation:()=>th,Position:()=>an,Range:()=>ze,RenameFile:()=>ji,SelectedCompletionInfo:()=>Ph,SelectionRange:()=>gh,SemanticTokenModifiers:()=>bh,SemanticTokenTypes:()=>yh,SemanticTokens:()=>vh,SignatureInformation:()=>nh,StringValue:()=>Sh,SymbolInformation:()=>ah,SymbolKind:()=>sh,SymbolTag:()=>oh,TextDocument:()=>Ah,TextDocumentEdit:()=>ro,TextDocumentIdentifier:()=>Wd,TextDocumentItem:()=>Hd,TextEdit:()=>Cn,URI:()=>Wa,VersionedTextDocumentIdentifier:()=>Vd,WorkspaceChange:()=>Bd,WorkspaceEdit:()=>za,WorkspaceFolder:()=>Oh,WorkspaceSymbol:()=>lh,integer:()=>Dd,uinteger:()=>eo});var Ad,Wa,Dd,eo,an,ze,to,jd,Va,Ld,Md,qd,Fd,Ha,Nd,$d,Ud,no,Kr,Cn,Gr,xt,Qn,ro,Di,ji,Li,za,Ai,Ga,Bd,Wd,Vd,io,Hd,Ka,Mi,zd,Gd,Kd,Yd,Qd,Jd,Zd,Xd,so,eh,th,nh,rh,ih,sh,oh,ah,lh,uh,ch,oo,ph,dh,hh,fh,mh,gh,yh,bh,vh,_h,wh,xh,kh,Ya,Qa,Th,Sh,Ih,Eh,Rh,Ph,Ch,Oh,CE,Ah,Dh,D,Za=cr(()=>{"use strict";(function(n){function e(r){return typeof r=="string"}n.is=e})(Ad||(Ad={}));(function(n){function e(r){return typeof r=="string"}n.is=e})(Wa||(Wa={}));(function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&n.MIN_VALUE<=r&&r<=n.MAX_VALUE}n.is=e})(Dd||(Dd={}));(function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&n.MIN_VALUE<=r&&r<=n.MAX_VALUE}n.is=e})(eo||(eo={}));(function(n){function e(t,i){return t===Number.MAX_VALUE&&(t=eo.MAX_VALUE),i===Number.MAX_VALUE&&(i=eo.MAX_VALUE),{line:t,character:i}}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&D.uinteger(i.line)&&D.uinteger(i.character)}n.is=r})(an||(an={}));(function(n){function e(t,i,s,o){if(D.uinteger(t)&&D.uinteger(i)&&D.uinteger(s)&&D.uinteger(o))return{start:an.create(t,i),end:an.create(s,o)};if(an.is(t)&&an.is(i))return{start:t,end:i};throw new Error(`Range#create called with invalid arguments[${t}, ${i}, ${s}, ${o}]`)}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&an.is(i.start)&&an.is(i.end)}n.is=r})(ze||(ze={}));(function(n){function e(t,i){return{uri:t,range:i}}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&ze.is(i.range)&&(D.string(i.uri)||D.undefined(i.uri))}n.is=r})(to||(to={}));(function(n){function e(t,i,s,o){return{targetUri:t,targetRange:i,targetSelectionRange:s,originSelectionRange:o}}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&ze.is(i.targetRange)&&D.string(i.targetUri)&&ze.is(i.targetSelectionRange)&&(ze.is(i.originSelectionRange)||D.undefined(i.originSelectionRange))}n.is=r})(jd||(jd={}));(function(n){function e(t,i,s,o){return{red:t,green:i,blue:s,alpha:o}}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&D.numberRange(i.red,0,1)&&D.numberRange(i.green,0,1)&&D.numberRange(i.blue,0,1)&&D.numberRange(i.alpha,0,1)}n.is=r})(Va||(Va={}));(function(n){function e(t,i){return{range:t,color:i}}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&ze.is(i.range)&&Va.is(i.color)}n.is=r})(Ld||(Ld={}));(function(n){function e(t,i,s){return{label:t,textEdit:i,additionalTextEdits:s}}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&D.string(i.label)&&(D.undefined(i.textEdit)||Cn.is(i))&&(D.undefined(i.additionalTextEdits)||D.typedArray(i.additionalTextEdits,Cn.is))}n.is=r})(Md||(Md={}));(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(qd||(qd={}));(function(n){function e(t,i,s,o,l,u){let a={startLine:t,endLine:i};return D.defined(s)&&(a.startCharacter=s),D.defined(o)&&(a.endCharacter=o),D.defined(l)&&(a.kind=l),D.defined(u)&&(a.collapsedText=u),a}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&D.uinteger(i.startLine)&&D.uinteger(i.startLine)&&(D.undefined(i.startCharacter)||D.uinteger(i.startCharacter))&&(D.undefined(i.endCharacter)||D.uinteger(i.endCharacter))&&(D.undefined(i.kind)||D.string(i.kind))}n.is=r})(Fd||(Fd={}));(function(n){function e(t,i){return{location:t,message:i}}n.create=e;function r(t){let i=t;return D.defined(i)&&to.is(i.location)&&D.string(i.message)}n.is=r})(Ha||(Ha={}));(function(n){n.Error=1,n.Warning=2,n.Information=3,n.Hint=4})(Nd||(Nd={}));(function(n){n.Unnecessary=1,n.Deprecated=2})($d||($d={}));(function(n){function e(r){let t=r;return D.objectLiteral(t)&&D.string(t.href)}n.is=e})(Ud||(Ud={}));(function(n){function e(t,i,s,o,l,u){let a={range:t,message:i};return D.defined(s)&&(a.severity=s),D.defined(o)&&(a.code=o),D.defined(l)&&(a.source=l),D.defined(u)&&(a.relatedInformation=u),a}n.create=e;function r(t){var i;let s=t;return D.defined(s)&&ze.is(s.range)&&D.string(s.message)&&(D.number(s.severity)||D.undefined(s.severity))&&(D.integer(s.code)||D.string(s.code)||D.undefined(s.code))&&(D.undefined(s.codeDescription)||D.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(D.string(s.source)||D.undefined(s.source))&&(D.undefined(s.relatedInformation)||D.typedArray(s.relatedInformation,Ha.is))}n.is=r})(no||(no={}));(function(n){function e(t,i,...s){let o={title:t,command:i};return D.defined(s)&&s.length>0&&(o.arguments=s),o}n.create=e;function r(t){let i=t;return D.defined(i)&&D.string(i.title)&&D.string(i.command)}n.is=r})(Kr||(Kr={}));(function(n){function e(s,o){return{range:s,newText:o}}n.replace=e;function r(s,o){return{range:{start:s,end:s},newText:o}}n.insert=r;function t(s){return{range:s,newText:""}}n.del=t;function i(s){let o=s;return D.objectLiteral(o)&&D.string(o.newText)&&ze.is(o.range)}n.is=i})(Cn||(Cn={}));(function(n){function e(t,i,s){let o={label:t};return i!==void 0&&(o.needsConfirmation=i),s!==void 0&&(o.description=s),o}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&D.string(i.label)&&(D.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(D.string(i.description)||i.description===void 0)}n.is=r})(Gr||(Gr={}));(function(n){function e(r){let t=r;return D.string(t)}n.is=e})(xt||(xt={}));(function(n){function e(s,o,l){return{range:s,newText:o,annotationId:l}}n.replace=e;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}n.insert=r;function t(s,o){return{range:s,newText:"",annotationId:o}}n.del=t;function i(s){let o=s;return Cn.is(o)&&(Gr.is(o.annotationId)||xt.is(o.annotationId))}n.is=i})(Qn||(Qn={}));(function(n){function e(t,i){return{textDocument:t,edits:i}}n.create=e;function r(t){let i=t;return D.defined(i)&&io.is(i.textDocument)&&Array.isArray(i.edits)}n.is=r})(ro||(ro={}));(function(n){function e(t,i,s){let o={kind:"create",uri:t};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}n.create=e;function r(t){let i=t;return i&&i.kind==="create"&&D.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||D.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||D.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||xt.is(i.annotationId))}n.is=r})(Di||(Di={}));(function(n){function e(t,i,s,o){let l={kind:"rename",oldUri:t,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}n.create=e;function r(t){let i=t;return i&&i.kind==="rename"&&D.string(i.oldUri)&&D.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||D.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||D.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||xt.is(i.annotationId))}n.is=r})(ji||(ji={}));(function(n){function e(t,i,s){let o={kind:"delete",uri:t};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}n.create=e;function r(t){let i=t;return i&&i.kind==="delete"&&D.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||D.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||D.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||xt.is(i.annotationId))}n.is=r})(Li||(Li={}));(function(n){function e(r){let t=r;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(i=>D.string(i.kind)?Di.is(i)||ji.is(i)||Li.is(i):ro.is(i)))}n.is=e})(za||(za={}));Ai=class{constructor(e,r){this.edits=e,this.changeAnnotations=r}insert(e,r,t){let i,s;if(t===void 0?i=Cn.insert(e,r):xt.is(t)?(s=t,i=Qn.insert(e,r,t)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(t),i=Qn.insert(e,r,s)),this.edits.push(i),s!==void 0)return s}replace(e,r,t){let i,s;if(t===void 0?i=Cn.replace(e,r):xt.is(t)?(s=t,i=Qn.replace(e,r,t)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(t),i=Qn.replace(e,r,s)),this.edits.push(i),s!==void 0)return s}delete(e,r){let t,i;if(r===void 0?t=Cn.del(e):xt.is(r)?(i=r,t=Qn.del(e,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),t=Qn.del(e,i)),this.edits.push(t),i!==void 0)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},Ga=class{constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,r){let t;if(xt.is(e)?t=e:(t=this.nextId(),r=e),this._annotations[t]!==void 0)throw new Error(`Id ${t} is already in use.`);if(r===void 0)throw new Error(`No annotation provided for id ${t}`);return this._annotations[t]=r,this._size++,t}nextId(){return this._counter++,this._counter.toString()}},Bd=class{constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ga(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(r=>{if(ro.is(r)){let t=new Ai(r.edits,this._changeAnnotations);this._textEditChanges[r.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(r=>{let t=new Ai(e.changes[r]);this._textEditChanges[r]=t})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(io.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let r={uri:e.uri,version:e.version},t=this._textEditChanges[r.uri];if(!t){let i=[],s={textDocument:r,edits:i};this._workspaceEdit.documentChanges.push(s),t=new Ai(i,this._changeAnnotations),this._textEditChanges[r.uri]=t}return t}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let r=this._textEditChanges[e];if(!r){let t=[];this._workspaceEdit.changes[e]=t,r=new Ai(t),this._textEditChanges[e]=r}return r}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ga,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,r,t){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;Gr.is(r)||xt.is(r)?i=r:t=r;let s,o;if(i===void 0?s=Di.create(e,t):(o=xt.is(i)?i:this._changeAnnotations.manage(i),s=Di.create(e,t,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}renameFile(e,r,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let s;Gr.is(t)||xt.is(t)?s=t:i=t;let o,l;if(s===void 0?o=ji.create(e,r,i):(l=xt.is(s)?s:this._changeAnnotations.manage(s),o=ji.create(e,r,i,l)),this._workspaceEdit.documentChanges.push(o),l!==void 0)return l}deleteFile(e,r,t){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;Gr.is(r)||xt.is(r)?i=r:t=r;let s,o;if(i===void 0?s=Li.create(e,t):(o=xt.is(i)?i:this._changeAnnotations.manage(i),s=Li.create(e,t,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}};(function(n){function e(t){return{uri:t}}n.create=e;function r(t){let i=t;return D.defined(i)&&D.string(i.uri)}n.is=r})(Wd||(Wd={}));(function(n){function e(t,i){return{uri:t,version:i}}n.create=e;function r(t){let i=t;return D.defined(i)&&D.string(i.uri)&&D.integer(i.version)}n.is=r})(Vd||(Vd={}));(function(n){function e(t,i){return{uri:t,version:i}}n.create=e;function r(t){let i=t;return D.defined(i)&&D.string(i.uri)&&(i.version===null||D.integer(i.version))}n.is=r})(io||(io={}));(function(n){function e(t,i,s,o){return{uri:t,languageId:i,version:s,text:o}}n.create=e;function r(t){let i=t;return D.defined(i)&&D.string(i.uri)&&D.string(i.languageId)&&D.integer(i.version)&&D.string(i.text)}n.is=r})(Hd||(Hd={}));(function(n){n.PlainText="plaintext",n.Markdown="markdown";function e(r){let t=r;return t===n.PlainText||t===n.Markdown}n.is=e})(Ka||(Ka={}));(function(n){function e(r){let t=r;return D.objectLiteral(r)&&Ka.is(t.kind)&&D.string(t.value)}n.is=e})(Mi||(Mi={}));(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(zd||(zd={}));(function(n){n.PlainText=1,n.Snippet=2})(Gd||(Gd={}));(function(n){n.Deprecated=1})(Kd||(Kd={}));(function(n){function e(t,i,s){return{newText:t,insert:i,replace:s}}n.create=e;function r(t){let i=t;return i&&D.string(i.newText)&&ze.is(i.insert)&&ze.is(i.replace)}n.is=r})(Yd||(Yd={}));(function(n){n.asIs=1,n.adjustIndentation=2})(Qd||(Qd={}));(function(n){function e(r){let t=r;return t&&(D.string(t.detail)||t.detail===void 0)&&(D.string(t.description)||t.description===void 0)}n.is=e})(Jd||(Jd={}));(function(n){function e(r){return{label:r}}n.create=e})(Zd||(Zd={}));(function(n){function e(r,t){return{items:r||[],isIncomplete:!!t}}n.create=e})(Xd||(Xd={}));(function(n){function e(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=e;function r(t){let i=t;return D.string(i)||D.objectLiteral(i)&&D.string(i.language)&&D.string(i.value)}n.is=r})(so||(so={}));(function(n){function e(r){let t=r;return!!t&&D.objectLiteral(t)&&(Mi.is(t.contents)||so.is(t.contents)||D.typedArray(t.contents,so.is))&&(r.range===void 0||ze.is(r.range))}n.is=e})(eh||(eh={}));(function(n){function e(r,t){return t?{label:r,documentation:t}:{label:r}}n.create=e})(th||(th={}));(function(n){function e(r,t,...i){let s={label:r};return D.defined(t)&&(s.documentation=t),D.defined(i)?s.parameters=i:s.parameters=[],s}n.create=e})(nh||(nh={}));(function(n){n.Text=1,n.Read=2,n.Write=3})(rh||(rh={}));(function(n){function e(r,t){let i={range:r};return D.number(t)&&(i.kind=t),i}n.create=e})(ih||(ih={}));(function(n){n.File=1,n.Module=2,n.Namespace=3,n.Package=4,n.Class=5,n.Method=6,n.Property=7,n.Field=8,n.Constructor=9,n.Enum=10,n.Interface=11,n.Function=12,n.Variable=13,n.Constant=14,n.String=15,n.Number=16,n.Boolean=17,n.Array=18,n.Object=19,n.Key=20,n.Null=21,n.EnumMember=22,n.Struct=23,n.Event=24,n.Operator=25,n.TypeParameter=26})(sh||(sh={}));(function(n){n.Deprecated=1})(oh||(oh={}));(function(n){function e(r,t,i,s,o){let l={name:r,kind:t,location:{uri:s,range:i}};return o&&(l.containerName=o),l}n.create=e})(ah||(ah={}));(function(n){function e(r,t,i,s){return s!==void 0?{name:r,kind:t,location:{uri:i,range:s}}:{name:r,kind:t,location:{uri:i}}}n.create=e})(lh||(lh={}));(function(n){function e(t,i,s,o,l,u){let a={name:t,detail:i,kind:s,range:o,selectionRange:l};return u!==void 0&&(a.children=u),a}n.create=e;function r(t){let i=t;return i&&D.string(i.name)&&D.number(i.kind)&&ze.is(i.range)&&ze.is(i.selectionRange)&&(i.detail===void 0||D.string(i.detail))&&(i.deprecated===void 0||D.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}n.is=r})(uh||(uh={}));(function(n){n.Empty="",n.QuickFix="quickfix",n.Refactor="refactor",n.RefactorExtract="refactor.extract",n.RefactorInline="refactor.inline",n.RefactorRewrite="refactor.rewrite",n.Source="source",n.SourceOrganizeImports="source.organizeImports",n.SourceFixAll="source.fixAll"})(ch||(ch={}));(function(n){n.Invoked=1,n.Automatic=2})(oo||(oo={}));(function(n){function e(t,i,s){let o={diagnostics:t};return i!=null&&(o.only=i),s!=null&&(o.triggerKind=s),o}n.create=e;function r(t){let i=t;return D.defined(i)&&D.typedArray(i.diagnostics,no.is)&&(i.only===void 0||D.typedArray(i.only,D.string))&&(i.triggerKind===void 0||i.triggerKind===oo.Invoked||i.triggerKind===oo.Automatic)}n.is=r})(ph||(ph={}));(function(n){function e(t,i,s){let o={title:t},l=!0;return typeof i=="string"?(l=!1,o.kind=i):Kr.is(i)?o.command=i:o.edit=i,l&&s!==void 0&&(o.kind=s),o}n.create=e;function r(t){let i=t;return i&&D.string(i.title)&&(i.diagnostics===void 0||D.typedArray(i.diagnostics,no.is))&&(i.kind===void 0||D.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Kr.is(i.command))&&(i.isPreferred===void 0||D.boolean(i.isPreferred))&&(i.edit===void 0||za.is(i.edit))}n.is=r})(dh||(dh={}));(function(n){function e(t,i){let s={range:t};return D.defined(i)&&(s.data=i),s}n.create=e;function r(t){let i=t;return D.defined(i)&&ze.is(i.range)&&(D.undefined(i.command)||Kr.is(i.command))}n.is=r})(hh||(hh={}));(function(n){function e(t,i){return{tabSize:t,insertSpaces:i}}n.create=e;function r(t){let i=t;return D.defined(i)&&D.uinteger(i.tabSize)&&D.boolean(i.insertSpaces)}n.is=r})(fh||(fh={}));(function(n){function e(t,i,s){return{range:t,target:i,data:s}}n.create=e;function r(t){let i=t;return D.defined(i)&&ze.is(i.range)&&(D.undefined(i.target)||D.string(i.target))}n.is=r})(mh||(mh={}));(function(n){function e(t,i){return{range:t,parent:i}}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&ze.is(i.range)&&(i.parent===void 0||n.is(i.parent))}n.is=r})(gh||(gh={}));(function(n){n.namespace="namespace",n.type="type",n.class="class",n.enum="enum",n.interface="interface",n.struct="struct",n.typeParameter="typeParameter",n.parameter="parameter",n.variable="variable",n.property="property",n.enumMember="enumMember",n.event="event",n.function="function",n.method="method",n.macro="macro",n.keyword="keyword",n.modifier="modifier",n.comment="comment",n.string="string",n.number="number",n.regexp="regexp",n.operator="operator",n.decorator="decorator"})(yh||(yh={}));(function(n){n.declaration="declaration",n.definition="definition",n.readonly="readonly",n.static="static",n.deprecated="deprecated",n.abstract="abstract",n.async="async",n.modification="modification",n.documentation="documentation",n.defaultLibrary="defaultLibrary"})(bh||(bh={}));(function(n){function e(r){let t=r;return D.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId=="string")&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]=="number")}n.is=e})(vh||(vh={}));(function(n){function e(t,i){return{range:t,text:i}}n.create=e;function r(t){let i=t;return i!=null&&ze.is(i.range)&&D.string(i.text)}n.is=r})(_h||(_h={}));(function(n){function e(t,i,s){return{range:t,variableName:i,caseSensitiveLookup:s}}n.create=e;function r(t){let i=t;return i!=null&&ze.is(i.range)&&D.boolean(i.caseSensitiveLookup)&&(D.string(i.variableName)||i.variableName===void 0)}n.is=r})(wh||(wh={}));(function(n){function e(t,i){return{range:t,expression:i}}n.create=e;function r(t){let i=t;return i!=null&&ze.is(i.range)&&(D.string(i.expression)||i.expression===void 0)}n.is=r})(xh||(xh={}));(function(n){function e(t,i){return{frameId:t,stoppedLocation:i}}n.create=e;function r(t){let i=t;return D.defined(i)&&ze.is(t.stoppedLocation)}n.is=r})(kh||(kh={}));(function(n){n.Type=1,n.Parameter=2;function e(r){return r===1||r===2}n.is=e})(Ya||(Ya={}));(function(n){function e(t){return{value:t}}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&(i.tooltip===void 0||D.string(i.tooltip)||Mi.is(i.tooltip))&&(i.location===void 0||to.is(i.location))&&(i.command===void 0||Kr.is(i.command))}n.is=r})(Qa||(Qa={}));(function(n){function e(t,i,s){let o={position:t,label:i};return s!==void 0&&(o.kind=s),o}n.create=e;function r(t){let i=t;return D.objectLiteral(i)&&an.is(i.position)&&(D.string(i.label)||D.typedArray(i.label,Qa.is))&&(i.kind===void 0||Ya.is(i.kind))&&i.textEdits===void 0||D.typedArray(i.textEdits,Cn.is)&&(i.tooltip===void 0||D.string(i.tooltip)||Mi.is(i.tooltip))&&(i.paddingLeft===void 0||D.boolean(i.paddingLeft))&&(i.paddingRight===void 0||D.boolean(i.paddingRight))}n.is=r})(Th||(Th={}));(function(n){function e(r){return{kind:"snippet",value:r}}n.createSnippet=e})(Sh||(Sh={}));(function(n){function e(r,t,i,s){return{insertText:r,filterText:t,range:i,command:s}}n.create=e})(Ih||(Ih={}));(function(n){function e(r){return{items:r}}n.create=e})(Eh||(Eh={}));(function(n){n.Invoked=0,n.Automatic=1})(Rh||(Rh={}));(function(n){function e(r,t){return{range:r,text:t}}n.create=e})(Ph||(Ph={}));(function(n){function e(r,t){return{triggerKind:r,selectedCompletionInfo:t}}n.create=e})(Ch||(Ch={}));(function(n){function e(r){let t=r;return D.objectLiteral(t)&&Wa.is(t.uri)&&D.string(t.name)}n.is=e})(Oh||(Oh={}));CE=[`
32
32
  `,`\r
33
33
  `,"\r"];(function(n){function e(s,o,l,u){return new Dh(s,o,l,u)}n.create=e;function r(s){let o=s;return!!(D.defined(o)&&D.string(o.uri)&&(D.undefined(o.languageId)||D.string(o.languageId))&&D.uinteger(o.lineCount)&&D.func(o.getText)&&D.func(o.positionAt)&&D.func(o.offsetAt))}n.is=r;function t(s,o){let l=s.getText(),u=i(o,(c,p)=>{let d=c.range.start.line-p.range.start.line;return d===0?c.range.start.character-p.range.start.character:d}),a=l.length;for(let c=u.length-1;c>=0;c--){let p=u[c],d=s.offsetAt(p.range.start),h=s.offsetAt(p.range.end);if(h<=a)l=l.substring(0,d)+p.newText+l.substring(h,l.length);else throw new Error("Overlapping edit");a=d}return l}n.applyEdits=t;function i(s,o){if(s.length<=1)return s;let l=s.length/2|0,u=s.slice(0,l),a=s.slice(l);i(u,o),i(a,o);let c=0,p=0,d=0;for(;c<u.length&&p<a.length;)o(u[c],a[p])<=0?s[d++]=u[c++]:s[d++]=a[p++];for(;c<u.length;)s[d++]=u[c++];for(;p<a.length;)s[d++]=a[p++];return s}})(Ah||(Ah={}));Dh=class{constructor(e,r,t,i){this._uri=e,this._languageId=r,this._version=t,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),t=this.offsetAt(e.end);return this._content.substring(r,t)}return this._content}update(e,r){this._content=e.text,this._version=r,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],r=this._content,t=!0;for(let i=0;i<r.length;i++){t&&(e.push(i),t=!1);let s=r.charAt(i);t=s==="\r"||s===`
34
34
  `,s==="\r"&&i+1<r.length&&r.charAt(i+1)===`
35
- `&&i++}t&&r.length>0&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),t=0,i=r.length;if(i===0)return an.create(0,e);for(;t<i;){let o=Math.floor((t+i)/2);r[o]>e?i=o:t=o+1}let s=t-1;return an.create(s,e-r[s])}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let t=r[e.line],i=e.line+1<r.length?r[e.line+1]:this._content.length;return Math.max(Math.min(t+e.character,i),t)}get lineCount(){return this.getLineOffsets().length}};(function(n){let e=Object.prototype.toString;function r(h){return typeof h!="undefined"}n.defined=r;function t(h){return typeof h=="undefined"}n.undefined=t;function i(h){return h===!0||h===!1}n.boolean=i;function s(h){return e.call(h)==="[object String]"}n.string=s;function o(h){return e.call(h)==="[object Number]"}n.number=o;function l(h,g,f){return e.call(h)==="[object Number]"&&g<=h&&h<=f}n.numberRange=l;function u(h){return e.call(h)==="[object Number]"&&-2147483648<=h&&h<=2147483647}n.integer=u;function a(h){return e.call(h)==="[object Number]"&&0<=h&&h<=2147483647}n.uinteger=a;function c(h){return e.call(h)==="[object Function]"}n.func=c;function p(h){return h!==null&&typeof h=="object"}n.objectLiteral=p;function d(h,g){return Array.isArray(h)&&h.every(g)}n.typedArray=d})(D||(D={}))});var $e=S(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.ProtocolNotificationType=Ut.ProtocolNotificationType0=Ut.ProtocolRequestType=Ut.ProtocolRequestType0=Ut.RegistrationType=Ut.MessageDirection=void 0;var qi=zr(),Zv;(function(n){n.clientToServer="clientToServer",n.serverToClient="serverToClient",n.both="both"})(Zv||(Ut.MessageDirection=Zv={}));var jh=class{constructor(e){this.method=e}};Ut.RegistrationType=jh;var Lh=class extends qi.RequestType0{constructor(e){super(e)}};Ut.ProtocolRequestType0=Lh;var Mh=class extends qi.RequestType{constructor(e){super(e,qi.ParameterStructures.byName)}};Ut.ProtocolRequestType=Mh;var qh=class extends qi.NotificationType0{constructor(e){super(e)}};Ut.ProtocolNotificationType0=qh;var Fh=class extends qi.NotificationType{constructor(e){super(e,qi.ParameterStructures.byName)}};Ut.ProtocolNotificationType=Fh});var Xa=S(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.objectLiteral=ot.typedArray=ot.stringArray=ot.array=ot.func=ot.error=ot.number=ot.string=ot.boolean=void 0;function OE(n){return n===!0||n===!1}ot.boolean=OE;function Xv(n){return typeof n=="string"||n instanceof String}ot.string=Xv;function AE(n){return typeof n=="number"||n instanceof Number}ot.number=AE;function DE(n){return n instanceof Error}ot.error=DE;function jE(n){return typeof n=="function"}ot.func=jE;function e_(n){return Array.isArray(n)}ot.array=e_;function LE(n){return e_(n)&&n.every(e=>Xv(e))}ot.stringArray=LE;function ME(n,e){return Array.isArray(n)&&n.every(e)}ot.typedArray=ME;function qE(n){return n!==null&&typeof n=="object"}ot.objectLiteral=qE});var r_=S(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.ImplementationRequest=void 0;var t_=$e(),n_;(function(n){n.method="textDocument/implementation",n.messageDirection=t_.MessageDirection.clientToServer,n.type=new t_.ProtocolRequestType(n.method)})(n_||(el.ImplementationRequest=n_={}))});var o_=S(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.TypeDefinitionRequest=void 0;var i_=$e(),s_;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=i_.MessageDirection.clientToServer,n.type=new i_.ProtocolRequestType(n.method)})(s_||(tl.TypeDefinitionRequest=s_={}))});var u_=S(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.DidChangeWorkspaceFoldersNotification=Fi.WorkspaceFoldersRequest=void 0;var nl=$e(),a_;(function(n){n.method="workspace/workspaceFolders",n.messageDirection=nl.MessageDirection.serverToClient,n.type=new nl.ProtocolRequestType0(n.method)})(a_||(Fi.WorkspaceFoldersRequest=a_={}));var l_;(function(n){n.method="workspace/didChangeWorkspaceFolders",n.messageDirection=nl.MessageDirection.clientToServer,n.type=new nl.ProtocolNotificationType(n.method)})(l_||(Fi.DidChangeWorkspaceFoldersNotification=l_={}))});var d_=S(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.ConfigurationRequest=void 0;var c_=$e(),p_;(function(n){n.method="workspace/configuration",n.messageDirection=c_.MessageDirection.serverToClient,n.type=new c_.ProtocolRequestType(n.method)})(p_||(rl.ConfigurationRequest=p_={}))});var m_=S(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.ColorPresentationRequest=Ni.DocumentColorRequest=void 0;var il=$e(),h_;(function(n){n.method="textDocument/documentColor",n.messageDirection=il.MessageDirection.clientToServer,n.type=new il.ProtocolRequestType(n.method)})(h_||(Ni.DocumentColorRequest=h_={}));var f_;(function(n){n.method="textDocument/colorPresentation",n.messageDirection=il.MessageDirection.clientToServer,n.type=new il.ProtocolRequestType(n.method)})(f_||(Ni.ColorPresentationRequest=f_={}))});var b_=S($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.FoldingRangeRefreshRequest=$i.FoldingRangeRequest=void 0;var sl=$e(),g_;(function(n){n.method="textDocument/foldingRange",n.messageDirection=sl.MessageDirection.clientToServer,n.type=new sl.ProtocolRequestType(n.method)})(g_||($i.FoldingRangeRequest=g_={}));var y_;(function(n){n.method="workspace/foldingRange/refresh",n.messageDirection=sl.MessageDirection.serverToClient,n.type=new sl.ProtocolRequestType0(n.method)})(y_||($i.FoldingRangeRefreshRequest=y_={}))});var w_=S(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});ol.DeclarationRequest=void 0;var v_=$e(),__;(function(n){n.method="textDocument/declaration",n.messageDirection=v_.MessageDirection.clientToServer,n.type=new v_.ProtocolRequestType(n.method)})(__||(ol.DeclarationRequest=__={}))});var T_=S(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.SelectionRangeRequest=void 0;var x_=$e(),k_;(function(n){n.method="textDocument/selectionRange",n.messageDirection=x_.MessageDirection.clientToServer,n.type=new x_.ProtocolRequestType(n.method)})(k_||(al.SelectionRangeRequest=k_={}))});var R_=S(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.WorkDoneProgressCancelNotification=gr.WorkDoneProgressCreateRequest=gr.WorkDoneProgress=void 0;var FE=zr(),ll=$e(),S_;(function(n){n.type=new FE.ProgressType;function e(r){return r===n.type}n.is=e})(S_||(gr.WorkDoneProgress=S_={}));var I_;(function(n){n.method="window/workDoneProgress/create",n.messageDirection=ll.MessageDirection.serverToClient,n.type=new ll.ProtocolRequestType(n.method)})(I_||(gr.WorkDoneProgressCreateRequest=I_={}));var E_;(function(n){n.method="window/workDoneProgress/cancel",n.messageDirection=ll.MessageDirection.clientToServer,n.type=new ll.ProtocolNotificationType(n.method)})(E_||(gr.WorkDoneProgressCancelNotification=E_={}))});var A_=S(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.CallHierarchyOutgoingCallsRequest=yr.CallHierarchyIncomingCallsRequest=yr.CallHierarchyPrepareRequest=void 0;var Ui=$e(),P_;(function(n){n.method="textDocument/prepareCallHierarchy",n.messageDirection=Ui.MessageDirection.clientToServer,n.type=new Ui.ProtocolRequestType(n.method)})(P_||(yr.CallHierarchyPrepareRequest=P_={}));var C_;(function(n){n.method="callHierarchy/incomingCalls",n.messageDirection=Ui.MessageDirection.clientToServer,n.type=new Ui.ProtocolRequestType(n.method)})(C_||(yr.CallHierarchyIncomingCallsRequest=C_={}));var O_;(function(n){n.method="callHierarchy/outgoingCalls",n.messageDirection=Ui.MessageDirection.clientToServer,n.type=new Ui.ProtocolRequestType(n.method)})(O_||(yr.CallHierarchyOutgoingCallsRequest=O_={}))});var F_=S(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.SemanticTokensRefreshRequest=Bt.SemanticTokensRangeRequest=Bt.SemanticTokensDeltaRequest=Bt.SemanticTokensRequest=Bt.SemanticTokensRegistrationType=Bt.TokenFormat=void 0;var Jn=$e(),D_;(function(n){n.Relative="relative"})(D_||(Bt.TokenFormat=D_={}));var ao;(function(n){n.method="textDocument/semanticTokens",n.type=new Jn.RegistrationType(n.method)})(ao||(Bt.SemanticTokensRegistrationType=ao={}));var j_;(function(n){n.method="textDocument/semanticTokens/full",n.messageDirection=Jn.MessageDirection.clientToServer,n.type=new Jn.ProtocolRequestType(n.method),n.registrationMethod=ao.method})(j_||(Bt.SemanticTokensRequest=j_={}));var L_;(function(n){n.method="textDocument/semanticTokens/full/delta",n.messageDirection=Jn.MessageDirection.clientToServer,n.type=new Jn.ProtocolRequestType(n.method),n.registrationMethod=ao.method})(L_||(Bt.SemanticTokensDeltaRequest=L_={}));var M_;(function(n){n.method="textDocument/semanticTokens/range",n.messageDirection=Jn.MessageDirection.clientToServer,n.type=new Jn.ProtocolRequestType(n.method),n.registrationMethod=ao.method})(M_||(Bt.SemanticTokensRangeRequest=M_={}));var q_;(function(n){n.method="workspace/semanticTokens/refresh",n.messageDirection=Jn.MessageDirection.serverToClient,n.type=new Jn.ProtocolRequestType0(n.method)})(q_||(Bt.SemanticTokensRefreshRequest=q_={}))});var U_=S(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.ShowDocumentRequest=void 0;var N_=$e(),$_;(function(n){n.method="window/showDocument",n.messageDirection=N_.MessageDirection.serverToClient,n.type=new N_.ProtocolRequestType(n.method)})($_||(ul.ShowDocumentRequest=$_={}))});var V_=S(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.LinkedEditingRangeRequest=void 0;var B_=$e(),W_;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=B_.MessageDirection.clientToServer,n.type=new B_.ProtocolRequestType(n.method)})(W_||(cl.LinkedEditingRangeRequest=W_={}))});var Z_=S(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.WillDeleteFilesRequest=Pt.DidDeleteFilesNotification=Pt.DidRenameFilesNotification=Pt.WillRenameFilesRequest=Pt.DidCreateFilesNotification=Pt.WillCreateFilesRequest=Pt.FileOperationPatternKind=void 0;var ln=$e(),H_;(function(n){n.file="file",n.folder="folder"})(H_||(Pt.FileOperationPatternKind=H_={}));var z_;(function(n){n.method="workspace/willCreateFiles",n.messageDirection=ln.MessageDirection.clientToServer,n.type=new ln.ProtocolRequestType(n.method)})(z_||(Pt.WillCreateFilesRequest=z_={}));var G_;(function(n){n.method="workspace/didCreateFiles",n.messageDirection=ln.MessageDirection.clientToServer,n.type=new ln.ProtocolNotificationType(n.method)})(G_||(Pt.DidCreateFilesNotification=G_={}));var K_;(function(n){n.method="workspace/willRenameFiles",n.messageDirection=ln.MessageDirection.clientToServer,n.type=new ln.ProtocolRequestType(n.method)})(K_||(Pt.WillRenameFilesRequest=K_={}));var Y_;(function(n){n.method="workspace/didRenameFiles",n.messageDirection=ln.MessageDirection.clientToServer,n.type=new ln.ProtocolNotificationType(n.method)})(Y_||(Pt.DidRenameFilesNotification=Y_={}));var Q_;(function(n){n.method="workspace/didDeleteFiles",n.messageDirection=ln.MessageDirection.clientToServer,n.type=new ln.ProtocolNotificationType(n.method)})(Q_||(Pt.DidDeleteFilesNotification=Q_={}));var J_;(function(n){n.method="workspace/willDeleteFiles",n.messageDirection=ln.MessageDirection.clientToServer,n.type=new ln.ProtocolRequestType(n.method)})(J_||(Pt.WillDeleteFilesRequest=J_={}))});var rw=S(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.MonikerRequest=br.MonikerKind=br.UniquenessLevel=void 0;var X_=$e(),ew;(function(n){n.document="document",n.project="project",n.group="group",n.scheme="scheme",n.global="global"})(ew||(br.UniquenessLevel=ew={}));var tw;(function(n){n.$import="import",n.$export="export",n.local="local"})(tw||(br.MonikerKind=tw={}));var nw;(function(n){n.method="textDocument/moniker",n.messageDirection=X_.MessageDirection.clientToServer,n.type=new X_.ProtocolRequestType(n.method)})(nw||(br.MonikerRequest=nw={}))});var aw=S(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.TypeHierarchySubtypesRequest=vr.TypeHierarchySupertypesRequest=vr.TypeHierarchyPrepareRequest=void 0;var Bi=$e(),iw;(function(n){n.method="textDocument/prepareTypeHierarchy",n.messageDirection=Bi.MessageDirection.clientToServer,n.type=new Bi.ProtocolRequestType(n.method)})(iw||(vr.TypeHierarchyPrepareRequest=iw={}));var sw;(function(n){n.method="typeHierarchy/supertypes",n.messageDirection=Bi.MessageDirection.clientToServer,n.type=new Bi.ProtocolRequestType(n.method)})(sw||(vr.TypeHierarchySupertypesRequest=sw={}));var ow;(function(n){n.method="typeHierarchy/subtypes",n.messageDirection=Bi.MessageDirection.clientToServer,n.type=new Bi.ProtocolRequestType(n.method)})(ow||(vr.TypeHierarchySubtypesRequest=ow={}))});var cw=S(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.InlineValueRefreshRequest=Wi.InlineValueRequest=void 0;var pl=$e(),lw;(function(n){n.method="textDocument/inlineValue",n.messageDirection=pl.MessageDirection.clientToServer,n.type=new pl.ProtocolRequestType(n.method)})(lw||(Wi.InlineValueRequest=lw={}));var uw;(function(n){n.method="workspace/inlineValue/refresh",n.messageDirection=pl.MessageDirection.serverToClient,n.type=new pl.ProtocolRequestType0(n.method)})(uw||(Wi.InlineValueRefreshRequest=uw={}))});var fw=S(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.InlayHintRefreshRequest=_r.InlayHintResolveRequest=_r.InlayHintRequest=void 0;var Vi=$e(),pw;(function(n){n.method="textDocument/inlayHint",n.messageDirection=Vi.MessageDirection.clientToServer,n.type=new Vi.ProtocolRequestType(n.method)})(pw||(_r.InlayHintRequest=pw={}));var dw;(function(n){n.method="inlayHint/resolve",n.messageDirection=Vi.MessageDirection.clientToServer,n.type=new Vi.ProtocolRequestType(n.method)})(dw||(_r.InlayHintResolveRequest=dw={}));var hw;(function(n){n.method="workspace/inlayHint/refresh",n.messageDirection=Vi.MessageDirection.serverToClient,n.type=new Vi.ProtocolRequestType0(n.method)})(hw||(_r.InlayHintRefreshRequest=hw={}))});var ww=S(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.DiagnosticRefreshRequest=un.WorkspaceDiagnosticRequest=un.DocumentDiagnosticRequest=un.DocumentDiagnosticReportKind=un.DiagnosticServerCancellationData=void 0;var _w=zr(),NE=Xa(),Hi=$e(),mw;(function(n){function e(r){let t=r;return t&&NE.boolean(t.retriggerRequest)}n.is=e})(mw||(un.DiagnosticServerCancellationData=mw={}));var gw;(function(n){n.Full="full",n.Unchanged="unchanged"})(gw||(un.DocumentDiagnosticReportKind=gw={}));var yw;(function(n){n.method="textDocument/diagnostic",n.messageDirection=Hi.MessageDirection.clientToServer,n.type=new Hi.ProtocolRequestType(n.method),n.partialResult=new _w.ProgressType})(yw||(un.DocumentDiagnosticRequest=yw={}));var bw;(function(n){n.method="workspace/diagnostic",n.messageDirection=Hi.MessageDirection.clientToServer,n.type=new Hi.ProtocolRequestType(n.method),n.partialResult=new _w.ProgressType})(bw||(un.WorkspaceDiagnosticRequest=bw={}));var vw;(function(n){n.method="workspace/diagnostic/refresh",n.messageDirection=Hi.MessageDirection.serverToClient,n.type=new Hi.ProtocolRequestType0(n.method)})(vw||(un.DiagnosticRefreshRequest=vw={}))});var Rw=S(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.DidCloseNotebookDocumentNotification=Ge.DidSaveNotebookDocumentNotification=Ge.DidChangeNotebookDocumentNotification=Ge.NotebookCellArrayChange=Ge.DidOpenNotebookDocumentNotification=Ge.NotebookDocumentSyncRegistrationType=Ge.NotebookDocument=Ge.NotebookCell=Ge.ExecutionSummary=Ge.NotebookCellKind=void 0;var lo=(Za(),mt(Ja)),vn=Xa(),On=$e(),Nh;(function(n){n.Markup=1,n.Code=2;function e(r){return r===1||r===2}n.is=e})(Nh||(Ge.NotebookCellKind=Nh={}));var $h;(function(n){function e(i,s){let o={executionOrder:i};return(s===!0||s===!1)&&(o.success=s),o}n.create=e;function r(i){let s=i;return vn.objectLiteral(s)&&lo.uinteger.is(s.executionOrder)&&(s.success===void 0||vn.boolean(s.success))}n.is=r;function t(i,s){return i===s?!0:i==null||s===null||s===void 0?!1:i.executionOrder===s.executionOrder&&i.success===s.success}n.equals=t})($h||(Ge.ExecutionSummary=$h={}));var dl;(function(n){function e(s,o){return{kind:s,document:o}}n.create=e;function r(s){let o=s;return vn.objectLiteral(o)&&Nh.is(o.kind)&&lo.DocumentUri.is(o.document)&&(o.metadata===void 0||vn.objectLiteral(o.metadata))}n.is=r;function t(s,o){let l=new Set;return s.document!==o.document&&l.add("document"),s.kind!==o.kind&&l.add("kind"),s.executionSummary!==o.executionSummary&&l.add("executionSummary"),(s.metadata!==void 0||o.metadata!==void 0)&&!i(s.metadata,o.metadata)&&l.add("metadata"),(s.executionSummary!==void 0||o.executionSummary!==void 0)&&!$h.equals(s.executionSummary,o.executionSummary)&&l.add("executionSummary"),l}n.diff=t;function i(s,o){if(s===o)return!0;if(s==null||o===null||o===void 0||typeof s!=typeof o||typeof s!="object")return!1;let l=Array.isArray(s),u=Array.isArray(o);if(l!==u)return!1;if(l&&u){if(s.length!==o.length)return!1;for(let a=0;a<s.length;a++)if(!i(s[a],o[a]))return!1}if(vn.objectLiteral(s)&&vn.objectLiteral(o)){let a=Object.keys(s),c=Object.keys(o);if(a.length!==c.length||(a.sort(),c.sort(),!i(a,c)))return!1;for(let p=0;p<a.length;p++){let d=a[p];if(!i(s[d],o[d]))return!1}}return!0}})(dl||(Ge.NotebookCell=dl={}));var xw;(function(n){function e(t,i,s,o){return{uri:t,notebookType:i,version:s,cells:o}}n.create=e;function r(t){let i=t;return vn.objectLiteral(i)&&vn.string(i.uri)&&lo.integer.is(i.version)&&vn.typedArray(i.cells,dl.is)}n.is=r})(xw||(Ge.NotebookDocument=xw={}));var zi;(function(n){n.method="notebookDocument/sync",n.messageDirection=On.MessageDirection.clientToServer,n.type=new On.RegistrationType(n.method)})(zi||(Ge.NotebookDocumentSyncRegistrationType=zi={}));var kw;(function(n){n.method="notebookDocument/didOpen",n.messageDirection=On.MessageDirection.clientToServer,n.type=new On.ProtocolNotificationType(n.method),n.registrationMethod=zi.method})(kw||(Ge.DidOpenNotebookDocumentNotification=kw={}));var Tw;(function(n){function e(t){let i=t;return vn.objectLiteral(i)&&lo.uinteger.is(i.start)&&lo.uinteger.is(i.deleteCount)&&(i.cells===void 0||vn.typedArray(i.cells,dl.is))}n.is=e;function r(t,i,s){let o={start:t,deleteCount:i};return s!==void 0&&(o.cells=s),o}n.create=r})(Tw||(Ge.NotebookCellArrayChange=Tw={}));var Sw;(function(n){n.method="notebookDocument/didChange",n.messageDirection=On.MessageDirection.clientToServer,n.type=new On.ProtocolNotificationType(n.method),n.registrationMethod=zi.method})(Sw||(Ge.DidChangeNotebookDocumentNotification=Sw={}));var Iw;(function(n){n.method="notebookDocument/didSave",n.messageDirection=On.MessageDirection.clientToServer,n.type=new On.ProtocolNotificationType(n.method),n.registrationMethod=zi.method})(Iw||(Ge.DidSaveNotebookDocumentNotification=Iw={}));var Ew;(function(n){n.method="notebookDocument/didClose",n.messageDirection=On.MessageDirection.clientToServer,n.type=new On.ProtocolNotificationType(n.method),n.registrationMethod=zi.method})(Ew||(Ge.DidCloseNotebookDocumentNotification=Ew={}))});var Ow=S(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.InlineCompletionRequest=void 0;var Pw=$e(),Cw;(function(n){n.method="textDocument/inlineCompletion",n.messageDirection=Pw.MessageDirection.clientToServer,n.type=new Pw.ProtocolRequestType(n.method)})(Cw||(hl.InlineCompletionRequest=Cw={}))});var Vx=S(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});E.WorkspaceSymbolRequest=E.CodeActionResolveRequest=E.CodeActionRequest=E.DocumentSymbolRequest=E.DocumentHighlightRequest=E.ReferencesRequest=E.DefinitionRequest=E.SignatureHelpRequest=E.SignatureHelpTriggerKind=E.HoverRequest=E.CompletionResolveRequest=E.CompletionRequest=E.CompletionTriggerKind=E.PublishDiagnosticsNotification=E.WatchKind=E.RelativePattern=E.FileChangeType=E.DidChangeWatchedFilesNotification=E.WillSaveTextDocumentWaitUntilRequest=E.WillSaveTextDocumentNotification=E.TextDocumentSaveReason=E.DidSaveTextDocumentNotification=E.DidCloseTextDocumentNotification=E.DidChangeTextDocumentNotification=E.TextDocumentContentChangeEvent=E.DidOpenTextDocumentNotification=E.TextDocumentSyncKind=E.TelemetryEventNotification=E.LogMessageNotification=E.ShowMessageRequest=E.ShowMessageNotification=E.MessageType=E.DidChangeConfigurationNotification=E.ExitNotification=E.ShutdownRequest=E.InitializedNotification=E.InitializeErrorCodes=E.InitializeRequest=E.WorkDoneProgressOptions=E.TextDocumentRegistrationOptions=E.StaticRegistrationOptions=E.PositionEncodingKind=E.FailureHandlingKind=E.ResourceOperationKind=E.UnregistrationRequest=E.RegistrationRequest=E.DocumentSelector=E.NotebookCellTextDocumentFilter=E.NotebookDocumentFilter=E.TextDocumentFilter=void 0;E.MonikerRequest=E.MonikerKind=E.UniquenessLevel=E.WillDeleteFilesRequest=E.DidDeleteFilesNotification=E.WillRenameFilesRequest=E.DidRenameFilesNotification=E.WillCreateFilesRequest=E.DidCreateFilesNotification=E.FileOperationPatternKind=E.LinkedEditingRangeRequest=E.ShowDocumentRequest=E.SemanticTokensRegistrationType=E.SemanticTokensRefreshRequest=E.SemanticTokensRangeRequest=E.SemanticTokensDeltaRequest=E.SemanticTokensRequest=E.TokenFormat=E.CallHierarchyPrepareRequest=E.CallHierarchyOutgoingCallsRequest=E.CallHierarchyIncomingCallsRequest=E.WorkDoneProgressCancelNotification=E.WorkDoneProgressCreateRequest=E.WorkDoneProgress=E.SelectionRangeRequest=E.DeclarationRequest=E.FoldingRangeRefreshRequest=E.FoldingRangeRequest=E.ColorPresentationRequest=E.DocumentColorRequest=E.ConfigurationRequest=E.DidChangeWorkspaceFoldersNotification=E.WorkspaceFoldersRequest=E.TypeDefinitionRequest=E.ImplementationRequest=E.ApplyWorkspaceEditRequest=E.ExecuteCommandRequest=E.PrepareRenameRequest=E.RenameRequest=E.PrepareSupportDefaultBehavior=E.DocumentOnTypeFormattingRequest=E.DocumentRangesFormattingRequest=E.DocumentRangeFormattingRequest=E.DocumentFormattingRequest=E.DocumentLinkResolveRequest=E.DocumentLinkRequest=E.CodeLensRefreshRequest=E.CodeLensResolveRequest=E.CodeLensRequest=E.WorkspaceSymbolResolveRequest=void 0;E.InlineCompletionRequest=E.DidCloseNotebookDocumentNotification=E.DidSaveNotebookDocumentNotification=E.DidChangeNotebookDocumentNotification=E.NotebookCellArrayChange=E.DidOpenNotebookDocumentNotification=E.NotebookDocumentSyncRegistrationType=E.NotebookDocument=E.NotebookCell=E.ExecutionSummary=E.NotebookCellKind=E.DiagnosticRefreshRequest=E.WorkspaceDiagnosticRequest=E.DocumentDiagnosticRequest=E.DocumentDiagnosticReportKind=E.DiagnosticServerCancellationData=E.InlayHintRefreshRequest=E.InlayHintResolveRequest=E.InlayHintRequest=E.InlineValueRefreshRequest=E.InlineValueRequest=E.TypeHierarchySupertypesRequest=E.TypeHierarchySubtypesRequest=E.TypeHierarchyPrepareRequest=void 0;var U=$e(),Aw=(Za(),mt(Ja)),gt=Xa(),$E=r_();Object.defineProperty(E,"ImplementationRequest",{enumerable:!0,get:function(){return $E.ImplementationRequest}});var UE=o_();Object.defineProperty(E,"TypeDefinitionRequest",{enumerable:!0,get:function(){return UE.TypeDefinitionRequest}});var $x=u_();Object.defineProperty(E,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return $x.WorkspaceFoldersRequest}});Object.defineProperty(E,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return $x.DidChangeWorkspaceFoldersNotification}});var BE=d_();Object.defineProperty(E,"ConfigurationRequest",{enumerable:!0,get:function(){return BE.ConfigurationRequest}});var Ux=m_();Object.defineProperty(E,"DocumentColorRequest",{enumerable:!0,get:function(){return Ux.DocumentColorRequest}});Object.defineProperty(E,"ColorPresentationRequest",{enumerable:!0,get:function(){return Ux.ColorPresentationRequest}});var Bx=b_();Object.defineProperty(E,"FoldingRangeRequest",{enumerable:!0,get:function(){return Bx.FoldingRangeRequest}});Object.defineProperty(E,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return Bx.FoldingRangeRefreshRequest}});var WE=w_();Object.defineProperty(E,"DeclarationRequest",{enumerable:!0,get:function(){return WE.DeclarationRequest}});var VE=T_();Object.defineProperty(E,"SelectionRangeRequest",{enumerable:!0,get:function(){return VE.SelectionRangeRequest}});var Hh=R_();Object.defineProperty(E,"WorkDoneProgress",{enumerable:!0,get:function(){return Hh.WorkDoneProgress}});Object.defineProperty(E,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return Hh.WorkDoneProgressCreateRequest}});Object.defineProperty(E,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return Hh.WorkDoneProgressCancelNotification}});var zh=A_();Object.defineProperty(E,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return zh.CallHierarchyIncomingCallsRequest}});Object.defineProperty(E,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return zh.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(E,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return zh.CallHierarchyPrepareRequest}});var Gi=F_();Object.defineProperty(E,"TokenFormat",{enumerable:!0,get:function(){return Gi.TokenFormat}});Object.defineProperty(E,"SemanticTokensRequest",{enumerable:!0,get:function(){return Gi.SemanticTokensRequest}});Object.defineProperty(E,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return Gi.SemanticTokensDeltaRequest}});Object.defineProperty(E,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return Gi.SemanticTokensRangeRequest}});Object.defineProperty(E,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return Gi.SemanticTokensRefreshRequest}});Object.defineProperty(E,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return Gi.SemanticTokensRegistrationType}});var HE=U_();Object.defineProperty(E,"ShowDocumentRequest",{enumerable:!0,get:function(){return HE.ShowDocumentRequest}});var zE=V_();Object.defineProperty(E,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return zE.LinkedEditingRangeRequest}});var Yr=Z_();Object.defineProperty(E,"FileOperationPatternKind",{enumerable:!0,get:function(){return Yr.FileOperationPatternKind}});Object.defineProperty(E,"DidCreateFilesNotification",{enumerable:!0,get:function(){return Yr.DidCreateFilesNotification}});Object.defineProperty(E,"WillCreateFilesRequest",{enumerable:!0,get:function(){return Yr.WillCreateFilesRequest}});Object.defineProperty(E,"DidRenameFilesNotification",{enumerable:!0,get:function(){return Yr.DidRenameFilesNotification}});Object.defineProperty(E,"WillRenameFilesRequest",{enumerable:!0,get:function(){return Yr.WillRenameFilesRequest}});Object.defineProperty(E,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return Yr.DidDeleteFilesNotification}});Object.defineProperty(E,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return Yr.WillDeleteFilesRequest}});var Gh=rw();Object.defineProperty(E,"UniquenessLevel",{enumerable:!0,get:function(){return Gh.UniquenessLevel}});Object.defineProperty(E,"MonikerKind",{enumerable:!0,get:function(){return Gh.MonikerKind}});Object.defineProperty(E,"MonikerRequest",{enumerable:!0,get:function(){return Gh.MonikerRequest}});var Kh=aw();Object.defineProperty(E,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return Kh.TypeHierarchyPrepareRequest}});Object.defineProperty(E,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return Kh.TypeHierarchySubtypesRequest}});Object.defineProperty(E,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return Kh.TypeHierarchySupertypesRequest}});var Wx=cw();Object.defineProperty(E,"InlineValueRequest",{enumerable:!0,get:function(){return Wx.InlineValueRequest}});Object.defineProperty(E,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return Wx.InlineValueRefreshRequest}});var Yh=fw();Object.defineProperty(E,"InlayHintRequest",{enumerable:!0,get:function(){return Yh.InlayHintRequest}});Object.defineProperty(E,"InlayHintResolveRequest",{enumerable:!0,get:function(){return Yh.InlayHintResolveRequest}});Object.defineProperty(E,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return Yh.InlayHintRefreshRequest}});var uo=ww();Object.defineProperty(E,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return uo.DiagnosticServerCancellationData}});Object.defineProperty(E,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return uo.DocumentDiagnosticReportKind}});Object.defineProperty(E,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return uo.DocumentDiagnosticRequest}});Object.defineProperty(E,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return uo.WorkspaceDiagnosticRequest}});Object.defineProperty(E,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return uo.DiagnosticRefreshRequest}});var An=Rw();Object.defineProperty(E,"NotebookCellKind",{enumerable:!0,get:function(){return An.NotebookCellKind}});Object.defineProperty(E,"ExecutionSummary",{enumerable:!0,get:function(){return An.ExecutionSummary}});Object.defineProperty(E,"NotebookCell",{enumerable:!0,get:function(){return An.NotebookCell}});Object.defineProperty(E,"NotebookDocument",{enumerable:!0,get:function(){return An.NotebookDocument}});Object.defineProperty(E,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return An.NotebookDocumentSyncRegistrationType}});Object.defineProperty(E,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return An.DidOpenNotebookDocumentNotification}});Object.defineProperty(E,"NotebookCellArrayChange",{enumerable:!0,get:function(){return An.NotebookCellArrayChange}});Object.defineProperty(E,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return An.DidChangeNotebookDocumentNotification}});Object.defineProperty(E,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return An.DidSaveNotebookDocumentNotification}});Object.defineProperty(E,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return An.DidCloseNotebookDocumentNotification}});var GE=Ow();Object.defineProperty(E,"InlineCompletionRequest",{enumerable:!0,get:function(){return GE.InlineCompletionRequest}});var Uh;(function(n){function e(r){let t=r;return gt.string(t)||gt.string(t.language)||gt.string(t.scheme)||gt.string(t.pattern)}n.is=e})(Uh||(E.TextDocumentFilter=Uh={}));var Bh;(function(n){function e(r){let t=r;return gt.objectLiteral(t)&&(gt.string(t.notebookType)||gt.string(t.scheme)||gt.string(t.pattern))}n.is=e})(Bh||(E.NotebookDocumentFilter=Bh={}));var Wh;(function(n){function e(r){let t=r;return gt.objectLiteral(t)&&(gt.string(t.notebook)||Bh.is(t.notebook))&&(t.language===void 0||gt.string(t.language))}n.is=e})(Wh||(E.NotebookCellTextDocumentFilter=Wh={}));var Vh;(function(n){function e(r){if(!Array.isArray(r))return!1;for(let t of r)if(!gt.string(t)&&!Uh.is(t)&&!Wh.is(t))return!1;return!0}n.is=e})(Vh||(E.DocumentSelector=Vh={}));var Dw;(function(n){n.method="client/registerCapability",n.messageDirection=U.MessageDirection.serverToClient,n.type=new U.ProtocolRequestType(n.method)})(Dw||(E.RegistrationRequest=Dw={}));var jw;(function(n){n.method="client/unregisterCapability",n.messageDirection=U.MessageDirection.serverToClient,n.type=new U.ProtocolRequestType(n.method)})(jw||(E.UnregistrationRequest=jw={}));var Lw;(function(n){n.Create="create",n.Rename="rename",n.Delete="delete"})(Lw||(E.ResourceOperationKind=Lw={}));var Mw;(function(n){n.Abort="abort",n.Transactional="transactional",n.TextOnlyTransactional="textOnlyTransactional",n.Undo="undo"})(Mw||(E.FailureHandlingKind=Mw={}));var qw;(function(n){n.UTF8="utf-8",n.UTF16="utf-16",n.UTF32="utf-32"})(qw||(E.PositionEncodingKind=qw={}));var Fw;(function(n){function e(r){let t=r;return t&&gt.string(t.id)&&t.id.length>0}n.hasId=e})(Fw||(E.StaticRegistrationOptions=Fw={}));var Nw;(function(n){function e(r){let t=r;return t&&(t.documentSelector===null||Vh.is(t.documentSelector))}n.is=e})(Nw||(E.TextDocumentRegistrationOptions=Nw={}));var $w;(function(n){function e(t){let i=t;return gt.objectLiteral(i)&&(i.workDoneProgress===void 0||gt.boolean(i.workDoneProgress))}n.is=e;function r(t){let i=t;return i&&gt.boolean(i.workDoneProgress)}n.hasWorkDoneProgress=r})($w||(E.WorkDoneProgressOptions=$w={}));var Uw;(function(n){n.method="initialize",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Uw||(E.InitializeRequest=Uw={}));var Bw;(function(n){n.unknownProtocolVersion=1})(Bw||(E.InitializeErrorCodes=Bw={}));var Ww;(function(n){n.method="initialized",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolNotificationType(n.method)})(Ww||(E.InitializedNotification=Ww={}));var Vw;(function(n){n.method="shutdown",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType0(n.method)})(Vw||(E.ShutdownRequest=Vw={}));var Hw;(function(n){n.method="exit",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolNotificationType0(n.method)})(Hw||(E.ExitNotification=Hw={}));var zw;(function(n){n.method="workspace/didChangeConfiguration",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolNotificationType(n.method)})(zw||(E.DidChangeConfigurationNotification=zw={}));var Gw;(function(n){n.Error=1,n.Warning=2,n.Info=3,n.Log=4,n.Debug=5})(Gw||(E.MessageType=Gw={}));var Kw;(function(n){n.method="window/showMessage",n.messageDirection=U.MessageDirection.serverToClient,n.type=new U.ProtocolNotificationType(n.method)})(Kw||(E.ShowMessageNotification=Kw={}));var Yw;(function(n){n.method="window/showMessageRequest",n.messageDirection=U.MessageDirection.serverToClient,n.type=new U.ProtocolRequestType(n.method)})(Yw||(E.ShowMessageRequest=Yw={}));var Qw;(function(n){n.method="window/logMessage",n.messageDirection=U.MessageDirection.serverToClient,n.type=new U.ProtocolNotificationType(n.method)})(Qw||(E.LogMessageNotification=Qw={}));var Jw;(function(n){n.method="telemetry/event",n.messageDirection=U.MessageDirection.serverToClient,n.type=new U.ProtocolNotificationType(n.method)})(Jw||(E.TelemetryEventNotification=Jw={}));var Zw;(function(n){n.None=0,n.Full=1,n.Incremental=2})(Zw||(E.TextDocumentSyncKind=Zw={}));var Xw;(function(n){n.method="textDocument/didOpen",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolNotificationType(n.method)})(Xw||(E.DidOpenTextDocumentNotification=Xw={}));var ex;(function(n){function e(t){let i=t;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}n.isIncremental=e;function r(t){let i=t;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}n.isFull=r})(ex||(E.TextDocumentContentChangeEvent=ex={}));var tx;(function(n){n.method="textDocument/didChange",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolNotificationType(n.method)})(tx||(E.DidChangeTextDocumentNotification=tx={}));var nx;(function(n){n.method="textDocument/didClose",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolNotificationType(n.method)})(nx||(E.DidCloseTextDocumentNotification=nx={}));var rx;(function(n){n.method="textDocument/didSave",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolNotificationType(n.method)})(rx||(E.DidSaveTextDocumentNotification=rx={}));var ix;(function(n){n.Manual=1,n.AfterDelay=2,n.FocusOut=3})(ix||(E.TextDocumentSaveReason=ix={}));var sx;(function(n){n.method="textDocument/willSave",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolNotificationType(n.method)})(sx||(E.WillSaveTextDocumentNotification=sx={}));var ox;(function(n){n.method="textDocument/willSaveWaitUntil",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(ox||(E.WillSaveTextDocumentWaitUntilRequest=ox={}));var ax;(function(n){n.method="workspace/didChangeWatchedFiles",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolNotificationType(n.method)})(ax||(E.DidChangeWatchedFilesNotification=ax={}));var lx;(function(n){n.Created=1,n.Changed=2,n.Deleted=3})(lx||(E.FileChangeType=lx={}));var ux;(function(n){function e(r){let t=r;return gt.objectLiteral(t)&&(Aw.URI.is(t.baseUri)||Aw.WorkspaceFolder.is(t.baseUri))&&gt.string(t.pattern)}n.is=e})(ux||(E.RelativePattern=ux={}));var cx;(function(n){n.Create=1,n.Change=2,n.Delete=4})(cx||(E.WatchKind=cx={}));var px;(function(n){n.method="textDocument/publishDiagnostics",n.messageDirection=U.MessageDirection.serverToClient,n.type=new U.ProtocolNotificationType(n.method)})(px||(E.PublishDiagnosticsNotification=px={}));var dx;(function(n){n.Invoked=1,n.TriggerCharacter=2,n.TriggerForIncompleteCompletions=3})(dx||(E.CompletionTriggerKind=dx={}));var hx;(function(n){n.method="textDocument/completion",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(hx||(E.CompletionRequest=hx={}));var fx;(function(n){n.method="completionItem/resolve",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(fx||(E.CompletionResolveRequest=fx={}));var mx;(function(n){n.method="textDocument/hover",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(mx||(E.HoverRequest=mx={}));var gx;(function(n){n.Invoked=1,n.TriggerCharacter=2,n.ContentChange=3})(gx||(E.SignatureHelpTriggerKind=gx={}));var yx;(function(n){n.method="textDocument/signatureHelp",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(yx||(E.SignatureHelpRequest=yx={}));var bx;(function(n){n.method="textDocument/definition",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(bx||(E.DefinitionRequest=bx={}));var vx;(function(n){n.method="textDocument/references",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(vx||(E.ReferencesRequest=vx={}));var _x;(function(n){n.method="textDocument/documentHighlight",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(_x||(E.DocumentHighlightRequest=_x={}));var wx;(function(n){n.method="textDocument/documentSymbol",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(wx||(E.DocumentSymbolRequest=wx={}));var xx;(function(n){n.method="textDocument/codeAction",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(xx||(E.CodeActionRequest=xx={}));var kx;(function(n){n.method="codeAction/resolve",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(kx||(E.CodeActionResolveRequest=kx={}));var Tx;(function(n){n.method="workspace/symbol",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Tx||(E.WorkspaceSymbolRequest=Tx={}));var Sx;(function(n){n.method="workspaceSymbol/resolve",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Sx||(E.WorkspaceSymbolResolveRequest=Sx={}));var Ix;(function(n){n.method="textDocument/codeLens",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Ix||(E.CodeLensRequest=Ix={}));var Ex;(function(n){n.method="codeLens/resolve",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Ex||(E.CodeLensResolveRequest=Ex={}));var Rx;(function(n){n.method="workspace/codeLens/refresh",n.messageDirection=U.MessageDirection.serverToClient,n.type=new U.ProtocolRequestType0(n.method)})(Rx||(E.CodeLensRefreshRequest=Rx={}));var Px;(function(n){n.method="textDocument/documentLink",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Px||(E.DocumentLinkRequest=Px={}));var Cx;(function(n){n.method="documentLink/resolve",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Cx||(E.DocumentLinkResolveRequest=Cx={}));var Ox;(function(n){n.method="textDocument/formatting",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Ox||(E.DocumentFormattingRequest=Ox={}));var Ax;(function(n){n.method="textDocument/rangeFormatting",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Ax||(E.DocumentRangeFormattingRequest=Ax={}));var Dx;(function(n){n.method="textDocument/rangesFormatting",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Dx||(E.DocumentRangesFormattingRequest=Dx={}));var jx;(function(n){n.method="textDocument/onTypeFormatting",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(jx||(E.DocumentOnTypeFormattingRequest=jx={}));var Lx;(function(n){n.Identifier=1})(Lx||(E.PrepareSupportDefaultBehavior=Lx={}));var Mx;(function(n){n.method="textDocument/rename",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Mx||(E.RenameRequest=Mx={}));var qx;(function(n){n.method="textDocument/prepareRename",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(qx||(E.PrepareRenameRequest=qx={}));var Fx;(function(n){n.method="workspace/executeCommand",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Fx||(E.ExecuteCommandRequest=Fx={}));var Nx;(function(n){n.method="workspace/applyEdit",n.messageDirection=U.MessageDirection.serverToClient,n.type=new U.ProtocolRequestType("workspace/applyEdit")})(Nx||(E.ApplyWorkspaceEditRequest=Nx={}))});var zx=S(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});fl.createProtocolConnection=void 0;var Hx=zr();function KE(n,e,r,t){return Hx.ConnectionStrategy.is(t)&&(t={connectionStrategy:t}),(0,Hx.createMessageConnection)(n,e,r,t)}fl.createProtocolConnection=KE});var Kx=S(Wt=>{"use strict";var YE=Wt&&Wt.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),ml=Wt&&Wt.__exportStar||function(n,e){for(var r in n)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&YE(e,n,r)};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.LSPErrorCodes=Wt.createProtocolConnection=void 0;ml(zr(),Wt);ml((Za(),mt(Ja)),Wt);ml($e(),Wt);ml(Vx(),Wt);var QE=zx();Object.defineProperty(Wt,"createProtocolConnection",{enumerable:!0,get:function(){return QE.createProtocolConnection}});var Gx;(function(n){n.lspReservedErrorRangeStart=-32899,n.RequestFailed=-32803,n.ServerCancelled=-32802,n.ContentModified=-32801,n.RequestCancelled=-32800,n.lspReservedErrorRangeEnd=-32800})(Gx||(Wt.LSPErrorCodes=Gx={}))});var nt=S(Dn=>{"use strict";var JE=Dn&&Dn.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),Yx=Dn&&Dn.__exportStar||function(n,e){for(var r in n)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&JE(e,n,r)};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.createProtocolConnection=void 0;var ZE=Od();Yx(Od(),Dn);Yx(Kx(),Dn);function XE(n,e,r,t){return(0,ZE.createMessageConnection)(n,e,r,t)}Dn.createProtocolConnection=XE});var Jh=S(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.SemanticTokensBuilder=wr.SemanticTokensDiff=wr.SemanticTokensFeature=void 0;var gl=nt(),eR=n=>class extends n{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(gl.SemanticTokensRefreshRequest.type),on:e=>{let r=gl.SemanticTokensRequest.type;return this.connection.onRequest(r,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r,t)))},onDelta:e=>{let r=gl.SemanticTokensDeltaRequest.type;return this.connection.onRequest(r,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r,t)))},onRange:e=>{let r=gl.SemanticTokensRangeRequest.type;return this.connection.onRequest(r,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r,t)))}}}};wr.SemanticTokensFeature=eR;var yl=class{constructor(e,r){this.originalSequence=e,this.modifiedSequence=r}computeDiff(){let e=this.originalSequence.length,r=this.modifiedSequence.length,t=0;for(;t<r&&t<e&&this.originalSequence[t]===this.modifiedSequence[t];)t++;if(t<r&&t<e){let i=e-1,s=r-1;for(;i>=t&&s>=t&&this.originalSequence[i]===this.modifiedSequence[s];)i--,s--;(i<t||s<t)&&(i++,s++);let o=i-t+1,l=this.modifiedSequence.slice(t,s+1);return l.length===1&&l[0]===this.originalSequence[i]?[{start:t,deleteCount:o-1}]:[{start:t,deleteCount:o,data:l}]}else return t<r?[{start:t,deleteCount:0,data:this.modifiedSequence.slice(t)}]:t<e?[{start:t,deleteCount:e-t}]:[]}};wr.SemanticTokensDiff=yl;var Qh=class{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(e,r,t,i,s){let o=e,l=r;this._dataLen>0&&(o-=this._prevLine,o===0&&(l-=this._prevChar)),this._data[this._dataLen++]=o,this._data[this._dataLen++]=l,this._data[this._dataLen++]=t,this._data[this._dataLen++]=i,this._data[this._dataLen++]=s,this._prevLine=e,this._prevChar=r}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData!==void 0?{resultId:this.id,edits:new yl(this._prevData,this._data).computeDiff()}:this.build()}};wr.SemanticTokensBuilder=Qh});var Qx=S(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});bl.InlineCompletionFeature=void 0;var tR=nt(),nR=n=>class extends n{get inlineCompletion(){return{on:e=>this.connection.onRequest(tR.InlineCompletionRequest.type,(r,t)=>e(r,t,this.attachWorkDoneProgress(r)))}}};bl.InlineCompletionFeature=nR});var Xh=S(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.TextDocuments=void 0;var Qr=nt(),Zh=class{constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new Qr.Emitter,this._onDidOpen=new Qr.Emitter,this._onDidClose=new Qr.Emitter,this._onDidSave=new Qr.Emitter,this._onWillSave=new Qr.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=Qr.TextDocumentSyncKind.Incremental;let r=[];return r.push(e.onDidOpenTextDocument(t=>{let i=t.textDocument,s=this._configuration.create(i.uri,i.languageId,i.version,i.text);this._syncedDocuments.set(i.uri,s);let o=Object.freeze({document:s});this._onDidOpen.fire(o),this._onDidChangeContent.fire(o)})),r.push(e.onDidChangeTextDocument(t=>{let i=t.textDocument,s=t.contentChanges;if(s.length===0)return;let{version:o}=i;if(o==null)throw new Error(`Received document change event for ${i.uri} without valid version identifier`);let l=this._syncedDocuments.get(i.uri);l!==void 0&&(l=this._configuration.update(l,s,o),this._syncedDocuments.set(i.uri,l),this._onDidChangeContent.fire(Object.freeze({document:l})))})),r.push(e.onDidCloseTextDocument(t=>{let i=this._syncedDocuments.get(t.textDocument.uri);i!==void 0&&(this._syncedDocuments.delete(t.textDocument.uri),this._onDidClose.fire(Object.freeze({document:i})))})),r.push(e.onWillSaveTextDocument(t=>{let i=this._syncedDocuments.get(t.textDocument.uri);i!==void 0&&this._onWillSave.fire(Object.freeze({document:i,reason:t.reason}))})),r.push(e.onWillSaveTextDocumentWaitUntil((t,i)=>{let s=this._syncedDocuments.get(t.textDocument.uri);return s!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:s,reason:t.reason}),i):[]})),r.push(e.onDidSaveTextDocument(t=>{let i=this._syncedDocuments.get(t.textDocument.uri);i!==void 0&&this._onDidSave.fire(Object.freeze({document:i}))})),Qr.Disposable.create(()=>{r.forEach(t=>t.dispose())})}};vl.TextDocuments=Zh});var tf=S(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.NotebookDocuments=Ki.NotebookSyncFeature=void 0;var cn=nt(),Jx=Xh(),rR=n=>class extends n{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(cn.DidOpenNotebookDocumentNotification.type,r=>{e(r)}),onDidChangeNotebookDocument:e=>this.connection.onNotification(cn.DidChangeNotebookDocumentNotification.type,r=>{e(r)}),onDidSaveNotebookDocument:e=>this.connection.onNotification(cn.DidSaveNotebookDocumentNotification.type,r=>{e(r)}),onDidCloseNotebookDocument:e=>this.connection.onNotification(cn.DidCloseNotebookDocumentNotification.type,r=>{e(r)})}}};Ki.NotebookSyncFeature=rR;var _l=class n{onDidOpenTextDocument(e){return this.openHandler=e,cn.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,cn.Disposable.create(()=>{this.changeHandler=e})}changeTextDocument(e){this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,cn.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(e){this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return n.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return n.NULL_DISPOSE}onDidSaveTextDocument(){return n.NULL_DISPOSE}};_l.NULL_DISPOSE=Object.freeze({dispose:()=>{}});var ef=class{constructor(e){e instanceof Jx.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new Jx.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new cn.Emitter,this._onDidChange=new cn.Emitter,this._onDidSave=new cn.Emitter,this._onDidClose=new cn.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){let r=this.notebookCellMap.get(e);return r&&r[0]}findNotebookDocumentForCell(e){let r=typeof e=="string"?e:e.document,t=this.notebookCellMap.get(r);return t&&t[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){let r=new _l,t=[];return t.push(this.cellTextDocuments.listen(r)),t.push(e.notebooks.synchronization.onDidOpenNotebookDocument(i=>{this.notebookDocuments.set(i.notebookDocument.uri,i.notebookDocument);for(let s of i.cellTextDocuments)r.openTextDocument({textDocument:s});this.updateCellMap(i.notebookDocument),this._onDidOpen.fire(i.notebookDocument)})),t.push(e.notebooks.synchronization.onDidChangeNotebookDocument(i=>{let s=this.notebookDocuments.get(i.notebookDocument.uri);if(s===void 0)return;s.version=i.notebookDocument.version;let o=s.metadata,l=!1,u=i.change;u.metadata!==void 0&&(l=!0,s.metadata=u.metadata);let a=[],c=[],p=[],d=[];if(u.cells!==void 0){let b=u.cells;if(b.structure!==void 0){let v=b.structure.array;if(s.cells.splice(v.start,v.deleteCount,...v.cells!==void 0?v.cells:[]),b.structure.didOpen!==void 0)for(let _ of b.structure.didOpen)r.openTextDocument({textDocument:_}),a.push(_.uri);if(b.structure.didClose)for(let _ of b.structure.didClose)r.closeTextDocument({textDocument:_}),c.push(_.uri)}if(b.data!==void 0){let v=new Map(b.data.map(_=>[_.document,_]));for(let _=0;_<=s.cells.length;_++){let w=v.get(s.cells[_].document);if(w!==void 0){let k=s.cells.splice(_,1,w);if(p.push({old:k[0],new:w}),v.delete(w.document),v.size===0)break}}}if(b.textContent!==void 0)for(let v of b.textContent)r.changeTextDocument({textDocument:v.document,contentChanges:v.changes}),d.push(v.document.uri)}this.updateCellMap(s);let h={notebookDocument:s};l&&(h.metadata={old:o,new:s.metadata});let g=[];for(let b of a)g.push(this.getNotebookCell(b));let f=[];for(let b of c)f.push(this.getNotebookCell(b));let m=[];for(let b of d)m.push(this.getNotebookCell(b));(g.length>0||f.length>0||p.length>0||m.length>0)&&(h.cells={added:g,removed:f,changed:{data:p,textContent:m}}),(h.metadata!==void 0||h.cells!==void 0)&&this._onDidChange.fire(h)})),t.push(e.notebooks.synchronization.onDidSaveNotebookDocument(i=>{let s=this.notebookDocuments.get(i.notebookDocument.uri);s!==void 0&&this._onDidSave.fire(s)})),t.push(e.notebooks.synchronization.onDidCloseNotebookDocument(i=>{let s=this.notebookDocuments.get(i.notebookDocument.uri);if(s!==void 0){this._onDidClose.fire(s);for(let o of i.cellTextDocuments)r.closeTextDocument({textDocument:o});this.notebookDocuments.delete(i.notebookDocument.uri);for(let o of s.cells)this.notebookCellMap.delete(o.document)}})),cn.Disposable.create(()=>{t.forEach(i=>i.dispose())})}updateCellMap(e){for(let r of e.cells)this.notebookCellMap.set(r.document,[r,e])}};Ki.NotebookDocuments=ef});var nf=S(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.thenable=at.typedArray=at.stringArray=at.array=at.func=at.error=at.number=at.string=at.boolean=void 0;function iR(n){return n===!0||n===!1}at.boolean=iR;function Zx(n){return typeof n=="string"||n instanceof String}at.string=Zx;function sR(n){return typeof n=="number"||n instanceof Number}at.number=sR;function oR(n){return n instanceof Error}at.error=oR;function Xx(n){return typeof n=="function"}at.func=Xx;function ek(n){return Array.isArray(n)}at.array=ek;function aR(n){return ek(n)&&n.every(e=>Zx(e))}at.stringArray=aR;function lR(n,e){return Array.isArray(n)&&n.every(e)}at.typedArray=lR;function uR(n){return n&&Xx(n.then)}at.thenable=uR});var rf=S(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.generateUuid=pn.parse=pn.isUUID=pn.v4=pn.empty=void 0;var co=class{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},po=class n extends co{static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return n._oneOf(n._chars)}constructor(){super([n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-","4",n._randomHex(),n._randomHex(),n._randomHex(),"-",n._oneOf(n._timeHighBits),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex()].join(""))}};po._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];po._timeHighBits=["8","9","a","b"];pn.empty=new co("00000000-0000-0000-0000-000000000000");function tk(){return new po}pn.v4=tk;var cR=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function nk(n){return cR.test(n)}pn.isUUID=nk;function pR(n){if(!nk(n))throw new Error("invalid uuid");return new co(n)}pn.parse=pR;function dR(){return tk().asHex()}pn.generateUuid=dR});var rk=S(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.attachPartialResult=kr.ProgressFeature=kr.attachWorkDone=void 0;var xr=nt(),hR=rf(),Jr=class n{constructor(e,r){this._connection=e,this._token=r,n.Instances.set(this._token,this)}begin(e,r,t,i){let s={kind:"begin",title:e,percentage:r,message:t,cancellable:i};this._connection.sendProgress(xr.WorkDoneProgress.type,this._token,s)}report(e,r){let t={kind:"report"};typeof e=="number"?(t.percentage=e,r!==void 0&&(t.message=r)):t.message=e,this._connection.sendProgress(xr.WorkDoneProgress.type,this._token,t)}done(){n.Instances.delete(this._token),this._connection.sendProgress(xr.WorkDoneProgress.type,this._token,{kind:"end"})}};Jr.Instances=new Map;var wl=class extends Jr{constructor(e,r){super(e,r),this._source=new xr.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},ho=class{constructor(){}begin(){}report(){}done(){}},xl=class extends ho{constructor(){super(),this._source=new xr.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function fR(n,e){if(e===void 0||e.workDoneToken===void 0)return new ho;let r=e.workDoneToken;return delete e.workDoneToken,new Jr(n,r)}kr.attachWorkDone=fR;var mR=n=>class extends n{constructor(){super(),this._progressSupported=!1}initialize(e){var r;super.initialize(e),((r=e==null?void 0:e.window)==null?void 0:r.workDoneProgress)===!0&&(this._progressSupported=!0,this.connection.onNotification(xr.WorkDoneProgressCancelNotification.type,t=>{let i=Jr.Instances.get(t.token);(i instanceof wl||i instanceof xl)&&i.cancel()}))}attachWorkDoneProgress(e){return e===void 0?new ho:new Jr(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){let e=(0,hR.generateUuid)();return this.connection.sendRequest(xr.WorkDoneProgressCreateRequest.type,{token:e}).then(()=>new wl(this.connection,e))}else return Promise.resolve(new xl)}};kr.ProgressFeature=mR;var sf;(function(n){n.type=new xr.ProgressType})(sf||(sf={}));var of=class{constructor(e,r){this._connection=e,this._token=r}report(e){this._connection.sendProgress(sf.type,this._token,e)}};function gR(n,e){if(e===void 0||e.partialResultToken===void 0)return;let r=e.partialResultToken;return delete e.partialResultToken,new of(n,r)}kr.attachPartialResult=gR});var ik=S(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});kl.ConfigurationFeature=void 0;var yR=nt(),bR=nf(),vR=n=>class extends n{getConfiguration(e){return e?bR.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let r={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(yR.ConfigurationRequest.type,r).then(t=>Array.isArray(t)?Array.isArray(e)?t:t[0]:Array.isArray(e)?[]:null)}};kl.ConfigurationFeature=vR});var sk=S(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});Sl.WorkspaceFoldersFeature=void 0;var Tl=nt(),_R=n=>class extends n{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let r=e.workspace;r&&r.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Tl.Emitter,this.connection.onNotification(Tl.DidChangeWorkspaceFoldersNotification.type,t=>{this._onDidChangeWorkspaceFolders.fire(t.event)}))}fillServerCapabilities(e){var t,i;super.fillServerCapabilities(e);let r=(i=(t=e.workspace)==null?void 0:t.workspaceFolders)==null?void 0:i.changeNotifications;this._notificationIsAutoRegistered=r===!0||typeof r=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Tl.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Tl.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Sl.WorkspaceFoldersFeature=_R});var ok=S(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.CallHierarchyFeature=void 0;var af=nt(),wR=n=>class extends n{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(af.CallHierarchyPrepareRequest.type,(r,t)=>e(r,t,this.attachWorkDoneProgress(r),void 0)),onIncomingCalls:e=>{let r=af.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(r,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r,t)))},onOutgoingCalls:e=>{let r=af.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(r,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r,t)))}}}};Il.CallHierarchyFeature=wR});var ak=S(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.ShowDocumentFeature=void 0;var xR=nt(),kR=n=>class extends n{showDocument(e){return this.connection.sendRequest(xR.ShowDocumentRequest.type,e)}};El.ShowDocumentFeature=kR});var lk=S(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.FileOperationsFeature=void 0;var Yi=nt(),TR=n=>class extends n{onDidCreateFiles(e){return this.connection.onNotification(Yi.DidCreateFilesNotification.type,r=>{e(r)})}onDidRenameFiles(e){return this.connection.onNotification(Yi.DidRenameFilesNotification.type,r=>{e(r)})}onDidDeleteFiles(e){return this.connection.onNotification(Yi.DidDeleteFilesNotification.type,r=>{e(r)})}onWillCreateFiles(e){return this.connection.onRequest(Yi.WillCreateFilesRequest.type,(r,t)=>e(r,t))}onWillRenameFiles(e){return this.connection.onRequest(Yi.WillRenameFilesRequest.type,(r,t)=>e(r,t))}onWillDeleteFiles(e){return this.connection.onRequest(Yi.WillDeleteFilesRequest.type,(r,t)=>e(r,t))}};Rl.FileOperationsFeature=TR});var uk=S(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.LinkedEditingRangeFeature=void 0;var SR=nt(),IR=n=>class extends n{onLinkedEditingRange(e){return this.connection.onRequest(SR.LinkedEditingRangeRequest.type,(r,t)=>e(r,t,this.attachWorkDoneProgress(r),void 0))}};Pl.LinkedEditingRangeFeature=IR});var ck=S(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});Cl.TypeHierarchyFeature=void 0;var lf=nt(),ER=n=>class extends n{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(lf.TypeHierarchyPrepareRequest.type,(r,t)=>e(r,t,this.attachWorkDoneProgress(r),void 0)),onSupertypes:e=>{let r=lf.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(r,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r,t)))},onSubtypes:e=>{let r=lf.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(r,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r,t)))}}}};Cl.TypeHierarchyFeature=ER});var dk=S(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});Ol.InlineValueFeature=void 0;var pk=nt(),RR=n=>class extends n{get inlineValue(){return{refresh:()=>this.connection.sendRequest(pk.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(pk.InlineValueRequest.type,(r,t)=>e(r,t,this.attachWorkDoneProgress(r)))}}};Ol.InlineValueFeature=RR});var fk=S(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.FoldingRangeFeature=void 0;var hk=nt(),PR=n=>class extends n{get foldingRange(){return{refresh:()=>this.connection.sendRequest(hk.FoldingRangeRefreshRequest.type),on:e=>{let r=hk.FoldingRangeRequest.type;return this.connection.onRequest(r,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r,t)))}}}};Al.FoldingRangeFeature=PR});var mk=S(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.InlayHintFeature=void 0;var uf=nt(),CR=n=>class extends n{get inlayHint(){return{refresh:()=>this.connection.sendRequest(uf.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(uf.InlayHintRequest.type,(r,t)=>e(r,t,this.attachWorkDoneProgress(r))),resolve:e=>this.connection.onRequest(uf.InlayHintResolveRequest.type,(r,t)=>e(r,t))}}};Dl.InlayHintFeature=CR});var gk=S(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});jl.DiagnosticFeature=void 0;var fo=nt(),OR=n=>class extends n{get diagnostics(){return{refresh:()=>this.connection.sendRequest(fo.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(fo.DocumentDiagnosticRequest.type,(r,t)=>e(r,t,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(fo.DocumentDiagnosticRequest.partialResult,r))),onWorkspace:e=>this.connection.onRequest(fo.WorkspaceDiagnosticRequest.type,(r,t)=>e(r,t,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(fo.WorkspaceDiagnosticRequest.partialResult,r)))}}};jl.DiagnosticFeature=OR});var yk=S(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});Ll.MonikerFeature=void 0;var AR=nt(),DR=n=>class extends n{get moniker(){return{on:e=>{let r=AR.MonikerRequest.type;return this.connection.onRequest(r,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r,t)))}}}};Ll.MonikerFeature=DR});var Ak=S(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.createConnection=be.combineFeatures=be.combineNotebooksFeatures=be.combineLanguagesFeatures=be.combineWorkspaceFeatures=be.combineWindowFeatures=be.combineClientFeatures=be.combineTracerFeatures=be.combineTelemetryFeatures=be.combineConsoleFeatures=be._NotebooksImpl=be._LanguagesImpl=be.BulkUnregistration=be.BulkRegistration=be.ErrorMessageTracker=void 0;var H=nt(),dn=nf(),pf=rf(),le=rk(),jR=ik(),LR=sk(),MR=ok(),qR=Jh(),FR=ak(),NR=lk(),$R=uk(),UR=ck(),BR=dk(),WR=fk(),VR=mk(),HR=gk(),zR=tf(),GR=yk();function cf(n){if(n!==null)return n}var df=class{constructor(){this._messages=Object.create(null)}add(e){let r=this._messages[e];r||(r=0),r++,this._messages[e]=r}sendErrors(e){Object.keys(this._messages).forEach(r=>{e.window.showErrorMessage(r)})}};be.ErrorMessageTracker=df;var Ml=class{constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(H.MessageType.Error,e)}warn(e){this.send(H.MessageType.Warning,e)}info(e){this.send(H.MessageType.Info,e)}log(e){this.send(H.MessageType.Log,e)}debug(e){this.send(H.MessageType.Debug,e)}send(e,r){this._rawConnection&&this._rawConnection.sendNotification(H.LogMessageNotification.type,{type:e,message:r}).catch(()=>{(0,H.RAL)().console.error("Sending log message failed")})}},hf=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...r){let t={type:H.MessageType.Error,message:e,actions:r};return this.connection.sendRequest(H.ShowMessageRequest.type,t).then(cf)}showWarningMessage(e,...r){let t={type:H.MessageType.Warning,message:e,actions:r};return this.connection.sendRequest(H.ShowMessageRequest.type,t).then(cf)}showInformationMessage(e,...r){let t={type:H.MessageType.Info,message:e,actions:r};return this.connection.sendRequest(H.ShowMessageRequest.type,t).then(cf)}},bk=(0,FR.ShowDocumentFeature)((0,le.ProgressFeature)(hf)),vk;(function(n){function e(){return new ql}n.create=e})(vk||(be.BulkRegistration=vk={}));var ql=class{constructor(){this._registrations=[],this._registered=new Set}add(e,r){let t=dn.string(e)?e:e.method;if(this._registered.has(t))throw new Error(`${t} is already added to this registration`);let i=pf.generateUuid();this._registrations.push({id:i,method:t,registerOptions:r||{}}),this._registered.add(t)}asRegistrationParams(){return{registrations:this._registrations}}},_k;(function(n){function e(){return new mo(void 0,[])}n.create=e})(_k||(be.BulkUnregistration=_k={}));var mo=class{constructor(e,r){this._connection=e,this._unregistrations=new Map,r.forEach(t=>{this._unregistrations.set(t.method,t)})}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let t of this._unregistrations.values())e.push(t);let r={unregisterations:e};this._connection.sendRequest(H.UnregistrationRequest.type,r).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(e){let r=dn.string(e)?e:e.method,t=this._unregistrations.get(r);if(!t)return!1;let i={unregisterations:[t]};return this._connection.sendRequest(H.UnregistrationRequest.type,i).then(()=>{this._unregistrations.delete(r)},s=>{this._connection.console.info(`Un-registering request handler for ${t.id} failed.`)}),!0}},Fl=class{attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,r,t){return e instanceof ql?this.registerMany(e):e instanceof mo?this.registerSingle1(e,r,t):this.registerSingle2(e,r)}registerSingle1(e,r,t){let i=dn.string(r)?r:r.method,s=pf.generateUuid(),o={registrations:[{id:s,method:i,registerOptions:t||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(H.RegistrationRequest.type,o).then(l=>(e.add({id:s,method:i}),e),l=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(l)))}registerSingle2(e,r){let t=dn.string(e)?e:e.method,i=pf.generateUuid(),s={registrations:[{id:i,method:t,registerOptions:r||{}}]};return this.connection.sendRequest(H.RegistrationRequest.type,s).then(o=>H.Disposable.create(()=>{this.unregisterSingle(i,t).catch(()=>{this.connection.console.info(`Un-registering capability with id ${i} failed.`)})}),o=>(this.connection.console.info(`Registering request handler for ${t} failed.`),Promise.reject(o)))}unregisterSingle(e,r){let t={unregisterations:[{id:e,method:r}]};return this.connection.sendRequest(H.UnregistrationRequest.type,t).catch(()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)})}registerMany(e){let r=e.asRegistrationParams();return this.connection.sendRequest(H.RegistrationRequest.type,r).then(()=>new mo(this._connection,r.registrations.map(t=>({id:t.id,method:t.method}))),t=>(this.connection.console.info("Bulk registration failed."),Promise.reject(t)))}},ff=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){function r(i){return i&&!!i.edit}let t=r(e)?e:{edit:e};return this.connection.sendRequest(H.ApplyWorkspaceEditRequest.type,t)}},wk=(0,NR.FileOperationsFeature)((0,LR.WorkspaceFoldersFeature)((0,jR.ConfigurationFeature)(ff))),Nl=class{constructor(){this._trace=H.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,r){this._trace!==H.Trace.Off&&this.connection.sendNotification(H.LogTraceNotification.type,{message:e,verbose:this._trace===H.Trace.Verbose?r:void 0}).catch(()=>{})}},$l=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(H.TelemetryEventNotification.type,e).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},Ul=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,le.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,r){return(0,le.attachPartialResult)(this.connection,r)}};be._LanguagesImpl=Ul;var xk=(0,WR.FoldingRangeFeature)((0,GR.MonikerFeature)((0,HR.DiagnosticFeature)((0,VR.InlayHintFeature)((0,BR.InlineValueFeature)((0,UR.TypeHierarchyFeature)((0,$R.LinkedEditingRangeFeature)((0,qR.SemanticTokensFeature)((0,MR.CallHierarchyFeature)(Ul))))))))),Bl=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,le.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,r){return(0,le.attachPartialResult)(this.connection,r)}};be._NotebooksImpl=Bl;var kk=(0,zR.NotebookSyncFeature)(Bl);function Tk(n,e){return function(r){return e(n(r))}}be.combineConsoleFeatures=Tk;function Sk(n,e){return function(r){return e(n(r))}}be.combineTelemetryFeatures=Sk;function Ik(n,e){return function(r){return e(n(r))}}be.combineTracerFeatures=Ik;function Ek(n,e){return function(r){return e(n(r))}}be.combineClientFeatures=Ek;function Rk(n,e){return function(r){return e(n(r))}}be.combineWindowFeatures=Rk;function Pk(n,e){return function(r){return e(n(r))}}be.combineWorkspaceFeatures=Pk;function Ck(n,e){return function(r){return e(n(r))}}be.combineLanguagesFeatures=Ck;function Ok(n,e){return function(r){return e(n(r))}}be.combineNotebooksFeatures=Ok;function KR(n,e){function r(i,s,o){return i&&s?o(i,s):i||s}return{__brand:"features",console:r(n.console,e.console,Tk),tracer:r(n.tracer,e.tracer,Ik),telemetry:r(n.telemetry,e.telemetry,Sk),client:r(n.client,e.client,Ek),window:r(n.window,e.window,Rk),workspace:r(n.workspace,e.workspace,Pk),languages:r(n.languages,e.languages,Ck),notebooks:r(n.notebooks,e.notebooks,Ok)}}be.combineFeatures=KR;function YR(n,e,r){let t=r&&r.console?new(r.console(Ml)):new Ml,i=n(t);t.rawAttach(i);let s=r&&r.tracer?new(r.tracer(Nl)):new Nl,o=r&&r.telemetry?new(r.telemetry($l)):new $l,l=r&&r.client?new(r.client(Fl)):new Fl,u=r&&r.window?new(r.window(bk)):new bk,a=r&&r.workspace?new(r.workspace(wk)):new wk,c=r&&r.languages?new(r.languages(xk)):new xk,p=r&&r.notebooks?new(r.notebooks(kk)):new kk,d=[t,s,o,l,u,a,c,p];function h(v){return v instanceof Promise?v:dn.thenable(v)?new Promise((_,w)=>{v.then(k=>_(k),k=>w(k))}):Promise.resolve(v)}let g,f,m,b={listen:()=>i.listen(),sendRequest:(v,..._)=>i.sendRequest(dn.string(v)?v:v.method,..._),onRequest:(v,_)=>i.onRequest(v,_),sendNotification:(v,_)=>{let w=dn.string(v)?v:v.method;return i.sendNotification(w,_)},onNotification:(v,_)=>i.onNotification(v,_),onProgress:i.onProgress,sendProgress:i.sendProgress,onInitialize:v=>(f=v,{dispose:()=>{f=void 0}}),onInitialized:v=>i.onNotification(H.InitializedNotification.type,v),onShutdown:v=>(g=v,{dispose:()=>{g=void 0}}),onExit:v=>(m=v,{dispose:()=>{m=void 0}}),get console(){return t},get telemetry(){return o},get tracer(){return s},get client(){return l},get window(){return u},get workspace(){return a},get languages(){return c},get notebooks(){return p},onDidChangeConfiguration:v=>i.onNotification(H.DidChangeConfigurationNotification.type,v),onDidChangeWatchedFiles:v=>i.onNotification(H.DidChangeWatchedFilesNotification.type,v),__textDocumentSync:void 0,onDidOpenTextDocument:v=>i.onNotification(H.DidOpenTextDocumentNotification.type,v),onDidChangeTextDocument:v=>i.onNotification(H.DidChangeTextDocumentNotification.type,v),onDidCloseTextDocument:v=>i.onNotification(H.DidCloseTextDocumentNotification.type,v),onWillSaveTextDocument:v=>i.onNotification(H.WillSaveTextDocumentNotification.type,v),onWillSaveTextDocumentWaitUntil:v=>i.onRequest(H.WillSaveTextDocumentWaitUntilRequest.type,v),onDidSaveTextDocument:v=>i.onNotification(H.DidSaveTextDocumentNotification.type,v),sendDiagnostics:v=>i.sendNotification(H.PublishDiagnosticsNotification.type,v),onHover:v=>i.onRequest(H.HoverRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),void 0)),onCompletion:v=>i.onRequest(H.CompletionRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onCompletionResolve:v=>i.onRequest(H.CompletionResolveRequest.type,v),onSignatureHelp:v=>i.onRequest(H.SignatureHelpRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),void 0)),onDeclaration:v=>i.onRequest(H.DeclarationRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onDefinition:v=>i.onRequest(H.DefinitionRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onTypeDefinition:v=>i.onRequest(H.TypeDefinitionRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onImplementation:v=>i.onRequest(H.ImplementationRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onReferences:v=>i.onRequest(H.ReferencesRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onDocumentHighlight:v=>i.onRequest(H.DocumentHighlightRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onDocumentSymbol:v=>i.onRequest(H.DocumentSymbolRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onWorkspaceSymbol:v=>i.onRequest(H.WorkspaceSymbolRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onWorkspaceSymbolResolve:v=>i.onRequest(H.WorkspaceSymbolResolveRequest.type,v),onCodeAction:v=>i.onRequest(H.CodeActionRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onCodeActionResolve:v=>i.onRequest(H.CodeActionResolveRequest.type,(_,w)=>v(_,w)),onCodeLens:v=>i.onRequest(H.CodeLensRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onCodeLensResolve:v=>i.onRequest(H.CodeLensResolveRequest.type,(_,w)=>v(_,w)),onDocumentFormatting:v=>i.onRequest(H.DocumentFormattingRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),void 0)),onDocumentRangeFormatting:v=>i.onRequest(H.DocumentRangeFormattingRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),void 0)),onDocumentOnTypeFormatting:v=>i.onRequest(H.DocumentOnTypeFormattingRequest.type,(_,w)=>v(_,w)),onRenameRequest:v=>i.onRequest(H.RenameRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),void 0)),onPrepareRename:v=>i.onRequest(H.PrepareRenameRequest.type,(_,w)=>v(_,w)),onDocumentLinks:v=>i.onRequest(H.DocumentLinkRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onDocumentLinkResolve:v=>i.onRequest(H.DocumentLinkResolveRequest.type,(_,w)=>v(_,w)),onDocumentColor:v=>i.onRequest(H.DocumentColorRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onColorPresentation:v=>i.onRequest(H.ColorPresentationRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onFoldingRanges:v=>i.onRequest(H.FoldingRangeRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onSelectionRanges:v=>i.onRequest(H.SelectionRangeRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onExecuteCommand:v=>i.onRequest(H.ExecuteCommandRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),void 0)),dispose:()=>i.dispose()};for(let v of d)v.attach(b);return i.onRequest(H.InitializeRequest.type,v=>{e.initialize(v),dn.string(v.trace)&&(s.trace=H.Trace.fromString(v.trace));for(let _ of d)_.initialize(v.capabilities);if(f){let _=f(v,new H.CancellationTokenSource().token,(0,le.attachWorkDone)(i,v),void 0);return h(_).then(w=>{if(w instanceof H.ResponseError)return w;let k=w;k||(k={capabilities:{}});let y=k.capabilities;y||(y={},k.capabilities=y),y.textDocumentSync===void 0||y.textDocumentSync===null?y.textDocumentSync=dn.number(b.__textDocumentSync)?b.__textDocumentSync:H.TextDocumentSyncKind.None:!dn.number(y.textDocumentSync)&&!dn.number(y.textDocumentSync.change)&&(y.textDocumentSync.change=dn.number(b.__textDocumentSync)?b.__textDocumentSync:H.TextDocumentSyncKind.None);for(let x of d)x.fillServerCapabilities(y);return k})}else{let _={capabilities:{textDocumentSync:H.TextDocumentSyncKind.None}};for(let w of d)w.fillServerCapabilities(_.capabilities);return _}}),i.onRequest(H.ShutdownRequest.type,()=>{if(e.shutdownReceived=!0,g)return g(new H.CancellationTokenSource().token)}),i.onNotification(H.ExitNotification.type,()=>{try{m&&m()}finally{e.shutdownReceived?e.exit(0):e.exit(1)}}),i.onNotification(H.SetTraceNotification.type,v=>{s.trace=H.Trace.fromString(v.value)}),b}be.createConnection=YR});var mf=S(Ct=>{"use strict";var QR=Ct&&Ct.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),jk=Ct&&Ct.__exportStar||function(n,e){for(var r in n)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&QR(e,n,r)};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.ProposedFeatures=Ct.NotebookDocuments=Ct.TextDocuments=Ct.SemanticTokensBuilder=void 0;var JR=Jh();Object.defineProperty(Ct,"SemanticTokensBuilder",{enumerable:!0,get:function(){return JR.SemanticTokensBuilder}});var ZR=Qx();jk(nt(),Ct);var XR=Xh();Object.defineProperty(Ct,"TextDocuments",{enumerable:!0,get:function(){return XR.TextDocuments}});var eP=tf();Object.defineProperty(Ct,"NotebookDocuments",{enumerable:!0,get:function(){return eP.NotebookDocuments}});jk(Ak(),Ct);var Dk;(function(n){n.all={__brand:"features",languages:ZR.InlineCompletionFeature}})(Dk||(Ct.ProposedFeatures=Dk={}))});var Mk=S((zU,Lk)=>{"use strict";Lk.exports=nt()});var gf=S(jn=>{"use strict";var tP=jn&&jn.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),Fk=jn&&jn.__exportStar||function(n,e){for(var r in n)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&tP(e,n,r)};Object.defineProperty(jn,"__esModule",{value:!0});jn.createConnection=void 0;var Wl=mf();Fk(Mk(),jn);Fk(mf(),jn);var qk=!1,nP={initialize:n=>{},get shutdownReceived(){return qk},set shutdownReceived(n){qk=n},exit:n=>{}};function rP(n,e,r,t){let i,s,o,l;n!==void 0&&n.__brand==="features"&&(i=n,n=e,e=r,r=t),Wl.ConnectionStrategy.is(n)||Wl.ConnectionOptions.is(n)?l=n:(s=n,o=e,l=r);let u=a=>(0,Wl.createProtocolConnection)(s,o,a,l);return(0,Wl.createConnection)(u,nP,i)}jn.createConnection=rP});var yf=S((KU,Nk)=>{"use strict";Nk.exports=gf()});var Wk={};Gs(Wk,{TextDocument:()=>bf});function vf(n,e){if(n.length<=1)return n;let r=n.length/2|0,t=n.slice(0,r),i=n.slice(r);vf(t,e),vf(i,e);let s=0,o=0,l=0;for(;s<t.length&&o<i.length;)e(t[s],i[o])<=0?n[l++]=t[s++]:n[l++]=i[o++];for(;s<t.length;)n[l++]=t[s++];for(;o<i.length;)n[l++]=i[o++];return n}function $k(n,e,r=0){let t=e?[r]:[];for(let i=0;i<n.length;i++){let s=n.charCodeAt(i);Uk(s)&&(s===13&&i+1<n.length&&n.charCodeAt(i+1)===10&&i++,t.push(r+i+1))}return t}function Uk(n){return n===13||n===10}function Bk(n){let e=n.start,r=n.end;return e.line>r.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:n}function iP(n){let e=Bk(n.range);return e!==n.range?{newText:n.newText,range:e}:n}var Vl,bf,Vk=cr(()=>{"use strict";Vl=class n{constructor(e,r,t,i){this._uri=e,this._languageId=r,this._version=t,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),t=this.offsetAt(e.end);return this._content.substring(r,t)}return this._content}update(e,r){for(let t of e)if(n.isIncremental(t)){let i=Bk(t.range),s=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,s)+t.text+this._content.substring(o,this._content.length);let l=Math.max(i.start.line,0),u=Math.max(i.end.line,0),a=this._lineOffsets,c=$k(t.text,!1,s);if(u-l===c.length)for(let d=0,h=c.length;d<h;d++)a[d+l+1]=c[d];else c.length<1e4?a.splice(l+1,u-l,...c):this._lineOffsets=a=a.slice(0,l+1).concat(c,a.slice(u+1));let p=t.text.length-(o-s);if(p!==0)for(let d=l+1+c.length,h=a.length;d<h;d++)a[d]=a[d]+p}else if(n.isFull(t))this._content=t.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=r}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=$k(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),t=0,i=r.length;if(i===0)return{line:0,character:e};for(;t<i;){let o=Math.floor((t+i)/2);r[o]>e?i=o:t=o+1}let s=t-1;return e=this.ensureBeforeEOL(e,r[s]),{line:s,character:e-r[s]}}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let t=r[e.line];if(e.character<=0)return t;let i=e.line+1<r.length?r[e.line+1]:this._content.length,s=Math.min(t+e.character,i);return this.ensureBeforeEOL(s,t)}ensureBeforeEOL(e,r){for(;e>r&&Uk(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(n){function e(i,s,o,l){return new Vl(i,s,o,l)}n.create=e;function r(i,s,o){if(i instanceof Vl)return i.update(s,o),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}n.update=r;function t(i,s){let o=i.getText(),l=vf(s.map(iP),(c,p)=>{let d=c.range.start.line-p.range.start.line;return d===0?c.range.start.character-p.range.start.character:d}),u=0,a=[];for(let c of l){let p=i.offsetAt(c.range.start);if(p<u)throw new Error("Overlapping edit");p>u&&a.push(o.substring(u,p)),c.newText.length&&a.push(c.newText),u=i.offsetAt(c.range.end)}return a.push(o.substr(u)),a.join("")}n.applyEdits=t})(bf||(bf={}))});function Re(){Re.init.call(this)}function Hl(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}function eT(n){return n._maxListeners===void 0?Re.defaultMaxListeners:n._maxListeners}function Kk(n,e,r,t){var i,s,o,l;if(Hl(r),(s=n._events)===void 0?(s=n._events=Object.create(null),n._eventsCount=0):(s.newListener!==void 0&&(n.emit("newListener",e,r.listener?r.listener:r),s=n._events),o=s[e]),o===void 0)o=s[e]=r,++n._eventsCount;else if(typeof o=="function"?o=s[e]=t?[r,o]:[o,r]:t?o.unshift(r):o.push(r),(i=eT(n))>0&&o.length>i&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=n,u.type=e,u.count=o.length,l=u,console&&console.warn&&console.warn(l)}return n}function sP(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Yk(n,e,r){var t={fired:!1,wrapFn:void 0,target:n,type:e,listener:r},i=sP.bind(t);return i.listener=r,t.wrapFn=i,i}function Qk(n,e,r){var t=n._events;if(t===void 0)return[];var i=t[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?function(s){for(var o=new Array(s.length),l=0;l<o.length;++l)o[l]=s[l].listener||s[l];return o}(i):tT(i,i.length)}function Jk(n){var e=this._events;if(e!==void 0){var r=e[n];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}function tT(n,e){for(var r=new Array(e),t=0;t<e;++t)r[t]=n[t];return r}var Zk,Xk,Qi,Hk,zk,Gk,Vt,_f=cr(()=>{Qi=typeof Reflect=="object"?Reflect:null,Hk=Qi&&typeof Qi.apply=="function"?Qi.apply:function(n,e,r){return Function.prototype.apply.call(n,e,r)};Xk=Qi&&typeof Qi.ownKeys=="function"?Qi.ownKeys:Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:function(n){return Object.getOwnPropertyNames(n)};zk=Number.isNaN||function(n){return n!=n};Zk=Re,Re.EventEmitter=Re,Re.prototype._events=void 0,Re.prototype._eventsCount=0,Re.prototype._maxListeners=void 0;Gk=10;Object.defineProperty(Re,"defaultMaxListeners",{enumerable:!0,get:function(){return Gk},set:function(n){if(typeof n!="number"||n<0||zk(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");Gk=n}}),Re.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Re.prototype.setMaxListeners=function(n){if(typeof n!="number"||n<0||zk(n))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+n+".");return this._maxListeners=n,this},Re.prototype.getMaxListeners=function(){return eT(this)},Re.prototype.emit=function(n){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var t=n==="error",i=this._events;if(i!==void 0)t=t&&i.error===void 0;else if(!t)return!1;if(t){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var l=i[n];if(l===void 0)return!1;if(typeof l=="function")Hk(l,this,e);else{var u=l.length,a=tT(l,u);for(r=0;r<u;++r)Hk(a[r],this,e)}return!0},Re.prototype.addListener=function(n,e){return Kk(this,n,e,!1)},Re.prototype.on=Re.prototype.addListener,Re.prototype.prependListener=function(n,e){return Kk(this,n,e,!0)},Re.prototype.once=function(n,e){return Hl(e),this.on(n,Yk(this,n,e)),this},Re.prototype.prependOnceListener=function(n,e){return Hl(e),this.prependListener(n,Yk(this,n,e)),this},Re.prototype.removeListener=function(n,e){var r,t,i,s,o;if(Hl(e),(t=this._events)===void 0)return this;if((r=t[n])===void 0)return this;if(r===e||r.listener===e)--this._eventsCount==0?this._events=Object.create(null):(delete t[n],t.removeListener&&this.emit("removeListener",n,r.listener||e));else if(typeof r!="function"){for(i=-1,s=r.length-1;s>=0;s--)if(r[s]===e||r[s].listener===e){o=r[s].listener,i=s;break}if(i<0)return this;i===0?r.shift():function(l,u){for(;u+1<l.length;u++)l[u]=l[u+1];l.pop()}(r,i),r.length===1&&(t[n]=r[0]),t.removeListener!==void 0&&this.emit("removeListener",n,o||e)}return this},Re.prototype.off=Re.prototype.removeListener,Re.prototype.removeAllListeners=function(n){var e,r,t;if((r=this._events)===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[n]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete r[n]),this;if(arguments.length===0){var i,s=Object.keys(r);for(t=0;t<s.length;++t)(i=s[t])!=="removeListener"&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(e=r[n])=="function")this.removeListener(n,e);else if(e!==void 0)for(t=e.length-1;t>=0;t--)this.removeListener(n,e[t]);return this},Re.prototype.listeners=function(n){return Qk(this,n,!0)},Re.prototype.rawListeners=function(n){return Qk(this,n,!1)},Re.listenerCount=function(n,e){return typeof n.listenerCount=="function"?n.listenerCount(e):Jk.call(n,e)},Re.prototype.listenerCount=Jk,Re.prototype.eventNames=function(){return this._eventsCount>0?Xk(this._events):[]};Vt=Zk;Vt.EventEmitter;Vt.defaultMaxListeners;Vt.init;Vt.listenerCount;Vt.EventEmitter;Vt.defaultMaxListeners;Vt.init;Vt.listenerCount});var Zn={};Gs(Zn,{EventEmitter:()=>oP,default:()=>Vt,defaultMaxListeners:()=>aP,init:()=>lP,listenerCount:()=>uP,on:()=>cP,once:()=>pP});var oP,aP,lP,uP,cP,pP,Xn=cr(()=>{_f();_f();Vt.once=function(n,e){return new Promise((r,t)=>{function i(...o){s!==void 0&&n.removeListener("error",s),r(o)}let s;e!=="error"&&(s=o=>{n.removeListener(name,i),t(o)},n.once("error",s)),n.once(e,i)})};Vt.on=function(n,e){let r=[],t=[],i=null,s=!1,o={next(){return B(this,null,function*(){let c=r.shift();if(c)return createIterResult(c,!1);if(i){let p=Promise.reject(i);return i=null,p}return s?createIterResult(void 0,!0):new Promise((p,d)=>t.push({resolve:p,reject:d}))})},return(){return B(this,null,function*(){n.removeListener(e,l),n.removeListener("error",u),s=!0;for(let c of t)c.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)})},throw(c){i=c,n.removeListener(e,l),n.removeListener("error",u)},[Symbol.asyncIterator](){return this}};return n.on(e,l),n.on("error",u),o;function l(...c){let p=t.shift();p?p.resolve(createIterResult(c,!1)):r.push(c)}function u(c){s=!0;let p=t.shift();p?p.reject(c):i=c,o.return()}};({EventEmitter:oP,defaultMaxListeners:aP,init:lP,listenerCount:uP,on:cP,once:pP}=Vt)});var zl=S((go,wf)=>{(function(n,e){if(typeof go=="object"&&typeof wf=="object")wf.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var r=e();for(var t in r)(typeof go=="object"?go:n)[t]=r[t]}})(go,()=>(()=>{"use strict";var n={470:i=>{function s(u){if(typeof u!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(u))}function o(u,a){for(var c,p="",d=0,h=-1,g=0,f=0;f<=u.length;++f){if(f<u.length)c=u.charCodeAt(f);else{if(c===47)break;c=47}if(c===47){if(!(h===f-1||g===1))if(h!==f-1&&g===2){if(p.length<2||d!==2||p.charCodeAt(p.length-1)!==46||p.charCodeAt(p.length-2)!==46){if(p.length>2){var m=p.lastIndexOf("/");if(m!==p.length-1){m===-1?(p="",d=0):d=(p=p.slice(0,m)).length-1-p.lastIndexOf("/"),h=f,g=0;continue}}else if(p.length===2||p.length===1){p="",d=0,h=f,g=0;continue}}a&&(p.length>0?p+="/..":p="..",d=2)}else p.length>0?p+="/"+u.slice(h+1,f):p=u.slice(h+1,f),d=f-h-1;h=f,g=0}else c===46&&g!==-1?++g:g=-1}return p}var l={resolve:function(){for(var u,a="",c=!1,p=arguments.length-1;p>=-1&&!c;p--){var d;p>=0?d=arguments[p]:(u===void 0&&(u=process.cwd()),d=u),s(d),d.length!==0&&(a=d+"/"+a,c=d.charCodeAt(0)===47)}return a=o(a,!c),c?a.length>0?"/"+a:"/":a.length>0?a:"."},normalize:function(u){if(s(u),u.length===0)return".";var a=u.charCodeAt(0)===47,c=u.charCodeAt(u.length-1)===47;return(u=o(u,!a)).length!==0||a||(u="."),u.length>0&&c&&(u+="/"),a?"/"+u:u},isAbsolute:function(u){return s(u),u.length>0&&u.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var u,a=0;a<arguments.length;++a){var c=arguments[a];s(c),c.length>0&&(u===void 0?u=c:u+="/"+c)}return u===void 0?".":l.normalize(u)},relative:function(u,a){if(s(u),s(a),u===a||(u=l.resolve(u))===(a=l.resolve(a)))return"";for(var c=1;c<u.length&&u.charCodeAt(c)===47;++c);for(var p=u.length,d=p-c,h=1;h<a.length&&a.charCodeAt(h)===47;++h);for(var g=a.length-h,f=d<g?d:g,m=-1,b=0;b<=f;++b){if(b===f){if(g>f){if(a.charCodeAt(h+b)===47)return a.slice(h+b+1);if(b===0)return a.slice(h+b)}else d>f&&(u.charCodeAt(c+b)===47?m=b:b===0&&(m=0));break}var v=u.charCodeAt(c+b);if(v!==a.charCodeAt(h+b))break;v===47&&(m=b)}var _="";for(b=c+m+1;b<=p;++b)b!==p&&u.charCodeAt(b)!==47||(_.length===0?_+="..":_+="/..");return _.length>0?_+a.slice(h+m):(h+=m,a.charCodeAt(h)===47&&++h,a.slice(h))},_makeLong:function(u){return u},dirname:function(u){if(s(u),u.length===0)return".";for(var a=u.charCodeAt(0),c=a===47,p=-1,d=!0,h=u.length-1;h>=1;--h)if((a=u.charCodeAt(h))===47){if(!d){p=h;break}}else d=!1;return p===-1?c?"/":".":c&&p===1?"//":u.slice(0,p)},basename:function(u,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');s(u);var c,p=0,d=-1,h=!0;if(a!==void 0&&a.length>0&&a.length<=u.length){if(a.length===u.length&&a===u)return"";var g=a.length-1,f=-1;for(c=u.length-1;c>=0;--c){var m=u.charCodeAt(c);if(m===47){if(!h){p=c+1;break}}else f===-1&&(h=!1,f=c+1),g>=0&&(m===a.charCodeAt(g)?--g==-1&&(d=c):(g=-1,d=f))}return p===d?d=f:d===-1&&(d=u.length),u.slice(p,d)}for(c=u.length-1;c>=0;--c)if(u.charCodeAt(c)===47){if(!h){p=c+1;break}}else d===-1&&(h=!1,d=c+1);return d===-1?"":u.slice(p,d)},extname:function(u){s(u);for(var a=-1,c=0,p=-1,d=!0,h=0,g=u.length-1;g>=0;--g){var f=u.charCodeAt(g);if(f!==47)p===-1&&(d=!1,p=g+1),f===46?a===-1?a=g:h!==1&&(h=1):a!==-1&&(h=-1);else if(!d){c=g+1;break}}return a===-1||p===-1||h===0||h===1&&a===p-1&&a===c+1?"":u.slice(a,p)},format:function(u){if(u===null||typeof u!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof u);return function(a,c){var p=c.dir||c.root,d=c.base||(c.name||"")+(c.ext||"");return p?p===c.root?p+d:p+"/"+d:d}(0,u)},parse:function(u){s(u);var a={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return a;var c,p=u.charCodeAt(0),d=p===47;d?(a.root="/",c=1):c=0;for(var h=-1,g=0,f=-1,m=!0,b=u.length-1,v=0;b>=c;--b)if((p=u.charCodeAt(b))!==47)f===-1&&(m=!1,f=b+1),p===46?h===-1?h=b:v!==1&&(v=1):h!==-1&&(v=-1);else if(!m){g=b+1;break}return h===-1||f===-1||v===0||v===1&&h===f-1&&h===g+1?f!==-1&&(a.base=a.name=g===0&&d?u.slice(1,f):u.slice(g,f)):(g===0&&d?(a.name=u.slice(1,h),a.base=u.slice(1,f)):(a.name=u.slice(g,h),a.base=u.slice(g,f)),a.ext=u.slice(h,f)),g>0?a.dir=u.slice(0,g-1):d&&(a.dir="/"),a},sep:"/",delimiter:":",win32:null,posix:null};l.posix=l,i.exports=l},674:(i,s)=>{if(Object.defineProperty(s,"__esModule",{value:!0}),s.isWindows=void 0,typeof process=="object")s.isWindows=process.platform==="win32";else if(typeof navigator=="object"){let o=navigator.userAgent;s.isWindows=o.indexOf("Windows")>=0}},796:(i,s,o)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.uriToFsPath=s.URI=void 0;let l=o(674),u=/^\w[\w\d+.-]*$/,a=/^\//,c=/^\/\//;function p(A,I){if(!A.scheme&&I)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${A.authority}", path: "${A.path}", query: "${A.query}", fragment: "${A.fragment}"}`);if(A.scheme&&!u.test(A.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(A.path){if(A.authority){if(!a.test(A.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(c.test(A.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let d="",h="/",g=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{constructor(I,C,O,j,Q,J=!1){pr(this,"scheme");pr(this,"authority");pr(this,"path");pr(this,"query");pr(this,"fragment");typeof I=="object"?(this.scheme=I.scheme||d,this.authority=I.authority||d,this.path=I.path||d,this.query=I.query||d,this.fragment=I.fragment||d):(this.scheme=function(Oe,ce){return Oe||ce?Oe:"file"}(I,J),this.authority=C||d,this.path=function(Oe,ce){switch(Oe){case"https":case"http":case"file":ce?ce[0]!==h&&(ce=h+ce):ce=h}return ce}(this.scheme,O||d),this.query=j||d,this.fragment=Q||d,p(this,J))}static isUri(I){return I instanceof f||!!I&&typeof I.authority=="string"&&typeof I.fragment=="string"&&typeof I.path=="string"&&typeof I.query=="string"&&typeof I.scheme=="string"&&typeof I.fsPath=="string"&&typeof I.with=="function"&&typeof I.toString=="function"}get fsPath(){return k(this,!1)}with(I){if(!I)return this;let{scheme:C,authority:O,path:j,query:Q,fragment:J}=I;return C===void 0?C=this.scheme:C===null&&(C=d),O===void 0?O=this.authority:O===null&&(O=d),j===void 0?j=this.path:j===null&&(j=d),Q===void 0?Q=this.query:Q===null&&(Q=d),J===void 0?J=this.fragment:J===null&&(J=d),C===this.scheme&&O===this.authority&&j===this.path&&Q===this.query&&J===this.fragment?this:new b(C,O,j,Q,J)}static parse(I,C=!1){let O=g.exec(I);return O?new b(O[2]||d,P(O[4]||d),P(O[5]||d),P(O[7]||d),P(O[9]||d),C):new b(d,d,d,d,d)}static file(I){let C=d;if(l.isWindows&&(I=I.replace(/\\/g,h)),I[0]===h&&I[1]===h){let O=I.indexOf(h,2);O===-1?(C=I.substring(2),I=h):(C=I.substring(2,O),I=I.substring(O)||h)}return new b("file",C,I,d,d)}static from(I){let C=new b(I.scheme,I.authority,I.path,I.query,I.fragment);return p(C,!0),C}toString(I=!1){return y(this,I)}toJSON(){return this}static revive(I){if(I){if(I instanceof f)return I;{let C=new b(I);return C._formatted=I.external,C._fsPath=I._sep===m?I.fsPath:null,C}}return I}}s.URI=f;let m=l.isWindows?1:void 0;class b extends f{constructor(){super(...arguments);pr(this,"_formatted",null);pr(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=k(this,!1)),this._fsPath}toString(C=!1){return C?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){let C={$mid:1};return this._fsPath&&(C.fsPath=this._fsPath,C._sep=m),this._formatted&&(C.external=this._formatted),this.path&&(C.path=this.path),this.scheme&&(C.scheme=this.scheme),this.authority&&(C.authority=this.authority),this.query&&(C.query=this.query),this.fragment&&(C.fragment=this.fragment),C}}let v={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function _(A,I,C){let O,j=-1;for(let Q=0;Q<A.length;Q++){let J=A.charCodeAt(Q);if(J>=97&&J<=122||J>=65&&J<=90||J>=48&&J<=57||J===45||J===46||J===95||J===126||I&&J===47||C&&J===91||C&&J===93||C&&J===58)j!==-1&&(O+=encodeURIComponent(A.substring(j,Q)),j=-1),O!==void 0&&(O+=A.charAt(Q));else{O===void 0&&(O=A.substr(0,Q));let Oe=v[J];Oe!==void 0?(j!==-1&&(O+=encodeURIComponent(A.substring(j,Q)),j=-1),O+=Oe):j===-1&&(j=Q)}}return j!==-1&&(O+=encodeURIComponent(A.substring(j))),O!==void 0?O:A}function w(A){let I;for(let C=0;C<A.length;C++){let O=A.charCodeAt(C);O===35||O===63?(I===void 0&&(I=A.substr(0,C)),I+=v[O]):I!==void 0&&(I+=A[C])}return I!==void 0?I:A}function k(A,I){let C;return C=A.authority&&A.path.length>1&&A.scheme==="file"?`//${A.authority}${A.path}`:A.path.charCodeAt(0)===47&&(A.path.charCodeAt(1)>=65&&A.path.charCodeAt(1)<=90||A.path.charCodeAt(1)>=97&&A.path.charCodeAt(1)<=122)&&A.path.charCodeAt(2)===58?I?A.path.substr(1):A.path[1].toLowerCase()+A.path.substr(2):A.path,l.isWindows&&(C=C.replace(/\//g,"\\")),C}function y(A,I){let C=I?w:_,O="",{scheme:j,authority:Q,path:J,query:Oe,fragment:ce}=A;if(j&&(O+=j,O+=":"),(Q||j==="file")&&(O+=h,O+=h),Q){let oe=Q.indexOf("@");if(oe!==-1){let Pe=Q.substr(0,oe);Q=Q.substr(oe+1),oe=Pe.lastIndexOf(":"),oe===-1?O+=C(Pe,!1,!1):(O+=C(Pe.substr(0,oe),!1,!1),O+=":",O+=C(Pe.substr(oe+1),!1,!0)),O+="@"}Q=Q.toLowerCase(),oe=Q.lastIndexOf(":"),oe===-1?O+=C(Q,!1,!0):(O+=C(Q.substr(0,oe),!1,!0),O+=Q.substr(oe))}if(J){if(J.length>=3&&J.charCodeAt(0)===47&&J.charCodeAt(2)===58){let oe=J.charCodeAt(1);oe>=65&&oe<=90&&(J=`/${String.fromCharCode(oe+32)}:${J.substr(3)}`)}else if(J.length>=2&&J.charCodeAt(1)===58){let oe=J.charCodeAt(0);oe>=65&&oe<=90&&(J=`${String.fromCharCode(oe+32)}:${J.substr(2)}`)}O+=C(J,!0,!1)}return Oe&&(O+="?",O+=C(Oe,!1,!1)),ce&&(O+="#",O+=I?ce:_(ce,!1,!1)),O}function x(A){try{return decodeURIComponent(A)}catch(I){return A.length>3?A.substr(0,3)+x(A.substr(3)):A}}s.uriToFsPath=k;let T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function P(A){return A.match(T)?A.replace(T,I=>x(I)):A}},679:function(i,s,o){var l=this&&this.__createBinding||(Object.create?function(g,f,m,b){b===void 0&&(b=m);var v=Object.getOwnPropertyDescriptor(f,m);v&&!("get"in v?!f.__esModule:v.writable||v.configurable)||(v={enumerable:!0,get:function(){return f[m]}}),Object.defineProperty(g,b,v)}:function(g,f,m,b){b===void 0&&(b=m),g[b]=f[m]}),u=this&&this.__setModuleDefault||(Object.create?function(g,f){Object.defineProperty(g,"default",{enumerable:!0,value:f})}:function(g,f){g.default=f}),a=this&&this.__importStar||function(g){if(g&&g.__esModule)return g;var f={};if(g!=null)for(var m in g)m!=="default"&&Object.prototype.hasOwnProperty.call(g,m)&&l(f,g,m);return u(f,g),f};Object.defineProperty(s,"__esModule",{value:!0}),s.Utils=void 0;let c=a(o(470)),p=c.posix||c,d="/";var h;(function(g){g.joinPath=function(f,...m){return f.with({path:p.join(f.path,...m)})},g.resolvePath=function(f,...m){let b=f.path,v=!1;b[0]!==d&&(b=d+b,v=!0);let _=p.resolve(b,...m);return v&&_[0]===d&&!f.authority&&(_=_.substring(1)),f.with({path:_})},g.dirname=function(f){if(f.path.length===0||f.path===d)return f;let m=p.dirname(f.path);return m.length===1&&m.charCodeAt(0)===46&&(m=""),f.with({path:m})},g.basename=function(f){return p.basename(f.path)},g.extname=function(f){return p.extname(f.path)}})(h||(s.Utils=h={}))}},e={};function r(i){var s=e[i];if(s!==void 0)return s.exports;var o=e[i]={exports:{}};return n[i].call(o.exports,o,o.exports,r),o.exports}var t={};return(()=>{var i=t;Object.defineProperty(i,"__esModule",{value:!0}),i.Utils=i.URI=void 0;let s=r(796);Object.defineProperty(i,"URI",{enumerable:!0,get:function(){return s.URI}});let o=r(679);Object.defineProperty(i,"Utils",{enumerable:!0,get:function(){return o.Utils}})})(),t})())});var Yl=S((nB,sT)=>{var yo=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,dP=typeof AbortController=="function",Gl=dP?AbortController:class{constructor(){this.signal=new nT}abort(e=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||e,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},hP=typeof AbortSignal=="function",fP=typeof Gl.AbortSignal=="function",nT=hP?AbortSignal:fP?Gl.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,this.onabort(e),this._listeners.forEach(r=>r(e),this))}onabort(){}addEventListener(e,r){e==="abort"&&this._listeners.push(r)}removeEventListener(e,r){e==="abort"&&(this._listeners=this._listeners.filter(t=>t!==r))}},Sf=new Set,xf=(n,e)=>{let r=`LRU_CACHE_OPTION_${n}`;Kl(r)&&If(r,`${n} option`,`options.${e}`,Zi)},kf=(n,e)=>{let r=`LRU_CACHE_METHOD_${n}`;if(Kl(r)){let{prototype:t}=Zi,{get:i}=Object.getOwnPropertyDescriptor(t,n);If(r,`${n} method`,`cache.${e}()`,i)}},mP=(n,e)=>{let r=`LRU_CACHE_PROPERTY_${n}`;if(Kl(r)){let{prototype:t}=Zi,{get:i}=Object.getOwnPropertyDescriptor(t,n);If(r,`${n} property`,`cache.${e}`,i)}},rT=(...n)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...n):console.error(...n)},Kl=n=>!Sf.has(n),If=(n,e,r,t)=>{Sf.add(n);let i=`The ${e} is deprecated. Please use ${r} instead.`;rT(i,"DeprecationWarning",n,t)},Tr=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),iT=n=>Tr(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Ji:null:null,Ji=class extends Array{constructor(e){super(e),this.fill(0)}},Tf=class{constructor(e){if(e===0)return[];let r=iT(e);this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Zi=class n{constructor(e={}){let{max:r=0,ttl:t,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:l,allowStale:u,dispose:a,disposeAfter:c,noDisposeOnSet:p,noUpdateTTL:d,maxSize:h=0,maxEntrySize:g=0,sizeCalculation:f,fetchMethod:m,fetchContext:b,noDeleteOnFetchRejection:v,noDeleteOnStaleGet:_,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:k,ignoreFetchAbort:y}=e,{length:x,maxAge:T,stale:P}=e instanceof n?{}:e;if(r!==0&&!Tr(r))throw new TypeError("max option must be a nonnegative integer");let A=r?iT(r):Array;if(!A)throw new Error("invalid max value: "+r);if(this.max=r,this.maxSize=h,this.maxEntrySize=g||this.maxSize,this.sizeCalculation=f||x,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=m||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=b,!this.fetchMethod&&b!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(r).fill(null),this.valList=new Array(r).fill(null),this.next=new A(r),this.prev=new A(r),this.head=0,this.tail=0,this.free=new Tf(r),this.initialFill=1,this.size=0,typeof a=="function"&&(this.dispose=a),typeof c=="function"?(this.disposeAfter=c,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!p,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!v,this.allowStaleOnFetchRejection=!!w,this.allowStaleOnFetchAbort=!!k,this.ignoreFetchAbort=!!y,this.maxEntrySize!==0){if(this.maxSize!==0&&!Tr(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!Tr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!u||!!P,this.noDeleteOnStaleGet=!!_,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!l,this.ttlResolution=Tr(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=t||T||0,this.ttl){if(!Tr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let I="LRU_CACHE_UNBOUNDED";Kl(I)&&(Sf.add(I),rT("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",I,n))}P&&xf("stale","allowStale"),T&&xf("maxAge","ttl"),x&&xf("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Ji(this.max),this.starts=new Ji(this.max),this.setItemTTL=(t,i,s=yo.now())=>{if(this.starts[t]=i!==0?s:0,this.ttls[t]=i,i!==0&&this.ttlAutopurge){let o=setTimeout(()=>{this.isStale(t)&&this.delete(this.keyList[t])},i+1);o.unref&&o.unref()}},this.updateItemAge=t=>{this.starts[t]=this.ttls[t]!==0?yo.now():0},this.statusTTL=(t,i)=>{t&&(t.ttl=this.ttls[i],t.start=this.starts[i],t.now=e||r(),t.remainingTTL=t.now+t.ttl-t.start)};let e=0,r=()=>{let t=yo.now();if(this.ttlResolution>0){e=t;let i=setTimeout(()=>e=0,this.ttlResolution);i.unref&&i.unref()}return t};this.getRemainingTTL=t=>{let i=this.keyMap.get(t);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(e||r())},this.isStale=t=>this.ttls[t]!==0&&this.starts[t]!==0&&(e||r())-this.starts[t]>this.ttls[t]}updateItemAge(e){}statusTTL(e,r){}setItemTTL(e,r,t){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Ji(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,r,t,i)=>{if(this.isBackgroundFetch(r))return 0;if(!Tr(t))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(t=i(r,e),!Tr(t))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return t},this.addItemSize=(e,r,t)=>{if(this.sizes[e]=r,this.maxSize){let i=this.maxSize-this.sizes[e];for(;this.calculatedSize>i;)this.evict(!0)}this.calculatedSize+=this.sizes[e],t&&(t.entrySize=r,t.totalCalculatedSize=this.calculatedSize)}}removeItemSize(e){}addItemSize(e,r){}requireSize(e,r,t,i){if(t||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.tail;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.head));)r=this.prev[r]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.head;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.tail));)r=this.next[r]}isValidIndex(e){return e!==void 0&&this.keyMap.get(this.keyList[e])===e}*entries(){for(let e of this.indexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*rentries(){for(let e of this.rindexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*keys(){for(let e of this.indexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*rkeys(){for(let e of this.rindexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*values(){for(let e of this.indexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}*rvalues(){for(let e of this.rindexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}[Symbol.iterator](){return this.entries()}find(e,r){for(let t of this.indexes()){let i=this.valList[t],s=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(s!==void 0&&e(s,this.keyList[t],this))return this.get(this.keyList[t],r)}}forEach(e,r=this){for(let t of this.indexes()){let i=this.valList[t],s=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(r,s,this.keyList[t],this)}}rforEach(e,r=this){for(let t of this.rindexes()){let i=this.valList[t],s=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(r,s,this.keyList[t],this)}}get prune(){return kf("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(let r of this.rindexes({allowStale:!0}))this.isStale(r)&&(this.delete(this.keyList[r]),e=!0);return e}dump(){let e=[];for(let r of this.indexes({allowStale:!0})){let t=this.keyList[r],i=this.valList[r],s=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(s===void 0)continue;let o={value:s};if(this.ttls){o.ttl=this.ttls[r];let l=yo.now()-this.starts[r];o.start=Math.floor(Date.now()-l)}this.sizes&&(o.size=this.sizes[r]),e.unshift([t,o])}return e}load(e){this.clear();for(let[r,t]of e){if(t.start){let i=Date.now()-t.start;t.start=yo.now()-i}this.set(r,t.value,t)}}dispose(e,r,t){}set(e,r,{ttl:t=this.ttl,start:i,noDisposeOnSet:s=this.noDisposeOnSet,size:o=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,status:a}={}){if(o=this.requireSize(e,r,o,l),this.maxEntrySize&&o>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.delete(e),this;let c=this.size===0?void 0:this.keyMap.get(e);if(c===void 0)c=this.newIndex(),this.keyList[c]=e,this.valList[c]=r,this.keyMap.set(e,c),this.next[this.tail]=c,this.prev[c]=this.tail,this.tail=c,this.size++,this.addItemSize(c,o,a),a&&(a.set="add"),u=!1;else{this.moveToTail(c);let p=this.valList[c];if(r!==p){if(this.isBackgroundFetch(p)?p.__abortController.abort(new Error("replaced")):s||(this.dispose(p,e,"set"),this.disposeAfter&&this.disposed.push([p,e,"set"])),this.removeItemSize(c),this.valList[c]=r,this.addItemSize(c,o,a),a){a.set="replace";let d=p&&this.isBackgroundFetch(p)?p.__staleWhileFetching:p;d!==void 0&&(a.oldValue=d)}}else a&&(a.set="update")}if(t!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),u||this.setItemTTL(c,t,i),this.statusTTL(a,c),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let e=this.valList[this.head];return this.evict(!0),e}}evict(e){let r=this.head,t=this.keyList[r],i=this.valList[r];return this.isBackgroundFetch(i)?i.__abortController.abort(new Error("evicted")):(this.dispose(i,t,"evict"),this.disposeAfter&&this.disposed.push([i,t,"evict"])),this.removeItemSize(r),e&&(this.keyList[r]=null,this.valList[r]=null,this.free.push(r)),this.head=this.next[r],this.keyMap.delete(t),this.size--,r}has(e,{updateAgeOnHas:r=this.updateAgeOnHas,status:t}={}){let i=this.keyMap.get(e);if(i!==void 0)if(this.isStale(i))t&&(t.has="stale",this.statusTTL(t,i));else return r&&this.updateItemAge(i),t&&(t.has="hit"),this.statusTTL(t,i),!0;else t&&(t.has="miss");return!1}peek(e,{allowStale:r=this.allowStale}={}){let t=this.keyMap.get(e);if(t!==void 0&&(r||!this.isStale(t))){let i=this.valList[t];return this.isBackgroundFetch(i)?i.__staleWhileFetching:i}}backgroundFetch(e,r,t,i){let s=r===void 0?void 0:this.valList[r];if(this.isBackgroundFetch(s))return s;let o=new Gl;t.signal&&t.signal.addEventListener("abort",()=>o.abort(t.signal.reason));let l={signal:o.signal,options:t,context:i},u=(h,g=!1)=>{let{aborted:f}=o.signal,m=t.ignoreFetchAbort&&h!==void 0;return t.status&&(f&&!g?(t.status.fetchAborted=!0,t.status.fetchError=o.signal.reason,m&&(t.status.fetchAbortIgnored=!0)):t.status.fetchResolved=!0),f&&!m&&!g?c(o.signal.reason):(this.valList[r]===d&&(h===void 0?d.__staleWhileFetching?this.valList[r]=d.__staleWhileFetching:this.delete(e):(t.status&&(t.status.fetchUpdated=!0),this.set(e,h,l.options))),h)},a=h=>(t.status&&(t.status.fetchRejected=!0,t.status.fetchError=h),c(h)),c=h=>{let{aborted:g}=o.signal,f=g&&t.allowStaleOnFetchAbort,m=f||t.allowStaleOnFetchRejection,b=m||t.noDeleteOnFetchRejection;if(this.valList[r]===d&&(!b||d.__staleWhileFetching===void 0?this.delete(e):f||(this.valList[r]=d.__staleWhileFetching)),m)return t.status&&d.__staleWhileFetching!==void 0&&(t.status.returnedStale=!0),d.__staleWhileFetching;if(d.__returned===d)throw h},p=(h,g)=>{this.fetchMethod(e,s,l).then(f=>h(f),g),o.signal.addEventListener("abort",()=>{(!t.ignoreFetchAbort||t.allowStaleOnFetchAbort)&&(h(),t.allowStaleOnFetchAbort&&(h=f=>u(f,!0)))})};t.status&&(t.status.fetchDispatched=!0);let d=new Promise(p).then(u,a);return d.__abortController=o,d.__staleWhileFetching=s,d.__returned=null,r===void 0?(this.set(e,d,on(tt({},l.options),{status:void 0})),r=this.keyMap.get(e)):this.valList[r]=d,d}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||e.__returned===null)}fetch(v){return B(this,arguments,function*(e,{allowStale:r=this.allowStale,updateAgeOnGet:t=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:h=this.allowStaleOnFetchAbort,fetchContext:g=this.fetchContext,forceRefresh:f=!1,status:m,signal:b}={}){if(!this.fetchMethod)return m&&(m.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:t,noDeleteOnStaleGet:i,status:m});let _={allowStale:r,updateAgeOnGet:t,noDeleteOnStaleGet:i,ttl:s,noDisposeOnSet:o,size:l,sizeCalculation:u,noUpdateTTL:a,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:h,ignoreFetchAbort:d,status:m,signal:b},w=this.keyMap.get(e);if(w===void 0){m&&(m.fetch="miss");let k=this.backgroundFetch(e,w,_,g);return k.__returned=k}else{let k=this.valList[w];if(this.isBackgroundFetch(k)){let A=r&&k.__staleWhileFetching!==void 0;return m&&(m.fetch="inflight",A&&(m.returnedStale=!0)),A?k.__staleWhileFetching:k.__returned=k}let y=this.isStale(w);if(!f&&!y)return m&&(m.fetch="hit"),this.moveToTail(w),t&&this.updateItemAge(w),this.statusTTL(m,w),k;let x=this.backgroundFetch(e,w,_,g),T=x.__staleWhileFetching!==void 0,P=T&&r;return m&&(m.fetch=T&&y?"stale":"refresh",P&&y&&(m.returnedStale=!0)),P?x.__staleWhileFetching:x.__returned=x}})}get(e,{allowStale:r=this.allowStale,updateAgeOnGet:t=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:s}={}){let o=this.keyMap.get(e);if(o!==void 0){let l=this.valList[o],u=this.isBackgroundFetch(l);return this.statusTTL(s,o),this.isStale(o)?(s&&(s.get="stale"),u?(s&&(s.returnedStale=r&&l.__staleWhileFetching!==void 0),r?l.__staleWhileFetching:void 0):(i||this.delete(e),s&&(s.returnedStale=r),r?l:void 0)):(s&&(s.get="hit"),u?l.__staleWhileFetching:(this.moveToTail(o),t&&this.updateItemAge(o),l))}else s&&(s.get="miss")}connect(e,r){this.prev[r]=e,this.next[e]=r}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return kf("del","delete"),this.delete}delete(e){let r=!1;if(this.size!==0){let t=this.keyMap.get(e);if(t!==void 0)if(r=!0,this.size===1)this.clear();else{this.removeItemSize(t);let i=this.valList[t];this.isBackgroundFetch(i)?i.__abortController.abort(new Error("deleted")):(this.dispose(i,e,"delete"),this.disposeAfter&&this.disposed.push([i,e,"delete"])),this.keyMap.delete(e),this.keyList[t]=null,this.valList[t]=null,t===this.tail?this.tail=this.prev[t]:t===this.head?this.head=this.next[t]:(this.next[this.prev[t]]=this.next[t],this.prev[this.next[t]]=this.prev[t]),this.size--,this.free.push(t)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return r}clear(){for(let e of this.rindexes({allowStale:!0})){let r=this.valList[e];if(this.isBackgroundFetch(r))r.__abortController.abort(new Error("deleted"));else{let t=this.keyList[e];this.dispose(r,t,"delete"),this.disposeAfter&&this.disposed.push([r,t,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return kf("reset","clear"),this.clear}get length(){return mP("length","size"),this.size}static get AbortController(){return Gl}static get AbortSignal(){return nT}};sT.exports=Zi});var Xi=S(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.IndentationType=er.ConfigurationNamespace=er.LanguageId=void 0;er.LanguageId="greyscript";er.ConfigurationNamespace="greybel";var gP;(function(n){n.Tab="Tab",n.Whitespace="Whitespace"})(gP=er.IndentationType||(er.IndentationType={}))});var es=S(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});Ql.Position=void 0;var Ef=class{constructor(e,r){this.line=e,this.character=r}toString(){return`${this.line}:${this.character}`}};Ql.Position=Ef});var Sr=S(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.LiteralToken=Zt.Token=Zt.BaseToken=Zt.BaseTokenOptions=Zt.TokenType=void 0;var oT=es(),yP;(function(n){n.EOF="EOF",n.StringLiteral="StringLiteral",n.Keyword="Keyword",n.Identifier="Identifier",n.NumericLiteral="NumericLiteral",n.Punctuator="Punctuator",n.BooleanLiteral="BooleanLiteral",n.NilLiteral="NilLiteral",n.EOL="EOL",n.SliceOperator="SliceOperator",n.Comment="Comment",n.Invalid="Invalid"})(yP=Zt.TokenType||(Zt.TokenType={}));var Rf=class{};Zt.BaseTokenOptions=Rf;var bo=class{constructor(e){this.type=e.type,this.value=e.value,this.line=e.line,this.lineStart=e.lineStart,this.range=e.range,this.lastLine=e.lastLine,this.lastLineStart=e.lastLineStart,this.afterSpace=e.afterSpace;let r=e.offsetRange,t=e.range;this.start=new oT.Position(this.line,t[0]-r[0]+1),this.end=new oT.Position(this.lastLine||this.line,t[1]-r[1]+1)}toString(){let e=this.line,r=this.lastLine!==void 0?this.lastLine:this.line,t=this.start.character,i=this.end.character,s=`${e}:${t} - ${r}:${i}`;return`${this.type}[${s}: value = '${this.value}']`}};Zt.BaseToken=bo;var Pf=class extends bo{};Zt.Token=Pf;var Cf=class extends bo{constructor(e){super(e),this.raw=e.raw}toString(){let e=this.line,r=this.lastLine!==void 0?this.lastLine:this.line,t=this.start.character,i=this.end.character,s=`${e}:${t} - ${r}:${i}`;return`${this.type}[${s}: value = ${this.raw}]`}};Zt.LiteralToken=Cf});var Jl=S(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.CharacterCode=void 0;var bP;(function(n){n[n.WHITESPACE=32]="WHITESPACE",n[n.QUOTE=34]="QUOTE",n[n.NUMBER_0=48]="NUMBER_0",n[n.NUMBER_1=49]="NUMBER_1",n[n.NUMBER_2=50]="NUMBER_2",n[n.NUMBER_3=51]="NUMBER_3",n[n.NUMBER_4=52]="NUMBER_4",n[n.NUMBER_5=53]="NUMBER_5",n[n.NUMBER_6=54]="NUMBER_6",n[n.NUMBER_7=55]="NUMBER_7",n[n.NUMBER_8=56]="NUMBER_8",n[n.NUMBER_9=57]="NUMBER_9",n[n.TAB=9]="TAB",n[n.NEW_LINE=10]="NEW_LINE",n[n.RETURN_LINE=13]="RETURN_LINE",n[n.SLASH=47]="SLASH",n[n.DOT=46]="DOT",n[n.EQUAL=61]="EQUAL",n[n.ASTERISK=42]="ASTERISK",n[n.CARET=94]="CARET",n[n.PERCENT=37]="PERCENT",n[n.COMMA=44]="COMMA",n[n.CURLY_BRACKET_LEFT=123]="CURLY_BRACKET_LEFT",n[n.CURLY_BRACKET_RIGHT=125]="CURLY_BRACKET_RIGHT",n[n.SQUARE_BRACKETS_LEFT=91]="SQUARE_BRACKETS_LEFT",n[n.SQUARE_BRACKETS_RIGHT=93]="SQUARE_BRACKETS_RIGHT",n[n.PARENTHESIS_LEFT=40]="PARENTHESIS_LEFT",n[n.PARENTHESIS_RIGHT=41]="PARENTHESIS_RIGHT",n[n.SEMICOLON=59]="SEMICOLON",n[n.HASH=35]="HASH",n[n.MINUS=45]="MINUS",n[n.PLUS=43]="PLUS",n[n.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",n[n.AT_SIGN=64]="AT_SIGN",n[n.COLON=58]="COLON",n[n.ARROW_LEFT=60]="ARROW_LEFT",n[n.ARROW_RIGHT=62]="ARROW_RIGHT",n[n.LETTER_E=69]="LETTER_E",n[n.LETTER_e=101]="LETTER_e"})(bP=vo.CharacterCode||(vo.CharacterCode={}))});var ts=S(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.Keyword=void 0;var vP;(function(n){n.If="if",n.In="in",n.Or="or",n.And="and",n.Isa="isa",n.For="for",n.Not="not",n.New="new",n.End="end",n.EndFor="end for",n.EndWhile="end while",n.EndFunction="end function",n.EndIf="end if",n.Then="then",n.Else="else",n.Break="break",n.While="while",n.ElseIf="else if",n.Return="return",n.Function="function",n.Continue="continue",n.Repeat="repeat"})(vP=_o.Keyword||(_o.Keyword={}))});var Df=S(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});var hn=Jl(),_P=ts(),Of=class{constructor(){this.isKeyword=Set.prototype.has.bind(new Set(Object.values(_P.Keyword)))}isWhitespace(e){return hn.CharacterCode.WHITESPACE===e||hn.CharacterCode.TAB===e}isEndOfLine(e){return hn.CharacterCode.NEW_LINE===e||hn.CharacterCode.RETURN_LINE===e}isComment(e,r){return hn.CharacterCode.SLASH===e&&hn.CharacterCode.SLASH===r}isIdentifierStart(e){return(e|32)>=97&&(e|32)<=122||e>=128||e===95}isIdentifierPart(e){return(e|32)>=97&&(e|32)<=122||e>=48&&e<=57||e>=128||e===95}isDecDigit(e){return e>=hn.CharacterCode.NUMBER_0&&e<=hn.CharacterCode.NUMBER_9}isWinNewline(e,r){switch(e){case hn.CharacterCode.RETURN_LINE:return hn.CharacterCode.NEW_LINE===r;case hn.CharacterCode.NEW_LINE:return hn.CharacterCode.RETURN_LINE===r}return!1}};Af.default=Of});var Zl=S(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.ParserException=ns.LexerException=void 0;var jf=class extends Error{constructor(e,r){super(e),this.range=r}};ns.LexerException=jf;var Lf=class extends Error{constructor(e,r){super(e),this.range=r}};ns.ParserException=Lf});var Mf=S(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.Literal=void 0;var wP;(function(n){n.True="true",n.False="false",n.Null="null"})(wP=wo.Literal||(wo.Literal={}))});var rs=S(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.Operator=void 0;var xP;(function(n){n.Plus="+",n.Asterik="*",n.Minus="-",n.Slash="/",n.Power="^",n.Modulo="%",n.LessThan="<",n.GreaterThan=">",n.LessThanOrEqual="<=",n.GreaterThanOrEqual=">=",n.NotEqual="!=",n.Equal="==",n.Or="or",n.And="and",n.Not="not",n.Isa="isa",n.AddShorthand="+=",n.SubtractShorthand="-=",n.MultiplyShorthand="*=",n.DivideShorthand="/=",n.PowerShorthand="^=",n.ModuloShorthand="%=",n.Member=".",n.Assign="=",n.EndOfLine=";",n.EndOfFile="<eof>",n.SliceSeperator=":",n.Comma=",",n.Escape='"',n.SLBracket="[",n.SRBracket="]",n.CLBracket="{",n.CRBracket="}",n.LParenthesis="(",n.RParenthesis=")",n.Reference="@",n.New="new"})(xP=xo.Operator||(xo.Operator={}))});var is=S(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});Xl.Range=void 0;var qf=class{constructor(e,r){this.start=e,this.end=r}toString(){return`${this.start} - ${this.end}`}};Xl.Range=qf});var $f=S(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});var Ff=class{constructor(){this._head=null,this._tail=null,this._size=0}enqueue(e){let r={value:e};this._head?this._tail.next=r:this._head=r,this._tail=r,this._size++}dequeue(){let e=this._head.value;if(e)return this._head=this._head.next,this._size--,e}peek(){var e;return((e=this._head)===null||e===void 0?void 0:e.value)||null}clear(){this._head=null,this._tail=null,this._size=0}copyInto(e){this._head=e._head,this._tail=e._tail,this._size=e._size}get size(){return this._size}*[Symbol.iterator](){let e=this._head;for(;e;)yield e,e=e.next}};Nf.default=Ff});var Wf=S(To=>{"use strict";var lT=To&&To.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(To,"__esModule",{value:!0});var Ue=Sr(),kP=lT(Df()),de=Jl(),TP=Zl(),Uf=ts(),ko=Mf(),Be=rs(),ss=es(),Bf=is(),aT=lT($f());function Ir(n){let e=this.content[this.index];return this.index+=e.length,this.createPunctuator(e,n)}var eu=class n{constructor(e,r={}){let t=this;t.content=e,t.length=e.length,t.index=0,t.tokenStart=null,t.tabWidth=r.tabWidth||1,t.line=1,t.lineStart=0,t.offset=0,t.validator=r.validator||new kP.default,t.unsafe=r.unsafe,t.errors=[],t.backlog=new aT.default,t.snapshot=new aT.default}scan(e,r){let t=n.scanHandlers[e];return t?t.call(this,r):this.validator.isDecDigit(e)?this.scanNumericLiteral(r):(this.index++,null)}isAtWhitespace(){return this.validator.isWhitespace(this.codeAt())}codeAt(e=0){let r=this.index+e;return r<this.length?this.content.charCodeAt(r):0}createEOL(e){let r=this,t=new Ue.Token({type:Ue.TokenType.EOL,value:Be.Operator.EndOfLine,line:r.line,lineStart:r.lineStart,range:[r.tokenStart,r.index],offsetRange:[r.offset,r.offset],afterSpace:e});return r.snapshot.enqueue(t),t}createIdentifier(e,r){let t=this,i=new Ue.Token({type:Ue.TokenType.Identifier,value:e,line:t.line,lineStart:t.lineStart,range:[t.tokenStart,t.index],offsetRange:[t.offset,t.offset],afterSpace:r});return t.snapshot.enqueue(i),i}createEOF(e){let r=this,t=new Ue.Token({type:Ue.TokenType.EOF,value:Be.Operator.EndOfFile,line:r.line,lineStart:r.lineStart,range:[r.index,r.index],offsetRange:[r.offset,r.offset],afterSpace:e});return r.snapshot.enqueue(t),t}createBoolean(e,r){let t=this,i=new Ue.LiteralToken({type:Ue.TokenType.BooleanLiteral,value:e===ko.Literal.True,raw:e,line:t.line,lineStart:t.lineStart,range:[t.tokenStart,t.index],offsetRange:[t.offset,t.offset],afterSpace:r});return t.snapshot.enqueue(i),i}createNull(e){let r=this,t=new Ue.LiteralToken({type:Ue.TokenType.NilLiteral,value:null,raw:ko.Literal.Null,line:r.line,lineStart:r.lineStart,range:[r.tokenStart,r.index],offsetRange:[r.offset,r.offset],afterSpace:e});return r.snapshot.enqueue(t),t}createSlice(e){let r=new Ue.Token({type:Ue.TokenType.SliceOperator,value:Be.Operator.SliceSeperator,line:this.line,lineStart:this.lineStart,range:[this.tokenStart,this.index],offsetRange:[this.offset,this.offset],afterSpace:e});return this.snapshot.enqueue(r),r}createPunctuator(e,r){let t=new Ue.Token({type:Ue.TokenType.Punctuator,value:e,line:this.line,lineStart:this.lineStart,range:[this.tokenStart,this.index],offsetRange:[this.offset,this.offset],afterSpace:r});return this.snapshot.enqueue(t),t}createNumericLiteral(e,r,t){let i=new Ue.LiteralToken({type:Ue.TokenType.NumericLiteral,value:e,raw:r,line:this.line,lineStart:this.lineStart,range:[this.tokenStart,this.index],offsetRange:[this.offset,this.offset],afterSpace:t});return this.snapshot.enqueue(i),i}scanStringLiteral(e){let r=this,t=r.validator,i=r.line,s=r.lineStart,o=r.index,l=r.offset,u=r.offset,a=!1;for(;r.index<r.length;){r.index++;let h=r.codeAt();if(r.validator.isEndOfLine(h))t.isWinNewline(h,r.codeAt(1))&&r.index++,r.line++,u=r.index+1;else if(de.CharacterCode.QUOTE===h){if(de.CharacterCode.QUOTE!==r.codeAt(1)){a=!0;break}r.index++}}if(!a)return r.raise("Unexpected string end of file.",new Bf.Range(new ss.Position(i,o-l+1),new ss.Position(r.line,r.index-u+2)));r.index++;let c=r.content.slice(r.tokenStart,r.index),p=c.slice(1,-1).replace(/""/g,Be.Operator.Escape),d=new Ue.LiteralToken({type:Ue.TokenType.StringLiteral,value:p,raw:c,line:i,lineStart:s,range:[r.tokenStart,r.index],offsetRange:[l,u],afterSpace:e,lastLine:r.line,lastLineStart:r.lineStart});return r.offset=u,r.snapshot.enqueue(d),d}scanComment(e){let r=this,t=r.validator,i=r.line,s=r.lineStart;for(;this.index<this.length&&!t.isEndOfLine(r.codeAt());r.index++);t.isWinNewline(r.codeAt(),r.codeAt(1))&&r.index++;let o=r.content.slice(r.tokenStart+2,r.index),l=new Ue.Token({type:Ue.TokenType.Comment,value:o,line:i,lineStart:s,range:[r.tokenStart,r.index],offsetRange:[r.offset,r.offset],afterSpace:e});return r.snapshot.enqueue(l),l}scanNumericLiteral(e){let r=this.validator,t,i;for(;this.index<this.length&&(t=i,i=this.codeAt(),r.isDecDigit(i)||de.CharacterCode.DOT===i||de.CharacterCode.LETTER_E===i||de.CharacterCode.LETTER_e===i||(de.CharacterCode.MINUS===i||de.CharacterCode.PLUS===i)&&(de.CharacterCode.LETTER_E===t||de.CharacterCode.LETTER_e===t));)this.index++;let s=this.content.slice(this.tokenStart,this.index),o=Number(s);return isNaN(o)?this.raise(`Invalid numeric literal: ${s}`,new Bf.Range(new ss.Position(this.line,this.tokenStart-this.offset+1),new ss.Position(this.line,this.index-this.offset+1))):this.createNumericLiteral(o,s,e)}scanPunctuator(e,r){return this.index+=e.length,this.createPunctuator(e,r)}skipWhiteSpace(){let e=this;for(;e.index<e.length;e.index++){let r=e.content[e.index];if(r===" ")e.offset-=e.tabWidth-1;else if(r!==" ")return}}scanKeyword(e,r){let t=this,i=t.validator,s=e;switch(e){case Uf.Keyword.End:{for(t.index++;i.isIdentifierPart(t.codeAt());t.index++);s=t.content.slice(t.tokenStart,t.index);break}case Uf.Keyword.Else:{let l=t.content.slice(t.tokenStart,t.index+3);l===Uf.Keyword.ElseIf&&(t.index+=3,s=l);break}}let o=new Ue.Token({type:Ue.TokenType.Keyword,value:s,line:t.line,lineStart:t.lineStart,range:[t.tokenStart,t.index],offsetRange:[t.offset,t.offset],afterSpace:r});return t.snapshot.enqueue(o),o}scanIdentifierOrKeyword(e){let r=this,t=r.validator;for(r.index++;t.isIdentifierPart(r.codeAt());r.index++);let i=r.content.slice(r.tokenStart,r.index);if(t.isKeyword(i))return r.scanKeyword(i,e);switch(i){case ko.Literal.True:case ko.Literal.False:return r.createBoolean(i,e);case ko.Literal.Null:return r.createNull(e)}return r.createIdentifier(i,e)}next(){let e=this;if(e.backlog.size)return e.backlog.dequeue();let r=e.index;e.skipWhiteSpace();let t=r<e.index,i=e.codeAt();if(e.validator.isComment(i,e.codeAt(1)))return e.tokenStart=e.index,e.scanComment(t);if(this.index>=this.length)return e.createEOF(t);if(e.tokenStart=e.index,e.validator.isEndOfLine(i)){e.validator.isWinNewline(i,e.codeAt(1))&&e.index++;let l=e.createEOL(t);return e.line++,e.offset=e.index+1,e.lineStart=++e.index,l}if(e.validator.isIdentifierStart(i))return e.scanIdentifierOrKeyword(t);let s=e.line,o=e.scan(i,t);return o||e.raise(`Invalid character ${i} (Code: ${String.fromCharCode(i)})`,new Bf.Range(new ss.Position(s,e.tokenStart-e.offset+1),new ss.Position(e.line,e.index-e.offset+1)))}recordSnapshot(){this.snapshot.clear()}recoverFromSnapshot(){this.backlog.copyInto(this.snapshot)}raise(e,r){let t=this,i=new TP.LexerException(e,r);if(t.errors.push(i),t.unsafe)return new Ue.Token({type:Ue.TokenType.Invalid,value:"",line:t.line,lineStart:t.lineStart,range:[t.tokenStart,t.index],offsetRange:[t.offset,t.offset]});throw i}};To.default=eu;eu.scanHandlers={[de.CharacterCode.QUOTE]:function(e){return this.scanStringLiteral(e)},[de.CharacterCode.DOT]:function(e){return this.validator.isDecDigit(this.codeAt(1))?this.scanNumericLiteral(e):(this.index++,this.createPunctuator(Be.Operator.Member,e))},[de.CharacterCode.EQUAL]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.Equal,e):this.scanPunctuator(Be.Operator.Assign,e)},[de.CharacterCode.ARROW_LEFT]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.LessThanOrEqual,e):this.scanPunctuator(Be.Operator.LessThan,e)},[de.CharacterCode.ARROW_RIGHT]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.GreaterThanOrEqual,e):this.scanPunctuator(Be.Operator.GreaterThan,e)},[de.CharacterCode.EXCLAMATION_MARK]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.NotEqual,e):(this.index++,null)},[de.CharacterCode.MINUS]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.SubtractShorthand,e):this.scanPunctuator(Be.Operator.Minus,e)},[de.CharacterCode.PLUS]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.AddShorthand,e):this.scanPunctuator(Be.Operator.Plus,e)},[de.CharacterCode.ASTERISK]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.MultiplyShorthand,e):this.scanPunctuator(Be.Operator.Asterik,e)},[de.CharacterCode.SLASH]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.DivideShorthand,e):this.scanPunctuator(Be.Operator.Slash,e)},[de.CharacterCode.COLON]:function(e){return this.index++,this.createSlice(e)},[de.CharacterCode.CARET]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.PowerShorthand,e):this.scanPunctuator(Be.Operator.Power,e)},[de.CharacterCode.PERCENT]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.ModuloShorthand,e):this.scanPunctuator(Be.Operator.Modulo,e)},[de.CharacterCode.SEMICOLON]:function(e){return this.index++,this.createEOL(e)},[de.CharacterCode.COMMA]:Ir,[de.CharacterCode.CURLY_BRACKET_LEFT]:Ir,[de.CharacterCode.CURLY_BRACKET_RIGHT]:Ir,[de.CharacterCode.SQUARE_BRACKETS_LEFT]:Ir,[de.CharacterCode.SQUARE_BRACKETS_RIGHT]:Ir,[de.CharacterCode.PARENTHESIS_LEFT]:Ir,[de.CharacterCode.PARENTHESIS_RIGHT]:Ir,[de.CharacterCode.AT_SIGN]:Ir}});var Ke=S(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.ASTComment=Xt.ASTBaseBlockWithScope=Xt.ASTBaseBlock=Xt.ASTBase=Xt.ASTType=void 0;var uT;(function(n){n.BreakStatement="BreakStatement",n.ContinueStatement="ContinueStatement",n.ReturnStatement="ReturnStatement",n.IfShortcutStatement="IfShortcutStatement",n.IfShortcutClause="IfShortcutClause",n.ElseifShortcutClause="ElseifShortcutClause",n.ElseShortcutClause="ElseShortcutClause",n.IfStatement="IfStatement",n.IfClause="IfClause",n.ElseifClause="ElseifClause",n.ElseClause="ElseClause",n.WhileStatement="WhileStatement",n.AssignmentStatement="AssignmentStatement",n.CallStatement="CallStatement",n.FunctionDeclaration="FunctionDeclaration",n.ForGenericStatement="ForGenericStatement",n.Chunk="Chunk",n.Identifier="Identifier",n.StringLiteral="StringLiteral",n.NumericLiteral="NumericLiteral",n.BooleanLiteral="BooleanLiteral",n.NilLiteral="NilLiteral",n.Unknown="Unknown",n.MemberExpression="MemberExpression",n.CallExpression="CallExpression",n.Comment="Comment",n.NegationExpression="NegationExpression",n.BinaryNegatedExpression="BinaryNegatedExpression",n.UnaryExpression="UnaryExpression",n.MapKeyString="MapKeyString",n.MapValue="MapValue",n.MapConstructorExpression="MapConstructorExpression",n.MapCallExpression="MapCallExpression",n.ListValue="ListValue",n.ListConstructorExpression="ListConstructorExpression",n.EmptyExpression="EmptyExpression",n.IndexExpression="IndexExpression",n.BinaryExpression="BinaryExpression",n.LogicalExpression="LogicalExpression",n.IsaExpression="IsaExpression",n.SliceExpression="SliceExpression",n.ImportCodeExpression="ImportCodeExpression",n.InvalidCodeExpression="InvalidCodeExpression",n.ParenthesisExpression="ParenthesisExpression",n.ComparisonGroupExpression="ComparisonGroupExpression"})(uT=Xt.ASTType||(Xt.ASTType={}));var So=class n{constructor(e,r){this.type=e,this.start=r.start,this.end=r.end,this.range=r.range,this.scope=r.scope||null}toString(){return`${this.type}[${this.start}-${this.end}][]`}clone(){return new n(this.type,{start:this.start,end:this.end,range:this.range,scope:this.scope})}};Xt.ASTBase=So;var tu=class n extends So{constructor(e,r){super(e,r),this.body=r.body||[]}toString(){let e=this.body.map(r=>`${r}`).join(`
35
+ `&&i++}t&&r.length>0&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),t=0,i=r.length;if(i===0)return an.create(0,e);for(;t<i;){let o=Math.floor((t+i)/2);r[o]>e?i=o:t=o+1}let s=t-1;return an.create(s,e-r[s])}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let t=r[e.line],i=e.line+1<r.length?r[e.line+1]:this._content.length;return Math.max(Math.min(t+e.character,i),t)}get lineCount(){return this.getLineOffsets().length}};(function(n){let e=Object.prototype.toString;function r(h){return typeof h!="undefined"}n.defined=r;function t(h){return typeof h=="undefined"}n.undefined=t;function i(h){return h===!0||h===!1}n.boolean=i;function s(h){return e.call(h)==="[object String]"}n.string=s;function o(h){return e.call(h)==="[object Number]"}n.number=o;function l(h,g,f){return e.call(h)==="[object Number]"&&g<=h&&h<=f}n.numberRange=l;function u(h){return e.call(h)==="[object Number]"&&-2147483648<=h&&h<=2147483647}n.integer=u;function a(h){return e.call(h)==="[object Number]"&&0<=h&&h<=2147483647}n.uinteger=a;function c(h){return e.call(h)==="[object Function]"}n.func=c;function p(h){return h!==null&&typeof h=="object"}n.objectLiteral=p;function d(h,g){return Array.isArray(h)&&h.every(g)}n.typedArray=d})(D||(D={}))});var $e=S(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.ProtocolNotificationType=Ut.ProtocolNotificationType0=Ut.ProtocolRequestType=Ut.ProtocolRequestType0=Ut.RegistrationType=Ut.MessageDirection=void 0;var qi=zr(),Zv;(function(n){n.clientToServer="clientToServer",n.serverToClient="serverToClient",n.both="both"})(Zv||(Ut.MessageDirection=Zv={}));var jh=class{constructor(e){this.method=e}};Ut.RegistrationType=jh;var Lh=class extends qi.RequestType0{constructor(e){super(e)}};Ut.ProtocolRequestType0=Lh;var Mh=class extends qi.RequestType{constructor(e){super(e,qi.ParameterStructures.byName)}};Ut.ProtocolRequestType=Mh;var qh=class extends qi.NotificationType0{constructor(e){super(e)}};Ut.ProtocolNotificationType0=qh;var Fh=class extends qi.NotificationType{constructor(e){super(e,qi.ParameterStructures.byName)}};Ut.ProtocolNotificationType=Fh});var Xa=S(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.objectLiteral=ot.typedArray=ot.stringArray=ot.array=ot.func=ot.error=ot.number=ot.string=ot.boolean=void 0;function OE(n){return n===!0||n===!1}ot.boolean=OE;function Xv(n){return typeof n=="string"||n instanceof String}ot.string=Xv;function AE(n){return typeof n=="number"||n instanceof Number}ot.number=AE;function DE(n){return n instanceof Error}ot.error=DE;function jE(n){return typeof n=="function"}ot.func=jE;function e_(n){return Array.isArray(n)}ot.array=e_;function LE(n){return e_(n)&&n.every(e=>Xv(e))}ot.stringArray=LE;function ME(n,e){return Array.isArray(n)&&n.every(e)}ot.typedArray=ME;function qE(n){return n!==null&&typeof n=="object"}ot.objectLiteral=qE});var r_=S(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.ImplementationRequest=void 0;var t_=$e(),n_;(function(n){n.method="textDocument/implementation",n.messageDirection=t_.MessageDirection.clientToServer,n.type=new t_.ProtocolRequestType(n.method)})(n_||(el.ImplementationRequest=n_={}))});var o_=S(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.TypeDefinitionRequest=void 0;var i_=$e(),s_;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=i_.MessageDirection.clientToServer,n.type=new i_.ProtocolRequestType(n.method)})(s_||(tl.TypeDefinitionRequest=s_={}))});var u_=S(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.DidChangeWorkspaceFoldersNotification=Fi.WorkspaceFoldersRequest=void 0;var nl=$e(),a_;(function(n){n.method="workspace/workspaceFolders",n.messageDirection=nl.MessageDirection.serverToClient,n.type=new nl.ProtocolRequestType0(n.method)})(a_||(Fi.WorkspaceFoldersRequest=a_={}));var l_;(function(n){n.method="workspace/didChangeWorkspaceFolders",n.messageDirection=nl.MessageDirection.clientToServer,n.type=new nl.ProtocolNotificationType(n.method)})(l_||(Fi.DidChangeWorkspaceFoldersNotification=l_={}))});var d_=S(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.ConfigurationRequest=void 0;var c_=$e(),p_;(function(n){n.method="workspace/configuration",n.messageDirection=c_.MessageDirection.serverToClient,n.type=new c_.ProtocolRequestType(n.method)})(p_||(rl.ConfigurationRequest=p_={}))});var m_=S(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.ColorPresentationRequest=Ni.DocumentColorRequest=void 0;var il=$e(),h_;(function(n){n.method="textDocument/documentColor",n.messageDirection=il.MessageDirection.clientToServer,n.type=new il.ProtocolRequestType(n.method)})(h_||(Ni.DocumentColorRequest=h_={}));var f_;(function(n){n.method="textDocument/colorPresentation",n.messageDirection=il.MessageDirection.clientToServer,n.type=new il.ProtocolRequestType(n.method)})(f_||(Ni.ColorPresentationRequest=f_={}))});var b_=S($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.FoldingRangeRefreshRequest=$i.FoldingRangeRequest=void 0;var sl=$e(),g_;(function(n){n.method="textDocument/foldingRange",n.messageDirection=sl.MessageDirection.clientToServer,n.type=new sl.ProtocolRequestType(n.method)})(g_||($i.FoldingRangeRequest=g_={}));var y_;(function(n){n.method="workspace/foldingRange/refresh",n.messageDirection=sl.MessageDirection.serverToClient,n.type=new sl.ProtocolRequestType0(n.method)})(y_||($i.FoldingRangeRefreshRequest=y_={}))});var w_=S(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});ol.DeclarationRequest=void 0;var v_=$e(),__;(function(n){n.method="textDocument/declaration",n.messageDirection=v_.MessageDirection.clientToServer,n.type=new v_.ProtocolRequestType(n.method)})(__||(ol.DeclarationRequest=__={}))});var T_=S(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.SelectionRangeRequest=void 0;var x_=$e(),k_;(function(n){n.method="textDocument/selectionRange",n.messageDirection=x_.MessageDirection.clientToServer,n.type=new x_.ProtocolRequestType(n.method)})(k_||(al.SelectionRangeRequest=k_={}))});var R_=S(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.WorkDoneProgressCancelNotification=gr.WorkDoneProgressCreateRequest=gr.WorkDoneProgress=void 0;var FE=zr(),ll=$e(),S_;(function(n){n.type=new FE.ProgressType;function e(r){return r===n.type}n.is=e})(S_||(gr.WorkDoneProgress=S_={}));var I_;(function(n){n.method="window/workDoneProgress/create",n.messageDirection=ll.MessageDirection.serverToClient,n.type=new ll.ProtocolRequestType(n.method)})(I_||(gr.WorkDoneProgressCreateRequest=I_={}));var E_;(function(n){n.method="window/workDoneProgress/cancel",n.messageDirection=ll.MessageDirection.clientToServer,n.type=new ll.ProtocolNotificationType(n.method)})(E_||(gr.WorkDoneProgressCancelNotification=E_={}))});var A_=S(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.CallHierarchyOutgoingCallsRequest=yr.CallHierarchyIncomingCallsRequest=yr.CallHierarchyPrepareRequest=void 0;var Ui=$e(),P_;(function(n){n.method="textDocument/prepareCallHierarchy",n.messageDirection=Ui.MessageDirection.clientToServer,n.type=new Ui.ProtocolRequestType(n.method)})(P_||(yr.CallHierarchyPrepareRequest=P_={}));var C_;(function(n){n.method="callHierarchy/incomingCalls",n.messageDirection=Ui.MessageDirection.clientToServer,n.type=new Ui.ProtocolRequestType(n.method)})(C_||(yr.CallHierarchyIncomingCallsRequest=C_={}));var O_;(function(n){n.method="callHierarchy/outgoingCalls",n.messageDirection=Ui.MessageDirection.clientToServer,n.type=new Ui.ProtocolRequestType(n.method)})(O_||(yr.CallHierarchyOutgoingCallsRequest=O_={}))});var F_=S(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.SemanticTokensRefreshRequest=Bt.SemanticTokensRangeRequest=Bt.SemanticTokensDeltaRequest=Bt.SemanticTokensRequest=Bt.SemanticTokensRegistrationType=Bt.TokenFormat=void 0;var Jn=$e(),D_;(function(n){n.Relative="relative"})(D_||(Bt.TokenFormat=D_={}));var ao;(function(n){n.method="textDocument/semanticTokens",n.type=new Jn.RegistrationType(n.method)})(ao||(Bt.SemanticTokensRegistrationType=ao={}));var j_;(function(n){n.method="textDocument/semanticTokens/full",n.messageDirection=Jn.MessageDirection.clientToServer,n.type=new Jn.ProtocolRequestType(n.method),n.registrationMethod=ao.method})(j_||(Bt.SemanticTokensRequest=j_={}));var L_;(function(n){n.method="textDocument/semanticTokens/full/delta",n.messageDirection=Jn.MessageDirection.clientToServer,n.type=new Jn.ProtocolRequestType(n.method),n.registrationMethod=ao.method})(L_||(Bt.SemanticTokensDeltaRequest=L_={}));var M_;(function(n){n.method="textDocument/semanticTokens/range",n.messageDirection=Jn.MessageDirection.clientToServer,n.type=new Jn.ProtocolRequestType(n.method),n.registrationMethod=ao.method})(M_||(Bt.SemanticTokensRangeRequest=M_={}));var q_;(function(n){n.method="workspace/semanticTokens/refresh",n.messageDirection=Jn.MessageDirection.serverToClient,n.type=new Jn.ProtocolRequestType0(n.method)})(q_||(Bt.SemanticTokensRefreshRequest=q_={}))});var U_=S(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.ShowDocumentRequest=void 0;var N_=$e(),$_;(function(n){n.method="window/showDocument",n.messageDirection=N_.MessageDirection.serverToClient,n.type=new N_.ProtocolRequestType(n.method)})($_||(ul.ShowDocumentRequest=$_={}))});var V_=S(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.LinkedEditingRangeRequest=void 0;var B_=$e(),W_;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=B_.MessageDirection.clientToServer,n.type=new B_.ProtocolRequestType(n.method)})(W_||(cl.LinkedEditingRangeRequest=W_={}))});var Z_=S(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.WillDeleteFilesRequest=Pt.DidDeleteFilesNotification=Pt.DidRenameFilesNotification=Pt.WillRenameFilesRequest=Pt.DidCreateFilesNotification=Pt.WillCreateFilesRequest=Pt.FileOperationPatternKind=void 0;var ln=$e(),H_;(function(n){n.file="file",n.folder="folder"})(H_||(Pt.FileOperationPatternKind=H_={}));var z_;(function(n){n.method="workspace/willCreateFiles",n.messageDirection=ln.MessageDirection.clientToServer,n.type=new ln.ProtocolRequestType(n.method)})(z_||(Pt.WillCreateFilesRequest=z_={}));var G_;(function(n){n.method="workspace/didCreateFiles",n.messageDirection=ln.MessageDirection.clientToServer,n.type=new ln.ProtocolNotificationType(n.method)})(G_||(Pt.DidCreateFilesNotification=G_={}));var K_;(function(n){n.method="workspace/willRenameFiles",n.messageDirection=ln.MessageDirection.clientToServer,n.type=new ln.ProtocolRequestType(n.method)})(K_||(Pt.WillRenameFilesRequest=K_={}));var Y_;(function(n){n.method="workspace/didRenameFiles",n.messageDirection=ln.MessageDirection.clientToServer,n.type=new ln.ProtocolNotificationType(n.method)})(Y_||(Pt.DidRenameFilesNotification=Y_={}));var Q_;(function(n){n.method="workspace/didDeleteFiles",n.messageDirection=ln.MessageDirection.clientToServer,n.type=new ln.ProtocolNotificationType(n.method)})(Q_||(Pt.DidDeleteFilesNotification=Q_={}));var J_;(function(n){n.method="workspace/willDeleteFiles",n.messageDirection=ln.MessageDirection.clientToServer,n.type=new ln.ProtocolRequestType(n.method)})(J_||(Pt.WillDeleteFilesRequest=J_={}))});var rw=S(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.MonikerRequest=br.MonikerKind=br.UniquenessLevel=void 0;var X_=$e(),ew;(function(n){n.document="document",n.project="project",n.group="group",n.scheme="scheme",n.global="global"})(ew||(br.UniquenessLevel=ew={}));var tw;(function(n){n.$import="import",n.$export="export",n.local="local"})(tw||(br.MonikerKind=tw={}));var nw;(function(n){n.method="textDocument/moniker",n.messageDirection=X_.MessageDirection.clientToServer,n.type=new X_.ProtocolRequestType(n.method)})(nw||(br.MonikerRequest=nw={}))});var aw=S(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.TypeHierarchySubtypesRequest=vr.TypeHierarchySupertypesRequest=vr.TypeHierarchyPrepareRequest=void 0;var Bi=$e(),iw;(function(n){n.method="textDocument/prepareTypeHierarchy",n.messageDirection=Bi.MessageDirection.clientToServer,n.type=new Bi.ProtocolRequestType(n.method)})(iw||(vr.TypeHierarchyPrepareRequest=iw={}));var sw;(function(n){n.method="typeHierarchy/supertypes",n.messageDirection=Bi.MessageDirection.clientToServer,n.type=new Bi.ProtocolRequestType(n.method)})(sw||(vr.TypeHierarchySupertypesRequest=sw={}));var ow;(function(n){n.method="typeHierarchy/subtypes",n.messageDirection=Bi.MessageDirection.clientToServer,n.type=new Bi.ProtocolRequestType(n.method)})(ow||(vr.TypeHierarchySubtypesRequest=ow={}))});var cw=S(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.InlineValueRefreshRequest=Wi.InlineValueRequest=void 0;var pl=$e(),lw;(function(n){n.method="textDocument/inlineValue",n.messageDirection=pl.MessageDirection.clientToServer,n.type=new pl.ProtocolRequestType(n.method)})(lw||(Wi.InlineValueRequest=lw={}));var uw;(function(n){n.method="workspace/inlineValue/refresh",n.messageDirection=pl.MessageDirection.serverToClient,n.type=new pl.ProtocolRequestType0(n.method)})(uw||(Wi.InlineValueRefreshRequest=uw={}))});var fw=S(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.InlayHintRefreshRequest=_r.InlayHintResolveRequest=_r.InlayHintRequest=void 0;var Vi=$e(),pw;(function(n){n.method="textDocument/inlayHint",n.messageDirection=Vi.MessageDirection.clientToServer,n.type=new Vi.ProtocolRequestType(n.method)})(pw||(_r.InlayHintRequest=pw={}));var dw;(function(n){n.method="inlayHint/resolve",n.messageDirection=Vi.MessageDirection.clientToServer,n.type=new Vi.ProtocolRequestType(n.method)})(dw||(_r.InlayHintResolveRequest=dw={}));var hw;(function(n){n.method="workspace/inlayHint/refresh",n.messageDirection=Vi.MessageDirection.serverToClient,n.type=new Vi.ProtocolRequestType0(n.method)})(hw||(_r.InlayHintRefreshRequest=hw={}))});var ww=S(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.DiagnosticRefreshRequest=un.WorkspaceDiagnosticRequest=un.DocumentDiagnosticRequest=un.DocumentDiagnosticReportKind=un.DiagnosticServerCancellationData=void 0;var _w=zr(),NE=Xa(),Hi=$e(),mw;(function(n){function e(r){let t=r;return t&&NE.boolean(t.retriggerRequest)}n.is=e})(mw||(un.DiagnosticServerCancellationData=mw={}));var gw;(function(n){n.Full="full",n.Unchanged="unchanged"})(gw||(un.DocumentDiagnosticReportKind=gw={}));var yw;(function(n){n.method="textDocument/diagnostic",n.messageDirection=Hi.MessageDirection.clientToServer,n.type=new Hi.ProtocolRequestType(n.method),n.partialResult=new _w.ProgressType})(yw||(un.DocumentDiagnosticRequest=yw={}));var bw;(function(n){n.method="workspace/diagnostic",n.messageDirection=Hi.MessageDirection.clientToServer,n.type=new Hi.ProtocolRequestType(n.method),n.partialResult=new _w.ProgressType})(bw||(un.WorkspaceDiagnosticRequest=bw={}));var vw;(function(n){n.method="workspace/diagnostic/refresh",n.messageDirection=Hi.MessageDirection.serverToClient,n.type=new Hi.ProtocolRequestType0(n.method)})(vw||(un.DiagnosticRefreshRequest=vw={}))});var Rw=S(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.DidCloseNotebookDocumentNotification=Ge.DidSaveNotebookDocumentNotification=Ge.DidChangeNotebookDocumentNotification=Ge.NotebookCellArrayChange=Ge.DidOpenNotebookDocumentNotification=Ge.NotebookDocumentSyncRegistrationType=Ge.NotebookDocument=Ge.NotebookCell=Ge.ExecutionSummary=Ge.NotebookCellKind=void 0;var lo=(Za(),mt(Ja)),vn=Xa(),On=$e(),Nh;(function(n){n.Markup=1,n.Code=2;function e(r){return r===1||r===2}n.is=e})(Nh||(Ge.NotebookCellKind=Nh={}));var $h;(function(n){function e(i,s){let o={executionOrder:i};return(s===!0||s===!1)&&(o.success=s),o}n.create=e;function r(i){let s=i;return vn.objectLiteral(s)&&lo.uinteger.is(s.executionOrder)&&(s.success===void 0||vn.boolean(s.success))}n.is=r;function t(i,s){return i===s?!0:i==null||s===null||s===void 0?!1:i.executionOrder===s.executionOrder&&i.success===s.success}n.equals=t})($h||(Ge.ExecutionSummary=$h={}));var dl;(function(n){function e(s,o){return{kind:s,document:o}}n.create=e;function r(s){let o=s;return vn.objectLiteral(o)&&Nh.is(o.kind)&&lo.DocumentUri.is(o.document)&&(o.metadata===void 0||vn.objectLiteral(o.metadata))}n.is=r;function t(s,o){let l=new Set;return s.document!==o.document&&l.add("document"),s.kind!==o.kind&&l.add("kind"),s.executionSummary!==o.executionSummary&&l.add("executionSummary"),(s.metadata!==void 0||o.metadata!==void 0)&&!i(s.metadata,o.metadata)&&l.add("metadata"),(s.executionSummary!==void 0||o.executionSummary!==void 0)&&!$h.equals(s.executionSummary,o.executionSummary)&&l.add("executionSummary"),l}n.diff=t;function i(s,o){if(s===o)return!0;if(s==null||o===null||o===void 0||typeof s!=typeof o||typeof s!="object")return!1;let l=Array.isArray(s),u=Array.isArray(o);if(l!==u)return!1;if(l&&u){if(s.length!==o.length)return!1;for(let a=0;a<s.length;a++)if(!i(s[a],o[a]))return!1}if(vn.objectLiteral(s)&&vn.objectLiteral(o)){let a=Object.keys(s),c=Object.keys(o);if(a.length!==c.length||(a.sort(),c.sort(),!i(a,c)))return!1;for(let p=0;p<a.length;p++){let d=a[p];if(!i(s[d],o[d]))return!1}}return!0}})(dl||(Ge.NotebookCell=dl={}));var xw;(function(n){function e(t,i,s,o){return{uri:t,notebookType:i,version:s,cells:o}}n.create=e;function r(t){let i=t;return vn.objectLiteral(i)&&vn.string(i.uri)&&lo.integer.is(i.version)&&vn.typedArray(i.cells,dl.is)}n.is=r})(xw||(Ge.NotebookDocument=xw={}));var zi;(function(n){n.method="notebookDocument/sync",n.messageDirection=On.MessageDirection.clientToServer,n.type=new On.RegistrationType(n.method)})(zi||(Ge.NotebookDocumentSyncRegistrationType=zi={}));var kw;(function(n){n.method="notebookDocument/didOpen",n.messageDirection=On.MessageDirection.clientToServer,n.type=new On.ProtocolNotificationType(n.method),n.registrationMethod=zi.method})(kw||(Ge.DidOpenNotebookDocumentNotification=kw={}));var Tw;(function(n){function e(t){let i=t;return vn.objectLiteral(i)&&lo.uinteger.is(i.start)&&lo.uinteger.is(i.deleteCount)&&(i.cells===void 0||vn.typedArray(i.cells,dl.is))}n.is=e;function r(t,i,s){let o={start:t,deleteCount:i};return s!==void 0&&(o.cells=s),o}n.create=r})(Tw||(Ge.NotebookCellArrayChange=Tw={}));var Sw;(function(n){n.method="notebookDocument/didChange",n.messageDirection=On.MessageDirection.clientToServer,n.type=new On.ProtocolNotificationType(n.method),n.registrationMethod=zi.method})(Sw||(Ge.DidChangeNotebookDocumentNotification=Sw={}));var Iw;(function(n){n.method="notebookDocument/didSave",n.messageDirection=On.MessageDirection.clientToServer,n.type=new On.ProtocolNotificationType(n.method),n.registrationMethod=zi.method})(Iw||(Ge.DidSaveNotebookDocumentNotification=Iw={}));var Ew;(function(n){n.method="notebookDocument/didClose",n.messageDirection=On.MessageDirection.clientToServer,n.type=new On.ProtocolNotificationType(n.method),n.registrationMethod=zi.method})(Ew||(Ge.DidCloseNotebookDocumentNotification=Ew={}))});var Ow=S(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.InlineCompletionRequest=void 0;var Pw=$e(),Cw;(function(n){n.method="textDocument/inlineCompletion",n.messageDirection=Pw.MessageDirection.clientToServer,n.type=new Pw.ProtocolRequestType(n.method)})(Cw||(hl.InlineCompletionRequest=Cw={}))});var Vx=S(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});E.WorkspaceSymbolRequest=E.CodeActionResolveRequest=E.CodeActionRequest=E.DocumentSymbolRequest=E.DocumentHighlightRequest=E.ReferencesRequest=E.DefinitionRequest=E.SignatureHelpRequest=E.SignatureHelpTriggerKind=E.HoverRequest=E.CompletionResolveRequest=E.CompletionRequest=E.CompletionTriggerKind=E.PublishDiagnosticsNotification=E.WatchKind=E.RelativePattern=E.FileChangeType=E.DidChangeWatchedFilesNotification=E.WillSaveTextDocumentWaitUntilRequest=E.WillSaveTextDocumentNotification=E.TextDocumentSaveReason=E.DidSaveTextDocumentNotification=E.DidCloseTextDocumentNotification=E.DidChangeTextDocumentNotification=E.TextDocumentContentChangeEvent=E.DidOpenTextDocumentNotification=E.TextDocumentSyncKind=E.TelemetryEventNotification=E.LogMessageNotification=E.ShowMessageRequest=E.ShowMessageNotification=E.MessageType=E.DidChangeConfigurationNotification=E.ExitNotification=E.ShutdownRequest=E.InitializedNotification=E.InitializeErrorCodes=E.InitializeRequest=E.WorkDoneProgressOptions=E.TextDocumentRegistrationOptions=E.StaticRegistrationOptions=E.PositionEncodingKind=E.FailureHandlingKind=E.ResourceOperationKind=E.UnregistrationRequest=E.RegistrationRequest=E.DocumentSelector=E.NotebookCellTextDocumentFilter=E.NotebookDocumentFilter=E.TextDocumentFilter=void 0;E.MonikerRequest=E.MonikerKind=E.UniquenessLevel=E.WillDeleteFilesRequest=E.DidDeleteFilesNotification=E.WillRenameFilesRequest=E.DidRenameFilesNotification=E.WillCreateFilesRequest=E.DidCreateFilesNotification=E.FileOperationPatternKind=E.LinkedEditingRangeRequest=E.ShowDocumentRequest=E.SemanticTokensRegistrationType=E.SemanticTokensRefreshRequest=E.SemanticTokensRangeRequest=E.SemanticTokensDeltaRequest=E.SemanticTokensRequest=E.TokenFormat=E.CallHierarchyPrepareRequest=E.CallHierarchyOutgoingCallsRequest=E.CallHierarchyIncomingCallsRequest=E.WorkDoneProgressCancelNotification=E.WorkDoneProgressCreateRequest=E.WorkDoneProgress=E.SelectionRangeRequest=E.DeclarationRequest=E.FoldingRangeRefreshRequest=E.FoldingRangeRequest=E.ColorPresentationRequest=E.DocumentColorRequest=E.ConfigurationRequest=E.DidChangeWorkspaceFoldersNotification=E.WorkspaceFoldersRequest=E.TypeDefinitionRequest=E.ImplementationRequest=E.ApplyWorkspaceEditRequest=E.ExecuteCommandRequest=E.PrepareRenameRequest=E.RenameRequest=E.PrepareSupportDefaultBehavior=E.DocumentOnTypeFormattingRequest=E.DocumentRangesFormattingRequest=E.DocumentRangeFormattingRequest=E.DocumentFormattingRequest=E.DocumentLinkResolveRequest=E.DocumentLinkRequest=E.CodeLensRefreshRequest=E.CodeLensResolveRequest=E.CodeLensRequest=E.WorkspaceSymbolResolveRequest=void 0;E.InlineCompletionRequest=E.DidCloseNotebookDocumentNotification=E.DidSaveNotebookDocumentNotification=E.DidChangeNotebookDocumentNotification=E.NotebookCellArrayChange=E.DidOpenNotebookDocumentNotification=E.NotebookDocumentSyncRegistrationType=E.NotebookDocument=E.NotebookCell=E.ExecutionSummary=E.NotebookCellKind=E.DiagnosticRefreshRequest=E.WorkspaceDiagnosticRequest=E.DocumentDiagnosticRequest=E.DocumentDiagnosticReportKind=E.DiagnosticServerCancellationData=E.InlayHintRefreshRequest=E.InlayHintResolveRequest=E.InlayHintRequest=E.InlineValueRefreshRequest=E.InlineValueRequest=E.TypeHierarchySupertypesRequest=E.TypeHierarchySubtypesRequest=E.TypeHierarchyPrepareRequest=void 0;var U=$e(),Aw=(Za(),mt(Ja)),gt=Xa(),$E=r_();Object.defineProperty(E,"ImplementationRequest",{enumerable:!0,get:function(){return $E.ImplementationRequest}});var UE=o_();Object.defineProperty(E,"TypeDefinitionRequest",{enumerable:!0,get:function(){return UE.TypeDefinitionRequest}});var $x=u_();Object.defineProperty(E,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return $x.WorkspaceFoldersRequest}});Object.defineProperty(E,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return $x.DidChangeWorkspaceFoldersNotification}});var BE=d_();Object.defineProperty(E,"ConfigurationRequest",{enumerable:!0,get:function(){return BE.ConfigurationRequest}});var Ux=m_();Object.defineProperty(E,"DocumentColorRequest",{enumerable:!0,get:function(){return Ux.DocumentColorRequest}});Object.defineProperty(E,"ColorPresentationRequest",{enumerable:!0,get:function(){return Ux.ColorPresentationRequest}});var Bx=b_();Object.defineProperty(E,"FoldingRangeRequest",{enumerable:!0,get:function(){return Bx.FoldingRangeRequest}});Object.defineProperty(E,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return Bx.FoldingRangeRefreshRequest}});var WE=w_();Object.defineProperty(E,"DeclarationRequest",{enumerable:!0,get:function(){return WE.DeclarationRequest}});var VE=T_();Object.defineProperty(E,"SelectionRangeRequest",{enumerable:!0,get:function(){return VE.SelectionRangeRequest}});var Hh=R_();Object.defineProperty(E,"WorkDoneProgress",{enumerable:!0,get:function(){return Hh.WorkDoneProgress}});Object.defineProperty(E,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return Hh.WorkDoneProgressCreateRequest}});Object.defineProperty(E,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return Hh.WorkDoneProgressCancelNotification}});var zh=A_();Object.defineProperty(E,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return zh.CallHierarchyIncomingCallsRequest}});Object.defineProperty(E,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return zh.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(E,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return zh.CallHierarchyPrepareRequest}});var Gi=F_();Object.defineProperty(E,"TokenFormat",{enumerable:!0,get:function(){return Gi.TokenFormat}});Object.defineProperty(E,"SemanticTokensRequest",{enumerable:!0,get:function(){return Gi.SemanticTokensRequest}});Object.defineProperty(E,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return Gi.SemanticTokensDeltaRequest}});Object.defineProperty(E,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return Gi.SemanticTokensRangeRequest}});Object.defineProperty(E,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return Gi.SemanticTokensRefreshRequest}});Object.defineProperty(E,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return Gi.SemanticTokensRegistrationType}});var HE=U_();Object.defineProperty(E,"ShowDocumentRequest",{enumerable:!0,get:function(){return HE.ShowDocumentRequest}});var zE=V_();Object.defineProperty(E,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return zE.LinkedEditingRangeRequest}});var Yr=Z_();Object.defineProperty(E,"FileOperationPatternKind",{enumerable:!0,get:function(){return Yr.FileOperationPatternKind}});Object.defineProperty(E,"DidCreateFilesNotification",{enumerable:!0,get:function(){return Yr.DidCreateFilesNotification}});Object.defineProperty(E,"WillCreateFilesRequest",{enumerable:!0,get:function(){return Yr.WillCreateFilesRequest}});Object.defineProperty(E,"DidRenameFilesNotification",{enumerable:!0,get:function(){return Yr.DidRenameFilesNotification}});Object.defineProperty(E,"WillRenameFilesRequest",{enumerable:!0,get:function(){return Yr.WillRenameFilesRequest}});Object.defineProperty(E,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return Yr.DidDeleteFilesNotification}});Object.defineProperty(E,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return Yr.WillDeleteFilesRequest}});var Gh=rw();Object.defineProperty(E,"UniquenessLevel",{enumerable:!0,get:function(){return Gh.UniquenessLevel}});Object.defineProperty(E,"MonikerKind",{enumerable:!0,get:function(){return Gh.MonikerKind}});Object.defineProperty(E,"MonikerRequest",{enumerable:!0,get:function(){return Gh.MonikerRequest}});var Kh=aw();Object.defineProperty(E,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return Kh.TypeHierarchyPrepareRequest}});Object.defineProperty(E,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return Kh.TypeHierarchySubtypesRequest}});Object.defineProperty(E,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return Kh.TypeHierarchySupertypesRequest}});var Wx=cw();Object.defineProperty(E,"InlineValueRequest",{enumerable:!0,get:function(){return Wx.InlineValueRequest}});Object.defineProperty(E,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return Wx.InlineValueRefreshRequest}});var Yh=fw();Object.defineProperty(E,"InlayHintRequest",{enumerable:!0,get:function(){return Yh.InlayHintRequest}});Object.defineProperty(E,"InlayHintResolveRequest",{enumerable:!0,get:function(){return Yh.InlayHintResolveRequest}});Object.defineProperty(E,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return Yh.InlayHintRefreshRequest}});var uo=ww();Object.defineProperty(E,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return uo.DiagnosticServerCancellationData}});Object.defineProperty(E,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return uo.DocumentDiagnosticReportKind}});Object.defineProperty(E,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return uo.DocumentDiagnosticRequest}});Object.defineProperty(E,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return uo.WorkspaceDiagnosticRequest}});Object.defineProperty(E,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return uo.DiagnosticRefreshRequest}});var An=Rw();Object.defineProperty(E,"NotebookCellKind",{enumerable:!0,get:function(){return An.NotebookCellKind}});Object.defineProperty(E,"ExecutionSummary",{enumerable:!0,get:function(){return An.ExecutionSummary}});Object.defineProperty(E,"NotebookCell",{enumerable:!0,get:function(){return An.NotebookCell}});Object.defineProperty(E,"NotebookDocument",{enumerable:!0,get:function(){return An.NotebookDocument}});Object.defineProperty(E,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return An.NotebookDocumentSyncRegistrationType}});Object.defineProperty(E,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return An.DidOpenNotebookDocumentNotification}});Object.defineProperty(E,"NotebookCellArrayChange",{enumerable:!0,get:function(){return An.NotebookCellArrayChange}});Object.defineProperty(E,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return An.DidChangeNotebookDocumentNotification}});Object.defineProperty(E,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return An.DidSaveNotebookDocumentNotification}});Object.defineProperty(E,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return An.DidCloseNotebookDocumentNotification}});var GE=Ow();Object.defineProperty(E,"InlineCompletionRequest",{enumerable:!0,get:function(){return GE.InlineCompletionRequest}});var Uh;(function(n){function e(r){let t=r;return gt.string(t)||gt.string(t.language)||gt.string(t.scheme)||gt.string(t.pattern)}n.is=e})(Uh||(E.TextDocumentFilter=Uh={}));var Bh;(function(n){function e(r){let t=r;return gt.objectLiteral(t)&&(gt.string(t.notebookType)||gt.string(t.scheme)||gt.string(t.pattern))}n.is=e})(Bh||(E.NotebookDocumentFilter=Bh={}));var Wh;(function(n){function e(r){let t=r;return gt.objectLiteral(t)&&(gt.string(t.notebook)||Bh.is(t.notebook))&&(t.language===void 0||gt.string(t.language))}n.is=e})(Wh||(E.NotebookCellTextDocumentFilter=Wh={}));var Vh;(function(n){function e(r){if(!Array.isArray(r))return!1;for(let t of r)if(!gt.string(t)&&!Uh.is(t)&&!Wh.is(t))return!1;return!0}n.is=e})(Vh||(E.DocumentSelector=Vh={}));var Dw;(function(n){n.method="client/registerCapability",n.messageDirection=U.MessageDirection.serverToClient,n.type=new U.ProtocolRequestType(n.method)})(Dw||(E.RegistrationRequest=Dw={}));var jw;(function(n){n.method="client/unregisterCapability",n.messageDirection=U.MessageDirection.serverToClient,n.type=new U.ProtocolRequestType(n.method)})(jw||(E.UnregistrationRequest=jw={}));var Lw;(function(n){n.Create="create",n.Rename="rename",n.Delete="delete"})(Lw||(E.ResourceOperationKind=Lw={}));var Mw;(function(n){n.Abort="abort",n.Transactional="transactional",n.TextOnlyTransactional="textOnlyTransactional",n.Undo="undo"})(Mw||(E.FailureHandlingKind=Mw={}));var qw;(function(n){n.UTF8="utf-8",n.UTF16="utf-16",n.UTF32="utf-32"})(qw||(E.PositionEncodingKind=qw={}));var Fw;(function(n){function e(r){let t=r;return t&&gt.string(t.id)&&t.id.length>0}n.hasId=e})(Fw||(E.StaticRegistrationOptions=Fw={}));var Nw;(function(n){function e(r){let t=r;return t&&(t.documentSelector===null||Vh.is(t.documentSelector))}n.is=e})(Nw||(E.TextDocumentRegistrationOptions=Nw={}));var $w;(function(n){function e(t){let i=t;return gt.objectLiteral(i)&&(i.workDoneProgress===void 0||gt.boolean(i.workDoneProgress))}n.is=e;function r(t){let i=t;return i&&gt.boolean(i.workDoneProgress)}n.hasWorkDoneProgress=r})($w||(E.WorkDoneProgressOptions=$w={}));var Uw;(function(n){n.method="initialize",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Uw||(E.InitializeRequest=Uw={}));var Bw;(function(n){n.unknownProtocolVersion=1})(Bw||(E.InitializeErrorCodes=Bw={}));var Ww;(function(n){n.method="initialized",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolNotificationType(n.method)})(Ww||(E.InitializedNotification=Ww={}));var Vw;(function(n){n.method="shutdown",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType0(n.method)})(Vw||(E.ShutdownRequest=Vw={}));var Hw;(function(n){n.method="exit",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolNotificationType0(n.method)})(Hw||(E.ExitNotification=Hw={}));var zw;(function(n){n.method="workspace/didChangeConfiguration",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolNotificationType(n.method)})(zw||(E.DidChangeConfigurationNotification=zw={}));var Gw;(function(n){n.Error=1,n.Warning=2,n.Info=3,n.Log=4,n.Debug=5})(Gw||(E.MessageType=Gw={}));var Kw;(function(n){n.method="window/showMessage",n.messageDirection=U.MessageDirection.serverToClient,n.type=new U.ProtocolNotificationType(n.method)})(Kw||(E.ShowMessageNotification=Kw={}));var Yw;(function(n){n.method="window/showMessageRequest",n.messageDirection=U.MessageDirection.serverToClient,n.type=new U.ProtocolRequestType(n.method)})(Yw||(E.ShowMessageRequest=Yw={}));var Qw;(function(n){n.method="window/logMessage",n.messageDirection=U.MessageDirection.serverToClient,n.type=new U.ProtocolNotificationType(n.method)})(Qw||(E.LogMessageNotification=Qw={}));var Jw;(function(n){n.method="telemetry/event",n.messageDirection=U.MessageDirection.serverToClient,n.type=new U.ProtocolNotificationType(n.method)})(Jw||(E.TelemetryEventNotification=Jw={}));var Zw;(function(n){n.None=0,n.Full=1,n.Incremental=2})(Zw||(E.TextDocumentSyncKind=Zw={}));var Xw;(function(n){n.method="textDocument/didOpen",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolNotificationType(n.method)})(Xw||(E.DidOpenTextDocumentNotification=Xw={}));var ex;(function(n){function e(t){let i=t;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}n.isIncremental=e;function r(t){let i=t;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}n.isFull=r})(ex||(E.TextDocumentContentChangeEvent=ex={}));var tx;(function(n){n.method="textDocument/didChange",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolNotificationType(n.method)})(tx||(E.DidChangeTextDocumentNotification=tx={}));var nx;(function(n){n.method="textDocument/didClose",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolNotificationType(n.method)})(nx||(E.DidCloseTextDocumentNotification=nx={}));var rx;(function(n){n.method="textDocument/didSave",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolNotificationType(n.method)})(rx||(E.DidSaveTextDocumentNotification=rx={}));var ix;(function(n){n.Manual=1,n.AfterDelay=2,n.FocusOut=3})(ix||(E.TextDocumentSaveReason=ix={}));var sx;(function(n){n.method="textDocument/willSave",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolNotificationType(n.method)})(sx||(E.WillSaveTextDocumentNotification=sx={}));var ox;(function(n){n.method="textDocument/willSaveWaitUntil",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(ox||(E.WillSaveTextDocumentWaitUntilRequest=ox={}));var ax;(function(n){n.method="workspace/didChangeWatchedFiles",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolNotificationType(n.method)})(ax||(E.DidChangeWatchedFilesNotification=ax={}));var lx;(function(n){n.Created=1,n.Changed=2,n.Deleted=3})(lx||(E.FileChangeType=lx={}));var ux;(function(n){function e(r){let t=r;return gt.objectLiteral(t)&&(Aw.URI.is(t.baseUri)||Aw.WorkspaceFolder.is(t.baseUri))&&gt.string(t.pattern)}n.is=e})(ux||(E.RelativePattern=ux={}));var cx;(function(n){n.Create=1,n.Change=2,n.Delete=4})(cx||(E.WatchKind=cx={}));var px;(function(n){n.method="textDocument/publishDiagnostics",n.messageDirection=U.MessageDirection.serverToClient,n.type=new U.ProtocolNotificationType(n.method)})(px||(E.PublishDiagnosticsNotification=px={}));var dx;(function(n){n.Invoked=1,n.TriggerCharacter=2,n.TriggerForIncompleteCompletions=3})(dx||(E.CompletionTriggerKind=dx={}));var hx;(function(n){n.method="textDocument/completion",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(hx||(E.CompletionRequest=hx={}));var fx;(function(n){n.method="completionItem/resolve",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(fx||(E.CompletionResolveRequest=fx={}));var mx;(function(n){n.method="textDocument/hover",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(mx||(E.HoverRequest=mx={}));var gx;(function(n){n.Invoked=1,n.TriggerCharacter=2,n.ContentChange=3})(gx||(E.SignatureHelpTriggerKind=gx={}));var yx;(function(n){n.method="textDocument/signatureHelp",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(yx||(E.SignatureHelpRequest=yx={}));var bx;(function(n){n.method="textDocument/definition",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(bx||(E.DefinitionRequest=bx={}));var vx;(function(n){n.method="textDocument/references",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(vx||(E.ReferencesRequest=vx={}));var _x;(function(n){n.method="textDocument/documentHighlight",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(_x||(E.DocumentHighlightRequest=_x={}));var wx;(function(n){n.method="textDocument/documentSymbol",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(wx||(E.DocumentSymbolRequest=wx={}));var xx;(function(n){n.method="textDocument/codeAction",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(xx||(E.CodeActionRequest=xx={}));var kx;(function(n){n.method="codeAction/resolve",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(kx||(E.CodeActionResolveRequest=kx={}));var Tx;(function(n){n.method="workspace/symbol",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Tx||(E.WorkspaceSymbolRequest=Tx={}));var Sx;(function(n){n.method="workspaceSymbol/resolve",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Sx||(E.WorkspaceSymbolResolveRequest=Sx={}));var Ix;(function(n){n.method="textDocument/codeLens",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Ix||(E.CodeLensRequest=Ix={}));var Ex;(function(n){n.method="codeLens/resolve",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Ex||(E.CodeLensResolveRequest=Ex={}));var Rx;(function(n){n.method="workspace/codeLens/refresh",n.messageDirection=U.MessageDirection.serverToClient,n.type=new U.ProtocolRequestType0(n.method)})(Rx||(E.CodeLensRefreshRequest=Rx={}));var Px;(function(n){n.method="textDocument/documentLink",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Px||(E.DocumentLinkRequest=Px={}));var Cx;(function(n){n.method="documentLink/resolve",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Cx||(E.DocumentLinkResolveRequest=Cx={}));var Ox;(function(n){n.method="textDocument/formatting",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Ox||(E.DocumentFormattingRequest=Ox={}));var Ax;(function(n){n.method="textDocument/rangeFormatting",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Ax||(E.DocumentRangeFormattingRequest=Ax={}));var Dx;(function(n){n.method="textDocument/rangesFormatting",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Dx||(E.DocumentRangesFormattingRequest=Dx={}));var jx;(function(n){n.method="textDocument/onTypeFormatting",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(jx||(E.DocumentOnTypeFormattingRequest=jx={}));var Lx;(function(n){n.Identifier=1})(Lx||(E.PrepareSupportDefaultBehavior=Lx={}));var Mx;(function(n){n.method="textDocument/rename",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Mx||(E.RenameRequest=Mx={}));var qx;(function(n){n.method="textDocument/prepareRename",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(qx||(E.PrepareRenameRequest=qx={}));var Fx;(function(n){n.method="workspace/executeCommand",n.messageDirection=U.MessageDirection.clientToServer,n.type=new U.ProtocolRequestType(n.method)})(Fx||(E.ExecuteCommandRequest=Fx={}));var Nx;(function(n){n.method="workspace/applyEdit",n.messageDirection=U.MessageDirection.serverToClient,n.type=new U.ProtocolRequestType("workspace/applyEdit")})(Nx||(E.ApplyWorkspaceEditRequest=Nx={}))});var zx=S(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});fl.createProtocolConnection=void 0;var Hx=zr();function KE(n,e,r,t){return Hx.ConnectionStrategy.is(t)&&(t={connectionStrategy:t}),(0,Hx.createMessageConnection)(n,e,r,t)}fl.createProtocolConnection=KE});var Kx=S(Wt=>{"use strict";var YE=Wt&&Wt.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),ml=Wt&&Wt.__exportStar||function(n,e){for(var r in n)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&YE(e,n,r)};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.LSPErrorCodes=Wt.createProtocolConnection=void 0;ml(zr(),Wt);ml((Za(),mt(Ja)),Wt);ml($e(),Wt);ml(Vx(),Wt);var QE=zx();Object.defineProperty(Wt,"createProtocolConnection",{enumerable:!0,get:function(){return QE.createProtocolConnection}});var Gx;(function(n){n.lspReservedErrorRangeStart=-32899,n.RequestFailed=-32803,n.ServerCancelled=-32802,n.ContentModified=-32801,n.RequestCancelled=-32800,n.lspReservedErrorRangeEnd=-32800})(Gx||(Wt.LSPErrorCodes=Gx={}))});var nt=S(Dn=>{"use strict";var JE=Dn&&Dn.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),Yx=Dn&&Dn.__exportStar||function(n,e){for(var r in n)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&JE(e,n,r)};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.createProtocolConnection=void 0;var ZE=Od();Yx(Od(),Dn);Yx(Kx(),Dn);function XE(n,e,r,t){return(0,ZE.createMessageConnection)(n,e,r,t)}Dn.createProtocolConnection=XE});var Jh=S(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.SemanticTokensBuilder=wr.SemanticTokensDiff=wr.SemanticTokensFeature=void 0;var gl=nt(),eR=n=>class extends n{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(gl.SemanticTokensRefreshRequest.type),on:e=>{let r=gl.SemanticTokensRequest.type;return this.connection.onRequest(r,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r,t)))},onDelta:e=>{let r=gl.SemanticTokensDeltaRequest.type;return this.connection.onRequest(r,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r,t)))},onRange:e=>{let r=gl.SemanticTokensRangeRequest.type;return this.connection.onRequest(r,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r,t)))}}}};wr.SemanticTokensFeature=eR;var yl=class{constructor(e,r){this.originalSequence=e,this.modifiedSequence=r}computeDiff(){let e=this.originalSequence.length,r=this.modifiedSequence.length,t=0;for(;t<r&&t<e&&this.originalSequence[t]===this.modifiedSequence[t];)t++;if(t<r&&t<e){let i=e-1,s=r-1;for(;i>=t&&s>=t&&this.originalSequence[i]===this.modifiedSequence[s];)i--,s--;(i<t||s<t)&&(i++,s++);let o=i-t+1,l=this.modifiedSequence.slice(t,s+1);return l.length===1&&l[0]===this.originalSequence[i]?[{start:t,deleteCount:o-1}]:[{start:t,deleteCount:o,data:l}]}else return t<r?[{start:t,deleteCount:0,data:this.modifiedSequence.slice(t)}]:t<e?[{start:t,deleteCount:e-t}]:[]}};wr.SemanticTokensDiff=yl;var Qh=class{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(e,r,t,i,s){let o=e,l=r;this._dataLen>0&&(o-=this._prevLine,o===0&&(l-=this._prevChar)),this._data[this._dataLen++]=o,this._data[this._dataLen++]=l,this._data[this._dataLen++]=t,this._data[this._dataLen++]=i,this._data[this._dataLen++]=s,this._prevLine=e,this._prevChar=r}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData!==void 0?{resultId:this.id,edits:new yl(this._prevData,this._data).computeDiff()}:this.build()}};wr.SemanticTokensBuilder=Qh});var Qx=S(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});bl.InlineCompletionFeature=void 0;var tR=nt(),nR=n=>class extends n{get inlineCompletion(){return{on:e=>this.connection.onRequest(tR.InlineCompletionRequest.type,(r,t)=>e(r,t,this.attachWorkDoneProgress(r)))}}};bl.InlineCompletionFeature=nR});var Xh=S(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.TextDocuments=void 0;var Qr=nt(),Zh=class{constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new Qr.Emitter,this._onDidOpen=new Qr.Emitter,this._onDidClose=new Qr.Emitter,this._onDidSave=new Qr.Emitter,this._onWillSave=new Qr.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=Qr.TextDocumentSyncKind.Incremental;let r=[];return r.push(e.onDidOpenTextDocument(t=>{let i=t.textDocument,s=this._configuration.create(i.uri,i.languageId,i.version,i.text);this._syncedDocuments.set(i.uri,s);let o=Object.freeze({document:s});this._onDidOpen.fire(o),this._onDidChangeContent.fire(o)})),r.push(e.onDidChangeTextDocument(t=>{let i=t.textDocument,s=t.contentChanges;if(s.length===0)return;let{version:o}=i;if(o==null)throw new Error(`Received document change event for ${i.uri} without valid version identifier`);let l=this._syncedDocuments.get(i.uri);l!==void 0&&(l=this._configuration.update(l,s,o),this._syncedDocuments.set(i.uri,l),this._onDidChangeContent.fire(Object.freeze({document:l})))})),r.push(e.onDidCloseTextDocument(t=>{let i=this._syncedDocuments.get(t.textDocument.uri);i!==void 0&&(this._syncedDocuments.delete(t.textDocument.uri),this._onDidClose.fire(Object.freeze({document:i})))})),r.push(e.onWillSaveTextDocument(t=>{let i=this._syncedDocuments.get(t.textDocument.uri);i!==void 0&&this._onWillSave.fire(Object.freeze({document:i,reason:t.reason}))})),r.push(e.onWillSaveTextDocumentWaitUntil((t,i)=>{let s=this._syncedDocuments.get(t.textDocument.uri);return s!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:s,reason:t.reason}),i):[]})),r.push(e.onDidSaveTextDocument(t=>{let i=this._syncedDocuments.get(t.textDocument.uri);i!==void 0&&this._onDidSave.fire(Object.freeze({document:i}))})),Qr.Disposable.create(()=>{r.forEach(t=>t.dispose())})}};vl.TextDocuments=Zh});var tf=S(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.NotebookDocuments=Ki.NotebookSyncFeature=void 0;var cn=nt(),Jx=Xh(),rR=n=>class extends n{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(cn.DidOpenNotebookDocumentNotification.type,r=>{e(r)}),onDidChangeNotebookDocument:e=>this.connection.onNotification(cn.DidChangeNotebookDocumentNotification.type,r=>{e(r)}),onDidSaveNotebookDocument:e=>this.connection.onNotification(cn.DidSaveNotebookDocumentNotification.type,r=>{e(r)}),onDidCloseNotebookDocument:e=>this.connection.onNotification(cn.DidCloseNotebookDocumentNotification.type,r=>{e(r)})}}};Ki.NotebookSyncFeature=rR;var _l=class n{onDidOpenTextDocument(e){return this.openHandler=e,cn.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,cn.Disposable.create(()=>{this.changeHandler=e})}changeTextDocument(e){this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,cn.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(e){this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return n.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return n.NULL_DISPOSE}onDidSaveTextDocument(){return n.NULL_DISPOSE}};_l.NULL_DISPOSE=Object.freeze({dispose:()=>{}});var ef=class{constructor(e){e instanceof Jx.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new Jx.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new cn.Emitter,this._onDidChange=new cn.Emitter,this._onDidSave=new cn.Emitter,this._onDidClose=new cn.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){let r=this.notebookCellMap.get(e);return r&&r[0]}findNotebookDocumentForCell(e){let r=typeof e=="string"?e:e.document,t=this.notebookCellMap.get(r);return t&&t[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){let r=new _l,t=[];return t.push(this.cellTextDocuments.listen(r)),t.push(e.notebooks.synchronization.onDidOpenNotebookDocument(i=>{this.notebookDocuments.set(i.notebookDocument.uri,i.notebookDocument);for(let s of i.cellTextDocuments)r.openTextDocument({textDocument:s});this.updateCellMap(i.notebookDocument),this._onDidOpen.fire(i.notebookDocument)})),t.push(e.notebooks.synchronization.onDidChangeNotebookDocument(i=>{let s=this.notebookDocuments.get(i.notebookDocument.uri);if(s===void 0)return;s.version=i.notebookDocument.version;let o=s.metadata,l=!1,u=i.change;u.metadata!==void 0&&(l=!0,s.metadata=u.metadata);let a=[],c=[],p=[],d=[];if(u.cells!==void 0){let b=u.cells;if(b.structure!==void 0){let v=b.structure.array;if(s.cells.splice(v.start,v.deleteCount,...v.cells!==void 0?v.cells:[]),b.structure.didOpen!==void 0)for(let _ of b.structure.didOpen)r.openTextDocument({textDocument:_}),a.push(_.uri);if(b.structure.didClose)for(let _ of b.structure.didClose)r.closeTextDocument({textDocument:_}),c.push(_.uri)}if(b.data!==void 0){let v=new Map(b.data.map(_=>[_.document,_]));for(let _=0;_<=s.cells.length;_++){let w=v.get(s.cells[_].document);if(w!==void 0){let k=s.cells.splice(_,1,w);if(p.push({old:k[0],new:w}),v.delete(w.document),v.size===0)break}}}if(b.textContent!==void 0)for(let v of b.textContent)r.changeTextDocument({textDocument:v.document,contentChanges:v.changes}),d.push(v.document.uri)}this.updateCellMap(s);let h={notebookDocument:s};l&&(h.metadata={old:o,new:s.metadata});let g=[];for(let b of a)g.push(this.getNotebookCell(b));let f=[];for(let b of c)f.push(this.getNotebookCell(b));let m=[];for(let b of d)m.push(this.getNotebookCell(b));(g.length>0||f.length>0||p.length>0||m.length>0)&&(h.cells={added:g,removed:f,changed:{data:p,textContent:m}}),(h.metadata!==void 0||h.cells!==void 0)&&this._onDidChange.fire(h)})),t.push(e.notebooks.synchronization.onDidSaveNotebookDocument(i=>{let s=this.notebookDocuments.get(i.notebookDocument.uri);s!==void 0&&this._onDidSave.fire(s)})),t.push(e.notebooks.synchronization.onDidCloseNotebookDocument(i=>{let s=this.notebookDocuments.get(i.notebookDocument.uri);if(s!==void 0){this._onDidClose.fire(s);for(let o of i.cellTextDocuments)r.closeTextDocument({textDocument:o});this.notebookDocuments.delete(i.notebookDocument.uri);for(let o of s.cells)this.notebookCellMap.delete(o.document)}})),cn.Disposable.create(()=>{t.forEach(i=>i.dispose())})}updateCellMap(e){for(let r of e.cells)this.notebookCellMap.set(r.document,[r,e])}};Ki.NotebookDocuments=ef});var nf=S(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.thenable=at.typedArray=at.stringArray=at.array=at.func=at.error=at.number=at.string=at.boolean=void 0;function iR(n){return n===!0||n===!1}at.boolean=iR;function Zx(n){return typeof n=="string"||n instanceof String}at.string=Zx;function sR(n){return typeof n=="number"||n instanceof Number}at.number=sR;function oR(n){return n instanceof Error}at.error=oR;function Xx(n){return typeof n=="function"}at.func=Xx;function ek(n){return Array.isArray(n)}at.array=ek;function aR(n){return ek(n)&&n.every(e=>Zx(e))}at.stringArray=aR;function lR(n,e){return Array.isArray(n)&&n.every(e)}at.typedArray=lR;function uR(n){return n&&Xx(n.then)}at.thenable=uR});var rf=S(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.generateUuid=pn.parse=pn.isUUID=pn.v4=pn.empty=void 0;var co=class{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},po=class n extends co{static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return n._oneOf(n._chars)}constructor(){super([n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-","4",n._randomHex(),n._randomHex(),n._randomHex(),"-",n._oneOf(n._timeHighBits),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex()].join(""))}};po._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];po._timeHighBits=["8","9","a","b"];pn.empty=new co("00000000-0000-0000-0000-000000000000");function tk(){return new po}pn.v4=tk;var cR=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function nk(n){return cR.test(n)}pn.isUUID=nk;function pR(n){if(!nk(n))throw new Error("invalid uuid");return new co(n)}pn.parse=pR;function dR(){return tk().asHex()}pn.generateUuid=dR});var rk=S(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.attachPartialResult=kr.ProgressFeature=kr.attachWorkDone=void 0;var xr=nt(),hR=rf(),Jr=class n{constructor(e,r){this._connection=e,this._token=r,n.Instances.set(this._token,this)}begin(e,r,t,i){let s={kind:"begin",title:e,percentage:r,message:t,cancellable:i};this._connection.sendProgress(xr.WorkDoneProgress.type,this._token,s)}report(e,r){let t={kind:"report"};typeof e=="number"?(t.percentage=e,r!==void 0&&(t.message=r)):t.message=e,this._connection.sendProgress(xr.WorkDoneProgress.type,this._token,t)}done(){n.Instances.delete(this._token),this._connection.sendProgress(xr.WorkDoneProgress.type,this._token,{kind:"end"})}};Jr.Instances=new Map;var wl=class extends Jr{constructor(e,r){super(e,r),this._source=new xr.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},ho=class{constructor(){}begin(){}report(){}done(){}},xl=class extends ho{constructor(){super(),this._source=new xr.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function fR(n,e){if(e===void 0||e.workDoneToken===void 0)return new ho;let r=e.workDoneToken;return delete e.workDoneToken,new Jr(n,r)}kr.attachWorkDone=fR;var mR=n=>class extends n{constructor(){super(),this._progressSupported=!1}initialize(e){var r;super.initialize(e),((r=e==null?void 0:e.window)==null?void 0:r.workDoneProgress)===!0&&(this._progressSupported=!0,this.connection.onNotification(xr.WorkDoneProgressCancelNotification.type,t=>{let i=Jr.Instances.get(t.token);(i instanceof wl||i instanceof xl)&&i.cancel()}))}attachWorkDoneProgress(e){return e===void 0?new ho:new Jr(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){let e=(0,hR.generateUuid)();return this.connection.sendRequest(xr.WorkDoneProgressCreateRequest.type,{token:e}).then(()=>new wl(this.connection,e))}else return Promise.resolve(new xl)}};kr.ProgressFeature=mR;var sf;(function(n){n.type=new xr.ProgressType})(sf||(sf={}));var of=class{constructor(e,r){this._connection=e,this._token=r}report(e){this._connection.sendProgress(sf.type,this._token,e)}};function gR(n,e){if(e===void 0||e.partialResultToken===void 0)return;let r=e.partialResultToken;return delete e.partialResultToken,new of(n,r)}kr.attachPartialResult=gR});var ik=S(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});kl.ConfigurationFeature=void 0;var yR=nt(),bR=nf(),vR=n=>class extends n{getConfiguration(e){return e?bR.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let r={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(yR.ConfigurationRequest.type,r).then(t=>Array.isArray(t)?Array.isArray(e)?t:t[0]:Array.isArray(e)?[]:null)}};kl.ConfigurationFeature=vR});var sk=S(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});Sl.WorkspaceFoldersFeature=void 0;var Tl=nt(),_R=n=>class extends n{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let r=e.workspace;r&&r.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Tl.Emitter,this.connection.onNotification(Tl.DidChangeWorkspaceFoldersNotification.type,t=>{this._onDidChangeWorkspaceFolders.fire(t.event)}))}fillServerCapabilities(e){var t,i;super.fillServerCapabilities(e);let r=(i=(t=e.workspace)==null?void 0:t.workspaceFolders)==null?void 0:i.changeNotifications;this._notificationIsAutoRegistered=r===!0||typeof r=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Tl.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Tl.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Sl.WorkspaceFoldersFeature=_R});var ok=S(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.CallHierarchyFeature=void 0;var af=nt(),wR=n=>class extends n{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(af.CallHierarchyPrepareRequest.type,(r,t)=>e(r,t,this.attachWorkDoneProgress(r),void 0)),onIncomingCalls:e=>{let r=af.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(r,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r,t)))},onOutgoingCalls:e=>{let r=af.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(r,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r,t)))}}}};Il.CallHierarchyFeature=wR});var ak=S(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.ShowDocumentFeature=void 0;var xR=nt(),kR=n=>class extends n{showDocument(e){return this.connection.sendRequest(xR.ShowDocumentRequest.type,e)}};El.ShowDocumentFeature=kR});var lk=S(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.FileOperationsFeature=void 0;var Yi=nt(),TR=n=>class extends n{onDidCreateFiles(e){return this.connection.onNotification(Yi.DidCreateFilesNotification.type,r=>{e(r)})}onDidRenameFiles(e){return this.connection.onNotification(Yi.DidRenameFilesNotification.type,r=>{e(r)})}onDidDeleteFiles(e){return this.connection.onNotification(Yi.DidDeleteFilesNotification.type,r=>{e(r)})}onWillCreateFiles(e){return this.connection.onRequest(Yi.WillCreateFilesRequest.type,(r,t)=>e(r,t))}onWillRenameFiles(e){return this.connection.onRequest(Yi.WillRenameFilesRequest.type,(r,t)=>e(r,t))}onWillDeleteFiles(e){return this.connection.onRequest(Yi.WillDeleteFilesRequest.type,(r,t)=>e(r,t))}};Rl.FileOperationsFeature=TR});var uk=S(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.LinkedEditingRangeFeature=void 0;var SR=nt(),IR=n=>class extends n{onLinkedEditingRange(e){return this.connection.onRequest(SR.LinkedEditingRangeRequest.type,(r,t)=>e(r,t,this.attachWorkDoneProgress(r),void 0))}};Pl.LinkedEditingRangeFeature=IR});var ck=S(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});Cl.TypeHierarchyFeature=void 0;var lf=nt(),ER=n=>class extends n{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(lf.TypeHierarchyPrepareRequest.type,(r,t)=>e(r,t,this.attachWorkDoneProgress(r),void 0)),onSupertypes:e=>{let r=lf.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(r,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r,t)))},onSubtypes:e=>{let r=lf.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(r,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r,t)))}}}};Cl.TypeHierarchyFeature=ER});var dk=S(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});Ol.InlineValueFeature=void 0;var pk=nt(),RR=n=>class extends n{get inlineValue(){return{refresh:()=>this.connection.sendRequest(pk.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(pk.InlineValueRequest.type,(r,t)=>e(r,t,this.attachWorkDoneProgress(r)))}}};Ol.InlineValueFeature=RR});var fk=S(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.FoldingRangeFeature=void 0;var hk=nt(),PR=n=>class extends n{get foldingRange(){return{refresh:()=>this.connection.sendRequest(hk.FoldingRangeRefreshRequest.type),on:e=>{let r=hk.FoldingRangeRequest.type;return this.connection.onRequest(r,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r,t)))}}}};Al.FoldingRangeFeature=PR});var mk=S(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.InlayHintFeature=void 0;var uf=nt(),CR=n=>class extends n{get inlayHint(){return{refresh:()=>this.connection.sendRequest(uf.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(uf.InlayHintRequest.type,(r,t)=>e(r,t,this.attachWorkDoneProgress(r))),resolve:e=>this.connection.onRequest(uf.InlayHintResolveRequest.type,(r,t)=>e(r,t))}}};Dl.InlayHintFeature=CR});var gk=S(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});jl.DiagnosticFeature=void 0;var fo=nt(),OR=n=>class extends n{get diagnostics(){return{refresh:()=>this.connection.sendRequest(fo.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(fo.DocumentDiagnosticRequest.type,(r,t)=>e(r,t,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(fo.DocumentDiagnosticRequest.partialResult,r))),onWorkspace:e=>this.connection.onRequest(fo.WorkspaceDiagnosticRequest.type,(r,t)=>e(r,t,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(fo.WorkspaceDiagnosticRequest.partialResult,r)))}}};jl.DiagnosticFeature=OR});var yk=S(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});Ll.MonikerFeature=void 0;var AR=nt(),DR=n=>class extends n{get moniker(){return{on:e=>{let r=AR.MonikerRequest.type;return this.connection.onRequest(r,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r,t)))}}}};Ll.MonikerFeature=DR});var Ak=S(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.createConnection=be.combineFeatures=be.combineNotebooksFeatures=be.combineLanguagesFeatures=be.combineWorkspaceFeatures=be.combineWindowFeatures=be.combineClientFeatures=be.combineTracerFeatures=be.combineTelemetryFeatures=be.combineConsoleFeatures=be._NotebooksImpl=be._LanguagesImpl=be.BulkUnregistration=be.BulkRegistration=be.ErrorMessageTracker=void 0;var H=nt(),dn=nf(),pf=rf(),le=rk(),jR=ik(),LR=sk(),MR=ok(),qR=Jh(),FR=ak(),NR=lk(),$R=uk(),UR=ck(),BR=dk(),WR=fk(),VR=mk(),HR=gk(),zR=tf(),GR=yk();function cf(n){if(n!==null)return n}var df=class{constructor(){this._messages=Object.create(null)}add(e){let r=this._messages[e];r||(r=0),r++,this._messages[e]=r}sendErrors(e){Object.keys(this._messages).forEach(r=>{e.window.showErrorMessage(r)})}};be.ErrorMessageTracker=df;var Ml=class{constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(H.MessageType.Error,e)}warn(e){this.send(H.MessageType.Warning,e)}info(e){this.send(H.MessageType.Info,e)}log(e){this.send(H.MessageType.Log,e)}debug(e){this.send(H.MessageType.Debug,e)}send(e,r){this._rawConnection&&this._rawConnection.sendNotification(H.LogMessageNotification.type,{type:e,message:r}).catch(()=>{(0,H.RAL)().console.error("Sending log message failed")})}},hf=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...r){let t={type:H.MessageType.Error,message:e,actions:r};return this.connection.sendRequest(H.ShowMessageRequest.type,t).then(cf)}showWarningMessage(e,...r){let t={type:H.MessageType.Warning,message:e,actions:r};return this.connection.sendRequest(H.ShowMessageRequest.type,t).then(cf)}showInformationMessage(e,...r){let t={type:H.MessageType.Info,message:e,actions:r};return this.connection.sendRequest(H.ShowMessageRequest.type,t).then(cf)}},bk=(0,FR.ShowDocumentFeature)((0,le.ProgressFeature)(hf)),vk;(function(n){function e(){return new ql}n.create=e})(vk||(be.BulkRegistration=vk={}));var ql=class{constructor(){this._registrations=[],this._registered=new Set}add(e,r){let t=dn.string(e)?e:e.method;if(this._registered.has(t))throw new Error(`${t} is already added to this registration`);let i=pf.generateUuid();this._registrations.push({id:i,method:t,registerOptions:r||{}}),this._registered.add(t)}asRegistrationParams(){return{registrations:this._registrations}}},_k;(function(n){function e(){return new mo(void 0,[])}n.create=e})(_k||(be.BulkUnregistration=_k={}));var mo=class{constructor(e,r){this._connection=e,this._unregistrations=new Map,r.forEach(t=>{this._unregistrations.set(t.method,t)})}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let t of this._unregistrations.values())e.push(t);let r={unregisterations:e};this._connection.sendRequest(H.UnregistrationRequest.type,r).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(e){let r=dn.string(e)?e:e.method,t=this._unregistrations.get(r);if(!t)return!1;let i={unregisterations:[t]};return this._connection.sendRequest(H.UnregistrationRequest.type,i).then(()=>{this._unregistrations.delete(r)},s=>{this._connection.console.info(`Un-registering request handler for ${t.id} failed.`)}),!0}},Fl=class{attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,r,t){return e instanceof ql?this.registerMany(e):e instanceof mo?this.registerSingle1(e,r,t):this.registerSingle2(e,r)}registerSingle1(e,r,t){let i=dn.string(r)?r:r.method,s=pf.generateUuid(),o={registrations:[{id:s,method:i,registerOptions:t||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(H.RegistrationRequest.type,o).then(l=>(e.add({id:s,method:i}),e),l=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(l)))}registerSingle2(e,r){let t=dn.string(e)?e:e.method,i=pf.generateUuid(),s={registrations:[{id:i,method:t,registerOptions:r||{}}]};return this.connection.sendRequest(H.RegistrationRequest.type,s).then(o=>H.Disposable.create(()=>{this.unregisterSingle(i,t).catch(()=>{this.connection.console.info(`Un-registering capability with id ${i} failed.`)})}),o=>(this.connection.console.info(`Registering request handler for ${t} failed.`),Promise.reject(o)))}unregisterSingle(e,r){let t={unregisterations:[{id:e,method:r}]};return this.connection.sendRequest(H.UnregistrationRequest.type,t).catch(()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)})}registerMany(e){let r=e.asRegistrationParams();return this.connection.sendRequest(H.RegistrationRequest.type,r).then(()=>new mo(this._connection,r.registrations.map(t=>({id:t.id,method:t.method}))),t=>(this.connection.console.info("Bulk registration failed."),Promise.reject(t)))}},ff=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){function r(i){return i&&!!i.edit}let t=r(e)?e:{edit:e};return this.connection.sendRequest(H.ApplyWorkspaceEditRequest.type,t)}},wk=(0,NR.FileOperationsFeature)((0,LR.WorkspaceFoldersFeature)((0,jR.ConfigurationFeature)(ff))),Nl=class{constructor(){this._trace=H.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,r){this._trace!==H.Trace.Off&&this.connection.sendNotification(H.LogTraceNotification.type,{message:e,verbose:this._trace===H.Trace.Verbose?r:void 0}).catch(()=>{})}},$l=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(H.TelemetryEventNotification.type,e).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},Ul=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,le.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,r){return(0,le.attachPartialResult)(this.connection,r)}};be._LanguagesImpl=Ul;var xk=(0,WR.FoldingRangeFeature)((0,GR.MonikerFeature)((0,HR.DiagnosticFeature)((0,VR.InlayHintFeature)((0,BR.InlineValueFeature)((0,UR.TypeHierarchyFeature)((0,$R.LinkedEditingRangeFeature)((0,qR.SemanticTokensFeature)((0,MR.CallHierarchyFeature)(Ul))))))))),Bl=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,le.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,r){return(0,le.attachPartialResult)(this.connection,r)}};be._NotebooksImpl=Bl;var kk=(0,zR.NotebookSyncFeature)(Bl);function Tk(n,e){return function(r){return e(n(r))}}be.combineConsoleFeatures=Tk;function Sk(n,e){return function(r){return e(n(r))}}be.combineTelemetryFeatures=Sk;function Ik(n,e){return function(r){return e(n(r))}}be.combineTracerFeatures=Ik;function Ek(n,e){return function(r){return e(n(r))}}be.combineClientFeatures=Ek;function Rk(n,e){return function(r){return e(n(r))}}be.combineWindowFeatures=Rk;function Pk(n,e){return function(r){return e(n(r))}}be.combineWorkspaceFeatures=Pk;function Ck(n,e){return function(r){return e(n(r))}}be.combineLanguagesFeatures=Ck;function Ok(n,e){return function(r){return e(n(r))}}be.combineNotebooksFeatures=Ok;function KR(n,e){function r(i,s,o){return i&&s?o(i,s):i||s}return{__brand:"features",console:r(n.console,e.console,Tk),tracer:r(n.tracer,e.tracer,Ik),telemetry:r(n.telemetry,e.telemetry,Sk),client:r(n.client,e.client,Ek),window:r(n.window,e.window,Rk),workspace:r(n.workspace,e.workspace,Pk),languages:r(n.languages,e.languages,Ck),notebooks:r(n.notebooks,e.notebooks,Ok)}}be.combineFeatures=KR;function YR(n,e,r){let t=r&&r.console?new(r.console(Ml)):new Ml,i=n(t);t.rawAttach(i);let s=r&&r.tracer?new(r.tracer(Nl)):new Nl,o=r&&r.telemetry?new(r.telemetry($l)):new $l,l=r&&r.client?new(r.client(Fl)):new Fl,u=r&&r.window?new(r.window(bk)):new bk,a=r&&r.workspace?new(r.workspace(wk)):new wk,c=r&&r.languages?new(r.languages(xk)):new xk,p=r&&r.notebooks?new(r.notebooks(kk)):new kk,d=[t,s,o,l,u,a,c,p];function h(v){return v instanceof Promise?v:dn.thenable(v)?new Promise((_,w)=>{v.then(k=>_(k),k=>w(k))}):Promise.resolve(v)}let g,f,m,b={listen:()=>i.listen(),sendRequest:(v,..._)=>i.sendRequest(dn.string(v)?v:v.method,..._),onRequest:(v,_)=>i.onRequest(v,_),sendNotification:(v,_)=>{let w=dn.string(v)?v:v.method;return i.sendNotification(w,_)},onNotification:(v,_)=>i.onNotification(v,_),onProgress:i.onProgress,sendProgress:i.sendProgress,onInitialize:v=>(f=v,{dispose:()=>{f=void 0}}),onInitialized:v=>i.onNotification(H.InitializedNotification.type,v),onShutdown:v=>(g=v,{dispose:()=>{g=void 0}}),onExit:v=>(m=v,{dispose:()=>{m=void 0}}),get console(){return t},get telemetry(){return o},get tracer(){return s},get client(){return l},get window(){return u},get workspace(){return a},get languages(){return c},get notebooks(){return p},onDidChangeConfiguration:v=>i.onNotification(H.DidChangeConfigurationNotification.type,v),onDidChangeWatchedFiles:v=>i.onNotification(H.DidChangeWatchedFilesNotification.type,v),__textDocumentSync:void 0,onDidOpenTextDocument:v=>i.onNotification(H.DidOpenTextDocumentNotification.type,v),onDidChangeTextDocument:v=>i.onNotification(H.DidChangeTextDocumentNotification.type,v),onDidCloseTextDocument:v=>i.onNotification(H.DidCloseTextDocumentNotification.type,v),onWillSaveTextDocument:v=>i.onNotification(H.WillSaveTextDocumentNotification.type,v),onWillSaveTextDocumentWaitUntil:v=>i.onRequest(H.WillSaveTextDocumentWaitUntilRequest.type,v),onDidSaveTextDocument:v=>i.onNotification(H.DidSaveTextDocumentNotification.type,v),sendDiagnostics:v=>i.sendNotification(H.PublishDiagnosticsNotification.type,v),onHover:v=>i.onRequest(H.HoverRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),void 0)),onCompletion:v=>i.onRequest(H.CompletionRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onCompletionResolve:v=>i.onRequest(H.CompletionResolveRequest.type,v),onSignatureHelp:v=>i.onRequest(H.SignatureHelpRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),void 0)),onDeclaration:v=>i.onRequest(H.DeclarationRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onDefinition:v=>i.onRequest(H.DefinitionRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onTypeDefinition:v=>i.onRequest(H.TypeDefinitionRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onImplementation:v=>i.onRequest(H.ImplementationRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onReferences:v=>i.onRequest(H.ReferencesRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onDocumentHighlight:v=>i.onRequest(H.DocumentHighlightRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onDocumentSymbol:v=>i.onRequest(H.DocumentSymbolRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onWorkspaceSymbol:v=>i.onRequest(H.WorkspaceSymbolRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onWorkspaceSymbolResolve:v=>i.onRequest(H.WorkspaceSymbolResolveRequest.type,v),onCodeAction:v=>i.onRequest(H.CodeActionRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onCodeActionResolve:v=>i.onRequest(H.CodeActionResolveRequest.type,(_,w)=>v(_,w)),onCodeLens:v=>i.onRequest(H.CodeLensRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onCodeLensResolve:v=>i.onRequest(H.CodeLensResolveRequest.type,(_,w)=>v(_,w)),onDocumentFormatting:v=>i.onRequest(H.DocumentFormattingRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),void 0)),onDocumentRangeFormatting:v=>i.onRequest(H.DocumentRangeFormattingRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),void 0)),onDocumentOnTypeFormatting:v=>i.onRequest(H.DocumentOnTypeFormattingRequest.type,(_,w)=>v(_,w)),onRenameRequest:v=>i.onRequest(H.RenameRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),void 0)),onPrepareRename:v=>i.onRequest(H.PrepareRenameRequest.type,(_,w)=>v(_,w)),onDocumentLinks:v=>i.onRequest(H.DocumentLinkRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onDocumentLinkResolve:v=>i.onRequest(H.DocumentLinkResolveRequest.type,(_,w)=>v(_,w)),onDocumentColor:v=>i.onRequest(H.DocumentColorRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onColorPresentation:v=>i.onRequest(H.ColorPresentationRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onFoldingRanges:v=>i.onRequest(H.FoldingRangeRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onSelectionRanges:v=>i.onRequest(H.SelectionRangeRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),(0,le.attachPartialResult)(i,_))),onExecuteCommand:v=>i.onRequest(H.ExecuteCommandRequest.type,(_,w)=>v(_,w,(0,le.attachWorkDone)(i,_),void 0)),dispose:()=>i.dispose()};for(let v of d)v.attach(b);return i.onRequest(H.InitializeRequest.type,v=>{e.initialize(v),dn.string(v.trace)&&(s.trace=H.Trace.fromString(v.trace));for(let _ of d)_.initialize(v.capabilities);if(f){let _=f(v,new H.CancellationTokenSource().token,(0,le.attachWorkDone)(i,v),void 0);return h(_).then(w=>{if(w instanceof H.ResponseError)return w;let k=w;k||(k={capabilities:{}});let y=k.capabilities;y||(y={},k.capabilities=y),y.textDocumentSync===void 0||y.textDocumentSync===null?y.textDocumentSync=dn.number(b.__textDocumentSync)?b.__textDocumentSync:H.TextDocumentSyncKind.None:!dn.number(y.textDocumentSync)&&!dn.number(y.textDocumentSync.change)&&(y.textDocumentSync.change=dn.number(b.__textDocumentSync)?b.__textDocumentSync:H.TextDocumentSyncKind.None);for(let x of d)x.fillServerCapabilities(y);return k})}else{let _={capabilities:{textDocumentSync:H.TextDocumentSyncKind.None}};for(let w of d)w.fillServerCapabilities(_.capabilities);return _}}),i.onRequest(H.ShutdownRequest.type,()=>{if(e.shutdownReceived=!0,g)return g(new H.CancellationTokenSource().token)}),i.onNotification(H.ExitNotification.type,()=>{try{m&&m()}finally{e.shutdownReceived?e.exit(0):e.exit(1)}}),i.onNotification(H.SetTraceNotification.type,v=>{s.trace=H.Trace.fromString(v.value)}),b}be.createConnection=YR});var mf=S(Ct=>{"use strict";var QR=Ct&&Ct.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),jk=Ct&&Ct.__exportStar||function(n,e){for(var r in n)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&QR(e,n,r)};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.ProposedFeatures=Ct.NotebookDocuments=Ct.TextDocuments=Ct.SemanticTokensBuilder=void 0;var JR=Jh();Object.defineProperty(Ct,"SemanticTokensBuilder",{enumerable:!0,get:function(){return JR.SemanticTokensBuilder}});var ZR=Qx();jk(nt(),Ct);var XR=Xh();Object.defineProperty(Ct,"TextDocuments",{enumerable:!0,get:function(){return XR.TextDocuments}});var eP=tf();Object.defineProperty(Ct,"NotebookDocuments",{enumerable:!0,get:function(){return eP.NotebookDocuments}});jk(Ak(),Ct);var Dk;(function(n){n.all={__brand:"features",languages:ZR.InlineCompletionFeature}})(Dk||(Ct.ProposedFeatures=Dk={}))});var Mk=S((GU,Lk)=>{"use strict";Lk.exports=nt()});var gf=S(jn=>{"use strict";var tP=jn&&jn.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),Fk=jn&&jn.__exportStar||function(n,e){for(var r in n)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&tP(e,n,r)};Object.defineProperty(jn,"__esModule",{value:!0});jn.createConnection=void 0;var Wl=mf();Fk(Mk(),jn);Fk(mf(),jn);var qk=!1,nP={initialize:n=>{},get shutdownReceived(){return qk},set shutdownReceived(n){qk=n},exit:n=>{}};function rP(n,e,r,t){let i,s,o,l;n!==void 0&&n.__brand==="features"&&(i=n,n=e,e=r,r=t),Wl.ConnectionStrategy.is(n)||Wl.ConnectionOptions.is(n)?l=n:(s=n,o=e,l=r);let u=a=>(0,Wl.createProtocolConnection)(s,o,a,l);return(0,Wl.createConnection)(u,nP,i)}jn.createConnection=rP});var yf=S((YU,Nk)=>{"use strict";Nk.exports=gf()});var Wk={};Gs(Wk,{TextDocument:()=>bf});function vf(n,e){if(n.length<=1)return n;let r=n.length/2|0,t=n.slice(0,r),i=n.slice(r);vf(t,e),vf(i,e);let s=0,o=0,l=0;for(;s<t.length&&o<i.length;)e(t[s],i[o])<=0?n[l++]=t[s++]:n[l++]=i[o++];for(;s<t.length;)n[l++]=t[s++];for(;o<i.length;)n[l++]=i[o++];return n}function $k(n,e,r=0){let t=e?[r]:[];for(let i=0;i<n.length;i++){let s=n.charCodeAt(i);Uk(s)&&(s===13&&i+1<n.length&&n.charCodeAt(i+1)===10&&i++,t.push(r+i+1))}return t}function Uk(n){return n===13||n===10}function Bk(n){let e=n.start,r=n.end;return e.line>r.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:n}function iP(n){let e=Bk(n.range);return e!==n.range?{newText:n.newText,range:e}:n}var Vl,bf,Vk=cr(()=>{"use strict";Vl=class n{constructor(e,r,t,i){this._uri=e,this._languageId=r,this._version=t,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),t=this.offsetAt(e.end);return this._content.substring(r,t)}return this._content}update(e,r){for(let t of e)if(n.isIncremental(t)){let i=Bk(t.range),s=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,s)+t.text+this._content.substring(o,this._content.length);let l=Math.max(i.start.line,0),u=Math.max(i.end.line,0),a=this._lineOffsets,c=$k(t.text,!1,s);if(u-l===c.length)for(let d=0,h=c.length;d<h;d++)a[d+l+1]=c[d];else c.length<1e4?a.splice(l+1,u-l,...c):this._lineOffsets=a=a.slice(0,l+1).concat(c,a.slice(u+1));let p=t.text.length-(o-s);if(p!==0)for(let d=l+1+c.length,h=a.length;d<h;d++)a[d]=a[d]+p}else if(n.isFull(t))this._content=t.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=r}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=$k(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),t=0,i=r.length;if(i===0)return{line:0,character:e};for(;t<i;){let o=Math.floor((t+i)/2);r[o]>e?i=o:t=o+1}let s=t-1;return e=this.ensureBeforeEOL(e,r[s]),{line:s,character:e-r[s]}}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let t=r[e.line];if(e.character<=0)return t;let i=e.line+1<r.length?r[e.line+1]:this._content.length,s=Math.min(t+e.character,i);return this.ensureBeforeEOL(s,t)}ensureBeforeEOL(e,r){for(;e>r&&Uk(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(n){function e(i,s,o,l){return new Vl(i,s,o,l)}n.create=e;function r(i,s,o){if(i instanceof Vl)return i.update(s,o),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}n.update=r;function t(i,s){let o=i.getText(),l=vf(s.map(iP),(c,p)=>{let d=c.range.start.line-p.range.start.line;return d===0?c.range.start.character-p.range.start.character:d}),u=0,a=[];for(let c of l){let p=i.offsetAt(c.range.start);if(p<u)throw new Error("Overlapping edit");p>u&&a.push(o.substring(u,p)),c.newText.length&&a.push(c.newText),u=i.offsetAt(c.range.end)}return a.push(o.substr(u)),a.join("")}n.applyEdits=t})(bf||(bf={}))});function Re(){Re.init.call(this)}function Hl(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}function eT(n){return n._maxListeners===void 0?Re.defaultMaxListeners:n._maxListeners}function Kk(n,e,r,t){var i,s,o,l;if(Hl(r),(s=n._events)===void 0?(s=n._events=Object.create(null),n._eventsCount=0):(s.newListener!==void 0&&(n.emit("newListener",e,r.listener?r.listener:r),s=n._events),o=s[e]),o===void 0)o=s[e]=r,++n._eventsCount;else if(typeof o=="function"?o=s[e]=t?[r,o]:[o,r]:t?o.unshift(r):o.push(r),(i=eT(n))>0&&o.length>i&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=n,u.type=e,u.count=o.length,l=u,console&&console.warn&&console.warn(l)}return n}function sP(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Yk(n,e,r){var t={fired:!1,wrapFn:void 0,target:n,type:e,listener:r},i=sP.bind(t);return i.listener=r,t.wrapFn=i,i}function Qk(n,e,r){var t=n._events;if(t===void 0)return[];var i=t[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?function(s){for(var o=new Array(s.length),l=0;l<o.length;++l)o[l]=s[l].listener||s[l];return o}(i):tT(i,i.length)}function Jk(n){var e=this._events;if(e!==void 0){var r=e[n];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}function tT(n,e){for(var r=new Array(e),t=0;t<e;++t)r[t]=n[t];return r}var Zk,Xk,Qi,Hk,zk,Gk,Vt,_f=cr(()=>{Qi=typeof Reflect=="object"?Reflect:null,Hk=Qi&&typeof Qi.apply=="function"?Qi.apply:function(n,e,r){return Function.prototype.apply.call(n,e,r)};Xk=Qi&&typeof Qi.ownKeys=="function"?Qi.ownKeys:Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:function(n){return Object.getOwnPropertyNames(n)};zk=Number.isNaN||function(n){return n!=n};Zk=Re,Re.EventEmitter=Re,Re.prototype._events=void 0,Re.prototype._eventsCount=0,Re.prototype._maxListeners=void 0;Gk=10;Object.defineProperty(Re,"defaultMaxListeners",{enumerable:!0,get:function(){return Gk},set:function(n){if(typeof n!="number"||n<0||zk(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");Gk=n}}),Re.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Re.prototype.setMaxListeners=function(n){if(typeof n!="number"||n<0||zk(n))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+n+".");return this._maxListeners=n,this},Re.prototype.getMaxListeners=function(){return eT(this)},Re.prototype.emit=function(n){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var t=n==="error",i=this._events;if(i!==void 0)t=t&&i.error===void 0;else if(!t)return!1;if(t){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var l=i[n];if(l===void 0)return!1;if(typeof l=="function")Hk(l,this,e);else{var u=l.length,a=tT(l,u);for(r=0;r<u;++r)Hk(a[r],this,e)}return!0},Re.prototype.addListener=function(n,e){return Kk(this,n,e,!1)},Re.prototype.on=Re.prototype.addListener,Re.prototype.prependListener=function(n,e){return Kk(this,n,e,!0)},Re.prototype.once=function(n,e){return Hl(e),this.on(n,Yk(this,n,e)),this},Re.prototype.prependOnceListener=function(n,e){return Hl(e),this.prependListener(n,Yk(this,n,e)),this},Re.prototype.removeListener=function(n,e){var r,t,i,s,o;if(Hl(e),(t=this._events)===void 0)return this;if((r=t[n])===void 0)return this;if(r===e||r.listener===e)--this._eventsCount==0?this._events=Object.create(null):(delete t[n],t.removeListener&&this.emit("removeListener",n,r.listener||e));else if(typeof r!="function"){for(i=-1,s=r.length-1;s>=0;s--)if(r[s]===e||r[s].listener===e){o=r[s].listener,i=s;break}if(i<0)return this;i===0?r.shift():function(l,u){for(;u+1<l.length;u++)l[u]=l[u+1];l.pop()}(r,i),r.length===1&&(t[n]=r[0]),t.removeListener!==void 0&&this.emit("removeListener",n,o||e)}return this},Re.prototype.off=Re.prototype.removeListener,Re.prototype.removeAllListeners=function(n){var e,r,t;if((r=this._events)===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[n]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete r[n]),this;if(arguments.length===0){var i,s=Object.keys(r);for(t=0;t<s.length;++t)(i=s[t])!=="removeListener"&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(e=r[n])=="function")this.removeListener(n,e);else if(e!==void 0)for(t=e.length-1;t>=0;t--)this.removeListener(n,e[t]);return this},Re.prototype.listeners=function(n){return Qk(this,n,!0)},Re.prototype.rawListeners=function(n){return Qk(this,n,!1)},Re.listenerCount=function(n,e){return typeof n.listenerCount=="function"?n.listenerCount(e):Jk.call(n,e)},Re.prototype.listenerCount=Jk,Re.prototype.eventNames=function(){return this._eventsCount>0?Xk(this._events):[]};Vt=Zk;Vt.EventEmitter;Vt.defaultMaxListeners;Vt.init;Vt.listenerCount;Vt.EventEmitter;Vt.defaultMaxListeners;Vt.init;Vt.listenerCount});var Zn={};Gs(Zn,{EventEmitter:()=>oP,default:()=>Vt,defaultMaxListeners:()=>aP,init:()=>lP,listenerCount:()=>uP,on:()=>cP,once:()=>pP});var oP,aP,lP,uP,cP,pP,Xn=cr(()=>{_f();_f();Vt.once=function(n,e){return new Promise((r,t)=>{function i(...o){s!==void 0&&n.removeListener("error",s),r(o)}let s;e!=="error"&&(s=o=>{n.removeListener(name,i),t(o)},n.once("error",s)),n.once(e,i)})};Vt.on=function(n,e){let r=[],t=[],i=null,s=!1,o={next(){return B(this,null,function*(){let c=r.shift();if(c)return createIterResult(c,!1);if(i){let p=Promise.reject(i);return i=null,p}return s?createIterResult(void 0,!0):new Promise((p,d)=>t.push({resolve:p,reject:d}))})},return(){return B(this,null,function*(){n.removeListener(e,l),n.removeListener("error",u),s=!0;for(let c of t)c.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)})},throw(c){i=c,n.removeListener(e,l),n.removeListener("error",u)},[Symbol.asyncIterator](){return this}};return n.on(e,l),n.on("error",u),o;function l(...c){let p=t.shift();p?p.resolve(createIterResult(c,!1)):r.push(c)}function u(c){s=!0;let p=t.shift();p?p.reject(c):i=c,o.return()}};({EventEmitter:oP,defaultMaxListeners:aP,init:lP,listenerCount:uP,on:cP,once:pP}=Vt)});var zl=S((go,wf)=>{(function(n,e){if(typeof go=="object"&&typeof wf=="object")wf.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var r=e();for(var t in r)(typeof go=="object"?go:n)[t]=r[t]}})(go,()=>(()=>{"use strict";var n={470:i=>{function s(u){if(typeof u!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(u))}function o(u,a){for(var c,p="",d=0,h=-1,g=0,f=0;f<=u.length;++f){if(f<u.length)c=u.charCodeAt(f);else{if(c===47)break;c=47}if(c===47){if(!(h===f-1||g===1))if(h!==f-1&&g===2){if(p.length<2||d!==2||p.charCodeAt(p.length-1)!==46||p.charCodeAt(p.length-2)!==46){if(p.length>2){var m=p.lastIndexOf("/");if(m!==p.length-1){m===-1?(p="",d=0):d=(p=p.slice(0,m)).length-1-p.lastIndexOf("/"),h=f,g=0;continue}}else if(p.length===2||p.length===1){p="",d=0,h=f,g=0;continue}}a&&(p.length>0?p+="/..":p="..",d=2)}else p.length>0?p+="/"+u.slice(h+1,f):p=u.slice(h+1,f),d=f-h-1;h=f,g=0}else c===46&&g!==-1?++g:g=-1}return p}var l={resolve:function(){for(var u,a="",c=!1,p=arguments.length-1;p>=-1&&!c;p--){var d;p>=0?d=arguments[p]:(u===void 0&&(u=process.cwd()),d=u),s(d),d.length!==0&&(a=d+"/"+a,c=d.charCodeAt(0)===47)}return a=o(a,!c),c?a.length>0?"/"+a:"/":a.length>0?a:"."},normalize:function(u){if(s(u),u.length===0)return".";var a=u.charCodeAt(0)===47,c=u.charCodeAt(u.length-1)===47;return(u=o(u,!a)).length!==0||a||(u="."),u.length>0&&c&&(u+="/"),a?"/"+u:u},isAbsolute:function(u){return s(u),u.length>0&&u.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var u,a=0;a<arguments.length;++a){var c=arguments[a];s(c),c.length>0&&(u===void 0?u=c:u+="/"+c)}return u===void 0?".":l.normalize(u)},relative:function(u,a){if(s(u),s(a),u===a||(u=l.resolve(u))===(a=l.resolve(a)))return"";for(var c=1;c<u.length&&u.charCodeAt(c)===47;++c);for(var p=u.length,d=p-c,h=1;h<a.length&&a.charCodeAt(h)===47;++h);for(var g=a.length-h,f=d<g?d:g,m=-1,b=0;b<=f;++b){if(b===f){if(g>f){if(a.charCodeAt(h+b)===47)return a.slice(h+b+1);if(b===0)return a.slice(h+b)}else d>f&&(u.charCodeAt(c+b)===47?m=b:b===0&&(m=0));break}var v=u.charCodeAt(c+b);if(v!==a.charCodeAt(h+b))break;v===47&&(m=b)}var _="";for(b=c+m+1;b<=p;++b)b!==p&&u.charCodeAt(b)!==47||(_.length===0?_+="..":_+="/..");return _.length>0?_+a.slice(h+m):(h+=m,a.charCodeAt(h)===47&&++h,a.slice(h))},_makeLong:function(u){return u},dirname:function(u){if(s(u),u.length===0)return".";for(var a=u.charCodeAt(0),c=a===47,p=-1,d=!0,h=u.length-1;h>=1;--h)if((a=u.charCodeAt(h))===47){if(!d){p=h;break}}else d=!1;return p===-1?c?"/":".":c&&p===1?"//":u.slice(0,p)},basename:function(u,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');s(u);var c,p=0,d=-1,h=!0;if(a!==void 0&&a.length>0&&a.length<=u.length){if(a.length===u.length&&a===u)return"";var g=a.length-1,f=-1;for(c=u.length-1;c>=0;--c){var m=u.charCodeAt(c);if(m===47){if(!h){p=c+1;break}}else f===-1&&(h=!1,f=c+1),g>=0&&(m===a.charCodeAt(g)?--g==-1&&(d=c):(g=-1,d=f))}return p===d?d=f:d===-1&&(d=u.length),u.slice(p,d)}for(c=u.length-1;c>=0;--c)if(u.charCodeAt(c)===47){if(!h){p=c+1;break}}else d===-1&&(h=!1,d=c+1);return d===-1?"":u.slice(p,d)},extname:function(u){s(u);for(var a=-1,c=0,p=-1,d=!0,h=0,g=u.length-1;g>=0;--g){var f=u.charCodeAt(g);if(f!==47)p===-1&&(d=!1,p=g+1),f===46?a===-1?a=g:h!==1&&(h=1):a!==-1&&(h=-1);else if(!d){c=g+1;break}}return a===-1||p===-1||h===0||h===1&&a===p-1&&a===c+1?"":u.slice(a,p)},format:function(u){if(u===null||typeof u!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof u);return function(a,c){var p=c.dir||c.root,d=c.base||(c.name||"")+(c.ext||"");return p?p===c.root?p+d:p+"/"+d:d}(0,u)},parse:function(u){s(u);var a={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return a;var c,p=u.charCodeAt(0),d=p===47;d?(a.root="/",c=1):c=0;for(var h=-1,g=0,f=-1,m=!0,b=u.length-1,v=0;b>=c;--b)if((p=u.charCodeAt(b))!==47)f===-1&&(m=!1,f=b+1),p===46?h===-1?h=b:v!==1&&(v=1):h!==-1&&(v=-1);else if(!m){g=b+1;break}return h===-1||f===-1||v===0||v===1&&h===f-1&&h===g+1?f!==-1&&(a.base=a.name=g===0&&d?u.slice(1,f):u.slice(g,f)):(g===0&&d?(a.name=u.slice(1,h),a.base=u.slice(1,f)):(a.name=u.slice(g,h),a.base=u.slice(g,f)),a.ext=u.slice(h,f)),g>0?a.dir=u.slice(0,g-1):d&&(a.dir="/"),a},sep:"/",delimiter:":",win32:null,posix:null};l.posix=l,i.exports=l},674:(i,s)=>{if(Object.defineProperty(s,"__esModule",{value:!0}),s.isWindows=void 0,typeof process=="object")s.isWindows=process.platform==="win32";else if(typeof navigator=="object"){let o=navigator.userAgent;s.isWindows=o.indexOf("Windows")>=0}},796:(i,s,o)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.uriToFsPath=s.URI=void 0;let l=o(674),u=/^\w[\w\d+.-]*$/,a=/^\//,c=/^\/\//;function p(A,I){if(!A.scheme&&I)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${A.authority}", path: "${A.path}", query: "${A.query}", fragment: "${A.fragment}"}`);if(A.scheme&&!u.test(A.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(A.path){if(A.authority){if(!a.test(A.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(c.test(A.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let d="",h="/",g=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{constructor(I,C,O,j,Q,J=!1){pr(this,"scheme");pr(this,"authority");pr(this,"path");pr(this,"query");pr(this,"fragment");typeof I=="object"?(this.scheme=I.scheme||d,this.authority=I.authority||d,this.path=I.path||d,this.query=I.query||d,this.fragment=I.fragment||d):(this.scheme=function(Oe,ce){return Oe||ce?Oe:"file"}(I,J),this.authority=C||d,this.path=function(Oe,ce){switch(Oe){case"https":case"http":case"file":ce?ce[0]!==h&&(ce=h+ce):ce=h}return ce}(this.scheme,O||d),this.query=j||d,this.fragment=Q||d,p(this,J))}static isUri(I){return I instanceof f||!!I&&typeof I.authority=="string"&&typeof I.fragment=="string"&&typeof I.path=="string"&&typeof I.query=="string"&&typeof I.scheme=="string"&&typeof I.fsPath=="string"&&typeof I.with=="function"&&typeof I.toString=="function"}get fsPath(){return k(this,!1)}with(I){if(!I)return this;let{scheme:C,authority:O,path:j,query:Q,fragment:J}=I;return C===void 0?C=this.scheme:C===null&&(C=d),O===void 0?O=this.authority:O===null&&(O=d),j===void 0?j=this.path:j===null&&(j=d),Q===void 0?Q=this.query:Q===null&&(Q=d),J===void 0?J=this.fragment:J===null&&(J=d),C===this.scheme&&O===this.authority&&j===this.path&&Q===this.query&&J===this.fragment?this:new b(C,O,j,Q,J)}static parse(I,C=!1){let O=g.exec(I);return O?new b(O[2]||d,P(O[4]||d),P(O[5]||d),P(O[7]||d),P(O[9]||d),C):new b(d,d,d,d,d)}static file(I){let C=d;if(l.isWindows&&(I=I.replace(/\\/g,h)),I[0]===h&&I[1]===h){let O=I.indexOf(h,2);O===-1?(C=I.substring(2),I=h):(C=I.substring(2,O),I=I.substring(O)||h)}return new b("file",C,I,d,d)}static from(I){let C=new b(I.scheme,I.authority,I.path,I.query,I.fragment);return p(C,!0),C}toString(I=!1){return y(this,I)}toJSON(){return this}static revive(I){if(I){if(I instanceof f)return I;{let C=new b(I);return C._formatted=I.external,C._fsPath=I._sep===m?I.fsPath:null,C}}return I}}s.URI=f;let m=l.isWindows?1:void 0;class b extends f{constructor(){super(...arguments);pr(this,"_formatted",null);pr(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=k(this,!1)),this._fsPath}toString(C=!1){return C?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){let C={$mid:1};return this._fsPath&&(C.fsPath=this._fsPath,C._sep=m),this._formatted&&(C.external=this._formatted),this.path&&(C.path=this.path),this.scheme&&(C.scheme=this.scheme),this.authority&&(C.authority=this.authority),this.query&&(C.query=this.query),this.fragment&&(C.fragment=this.fragment),C}}let v={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function _(A,I,C){let O,j=-1;for(let Q=0;Q<A.length;Q++){let J=A.charCodeAt(Q);if(J>=97&&J<=122||J>=65&&J<=90||J>=48&&J<=57||J===45||J===46||J===95||J===126||I&&J===47||C&&J===91||C&&J===93||C&&J===58)j!==-1&&(O+=encodeURIComponent(A.substring(j,Q)),j=-1),O!==void 0&&(O+=A.charAt(Q));else{O===void 0&&(O=A.substr(0,Q));let Oe=v[J];Oe!==void 0?(j!==-1&&(O+=encodeURIComponent(A.substring(j,Q)),j=-1),O+=Oe):j===-1&&(j=Q)}}return j!==-1&&(O+=encodeURIComponent(A.substring(j))),O!==void 0?O:A}function w(A){let I;for(let C=0;C<A.length;C++){let O=A.charCodeAt(C);O===35||O===63?(I===void 0&&(I=A.substr(0,C)),I+=v[O]):I!==void 0&&(I+=A[C])}return I!==void 0?I:A}function k(A,I){let C;return C=A.authority&&A.path.length>1&&A.scheme==="file"?`//${A.authority}${A.path}`:A.path.charCodeAt(0)===47&&(A.path.charCodeAt(1)>=65&&A.path.charCodeAt(1)<=90||A.path.charCodeAt(1)>=97&&A.path.charCodeAt(1)<=122)&&A.path.charCodeAt(2)===58?I?A.path.substr(1):A.path[1].toLowerCase()+A.path.substr(2):A.path,l.isWindows&&(C=C.replace(/\//g,"\\")),C}function y(A,I){let C=I?w:_,O="",{scheme:j,authority:Q,path:J,query:Oe,fragment:ce}=A;if(j&&(O+=j,O+=":"),(Q||j==="file")&&(O+=h,O+=h),Q){let oe=Q.indexOf("@");if(oe!==-1){let Pe=Q.substr(0,oe);Q=Q.substr(oe+1),oe=Pe.lastIndexOf(":"),oe===-1?O+=C(Pe,!1,!1):(O+=C(Pe.substr(0,oe),!1,!1),O+=":",O+=C(Pe.substr(oe+1),!1,!0)),O+="@"}Q=Q.toLowerCase(),oe=Q.lastIndexOf(":"),oe===-1?O+=C(Q,!1,!0):(O+=C(Q.substr(0,oe),!1,!0),O+=Q.substr(oe))}if(J){if(J.length>=3&&J.charCodeAt(0)===47&&J.charCodeAt(2)===58){let oe=J.charCodeAt(1);oe>=65&&oe<=90&&(J=`/${String.fromCharCode(oe+32)}:${J.substr(3)}`)}else if(J.length>=2&&J.charCodeAt(1)===58){let oe=J.charCodeAt(0);oe>=65&&oe<=90&&(J=`${String.fromCharCode(oe+32)}:${J.substr(2)}`)}O+=C(J,!0,!1)}return Oe&&(O+="?",O+=C(Oe,!1,!1)),ce&&(O+="#",O+=I?ce:_(ce,!1,!1)),O}function x(A){try{return decodeURIComponent(A)}catch(I){return A.length>3?A.substr(0,3)+x(A.substr(3)):A}}s.uriToFsPath=k;let T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function P(A){return A.match(T)?A.replace(T,I=>x(I)):A}},679:function(i,s,o){var l=this&&this.__createBinding||(Object.create?function(g,f,m,b){b===void 0&&(b=m);var v=Object.getOwnPropertyDescriptor(f,m);v&&!("get"in v?!f.__esModule:v.writable||v.configurable)||(v={enumerable:!0,get:function(){return f[m]}}),Object.defineProperty(g,b,v)}:function(g,f,m,b){b===void 0&&(b=m),g[b]=f[m]}),u=this&&this.__setModuleDefault||(Object.create?function(g,f){Object.defineProperty(g,"default",{enumerable:!0,value:f})}:function(g,f){g.default=f}),a=this&&this.__importStar||function(g){if(g&&g.__esModule)return g;var f={};if(g!=null)for(var m in g)m!=="default"&&Object.prototype.hasOwnProperty.call(g,m)&&l(f,g,m);return u(f,g),f};Object.defineProperty(s,"__esModule",{value:!0}),s.Utils=void 0;let c=a(o(470)),p=c.posix||c,d="/";var h;(function(g){g.joinPath=function(f,...m){return f.with({path:p.join(f.path,...m)})},g.resolvePath=function(f,...m){let b=f.path,v=!1;b[0]!==d&&(b=d+b,v=!0);let _=p.resolve(b,...m);return v&&_[0]===d&&!f.authority&&(_=_.substring(1)),f.with({path:_})},g.dirname=function(f){if(f.path.length===0||f.path===d)return f;let m=p.dirname(f.path);return m.length===1&&m.charCodeAt(0)===46&&(m=""),f.with({path:m})},g.basename=function(f){return p.basename(f.path)},g.extname=function(f){return p.extname(f.path)}})(h||(s.Utils=h={}))}},e={};function r(i){var s=e[i];if(s!==void 0)return s.exports;var o=e[i]={exports:{}};return n[i].call(o.exports,o,o.exports,r),o.exports}var t={};return(()=>{var i=t;Object.defineProperty(i,"__esModule",{value:!0}),i.Utils=i.URI=void 0;let s=r(796);Object.defineProperty(i,"URI",{enumerable:!0,get:function(){return s.URI}});let o=r(679);Object.defineProperty(i,"Utils",{enumerable:!0,get:function(){return o.Utils}})})(),t})())});var Yl=S((rB,sT)=>{var yo=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,dP=typeof AbortController=="function",Gl=dP?AbortController:class{constructor(){this.signal=new nT}abort(e=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||e,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},hP=typeof AbortSignal=="function",fP=typeof Gl.AbortSignal=="function",nT=hP?AbortSignal:fP?Gl.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,this.onabort(e),this._listeners.forEach(r=>r(e),this))}onabort(){}addEventListener(e,r){e==="abort"&&this._listeners.push(r)}removeEventListener(e,r){e==="abort"&&(this._listeners=this._listeners.filter(t=>t!==r))}},Sf=new Set,xf=(n,e)=>{let r=`LRU_CACHE_OPTION_${n}`;Kl(r)&&If(r,`${n} option`,`options.${e}`,Zi)},kf=(n,e)=>{let r=`LRU_CACHE_METHOD_${n}`;if(Kl(r)){let{prototype:t}=Zi,{get:i}=Object.getOwnPropertyDescriptor(t,n);If(r,`${n} method`,`cache.${e}()`,i)}},mP=(n,e)=>{let r=`LRU_CACHE_PROPERTY_${n}`;if(Kl(r)){let{prototype:t}=Zi,{get:i}=Object.getOwnPropertyDescriptor(t,n);If(r,`${n} property`,`cache.${e}`,i)}},rT=(...n)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...n):console.error(...n)},Kl=n=>!Sf.has(n),If=(n,e,r,t)=>{Sf.add(n);let i=`The ${e} is deprecated. Please use ${r} instead.`;rT(i,"DeprecationWarning",n,t)},Tr=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),iT=n=>Tr(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Ji:null:null,Ji=class extends Array{constructor(e){super(e),this.fill(0)}},Tf=class{constructor(e){if(e===0)return[];let r=iT(e);this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Zi=class n{constructor(e={}){let{max:r=0,ttl:t,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:l,allowStale:u,dispose:a,disposeAfter:c,noDisposeOnSet:p,noUpdateTTL:d,maxSize:h=0,maxEntrySize:g=0,sizeCalculation:f,fetchMethod:m,fetchContext:b,noDeleteOnFetchRejection:v,noDeleteOnStaleGet:_,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:k,ignoreFetchAbort:y}=e,{length:x,maxAge:T,stale:P}=e instanceof n?{}:e;if(r!==0&&!Tr(r))throw new TypeError("max option must be a nonnegative integer");let A=r?iT(r):Array;if(!A)throw new Error("invalid max value: "+r);if(this.max=r,this.maxSize=h,this.maxEntrySize=g||this.maxSize,this.sizeCalculation=f||x,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=m||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=b,!this.fetchMethod&&b!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(r).fill(null),this.valList=new Array(r).fill(null),this.next=new A(r),this.prev=new A(r),this.head=0,this.tail=0,this.free=new Tf(r),this.initialFill=1,this.size=0,typeof a=="function"&&(this.dispose=a),typeof c=="function"?(this.disposeAfter=c,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!p,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!v,this.allowStaleOnFetchRejection=!!w,this.allowStaleOnFetchAbort=!!k,this.ignoreFetchAbort=!!y,this.maxEntrySize!==0){if(this.maxSize!==0&&!Tr(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!Tr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!u||!!P,this.noDeleteOnStaleGet=!!_,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!l,this.ttlResolution=Tr(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=t||T||0,this.ttl){if(!Tr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let I="LRU_CACHE_UNBOUNDED";Kl(I)&&(Sf.add(I),rT("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",I,n))}P&&xf("stale","allowStale"),T&&xf("maxAge","ttl"),x&&xf("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Ji(this.max),this.starts=new Ji(this.max),this.setItemTTL=(t,i,s=yo.now())=>{if(this.starts[t]=i!==0?s:0,this.ttls[t]=i,i!==0&&this.ttlAutopurge){let o=setTimeout(()=>{this.isStale(t)&&this.delete(this.keyList[t])},i+1);o.unref&&o.unref()}},this.updateItemAge=t=>{this.starts[t]=this.ttls[t]!==0?yo.now():0},this.statusTTL=(t,i)=>{t&&(t.ttl=this.ttls[i],t.start=this.starts[i],t.now=e||r(),t.remainingTTL=t.now+t.ttl-t.start)};let e=0,r=()=>{let t=yo.now();if(this.ttlResolution>0){e=t;let i=setTimeout(()=>e=0,this.ttlResolution);i.unref&&i.unref()}return t};this.getRemainingTTL=t=>{let i=this.keyMap.get(t);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(e||r())},this.isStale=t=>this.ttls[t]!==0&&this.starts[t]!==0&&(e||r())-this.starts[t]>this.ttls[t]}updateItemAge(e){}statusTTL(e,r){}setItemTTL(e,r,t){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Ji(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,r,t,i)=>{if(this.isBackgroundFetch(r))return 0;if(!Tr(t))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(t=i(r,e),!Tr(t))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return t},this.addItemSize=(e,r,t)=>{if(this.sizes[e]=r,this.maxSize){let i=this.maxSize-this.sizes[e];for(;this.calculatedSize>i;)this.evict(!0)}this.calculatedSize+=this.sizes[e],t&&(t.entrySize=r,t.totalCalculatedSize=this.calculatedSize)}}removeItemSize(e){}addItemSize(e,r){}requireSize(e,r,t,i){if(t||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.tail;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.head));)r=this.prev[r]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.head;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.tail));)r=this.next[r]}isValidIndex(e){return e!==void 0&&this.keyMap.get(this.keyList[e])===e}*entries(){for(let e of this.indexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*rentries(){for(let e of this.rindexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*keys(){for(let e of this.indexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*rkeys(){for(let e of this.rindexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*values(){for(let e of this.indexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}*rvalues(){for(let e of this.rindexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}[Symbol.iterator](){return this.entries()}find(e,r){for(let t of this.indexes()){let i=this.valList[t],s=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(s!==void 0&&e(s,this.keyList[t],this))return this.get(this.keyList[t],r)}}forEach(e,r=this){for(let t of this.indexes()){let i=this.valList[t],s=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(r,s,this.keyList[t],this)}}rforEach(e,r=this){for(let t of this.rindexes()){let i=this.valList[t],s=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(r,s,this.keyList[t],this)}}get prune(){return kf("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(let r of this.rindexes({allowStale:!0}))this.isStale(r)&&(this.delete(this.keyList[r]),e=!0);return e}dump(){let e=[];for(let r of this.indexes({allowStale:!0})){let t=this.keyList[r],i=this.valList[r],s=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(s===void 0)continue;let o={value:s};if(this.ttls){o.ttl=this.ttls[r];let l=yo.now()-this.starts[r];o.start=Math.floor(Date.now()-l)}this.sizes&&(o.size=this.sizes[r]),e.unshift([t,o])}return e}load(e){this.clear();for(let[r,t]of e){if(t.start){let i=Date.now()-t.start;t.start=yo.now()-i}this.set(r,t.value,t)}}dispose(e,r,t){}set(e,r,{ttl:t=this.ttl,start:i,noDisposeOnSet:s=this.noDisposeOnSet,size:o=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,status:a}={}){if(o=this.requireSize(e,r,o,l),this.maxEntrySize&&o>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.delete(e),this;let c=this.size===0?void 0:this.keyMap.get(e);if(c===void 0)c=this.newIndex(),this.keyList[c]=e,this.valList[c]=r,this.keyMap.set(e,c),this.next[this.tail]=c,this.prev[c]=this.tail,this.tail=c,this.size++,this.addItemSize(c,o,a),a&&(a.set="add"),u=!1;else{this.moveToTail(c);let p=this.valList[c];if(r!==p){if(this.isBackgroundFetch(p)?p.__abortController.abort(new Error("replaced")):s||(this.dispose(p,e,"set"),this.disposeAfter&&this.disposed.push([p,e,"set"])),this.removeItemSize(c),this.valList[c]=r,this.addItemSize(c,o,a),a){a.set="replace";let d=p&&this.isBackgroundFetch(p)?p.__staleWhileFetching:p;d!==void 0&&(a.oldValue=d)}}else a&&(a.set="update")}if(t!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),u||this.setItemTTL(c,t,i),this.statusTTL(a,c),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let e=this.valList[this.head];return this.evict(!0),e}}evict(e){let r=this.head,t=this.keyList[r],i=this.valList[r];return this.isBackgroundFetch(i)?i.__abortController.abort(new Error("evicted")):(this.dispose(i,t,"evict"),this.disposeAfter&&this.disposed.push([i,t,"evict"])),this.removeItemSize(r),e&&(this.keyList[r]=null,this.valList[r]=null,this.free.push(r)),this.head=this.next[r],this.keyMap.delete(t),this.size--,r}has(e,{updateAgeOnHas:r=this.updateAgeOnHas,status:t}={}){let i=this.keyMap.get(e);if(i!==void 0)if(this.isStale(i))t&&(t.has="stale",this.statusTTL(t,i));else return r&&this.updateItemAge(i),t&&(t.has="hit"),this.statusTTL(t,i),!0;else t&&(t.has="miss");return!1}peek(e,{allowStale:r=this.allowStale}={}){let t=this.keyMap.get(e);if(t!==void 0&&(r||!this.isStale(t))){let i=this.valList[t];return this.isBackgroundFetch(i)?i.__staleWhileFetching:i}}backgroundFetch(e,r,t,i){let s=r===void 0?void 0:this.valList[r];if(this.isBackgroundFetch(s))return s;let o=new Gl;t.signal&&t.signal.addEventListener("abort",()=>o.abort(t.signal.reason));let l={signal:o.signal,options:t,context:i},u=(h,g=!1)=>{let{aborted:f}=o.signal,m=t.ignoreFetchAbort&&h!==void 0;return t.status&&(f&&!g?(t.status.fetchAborted=!0,t.status.fetchError=o.signal.reason,m&&(t.status.fetchAbortIgnored=!0)):t.status.fetchResolved=!0),f&&!m&&!g?c(o.signal.reason):(this.valList[r]===d&&(h===void 0?d.__staleWhileFetching?this.valList[r]=d.__staleWhileFetching:this.delete(e):(t.status&&(t.status.fetchUpdated=!0),this.set(e,h,l.options))),h)},a=h=>(t.status&&(t.status.fetchRejected=!0,t.status.fetchError=h),c(h)),c=h=>{let{aborted:g}=o.signal,f=g&&t.allowStaleOnFetchAbort,m=f||t.allowStaleOnFetchRejection,b=m||t.noDeleteOnFetchRejection;if(this.valList[r]===d&&(!b||d.__staleWhileFetching===void 0?this.delete(e):f||(this.valList[r]=d.__staleWhileFetching)),m)return t.status&&d.__staleWhileFetching!==void 0&&(t.status.returnedStale=!0),d.__staleWhileFetching;if(d.__returned===d)throw h},p=(h,g)=>{this.fetchMethod(e,s,l).then(f=>h(f),g),o.signal.addEventListener("abort",()=>{(!t.ignoreFetchAbort||t.allowStaleOnFetchAbort)&&(h(),t.allowStaleOnFetchAbort&&(h=f=>u(f,!0)))})};t.status&&(t.status.fetchDispatched=!0);let d=new Promise(p).then(u,a);return d.__abortController=o,d.__staleWhileFetching=s,d.__returned=null,r===void 0?(this.set(e,d,on(tt({},l.options),{status:void 0})),r=this.keyMap.get(e)):this.valList[r]=d,d}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||e.__returned===null)}fetch(v){return B(this,arguments,function*(e,{allowStale:r=this.allowStale,updateAgeOnGet:t=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:h=this.allowStaleOnFetchAbort,fetchContext:g=this.fetchContext,forceRefresh:f=!1,status:m,signal:b}={}){if(!this.fetchMethod)return m&&(m.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:t,noDeleteOnStaleGet:i,status:m});let _={allowStale:r,updateAgeOnGet:t,noDeleteOnStaleGet:i,ttl:s,noDisposeOnSet:o,size:l,sizeCalculation:u,noUpdateTTL:a,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:h,ignoreFetchAbort:d,status:m,signal:b},w=this.keyMap.get(e);if(w===void 0){m&&(m.fetch="miss");let k=this.backgroundFetch(e,w,_,g);return k.__returned=k}else{let k=this.valList[w];if(this.isBackgroundFetch(k)){let A=r&&k.__staleWhileFetching!==void 0;return m&&(m.fetch="inflight",A&&(m.returnedStale=!0)),A?k.__staleWhileFetching:k.__returned=k}let y=this.isStale(w);if(!f&&!y)return m&&(m.fetch="hit"),this.moveToTail(w),t&&this.updateItemAge(w),this.statusTTL(m,w),k;let x=this.backgroundFetch(e,w,_,g),T=x.__staleWhileFetching!==void 0,P=T&&r;return m&&(m.fetch=T&&y?"stale":"refresh",P&&y&&(m.returnedStale=!0)),P?x.__staleWhileFetching:x.__returned=x}})}get(e,{allowStale:r=this.allowStale,updateAgeOnGet:t=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:s}={}){let o=this.keyMap.get(e);if(o!==void 0){let l=this.valList[o],u=this.isBackgroundFetch(l);return this.statusTTL(s,o),this.isStale(o)?(s&&(s.get="stale"),u?(s&&(s.returnedStale=r&&l.__staleWhileFetching!==void 0),r?l.__staleWhileFetching:void 0):(i||this.delete(e),s&&(s.returnedStale=r),r?l:void 0)):(s&&(s.get="hit"),u?l.__staleWhileFetching:(this.moveToTail(o),t&&this.updateItemAge(o),l))}else s&&(s.get="miss")}connect(e,r){this.prev[r]=e,this.next[e]=r}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return kf("del","delete"),this.delete}delete(e){let r=!1;if(this.size!==0){let t=this.keyMap.get(e);if(t!==void 0)if(r=!0,this.size===1)this.clear();else{this.removeItemSize(t);let i=this.valList[t];this.isBackgroundFetch(i)?i.__abortController.abort(new Error("deleted")):(this.dispose(i,e,"delete"),this.disposeAfter&&this.disposed.push([i,e,"delete"])),this.keyMap.delete(e),this.keyList[t]=null,this.valList[t]=null,t===this.tail?this.tail=this.prev[t]:t===this.head?this.head=this.next[t]:(this.next[this.prev[t]]=this.next[t],this.prev[this.next[t]]=this.prev[t]),this.size--,this.free.push(t)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return r}clear(){for(let e of this.rindexes({allowStale:!0})){let r=this.valList[e];if(this.isBackgroundFetch(r))r.__abortController.abort(new Error("deleted"));else{let t=this.keyList[e];this.dispose(r,t,"delete"),this.disposeAfter&&this.disposed.push([r,t,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return kf("reset","clear"),this.clear}get length(){return mP("length","size"),this.size}static get AbortController(){return Gl}static get AbortSignal(){return nT}};sT.exports=Zi});var Xi=S(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.IndentationType=er.ConfigurationNamespace=er.LanguageId=void 0;er.LanguageId="greyscript";er.ConfigurationNamespace="greybel";var gP;(function(n){n.Tab="Tab",n.Whitespace="Whitespace"})(gP=er.IndentationType||(er.IndentationType={}))});var es=S(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});Ql.Position=void 0;var Ef=class{constructor(e,r){this.line=e,this.character=r}toString(){return`${this.line}:${this.character}`}};Ql.Position=Ef});var Sr=S(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.LiteralToken=Zt.Token=Zt.BaseToken=Zt.BaseTokenOptions=Zt.TokenType=void 0;var oT=es(),yP;(function(n){n.EOF="EOF",n.StringLiteral="StringLiteral",n.Keyword="Keyword",n.Identifier="Identifier",n.NumericLiteral="NumericLiteral",n.Punctuator="Punctuator",n.BooleanLiteral="BooleanLiteral",n.NilLiteral="NilLiteral",n.EOL="EOL",n.SliceOperator="SliceOperator",n.Comment="Comment",n.Invalid="Invalid"})(yP=Zt.TokenType||(Zt.TokenType={}));var Rf=class{};Zt.BaseTokenOptions=Rf;var bo=class{constructor(e){this.type=e.type,this.value=e.value,this.line=e.line,this.lineStart=e.lineStart,this.range=e.range,this.lastLine=e.lastLine,this.lastLineStart=e.lastLineStart,this.afterSpace=e.afterSpace;let r=e.offsetRange,t=e.range;this.start=new oT.Position(this.line,t[0]-r[0]+1),this.end=new oT.Position(this.lastLine||this.line,t[1]-r[1]+1)}toString(){let e=this.line,r=this.lastLine!==void 0?this.lastLine:this.line,t=this.start.character,i=this.end.character,s=`${e}:${t} - ${r}:${i}`;return`${this.type}[${s}: value = '${this.value}']`}};Zt.BaseToken=bo;var Pf=class extends bo{};Zt.Token=Pf;var Cf=class extends bo{constructor(e){super(e),this.raw=e.raw}toString(){let e=this.line,r=this.lastLine!==void 0?this.lastLine:this.line,t=this.start.character,i=this.end.character,s=`${e}:${t} - ${r}:${i}`;return`${this.type}[${s}: value = ${this.raw}]`}};Zt.LiteralToken=Cf});var Jl=S(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.CharacterCode=void 0;var bP;(function(n){n[n.WHITESPACE=32]="WHITESPACE",n[n.QUOTE=34]="QUOTE",n[n.NUMBER_0=48]="NUMBER_0",n[n.NUMBER_1=49]="NUMBER_1",n[n.NUMBER_2=50]="NUMBER_2",n[n.NUMBER_3=51]="NUMBER_3",n[n.NUMBER_4=52]="NUMBER_4",n[n.NUMBER_5=53]="NUMBER_5",n[n.NUMBER_6=54]="NUMBER_6",n[n.NUMBER_7=55]="NUMBER_7",n[n.NUMBER_8=56]="NUMBER_8",n[n.NUMBER_9=57]="NUMBER_9",n[n.TAB=9]="TAB",n[n.NEW_LINE=10]="NEW_LINE",n[n.RETURN_LINE=13]="RETURN_LINE",n[n.SLASH=47]="SLASH",n[n.DOT=46]="DOT",n[n.EQUAL=61]="EQUAL",n[n.ASTERISK=42]="ASTERISK",n[n.CARET=94]="CARET",n[n.PERCENT=37]="PERCENT",n[n.COMMA=44]="COMMA",n[n.CURLY_BRACKET_LEFT=123]="CURLY_BRACKET_LEFT",n[n.CURLY_BRACKET_RIGHT=125]="CURLY_BRACKET_RIGHT",n[n.SQUARE_BRACKETS_LEFT=91]="SQUARE_BRACKETS_LEFT",n[n.SQUARE_BRACKETS_RIGHT=93]="SQUARE_BRACKETS_RIGHT",n[n.PARENTHESIS_LEFT=40]="PARENTHESIS_LEFT",n[n.PARENTHESIS_RIGHT=41]="PARENTHESIS_RIGHT",n[n.SEMICOLON=59]="SEMICOLON",n[n.HASH=35]="HASH",n[n.MINUS=45]="MINUS",n[n.PLUS=43]="PLUS",n[n.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",n[n.AT_SIGN=64]="AT_SIGN",n[n.COLON=58]="COLON",n[n.ARROW_LEFT=60]="ARROW_LEFT",n[n.ARROW_RIGHT=62]="ARROW_RIGHT",n[n.LETTER_E=69]="LETTER_E",n[n.LETTER_e=101]="LETTER_e"})(bP=vo.CharacterCode||(vo.CharacterCode={}))});var ts=S(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.Keyword=void 0;var vP;(function(n){n.If="if",n.In="in",n.Or="or",n.And="and",n.Isa="isa",n.For="for",n.Not="not",n.New="new",n.End="end",n.EndFor="end for",n.EndWhile="end while",n.EndFunction="end function",n.EndIf="end if",n.Then="then",n.Else="else",n.Break="break",n.While="while",n.ElseIf="else if",n.Return="return",n.Function="function",n.Continue="continue",n.Repeat="repeat"})(vP=_o.Keyword||(_o.Keyword={}))});var Df=S(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});var hn=Jl(),_P=ts(),Of=class{constructor(){this.isKeyword=Set.prototype.has.bind(new Set(Object.values(_P.Keyword)))}isWhitespace(e){return hn.CharacterCode.WHITESPACE===e||hn.CharacterCode.TAB===e}isEndOfLine(e){return hn.CharacterCode.NEW_LINE===e||hn.CharacterCode.RETURN_LINE===e}isComment(e,r){return hn.CharacterCode.SLASH===e&&hn.CharacterCode.SLASH===r}isIdentifierStart(e){return(e|32)>=97&&(e|32)<=122||e>=128||e===95}isIdentifierPart(e){return(e|32)>=97&&(e|32)<=122||e>=48&&e<=57||e>=128||e===95}isDecDigit(e){return e>=hn.CharacterCode.NUMBER_0&&e<=hn.CharacterCode.NUMBER_9}isWinNewline(e,r){switch(e){case hn.CharacterCode.RETURN_LINE:return hn.CharacterCode.NEW_LINE===r;case hn.CharacterCode.NEW_LINE:return hn.CharacterCode.RETURN_LINE===r}return!1}};Af.default=Of});var Zl=S(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.ParserException=ns.LexerException=void 0;var jf=class extends Error{constructor(e,r){super(e),this.range=r}};ns.LexerException=jf;var Lf=class extends Error{constructor(e,r){super(e),this.range=r}};ns.ParserException=Lf});var Mf=S(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.Literal=void 0;var wP;(function(n){n.True="true",n.False="false",n.Null="null"})(wP=wo.Literal||(wo.Literal={}))});var rs=S(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.Operator=void 0;var xP;(function(n){n.Plus="+",n.Asterik="*",n.Minus="-",n.Slash="/",n.Power="^",n.Modulo="%",n.LessThan="<",n.GreaterThan=">",n.LessThanOrEqual="<=",n.GreaterThanOrEqual=">=",n.NotEqual="!=",n.Equal="==",n.Or="or",n.And="and",n.Not="not",n.Isa="isa",n.AddShorthand="+=",n.SubtractShorthand="-=",n.MultiplyShorthand="*=",n.DivideShorthand="/=",n.PowerShorthand="^=",n.ModuloShorthand="%=",n.Member=".",n.Assign="=",n.EndOfLine=";",n.EndOfFile="<eof>",n.SliceSeperator=":",n.Comma=",",n.Escape='"',n.SLBracket="[",n.SRBracket="]",n.CLBracket="{",n.CRBracket="}",n.LParenthesis="(",n.RParenthesis=")",n.Reference="@",n.New="new"})(xP=xo.Operator||(xo.Operator={}))});var is=S(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});Xl.Range=void 0;var qf=class{constructor(e,r){this.start=e,this.end=r}toString(){return`${this.start} - ${this.end}`}};Xl.Range=qf});var $f=S(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});var Ff=class{constructor(){this._head=null,this._tail=null,this._size=0}enqueue(e){let r={value:e};this._head?this._tail.next=r:this._head=r,this._tail=r,this._size++}dequeue(){let e=this._head.value;if(e)return this._head=this._head.next,this._size--,e}peek(){var e;return((e=this._head)===null||e===void 0?void 0:e.value)||null}clear(){this._head=null,this._tail=null,this._size=0}copyInto(e){this._head=e._head,this._tail=e._tail,this._size=e._size}get size(){return this._size}*[Symbol.iterator](){let e=this._head;for(;e;)yield e,e=e.next}};Nf.default=Ff});var Wf=S(To=>{"use strict";var lT=To&&To.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(To,"__esModule",{value:!0});var Ue=Sr(),kP=lT(Df()),de=Jl(),TP=Zl(),Uf=ts(),ko=Mf(),Be=rs(),ss=es(),Bf=is(),aT=lT($f());function Ir(n){let e=this.content[this.index];return this.index+=e.length,this.createPunctuator(e,n)}var eu=class n{constructor(e,r={}){let t=this;t.content=e,t.length=e.length,t.index=0,t.tokenStart=null,t.tabWidth=r.tabWidth||1,t.line=1,t.lineStart=0,t.offset=0,t.validator=r.validator||new kP.default,t.unsafe=r.unsafe,t.errors=[],t.backlog=new aT.default,t.snapshot=new aT.default}scan(e,r){let t=n.scanHandlers[e];return t?t.call(this,r):this.validator.isDecDigit(e)?this.scanNumericLiteral(r):(this.index++,null)}isAtWhitespace(){return this.validator.isWhitespace(this.codeAt())}codeAt(e=0){let r=this.index+e;return r<this.length?this.content.charCodeAt(r):0}createEOL(e){let r=this,t=new Ue.Token({type:Ue.TokenType.EOL,value:Be.Operator.EndOfLine,line:r.line,lineStart:r.lineStart,range:[r.tokenStart,r.index],offsetRange:[r.offset,r.offset],afterSpace:e});return r.snapshot.enqueue(t),t}createIdentifier(e,r){let t=this,i=new Ue.Token({type:Ue.TokenType.Identifier,value:e,line:t.line,lineStart:t.lineStart,range:[t.tokenStart,t.index],offsetRange:[t.offset,t.offset],afterSpace:r});return t.snapshot.enqueue(i),i}createEOF(e){let r=this,t=new Ue.Token({type:Ue.TokenType.EOF,value:Be.Operator.EndOfFile,line:r.line,lineStart:r.lineStart,range:[r.index,r.index],offsetRange:[r.offset,r.offset],afterSpace:e});return r.snapshot.enqueue(t),t}createBoolean(e,r){let t=this,i=new Ue.LiteralToken({type:Ue.TokenType.BooleanLiteral,value:e===ko.Literal.True,raw:e,line:t.line,lineStart:t.lineStart,range:[t.tokenStart,t.index],offsetRange:[t.offset,t.offset],afterSpace:r});return t.snapshot.enqueue(i),i}createNull(e){let r=this,t=new Ue.LiteralToken({type:Ue.TokenType.NilLiteral,value:null,raw:ko.Literal.Null,line:r.line,lineStart:r.lineStart,range:[r.tokenStart,r.index],offsetRange:[r.offset,r.offset],afterSpace:e});return r.snapshot.enqueue(t),t}createSlice(e){let r=new Ue.Token({type:Ue.TokenType.SliceOperator,value:Be.Operator.SliceSeperator,line:this.line,lineStart:this.lineStart,range:[this.tokenStart,this.index],offsetRange:[this.offset,this.offset],afterSpace:e});return this.snapshot.enqueue(r),r}createPunctuator(e,r){let t=new Ue.Token({type:Ue.TokenType.Punctuator,value:e,line:this.line,lineStart:this.lineStart,range:[this.tokenStart,this.index],offsetRange:[this.offset,this.offset],afterSpace:r});return this.snapshot.enqueue(t),t}createNumericLiteral(e,r,t){let i=new Ue.LiteralToken({type:Ue.TokenType.NumericLiteral,value:e,raw:r,line:this.line,lineStart:this.lineStart,range:[this.tokenStart,this.index],offsetRange:[this.offset,this.offset],afterSpace:t});return this.snapshot.enqueue(i),i}scanStringLiteral(e){let r=this,t=r.validator,i=r.line,s=r.lineStart,o=r.index,l=r.offset,u=r.offset,a=!1;for(;r.index<r.length;){r.index++;let h=r.codeAt();if(r.validator.isEndOfLine(h))t.isWinNewline(h,r.codeAt(1))&&r.index++,r.line++,u=r.index+1;else if(de.CharacterCode.QUOTE===h){if(de.CharacterCode.QUOTE!==r.codeAt(1)){a=!0;break}r.index++}}if(!a)return r.raise("Unexpected string end of file.",new Bf.Range(new ss.Position(i,o-l+1),new ss.Position(r.line,r.index-u+2)));r.index++;let c=r.content.slice(r.tokenStart,r.index),p=c.slice(1,-1).replace(/""/g,Be.Operator.Escape),d=new Ue.LiteralToken({type:Ue.TokenType.StringLiteral,value:p,raw:c,line:i,lineStart:s,range:[r.tokenStart,r.index],offsetRange:[l,u],afterSpace:e,lastLine:r.line,lastLineStart:r.lineStart});return r.offset=u,r.snapshot.enqueue(d),d}scanComment(e){let r=this,t=r.validator,i=r.line,s=r.lineStart;for(;this.index<this.length&&!t.isEndOfLine(r.codeAt());r.index++);t.isWinNewline(r.codeAt(),r.codeAt(1))&&r.index++;let o=r.content.slice(r.tokenStart+2,r.index),l=new Ue.Token({type:Ue.TokenType.Comment,value:o,line:i,lineStart:s,range:[r.tokenStart,r.index],offsetRange:[r.offset,r.offset],afterSpace:e});return r.snapshot.enqueue(l),l}scanNumericLiteral(e){let r=this.validator,t,i;for(;this.index<this.length&&(t=i,i=this.codeAt(),r.isDecDigit(i)||de.CharacterCode.DOT===i||de.CharacterCode.LETTER_E===i||de.CharacterCode.LETTER_e===i||(de.CharacterCode.MINUS===i||de.CharacterCode.PLUS===i)&&(de.CharacterCode.LETTER_E===t||de.CharacterCode.LETTER_e===t));)this.index++;let s=this.content.slice(this.tokenStart,this.index),o=Number(s);return isNaN(o)?this.raise(`Invalid numeric literal: ${s}`,new Bf.Range(new ss.Position(this.line,this.tokenStart-this.offset+1),new ss.Position(this.line,this.index-this.offset+1))):this.createNumericLiteral(o,s,e)}scanPunctuator(e,r){return this.index+=e.length,this.createPunctuator(e,r)}skipWhiteSpace(){let e=this;for(;e.index<e.length;e.index++){let r=e.content[e.index];if(r===" ")e.offset-=e.tabWidth-1;else if(r!==" ")return}}scanKeyword(e,r){let t=this,i=t.validator,s=e;switch(e){case Uf.Keyword.End:{for(t.index++;i.isIdentifierPart(t.codeAt());t.index++);s=t.content.slice(t.tokenStart,t.index);break}case Uf.Keyword.Else:{let l=t.content.slice(t.tokenStart,t.index+3);l===Uf.Keyword.ElseIf&&(t.index+=3,s=l);break}}let o=new Ue.Token({type:Ue.TokenType.Keyword,value:s,line:t.line,lineStart:t.lineStart,range:[t.tokenStart,t.index],offsetRange:[t.offset,t.offset],afterSpace:r});return t.snapshot.enqueue(o),o}scanIdentifierOrKeyword(e){let r=this,t=r.validator;for(r.index++;t.isIdentifierPart(r.codeAt());r.index++);let i=r.content.slice(r.tokenStart,r.index);if(t.isKeyword(i))return r.scanKeyword(i,e);switch(i){case ko.Literal.True:case ko.Literal.False:return r.createBoolean(i,e);case ko.Literal.Null:return r.createNull(e)}return r.createIdentifier(i,e)}next(){let e=this;if(e.backlog.size)return e.backlog.dequeue();let r=e.index;e.skipWhiteSpace();let t=r<e.index,i=e.codeAt();if(e.validator.isComment(i,e.codeAt(1)))return e.tokenStart=e.index,e.scanComment(t);if(this.index>=this.length)return e.createEOF(t);if(e.tokenStart=e.index,e.validator.isEndOfLine(i)){e.validator.isWinNewline(i,e.codeAt(1))&&e.index++;let l=e.createEOL(t);return e.line++,e.offset=e.index+1,e.lineStart=++e.index,l}if(e.validator.isIdentifierStart(i))return e.scanIdentifierOrKeyword(t);let s=e.line,o=e.scan(i,t);return o||e.raise(`Invalid character ${i} (Code: ${String.fromCharCode(i)})`,new Bf.Range(new ss.Position(s,e.tokenStart-e.offset+1),new ss.Position(e.line,e.index-e.offset+1)))}recordSnapshot(){this.snapshot.clear()}recoverFromSnapshot(){this.backlog.copyInto(this.snapshot)}raise(e,r){let t=this,i=new TP.LexerException(e,r);if(t.errors.push(i),t.unsafe)return new Ue.Token({type:Ue.TokenType.Invalid,value:"",line:t.line,lineStart:t.lineStart,range:[t.tokenStart,t.index],offsetRange:[t.offset,t.offset]});throw i}};To.default=eu;eu.scanHandlers={[de.CharacterCode.QUOTE]:function(e){return this.scanStringLiteral(e)},[de.CharacterCode.DOT]:function(e){return this.validator.isDecDigit(this.codeAt(1))?this.scanNumericLiteral(e):(this.index++,this.createPunctuator(Be.Operator.Member,e))},[de.CharacterCode.EQUAL]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.Equal,e):this.scanPunctuator(Be.Operator.Assign,e)},[de.CharacterCode.ARROW_LEFT]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.LessThanOrEqual,e):this.scanPunctuator(Be.Operator.LessThan,e)},[de.CharacterCode.ARROW_RIGHT]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.GreaterThanOrEqual,e):this.scanPunctuator(Be.Operator.GreaterThan,e)},[de.CharacterCode.EXCLAMATION_MARK]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.NotEqual,e):(this.index++,null)},[de.CharacterCode.MINUS]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.SubtractShorthand,e):this.scanPunctuator(Be.Operator.Minus,e)},[de.CharacterCode.PLUS]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.AddShorthand,e):this.scanPunctuator(Be.Operator.Plus,e)},[de.CharacterCode.ASTERISK]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.MultiplyShorthand,e):this.scanPunctuator(Be.Operator.Asterik,e)},[de.CharacterCode.SLASH]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.DivideShorthand,e):this.scanPunctuator(Be.Operator.Slash,e)},[de.CharacterCode.COLON]:function(e){return this.index++,this.createSlice(e)},[de.CharacterCode.CARET]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.PowerShorthand,e):this.scanPunctuator(Be.Operator.Power,e)},[de.CharacterCode.PERCENT]:function(e){return de.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(Be.Operator.ModuloShorthand,e):this.scanPunctuator(Be.Operator.Modulo,e)},[de.CharacterCode.SEMICOLON]:function(e){return this.index++,this.createEOL(e)},[de.CharacterCode.COMMA]:Ir,[de.CharacterCode.CURLY_BRACKET_LEFT]:Ir,[de.CharacterCode.CURLY_BRACKET_RIGHT]:Ir,[de.CharacterCode.SQUARE_BRACKETS_LEFT]:Ir,[de.CharacterCode.SQUARE_BRACKETS_RIGHT]:Ir,[de.CharacterCode.PARENTHESIS_LEFT]:Ir,[de.CharacterCode.PARENTHESIS_RIGHT]:Ir,[de.CharacterCode.AT_SIGN]:Ir}});var Ke=S(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.ASTComment=Xt.ASTBaseBlockWithScope=Xt.ASTBaseBlock=Xt.ASTBase=Xt.ASTType=void 0;var uT;(function(n){n.BreakStatement="BreakStatement",n.ContinueStatement="ContinueStatement",n.ReturnStatement="ReturnStatement",n.IfShortcutStatement="IfShortcutStatement",n.IfShortcutClause="IfShortcutClause",n.ElseifShortcutClause="ElseifShortcutClause",n.ElseShortcutClause="ElseShortcutClause",n.IfStatement="IfStatement",n.IfClause="IfClause",n.ElseifClause="ElseifClause",n.ElseClause="ElseClause",n.WhileStatement="WhileStatement",n.AssignmentStatement="AssignmentStatement",n.CallStatement="CallStatement",n.FunctionDeclaration="FunctionDeclaration",n.ForGenericStatement="ForGenericStatement",n.Chunk="Chunk",n.Identifier="Identifier",n.StringLiteral="StringLiteral",n.NumericLiteral="NumericLiteral",n.BooleanLiteral="BooleanLiteral",n.NilLiteral="NilLiteral",n.Unknown="Unknown",n.MemberExpression="MemberExpression",n.CallExpression="CallExpression",n.Comment="Comment",n.NegationExpression="NegationExpression",n.BinaryNegatedExpression="BinaryNegatedExpression",n.UnaryExpression="UnaryExpression",n.MapKeyString="MapKeyString",n.MapValue="MapValue",n.MapConstructorExpression="MapConstructorExpression",n.MapCallExpression="MapCallExpression",n.ListValue="ListValue",n.ListConstructorExpression="ListConstructorExpression",n.EmptyExpression="EmptyExpression",n.IndexExpression="IndexExpression",n.BinaryExpression="BinaryExpression",n.LogicalExpression="LogicalExpression",n.IsaExpression="IsaExpression",n.SliceExpression="SliceExpression",n.ImportCodeExpression="ImportCodeExpression",n.InvalidCodeExpression="InvalidCodeExpression",n.ParenthesisExpression="ParenthesisExpression",n.ComparisonGroupExpression="ComparisonGroupExpression"})(uT=Xt.ASTType||(Xt.ASTType={}));var So=class n{constructor(e,r){this.type=e,this.start=r.start,this.end=r.end,this.range=r.range,this.scope=r.scope||null}toString(){return`${this.type}[${this.start}-${this.end}][]`}clone(){return new n(this.type,{start:this.start,end:this.end,range:this.range,scope:this.scope})}};Xt.ASTBase=So;var tu=class n extends So{constructor(e,r){super(e,r),this.body=r.body||[]}toString(){let e=this.body.map(r=>`${r}`).join(`
36
36
  `).split(`
37
37
  `).map(r=>` ${r}`).join(`
38
38
  `);return`${this.type}[${this.start}-${this.end}][${e.length>0?`
@@ -106,7 +106,7 @@ ${e}
106
106
  */`),[r]=e;return r.tags.length>0?yD(r):null}ec.parseMapDescription=bD});var by=S(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});nc.Aggregator=void 0;var tc=qt(),ve=en(),ye=me(),vD=Ng(),ge=si(),ci=$g(),vS=ag(),_D=Dg(),_S=jg(),wS=Co(),xS=gy(),wD=Vg(),xD=bS(),kD=ys(),yy=class{get definitions(){return this._definitions}get parent(){return this._parent}constructor(e){var r;this._root=e.root,this._scope=e.scope,this._document=e.document,this._parent=(r=e.parent)!=null?r:null,this._definitions=new Map,this._lastModifiedProperty=null}factory(e){return new kD.Entity({source:this._document.source,kind:e,container:this._document.container})}createMapDescription(e){let r=this._document.getLastASTItemOfLine(e.start.line-1),t=this._document.findASTItemInLine(e.start.line,ye.ASTType.Comment);if(r instanceof ye.ASTComment){let i=new Set,s=[],o=e.start.line-1;for(;o>=0;){let l=this._document.getLastASTItemOfLine(o--);if(!i.has(l))if(l instanceof ye.ASTComment)i.add(l),s.unshift(l.value);else break}return s.join(`
107
107
  `)}else if(t instanceof ye.ASTComment)return t.value;return null}createCustomTypeFromMap(e,r){let t=this.createMapDescription(e);if(t==null)return;let i=(0,xD.parseMapDescription)(t);i!=null&&(i.properties.forEach(s=>{if(s.path==="__isa")return;let o=s.path.split("."),l=this.factory(ge.CompletionItemKind.Property).addType(s.type).setLabel(o[o.length-1]);this.setEntityInPath(r,o,l)}),this._scope.setCustomType(i.type,r))}createFunctionDescription(e,r=vD.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION){let t=this._document.getLastASTItemOfLine(e.start.line-1),i=this._document.findASTItemInLine(e.start.line,ye.ASTType.Comment);if(t instanceof ye.ASTComment){let s=new Set,o=[],l=e.start.line-1;for(;l>=0;){let u=this._document.getLastASTItemOfLine(l--);if(!s.has(u))if(u instanceof ye.ASTComment)s.add(u),o.unshift(u.value);else break}return o.join(`
108
108
 
109
- `)}else if(i instanceof ye.ASTComment)return i.value;return r}resolveFunctionStatement(e){let r=ve.SignatureDefinitionFunction.parse({type:ve.SignatureDefinitionBaseType.Function,description:this.createFunctionDescription(e),arguments:e.parameters.map(t=>{var s,o,l;if(t.type===ye.ASTType.Identifier)return{label:(s=t.name)!=null?s:"unknown",type:ve.SignatureDefinitionBaseType.Any};let i=t;return{label:(l=(o=i.variable)==null?void 0:o.name)!=null?l:"unknown",types:Array.from(this.resolveTypeWithDefault(i.init).types)}}),returns:["any"]});return this.factory(ge.CompletionItemKind.Function).addType(ve.SignatureDefinitionBaseType.Function).addSignatureType((0,_D.enrichWithMetaInformation)(r)).setLine(e.start.line)}resolveParenthesisExpression(e){return this.resolveTypeWithDefault(e.expression)}resolveBinaryExpression(e){let r=this.factory(ge.CompletionItemKind.Expression).setLabel("Binary Expr").setLine(e.start.line),t=this.resolveTypeWithDefault(e.left),i=this.resolveTypeWithDefault(e.right);return r.extend(t),r.extend(i),r}resolveLogicalExpression(e){return this.factory(ge.CompletionItemKind.Expression).setLabel("Logical Expr").addType(ve.SignatureDefinitionBaseType.Number).setLine(e.start.line)}resolveComparisonGroupExpression(e){return this.factory(ge.CompletionItemKind.Expression).setLabel("Comparison Group Expr").addType(ve.SignatureDefinitionBaseType.Number).setLine(e.start.line)}resolveIsaExpression(e){return this.factory(ge.CompletionItemKind.Expression).setLabel("Isa Expr").addType(ve.SignatureDefinitionBaseType.Number).setLine(e.start.line)}resolveCallStatement(e){let r=this.resolveNamespace(e);return r===null?this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any).setLine(e.start.line):r}resolveCallExpression(e){let r=this.resolveNamespace(e);return r===null?this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any).setLine(e.start.line):r}resolveUnaryExpression(e){let r=this.resolveNamespace(e);return r===null?this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any).setLine(e.start.line):r}resolveMapConstructorExpression(e){var t;let r=this.factory(ge.CompletionItemKind.MapConstructor).addType(ve.SignatureDefinitionBaseType.Map);for(let i=0;i<e.fields.length;i++){let s=e.fields[i],o=this.resolveTypeWithDefault(s.value).setLine(s.start.line);if(s.key.type===ye.ASTType.StringLiteral){let l=s.key.value.toString();r.setProperty(l,o),(t=r.values.get(`i:${l}`))==null||t.definitions.push({source:this._document.source,node:s})}else{let l=this.resolveTypeWithDefault(s.key).setLine(s.start.line);r.setProperty(l,o)}}return this.createCustomTypeFromMap(e,r),r.setLabel("{}").setLine(e.start.line)}resolveListConstructorExpression(e){let r=this.factory(ge.CompletionItemKind.ListConstructor).addType(ve.SignatureDefinitionBaseType.List);for(let t=0;t<e.fields.length;t++){let i=e.fields[t],s=this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Number).setLine(i.start.line),o=this.resolveTypeWithDefault(i.value).setLine(i.start.line);r.setProperty(s,o)}return r.setLabel("[]").setLine(e.start.line)}resolveSliceExpression(e){let r=this.resolveNamespace(e);return r===null?this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any).setLine(e.start.line):r.setLine(e.start.line)}resolveIndexExpression(e,r=!1){let t=this.resolveNamespace(e,r);return t===null?this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any).setLine(e.start.line):t}resolveMemberExpression(e,r=!1){let t=this.resolveNamespace(e,r);return t===null?this.factory(ge.CompletionItemKind.Property).addType(ve.SignatureDefinitionBaseType.Any).setLabel(e.identifier.name).setLine(e.start.line):t}resolveIdentifier(e,r=!1){let t=this.resolveNamespace(e,r);return t===null?this.factory(ge.CompletionItemKind.Property).addType(ve.SignatureDefinitionBaseType.Any).setLabel(e.name).setLine(e.start.line):t}resolveType(e,r=!1){if(e==null)return null;switch(e.type){case ye.ASTType.ParenthesisExpression:return this.resolveParenthesisExpression(e);case ye.ASTType.CallStatement:return this.resolveCallStatement(e);case ye.ASTType.CallExpression:return this.resolveCallExpression(e);case ye.ASTType.BinaryExpression:return this.resolveBinaryExpression(e);case ye.ASTType.LogicalExpression:return this.resolveLogicalExpression(e);case ye.ASTType.IsaExpression:return this.resolveIsaExpression(e);case ye.ASTType.ComparisonGroupExpression:return this.resolveComparisonGroupExpression(e);case ye.ASTType.FunctionDeclaration:return this.resolveFunctionStatement(e);case ye.ASTType.SliceExpression:return this.resolveSliceExpression(e);case ye.ASTType.IndexExpression:return this.resolveIndexExpression(e,r);case ye.ASTType.MemberExpression:return this.resolveMemberExpression(e,r);case ye.ASTType.Identifier:return this.resolveIdentifier(e,r);case ye.ASTType.MapConstructorExpression:return this.resolveMapConstructorExpression(e);case ye.ASTType.ListConstructorExpression:return this.resolveListConstructorExpression(e);case ye.ASTType.NegationExpression:case ye.ASTType.BinaryNegatedExpression:case ye.ASTType.UnaryExpression:return this.resolveUnaryExpression(e);case ye.ASTType.NilLiteral:return this.factory(ge.CompletionItemKind.Literal).addType("null").setLabel("null").setLine(e.start.line);case ye.ASTType.StringLiteral:{let t=e.value.toString();return this.factory(ge.CompletionItemKind.Literal).addType(ve.SignatureDefinitionBaseType.String).setLabel(`"${t.length>20?t.substr(0,20)+"...":t}"`).setLine(e.start.line)}case ye.ASTType.NumericLiteral:case ye.ASTType.BooleanLiteral:{let t=e.value.toString();return this.factory(ge.CompletionItemKind.Literal).addType(ve.SignatureDefinitionBaseType.Number).setLabel(t).setLine(e.start.line)}case tc.ASTType.FeatureFileExpression:return this.factory(ge.CompletionItemKind.Expression).addType(ve.SignatureDefinitionBaseType.String).setLabel("File Expr").setLine(e.start.line);case tc.ASTType.FeatureLineExpression:return this.factory(ge.CompletionItemKind.Expression).addType(ve.SignatureDefinitionBaseType.Number).setLabel("Line Expr").setLine(e.start.line);case tc.ASTType.FeatureEnvarExpression:return this.factory(ge.CompletionItemKind.Expression).addType(ve.SignatureDefinitionBaseType.String).setLabel("Envar Expr").setLine(e.start.line);case tc.ASTType.FeatureInjectExpression:return this.factory(ge.CompletionItemKind.Expression).addType(ve.SignatureDefinitionBaseType.String).setLabel("Inject Expr").setLine(e.start.line);default:return null}}resolveTypeWithDefault(e=null,r=!1){let t=this.resolveType(e,r);if(t==null){let i=this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any);return e!=null&&i.setLine(e.start.line),i}return t}resolveChain(e,r=!1){var l,u,a,c,p,d,h,g,f,m,b;if(e.length===0)return null;let t=null,i=e[0],s=((l=i.unary)==null?void 0:l.operator)==="@"&&!i.isInCallExpression||r&&e.length===1;if((0,ci.isResolveChainItemWithIdentifier)(i))if(i.getter.name==="globals")t=this._scope.globals;else if(i.getter.name==="outer")t=this._scope.outer;else if(i.getter.name==="locals")t=this._scope.locals;else if(i.getter.name==="super"){let v=(a=(u=this._document.getScopeContext(i.ref.scope))==null?void 0:u.scope.context)==null?void 0:a.getIsa();v==null?t=this.factory(ge.CompletionItemKind.Constant).addType("null").setLabel("super"):t=v.copy({kind:ge.CompletionItemKind.Constant,label:"super",values:v.values})}else if(i.getter.name==="self"){let v=(c=this._document.getScopeContext(i.ref.scope))==null?void 0:c.scope.context;v==null?t=this.factory(ge.CompletionItemKind.Constant).addType("null").setLabel("self"):t=v.copy({kind:ge.CompletionItemKind.Constant,label:"self",values:v.values})}else t=(p=this._scope.resolveNamespace(i.getter.name,s))!=null?p:this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any).setLabel(i.getter.name);else if((0,ci.isResolveChainItemWithValue)(i))t=this.resolveTypeWithDefault(i.value,s);else return null;if(((d=i.unary)==null?void 0:d.operator)===ye.Keyword.New&&t!==null){let v=this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Map).setLabel(t.label);v.setProperty("__isa",t),this.createCustomTypeFromMap(i.unary,v),t=v}let o=e.length;for(let v=1;v<o&&t!==null;v++){let _=e[v],w=((h=_.unary)==null?void 0:h.operator)==="@"&&!_.isInCallExpression||r&&e.length-1===v;if((0,ci.isResolveChainItemWithMember)(_))t=(g=t.resolveProperty(_.getter.name,w))!=null?g:this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any).setLabel(_.getter.name);else if((0,ci.isResolveChainItemWithIndex)(_))if((0,wS.isValidIdentifierLiteral)(_.getter)){let k=_.getter.value.toString();t=(f=t.resolveProperty(k,_.isInCallExpression))!=null?f:this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any).setLabel(k)}else{let k=this.resolveTypeWithDefault(_.getter);t=(m=t.resolveProperty(k,_.isInCallExpression))!=null?m:this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any)}else if(_.ref.type===ye.ASTType.SliceExpression)t=t.copy();else return null;if(((b=_.unary)==null?void 0:b.operator)===ye.Keyword.New&&t!==null){let k=this.factory(ge.CompletionItemKind.Property).addType(ve.SignatureDefinitionBaseType.Map).setLabel(t.label);k.setProperty("__isa",t),this.createCustomTypeFromMap(_.unary,k),t=k}}return t}setEntityInPath(e,r,t){let i=e;for(let s=0;s<r.length-1;s++){let o=r[s],l=i.resolveProperty(o);if(l==null){let u=this.factory(ge.CompletionItemKind.Property).addType(ve.SignatureDefinitionBaseType.Map).setLabel(o);i.setProperty(o,u),l=u}i=l}return i.setProperty(r[r.length-1],t)}getEntityInPath(e,r){let t=e;for(let i=0;i<r.length;i++){let s=r[i],o=t.resolveProperty(s);if(o==null)return null;t=o}return t}resolveNamespace(e,r=!1){let t=(0,_S.createResolveChain)(e);return this.resolveChain(t,r)}defineProperty(e,r,t){let i=e.setProperty(r,t);return this._lastModifiedProperty=e.resolveProperty(r,!0),i}defineNamespace(e,r){let t=(0,_S.createResolveChain)(e),i=t.pop();if(this._lastModifiedProperty=null,t.length>0){let o=this.resolveChain(t);if(o===null)return!1;if((0,ci.isResolveChainItemWithMember)(i))return this.defineProperty(o,i.getter.name,r);if((0,ci.isResolveChainItemWithIndex)(i)){if((0,wS.isValidIdentifierLiteral)(i.getter))return this.defineProperty(o,i.getter.value.toString(),r);{let l=this.resolveTypeWithDefault(i.getter);return this.defineProperty(o,l,r)}}return!1}let s=this._scope;return(0,ci.isResolveChainItemWithIdentifier)(i)?this.defineProperty(s,i.getter.name,r):!1}addDefinition(e){var s;(s=this._lastModifiedProperty)==null||s.definitions.push({source:this._document.source,node:e});let r=(0,vS.createExpressionId)(e.variable),t=this._definitions;r.startsWith("globals.")?(t=this._document.getRootScopeContext().aggregator.definitions,r=r.slice(8)):r.startsWith("locals.")?(t=this._definitions,r=r.slice(7)):r.startsWith("outer.")&&(t=this.parent.definitions,r=r.slice(6));let i=t.get(r);i?i.push({source:this._document.source,node:e}):t.set(r,[{source:this._document.source,node:e}])}resolveAvailableAssignmentsWithQuery(e){let r=[],t=new Set([this,this._parent,this._document.getRootScopeContext().aggregator]);for(let i of t){let s=i.definitions;for(let o of s.keys())if(o.includes(e)){let l=s.get(o);(0,xS.merge)(r,l)}}return r}resolveAvailableAssignments(e){let r=(0,vS.createExpressionId)(e),t=this;r.startsWith("globals.")?(t=this._document.getRootScopeContext().aggregator,r=r.slice(8)):r.startsWith("locals.")?(t=this,r=r.slice(7)):r.startsWith("outer.")&&(t=this.parent,r=r.slice(6));let i=[],s=new Set([t,t._parent,t._document.getRootScopeContext().aggregator]);for(let o of s){if(o==null)continue;let l=o.resolveNamespace(e,!0);l!=null&&(0,xS.merge)(i,l.definitions)}return i}analyze(){var e,r;for(let t=0;t<this._root.assignments.length;t++){let i=this._root.assignments[t],s=(r=(e=this.resolveType(i.init))==null?void 0:e.copy({source:this._document.source}).setLine(i.start.line))!=null?r:this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any).setLine(i.start.line);this.defineNamespace(i.variable,s),this.addDefinition(i)}}extend(e){for(let[r,t]of e.definitions){let i=this.definitions.get(r);i?(0,wD.mergeUnique)(i,t):this.definitions.set(r,t)}}};nc.Aggregator=yy});var _y=S(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});rc.Document=void 0;var rr=en(),TD=me(),kS=si(),SD=gy(),TS=by(),SS=ys(),IS=Yg(),vy=class n{get source(){return this._source}get root(){return this._root}get container(){return this._container}get intrinsics(){return this._intrinscis}get globals(){return this._globals}get api(){return this._api}constructor(e){var r,t,i,s;this._source=e.source,this._root=e.root,this._container=e.container,this._scopeMapping=(r=e.scopeMapping)!=null?r:new WeakMap,this._intrinscis=(t=e.intrinsics)!=null?t:this.createIntrinscis(),this._api=(i=e.api)!=null?i:this.initApi(),this._globals=(s=e.globals)!=null?s:this.initGlobals()}createIntrinscis(){return{map:this._container.primitives.get(rr.SignatureDefinitionBaseType.Map),funcRef:this._container.primitives.get(rr.SignatureDefinitionBaseType.Function),number:this._container.primitives.get(rr.SignatureDefinitionBaseType.Number),string:this._container.primitives.get(rr.SignatureDefinitionBaseType.String),list:this._container.primitives.get(rr.SignatureDefinitionBaseType.List)}}initApi(){let e=this._container.primitives.get(rr.SignatureDefinitionBaseType.General);return e.resolveProperty("map",!0).setReturnEntity(this._intrinscis.map),e.resolveProperty("funcRef",!0).setReturnEntity(this._intrinscis.funcRef),e.resolveProperty("number",!0).setReturnEntity(this._intrinscis.number),e.resolveProperty("string",!0).setReturnEntity(this._intrinscis.string),e.resolveProperty("list",!0).setReturnEntity(this._intrinscis.list),e}initGlobals(){return new SS.Entity({source:this._source,kind:kS.CompletionItemKind.Constant,container:this._container,label:"globals"}).addType(rr.SignatureDefinitionBaseType.Map)}analyzeScope(e){let r=this._scopeMapping.get(e.scope),t=new IS.Scope({source:this._source,container:this._container,parent:r==null?void 0:r.scope,globals:this._globals}),i=new TS.Aggregator({scope:t,root:e,document:this,parent:r==null?void 0:r.aggregator});this._scopeMapping.set(e,{scope:t,aggregator:i});let s=e.assignment instanceof TD.ASTAssignmentStatement?this.resolveNamespace(e.assignment.variable,!0):null;if(s!==null){let o=s==null?void 0:s.context;o!=null&&o.types.has(rr.SignatureDefinitionBaseType.Map)&&o!==this._globals&&t.setContext(o)}if(i.analyze(),s!==null){let o=s.signatureDefinitions.last();if(o!=null){let l=o.getArguments();for(let u=0;u<l.length;u++){let a=l[u],c=t.resolveProperty(a.getLabel(),!0),p=a.getTypes().map(d=>d.type);c===null?t.setProperty(a.getLabel(),new SS.Entity({source:this._source,kind:kS.CompletionItemKind.Variable,container:this._container}).addTypes(p)):(c.types.delete(rr.SignatureDefinitionBaseType.Any),c.addTypes(p))}}}}analyze(){let e=new IS.Scope({source:this._source,container:this._container,globals:this._globals,locals:this._globals}),r=new TS.Aggregator({scope:e,root:this._root,document:this});this._scopeMapping.set(this._root,{scope:e,aggregator:r}),r.analyze();for(let t=0;t<this._root.scopes.length;t++){let i=this._root.scopes[t];this.analyzeScope(i)}}getRootScopeContext(){return this._scopeMapping.get(this._root)}getAllScopeContexts(){return[this._root,...this._root.scopes].map(e=>this._scopeMapping.get(e))}getScopeContext(e){var r;return(r=this._scopeMapping.get(e))!=null?r:null}getLastASTItemOfLine(e){let r=this._root.lines[e];return r&&r.length>0?r[r.length-1]:null}findASTItemInLine(e,r){let t=this._root.lines[e];if(t&&t.length>0){let i=t.find(s=>s.type===r);if(i)return i}return null}resolveAllAssignmentsWithQuery(e){let r=[],t=[this._root,...this._root.scopes];for(let i=0;i<t.length;i++){let o=this._scopeMapping.get(t[i]).aggregator.definitions;for(let l of o.keys())if(l.includes(e)){let u=o.get(l);(0,SD.merge)(r,u)}}return r}resolveAvailableAssignments(e){var r,t;return(t=(r=this._scopeMapping.get(e.scope))==null?void 0:r.aggregator.resolveAvailableAssignments(e))!=null?t:[]}resolveType(e,r){var t,i;return(i=(t=this._scopeMapping.get(e.scope))==null?void 0:t.aggregator.resolveType(e,r))!=null?i:null}resolveTypeWithDefault(e,r){var t;return(t=this._scopeMapping.get(e.scope))==null?void 0:t.aggregator.resolveTypeWithDefault(e,r)}resolveNamespace(e,r=!1){var t,i;return(i=(t=this._scopeMapping.get(e.scope))==null?void 0:t.aggregator.resolveNamespace(e,r))!=null?i:null}merge(...e){let r=new n({source:this._source,root:this._root,container:this._container.copy()});for(let t=0;t<e.length;t++){let i=e[t];r._globals.extend(i._globals),r._intrinscis.map.extend(i._intrinscis.map),r._intrinscis.funcRef.extend(i._intrinscis.funcRef),r._intrinscis.number.extend(i._intrinscis.number),r._intrinscis.string.extend(i._intrinscis.string),r._intrinscis.list.extend(i._intrinscis.list),r._container.mergeCustomTypes(i._container)}r.analyze();for(let t=0;t<e.length;t++){let i=e[t];r.getRootScopeContext().aggregator.extend(i.getRootScopeContext().aggregator)}return r}};rc.Document=vy});var Ty=S(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});ic.ContainerProxy=void 0;var Sn=en(),ir=ys(),wy=si(),ES=Bo(),xy=Wu(),ky=class n{get primitives(){return this._primitives}get types(){return this._types}constructor(e){var r,t;this._container=e.container,this._primitives=(r=e.primitives)!=null?r:this.createPrimitives(),this._types=(t=e.types)!=null?t:this.createTypes(),this._customTypes=new Set}createPrimitives(){let e=new Map;for(let[r,t]of this._container.getPrimitives()){let i=new ir.Entity({source:"internal",kind:wy.CompletionItemKind.Constant,container:this,isAPI:r===Sn.SignatureDefinitionBaseType.General}).addType(Sn.SignatureDefinitionBaseType.Map).insertSignature(t);e.set(r,i)}return e}createTypes(){let e=new Map;for(let[r,t]of this._container.getTypes()){let i=new ir.Entity({source:"internal",kind:wy.CompletionItemKind.Constant,container:this}).addType(Sn.SignatureDefinitionBaseType.Map).insertSignature(t);e.set(r,i)}return e}setCustomType(e,r){this._types.has(e)||(this._types.set(e,r),this._customTypes.add(e))}mergeCustomTypes(e){for(let r of e._customTypes){let t=e._types.get(r);t!=null&&this.setCustomType(r,t.copy({deepCopy:!0}))}}getTypeSignature(e){var r,t;return(t=(r=this._primitives.get(e))!=null?r:this._types.get(e))!=null?t:null}searchDefinitionMatches(e,r){if(typeof e=="string")return this.searchDefinitionMatches([e],r);let t=e.includes(Sn.SignatureDefinitionBaseType.Any)?new Set(this._container.getAllVisibleTypes()):new Set(e),i=new Map;for(let s of t){let o=this.getTypeSignature(s);if(o===null)continue;let l=(0,xy.lookupProperty)(o,r);l!==null&&i.set(s,l)}return i}getDefinition(e,r,t=!1){if(typeof e=="string")return this.getDefinition([e],r);let i=(0,xy.lookupProperty)(this._primitives.get(Sn.SignatureDefinitionBaseType.Any),r);if(e.includes(Sn.SignatureDefinitionBaseType.Any)&&i)return(0,ir.resolveEntity)(this,i,t);let s=this.searchDefinitionMatches(e,r);if(s.size===0)return null;if(s.size===1)return(0,ir.resolveEntity)(this,s.values().next().value,t);if(s.has(Sn.SignatureDefinitionBaseType.Any))return(0,ir.resolveEntity)(this,s.get(Sn.SignatureDefinitionBaseType.Any),t);if(i!==null)return(0,ir.resolveEntity)(this,i,t);let o=new ir.Entity({source:"internal",label:r,kind:wy.CompletionItemKind.Property,container:this});for(let l of s.values()){let u=(0,ir.resolveEntity)(this,l,t);o.extend(u,!0)}return o}getGeneralDefinition(e,r=!1){let t=(0,xy.lookupProperty)(this._primitives.get(Sn.SignatureDefinitionBaseType.General),e);return t==null?null:(0,ir.resolveEntity)(this,t,r)}injectTypeIdentifiers(e,r){let t=this.getTypeSignature(r);if(t!=null&&((0,ES.injectIdentifers)(e,t),this._types.has(r))){let i=this._primitives.get(Sn.SignatureDefinitionBaseType.Map);(0,ES.injectIdentifers)(e,i)}}getAllIdentifier(e){let r=new Map;if(e===Sn.SignatureDefinitionBaseType.Any){let t=this._container.getAllVisibleTypes();for(let i=0;i<t.length;i++)this.injectTypeIdentifiers(r,t[i]);return r}return this.injectTypeIdentifiers(r,e),r}copy(){return new n({container:this._container})}};ic.ContainerProxy=ky});var RS=S(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});sc.TypeManager=void 0;var ID=_y(),ED=Ty(),Sy=class{constructor(e){this._container=new ED.ContainerProxy({container:e.container}),this._types=new Map}analyze(e,r){let t=new ID.Document({source:e,container:this._container.copy(),root:r});try{t.analyze()}catch(i){console.error(i)}return this._types.set(e,t),t}get(e){var r;return(r=this._types.get(e))!=null?r:null}};sc.TypeManager=Sy});var ta=S(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.TypeManager=te.ContainerProxy=te.Document=te.Aggregator=te.Scope=te.Entity=te.aggregateEntity=te.lookupProperty=te.isEligibleForProperties=te.injectIdentifers=te.isSignatureDefinitionFunction=te.isResolveChainItemWithValue=te.isResolveChainItemWithMember=te.isResolveChainItemWithIndex=te.isResolveChainItemWithIdentifier=te.CompletionItemKind=te.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION=te.ObjectSetIterator=te.ObjectSet=te.rotateBits=te.getStringHashCode=te.getHashCode=te.createResolveChain=te.enrichWithMetaInformation=te.createExpressionId=te.createExpressionHash=te.isValidIdentifierLiteral=void 0;var RD=Co();Object.defineProperty(te,"isValidIdentifierLiteral",{enumerable:!0,get:function(){return RD.isValidIdentifierLiteral}});var PD=AT();Object.defineProperty(te,"createExpressionHash",{enumerable:!0,get:function(){return PD.createExpressionHash}});var CD=ag();Object.defineProperty(te,"createExpressionId",{enumerable:!0,get:function(){return CD.createExpressionId}});var OD=Dg();Object.defineProperty(te,"enrichWithMetaInformation",{enumerable:!0,get:function(){return OD.enrichWithMetaInformation}});var AD=jg();Object.defineProperty(te,"createResolveChain",{enumerable:!0,get:function(){return AD.createResolveChain}});var Iy=og();Object.defineProperty(te,"getHashCode",{enumerable:!0,get:function(){return Iy.getHashCode}});Object.defineProperty(te,"getStringHashCode",{enumerable:!0,get:function(){return Iy.getStringHashCode}});Object.defineProperty(te,"rotateBits",{enumerable:!0,get:function(){return Iy.rotateBits}});var PS=Fg();Object.defineProperty(te,"ObjectSet",{enumerable:!0,get:function(){return PS.ObjectSet}});Object.defineProperty(te,"ObjectSetIterator",{enumerable:!0,get:function(){return PS.ObjectSetIterator}});var DD=Ng();Object.defineProperty(te,"DEFAULT_CUSTOM_FUNCTION_DESCRIPTION",{enumerable:!0,get:function(){return DD.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION}});var jD=si();Object.defineProperty(te,"CompletionItemKind",{enumerable:!0,get:function(){return jD.CompletionItemKind}});var oc=$g();Object.defineProperty(te,"isResolveChainItemWithIdentifier",{enumerable:!0,get:function(){return oc.isResolveChainItemWithIdentifier}});Object.defineProperty(te,"isResolveChainItemWithIndex",{enumerable:!0,get:function(){return oc.isResolveChainItemWithIndex}});Object.defineProperty(te,"isResolveChainItemWithMember",{enumerable:!0,get:function(){return oc.isResolveChainItemWithMember}});Object.defineProperty(te,"isResolveChainItemWithValue",{enumerable:!0,get:function(){return oc.isResolveChainItemWithValue}});var LD=Ug();Object.defineProperty(te,"isSignatureDefinitionFunction",{enumerable:!0,get:function(){return LD.isSignatureDefinitionFunction}});var MD=Bo();Object.defineProperty(te,"injectIdentifers",{enumerable:!0,get:function(){return MD.injectIdentifers}});var qD=Uu();Object.defineProperty(te,"isEligibleForProperties",{enumerable:!0,get:function(){return qD.isEligibleForProperties}});var FD=Wu();Object.defineProperty(te,"lookupProperty",{enumerable:!0,get:function(){return FD.lookupProperty}});var ND=Bg();Object.defineProperty(te,"aggregateEntity",{enumerable:!0,get:function(){return ND.aggregateEntity}});var $D=ys();Object.defineProperty(te,"Entity",{enumerable:!0,get:function(){return $D.Entity}});var UD=Yg();Object.defineProperty(te,"Scope",{enumerable:!0,get:function(){return UD.Scope}});var BD=by();Object.defineProperty(te,"Aggregator",{enumerable:!0,get:function(){return BD.Aggregator}});var WD=_y();Object.defineProperty(te,"Document",{enumerable:!0,get:function(){return WD.Document}});var VD=Ty();Object.defineProperty(te,"ContainerProxy",{enumerable:!0,get:function(){return VD.ContainerProxy}});var HD=RS();Object.defineProperty(te,"TypeManager",{enumerable:!0,get:function(){return HD.TypeManager}})});var Ey=S(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.getSymbolItemKind=_s.getCompletionItemKind=void 0;var Ot=ta(),zD=n=>{switch(n){case Ot.CompletionItemKind.Constant:return 21;case Ot.CompletionItemKind.Variable:return 6;case Ot.CompletionItemKind.Expression:return 6;case Ot.CompletionItemKind.Function:return 3;case Ot.CompletionItemKind.ListConstructor:case Ot.CompletionItemKind.MapConstructor:case Ot.CompletionItemKind.Literal:case Ot.CompletionItemKind.Unknown:return 12}};_s.getCompletionItemKind=zD;var GD=n=>{switch(n){case Ot.CompletionItemKind.Constant:return 14;case Ot.CompletionItemKind.Variable:return 13;case Ot.CompletionItemKind.Expression:return 13;case Ot.CompletionItemKind.Function:return 12;case Ot.CompletionItemKind.ListConstructor:return 18;case Ot.CompletionItemKind.MapConstructor:return 19;case Ot.CompletionItemKind.Literal:case Ot.CompletionItemKind.Unknown:return 13}};_s.getSymbolItemKind=GD});var CS=S(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});ac.CompletionListBuilder=void 0;var KD=Ey(),Ry=class{constructor(){this.collection=new Map,this.default=[]}setDefault(e){this.default=e}addCollection(e){e!=null&&(this.collection=new Map([...this.collection,...e]))}build(){let e=[];for(let[r,t]of this.collection)e.push({label:r,kind:(0,KD.getCompletionItemKind)(t.kind)});return[...e,...this.default]}};ac.CompletionListBuilder=Ry});var uc=S(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});ws.findEx=ws.ScraperWalker=void 0;var YD=me(),QD=function(n){return{ParenthesisExpression:(e,r)=>{n(e.expression,r)},AssignmentStatement:function(e,r){n(e.init,r),n(e.variable,r)},MemberExpression:function(e,r){n(e.base,r),n(e.identifier,r)},FunctionDeclaration:function(e,r){for(let t=0;t<e.parameters.length;t++)n(e.parameters[t],r);for(let t=0;t<e.body.length;t++)n(e.body[t],r)},MapConstructorExpression:function(e,r){for(let t=0;t<e.fields.length;t++)n(e.fields[t],r)},ReturnStatement:function(e,r){e.argument&&n(e.argument,r)},WhileStatement:function(e,r){n(e.condition,r);for(let t=0;t<e.body.length;t++)n(e.body[t],r)},IndexExpression:function(e,r){n(e.base,r),n(e.index,r)},SliceExpression:function(e,r){n(e.base,r),n(e.left,r),n(e.right,r)},ListValue:function(e,r){n(e.value,r)},MapKeyString:function(e,r){n(e.key,r),n(e.value,r)},IfShortcutStatement:function(e,r){for(let t=0;t<e.clauses.length;t++)n(e.clauses[t],r)},IfShortcutClause:function(e,r){n(e.condition,r);for(let t=0;t<e.body.length;t++)n(e.body[t],r)},ElseifShortcutClause:function(e,r){n(e.condition,r);for(let t=0;t<e.body.length;t++)n(e.body[t],r)},ElseShortcutClause:function(e,r){for(let t=0;t<e.body.length;t++)n(e.body[t],r)},ForGenericStatement:function(e,r){n(e.variable,r),n(e.iterator,r);for(let t=0;t<e.body.length;t++)n(e.body[t],r)},IfStatement:function(e,r){for(let t=0;t<e.clauses.length;t++)n(e.clauses[t],r)},IfClause:function(e,r){n(e.condition,r);for(let t=0;t<e.body.length;t++)n(e.body[t],r)},ElseifClause:function(e,r){n(e.condition,r);for(let t=0;t<e.body.length;t++)n(e.body[t],r)},ElseClause:function(e,r){for(let t=0;t<e.body.length;t++)n(e.body[t],r)},NegationExpression:function(e,r){n(e.argument,r)},CallExpression:function(e,r){n(e.base,r);for(let t=0;t<e.arguments.length;t++)n(e.arguments[t],r)},CallStatement:function(e,r){n(e.expression,r)},ListConstructorExpression:function(e,r){for(let t=0;t<e.fields.length;t++)n(e.fields[t],r)},BinaryExpression:function(e,r){n(e.left,r),n(e.right,r)},BinaryNegatedExpression:function(e,r){n(e.argument,r)},IsaExpression:function(e,r){n(e.left,r),n(e.right,r)},LogicalExpression:function(e,r){n(e.left,r),n(e.right,r)},ComparisonGroupExpression:function(e,r){for(let t=0;t<e.expressions.length;t++)n(e.expressions[t],r)},UnaryExpression:function(e,r){n(e.argument,r)},Chunk:function(e,r){for(let t=0;t<e.body.length;t++)n(e.body[t],r)},InvalidCodeExpression:()=>{}}},lc=class{constructor(e,r={}){this.map=Object.assign(QD(this.visit.bind(this)),r),this.callback=e,this.state={exit:!1,skip:!1}}visit(e,r=0){if(e==null)return;if(e.type==null)throw console.error("Error ast type:",e),new Error("Unexpected as type");let t=this.callback(e,r);if(t!=null&&Object.assign(this.state,t),this.state.exit||this.state.skip){this.state.skip=!1;return}let i=this.map[e.type];i!=null&&i.call(this,e,r+1)}};ws.ScraperWalker=lc;function JD(n,e){let r=[];return new lc((i,s)=>{let o=n(i,s)||{};return o.valid&&i.type!==YD.ASTType.InvalidCodeExpression&&r.push(i),{exit:!!o.exit,skip:!!o.skip}}).visit(e),r}ws.findEx=JD});var Py=S(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.lookupBase=Ft.lookupIdentifier=Ft.lookupScopes=Ft.lookupRootScope=void 0;var sr=me(),ZD=n=>{let e=n;for(;e.scope;)e=e.scope;return e};Ft.lookupRootScope=ZD;var XD=n=>{if(!n.scope)return[n];let e=(0,Ft.lookupRootScope)(n);return e===n.scope?[n,e]:[n,n.scope,e]};Ft.lookupScopes=XD;var ej=n=>{switch(n.type){case sr.ASTType.CallStatement:return(0,Ft.lookupIdentifier)(n.expression);case sr.ASTType.CallExpression:return(0,Ft.lookupIdentifier)(n.base);case sr.ASTType.Identifier:return n;case sr.ASTType.MemberExpression:return(0,Ft.lookupIdentifier)(n.identifier);case sr.ASTType.IndexExpression:return(0,Ft.lookupIdentifier)(n.index);default:return null}};Ft.lookupIdentifier=ej;var tj=(n=null)=>{switch(n==null?void 0:n.type){case sr.ASTType.MemberExpression:return n.base;case sr.ASTType.IndexExpression:return n.base;case sr.ASTType.CallExpression:return n.base;case sr.ASTType.SliceExpression:return n.base;default:return null}};Ft.lookupBase=tj});var ks=S(Vn=>{"use strict";var nj=Vn&&Vn.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),rj=Vn&&Vn.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),ij=Vn&&Vn.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var r in n)r!=="default"&&Object.prototype.hasOwnProperty.call(n,r)&&nj(e,n,r);return rj(e,n),e};Object.defineProperty(Vn,"__esModule",{value:!0});Vn.LookupHelper=void 0;var sj=en(),OS=me(),xs=ta(),oj=ij(uc()),aj=Py(),Cy=class{constructor(e,r){this.document=e,this.context=r,this.mergedTypeMap=null}getTypeMap(){return B(this,null,function*(){return this.mergedTypeMap==null&&(this.mergedTypeMap=yield this.context.documentMerger.build(this.document,this.context)),this.mergedTypeMap})}findAllAssignmentsOfIdentifier(e,r){return B(this,null,function*(){let t=yield this.getTypeMap();if(t==null)return[];let i=t.getScopeContext(r);return i==null?[]:i.aggregator.resolveAvailableAssignmentsWithQuery(e)})}findAllAssignmentsOfItem(e,r){return B(this,null,function*(){let t=yield this.getTypeMap();if(t==null)return[];let i=t.getScopeContext(r);return i==null?[]:i.aggregator.resolveAvailableAssignments(e)})}findAllAvailableIdentifierInRoot(){return B(this,null,function*(){let e=yield this.getTypeMap();return e==null?new Map:e.getRootScopeContext().scope.getAllIdentifier()})}findAllAvailableIdentifier(e){return B(this,null,function*(){let r=yield this.getTypeMap();if(r==null)return new Map;let t=r.getScopeContext(e);return t==null?new Map:t.scope.getAllIdentifier()})}findAllAvailableIdentifierRelatedToPosition(e){return B(this,null,function*(){let r=yield this.getTypeMap(),t=new Map;if(r==null)return t;for(let l of r.container.getAllIdentifier(sj.SignatureDefinitionBaseType.General))t.set(...l);let i=r.getScopeContext(e.scope);if(i==null)return t;i.scope.isSelfAvailable()&&t.set("self",{kind:xs.CompletionItemKind.Constant,line:-1}),i.scope.isSuperAvailable()&&t.set("super",{kind:xs.CompletionItemKind.Constant,line:-1});let s=new Map;(0,xs.injectIdentifers)(s,i.scope);let o=Array.from(s.entries()).map(([l,u])=>tt({identifier:l},u)).sort((l,u)=>l.line-u.line);for(let l=0;l<o.length;l++){let u=o[l];if(u.line>=e.end.line)break;t.set(u.identifier,{kind:u.kind,line:u.line})}return i.scope.locals!==i.scope.globals&&(0,xs.injectIdentifers)(t,i.scope.globals),i.scope.outer&&(0,xs.injectIdentifers)(t,i.scope.outer),t})}lookupAST(e){let r=this,i=this.context.documentManager.get(r.document).document.lines[e.line+1];if(!i)return null;for(let s=0;s<i.length;s++){let o=i[s],l=oj.findEx((a,c)=>{let p=a.start.line-1,d=a.start.character-1,h=a.end.line-1,g=a.end.character-1;return p>e.line?{exit:!0}:p<h?{valid:e.line>p&&e.line<h||e.line===p&&d<=e.character||e.line===h&&g>=e.character}:{valid:p<=e.line&&d<=e.character&&h>=e.line&&g>=e.character}},o),u=l.pop();if(u)return{closest:u,outer:l}}return null}lookupBasePath(e){return B(this,null,function*(){let r=yield this.getTypeMap();if(r===null)return null;let t=(0,aj.lookupBase)(e);return t?r.resolveNamespace(t):null})}lookupTypeInfo(t){return B(this,arguments,function*({closest:e,outer:r}){let i=yield this.getTypeMap();if(i===null)return null;let s=r.length>0?r[r.length-1]:void 0;return(s==null?void 0:s.type)===OS.ASTType.MemberExpression&&e===s.identifier||(s==null?void 0:s.type)===OS.ASTType.IndexExpression&&e===s.index&&(0,xs.isValidIdentifierLiteral)(e)?i.resolveType(s,!0):i.resolveType(e,!0)})}lookupType(e){let r=this,t=r.lookupAST(e);return t?r.lookupTypeInfo(t):null}};Vn.LookupHelper=Cy});var AS=S(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});cc.AVAILABLE_CONSTANTS=void 0;cc.AVAILABLE_CONSTANTS=["true","false","null","params","globals","locals","outer"].map(n=>({label:n,kind:21}))});var pc=S(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.GreyScriptKeyword=void 0;var lj;(function(n){n.ImportCode="import_code"})(lj=na.GreyScriptKeyword||(na.GreyScriptKeyword={}))});var Dy=S(Ay=>{"use strict";Object.defineProperty(Ay,"__esModule",{value:!0});var DS=qt(),uj=me(),cj=pc(),Oy=class extends DS.LexerValidator{constructor(){super(...arguments),this.isKeyword=Set.prototype.has.bind(new Set([...Object.values(uj.Keyword),...Object.values(DS.GreybelKeyword),...Object.values(cj.GreyScriptKeyword)]))}};Ay.default=Oy});var Ly=S(ra=>{"use strict";var pj=ra&&ra.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ra,"__esModule",{value:!0});var dj=qt(),hj=pj(Dy()),jy=class extends dj.Lexer{constructor(e,r={}){r.validator=r.validator||new hj.default,super(e,r)}};ra.default=jy});var qy=S(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});dc.ASTChunkGreyScript=void 0;var fj=qt(),My=class n extends fj.ASTChunkAdvanced{constructor(e){super(e),this.nativeImports=e.nativeImports||[]}clone(){return new n({nativeImports:this.nativeImports.map(e=>e.clone()),imports:this.imports.map(e=>e.clone()),includes:this.includes.map(e=>e.clone()),literals:this.literals.map(e=>e.clone()),scopes:this.scopes.map(e=>e.clone()),lines:this.lines,start:this.start,end:this.end,range:this.range,scope:this.scope})}};dc.ASTChunkGreyScript=My});var Fy=S(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.ASTType=void 0;var mj;(function(n){n.ImportCodeExpression="ImportCodeExpression"})(mj=ia.ASTType||(ia.ASTType={}))});var $y=S(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});hc.ASTImportCodeExpression=void 0;var gj=me(),yj=Fy(),Ny=class n extends gj.ASTBase{constructor(e){super(yj.ASTType.ImportCodeExpression,e),this.directory=e.directory}toString(){return`ImportCode[${this.start}-${this.end}][${this.directory}]`}clone(){return new n({directory:this.directory,start:this.start,end:this.end,range:this.range,scope:this.scope})}};hc.ASTImportCodeExpression=Ny});var By=S(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.ASTImportCodeExpression=Hn.ASTChunkGreyScript=Hn.ASTType=Hn.ASTProvider=void 0;var bj=qt(),vj=qy(),_j=$y(),Uy=class extends bj.ASTProvider{chunkAdvanced(e){return new vj.ASTChunkGreyScript(e)}importCodeExpression(e){return new _j.ASTImportCodeExpression(e)}};Hn.ASTProvider=Uy;var wj=Fy();Object.defineProperty(Hn,"ASTType",{enumerable:!0,get:function(){return wj.ASTType}});var xj=qy();Object.defineProperty(Hn,"ASTChunkGreyScript",{enumerable:!0,get:function(){return xj.ASTChunkGreyScript}});var kj=$y();Object.defineProperty(Hn,"ASTImportCodeExpression",{enumerable:!0,get:function(){return kj.ASTImportCodeExpression}})});var jS=S(sa=>{"use strict";var Tj=sa&&sa.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(sa,"__esModule",{value:!0});var Ts=me(),Nt=qt(),fc=es(),Ss=is(),Sj=By(),Ij=Tj(Ly()),Ej=pc(),Wy=class extends Nt.Parser{constructor(e,r={}){r.lexer=r.lexer||new Ij.default(e,{unsafe:r.unsafe,tabWidth:r.tabWidth}),r.astProvider=r.astProvider||new Sj.ASTProvider,super(e,r);let t=this;t.nativeImports=[]}parseStatement(){let e=this;if(e.isType(Ts.TokenType.Keyword))switch(e.token.value){case Ej.GreyScriptKeyword.ImportCode:e.next();let t=e.parseNativeImportCodeStatement();e.addItemToLines(t),e.backpatches.peek().body.push(t);return;default:break}return super.parseStatement()}parseFunctionDeclaration(e,r=!1,t=!1){let i=this;if(!Nt.Selectors.Function(i.token))return i.parseOr(r,t);i.next();let s=i.previousToken,o=i.astProvider.functionStatement({start:s.start,end:null,range:[s.range[0],null],scope:i.currentScope,parent:i.outerScopes[i.outerScopes.length-1],assignment:i.currentAssignment}),l=[];if(i.pushScope(o),!Nt.SelectorGroups.BlockEndOfLine(i.token)){for(i.requireToken(Nt.Selectors.LParenthesis,s.start);!Nt.SelectorGroups.FunctionDeclarationArgEnd(i.token);){let a=i.parseIdentifier(),c=a;if(i.consume(Nt.Selectors.Assign)){let p=i.parseExpr(null),d=i.astProvider.assignmentStatement({variable:a,init:p,start:c.start,end:i.previousToken.end,range:[c.range[0],i.previousToken.range[1]],scope:i.currentScope});i.currentScope.assignments.push(d),l.push(d)}else{let p=i.astProvider.assignmentStatement({variable:a,init:i.astProvider.unknown({start:c.start,end:i.previousToken.end,range:[c.range[0],i.previousToken.range[1]],scope:i.currentScope}),start:c.start,end:i.previousToken.end,range:[c.range[0],i.previousToken.range[1]],scope:i.currentScope});i.currentScope.assignments.push(p),l.push(a)}if(Nt.Selectors.RParenthesis(i.token))break;if(i.requireToken(Nt.Selectors.ArgumentSeperator,s.start),Nt.Selectors.RParenthesis(i.token)){i.raise("expected argument instead received right parenthesis",new Ss.Range(i.previousToken.end,i.previousToken.end));break}}i.requireToken(Nt.Selectors.RParenthesis,s.start)}o.parameters=l;let u=new Ts.PendingFunction(o);return i.backpatches.push(u),u.onComplete=a=>{e!==null?(e.end=a.block.end,e.range[1]=a.block.range[1],i.addItemToLines(e)):i.addItemToLines(a.block)},o}parseNativeImportCodeStatement(){var e,r,t,i;let s=this,o=s.previousToken;if(!s.consume(Nt.Selectors.LParenthesis))return s.raise("expected import_code to have opening parenthesis",new Ss.Range(o.start,new fc.Position((e=s.token.lastLine)!==null&&e!==void 0?e:s.token.line,s.token.end.character))),s.parseInvalidCode();let l;if(Ts.TokenType.StringLiteral===s.token.type)l=s.token.value,s.next();else return s.raise("expected import_code argument to be string literal",new Ss.Range(o.start,new fc.Position((r=s.token.lastLine)!==null&&r!==void 0?r:s.token.line,s.token.end.character))),s.parseInvalidCode();if(s.consume(Nt.Selectors.ImportCodeSeperator)){if(!s.isType(Ts.TokenType.StringLiteral))return s.raise("expected import_code argument to be string literal",new Ss.Range(o.start,new fc.Position((t=s.token.lastLine)!==null&&t!==void 0?t:s.token.line,s.token.end.character))),s.parseInvalidCode();l=s.token.value,console.warn("Warning: Second import_code argument is deprecated. Use the first argument for the file system path instead."),s.next()}if(!s.consume(Nt.Selectors.RParenthesis))return s.raise("expected import_code to have closing parenthesis",new Ss.Range(o.start,new fc.Position((i=s.token.lastLine)!==null&&i!==void 0?i:s.token.line,s.token.end.character))),s.parseInvalidCode();let u=s.astProvider.importCodeExpression({directory:l,start:o.start,end:s.previousToken.end,range:[o.range[0],s.previousToken.range[1]],scope:s.currentScope});return s.nativeImports.push(u),u}parseChunk(){let e=this;e.next();let r=e.token,t=e.astProvider.chunkAdvanced({start:r.start,end:null,range:[r.range[0],null]}),i=new Ts.PendingChunk(t);for(e.backpatches.setDefault(i),e.pushScope(t);!Nt.Selectors.EndOfFile(e.token)&&(e.skipNewlines(),!Nt.Selectors.EndOfFile(e.token));)e.lexer.recordSnapshot(),e.statementErrors=[],e.parseStatement(),e.statementErrors.length>0&&e.tryToRecover();let s=e.backpatches.pop();for(;!(0,Ts.isPendingChunk)(s);){let o=e.raise(`found open block ${s.block.type}`,new Ss.Range(s.block.start,s.block.start));if(s.complete(e.previousToken),e.errors.push(o),!e.unsafe)throw o;s=e.backpatches.pop()}return e.finishRemaingScopes(),e.popScope(),i.complete(e.token),t.literals=e.literals,t.scopes=e.scopes,t.lines=e.lines,t.nativeImports=e.nativeImports,t.imports=e.imports,t.includes=e.includes,t.injects=e.injects,t}};sa.default=Wy});var zn=S(At=>{"use strict";var Rj=At&&At.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),LS=At&&At.__exportStar||function(n,e){for(var r in n)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Rj(e,n,r)},Vy=At&&At.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(At,"__esModule",{value:!0});At.Parser=At.LexerValidator=At.Lexer=void 0;var Pj=Ly();Object.defineProperty(At,"Lexer",{enumerable:!0,get:function(){return Vy(Pj).default}});var Cj=Dy();Object.defineProperty(At,"LexerValidator",{enumerable:!0,get:function(){return Vy(Cj).default}});var Oj=jS();Object.defineProperty(At,"Parser",{enumerable:!0,get:function(){return Vy(Oj).default}});LS(By(),At);LS(pc(),At)});var MS=S(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});mc.AVAILABLE_KEYWORDS=void 0;var Is=qt(),Aj=zn(),Dt=me();mc.AVAILABLE_KEYWORDS=[Dt.Keyword.If,Dt.Keyword.In,Dt.Keyword.Or,Dt.Keyword.And,Dt.Keyword.Isa,Dt.Keyword.For,Dt.Keyword.New,Dt.Keyword.Not,Dt.Keyword.End,Dt.Keyword.Then,Dt.Keyword.Else,Dt.Keyword.Break,Dt.Keyword.While,Dt.Keyword.Return,Dt.Keyword.Function,Dt.Keyword.Continue,Aj.GreyScriptKeyword.ImportCode,Is.GreybelKeyword.Envar,Is.GreybelKeyword.Import,Is.GreybelKeyword.Include,Is.GreybelKeyword.Debugger,Is.GreybelKeyword.Line,Is.GreybelKeyword.File].map(n=>({label:n,kind:14}))});var qS=S(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});gc.AVAILABLE_OPERATORS=void 0;var oa=vs(),bt=me();gc.AVAILABLE_OPERATORS=[bt.Operator.Plus,bt.Operator.Asterik,bt.Operator.Minus,bt.Operator.Slash,bt.Operator.Power,bt.Operator.Modulo,bt.Operator.LessThan,bt.Operator.GreaterThan,bt.Operator.LessThanOrEqual,bt.Operator.GreaterThanOrEqual,bt.Operator.NotEqual,bt.Operator.Equal,bt.Operator.AddShorthand,bt.Operator.SubtractShorthand,bt.Operator.MultiplyShorthand,bt.Operator.DivideShorthand,oa.Operator.BitwiseAnd,oa.Operator.BitwiseOr,oa.Operator.LeftShift,oa.Operator.RightShift,oa.Operator.UnsignedRightShift,bt.Operator.Assign,bt.Operator.Reference].map(n=>({label:n,kind:24}))});var NS=S(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.activate=tn.getDefaultCompletionList=tn.getPropertyCompletionList=void 0;var FS=me(),Dj=CS(),jj=ks(),Lj=AS(),Mj=MS(),qj=qS(),Fj=(n,e)=>B(tn,null,function*(){let r=yield n.lookupBasePath(e);return r===null?null:r.getAllIdentifier()});tn.getPropertyCompletionList=Fj;var Nj=()=>[...Mj.AVAILABLE_KEYWORDS,...qj.AVAILABLE_OPERATORS,...Lj.AVAILABLE_CONSTANTS];tn.getDefaultCompletionList=Nj;function $j(n){n.connection.onCompletion(e=>B(this,null,function*(){if(!n.getConfiguration().autocomplete)return;let r=yield n.fs.getTextDocument(e.textDocument.uri);if(r==null)return;let t=yield n.documentManager.getLatest(r),i=new jj.LookupHelper(t.textDocument,n),s=i.lookupAST(e.position),o=new Dj.CompletionListBuilder,l=!1;if(s){let{closest:u}=s;u instanceof FS.ASTMemberExpression?(o.addCollection(yield(0,tn.getPropertyCompletionList)(i,u)),l=!0):u instanceof FS.ASTIndexExpression?(o.addCollection(yield(0,tn.getPropertyCompletionList)(i,u)),l=!0):(o.setDefault((0,tn.getDefaultCompletionList)()),o.addCollection(yield i.findAllAvailableIdentifierRelatedToPosition(s.closest)))}else o.setDefault((0,tn.getDefaultCompletionList)()),o.addCollection(yield i.findAllAvailableIdentifierInRoot());return o.build()})),n.connection.onCompletionResolve(e=>e)}tn.activate=$j});var US=S((VW,$S)=>{"use strict";$S.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Hy=S((HW,WS)=>{var aa=US(),BS={};for(let n of Object.keys(aa))BS[aa[n]]=n;var Z={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};WS.exports=Z;for(let n of Object.keys(Z)){if(!("channels"in Z[n]))throw new Error("missing channels property: "+n);if(!("labels"in Z[n]))throw new Error("missing channel labels property: "+n);if(Z[n].labels.length!==Z[n].channels)throw new Error("channel and label counts mismatch: "+n);let{channels:e,labels:r}=Z[n];delete Z[n].channels,delete Z[n].labels,Object.defineProperty(Z[n],"channels",{value:e}),Object.defineProperty(Z[n],"labels",{value:r})}Z.rgb.hsl=function(n){let e=n[0]/255,r=n[1]/255,t=n[2]/255,i=Math.min(e,r,t),s=Math.max(e,r,t),o=s-i,l,u;s===i?l=0:e===s?l=(r-t)/o:r===s?l=2+(t-e)/o:t===s&&(l=4+(e-r)/o),l=Math.min(l*60,360),l<0&&(l+=360);let a=(i+s)/2;return s===i?u=0:a<=.5?u=o/(s+i):u=o/(2-s-i),[l,u*100,a*100]};Z.rgb.hsv=function(n){let e,r,t,i,s,o=n[0]/255,l=n[1]/255,u=n[2]/255,a=Math.max(o,l,u),c=a-Math.min(o,l,u),p=function(d){return(a-d)/6/c+1/2};return c===0?(i=0,s=0):(s=c/a,e=p(o),r=p(l),t=p(u),o===a?i=t-r:l===a?i=1/3+e-t:u===a&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,a*100]};Z.rgb.hwb=function(n){let e=n[0],r=n[1],t=n[2],i=Z.rgb.hsl(n)[0],s=1/255*Math.min(e,Math.min(r,t));return t=1-1/255*Math.max(e,Math.max(r,t)),[i,s*100,t*100]};Z.rgb.cmyk=function(n){let e=n[0]/255,r=n[1]/255,t=n[2]/255,i=Math.min(1-e,1-r,1-t),s=(1-e-i)/(1-i)||0,o=(1-r-i)/(1-i)||0,l=(1-t-i)/(1-i)||0;return[s*100,o*100,l*100,i*100]};function Uj(n,e){return ut(n[0]-e[0],2)+ut(n[1]-e[1],2)+ut(n[2]-e[2],2)}Z.rgb.keyword=function(n){let e=BS[n];if(e)return e;let r=1/0,t;for(let i of Object.keys(aa)){let s=aa[i],o=Uj(n,s);o<r&&(r=o,t=i)}return t};Z.keyword.rgb=function(n){return aa[n]};Z.rgb.xyz=function(n){let e=n[0]/255,r=n[1]/255,t=n[2]/255;e=e>.04045?ut((e+.055)/1.055,2.4):e/12.92,r=r>.04045?ut((r+.055)/1.055,2.4):r/12.92,t=t>.04045?ut((t+.055)/1.055,2.4):t/12.92;let i=e*.4124+r*.3576+t*.1805,s=e*.2126+r*.7152+t*.0722,o=e*.0193+r*.1192+t*.9505;return[i*100,s*100,o*100]};Z.rgb.lab=function(n){let e=Z.rgb.xyz(n),r=e[0],t=e[1],i=e[2];r/=95.047,t/=100,i/=108.883,r=r>.008856?ut(r,1/3):7.787*r+16/116,t=t>.008856?ut(t,1/3):7.787*t+16/116,i=i>.008856?ut(i,1/3):7.787*i+16/116;let s=116*t-16,o=500*(r-t),l=200*(t-i);return[s,o,l]};Z.hsl.rgb=function(n){let e=n[0]/360,r=n[1]/100,t=n[2]/100,i,s,o;if(r===0)return o=t*255,[o,o,o];t<.5?i=t*(1+r):i=t+r-t*r;let l=2*t-i,u=[0,0,0];for(let a=0;a<3;a++)s=e+1/3*-(a-1),s<0&&s++,s>1&&s--,6*s<1?o=l+(i-l)*6*s:2*s<1?o=i:3*s<2?o=l+(i-l)*(2/3-s)*6:o=l,u[a]=o*255;return u};Z.hsl.hsv=function(n){let e=n[0],r=n[1]/100,t=n[2]/100,i=r,s=Math.max(t,.01);t*=2,r*=t<=1?t:2-t,i*=s<=1?s:2-s;let o=(t+r)/2,l=t===0?2*i/(s+i):2*r/(t+r);return[e,l*100,o*100]};Z.hsv.rgb=function(n){let e=n[0]/60,r=n[1]/100,t=n[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),o=255*t*(1-r),l=255*t*(1-r*s),u=255*t*(1-r*(1-s));switch(t*=255,i){case 0:return[t,u,o];case 1:return[l,t,o];case 2:return[o,t,u];case 3:return[o,l,t];case 4:return[u,o,t];case 5:return[t,o,l]}};Z.hsv.hsl=function(n){let e=n[0],r=n[1]/100,t=n[2]/100,i=Math.max(t,.01),s,o;o=(2-r)*t;let l=(2-r)*i;return s=r*i,s/=l<=1?l:2-l,s=s||0,o/=2,[e,s*100,o*100]};Z.hwb.rgb=function(n){let e=n[0]/360,r=n[1]/100,t=n[2]/100,i=r+t,s;i>1&&(r/=i,t/=i);let o=Math.floor(6*e),l=1-t;s=6*e-o,o&1&&(s=1-s);let u=r+s*(l-r),a,c,p;switch(o){default:case 6:case 0:a=l,c=u,p=r;break;case 1:a=u,c=l,p=r;break;case 2:a=r,c=l,p=u;break;case 3:a=r,c=u,p=l;break;case 4:a=u,c=r,p=l;break;case 5:a=l,c=r,p=u;break}return[a*255,c*255,p*255]};Z.cmyk.rgb=function(n){let e=n[0]/100,r=n[1]/100,t=n[2]/100,i=n[3]/100,s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,r*(1-i)+i),l=1-Math.min(1,t*(1-i)+i);return[s*255,o*255,l*255]};Z.xyz.rgb=function(n){let e=n[0]/100,r=n[1]/100,t=n[2]/100,i,s,o;return i=e*3.2406+r*-1.5372+t*-.4986,s=e*-.9689+r*1.8758+t*.0415,o=e*.0557+r*-.204+t*1.057,i=i>.0031308?1.055*ut(i,1/2.4)-.055:i*12.92,s=s>.0031308?1.055*ut(s,1/2.4)-.055:s*12.92,o=o>.0031308?1.055*ut(o,1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*255]};Z.xyz.lab=function(n){let e=n[0],r=n[1],t=n[2];e/=95.047,r/=100,t/=108.883,e=e>.008856?ut(e,1/3):7.787*e+16/116,r=r>.008856?ut(r,1/3):7.787*r+16/116,t=t>.008856?ut(t,1/3):7.787*t+16/116;let i=116*r-16,s=500*(e-r),o=200*(r-t);return[i,s,o]};Z.lab.xyz=function(n){let e=n[0],r=n[1],t=n[2],i,s,o;s=(e+16)/116,i=r/500+s,o=s-t/200;let l=ut(s,3),u=ut(i,3),a=ut(o,3);return s=l>.008856?l:(s-16/116)/7.787,i=u>.008856?u:(i-16/116)/7.787,o=a>.008856?a:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};Z.lab.lch=function(n){let e=n[0],r=n[1],t=n[2],i;i=Math.atan2(t,r)*360/2/Math.PI,i<0&&(i+=360);let o=Math.sqrt(r*r+t*t);return[e,o,i]};Z.lch.lab=function(n){let e=n[0],r=n[1],i=n[2]/360*2*Math.PI,s=r*Math.cos(i),o=r*Math.sin(i);return[e,s,o]};Z.rgb.ansi16=function(n,e=null){let[r,t,i]=n,s=e===null?Z.rgb.hsv(n)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(t/255)<<1|Math.round(r/255));return s===2&&(o+=60),o};Z.hsv.ansi16=function(n){return Z.rgb.ansi16(Z.hsv.rgb(n),n[2])};Z.rgb.ansi256=function(n){let e=n[0],r=n[1],t=n[2];return e===r&&r===t?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(t/255*5)};Z.ansi16.rgb=function(n){let e=n%10;if(e===0||e===7)return n>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(~~(n>50)+1)*.5,t=(e&1)*r*255,i=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[t,i,s]};Z.ansi256.rgb=function(n){if(n>=232){let s=(n-232)*10+8;return[s,s,s]}n-=16;let e,r=Math.floor(n/36)/5*255,t=Math.floor((e=n%36)/6)/5*255,i=e%6/5*255;return[r,t,i]};Z.rgb.hex=function(n){let r=(((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};Z.hex.rgb=function(n){let e=n.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split("").map(l=>l+l).join(""));let t=parseInt(r,16),i=t>>16&255,s=t>>8&255,o=t&255;return[i,s,o]};Z.rgb.hcg=function(n){let e=n[0]/255,r=n[1]/255,t=n[2]/255,i=Math.max(Math.max(e,r),t),s=Math.min(Math.min(e,r),t),o=i-s,l,u;return o<1?l=s/(1-o):l=0,o<=0?u=0:i===e?u=(r-t)/o%6:i===r?u=2+(t-e)/o:u=4+(e-r)/o,u/=6,u%=1,[u*360,o*100,l*100]};Z.hsl.hcg=function(n){let e=n[1]/100,r=n[2]/100,t=r<.5?2*e*r:2*e*(1-r),i=0;return t<1&&(i=(r-.5*t)/(1-t)),[n[0],t*100,i*100]};Z.hsv.hcg=function(n){let e=n[1]/100,r=n[2]/100,t=e*r,i=0;return t<1&&(i=(r-t)/(1-t)),[n[0],t*100,i*100]};Z.hcg.rgb=function(n){let e=n[0]/360,r=n[1]/100,t=n[2]/100;if(r===0)return[t*255,t*255,t*255];let i=[0,0,0],s=e%1*6,o=s%1,l=1-o,u=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=l,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=l,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=l}return u=(1-r)*t,[(r*i[0]+u)*255,(r*i[1]+u)*255,(r*i[2]+u)*255]};Z.hcg.hsv=function(n){let e=n[1]/100,r=n[2]/100,t=e+r*(1-e),i=0;return t>0&&(i=e/t),[n[0],i*100,t*100]};Z.hcg.hsl=function(n){let e=n[1]/100,t=n[2]/100*(1-e)+.5*e,i=0;return t>0&&t<.5?i=e/(2*t):t>=.5&&t<1&&(i=e/(2*(1-t))),[n[0],i*100,t*100]};Z.hcg.hwb=function(n){let e=n[1]/100,r=n[2]/100,t=e+r*(1-e);return[n[0],(t-e)*100,(1-t)*100]};Z.hwb.hcg=function(n){let e=n[1]/100,t=1-n[2]/100,i=t-e,s=0;return i<1&&(s=(t-i)/(1-i)),[n[0],i*100,s*100]};Z.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]};Z.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]};Z.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]};Z.gray.hsl=function(n){return[0,0,n[0]]};Z.gray.hsv=Z.gray.hsl;Z.gray.hwb=function(n){return[0,100,n[0]]};Z.gray.cmyk=function(n){return[0,0,0,n[0]]};Z.gray.lab=function(n){return[n[0],0,0]};Z.gray.hex=function(n){let e=Math.round(n[0]/100*255)&255,t=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(t.length)+t};Z.rgb.gray=function(n){return[(n[0]+n[1]+n[2])/3/255*100]}});var HS=S((GW,VS)=>{var yc=Hy();function Bj(){let n={},e=Object.keys(yc);for(let r=e.length,t=0;t<r;t++)n[e[t]]={distance:-1,parent:null};return n}function Wj(n){let e=Bj(),r=[n];for(e[n].distance=0;r.length;){let t=r.pop(),i=Object.keys(yc[t]);for(let s=i.length,o=0;o<s;o++){let l=i[o],u=e[l];u.distance===-1&&(u.distance=e[t].distance+1,u.parent=t,r.unshift(l))}}return e}function Vj(n,e){return function(r){return e(n(r))}}function Hj(n,e){let r=[e[n].parent,n],t=yc[e[n].parent][n],i=e[n].parent;for(;e[i].parent;)r.unshift(e[i].parent),t=Vj(yc[e[i].parent][i],t),i=e[i].parent;return t.conversion=r,t}VS.exports=function(n){let e=Wj(n),r={},t=Object.keys(e);for(let i=t.length,s=0;s<i;s++){let o=t[s];e[o].parent!==null&&(r[o]=Hj(o,e))}return r}});var GS=S((KW,zS)=>{var zy=Hy(),zj=HS(),Es={},Gj=Object.keys(zy);function Kj(n){let e=function(...r){let t=r[0];return t==null?t:(t.length>1&&(r=t),n(r))};return"conversion"in n&&(e.conversion=n.conversion),e}function Yj(n){let e=function(...r){let t=r[0];if(t==null)return t;t.length>1&&(r=t);let i=n(r);if(typeof i=="object")for(let s=i.length,o=0;o<s;o++)i[o]=Math.round(i[o]);return i};return"conversion"in n&&(e.conversion=n.conversion),e}Gj.forEach(n=>{Es[n]={},Object.defineProperty(Es[n],"channels",{value:zy[n].channels}),Object.defineProperty(Es[n],"labels",{value:zy[n].labels});let e=zj(n);Object.keys(e).forEach(t=>{let i=e[t];Es[n][t]=Yj(i),Es[n][t].raw=Kj(i)})});zS.exports=Es});var YS=S(Rs=>{"use strict";var Qj=Rs&&Rs.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Rs,"__esModule",{value:!0});Rs.activate=void 0;var Gy=Qj(GS()),Jj=me(),KS;(function(n){n.Black="black",n.Blue="blue",n.Green="green",n.Orange="orange",n.Purple="purple",n.Red="red",n.White="white",n.Yellow="yellow"})(KS||(KS={}));var Ky={black:"#000000",blue:"#0000FF",green:"#00FF00",orange:"#FF8800",purple:"#CC8899",red:"#FF0000",white:"#FFFFFF",yellow:"#FFFF00"},Zj=()=>new RegExp(`(?:mark|color)=(${Object.keys(Ky).join("|")}|(?:#[0-9a-f]{6}|#[0-9a-f]{3}))`,"ig"),Xj=Object.prototype.hasOwnProperty;function eL(n){n.connection.onColorPresentation(e=>[{label:`#${Gy.default.rgb.hex(e.color.red*255,e.color.green*255,e.color.blue*255)}`}]),n.connection.onDocumentColor(e=>B(this,null,function*(){let r=yield n.fs.getTextDocument(e.textDocument.uri);if(r==null)return;let s=(yield n.documentManager.getLatest(r)).document.literals.filter(u=>u.type===Jj.ASTType.StringLiteral),o=[],l=({match:u,markup:a,value:c,astPosition:p,lineIndex:d})=>{let h=u.index+a.indexOf("=")+1,g=h+c.length,f=p.line-1+d,m=h,b=g;return d===0&&(m+=p.character,b+=p.character),{start:{line:f,character:m},end:{line:f,character:b}}};for(let u=0;u<s.length;u++){let a=s[u];if(!a.start)continue;let c=a.start,p=a.value.toString().split(`
109
+ `)}else if(i instanceof ye.ASTComment)return i.value;return r}resolveFunctionStatement(e){let r=ve.SignatureDefinitionFunction.parse({type:ve.SignatureDefinitionBaseType.Function,description:this.createFunctionDescription(e),arguments:e.parameters.map(t=>{var s,o,l;if(t.type===ye.ASTType.Identifier)return{label:(s=t.name)!=null?s:"unknown",type:ve.SignatureDefinitionBaseType.Any};let i=t;return{label:(l=(o=i.variable)==null?void 0:o.name)!=null?l:"unknown",types:Array.from(this.resolveTypeWithDefault(i.init).types)}}),returns:["any"]});return this.factory(ge.CompletionItemKind.Function).addType(ve.SignatureDefinitionBaseType.Function).addSignatureType((0,_D.enrichWithMetaInformation)(r)).setLine(e.start.line)}resolveParenthesisExpression(e){return this.resolveTypeWithDefault(e.expression)}resolveBinaryExpression(e){let r=this.factory(ge.CompletionItemKind.Expression).setLabel("Binary Expr").setLine(e.start.line),t=this.resolveTypeWithDefault(e.left),i=this.resolveTypeWithDefault(e.right);return r.extend(t),r.extend(i),r}resolveLogicalExpression(e){return this.factory(ge.CompletionItemKind.Expression).setLabel("Logical Expr").addType(ve.SignatureDefinitionBaseType.Number).setLine(e.start.line)}resolveComparisonGroupExpression(e){return this.factory(ge.CompletionItemKind.Expression).setLabel("Comparison Group Expr").addType(ve.SignatureDefinitionBaseType.Number).setLine(e.start.line)}resolveIsaExpression(e){return this.factory(ge.CompletionItemKind.Expression).setLabel("Isa Expr").addType(ve.SignatureDefinitionBaseType.Number).setLine(e.start.line)}resolveCallStatement(e){let r=this.resolveNamespace(e);return r===null?this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any).setLine(e.start.line):r}resolveCallExpression(e){let r=this.resolveNamespace(e);return r===null?this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any).setLine(e.start.line):r}resolveUnaryExpression(e){let r=this.resolveNamespace(e);return r===null?this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any).setLine(e.start.line):r}resolveMapConstructorExpression(e){var t;let r=this.factory(ge.CompletionItemKind.MapConstructor).addType(ve.SignatureDefinitionBaseType.Map);for(let i=0;i<e.fields.length;i++){let s=e.fields[i],o=this.resolveTypeWithDefault(s.value).setLine(s.start.line);if(s.key.type===ye.ASTType.StringLiteral){let l=s.key.value.toString();r.setProperty(l,o),(t=r.values.get(`i:${l}`))==null||t.definitions.push({source:this._document.source,node:s})}else{let l=this.resolveTypeWithDefault(s.key).setLine(s.start.line);r.setProperty(l,o)}}return this.createCustomTypeFromMap(e,r),r.setLabel("{}").setLine(e.start.line)}resolveListConstructorExpression(e){let r=this.factory(ge.CompletionItemKind.ListConstructor).addType(ve.SignatureDefinitionBaseType.List);for(let t=0;t<e.fields.length;t++){let i=e.fields[t],s=this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Number).setLine(i.start.line),o=this.resolveTypeWithDefault(i.value).setLine(i.start.line);r.setProperty(s,o)}return r.setLabel("[]").setLine(e.start.line)}resolveSliceExpression(e){let r=this.resolveNamespace(e);return r===null?this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any).setLine(e.start.line):r.setLine(e.start.line)}resolveIndexExpression(e,r=!1){let t=this.resolveNamespace(e,r);return t===null?this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any).setLine(e.start.line):t}resolveMemberExpression(e,r=!1){let t=this.resolveNamespace(e,r);return t===null?this.factory(ge.CompletionItemKind.Property).addType(ve.SignatureDefinitionBaseType.Any).setLabel(e.identifier.name).setLine(e.start.line):t}resolveIdentifier(e,r=!1){let t=this.resolveNamespace(e,r);return t===null?this.factory(ge.CompletionItemKind.Property).addType(ve.SignatureDefinitionBaseType.Any).setLabel(e.name).setLine(e.start.line):t}resolveType(e,r=!1){if(e==null)return null;switch(e.type){case ye.ASTType.ParenthesisExpression:return this.resolveParenthesisExpression(e);case ye.ASTType.CallStatement:return this.resolveCallStatement(e);case ye.ASTType.CallExpression:return this.resolveCallExpression(e);case ye.ASTType.BinaryExpression:return this.resolveBinaryExpression(e);case ye.ASTType.LogicalExpression:return this.resolveLogicalExpression(e);case ye.ASTType.IsaExpression:return this.resolveIsaExpression(e);case ye.ASTType.ComparisonGroupExpression:return this.resolveComparisonGroupExpression(e);case ye.ASTType.FunctionDeclaration:return this.resolveFunctionStatement(e);case ye.ASTType.SliceExpression:return this.resolveSliceExpression(e);case ye.ASTType.IndexExpression:return this.resolveIndexExpression(e,r);case ye.ASTType.MemberExpression:return this.resolveMemberExpression(e,r);case ye.ASTType.Identifier:return this.resolveIdentifier(e,r);case ye.ASTType.MapConstructorExpression:return this.resolveMapConstructorExpression(e);case ye.ASTType.ListConstructorExpression:return this.resolveListConstructorExpression(e);case ye.ASTType.NegationExpression:case ye.ASTType.BinaryNegatedExpression:case ye.ASTType.UnaryExpression:return this.resolveUnaryExpression(e);case ye.ASTType.NilLiteral:return this.factory(ge.CompletionItemKind.Literal).addType("null").setLabel("null").setLine(e.start.line);case ye.ASTType.StringLiteral:{let t=e.value.toString();return this.factory(ge.CompletionItemKind.Literal).addType(ve.SignatureDefinitionBaseType.String).setLabel(`"${t.length>20?t.substr(0,20)+"...":t}"`).setLine(e.start.line)}case ye.ASTType.NumericLiteral:case ye.ASTType.BooleanLiteral:{let t=e.value.toString();return this.factory(ge.CompletionItemKind.Literal).addType(ve.SignatureDefinitionBaseType.Number).setLabel(t).setLine(e.start.line)}case tc.ASTType.FeatureFileExpression:return this.factory(ge.CompletionItemKind.Expression).addType(ve.SignatureDefinitionBaseType.String).setLabel("File Expr").setLine(e.start.line);case tc.ASTType.FeatureLineExpression:return this.factory(ge.CompletionItemKind.Expression).addType(ve.SignatureDefinitionBaseType.Number).setLabel("Line Expr").setLine(e.start.line);case tc.ASTType.FeatureEnvarExpression:return this.factory(ge.CompletionItemKind.Expression).addType(ve.SignatureDefinitionBaseType.String).setLabel("Envar Expr").setLine(e.start.line);case tc.ASTType.FeatureInjectExpression:return this.factory(ge.CompletionItemKind.Expression).addType(ve.SignatureDefinitionBaseType.String).setLabel("Inject Expr").setLine(e.start.line);default:return null}}resolveTypeWithDefault(e=null,r=!1){let t=this.resolveType(e,r);if(t==null){let i=this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any);return e!=null&&i.setLine(e.start.line),i}return t}resolveChain(e,r=!1){var l,u,a,c,p,d,h,g,f,m,b;if(e.length===0)return null;let t=null,i=e[0],s=((l=i.unary)==null?void 0:l.operator)==="@"&&!i.isInCallExpression||r&&e.length===1;if((0,ci.isResolveChainItemWithIdentifier)(i))if(i.getter.name==="globals")t=this._scope.globals;else if(i.getter.name==="outer")t=this._scope.outer;else if(i.getter.name==="locals")t=this._scope.locals;else if(i.getter.name==="super"){let v=(a=(u=this._document.getScopeContext(i.ref.scope))==null?void 0:u.scope.context)==null?void 0:a.getIsa();v==null?t=this.factory(ge.CompletionItemKind.Constant).addType("null").setLabel("super"):t=v.copy({kind:ge.CompletionItemKind.Constant,label:"super",values:v.values})}else if(i.getter.name==="self"){let v=(c=this._document.getScopeContext(i.ref.scope))==null?void 0:c.scope.context;v==null?t=this.factory(ge.CompletionItemKind.Constant).addType("null").setLabel("self"):t=v.copy({kind:ge.CompletionItemKind.Constant,label:"self",values:v.values})}else t=(p=this._scope.resolveNamespace(i.getter.name,s))!=null?p:this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any).setLabel(i.getter.name);else if((0,ci.isResolveChainItemWithValue)(i))t=this.resolveTypeWithDefault(i.value,s);else return null;if(((d=i.unary)==null?void 0:d.operator)===ye.Keyword.New&&t!==null){let v=this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Map).setLabel(t.label);v.setProperty("__isa",t),this.createCustomTypeFromMap(i.unary,v),t=v}let o=e.length;for(let v=1;v<o&&t!==null;v++){let _=e[v],w=((h=_.unary)==null?void 0:h.operator)==="@"&&!_.isInCallExpression||r&&e.length-1===v;if((0,ci.isResolveChainItemWithMember)(_))t=(g=t.resolveProperty(_.getter.name,w))!=null?g:this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any).setLabel(_.getter.name);else if((0,ci.isResolveChainItemWithIndex)(_))if((0,wS.isValidIdentifierLiteral)(_.getter)){let k=_.getter.value.toString();t=(f=t.resolveProperty(k,_.isInCallExpression))!=null?f:this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any).setLabel(k)}else{let k=this.resolveTypeWithDefault(_.getter);t=(m=t.resolveProperty(k,_.isInCallExpression))!=null?m:this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any)}else if(_.ref.type===ye.ASTType.SliceExpression)t=t.copy();else return null;if(((b=_.unary)==null?void 0:b.operator)===ye.Keyword.New&&t!==null){let k=this.factory(ge.CompletionItemKind.Property).addType(ve.SignatureDefinitionBaseType.Map).setLabel(t.label);k.setProperty("__isa",t),this.createCustomTypeFromMap(_.unary,k),t=k}}return t}setEntityInPath(e,r,t){let i=e;for(let s=0;s<r.length-1;s++){let o=r[s],l=i.resolveProperty(o);if(l==null){let u=this.factory(ge.CompletionItemKind.Property).addType(ve.SignatureDefinitionBaseType.Map).setLabel(o);i.setProperty(o,u),l=u}i=l}return i.setProperty(r[r.length-1],t)}getEntityInPath(e,r){let t=e;for(let i=0;i<r.length;i++){let s=r[i],o=t.resolveProperty(s);if(o==null)return null;t=o}return t}resolveNamespace(e,r=!1){let t=(0,_S.createResolveChain)(e);return this.resolveChain(t,r)}defineProperty(e,r,t){let i=e.setProperty(r,t);return this._lastModifiedProperty=e.resolveProperty(r,!0),i}defineNamespace(e,r){let t=(0,_S.createResolveChain)(e),i=t.pop();if(this._lastModifiedProperty=null,t.length>0){let o=this.resolveChain(t);if(o===null)return!1;if((0,ci.isResolveChainItemWithMember)(i))return this.defineProperty(o,i.getter.name,r);if((0,ci.isResolveChainItemWithIndex)(i)){if((0,wS.isValidIdentifierLiteral)(i.getter))return this.defineProperty(o,i.getter.value.toString(),r);{let l=this.resolveTypeWithDefault(i.getter);return this.defineProperty(o,l,r)}}return!1}let s=this._scope;return(0,ci.isResolveChainItemWithIdentifier)(i)?this.defineProperty(s,i.getter.name,r):!1}addDefinition(e){var s;(s=this._lastModifiedProperty)==null||s.definitions.push({source:this._document.source,node:e});let r=(0,vS.createExpressionId)(e.variable),t=this._definitions;r.startsWith("globals.")?(t=this._document.getRootScopeContext().aggregator.definitions,r=r.slice(8)):r.startsWith("locals.")?(t=this._definitions,r=r.slice(7)):r.startsWith("outer.")&&(t=this.parent.definitions,r=r.slice(6));let i=t.get(r);i?i.push({source:this._document.source,node:e}):t.set(r,[{source:this._document.source,node:e}])}resolveAvailableAssignmentsWithQuery(e){let r=[],t=new Set([this,this._parent,this._document.getRootScopeContext().aggregator]);for(let i of t){let s=i.definitions;for(let o of s.keys())if(o.includes(e)){let l=s.get(o);(0,xS.merge)(r,l)}}return r}resolveAvailableAssignments(e){let r=(0,vS.createExpressionId)(e),t=this;r.startsWith("globals.")?(t=this._document.getRootScopeContext().aggregator,r=r.slice(8)):r.startsWith("locals.")?(t=this,r=r.slice(7)):r.startsWith("outer.")&&(t=this.parent,r=r.slice(6));let i=[],s=new Set([t,t._parent,t._document.getRootScopeContext().aggregator]);for(let o of s){if(o==null)continue;let l=o.resolveNamespace(e,!0);l!=null&&(0,xS.merge)(i,l.definitions)}return i}analyze(){var e,r;for(let t=0;t<this._root.assignments.length;t++){let i=this._root.assignments[t],s=(r=(e=this.resolveType(i.init))==null?void 0:e.copy({source:this._document.source}).setLine(i.start.line))!=null?r:this.factory(ge.CompletionItemKind.Variable).addType(ve.SignatureDefinitionBaseType.Any).setLine(i.start.line);this.defineNamespace(i.variable,s),this.addDefinition(i)}}extend(e){for(let[r,t]of e.definitions){let i=this.definitions.get(r);i?(0,wD.mergeUnique)(i,t):this.definitions.set(r,t)}}};nc.Aggregator=yy});var _y=S(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});rc.Document=void 0;var rr=en(),TD=me(),kS=si(),SD=gy(),TS=by(),SS=ys(),IS=Yg(),vy=class n{get source(){return this._source}get root(){return this._root}get container(){return this._container}get intrinsics(){return this._intrinscis}get globals(){return this._globals}get api(){return this._api}constructor(e){var r,t,i,s;this._source=e.source,this._root=e.root,this._container=e.container,this._scopeMapping=(r=e.scopeMapping)!=null?r:new WeakMap,this._intrinscis=(t=e.intrinsics)!=null?t:this.createIntrinscis(),this._api=(i=e.api)!=null?i:this.initApi(),this._globals=(s=e.globals)!=null?s:this.initGlobals()}createIntrinscis(){return{map:this._container.primitives.get(rr.SignatureDefinitionBaseType.Map),funcRef:this._container.primitives.get(rr.SignatureDefinitionBaseType.Function),number:this._container.primitives.get(rr.SignatureDefinitionBaseType.Number),string:this._container.primitives.get(rr.SignatureDefinitionBaseType.String),list:this._container.primitives.get(rr.SignatureDefinitionBaseType.List)}}initApi(){let e=this._container.primitives.get(rr.SignatureDefinitionBaseType.General);return e.resolveProperty("map",!0).setReturnEntity(this._intrinscis.map),e.resolveProperty("funcRef",!0).setReturnEntity(this._intrinscis.funcRef),e.resolveProperty("number",!0).setReturnEntity(this._intrinscis.number),e.resolveProperty("string",!0).setReturnEntity(this._intrinscis.string),e.resolveProperty("list",!0).setReturnEntity(this._intrinscis.list),e}initGlobals(){return new SS.Entity({source:this._source,kind:kS.CompletionItemKind.Constant,container:this._container,label:"globals"}).addType(rr.SignatureDefinitionBaseType.Map)}analyzeScope(e){let r=this._scopeMapping.get(e.scope),t=new IS.Scope({source:this._source,container:this._container,parent:r==null?void 0:r.scope,globals:this._globals}),i=new TS.Aggregator({scope:t,root:e,document:this,parent:r==null?void 0:r.aggregator});this._scopeMapping.set(e,{scope:t,aggregator:i});let s=e.assignment instanceof TD.ASTAssignmentStatement?this.resolveNamespace(e.assignment.variable,!0):null;if(s!==null){let o=s==null?void 0:s.context;o!=null&&o.types.has(rr.SignatureDefinitionBaseType.Map)&&o!==this._globals&&t.setContext(o)}if(i.analyze(),s!==null){let o=s.signatureDefinitions.last();if(o!=null){let l=o.getArguments();for(let u=0;u<l.length;u++){let a=l[u],c=t.resolveProperty(a.getLabel(),!0),p=a.getTypes().map(d=>d.type);c===null?t.setProperty(a.getLabel(),new SS.Entity({source:this._source,kind:kS.CompletionItemKind.Variable,container:this._container}).addTypes(p)):(c.types.delete(rr.SignatureDefinitionBaseType.Any),c.addTypes(p))}}}}analyze(){let e=new IS.Scope({source:this._source,container:this._container,globals:this._globals,locals:this._globals}),r=new TS.Aggregator({scope:e,root:this._root,document:this});this._scopeMapping.set(this._root,{scope:e,aggregator:r}),r.analyze();for(let t=0;t<this._root.scopes.length;t++){let i=this._root.scopes[t];this.analyzeScope(i)}}getRootScopeContext(){return this._scopeMapping.get(this._root)}getAllScopeContexts(){return[this._root,...this._root.scopes].map(e=>this._scopeMapping.get(e))}getScopeContext(e){var r;return(r=this._scopeMapping.get(e))!=null?r:null}getLastASTItemOfLine(e){let r=this._root.lines[e];return r&&r.length>0?r[r.length-1]:null}findASTItemInLine(e,r){let t=this._root.lines[e];if(t&&t.length>0){let i=t.find(s=>s.type===r);if(i)return i}return null}resolveAllAssignmentsWithQuery(e){let r=[],t=[this._root,...this._root.scopes];for(let i=0;i<t.length;i++){let o=this._scopeMapping.get(t[i]).aggregator.definitions;for(let l of o.keys())if(l.includes(e)){let u=o.get(l);(0,SD.merge)(r,u)}}return r}resolveAvailableAssignments(e){var r,t;return(t=(r=this._scopeMapping.get(e.scope))==null?void 0:r.aggregator.resolveAvailableAssignments(e))!=null?t:[]}resolveType(e,r){var t,i;return(i=(t=this._scopeMapping.get(e.scope))==null?void 0:t.aggregator.resolveType(e,r))!=null?i:null}resolveTypeWithDefault(e,r){var t;return(t=this._scopeMapping.get(e.scope))==null?void 0:t.aggregator.resolveTypeWithDefault(e,r)}resolveNamespace(e,r=!1){var t,i;return(i=(t=this._scopeMapping.get(e.scope))==null?void 0:t.aggregator.resolveNamespace(e,r))!=null?i:null}merge(...e){let r=new n({source:this._source,root:this._root,container:this._container.copy()});for(let t=0;t<e.length;t++){let i=e[t];r._globals.extend(i._globals),r._intrinscis.map.extend(i._intrinscis.map),r._intrinscis.funcRef.extend(i._intrinscis.funcRef),r._intrinscis.number.extend(i._intrinscis.number),r._intrinscis.string.extend(i._intrinscis.string),r._intrinscis.list.extend(i._intrinscis.list),r._container.mergeCustomTypes(i._container)}r.analyze();for(let t=0;t<e.length;t++){let i=e[t];r.getRootScopeContext().aggregator.extend(i.getRootScopeContext().aggregator)}return r}};rc.Document=vy});var Ty=S(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});ic.ContainerProxy=void 0;var Sn=en(),ir=ys(),wy=si(),ES=Bo(),xy=Wu(),ky=class n{get primitives(){return this._primitives}get types(){return this._types}constructor(e){var r,t;this._container=e.container,this._primitives=(r=e.primitives)!=null?r:this.createPrimitives(),this._types=(t=e.types)!=null?t:this.createTypes(),this._customTypes=new Set}createPrimitives(){let e=new Map;for(let[r,t]of this._container.getPrimitives()){let i=new ir.Entity({source:"internal",kind:wy.CompletionItemKind.Constant,container:this,isAPI:r===Sn.SignatureDefinitionBaseType.General}).addType(Sn.SignatureDefinitionBaseType.Map).insertSignature(t);e.set(r,i)}return e}createTypes(){let e=new Map;for(let[r,t]of this._container.getTypes()){let i=new ir.Entity({source:"internal",kind:wy.CompletionItemKind.Constant,container:this}).addType(Sn.SignatureDefinitionBaseType.Map).insertSignature(t);e.set(r,i)}return e}setCustomType(e,r){this._types.has(e)||(this._types.set(e,r),this._customTypes.add(e))}mergeCustomTypes(e){for(let r of e._customTypes){let t=e._types.get(r);t!=null&&this.setCustomType(r,t.copy({deepCopy:!0}))}}getTypeSignature(e){var r,t;return(t=(r=this._primitives.get(e))!=null?r:this._types.get(e))!=null?t:null}searchDefinitionMatches(e,r){if(typeof e=="string")return this.searchDefinitionMatches([e],r);let t=e.includes(Sn.SignatureDefinitionBaseType.Any)?new Set(this._container.getAllVisibleTypes()):new Set(e),i=new Map;for(let s of t){let o=this.getTypeSignature(s);if(o===null)continue;let l=(0,xy.lookupProperty)(o,r);l!==null&&i.set(s,l)}return i}getDefinition(e,r,t=!1){if(typeof e=="string")return this.getDefinition([e],r);let i=(0,xy.lookupProperty)(this._primitives.get(Sn.SignatureDefinitionBaseType.Any),r);if(e.includes(Sn.SignatureDefinitionBaseType.Any)&&i)return(0,ir.resolveEntity)(this,i,t);let s=this.searchDefinitionMatches(e,r);if(s.size===0)return null;if(s.size===1)return(0,ir.resolveEntity)(this,s.values().next().value,t);if(s.has(Sn.SignatureDefinitionBaseType.Any))return(0,ir.resolveEntity)(this,s.get(Sn.SignatureDefinitionBaseType.Any),t);if(i!==null)return(0,ir.resolveEntity)(this,i,t);let o=new ir.Entity({source:"internal",label:r,kind:wy.CompletionItemKind.Property,container:this});for(let l of s.values()){let u=(0,ir.resolveEntity)(this,l,t);o.extend(u,!0)}return o}getGeneralDefinition(e,r=!1){let t=(0,xy.lookupProperty)(this._primitives.get(Sn.SignatureDefinitionBaseType.General),e);return t==null?null:(0,ir.resolveEntity)(this,t,r)}injectTypeIdentifiers(e,r){let t=this.getTypeSignature(r);if(t!=null&&((0,ES.injectIdentifers)(e,t),this._types.has(r))){let i=this._primitives.get(Sn.SignatureDefinitionBaseType.Map);(0,ES.injectIdentifers)(e,i)}}getAllIdentifier(e){let r=new Map;if(e===Sn.SignatureDefinitionBaseType.Any){let t=this._container.getAllVisibleTypes();for(let i=0;i<t.length;i++)this.injectTypeIdentifiers(r,t[i]);return r}return this.injectTypeIdentifiers(r,e),r}copy(){return new n({container:this._container})}};ic.ContainerProxy=ky});var RS=S(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});sc.TypeManager=void 0;var ID=_y(),ED=Ty(),Sy=class{constructor(e){this._container=new ED.ContainerProxy({container:e.container}),this._types=new Map}analyze(e,r){let t=new ID.Document({source:e,container:this._container.copy(),root:r});try{t.analyze()}catch(i){console.error(i)}return this._types.set(e,t),t}get(e){var r;return(r=this._types.get(e))!=null?r:null}};sc.TypeManager=Sy});var ta=S(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.TypeManager=te.ContainerProxy=te.Document=te.Aggregator=te.Scope=te.Entity=te.aggregateEntity=te.lookupProperty=te.isEligibleForProperties=te.injectIdentifers=te.isSignatureDefinitionFunction=te.isResolveChainItemWithValue=te.isResolveChainItemWithMember=te.isResolveChainItemWithIndex=te.isResolveChainItemWithIdentifier=te.CompletionItemKind=te.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION=te.ObjectSetIterator=te.ObjectSet=te.rotateBits=te.getStringHashCode=te.getHashCode=te.createResolveChain=te.enrichWithMetaInformation=te.createExpressionId=te.createExpressionHash=te.isValidIdentifierLiteral=void 0;var RD=Co();Object.defineProperty(te,"isValidIdentifierLiteral",{enumerable:!0,get:function(){return RD.isValidIdentifierLiteral}});var PD=AT();Object.defineProperty(te,"createExpressionHash",{enumerable:!0,get:function(){return PD.createExpressionHash}});var CD=ag();Object.defineProperty(te,"createExpressionId",{enumerable:!0,get:function(){return CD.createExpressionId}});var OD=Dg();Object.defineProperty(te,"enrichWithMetaInformation",{enumerable:!0,get:function(){return OD.enrichWithMetaInformation}});var AD=jg();Object.defineProperty(te,"createResolveChain",{enumerable:!0,get:function(){return AD.createResolveChain}});var Iy=og();Object.defineProperty(te,"getHashCode",{enumerable:!0,get:function(){return Iy.getHashCode}});Object.defineProperty(te,"getStringHashCode",{enumerable:!0,get:function(){return Iy.getStringHashCode}});Object.defineProperty(te,"rotateBits",{enumerable:!0,get:function(){return Iy.rotateBits}});var PS=Fg();Object.defineProperty(te,"ObjectSet",{enumerable:!0,get:function(){return PS.ObjectSet}});Object.defineProperty(te,"ObjectSetIterator",{enumerable:!0,get:function(){return PS.ObjectSetIterator}});var DD=Ng();Object.defineProperty(te,"DEFAULT_CUSTOM_FUNCTION_DESCRIPTION",{enumerable:!0,get:function(){return DD.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION}});var jD=si();Object.defineProperty(te,"CompletionItemKind",{enumerable:!0,get:function(){return jD.CompletionItemKind}});var oc=$g();Object.defineProperty(te,"isResolveChainItemWithIdentifier",{enumerable:!0,get:function(){return oc.isResolveChainItemWithIdentifier}});Object.defineProperty(te,"isResolveChainItemWithIndex",{enumerable:!0,get:function(){return oc.isResolveChainItemWithIndex}});Object.defineProperty(te,"isResolveChainItemWithMember",{enumerable:!0,get:function(){return oc.isResolveChainItemWithMember}});Object.defineProperty(te,"isResolveChainItemWithValue",{enumerable:!0,get:function(){return oc.isResolveChainItemWithValue}});var LD=Ug();Object.defineProperty(te,"isSignatureDefinitionFunction",{enumerable:!0,get:function(){return LD.isSignatureDefinitionFunction}});var MD=Bo();Object.defineProperty(te,"injectIdentifers",{enumerable:!0,get:function(){return MD.injectIdentifers}});var qD=Uu();Object.defineProperty(te,"isEligibleForProperties",{enumerable:!0,get:function(){return qD.isEligibleForProperties}});var FD=Wu();Object.defineProperty(te,"lookupProperty",{enumerable:!0,get:function(){return FD.lookupProperty}});var ND=Bg();Object.defineProperty(te,"aggregateEntity",{enumerable:!0,get:function(){return ND.aggregateEntity}});var $D=ys();Object.defineProperty(te,"Entity",{enumerable:!0,get:function(){return $D.Entity}});var UD=Yg();Object.defineProperty(te,"Scope",{enumerable:!0,get:function(){return UD.Scope}});var BD=by();Object.defineProperty(te,"Aggregator",{enumerable:!0,get:function(){return BD.Aggregator}});var WD=_y();Object.defineProperty(te,"Document",{enumerable:!0,get:function(){return WD.Document}});var VD=Ty();Object.defineProperty(te,"ContainerProxy",{enumerable:!0,get:function(){return VD.ContainerProxy}});var HD=RS();Object.defineProperty(te,"TypeManager",{enumerable:!0,get:function(){return HD.TypeManager}})});var Ey=S(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.getSymbolItemKind=_s.getCompletionItemKind=void 0;var Ot=ta(),zD=n=>{switch(n){case Ot.CompletionItemKind.Constant:return 21;case Ot.CompletionItemKind.Variable:return 6;case Ot.CompletionItemKind.Expression:return 6;case Ot.CompletionItemKind.Function:return 3;case Ot.CompletionItemKind.ListConstructor:case Ot.CompletionItemKind.MapConstructor:case Ot.CompletionItemKind.Literal:case Ot.CompletionItemKind.Unknown:return 12}};_s.getCompletionItemKind=zD;var GD=n=>{switch(n){case Ot.CompletionItemKind.Constant:return 14;case Ot.CompletionItemKind.Variable:return 13;case Ot.CompletionItemKind.Expression:return 13;case Ot.CompletionItemKind.Function:return 12;case Ot.CompletionItemKind.ListConstructor:return 18;case Ot.CompletionItemKind.MapConstructor:return 19;case Ot.CompletionItemKind.Literal:case Ot.CompletionItemKind.Unknown:return 13}};_s.getSymbolItemKind=GD});var CS=S(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});ac.CompletionListBuilder=void 0;var KD=Ey(),Ry=class{constructor(){this.collection=new Map,this.default=[]}setDefault(e){this.default=e}addCollection(e){e!=null&&(this.collection=new Map([...this.collection,...e]))}build(){let e=[];for(let[r,t]of this.collection)e.push({label:r,kind:(0,KD.getCompletionItemKind)(t.kind)});return[...e,...this.default]}};ac.CompletionListBuilder=Ry});var uc=S(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});ws.findEx=ws.ScraperWalker=void 0;var YD=me(),QD=function(n){return{ParenthesisExpression:(e,r)=>{n(e.expression,r)},AssignmentStatement:function(e,r){n(e.init,r),n(e.variable,r)},MemberExpression:function(e,r){n(e.base,r),n(e.identifier,r)},FunctionDeclaration:function(e,r){for(let t=0;t<e.parameters.length;t++)n(e.parameters[t],r);for(let t=0;t<e.body.length;t++)n(e.body[t],r)},MapConstructorExpression:function(e,r){for(let t=0;t<e.fields.length;t++)n(e.fields[t],r)},ReturnStatement:function(e,r){e.argument&&n(e.argument,r)},WhileStatement:function(e,r){n(e.condition,r);for(let t=0;t<e.body.length;t++)n(e.body[t],r)},IndexExpression:function(e,r){n(e.base,r),n(e.index,r)},SliceExpression:function(e,r){n(e.base,r),n(e.left,r),n(e.right,r)},ListValue:function(e,r){n(e.value,r)},MapKeyString:function(e,r){n(e.key,r),n(e.value,r)},IfShortcutStatement:function(e,r){for(let t=0;t<e.clauses.length;t++)n(e.clauses[t],r)},IfShortcutClause:function(e,r){n(e.condition,r);for(let t=0;t<e.body.length;t++)n(e.body[t],r)},ElseifShortcutClause:function(e,r){n(e.condition,r);for(let t=0;t<e.body.length;t++)n(e.body[t],r)},ElseShortcutClause:function(e,r){for(let t=0;t<e.body.length;t++)n(e.body[t],r)},ForGenericStatement:function(e,r){n(e.variable,r),n(e.iterator,r);for(let t=0;t<e.body.length;t++)n(e.body[t],r)},IfStatement:function(e,r){for(let t=0;t<e.clauses.length;t++)n(e.clauses[t],r)},IfClause:function(e,r){n(e.condition,r);for(let t=0;t<e.body.length;t++)n(e.body[t],r)},ElseifClause:function(e,r){n(e.condition,r);for(let t=0;t<e.body.length;t++)n(e.body[t],r)},ElseClause:function(e,r){for(let t=0;t<e.body.length;t++)n(e.body[t],r)},NegationExpression:function(e,r){n(e.argument,r)},CallExpression:function(e,r){n(e.base,r);for(let t=0;t<e.arguments.length;t++)n(e.arguments[t],r)},CallStatement:function(e,r){n(e.expression,r)},ListConstructorExpression:function(e,r){for(let t=0;t<e.fields.length;t++)n(e.fields[t],r)},BinaryExpression:function(e,r){n(e.left,r),n(e.right,r)},BinaryNegatedExpression:function(e,r){n(e.argument,r)},IsaExpression:function(e,r){n(e.left,r),n(e.right,r)},LogicalExpression:function(e,r){n(e.left,r),n(e.right,r)},ComparisonGroupExpression:function(e,r){for(let t=0;t<e.expressions.length;t++)n(e.expressions[t],r)},UnaryExpression:function(e,r){n(e.argument,r)},Chunk:function(e,r){for(let t=0;t<e.body.length;t++)n(e.body[t],r)},InvalidCodeExpression:()=>{}}},lc=class{constructor(e,r={}){this.map=Object.assign(QD(this.visit.bind(this)),r),this.callback=e,this.state={exit:!1,skip:!1}}visit(e,r=0){if(e==null)return;if(e.type==null)throw console.error("Error ast type:",e),new Error("Unexpected as type");let t=this.callback(e,r);if(t!=null&&Object.assign(this.state,t),this.state.exit||this.state.skip){this.state.skip=!1;return}let i=this.map[e.type];i!=null&&i.call(this,e,r+1)}};ws.ScraperWalker=lc;function JD(n,e){let r=[];return new lc((i,s)=>{let o=n(i,s)||{};return o.valid&&i.type!==YD.ASTType.InvalidCodeExpression&&r.push(i),{exit:!!o.exit,skip:!!o.skip}}).visit(e),r}ws.findEx=JD});var Py=S(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.lookupBase=Ft.lookupIdentifier=Ft.lookupScopes=Ft.lookupRootScope=void 0;var sr=me(),ZD=n=>{let e=n;for(;e.scope;)e=e.scope;return e};Ft.lookupRootScope=ZD;var XD=n=>{if(!n.scope)return[n];let e=(0,Ft.lookupRootScope)(n);return e===n.scope?[n,e]:[n,n.scope,e]};Ft.lookupScopes=XD;var ej=n=>{switch(n.type){case sr.ASTType.CallStatement:return(0,Ft.lookupIdentifier)(n.expression);case sr.ASTType.CallExpression:return(0,Ft.lookupIdentifier)(n.base);case sr.ASTType.Identifier:return n;case sr.ASTType.MemberExpression:return(0,Ft.lookupIdentifier)(n.identifier);case sr.ASTType.IndexExpression:return(0,Ft.lookupIdentifier)(n.index);default:return null}};Ft.lookupIdentifier=ej;var tj=(n=null)=>{switch(n==null?void 0:n.type){case sr.ASTType.MemberExpression:return n.base;case sr.ASTType.IndexExpression:return n.base;case sr.ASTType.CallExpression:return n.base;case sr.ASTType.SliceExpression:return n.base;default:return null}};Ft.lookupBase=tj});var ks=S(Vn=>{"use strict";var nj=Vn&&Vn.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),rj=Vn&&Vn.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),ij=Vn&&Vn.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var r in n)r!=="default"&&Object.prototype.hasOwnProperty.call(n,r)&&nj(e,n,r);return rj(e,n),e};Object.defineProperty(Vn,"__esModule",{value:!0});Vn.LookupHelper=void 0;var sj=en(),OS=me(),xs=ta(),oj=ij(uc()),aj=Py(),Cy=class{constructor(e,r){this.document=e,this.context=r,this.mergedTypeMap=null}getTypeMap(){return B(this,null,function*(){return this.mergedTypeMap==null&&(this.mergedTypeMap=yield this.context.documentMerger.build(this.document,this.context)),this.mergedTypeMap})}findAllAssignmentsOfIdentifier(e,r){return B(this,null,function*(){let t=yield this.getTypeMap();if(t==null)return[];let i=t.getScopeContext(r);return i==null?[]:i.aggregator.resolveAvailableAssignmentsWithQuery(e)})}findAllAssignmentsOfItem(e,r){return B(this,null,function*(){let t=yield this.getTypeMap();if(t==null)return[];let i=t.getScopeContext(r);return i==null?[]:i.aggregator.resolveAvailableAssignments(e)})}findAllAvailableIdentifierInRoot(){return B(this,null,function*(){let e=yield this.getTypeMap();return e==null?new Map:e.getRootScopeContext().scope.getAllIdentifier()})}findAllAvailableIdentifier(e){return B(this,null,function*(){let r=yield this.getTypeMap();if(r==null)return new Map;let t=r.getScopeContext(e);return t==null?new Map:t.scope.getAllIdentifier()})}findAllAvailableIdentifierRelatedToPosition(e){return B(this,null,function*(){let r=yield this.getTypeMap(),t=new Map;if(r==null)return t;for(let l of r.container.getAllIdentifier(sj.SignatureDefinitionBaseType.General))t.set(...l);let i=r.getScopeContext(e.scope);if(i==null)return t;i.scope.isSelfAvailable()&&t.set("self",{kind:xs.CompletionItemKind.Constant,line:-1}),i.scope.isSuperAvailable()&&t.set("super",{kind:xs.CompletionItemKind.Constant,line:-1});let s=new Map;(0,xs.injectIdentifers)(s,i.scope);let o=Array.from(s.entries()).map(([l,u])=>tt({identifier:l},u)).sort((l,u)=>l.line-u.line);for(let l=0;l<o.length;l++){let u=o[l];if(u.line>=e.end.line)break;t.set(u.identifier,{kind:u.kind,line:u.line})}return i.scope.locals!==i.scope.globals&&(0,xs.injectIdentifers)(t,i.scope.globals),i.scope.outer&&(0,xs.injectIdentifers)(t,i.scope.outer),t})}lookupAST(e){let r=this,i=this.context.documentManager.get(r.document).document.lines[e.line+1];if(!i)return null;for(let s=0;s<i.length;s++){let o=i[s],l=oj.findEx((a,c)=>{let p=a.start.line-1,d=a.start.character-1,h=a.end.line-1,g=a.end.character-1;return p>e.line?{exit:!0}:p<h?{valid:e.line>p&&e.line<h||e.line===p&&d<=e.character||e.line===h&&g>=e.character}:{valid:p<=e.line&&d<=e.character&&h>=e.line&&g>=e.character}},o),u=l.pop();if(u)return{closest:u,outer:l}}return null}lookupBasePath(e){return B(this,null,function*(){let r=yield this.getTypeMap();if(r===null)return null;let t=(0,aj.lookupBase)(e);return t?r.resolveNamespace(t):null})}lookupTypeInfo(t){return B(this,arguments,function*({closest:e,outer:r}){let i=yield this.getTypeMap();if(i===null)return null;let s=r.length>0?r[r.length-1]:void 0;return(s==null?void 0:s.type)===OS.ASTType.MemberExpression&&e===s.identifier||(s==null?void 0:s.type)===OS.ASTType.IndexExpression&&e===s.index&&(0,xs.isValidIdentifierLiteral)(e)?i.resolveType(s,!0):i.resolveType(e,!0)})}lookupType(e){let r=this,t=r.lookupAST(e);return t?r.lookupTypeInfo(t):null}};Vn.LookupHelper=Cy});var AS=S(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});cc.AVAILABLE_CONSTANTS=void 0;cc.AVAILABLE_CONSTANTS=["true","false","null","params","globals","locals","outer"].map(n=>({label:n,kind:21}))});var pc=S(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.GreyScriptKeyword=void 0;var lj;(function(n){n.ImportCode="import_code"})(lj=na.GreyScriptKeyword||(na.GreyScriptKeyword={}))});var Dy=S(Ay=>{"use strict";Object.defineProperty(Ay,"__esModule",{value:!0});var DS=qt(),uj=me(),cj=pc(),Oy=class extends DS.LexerValidator{constructor(){super(...arguments),this.isKeyword=Set.prototype.has.bind(new Set([...Object.values(uj.Keyword),...Object.values(DS.GreybelKeyword),...Object.values(cj.GreyScriptKeyword)]))}};Ay.default=Oy});var Ly=S(ra=>{"use strict";var pj=ra&&ra.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ra,"__esModule",{value:!0});var dj=qt(),hj=pj(Dy()),jy=class extends dj.Lexer{constructor(e,r={}){r.validator=r.validator||new hj.default,super(e,r)}};ra.default=jy});var qy=S(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});dc.ASTChunkGreyScript=void 0;var fj=qt(),My=class n extends fj.ASTChunkAdvanced{constructor(e){super(e),this.nativeImports=e.nativeImports||[]}clone(){return new n({nativeImports:this.nativeImports.map(e=>e.clone()),imports:this.imports.map(e=>e.clone()),includes:this.includes.map(e=>e.clone()),literals:this.literals.map(e=>e.clone()),scopes:this.scopes.map(e=>e.clone()),lines:this.lines,start:this.start,end:this.end,range:this.range,scope:this.scope})}};dc.ASTChunkGreyScript=My});var Fy=S(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.ASTType=void 0;var mj;(function(n){n.ImportCodeExpression="ImportCodeExpression"})(mj=ia.ASTType||(ia.ASTType={}))});var $y=S(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});hc.ASTImportCodeExpression=void 0;var gj=me(),yj=Fy(),Ny=class n extends gj.ASTBase{constructor(e){super(yj.ASTType.ImportCodeExpression,e),this.directory=e.directory}toString(){return`ImportCode[${this.start}-${this.end}][${this.directory}]`}clone(){return new n({directory:this.directory,start:this.start,end:this.end,range:this.range,scope:this.scope})}};hc.ASTImportCodeExpression=Ny});var By=S(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.ASTImportCodeExpression=Hn.ASTChunkGreyScript=Hn.ASTType=Hn.ASTProvider=void 0;var bj=qt(),vj=qy(),_j=$y(),Uy=class extends bj.ASTProvider{chunkAdvanced(e){return new vj.ASTChunkGreyScript(e)}importCodeExpression(e){return new _j.ASTImportCodeExpression(e)}};Hn.ASTProvider=Uy;var wj=Fy();Object.defineProperty(Hn,"ASTType",{enumerable:!0,get:function(){return wj.ASTType}});var xj=qy();Object.defineProperty(Hn,"ASTChunkGreyScript",{enumerable:!0,get:function(){return xj.ASTChunkGreyScript}});var kj=$y();Object.defineProperty(Hn,"ASTImportCodeExpression",{enumerable:!0,get:function(){return kj.ASTImportCodeExpression}})});var jS=S(sa=>{"use strict";var Tj=sa&&sa.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(sa,"__esModule",{value:!0});var Ts=me(),Nt=qt(),fc=es(),Ss=is(),Sj=By(),Ij=Tj(Ly()),Ej=pc(),Wy=class extends Nt.Parser{constructor(e,r={}){r.lexer=r.lexer||new Ij.default(e,{unsafe:r.unsafe,tabWidth:r.tabWidth}),r.astProvider=r.astProvider||new Sj.ASTProvider,super(e,r);let t=this;t.nativeImports=[]}parseStatement(){let e=this;if(e.isType(Ts.TokenType.Keyword))switch(e.token.value){case Ej.GreyScriptKeyword.ImportCode:e.next();let t=e.parseNativeImportCodeStatement();e.addItemToLines(t),e.backpatches.peek().body.push(t);return;default:break}return super.parseStatement()}parseFunctionDeclaration(e,r=!1,t=!1){let i=this;if(!Nt.Selectors.Function(i.token))return i.parseOr(r,t);i.next();let s=i.previousToken,o=i.astProvider.functionStatement({start:s.start,end:null,range:[s.range[0],null],scope:i.currentScope,parent:i.outerScopes[i.outerScopes.length-1],assignment:i.currentAssignment}),l=[];if(i.pushScope(o),!Nt.SelectorGroups.BlockEndOfLine(i.token)){for(i.requireToken(Nt.Selectors.LParenthesis,s.start);!Nt.SelectorGroups.FunctionDeclarationArgEnd(i.token);){let a=i.parseIdentifier(),c=a;if(i.consume(Nt.Selectors.Assign)){let p=i.parseExpr(null),d=i.astProvider.assignmentStatement({variable:a,init:p,start:c.start,end:i.previousToken.end,range:[c.range[0],i.previousToken.range[1]],scope:i.currentScope});i.currentScope.assignments.push(d),l.push(d)}else{let p=i.astProvider.assignmentStatement({variable:a,init:i.astProvider.unknown({start:c.start,end:i.previousToken.end,range:[c.range[0],i.previousToken.range[1]],scope:i.currentScope}),start:c.start,end:i.previousToken.end,range:[c.range[0],i.previousToken.range[1]],scope:i.currentScope});i.currentScope.assignments.push(p),l.push(a)}if(Nt.Selectors.RParenthesis(i.token))break;if(i.requireToken(Nt.Selectors.ArgumentSeperator,s.start),Nt.Selectors.RParenthesis(i.token)){i.raise("expected argument instead received right parenthesis",new Ss.Range(i.previousToken.end,i.previousToken.end));break}}i.requireToken(Nt.Selectors.RParenthesis,s.start)}o.parameters=l;let u=new Ts.PendingFunction(o);return i.backpatches.push(u),u.onComplete=a=>{e!==null?(e.end=a.block.end,e.range[1]=a.block.range[1],i.addItemToLines(e)):i.addItemToLines(a.block)},o}parseNativeImportCodeStatement(){var e,r,t,i;let s=this,o=s.previousToken;if(!s.consume(Nt.Selectors.LParenthesis))return s.raise("expected import_code to have opening parenthesis",new Ss.Range(o.start,new fc.Position((e=s.token.lastLine)!==null&&e!==void 0?e:s.token.line,s.token.end.character))),s.parseInvalidCode();let l;if(Ts.TokenType.StringLiteral===s.token.type)l=s.token.value,s.next();else return s.raise("expected import_code argument to be string literal",new Ss.Range(o.start,new fc.Position((r=s.token.lastLine)!==null&&r!==void 0?r:s.token.line,s.token.end.character))),s.parseInvalidCode();if(s.consume(Nt.Selectors.ImportCodeSeperator)){if(!s.isType(Ts.TokenType.StringLiteral))return s.raise("expected import_code argument to be string literal",new Ss.Range(o.start,new fc.Position((t=s.token.lastLine)!==null&&t!==void 0?t:s.token.line,s.token.end.character))),s.parseInvalidCode();l=s.token.value,console.warn("Warning: Second import_code argument is deprecated. Use the first argument for the file system path instead."),s.next()}if(!s.consume(Nt.Selectors.RParenthesis))return s.raise("expected import_code to have closing parenthesis",new Ss.Range(o.start,new fc.Position((i=s.token.lastLine)!==null&&i!==void 0?i:s.token.line,s.token.end.character))),s.parseInvalidCode();let u=s.astProvider.importCodeExpression({directory:l,start:o.start,end:s.previousToken.end,range:[o.range[0],s.previousToken.range[1]],scope:s.currentScope});return s.nativeImports.push(u),u}parseChunk(){let e=this;e.next();let r=e.token,t=e.astProvider.chunkAdvanced({start:r.start,end:null,range:[r.range[0],null]}),i=new Ts.PendingChunk(t);for(e.backpatches.setDefault(i),e.pushScope(t);!Nt.Selectors.EndOfFile(e.token)&&(e.skipNewlines(),!Nt.Selectors.EndOfFile(e.token));)e.lexer.recordSnapshot(),e.statementErrors=[],e.parseStatement(),e.statementErrors.length>0&&e.tryToRecover();let s=e.backpatches.pop();for(;!(0,Ts.isPendingChunk)(s);){let o=e.raise(`found open block ${s.block.type}`,new Ss.Range(s.block.start,s.block.start));if(s.complete(e.previousToken),e.errors.push(o),!e.unsafe)throw o;s=e.backpatches.pop()}return e.finishRemaingScopes(),e.popScope(),i.complete(e.token),t.literals=e.literals,t.scopes=e.scopes,t.lines=e.lines,t.nativeImports=e.nativeImports,t.imports=e.imports,t.includes=e.includes,t.injects=e.injects,t}};sa.default=Wy});var zn=S(At=>{"use strict";var Rj=At&&At.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),LS=At&&At.__exportStar||function(n,e){for(var r in n)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Rj(e,n,r)},Vy=At&&At.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(At,"__esModule",{value:!0});At.Parser=At.LexerValidator=At.Lexer=void 0;var Pj=Ly();Object.defineProperty(At,"Lexer",{enumerable:!0,get:function(){return Vy(Pj).default}});var Cj=Dy();Object.defineProperty(At,"LexerValidator",{enumerable:!0,get:function(){return Vy(Cj).default}});var Oj=jS();Object.defineProperty(At,"Parser",{enumerable:!0,get:function(){return Vy(Oj).default}});LS(By(),At);LS(pc(),At)});var MS=S(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});mc.AVAILABLE_KEYWORDS=void 0;var Is=qt(),Aj=zn(),Dt=me();mc.AVAILABLE_KEYWORDS=[Dt.Keyword.If,Dt.Keyword.In,Dt.Keyword.Or,Dt.Keyword.And,Dt.Keyword.Isa,Dt.Keyword.For,Dt.Keyword.New,Dt.Keyword.Not,Dt.Keyword.End,Dt.Keyword.Then,Dt.Keyword.Else,Dt.Keyword.Break,Dt.Keyword.While,Dt.Keyword.Return,Dt.Keyword.Function,Dt.Keyword.Continue,Aj.GreyScriptKeyword.ImportCode,Is.GreybelKeyword.Envar,Is.GreybelKeyword.Import,Is.GreybelKeyword.Include,Is.GreybelKeyword.Debugger,Is.GreybelKeyword.Line,Is.GreybelKeyword.File].map(n=>({label:n,kind:14}))});var qS=S(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});gc.AVAILABLE_OPERATORS=void 0;var oa=vs(),bt=me();gc.AVAILABLE_OPERATORS=[bt.Operator.Plus,bt.Operator.Asterik,bt.Operator.Minus,bt.Operator.Slash,bt.Operator.Power,bt.Operator.Modulo,bt.Operator.LessThan,bt.Operator.GreaterThan,bt.Operator.LessThanOrEqual,bt.Operator.GreaterThanOrEqual,bt.Operator.NotEqual,bt.Operator.Equal,bt.Operator.AddShorthand,bt.Operator.SubtractShorthand,bt.Operator.MultiplyShorthand,bt.Operator.DivideShorthand,oa.Operator.BitwiseAnd,oa.Operator.BitwiseOr,oa.Operator.LeftShift,oa.Operator.RightShift,oa.Operator.UnsignedRightShift,bt.Operator.Assign,bt.Operator.Reference].map(n=>({label:n,kind:24}))});var NS=S(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.activate=tn.getDefaultCompletionList=tn.getPropertyCompletionList=void 0;var FS=me(),Dj=CS(),jj=ks(),Lj=AS(),Mj=MS(),qj=qS(),Fj=(n,e)=>B(tn,null,function*(){let r=yield n.lookupBasePath(e);return r===null?null:r.getAllIdentifier()});tn.getPropertyCompletionList=Fj;var Nj=()=>[...Mj.AVAILABLE_KEYWORDS,...qj.AVAILABLE_OPERATORS,...Lj.AVAILABLE_CONSTANTS];tn.getDefaultCompletionList=Nj;function $j(n){n.connection.onCompletion(e=>B(this,null,function*(){if(!n.getConfiguration().autocomplete)return;let r=yield n.fs.getTextDocument(e.textDocument.uri);if(r==null)return;let t=yield n.documentManager.getLatest(r),i=new jj.LookupHelper(t.textDocument,n),s=i.lookupAST(e.position),o=new Dj.CompletionListBuilder,l=!1;if(s){let{closest:u}=s;u instanceof FS.ASTMemberExpression?(o.addCollection(yield(0,tn.getPropertyCompletionList)(i,u)),l=!0):u instanceof FS.ASTIndexExpression?(o.addCollection(yield(0,tn.getPropertyCompletionList)(i,u)),l=!0):(o.setDefault((0,tn.getDefaultCompletionList)()),o.addCollection(yield i.findAllAvailableIdentifierRelatedToPosition(s.closest)))}else o.setDefault((0,tn.getDefaultCompletionList)()),o.addCollection(yield i.findAllAvailableIdentifierInRoot());return o.build()})),n.connection.onCompletionResolve(e=>e)}tn.activate=$j});var US=S((HW,$S)=>{"use strict";$S.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Hy=S((zW,WS)=>{var aa=US(),BS={};for(let n of Object.keys(aa))BS[aa[n]]=n;var Z={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};WS.exports=Z;for(let n of Object.keys(Z)){if(!("channels"in Z[n]))throw new Error("missing channels property: "+n);if(!("labels"in Z[n]))throw new Error("missing channel labels property: "+n);if(Z[n].labels.length!==Z[n].channels)throw new Error("channel and label counts mismatch: "+n);let{channels:e,labels:r}=Z[n];delete Z[n].channels,delete Z[n].labels,Object.defineProperty(Z[n],"channels",{value:e}),Object.defineProperty(Z[n],"labels",{value:r})}Z.rgb.hsl=function(n){let e=n[0]/255,r=n[1]/255,t=n[2]/255,i=Math.min(e,r,t),s=Math.max(e,r,t),o=s-i,l,u;s===i?l=0:e===s?l=(r-t)/o:r===s?l=2+(t-e)/o:t===s&&(l=4+(e-r)/o),l=Math.min(l*60,360),l<0&&(l+=360);let a=(i+s)/2;return s===i?u=0:a<=.5?u=o/(s+i):u=o/(2-s-i),[l,u*100,a*100]};Z.rgb.hsv=function(n){let e,r,t,i,s,o=n[0]/255,l=n[1]/255,u=n[2]/255,a=Math.max(o,l,u),c=a-Math.min(o,l,u),p=function(d){return(a-d)/6/c+1/2};return c===0?(i=0,s=0):(s=c/a,e=p(o),r=p(l),t=p(u),o===a?i=t-r:l===a?i=1/3+e-t:u===a&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,a*100]};Z.rgb.hwb=function(n){let e=n[0],r=n[1],t=n[2],i=Z.rgb.hsl(n)[0],s=1/255*Math.min(e,Math.min(r,t));return t=1-1/255*Math.max(e,Math.max(r,t)),[i,s*100,t*100]};Z.rgb.cmyk=function(n){let e=n[0]/255,r=n[1]/255,t=n[2]/255,i=Math.min(1-e,1-r,1-t),s=(1-e-i)/(1-i)||0,o=(1-r-i)/(1-i)||0,l=(1-t-i)/(1-i)||0;return[s*100,o*100,l*100,i*100]};function Uj(n,e){return ut(n[0]-e[0],2)+ut(n[1]-e[1],2)+ut(n[2]-e[2],2)}Z.rgb.keyword=function(n){let e=BS[n];if(e)return e;let r=1/0,t;for(let i of Object.keys(aa)){let s=aa[i],o=Uj(n,s);o<r&&(r=o,t=i)}return t};Z.keyword.rgb=function(n){return aa[n]};Z.rgb.xyz=function(n){let e=n[0]/255,r=n[1]/255,t=n[2]/255;e=e>.04045?ut((e+.055)/1.055,2.4):e/12.92,r=r>.04045?ut((r+.055)/1.055,2.4):r/12.92,t=t>.04045?ut((t+.055)/1.055,2.4):t/12.92;let i=e*.4124+r*.3576+t*.1805,s=e*.2126+r*.7152+t*.0722,o=e*.0193+r*.1192+t*.9505;return[i*100,s*100,o*100]};Z.rgb.lab=function(n){let e=Z.rgb.xyz(n),r=e[0],t=e[1],i=e[2];r/=95.047,t/=100,i/=108.883,r=r>.008856?ut(r,1/3):7.787*r+16/116,t=t>.008856?ut(t,1/3):7.787*t+16/116,i=i>.008856?ut(i,1/3):7.787*i+16/116;let s=116*t-16,o=500*(r-t),l=200*(t-i);return[s,o,l]};Z.hsl.rgb=function(n){let e=n[0]/360,r=n[1]/100,t=n[2]/100,i,s,o;if(r===0)return o=t*255,[o,o,o];t<.5?i=t*(1+r):i=t+r-t*r;let l=2*t-i,u=[0,0,0];for(let a=0;a<3;a++)s=e+1/3*-(a-1),s<0&&s++,s>1&&s--,6*s<1?o=l+(i-l)*6*s:2*s<1?o=i:3*s<2?o=l+(i-l)*(2/3-s)*6:o=l,u[a]=o*255;return u};Z.hsl.hsv=function(n){let e=n[0],r=n[1]/100,t=n[2]/100,i=r,s=Math.max(t,.01);t*=2,r*=t<=1?t:2-t,i*=s<=1?s:2-s;let o=(t+r)/2,l=t===0?2*i/(s+i):2*r/(t+r);return[e,l*100,o*100]};Z.hsv.rgb=function(n){let e=n[0]/60,r=n[1]/100,t=n[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),o=255*t*(1-r),l=255*t*(1-r*s),u=255*t*(1-r*(1-s));switch(t*=255,i){case 0:return[t,u,o];case 1:return[l,t,o];case 2:return[o,t,u];case 3:return[o,l,t];case 4:return[u,o,t];case 5:return[t,o,l]}};Z.hsv.hsl=function(n){let e=n[0],r=n[1]/100,t=n[2]/100,i=Math.max(t,.01),s,o;o=(2-r)*t;let l=(2-r)*i;return s=r*i,s/=l<=1?l:2-l,s=s||0,o/=2,[e,s*100,o*100]};Z.hwb.rgb=function(n){let e=n[0]/360,r=n[1]/100,t=n[2]/100,i=r+t,s;i>1&&(r/=i,t/=i);let o=Math.floor(6*e),l=1-t;s=6*e-o,o&1&&(s=1-s);let u=r+s*(l-r),a,c,p;switch(o){default:case 6:case 0:a=l,c=u,p=r;break;case 1:a=u,c=l,p=r;break;case 2:a=r,c=l,p=u;break;case 3:a=r,c=u,p=l;break;case 4:a=u,c=r,p=l;break;case 5:a=l,c=r,p=u;break}return[a*255,c*255,p*255]};Z.cmyk.rgb=function(n){let e=n[0]/100,r=n[1]/100,t=n[2]/100,i=n[3]/100,s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,r*(1-i)+i),l=1-Math.min(1,t*(1-i)+i);return[s*255,o*255,l*255]};Z.xyz.rgb=function(n){let e=n[0]/100,r=n[1]/100,t=n[2]/100,i,s,o;return i=e*3.2406+r*-1.5372+t*-.4986,s=e*-.9689+r*1.8758+t*.0415,o=e*.0557+r*-.204+t*1.057,i=i>.0031308?1.055*ut(i,1/2.4)-.055:i*12.92,s=s>.0031308?1.055*ut(s,1/2.4)-.055:s*12.92,o=o>.0031308?1.055*ut(o,1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*255]};Z.xyz.lab=function(n){let e=n[0],r=n[1],t=n[2];e/=95.047,r/=100,t/=108.883,e=e>.008856?ut(e,1/3):7.787*e+16/116,r=r>.008856?ut(r,1/3):7.787*r+16/116,t=t>.008856?ut(t,1/3):7.787*t+16/116;let i=116*r-16,s=500*(e-r),o=200*(r-t);return[i,s,o]};Z.lab.xyz=function(n){let e=n[0],r=n[1],t=n[2],i,s,o;s=(e+16)/116,i=r/500+s,o=s-t/200;let l=ut(s,3),u=ut(i,3),a=ut(o,3);return s=l>.008856?l:(s-16/116)/7.787,i=u>.008856?u:(i-16/116)/7.787,o=a>.008856?a:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};Z.lab.lch=function(n){let e=n[0],r=n[1],t=n[2],i;i=Math.atan2(t,r)*360/2/Math.PI,i<0&&(i+=360);let o=Math.sqrt(r*r+t*t);return[e,o,i]};Z.lch.lab=function(n){let e=n[0],r=n[1],i=n[2]/360*2*Math.PI,s=r*Math.cos(i),o=r*Math.sin(i);return[e,s,o]};Z.rgb.ansi16=function(n,e=null){let[r,t,i]=n,s=e===null?Z.rgb.hsv(n)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(t/255)<<1|Math.round(r/255));return s===2&&(o+=60),o};Z.hsv.ansi16=function(n){return Z.rgb.ansi16(Z.hsv.rgb(n),n[2])};Z.rgb.ansi256=function(n){let e=n[0],r=n[1],t=n[2];return e===r&&r===t?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(t/255*5)};Z.ansi16.rgb=function(n){let e=n%10;if(e===0||e===7)return n>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(~~(n>50)+1)*.5,t=(e&1)*r*255,i=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[t,i,s]};Z.ansi256.rgb=function(n){if(n>=232){let s=(n-232)*10+8;return[s,s,s]}n-=16;let e,r=Math.floor(n/36)/5*255,t=Math.floor((e=n%36)/6)/5*255,i=e%6/5*255;return[r,t,i]};Z.rgb.hex=function(n){let r=(((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};Z.hex.rgb=function(n){let e=n.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split("").map(l=>l+l).join(""));let t=parseInt(r,16),i=t>>16&255,s=t>>8&255,o=t&255;return[i,s,o]};Z.rgb.hcg=function(n){let e=n[0]/255,r=n[1]/255,t=n[2]/255,i=Math.max(Math.max(e,r),t),s=Math.min(Math.min(e,r),t),o=i-s,l,u;return o<1?l=s/(1-o):l=0,o<=0?u=0:i===e?u=(r-t)/o%6:i===r?u=2+(t-e)/o:u=4+(e-r)/o,u/=6,u%=1,[u*360,o*100,l*100]};Z.hsl.hcg=function(n){let e=n[1]/100,r=n[2]/100,t=r<.5?2*e*r:2*e*(1-r),i=0;return t<1&&(i=(r-.5*t)/(1-t)),[n[0],t*100,i*100]};Z.hsv.hcg=function(n){let e=n[1]/100,r=n[2]/100,t=e*r,i=0;return t<1&&(i=(r-t)/(1-t)),[n[0],t*100,i*100]};Z.hcg.rgb=function(n){let e=n[0]/360,r=n[1]/100,t=n[2]/100;if(r===0)return[t*255,t*255,t*255];let i=[0,0,0],s=e%1*6,o=s%1,l=1-o,u=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=l,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=l,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=l}return u=(1-r)*t,[(r*i[0]+u)*255,(r*i[1]+u)*255,(r*i[2]+u)*255]};Z.hcg.hsv=function(n){let e=n[1]/100,r=n[2]/100,t=e+r*(1-e),i=0;return t>0&&(i=e/t),[n[0],i*100,t*100]};Z.hcg.hsl=function(n){let e=n[1]/100,t=n[2]/100*(1-e)+.5*e,i=0;return t>0&&t<.5?i=e/(2*t):t>=.5&&t<1&&(i=e/(2*(1-t))),[n[0],i*100,t*100]};Z.hcg.hwb=function(n){let e=n[1]/100,r=n[2]/100,t=e+r*(1-e);return[n[0],(t-e)*100,(1-t)*100]};Z.hwb.hcg=function(n){let e=n[1]/100,t=1-n[2]/100,i=t-e,s=0;return i<1&&(s=(t-i)/(1-i)),[n[0],i*100,s*100]};Z.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]};Z.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]};Z.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]};Z.gray.hsl=function(n){return[0,0,n[0]]};Z.gray.hsv=Z.gray.hsl;Z.gray.hwb=function(n){return[0,100,n[0]]};Z.gray.cmyk=function(n){return[0,0,0,n[0]]};Z.gray.lab=function(n){return[n[0],0,0]};Z.gray.hex=function(n){let e=Math.round(n[0]/100*255)&255,t=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(t.length)+t};Z.rgb.gray=function(n){return[(n[0]+n[1]+n[2])/3/255*100]}});var HS=S((KW,VS)=>{var yc=Hy();function Bj(){let n={},e=Object.keys(yc);for(let r=e.length,t=0;t<r;t++)n[e[t]]={distance:-1,parent:null};return n}function Wj(n){let e=Bj(),r=[n];for(e[n].distance=0;r.length;){let t=r.pop(),i=Object.keys(yc[t]);for(let s=i.length,o=0;o<s;o++){let l=i[o],u=e[l];u.distance===-1&&(u.distance=e[t].distance+1,u.parent=t,r.unshift(l))}}return e}function Vj(n,e){return function(r){return e(n(r))}}function Hj(n,e){let r=[e[n].parent,n],t=yc[e[n].parent][n],i=e[n].parent;for(;e[i].parent;)r.unshift(e[i].parent),t=Vj(yc[e[i].parent][i],t),i=e[i].parent;return t.conversion=r,t}VS.exports=function(n){let e=Wj(n),r={},t=Object.keys(e);for(let i=t.length,s=0;s<i;s++){let o=t[s];e[o].parent!==null&&(r[o]=Hj(o,e))}return r}});var GS=S((YW,zS)=>{var zy=Hy(),zj=HS(),Es={},Gj=Object.keys(zy);function Kj(n){let e=function(...r){let t=r[0];return t==null?t:(t.length>1&&(r=t),n(r))};return"conversion"in n&&(e.conversion=n.conversion),e}function Yj(n){let e=function(...r){let t=r[0];if(t==null)return t;t.length>1&&(r=t);let i=n(r);if(typeof i=="object")for(let s=i.length,o=0;o<s;o++)i[o]=Math.round(i[o]);return i};return"conversion"in n&&(e.conversion=n.conversion),e}Gj.forEach(n=>{Es[n]={},Object.defineProperty(Es[n],"channels",{value:zy[n].channels}),Object.defineProperty(Es[n],"labels",{value:zy[n].labels});let e=zj(n);Object.keys(e).forEach(t=>{let i=e[t];Es[n][t]=Yj(i),Es[n][t].raw=Kj(i)})});zS.exports=Es});var YS=S(Rs=>{"use strict";var Qj=Rs&&Rs.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Rs,"__esModule",{value:!0});Rs.activate=void 0;var Gy=Qj(GS()),Jj=me(),KS;(function(n){n.Black="black",n.Blue="blue",n.Green="green",n.Orange="orange",n.Purple="purple",n.Red="red",n.White="white",n.Yellow="yellow"})(KS||(KS={}));var Ky={black:"#000000",blue:"#0000FF",green:"#00FF00",orange:"#FF8800",purple:"#CC8899",red:"#FF0000",white:"#FFFFFF",yellow:"#FFFF00"},Zj=()=>new RegExp(`(?:mark|color)=(${Object.keys(Ky).join("|")}|(?:#[0-9a-f]{6}|#[0-9a-f]{3}))`,"ig"),Xj=Object.prototype.hasOwnProperty;function eL(n){n.connection.onColorPresentation(e=>[{label:`#${Gy.default.rgb.hex(e.color.red*255,e.color.green*255,e.color.blue*255)}`}]),n.connection.onDocumentColor(e=>B(this,null,function*(){let r=yield n.fs.getTextDocument(e.textDocument.uri);if(r==null)return;let s=(yield n.documentManager.getLatest(r)).document.literals.filter(u=>u.type===Jj.ASTType.StringLiteral),o=[],l=({match:u,markup:a,value:c,astPosition:p,lineIndex:d})=>{let h=u.index+a.indexOf("=")+1,g=h+c.length,f=p.line-1+d,m=h,b=g;return d===0&&(m+=p.character,b+=p.character),{start:{line:f,character:m},end:{line:f,character:b}}};for(let u=0;u<s.length;u++){let a=s[u];if(!a.start)continue;let c=a.start,p=a.value.toString().split(`
110
110
  `);for(let d=0;d<p.length;d++){let h=p[d],g=Zj(),f;for(;f=g.exec(h);){let[m,b]=f,v=l({match:f,markup:m,value:b,astPosition:c,lineIndex:d});if(b.startsWith("#")){let[_,w,k]=Gy.default.hex.rgb(b.slice(1));o.push({range:v,color:{red:_/255,green:w/255,blue:k/255,alpha:1}})}else if(Xj.call(Ky,b)){let[_,w,k]=Gy.default.hex.rgb(Ky[b].slice(1));o.push({range:v,color:{red:_/255,green:w/255,blue:k/255,alpha:1}})}else o.push({range:v,color:{red:0,green:0,blue:0,alpha:1}})}}}return o}))}Rs.activate=eL});var QS=S(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.activate=void 0;var tL=me(),nL=ks(),rL=n=>`${n.uri}:${n.range.start.line}:${n.range.start.character}-${n.range.end.line}:${n.range.end.character}`,iL=(n,e,r)=>B(la,null,function*(){let t=yield n.findAllAssignmentsOfItem(e,r),i=[],s=new Set;for(let o of t){let l=o.node;if(!l.start||!l.end)continue;let u={line:l.start.line-1,character:l.start.character-1},a={line:l.end.line-1,character:l.end.character-1},c={uri:o.source,range:{start:u,end:a}},p=rL(c);s.has(p)||(s.add(p),i.push(c))}return i});function sL(n){n.connection.onDefinition(e=>B(this,null,function*(){let r=yield n.fs.getTextDocument(e.textDocument.uri);if(r==null)return;let t=new nL.LookupHelper(r,n),i=t.lookupAST(e.position);if(!i)return;let{outer:s,closest:o}=i,l=s.length>0?s[s.length-1]:void 0,u=o;return l&&l instanceof tL.ASTMemberExpression&&l.identifier===o&&(u=l),yield iL(t,u,u.scope)}))}la.activate=sL});var JS=S(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});bc.activate=void 0;function oL(n,e){return B(this,null,function*(){let r=yield e.documentManager.getLatest(n);return r.errors.map(t=>{if(t!=null&&t.range){let i=t.range;return{range:{start:{line:i.start.line-1,character:i.start.character-1},end:{line:i.end.line-1,character:i.end.character-1}},message:t.message,severity:1}}return{range:{start:r.document.start,end:r.document.end},message:t.message,severity:1}})})}function aL(n){n.connection.languages.diagnostics.on(e=>B(this,null,function*(){if(!n.getConfiguration().diagnostic)return;let r=yield n.fs.getTextDocument(e.textDocument.uri);if(r==null)return;let t=yield oL(r,n);return t.length===0?{kind:"full",items:[]}:{kind:"full",items:t}}))}bc.activate=aL});function lL(){if(ZS)return Yy;ZS=!0;var n=Yy={},e,r;function t(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?e=setTimeout:e=t}catch(f){e=t}try{typeof clearTimeout=="function"?r=clearTimeout:r=i}catch(f){r=i}})();function s(f){if(e===setTimeout)return setTimeout(f,0);if((e===t||!e)&&setTimeout)return e=setTimeout,setTimeout(f,0);try{return e(f,0)}catch(m){try{return e.call(null,f,0)}catch(b){return e.call(this||Ps,f,0)}}}function o(f){if(r===clearTimeout)return clearTimeout(f);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(f);try{return r(f)}catch(m){try{return r.call(null,f)}catch(b){return r.call(this||Ps,f)}}}var l=[],u=!1,a,c=-1;function p(){!u||!a||(u=!1,a.length?l=a.concat(l):c=-1,l.length&&d())}function d(){if(!u){var f=s(p);u=!0;for(var m=l.length;m;){for(a=l,l=[];++c<m;)a&&a[c].run();c=-1,m=l.length}a=null,u=!1,o(f)}}n.nextTick=function(f){var m=new Array(arguments.length-1);if(arguments.length>1)for(var b=1;b<arguments.length;b++)m[b-1]=arguments[b];l.push(new h(f,m)),l.length===1&&!u&&s(d)};function h(f,m){(this||Ps).fun=f,(this||Ps).array=m}h.prototype.run=function(){(this||Ps).fun.apply(null,(this||Ps).array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={};function g(){}return n.on=g,n.addListener=g,n.once=g,n.off=g,n.removeListener=g,n.removeAllListeners=g,n.emit=g,n.prependListener=g,n.prependOnceListener=g,n.listeners=function(f){return[]},n.binding=function(f){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(f){throw new Error("process.chdir is not supported")},n.umask=function(){return 0},Yy}var Yy,ZS,Ps,Ve,Qy=cr(()=>{Yy={},ZS=!1,Ps=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:global;Ve=lL();Ve.platform="browser";Ve.addListener;Ve.argv;Ve.binding;Ve.browser;Ve.chdir;Ve.cwd;Ve.emit;Ve.env;Ve.listeners;Ve.nextTick;Ve.off;Ve.on;Ve.once;Ve.prependListener;Ve.prependOnceListener;Ve.removeAllListeners;Ve.removeListener;Ve.title;Ve.umask;Ve.version;Ve.versions});function uL(){if(XS)return Jy;XS=!0;var n=Ve;function e(s){if(typeof s!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(s))}function r(s,o){for(var l="",u=0,a=-1,c=0,p,d=0;d<=s.length;++d){if(d<s.length)p=s.charCodeAt(d);else{if(p===47)break;p=47}if(p===47){if(!(a===d-1||c===1))if(a!==d-1&&c===2){if(l.length<2||u!==2||l.charCodeAt(l.length-1)!==46||l.charCodeAt(l.length-2)!==46){if(l.length>2){var h=l.lastIndexOf("/");if(h!==l.length-1){h===-1?(l="",u=0):(l=l.slice(0,h),u=l.length-1-l.lastIndexOf("/")),a=d,c=0;continue}}else if(l.length===2||l.length===1){l="",u=0,a=d,c=0;continue}}o&&(l.length>0?l+="/..":l="..",u=2)}else l.length>0?l+="/"+s.slice(a+1,d):l=s.slice(a+1,d),u=d-a-1;a=d,c=0}else p===46&&c!==-1?++c:c=-1}return l}function t(s,o){var l=o.dir||o.root,u=o.base||(o.name||"")+(o.ext||"");return l?l===o.root?l+u:l+s+u:u}var i={resolve:function(){for(var o="",l=!1,u,a=arguments.length-1;a>=-1&&!l;a--){var c;a>=0?c=arguments[a]:(u===void 0&&(u=n.cwd()),c=u),e(c),c.length!==0&&(o=c+"/"+o,l=c.charCodeAt(0)===47)}return o=r(o,!l),l?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(o){if(e(o),o.length===0)return".";var l=o.charCodeAt(0)===47,u=o.charCodeAt(o.length-1)===47;return o=r(o,!l),o.length===0&&!l&&(o="."),o.length>0&&u&&(o+="/"),l?"/"+o:o},isAbsolute:function(o){return e(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,l=0;l<arguments.length;++l){var u=arguments[l];e(u),u.length>0&&(o===void 0?o=u:o+="/"+u)}return o===void 0?".":i.normalize(o)},relative:function(o,l){if(e(o),e(l),o===l||(o=i.resolve(o),l=i.resolve(l),o===l))return"";for(var u=1;u<o.length&&o.charCodeAt(u)===47;++u);for(var a=o.length,c=a-u,p=1;p<l.length&&l.charCodeAt(p)===47;++p);for(var d=l.length,h=d-p,g=c<h?c:h,f=-1,m=0;m<=g;++m){if(m===g){if(h>g){if(l.charCodeAt(p+m)===47)return l.slice(p+m+1);if(m===0)return l.slice(p+m)}else c>g&&(o.charCodeAt(u+m)===47?f=m:m===0&&(f=0));break}var b=o.charCodeAt(u+m),v=l.charCodeAt(p+m);if(b!==v)break;b===47&&(f=m)}var _="";for(m=u+f+1;m<=a;++m)(m===a||o.charCodeAt(m)===47)&&(_.length===0?_+="..":_+="/..");return _.length>0?_+l.slice(p+f):(p+=f,l.charCodeAt(p)===47&&++p,l.slice(p))},_makeLong:function(o){return o},dirname:function(o){if(e(o),o.length===0)return".";for(var l=o.charCodeAt(0),u=l===47,a=-1,c=!0,p=o.length-1;p>=1;--p)if(l=o.charCodeAt(p),l===47){if(!c){a=p;break}}else c=!1;return a===-1?u?"/":".":u&&a===1?"//":o.slice(0,a)},basename:function(o,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');e(o);var u=0,a=-1,c=!0,p;if(l!==void 0&&l.length>0&&l.length<=o.length){if(l.length===o.length&&l===o)return"";var d=l.length-1,h=-1;for(p=o.length-1;p>=0;--p){var g=o.charCodeAt(p);if(g===47){if(!c){u=p+1;break}}else h===-1&&(c=!1,h=p+1),d>=0&&(g===l.charCodeAt(d)?--d===-1&&(a=p):(d=-1,a=h))}return u===a?a=h:a===-1&&(a=o.length),o.slice(u,a)}else{for(p=o.length-1;p>=0;--p)if(o.charCodeAt(p)===47){if(!c){u=p+1;break}}else a===-1&&(c=!1,a=p+1);return a===-1?"":o.slice(u,a)}},extname:function(o){e(o);for(var l=-1,u=0,a=-1,c=!0,p=0,d=o.length-1;d>=0;--d){var h=o.charCodeAt(d);if(h===47){if(!c){u=d+1;break}continue}a===-1&&(c=!1,a=d+1),h===46?l===-1?l=d:p!==1&&(p=1):l!==-1&&(p=-1)}return l===-1||a===-1||p===0||p===1&&l===a-1&&l===u+1?"":o.slice(l,a)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return t("/",o)},parse:function(o){e(o);var l={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return l;var u=o.charCodeAt(0),a=u===47,c;a?(l.root="/",c=1):c=0;for(var p=-1,d=0,h=-1,g=!0,f=o.length-1,m=0;f>=c;--f){if(u=o.charCodeAt(f),u===47){if(!g){d=f+1;break}continue}h===-1&&(g=!1,h=f+1),u===46?p===-1?p=f:m!==1&&(m=1):p!==-1&&(m=-1)}return p===-1||h===-1||m===0||m===1&&p===h-1&&p===d+1?h!==-1&&(d===0&&a?l.base=l.name=o.slice(1,h):l.base=l.name=o.slice(d,h)):(d===0&&a?(l.name=o.slice(1,p),l.base=o.slice(1,h)):(l.name=o.slice(d,p),l.base=o.slice(d,h)),l.ext=o.slice(p,h)),d>0?l.dir=o.slice(0,d-1):a&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};return i.posix=i,Jy=i,Jy}var Jy,XS,vt,Zy=cr(()=>{Qy();Jy={},XS=!1;vt=uL()});var Cs={};Gs(Cs,{_makeLong:()=>cL,basename:()=>pL,default:()=>vt,delimiter:()=>dL,dirname:()=>hL,extname:()=>fL,format:()=>mL,isAbsolute:()=>gL,join:()=>yL,normalize:()=>bL,parse:()=>vL,posix:()=>_L,relative:()=>wL,resolve:()=>xL,sep:()=>kL,win32:()=>TL});var cL,pL,dL,hL,fL,mL,gL,yL,bL,vL,_L,wL,xL,kL,TL,Os=cr(()=>{Zy();Zy();Qy();cL=vt._makeLong,pL=vt.basename,dL=vt.delimiter,hL=vt.dirname,fL=vt.extname,mL=vt.format,gL=vt.isAbsolute,yL=vt.join,bL=vt.normalize,vL=vt.parse,_L=vt.posix,wL=vt.relative,xL=vt.resolve,kL=vt.sep,TL=vt.win32});var e0=S(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});vc.getStringHashCode=void 0;vc.getStringHashCode=function(){let n=new Map,e=r=>{let t,i;for(t=0,i=0;t<r.length;t++)i=Math.imul(31,i)+r.charCodeAt(t)|0;return i};return r=>{if(r.length===0)return 0;let t=n.get(r);if(t!==void 0)return t;let i=e(r);return n.set(r,i),i}}()});var Xy=S(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.createExpressionHash=void 0;var _c=me(),t0=e0(),wc=(n,e)=>n.$$hash=e,SL=n=>{var e;return(e=n.$$hash)!==null&&e!==void 0?e:null};function As(n){let e=SL(n);if(e!==null)return e;let r=(0,t0.getStringHashCode)(n.type);switch(n.type){case _c.ASTType.ParenthesisExpression:return As(n.expression);case _c.ASTType.MemberExpression:{let t=n;return r^=As(t.base),r^=As(t.identifier),wc(n,r)}case _c.ASTType.IndexExpression:{let t=n;return r^=As(t.base),r^=As(t.index),wc(n,r)}case _c.ASTType.Identifier:{let t=n;return r^=(0,t0.getStringHashCode)(t.name),wc(n,r)}}return wc(n,r)}function IL(n){return As(n)}xc.createExpressionHash=IL});var tb=S(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});kc.Stack=void 0;var eb=class{constructor(){let e=this;e.currentStack=[]}get(e){let t=this.currentStack;e==null&&(e=0);let i=t.length-e-1;return i<0?null:t[i]}depth(){return this.currentStack.filter(function(e){return Object.prototype.hasOwnProperty.call(e,"body")}).length}lookup(e){let r=this;for(let t=r.currentStack.length-2;t>=0;t--)if(e(r.currentStack[t]))return!0;return!1}push(e){let r=this;return r.currentStack.push(e),r}pop(){let e=this;return e.currentStack.pop(),e}};kc.Stack=eb});var Ds=S(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.Factory=pi.TokenType=void 0;var EL=tb(),RL;(function(n){n[n.Text=0]="Text",n[n.EndOfLine=1]="EndOfLine",n[n.Comment=2]="Comment"})(RL=pi.TokenType||(pi.TokenType={}));var nb=class{get tokens(){return this._tokens}get currentStack(){return this._currentStack}get currentDependency(){return this._currentDependency}constructor(e){this.transformer=e,this._tokens=[],this._currentDependency=null,this._currentStack=new EL.Stack}process(e,r={}){let t=this,i=t._currentStack;if(e==null)return;if(e.type==null)throw console.error("Error AST type:",e),new Error("Unexpected AST type");let s=t.handlers[e.type];if(s==null)throw console.error("Error AST:",e),new Error("Type does not exist "+e.type);i.push(e),s.call(this,e,r),i.pop()}};pi.Factory=nb});var ib=S(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.BeautifyContext=di.IndentationType=void 0;var ua=me(),Tc=Ds(),n0;(function(n){n[n.Tab=0]="Tab",n[n.Whitespace=1]="Whitespace"})(n0=di.IndentationType||(di.IndentationType={}));var rb=class{get indent(){return this._indent}get isMultilineAllowed(){return this._isMultilineAllowed}get usedComments(){return this._usedComments}constructor(e,r){this.factory=e,this.options=r,this._indent=0,this._isMultilineAllowed=!0,this._usedComments=new Set,this.getIndent=r.indentation===n0.Tab?(t=0)=>" ".repeat(this._indent+t):(t=0)=>" ".repeat(r.indentationSpaces).repeat(this._indent+t)}disableMultiline(){this._isMultilineAllowed=!1}enableMultiline(){this._isMultilineAllowed=!0}incIndent(){this._indent++}decIndent(){this._indent--}getBlockOpenerEndLine(e){return e instanceof ua.ASTIfClause||e instanceof ua.ASTWhileStatement?e.condition.end.line:e instanceof ua.ASTForGenericStatement?e.iterator.end.line:e instanceof ua.ASTChunk?e.start.line-1:e.start.line}getPreviousEndLine(e){if(e==null)return 0;if(e.type===ua.ASTType.IfShortcutStatement){let r=e;return r.clauses[r.clauses.length-1].body[0].end.line}return e.end.line}containsNewLineInRange(e,r=this.factory.tokens.length){let t=Math.min(r,this.factory.tokens.length);for(let i=e;i<t;i++)if(this.factory.tokens[i].type===Tc.TokenType.EndOfLine)return!0;return!1}buildBlock(e){if(e.body.length===0)return;e.body.sort((s,o)=>s.range[0]-o.range[0]);let r=null;for(let s=0;s<e.body.length;s++){let o=e.body[s],l=r?this.getPreviousEndLine(r):this.getBlockOpenerEndLine(e),u=Math.max(o.start.line-l-1,0);if(u>0)for(let c=0;c<u;c++){let p={line:l+c+1,character:0};this.factory.tokens.push({type:Tc.TokenType.EndOfLine,value:`
111
111
  `,ref:{start:p,end:p}})}let a=this.factory.tokens.length;this.factory.process(o,{isCommand:!0}),a<this.factory.tokens.length&&(this.factory.tokens[a].value=this.getIndent()+this.factory.tokens[a].value,this.factory.tokens.push({type:Tc.TokenType.EndOfLine,value:`
112
112
  `,ref:{start:o.end,end:o.end}})),r=o}let t=e.body[e.body.length-1],i=Math.max(e.end.line-this.getPreviousEndLine(t)-1,0);if(i>0)for(let s=0;s<i;s++){let o={line:t.end.line+s+1,character:0};this.factory.tokens.push({type:Tc.TokenType.EndOfLine,value:`
@@ -146,9 +146,9 @@ ${e}
146
146
  `,ref:{start:t.end,end:t.end}})}}}}transform(e,r){this._tokens=[],this._currentDependency=r,this.process(e);let t="";for(let i=0;i<this.tokens.length-1;i++){let s=this.tokens[i];if(s.type===$.TokenType.Text||s.type===$.TokenType.Comment)t+=s.value;else if(s.type===$.TokenType.EndOfLine)t+=`
147
147
  `;else throw new Error("Unknown token type!")}return t}generateOptimizations(){return[]}};Ic.DefaultFactory=lb});var cb=S(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.createExpressionString=void 0;var Ec=me();function pa(n){switch(n.type){case Ec.ASTType.ParenthesisExpression:return pa(n.expression);case Ec.ASTType.MemberExpression:{let e=n;return`${pa(e.base)}.${pa(e.identifier)}`}case Ec.ASTType.IndexExpression:return`${pa(n.base)}[]`;case Ec.ASTType.Identifier:return n.name}}function ML(n){return pa(n)}Rc.createExpressionString=ML});var db=S(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});Pc.UglifyFactory=void 0;var qL=(Os(),mt(Cs)),s0=cb(),q=Ds(),pb=class extends q.Factory{constructor(e){var r,t;super(e),this.handlers={ParenthesisExpression:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"(",ref:i}),this.process(i.expression),this.tokens.push({type:q.TokenType.Text,value:")",ref:i})},Comment:function(i,s){},AssignmentStatement:function(i,s){let o=i.variable,l=i.init;this.process(o),this.tokens.push({type:q.TokenType.Text,value:"=",ref:i}),this.process(l)},MemberExpression:function(i,s){this.process(i.base),this.tokens.push({type:q.TokenType.Text,value:i.indexer,ref:i});let o=(0,s0.createExpressionString)(i.base);this.process(i.identifier,{usesNativeVar:o==="globals"||o==="locals"||o==="outer",isMember:!0})},FunctionDeclaration:function(i,s){if(i.parameters.length===0)this.tokens.push({type:q.TokenType.Text,value:"function",ref:{start:i.start,end:i.start}});else{this.tokens.push({type:q.TokenType.Text,value:"function(",ref:{start:i.start,end:i.start}}),this.isWithinArgument=!0;for(let o=0;o<i.parameters.length;o++){let l=i.parameters[o];this.process(l),o!==i.parameters.length-1&&this.tokens.push({type:q.TokenType.Text,value:",",ref:l})}this.isWithinArgument=!1,this.tokens.push({type:q.TokenType.Text,value:")",ref:{start:i.start,end:i.start}})}this.tokens.push({type:q.TokenType.EndOfLine,value:`
148
148
  `,ref:{start:i.start,end:i.start}});for(let o of i.body){let l=this.tokens.length;this.process(o),l<this.tokens.length&&this.tokens.push({type:q.TokenType.EndOfLine,value:`
149
- `,ref:{start:o.end,end:o.end}})}this.tokens.push({type:q.TokenType.Text,value:"end function",ref:{start:i.end,end:i.end}})},MapConstructorExpression:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"{",ref:{start:i.start,end:i.start}});for(let o=0;o<i.fields.length;o++){let l=i.fields[o];this.process(l),o!==i.fields.length-1&&this.tokens.push({type:q.TokenType.Text,value:",",ref:l})}this.tokens.push({type:q.TokenType.Text,value:"}",ref:{start:i.end,end:i.end}})},MapKeyString:function(i,s){this.process(i.key),this.tokens.push({type:q.TokenType.Text,value:":",ref:i}),this.process(i.value)},Identifier:function(i,s){let o=i.name;if(this.disableNamespacesOptimization){this.tokens.push({type:q.TokenType.Text,value:o,ref:i});return}if(s.isMember){if(s.usesNativeVar){this.tokens.push({type:q.TokenType.Text,value:this.transformer.context.variables.get(o)||o,ref:i});return}this.tokens.push({type:q.TokenType.Text,value:o,ref:i});return}this.tokens.push({type:q.TokenType.Text,value:this.transformer.context.variables.get(o)||o,ref:i})},ReturnStatement:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"return ",ref:i}),i.argument&&this.process(i.argument)},NumericLiteral:function(i,s){if(this.disableLiteralsOptimization){this.tokens.push({type:q.TokenType.Text,value:(i.negated?"-":"")+i.value.toString(),ref:i});return}let o=this.transformer.context.literals.get(i);if(!this.isWithinArgument&&o!==null&&o.namespace!==null){this.tokens.push({type:q.TokenType.Text,value:o.namespace,ref:i});return}this.tokens.push({type:q.TokenType.Text,value:(i.negated?"-":"")+i.value.toString(),ref:i})},WhileStatement:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"while ",ref:{start:i.start,end:i.start}}),this.process(i.condition),this.tokens.push({type:q.TokenType.EndOfLine,value:`
149
+ `,ref:{start:o.end,end:o.end}})}this.tokens.push({type:q.TokenType.Text,value:"end function",ref:{start:i.end,end:i.end}})},MapConstructorExpression:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"{",ref:{start:i.start,end:i.start}});for(let o=0;o<i.fields.length;o++){let l=i.fields[o];this.process(l),o!==i.fields.length-1&&this.tokens.push({type:q.TokenType.Text,value:",",ref:l})}this.tokens.push({type:q.TokenType.Text,value:"}",ref:{start:i.end,end:i.end}})},MapKeyString:function(i,s){this.process(i.key),this.tokens.push({type:q.TokenType.Text,value:":",ref:i}),this.process(i.value)},Identifier:function(i,s){let o=i.name;if(this.disableNamespacesOptimization){this.tokens.push({type:q.TokenType.Text,value:o,ref:i});return}if(s.isMember&&s.usesNativeVar?o=this.forIdxMapping.get(o)||this.transformer.context.variables.get(o)||o:s.isMember||(o=this.forIdxMapping.get(o)||this.transformer.context.variables.get(o)||o),s.isForVariable&&i.name!==o){let l=`__${i.name}_idx`,u=`__${o}_idx`;this.forIdxMapping.set(l,u)}this.tokens.push({type:q.TokenType.Text,value:o,ref:i})},ReturnStatement:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"return ",ref:i}),i.argument&&this.process(i.argument)},NumericLiteral:function(i,s){if(this.disableLiteralsOptimization){this.tokens.push({type:q.TokenType.Text,value:(i.negated?"-":"")+i.value.toString(),ref:i});return}let o=this.transformer.context.literals.get(i);if(!this.isWithinArgument&&o!==null&&o.namespace!==null){this.tokens.push({type:q.TokenType.Text,value:o.namespace,ref:i});return}this.tokens.push({type:q.TokenType.Text,value:(i.negated?"-":"")+i.value.toString(),ref:i})},WhileStatement:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"while ",ref:{start:i.start,end:i.start}}),this.process(i.condition),this.tokens.push({type:q.TokenType.EndOfLine,value:`
150
150
  `,ref:{start:i.start,end:i.start}});for(let o of i.body){let l=this.tokens.length;this.process(o),l<this.tokens.length&&this.tokens.push({type:q.TokenType.EndOfLine,value:`
151
- `,ref:{start:o.end,end:o.end}})}this.tokens.push({type:q.TokenType.Text,value:"end while",ref:{start:i.end,end:i.end}})},CallExpression:function(i,s){let o=(0,s0.createExpressionString)(i.base),l=o==="globals.hasIndex"||o==="locals.hasIndex"||o==="outer.hasIndex",u;if(this.process(i.base),l){if(u=i.arguments[0],u.type==="StringLiteral"){let a=u.value.toString(),c=this.transformer.context.variables.get(a);this.tokens.push({type:q.TokenType.Text,value:'("'+(c!=null?c:a)+'")',ref:{start:i.start,end:i.start}});return}this.tokens.push({type:q.TokenType.Text,value:"(",ref:{start:i.start,end:i.start}}),this.process(u),this.tokens.push({type:q.TokenType.Text,value:")",ref:{start:i.end,end:i.end}});return}if(i.arguments.length!==0){this.tokens.push({type:q.TokenType.Text,value:"(",ref:{start:i.start,end:i.start}});for(let a=0;a<i.arguments.length;a++){let c=i.arguments[a];this.process(c),a!==i.arguments.length-1&&this.tokens.push({type:q.TokenType.Text,value:",",ref:c})}this.tokens.push({type:q.TokenType.Text,value:")",ref:{start:i.end,end:i.end}})}},StringLiteral:function(i,s){if(this.disableLiteralsOptimization){this.tokens.push({type:q.TokenType.Text,value:i.raw.toString(),ref:i});return}let o=this.transformer.context.literals.get(i);if(!this.isWithinArgument&&o!==null&&o.namespace!==null){this.tokens.push({type:q.TokenType.Text,value:o.namespace,ref:i});return}this.tokens.push({type:q.TokenType.Text,value:i.raw.toString(),ref:i})},SliceExpression:function(i,s){this.process(i.base),this.tokens.push({type:q.TokenType.Text,value:"[",ref:i}),this.process(i.left),this.tokens.push({type:q.TokenType.Text,value:":",ref:i}),this.process(i.right),this.tokens.push({type:q.TokenType.Text,value:"]",ref:i})},IndexExpression:function(i,s){this.process(i.base),this.tokens.push({type:q.TokenType.Text,value:"[",ref:i}),this.process(i.index),this.tokens.push({type:q.TokenType.Text,value:"]",ref:i})},UnaryExpression:function(i,s){i.operator==="new"?this.tokens.push({type:q.TokenType.Text,value:i.operator+" ",ref:i}):this.tokens.push({type:q.TokenType.Text,value:i.operator,ref:i}),this.process(i.argument)},NegationExpression:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"not ",ref:i}),this.process(i.argument)},FeatureEnvarExpression:function(i,s){if(this.transformer.buildOptions.isDevMode){this.tokens.push({type:q.TokenType.Text,value:`#envar ${i.name}`,ref:i});return}let o=this.transformer.environmentVariables.get(i.name);if(!o){this.tokens.push({type:q.TokenType.Text,value:"null",ref:i});return}this.tokens.push({type:q.TokenType.Text,value:`"${o}"`,ref:i})},FeatureDebuggerExpression:function(i,s){if(this.transformer.buildOptions.isDevMode){this.tokens.push({type:q.TokenType.Text,value:"debugger",ref:i});return}this.tokens.push({type:q.TokenType.Text,value:"//debugger",ref:i})},FeatureLineExpression:function(i,s){if(this.transformer.buildOptions.isDevMode){this.tokens.push({type:q.TokenType.Text,value:"#line",ref:i});return}this.tokens.push({type:q.TokenType.Text,value:`${i.start.line}`,ref:i})},FeatureFileExpression:function(i,s){if(this.transformer.buildOptions.isDevMode){this.tokens.push({type:q.TokenType.Text,value:"#filename",ref:i});return}this.tokens.push({type:q.TokenType.Text,value:`"${(0,qL.basename)(i.filename).replace(/"/g,'"')}"`,ref:i})},IfShortcutStatement:function(i,s){for(let o=0;o<i.clauses.length;o++){let l=i.clauses[o];this.process(l),o!==i.clauses.length-1&&this.tokens.push({type:q.TokenType.Text,value:" ",ref:i})}},IfShortcutClause:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"if ",ref:i}),this.process(i.condition),this.tokens.push({type:q.TokenType.Text,value:" then ",ref:i}),this.process(i.body[0])},ElseifShortcutClause:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"else if ",ref:i}),this.process(i.condition),this.tokens.push({type:q.TokenType.Text,value:" then ",ref:i}),this.process(i.body[0])},ElseShortcutClause:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"else ",ref:i}),this.process(i.body[0])},NilLiteral:function(i,s){if(this.disableLiteralsOptimization){this.tokens.push({type:q.TokenType.Text,value:"null",ref:i});return}let o=this.transformer.context.literals.get(i);if(!this.isWithinArgument&&o!==null&&o.namespace!==null){this.tokens.push({type:q.TokenType.Text,value:o.namespace,ref:i});return}this.tokens.push({type:q.TokenType.Text,value:"null",ref:i})},ForGenericStatement:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"for ",ref:{start:i.start,end:i.start}}),this.process(i.variable),this.tokens.push({type:q.TokenType.Text,value:" in ",ref:{start:i.start,end:i.start}}),this.process(i.iterator),this.tokens.push({type:q.TokenType.EndOfLine,value:`
151
+ `,ref:{start:o.end,end:o.end}})}this.tokens.push({type:q.TokenType.Text,value:"end while",ref:{start:i.end,end:i.end}})},CallExpression:function(i,s){let o=(0,s0.createExpressionString)(i.base),l=o==="globals.hasIndex"||o==="locals.hasIndex"||o==="outer.hasIndex",u;if(this.process(i.base),l){if(u=i.arguments[0],u.type==="StringLiteral"){let a=u.value.toString(),c=this.transformer.context.variables.get(a);this.tokens.push({type:q.TokenType.Text,value:'("'+(c!=null?c:a)+'")',ref:{start:i.start,end:i.start}});return}this.tokens.push({type:q.TokenType.Text,value:"(",ref:{start:i.start,end:i.start}}),this.process(u),this.tokens.push({type:q.TokenType.Text,value:")",ref:{start:i.end,end:i.end}});return}if(i.arguments.length!==0){this.tokens.push({type:q.TokenType.Text,value:"(",ref:{start:i.start,end:i.start}});for(let a=0;a<i.arguments.length;a++){let c=i.arguments[a];this.process(c),a!==i.arguments.length-1&&this.tokens.push({type:q.TokenType.Text,value:",",ref:c})}this.tokens.push({type:q.TokenType.Text,value:")",ref:{start:i.end,end:i.end}})}},StringLiteral:function(i,s){if(this.disableLiteralsOptimization){this.tokens.push({type:q.TokenType.Text,value:i.raw.toString(),ref:i});return}let o=this.transformer.context.literals.get(i);if(!this.isWithinArgument&&o!==null&&o.namespace!==null){this.tokens.push({type:q.TokenType.Text,value:o.namespace,ref:i});return}this.tokens.push({type:q.TokenType.Text,value:i.raw.toString(),ref:i})},SliceExpression:function(i,s){this.process(i.base),this.tokens.push({type:q.TokenType.Text,value:"[",ref:i}),this.process(i.left),this.tokens.push({type:q.TokenType.Text,value:":",ref:i}),this.process(i.right),this.tokens.push({type:q.TokenType.Text,value:"]",ref:i})},IndexExpression:function(i,s){this.process(i.base),this.tokens.push({type:q.TokenType.Text,value:"[",ref:i}),this.process(i.index),this.tokens.push({type:q.TokenType.Text,value:"]",ref:i})},UnaryExpression:function(i,s){i.operator==="new"?this.tokens.push({type:q.TokenType.Text,value:i.operator+" ",ref:i}):this.tokens.push({type:q.TokenType.Text,value:i.operator,ref:i}),this.process(i.argument)},NegationExpression:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"not ",ref:i}),this.process(i.argument)},FeatureEnvarExpression:function(i,s){if(this.transformer.buildOptions.isDevMode){this.tokens.push({type:q.TokenType.Text,value:`#envar ${i.name}`,ref:i});return}let o=this.transformer.environmentVariables.get(i.name);if(!o){this.tokens.push({type:q.TokenType.Text,value:"null",ref:i});return}this.tokens.push({type:q.TokenType.Text,value:`"${o}"`,ref:i})},FeatureDebuggerExpression:function(i,s){if(this.transformer.buildOptions.isDevMode){this.tokens.push({type:q.TokenType.Text,value:"debugger",ref:i});return}this.tokens.push({type:q.TokenType.Text,value:"//debugger",ref:i})},FeatureLineExpression:function(i,s){if(this.transformer.buildOptions.isDevMode){this.tokens.push({type:q.TokenType.Text,value:"#line",ref:i});return}this.tokens.push({type:q.TokenType.Text,value:`${i.start.line}`,ref:i})},FeatureFileExpression:function(i,s){if(this.transformer.buildOptions.isDevMode){this.tokens.push({type:q.TokenType.Text,value:"#filename",ref:i});return}this.tokens.push({type:q.TokenType.Text,value:`"${(0,qL.basename)(i.filename).replace(/"/g,'"')}"`,ref:i})},IfShortcutStatement:function(i,s){for(let o=0;o<i.clauses.length;o++){let l=i.clauses[o];this.process(l),o!==i.clauses.length-1&&this.tokens.push({type:q.TokenType.Text,value:" ",ref:i})}},IfShortcutClause:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"if ",ref:i}),this.process(i.condition),this.tokens.push({type:q.TokenType.Text,value:" then ",ref:i}),this.process(i.body[0])},ElseifShortcutClause:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"else if ",ref:i}),this.process(i.condition),this.tokens.push({type:q.TokenType.Text,value:" then ",ref:i}),this.process(i.body[0])},ElseShortcutClause:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"else ",ref:i}),this.process(i.body[0])},NilLiteral:function(i,s){if(this.disableLiteralsOptimization){this.tokens.push({type:q.TokenType.Text,value:"null",ref:i});return}let o=this.transformer.context.literals.get(i);if(!this.isWithinArgument&&o!==null&&o.namespace!==null){this.tokens.push({type:q.TokenType.Text,value:o.namespace,ref:i});return}this.tokens.push({type:q.TokenType.Text,value:"null",ref:i})},ForGenericStatement:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"for ",ref:{start:i.start,end:i.start}}),this.process(i.variable,{isForVariable:!0}),this.tokens.push({type:q.TokenType.Text,value:" in ",ref:{start:i.start,end:i.start}}),this.process(i.iterator),this.tokens.push({type:q.TokenType.EndOfLine,value:`
152
152
  `,ref:{start:i.start,end:i.start}});for(let o of i.body){let l=this.tokens.length;this.process(o),l<this.tokens.length&&this.tokens.push({type:q.TokenType.EndOfLine,value:`
153
153
  `,ref:{start:o.end,end:o.end}})}this.tokens.push({type:q.TokenType.Text,value:"end for",ref:{start:i.end,end:i.end}})},IfStatement:function(i,s){for(let o of i.clauses)this.process(o);this.tokens.push({type:q.TokenType.Text,value:"end if",ref:{start:i.end,end:i.end}})},IfClause:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"if ",ref:{start:i.start,end:i.start}}),this.process(i.condition),this.tokens.push({type:q.TokenType.Text,value:" then",ref:{start:i.start,end:i.start}}),this.tokens.push({type:q.TokenType.EndOfLine,value:`
154
154
  `,ref:{start:i.start,end:i.start}});for(let o of i.body){let l=this.tokens.length;this.process(o),l<this.tokens.length&&this.tokens.push({type:q.TokenType.EndOfLine,value:`
@@ -157,8 +157,8 @@ ${e}
157
157
  `,ref:{start:o.end,end:o.end}})}},ElseClause:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"else",ref:{start:i.start,end:i.start}}),this.tokens.push({type:q.TokenType.EndOfLine,value:`
158
158
  `,ref:{start:i.start,end:i.start}});for(let o of i.body){let l=this.tokens.length;this.process(o),l<this.tokens.length&&this.tokens.push({type:q.TokenType.EndOfLine,value:`
159
159
  `,ref:{start:o.end,end:o.end}})}},ContinueStatement:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"continue",ref:i})},BreakStatement:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"break",ref:i})},CallStatement:function(i,s){this.process(i.expression)},FeatureInjectExpression:function(i,s){if(this.transformer.buildOptions.isDevMode){this.tokens.push({type:q.TokenType.Text,value:`#inject "${i.path}";`,ref:i});return}if(this.currentDependency===null){this.tokens.push({type:q.TokenType.Text,value:`#inject "${i.path}";`,ref:i});return}let o=this.currentDependency.injections.get(i.path);if(o==null){this.tokens.push({type:q.TokenType.Text,value:"null",ref:i});return}this.tokens.push({type:q.TokenType.Text,value:`"${o.replace(/"/g,'""')}"`,ref:i})},FeatureImportExpression:function(i,s){if(this.transformer.buildOptions.isDevMode){this.tokens.push({type:q.TokenType.Text,value:"#import ",ref:i}),this.process(i.name),this.tokens.push({type:q.TokenType.Text,value:` from "${i.path}";`,ref:i});return}if(!i.chunk){this.tokens.push({type:q.TokenType.Text,value:"#import ",ref:i}),this.process(i.name),this.tokens.push({type:q.TokenType.Text,value:` from "${i.path}";`,ref:i});return}if(this.process(i.name),this.disableNamespacesOptimization){this.tokens.push({type:q.TokenType.Text,value:`=__REQUIRE("${i.namespace}")`,ref:i});return}let o=this.transformer.context.variables.get("__REQUIRE");this.tokens.push({type:q.TokenType.Text,value:`=${o}("${i.namespace}")`,ref:i})},FeatureIncludeExpression:function(i,s){if(this.transformer.buildOptions.isDevMode){this.tokens.push({type:q.TokenType.Text,value:`#include "${i.path}";`,ref:i});return}if(!i.chunk){this.tokens.push({type:q.TokenType.Text,value:`#include "${i.path}";`,ref:i});return}this.process(i.chunk)},ListConstructorExpression:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"[",ref:i});for(let o=0;o<i.fields.length;o++){let l=i.fields[o];this.process(l),o!==i.fields.length-1&&this.tokens.push({type:q.TokenType.Text,value:",",ref:l})}this.tokens.push({type:q.TokenType.Text,value:"]",ref:i})},ListValue:function(i,s){this.process(i.value)},BooleanLiteral:function(i,s){if(this.disableLiteralsOptimization){this.tokens.push({type:q.TokenType.Text,value:(i.negated?"-":"")+i.raw.toString(),ref:i});return}let o=this.transformer.context.literals.get(i);if(!this.isWithinArgument&&o!==null&&o.namespace!==null){this.tokens.push({type:q.TokenType.Text,value:o.namespace,ref:i});return}this.tokens.push({type:q.TokenType.Text,value:(i.negated?"-":"")+i.raw.toString(),ref:i})},EmptyExpression:function(i,s){this.tokens.push({type:q.TokenType.Text,value:"",ref:i})},IsaExpression:function(i,s){this.process(i.left),this.tokens.push({type:q.TokenType.Text,value:" "+i.operator+" ",ref:i}),this.process(i.right)},LogicalExpression:function(i,s){this.process(i.left),this.tokens.push({type:q.TokenType.Text,value:" "+i.operator+" ",ref:i}),this.process(i.right)},BinaryExpression:function(i,s){if(i.operator==="|"){this.tokens.push({type:q.TokenType.Text,value:"bitOr(",ref:i}),this.process(i.left),this.tokens.push({type:q.TokenType.Text,value:",",ref:i}),this.process(i.right),this.tokens.push({type:q.TokenType.Text,value:")",ref:i});return}else if(i.operator==="&"){this.tokens.push({type:q.TokenType.Text,value:"bitAnd(",ref:i}),this.process(i.left),this.tokens.push({type:q.TokenType.Text,value:",",ref:i}),this.process(i.right),this.tokens.push({type:q.TokenType.Text,value:")",ref:i});return}else if(i.operator==="<<"||i.operator===">>"||i.operator===">>>")throw new Error("Operators in binary expression are not supported");this.process(i.left),this.tokens.push({type:q.TokenType.Text,value:i.operator,ref:i}),this.process(i.right)},BinaryNegatedExpression:function(i,s){this.tokens.push({type:q.TokenType.Text,value:i.operator,ref:i}),this.process(i.argument)},ComparisonGroupExpression:function(i,s){this.process(i.expressions[0]);for(let o=0;o<i.operators.length;o++)this.tokens.push({type:q.TokenType.Text,value:i.operators[o],ref:i}),this.process(i.expressions[o+1])},Chunk:function(i,s){for(let o of i.body){let l=this.tokens.length;this.process(o),l<this.tokens.length&&this.tokens.push({type:q.TokenType.EndOfLine,value:`
160
- `,ref:{start:o.end,end:o.end}})}}},this.disableLiteralsOptimization=(r=e.buildOptions.disableLiteralsOptimization)!==null&&r!==void 0?r:!1,this.disableNamespacesOptimization=(t=e.buildOptions.disableNamespacesOptimization)!==null&&t!==void 0?t:!1,this.isWithinArgument=!1}transform(e,r){this._tokens=[],this._currentDependency=r,this.process(e);let t="";for(let i=0;i<this.tokens.length-1;i++){let s=this.tokens[i];if(s.type===q.TokenType.Text||s.type===q.TokenType.Comment)t+=s.value;else if(s.type===q.TokenType.EndOfLine)t+=`
161
- `;else throw new Error("Unknown token type!")}return t}generateOptimizations(){let e=this.transformer.context,r=Array.from(e.literals.getMapping().values()).filter(s=>s.namespace!=null),t=e.variables.get("globals"),i=[];return(!this.disableNamespacesOptimization||r.length>0)&&i.push(`globals.${t}=globals`),r.length>0&&i.push(...r.map(s=>`${t}.${s.namespace}=${s.literal.raw}`)),i}};Pc.UglifyFactory=pb});var Cc=S(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.getFactory=hi.BuildType=void 0;var FL=ab(),NL=ub(),$L=db(),da;(function(n){n[n.DEFAULT=0]="DEFAULT",n[n.UGLIFY=1]="UGLIFY",n[n.BEAUTIFY=2]="BEAUTIFY"})(da=hi.BuildType||(hi.BuildType={}));var UL={[da.DEFAULT]:NL.DefaultFactory,[da.UGLIFY]:$L.UglifyFactory,[da.BEAUTIFY]:FL.BeautifyFactory};function BL(n=da.DEFAULT){let e=UL[n];if(!e)throw new Error("Unknown build type.");return e}hi.getFactory=BL});var Ac=S((o0,Oc)=>{(function(n){"use strict";function e(w,k){var y=(w&65535)+(k&65535),x=(w>>16)+(k>>16)+(y>>16);return x<<16|y&65535}function r(w,k){return w<<k|w>>>32-k}function t(w,k,y,x,T,P){return e(r(e(e(k,w),e(x,P)),T),y)}function i(w,k,y,x,T,P,A){return t(k&y|~k&x,w,k,T,P,A)}function s(w,k,y,x,T,P,A){return t(k&x|y&~x,w,k,T,P,A)}function o(w,k,y,x,T,P,A){return t(k^y^x,w,k,T,P,A)}function l(w,k,y,x,T,P,A){return t(y^(k|~x),w,k,T,P,A)}function u(w,k){w[k>>5]|=128<<k%32,w[(k+64>>>9<<4)+14]=k;var y,x,T,P,A,I=1732584193,C=-271733879,O=-1732584194,j=271733878;for(y=0;y<w.length;y+=16)x=I,T=C,P=O,A=j,I=i(I,C,O,j,w[y],7,-680876936),j=i(j,I,C,O,w[y+1],12,-389564586),O=i(O,j,I,C,w[y+2],17,606105819),C=i(C,O,j,I,w[y+3],22,-1044525330),I=i(I,C,O,j,w[y+4],7,-176418897),j=i(j,I,C,O,w[y+5],12,1200080426),O=i(O,j,I,C,w[y+6],17,-1473231341),C=i(C,O,j,I,w[y+7],22,-45705983),I=i(I,C,O,j,w[y+8],7,1770035416),j=i(j,I,C,O,w[y+9],12,-1958414417),O=i(O,j,I,C,w[y+10],17,-42063),C=i(C,O,j,I,w[y+11],22,-1990404162),I=i(I,C,O,j,w[y+12],7,1804603682),j=i(j,I,C,O,w[y+13],12,-40341101),O=i(O,j,I,C,w[y+14],17,-1502002290),C=i(C,O,j,I,w[y+15],22,1236535329),I=s(I,C,O,j,w[y+1],5,-165796510),j=s(j,I,C,O,w[y+6],9,-1069501632),O=s(O,j,I,C,w[y+11],14,643717713),C=s(C,O,j,I,w[y],20,-373897302),I=s(I,C,O,j,w[y+5],5,-701558691),j=s(j,I,C,O,w[y+10],9,38016083),O=s(O,j,I,C,w[y+15],14,-660478335),C=s(C,O,j,I,w[y+4],20,-405537848),I=s(I,C,O,j,w[y+9],5,568446438),j=s(j,I,C,O,w[y+14],9,-1019803690),O=s(O,j,I,C,w[y+3],14,-187363961),C=s(C,O,j,I,w[y+8],20,1163531501),I=s(I,C,O,j,w[y+13],5,-1444681467),j=s(j,I,C,O,w[y+2],9,-51403784),O=s(O,j,I,C,w[y+7],14,1735328473),C=s(C,O,j,I,w[y+12],20,-1926607734),I=o(I,C,O,j,w[y+5],4,-378558),j=o(j,I,C,O,w[y+8],11,-2022574463),O=o(O,j,I,C,w[y+11],16,1839030562),C=o(C,O,j,I,w[y+14],23,-35309556),I=o(I,C,O,j,w[y+1],4,-1530992060),j=o(j,I,C,O,w[y+4],11,1272893353),O=o(O,j,I,C,w[y+7],16,-155497632),C=o(C,O,j,I,w[y+10],23,-1094730640),I=o(I,C,O,j,w[y+13],4,681279174),j=o(j,I,C,O,w[y],11,-358537222),O=o(O,j,I,C,w[y+3],16,-722521979),C=o(C,O,j,I,w[y+6],23,76029189),I=o(I,C,O,j,w[y+9],4,-640364487),j=o(j,I,C,O,w[y+12],11,-421815835),O=o(O,j,I,C,w[y+15],16,530742520),C=o(C,O,j,I,w[y+2],23,-995338651),I=l(I,C,O,j,w[y],6,-198630844),j=l(j,I,C,O,w[y+7],10,1126891415),O=l(O,j,I,C,w[y+14],15,-1416354905),C=l(C,O,j,I,w[y+5],21,-57434055),I=l(I,C,O,j,w[y+12],6,1700485571),j=l(j,I,C,O,w[y+3],10,-1894986606),O=l(O,j,I,C,w[y+10],15,-1051523),C=l(C,O,j,I,w[y+1],21,-2054922799),I=l(I,C,O,j,w[y+8],6,1873313359),j=l(j,I,C,O,w[y+15],10,-30611744),O=l(O,j,I,C,w[y+6],15,-1560198380),C=l(C,O,j,I,w[y+13],21,1309151649),I=l(I,C,O,j,w[y+4],6,-145523070),j=l(j,I,C,O,w[y+11],10,-1120210379),O=l(O,j,I,C,w[y+2],15,718787259),C=l(C,O,j,I,w[y+9],21,-343485551),I=e(I,x),C=e(C,T),O=e(O,P),j=e(j,A);return[I,C,O,j]}function a(w){var k,y="",x=w.length*32;for(k=0;k<x;k+=8)y+=String.fromCharCode(w[k>>5]>>>k%32&255);return y}function c(w){var k,y=[];for(y[(w.length>>2)-1]=void 0,k=0;k<y.length;k+=1)y[k]=0;var x=w.length*8;for(k=0;k<x;k+=8)y[k>>5]|=(w.charCodeAt(k/8)&255)<<k%32;return y}function p(w){return a(u(c(w),w.length*8))}function d(w,k){var y,x=c(w),T=[],P=[],A;for(T[15]=P[15]=void 0,x.length>16&&(x=u(x,w.length*8)),y=0;y<16;y+=1)T[y]=x[y]^909522486,P[y]=x[y]^1549556828;return A=u(T.concat(c(k)),512+k.length*8),a(u(P.concat(A),640))}function h(w){var k="0123456789abcdef",y="",x,T;for(T=0;T<w.length;T+=1)x=w.charCodeAt(T),y+=k.charAt(x>>>4&15)+k.charAt(x&15);return y}function g(w){return unescape(encodeURIComponent(w))}function f(w){return p(g(w))}function m(w){return h(f(w))}function b(w,k){return d(g(w),g(k))}function v(w,k){return h(b(w,k))}function _(w,k,y){return k?y?b(k,w):v(k,w):y?f(w):m(w)}typeof define=="function"&&define.amd?define(function(){return _}):typeof Oc=="object"&&Oc.exports?Oc.exports=_:n.md5=_})(o0)});var fb=S(js=>{"use strict";var WL=js&&js.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(js,"__esModule",{value:!0});js.LiteralsMapper=void 0;var VL=WL(Ac()),hb=class{constructor(e){let r=this;r.mapping=new Map,r.variableNamespacesGenerator=e}reset(){let e=this;return e.mapping=new Map,e}add(e){let r=this,t=e.raw.toString();if(!r.mapping.has(t))r.mapping.set(t,{literal:e,amount:1,length:t.length,namespace:null});else{let i=r.mapping.get(t),s=i.amount+1,o=i.length+t.length;i.amount=s,i.length=o,o>10&&s>2&&i.namespace==null&&(i.namespace=r.variableNamespacesGenerator.createNamespace((0,VL.default)(t)))}return r}get(e){let r=this,t=e.raw.toString();return r.mapping.has(t)?r.mapping.get(t):null}getMapping(){return this.mapping}};js.LiteralsMapper=hb});var gb=S(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});Dc.NamespaceGenerator=void 0;var mb=class{constructor(e){let r=this;r.buffer=[0],r.mapping=new Map,r.rmapping=new Map,r.forbidden=e.forbidden||[],r.characters=e.characters||null,r.defaultNamespaces=e.defaultNamespaces||[];for(let t of r.defaultNamespaces)r.createNamespace(t)}exclude(e){let r=this;return Array.isArray(e)?r.forbidden=r.forbidden.concat(e):r.forbidden.push(e),r}setCharset(e){let r=this;return r.characters=e,r}reset(){let e=this;return e.buffer=[0],e.mapping=new Map,e.rmapping=new Map,e}get(e){let r=this.mapping;return r.has(e)?r.get(e):null}increaseBuffer(e){let r=this,t=r.buffer,i=r.characters.length;e==null&&(e=t.length-1);let s=t[e];return s=s+1,t[e]=s,s===i&&(t[e]=0,e===0?t.push(0):r.increaseBuffer(e-1)),r}generateNamespace(){let e=this,r=e.buffer,t=e.characters,i=e.forbidden,s="",o=0,l;for(;o<r.length;)l=r[o],s=s+t[l],o===r.length-1&&e.increaseBuffer(),o=o+1;return i.indexOf(s)!==-1||e.mapping.has(s)?e.generateNamespace():s}createNamespace(e,r=!1){let t=this,i=t.mapping,s=t.rmapping;if(t.forbidden.indexOf(e)!==-1)return e;if(i.has(e)&&!r)return i.get(e);let l=t.generateNamespace();if(i.set(e,l),s.set(l,e),s.has(e)){let u=s.get(e);s.delete(e),l=t.createNamespace(u,!0)}return l}};Dc.NamespaceGenerator=mb});var ha=S(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.Context=fi.ContextDataProperty=void 0;var HL=fb(),a0=gb(),zL;(function(n){n.ResourceDependencyMap="resourceDependencyMap",n.DependencyCallStack="dependencyCallStack"})(zL=fi.ContextDataProperty||(fi.ContextDataProperty={}));var yb=class{constructor(e){let r=this;r.modules=new a0.NamespaceGenerator({characters:e.modulesCharset}),r.variables=new a0.NamespaceGenerator({characters:e.variablesCharset,defaultNamespaces:["BACKSLASH_CODE","NEW_LINE_OPERATOR","MODULES","EXPORTED","__REQUIRE","MAIN","module","globals"],forbidden:["locals","outer","self","super","string","list","map","number","funcRef",...e.variablesExcluded||[]]}),r.literals=new HL.LiteralsMapper(r.variables),r.data=new Map}createModuleNamespace(e){return this.modules.createNamespace(e)}getOrCreateData(e,r){let t=this;if(t.data.has(e))return t.data.get(e);let i=r();return t.data.set(e,i),i}set(e,r){return this.data.set(e,r),this}get(e){return this.data.get(e)}};fi.Context=yb});var bb=S(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.DependencyType=void 0;var GL;(function(n){n[n.Main=0]="Main",n[n.Import=1]="Import",n[n.Include=2]="Include"})(GL=fa.DependencyType||(fa.DependencyType={}))});var Lc=S(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});jc.BuildError=void 0;var vb=class extends Error{constructor(e,r){super(e),this.target=r.target,this.range=r.range}};jc.BuildError=vb});var qc=S(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});Mc.fetchNamespaces=void 0;function KL(n){let e=new Set(n.namespaces);return n.scopes.reduce((r,t)=>(t.namespaces.forEach(i=>e.add(i)),r),e),Array.from(e)}Mc.fetchNamespaces=KL});var Nc=S(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});Fc.merge=void 0;function YL(n,e,r=1e4){if(e.length<=r){Array.prototype.push.apply(n,e);return}for(let t=0;t<e.length;t+=r)Array.prototype.push.apply(n,e.slice(t,t+r))}Fc.merge=YL});var kb=S(Nr=>{"use strict";var _b=Nr&&Nr.__awaiter||function(n,e,r,t){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(c){try{a(t.next(c))}catch(p){o(p)}}function u(c){try{a(t.throw(c))}catch(p){o(p)}}function a(c){c.done?s(c.value):i(c.value).then(l,u)}a((t=t.apply(n,e||[])).next())})},d0=Nr&&Nr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Nr,"__esModule",{value:!0});Nr.Dependency=void 0;var l0=d0(Ac()),QL=d0((Xn(),mt(Zn))),u0=qt(),$c=ha(),wb=bb(),c0=Lc(),JL=qc(),p0=Nc(),xb=class n extends QL.default{constructor(e){super();let r=this;r.target=e.target,r.id=(0,l0.default)(e.target),r.resourceHandler=e.resourceHandler,r.chunk=e.chunk,r.dependencies=new Set,r.injections=new Map,r.type=e.type||wb.DependencyType.Main,r.context=e.context,r.ref=e.ref;let t=r.context.createModuleNamespace(r.id);r.context.getOrCreateData($c.ContextDataProperty.ResourceDependencyMap,()=>new Map).set(t,r),r.context.getOrCreateData($c.ContextDataProperty.DependencyCallStack,()=>[])}getId(){return this.id}getNamespace(){let e=this;return e.context.modules.get(e.id)}resolve(e,r,t){return _b(this,void 0,void 0,function*(){let i=this,s=i.context,{modules:o}=s,l=s.get($c.ContextDataProperty.ResourceDependencyMap),u=i.resourceHandler,a=yield u.getTargetRelativeTo(i.target,e),c=(0,l0.default)(a),p=o.get(c);if(l.has(p))return l.get(p);if(!(yield u.has(a)))throw new Error("Dependency "+a+" does not exist...");let d=yield u.get(a);i.emit("parse-before",a);try{let g=new u0.Parser(d,{filename:a}).parseChunk(),f=new n({target:a,resourceHandler:u,chunk:g,type:r,context:s,ref:t});return i.emit("parse-after",f),f}catch(h){throw h instanceof c0.BuildError?h:new c0.BuildError(h.message,{target:a,range:h.range})}})}findInjections(){return _b(this,void 0,void 0,function*(){let e=this,{injects:r}=e.chunk,t=new Map;for(let i of r){let s=yield e.resourceHandler.getTargetRelativeTo(e.target,i.path);if(!(yield e.resourceHandler.has(s)))throw new Error("Injection "+s+" does not exist...");let o=yield e.resourceHandler.get(s);t.set(i.path,o)}return e.injections=t,t})}findDependencies(){return _b(this,void 0,void 0,function*(){let e=this,{imports:r,includes:t}=e.chunk,i=e.getNamespace(),s=e.context.get($c.ContextDataProperty.DependencyCallStack),o=[...(0,JL.fetchNamespaces)(e.chunk)],l=[...e.chunk.literals],u=[];s.push(i);let a=[...r,...t];for(let p of a){let d=p instanceof u0.ASTFeatureIncludeExpression?wb.DependencyType.Include:wb.DependencyType.Import,h=yield e.resolve(p.path,d,p),g=h.getNamespace();if(s.includes(g))throw new Error(`Circular dependency from ${e.target} to ${h.target} detected.`);let f=h.chunk;p.chunk=f,p.namespace=g;let m=yield h.findDependencies();(0,p0.merge)(o,m.namespaces),(0,p0.merge)(l,m.literals),u.push(h)}yield this.findInjections();let c=new Set(u);return e.dependencies=c,s.pop(),{dependencies:c,namespaces:o,literals:l}})}};Nr.Dependency=xb});var Bc=S(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.Transformer=void 0;var Tb=class{get factory(){return this._factory}get buildOptions(){return this._buildOptions}get context(){return this._context}get environmentVariables(){return this._environmentVariables}get resourceHandler(){return this._resourceHandler}constructor({buildOptions:e,factoryConstructor:r,context:t,environmentVariables:i,resourceHandler:s}){let o=this;o._buildOptions=e,o._context=t,o._environmentVariables=i,o._factory=new r(o),o._resourceHandler=s!=null?s:null}transform(e,r=null){let t=this;if(e.type!=="Chunk")throw new Error("Expects chunk");return t._factory.transform(e,r)}};Uc.Transformer=Tb});var Hc=S(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});Vc.generateCharsetMap=void 0;function Wc(n,e){let r="";for(;n<=e;)r=r+String.fromCharCode(n),n=n+1;return r}function ZL(n=!1){let e=Wc(65,90),r=Wc(97,122),t=Wc(48,57),i="_";return n&&(i=i+Wc(1e3,2e3)),{variables:e+r+i,modules:e+r+t+i}}Vc.generateCharsetMap=ZL});var Ib=S($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.MAIN_BOILERPLATE=$r.MODULE_BOILERPLATE=$r.HEADER_BOILERPLATE=void 0;var Sb=qt();$r.HEADER_BOILERPLATE=new Sb.Parser(`MODULES={}
160
+ `,ref:{start:o.end,end:o.end}})}}},this.disableLiteralsOptimization=(r=e.buildOptions.disableLiteralsOptimization)!==null&&r!==void 0?r:!1,this.disableNamespacesOptimization=(t=e.buildOptions.disableNamespacesOptimization)!==null&&t!==void 0?t:!1,this.forIdxMapping=new Map,this.isWithinArgument=!1}transform(e,r){this._tokens=[],this._currentDependency=r,this.process(e);let t="";for(let i=0;i<this.tokens.length-1;i++){let s=this.tokens[i];if(s.type===q.TokenType.Text||s.type===q.TokenType.Comment)t+=s.value;else if(s.type===q.TokenType.EndOfLine)t+=`
161
+ `;else throw new Error("Unknown token type!")}return t}generateOptimizations(){let e=this.transformer.context,r=Array.from(e.literals.getMapping().values()).filter(s=>s.namespace!=null),t=e.variables.get("globals"),i=[];return(!this.disableNamespacesOptimization||r.length>0)&&i.push(`globals.${t}=globals`),r.length>0&&i.push(...r.map(s=>`${t}.${s.namespace}=${s.literal.raw}`)),i}};Pc.UglifyFactory=pb});var Cc=S(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.getFactory=hi.BuildType=void 0;var FL=ab(),NL=ub(),$L=db(),da;(function(n){n[n.DEFAULT=0]="DEFAULT",n[n.UGLIFY=1]="UGLIFY",n[n.BEAUTIFY=2]="BEAUTIFY"})(da=hi.BuildType||(hi.BuildType={}));var UL={[da.DEFAULT]:NL.DefaultFactory,[da.UGLIFY]:$L.UglifyFactory,[da.BEAUTIFY]:FL.BeautifyFactory};function BL(n=da.DEFAULT){let e=UL[n];if(!e)throw new Error("Unknown build type.");return e}hi.getFactory=BL});var Ac=S((o0,Oc)=>{(function(n){"use strict";function e(w,k){var y=(w&65535)+(k&65535),x=(w>>16)+(k>>16)+(y>>16);return x<<16|y&65535}function r(w,k){return w<<k|w>>>32-k}function t(w,k,y,x,T,P){return e(r(e(e(k,w),e(x,P)),T),y)}function i(w,k,y,x,T,P,A){return t(k&y|~k&x,w,k,T,P,A)}function s(w,k,y,x,T,P,A){return t(k&x|y&~x,w,k,T,P,A)}function o(w,k,y,x,T,P,A){return t(k^y^x,w,k,T,P,A)}function l(w,k,y,x,T,P,A){return t(y^(k|~x),w,k,T,P,A)}function u(w,k){w[k>>5]|=128<<k%32,w[(k+64>>>9<<4)+14]=k;var y,x,T,P,A,I=1732584193,C=-271733879,O=-1732584194,j=271733878;for(y=0;y<w.length;y+=16)x=I,T=C,P=O,A=j,I=i(I,C,O,j,w[y],7,-680876936),j=i(j,I,C,O,w[y+1],12,-389564586),O=i(O,j,I,C,w[y+2],17,606105819),C=i(C,O,j,I,w[y+3],22,-1044525330),I=i(I,C,O,j,w[y+4],7,-176418897),j=i(j,I,C,O,w[y+5],12,1200080426),O=i(O,j,I,C,w[y+6],17,-1473231341),C=i(C,O,j,I,w[y+7],22,-45705983),I=i(I,C,O,j,w[y+8],7,1770035416),j=i(j,I,C,O,w[y+9],12,-1958414417),O=i(O,j,I,C,w[y+10],17,-42063),C=i(C,O,j,I,w[y+11],22,-1990404162),I=i(I,C,O,j,w[y+12],7,1804603682),j=i(j,I,C,O,w[y+13],12,-40341101),O=i(O,j,I,C,w[y+14],17,-1502002290),C=i(C,O,j,I,w[y+15],22,1236535329),I=s(I,C,O,j,w[y+1],5,-165796510),j=s(j,I,C,O,w[y+6],9,-1069501632),O=s(O,j,I,C,w[y+11],14,643717713),C=s(C,O,j,I,w[y],20,-373897302),I=s(I,C,O,j,w[y+5],5,-701558691),j=s(j,I,C,O,w[y+10],9,38016083),O=s(O,j,I,C,w[y+15],14,-660478335),C=s(C,O,j,I,w[y+4],20,-405537848),I=s(I,C,O,j,w[y+9],5,568446438),j=s(j,I,C,O,w[y+14],9,-1019803690),O=s(O,j,I,C,w[y+3],14,-187363961),C=s(C,O,j,I,w[y+8],20,1163531501),I=s(I,C,O,j,w[y+13],5,-1444681467),j=s(j,I,C,O,w[y+2],9,-51403784),O=s(O,j,I,C,w[y+7],14,1735328473),C=s(C,O,j,I,w[y+12],20,-1926607734),I=o(I,C,O,j,w[y+5],4,-378558),j=o(j,I,C,O,w[y+8],11,-2022574463),O=o(O,j,I,C,w[y+11],16,1839030562),C=o(C,O,j,I,w[y+14],23,-35309556),I=o(I,C,O,j,w[y+1],4,-1530992060),j=o(j,I,C,O,w[y+4],11,1272893353),O=o(O,j,I,C,w[y+7],16,-155497632),C=o(C,O,j,I,w[y+10],23,-1094730640),I=o(I,C,O,j,w[y+13],4,681279174),j=o(j,I,C,O,w[y],11,-358537222),O=o(O,j,I,C,w[y+3],16,-722521979),C=o(C,O,j,I,w[y+6],23,76029189),I=o(I,C,O,j,w[y+9],4,-640364487),j=o(j,I,C,O,w[y+12],11,-421815835),O=o(O,j,I,C,w[y+15],16,530742520),C=o(C,O,j,I,w[y+2],23,-995338651),I=l(I,C,O,j,w[y],6,-198630844),j=l(j,I,C,O,w[y+7],10,1126891415),O=l(O,j,I,C,w[y+14],15,-1416354905),C=l(C,O,j,I,w[y+5],21,-57434055),I=l(I,C,O,j,w[y+12],6,1700485571),j=l(j,I,C,O,w[y+3],10,-1894986606),O=l(O,j,I,C,w[y+10],15,-1051523),C=l(C,O,j,I,w[y+1],21,-2054922799),I=l(I,C,O,j,w[y+8],6,1873313359),j=l(j,I,C,O,w[y+15],10,-30611744),O=l(O,j,I,C,w[y+6],15,-1560198380),C=l(C,O,j,I,w[y+13],21,1309151649),I=l(I,C,O,j,w[y+4],6,-145523070),j=l(j,I,C,O,w[y+11],10,-1120210379),O=l(O,j,I,C,w[y+2],15,718787259),C=l(C,O,j,I,w[y+9],21,-343485551),I=e(I,x),C=e(C,T),O=e(O,P),j=e(j,A);return[I,C,O,j]}function a(w){var k,y="",x=w.length*32;for(k=0;k<x;k+=8)y+=String.fromCharCode(w[k>>5]>>>k%32&255);return y}function c(w){var k,y=[];for(y[(w.length>>2)-1]=void 0,k=0;k<y.length;k+=1)y[k]=0;var x=w.length*8;for(k=0;k<x;k+=8)y[k>>5]|=(w.charCodeAt(k/8)&255)<<k%32;return y}function p(w){return a(u(c(w),w.length*8))}function d(w,k){var y,x=c(w),T=[],P=[],A;for(T[15]=P[15]=void 0,x.length>16&&(x=u(x,w.length*8)),y=0;y<16;y+=1)T[y]=x[y]^909522486,P[y]=x[y]^1549556828;return A=u(T.concat(c(k)),512+k.length*8),a(u(P.concat(A),640))}function h(w){var k="0123456789abcdef",y="",x,T;for(T=0;T<w.length;T+=1)x=w.charCodeAt(T),y+=k.charAt(x>>>4&15)+k.charAt(x&15);return y}function g(w){return unescape(encodeURIComponent(w))}function f(w){return p(g(w))}function m(w){return h(f(w))}function b(w,k){return d(g(w),g(k))}function v(w,k){return h(b(w,k))}function _(w,k,y){return k?y?b(k,w):v(k,w):y?f(w):m(w)}typeof define=="function"&&define.amd?define(function(){return _}):typeof Oc=="object"&&Oc.exports?Oc.exports=_:n.md5=_})(o0)});var fb=S(js=>{"use strict";var WL=js&&js.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(js,"__esModule",{value:!0});js.LiteralsMapper=void 0;var VL=WL(Ac()),hb=class{constructor(e){let r=this;r.mapping=new Map,r.variableNamespacesGenerator=e}reset(){let e=this;return e.mapping=new Map,e}add(e){let r=this,t=e.raw.toString();if(!r.mapping.has(t))r.mapping.set(t,{literal:e,amount:1,length:t.length,namespace:null});else{let i=r.mapping.get(t),s=i.amount+1,o=i.length+t.length;i.amount=s,i.length=o,o>10&&s>2&&i.namespace==null&&(i.namespace=r.variableNamespacesGenerator.createNamespace((0,VL.default)(t)))}return r}get(e){let r=this,t=e.raw.toString();return r.mapping.has(t)?r.mapping.get(t):null}getMapping(){return this.mapping}};js.LiteralsMapper=hb});var gb=S(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});Dc.NamespaceGenerator=void 0;var mb=class{constructor(e){let r=this;r.buffer=[0],r.mapping=new Map,r.rmapping=new Map,r.forbidden=e.forbidden||[],r.characters=e.characters||null,r.defaultNamespaces=e.defaultNamespaces||[];for(let t of r.defaultNamespaces)r.createNamespace(t)}exclude(e){let r=this;return Array.isArray(e)?r.forbidden=r.forbidden.concat(e):r.forbidden.push(e),r}setCharset(e){let r=this;return r.characters=e,r}reset(){let e=this;return e.buffer=[0],e.mapping=new Map,e.rmapping=new Map,e}get(e){let r=this.mapping;return r.has(e)?r.get(e):null}increaseBuffer(e){let r=this,t=r.buffer,i=r.characters.length;e==null&&(e=t.length-1);let s=t[e];return s=s+1,t[e]=s,s===i&&(t[e]=0,e===0?t.push(0):r.increaseBuffer(e-1)),r}generateNamespace(){let e=this,r=e.buffer,t=e.characters,i=e.forbidden,s="",o=0,l;for(;o<r.length;)l=r[o],s=s+t[l],o===r.length-1&&e.increaseBuffer(),o=o+1;return i.indexOf(s)!==-1||e.mapping.has(s)?e.generateNamespace():s}createNamespace(e,r=!1){let t=this,i=t.mapping,s=t.rmapping;if(t.forbidden.indexOf(e)!==-1)return e;if(i.has(e)&&!r)return i.get(e);let l=t.generateNamespace();if(i.set(e,l),s.set(l,e),s.has(e)){let u=s.get(e);s.delete(e),l=t.createNamespace(u,!0)}return l}};Dc.NamespaceGenerator=mb});var ha=S(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.Context=fi.ContextDataProperty=void 0;var HL=me(),zL=fb(),a0=gb(),GL;(function(n){n.ResourceDependencyMap="resourceDependencyMap",n.DependencyCallStack="dependencyCallStack"})(GL=fi.ContextDataProperty||(fi.ContextDataProperty={}));var yb=class{constructor(e){let r=this;r.modules=new a0.NamespaceGenerator({characters:e.modulesCharset}),r.variables=new a0.NamespaceGenerator({characters:e.variablesCharset,defaultNamespaces:["BACKSLASH_CODE","NEW_LINE_OPERATOR","MODULES","EXPORTED","__REQUIRE","MAIN","module","globals"],forbidden:["locals","outer","self","super","string","list","map","number","funcRef",...Object.values(HL.Keyword),...e.variablesExcluded||[]]}),r.literals=new zL.LiteralsMapper(r.variables),r.data=new Map}createModuleNamespace(e){return this.modules.createNamespace(e)}getOrCreateData(e,r){let t=this;if(t.data.has(e))return t.data.get(e);let i=r();return t.data.set(e,i),i}set(e,r){return this.data.set(e,r),this}get(e){return this.data.get(e)}};fi.Context=yb});var bb=S(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.DependencyType=void 0;var KL;(function(n){n[n.Main=0]="Main",n[n.Import=1]="Import",n[n.Include=2]="Include"})(KL=fa.DependencyType||(fa.DependencyType={}))});var Lc=S(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});jc.BuildError=void 0;var vb=class extends Error{constructor(e,r){super(e),this.target=r.target,this.range=r.range}};jc.BuildError=vb});var qc=S(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});Mc.fetchNamespaces=void 0;function YL(n){let e=new Set(n.namespaces);return n.scopes.reduce((r,t)=>(t.namespaces.forEach(i=>e.add(i)),r),e),Array.from(e)}Mc.fetchNamespaces=YL});var Nc=S(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});Fc.merge=void 0;function QL(n,e,r=1e4){if(e.length<=r){Array.prototype.push.apply(n,e);return}for(let t=0;t<e.length;t+=r)Array.prototype.push.apply(n,e.slice(t,t+r))}Fc.merge=QL});var kb=S(Nr=>{"use strict";var _b=Nr&&Nr.__awaiter||function(n,e,r,t){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(c){try{a(t.next(c))}catch(p){o(p)}}function u(c){try{a(t.throw(c))}catch(p){o(p)}}function a(c){c.done?s(c.value):i(c.value).then(l,u)}a((t=t.apply(n,e||[])).next())})},d0=Nr&&Nr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Nr,"__esModule",{value:!0});Nr.Dependency=void 0;var l0=d0(Ac()),JL=d0((Xn(),mt(Zn))),u0=qt(),$c=ha(),wb=bb(),c0=Lc(),ZL=qc(),p0=Nc(),xb=class n extends JL.default{constructor(e){super();let r=this;r.target=e.target,r.id=(0,l0.default)(e.target),r.resourceHandler=e.resourceHandler,r.chunk=e.chunk,r.dependencies=new Set,r.injections=new Map,r.type=e.type||wb.DependencyType.Main,r.context=e.context,r.ref=e.ref;let t=r.context.createModuleNamespace(r.id);r.context.getOrCreateData($c.ContextDataProperty.ResourceDependencyMap,()=>new Map).set(t,r),r.context.getOrCreateData($c.ContextDataProperty.DependencyCallStack,()=>[])}getId(){return this.id}getNamespace(){let e=this;return e.context.modules.get(e.id)}resolve(e,r,t){return _b(this,void 0,void 0,function*(){let i=this,s=i.context,{modules:o}=s,l=s.get($c.ContextDataProperty.ResourceDependencyMap),u=i.resourceHandler,a=yield u.getTargetRelativeTo(i.target,e),c=(0,l0.default)(a),p=o.get(c);if(l.has(p))return l.get(p);if(!(yield u.has(a)))throw new Error("Dependency "+a+" does not exist...");let d=yield u.get(a);i.emit("parse-before",a);try{let g=new u0.Parser(d,{filename:a}).parseChunk(),f=new n({target:a,resourceHandler:u,chunk:g,type:r,context:s,ref:t});return i.emit("parse-after",f),f}catch(h){throw h instanceof c0.BuildError?h:new c0.BuildError(h.message,{target:a,range:h.range})}})}findInjections(){return _b(this,void 0,void 0,function*(){let e=this,{injects:r}=e.chunk,t=new Map;for(let i of r){let s=yield e.resourceHandler.getTargetRelativeTo(e.target,i.path);if(!(yield e.resourceHandler.has(s)))throw new Error("Injection "+s+" does not exist...");let o=yield e.resourceHandler.get(s);t.set(i.path,o)}return e.injections=t,t})}findDependencies(){return _b(this,void 0,void 0,function*(){let e=this,{imports:r,includes:t}=e.chunk,i=e.getNamespace(),s=e.context.get($c.ContextDataProperty.DependencyCallStack),o=[...(0,ZL.fetchNamespaces)(e.chunk)],l=[...e.chunk.literals],u=[];s.push(i);let a=[...r,...t];for(let p of a){let d=p instanceof u0.ASTFeatureIncludeExpression?wb.DependencyType.Include:wb.DependencyType.Import,h=yield e.resolve(p.path,d,p),g=h.getNamespace();if(s.includes(g))throw new Error(`Circular dependency from ${e.target} to ${h.target} detected.`);let f=h.chunk;p.chunk=f,p.namespace=g;let m=yield h.findDependencies();(0,p0.merge)(o,m.namespaces),(0,p0.merge)(l,m.literals),u.push(h)}yield this.findInjections();let c=new Set(u);return e.dependencies=c,s.pop(),{dependencies:c,namespaces:o,literals:l}})}};Nr.Dependency=xb});var Bc=S(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.Transformer=void 0;var Tb=class{get factory(){return this._factory}get buildOptions(){return this._buildOptions}get context(){return this._context}get environmentVariables(){return this._environmentVariables}get resourceHandler(){return this._resourceHandler}constructor({buildOptions:e,factoryConstructor:r,context:t,environmentVariables:i,resourceHandler:s}){let o=this;o._buildOptions=e,o._context=t,o._environmentVariables=i,o._factory=new r(o),o._resourceHandler=s!=null?s:null}transform(e,r=null){let t=this;if(e.type!=="Chunk")throw new Error("Expects chunk");return t._factory.transform(e,r)}};Uc.Transformer=Tb});var Hc=S(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});Vc.generateCharsetMap=void 0;function Wc(n,e){let r="";for(;n<=e;)r=r+String.fromCharCode(n),n=n+1;return r}function XL(n=!1){let e=Wc(65,90),r=Wc(97,122),t=Wc(48,57),i="_";return n&&(i=i+Wc(1e3,2e3)),{variables:e+r+i,modules:e+r+t+i}}Vc.generateCharsetMap=XL});var Ib=S($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.MAIN_BOILERPLATE=$r.MODULE_BOILERPLATE=$r.HEADER_BOILERPLATE=void 0;var Sb=qt();$r.HEADER_BOILERPLATE=new Sb.Parser(`MODULES={}
162
162
  EXPORTED={}
163
163
  __REQUIRE=function(r)
164
164
  if (not MODULES.hasIndex(r)) then
@@ -177,11 +177,11 @@ ${e}
177
177
  end if
178
178
  EXPORTED[r]=module
179
179
  return EXPORTED[r]
180
- end function`).parseChunk();$r.MAIN_BOILERPLATE=new Sb.Parser('"$0"').parseChunk()});var Gc=S(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});zc.OutputProcessor=void 0;var h0=Ib(),XL=Nc(),Eb=class{constructor(e,r,{header:t=h0.HEADER_BOILERPLATE,main:i=h0.MAIN_BOILERPLATE}={}){this.context=e,this.transformer=r,this.processed=[],this.headerBoilerplate=this.transformer.transform(t),this.mainBoilerplate=this.transformer.transform(i)}addOptimizations(){return(0,XL.merge)(this.processed,this.transformer.factory.generateOptimizations()),this}addHeader(){return this.processed.push(this.headerBoilerplate),this}addCode(e,r=!1){if(r){let t=this.mainBoilerplate.replace('"$0"',e);this.processed.push(t)}else this.processed.push(e);return this}build(){return this.processed.join(`
181
- `)}};zc.OutputProcessor=Eb});var m0=S(Ls=>{"use strict";var eM=Ls&&Ls.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ls,"__esModule",{value:!0});Ls.DirectTranspiler=void 0;var tM=eM((Xn(),mt(Zn))),nM=qt(),f0=Cc(),rM=ha(),iM=Bc(),sM=Hc(),oM=qc(),aM=Gc(),lM=Object.prototype.hasOwnProperty,Rb=class extends tM.default{constructor(e){super();let r=this;r.code=e.code,r.obfuscation=lM.call(e,"obfuscation")?e.obfuscation:!0,r.buildType=e.buildType||f0.BuildType.DEFAULT,r.buildOptions=e.buildOptions||{isDevMode:!1},r.environmentVariables=e.environmentVariables||new Map,r.excludedNamespaces=e.excludedNamespaces||[]}parse(){let e=this,r=(0,f0.getFactory)(e.buildType),i=new nM.Parser(e.code).parseChunk(),s=(0,oM.fetchNamespaces)(i),o=[].concat(i.literals),l=(0,sM.generateCharsetMap)(e.obfuscation),u=new rM.Context({variablesCharset:l.variables,variablesExcluded:e.excludedNamespaces,modulesCharset:l.modules});new Set(s).forEach(h=>u.variables.createNamespace(h)),o.forEach(h=>u.literals.add(h));let c=new iM.Transformer({buildOptions:e.buildOptions,factoryConstructor:r,context:u,environmentVariables:e.environmentVariables}),p=new aM.OutputProcessor(u,c);p.addOptimizations();let d=c.transform(i);return p.addCode(d),p.build()}};Ls.DirectTranspiler=Rb});var g0={};Gs(g0,{default:()=>uM});var uM,y0=cr(()=>{uM={}});var Cb=S(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});Kc.ResourceProvider=void 0;var Pb=class{getHandler(){let e=(y0(),mt(g0)),r=(Os(),mt(Cs));return{getTargetRelativeTo:(t,i)=>{let s=r.resolve(t,".."),o=r.resolve(s,i);return Promise.resolve(e.existsSync(o)?o:o+".src")},has:t=>Promise.resolve(e.existsSync(t)),get:t=>Promise.resolve(e.readFileSync(t,"utf8")),resolve:t=>Promise.resolve(r.resolve(t))}}};Kc.ResourceProvider=Pb});var Ab=S(Ur=>{"use strict";var cM=Ur&&Ur.__awaiter||function(n,e,r,t){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(c){try{a(t.next(c))}catch(p){o(p)}}function u(c){try{a(t.throw(c))}catch(p){o(p)}}function a(c){c.done?s(c.value):i(c.value).then(l,u)}a((t=t.apply(n,e||[])).next())})},pM=Ur&&Ur.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ur,"__esModule",{value:!0});Ur.Target=void 0;var dM=pM((Xn(),mt(Zn))),hM=qt(),fM=kb(),b0=Lc(),Ob=class extends dM.default{constructor(e){super();let r=this;r.target=e.target,r.resourceHandler=e.resourceHandler,r.context=e.context}parse(){return cM(this,void 0,void 0,function*(){let e=this,r=e.resourceHandler,t=yield r.resolve(e.target);if(!(yield r.has(t)))throw new Error("Target "+t+" does not exist...");let i=e.context,s=yield r.get(t);e.emit("parse-before",t);try{let l=new hM.Parser(s,{filename:t}).parseChunk(),u=new fM.Dependency({target:t,resourceHandler:r,chunk:l,context:i}),{namespaces:a,literals:c}=yield u.findDependencies(),p=new Set(a);for(let d of p)i.variables.createNamespace(d);for(let d of c)i.literals.add(d);return{main:{chunk:l,dependency:u}}}catch(o){throw o instanceof b0.BuildError?o:new b0.BuildError(o.message,{target:this.target,range:o.range})}})}};Ur.Target=Ob});var _0=S(Ms=>{"use strict";var mM=Ms&&Ms.__awaiter||function(n,e,r,t){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(c){try{a(t.next(c))}catch(p){o(p)}}function u(c){try{a(t.throw(c))}catch(p){o(p)}}function a(c){c.done?s(c.value):i(c.value).then(l,u)}a((t=t.apply(n,e||[])).next())})};Object.defineProperty(Ms,"__esModule",{value:!0});Ms.Transpiler=void 0;var gM=Gn(),yM=Ib(),v0=Cc(),bM=ha(),vM=Cb(),_M=Ab(),wM=Bc(),xM=Hc(),kM=Gc(),TM=Object.prototype.hasOwnProperty,Db=class{constructor(e){let r=this;r.target=e.target,r.resourceHandler=e.resourceHandler||new vM.ResourceProvider().getHandler(),r.obfuscation=TM.call(e,"obfuscation")?e.obfuscation:!0;let t=(0,xM.generateCharsetMap)(r.obfuscation);r.context=new bM.Context({variablesCharset:t.variables,variablesExcluded:e.excludedNamespaces,modulesCharset:t.modules}),r.buildType=e.buildType||v0.BuildType.DEFAULT,r.buildOptions=e.buildOptions||{isDevMode:!1},r.installer=e.installer||!1,r.environmentVariables=e.environmentVariables||new Map}parse(){return mM(this,void 0,void 0,function*(){let e=this,r=(0,v0.getFactory)(e.buildType),t=e.context,s=yield new _M.Target({target:e.target,resourceHandler:e.resourceHandler,context:e.context}).parse(),o=new wM.Transformer({buildOptions:e.buildOptions,factoryConstructor:r,context:t,environmentVariables:e.environmentVariables,resourceHandler:e.resourceHandler}),l=s.main,u=o.transform(yM.MODULE_BOILERPLATE),a=c=>{let p=t.modules.get(c.getId()),d={},h=0,g=function(b){let v=b.getNamespace();if(!(v in d)){if(v!==p&&b.type===gM.DependencyType.Import){let _=o.transform(b.chunk,b);d[v]=u.replace('"$0"','"'+v+'"').replace('"$1"',_),h++}for(let _ of b.dependencies)g(_)}};g(c);let f=new kM.OutputProcessor(t,o);f.addOptimizations(),h>0&&f.addHeader(),Object.keys(d).forEach(b=>f.addCode(d[b]));let m=o.transform(c.chunk,c);return f.addCode(m,!0),f.build()};return{[e.target]:a(l.dependency)}})}};Ms.Transpiler=Db});var w0=S(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});Yc.unwrap=void 0;var SM=me();function IM(n){for(;n instanceof SM.ASTParenthesisExpression;)n=n.expression;return n}Yc.unwrap=IM});var Gn=S(Y=>{"use strict";var x0=Y&&Y.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),EM=Y&&Y.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),RM=Y&&Y.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var r in n)r!=="default"&&Object.prototype.hasOwnProperty.call(n,r)&&x0(e,n,r);return EM(e,n),e},PM=Y&&Y.__exportStar||function(n,e){for(var r in n)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&x0(e,n,r)};Object.defineProperty(Y,"__esModule",{value:!0});Y.merge=Y.unwrap=Y.Stack=Y.OutputProcessor=Y.NamespaceGenerator=Y.LiteralsMapper=Y.fetchNamespaces=Y.BuildError=Y.createExpressionString=Y.createExpressionHash=Y.generateCharsetMap=Y.DependencyType=Y.Transpiler=Y.Transformer=Y.Target=Y.DirectTranspiler=Y.Dependency=Y.ContextDataProperty=Y.Context=Y.UglifyFactory=Y.TokenType=Y.Factory=Y.DefaultFactory=Y.BeautifyUtils=Y.BeautifyContext=Y.BeautifyFactory=Y.getFactory=Y.BuildType=void 0;var k0=Cc();Object.defineProperty(Y,"BuildType",{enumerable:!0,get:function(){return k0.BuildType}});Object.defineProperty(Y,"getFactory",{enumerable:!0,get:function(){return k0.getFactory}});var CM=ab();Object.defineProperty(Y,"BeautifyFactory",{enumerable:!0,get:function(){return CM.BeautifyFactory}});var OM=ib();Object.defineProperty(Y,"BeautifyContext",{enumerable:!0,get:function(){return OM.BeautifyContext}});Y.BeautifyUtils=RM(sb());var AM=ub();Object.defineProperty(Y,"DefaultFactory",{enumerable:!0,get:function(){return AM.DefaultFactory}});var T0=Ds();Object.defineProperty(Y,"Factory",{enumerable:!0,get:function(){return T0.Factory}});Object.defineProperty(Y,"TokenType",{enumerable:!0,get:function(){return T0.TokenType}});var DM=db();Object.defineProperty(Y,"UglifyFactory",{enumerable:!0,get:function(){return DM.UglifyFactory}});var S0=ha();Object.defineProperty(Y,"Context",{enumerable:!0,get:function(){return S0.Context}});Object.defineProperty(Y,"ContextDataProperty",{enumerable:!0,get:function(){return S0.ContextDataProperty}});var jM=kb();Object.defineProperty(Y,"Dependency",{enumerable:!0,get:function(){return jM.Dependency}});var LM=m0();Object.defineProperty(Y,"DirectTranspiler",{enumerable:!0,get:function(){return LM.DirectTranspiler}});PM(Cb(),Y);var MM=Ab();Object.defineProperty(Y,"Target",{enumerable:!0,get:function(){return MM.Target}});var qM=Bc();Object.defineProperty(Y,"Transformer",{enumerable:!0,get:function(){return qM.Transformer}});var FM=_0();Object.defineProperty(Y,"Transpiler",{enumerable:!0,get:function(){return FM.Transpiler}});var NM=bb();Object.defineProperty(Y,"DependencyType",{enumerable:!0,get:function(){return NM.DependencyType}});var $M=Hc();Object.defineProperty(Y,"generateCharsetMap",{enumerable:!0,get:function(){return $M.generateCharsetMap}});var UM=Xy();Object.defineProperty(Y,"createExpressionHash",{enumerable:!0,get:function(){return UM.createExpressionHash}});var BM=cb();Object.defineProperty(Y,"createExpressionString",{enumerable:!0,get:function(){return BM.createExpressionString}});var WM=Lc();Object.defineProperty(Y,"BuildError",{enumerable:!0,get:function(){return WM.BuildError}});var VM=qc();Object.defineProperty(Y,"fetchNamespaces",{enumerable:!0,get:function(){return VM.fetchNamespaces}});var HM=fb();Object.defineProperty(Y,"LiteralsMapper",{enumerable:!0,get:function(){return HM.LiteralsMapper}});var zM=gb();Object.defineProperty(Y,"NamespaceGenerator",{enumerable:!0,get:function(){return zM.NamespaceGenerator}});var GM=Gc();Object.defineProperty(Y,"OutputProcessor",{enumerable:!0,get:function(){return GM.OutputProcessor}});var KM=tb();Object.defineProperty(Y,"Stack",{enumerable:!0,get:function(){return KM.Stack}});var YM=w0();Object.defineProperty(Y,"unwrap",{enumerable:!0,get:function(){return YM.unwrap}});var QM=Nc();Object.defineProperty(Y,"merge",{enumerable:!0,get:function(){return QM.merge}})});var Qc=S(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.ContextDataProperty=void 0;var JM;(function(n){n.ProcessImportPathCallback="processImportPathCallback",n.ASTRefDependencyMap="astRefDependencyMap",n.ASTRefsVisited="astRefsVisited"})(JM=ma.ContextDataProperty||(ma.ContextDataProperty={}))});var Zc=S(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.injectImport=void 0;var ZM=zn(),jb=Qc();function XM(n,e){let r=n.get(jb.ContextDataProperty.ASTRefDependencyMap),t=n.getOrCreateData(jb.ContextDataProperty.ProcessImportPathCallback,()=>s=>s);if(!r)return[`import_code("${t(e.directory)}")`];let i=n.getOrCreateData(jb.ContextDataProperty.ASTRefsVisited,()=>new Set);if(r.has(e)){let s=[],o=r.get(e);if(i.has(o.main.target))return s;for(let l of o.imports)i.has(l.target)||(l.ref instanceof ZM.ASTImportCodeExpression&&s.push(`import_code("${t(l.target)}")`),i.add(l.target));return s.push(`import_code("${t(o.main.target)}")`),i.add(o.main.target),s}return[]}Jc.injectImport=XM});var I0=S(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});Xc.BeautifyFactory=void 0;var ga=me(),nn=Gn(),eq=Zc(),Lb=class extends nn.BeautifyFactory{constructor(e){super(e),this.extend()}extend(){this.handlers=Object.assign(Object.assign({},this.handlers),{AssignmentStatement:function(e,r){let t=e.variable,i=e.init;if(this.process(t),this.context.options.isDevMode&&(t instanceof ga.ASTIdentifier||t instanceof ga.ASTMemberExpression)&&i instanceof ga.ASTBinaryExpression&&(i.left instanceof ga.ASTIdentifier||i.left instanceof ga.ASTMemberExpression)&&nn.BeautifyUtils.SHORTHAND_OPERATORS.includes(i.operator)&&(0,nn.createExpressionHash)(t)===(0,nn.createExpressionHash)(i.left)){this.tokens.push({type:nn.TokenType.Text,value:" "+i.operator+"= ",ref:e}),this.process((0,nn.unwrap)(i.right));return}this.tokens.push({type:nn.TokenType.Text,value:" = ",ref:e}),this.process(i)},BinaryExpression:function(e,r){if(e.operator==="<<"||e.operator===">>"||e.operator===">>>"||e.operator==="|"||e.operator==="&"){this.tokens.push({type:nn.TokenType.Text,value:`bitwise("${e.operator}", `,ref:e}),this.process(e.left),this.tokens.push({type:nn.TokenType.Text,value:", ",ref:e}),this.process(e.right),this.tokens.push({type:nn.TokenType.Text,value:")",ref:e});return}this.process(e.left),this.tokens.push({type:nn.TokenType.Text,value:" "+e.operator+" ",ref:e}),this.process(e.right)},ImportCodeExpression:function(e,r){let t=(0,eq.injectImport)(this.transformer.context,e);for(let i=0;i<t.length;i++)this.tokens.push({type:nn.TokenType.Text,value:t[i],ref:e}),i!==t.length-1&&this.tokens.push({type:nn.TokenType.EndOfLine,value:`
182
- `,ref:e})}})}};Xc.BeautifyFactory=Lb});var E0=S(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});ep.DefaultFactory=void 0;var mi=Gn(),tq=Zc(),Mb=class extends mi.DefaultFactory{constructor(e){super(e),this.extend()}extend(){this.handlers=Object.assign(Object.assign({},this.handlers),{BinaryExpression:function(e,r){if(e.operator==="<<"||e.operator===">>"||e.operator===">>>"||e.operator==="|"||e.operator==="&"){this.tokens.push({type:mi.TokenType.Text,value:`bitwise("${e.operator}",`,ref:e}),this.process(e.left),this.tokens.push({type:mi.TokenType.Text,value:",",ref:e}),this.process(e.right),this.tokens.push({type:mi.TokenType.Text,value:")",ref:e});return}this.process(e.left),this.tokens.push({type:mi.TokenType.Text,value:e.operator,ref:e}),this.process(e.right)},ImportCodeExpression:function(e,r){let t=(0,tq.injectImport)(this.transformer.context,e);for(let i=0;i<t.length;i++)this.tokens.push({type:mi.TokenType.Text,value:t[i],ref:e}),i!==t.length-1&&this.tokens.push({type:mi.TokenType.EndOfLine,value:`
183
- `,ref:e})}})}};ep.DefaultFactory=Mb});var R0=S(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});tp.UglifyFactory=void 0;var gi=Gn(),nq=Zc(),qb=class extends gi.UglifyFactory{constructor(e){super(e),this.extend()}extend(){this.handlers=Object.assign(Object.assign({},this.handlers),{BinaryExpression:function(e,r){if(e.operator==="<<"||e.operator===">>"||e.operator===">>>"||e.operator==="|"||e.operator==="&"){this.tokens.push({type:gi.TokenType.Text,value:`bitwise("${e.operator}",`,ref:e}),this.process(e.left),this.tokens.push({type:gi.TokenType.Text,value:",",ref:e}),this.process(e.right),this.tokens.push({type:gi.TokenType.Text,value:")",ref:e});return}this.process(e.left),this.tokens.push({type:gi.TokenType.Text,value:e.operator,ref:e}),this.process(e.right)},ImportCodeExpression:function(e,r){let t=(0,nq.injectImport)(this.transformer.context,e);for(let i=0;i<t.length;i++)this.tokens.push({type:gi.TokenType.Text,value:t[i],ref:e}),i!==t.length-1&&this.tokens.push({type:gi.TokenType.EndOfLine,value:`
184
- `,ref:e})}})}};tp.UglifyFactory=qb});var np=S(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.getFactory=yi.BuildType=void 0;var rq=I0(),iq=E0(),sq=R0(),ya;(function(n){n[n.DEFAULT=0]="DEFAULT",n[n.UGLIFY=1]="UGLIFY",n[n.BEAUTIFY=2]="BEAUTIFY"})(ya=yi.BuildType||(yi.BuildType={}));var oq={[ya.DEFAULT]:iq.DefaultFactory,[ya.UGLIFY]:sq.UglifyFactory,[ya.BEAUTIFY]:rq.BeautifyFactory};function aq(n=ya.DEFAULT){let e=oq[n];if(!e)throw new Error("Unknown build type.");return e}yi.getFactory=aq});var rp=S(In=>{"use strict";var Fb=In&&In.__awaiter||function(n,e,r,t){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(c){try{a(t.next(c))}catch(p){o(p)}}function u(c){try{a(t.throw(c))}catch(p){o(p)}}function a(c){c.done?s(c.value):i(c.value).then(l,u)}a((t=t.apply(n,e||[])).next())})},C0=In&&In.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(In,"__esModule",{value:!0});In.Dependency=In.DependencyType=void 0;var P0=C0(Ac()),lq=C0((Xn(),mt(Zn))),uq=qt(),rn=Gn(),cq=zn(),qs;(function(n){n[n.Main=0]="Main",n[n.Import=1]="Import",n[n.Include=2]="Include",n[n.NativeImport=3]="NativeImport"})(qs=In.DependencyType||(In.DependencyType={}));var Nb=class n extends lq.default{constructor(e){super();let r=this;r.target=e.target,r.id=(0,P0.default)(e.target),r.resourceHandler=e.resourceHandler,r.chunk=e.chunk,r.dependencies=new Set,r.type=e.type||qs.Main,r.context=e.context,r.ref=e.ref;let t=r.context.createModuleNamespace(r.id);r.context.getOrCreateData(rn.ContextDataProperty.ResourceDependencyMap,()=>new Map).set(t,r),r.context.getOrCreateData(rn.ContextDataProperty.DependencyCallStack,()=>[])}getId(){return this.id}getNamespace(){let e=this;return e.context.modules.get(e.id)}fetchNativeImports(){let e=this,r=[];for(let t of e.dependencies)t.type===qs.NativeImport&&((0,rn.merge)(r,[...t.fetchNativeImports()]),r.push(t));return new Set(r)}resolve(e,r,t){return Fb(this,void 0,void 0,function*(){let i=this,s=i.context,{modules:o}=s,l=s.get(rn.ContextDataProperty.ResourceDependencyMap),u=i.resourceHandler,a=yield u.getTargetRelativeTo(i.target,e),c=(0,P0.default)(a),p=o.get(c);if(l.has(p))return l.get(p);if(!(yield u.has(a)))throw new Error("Dependency "+a+" does not exist...");let d=yield u.get(a);i.emit("parse-before",a);try{let g=new cq.Parser(d,{filename:a}).parseChunk(),f=new n({target:a,resourceHandler:u,chunk:g,type:r,context:s,ref:t});return i.emit("parse-after",f),f}catch(h){throw h instanceof rn.BuildError?h:new rn.BuildError(h.message,{target:a,range:h.range})}})}findInjections(){return Fb(this,void 0,void 0,function*(){let e=this,{injects:r}=e.chunk,t=new Map;for(let i of r){let s=yield e.resourceHandler.getTargetRelativeTo(e.target,i.path);if(!(yield e.resourceHandler.has(s)))throw new Error("Injection "+s+" does not exist...");let o=yield e.resourceHandler.get(s);t.set(i.path,o)}return e.injections=t,t})}findDependencies(){return Fb(this,void 0,void 0,function*(){let e=this,{imports:r,includes:t,nativeImports:i}=e.chunk,s=e.getNamespace(),o=e.context.get(rn.ContextDataProperty.DependencyCallStack),l=[...(0,rn.fetchNamespaces)(e.chunk)],u=[...e.chunk.literals],a=[];o.push(s);for(let d of i){let h=yield e.resolve(d.directory,qs.NativeImport,d),g=h.getNamespace();if(o.includes(g))throw new Error(`Circular dependency from ${e.target} to ${h.target} detected.`);let f=yield h.findDependencies();(0,rn.merge)(l,f.namespaces),(0,rn.merge)(u,f.literals),a.push(h)}let c=[...r,...t];for(let d of c){let h=d instanceof uq.ASTFeatureIncludeExpression?qs.Include:qs.Import,g=yield e.resolve(d.path,h,d),f=g.getNamespace();if(o.includes(f))throw new Error(`Circular dependency from ${e.target} to ${g.target} detected.`);let m=g.chunk;d.chunk=m,d.namespace=f;let b=yield g.findDependencies();(0,rn.merge)(a,[...g.fetchNativeImports()]),(0,rn.merge)(l,b.namespaces),(0,rn.merge)(u,b.literals),a.push(g)}yield this.findInjections();let p=new Set(a);return e.dependencies=p,o.pop(),{dependencies:p,namespaces:l,literals:u}})}};In.Dependency=Nb});var Ub=S(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.MAIN_BOILERPLATE=Br.MODULE_BOILERPLATE=Br.HEADER_BOILERPLATE=void 0;var $b=zn();Br.HEADER_BOILERPLATE=new $b.Parser(`MODULES={}
180
+ end function`).parseChunk();$r.MAIN_BOILERPLATE=new Sb.Parser('"$0"').parseChunk()});var Gc=S(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});zc.OutputProcessor=void 0;var h0=Ib(),eM=Nc(),Eb=class{constructor(e,r,{header:t=h0.HEADER_BOILERPLATE,main:i=h0.MAIN_BOILERPLATE}={}){this.context=e,this.transformer=r,this.processed=[],this.headerBoilerplate=this.transformer.transform(t),this.mainBoilerplate=this.transformer.transform(i)}addOptimizations(){return(0,eM.merge)(this.processed,this.transformer.factory.generateOptimizations()),this}addHeader(){return this.processed.push(this.headerBoilerplate),this}addCode(e,r=!1){if(r){let t=this.mainBoilerplate.replace('"$0"',e);this.processed.push(t)}else this.processed.push(e);return this}build(){return this.processed.join(`
181
+ `)}};zc.OutputProcessor=Eb});var m0=S(Ls=>{"use strict";var tM=Ls&&Ls.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ls,"__esModule",{value:!0});Ls.DirectTranspiler=void 0;var nM=tM((Xn(),mt(Zn))),rM=qt(),f0=Cc(),iM=ha(),sM=Bc(),oM=Hc(),aM=qc(),lM=Gc(),uM=Object.prototype.hasOwnProperty,Rb=class extends nM.default{constructor(e){super();let r=this;r.code=e.code,r.obfuscation=uM.call(e,"obfuscation")?e.obfuscation:!0,r.buildType=e.buildType||f0.BuildType.DEFAULT,r.buildOptions=e.buildOptions||{isDevMode:!1},r.environmentVariables=e.environmentVariables||new Map,r.excludedNamespaces=e.excludedNamespaces||[]}parse(){let e=this,r=(0,f0.getFactory)(e.buildType),i=new rM.Parser(e.code).parseChunk(),s=(0,aM.fetchNamespaces)(i),o=[].concat(i.literals),l=(0,oM.generateCharsetMap)(e.obfuscation),u=new iM.Context({variablesCharset:l.variables,variablesExcluded:e.excludedNamespaces,modulesCharset:l.modules});new Set(s).forEach(h=>u.variables.createNamespace(h)),o.forEach(h=>u.literals.add(h));let c=new sM.Transformer({buildOptions:e.buildOptions,factoryConstructor:r,context:u,environmentVariables:e.environmentVariables}),p=new lM.OutputProcessor(u,c);p.addOptimizations();let d=c.transform(i);return p.addCode(d),p.build()}};Ls.DirectTranspiler=Rb});var g0={};Gs(g0,{default:()=>cM});var cM,y0=cr(()=>{cM={}});var Cb=S(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});Kc.ResourceProvider=void 0;var Pb=class{getHandler(){let e=(y0(),mt(g0)),r=(Os(),mt(Cs));return{getTargetRelativeTo:(t,i)=>{let s=r.resolve(t,".."),o=r.resolve(s,i);return Promise.resolve(e.existsSync(o)?o:o+".src")},has:t=>Promise.resolve(e.existsSync(t)),get:t=>Promise.resolve(e.readFileSync(t,"utf8")),resolve:t=>Promise.resolve(r.resolve(t))}}};Kc.ResourceProvider=Pb});var Ab=S(Ur=>{"use strict";var pM=Ur&&Ur.__awaiter||function(n,e,r,t){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(c){try{a(t.next(c))}catch(p){o(p)}}function u(c){try{a(t.throw(c))}catch(p){o(p)}}function a(c){c.done?s(c.value):i(c.value).then(l,u)}a((t=t.apply(n,e||[])).next())})},dM=Ur&&Ur.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ur,"__esModule",{value:!0});Ur.Target=void 0;var hM=dM((Xn(),mt(Zn))),fM=qt(),mM=kb(),b0=Lc(),Ob=class extends hM.default{constructor(e){super();let r=this;r.target=e.target,r.resourceHandler=e.resourceHandler,r.context=e.context}parse(){return pM(this,void 0,void 0,function*(){let e=this,r=e.resourceHandler,t=yield r.resolve(e.target);if(!(yield r.has(t)))throw new Error("Target "+t+" does not exist...");let i=e.context,s=yield r.get(t);e.emit("parse-before",t);try{let l=new fM.Parser(s,{filename:t}).parseChunk(),u=new mM.Dependency({target:t,resourceHandler:r,chunk:l,context:i}),{namespaces:a,literals:c}=yield u.findDependencies(),p=new Set(a);for(let d of p)i.variables.createNamespace(d);for(let d of c)i.literals.add(d);return{main:{chunk:l,dependency:u}}}catch(o){throw o instanceof b0.BuildError?o:new b0.BuildError(o.message,{target:this.target,range:o.range})}})}};Ur.Target=Ob});var _0=S(Ms=>{"use strict";var gM=Ms&&Ms.__awaiter||function(n,e,r,t){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(c){try{a(t.next(c))}catch(p){o(p)}}function u(c){try{a(t.throw(c))}catch(p){o(p)}}function a(c){c.done?s(c.value):i(c.value).then(l,u)}a((t=t.apply(n,e||[])).next())})};Object.defineProperty(Ms,"__esModule",{value:!0});Ms.Transpiler=void 0;var yM=Gn(),bM=Ib(),v0=Cc(),vM=ha(),_M=Cb(),wM=Ab(),xM=Bc(),kM=Hc(),TM=Gc(),SM=Object.prototype.hasOwnProperty,Db=class{constructor(e){let r=this;r.target=e.target,r.resourceHandler=e.resourceHandler||new _M.ResourceProvider().getHandler(),r.obfuscation=SM.call(e,"obfuscation")?e.obfuscation:!0;let t=(0,kM.generateCharsetMap)(r.obfuscation);r.context=new vM.Context({variablesCharset:t.variables,variablesExcluded:e.excludedNamespaces,modulesCharset:t.modules}),r.buildType=e.buildType||v0.BuildType.DEFAULT,r.buildOptions=e.buildOptions||{isDevMode:!1},r.installer=e.installer||!1,r.environmentVariables=e.environmentVariables||new Map}parse(){return gM(this,void 0,void 0,function*(){let e=this,r=(0,v0.getFactory)(e.buildType),t=e.context,s=yield new wM.Target({target:e.target,resourceHandler:e.resourceHandler,context:e.context}).parse(),o=new xM.Transformer({buildOptions:e.buildOptions,factoryConstructor:r,context:t,environmentVariables:e.environmentVariables,resourceHandler:e.resourceHandler}),l=s.main,u=o.transform(bM.MODULE_BOILERPLATE),a=c=>{let p=t.modules.get(c.getId()),d={},h=0,g=function(b){let v=b.getNamespace();if(!(v in d)){if(v!==p&&b.type===yM.DependencyType.Import){let _=o.transform(b.chunk,b);d[v]=u.replace('"$0"','"'+v+'"').replace('"$1"',_),h++}for(let _ of b.dependencies)g(_)}};g(c);let f=new TM.OutputProcessor(t,o);f.addOptimizations(),h>0&&f.addHeader(),Object.keys(d).forEach(b=>f.addCode(d[b]));let m=o.transform(c.chunk,c);return f.addCode(m,!0),f.build()};return{[e.target]:a(l.dependency)}})}};Ms.Transpiler=Db});var w0=S(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});Yc.unwrap=void 0;var IM=me();function EM(n){for(;n instanceof IM.ASTParenthesisExpression;)n=n.expression;return n}Yc.unwrap=EM});var Gn=S(Y=>{"use strict";var x0=Y&&Y.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),RM=Y&&Y.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),PM=Y&&Y.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var r in n)r!=="default"&&Object.prototype.hasOwnProperty.call(n,r)&&x0(e,n,r);return RM(e,n),e},CM=Y&&Y.__exportStar||function(n,e){for(var r in n)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&x0(e,n,r)};Object.defineProperty(Y,"__esModule",{value:!0});Y.unwrap=Y.Stack=Y.OutputProcessor=Y.NamespaceGenerator=Y.merge=Y.LiteralsMapper=Y.fetchNamespaces=Y.BuildError=Y.createExpressionString=Y.createExpressionHash=Y.generateCharsetMap=Y.DependencyType=Y.Transpiler=Y.Transformer=Y.Target=Y.DirectTranspiler=Y.Dependency=Y.ContextDataProperty=Y.Context=Y.UglifyFactory=Y.TokenType=Y.Factory=Y.DefaultFactory=Y.BeautifyUtils=Y.BeautifyContext=Y.BeautifyFactory=Y.getFactory=Y.BuildType=void 0;var k0=Cc();Object.defineProperty(Y,"BuildType",{enumerable:!0,get:function(){return k0.BuildType}});Object.defineProperty(Y,"getFactory",{enumerable:!0,get:function(){return k0.getFactory}});var OM=ab();Object.defineProperty(Y,"BeautifyFactory",{enumerable:!0,get:function(){return OM.BeautifyFactory}});var AM=ib();Object.defineProperty(Y,"BeautifyContext",{enumerable:!0,get:function(){return AM.BeautifyContext}});Y.BeautifyUtils=PM(sb());var DM=ub();Object.defineProperty(Y,"DefaultFactory",{enumerable:!0,get:function(){return DM.DefaultFactory}});var T0=Ds();Object.defineProperty(Y,"Factory",{enumerable:!0,get:function(){return T0.Factory}});Object.defineProperty(Y,"TokenType",{enumerable:!0,get:function(){return T0.TokenType}});var jM=db();Object.defineProperty(Y,"UglifyFactory",{enumerable:!0,get:function(){return jM.UglifyFactory}});var S0=ha();Object.defineProperty(Y,"Context",{enumerable:!0,get:function(){return S0.Context}});Object.defineProperty(Y,"ContextDataProperty",{enumerable:!0,get:function(){return S0.ContextDataProperty}});var LM=kb();Object.defineProperty(Y,"Dependency",{enumerable:!0,get:function(){return LM.Dependency}});var MM=m0();Object.defineProperty(Y,"DirectTranspiler",{enumerable:!0,get:function(){return MM.DirectTranspiler}});CM(Cb(),Y);var qM=Ab();Object.defineProperty(Y,"Target",{enumerable:!0,get:function(){return qM.Target}});var FM=Bc();Object.defineProperty(Y,"Transformer",{enumerable:!0,get:function(){return FM.Transformer}});var NM=_0();Object.defineProperty(Y,"Transpiler",{enumerable:!0,get:function(){return NM.Transpiler}});var $M=bb();Object.defineProperty(Y,"DependencyType",{enumerable:!0,get:function(){return $M.DependencyType}});var UM=Hc();Object.defineProperty(Y,"generateCharsetMap",{enumerable:!0,get:function(){return UM.generateCharsetMap}});var BM=Xy();Object.defineProperty(Y,"createExpressionHash",{enumerable:!0,get:function(){return BM.createExpressionHash}});var WM=cb();Object.defineProperty(Y,"createExpressionString",{enumerable:!0,get:function(){return WM.createExpressionString}});var VM=Lc();Object.defineProperty(Y,"BuildError",{enumerable:!0,get:function(){return VM.BuildError}});var HM=qc();Object.defineProperty(Y,"fetchNamespaces",{enumerable:!0,get:function(){return HM.fetchNamespaces}});var zM=fb();Object.defineProperty(Y,"LiteralsMapper",{enumerable:!0,get:function(){return zM.LiteralsMapper}});var GM=Nc();Object.defineProperty(Y,"merge",{enumerable:!0,get:function(){return GM.merge}});var KM=gb();Object.defineProperty(Y,"NamespaceGenerator",{enumerable:!0,get:function(){return KM.NamespaceGenerator}});var YM=Gc();Object.defineProperty(Y,"OutputProcessor",{enumerable:!0,get:function(){return YM.OutputProcessor}});var QM=tb();Object.defineProperty(Y,"Stack",{enumerable:!0,get:function(){return QM.Stack}});var JM=w0();Object.defineProperty(Y,"unwrap",{enumerable:!0,get:function(){return JM.unwrap}})});var Qc=S(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.ContextDataProperty=void 0;var ZM;(function(n){n.ProcessImportPathCallback="processImportPathCallback",n.ASTRefDependencyMap="astRefDependencyMap",n.ASTRefsVisited="astRefsVisited"})(ZM=ma.ContextDataProperty||(ma.ContextDataProperty={}))});var Zc=S(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.injectImport=void 0;var XM=zn(),jb=Qc();function eq(n,e){let r=n.get(jb.ContextDataProperty.ASTRefDependencyMap),t=n.getOrCreateData(jb.ContextDataProperty.ProcessImportPathCallback,()=>s=>s);if(!r)return[`import_code("${t(e.directory)}")`];let i=n.getOrCreateData(jb.ContextDataProperty.ASTRefsVisited,()=>new Set);if(r.has(e)){let s=[],o=r.get(e);if(i.has(o.main.target))return s;for(let l of o.imports)i.has(l.target)||(l.ref instanceof XM.ASTImportCodeExpression&&s.push(`import_code("${t(l.target)}")`),i.add(l.target));return s.push(`import_code("${t(o.main.target)}")`),i.add(o.main.target),s}return[]}Jc.injectImport=eq});var I0=S(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});Xc.BeautifyFactory=void 0;var ga=me(),nn=Gn(),tq=Zc(),Lb=class extends nn.BeautifyFactory{constructor(e){super(e),this.extend()}extend(){this.handlers=Object.assign(Object.assign({},this.handlers),{AssignmentStatement:function(e,r){let t=e.variable,i=e.init;if(this.process(t),this.context.options.isDevMode&&(t instanceof ga.ASTIdentifier||t instanceof ga.ASTMemberExpression)&&i instanceof ga.ASTBinaryExpression&&(i.left instanceof ga.ASTIdentifier||i.left instanceof ga.ASTMemberExpression)&&nn.BeautifyUtils.SHORTHAND_OPERATORS.includes(i.operator)&&(0,nn.createExpressionHash)(t)===(0,nn.createExpressionHash)(i.left)){this.tokens.push({type:nn.TokenType.Text,value:" "+i.operator+"= ",ref:e}),this.process((0,nn.unwrap)(i.right));return}this.tokens.push({type:nn.TokenType.Text,value:" = ",ref:e}),this.process(i)},BinaryExpression:function(e,r){if(e.operator==="<<"||e.operator===">>"||e.operator===">>>"||e.operator==="|"||e.operator==="&"){this.tokens.push({type:nn.TokenType.Text,value:`bitwise("${e.operator}", `,ref:e}),this.process(e.left),this.tokens.push({type:nn.TokenType.Text,value:", ",ref:e}),this.process(e.right),this.tokens.push({type:nn.TokenType.Text,value:")",ref:e});return}this.process(e.left),this.tokens.push({type:nn.TokenType.Text,value:" "+e.operator+" ",ref:e}),this.process(e.right)},ImportCodeExpression:function(e,r){let t=(0,tq.injectImport)(this.transformer.context,e);for(let i=0;i<t.length;i++)this.tokens.push({type:nn.TokenType.Text,value:t[i],ref:e}),i!==t.length-1&&this.tokens.push({type:nn.TokenType.EndOfLine,value:`
182
+ `,ref:e})}})}};Xc.BeautifyFactory=Lb});var E0=S(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});ep.DefaultFactory=void 0;var mi=Gn(),nq=Zc(),Mb=class extends mi.DefaultFactory{constructor(e){super(e),this.extend()}extend(){this.handlers=Object.assign(Object.assign({},this.handlers),{BinaryExpression:function(e,r){if(e.operator==="<<"||e.operator===">>"||e.operator===">>>"||e.operator==="|"||e.operator==="&"){this.tokens.push({type:mi.TokenType.Text,value:`bitwise("${e.operator}",`,ref:e}),this.process(e.left),this.tokens.push({type:mi.TokenType.Text,value:",",ref:e}),this.process(e.right),this.tokens.push({type:mi.TokenType.Text,value:")",ref:e});return}this.process(e.left),this.tokens.push({type:mi.TokenType.Text,value:e.operator,ref:e}),this.process(e.right)},ImportCodeExpression:function(e,r){let t=(0,nq.injectImport)(this.transformer.context,e);for(let i=0;i<t.length;i++)this.tokens.push({type:mi.TokenType.Text,value:t[i],ref:e}),i!==t.length-1&&this.tokens.push({type:mi.TokenType.EndOfLine,value:`
183
+ `,ref:e})}})}};ep.DefaultFactory=Mb});var R0=S(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});tp.UglifyFactory=void 0;var gi=Gn(),rq=Zc(),qb=class extends gi.UglifyFactory{constructor(e){super(e),this.extend()}extend(){this.handlers=Object.assign(Object.assign({},this.handlers),{BinaryExpression:function(e,r){if(e.operator==="<<"||e.operator===">>"||e.operator===">>>"||e.operator==="|"||e.operator==="&"){this.tokens.push({type:gi.TokenType.Text,value:`bitwise("${e.operator}",`,ref:e}),this.process(e.left),this.tokens.push({type:gi.TokenType.Text,value:",",ref:e}),this.process(e.right),this.tokens.push({type:gi.TokenType.Text,value:")",ref:e});return}this.process(e.left),this.tokens.push({type:gi.TokenType.Text,value:e.operator,ref:e}),this.process(e.right)},ImportCodeExpression:function(e,r){let t=(0,rq.injectImport)(this.transformer.context,e);for(let i=0;i<t.length;i++)this.tokens.push({type:gi.TokenType.Text,value:t[i],ref:e}),i!==t.length-1&&this.tokens.push({type:gi.TokenType.EndOfLine,value:`
184
+ `,ref:e})}})}};tp.UglifyFactory=qb});var np=S(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.getFactory=yi.BuildType=void 0;var iq=I0(),sq=E0(),oq=R0(),ya;(function(n){n[n.DEFAULT=0]="DEFAULT",n[n.UGLIFY=1]="UGLIFY",n[n.BEAUTIFY=2]="BEAUTIFY"})(ya=yi.BuildType||(yi.BuildType={}));var aq={[ya.DEFAULT]:sq.DefaultFactory,[ya.UGLIFY]:oq.UglifyFactory,[ya.BEAUTIFY]:iq.BeautifyFactory};function lq(n=ya.DEFAULT){let e=aq[n];if(!e)throw new Error("Unknown build type.");return e}yi.getFactory=lq});var rp=S(In=>{"use strict";var Fb=In&&In.__awaiter||function(n,e,r,t){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(c){try{a(t.next(c))}catch(p){o(p)}}function u(c){try{a(t.throw(c))}catch(p){o(p)}}function a(c){c.done?s(c.value):i(c.value).then(l,u)}a((t=t.apply(n,e||[])).next())})},C0=In&&In.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(In,"__esModule",{value:!0});In.Dependency=In.DependencyType=void 0;var P0=C0(Ac()),uq=C0((Xn(),mt(Zn))),cq=qt(),rn=Gn(),pq=zn(),qs;(function(n){n[n.Main=0]="Main",n[n.Import=1]="Import",n[n.Include=2]="Include",n[n.NativeImport=3]="NativeImport"})(qs=In.DependencyType||(In.DependencyType={}));var Nb=class n extends uq.default{constructor(e){super();let r=this;r.target=e.target,r.id=(0,P0.default)(e.target),r.resourceHandler=e.resourceHandler,r.chunk=e.chunk,r.dependencies=new Set,r.type=e.type||qs.Main,r.context=e.context,r.ref=e.ref;let t=r.context.createModuleNamespace(r.id);r.context.getOrCreateData(rn.ContextDataProperty.ResourceDependencyMap,()=>new Map).set(t,r),r.context.getOrCreateData(rn.ContextDataProperty.DependencyCallStack,()=>[])}getId(){return this.id}getNamespace(){let e=this;return e.context.modules.get(e.id)}fetchNativeImports(){let e=this,r=[];for(let t of e.dependencies)t.type===qs.NativeImport&&((0,rn.merge)(r,[...t.fetchNativeImports()]),r.push(t));return new Set(r)}resolve(e,r,t){return Fb(this,void 0,void 0,function*(){let i=this,s=i.context,{modules:o}=s,l=s.get(rn.ContextDataProperty.ResourceDependencyMap),u=i.resourceHandler,a=yield u.getTargetRelativeTo(i.target,e),c=(0,P0.default)(a),p=o.get(c);if(l.has(p))return l.get(p);if(!(yield u.has(a)))throw new Error("Dependency "+a+" does not exist...");let d=yield u.get(a);i.emit("parse-before",a);try{let g=new pq.Parser(d,{filename:a}).parseChunk(),f=new n({target:a,resourceHandler:u,chunk:g,type:r,context:s,ref:t});return i.emit("parse-after",f),f}catch(h){throw h instanceof rn.BuildError?h:new rn.BuildError(h.message,{target:a,range:h.range})}})}findInjections(){return Fb(this,void 0,void 0,function*(){let e=this,{injects:r}=e.chunk,t=new Map;for(let i of r){let s=yield e.resourceHandler.getTargetRelativeTo(e.target,i.path);if(!(yield e.resourceHandler.has(s)))throw new Error("Injection "+s+" does not exist...");let o=yield e.resourceHandler.get(s);t.set(i.path,o)}return e.injections=t,t})}findDependencies(){return Fb(this,void 0,void 0,function*(){let e=this,{imports:r,includes:t,nativeImports:i}=e.chunk,s=e.getNamespace(),o=e.context.get(rn.ContextDataProperty.DependencyCallStack),l=[...(0,rn.fetchNamespaces)(e.chunk)],u=[...e.chunk.literals],a=[];o.push(s);for(let d of i){let h=yield e.resolve(d.directory,qs.NativeImport,d),g=h.getNamespace();if(o.includes(g))throw new Error(`Circular dependency from ${e.target} to ${h.target} detected.`);let f=yield h.findDependencies();(0,rn.merge)(l,f.namespaces),(0,rn.merge)(u,f.literals),a.push(h)}let c=[...r,...t];for(let d of c){let h=d instanceof cq.ASTFeatureIncludeExpression?qs.Include:qs.Import,g=yield e.resolve(d.path,h,d),f=g.getNamespace();if(o.includes(f))throw new Error(`Circular dependency from ${e.target} to ${g.target} detected.`);let m=g.chunk;d.chunk=m,d.namespace=f;let b=yield g.findDependencies();(0,rn.merge)(a,[...g.fetchNativeImports()]),(0,rn.merge)(l,b.namespaces),(0,rn.merge)(u,b.literals),a.push(g)}yield this.findInjections();let p=new Set(a);return e.dependencies=p,o.pop(),{dependencies:p,namespaces:l,literals:u}})}};In.Dependency=Nb});var Ub=S(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.MAIN_BOILERPLATE=Br.MODULE_BOILERPLATE=Br.HEADER_BOILERPLATE=void 0;var $b=zn();Br.HEADER_BOILERPLATE=new $b.Parser(`MODULES={}
185
185
  EXPORTED={}
186
186
  __REQUIRE=function(r)
187
187
  if (not MODULES.hasIndex(r)) then
@@ -199,21 +199,21 @@ ${e}
199
199
  end if
200
200
  EXPORTED[r]=module
201
201
  return EXPORTED[r]
202
- end function`).parseChunk();Br.MAIN_BOILERPLATE=new $b.Parser('"$0"').parseChunk()});var A0=S(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});ip.DirectTranspiler=void 0;var Fs=Gn(),pq=zn(),O0=Ub(),dq=np(),Bb=class extends Fs.DirectTranspiler{parse(){let e=this,r=(0,dq.getFactory)(e.buildType),i=new pq.Parser(e.code).parseChunk(),s=(0,Fs.fetchNamespaces)(i),o=[].concat(i.literals),l=(0,Fs.generateCharsetMap)(e.obfuscation),u=new Fs.Context({variablesCharset:l.variables,variablesExcluded:e.excludedNamespaces,modulesCharset:l.modules});new Set(s).forEach(h=>u.variables.createNamespace(h)),o.forEach(h=>u.literals.add(h));let c=new Fs.Transformer({buildOptions:e.buildOptions,factoryConstructor:r,context:u,environmentVariables:e.environmentVariables}),p=new Fs.OutputProcessor(u,c,{main:O0.MAIN_BOILERPLATE,header:O0.HEADER_BOILERPLATE});p.addOptimizations();let d=c.transform(i);return p.addCode(d),p.build()}};ip.DirectTranspiler=Bb});var Vb=S(Wr=>{"use strict";var hq=Wr&&Wr.__awaiter||function(n,e,r,t){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(c){try{a(t.next(c))}catch(p){o(p)}}function u(c){try{a(t.throw(c))}catch(p){o(p)}}function a(c){c.done?s(c.value):i(c.value).then(l,u)}a((t=t.apply(n,e||[])).next())})},fq=Wr&&Wr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Wr,"__esModule",{value:!0});Wr.Target=void 0;var mq=fq((Xn(),mt(Zn))),D0=Gn(),gq=zn(),yq=Qc(),j0=rp(),Wb=class extends mq.default{constructor(e){super();let r=this;r.target=e.target,r.resourceHandler=e.resourceHandler,r.context=e.context}parse(){return hq(this,void 0,void 0,function*(){let e=this,r=e.resourceHandler,t=yield r.resolve(e.target);if(!(yield r.has(t)))throw new Error("Target "+t+" does not exist...");let i=e.context,s=yield r.get(t);e.emit("parse-before",t);try{let l=new gq.Parser(s,{filename:t}).parseChunk(),u=new j0.Dependency({target:t,resourceHandler:r,chunk:l,context:i}),{namespaces:a,literals:c}=yield u.findDependencies(),p=new Map,d=e.context.getOrCreateData(yq.ContextDataProperty.ASTRefDependencyMap,()=>new Map);for(let g of u.dependencies)if(g.type===j0.DependencyType.NativeImport){let f=g.fetchNativeImports();for(let m of f)p.set(m.target,{chunk:m.chunk,dependency:m});p.set(g.target,{chunk:g.chunk,dependency:g}),d.set(g.ref,{main:g,imports:f})}let h=new Set(a);for(let g of h)i.variables.createNamespace(g);for(let g of c)i.literals.add(g);return{main:{chunk:l,dependency:u},nativeImports:p}}catch(o){throw o instanceof D0.BuildError?o:new D0.BuildError(o.message,{target:this.target,range:o.range})}})}};Wr.Target=Wb});var M0=S(Ns=>{"use strict";var bq=Ns&&Ns.__awaiter||function(n,e,r,t){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(c){try{a(t.next(c))}catch(p){o(p)}}function u(c){try{a(t.throw(c))}catch(p){o(p)}}function a(c){c.done?s(c.value):i(c.value).then(l,u)}a((t=t.apply(n,e||[])).next())})};Object.defineProperty(Ns,"__esModule",{value:!0});Ns.Transpiler=void 0;var Hb=Gn(),zb=Ub(),vq=np(),_q=Qc(),L0=rp(),wq=Vb(),Gb=class extends Hb.Transpiler{constructor(e){super(e);let r=this;e.processImportPathCallback&&r.context.set(_q.ContextDataProperty.ProcessImportPathCallback,e.processImportPathCallback)}parse(){return bq(this,void 0,void 0,function*(){let e=this,r=(0,vq.getFactory)(e.buildType),t=e.context,s=yield new wq.Target({target:e.target,resourceHandler:e.resourceHandler,context:e.context}).parse(),o=new Hb.Transformer({buildOptions:e.buildOptions,factoryConstructor:r,context:t,environmentVariables:e.environmentVariables,resourceHandler:e.resourceHandler}),l=s.main,u=o.transform(zb.MODULE_BOILERPLATE),a=(c,p)=>{let d=t.modules.get(c.getId()),h={},g=0,f=function(v){let _=v.getNamespace();if(!(_ in h)){if(_!==d&&v.type===L0.DependencyType.Import){let w=o.transform(v.chunk,v);h[_]=u.replace('"$0"','"'+_+'"').replace('"$1"',w),g++}for(let w of v.dependencies)v.type!==L0.DependencyType.NativeImport&&f(w)}};f(c);let m=new Hb.OutputProcessor(t,o,{main:zb.MAIN_BOILERPLATE,header:zb.HEADER_BOILERPLATE});p||(m.addOptimizations(),g>0&&m.addHeader()),Object.keys(h).forEach(v=>m.addCode(h[v]));let b=o.transform(c.chunk,c);return m.addCode(b,!p),m.build()};return Object.assign({[e.target]:a(l.dependency,!1)},Array.from(s.nativeImports.values()).reduce((c,p)=>Object.assign(Object.assign({},c),{[p.dependency.target]:a(p.dependency,!0)}),{}))})}};Ns.Transpiler=Gb});var F0=S(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.Transpiler=Kt.Target=Kt.DirectTranspiler=Kt.Dependency=Kt.getFactory=Kt.BuildType=void 0;var q0=np();Object.defineProperty(Kt,"BuildType",{enumerable:!0,get:function(){return q0.BuildType}});Object.defineProperty(Kt,"getFactory",{enumerable:!0,get:function(){return q0.getFactory}});var xq=rp();Object.defineProperty(Kt,"Dependency",{enumerable:!0,get:function(){return xq.Dependency}});var kq=A0();Object.defineProperty(Kt,"DirectTranspiler",{enumerable:!0,get:function(){return kq.DirectTranspiler}});var Tq=Vb();Object.defineProperty(Kt,"Target",{enumerable:!0,get:function(){return Tq.Target}});var Sq=M0();Object.defineProperty(Kt,"Transpiler",{enumerable:!0,get:function(){return Sq.Transpiler}})});var N0=S(sp=>{"use strict";Object.defineProperty(sp,"__esModule",{value:!0});sp.activate=void 0;var Iq=Gn(),Eq=F0();function Rq(n){function e(r){return B(this,null,function*(){try{let t=n.getConfiguration();return new Eq.DirectTranspiler({code:r,buildType:Iq.BuildType.BEAUTIFY,buildOptions:{isDevMode:!0,keepParentheses:t.transpiler.beautify.keepParentheses,indentation:t.transpiler.beautify.indentation==="Tab"?0:1,indentationSpaces:t.transpiler.beautify.indentationSpaces}}).parse()}catch(t){return null}})}n.connection.onDocumentFormatting(r=>B(this,null,function*(){if(!n.getConfiguration().formatter)return;let t=yield n.fs.getTextDocument(r.textDocument.uri);if(t==null)return;let i=yield n.documentManager.getLatest(t),s=yield e(t.getText());return s===null?void 0:[{range:{start:{line:0,character:0},end:i.document.end},newText:s}]}))}sp.activate=Rq});var ap=S(op=>{"use strict";Object.defineProperty(op,"__esModule",{value:!0});op.MarkdownString=void 0;var Kb=class{constructor(e=""){this.sanitize=!0,this.value=e}appendText(e){return this.value+=e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,r){return this.value+="\n```",this.value+=e,this.value+=`
203
- `,this.value+=r,this.value+="\n```\n",this}toString(){return this.value}};op.MarkdownString=Kb});var lp=S(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.createHover=st.createSignatureInfo=st.appendTooltipBody=st.appendTooltipHeader=st.createTooltipHeader=st.formatDefaultValue=st.formatTypes=void 0;var $0=Xi(),U0=ap();function Yb(n){return n==null?"":n.map(e=>e.toString().replace(",","\u066B")).join(" or ")}st.formatTypes=Yb;function B0(n){return typeof n=="string"?`"${n}"`:n.toString()}st.formatDefaultValue=B0;var Pq=(n,e)=>{let r=e.getArguments()||[],t=Yb(e.getReturns())||"null";if(r.length===0)return`(${n.kind}) ${n.label} (): ${t}`;let i=r.map(s=>`${s.getLabel()}${s.isOptional()?"?":""}: ${Yb(s.getTypes())}${s.getDefault()?` = ${B0(s.getDefault().value)}`:""}`).join(", ");return`(${n.kind}) ${n.label} (${i}): ${t}`};st.createTooltipHeader=Pq;var Cq=(n,e,r)=>{n.appendCodeblock($0.LanguageId,(0,st.createTooltipHeader)(e,r)),n.appendMarkdown(`***
204
- `)};st.appendTooltipHeader=Cq;var Oq=(n,e)=>{let r=e.getExample()||[];n.appendMarkdown(e.getDescription()+`
202
+ end function`).parseChunk();Br.MAIN_BOILERPLATE=new $b.Parser('"$0"').parseChunk()});var A0=S(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});ip.DirectTranspiler=void 0;var Fs=Gn(),dq=zn(),O0=Ub(),hq=np(),Bb=class extends Fs.DirectTranspiler{parse(){let e=this,r=(0,hq.getFactory)(e.buildType),i=new dq.Parser(e.code).parseChunk(),s=(0,Fs.fetchNamespaces)(i),o=[].concat(i.literals),l=(0,Fs.generateCharsetMap)(e.obfuscation),u=new Fs.Context({variablesCharset:l.variables,variablesExcluded:e.excludedNamespaces,modulesCharset:l.modules});new Set(s).forEach(h=>u.variables.createNamespace(h)),o.forEach(h=>u.literals.add(h));let c=new Fs.Transformer({buildOptions:e.buildOptions,factoryConstructor:r,context:u,environmentVariables:e.environmentVariables}),p=new Fs.OutputProcessor(u,c,{main:O0.MAIN_BOILERPLATE,header:O0.HEADER_BOILERPLATE});p.addOptimizations();let d=c.transform(i);return p.addCode(d),p.build()}};ip.DirectTranspiler=Bb});var Vb=S(Wr=>{"use strict";var fq=Wr&&Wr.__awaiter||function(n,e,r,t){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(c){try{a(t.next(c))}catch(p){o(p)}}function u(c){try{a(t.throw(c))}catch(p){o(p)}}function a(c){c.done?s(c.value):i(c.value).then(l,u)}a((t=t.apply(n,e||[])).next())})},mq=Wr&&Wr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Wr,"__esModule",{value:!0});Wr.Target=void 0;var gq=mq((Xn(),mt(Zn))),D0=Gn(),yq=zn(),bq=Qc(),j0=rp(),Wb=class extends gq.default{constructor(e){super();let r=this;r.target=e.target,r.resourceHandler=e.resourceHandler,r.context=e.context}parse(){return fq(this,void 0,void 0,function*(){let e=this,r=e.resourceHandler,t=yield r.resolve(e.target);if(!(yield r.has(t)))throw new Error("Target "+t+" does not exist...");let i=e.context,s=yield r.get(t);e.emit("parse-before",t);try{let l=new yq.Parser(s,{filename:t}).parseChunk(),u=new j0.Dependency({target:t,resourceHandler:r,chunk:l,context:i}),{namespaces:a,literals:c}=yield u.findDependencies(),p=new Map,d=e.context.getOrCreateData(bq.ContextDataProperty.ASTRefDependencyMap,()=>new Map);for(let g of u.dependencies)if(g.type===j0.DependencyType.NativeImport){let f=g.fetchNativeImports();for(let m of f)p.set(m.target,{chunk:m.chunk,dependency:m});p.set(g.target,{chunk:g.chunk,dependency:g}),d.set(g.ref,{main:g,imports:f})}let h=new Set(a);for(let g of h)i.variables.createNamespace(g);for(let g of c)i.literals.add(g);return{main:{chunk:l,dependency:u},nativeImports:p}}catch(o){throw o instanceof D0.BuildError?o:new D0.BuildError(o.message,{target:this.target,range:o.range})}})}};Wr.Target=Wb});var M0=S(Ns=>{"use strict";var vq=Ns&&Ns.__awaiter||function(n,e,r,t){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(c){try{a(t.next(c))}catch(p){o(p)}}function u(c){try{a(t.throw(c))}catch(p){o(p)}}function a(c){c.done?s(c.value):i(c.value).then(l,u)}a((t=t.apply(n,e||[])).next())})};Object.defineProperty(Ns,"__esModule",{value:!0});Ns.Transpiler=void 0;var Hb=Gn(),zb=Ub(),_q=np(),wq=Qc(),L0=rp(),xq=Vb(),Gb=class extends Hb.Transpiler{constructor(e){super(e);let r=this;e.processImportPathCallback&&r.context.set(wq.ContextDataProperty.ProcessImportPathCallback,e.processImportPathCallback)}parse(){return vq(this,void 0,void 0,function*(){let e=this,r=(0,_q.getFactory)(e.buildType),t=e.context,s=yield new xq.Target({target:e.target,resourceHandler:e.resourceHandler,context:e.context}).parse(),o=new Hb.Transformer({buildOptions:e.buildOptions,factoryConstructor:r,context:t,environmentVariables:e.environmentVariables,resourceHandler:e.resourceHandler}),l=s.main,u=o.transform(zb.MODULE_BOILERPLATE),a=(c,p)=>{let d=t.modules.get(c.getId()),h={},g=0,f=function(v){let _=v.getNamespace();if(!(_ in h)){if(_!==d&&v.type===L0.DependencyType.Import){let w=o.transform(v.chunk,v);h[_]=u.replace('"$0"','"'+_+'"').replace('"$1"',w),g++}for(let w of v.dependencies)v.type!==L0.DependencyType.NativeImport&&f(w)}};f(c);let m=new Hb.OutputProcessor(t,o,{main:zb.MAIN_BOILERPLATE,header:zb.HEADER_BOILERPLATE});p||(m.addOptimizations(),g>0&&m.addHeader()),Object.keys(h).forEach(v=>m.addCode(h[v]));let b=o.transform(c.chunk,c);return m.addCode(b,!p),m.build()};return Object.assign({[e.target]:a(l.dependency,!1)},Array.from(s.nativeImports.values()).reduce((c,p)=>Object.assign(Object.assign({},c),{[p.dependency.target]:a(p.dependency,!0)}),{}))})}};Ns.Transpiler=Gb});var F0=S(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.Transpiler=Kt.Target=Kt.DirectTranspiler=Kt.Dependency=Kt.getFactory=Kt.BuildType=void 0;var q0=np();Object.defineProperty(Kt,"BuildType",{enumerable:!0,get:function(){return q0.BuildType}});Object.defineProperty(Kt,"getFactory",{enumerable:!0,get:function(){return q0.getFactory}});var kq=rp();Object.defineProperty(Kt,"Dependency",{enumerable:!0,get:function(){return kq.Dependency}});var Tq=A0();Object.defineProperty(Kt,"DirectTranspiler",{enumerable:!0,get:function(){return Tq.DirectTranspiler}});var Sq=Vb();Object.defineProperty(Kt,"Target",{enumerable:!0,get:function(){return Sq.Target}});var Iq=M0();Object.defineProperty(Kt,"Transpiler",{enumerable:!0,get:function(){return Iq.Transpiler}})});var N0=S(sp=>{"use strict";Object.defineProperty(sp,"__esModule",{value:!0});sp.activate=void 0;var Eq=Gn(),Rq=F0();function Pq(n){function e(r){return B(this,null,function*(){try{let t=n.getConfiguration();return new Rq.DirectTranspiler({code:r,buildType:Eq.BuildType.BEAUTIFY,buildOptions:{isDevMode:!0,keepParentheses:t.transpiler.beautify.keepParentheses,indentation:t.transpiler.beautify.indentation==="Tab"?0:1,indentationSpaces:t.transpiler.beautify.indentationSpaces}}).parse()}catch(t){return null}})}n.connection.onDocumentFormatting(r=>B(this,null,function*(){if(!n.getConfiguration().formatter)return;let t=yield n.fs.getTextDocument(r.textDocument.uri);if(t==null)return;let i=yield n.documentManager.getLatest(t),s=yield e(t.getText());return s===null?void 0:[{range:{start:{line:0,character:0},end:i.document.end},newText:s}]}))}sp.activate=Pq});var ap=S(op=>{"use strict";Object.defineProperty(op,"__esModule",{value:!0});op.MarkdownString=void 0;var Kb=class{constructor(e=""){this.sanitize=!0,this.value=e}appendText(e){return this.value+=e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,r){return this.value+="\n```",this.value+=e,this.value+=`
203
+ `,this.value+=r,this.value+="\n```\n",this}toString(){return this.value}};op.MarkdownString=Kb});var lp=S(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.createHover=st.createSignatureInfo=st.appendTooltipBody=st.appendTooltipHeader=st.createTooltipHeader=st.formatDefaultValue=st.formatTypes=void 0;var $0=Xi(),U0=ap();function Yb(n){return n==null?"":n.map(e=>e.toString().replace(",","\u066B")).join(" or ")}st.formatTypes=Yb;function B0(n){return typeof n=="string"?`"${n}"`:n.toString()}st.formatDefaultValue=B0;var Cq=(n,e)=>{let r=e.getArguments()||[],t=Yb(e.getReturns())||"null";if(r.length===0)return`(${n.kind}) ${n.label} (): ${t}`;let i=r.map(s=>`${s.getLabel()}${s.isOptional()?"?":""}: ${Yb(s.getTypes())}${s.getDefault()?` = ${B0(s.getDefault().value)}`:""}`).join(", ");return`(${n.kind}) ${n.label} (${i}): ${t}`};st.createTooltipHeader=Cq;var Oq=(n,e,r)=>{n.appendCodeblock($0.LanguageId,(0,st.createTooltipHeader)(e,r)),n.appendMarkdown(`***
204
+ `)};st.appendTooltipHeader=Oq;var Aq=(n,e)=>{let r=e.getExample()||[];n.appendMarkdown(e.getDescription()+`
205
205
  `),r.length>0&&(n.appendMarkdown(`#### Examples:
206
206
  `),n.appendCodeblock($0.LanguageId,r.join(`
207
- `)))};st.appendTooltipBody=Oq;var Aq=n=>{var r;let e=[];for(let t of n.signatureDefinitions){let i=t,o={label:(0,st.createTooltipHeader)(n,i)},l=(r=i.getArguments())!=null?r:[],u=new U0.MarkdownString("");(0,st.appendTooltipBody)(u,i),o.parameters=l.map(a=>({label:`${a.getLabel()}${a.isOptional()?"?":""}: ${a.getTypes().join(" or ")}`})),o.documentation=u.toString(),e.push(o)}return e};st.createSignatureInfo=Aq;var Dq=n=>{let e=[];for(let r of n.signatureDefinitions){let t=new U0.MarkdownString(""),i=r;(0,st.appendTooltipHeader)(t,n,i),(0,st.appendTooltipBody)(t,i),e.push(t)}return{contents:e.map(r=>r.toString())}};st.createHover=Dq});var z0=S(bi=>{"use strict";var jq=bi&&bi.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(bi,"__esModule",{value:!0});bi.activate=void 0;var W0=qt(),Lq=zn(),Qb=en(),V0=jq((Os(),mt(Cs))),$s=zl(),Mq=ks(),Jb=ap(),Zb=lp(),qq=Xi(),H0=(n,e,r)=>B(bi,null,function*(){let t=$s.URI.parse(e.uri),i=yield n.fs.getWorkspaceFolderUri(t);return i==null?$s.Utils.joinPath(t,".."):r.startsWith("/")?i:$s.Utils.joinPath(t,"..")});function Fq(n){function e(t,i){return B(this,null,function*(){let s=new Jb.MarkdownString(""),o=i.closest,l=yield H0(n,t,o.directory),u=yield n.fs.findExistingPath($s.Utils.joinPath(l,o.directory).toString()),a=u==null?["Cannot open file."]:[`[Imports file "${V0.default.basename(u)}" inside this code](${u})`,"***","Click the link above to open the file.","","Use the build command to create an installer","file which will bundle all dependencies."];return s.appendMarkdown(a.join(`
207
+ `)))};st.appendTooltipBody=Aq;var Dq=n=>{var r;let e=[];for(let t of n.signatureDefinitions){let i=t,o={label:(0,st.createTooltipHeader)(n,i)},l=(r=i.getArguments())!=null?r:[],u=new U0.MarkdownString("");(0,st.appendTooltipBody)(u,i),o.parameters=l.map(a=>({label:`${a.getLabel()}${a.isOptional()?"?":""}: ${a.getTypes().join(" or ")}`})),o.documentation=u.toString(),e.push(o)}return e};st.createSignatureInfo=Dq;var jq=n=>{let e=[];for(let r of n.signatureDefinitions){let t=new U0.MarkdownString(""),i=r;(0,st.appendTooltipHeader)(t,n,i),(0,st.appendTooltipBody)(t,i),e.push(t)}return{contents:e.map(r=>r.toString())}};st.createHover=jq});var z0=S(bi=>{"use strict";var Lq=bi&&bi.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(bi,"__esModule",{value:!0});bi.activate=void 0;var W0=qt(),Mq=zn(),Qb=en(),V0=Lq((Os(),mt(Cs))),$s=zl(),qq=ks(),Jb=ap(),Zb=lp(),Fq=Xi(),H0=(n,e,r)=>B(bi,null,function*(){let t=$s.URI.parse(e.uri),i=yield n.fs.getWorkspaceFolderUri(t);return i==null?$s.Utils.joinPath(t,".."):r.startsWith("/")?i:$s.Utils.joinPath(t,"..")});function Nq(n){function e(t,i){return B(this,null,function*(){let s=new Jb.MarkdownString(""),o=i.closest,l=yield H0(n,t,o.directory),u=yield n.fs.findExistingPath($s.Utils.joinPath(l,o.directory).toString()),a=u==null?["Cannot open file."]:[`[Imports file "${V0.default.basename(u)}" inside this code](${u})`,"***","Click the link above to open the file.","","Use the build command to create an installer","file which will bundle all dependencies."];return s.appendMarkdown(a.join(`
208
208
  `)),{contents:s.toString()}})}function r(t,i){return B(this,null,function*(){let s=new Jb.MarkdownString(""),l=i.closest.path,u=yield H0(n,t,l),a=$s.Utils.joinPath(u,l),c=$s.Utils.joinPath(u,`${l}`),p=yield n.fs.findExistingPath(a.toString(),c.toString()),d=p==null?["Cannot open file."]:[`[Inserts file "${V0.default.basename(p)}" inside this code when building](${p})`,"***","Click the link above to open the file."];return s.appendMarkdown(d.join(`
209
- `)),{contents:s.toString()}})}n.connection.onHover(t=>B(this,null,function*(){if(!n.getConfiguration().hoverdocs)return;let i=yield n.fs.getTextDocument(t.textDocument.uri);if(i==null)return;let s=new Mq.LookupHelper(i,n),o=s.lookupAST(t.position);if(!o)return;if(o.closest.type===Lq.ASTType.ImportCodeExpression)return yield e(i,o);if(o.closest.type===W0.ASTType.FeatureImportExpression||o.closest.type===W0.ASTType.FeatureIncludeExpression)return yield r(i,o);let l=yield s.lookupTypeInfo(o);if(!l)return;if(l.isCallable())return(0,Zb.createHover)(l);let u=new Jb.MarkdownString(""),a=Array.from(l.types).map(Qb.SignatureDefinitionTypeMeta.parse),c=`(${l.kind}) ${l.label}: ${(0,Zb.formatTypes)(a)}`;if(l.types.has(Qb.SignatureDefinitionBaseType.Map)){let p={};for(let[d,h]of l.values){let g=Array.from(h.types).map(Qb.SignatureDefinitionTypeMeta.parse);p[d.slice(2)]=(0,Zb.formatTypes)(g)}c+=" "+JSON.stringify(p,null,2)}return u.appendCodeblock(qq.LanguageId,c),{contents:u.toString()}}))}bi.activate=Fq});var K0=S(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});up.activate=void 0;var G0=me(),Nq=ks(),$q=lp(),Uq=n=>{if(n.closest.type===G0.ASTType.CallExpression)return n.closest;for(let e=n.outer.length-1;e>=0;e--){let r=n.outer[e];if(r.type===G0.ASTType.CallExpression)return r}return null};function Bq(n){n.connection.onSignatureHelp(e=>B(this,null,function*(){if(!n.getConfiguration().autocomplete)return;let r=yield n.fs.getTextDocument(e.textDocument.uri);if(r==null)return;yield n.documentManager.getLatest(r);let t=new Nq.LookupHelper(r,n),i=t.lookupAST(e.position);if(!i)return;let{closest:s}=i,o=Uq(i);if(o===null)return;let l=yield t.lookupTypeInfo({closest:o.base,outer:s.scope?[s.scope]:[]});if(!l||!l.isCallable())return;let a=o.arguments.findIndex(p=>{let d=p.start.character-1,h=p.end.character;return d<=e.position.character&&h>=e.position.character}),c={activeParameter:a===-1?0:a,signatures:[],activeSignature:0};return c.signatures.push(...(0,$q.createSignatureInfo)(l)),c}))}up.activate=Bq});var Q0=S(cp=>{"use strict";Object.defineProperty(cp,"__esModule",{value:!0});cp.activate=void 0;var Y0=Xi();function Wq(n){let e=t=>t.languageId!==Y0.LanguageId?!1:n.documentManager.schedule(t),r=t=>{t.languageId===Y0.LanguageId&&n.documentManager.clear(t)};n.fs.on("text-document-open",e),n.fs.on("text-document-change",e),n.fs.on("text-document-close",r)}cp.activate=Wq});var Z0=S(J0=>{"use strict";Object.defineProperty(J0,"__esModule",{value:!0});var Te=en();Te.VariationRegistry.add("GreyInterpreter.CheckScpUpload",["unknown error","Invalid path","${filepath} not found","permission denied","permission denied. ${filename} is protected","The copy can not be made. Reached maximum number of files in a folder","The copy can not be made. Reached maximum limit"]);Te.VariationRegistry.add("PlayerUtils.ConnectComputer",["ip address not found","can't connect: the remote server has been temporarily disabled due to non-payment","can't connect: port ${port} not found","can't connect: port closed","can't connect: There is no active machine behind the port ${port}","can't connect: service not found behind the port ${port}"]);Te.VariationRegistry.add("PlayerUtils.RenameFichero",["Unknown error","${filepath} not found","Error: name cannot exceed the limit of 128 characters.","permission denied","permission denied. File protected","There is already a file with that name, please choose another one."]);Te.VariationRegistry.add("PlayerUtils.FirewallPingStatus",["Connection refused. Address unreachable","Connection refused. The target is behind a firewall."]);Te.VariationRegistry.add("Computer.CheckInicio",["Fatal error: ${filepath} corrupted!","Kernel panic: missing ${filepath} file!","Graphics error: ${filepath} not found!","Fatal error: ${filepath} not found!"]);Te.VariationRegistry.add("Networking.CheckServiceOnline",["No internet access.","Remote host is down","Unable to find service ${service}","Invalid target service port configuration.","connection rejected: port forward removed by admin","Unable to connect: missing ${library}","Unable to connect: invalid ${library}","Unexpected library found. Not a valid ${library} library.","Unknown error"]);Te.VariationRegistry.add("Networking.IsRouterAvailable",["can't connect: invalid or missing kernel_router.so in the target router","can't connect: unexpected library found. Not a valid kernel_router.so library in the target router.","can't connect: invalid or missing kernel_router.so in the target router"]);Te.VariationRegistry.add("BlockchainSystem.AddWallet",["Error: Wallet user already exists.","Error: Only one wallet per player allowed."]);Te.VariationRegistry.add("BlockchainSystem.RemoveCurrency",["Error: ${coinname} does not exist","Error: incorrect user/password"]);Te.VariationRegistry.add("BlockchainSystem.AddSubWallet",["Error: Wallet does not exists.","Error: Coin does not exist.","Error: This username already exists","Error: Incorrect PIN","Error: only a maximum of 10 subwallets per coin is allowed."]);Te.VariationRegistry.add("BlockchainSystem.Transaction",["Error: coin does not exist","Error: ${subWalletOrig} not found","Error: ${subWalletDest} not found","Error: wallet ${subWalletOrig} does not exist","Error: target wallet does not exist","${subWalletOrig} need to be registered in ${coinName} to be able to receive this coin.","Error: subwallet ${subWalletDest} does not have coins in the selected currency","Error: insufficient funds to complete the transaction"]);Te.VariationRegistry.add("BlockchainSystem.SetAddress",["Error: ${coinName} does not exist"]);Te.VariationRegistry.add("BlockchainSystem.GetAddress",["Error: ${coinName} does not exist"]);Te.VariationRegistry.add("BlockchainSystem.ResetCoinPass",["Error: coin does not exist","Error: Only the account owner can change the password"]);Te.VariationRegistry.add("PlayerUtils.CrearCarpeta",["Unknown error.","Error: empty destination path","Error: only alphanumeric allowed as folder name.","Error: name cannot exceed the limit of 128 characters.","permission denied","${filename} file exists","Can't create folder. Reached maximum limit","The copy can not be made. Reached maximum number of files in a folder","The maximum number of subfolders has been exceeded"]);Te.VariationRegistry.add("PlayerUtils.CrearArchivo",["Can't create file. Unknown error","Can't create file. Reached maximum limit","Invalid path","Can't create file ${pathFolderDest}/${filename}. Permission denied","There is not enough free space on the hard disk.","The copy can not be made. Reached maximum number of files in a folder"]);Te.VariationRegistry.add("Computer.ValidateNewUser",["Error: root user already exists.","Error: can't create guest user. Reserved user.","Error: can't create user. ${username} already exists."]);Te.VariationRegistry.add("NetworkLan.ConnectEthernet",["Error: Ethernet card not connected to the network","Unable to find ISP network to connect using Ethernet card","can't connect: the home network has been temporarily disabled due to non-payment","Error: the gateway cannot be the same device to connect","Error: gateway ${gateway} does not exist in the network","Error: address ${address} is already in use.","Unknown error: The current IP ${localIp} does not exist in this network","Error: unable to run command on routers/switches"]);Te.VariationRegistry.add("PlayerUtils.GetSmtpServer",["invalid IP address","host is down","host doesn't exist","ip address not found","port ${port} not found","host doesn't exist","invalid target service","service not found"]);Te.VariationRegistry.add("FileSystem.UpdatePermisos",["permission denied","permission denied. File protected.","Wrong format."]);Te.VariationRegistry.add("PlayerUtils.MoverFichero",["Unknown error","Error: Invalid path","${sourceFilepath} not found","${destinationParentPath} not found","permission denied","There is not enough free space on the hard disk.","permission denied. ${filename} is protected.","A file cannot overwrite a folder or vice versa","The copy can not be made. Reached maximum number of files in a folder","The copy can not be made. Reached maximum limit"]);Te.VariationRegistry.add("PlayerUtils.RemoveFile",["file not found: ${path}","permission denied","permission denied. File protected.","unknown error :/"]);Te.VariationRegistry.add("Database.GetMailAccount",["Unable to login into account. Wrong password.","${user} user not found","Unknown error: This email account cannot be obtained.","Unable to login into account. Wrong password."]);Te.VariationRegistry.add("PlayerUtils.SendMail",["Invalid email address","Mail subject too large","Mail message too large","Unknown error: attachment failed","Error: attachment not found","Unable to attach file: permission denied","The email couldn't be sent. The recipient has blocked this email address.","The email couldn't be sent. The recipient has blocked emails sent by other players.","The email couldn't be sent. The recipient has blocked emails sent by other players using npcs accounts."]);Te.VariationRegistry.add("PlayerUtils.ConnectToService",["Invalid service ID","can't connect: incorrect user/password"]);Te.VariationRegistry.add("BlockchainSystem.SetInfoSubWallet",["Error: ${coinName} does not exist","Error: ${subWalletUser} does not exist","Error: main wallet linked to ${subWalletUser} does not exist anymore"]);Te.VariationRegistry.add("BlockchainSystem.GetInfoSubWallet",["Error: ${coinName} does not exist","Error: ${subWalletUser} does not exist","Error: main wallet linked to ${subWalletUser} does not exist anymore","Error: Coin ${coinName}does not exist in the Wallet user"]);Te.VariationRegistry.add("BlockchainSystem.ResetWalletPass",["Error: Wallet does not exist.","Error: Only the account owner can change the password","Error: The password can only be reset once a day"]);Te.VariationRegistry.add("BlockchainSystem.SellCoin",["Error: Coin ${coinName} does not exist","Error: Wallet does not exist","Subwallet ${subwalletID} does not exist","Error: subwallet does not contain enough coins to sell","Error: exceeded maximum of 21 million coins","Purchase failed: It is necessary to create a bank account to make transactions","Error: You already have a pending sale. Cancel it to create a new sale.","Error: You already have a pending purchase. Cancel it to create a new sale.","Not enough buyers found. Transaction is pending until a buyer is found.","A partial transaction has occurred. The data of your offer has been updated"]);Te.VariationRegistry.add("BlockchainSystem.BuyCoin",["Error: Coin ${coinName} does not exist","Error: Wallet does not exist","You need to be registered in ${coinName} to be able to buy this coin.","Subwallet ${subwalletID} does not exist","Purchase failed: It is necessary to create a bank account to make transactions","Purchase failed: Insufficient money in the bank. Required $${price}","Error: You already have a pending sale. Cancel it to create a new purchase.","Error: You already have a pending purchase. Cancel it to create a new purchase.","Not enough sellers found. Transaction is pending until a seller is found.","A partial transaction has occurred. The data of your offer has been updated"])});var X0=S((i4,Vq)=>{Vq.exports={insert:{description:"Inserts a value into either a `list` or a `string`. If the passed index is not a `number`, this method throws an error, preventing further script execution.",example:["list = [2, 3, 4]","list.insert(2, 42)",'print("List with inserted item: " + list.join(", "))']},indexOf:{description:"Lookups index of value within `map`s, `list`s, or `string`s. For `list`s and `string`s, the behavior is very similar. On success, you'll receive a `number` representing the found index. On failure, it will return `null`. For `map`s, it's a bit different since the returned value could be of any type. On failure, it will return `null` as well.",example:['index = "test".indexOf("e")','print("e is at: " + index)']},hasIndex:{description:"Verifies if an index is available within an object. In case of success this method will return a `number` with the value one. In case of failure the value will be a zero. This method supports `map`s, `list`s and `string`s. Each passed type may result in different behavior therefore it is advisable to take a look at each of their specific signatures.",example:['print("List has index: " + [1, 2, 3].hasIndex(2)']},remove:{description:"Depending on the data type, this function will remove a value in the provided object, potentially mutating the object. This method works with `map`s, `list`s, and `string`s. Each passed type may support different types for the `key` argument. For example, using this method on a string would treat the key as a character index. Therefore, it is advised to review the signatures of each type. Passing a key with the type `null` may cause an error to be thrown, preventing further script execution.",example:["list = [9, 3, 5, 7]","list.remove(5)",'print("List after removal: " + list.join(", "))']},push:{description:"Allows pushing a value into an object, supporting `map`s and `list`s. However, it throws an error if you attempt to push a value into itself or into a map-like object such as a `file`, halting further script execution.",example:["list = [0, 1, 2, 3, 4, 5]","list.push(42)",'print("The answer to everything is: " + list.pop)']},pull:{description:"When passing a `list` to this method, it will return the value at the first index and remove it from the `list`. Additionally, if a `map` is passed, it will always return the value corresponding to the first matching key and mutate the `map` object accordingly. However, passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution.",example:["myList = [42, 1, 3]","answer = myList.pull",'print("Answer to everything: " + answer)']},pop:{description:"When passing a `list` to this method, it will return the value at the last index and remove it from the `list`. Additionally, if a `map` is passed, it will always return the value corresponding to the first matching key and mutate the `map` object accordingly. However, passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution.",example:["list = [0, 1, 2, 3, 4, 5]",'print("The last item is: " + list.pop)']},shuffle:{description:"Randomizes content of an object. Valid data types for this method are `list` and `map`. In case a map-like object such as a `file` or `computer` a runtime exception will be thrown.",example:["list = [0, 1, 2, 3, 4, 5]","list.shuffle",'print("And the winner is: " + list[0])']},sum:{description:"Returns a `number` representing the sum of all items within a `map` or a `list`.",example:["list = [0, 1, 2, 3, 4, 5]",'print("Sum of all items is: " + list.sum)']},indexes:{description:"Returns a `list` containing all indexes or keys of the passed object. This method supports `map`s, `list`s, and `string`s. The type of each item may vary when using this method on a `map` since keys could be any type. The other types will return a `list` where each item is a `number`.",example:['indexesOfStr = "test".indexes','print("Following indexes are available: " + indexesOfStr.join(", "))']},len:{description:"Returns `number` indicating what size the object is.",example:['length = "test".len','print("Length of string is: " + length)']},values:{description:"Returns a `list` containing all values of an object.",example:['indexesOfStr = "test".values','print("Following values are available: " + indexesOfStr.join(", "))']}}});var e1=S((s4,Hq)=>{Hq.exports={$meta:{description:'A `aptClient` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"aptclientLib"`.'},show:{description:'Show displays all the packages available in a repository. The repository must be listed in the `"/etc/apt/sources.txt"` file. If the provided repository value is anything other than a `string`, this method will return `null`. If it cannot find a repository, it will return various error messages. On success, it will return a `string` containing all packages and their descriptions, with each entry separated by a newline.',example:['aptClient = include_lib("/lib/aptclient.so")','packages = aptClient.show("177.202.15.132")',"packageList = packages.split(char(10) + char(10))","packageList.pop // remove last empty item","for packageItem in packageList"," entry = packageItem.split(char(10))"," packageName = entry[0]"," packageDescription = entry[1]",' print "Title: <b>" + packageName + "</b>"',' print "Description: <i>" + packageDescription + "</i>"',' print "----------------------------"',"end for"]},search:{description:'Search specifically looks for a package in any of the repositories listed in `"/etc/apt/sources.txt"`. If the provided search value is anything other than a `string`, this method will return `null`. On success, it will return a `string` containing all packages that partially match the provided search value. On failure, it will return a `string` with various error messages.',example:['aptClient = include_lib("/lib/aptclient.so")','packages = aptClient.search(".so")',"packageList = packages.split(char(10) + char(10))","for packageItem in packageList"," entry = packageItem.split(char(10))"," if entry.len != 2 then",' print "something wrong in: " + entry'," continue"," end if"," packageName = entry[0]"," packageDescription = entry[1]",' print "Title: <b>" + packageName + "</b>"',' print "Description: <i>" + packageDescription + "</i>"',' print "----------------------------"',"end for"]},update:{description:'Update refreshes the list of available packages after adding a new repository in `"/etc/apt/sources.txt"`, or if the remote repository has updated its information in `"/server/conf/repod.conf"`. If the update is successful, an empty `string` will be returned. In case of failure, a `string` with an error message will be returned. If for some reason the `"/etc/apt/sources.txt"` is malformed this method will return a number with the value zero.',example:['aptClient = include_lib("/lib/aptclient.so")',"result = aptClient.update",'if result == "" then',' print "Update successful!"',"else",' print "Error while updating: " + result',"end if"]},add_repo:{description:'Inserts a repository address into the `"/etc/apt/sources.txt"` file. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return an empty `string`. In case of failure, it will return a `string` with an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = aptClient.add_repo("177.202.15.132")','if result == "" then',' print "Addition successful!"',"else",' print "Error while adding: " + result',"end if"]},del_repo:{description:'Deletes a repository address from the `"/etc/apt/sources.txt"` file. If the provided repository value is anything other than a `string`, this method will return `null`. On success, it will return an empty `string`. In case of failure, it will return a `string` with an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = aptClient.del_repo("177.202.15.132")','if result == "" then',' print "Deletion successful!"',"else",' print "Error while deleting: " + result',"end if"]},install:{description:'Installs a program or library from a remote repository listed in `"/etc/apt/sources.txt"`. If no path is specified, the program installs in `"/lib"` if it is a library or in `"/bin"` otherwise. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, this method will return a `number` with the value one. In case of failure, it will return a `string` containing an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = aptClient.install("rshell_interface")',"if result == 1 then",' print "Installed program successful!"',"else",' print "Error while installing: " + result',"end if"]},check_upgrade:{description:"Checks if there is a newer version of the program or library in the repository. If the provided filepath value is anything other than a `string`, this method will return `null`. On success, it will return a `number`, which can be either zero or one. Zero indicates that there is no new version, while one indicates that there is a new version available. In case of failure, it will return a string containing an error message.",example:['aptClient = include_lib("/lib/aptclient.so")','result = aptClient.check_upgrade("/bin/rshell_interface")',"if result == 0 then",' print "Program doesnt need an update!"',"else if result == 1 then",' print "Program does need an update!"',"else",' print "Error while checking version: " + result',"end if"]}}});var t1=S((o4,zq)=>{zq.exports={$meta:{description:'A `blockchain` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"blockchainLib"`.'},coin_price:{description:"Returns a `number` representing the current unit value of the cryptocurrency. In case of an error, a `string` with the error details will be returned. If the provided `coinName` is anything other than a `string`, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','price = blockchain.coin_price("test")','if typeof(price) == "string" then',' exit "Couldnt get coin price due to: " + price',"end if",'print "Your coin price is " + price']},show_history:{description:"Returns a `map` with the latest changes in the value of a specific cryptocurrency. The key of the `map` is an index represented by a `number`. The value is a `list`, where index 0 is the historical price of the coin and index 1 is the date when the price change occurred. If the provided `coinName` is anything other than a `string` or if no coin exists with this name, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','history = blockchain.show_history("test")','if typeof(history) == "string" then',' exit "Couldnt fetch history due to: " + history',"else if history == null then",' exit "There doesnt seem to be a coin"',"end if","for entry in history.values"," price = entry[0]"," date = entry[1]",' print "The price on " + date + " was " + price',"end for"]},amount_mined:{description:"Returns a `number` representing the total amount of mined coins. In case of an error, it will return a `string` with the details. If the provided coinName is anything other than a `string`, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','mined = blockchain.amount_mined("test")','if typeof(mined) == "string" then',' exit "Couldnt get amount mined due to: " + mined',"end if",'print "Your mined amount is " + mined']},get_coin:{description:"Returns a `coin` object used to manage the currency. In case of an error, it will return a `string` with the details. If any of the provided parameters deviate from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','if typeof(coin) != "coin" then',' exit "Couldnt get coin object due to: " + coin',"end if",'print "Your coin address is " + coin.get_address']},get_coin_name:{description:"Returns a `string` with the name of the coin owned by the player. In case of an error, it returns a `string` with details. If any provided parameters deviate from the defined signature, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coinName = blockchain.get_coin_name("test", "test")','if not coinName.matches("^[A-Z]+$") then',' exit "Couldnt get coin name due to: " + coinName',"end if",`print "The name of the coin you're owning is " + coinName`]},login_wallet:{description:"Returns a `wallet` object on success. In case of an error, it will return a `string` indicating the reason. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','if typeof(wallet) == "string" then',' print "Login failed due to: " + wallet',"else",' print "Login was successful!"',"end if"]},create_wallet:{description:"Creates a `wallet` and returns a `wallet` object on success, which can be used to manage cryptocurrencies. In case of an error, it will return a `string` with the details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.create_wallet("test", "test")','if typeof(wallet) == "string" then',' print "Wallet creation failed due to: " + wallet',"else",' print "Wallet creation was successful!"',"end if"]},delete_coin:{description:"Removes a cryptocurrency from the world. The credentials used in the creation of the cryptocurrency are required. On success, it will return a `number` with the value one. On failure, it will return a `string` containing details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','result = blockchain.delete_coin("test", "test", "test")','if typeof(result) == "string" then',' exit "Couldnt delete coin due to: " + result',"end if",'print "Coin got deleted"']}}});var n1=S((a4,Gq)=>{Gq.exports={$meta:{description:"A class or object is a `map` with a special `__isa` entry that points to the parent. This is set automatically when you use the `new` operator.",example:['Shape = { "sides": 0 }',"Square = new Shape","Square.sides = 4","x = new Square","print(x.sides) // 4"]}}});var r1=S((l4,Kq)=>{Kq.exports={$meta:{description:'A `coin` object can be obtained by using [get_coin](#BLOCKCHAIN_GET_COIN). The `classID` used for this object is `"coin"`.'},set_cycle_mining:{description:"Defines the interval (in-game hours) in which each user receives a coin reward when mining. The interval cannot be lower than 1 and not higher than 2160. If the provided `rateHours` is not a `number`, this method will return `null`. On success, it will return a `number` with the value one. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.set_cycle_mining(20)","if result == 1 then",' print "Successful updated mining interval"',"else",' print "Failed updating mining interval"',"end if"]},get_cycle_mining:{description:"Returns a `number` representing the defined interval in which each user receives a coin reward when mining. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_cycle_mining",'if typeof(result) == "string" then',' exit "Failed getting cyclic mining value due to: " + result',"end if",'print "cyclic mining value: " + result']},get_reward:{description:"Returns a `number` representing the amount of coins that will be received as a reward after each mining cycle. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_reward",'if typeof(result) == "string" then',' exit "Failed getting reward value due to: " + result',"end if",'print "reward value: " + result']},set_reward:{description:"Assigns the reward that miners will receive after each mining cycle. The reward value has to be above one. If the provided `coinAmount` is not a `number`, this method will return `null`. On success, it will return a `number` with the value one. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.set_reward(-1)",'if typeof(result) == "string" then',' exit "Failed setting reward due to: " + result',"end if",'print "Successfully set reward!"']},transaction:{description:"Facilitates a transaction of the currency between the indicated subwallets. In case of an error, a `string` with the details is returned. In case of success, a `number` with a value of one will be returned. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','result = coin.transaction("test", "test2", 20)','if typeof(result) == "string" then',' exit "Failed transaction due to: " + result',"end if",'print "Successfully transfered!"']},create_subwallet:{description:"Registers a new account in the `coin` that can be used to manage services such as stores. It is necessary to provide the PIN of the owner's `wallet` that wants to register. In case of success, the method will return a `number` with the value one. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. In case of an error, a `string` with the details is returned.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','wallet = blockchain.login_wallet("test", "test")','result = coin.create_subwallet("test", wallet.get_pin, "test", "test")','if typeof(result) == "string" then',' exit "Failed to create subwallet due to: " + result',"end if",'print "Successfully created subwallet!"']},get_subwallet:{description:"Returns a `subWallet` object on success. In case of error, it returns a `string` with the details. If the provided `subWalletUser` is not a `string`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','result = coin.get_subwallet("test")','if typeof(result) == "string" then',' exit "Failed to get subwallet due to: " + result',"end if",'print "Successfully received subwallet!"']},get_subwallets:{description:"Returns a `list` where each item is a `subWallet` object, including all the accounts registered in the cryptocurrency. In case of error, it returns a `string` with the details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_subwallets",'if typeof(result) == "string" then',' exit "Failed to get subwallets due to: " + result',"end if","for subwallet in result",' print subwallet.get_user + " has " + subwallet.get_balance + " coins"',"end for"]},set_address:{description:"Configures a valid address that will be shown to users who do not have the currency, indicating where to register. In case of an error, it returns a `string` with the details. In case of success, a `number` with a value of one will be returned. If the provided address is not a `string`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','result = coin.set_address("12.12.12.12")','if typeof(result) == "string" then',' exit "Failed to set address due to: " + result',"end if",'print "Successfully set address!"']},get_address:{description:"Returns the configured address that will be shown to users who do not have the currency, indicating where they have to register. In case of an error, it returns a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_address","if not is_valid_ip(result) then",' exit "Failed to get address due to: " + result',"end if",'print "address: " + result']},get_mined_coins:{description:"Returns a `number` representing the amount of coins that have been mined so far. In case of an error, it returns a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_mined_coins",'if typeof(result) == "string" then',' exit "Failed to get mined coins due to: " + result',"end if",'print "mined coins: " + result']},reset_password:{description:"Resets the password of the coin. It returns a `number` with the value one if resetting was successful; otherwise, it will return a `string`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','result = coin.reset_password("test")','if typeof(result) == "string" then',' exit "Failed to reset password due to: " + result',"end if",'print "Successfully reset password"']}}});var i1=S((u4,Yq)=>{Yq.exports={$meta:{description:'A `computer` object can be obtained by either using [host_computer](#SHELL_HOST_COMPUTER) or [overflow](#METALIB_OVERFLOW). The `classID` used for this object is `"computer"`.'},get_ports:{description:"Returns a `list` of `port`s on the `computer` that are active.",example:["router = get_router","ports = get_shell.host_computer.get_ports","for port in ports",' print("Info: " + router.port_info(port))',"end for"]},get_name:{description:"Returns the hostname of the machine.",example:["computerName = get_shell.host_computer.get_name",'print("The name of your machine is " + computerName)']},local_ip:{description:"Returns a `string` with the local IP address of the `computer`.",example:["localIp = get_shell.host_computer.local_ip",'print("Local ip:" + localIp)']},public_ip:{description:"Returns a `string` with the public IP address of the `computer`.",example:["publicIp = get_shell.host_computer.public_ip",'print("Public ip:" + publicIp)']},File:{description:"Returns a `file` located at the path provided in the arguments. The path can be either relative or absolute. It's important to note that any `file` object can represent a folder as well. If the provided path cannot be resolved, meaning that no file or folder exists, this method will return `null`. Providing any other type than `string` or an empty value for the path will result in an error, interrupting the script execution.",example:['filePath = "/etc/passwd"',"file = get_shell.host_computer.File(filePath)","if file != null then"," print(file.get_content)","else",' print("File at given path " + filePath + " does not exist.")',"end if"]},create_folder:{description:"Creates a folder at the path provided in the arguments. There are certain limitations to creating a folder: the folder name has to be alphanumeric and below 128 characters. Creation will fail if there is already a folder in place or if there are lacking permissions. Additionally, there is a folder limit of about 250 in each folder and 3125 folders in the computer overall. In case the folder creation fails, the method will return a `string` with details. In case of success, it will return a `number` with the value one. Providing any type that deviates from the signature or using this method in an SSH encryption process will cause an error to be thrown, aborting further script execution.",example:['path = "/home/" + active_user + "/Desktop"',"hostComputer = get_shell.host_computer",'createResult = hostComputer.create_folder(path, "myfolder")','if typeof(createResult) == "string" then',' print("There was an error when creating the folder: " + createResult)',"else",' print("Folder got created at given path " + path)',"end if"]},is_network_active:{description:"Returns a `number` with either the value one or zero. If the `computer` has internet access, the value will be one. If there is no internet access, it will return zero instead.",example:["hostComputer = get_shell.host_computer","if hostComputer.is_network_active then",` print("You're connected.")`,"else",` print("You're not connected.")`,"end if"]},touch:{description:"Creates an empty text `file` at the provided path. Certain limitations apply to file creation: the `file` name must be alphanumeric and below 128 characters. Creation will fail if there is already a `file` in place or if permissions are lacking. Additionally, there is a file limit of about 250 in each folder and 3125 files in the computer overall. In case of success, it returns a `number` with the value one. In case of failure, it returns a `string` with details. Using this method in an SSH encryption process will cause an error to be thrown, preventing any further script execution.",example:['path = "/home/" + active_user + "/Desktop"',"hostComputer = get_shell.host_computer",'createResult = hostComputer.touch(path, "myFile.txt")','if typeof(createResult) == "string" then',' print("There was an error when creating the file: " + createResult)',"else",' print("File got created at given path " + path)',"end if"]},show_procs:{description:"Returns a `string` with an overview of all active processes on the `computer`, including information about the user, PID, CPU, memory, and command. Using this method in an SSH encryption process will cause an error to be thrown, preventing any further script execution.",example:["hostComputer = get_shell.host_computer","procs = hostComputer.show_procs","list = procs.split(char(10))[1:]","processes = []","for item in list",' parsedItem = item.split(" ")'," process = {}"," process.user = parsedItem[0]"," process.pid = parsedItem[1]"," process.cpu = parsedItem[2]"," process.mem = parsedItem[3]"," process.command = parsedItem[4]"," processes.push(process)","end for","print(processes)"]},network_devices:{description:"Returns a `string` containing information about all network devices available on the `computer`. Each item includes details about the interface name, chipset, and whether monitoring support is enabled.",example:["hostComputer = get_shell.host_computer","devices = hostComputer.network_devices","deviceList = devices.split(char(10))","for item in deviceList"," print(item)","end for"]},change_password:{description:"Changes the password of an existing user on the `computer`. Root access is necessary to successfully change the password. Passwords can only include alphanumeric characters and cannot exceed 15 characters. If the password change fails, this method will return a `string` containing information on why it failed. If the change succeeds, it will return a `number` with the value one. If the provided username is empty, an error will be thrown, preventing any further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','changeResult = hostComputer.change_password("test", "newPassword")','if typeof(changeResult) == "string" then',' print("There was an error when changing the password: " + changeResult)',"else",' print("Password got successfully changed.")',"end if"]},create_user:{description:"Creates a user on the `computer` with the specified name and password. Root access is necessary to successfully create a user. Both the username and password cannot exceed more than 15 characters and must be alphanumeric. There cannot be more than 15 users created on the same `computer`. If the creation fails, this method will return a `string` containing the reason for the failure. On success, it will return a `number` with the value one. If the provided username is empty or either of the values exceeds 15 characters, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','creationResult = hostComputer.create_user("newUser", "123")','if typeof(creationResult) == "string" then',' print("There was an error when creating an user: " + creationResult)',"else",' print("User got successfully created.")',"end if"]},delete_user:{description:"Deletes the indicated user from the `computer`. It can optionally delete the user's home folder as well, although by default the home folder will not be deleted. Root access is necessary to successfully delete a user. Keep in mind that you cannot delete the root user. If the deletion fails, this method will return a `string` containing the cause of failure. On success, it will return a `number` with the value one. If the provided username is empty, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','deletionResult = hostComputer.delete_user("test", true)','if typeof(deletionResult) == "string" then',' print("There was an error when deleting an user: " + deletionResult)',"else",' print("User got successfully deleted.")',"end if"]},create_group:{description:"Creates a new group associated with an existing user on the `computer`. Root access is necessary to successfully create a group. There are limitations when creating a group, such as a character limit of 15 and that the group name may only contain alphanumeric characters. If the group creation fails, this method will return a `string` containing the cause of failure. On success, it will return a `number` with the value one. If the provided arguments are empty or the username exceeds 15 characters, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','creationResult = hostComputer.create_group("test", "staff")','if typeof(creationResult) == "string" then',' print("There was an error when creating a group: " + creationResult)',"else",' print("Group got successfully created.")',"end if"]},delete_group:{description:"Deletes an existing group associated with an existing user on the `computer`. Root access is necessary to successfully delete a group. If the group deletion fails, this method will return a `string` containing the cause of failure. On success, it will return a `number` with the value one. If either of the provided values is empty, an error will be thrown, preventing further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','deletionResult = hostComputer.delete_group("test", "staff")','if typeof(deletionResult) == "string" then',' print("There was an error when deleting a group: " + deletionResult)',"else",' print("Group got successfully deleted.")',"end if"]},groups:{description:"Returns a `string` containing groups associated with an existing user on the `computer`. If the user does not exist, a `string` with an error message will be returned. If the provided username is empty, an error will be thrown, preventing further script execution. If the provided username is anything other than a `string`, this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','hostComputer.create_group("root", "staff")','groups = hostComputer.groups("root")',"listOfGroups = groups.split(char(10))","print(listOfGroups)"]},close_program:{description:"Closes a program associated with the provided PID. You can see the `list` of active programs by either using `show_procs` or typing ps into your terminal. To close a program, you need to either be the owner of the running process or root. If closing the program fails, this method will return a `string` containing details. On success, it will return a `number` with the value one. If there is no process with the provided PID, this method will return a `number` with the value zero. If the provided PID is anything other than a `number`, this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer',"processes = hostComputer.show_procs.split(char(10))[1:]",'pid = processes[1].split(" ")[1]',"closeResult = hostComputer.close_program(pid.to_int)",'if typeof(closeResult) == "string" then',' print("There was an error when closing a program: " + closeResult)',"else",' print("Program with pid " + pid + " got successfully closed.")',"end if"]},wifi_networks:{description:"Returns a `list` of the Wi-Fi networks that are available for the provided interface. Each item in the `list` is a `string` containing information on the BSSID, PWR, and ESSID. If no matching netDevice can be found, this method will return `null`. If the active network card is not a Wi-Fi card, an error will be thrown, preventing any further script execution.",example:['hostComputer = get_shell("root", "test").host_computer','networks = hostComputer.wifi_networks("wlan0")',"result = []","for network in networks",' parsedItem = network.split(" ")'," item = {}"," item.BSSID = parsedItem[0]"," item.PWR = parsedItem[1]"," item.ESSID = parsedItem[2]"," result.push(item)","end for","print(result)"]},connect_wifi:{description:"Connects to the indicated Wi-Fi network. It's not possible to connect to a new Wi-Fi while being logged in as a guest. If connecting to a new Wi-Fi fails, this method will return a `string` containing details. On success, it will return a `number` with the value one. Wi-Fi networks can be found via `wifi_networks` or by typing iwlist as a command in the terminal. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:["hostComputer = get_shell.host_computer","networks = hostComputer.wifi_networks",'firstNetwork = networks[0].split(" ")',"BSSID = firstNetwork[0]","ESSID = firstNetwork[2]",'connectionResult = hostComputer.connect_wifi("wlan0", BSSID, ESSID, "wifi-password")','if typeof(connectionResult) == "string" then',' print("There was an error while connecting to new Wifi: " + connectionResult)',"else",' print("Connected to new Wifi successfully.")',"end if"]},connect_ethernet:{description:"Sets up a new IP address on the computer through the Ethernet connection. It's not possible to set up a new IP address while being logged in as a guest. On failure, this method will either return a `string` with details or `null`. On success, it will return an empty `string`. If any of the provided parameters have a type that deviates from the defined signature or the computer is not connected to the internet, an error will be thrown, preventing any further script execution.",example:["hostComputer = get_shell.host_computer",'connectionResult = hostComputer.connect_ethernet("eth0", "192.168.0.4", get_router.local_ip)','if typeof(connectionResult) == "string" then',' print("There was an error while connecting: " + connectionResult)',"else",' print("Connected successfully.")',"end if"]},network_gateway:{description:"Returns a `string` with the gateway IP address configured on the computer.",example:["hostComputer = get_shell.host_computer","gatewayIp = hostComputer.network_gateway",'print("Gateway IP: " + gatewayIp)']},active_net_card:{description:'Returns a `string` which contains either the keyword `"WIFI"` or `"ETHERNET"` depending on the connection type your computer is currently using.',example:["hostComputer = get_shell.host_computer","netCard = hostComputer.active_net_card",'print("Connected by: " + netCard)']}}});var s1=S((c4,Qq)=>{Qq.exports={$meta:{description:'A `crypto` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"cryptoLib"`.'},aircrack:{description:"Returns a `string` containing the password based on the file which was generated via aireplay. In case of failure, it will return `null` instead. If the provided path is empty, an error will be thrown, interrupting the script execution.",example:['crypto = include_lib("/lib/crypto.so")','networks = get_shell.host_computer.wifi_networks("wlan0")','firstNetwork = networks[1].split(" ")',"bssid = firstNetwork[0]","pwr = firstNetwork[1][:-1].to_int","essid = firstNetwork[2]","aireplayResult = crypto.aireplay(bssid, essid, 300000 / pwr)","if (aireplayResult == null) then",' result = crypto.aircrack(home_dir + "/file.cap")'," print(result)","end if"]},airmon:{description:'Enables or disables the monitor mode of a network device. The `options` parameter can only be `"start"` or `"stop"`. Monitor mode can only be enabled on Wifi cards. If it wasn\'t possible to enable or disable the monitor mode, this method will return either a `number` with the value zero or a `string` with details. In case of success, it will return a `number` with the value one.',example:['crypto = include_lib("/lib/crypto.so")','airmonResult = crypto.airmon("start", "wlan0")','if typeof(airmonResult) == "string" then',' print("There was an error while switching monitoring mode: " + airmonResult)',"else",' print("Monitoring mode switched successfully.")',"end if"]},aireplay:{description:'Used to inject frames on wireless interfaces. Once the command with `"Control+C"` is stopped, it will save the captured information in a text file called `"file.cap"` in the path where the terminal is currently located. Alternatively, a maximum of captured `acks` can be specified for the command to stop automatically, saving the `"file.cap"` file as described above. To figure out how many ACKs are required, you can use the following formula: `"300000 / [Wifi PWR]"`. If there is an error, a `string` will be returned with the message indicating the problem. On success, it will return `null`, it is advised though to verify that the capture file actually exists. In case any of the provided values deviate from the signature types or bssid/essid is empty, an error will be thrown preventing any further script execution.',example:['crypto = include_lib("/lib/crypto.so")','networks = get_shell.host_computer.wifi_networks("wlan0")',"for index in range(0, networks.len - 1)",' print(index + ".) " + networks[index])',"end for",'selectedIndex = user_input("Select Wifi: ").to_int','if (typeof(selectedIndex) == "string" or selectedIndex < 0 or selectedIndex > networks.len - 1) then',' exit("Wrong index!")',"end if",'parsed = networks[selectedIndex].split(" ")',"bssid = parsed[0]","pwr = parsed[1][:-1].to_int","essid = parsed[2]","potentialAcks = 300000 / pwr","crypto.aireplay(bssid, essid, potentialAcks)",'wifiPassword = crypto.aircrack("/home/" + active_user + "/file.cap")','print("Wifi password for " + essid + " is " + wifiPassword)']},decipher:{description:"Returns a decrypted password via the provided password MD5 hash. Keep in mind that this method is not decrypting a password but rather checking for existing passwords within the game world with a matching MD5 hash. So in case a password does not exist in the game world, the decryption will fail. On failure, this method will return `null`. Using this method in an SSH encryption process will cause an error to be thrown, aborting further script execution.",example:['crypto = include_lib("/lib/crypto.so")','hostComputer = get_shell("root", "test").host_computer','passwdContent = hostComputer.File("/etc/passwd").get_content',"firstAccount = passwdContent.split(char(10))[0]",'parsed = firstAccount.split(":")',"username = parsed[0]","passwordHash = parsed[1]","password = crypto.decipher(passwordHash)",'print("User: " + username)','print("Password: " + password)']},smtp_user_list:{description:"Returns a `list` of the existing users on the `computer` where the SMTP service is running. If these users also have an email account registered on the SMTP server, it will be indicated in the `list`. SMTP services are usually running on port `25`. In case of failure, this method will return a `string` containing the cause. If any of the provided values deviate from the signature types, this method will return `null`.",example:['crypto = include_lib("/lib/crypto.so")','print(crypto.smtp_user_list("192.168.0.4", 25))']}}});var o1=S((p4,Jq)=>{Jq.exports={$meta:{description:'A `ctfEvent` object can be obtained by using [get_ctf](#GENERAL_GET_CTF). The `classID` used for this object is `"ctfEvent"`.'},get_description:{description:"Returns `string` with the CTF event description."},get_template:{description:"Returns `string` with the CTF event template."},player_success:{description:"Returns `number` with the value one if the CTF event got completed successfully. Otherwise this method will return a `number` with the value zero."},get_creator_name:{description:"Returns `string` with the name of the CTF event creator."},get_mail_content:{description:"Returns `string` with the mail content of the CTF event."}}});var a1=S((d4,Zq)=>{Zq.exports={$meta:{description:'A `file` object can be acquired by either using [File](#COMPUTER_FILE) or [overflow](#METALIB_OVERFLOW). The `classID` used for this object is `"file"`.'},chmod:{description:'Modifies the `file` permissions. Optionally, these permissions can also be applied recursively. The format for applying permissions is as follows: `"[references][operator][modes]"`. The references type is defined through three possible types: user `"u"`, group `"g"`, and other `"o"`. The operator is used to define if permissions get added `"+"` or removed `"-"`. There are three different modes that can be modified: read `"r"`, write `"w"`, and execute `"x"`. So, for example, `"o-wrx"` would remove all possible permissions for others. To add all permissions for others again, `"o+wrx"` would be used. In case the modification fails, this method will return a `string` containing information about the reason. Otherwise, an empty `string` is returned. In case any type other than `number` is used for the `isRecursive` parameter, an error will be thrown preventing further script execution.',example:['hostComputer = get_shell("root", "test").host_computer','rootFolder = hostComputer.File("/bin")',"oldPermissions = rootFolder.permissions",'rootFolder.chmod("o-wrx", true)',"newPermissions = rootFolder.permissions",'print("Old permissions: " + oldPermissions)','print("New permissions: " + newPermissions)']},copy:{description:"Copies the `file` to the provided path. Files can only be copied if the user has read and write permissions or is root. The new filename has to be below 128 characters and alphanumeric. After success, this method will return a `number` with the value one. Otherwise, it will return a `string` containing information about the reason for failure. If any of the parameter types deviate from the method signature, this method is used within an SSH encryption process, the new name exceeds 128 characters, or the path is too long, an error will be thrown, causing an interruption of script execution. In case the current file gets deleted, this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','copyResult = passwdFile.copy("/etc/", "duplicate")','if typeof(copyResult) == "string" then',' print("There was an error while copying file: " + copyResult)',"else",' print("File got copied successfully.")',"end if"]},move:{description:"Moves the `file` to the provided path. Files can only be moved if the user has read and write permissions or is root. The new filename has to be below 128 characters and alphanumeric. After success, this method will return a `number` with the value one. Otherwise, this method will return a `string` with details. If any of the parameter types deviate from the method signature, this method is used within an SSH encryption process, the new name exceeds 128 characters, or the path is too long, an error will be thrown, causing an interruption of script execution. In case the current file gets deleted, this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','moveResult = passwdFile.move("/etc/", "/moved/")','if typeof(moveResult) == "string" then',' print("There was an error while moving file: " + moveResult)',"else",' print("File got moved successfully.")',"end if"]},symlink:{description:"Creates a symlink to the specified path. Symlinks can only be created if the user has write permissions or is root. The new filename must be alphanumeric and under 128 characters. Upon success, this method returns a `number` with the value one. On failure, it returns a `string` with details. If any parameters deviate from the method signature, if used within an SSH encryption process, if the new name exceeds 128 characters, or if the path is too long, an error will be thrown, interrupting script execution. If the current file is deleted, this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','lsFile = hostComputer.File("/bin/ls")','symResult = lsFile.symlink("/bin", "alternativeLS")','if typeof(symResult) == "string" then',' print("There was an error while creating symlink: " + symResult)',"else",' print("Symlink got created successfully.")',"end if"]},rename:{description:"Rename the file with the name provided. Files can only be renamed if the user has write permissions or is root. The new filename has to be below 128 characters and alphanumeric. On failure, this method will return a `string` with details. Otherwise, this method will return an empty string. If this method is used within an SSH encryption process, an error will be thrown, causing the script execution to be interrupted. In case the provided name is `null`, this method will return a `number` with the value zero.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','renameResult = passwdFile.rename("renamed")','if typeof(renameResult) == "string" then',' print("There was an error while renaming file: " + renameResult)',"else",' print("File got renamed successfully.")',"end if"]},path:{description:"Returns a `string` containing the file path. If the file is a symlink, the optional `symlinkOrigPath` argument can be set to return the original path of the linked file instead. If the file has been deleted, this method will still return the path it had prior to deletion.",example:["hostComputer = get_shell.host_computer",'passwdFile = hostComputer.File("/etc/passwd")','print("File location: " + passwdFile.path)']},is_folder:{description:"Returns a `number`. The value is one if the file is a folder, zero otherwise. In case the file gets deleted this method will return `null` instead.",example:["hostComputer = get_shell.host_computer",'etcFolder = hostComputer.File("/etc")','print("Is a folder: " + etcFolder.is_folder)']},parent:{description:"Returns the parent folder of the current file or folder. In case there is no parent folder `null` will be returned instead. In case the file gets deleted this method will return `null` as well.",example:["hostComputer = get_shell.host_computer",'etcFolder = hostComputer.File("/etc")','print("Parent path: " + etcFolder.parent.path)']},name:{description:"Returns a `string` with the name of the file. In case the file gets deleted this method will return `null` instead.",example:["hostComputer = get_shell.host_computer",'passwdFile = hostComputer.File("/etc/passwd")','print("Filename: " + passwdFile.name)']},allow_import:{description:"Returns a `number`. If the file is binary and can be imported by other scripts, the value will be one; otherwise, the value will be zero. In case the file gets deleted, this method will cause a crash.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("File can be imported: " + lsBinary.allow_import)']},get_content:{description:"Returns a `string` representing the content of the file. To read a file, the user requires read access or being root. Note that you cannot read a binary file. In case of failure, `null` will be returned. If this method is used within an SSH encryption process, an error will be thrown, preventing any further script execution.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','print("File content: " + passwdFile.get_content)']},set_content:{description:"Saves text into a `file`. The content will not get appended to the `file`; therefore, existing content will be overridden. To set new content, the user requires write permissions or being root. Keep in mind that text files cannot exceed the character limit of 160,000. In case setting the content was successful, a `number` with the value one will be returned. Otherwise, a `string` with details will be returned. If this method is used within an SSH encryption process, an error will be thrown, preventing any further script execution. If the provided content is `null` or permissions are lacking, this method will return a `number` with the value zero. In case the file gets deleted this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','setResult = passwdFile.set_content("moo")','if typeof(setResult) == "string" then',' print("There was an error while setting file content: " + setResult)',"else if setResult == 0 then",' print("Unable to set content of file!")',"else",' print("File content got changed successfully.")',"end if"]},is_binary:{description:"Returns a `number`. If the file is a binary, the value will be one; otherwise, it will be zero. In case the file gets deleted, this method will return `null` instead.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("File is a binary: " + lsBinary.is_binary)']},is_symlink:{description:"Returns a `number`. If the file is a symlink, the value will be one; otherwise, it will be zero. In case the file gets deleted, this method will return `null` instead.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("File is a symlink: " + lsBinary.is_symlink)']},has_permission:{description:'Returns a `number` indicating if the user who launched the script has the requested permissions. One will indicate that the user has the correct permissions. In case permissions are lacking, the value will be zero. There are three different permission types: read `"r"`, write `"w"`, and execute `"x"`. In case the file gets deleted, this method will return `null` instead.',example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("Is able to execute ls: " + lsBinary.has_permission("x"))']},delete:{description:"Delete the current file. To delete files, write permissions are required or being root. In case of failure, a `string` with details will be returned. Otherwise, an empty `string` gets returned. Please note that deleting a file will leave a log entry.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")',"deletionResult = lsBinary.delete",'if typeof(deletionResult) == "string" and deletionResult.len > 0 then',' print("There was an error while deleting a file: " + deletionResult)',"else",' print("File got deleted successfully.")',"end if"]},get_folders:{description:"Returns a `list` of folders. In case the current entity is a file instead of a folder this method will return `null`, so it is advisable to first use the `is_folder` function before calling this method. In case the current folder gets deleted this method will return `null` as well.",example:["hostComputer = get_shell.host_computer",'binFolder = hostComputer.File("/home")',"folders = binFolder.get_folders","for folder in folders"," print(folder.path)","end for"]},get_files:{description:"Returns a `list` of files. In case the current entity is a file instead of a folder this method will return `null`, so it is advisable to first use the `is_folder` function before calling this method. In case the current folder gets deleted this method will return `null` as well.",example:["hostComputer = get_shell.host_computer",'binFolder = hostComputer.File("/bin")',"files = binFolder.get_files","for file in files"," print(file.path)","end for"]},permissions:{description:'Returns a `string` with the current file permissions. In case the current file gets deleted, this method will return `null`. The format for this permissions `string` is as follows: `"[fileType][wrx](u)[wrx](g)[wrx](o)"`. The file type is either `"d"` in case it\'s a directory or `"-"`. The user type gets defined through three possible types: user `"u"`, group `"g"`, and other `"o"`. There are three different permission types: read `"r"`, write `"w"`, and execute `"x"`. An example of a `string` returned by this method would be `"-rwxr-xr-x"`. Taking the latter as an example, the following things become clear:\n* The provided file is not a directory.\n* The user has full access.\n* The group and others have almost all permissions besides writing.\n',example:["hostComputer = get_shell.host_computer",'binFolder = hostComputer.File("/bin")',"permissions = binFolder.permissions","fileType = permissions[0]","permissionsForUser = permissions[1:4]","permissionsForGroup = permissions[4:7]","permissionsForOther = permissions[7:10]",'print("File type: " + fileType)','print("User permissions: " + permissionsForUser)','print("Group permissions: " + permissionsForGroup)','print("Other permissions: " + permissionsForOther)']},owner:{description:"Returns a `string` with the name of the file owner. User permissions get applied to whoever is the owner of a file. In case the current file gets deleted, this method will return `null`.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("Owner of ls is: " + lsBinary.owner)']},set_owner:{description:"Change the owner of this file. Optionally the owner can get applied recursively. The owner's name cannot exceed 15 characters. Additionally either write permissions or being root is required. In case of failure a `string` gets returned containing the cause. Otherwise an empty `string` gets returned. In case the current file gets deleted or the passed owner value is not a `string`, this method will return `null`. If the passed owner value is empty, the owner value is longer than 15 characters, or the passed recursive value deviates from its original type, an error will be thrown, interrupting further script execution.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','ownerResult = lsBinary.set_owner("root")','if typeof(ownerResult) == "string" then',' print("There was an error while changing owner: " + ownerResult)',"else",' print("File owner changed successfully.")',"end if"]},group:{description:"Returns a `string` with the name of the group to which this file belongs. Group permissions get applied to whoever is the owner of a file. In case the current file gets deleted, this method will return `null`.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("File is related to following group: " + lsBinary.group)']},set_group:{description:"Change the group related to this file. Optionally the group can get applied recursively. The group name cannot exceed 15 characters. Additionally either write permissions or being root is required. In case of failure, a `string` with details. On success, an empty `string` gets returned. In case the current file gets deleted or the passed group is not a `string`, this method will return `null`. If the passed group value is empty, the group value is longer than 15 characters, or the passed recursive value deviates from its original type, an error will be thrown, preventing further script execution.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','ownerResult = lsBinary.set_group("root")','if typeof(ownerResult) == "string" then',' print("There was an error while changing group: " + ownerResult)',"else",' print("File group changed successfully.")',"end if"]},size:{description:"Returns a `string` with the size of the file in bytes. There is no correlation between file size and actual file content. Instead, the file size is depending on the name of the file. In case the current file gets deleted, this method will return `null`.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")',"size = lsBinary.size","if size.to_int > 1000 then",' print("File size is bigger than 1000 bytes.")',"else",' print("File size is below 1000 bytes.")',"end if"]}}});var l1=S((h4,Xq)=>{Xq.exports={$meta:{description:'The FTP `shell` behaves just like the ssh `shell` and can be acquired by using [connect_service](#SHELL_CONNECT_SERVICE) and using the service type `"ftp"`. The `classID` used for this object is `"ftpshell"`. The port used for FTP is usually `21`.'},host_computer:{description:"Returns a `computer` related to the `shell`.",example:["shell = get_shell",'ftpShell = shell.connect_service("172.8.0.5", 21, "test", "test", "ftp")',"ftpComputer = ftpShell.host_computer",'print("FTP public ip: " + ftpComputer.public_ip)']},start_terminal:{description:"Launches an active terminal. The terminal's color will change, displaying the IP of the connected shell. Script execution will be stopped upon starting a new terminal, unless this is called from another script that was executed via `shell.launch`. In that case, you will enter the shell after closing your root-level script within that terminal window. Using this method within an SSH encryption process will cause an error to be thrown, preventing further script execution.",example:["shell = get_shell",'ftpShell = shell.connect_service("172.8.0.5", 21, "test", "test", "ftp")',"ftpShell.start_terminal"]},put:{description:"Send a `file` to the `computer` related to the provided `shell`. You require permission to read the `file` on the `computer` from which you are uploading and write permissions in the folder of the `computer` you are trying to upload to. In case of failure, this method will return a `string` with the cause. Otherwise, a `number` with the value one gets returned. If any of the passed arguments deviates from the types of the method signature, `null` will be returned. In case the `string` for sourceFile or destinationFolder is empty, an error will be thrown, preventing further script execution.",example:["shell = get_shell",'ftpShell = shell.connect_service("172.8.0.5", 21, "test", "test", "ftp")','putResult = ftpShell.put("/bin/ls", "/etc/", shell)','if typeof(putResult) == "string" then',' print("There was an error while sending file: " + putResult)',"else",' print("File got sent successfully.")',"end if"]}}});var u1=S((f4,eF)=>{eF.exports={$meta:{description:'Create a `function` with `"function()"`, including parameters with optional default values. Assign the result to a variable. Invoke by using that variable. Use `@` to reference a function without invoking.',example:["triple = function(n=1)"," return n * 3","end function","print triple // 3","print triple(5) // 15","f = @triple","print f(5)"]}}});var c1=S((m4,tF)=>{tF.exports={$meta:{description:"Use `if` blocks to do different things depending on some condition. Include zero or more `else if` blocks and one optional `else` block. Use a `while` block to loop as long as a condition is true. A `for` loop can loop over any `list`, including ones easily created with the `range` function. The `break` statement jumps out of a `while` or `for` loop. The `continue` statement jumps to the top of the loop, skipping the rest of the current iteration.",example:["// if block","if 2+2 == 4 then",' print "math works!"',"else if pi > 3 then",' print "pi is tasty"','else if "a" < "b" then',' print "I can sort"',"else",' print "last chance"',"end if","","// while loop",'s = "Spam"',"while s.len < 50",' s = s + ", spam"',"end while",'print s + " and spam!"',"","// for loop","for i in range(10, 1)",' print i + "..."',"end for",'print "Liftoff!"']},mail_login:{description:"Returns a `MetaMail` entity if the login was successful. On failure a `string` with details gets returned. In case any of the provided values deviate from the types defined in the signature this method will return `null`.",example:['metaMail = mail_login("test@test.com", "test")',"if metaMail == null then",' print("Loggin failed.")',"else",` print("You've got mail.")`,"end if"]},parent_path:{description:"Returns a `string` which is the parent path of the provided path. The path provided needs to be properly formatted. If the path is any other type than a `string` or is empty, this method will throw an error interrupting further script execution.",example:['print("Is proper parent path: " + (parent_path("/my/test/path") == "/my/test"))']},hasIndex:{description:"Verifies if an index is available within an object. In case of success this method will return a `number` with the value one. In case of failure the value will be a zero. This method supports `map`s, `list`s and `string`s. Each passed type may result in different behavior therefore it is advisable to take a look at each of their specific signatures. In case an unsupported value gets passed this method will return `null`.",example:['print("List has index: " + hasIndex([1, 2, 3], 2)']},typeof:{description:'Returns a `string` containing the type of the entity provided. There are following types by default: `"aptclientLib"`, `"blockchainLib"`, `"ctfEvent"`, `"coin"`, `"computer"`, `"cryptoLib"`, `"debugLibrary"`, `"file"`, `"function"`, `"list"`, `"map"`, `"MetaLib"`, `"MetaMail"`, `"MetaxploitLib"`, `"NetSession"`, `"null"`, `"number"`, `"port"`, `"router"`, `"service"`, `"shell"`, `"ftpshell"`, `"SmartAppliance"`, `"string"`, `"subwallet"`, `"TrafficNet"`, `"wallet"`. Custom types can be added as well by using the `classID` property in a `map`.',example:['myObj = { "classID": "myType" }','if typeof(myObj) == "myType" then',' print("Object is myType.")',"else",' print("Object is not myType.")',"end if"]},get_router:{description:"Returns by default the `router` to which the executing computer is connected to. Optionally an IP address can be provided. In case of failure `null` is returned. If there is no active internet connection, this method will throw an error, interrupting further script execution.",example:["router = get_router","if router.local_ip == get_shell.host_computer.network_gateway then",' print("Router is equal to network gateway.")',"else",' print("Router is not equal to network gateway.")',"end if"]},get_switch:{description:"Returns the switch on the local network whose IP address matches, otherwise it returns `null`.",example:['router = get_switch("192.168.0.2)','print("IP address of switch: " + router.local_ip)']},nslookup:{description:'Returns the IP address for the provided web address. In case the web address cannot be found a `string` gets returned containing the following message: `"Not found"`. If the provided web address is not a `string` or empty this method will throw an error preventing further script execution.',example:["url = params[0]",'print("IP for website is: " + nslookup(url))']},print:{description:"Print a message on the Terminal. Optionally replacing can be enabled which will replace all previous prints. This can be useful for creating a loading bar for example. There is also the possibility of styling output by using TextMeshPro rich-text tags.",example:["for i in range(9)",' print(("#" * (9 - i)) + ("-" * i) , true)'," wait(0.2)","end for"]},clear_screen:{description:"Removes any text existing in a Terminal prior to this point. Utilizing this method in an SSH encryption process will trigger an error, halting further script execution.",example:["for i in range(9)"," clear_screen",' print(("#" * (9 - i)) + ("-" * i))'," wait(0.2)","end for"]},active_user:{description:"Returns a `string` with the name of the user who is executing the current script.",example:['print("Current active user: " + active_user)']},home_dir:{description:"Returns a `string` with the home folder path of the user who is executing the current script.",example:['print("Home dir of current user: " + home_dir)']},get_shell:{description:"Returns the `shell` that is executing the current script. Optionally, a username and password can be provided, allowing the use of a shell with other user privileges. If the username or password does not match an existing user or if the provided values deviate from the defined signature, this method will return `null`.",example:['shell = get_shell("root", "test")',"if shell == null then",` print("Couldn't obtain root shell.")`,"else",' print("Obtained root shell.")',"end if"]},indexes:{description:"Returns a `list` containing all indexes or keys of the passed object. This method supports `map`s, `list`s, and `string`s. The type of each item may vary when using this method on a `map` since keys could be any type. The other types will return a `list` where each item is a `number`. In case a type is passed that is not supported, this method will return `null`.",example:['indexesOfStr = indexes("test")','print("Following indexes are available: " + indexesOfStr.join(", "))']},values:{description:"Returns a `list` containing all values of an object. Supported types are `map`s and `string`s. In case the passed type deviates from these two, it will return the passed value itself.",example:['indexesOfStr = values("test")','print("Following values are available: " + indexesOfStr.join(", "))']},indexOf:{description:"Lookups index of value within `map`s, `list`s, or `string`s. For `list`s and `string`s, the behavior is very similar. On success, you'll receive a `number` representing the found index. On failure, it will return `null`. For `map`s, it's a bit different since the returned value could be of any type. On failure, it will return `null` as well. If a value gets passed that is not supported, this method returns `null`.",example:['index = indexOf("test", "e")','print("e is at: " + index)']},len:{description:"Returns `number` indicating what size the passed object is. In case anything other than a `map`, `list` or `string` gets passed this method will return `null`.",example:['length = len("test")','print("Length of string is: " + length)']},shuffle:{description:"Randomizes content of an object. Valid data types for this method are `list` and `map`. In case a map-like object such as a `file` or `computer` a runtime exception will be thrown.",example:["list = [0, 1, 2, 3, 4, 5]","shuffle(list)",'print("And the winner is: " + list[0])']},val:{description:"Casts a `string` to a `number`. If the provided `string` does not represent a valid `number`, the `number` zero will be returned. If any type other than `string` or `number` is passed, this method will return `null`.",example:['num = val("1.25")','print("Number in string is: " + num)']},lower:{description:"Returns a `string` which is the lowercase transformed version of the provided `string`. In case anything other than a `string` gets passed this method will return the passed value again.",example:['myString = lower("HELLO WORLD")',"print(myString)"]},upper:{description:"Returns a `string` which is the uppercase transformed version of the provided `string`. In case anything other than a `string` gets passed this method will return the passed value again.",example:['myString = upper("hello world")',"print(myString)"]},sum:{description:"Returns a `number` representing the sum of all items within a `map` or a `list`. If any non-supported type is passed, this method will return a `number` with the value zero.",example:["list = [0, 1, 2, 3, 4, 5]",'print("Sum of all items is: " + sum(list))']},pop:{description:"When passing a `list` to this method, it will return the value at the last index and remove it from the `list`. Additionally, if a `map` is passed, it will always return the value corresponding to the first matching key and mutate the `map` object accordingly. However, passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution. If the passed object is empty or is anything other than a `map` or `list`, the method will return `null`.",example:["list = [0, 1, 2, 3, 4, 5]",'print("The last item is: " + pop(list))']},pull:{description:"When passing a `list` to this method, it will return the value at the first index and remove it from the `list`. Additionally, if a `map` is passed, it will always return the value corresponding to the first matching key and mutate the `map` object accordingly. However, passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution. If the passed object is empty or is anything other than a `map` or `list`, the method will return `null`.",example:["list = [0, 1, 2, 3, 4, 5]",'print("The first item is: " + pull(list))']},push:{description:"Allows pushing a value into an object, supporting `map`s and `list`s. However, it throws an error if you attempt to push a value into itself or into a map-like object such as a `file`, halting further script execution. If you try to push a value into an object that isn't a `map` or `list`, it returns `null`.",example:["list = [0, 1, 2, 3, 4, 5]","push(list, 42)",'print("The answer to everything is: " + pop(list))']},sort:{description:"Sorts the values of a `list` alphanumerically. This operation mutates the original `list`. Optionally, a key can be provided, which is used if the items are `map`s or `list`s. Finally, this method returns the updated `list`. If a type other than `list` is passed, the method returns the passed value without any changes.",example:["list = [9, 3, 5, 7]","sort(list)",'print("Sorted list: " + list.join(", "))']},remove:{description:"Depending on the data type, this function will remove a value in the provided object, potentially mutating the object. This method works with `map`s, `list`s, and `string`s. Each passed type may support different types for the `key` argument. For example, using this method on a string would treat the key as a character index. Therefore, it is advised to review the signatures of each type. Passing a key with the type `null` may cause an error to be thrown, preventing further script execution. The same will happen if the passed self value deviates from being a `map`, `list`, or `string`.",example:["list = [9, 3, 5, 7]","remove(list, 5)",'print("List after removal: " + list.join(", "))']},user_input:{description:"Puts script execution on hold to receive input from the user. Input can be submitted by pressing Enter. You can style the output message using TextMeshPro rich-text tags. Two optional arguments are available: `isPassword`, which defines whether input should be masked by asterisk signs, and `anyKey`, which enables capturing of keys individually. Using this method within an SSH encryption process or passing values deviating from the defined method signature will cause an error to be thrown, interrupting further script execution.",example:["num = 0",'aboveIncludingZeroTag = "<color=yellow>"','belowZeroTag = "<color=red>"',"while (true)"," clear_screen"," output = aboveIncludingZeroTag + num"," if (num < 0) then"," output = belowZeroTag + num"," end if"," print(output)",' key = user_input("Press arrow up/down to change value.", false, true)',' if (key == "UpArrow") then'," num = num + 1",' else if (key == "DownArrow") then'," num = num - 1"," else",' exit("Bye!")'," end if","end while"]},include_lib:{description:"Enables the inclusion of library binaries, which can be used inside your script. If successful, an object related to the provided library will be returned; otherwise, `null` is returned. This function is exclusively for importing library binaries. If you want to import custom scripts or binaries into your project, use `import_code` instead. Passing anything other than a `string` for the path, or leaving the path empty, will cause an error to be thrown, interrupting further script execution.",example:['crypto = include_lib("/lib/crypto.so")',"if crypto == null then",` print("Crypto library couldn't get imported.")`,"else",' print("Crypto library got imported.")',"end if"]},import_code:{description:'Enables to import code from different sources into one file. This is useful in case you want to split code into different files and also to avoid any limitation in regards to text file character limits. Note that `import_code` requires an absolute path and is called while compiling the file into a binary instead of during runtime. Additionally `import_code` cannot be nested. Code can be either imported from plain text files or binaries that have `"allow import"` enabled. `import_code` is also parsed wherever it is found, not even a `//` comment will prevent it being evaluated.',example:["//Content of main.src",'import_code("/home/user/my_module.src")','print("bye")',"//Content of my_module.src",'print("hello!")']},exit:{description:"Stops execution of the currently running script. Optionally a message can be provided which will be shown in the Terminal. There is also the possibility of styling output by using TextMeshPro rich-text tags.",example:["while (true)",' shouldExit = lower(user_input("Want to exit? (Y/N)"))',' if (shouldExit == "y") then',' exit("See you!")'," end if","end while"]},user_mail_address:{description:"Returns a `string` containing the email address of the player who is executing the script. If the user does not have an email address this method will return `null`.",example:['print("My EMail address is: " + user_mail_address)']},user_bank_number:{description:"Returns a `string` containing the bank account number of the player who is executing the script. If the user does not have a bank this method will return `null`.",example:['print("My Bank number is: " + user_bank_number)']},whois:{description:"Returns a `string` containing the administrator information behind an IP address provided. In case of failure the returned `string` will contain an error message instead. If the provided ip is not a `string` or is empty this method will throw an error causing the script to stop.",example:['adminInfo = whos("1.1.1.1")',"infoLines = adminInfo.split(char(10))","infoObject = {}",'infoObject.domainName = infoLines[0].split(":")[1].trim','infoObject.administrativeContact = infoLines[1].split(":")[1].trim','infoObject.emailAddress = infoLines[2].split(":")[1].trim','infoObject.phone = infoLines[3].split(":")[1].trim','print("Phone number: " + infoObject.phone)']},wait:{description:"Pauses the script execution. Optionally, the duration can be provided via the `time` argument. By default, the duration will be 1 second. The duration cannot be below 0.01 or above 300; otherwise, this method will throw a runtime exception.",example:["start = time","wait(5)","elapsed = time - start",'print("Waited: " + elapsed)']},command_info:{description:"Returns a `string` value of a translation. Translations include commands, documentation and other game-related things. Checkout [Grey-Texts](https://github.com/LoadingHome/Grey-Texts/blob/main/EnglishLang.json) for an overview of all available keys. If the provided command name is not a `string` or is empty this method will throw an error causing the script to stop.",example:['print(command_info("LS_USAGE"))']},program_path:{description:"Returns a `string` containing the path of the script that is currently executing. It will update when using `launch`, which makes it different from `launch_path`.",example:["path = program_path",'print("Script gets executed within: " + parent_path(path))']},current_path:{description:"Returns a `string` containing the path in which script that is currently executed from.",example:["path = current_path",'print("PWD: " + path)']},format_columns:{description:"Returns a `string` which is the formatted version of the provided text. Keep in mind that TextMeshPro rich-text tags might screw up the output. When using tags consider applying these after formatting. Passing anything other than a `string` will result in an empty `string`.",example:['text = "FIRST SECOND THIRD','1 2 3"',"print(format_columns(text))"]},current_date:{description:'Returns a `string` containing the current date and time. Ingame time passes 15 times as fast as real-time - 4 seconds per in-game minute. The initial time after every wipe will be the 1st of January 2000 at 6:00 AM. Additionally, the game time will not proceed while the server is offline.\n* Output schema: `"[day]/[month]/[year] - [hours]:[minutes]"`\n* Example output: `"27/Jan/2000 - 08:19"`\n',example:["dateStr = current_date",'dateSegments = dateStr.split(" - ")','date = dateSegments[0].split("/")',"day = date[0]","month = date[1]","year = date[2]",'dateTime = dateSegments[1].split(":")',"hours = dateTime[0]","minutes = dateTime[1]",'print("Current day: " + day)']},is_lan_ip:{description:"Returns a `number`. One indicates that the provided IP address is a valid LAN IP address. Otherwise, zero will be returned.",example:['print("Is Lan IP: " + is_lan_ip("192.168.0.1"))']},is_valid_ip:{description:"Returns a `number`. If the provided IP address is valid, its value will be one. Otherwise, its value is zero.",example:['print("Is valid IP: " + is_valid_ip("1.1.1.1"))']},bitwise:{description:'Returns a `number` by performing bitwise operations. Supported operators are: `"~"`, `"&"`, `"|"`, `"^"`, `"<<"`, `">>"`, `">>>"`. In case you want to use the tilde operator you only need to provide the operator and the left argument. If any of the required arguments is `null` this method will return `null`. Warning: If either operand is >= `0x80000000`, it\'ll always returns 0.',example:["num = params[0].to_int",'isOdd = bitwise("&", num, 1) == 1',"if isOdd then",' print("Number is odd.")',"else",' print("Number is even.")',"end if"]},abs:{description:"Returns the absolute value of `number`.",example:["a = 1","b = 5","difference = abs(a - b)",'print("Difference between a and b is: " + difference)']},acos:{description:"Returns the inverse cosine (in radians) of a `number`.",example:["adjacent = 8","hypotenuse = 10","calcAngle = acos(adjacent / hypotenuse)",'print("Angle: " + calcAngle)']},asin:{description:"Returns the inverse sine (in radians) of a `number`.",example:["opposite = 6","hypotenuse = 10","calcAngle = acos(opposite / hypotenuse)",'print("Angle: " + calcAngle)']},atan:{description:"Returns the inverse tangent (in radians) of a `number`.",example:["opposite = 8","hypotenuse = 10","calcAngle = atan(opposite / hypotenuse)",'print("Angle: " + calcAngle)']},tan:{description:"Returns the tangent of a `number` in radians.",example:["degrees = 90","tanFromDegrees = tan(degress * pi / 180)",'print("Tan from degrees: " + tanFromDegrees)']},cos:{description:"Returns the cosine of a `number` in radians.",example:["radians = 1","radius = 10","circleX = cos(radians) * radius","print(circleX)"]},code:{description:"Returns the Unicode `number` of the first character of the string. In case an empty `string` is provided the script execution will crash.",example:['key = user_input("Press a key!", false, true)',"isA = key.code == 97","if isA then",' print("You pressed A.")',"else",' print("You did not press A.")',"end if"]},char:{description:"Returns the UTF-16 character `string` related to the provided unicode `number`. The provided `number` needs to be between 0 and 65535. Any `number` which is outside this range will cause the script to throw a runtime error. Beware when passing non-ASCII values to intrinsics as they will likely get re-encoded as UTF-8. For example, `md5(char(255))` will actually return the hash of the two-byte sequence `0xC3` `0xBF`.",example:['key = user_input("Press a key!", false, true)',"isA = key == char(97)","if isA then",' print("You pressed A.")',"else",' print("You did not press A.")',"end if"]},sin:{description:"Returns the sine of a `number` in radians.",example:["radians = 1","radius = 10","circleY = sin(radians) * radius","print(circleY)"]},floor:{description:"Returns `number` rounded down to the integer value of the provided `number`.",example:["price = 25.43467","floored = floor(price * 100) / 100",'print("Floored price: " + floored)']},range:{description:"Generates a `list` where each item is a `number`. By default, the list starts with zero and increments by one for each item. You can optionally define a start and end value, as well as customize the incremental value. However, if the incremental value is zero, or if the list exceeds `16777215L` items, or if start/end is `null`, the function will throw a runtime error.",example:['print("Countdown:")',"for num in range(10)"," print(num)","end for",'print("Done!")']},round:{description:"Returns `number` rounded to the integer value of the provided `number`.",example:["price = 25.43467","rounded = round(price * 100) / 100",'print("Price: " + rounded)']},rnd:{description:"Returns a random `number` between 0 and 1. Optionally a seed `number` can be provided.",example:["min = 10","max = 20","output = floor(rnd * (max - min + 1) + min)",'input = user_input("Guess a number between 10 and 20!").to_int',"if (input == output) then",' print("You guessed right!")',"else",' print("You failed! The number was " + output)',"end if"]},sign:{description:"Returns a one or minus one, indicating the sign of the number passed as argument. If the input is zero, it will be returned as-is.",example:["print(sign(40))","print(sign(-40))","print(sign(0))"]},sqrt:{description:"Returns the square root of a `number`.",example:["a = 3","b = 4","calcHypotenuse = sqrt((a * a) + (b * b))",'print("Hypotenuse: " + calcHypotenuse)']},str:{description:"Returns the `string` value of provided data. Can be used to turn a `number` into a `string` or to get the signature of a `function`.",example:["signature = str(@user_input)","argSegment = signature[9:signature.len - 1]",'args = argSegment.split(",")','print("Function has " + args.len + " arguments.")']},ceil:{description:"Returns `number` rounded up to the integer value of the provided `number`.",example:["price = 25.43467","upperPrice = ceil(price * 100) / 100",'print("Upper price: " + upperPrice)']},pi:{description:"Returns the `number` PI to the precision of six.",example:["radius = 10","circumference = 2 * pi * radius",'print("Circumference: " + circumference)']},launch:{description:"Launches the binary located at the provided path. Optionally, parameters can be passed. Returns a `number`. If the launch was successful, the value will be one; otherwise, it will be zero. In some cases, a `string` will be returned containing an error message. If you need to share variables between a launched script and the current process, consider using `get_custom_object`. Note that launching a script is not asynchronous, meaning that the current script will pause its execution until the launched script finishes. This method cannot be used to execute binaries with an EXE extension (GUI interface). If any provided values deviate from the method signature, a runtime exception will be thrown.",example:['shell = get_shell("root", "test")','launch(shell, "/bin/cat", "/etc/passwd")']},launch_path:{description:"Returns a `string` containing the path of the script that was initially executed, meaning that even when using `launch`, it will still return the path of the initially executed script.",example:["path = launch_path",'print("Script gets executed within: " + parent_path(path))']},slice:{description:"Returns a sliced version of the passed object. Valid data types for slicing are `string` and `list`. The returned object will contain all elements related to the provided start and end index. If no start or end index is provided this method will essentially return a shallow copy of the passed object. If an invalid data type is passed, `null` is returned.",example:['myString = "not your text"','print("my " + slice(myString, 9))']},md5:{description:"Returns the MD5 hash `string` of the provided `string`. Using this method within an SSH encryption process or passing anything other than a `string` will cause an error to be thrown, stopping any further script execution.",example:['passwordHash = md5("test")',`print("Hash for the password 'test' is " + passwordHash)`]},hash:{description:"Returns numeric hash for the provided data. Using this method within a SSH encryption process will cause an error to be thrown causing the script execution to stop.",example:['hashA = hash({ "a": 2, "b": 1 })','hashB = hash({ "b": 1, "a": 2 })',"if (hashA == hashB) then",' print("Objects are alike!")',"else",' print("Objects are different!")',"end if"]},time:{description:"Returns a `number` of seconds representing the elapsed time since the script started.",example:["start = time","for i in range(10000)"," var = i * 100","end for","endTime = time - start",'print("Script execution done within: " + endTime)']},bitAnd:{description:"Performs a bitwise AND for the provided values. Returns a `number`. Warning: If either operand is >= `0x80000000`, it'll always return 0.",example:['print("Result of bitwise AND: " + bitAnd(1, 2))']},bitOr:{description:"Performs a bitwise OR for the provided values. Returns a `number`. Warning: If either operand is >= `0x80000000`, it'll always return 0.",example:['print("Result of bitwise OR: " + bitOr(1, 2))']},bitXor:{description:"Performs a bitwise XOR for the provided values. Returns a `number`. Warning: If either operand is >= `0x80000000`, it'll always return 0.",example:['print("Result of bitwise XOR: " + bitXor(1, 2))']},log:{description:"Returns the natural logarithm of a `number`. By default, the base is 10. Optionally the base can be changed.",example:["a = 2","b = 8","baseLog = log(a) / log(b)",'print("Base log is: " + baseLog)']},yield:{description:"Waits for the next tick.",example:["while (true)"," yield",' print("tick")',"end while"]},get_custom_object:{description:"Returns `map` which is shared throughout script execution. Can be helpful if it desired to pass or receive values when using `launch`. Using this method in a SSH encryption process will cause an error to be thrown preventing further script execution.",example:["get_custom_object.shouldEndScript = false","while (get_custom_object.shouldEndScript)",' print("Waiting...")'," wait(2)","end while"]},insert:{description:"Inserts a value into either a `list` or a `string`. If the method is used on any other data type or the passed index is not a `number`, this method throws an error, preventing further script execution.",example:["list = [2, 3, 4]","insert(list, 2, 42)",'print("List with inserted item: " + list.join(", "))']},to_int:{description:"Returns a `number` which is parsed from the `string` as an integer. In case the `string` is not numeric it will return the original `string`. If the passed value is not a `string` this method will return `null`.",example:['myString = "1"',"print(to_int(myString) + 41)"]},join:{description:"Returns a concatenated `string` containing all stringified values inside the `list`. These values will be separated via the provided separator. Passing anything other than a `list` will result in the original value being returned. In case the passed `list` exceeds `16777215L` items or the delimiter exceeds 128 characters, this method will throw an error, interrupting further script execution.",example:["myList = [42, 1, 3]",`print(join(myList, " .-*'*-. "))`]},split:{description:"Returns a `list` where each item is a segment of the `string`, separated by the provided separator `string`. This method uses regular expressions for matching, so remember to escape special characters such as dots. If any of the provided arguments deviate from the method signature types, this method will return `null`. In case the pattern is empty, the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','segments = split(myString, " ")','if segments[0] != "42" then',' print("Invalid information spotted!")',"else",' print("Information seems valid!")',"end if"]},replace:{description:"This function replaces a value within an object and returns the mutated object. Currently, it only supports `map`s and `list`s. Previously, it also supported `string`s, but that functionality has been replaced by `replace_regex`. If you use anything other than the supported types, a runtime error will be thrown.",example:["list = [1,2,3,42]","newList = replace(list, 42, 4)","print(newList)"]},replace_regex:{description:"Returns a `string` with the replaced content by using regular expressions. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','newString = replace_regex(myString, "\\w+$", "right")',"print(newString)"]},is_match:{description:"Uses regular expression to check if a string matches a certain pattern. If it matches, it will return a `number` with the value one. If it does not match, the value of the `number` will be zero. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','hasWordAtTheEnd = is_match(myString, "\\w+$")',"print(hasWordAtTheEnd)"]},matches:{description:"Returns a `map` with all search results for the provided regular expression. Each key contains the index and the value contains the matching `string`. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','result = matches(myString, "w")',"print(result)"]},get_ctf:{description:"Returns `ctfEvent` object if there is one available. In case of failure this method will return a `string` with details."},show:{description:'Displays all the packages available in a repository. The repository must be listed in the `"/etc/apt/sources.txt"` file. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. If it cannot find a repository, it will return a string with an error message. On success, it will return a `string` containing all packages and their descriptions, with each entry separated by a newline.',example:['aptClient = include_lib("/lib/aptclient.so")','packages = show(aptClient, "177.202.15.132")',"packageList = split(packages, char(10) + char(10))","pop(packageList) // remove last empty item","for packageItem in packageList"," entry = split(packageItem, char(10))"," packageName = entry[0]"," packageDescription = entry[1]",' print "Title: <b>" + packageName + "</b>"',' print "Description: <i>" + packageDescription + "</i>"',' print "----------------------------"',"end for"]},search:{description:'The `search` method specifically looks for a package in any of the repositories listed in `"/etc/apt/sources.txt"`. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return a `string` containing all packages that partially match the provided search value. On failure, it will return a `string` with various error messages.',example:['aptClient = include_lib("/lib/aptclient.so")','packages = search(aptClient, ".so")',"packageList = split(packages, char(10) + char(10))","for packageItem in packageList"," entry = split(packageItem, char(10))"," if len(entry) != 2 then",' print "something wrong in: " + entry'," continue"," end if"," packageName = entry[0]"," packageDescription = entry[1]",' print "Title: <b>" + packageName + "</b>"',' print "Description: <i>" + packageDescription + "</i>"',' print "----------------------------"',"end for"]},update:{description:'Refreshes the list of available packages after adding a new repository in `"/etc/apt/sources.txt"`, or if the remote repository has updated its information in `"/server/conf/repod.conf"`. If either the `"/etc/apt/sources.txt"` file has an invalid format or an invalid `aptClient` object is passed, this method will return a `number` with the value zero. On a successful update, an empty `string` will be returned. In case of failure, a `string` with an error message will be returned.',example:['aptClient = include_lib("/lib/aptclient.so")',"result = update(aptClient)",'if result == "" then',' print "Update successful!"',"else",' print "Error while updating: " + result',"end if"]},add_repo:{description:'Adds a repository address to the `"/etc/apt/sources.txt"` file. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return an empty `string`. In case of failure, it will return a `string` with an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = add_repo(aptClient, "177.202.15.132")','if result == "" then',' print "Addition successful!"',"else",' print "Error while adding: " + result',"end if"]},del_repo:{description:'Removes a repository address from the `"/etc/apt/sources.txt"` file. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return an empty `string`. In case of failure, it will return a `string` with an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = del_repo(aptClient, "177.202.15.132")','if result == "" then',' print "Deletion successful!"',"else",' print "Error while deleting: " + result',"end if"]},install:{description:'Installs a program or library from a remote repository listed in `"/etc/apt/sources.txt"`. If no path is specified, the program installs in `"/lib"` if it is a library or in `"/bin"` otherwise. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return a `number` with the value one. In case of failure, it will return a `string` containing an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = install(aptClient, "rshell_interface")',"if result == 1 then",' print "Installed program successful!"',"else",' print "Error while installing: " + result',"end if"]},check_upgrade:{description:"Verifies if there is a newer version of the program or library in the repository. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return a `number`, which can be either zero or one. Zero indicates that there is no new version available, while one indicates that there is a new version. In case of failure, it will return a string containing an error message.",example:['aptClient = include_lib("/lib/aptclient.so")','result = check_upgrade(aptClient, "/bin/rshell_interface")',"if result == 0 then",' print "Program doesnt need an update!"',"else if result == 1 then",' print "Program does need an update!"',"else",' print "Error while checking version: " + result',"end if"]},coin_price:{description:"Returns a `number` representing the current unit value of the cryptocurrency. In case of an error, it will return a `string` with the error details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','price = coin_price(blockchain, "test8")','if typeof(price) == "string" then',' exit "Couldnt get coin price due to: " + price',"end if",'print "Your coin price is " + price']},show_history:{description:"Returns a `map` with the latest changes in the value of a specific cryptocurrency. The key of the `map` is an index represented by a `number`. The value is a `list`, where index 0 is the historical price of the coin and index 1 is the date when the price change occurred. If any of the provided parameters have a type that deviates from the defined signature, or if no coin exists with this name, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','history = show_history(blockchain, "test")','if typeof(history) == "string" then',' exit "Couldnt fetch history due to: " + history',"end if","for entry in values(history)"," price = entry[0]"," date = entry[1]",' print "The price on " + date + " was " + price',"end for"]},amount_mined:{description:"Returns a `number` representing the total amount of mined coins. In case of an error, it will return a string with details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','mined = amount_mined(blockchain, "test")','if typeof(mined) == "string" then',' exit "Couldnt get amount mined due to: " + mined',"end if",'print "Your mined amount is " + mined']},get_coin:{description:"Returns a `coin` object used to manage the currency. In case of an error, it will return a `string` with the details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','if typeof(coin) != "coin" then',' exit "Couldnt get coin object due to: " + coin',"end if",'print "Your coin address is " + get_address(coin)']},get_coin_name:{description:"Returns a `string` with the name of the coin owned by the player. In case of an error, it will return a `string` with the details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coinName = get_coin_name(blockchain, "test", "test")','if not matches(coinName, "^[A-Z]+$") then',' exit "Couldnt get coin name due to: " + coinName',"end if",`print "The name of the coin you're owning is " + coinName`]},login_wallet:{description:"Returns a `wallet` object on success. In case of an error, it will return a `string` indicating the reason. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','if typeof(wallet) == "string" then',' print "Login failed due to: " + wallet',"else",' print "Login was successful!"',"end if"]},create_wallet:{description:"Creates a `wallet` and returns a `wallet` object on success, which can be used to manage cryptocurrencies. In case of an error, it will return a `string` with the details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = create_wallet(blockchain, "test", "test")','if typeof(wallet) == "string" then',' print "Wallet creation failed due to: " + wallet',"else",' print "Wallet creation was successful!"',"end if"]},delete_coin:{description:"Removes a cryptocurrency from the world. It is required to provide the credentials used in the creation of the cryptocurrency. On success, it will return a `number` with the value one. On failure, it will return a `string` containing details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','result = delete_coin(blockchain, "test", "test", "test")','if typeof(result) == "string" then',' exit "Couldnt delete coin due to: " + result',"end if",'print "Coin got deleted"']},set_cycle_mining:{description:"Defines the interval (in-game hours) in which each user receives a coin reward when mining. The interval cannot be lower than 1 and not be higher than 2160. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return a `number` with the value one. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = set_cycle_mining(coin, 20)","if result == 1 then",' print "Successful updated mining interval"',"else",' print "Failed updating mining interval"',"end if"]},get_cycle_mining:{description:"Returns a `number` representing the defined interval in which each user receives a coin reward when mining. In case of failure, the method will return a `string` with details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_cycle_mining(coin)",'if typeof(result) == "string" then',' exit "Failed getting cyclic mining value due to: " + result',"end if",'print "cyclic mining value: " + result']},get_reward:{description:"Returns a `number` representing the amount of coins that will be received as a reward after each mining cycle. In case of failure, the method will return a `string` with details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_reward(coin)",'if typeof(result) == "string" then',' exit "Failed getting reward value due to: " + result',"end if",'print "reward value: " + result']},set_reward:{description:"Assigns the reward that miners will receive after each mining cycle. The reward value has to be above one. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, the method will return a `number` with the value one. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = set_reward(coin, -1)",'if typeof(result) == "string" then',' exit "Failed setting reward due to: " + result',"end if",'print "Successfully set reward!"']},transaction:{description:"Makes a transaction of the currency between the indicated subwallets. In case of an error, a `string` with the details is returned. In case of success, a `number` with a value of one will be returned. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','result = transaction(coin, "test", "test2", 20)','if typeof(result) == "string" then',' exit "Failed transaction due to: " + result',"end if",'print "Successfully transfered!"']},create_subwallet:{description:"Registers a new account in the `coin` that can be used to manage services such as stores. It is necessary to provide the PIN of the owner's `wallet` that wants to register. In case of success, the method will return a `number` with the value one. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. In case of an error, a `string` with the details is returned.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','wallet = login_wallet(blockchain, "test", "test")','result = create_subwallet(coin, "test", wallet.get_pin, "test", "test")','if typeof(result) == "string" then',' exit "Failed to create subwallet due to: " + result',"end if",'print "Successfully created subwallet!"']},get_subwallet:{description:"Returns a `subWallet` object on success. In case of error, it returns a `string` with the details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','result = get_subwallet(coin, "test")','if typeof(result) == "string" then',' exit "Failed to get subwallet due to: " + result',"end if",'print "Successfully received subwallet!"']},get_subwallets:{description:"Returns a `list` where each item is a `subWallet` object, including all the accounts registered in the cryptocurrency. In case of error, it returns a `string` with the details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_subwallets(coin)",'if typeof(result) == "string" then',' exit "Failed to get subwallets due to: " + result',"end if","for subwallet in result",' print get_user(subwallet) + " has " + get_balance_subwallet(subwallet) + " coins"',"end for"]},set_address:{description:"Configures a valid address that will be shown to users who do not have the currency, indicating where to register. In case of an error, a `string` with the details is returned. In case of success, a `number` with a value of one will be returned. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','result = set_address(coin, "12.12.12.12")','if typeof(result) == "string" then',' exit "Failed to set address due to: " + result',"end if",'print "Successfully set address!"']},get_address:{description:"Returns the configured address that will be shown to users who do not have the currency, indicating where they have to register. In case of an error, the method will return a `string` with details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_address(coin)","if not is_valid_ip(result) then",' exit "Failed to get address due to: " + result',"end if",'print "address: " + result']},get_mined_coins:{description:"Returns a `number` representing the amount of coins that have been mined so far. In case of an error, the method will return a `string` with details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_mined_coins(coin)",'if typeof(result) == "string" then',' exit "Failed to get mined coins due to: " + result',"end if",'print "mined coins: " + result']},reset_password_coin:{description:"Resets the password of the coin. It returns a `number` with the value one if resetting was successful; otherwise, it will return a `string`. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','result = reset_password(coin, "test")','if typeof(result) == "string" then',' exit "Failed to reset password due to: " + result',"end if",'print "Successfully reset password"']},get_ports:{description:"Returns a `list` of `port`s on the `computer` which are active. If an invalid `computer` object is passed, this method will return `null`.",example:["router = get_router","ports = get_ports(host_computer(get_shell))","for port in ports",' print("Info: " + router.port_info(port))',"end for"]},get_name:{description:'Returns the hostname of the machine. If an invalid `computer` object is passed, this method will return a `string` containing `"Unknown"`.',example:["computerName = get_name(host_computer(get_shell))",'print("The name of your machine is " + computerName)']},lan_ip:{description:"Returns a `string` with the local IP address of the `computer`. If an invalid `computer` object is passed, this method will return `null`.",example:["localIp = lan_ip(host_computer(get_shell))",'print("Public ip:" + localIp)']},public_ip_pc:{description:"Returns a `string` with the public IP address of the `computer`. If an invalid `computer` object is passed, this method will return `null`.",example:["publicIp = public_ip_pc(host_computer(get_shell))",'print("Public ip:" + publicIp)']},File:{description:"Returns a `file` located at the path provided in the arguments. The path can be either relative or absolute. Keep in mind that any `file` object can be a folder as well. If the provided path cannot be resolved, meaning that no file or folder exists, this method will return `null`. Providing any other type than `string` or the value being empty for the path will result in an error thrown interrupting the script execution. If an invalid `computer` object is passed, this method will return `null`.",example:['filePath = "/etc/passwd"',"file = File(host_computer(get_shell), filePath)","if file != null then"," print(file.get_content)","else",' print("File at given path " + filePath + " does not exist.")',"end if"]},create_folder:{description:"Creates a folder at the path provided in the arguments. There are certain limitations when it comes to creating a folder. The folder name has to be alphanumeric and below 128 characters. Creation will fail as well when there is already a folder in place or if there are lacking permissions. Additionally, there is a folder limit of about 250 in each folder and 3125 folders in the computer overall. In case the folder creation fails, the method will return a `string` with details. In case of success, it will return a `number` with the value one. Providing any type that deviates from the signature or using this method in an SSH encryption process will cause an error to be thrown, aborting further script execution. If an invalid `computer` object is passed, this method will return `null`.",example:['path = "/home/" + active_user + "/Desktop"',"computer = host_computer(get_shell)",'createResult = create_folder(computer, path, "myfolder")','if typeof(createResult) == "string" then',' print("There was an error when creating the folder: " + createResult)',"else",' print("Folder got created at given path " + path)',"end if"]},is_network_active:{description:"Returns a `number` with either the value one or zero. The value will be one if the `computer` has internet access. If there is no internet access, it will return zero instead. In case an invalid `computer` object is passed, this method will return `null`.",example:["computer = host_computer(get_shell)","if is_network_active(computer) then",` print("You're connected.")`,"else",` print("You're not connected.")`,"end if"]},touch:{description:"Creates an empty text `file` at the provided path. Certain limitations apply to file creation: the `file` name must be alphanumeric and below 128 characters. Creation will fail if a `file` already exists at the specified path or if there are insufficient permissions. Additionally, there is a file limit of about 250 per folder and 3125 files overall on the computer. If successful, it returns a `number` with the value one. On failure, it returns a `string` with details. Using this method in an SSH encryption process will cause an error to be thrown, preventing further script execution. If an invalid `computer` object is passed, this method will return `null`.",example:['path = "/home/" + active_user + "/Desktop"',"computer = host_computer(get_shell)",'createResult = touch(computer, path, "myFile.txt")','if typeof(createResult) == "string" then',' print("There was an error when creating the file: " + createResult)',"else",' print("File got created at given path " + path)',"end if"]},show_procs:{description:"Returns a `string` providing an overview of all active processes on the `computer`. This includes information about the username, PID, CPU usage, memory consumption, and command name. Using this method in an SSH encryption process will throw an error, preventing further script execution. If an invalid `computer` object is passed, this method will return `null`.",example:["computer = host_computer(get_shell)","procs = show_procs(computer)","list = procs.split(char(10))[1:]","processes = []","for item in list",' parsedItem = item.split(" ")'," process = {}"," process.user = parsedItem[0]"," process.pid = parsedItem[1]"," process.cpu = parsedItem[2]"," process.mem = parsedItem[3]"," process.command = parsedItem[4]"," processes.push(process)","end for","print(processes)"]},network_devices:{description:"Returns a `string` containing all network devices available on the `computer`, with each item providing information about the interface name, chipset, and whether monitoring support is enabled. If an invalid `computer` object is passed, this method will return `null`.",example:["computer = host_computer(get_shell)","devices = network_devices(computer)","deviceList = devices.split(char(10))","for item in deviceList"," print(item)","end for"]},change_password:{description:"Changes the password of an existing user on the `computer`. Root permissions are necessary for successful password changes. Passwords can only include alphanumeric characters and cannot exceed 15 characters. If the password change fails, this method will return a `string` containing information on why it failed. If the change succeeds, it will return a `number` with the value one. If the provided username is empty, an error will be thrown, preventing any further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','changeResult = change_password(computer, "test", "newPassword")','if typeof(changeResult) == "string" then',' print("There was an error when changing the password: " + changeResult)',"else",' print("Password got successfully changed.")',"end if"]},create_user:{description:"Creates a user on the `computer`, with the specified name and password. Root permissions are necessary for successful user creation. Neither username nor password can exceed more than 15 characters and both need to be alphanumeric. There cannot be more than 15 users created on the same `computer`. In case the creation fails, this method will return a `string` containing the reason for the failure. On success, it will return a `number` with the value one. If the provided username is empty or either of the values exceeds 15 characters, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','creationResult = create_user(computer, "newUser", "123")','if typeof(creationResult) == "string" then',' print("There was an error when creating an user: " + creationResult)',"else",' print("User got successfully created.")',"end if"]},delete_user:{description:"Deletes the indicated user from the `computer`. It can optionally also delete the home folder related to the user. By default, the home folder will not be deleted. Root permissions are necessary to successfully delete a user. Keep in mind that you cannot delete the root user. In case the deletion fails, this method will return a `string` containing the cause of failure. On success, this method will return a `number` with the value one. If the provided username is empty, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','deletionResult = delete_user(computer, "test", true)','if typeof(deletionResult) == "string" then',' print("There was an error when deleting an user: " + deletionResult)',"else",' print("User got successfully deleted.")',"end if"]},create_group:{description:"Creates a new group associated with an existing user on the `computer`. It is necessary to be root to be able to successfully create a group. There are a few limitations when creating a group such as a character limit of 15 and that the group name may only contain alphanumeric characters. In case the group creation fails, this method will return a `string` containing the cause of failure. On success, it will return a `number` with the value one. In case the provided arguments are empty or the username exceeds 15 characters, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','creationResult = create_group(computer, "test", "staff")','if typeof(creationResult) == "string" then',' print("There was an error when creating a group: " + creationResult)',"else",' print("Group got successfully created.")',"end if"]},delete_group:{description:"Deletes an existing group associated with an existing user on the `computer`. It is necessary to be root to be able to successfully delete a group. In case the group deletion fails, this method will return a `string` containing the cause of failure. On success, it will return `number` with the value one. If either of the provided values is empty, an error will be thrown preventing further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','deletionResult = delete_group(computer, "test", "staff")','if typeof(deletionResult) == "string" then',' print("There was an error when deleting a group: " + deletionResult)',"else",' print("Group got successfully deleted.")',"end if"]},groups:{description:"Returns a `string` containing groups associated with an existing user on the `computer`. In case the user does not exist, a `string` will be returned with an error message. If the provided username is empty, an error will be thrown preventing further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','create_group(computer, "root", "staff")','groups = groups(computer, "root")',"listOfGroups = groups.split(char(10))","print(listOfGroups)"]},close_program:{description:"Closes a program associated with the provided PID. You can see the list of active programs by either using `show_procs` or typing `ps` into your terminal. To close a program, you need to be either the owner of the running process or root. In case the closing of a program fails, this method will return a `string` containing details. On success, it will return a `number` with the value one. If there is no process with the provided PID, this method will return a `number` with the value zero. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))',"processes = split(show_procs(computer), char(10))[1:]",'pid = split(processes[1], " ")[1]',"closeResult = close_program(computer, to_int(pid))",'if typeof(closeResult) == "string" then',' print("There was an error when closing a program: " + closeResult)',"else",' print("Program with pid " + pid + " got successfully closed.")',"end if"]},wifi_networks:{description:"Returns a list of the Wi-Fi networks that are available for the provided interface. Each item in the `list` is a `string` containing information on the BSSID, PWR, and ESSID. If no matching netDevice can be found or an invalid `computer` object is passed, this method will return `null`. In case the active network card is not a Wi-Fi card, an error will be thrown, preventing any further script execution.",example:['computer = host_computer(get_shell("root", "test"))','networks = wifi_networks(computer, "wlan0")',"result = []","for network in networks",' parsedItem = network.split(" ")'," item = {}"," item.BSSID = parsedItem[0]"," item.PWR = parsedItem[1]"," item.ESSID = parsedItem[2]"," result.push(item)","end for","print(result)"]},connect_wifi:{description:"Connects to the indicated Wi-Fi network. It is not possible to connect to a new Wi-Fi while being logged in as a guest. If connecting to a new Wi-Fi fails, this method will return a `string` containing details. On success, it will return a `number` with the value one. Wi-Fi networks can be found via `wifi_networks` or by typing `iwlist` as a command in the terminal. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:["computer = host_computer(get_shell)","networks = wifi_networks(computer)",'firstNetwork = networks[0].split(" ")',"BSSID = firstNetwork[0]","ESSID = firstNetwork[2]",'connectionResult = connect_wifi(host_computer, "wlan0", BSSID, ESSID, "wifi-password")','if typeof(connectionResult) == "string" then',' print("There was an error while connecting to new Wifi: " + connectionResult)',"else",' print("Connected to new Wifi successfully.")',"end if"]},connect_ethernet:{description:"Sets up a new IP address on the `computer` through the ethernet connection. It is not possible to set up a new IP address while being logged in as a guest. On failure, this method will either return a `string` with details or `null`. On success, it will return an empty `string`. If any of the provided parameters have a type that deviates from the defined signature or the computer is not connected to the internet, an error will be thrown preventing any further script execution.",example:["computer = host_computer(get_shell)",'connectionResult = connect_ethernet(computer, "eth0", "192.168.0.4", local_ip(get_router))','if typeof(connectionResult) == "string" then',' print("There was an error while connecting: " + connectionResult)',"else",' print("Connected successfully.")',"end if"]},network_gateway:{description:'Returns a `string` with the gateway IP address configured on the `computer`. If an invalid `computer` object gets passed, this method returns a `string` with the value `"0.0.0.0"`.',example:["computer = host_computer(get_shell)","gatewayIp = network_gateway(computer)",'print("Gateway IP: " + gatewayIp)']},active_net_card:{description:'Returns a `string` which contains either the keyword `"WIFI"` or `"ETHERNET"` depending on which connection type your `computer` is connected by. In case an invalid `computer` object gets passed, this method will return `null`.',example:["computer = host_computer(get_shell)","netCard = active_net_card(computer)",'print("Connected by: " + netCard)']},aircrack:{description:"Returns a `string` containing the password based on the file which was generated via aireplay. In case of failure, it will return `null` instead. If the provided path is empty, an error will be thrown, interrupting the script execution.",example:['crypto = include_lib("/lib/crypto.so")','networks = wifi_networks(host_computer(get_shell), "wlan0")','firstNetwork = networks[1].split(" ")',"bssid = firstNetwork[0]","pwr = firstNetwork[1][:-1].to_int","essid = firstNetwork[2]","aireplayResult = aireplay(crypto, bssid, essid, 300000 / pwr)","if (aireplayResult == null) then",' result = aircrack(crypto, home_dir + "/file.cap")'," print(result)","end if"]},airmon:{description:'Enables or disables the monitor mode of a network device. The `options` parameter can only be `"start"` or `"stop"`. Monitor mode can only be enabled on Wifi cards. If it wasn\'t possible to enable or disable the monitor mode, this method will return either a `number` with the value zero or a `string` with details. In case of success, it will return a `number` with the value one.',example:['crypto = include_lib("/lib/crypto.so")','airmonResult = airmon(crypto, "start", "wlan0")','if typeof(airmonResult) == "string" then',' print("There was an error while switching monitoring mode: " + airmonResult)',"else",' print("Monitoring mode switched successfully.")',"end if"]},aireplay:{description:'Used to inject frames on wireless interfaces. Once the command with `"Control+C"` is stopped, it will save the captured information in a text file called `"file.cap"` in the path where the terminal is currently located. Alternatively, a maximum of captured `acks` can be specified for the command to stop automatically, saving the `"file.cap"` file as described above. To figure out how many ACKs are required, you can use the following formula: `"300000 / [Wifi PWR]"`. If there is an error, a `string` will be returned with the message indicating the problem. On success, it will return `null`. It is advised though to verify that the capture file actually exists. If the passed `crypto` object is invalid, it will return `null` as well. In case any of the provided values deviate from the signature types or bssid/essid is empty, an error will be thrown preventing any further script execution.',example:['crypto = include_lib("/lib/crypto.so")','networks = wifi_networks(host_computer(get_shell), "wlan0")',"for index in range(0, networks.len - 1)",' print(index + ".) " + networks[index])',"end for",'selectedIndex = user_input("Select Wifi: ").to_int','if (typeof(selectedIndex) == "string" or selectedIndex < 0 or selectedIndex > networks.len - 1) then',' exit("Wrong index!")',"end if",'parsed = networks[selectedIndex].split(" ")',"bssid = parsed[0]","pwr = parsed[1][:-1].to_int","essid = parsed[2]","potentialAcks = 300000 / pwr","aireplaycrypto, bssid, essid, potentialAcks)",'wifiPassword = aircrack(crypto, "/home/" + active_user + "/file.cap")','print("Wifi password for " + essid + " is " + wifiPassword)']},decipher:{description:"Returns a decrypted password via the provided password MD5 hash. Keep in mind that this method is not decrypting a password but rather checking for existing passwords within the game world with a matching MD5 hash. So in case a password does not exist in the game world, the decryption will fail. On failure, this method will return `null`. Using this method in an SSH encryption process will cause an error to be thrown, aborting further script execution.",example:['crypto = include_lib("/lib/crypto.so")','computer = host_computer(get_shell("root", "test"))','passwdContent = get_content(File(computer, "/etc/passwd"))',"firstAccount = passwdContent.split(char(10))[0]",'parsed = firstAccount.split(":")',"username = parsed[0]","passwordHash = parsed[1]","password = decipher(crypto, passwordHash)",'print("User: " + username)','print("Password: " + password)']},smtp_user_list:{description:"Returns a `list` of the existing users on the `computer` where the SMTP service is running. If these users also have an email account registered on the SMTP server, it will be indicated in the `list`. SMTP services are usually running on port `25`. In case of failure, this method will return a `string` containing the cause. If any of the provided values deviate from the signature types, this method will return `null`.",example:['crypto = include_lib("/lib/crypto.so")','print(smtp_user_list(crypto, "192.168.0.4", 25))']},get_description:{description:"Returns a `string` with the CTF event description. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},get_template:{description:"Returns a `string` with the CTF event template. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},player_success:{description:"Returns a `number` with the value one if the CTF event was completed successfully. Otherwise, this method will return a `number` with the value zero. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},get_creator_name:{description:"Returns a `string` with the name of the CTF event creator. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},get_mail_content:{description:"Returns a `string` with the mail content of the CTF event. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},chmod:{description:'Modifies the `file` permissions. Optionally, these permissions can also be applied recursively. The format for applying permissions is as follows: `"[references][operator][modes]"`. The references type is defined through three possible types: user `"u"`, group `"g"`, and other `"o"`. The operator is used to define if permissions get added `"+"` or removed `"-"`. There are three different modes that can be modified: read `"r"`, write `"w"`, and execute `"x"`. So, for example, `"o-wrx"` would remove all possible permissions for others. To add all permissions for others again, `"o+wrx"` would be used. In case the modification fails, this method will return a `string` containing information about the reason. Otherwise, an empty `string` is returned. In case any type other than `number` is used for the `isRecursive` parameter, an error will be thrown preventing further script execution. If an invalid `file` object is passed, this method will return `null`.',example:['hostComputer = host_computer(get_shell("root", "test"))','rootFolder = File(hostComputer, "/bin")',"oldPermissions = permissions(rootFolder)",'chmod(rootFolder, "o-wrx", true)',"newPermissions = permissions(rootFolder)",'print("Old permissions: " + oldPermissions)','print("New permissions: " + newPermissions)']},copy:{description:"Copies the `file` to the provided path. Files can only be copied if the user has read and write permissions or is root. The new filename has to be below 128 characters and alphanumeric. After success, this method will return a `number` with the value one. Otherwise, it will return a `string` containing information about the reason for failure. If any of the parameter types deviate from the method signature, this method is used within an SSH encryption process, the new name exceeds 128 characters, or the path is too long, an error will be thrown, causing an interruption of script execution. In case the current file gets deleted or an invalid `file` object is passed, this method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','copyResult = copy(passwdFile, "/etc/", "duplicate")','if typeof(copyResult) == "string" then',' print("There was an error while copying file: " + copyResult)',"else",' print("File got copied successfully.")',"end if"]},move:{description:"Moves the `file` to the provided path. Files can only be moved if the user has read and write permissions or is root. The new filename has to be below 128 characters and alphanumeric. After success, this method will return a `number` with the value one. Otherwise, this method will return a `string` with details. If any of the parameter types deviate from the method signature, this method is used within an SSH encryption process, the new name exceeds 128 characters, or the path is too long, an error will be thrown, causing an interruption of script execution. In case the current file gets deleted or an invalid `file` object is passed, this method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','moveResult = move(passwdFile, "/etc/", "/moved/")','if typeof(moveResult) == "string" then',' print("There was an error while moving file: " + moveResult)',"else",' print("File got moved successfully.")',"end if"]},symlink:{description:"Creates a symlink to the specified path. Symlinks can only be created if the user has write permissions or is root. The new filename must be alphanumeric and under 128 characters. Upon success, this method returns a `number` with the value one. On failure, it returns a `string` with details. If any parameters deviate from the method signature, if used within an SSH encryption process, if the new name exceeds 128 characters, or if the path is too long, an error will be thrown, interrupting script execution. In case the current file gets deleted or an invalid `file` object is passed, this method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','lsFile = File(computer, "/bin/ls")','symResult = symlink(lsFile, "/bin", "alternativeLS")','if typeof(symResult) == "string" then',' print("There was an error while creating symlink: " + symResult)',"else",' print("Symlink got created successfully.")',"end if"]},rename:{description:"Rename the file with the name provided. Files can only be renamed if the user has write permissions or is root. The new filename has to be below 128 characters and alphanumeric. On failure, this method will return a `string` with details. Otherwise, this method will return an empty string. If this method is used within an SSH encryption process, an error will be thrown, causing the script execution to be interrupted. In case the provided name is `null` or an invalid `file` object is passed, this method will return a `number` with the value zero.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','renameResult = rename(passwdFile, "renamed")','if typeof(renameResult) == "string" then',' print("There was an error while renaming file: " + renameResult)',"else",' print("File got renamed successfully.")',"end if"]},path:{description:"Returns a `string` containing the file path. If the file is a symlink, the optional `symlinkOrigPath` argument can be set to return the original path of the linked file instead. If the file has been deleted, this method will still return the path it had prior to deletion. If an invalid `file` object is passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'passwdFile = File(computer, "/etc/passwd")','print("File location: " + path(passwdFile))']},is_folder:{description:"Returns a `number`. The value is one if the file is a folder, zero otherwise. In case the file gets deleted or an invalid `file` object is passed, this method will return `null` instead.",example:["computer = host_computer(get_shell)",'etcFolder = File(computer, "/etc")','print("Is a folder: " + is_folder(etcFolder))']},parent:{description:"Returns the parent folder of the current file or folder. In case there is no parent folder `null` will be returned instead. In case the file gets deleted or an invalid `file` object gets passed, this method will return `null` as well.",example:["computer = host_computer(get_shell)",'etcFolder = File(computer, "/etc")','print("Parent path: " + path(parent(etcFolder)))']},name:{description:"Returns a `string` with the name of the file. In case the file gets deleted or an invalid `file` object gets passed, this method will return `null` instead.",example:["computer = host_computer(get_shell)",'passwdFile = File(computer, "/etc/passwd")','print("Filename: " + name(passwdFile))']},allow_import:{description:"Returns a `number`. If the file is binary and can be imported by other scripts, the value will be one; otherwise, the value will be zero. In case the file gets deleted, this method will cause a crash. If an invalid `file` object gets passed, this method will return `null` instead.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("File can be imported: " + allow_import(lsBinary))']},get_content:{description:"Returns a `string` representing the content of the file. To read a file, the user requires read access or being root. Note that you cannot read a binary file. In case of failure, `null` will be returned. If this method is used within an SSH encryption process, an error will be thrown, preventing any further script execution.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','print("File content: " + get_content(passwdFile))']},set_content:{description:"Saves text into a `file`. The content will not get appended to the `file`; therefore, existing content will be overridden. To set new content, the user requires write permissions or being root. Keep in mind that text files cannot exceed the character limit of 160,000. In case setting the content was successful, a `number` with the value one will be returned. Otherwise, a `string` with details will be returned. If this method is used within an SSH encryption process, an error will be thrown, preventing any further script execution. If the provided content is `null`, an invalid `file` object gets passed or permissions are lacking, this method will return a `number` with the value zero. In case the file gets deleted this method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','setResult = set_content(passwdFile, "moo")','if typeof(setResult) == "string" then',' print("There was an error while setting file content: " + setResult)',"else if setResult == 0 then",' print("Unable to set content of file!")',"else",' print("File content got changed successfully.")',"end if"]},is_binary:{description:"Returns a `number`. If the file is a binary, the value will be one; otherwise, it will be zero. In case the file gets deleted or an invalid `file` object gets passed, this method will return `null` instead.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("File is a binary: " + is_binary(lsBinary))']},is_symlink:{description:"Returns a `number`. If the file is a symlink, the value will be one; otherwise, it will be zero. In case the file gets deleted or an invalid `file` object gets passed, this method will return `null` instead.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("File is a symlink: " + is_symlink(lsBinary))']},has_permission:{description:'Returns a `number` indicating if the user who launched the script has the requested permissions. One will indicate that the user has the correct permissions. In case permissions are lacking, the value will be zero. There are three different permission types: read `"r"`, write `"w"`, and execute `"x"`. In case the file gets deleted or an invalid `file` object gets passed, this method will return `null` instead.',example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("Is able to execute ls: " + has_permission(lsBinary, "x"))']},delete:{description:"Delete the current file. To delete files, write permissions are required or being root. In case of failure, a `string` with details will be returned. Otherwise, an empty `string` gets returned. Please note that deleting a file will leave a log entry. In case an invalid `file` object gets passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")',"deletionResult = delete(lsBinary)",'if typeof(deletionResult) == "string" and len(deletionResult) > 0 then',' print("There was an error while deleting a file: " + deletionResult)',"else",' print("File got deleted successfully.")',"end if"]},get_folders:{description:"Returns a `list` of folders. In case the current entity is a file instead of a folder this method will return `null`, so it is advisable to first use the `is_folder` function before calling this method. In case the current folder gets deleted or an invalid `file` object gets passed, this method will return `null` as well.",example:["computer = host_computer(get_shell)",'binFolder = File(computer, "/home")',"folders = get_folders(binFolder)","for folder in folders"," print(folder.path)","end for"]},get_files:{description:"Returns a `list` of files. In case the current entity is a file instead of a folder this method will return `null`, so it is advisable to first use the `is_folder` function before calling this method. In case the current folder gets deleted or an invalid `file` object gets passed, this method will return `null` as well.",example:["computer = host_computer(get_shell)",'binFolder = File(computer, "/bin")',"files = get_files(binFolder)","for file in files"," print(file.path)","end for"]},permissions:{description:'Returns a `string` with the current file permissions. In case the current file gets deleted or an invalid `file` object gets passed, this method will return `null`. The format for this permissions `string` is as follows: `"[fileType][wrx](u)[wrx](g)[wrx](o)"`. The file type is either `"d"` in case it\'s a directory or `"-"`. The user type gets defined through three possible types: user `"u"`, group `"g"`, and other `"o"`. There are three different permission types: read `"r"`, write `"w"`, and execute `"x"`. An example of a `string` returned by this method would be `"-rwxr-xr-x"`. Taking the latter as an example, the following things become clear:\n* The provided file is not a directory.\n* The user has full access.\n* The group and others have almost all permissions besides writing.\n',example:["computer = host_computer(get_shell)",'binFolder = File(computer, "/bin")',"perms = permissions(binFolder)","fileType = perms[0]","permissionsForUser = perms[1:4]","permissionsForGroup = perms[4:7]","permissionsForOther = perms[7:10]",'print("File type: " + fileType)','print("User permissions: " + permissionsForUser)','print("Group permissions: " + permissionsForGroup)','print("Other permissions: " + permissionsForOther)']},owner:{description:"Returns a `string` with the name of the file owner. User permissions get applied to whoever is the owner of a file. In case the current file gets deleted or an invalid `file` object gets passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("Owner of ls is: " + owner(lsBinary))']},set_owner:{description:"Change the owner of this file. Optionally the owner can get applied recursively. The owner's name cannot exceed 15 characters. Additionally either write permissions or being root is required. In case of failure a `string` gets returned containing the cause. Otherwise an empty `string` gets returned. In case the current file gets deleted, an invalid `file` object gets passed or the passed owner value is not a `string`, this method will return `null`. If the passed owner value is empty, the owner value is longer than 15 characters, or the passed recursive value deviates from its original type, an error will be thrown, interrupting further script execution.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','ownerResult = set_owner(lsBinary, "root")','if typeof(ownerResult) == "string" then',' print("There was an error while changing owner: " + ownerResult)',"else",' print("File owner changed successfully.")',"end if"]},group:{description:"Returns a `string` with the name of the group to which this file belongs. Group permissions get applied to whoever is the owner of a file. In case the current file gets deleted or an invalid `file` object gets passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("File is related to following group: " + group(lsBinary))']},set_group:{description:"Change the group related to this file. Optionally the group can get applied recursively. The group name cannot exceed 15 characters. Additionally either write permissions or being root is required. In case of failure, a `string` with details. On success, an empty `string` gets returned. In case the current file gets deleted, an invalid `file` object gets passed or the passed group is not a `string`, this method will return `null`. If the passed group value is empty, the group value is longer than 15 characters, or the passed recursive value deviates from its original type, an error will be thrown, preventing further script execution.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','ownerResult = set_group(lsBinary, "root")','if typeof(ownerResult) == "string" then',' print("There was an error while changing group: " + ownerResult)',"else",' print("File group changed successfully.")',"end if"]},size:{description:"Returns a `string` with the size of the file in bytes. There is no correlation between file size and actual file content. Instead, the file size is depending on the name of the file. In case the current file gets deleted or an invalid `file` object gets passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")',"size = size(lsBinary)","if size.to_int > 1000 then",' print("File size is bigger than 1000 bytes.")',"else",' print("File size is below 1000 bytes.")',"end if"]},load:{description:"Returns a `metaLib` object for the provided path to the library binary. Keep in mind that this can only be used on library files. On failure, this method will return `null`. If the provided path is empty, this method will throw a runtime exception, preventing further script execution.",example:['metax = include_lib("/lib/metaxploit.so")','libFolder = File(host_computer(get_shell), "/lib")',"for file in get_files(libFolder)"," metaLib = load(metax, file.path)",' print("Library: " + lib_name(metaLib) + " - " + version(metaLib))',"end for"]},net_use:{description:"Returns a `netSession` object for the provided IP address and port. Note that if the port is set to zero, it will return a `netSession` related to the kernel router. The main purpose of this method is to gain a `netSession` and then use `dump_lib` to receive a `metaLib` object to exploit vulnerabilities. In case of failure, this method will return `null`. If this method is used within an SSH encryption process or with disabled internet, or if an invalid target IP is provided, this method will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))',"for port in ports",' netSession = net_use(metax, "1.1.1.1", port_number(port))'," metaLib = dump_lib(netSession)",' print("Library: " + lib_name(metaLib) + " - " + version(metaLib) + " on port " + port_number(port))',"end for"]},rshell_client:{description:"Launches a process on the victim's `computer`, silently attempting to continuously connect in the background to the specified address and port. For the reverse shell to run successfully, the `rshell` service must be installed, and the port forward must be configured correctly on the machine where the server is waiting for the victim's connection. If the launch was successful, a `number` with the value one will be returned. In case of failure, a `string` with details will be returned.",example:['metax = include_lib("/lib/metaxploit.so")','rshell_client(metax, "1.1.1.1", 1222, "bgprocess")']},rshell_server:{description:"This method returns a `list` of `shell` objects that have been reverse shell connected to this computer. To manage the connections received, the `rshell` service must be installed on the machine that receives the victims' connections. In case of failure a `string` will be returned with details. If the provided object is anything other than `metaxploit` this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")',"shells = rshell_server(metax)","firstShell = shells[0]",'chmod(File(host_computer(firstShell), "/"), "o-wrx", true)']},scan:{description:'Returns a `list` where each item is a `string` representing a memory area which has vulnerabilities related to the provided library. These memory areas can be used to make further scans via `scan_address`. In case of failure, this method returns `null` instead. An example of a memory area would be "0x7BFC1EAA". Using this method within a SSH encryption process will throw a runtime exception.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")',"scanResult = scan(metax, metaLib)","for area in scanResult",' print("Memory area containg vulnerability: " + area)',"end for"]},scan_address:{description:"Returns a `string` containing information about each vulnerability in the provided library and memory area. In case the scanning fails this method will return `null`. Using this method within a SSH encryption process will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")',"scanResult = scan(metax, metaLib)","scanAddress = scan_address(metax, metaLib, scanResult[0])",'segments = split(scanAddress, "Unsafe check: ")[1:]',"exploits = []","for segment in segments",' labelStart = indexOf(segment, "<b>")',' labelEnd = indexOf(segment, "</b>")'," push(exploits, segment[labelStart + 3: labelEnd])","end for",'print("Available vulnerabilities: " + join(exploits, ", "))']},sniffer:{description:"The terminal listens to the network packets of any connection that passes through the computer. When any connection information gets captured, it will print a `string` with the obtained data. In case saving of encryption source is enabled it will download the source code of the script responsible for encryption. In case the operation fails this method will return `null`. Using this method within a SSH encryption process will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")',"result = sniffer(metax)","print(result)"]},overflow:{description:"Exploits vulnerabilities. The returned value can be of various data types. Therefore, using `typeof` is advisable. `optArgs` are required when changing a password or obtaining a `computer` via a router. It should be the desired password or LAN IP, respectively. Change password and firewall disable exploits will return a `number`, where the value is either one or zero. One indicates success while zero indicates failure. Shell, computer, and file exploits either return an instance of their type or `null`. Providing values that deviate from the defined signature will cause a runtime exception to be thrown.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")',"scanResult = scan(metax, metaLib)","target = scanResult[0]","scanAddress = scan_address(metax, metaLib, target)",'segments = split(scanAddress, "Unsafe check: ")',"exploit = null"," for segment in segments",' hasRequirement = indexOf(segment, "*") != null'," if (not hasRequirement) then",' labelStart = indexOf(segment, "<b>")',' labelEnd = indexOf(segment, "</b>")'," exploit = segment[labelStart + 3: labelEnd]"," end if","end for","if (exploit) then",' print("Exploiting... " + target + ":" + exploit)'," print(overflow(metaLib, target, exploit))","else",' print("No exploit found with zero requirements")',"end if"]},version:{description:'Returns a `string` containing the version number of the library. An example of a version number would be `"1.0.0"`. In case an invalid `metaLib` object gets passed this method will return `null`.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")','print("Init.so version: " + version(metaLib))']},lib_name:{description:'Returns a `string` containing the name of the library. An example of a name would be `"init.so"`. In case an invalid `metaLib` object gets passed this method will return `null`.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")','print("Name for library is: " + lib_name(metaLib))']},dump_lib:{description:"Returns the `metaLib` associated with the remote service. For example if the `metaxpoit` method `net_use` was used on a ssh port it will return the `metaLib` related to the ssh service. In case the port was zero is will return a `metaLib` related to the kernel router. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))',"metaLib = dump_lib(netSession)",'print("Library: " + lib_name(metaLib) + " - " + version(metaLib) + " on port " + port_number(ports[0]))']},get_num_conn_gateway:{description:"Returns the number of devices using this router as a gateway. If you obtained your `netSession` from a computer, it will fetch and return the value from its gateway router. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("Gateway clients: " + get_num_conn_gateway(netSession))']},get_num_portforward:{description:"Returns the number of ports forwarded by this router. If you obtained your `netSession` from a computer, it will fetch and return the value from its gateway router. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("Port forwards: " + get_num_portforward(netSession))']},get_num_users:{description:"Returns the number of user accounts on the system. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("User accounts: " + get_num_users(netSession))']},is_any_active_user:{description:"Returns a `number`. If there is an active user on the system it will be one. Otherwise, it will be zero. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("User Active?: " + is_any_active_user(netSession))']},is_root_active_user:{description:"Returns a `number`. If there is an active root on the system it will be one. Otherwise, it will be zero. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("Root Active?: " + is_root_active_user(netSession))']},device_ports:{description:"Returns a `list` where each item is an open `port` related to the device of the provided LAN IP address. The device needs to be within the network of the `router`. In case of failure, this method will return `null` or a `string` with details. In case an empty ip is provided this method will throw a runtime exception.",example:["router = get_router","devices = devices_lan_ip(router)","for ip in devices"," ports = device_ports(router, ip)"," openPorts = []"," for port in ports"," if is_closed(port) then continue"," push(openPorts, port)"," end for",""," if (len(openPorts) == 0) then",' print(ip + " has no open ports")'," else",' print(ip + " contains following open ports:")'," for port in openPorts",' print("|-" + port.port_number)'," end for"," end if","end for"]},devices_lan_ip:{description:"Returns a `list` where each item is a `string` representing a LAN IP address. All devices are within the network of the router and can be reached by using the `ping` method. Some of the devices might be behind a firewall. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","devices = devices_lan_ip(router)","for ip in devices",' print(ip + " found!")',"end for"]},bssid_name:{description:"Returns a `string` with the BSSID value of the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","bssid = bssid_name(router)",'print("BSSID: " + bssid)']},essid_name:{description:"Returns a `string` with the ESSID value of the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","essid = essid_name(router)",'print("ESSID: " + essid)']},firewall_rules:{description:"Returns a `list` where each item is a `string` containing a firewall rule. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","rules = firewall_rules(router)",'print("Firewall rules: " + join(rules, ", "))']},kernel_version:{description:"Returns a `string` with the version of the `kernel_router.so` library. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","version = kernel_version(router)",'print("Kernel router version: " + version)']},local_ip:{description:"Returns a `string` with the local IP address of the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","localIp = local_ip(router)",'print("Local IP: " + localIp)']},public_ip:{description:"Returns a `string` with the public IP address of the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","publicIp = public_ip(router)",'print("Public IP: " + publicIp)']},used_ports:{description:"Returns a `list` where each item is a `port` used inside the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","ports = used_ports(router)","for port in ports",' print("Port " + port_number(port) + " is available!")',"end for"]},ping_port:{description:"Returns a `port` that is behind the port `number` provided. In case the `port` does not exist `null` gets returned.",example:["router = get_router","ports = used_ports(router)","for port in ports"," pingedPort = ping_port(router, port.port_number)"," if (pingedPort == null) then continue",' print("Pinged " + port_number(pingedPort))',"end for"]},port_info:{description:'Returns a `string` with information about the provided port, including details about the running service and its version. For example, the output could be `"http 1.0.0"`. If the operation fails, `null` will be returned.',example:["router = get_router","ports = used_ports(router)","for port in ports"," info = port_info(router, port)"," print(info)","end for"]},install_service:{description:"Installs the necessary files for the correct functioning of the service and starts it. If the installation is completed successfully, it returns a `number` with the value one. In case of an error, it returns a `string` with details. If the passed object is not a `service` this method will cause a crash.",example:['service = include_lib("/lib/libhttp.so")',"result = install_service(service)","if result == 1 then",' print "Successfully installed service"',"else",' print "Service installation failed: " + result',"end if"]},start_service:{description:"Starts the service and opens its associated `port` on the local machine. The service requires a port forwarded to the router to be accessible from the outside. If the service starts correctly, it returns a `number` with the value one. In case of an error, it returns a `string` with details. If the passed object is not a `service` this method will cause a crash.",example:['service = include_lib("/lib/libhttp.so")',"result = start_service(service)","if result == 1 then",' print "Successfully started service"',"else",' print "Starting service failed: " + result',"end if"]},stop_service:{description:"Stops the service and closes its associated `port` on the local machine. If the service is stopped successfully, it returns a `number` with the value one. If an error occurs during the process, it returns a `string` with details. In some cases, the returned `number` might be zero, indicating that the service removal failed. If the passed object is not a `service` this method will cause a crash.",example:['service = include_lib("/lib/libhttp.so")',"result = stop_service(service)","if result == 1 then",' print "Successfully stopped service"',"else",' print "Stopping service failed: " + result',"end if"]},host_computer:{description:"Returns a `computer` related to the `shell`. If an invalid `shell` object gets passed this method will return `null`.",example:["shell = get_shell","computer = host_computer(shell)",'print("Computer public IP is: " + public_ip(computer))']},start_terminal:{description:"Launches an active terminal. The terminal's color will change, displaying the IP of the connected shell. Script execution will be stopped upon starting a new terminal, unless this is called from another script that was executed via `shell.launch`. In that case, you will enter the shell after closing your root-level script within that terminal window. Using this method within an SSH encryption process will cause an error to be thrown, preventing further script execution.",example:["start_terminal(get_shell)"]},build:{description:"Compiles a plain code file provided in the arguments to a binary. On success, the new binary will be available under the provided build folder. The binary name will be the same as the source file just without the file extension. Optionally, an allowImport flag can be set which enables the use of `import_code` on the binary. All provided paths must be absolute. Returns an empty string on success. On failure, it will return a string containing details about the reason for failure. In case any provided values deviate from the defined signature a runtime exception will be thrown.",example:["shell = get_shell","computer = host_computer(shell)",'touch(computer, home_dir, "test.src")','set_content(File(computer, home_dir + "/test.src"), "print(""hello world"")")','buildResult = build(shell, home_dir + "/test.src", home_dir + "/Desktop")','if buildResult != "" then',' print("There was an error while compiling: " + buildResult)',"else",' print("File has been compiled.")',"end if"]},connect_service:{description:"Returns a `shell` if the connection attempt to the provided IP was successful. This method can only connect to ports running an SSH or FTP service. SSH services usually run on port 22 and FTP services usually on port 21. Keep in mind to pass the right service value depending on which service is going to be used. By default, it will use SSH as the service. Please note that connecting will leave a log entry. In case of failure, a string is returned containing details. If any provided arguments deviate from the method signature, if this method is run in an SSH encryption process, or if the computer is not connected to the internet, a runtime exception will be thrown.",example:["shell = get_shell",'connectionResult = connect_service(shell, "1.1.1.1", 22, "test", "test")','if typeof(connectionResult) != "shell" then',' print("There was an error while connecting: " + connectionResult)',"else",' print("Connected!")',"end if"]},ping:{description:"Returns a `number`. If the remote address could be reached the value will be one, zero otherwise. Firewalls do not block ping requests. Passing an invalid ip will cause the method to return a `string` with an error message. If any provided arguments deviate from the method signature a runtime exception will be thrown. If the passed object is a map-like object such as `computer` or `file` but not `shell` this method will return `null`.",example:["shell = get_shell",'isPingable = ping(shell, "1.1.1.1")',"if isPingable then",' print("Ping was successful!")',"else",' print("Ping failed!")',"end if"]},scp:{description:"Send a `file` to the `computer` related to the provided `shell`. You require permission to read the `file` on the `computer` from which you are uploading and write permissions in the folder of the `computer` you are trying to upload to. In case of failure, this method will return a `string` with the cause. Otherwise, a `number` with the value one gets returned. If any of the passed arguments deviates from the types of the method signature, `null` will be returned. In case the `string` for sourceFile or destinationFolder is empty, an error will be thrown, preventing further script execution.",example:["shell = get_shell",'remoteShell = connect_service(shell, "1.1.1.1", 22, "test", "test")','result = scp(remoteShell, "/bin/ls", "/etc/", shell)','if typeof(result) == "string" then',' print("There was an error while sending file: " + result)',"else",' print("File got sent successfully.")',"end if"]},get_balance_subwallet:{description:"Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned. In case an object gets passed which is not a `subWallet` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Balance: " + get_balance_subwallet(subWallet)']},set_info:{description:"Stores optional information in the Subwallet for any use. Upon success, a `number` with the value one will be returned. In case of failure, a `string` with details will be returned. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','subWallet = coin.get_subwallet("test")','result = subWallet.set_info("test")',"if result == 1 then",' print "Subwallet info got set!"',"end if"]},get_info:{description:"Returns a `string` with the information stored by the coin creator. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Subwallet info: " + subWallet.get_info']},delete_subwallet:{description:"Deletes the account registered in the cryptocurrency. Returns a `number` where one indicates successful deletion and zero indicates failure. In case of certain failures, this method may return a `string` with details. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"result = subWallet.delete","if result == 1 then",' print "Subwallet got deleted!"',"end if"]},get_user:{description:"Returns a `string` with the username associated with this subwallet. On failure, this method returns a `string` with an error message. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Subwallet user: " + subWallet.get_user']},last_transaction:{description:"Returns a `list` with the information of the last transaction. Index 0 is a `string` with the other subWallet. Index 1 is an integer with the amount. Index 2 is a `number` indicating the direction of the transaction (0 for Deposit, 1 for Withdrawal). Index 3 is a `string` indicating the date of the transaction. On failure, this method will either return a `number` with the value zero or a `string` with an error message. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"transactionItem = subWallet.last_transaction","destinationAccount = transactionItem[0]","amount = transactionItem[1]","direction = transactionItem[2]","completeDate = transactionItem[3]","if direction == 0 then",' print "Received " + amount + " from " + destinationAccount + " got completed at the " + completeDate',"else",' print "Send " + amount + " to " + destinationAccount + " got completed at the " + completeDate',"end if "]},mining:{description:"Starts the process of mining the cryptocurrency. The process leaves the terminal busy until a coin is mined. On success, this method will return a `number` with the value one. On failure, this method will return a `string` with details. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"while subWallet.mining == 1",' print "Mining...", true',' print "Balance " + subWallet.get_balance',"end while"]},check_password:{description:"Returns a `number` with the value one if the credentials are correct, otherwise, the value is zero. For some cases, this method will return a `string` with an error message. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','password = user_input("SubWallet password:", true)',"if subWallet.check_password(password) == 1 then",' print "Password is correct!"',"end if"]},wallet_username:{description:"Returns a `string` with the name of the `wallet` to which this subwallet belongs. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "SubWallet username: " + subWallet.wallet_username']},list_coins:{description:"Returns a `list` where each item is a `string` with the names of the coins available in the `wallet`. On failure this method returns a `string` with an error message. If the passed value is not a `wallet` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','print "My wallet is connected to: " + join(list_coins(wallet), ", ")']},get_balance:{description:"Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned. Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")',"for coinName in list_coins(wallet)",' print "You have " + get_balance(wallet, coinName) + " coins of the currency """ + coinName + """"',"end for"]},buy_coin:{description:"Publishes a purchase offer indicating the number of coins you wish to buy and the price ($) per unit you are willing to pay. The purchase will be finalized if there is any sale offer with a price less than or equal to the one proposed in the purchase. If there is no eligible offer to sell at that time, the offer to buy will remain publicly visible until a new offer to sell satisfies the requirements. If the publication has been successful, a `number` with the value one is returned. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a runtime exception preventing further script execution.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = buy_coin(wallet, "test", 100, 20, "test")',"if result == 1 then",' print "Sucessfully created purchase offer!"',"else",' print "Failed: " + result',"end if"]},sell_coin:{description:"Publishes a sale offer indicating the amount of coins you want to sell and the price ($) per unit you want to assign. The sale will be finalized if there is any purchase offer with a price greater than or equal to that proposed in the sale. If there is no existing offer to buy that matches the requirements at that time, the offer to sell will remain publicly visible until a new offer to buy satisfies the requirements. If the publication has been successful, a `number` with the value one is returned. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a runtime exception preventing further script execution.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = sell_coin(wallet, "test", 100, 20, "test")',"if result == 1 then",' print "Sucessfully created sell offer!"',"else",' print "Failed: " + result',"end if"]},get_pending_trade:{description:"Returns a `list` with the pending sale or purchase offer of this wallet for a certain currency. Index 0 of the `list` represents the type of offer with a `string` (Buy/Sell), index 1 represents the quantity to be sold or bought, and index 2 represents the price per unit. On failure, this method will return a `string` with details. Any deviation from the method signature will result in a `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = get_pending_trade(wallet, "test")','isBuying = result[0] == "Buy"',"quantity = result[1]","unitPrice = result[2]",'currentBalance = get_balance(wallet, "test")',"if isBuying then",' print "After buying was successful your balance will be " + (quantity * unitPrice + currentBalance)',"else",' print "After selling was successful your balance will be " + (currentBalance - quantity * unitPrice)',"end if"]},cancel_pending_trade:{description:"Cancel any pending offer of a certain coin. On success, an empty `string` will be returned. On failure, a `string` with an error message will be returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','if cancel_pending_trade(wallet, "test") == "" then',' print "Trade got canceled!"',"end if"]},get_global_offers:{description:"Returns a `map` with all the offers made by any player of a given currency. The key of the `map` represents the WalletID of the player who has made the offer, and the value of the `map` is a `list` where index 0 represents the type of offer with a `string` (Buy/Sell), index 1 represents the amount to sell or buy, and index 2 represents the price per unit. In case of failure, this method returns a `string` with details. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','for item in get_global_offers(wallet, "test")'," walletId = item.key"," trade = item.value",' isBuying = trade[0] == "Buy"'," quantity = trade[1]"," unitPrice = trade[2]",' print "-" * 10',' print "<b>" + walletId + "</b>"'," if isBuying then",' print "<color=green>Is buying</color>"'," else",' print "<color=yellow>Is selling</color>"'," end if",' print quantity + " coins with a unit price of " + unitPrice',"end for"]},list_global_coins:{description:"Returns a `list` where each item is a `string` containing the names of all the currencies that exist. In case of failure, this method returns a `string` with details. If the passed value is not a `wallet` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','print "All existing coins: " join(list_global_coins(wallet), ", ")']},show_nodes:{description:"Returns a `number` representing the count of devices mining a specific coin for the same `wallet`. In case of an error, a `string` with details is returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','print "Active miners: " show_nodes(wallet, "test")']},reset_password:{description:"Change the password of the wallet. Only the account owner can perform this action. If the process is completed successfully, a `number` with the value one will be returned. In case of an error, a `string` with details will be returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','if reset_password(wallet, "test") == 1 then',' print "You got a new password!"',"end if"]},get_pin:{description:"Returns a `string` with a PIN that refreshes every few minutes. This PIN is used to obtain an account in cryptocurrency services. If the passed value is not a `wallet` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")',"myShell = get_shell","myComputer = host_computer(myShell)",'wallet = login_wallet(blockchain, "test", "test")','touch(myComputer, "/root", "pin_launch.src")','myFile = File(myComputer, "/root/pin_launch.src")','set_content(myFile, "',' blockchain = include_lib(""/lib/blockchain.so"")'," myShell = get_shell"," myComputer = host_computer(myShell)",' wallet = login_wallet(blockchain, ""test"", ""test"")'," if params[0] == get_pin(wallet) then",' get_custom_object.secret = ""The answer is 42""'," else",' get_custom_object.secret = ""The answer is 10053""'," end if",'")','build(myShell, "/root/pin_launch.src", "/root")',"delete(myFile)",'launch(myShell, "/root/pin_launch", get_pin(wallet))','print "The secret: " + get_custom_object.secret']},delete_mail:{description:"Delete the email corresponding to the provided email ID. Returns a `number` with the value one if the email removal was successful. Otherwise, a `string` with an error message will be returned. If any of the provided values deviate from the method signature, it will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")',"mails = fetch(metaMail)","results = []","for mail in mails"," segments = split(mail, char(10))"," mailId = segments[2][8:]"," print(delete_mail(metaMail, mailId))","end for",'print("Deleted every mail!")']},fetch:{description:"Returns a `list` where each item is a `string` containing mail id, from, subject and a small preview of the content consisting of the first 125 characters. In case of failure a `string` with details will be returned. If an invalid `metaMail` object gets passed this method will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")',"mails = fetch(metaMail)","results = []","for mail in mails"," segments = split(mail, char(10))"," item = {}"," item.mailId = segments[2][8:]"," item.from = segments[3][6:]"," item.subject = segments[4][9:]"," item.preview = segments[5:]"," push(results, item)","end for","print(results)"]},read:{description:'Returns a `string` containing the content of a mail related to the provided mail id. The mail id argument can be obtained with `fetch`. In case the mail cannot be found this method will return "Mail not found". If any of the provided values deviate from the method signature, it will return `null`.',example:['metaMail = mail_login(user_mail_address, "test")',"mails = fetch(metaMail)","results = []","for mail in mails"," segments = split(mail, char(10))"," mailId = segments[2][8:]"," print(read(metaMail, mailId))","end for"]},send:{description:"Send a new mail to the provided email address. Keep in mind that the subject can not exceed 128 characters and the message size should not exceed 2500 characters. Returns a `number` with the value one if the mail has been sent correctly, otherwise returns a `string` with an error. If any of the provided values deviate from the method signature, it will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")','result = send(metaMail, user_mail_address, "test subject", "test message")','if typeof(result) == "string" then',' print("There was an error while sending mail: " + result)',"else",' print("Mail got send successfully.")',"end if"]},port_number:{description:"Returns the `number` which is used for the port. In case the passed object is not a `port` this method will return `null`.",example:["router = get_router","ports = used_ports(router)","for port in ports",' print("Port " + port_number(port) + " is in use!")',"end for"]},is_closed:{description:"Returns a `number`, where one indicates that the specified `port` is open and zero indicates that the port is closed. In case the passed object is not a `port` this method will return `null`.",example:["router = get_router","ports = used_ports(router)","for port in ports",' state = "open"',' if (is_closed(port)) then state = "closed"',' print("Port " + port_number(port) + " is " + state + "!")',"end for"]},get_lan_ip:{description:"Returns a `string` containing the local IP address of the computer to which the port is pointing. In case the passed object is not a `port` this method will return `null`.",example:["router = get_router","ports = used_ports(router)","for port in ports",' print("Port " + port_number(port) + " is pointed to " + get_lan_ip(port) + "!")',"end for"]},reset_ctf_password:{description:"Resets the password of your CTF account. Returns a `number` with the value one if resetting was successful; otherwise, it will return a `string` containing the reason for failure.",example:['reset_ctf_password("mysafepassword")']},reverse:{description:"Reverses the order of all values in the `list`. This operation will mutate the `list`.",example:["myList = [42, 1, 3]","reverse(myList)",'print("Reversed list: " + myList.split(", "))']},trim:{description:"Returns a new `string` stripped of any spacing at the beginning and ending. If any value gets passed that is not a `string` this method will return `null`.",example:['myString = " 42 "',"print(trim(myString))"]},lastIndexOf:{description:"Returns a `number` indicating the last matching index of the provided value inside the `string`. If the value does not exist inside the `string`, `-1` is returned. If any of the provided values deviates from the defined types in the method signature, this method will return `null`.",example:['myString = "42 as an answer is wrong"','index = lastIndexOf(myString, "wrong")',"if index != -1 then",' print("Invalid information spotted at: " + index)',"else",' print("Information seems valid.")',"end if"]},funcRef:{description:"Returns a `map` which enables to extend function references with custom methods.",example:["funcRef.signature = function"," return str(@self)","end function","print (@print).signature"]},list:{description:"Returns a `map` which enables to extend list types with custom methods.",example:["list.map = function(callback)"," newList = []"," for item in self"," newList.push(callback(item, __item_idx))"," end for"," return newList","end function","myMapFunction = function(item, index)",' print "Mapping value at index: " + index'," return item.myValue","end function",'print [{ "myValue": 24 }].map(@myMapFunction)']},number:{description:"Returns a `map` which enables to extend number types with custom methods.",example:["number.bitwise = function(operator, right)"," return bitwise(operator, self, right)","end function",'print (1234).bitwise(">>", 1)']},string:{description:"Returns a `map` which enables to extend string types with custom methods.",example:['string.color = function(colorValue = "red")',' return "<color=" + colorValue + ">" + self + "</color>"',"end function",'print "My text: ".color + "Hello world".color("yellow")']},map:{description:"Returns a `map` which enables to extend map types with custom methods.",example:["map.extend = function(value)"," for item in value"," self[item.key] = item.value"," end for"," return self","end function",'test = {"123":123}','test.extend({"bar": "foo"})','print "My extended value: " + test.bar']},scan_debuglib:{description:"Scans the library in debug mode to identify potential code errors that may lead to vulnerabilities. If issues are detected, the relevant code snippets are printed. In case of an error, a `string` containing the error message is returned. If an invalid `debugLibrary` object is passed, this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")','debugLib = debug_tools(metaLib, "test", "test")','print("Debug Library result: " + scan_debuglib(debugLib))']},apply_patch:{description:"Applies a patch containing corrected code to the specified text file at the provided path. Returns a `string` with the result of the operation. If any of the provided values deviates from the defined types in the method signature, this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")','debugLib = debug_tools(metaLib, "test", "test")','print("Path result: " + apply_patch(debugLib, "/etc/passwd"))']},unit_testing:{description:"Conducts automated tests on the specified lines of code. If potential vulnerabilities are detected due to errors in these lines, this method will print partial objects that could be obtained by exploiting the vulnerability, along with the affected memory zone and detailed vulnerability information. In case of failure, this function returns a `string` with an error message. If any of the provided values deviates from the defined types in the method signature, this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")','debugLib = debug_tools(metaLib, "test", "test")','print("Unit test results: " + unit_testing(debugLib, [1, 2, 3]))']},camera_link_system:{description:"Accesses the traffic camera system, opening a window with controls to switch between different cameras. If the window opens successfully, this method returns a `number` with the value one. In case of an error, it returns a `string` with details. If an invalid traffic net object gets passed this method will return `null`.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"linkSystemResult = camera_link_system(libTraffic)","if linkSystemResult == 1 then",' print("Initiated camera broadcast!")',"end if"]},locate_vehicle:{description:"Performs a search for the specified license plate to locate the vehicle. If the vehicle is visible on any camera, the viewer will switch to the camera currently displaying it and return a `number` with the value one. If the vehicle cannot be located or the license plate is incorrect, a `string` indicating the error is returned. If any of the provided values deviates from the defined types in the method signature, this method will return `null`.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"camera_link_system(libTraffic)",'vehicleSearchResult = locate_vehicle(libTraffic, "1L2M3N")',"if vehicleSearchResult == 1 then",' print("Found vehicle!")',"end if"]},next_camera:{description:"Switches the viewer to the next available traffic camera. In case of an error, a `string` containing the details is returned. If an invalid traffic net object gets passed this method will return `null`.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"camera_link_system(libTraffic)","switchResult = next_camera(libTraffic)","if switchResult == 1 then",' print("Switched to next camera!")',"end if"]},prev_camera:{description:"Switches the viewer to the previous available traffic camera. In case of an error, a `string` containing the details is returned. If an invalid traffic net object gets passed this method will return `null`.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"camera_link_system(libTraffic)","switchResult = prev_camera(libTraffic)","if switchResult == 1 then",' print("Switched to previous camera!")',"end if"]},traffic_light_config:{description:"This method is not yet implemented.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"camera_link_system(libTraffic)","print(traffic_light_config(libTraffic))"]},model:{description:"Returns a `string` with the appliance model ID. If the passed object is not a `smartAppliance` this method will return `null`.",example:['libSmartapp = include_lib("/lib/libsmartappliance.so")',"modelResult = model(libSmartapp)",'if modelResult.matches("^[A-Z]+$") then',' print("Model is: " + modelResult)',"else",` print("Model couldn't be determined due to: " + modelResult)`,"end if"]},override_settings:{description:"Overrides the power and temperature settings of the appliance. If successful, it returns a `number` with the value one; otherwise, it returns a `string` detailing the error. If any arguments deviate from the defined signature, this method will return `null`.",example:['libSmartapp = include_lib("/lib/libsmartappliance.so")',"overrideResult = override_settings(libSmartapp, 1000, 20)","if overrideResult == 1 then",' print("Override was successful!")',"else",' print("Override failed due to: " + overrideResult)',"end if"]},set_alarm:{description:"Activates or deactivates the sound alarm indicating any appliance malfunction. If the operation is successful, a `number` with the value one is returned; otherwise, a `string` containing error details is returned. If any arguments deviate from the defined signature, this method will return `null`.",example:['libSmartapp = include_lib("/lib/libsmartappliance.so")',"setAlarmResult = set_alarm(libSmartapp, false)","if setAlarmResult == 1 then",' print("Alarm was disabled successfully!")',"else",' print("Disabling alarm failed due to: " + setAlarmResult)',"end if"]},debug_tools:{description:"Returns a library in debug mode as a `debugLibrary` object. A valid Neurobox engineer's username and password are required to access this mode. If successful, the `debugLibrary` object is returned; in case of an error, a `string` with details is provided. Passing values that deviate from the defined signature will result in `null`.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")','debugLib = debug_tools(metaLib, "test", "test")','if typeof(debugLib) == "debugLibrary" then',' print("Received debug libary object!")',"end if"]},payload:{description:"Returns a `list` containing a single partial `computer` object if zero-day vulnerabilities are detected within the specified memory zone. If a file path is provided, a partial `file` object associated with this path will also be included in the `list`. Additionally, if this file is a library, its corresponding `metaLib` object is added to the returned `list`. In case of an error, a `string` with details is returned. Providing arguments that deviate from the defined signature will result in `null`.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")','result = payload(metaLib, "0x7A69F4C3")','if typeof(result) == "list" and len(result) > 0 then',' print("Successfully executed payload!")',"end if"]}}});var p1=S((g4,nF)=>{nF.exports={$meta:{description:"Create a `list` with square brackets. Then iterate over the `list` with for, or pull out individual items with a 0-based index in square brackets. A negative index counts from the end. Get a slice (subset) of a `list` with two indices, separated by a colon.",example:["x = [2, 4, 6, 8]","print(x[0]) // get first item from list","print(x[-1]) // get last item from list","print(x[1:3]) // slice items from index 1 to 3","x[2] = 5 // set item at index 2 to 5","print(x)","print(x + [42]) // concatenate two lists"]},remove:{description:"Removes an item from the `list` with the provided index. Due to the removal the `list` will get mutated. If the passed index is `null` this method will throw an error preventing further script execution.",example:["myList = [1, 42, 3]","myList.remove(1)",'print("This list does not contain the answer to everything: " + myList.split(", "))']},insert:{description:"Inserts a value into the `list` at the index provided. Due to the insertion the `list` will get mutated. Returns the mutated `list`. If the passed index is not a `number`, this method throws an error, preventing further script execution.",example:["myList = [1, 3]","myList.insert(1, 42)",'print("This list does contain the answer to everything: " + myList.split(", "))']},push:{description:"Appends a value to the end of the `list`. This operation will mutate the `list`. Additionally, this method will return the updated `list`. However, it throws an error if you attempt to push a value into itself or into a map-like object such as a `file`, halting further script execution.",example:["myList = [1, 3]","myList.push(42)",'print("This list does contain the answer to everything: " + myList.split(", "))']},pop:{description:"Returns and removes the last item in the `list`. This operation will mutate the `list`. If the `map` is empty, this method will return `null`.",example:["myList = [1, 3, 42]","answer = myList.pop",'print("Answer to everything: " + answer)']},pull:{description:"Returns and removes the first item in the `list`. This operation will mutate the `list`. If the `map` is empty, this method will return `null`.",example:["myList = [42, 1, 3]","answer = myList.pull",'print("Answer to everything: " + answer)']},shuffle:{description:"Shuffles all values in the `list`. This operation will mutate the `list`.",example:["myList = [42, 1, 3]","myList.shuffle",'print("New list order: " + myList.split(", "))']},reverse:{description:"Reverses the order of all values in the `list`. This operation will mutate the `list`.",example:["myList = [42, 1, 3]","myList.reverse",'print("Reversed list: " + myList.split(", "))']},sum:{description:"Returns sum of all values inside the `list`. Any non-numeric values will be considered a zero.",example:["myList = [42, 1, 3]","sum = myList.sum",'print("Sum of all items in list: " + sum)']},hasIndex:{description:"Returns a `number`. If the provided index is available in the `list`, the value will be one. Otherwise, the value will be zero.",example:["myList = [42, 1, 3]","containsIndex = myList.hasIndex(1)","if containsIndex then",' print("List contains index of 1.")',"else",' print("List does not contain index of 1.")',"end if"]},indexOf:{description:"Returns a `number` which indicates the first matching index of the provided value inside the `list`. Optionally a start index can be provided. In case the value does not exist inside the `list` a `null` gets returned.",example:["myList = [42, 1, 3]","index = myList.indexOf(42)","if index != null then",' print("The answer for everything is at the following index: " + index)',"else",' print("No answer for everything found.")',"end if"]},sort:{description:"Sorts the values of a `list` alphanumerically. This operation mutates the original `list`. Optionally, a key can be provided, which is used if the items are `map`s or `list`s. Finally, this method returns the updated `list`.",example:['myList = [{ "key": 42 }, { "key": 2 }, { "key": 1 }]','myList.sort("key")',"print(myList)"]},join:{description:"Returns a concatenated `string` containing all stringified values inside the `list`. These values will be separated via the provided separator. In case the `list` exceeds `16777215L` items or the delimiter exceeds 128 characters, this method will throw an error, interrupting further script execution.",example:["myList = [42, 1, 3]",`print(myList.join(" .-*'*-. "))`]},indexes:{description:"Returns a `list` containing all available indexes.",example:["myList = [42, 1, 3]","for i in myList.indexes"," print(myList[i])","end for"]},len:{description:"Returns a `number` representing the count of values inside the `list`.",example:["myList = [42, 1, 3]",'print("myList contains " + myList.len + " items")']},values:{description:"Returns a `list` containing all available values. Note that this will not create a copy of the original `list`. The returned instance will the same as original `list`, so any mutations made to the returned `list` will also affect the original one.",example:["myList = [42, 1, 3]","for v in myList.values"," print(v)","end for"]},replace:{description:"Returns updated `list` where each value matching with the provided replace argument gets replaced. This operation will mutate the `list`.",example:["myList = [1, 2, 2, 7]","myList.replace(2, 3)",'print(myList.join(""))']}}});var d1=S((y4,rF)=>{rF.exports={$meta:{description:"A `map` is a set of values associated with unique keys. Create a `map` with curly braces; get or set a single value with square brackets. Keys and values may be any type.",example:['x = { "test": 123 }',"x.foo = 42 // set property foo to 42","print(x.foo) // get value of property foo",'print(x + { "bar": 2 }) // concatenate two maps']},remove:{description:"Removes an item from the `map` with the provided key. Due to the removal, the `map` will get mutated. If the value is removed successfully, this method will return a `number` with the value one. If the removal fails, the value will be zero. Passing any map-like object, such as a file or computer, will cause an error to be thrown, stopping further script execution.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }','myMap.remove("answer")',"print(myMap)"]},push:{description:"Adds the value 1 to the provided key. This operation will mutate the `map`. The updated `map` will be returned. However, it throws an error if you attempt to push a value into itself or into a map-like object such as a `file`, halting further script execution. If the passed key is `null` an error will be thrown as well.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }','myMap.push("answer")',"print(myMap.answer)"]},pull:{description:"Returns and removes the first item in the `map`. This operation will mutate the `map`. Passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution. If the `map` is empty, this method will return `null`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"print(myMap.pull)"]},pop:{description:"Returns and removes the first item in the `map`. This operation will mutate the `map`. Passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution. If the `map` is empty, this method will return `null`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"print(myMap.pop)"]},shuffle:{description:"Shuffles all values in the `map`. This operation will mutate the `map`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"myMap.shuffle","print(myMap)"]},sum:{description:"Returns sum of all values inside the `map`. Any non-numeric values will be considered a zero.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"sum = myMap.sum",'print("Sum of all items in map: " + sum)']},hasIndex:{description:"Returns a `number`. If the provided key is available in the `map`, the value will be one. Otherwise, the value will be zero.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }','containsIndex = myList.hasIndex("answer")',"if containsIndex then",' print("Map contains the answer.")',"else",' print("Map does not contain the answer.")',"end if"]},indexOf:{description:"Returns a value which can be of any type since `map` keys can be of any type. In case the value does not exist inside the `map`, `null` is returned.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"key = myList.indexOf(42)","if key != null then",' print("Map contains the answer.")',"else",' print("Map does not contain the answer.")',"end if"]},indexes:{description:"Returns a `list` containing all available keys. Keys can be of any type.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"for key in myMap.indexes"," print(myMap[key])","end for"]},len:{description:"Returns a `number` representing the count of items inside the `map`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }','print("myMap contains " + myMap.len + " items")']},values:{description:"Returns a `list` containing all available values within `map`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"for value in myMap.values"," print(value)","end for"]},replace:{description:"Returns updated `map` where each value matching with the provided replace argument gets replaced. This operation will mutate the `map`. In case this method gets used on a map-like object such as `file` this method will throw a runtime error.",example:['myObject = { "answer": 45 }',"myObject.replace(45, 42)","print(myObject.answer)"]}}});var h1=S((b4,iF)=>{iF.exports={$meta:{description:'A `metaLib` object can be obtained by either using [load](#METAXPLOIT_LOAD) or [dump_lib](#NETSESSION_DUMP_LIB). The `classID` used for this object is `"MetaLib"`.'},overflow:{description:"Exploits vulnerabilities. The returned value can be of various data types. Therefore, using `typeof` is advisable. `optArgs` are required when changing a password or obtaining a `computer` via a router. It should be the desired password or LAN IP, respectively. Change password and firewall disable exploits will return a `number`, where the value is either one or zero. One indicates success while zero indicates failure. Shell, computer, and file exploits either return an instance of their type or `null`. Providing values that deviate from the defined signature will cause a runtime exception to be thrown.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")',"scanResult = metax.scan(metaLib)","target = scanResult[0]","scanAddress = metax.scan_address(metaLib, target)",'segments = scanAddress.split("Unsafe check: ")',"exploit = null"," for segment in segments",' hasRequirement = segment.indexOf("*") != null'," if (not hasRequirement) then",' labelStart = segment.indexOf("<b>")',' labelEnd = segment.indexOf("</b>")'," exploit = segment[labelStart + 3: labelEnd]"," end if","end for","if (exploit) then",' print("Exploiting... " + target + ":" + exploit)'," print(metaLib.overflow(target, exploit))","else",' print("No exploit found with zero requirements")',"end if"]},version:{description:'Returns a `string` containing the version number of the library. An example of a version number would be `"1.0.0"`.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")','print("Init.so version: " + metaLib.version)']},lib_name:{description:'Returns a `string` containing the name of the library. An example of a name would be `"init.so"`.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")','print("Name for library is: " + metaLib.lib_name)']},debug_tools:{description:"Returns a library in debug mode as a `debugLibrary` object. A valid Neurobox engineer's username and password are required to access this mode. If successful, the `debugLibrary` object is returned; in case of an error, a `string` with details is provided. Passing values that deviate from the defined signature will result in `null`.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")','debugLib = metaLib.debug_tools("test", "test")','if typeof(debugLib) == "debugLibrary" then',' print("Received debug libary object!")',"end if"]},payload:{description:"Returns a `list` containing a single partial `computer` object if zero-day vulnerabilities are detected within the specified memory zone. If a file path is provided, a partial `file` object associated with this path will also be included in the `list`. Additionally, if this file is a library, its corresponding `metaLib` object is added to the returned `list`. In case of an error, a `string` with details is returned. Providing arguments that deviate from the defined signature will result in `null`.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")','result = metaLib.payload("0x7A69F4C3")','if typeof(result) == "list" and result.len > 0 then',' print("Successfully executed payload!")',"end if"]}}});var f1=S((v4,sF)=>{sF.exports={$meta:{description:'A `MetaMail` object can be obtained by using [mail_login](#GENERAL_MAIL_LOGIN). The `classID` used for this object is `"MetaMail"`.'},delete:{description:"Delete the email corresponding to the provided email ID. Returns a `number` with the value one if the email removal was successful. Otherwise, a `string` with an error message will be returned. If the provided mailId is anything other than a `string` this method will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")',"mails = metaMail.fetch","results = []","for mail in mails"," segments = mail.split(char(10))"," mailId = segments[2][8:]"," print(metaMail.delete(mailId))","end for",'print("Deleted every mail!")']},fetch:{description:"Returns a `list` where each item is a `string` containing mail id, from, subject and a small preview of the content consisting of the first 125 characters. If there is any issue a `string` will be returned with details.",example:['metaMail = mail_login(user_mail_address, "test")',"mails = metaMail.fetch","results = []","for mail in mails"," segments = mail.split(char(10))"," item = {}"," item.mailId = segments[2][8:]"," item.from = segments[3][6:]"," item.subject = segments[4][9:]"," item.preview = segments[5:]"," results.push(item)","end for","print(results)"]},read:{description:'Returns a `string` containing the content of a mail related to the provided mail id. The mail id argument can be obtained with `fetch`. In case the mail cannot be found this method will return "Mail not found". If the provided mailId is not a `string`, this method will return `null`.',example:['metaMail = mail_login(user_mail_address, "test")',"mails = metaMail.fetch","results = []","for mail in mails"," segments = mail.split(char(10))"," mailId = segments[2][8:]"," print(metaMail.read(mailId))","end for"]},send:{description:"Send a new mail to the provided email address. Keep in mind that the subject can not exceed 128 characters and the message size should not exceed 2500 characters. Returns a `number` with the value one if the mail has been sent correctly, otherwise returns a `string` with an error. If any of the provided values deviate from the method signature, it will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")','result = metaMail.send(user_mail_address, "test subject", "test message")','if typeof(result) == "string" then',' print("There was an error while sending mail: " + result)',"else",' print("Mail got send successfully.")',"end if"]}}});var m1=S((_4,oF)=>{oF.exports={$meta:{description:'A `metaxploit` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"MetaxploitLib"`.'},load:{description:"Returns a `metaLib` object for the provided path to the library binary. Keep in mind that this can only be used on library files. On failure, this method will return `null`. If the provided path is empty, this method will throw a runtime exception, preventing further script execution.",example:['metax = include_lib("/lib/metaxploit.so")','libFolder = get_shell.host_computer.File("/lib")',"for file in libFolder.get_files"," metaLib = metax.load(file.path)",' print("Library: " + metaLib.lib_name + " - " + metaLib.version)',"end for"]},net_use:{description:"Returns a `netSession` object for the provided IP address and port. Note that if the port is set to zero, it will return a `netSession` related to the kernel router. The main purpose of this method is to gain a `netSession` and then use `dump_lib` to receive a `metaLib` object to exploit vulnerabilities. In case of failure, this method will return `null`. If this method is used within an SSH encryption process or with disabled internet, or if an invalid target IP is provided, this method will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports',"for port in ports",' netSession = metax.net_use("1.1.1.1", port.port_number)'," metaLib = netSession.dump_lib",' print("Library: " + metaLib.lib_name + " - " + metaLib.version + " on port " + port.port_number)',"end for"]},rshell_client:{description:"Launches a process on the victim's `computer`, silently attempting to continuously connect in the background to the specified address and port. For the reverse shell to run successfully, the `rshell` service must be installed, and the port forward must be configured correctly on the machine where the server is waiting for the victim's connection. If the launch was successful, a `number` with the value one will be returned. In case of failure, a `string` with details will be returned.",example:['metax = include_lib("/lib/metaxploit.so")','metax.rshell_client("1.1.1.1", 1222, "bgprocess")']},rshell_server:{description:"This method returns a `list` of `shell` objects that have been reverse shell connected to this computer. To manage the connections received, the `rshell` service must be installed on the machine that receives the victims' connections. In case of failure a `string` will be returned with details.",example:['metax = include_lib("/lib/metaxploit.so")',"shells = metax.rshell_server","firstShell = shells[0]",'firstShell.host_computer.File("/").chmod("o-wrx", true)']},scan:{description:'Returns a `list` where each item is a `string` representing a memory area which has vulnerabilities related to the provided library. These memory areas can be used to make further scans via `scan_address`. In case of failure, this method returns `null` instead. An example of a memory area would be "0x7BFC1EAA". Using this method within a SSH encryption process will throw a runtime exception.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")',"scanResult = metax.scan(metaLib)","for area in scanResult",' print("Memory area containg vulnerability: " + area)',"end for"]},scan_address:{description:"Returns a `string` containing information about each vulnerability in the provided library and memory area. In case the scanning fails this method will return `null`. Using this method within a SSH encryption process will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")',"scanResult = metax.scan(metaLib)","scanAddress = metax.scan_address(metaLib, scanResult[0])",'segments = scanAddress.split("Unsafe check: ")[1:]',"exploits = []","for segment in segments",' labelStart = segment.indexOf("<b>")',' labelEnd = segment.indexOf("</b>")'," exploits.push(segment[labelStart + 3: labelEnd])","end for",'print("Available vulnerabilities: " + exploits.join(", "))']},sniffer:{description:"The terminal listens to the network packets of any connection that passes through the computer. When any connection information gets captured, it will print a `string` with the obtained data. In case saving of encryption source is enabled it will download the source code of the script responsible for encryption. In case the operation fails this method will return `null`. Using this method within a SSH encryption process will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")',"result = metax.sniffer","print(result)"]}}});var g1=S((w4,aF)=>{aF.exports={$meta:{description:'A `netSession` object can be obtained by using [net_use](#METAXPLOIT_NET_USE). The `classID` used for this object is `"NetSession"`.'},dump_lib:{description:"Returns the `metaLib` associated with the remote service. For example if the `metaxpoit` method `net_use` was used on a ssh port it will return the `metaLib` related to the ssh service. In case the port was zero is will return a `metaLib` related to the kernel router.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)',"metaLib = netSession.dump_lib",'print("Library: " + metaLib.lib_name + " - " + metaLib.version + " on port " + ports[0].port_number)']},get_num_conn_gateway:{description:"Returns the number of devices using this router as a gateway. If you obtained your `netSession` from a computer, it will fetch and return the value from its gateway router.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("Gateway clients: " + netSession.get_num_conn_gateway)']},get_num_portforward:{description:"Returns the number of ports forwarded by this router. If you obtained your `netSession` from a computer, it will fetch and return the value from its gateway router.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("Port forwards: " + netSession.get_num_portforward)']},get_num_users:{description:"Returns the number of user accounts on the system.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("User accounts: " + netSession.get_num_users)']},is_any_active_user:{description:"Returns a `number`. If there is an active user on the system it will be one. Otherwise, it will be zero.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("User Active?: " + netSession.is_any_active_user)']},is_root_active_user:{description:"Returns a `number`. If there is an active root on the system it will be one. Otherwise, it will be zero.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("Root Active?: " + netSession.is_root_active_user)']}}});var y1=S((x4,lF)=>{lF.exports={$meta:{description:"All numbers are stored in full-precision format. Numbers also represent `true == 1` and `false == 0`.",example:["a = 20","b = 22","print(a + b) // addition","print(a - b) // substraction","print(a / b) // division","print(a * b) // multiply","print(a % b) // modulo","print(a - b) // substraction","print(a ^ b) // power","print(a and b) // logical and","print(a or b) // logical or","print(not a) // logical not","print(a == b) // comparison equal","print(a != b) // comparison unequal","print(a > b) // comparison greater than","print(a < b) // comparison lower than","print(a >= b) // comparison greater equal than","print(a <= b) // comparison lower equal than"]}}});var b1=S((k4,uF)=>{uF.exports={$meta:{description:'A `port` object can be obtained by using [get_ports](#COMPUTER_GET_PORTS), [ping_port](#ROUTER_PING_PORT), [used_ports](#ROUTER_USED_PORTS) or [device_ports](#ROUTER_DEVICE_PORTS). The `classID` used for this object is `"port"`. Generally there are no restrictions in regards to which service runs on which port but there are some default ports for each service. List of the most common ports: `21` (FTP), `22` (SSH), `25` (SMTP), `80` (HTTP), `141` (SQL), `8080` (HTTP), `1222` (RSHELL), `1542` (Repository), `3306` (SQL), `3307` (SQL), `3308` (SQL), `6667` (Chat), `37777` (CCTV)'},port_number:{description:"Returns the `number` which is used for the port.",example:["router = get_router","ports = router.used_ports","for port in ports",' print("Port " + port.port_number + " is in use!")',"end for"]},is_closed:{description:"Returns a `number`, where one indicates that the specified `port` is open and zero indicates that the port is closed.",example:["router = get_router","ports = router.used_ports","for port in ports",' state = "open"',' if (port.is_closed) then state = "closed"',' print("Port " + port.port_number + " is " + state + "!")',"end for"]},get_lan_ip:{description:"Returns a `string` containing the local IP address of the computer to which the port is pointing.",example:["router = get_router","ports = router.used_ports","for port in ports",' print("Port " + port.port_number + " is pointed to " + port.get_lan_ip + "!")',"end for"]}}});var v1=S((T4,cF)=>{cF.exports={$meta:{description:'A `router` object can be obtained by either using [get_router](#GENERAL_GET_ROUTER) or [get_switch](#GENERAL_GET_SWITCH). The `classID` used for this object is `"router"`.'},device_ports:{description:"Returns a `list` where each item is an open `port` related to the device of the provided LAN IP address. The device needs to be within the network of the `router`. In case of failure, this method will return `null` or a `string` with details. In case an empty ip is provided this method will throw a runtime exception.",example:["router = get_router","devices = router.devices_lan_ip","for ip in devices"," ports = router.device_ports(ip)"," openPorts = []"," for port in ports"," if port.is_closed then continue"," openPorts.push(port)"," end for",""," if (openPorts.len == 0) then",' print(ip + " has no open ports")'," else",' print(ip + " contains following open ports:")'," for port in openPorts",' print("|-" + port.port_number)'," end for"," end if","end for"]},devices_lan_ip:{description:"Returns a `list` where each item is a `string` representing a LAN IP address. All devices are within the network of the router and can be reached by using the `ping` method. Some of the devices might be behind a firewall.",example:["router = get_router","devices = router.devices_lan_ip","for ip in devices",' print(ip + " found!")',"end for"]},bssid_name:{description:"Returns a `string` with the BSSID value of the router.",example:["router = get_router","bssid = router.bssid_name",'print("BSSID: " + bssid)']},essid_name:{description:"Returns a `string` with the ESSID value of the router.",example:["router = get_router","essid = router.essid_name",'print("ESSID: " + essid)']},firewall_rules:{description:"Returns a `list` where each item is a `string` containing a firewall rule.",example:["router = get_router","rules = router.firewall_rules",'print("Firewall rules: " + rules.join(", "))']},kernel_version:{description:"Returns a `string` with the version of the `kernel_router.so` library.",example:["router = get_router","version = router.kernel_version",'print("Kernel router version: " + version)']},local_ip:{description:"Returns a `string` with the local IP address of the router.",example:["router = get_router","localIp = router.local_ip",'print("Local IP: " + localIp)']},public_ip:{description:"Returns a `string` with the public IP address of the router.",example:["router = get_router","publicIp = router.public_ip",'print("Public IP: " + publicIp)']},used_ports:{description:"Returns a `list` where each item is a `port` used inside the router.",example:["router = get_router","ports = router.used_ports","for port in ports",' print("Port " + port.port_number + " is available!")',"end for"]},ping_port:{description:"Returns a `port` that is behind the port `number` provided. In case the `port` does not exist `null` gets returned.",example:["router = get_router","ports = router.used_ports","for port in ports"," pingedPort = router.ping_port(port.port_number)"," if (pingedPort == null) then continue",' print("Pinged " + pingedPort.port_number)',"end for"]},port_info:{description:'Returns a `string` with information about the provided port, including details about the running service and its version. For example, the output could be `"http 1.0.0"`. If the operation fails, `null` will be returned.',example:["router = get_router","ports = router.used_ports","for port in ports"," info = router.port_info(port)"," print(info)","end for"]}}});var _1=S((S4,pF)=>{pF.exports={$meta:{description:'The service object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"service"`. List of all installable services: `"FTP"`, `"SSH"`, `"HTTP"`, `"Repository"`, `"Chat"`'},install_service:{description:"Installs the necessary files for the correct functioning of the service and starts it. If the installation is completed successfully, it returns a `number` with the value one. In case of an error, it returns a `string` with details.",example:['service = include_lib("/lib/libhttp.so")',"result = service.install_service","if result == 1 then",' print "Successfully installed service"',"else",' print "Service installation failed: " + result',"end if"]},start_service:{description:"Starts the service and opens its associated `port` on the local machine. The service requires a port forwarded to the router to be accessible from the outside. If the service starts correctly, it returns a `number` with the value one. In case of an error, it returns a `string` with details.",example:['service = include_lib("/lib/libhttp.so")',"result = service.start_service","if result == 1 then",' print "Successfully started service"',"else",' print "Starting service failed: " + result',"end if"]},stop_service:{description:"Stops the service and closes its associated `port` on the local machine. If the service is stopped successfully, it returns a `number` with the value one. If an error occurs during the process, it returns a `string` with details. In some cases, the returned `number` might be zero, indicating that the service removal failed.",example:['service = include_lib("/lib/libhttp.so")',"result = service.stop_service","if result == 1 then",' print "Successfully stopped service"',"else",' print "Stopping service failed: " + result',"end if"]}}});var w1=S((I4,dF)=>{dF.exports={$meta:{description:'A `shell` object can be acquired by either using [get_shell](#GENERAL_GET_SHELL), [connect_service](#SHELL_CONNECT_SERVICE) or [overflow](#META_LIB_OVERFLOW). The `classID` used for this object is `"shell"`. In case you want to use [connect_service](#SHELL_CONNECT_SERVICE) to connect to a SSH port it will be usually at port `22`.'},host_computer:{description:"Returns a `computer` related to the `shell`.",example:["shell = get_shell","computer = shell.host_computer",'print("Computer public IP is: " + computer.public_ip)']},start_terminal:{description:"Launches an active terminal. The terminal's color will change, displaying the IP of the connected shell. Script execution will be stopped upon starting a new terminal, unless this is called from another script that was executed via `shell.launch`. In that case, you will enter the shell after closing your root-level script within that terminal window. Using this method within an SSH encryption process will cause an error to be thrown, preventing further script execution.",example:["shell = get_shell","shell.start_terminal"]},build:{description:"Compiles a plain code file provided in the arguments to a binary. On success, the new binary will be available under the provided build folder. The binary name will be the same as the source file just without the file extension. Optionally, an allowImport flag can be set which enables the use of `import_code` on the binary. All provided paths must be absolute. Returns an empty string on success. On failure, it will return a string containing details about the reason for failure. In case any provided values deviate from the defined signature a runtime exception will be thrown.",example:["shell = get_shell","computer = shell.host_computer",'computer.touch(home_dir, "test.src")','computer.File(home_dir + "/test.src").set_content("print(""hello world"")")','buildResult = shell.build(home_dir + "/test.src", home_dir + "/Desktop")','if buildResult != "" then',' print("There was an error while compiling: " + buildResult)',"else",' print("File has been compiled.")',"end if"]},connect_service:{description:"Returns a `shell` if the connection attempt to the provided IP was successful. This method can only connect to ports running an SSH or FTP service. SSH services usually run on port 22 and FTP services usually on port 21. Keep in mind to pass the right service value depending on which service is going to be used. By default, it will use SSH as the service. Please note that connecting will leave a log entry. In case of failure, a string is returned containing details. If any provided arguments deviate from the method signature, if this method is run in an SSH encryption process, or if the computer is not connected to the internet, a runtime exception will be thrown.",example:["shell = get_shell",'connectionResult = shell.connect_service("1.1.1.1", 22, "test", "test")','if typeof(connectionResult) != "shell" then',' print("There was an error while connecting: " + connectionResult)',"else",' print("Connected!")',"end if"]},launch:{description:"Launches the binary located at the provided path. Optionally, parameters can be passed. Returns a `number`. If the launch was successful, the value will be one; otherwise, it will be zero. In some cases, a `string` will be returned containing an error message. If you need to share variables between a launched script and the current process, consider using `get_custom_object`. Note that launching a script is not asynchronous, meaning that the current script will pause its execution until the launched script finishes. This method cannot be used to execute binaries with an EXE extension (GUI interface). If any provided values deviate from the method signature, a runtime exception will be thrown.",example:['shell = get_shell("root", "test")','shell.launch("/bin/cat", "/etc/passwd")']},ping:{description:"Returns a `number`. If the remote address could be reached the value will be one, zero otherwise. Firewalls do not block ping requests. Passing an invalid ip will cause the method to return a `string` with an error message. If any provided arguments deviate from the method signature a runtime exception will be thrown.",example:["shell = get_shell",'isPingable = shell.ping("1.1.1.1")',"if isPingable then",' print("Ping was successful!")',"else",' print("Ping failed!")',"end if"]},scp:{description:"Send a `file` to the `computer` related to the provided `shell`. You require permission to read the `file` on the `computer` from which you are uploading and write permissions in the folder of the `computer` you are trying to upload to. In case of failure, this method will return a `string` with the cause. Otherwise, a `number` with the value one gets returned. If any of the passed arguments deviates from the types of the method signature, `null` will be returned. In case the `string` for sourceFile or destinationFolder is empty, an error will be thrown, preventing further script execution",example:["shell = get_shell",'remoteShell = shell.connect_service("1.1.1.1", 22, "test", "test")','result = remoteShell.scp("/bin/ls", "/etc/", shell)','if typeof(result) == "string" then',' print("There was an error while sending file: " + result)',"else",' print("File got sent successfully.")',"end if"]}}});var x1=S((E4,hF)=>{hF.exports={$meta:{description:"Text is stored in strings of Unicode characters. Write strings by surrounding them with quotes. If you need to include a quotation mark in the string, write it twice.",example:['a = "hello"','b = "world"',"print(a + b) // concatinate a and b","print(a * 10) // repeat hello ten times","print(a[0]) // prints h","print(a[1:3]) // prints ell"]},remove:{description:"Returns a new `string` with the provided value removed. Any value other than `null` can be passed, but note that it will be cast to a string. If `null` is passed, this method will throw an error, preventing further script execution.",example:['myString = "42 as an answer is wrong"','newString = myString.remove("wrong")','print(newString + "right")']},hasIndex:{description:"Returns a `number`. If the provided index is available in the `string`, the value will be one. Otherwise, the value will be zero.",example:['myString = "42 as an answer is wrong"',"containsIndex = myString.hasIndex(1)","if containsIndex then",' print("String contains index of 1.")',"else",' print("String does not contain index of 1.")',"end if"]},insert:{description:"Returns a `string` with the newly inserted `string` at the provided index. If the passed index is not a `number`, this method throws an error, preventing further script execution.",example:['myString = "42 as an answer is wrong"','index = myString.lastIndexOf("w") - 1','newString = myString.insert(index, "not ")',"print(newString)"]},indexOf:{description:"Returns a `number` which indicates the first matching index of the provided value inside the `list`. Optionally a start index can be provided. In case the value does not exist inside the `string` a `null` gets returned.",example:['myString = "42 as an answer is wrong"','index = myString.indexOf("wrong")',"if index != null then",' print("Invalid information spotted at: " + index)',"else",' print("Information seems valid.")',"end if"]},lastIndexOf:{description:"Returns a `number` which indicates the last matching index of the provided value inside the `list`. In case the value does not exist inside the `string` a `-1` gets returned. If the provided searchStr is not a `string`, this method will return `null`.",example:['myString = "42 as an answer is wrong"','index = myString.lastIndexOf("wrong")',"if index != -1 then",' print("Invalid information spotted at: " + index)',"else",' print("Information seems valid.")',"end if"]},split:{description:"Returns a `list` where each item is a segment of the `string`, separated by the provided separator `string`. This method uses regular expressions for matching, so remember to escape special characters such as dots. If any of the provided arguments deviate from the method signature types, this method will return `null`. In case the pattern is empty, the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','segments = myString.split(" ")','if segments[0] != "42" then',' print("Invalid information spotted!")',"else",' print("Information seems valid!")',"end if"]},replace:{description:"Returns a `string` with the replaced content by using regular expressions. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','newString = myString.replace("wrong", "right")',"print(newString)"]},trim:{description:"Returns a new `string` stripped of any spacing at the beginning and ending.",example:['myString = " 42 "',"print(myString.trim)"]},indexes:{description:"Returns a `list` where each item is a `number` representing all available indexes in the `string`.",example:['myString = "42"',"print(myString.indexes)"]},code:{description:"Returns a `number` representing the Unicode code of the first character of the `string`.",example:['myString = "HELLO WORLD"',"print(myString.code)"]},len:{description:"Returns a `number` representing the length of the `string`.",example:['myString = "HELLO WORLD"','print("Size of string is: " + myString.len)']},lower:{description:"Returns a new `string` in which all characters are transformed into lowercase.",example:['myString = "HELLO WORLD"',"print(myString.lower)"]},upper:{description:"Returns a new `string` in which all characters are transformed into uppercase.",example:['myString = "hello world"',"print(myString.upper)"]},val:{description:"Returns a `number` which is parsed from the `string`. In case the `string` is not numeric it will return a zero.",example:['myString = "1.25"',"print(myString.val + 40.75)"]},values:{description:"Returns a `list` where each item is a `string` representing all available characters in the `string`. Could be compared to using `split` but without any separator.",example:['myString = "hello world"',"print(myString.values)"]},to_int:{description:"Returns a `number` which is parsed from the `string` as an integer. In case the `string` is not numeric it will return the original `string`.",example:['myString = "1"',"print(myString.to_int + 41)"]},is_match:{description:"Uses regular expression to check if a string matches a certain pattern. If it matches, it will return a `number` with the value one. If it does not match, the value of the `number` will be zero. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','hasWordAtTheEnd = myString.is_match("\\w+$")',"print(hasWordAtTheEnd)"]},matches:{description:"Returns a `map` with all search results for the provided regular expression. Each key contains the index and the value contains the matching `string`. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','result = myString.matches("w")',"print(result)"]}}});var k1=S((R4,fF)=>{fF.exports={$meta:{description:'A `subWallet` object can be obtained by either using [get_subwallet](#COIN_GET_SUBWALLET) or [get_subwallets](#COIN_GET_SUBWALLETS). The `classID` used for this object is `"subwallet"`.'},get_balance:{description:"Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','subWallet = coin.get_subwallet("test")','print "Balance: " + subWallet.get_balance']},set_info:{description:"Stores optional information in the Subwallet for any use. Upon success, a `number` with the value one will be returned. In case of failure, a `string` with details will be returned.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','result = set_info(subWallet, "test")',"if result == 1 then",' print "Subwallet info got set!"',"end if"]},get_info:{description:"Returns a `string` with the information stored by the coin creator.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Subwallet info: " + get_info(subWallet)']},delete:{description:"Deletes the account registered in the cryptocurrency. Returns a `number` where one indicates successful deletion and zero indicates failure. In case of certain failures, this method may return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"result = delete_subwallet(subWallet)","if result == 1 then",' print "Subwallet got deleted!"',"end if"]},get_user:{description:"Returns a `string` with the username associated with this subwallet. On failure, this method returns a `string` with an error message.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Subwallet user: " + get_user(subWallet)']},last_transaction:{description:"Returns a `list` with the information of the last transaction. Index 0 is a `string` with the other subWallet. Index 1 is an integer with the amount. Index 2 is a `number` indicating the direction of the transaction (0 for Deposit, 1 for Withdrawal). Index 3 is a `string` indicating the date of the transaction. On failure, this method will either return a `number` with the value zero or a `string` with an error message.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"transactionItem = last_transaction(subWallet)","destinationAccount = transactionItem[0]","amount = transactionItem[1]","direction = transactionItem[2]","completeDate = transactionItem[3]","if direction == 0 then",' print "Received " + amount + " from " + destinationAccount + " got completed at the " + completeDate',"else",' print "Send " + amount + " to " + destinationAccount + " got completed at the " + completeDate',"end if "]},mining:{description:"Starts the process of mining the cryptocurrency. The process leaves the terminal busy until a coin is mined. On success, this method will return a `number` with the value one. On failure, this method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"while mining(subWallet) == 1",' print "Mining...", true',' print "Balance " + get_balance_subwallet(subWallet)',"end while"]},check_password:{description:"Returns a `number` with the value one if the credentials are correct, otherwise, the value is zero. For some cases, this method will return a `string` with an error message.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','password = user_input("SubWallet password:", true)',"if check_password(subWallet, password) == 1 then",' print "Password is correct!"',"end if"]},wallet_username:{description:"Returns a `string` with the name of the `wallet` to which this subwallet belongs.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "SubWallet username: " + wallet_username(subWallet)']}}});var T1=S((P4,mF)=>{mF.exports={$meta:{description:'A `wallet` object can be obtained by either using [create_wallet](#BLOCKCHAIN_CREATE_WALLET) or [login_wallet](#BLOCKCHAIN_LOGIN_WALLET). The `classID` used for this object is `"wallet"`.'},list_coins:{description:"Returns a `list` where each item is a `string` with the names of the coins available in the `wallet`. On failure this method returns a `string` with an error message.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','print "My wallet is connected to: " + wallet.list_coins.join(", ")']},get_balance:{description:"Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned. If the passed coinName is anything other than a `string` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")',"for coinName in wallet.list_coins",' print "You have " + wallet.get_balance(coinName) + " coins of the currency """ + coinName + """"',"end for"]},buy_coin:{description:"Publishes a purchase offer indicating the number of coins you wish to buy and the price ($) per unit you are willing to pay. The purchase will be finalized if there is any sale offer with a price less than or equal to the one proposed in the purchase. If there is no eligible offer to sell at that time, the offer to buy will remain publicly visible until a new offer to sell satisfies the requirements. If the publication has been successful, a `number` with the value one is returned. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a runtime exception preventing further script execution.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = wallet.buy_coin("test", 100, 20, "test")',"if result == 1 then",' print "Sucessfully created purchase offer!"',"else",' print "Failed: " + result',"end if"]},sell_coin:{description:"Publishes a sale offer indicating the amount of coins you want to sell and the price ($) per unit you want to assign. The sale will be finalized if there is any purchase offer with a price greater than or equal to that proposed in the sale. If there is no existing offer to buy that matches the requirements at that time, the offer to sell will remain publicly visible until a new offer to buy satisfies the requirements. If the publication has been successful, a `number` with the value one is returned. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a runtime exception preventing further script execution.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = wallet.sell_coin("test", 100, 20, "test")',"if result == 1 then",' print "Sucessfully created sell offer!"',"else",' print "Failed: " + result',"end if"]},get_pending_trade:{description:"Returns a `list` with the pending sale or purchase offer of this wallet for a certain currency. Index 0 of the `list` represents the type of offer with a `string` (Buy/Sell), index 1 represents the quantity to be sold or bought, and index 2 represents the price per unit. On failure, this method will return a `string` with details. Any deviation from the method signature will result in a `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','result = wallet.get_pending_trade("test")','isBuying = result[0] == "Buy"',"quantity = result[1]","unitPrice = result[2]",'currentBalance = wallet.get_balance("test")',"if isBuying then",' print "After buying was successful your balance will be " + (quantity * unitPrice + currentBalance)',"else",' print "After selling was successful your balance will be " + (currentBalance - quantity * unitPrice)',"end if"]},cancel_pending_trade:{description:"Cancel any pending offer of a certain coin. On success, an empty `string` will be returned. On failure, a `string` with an error message will be returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','if wallet.cancel_pending_trade("test") == "" then',' print "Trade got canceled!"',"end if"]},get_global_offers:{description:"Returns a `map` with all the offers made by any player of a given currency. The key of the `map` represents the WalletID of the player who has made the offer, and the value of the `map` is a `list` where index 0 represents the type of offer with a `string` (Buy/Sell), index 1 represents the amount to sell or buy, and index 2 represents the price per unit. In case of failure, this method returns a `string` with details. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','for item in wallet.get_global_offers("test")'," walletId = item.key"," trade = item.value",' isBuying = trade[0] == "Buy"'," quantity = trade[1]"," unitPrice = trade[2]",' print "-" * 10',' print "<b>" + walletId + "</b>"'," if isBuying then",' print "<color=green>Is buying</color>"'," else",' print "<color=yellow>Is selling</color>"'," end if",' print quantity + " coins with a unit price of " + unitPrice',"end for"]},list_global_coins:{description:"Returns a `list` where each item is a `string` containing the names of all the currencies that exist. In case of failure, this method returns a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','print "All existing coins: " wallet.list_global_coins.join(", ")']},show_nodes:{description:"Returns a `number` representing the count of devices mining a specific coin for the same `wallet`. In case of an error, a `string` with details is returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','print "Active miners: " show_nodes(wallet, "test")']},reset_password:{description:"Change the password of the wallet. Only the account owner can perform this action. If the process is completed successfully, a `number` with the value one will be returned. In case of an error, a `string` with details will be returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','if wallet.reset_password("test") == 1 then',' print "You got a new password!"',"end if"]},get_pin:{description:"Returns a `string` with a PIN that refreshes every few minutes. This PIN is used to obtain an account in cryptocurrency services.",example:['blockchain = include_lib("/lib/blockchain.so")',"myShell = get_shell","myComputer = myShell.host_computer",'wallet = blockchain.login_wallet("test", "test")','myComputer.touch("/root", "pin_launch.src")','myFile = myComputer.File("/root/pin_launch.src")','myFile.set_content("',' blockchain = include_lib(""/lib/blockchain.so"")'," myShell = get_shell"," myComputer = myShell.host_computer",' wallet = blockchain.login_wallet(""test"", ""test"")'," if params[0] == wallet.get_pin then",' get_custom_object.secret = ""The answer is 42""'," else",' get_custom_object.secret = ""The answer is 10053""'," end if",'")','myShell.build("/root/pin_launch.src", "/root")',"myFile.delete",'myShell.launch("/root/pin_launch", wallet.get_pin)','print "The secret: " + get_custom_object.secret']}}});var S1=S((C4,gF)=>{gF.exports={$meta:{description:'A `debugLibrary` object can be acquired by using [debug_tools](#METALIB_DEBUG_TOOLS). The `classID` used for this object is `"debugLibrary"`.'},scan:{description:"Scans the library in debug mode to identify potential code errors that may lead to vulnerabilities. If issues are detected, the relevant code snippets are printed. In case of an error, a `string` containing the error message is returned.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")','debugLib = metaLib.debug_tools("test", "test")','print("Debug Library result: " + debugLib.scan)']},apply_patch:{description:"Applies a patch containing corrected code to the specified text file at the provided path. Returns a `string` with the result of the operation. If the path argument is not a `string` this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")','debugLib = metaLib.debug_tools("test", "test")','print("Path result: " + debugLib.apply_patch("/etc/passwd"))']},unit_testing:{description:"Conducts automated tests on the specified lines of code. If potential vulnerabilities are detected due to errors in these lines, this method will print partial objects that could be obtained by exploiting the vulnerability, along with the affected memory zone and detailed vulnerability information. In case of failure, this function returns a `string` with an error message. If the `error lines` argument is not a `list`, the method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")','debugLib = metaLib.debug_tools("test", "test")','print("Unit test results: " + debugLib.unit_testing([1, 2, 3]))']}}});var I1=S((O4,yF)=>{yF.exports={$meta:{description:'A `trafficNet` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"TrafficNet"`.'},camera_link_system:{description:"Accesses the traffic camera system, opening a window with controls to switch between different cameras. If the window opens successfully, this method returns a `number` with the value one. In case of an error, it returns a `string` with details.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"linkSystemResult = libTraffic.camera_link_system","if linkSystemResult == 1 then",' print("Initiated camera broadcast!")',"end if"]},locate_vehicle:{description:"Performs a search for the specified license plate to locate the vehicle. If the vehicle is visible on any camera, the viewer will switch to the camera currently displaying it and return a `number` with the value one. If the vehicle cannot be located or the license plate is incorrect, a `string` indicating the error is returned. If the provided license plate is not of `string` type, this method will return `null`.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"libTraffic.camera_link_system",'vehicleSearchResult = libTraffic.locate_vehicle("1L2M3N")',"if vehicleSearchResult == 1 then",' print("Found vehicle!")',"end if"]},next_camera:{description:"Switches the viewer to the next available traffic camera. In case of an error, a `string` containing the details is returned.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"libTraffic.camera_link_system","switchResult = libTraffic.next_camera","if switchResult == 1 then",' print("Switched to next camera!")',"end if"]},prev_camera:{description:"Switches the viewer to the previous available traffic camera. In case of an error, a `string` containing the details is returned.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"libTraffic.camera_link_system","switchResult = libTraffic.prev_camera","if switchResult == 1 then",' print("Switched to previous camera!")',"end if"]},traffic_light_config:{description:"This method is not yet implemented.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"libTraffic.camera_link_system","print(libTraffic.traffic_light_config)"]}}});var E1=S((A4,bF)=>{bF.exports={$meta:{description:'A `smartAppliance` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"SmartAppliance"`.'},model:{description:"Returns a `string` with the appliance model ID.",example:['libSmartapp = include_lib("/lib/libsmartappliance.so")',"modelResult = libSmartapp.model",'if modelResult.matches("^[A-Z]+$") then',' print("Model is: " + modelResult)',"else",` print("Model couldn't be determined due to: " + modelResult)`,"end if"]},override_settings:{description:"Overrides the power and temperature settings of the appliance. If successful, it returns a `number` with the value one; otherwise, it returns a `string` detailing the error. If any arguments deviate from the defined signature, this method will return `null`.",example:['libSmartapp = include_lib("/lib/libsmartappliance.so")',"overrideResult = libSmartapp.override_settings(1000, 20)","if overrideResult == 1 then",' print("Override was successful!")',"else",' print("Override failed due to: " + overrideResult)',"end if"]},set_alarm:{description:"Activates or deactivates the sound alarm indicating any appliance malfunction. If the operation is successful, a `number` with the value one is returned; otherwise, a `string` containing error details is returned. If the `enable` argument deviates from the defined signature, the method will return `null`.",example:['libSmartapp = include_lib("/lib/libsmartappliance.so")',"setAlarmResult = libSmartapp.set_alarm(false)","if setAlarmResult == 1 then",' print("Alarm was disabled successfully!")',"else",' print("Disabling alarm failed due to: " + setAlarmResult)',"end if"]}}});var R1=S(ba=>{"use strict";var Ee=ba&&ba.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ba,"__esModule",{value:!0});var vF=Ee(X0()),_F=Ee(e1()),wF=Ee(t1()),xF=Ee(n1()),kF=Ee(r1()),TF=Ee(i1()),SF=Ee(s1()),IF=Ee(o1()),EF=Ee(a1()),RF=Ee(l1()),PF=Ee(u1()),CF=Ee(c1()),OF=Ee(p1()),AF=Ee(d1()),DF=Ee(h1()),jF=Ee(f1()),LF=Ee(m1()),MF=Ee(g1()),qF=Ee(y1()),FF=Ee(b1()),NF=Ee(v1()),$F=Ee(_1()),UF=Ee(w1()),BF=Ee(x1()),WF=Ee(k1()),VF=Ee(T1()),HF=Ee(S1()),zF=Ee(I1()),GF=Ee(E1()),KF={any:vF.default,aptClient:_F.default,blockchain:wF.default,class:xF.default,ctfEvent:IF.default,coin:kF.default,computer:TF.default,crypto:SF.default,function:PF.default,file:EF.default,ftpShell:RF.default,general:CF.default,list:OF.default,map:AF.default,metaLib:DF.default,metaMail:jF.default,metaxploit:LF.default,netSession:MF.default,port:FF.default,router:NF.default,service:$F.default,shell:UF.default,string:BF.default,subWallet:WF.default,wallet:VF.default,number:qF.default,debugLibrary:HF.default,trafficNet:zF.default,smartAppliance:GF.default};ba.default=KF});var P1=S((j4,YF)=>{YF.exports={WELCOME_TITLE:"GreyScript API \u2013 Unofficial Documentation",WELCOME_TEXT:'<p>Grey Hack enables players to create their own programs inside the game via the integrated scripting language called GreyScript. GreyScript is a fork of <a href="https://miniscript.org/" target="_blank">MiniScript</a> and can be compared to another language such as JavaScript or Lua.</p><p>Programs can be created within Grey Hack via the in-game CodeEditor. Alternatively you can also use <a href="https://code.visualstudio.com/" target="_blank">Visual Studio Code</a> with <a href="https://marketplace.visualstudio.com/items?itemName=ayecue.greybel-vs" target="_blank">greybel-vs</a> which includes syntax highlighting and other helpful features. Another alternative is to use the <a href="https://editor.greyscript.org" target="_blank">online editor</a> provided by <a href="https://github.com/ayecue/greybel-js" target="_blank">greybel-js</a>. The latter also provides a CLI which can be used for script execution outside the game and bundling of code files.</p><p>The best sources for Grey Hack scripts to get inspiration from are <a href="https://www.greyrepo.xyz/" target="_blank">greyrepo.xyz</a> and <a href="https://github.com/search?q=grey+hack" target="_blank">github.com</a>.</p>',DEFINITIONS_COPY:"copy",DEFINITIONS_OR:"or"}});var C1=S((L4,QF)=>{QF.exports={type:"any",definitions:{insert:{type:"function",arguments:[{label:"index",type:"number"},{label:"value",type:"any"}],returns:["list","string"]},indexOf:{type:"function",arguments:[{label:"value",type:"any"},{label:"value",type:"any"},{label:"after",type:"any",opt:!0}],returns:["any"]},hasIndex:{type:"function",arguments:[{label:"value",type:"any"}],returnVariations:[0,1],returns:["number"]},remove:{type:"function",arguments:[{label:"value",type:"any"}],returnVariations:[0,1],returns:["number","null","string"]},push:{type:"function",arguments:[{label:"value",type:"any"}],returns:["list","map"]},pull:{type:"function",returns:["any"]},pop:{type:"function",returns:["any"]},shuffle:{type:"function",returns:["null"]},sum:{type:"function",returns:["number"]},indexes:{type:"function",returns:["list"]},len:{type:"function",returns:["number"]},values:{type:"function",returns:["list"]}}}});var O1=S((M4,JF)=>{JF.exports={type:"aptClient",extends:"map",definitions:{show:{type:"function",arguments:[{label:"repository",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","${repository} repository not found","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file"],returns:["string","null"]},search:{type:"function",arguments:[{label:"search",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","${search} not found in any repository","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file"],returns:["string","null"]},update:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","apt_update: No internet access.","${source} repository not found","/etc/apt/sources.txt content is malformed",0],returns:["string","number"]},add_repo:{type:"function",arguments:[{label:"repository",type:"string"},{label:"port",type:"number",default:{type:"number",value:1542}}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/sources.txt does not exist","${repository} it is already added to sources.txt","/etc/apt/sources.txt content is malformed."],returns:["string","null"]},del_repo:{type:"function",arguments:[{label:"repository",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/sources.txt does not exist","${repository} not found in sources.txt","/etc/apt/sources.txt content is malformed."],returns:["string","null"]},install:{type:"function",arguments:[{label:"package",type:"string"},{label:"customPath",type:"string",default:{type:"string",value:""}}],returnVariations:["Unknown error: Unable to access to local computer","apt_install: No internet access.","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","package name can not be empty","There is not enough free space on the hard disk.","${customPath} not found.","permission denied","!PlayerUtils.ConnectComputer","!Computer.CheckInicio","!PlayerUtils.FirewallPingStatus","!Networking.IsRouterAvailable","!Networking.CheckServiceOnline","${serviceDBFile} does not exist in the server","apt folder content does not exist in the server","${package} does not exist in the server","!GreyInterpreter.CheckScpUpload","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file","${package} not found in the server",1],returns:["string","number","null"]},check_upgrade:{type:"function",arguments:[{label:"filepath",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","apt_check_upgrade: No internet access.","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","package name can not be empty","${filepath} does not exist in this filesystem","!PlayerUtils.ConnectComputer","!PlayerUtils.FirewallPingStatus","!Computer.CheckInicio","!Networking.CheckServiceOnline","${serviceDBFile} does not exist in the server","apt folder content does not exist in the server","${filepath} does not exist in the server","${filepath} does not exist in this filesystem","${serviceDBFile} file content is malformed in the server","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file","${filepath} not found in the server",1,0],returns:["string","number","null"]}}}});var A1=S((q4,ZF)=>{ZF.exports={type:"blockchain",definitions:{coin_price:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","coin_price: No internet access.","coin_price: Coin does not exist."],returns:["null","string","number"]},show_history:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","show_history: No internet access."],returns:[{type:"map",keyType:"number",valueType:"list"},"string","null"]},amount_mined:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","amount_mined: No internet access.","amount_mined: Coin does not exist."],returns:["string","number","null"]},get_coin:{type:"function",arguments:[{label:"coinName",type:"string"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","get_coin: No internet access.","get_coin: Incorrect user/password"],returns:["string","coin","null"]},get_coin_name:{type:"function",arguments:[{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","get_coin_name: No internet access.","get_coin_name: Incorrect user/password","get_coin_name: No currency has been found"],returns:["string","null"]},login_wallet:{type:"function",arguments:[{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","login_wallet: No internet access.","login_wallet: Account not found or incorrect password"],returns:["string","wallet","null"]},create_wallet:{type:"function",arguments:[{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","create_wallet: No internet access.","Error: only alphanumeric allowed as name and password","create_wallet: name and password cannot exceed the 16 character limit.","Error: It is necessary to have a bank account to be able to create a wallet.","!BlockchainSystem.AddWallet"],returns:["string","wallet","null"]},delete_coin:{type:"function",arguments:[{label:"coinName",type:"string"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","delete_coin: No internet access.","!BlockchainSystem.RemoveCurrency",1],returns:["number","string","null"]}}}});var D1=S((F4,XF)=>{XF.exports={type:"class",hidden:!0,definitions:{}}});var j1=S((N4,eN)=>{eN.exports={type:"coin",extends:"map",definitions:{set_cycle_mining:{type:"function",arguments:[{label:"rateHours",type:"number",default:{type:"number",value:3}}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","the mining cycle cannot exceed the maximum of 2160 hours","the mining cycle cannot be less than 1 hour",1],returns:["string","number","null"]},get_cycle_mining:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number"]},get_reward:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number"]},set_reward:{type:"function",arguments:[{label:"coinAmount",type:"number",default:{type:"number",value:1}}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","Error: The reward cannot be less than 1 coin","Error: Coin does not exist",1],returns:["number","string","null"]},transaction:{type:"function",arguments:[{label:"subWalletOrig",type:"string"},{label:"subWalletDest",type:"string"},{label:"valAmount",type:"number"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","Error: amount value cannot be less than 1","!BlockchainSystem.Transaction",1],returns:["string","number","null"]},create_subwallet:{type:"function",arguments:[{label:"walletID",type:"string"},{label:"pin",type:"string"},{label:"subWalletUser",type:"string"},{label:"subWalletPass",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","!BlockchainSystem.AddSubWallet",1],returns:["string","number","null"]},get_subwallet:{type:"function",arguments:[{label:"subWalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","get_subwallet: The account does not exist"],returns:["string","subWallet","null"]},get_subwallets:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string",{type:"list",valueType:"subWallet"}]},set_address:{type:"function",arguments:[{label:"address",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","set_address: address ${address}not found","!BlockchainSystem.SetAddress",1],returns:["number","string","null"]},get_address:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","!BlockchainSystem.GetAddress"],returns:["string"]},get_mined_coins:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number"]},reset_password:{type:"function",arguments:[{label:"newPassword",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","reset_password: only alphanumeric characters are allowed as password","reset_password: name and password cannot exceed the 16 character limit.","!BlockchainSystem.ResetCoinPass",1],returns:["number","string"]}}}});var L1=S(($4,tN)=>{tN.exports={type:"computer",extends:"map",definitions:{get_ports:{type:"function",returns:[{type:"list",valueType:"port"}]},get_name:{type:"function",returns:["string"]},local_ip:{type:"function",returns:["string"]},public_ip:{type:"function",returns:["string"]},File:{type:"function",arguments:[{label:"path",type:"string"}],returns:["file","null"]},create_folder:{type:"function",arguments:[{label:"path",type:"string"},{label:"folder",type:"string",default:{type:"string",value:"newFolder"}}],returnVariations:["Error: only alphanumeric allowed as folder name.","Error: name cannot exceed the limit of 128 characters.","create_folder: path too large","Error: invalid path","!PlayerUtils.CrearCarpeta",1],returns:["string","number"]},is_network_active:{type:"function",returnVariations:[0,1],returns:["number"]},touch:{type:"function",arguments:[{label:"path",type:"string"},{label:"fileName",type:"string"}],returnVariations:["Error: invalid path","Error: nameFile must be string","Error: only alphanumeric allowed as file name.","Error: name cannot exceed the limit of 128 characters.","touch: path too large","The file already exists","!PlayerUtils.CrearArchivo",1],returns:["number","string"]},show_procs:{type:"function",returns:["string"]},network_devices:{type:"function",returns:["string"]},change_password:{type:"function",arguments:[{label:"username",type:"string"},{label:"password",type:"string"}],returnVariations:["Error: only alphanumeric allowed as password.","Error: the password cannot exceed the limit of 15 characters.","Denied. Only root user can execute this command.","user ${username} does not exist",1],returns:["number","string","null"]},create_user:{type:"function",arguments:[{label:"usename",type:"string"},{label:"password",type:"string"}],returnVariations:["Error: only alphanumeric allowed as user name and password.","Denied. Only root user can execute this command.","!Computer.ValidateNewUser","Denied. Maximum number of registered users reached.",1],returns:["number","string","null"]},delete_user:{type:"function",arguments:[{label:"username",type:"string"},{label:"removeHome",type:"number",default:{type:"number",value:0}}],returnVariations:["Denied. Only root user can execute this command.","can't delete user. ${username} does not exist","the root user can't be deleted.","sorry, at the moment that account can't be deleted.","user ${username} not found.",1],returns:["number","string","null"]},create_group:{type:"function",arguments:[{label:"username",type:"string"},{label:"group",type:"string"}],returnVariations:["Error: only alphanumeric allowed as user and group names.","Denied. Only root user can execute this command.","Error: user ${username} does not exist.",1],returns:["number","string","null"]},delete_group:{type:"function",arguments:[{label:"username",type:"string"},{label:"group",type:"string"}],returnVariations:["Denied. Only root user can execute this command.","Error: user ${username} does not exist.","Error: group ${group} not found in user ${username}",1],returns:["number","string","null"]},groups:{type:"function",arguments:[{label:"username",type:"string"}],returnVariations:["Error: user ${username} does not exist."],returns:["string","null"]},close_program:{type:"function",arguments:[{label:"pid",type:"number"}],returnVariations:["Permission denied. PID ${pid} belongs to user <b>${username}</b>","Permission denied. Process protected.","Unable to close this process. The process belongs to this script.",1,0],returns:["number","string","null"]},wifi_networks:{type:"function",arguments:[{label:"netDevice",type:"string"}],returns:[{type:"list",valueType:"string"},"null"]},connect_wifi:{type:"function",arguments:[{label:"netDevice",type:"string"},{label:"bssid",type:"string"},{label:"essid",type:"string"},{label:"password",type:"string"}],returnVariations:["connect_wifi: permission denied. Guest users can not execute this method","connect_wifi: Network device not found","connect_wifi: Only wifi cards are supported","Can't connect. Incorrect password.","Can't connect. Router not found.","can't connect: the remote server has been temporarily disabled due to non-payment","Can't connect. Target is out of reach.","Can't connect. Incorrect password.",1],returns:["number","string","null"]},connect_ethernet:{type:"function",arguments:[{label:"netDevice",type:"string"},{label:"address",type:"string"},{label:"gateway",type:"string"}],returnVariations:["connect_ethernet: permission denied. Guest users can not execute this method","Error: Invalid IP address","Error: invalid gateway","Error: the IP address and the gateway must belong to the same subnet","connect_ethernet: Network device not found","connect_ethernet: Only ethernet cards are supported","!NetworkLan.ConnectEthernet"],returns:["string","null"]},network_gateway:{type:"function",returns:["string"]},active_net_card:{type:"function",returns:["string"]}}}});var M1=S((U4,nN)=>{nN.exports={type:"crypto",extends:"map",definitions:{aircrack:{type:"function",arguments:[{label:"path",type:"string"}],returns:["string","null"]},airmon:{type:"function",arguments:[{label:"option",type:"string"},{label:"device",type:"string"}],returnVariations:["Error: wifi card is disabled","airmon: monitor mode can only be activated on wifi cards","airmon: monitor mode is not supported by the chipset of this network card.",0,1],returns:["number","string"]},aireplay:{type:"function",arguments:[{label:"bssid",type:"string"},{label:"essid",type:"string"},{label:"maxAcks",type:"number",default:{type:"number",value:-1}}],returnVariations:["Error: wifi card is disabled","router not found!","Can't connect. Target is out of reach.","aireplay: no wifi card found with monitor mode enabled"],returns:["string","null"]},decipher:{type:"function",arguments:[{label:"encPass",type:"string"}],returns:["string","null"]},smtp_user_list:{type:"function",arguments:[{label:"ip",type:"string"},{label:"port",type:"number"}],returnVariations:["Error: Invalid ip address","!PlayerUtils.GetSmtpServer"],returns:[{type:"list",valueType:"string"},"string","null"]}}}});var q1=S((B4,rN)=>{rN.exports={type:"ctfEvent",extends:"map",definitions:{get_description:{type:"function",returns:["string"]},get_template:{type:"function",returns:["string"]},player_success:{type:"function",returnVariations:[0,1],returns:["number"]},get_creator_name:{type:"function",returns:["string"]},get_mail_content:{type:"function",returns:["string"]}}}});var F1=S((W4,iN)=>{iN.exports={type:"file",extends:"map",definitions:{chmod:{type:"function",arguments:[{label:"perms",type:"string",default:{type:"string",value:""}},{label:"isRecursive",type:"number",default:{type:"number",value:0}}],returnVariations:["${path} not found","!FileSystem.UpdatePermisos"],returns:["string"]},copy:{type:"function",arguments:[{label:"path",type:"string",default:{type:"string",value:""}},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","!PlayerUtils.MoverFichero",1],returns:["string","number","null"]},move:{type:"function",arguments:[{label:"path",type:"string",default:{type:"string",value:""}},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","!PlayerUtils.MoverFichero",1],returns:["string","number","null"]},symlink:{type:"function",arguments:[{label:"path",type:"string",default:{type:"string",value:""}},{label:"newName",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","Error: invalid path","The file already exists","!PlayerUtils.CrearCarpeta","!PlayerUtils.CrearArchivo",1],returns:["string","number","null"]},rename:{type:"function",arguments:[{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","Error: name cannot exceed the limit of 128 characters.","!PlayerUtils.RenameFichero",0],returns:["string","number"]},path:{type:"function",arguments:[{label:"symlinkOrigPath",type:"number",default:{type:"number",value:0}}],returns:["string"]},is_folder:{type:"function",returnVariations:[1,0],returns:["number","null"]},parent:{type:"function",returns:["file","null"]},name:{type:"function",returns:["string","null"]},allow_import:{type:"function",returns:["number"]},get_content:{type:"function",returnVariations:["Error: can't find the computer of this file","can't open ${filepath}. Binary file."],returns:["string","null"]},set_content:{type:"function",arguments:[{label:"content",type:"string",default:{type:"string",value:""}}],returnVariations:["I can't save the file. The maximum of 160,000 characters has been exceeded.","set_content: unable to use this method in encryption configuration","can't open ${filepath}. Binary file.",1],returns:["string","number","null"]},is_binary:{type:"function",returnVariations:[1,0],returns:["number","null"]},is_symlink:{type:"function",returnVariations:[1,0],returns:["number","null"]},has_permission:{type:"function",arguments:[{label:"perms",type:"string",default:{type:"string",value:""}}],returnVariations:[1,0],returns:["number","null"]},delete:{type:"function",returnVariations:["!PlayerUtils.RemoveFile"],returns:["string"]},get_folders:{type:"function",returns:[{type:"list",valueType:"file"},"null"]},get_files:{type:"function",returns:[{type:"list",valueType:"file"},"null"]},permissions:{type:"function",returns:["string","null"]},owner:{type:"function",returns:["string","null"]},set_owner:{type:"function",arguments:[{label:"owner",type:"string",default:{type:"string",value:""}},{label:"recursive",type:"number",default:{type:"number",value:0}}],returnVariations:["Permission denied"],returns:["string","null"]},group:{type:"function",returns:["string","null"]},set_group:{type:"function",arguments:[{label:"group",type:"string",default:{type:"string",value:""}},{label:"recursive",type:"number",default:{type:"number",value:0}}],returnVariations:["Permission denied"],returns:["string","null"]},size:{type:"function",returns:["string","null"]}}}});var N1=S((V4,sN)=>{sN.exports={type:"ftpShell",extends:"map",definitions:{host_computer:{type:"function",returns:["computer"]},start_terminal:{type:"function",returns:["null"]},put:{type:"function",arguments:[{label:"sourceFile",type:"string"},{label:"destinationFolder",type:"string"},{label:"remoteShell",type:"shell"}],returnVariations:["${sourceFile} not found","${destinationFolder} not found","${destinationFolder} it's not a folder","!GreyInterpreter.CheckScpUpload",1],returns:["number","string","null"]}}}});var $1=S((H4,oN)=>{oN.exports={type:"function",hidden:!0,definitions:{}}});var U1=S((z4,aN)=>{aN.exports={type:"general",definitions:{mail_login:{type:"function",arguments:[{label:"user",type:"string"},{label:"pass",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","login: No internet access.","!Database.GetMailAccount"],returns:["metaMail","string","null"]},parent_path:{type:"function",arguments:[{label:"directory",type:"string"}],returns:["string"]},trim:{type:"function",arguments:[{label:"self",type:"string"}],returns:["string","null"]},hasIndex:{type:"function",arguments:[{label:"value",types:["map","list","string"]},{label:"index",type:"any"}],returnVariations:[0,1],returns:["number","null"]},typeof:{type:"function",arguments:[{label:"value",type:"any"}],returns:["string"]},get_router:{type:"function",arguments:[{label:"ipAddress",type:"string",default:{type:"string",value:""}}],returns:["router","null"]},get_switch:{type:"function",arguments:[{label:"ipAddress",type:"string"}],returns:["router","null"]},nslookup:{type:"function",arguments:[{label:"webAddress",type:"string"}],returnVariations:["Not found"],returns:["string"]},print:{type:"function",arguments:[{label:"value",type:"any",default:{type:"string",value:""}},{label:"replaceText",type:"number",default:{type:"number",value:0}}],returns:["null"]},clear_screen:{type:"function",returns:["null"]},active_user:{type:"function",returns:["string"]},home_dir:{type:"function",returns:["string"]},get_shell:{type:"function",arguments:[{label:"user",type:"string",default:{type:"string",value:""}},{label:"pass",type:"string",default:{type:"string",value:""}}],returns:["shell","null"]},indexes:{type:"function",arguments:[{label:"self",types:["map","list","string"]}],returns:["list","null"]},values:{type:"function",arguments:[{label:"self",types:["map","string"]}],returns:["list"]},indexOf:{type:"function",arguments:[{label:"self",types:["list","map","string"]},{label:"value",type:"any"},{label:"after",type:"any",opt:!0}],returns:["any"]},len:{type:"function",arguments:[{label:"self",types:["list","map","string"]}],returns:["number","null"]},shuffle:{type:"function",arguments:[{label:"self",types:["list","map"]}],returns:["null"]},val:{type:"function",arguments:[{label:"self",types:["number","string"],default:{type:"number",value:0}}],returns:["number","null"]},lower:{type:"function",arguments:[{label:"self",type:"string"}],returns:["string"]},upper:{type:"function",arguments:[{label:"self",type:"string"}],returns:["string"]},sum:{type:"function",arguments:[{label:"self",types:["list","map"]}],returns:["number"]},pop:{type:"function",arguments:[{label:"self",types:["list","map"]}],returns:["any"]},pull:{type:"function",arguments:[{label:"self",types:["list","map"]}],returns:["any"]},push:{type:"function",arguments:[{label:"self",types:["list","map"]},{label:"value",type:"any"}],returns:["list","map","null"]},sort:{type:"function",arguments:[{label:"self",type:"list"},{label:"byKey",type:"any"},{label:"ascending",type:"number",default:{type:"number",value:1}}],returns:["list"]},remove:{type:"function",arguments:[{label:"self",types:["map","list","string"]},{label:"key",type:"any"}],returnVariations:[0,1],returns:["number","null","string"]},user_input:{type:"function",arguments:[{label:"message",type:"string",default:{type:"string",value:""}},{label:"isPassword",type:"number",default:{type:"number",value:0}},{label:"anyKey",type:"number",default:{type:"number",value:0}}],returns:["string"]},include_lib:{type:"function",arguments:[{label:"path",type:"string"}],returns:["crypto","metaxploit","service","blockchain","aptClient","smartAppliance","trafficNet","null"]},import_code:{type:"function",arguments:[{label:"path",type:"string"}],returns:["null"]},exit:{type:"function",arguments:[{label:"message",type:"string",default:{type:"string",value:""}}],returns:["null"]},user_mail_address:{type:"function",returns:["string","null"]},user_bank_number:{type:"function",returns:["string","null"]},whois:{type:"function",arguments:[{label:"ip",type:"string"}],returnVariations:["Invalid IP address: ${ip}","Error: the IP address must be public","No Info available","Address not found"],returns:["string"]},wait:{type:"function",arguments:[{label:"delay",type:"number",default:{type:"number",value:1}}],returns:["null"]},command_info:{type:"function",arguments:[{label:"commandName",type:"string"}],returnVariations:["Unknown info"],returns:["string"]},program_path:{type:"function",returns:["string"]},current_path:{type:"function",returns:["string"]},format_columns:{type:"function",arguments:[{label:"columns",type:"string"}],returns:["string"]},current_date:{type:"function",returns:["string"]},is_lan_ip:{type:"function",arguments:[{label:"ip",type:"string"}],returns:["number"]},is_valid_ip:{type:"function",arguments:[{label:"ip",type:"string"}],returns:["number"]},bitwise:{type:"function",arguments:[{label:"operator",type:"string"},{label:"left",type:"number"},{label:"right",type:"number"}],returns:["number","null"]},abs:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},acos:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},asin:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},atan:{type:"function",arguments:[{label:"y",type:"number",default:{type:"number",value:0}},{label:"x",type:"number",default:{type:"number",value:1}}],returns:["number"]},tan:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:1}}],returns:["number"]},cos:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},code:{type:"function",arguments:[{label:"value",type:"string"}],returns:["number"]},char:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:65}}],returns:["string"]},sin:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},floor:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},range:{type:"function",arguments:[{label:"start",type:"number",default:{type:"number",value:0}},{label:"end",type:"number",default:{type:"number",value:0}},{label:"inc",type:"number",opt:!0}],returns:[{type:"list",valueType:"number"}]},round:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}},{label:"fixed",type:"number",default:{type:"number",value:0}}],returns:["number"]},rnd:{type:"function",arguments:[{label:"seed",type:"number",opt:!0}],returns:["number"]},sign:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},sqrt:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},str:{type:"function",arguments:[{label:"value",type:"any"}],returns:["string"]},ceil:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},pi:{type:"function",returns:["number"]},launch:{type:"function",arguments:[{label:"shell",type:"shell"},{label:"program",type:"string"},{label:"params",type:"string",default:{type:"string",value:""}}],returnVariations:["Invalid shell","Can't find computer",1,0],returns:["string","number"]},launch_path:{type:"function",returns:["string"]},slice:{type:"function",arguments:[{label:"value",types:["list","string"]},{label:"startIndex",type:"number",default:{type:"number",value:0}},{label:"endIndex",type:"number",opt:!0}],returns:["list","string","null"]},md5:{type:"function",arguments:[{label:"value",type:"string"}],returns:["string"]},hash:{type:"function",arguments:[{label:"value",type:"any"}],returns:["number"]},time:{type:"function",returns:["number"]},bitAnd:{type:"function",arguments:[{label:"a",type:"number",default:{type:"number",value:0}},{label:"b",type:"number",default:{type:"number",value:0}}],returns:["number"]},bitOr:{type:"function",arguments:[{label:"a",type:"number",default:{type:"number",value:0}},{label:"b",type:"number",default:{type:"number",value:0}}],returns:["number"]},bitXor:{type:"function",arguments:[{label:"a",type:"number",default:{type:"number",value:0}},{label:"b",type:"number",default:{type:"number",value:0}}],returns:["number"]},log:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}},{label:"base",type:"number",default:{type:"number",value:10}}],returns:["number"]},yield:{type:"function",returns:["null"]},get_custom_object:{type:"function",returns:["map"]},insert:{type:"function",arguments:[{label:"object",types:["list","string"]},{label:"index",type:"number"},{label:"value",type:"any"}],returns:["list","string"]},to_int:{type:"function",arguments:[{label:"self",type:"string"}],returns:["string","number","null"]},join:{type:"function",arguments:[{label:"value",type:"list"},{label:"delimiter",type:"string",default:{type:"string",value:" "}}],returns:["string"]},split:{type:"function",arguments:[{label:"self",type:"string"},{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:[{type:"list",valueType:"string"},"null"]},reverse:{type:"function",arguments:[{label:"value",type:"list"}],returns:["null"]},replace:{type:"function",arguments:[{label:"value",types:["map","list"]},{label:"oldVal",type:"any"},{label:"newVal",type:"any"},{label:"maxCount",type:"number",opt:!0}],returns:["any"]},replace_regex:{type:"function",arguments:[{label:"self",type:"string"},{label:"pattern",type:"string"},{label:"newValue",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:["string"]},is_match:{type:"function",arguments:[{label:"value",type:"string"},{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returnVariations:[1,0],returns:["number"]},lastIndexOf:{type:"function",arguments:[{label:"self",type:"string"},{label:"searchStr",type:"string"}],returns:["number","null"]},matches:{type:"function",arguments:[{label:"value",type:"string"},{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:[{type:"map",keyType:"number",valueType:"string"}]},get_ctf:{type:"function",arguments:[{label:"user",type:"string"},{label:"password",type:"string"},{label:"eventName",type:"string"}],returnVariations:["get_ctf: user and password cannot be null","get_ctf: user or password incorrect"],returns:["ctfEvent","string"]},show:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"repository",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","${repository} repository not found","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file"],returns:["string","null"]},search:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"search",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","${search} not found in any repository","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file"],returns:["string","null"]},update:{type:"function",arguments:[{label:"self",type:"aptClient"}],returnVariations:["Unknown error: Unable to access to local computer","apt_update: No internet access.","${source} repository not found","/etc/apt/sources.txt content is malformed",0],returns:["string","number"]},add_repo:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"repository",type:"string"},{label:"port",type:"number",default:{type:"number",value:1542}}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/sources.txt does not exist","${repository} it is already added to sources.txt","/etc/apt/sources.txt content is malformed."],returns:["string","null"]},del_repo:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"repository",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/sources.txt does not exist","${repository} not found in sources.txt","/etc/apt/sources.txt content is malformed."],returns:["string","null"]},install:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"package",type:"string"},{label:"customPath",type:"string",default:{type:"string",value:""}}],returnVariations:["Unknown error: Unable to access to local computer","apt_install: No internet access.","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","package name can not be empty","There is not enough free space on the hard disk.","${customPath} not found.","permission denied","!PlayerUtils.ConnectComputer","!Computer.CheckInicio","!PlayerUtils.FirewallPingStatus","!Networking.IsRouterAvailable","!Networking.CheckServiceOnline","${serviceDBFile} does not exist in the server","apt folder content does not exist in the server","${package} does not exist in the server","!GreyInterpreter.CheckScpUpload","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file","${package} not found in the server",1],returns:["string","number","null"]},check_upgrade:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"filePath",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","apt_check_upgrade: No internet access.","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","package name can not be empty","${filepath} does not exist in this filesystem","!PlayerUtils.ConnectComputer","!PlayerUtils.FirewallPingStatus","!Computer.CheckInicio","!Networking.CheckServiceOnline","${serviceDBFile} does not exist in the server","apt folder content does not exist in the server","${filepath} does not exist in the server","${filepath} does not exist in this filesystem","${serviceDBFile} file content is malformed in the server","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file","${filepath} not found in the server",1,0],returns:["string","number","null"]},coin_price:{type:"function",arguments:[{label:"self",type:"blockchain"}],returnVariations:["Unknown error: Unable to access to local computer","coin_price: No internet access.","coin_price: Coin does not exist."],returns:["null","string","number"]},show_history:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","show_history: No internet access."],returns:[{type:"map",keyType:"number",valueType:"list"},"string","null"]},amount_mined:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","amount_mined: No internet access.","amount_mined: Coin does not exist."],returns:["string","number","null"]},get_coin:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"coinName",type:"string"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","get_coin: No internet access.","get_coin: Incorrect user/password"],returns:["string","coin","null"]},get_coin_name:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","get_coin_name: No internet access.","get_coin_name: Incorrect user/password","get_coin_name: No currency has been found"],returns:["string","null"]},login_wallet:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","login_wallet: No internet access.","login_wallet: Account not found or incorrect password"],returns:["string","wallet","null"]},create_wallet:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","create_wallet: No internet access.","Error: only alphanumeric allowed as name and password","create_wallet: name and password cannot exceed the 16 character limit.","Error: It is necessary to have a bank account to be able to create a wallet.","!BlockchainSystem.AddWallet"],returns:["string","wallet","null"]},delete_coin:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"coinName",type:"string"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","delete_coin: No internet access.","!BlockchainSystem.RemoveCurrency",1],returns:["number","string","null"]},set_cycle_mining:{type:"function",arguments:[{label:"self",type:"coin"},{label:"rateHours",type:"number",default:{type:"number",value:3}}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","the mining cycle cannot exceed the maximum of 2160 hours","the mining cycle cannot be less than 1 hour",1],returns:["string","number","null"]},get_cycle_mining:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number","null"]},get_reward:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number","null"]},set_reward:{type:"function",arguments:[{label:"self",type:"coin"},{label:"coinAmount",type:"number",default:{type:"number",value:1}}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","Error: The reward cannot be less than 1 coin","Error: Coin does not exist",1],returns:["number","string","null"]},transaction:{type:"function",arguments:[{label:"self",type:"coin"},{label:"subWalletOrig",type:"string"},{label:"subWalletDest",type:"string"},{label:"valAmount",type:"number"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","Error: amount value cannot be less than 1","!BlockchainSystem.Transaction",1],returns:["string","number","null"]},create_subwallet:{type:"function",arguments:[{label:"self",type:"coin"},{label:"walletID",type:"string"},{label:"pin",type:"string"},{label:"subWalletUser",type:"string"},{label:"subWalletPass",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","!BlockchainSystem.AddSubWallet",1],returns:["string","number","null"]},get_subwallet:{type:"function",arguments:[{label:"self",type:"coin"},{label:"subWalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","get_subwallet: The account does not exist"],returns:["string","subWallet","null"]},get_subwallets:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string",{type:"list",valueType:"subWallet"},"null"]},set_address:{type:"function",arguments:[{label:"self",type:"coin"},{label:"address",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","set_address: address ${address}not found","!BlockchainSystem.SetAddress",1],returns:["number","string","null"]},get_address:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","!BlockchainSystem.GetAddress"],returns:["string","null"]},get_mined_coins:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number","null"]},reset_password_coin:{type:"function",arguments:[{label:"self",type:"coin"},{label:"newPassword",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","reset_password: only alphanumeric characters are allowed as password","reset_password: name and password cannot exceed the 16 character limit.","!BlockchainSystem.ResetCoinPass",1],returns:["number","string","null"]},get_ports:{type:"function",arguments:[{label:"self",type:"computer"}],returns:[{type:"list",valueType:"port"},"null"]},get_name:{type:"function",arguments:[{label:"self",type:"computer"}],returnVariations:["Unknown"],returns:["string"]},lan_ip:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},public_ip_pc:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},File:{type:"function",arguments:[{label:"self",type:"computer"},{label:"path",type:"string"}],returns:["file","null"]},create_folder:{type:"function",arguments:[{label:"self",type:"computer"},{label:"path",type:"string"},{label:"folder",type:"string",default:{type:"string",value:"newFolder"}}],returnVariations:["Error: only alphanumeric allowed as folder name.","Error: name cannot exceed the limit of 128 characters.","create_folder: path too large","Error: invalid path","!PlayerUtils.CrearCarpeta",1],returns:["string","number","null"]},is_network_active:{type:"function",arguments:[{label:"self",type:"computer"}],returnVariations:[0,1],returns:["number","null"]},touch:{type:"function",arguments:[{label:"self",type:"computer"},{label:"path",type:"string"},{label:"fileName",type:"string"}],returnVariations:["Error: invalid path","Error: nameFile must be string","Error: only alphanumeric allowed as file name.","Error: name cannot exceed the limit of 128 characters.","touch: path too large","The file already exists","!PlayerUtils.CrearArchivo",1],returns:["number","string","null"]},show_procs:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},network_devices:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},change_password:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"pass",type:"string"}],returnVariations:["Error: only alphanumeric allowed as password.","Error: the password cannot exceed the limit of 15 characters.","Denied. Only root user can execute this command.","user ${username} does not exist",1],returns:["number","string","null"]},create_user:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"pass",type:"string"}],returnVariations:["Error: only alphanumeric allowed as user name and password.","Denied. Only root user can execute this command.","!Computer.ValidateNewUser","Denied. Maximum number of registered users reached.",1],returns:["number","string","null"]},delete_user:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"removeHome",type:"number",default:{type:"number",value:0}}],returnVariations:["Denied. Only root user can execute this command.","can't delete user. ${username} does not exist","the root user can't be deleted.","sorry, at the moment that account can't be deleted.","user ${username} not found.",1],returns:["number","string","null"]},create_group:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"group",type:"string"}],returnVariations:["Error: only alphanumeric allowed as user and group names.","Denied. Only root user can execute this command.","Error: user ${username} does not exist.",1],returns:["number","string","null"]},delete_group:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"group",type:"string"}],returnVariations:["Denied. Only root user can execute this command.","Error: user ${username} does not exist.","Error: group ${group} not found in user ${username}",1],returns:["number","string","null"]},groups:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"}],returns:["string","null"]},close_program:{type:"function",arguments:[{label:"self",type:"computer"},{label:"pid",type:"number"}],returnVariations:["Permission denied. PID ${pid} belongs to user <b>${username}</b>","Permission denied. Process protected.","Unable to close this process. The process belongs to this script.",1,0],returns:["number","string","null"]},wifi_networks:{type:"function",arguments:[{label:"self",type:"computer"},{label:"netDevice",type:"string"}],returns:[{type:"list",valueType:"string"},"null"]},connect_wifi:{type:"function",arguments:[{label:"self",type:"computer"},{label:"netDevice",type:"string"},{label:"bssid",type:"string"},{label:"essid",type:"string"},{label:"pass",type:"string"}],returnVariations:["connect_wifi: permission denied. Guest users can not execute this method","connect_wifi: Network device not found","connect_wifi: Only wifi cards are supported","Can't connect. Incorrect password.","Can't connect. Router not found.","can't connect: the remote server has been temporarily disabled due to non-payment","Can't connect. Target is out of reach.","Can't connect. Incorrect password.",1],returns:["number","string","null"]},connect_ethernet:{type:"function",arguments:[{label:"self",type:"computer"},{label:"netDevice",type:"string"},{label:"localIp",type:"string"},{label:"gateway",type:"string"}],returnVariations:["connect_ethernet: permission denied. Guest users can not execute this method","Error: Invalid IP address","Error: invalid gateway","Error: the IP address and the gateway must belong to the same subnet","connect_ethernet: Network device not found","connect_ethernet: Only ethernet cards are supported","!NetworkLan.ConnectEthernet"],returns:["string","null"]},network_gateway:{type:"function",arguments:[{label:"self",type:"computer"}],returnVariations:["0.0.0.0"],returns:["string"]},active_net_card:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},aircrack:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"path",type:"string"}],returns:["string","null"]},airmon:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"option",type:"string"},{label:"device",type:"string"}],returnVariations:["Error: wifi card is disabled","airmon: monitor mode can only be activated on wifi cards","airmon: monitor mode is not supported by the chipset of this network card.",0,1],returns:["number","string"]},aireplay:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"bssid",type:"string"},{label:"essid",type:"string"},{label:"maxAcks",type:"number",default:{type:"number",value:-1}}],returnVariations:["Error: wifi card is disabled","router not found!","Can't connect. Target is out of reach.","aireplay: no wifi card found with monitor mode enabled"],returns:["string","null"]},decipher:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"encPass",type:"string"}],returns:["string","null"]},smtp_user_list:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"ip",type:"string"},{label:"port",type:"number"}],returnVariations:["Error: Invalid ip address","!PlayerUtils.GetSmtpServer"],returns:[{type:"list",valueType:"string"},"string","null"]},get_description:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returns:["string","null"]},get_template:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returns:["string","null"]},player_success:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returnVariations:[0,1],returns:["number","null"]},get_creator_name:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returns:["string","null"]},get_mail_content:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returns:["string","null"]},chmod:{type:"function",arguments:[{label:"self",type:"file"},{label:"perms",type:"string",default:{type:"string",value:""}},{label:"isRecursive",type:"number",default:{type:"number",value:0}}],returnVariations:["${path} not found","!FileSystem.UpdatePermisos"],returns:["string","null"]},copy:{type:"function",arguments:[{label:"self",type:"file"},{label:"path",type:"string",default:{type:"string",value:""}},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","!PlayerUtils.MoverFichero",1],returns:["string","number","null"]},move:{type:"function",arguments:[{label:"self",type:"file"},{label:"path",type:"string",default:{type:"string",value:""}},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","!PlayerUtils.MoverFichero",1],returns:["string","number","null"]},symlink:{type:"function",arguments:[{label:"self",type:"file"},{label:"path",type:"string",default:{type:"string",value:""}},{label:"newName",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","Error: invalid path","The file already exists","!PlayerUtils.CrearCarpeta","!PlayerUtils.CrearArchivo",1],returns:["string","number","null"]},rename:{type:"function",arguments:[{label:"self",type:"file"},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","Error: name cannot exceed the limit of 128 characters.","!PlayerUtils.RenameFichero",0],returns:["string","number"]},path:{type:"function",arguments:[{label:"self",type:"file"},{label:"symlinkOrigPath",type:"number",default:{type:"number",value:0}}],returns:["string","null"]},is_folder:{type:"function",arguments:[{label:"self",type:"file"}],returnVariations:[1,0],returns:["number","null"]},parent:{type:"function",arguments:[{label:"self",type:"file"}],returns:["file","null"]},name:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},allow_import:{type:"function",arguments:[{label:"self",type:"file"}],returns:["number","null"]},get_content:{type:"function",arguments:[{label:"self",type:"file"}],returnVariations:["Error: can't find the computer of this file","can't open ${filepath}. Binary file."],returns:["string","null"]},set_content:{type:"function",arguments:[{label:"self",type:"file"},{label:"content",type:"string",default:{type:"string",value:""}}],returnVariations:["I can't save the file. The maximum of 160,000 characters has been exceeded.","set_content: unable to use this method in encryption configuration","can't open ${filepath}. Binary file.",1,0],returns:["string","number","null"]},is_binary:{type:"function",arguments:[{label:"self",type:"file"}],returnVariations:[1,0],returns:["number","null"]},is_symlink:{type:"function",arguments:[{label:"self",type:"file"}],returnVariations:[1,0],returns:["number","null"]},has_permission:{type:"function",arguments:[{label:"self",type:"file"},{label:"perms",type:"string",default:{type:"string",value:""}}],returnVariations:[1,0],returns:["number","null"]},delete:{type:"function",arguments:[{label:"self",type:"file"}],returnVariations:["!PlayerUtils.RemoveFile"],returns:["string","null"]},get_folders:{type:"function",arguments:[{label:"self",type:"file"}],returns:[{type:"list",valueType:"file"},"null"]},get_files:{type:"function",arguments:[{label:"self",type:"file"}],returns:[{type:"list",valueType:"file"},"null"]},permissions:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},owner:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},set_owner:{type:"function",arguments:[{label:"self",type:"file"},{label:"owner",type:"string",default:{type:"string",value:""}},{label:"recursive",type:"number",default:{type:"number",value:0}}],returnVariations:["Permission denied"],returns:["string","null"]},group:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},set_group:{type:"function",arguments:[{label:"self",type:"file"},{label:"group",type:"string",default:{type:"string",value:""}},{label:"recursive",type:"number",default:{type:"number",value:0}}],returnVariations:["Permission denied"],returns:["string","null"]},size:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},load:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"path",type:"string"}],returns:["metaLib","null"]},net_use:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"ip",type:"string"},{label:"port",type:"number",default:{type:"number",value:0}}],returns:["netSession","null"]},rshell_client:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"ip",type:"string"},{label:"port",type:"number",default:{type:"number",value:1222}},{label:"processName",type:"string",default:{type:"string",value:"rshell_client"}}],returnVariations:["rshell_client: Invalid IP address","Error: only alphanumeric allowed as proccess name.","Error: proccess name cannot exceed the limit of 28 characters.","Error: ${programName} is a reserved process name","rshell_client: IP address not found: ${ip}","rshell_client: unable to find remote server at port ${port}","!Networking.CheckServiceOnline",1],returns:["string","number","null"]},rshell_server:{type:"function",arguments:[{label:"self",type:"metaxploit"}],returnVariations:["rshell_server: No internet connection","rshell_server: The service cannot be started on this network.","error: service rshelld is not running","error: rshell portforward is not configured correctly"],returns:["string",{type:"list",valueType:"shell"},"null"]},scan:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"metaLib",type:"metaLib"}],returns:[{type:"list",valueType:"string"},"null"]},scan_address:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"metaLib",type:"metaLib"},{label:"memoryAddress",type:"string"}],returns:["string","null"]},sniffer:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"saveEncSource",type:"number",default:{type:"number",value:0}}],returns:["string","null"]},overflow:{type:"function",arguments:[{label:"self",type:"metaLib"},{label:"memoryAddress",type:"string"},{label:"unsecZone",type:"string"},{label:"optArgs",type:"string",default:{type:"string",value:""}}],returnVariations:["Exploit failed: the remote server has been temporarily disabled due to non-payment",0,1],returns:["string","number","shell","computer","file","null"]},version:{type:"function",arguments:[{label:"self",type:"metaLib"}],returns:["string","null"]},lib_name:{type:"function",arguments:[{label:"self",type:"metaLib"}],returns:["string","null"]},debug_tools:{type:"function",arguments:[{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Error: The file must be a library","Error: Incorrect password"],returns:["string","debugLibrary","null"]},payload:{type:"function",arguments:[{label:"memZone",type:"string"},{label:"pathFile",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: The file must be a library","Error: The library is patched against this vulnerability.","Failed: No vulnerabilities have been found in the specified memory area.","Error acquiring partial object file. Unable to access to resource: ${pathFile}"],returns:["string",{type:"list",valueType:"map"},"null"]},dump_lib:{type:"function",arguments:[{label:"self",type:"netSession"}],returns:["metaLib","null"]},get_num_conn_gateway:{type:"function",arguments:[{label:"self",type:"netSession"}],returns:["number","null"]},get_num_portforward:{type:"function",arguments:[{label:"self",type:"netSession"}],returns:["number","null"]},get_num_users:{type:"function",arguments:[{label:"self",type:"netSession"}],returns:["number","null"]},is_any_active_user:{type:"function",arguments:[{label:"self",type:"netSession"}],returnVariations:[0,1],returns:["number","null"]},is_root_active_user:{type:"function",arguments:[{label:"self",type:"netSession"}],returnVariations:[0,1],returns:["number","null"]},device_ports:{type:"function",arguments:[{label:"self",type:"router"},{label:"ip",type:"string"}],returnVariations:["device_ports: ${ip} is unreachable"],returns:["string",{type:"list",valueType:"port"},"null"]},devices_lan_ip:{type:"function",arguments:[{label:"self",type:"router"}],returns:[{type:"list",valueType:"string"},"null"]},bssid_name:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},essid_name:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},firewall_rules:{type:"function",arguments:[{label:"self",type:"router"}],returns:[{type:"list",valueType:"string"},"null"]},kernel_version:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},local_ip:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},public_ip:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},used_ports:{type:"function",arguments:[{label:"self",type:"router"}],returns:[{type:"list",valueType:"port"},"null"]},ping_port:{type:"function",arguments:[{label:"self",type:"router"},{label:"port",type:"number"}],returns:["port","null"]},port_info:{type:"function",arguments:[{label:"self",type:"router"},{label:"port",type:"port"}],returns:["string","null"]},install_service:{type:"function",arguments:[{label:"self",type:"service"}],returnVariations:["Denied. Only root user can install this service.",1],returns:["number","string","null"]},start_service:{type:"function",arguments:[{label:"self",type:"service"}],returnVariations:["Denied. Only root user can install this service.","<color=yellow>${reason} The chat service can't be accessed.</color>",1],returns:["number","string","null"]},stop_service:{type:"function",arguments:[{label:"self",type:"service"}],returnVariations:["Denied. Only root user can install this service.",1,0],returns:["number","string","null"]},host_computer:{type:"function",arguments:[{label:"self",type:"shell"}],returns:["computer","null"]},start_terminal:{type:"function",arguments:[{label:"self",type:"shell"}],returns:["null"]},build:{type:"function",arguments:[{label:"self",type:"shell"},{label:"pathSource",type:"string"},{label:"pathBinary",type:"string"},{label:"allowImport",type:"number",default:{type:"number",value:0}}],returnVariations:["pathSource and programName can't be empty","Invalid shell","Unknown error: Unable to access to local computer","Can't find ${pathSource}","Can't find ${pathBinary}","Can't access to ${pathSource}. Permission denied.","Can't build ${pathSource}. Binary file","Can't create binary in ${pathBinary}. Permission denied.","Can't build ${pathSource}. Invalid extension.","Can't compile. Source code is empty"],returns:["string"]},connect_service:{type:"function",arguments:[{label:"self",type:"shell"},{label:"ip",type:"string"},{label:"port",type:"number"},{label:"user",type:"string"},{label:"password",type:"string"},{label:"service",type:"string",default:{type:"string",value:"ssh"}}],returnVariations:["Unknown error: Unable to access to local computer","Direct connections cannot be made outside of this network","!PlayerUtils.ConnectToService","!PlayerUtils.ConnectComputer","!Networking.CheckServiceOnline"],returns:["shell","ftpShell","string","null"]},launch:{type:"function",arguments:[{label:"self",type:"shell"},{label:"program",type:"string"},{label:"params",type:"string",default:{type:"string",value:""}}],returns:["string","number"]},ping:{type:"function",arguments:[{label:"self",type:"shell"},{label:"ip",type:"string"}],returnVariations:["ping: invalid ip address",1,0],returns:["string","number","null"]},scp:{type:"function",arguments:[{label:"self",type:"shell"},{label:"sourceFile",type:"string"},{label:"destinationFolder",type:"string"},{label:"remoteShell",type:"shell"}],returnVariations:["${sourceFile} not found","${destinationFolder} not found","${destinationFolder} it's not a folder","!GreyInterpreter.CheckScpUpload",1],returns:["number","string","null"]},get_balance_subwallet:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["get_balance: The account does not exist.","Unknown error: Unable to access to local computer","No internet access."],returns:["number","string","null"]},set_info:{type:"function",arguments:[{label:"self",type:"subWallet"},{label:"info",type:"string"}],returnVariations:["Error: exceeded maximum of 256 characters","Unknown error: Unable to access to local computer","No internet access.","!BlockchainSystem.SetInfoSubWallet",1],returns:["number","string","null"]},get_info:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","!BlockchainSystem.GetInfoSubWallet"],returns:["string","null"]},delete_subwallet:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.",1,0],returns:["string","number","null"]},get_user:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","null"]},last_transaction:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.",0],returns:[{type:"list",valueType:"list"},"number","string","null"]},mining:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","all existing coins of ${coinName} have been mined.","Only one mining process is allowed.","Error: GPU is damaged. Unable to start the mining process.","Error: GPU returned corrupted data while performing floating point tests. Unable to start the mining process.","Hardware error",1],returns:["number","string","null"]},check_password:{type:"function",arguments:[{label:"self",type:"subWallet"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","login_subwallet: the account does not exist.",1,0],returns:["number","string","null"]},wallet_username:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","null"]},list_coins:{type:"function",arguments:[{label:"self",type:"wallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","Error: wallet does not exist/incorrect credentials."],returns:[{type:"list",valueType:"string"},"string","null"]},get_balance:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","Error: wallet does not exist/incorrect credentials.","get_balance: wallet does not have coins in the selected currency"],returns:["number","string","null"]},buy_coin:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"},{label:"coinAmount",type:"number"},{label:"unitPrice",type:"number"},{label:"subwalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","sell_coin: coin amount and proposed price cannot be 0.","!BlockchainSystem.BuyCoin",1],returns:["number","string"]},sell_coin:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"},{label:"coinAmount",type:"number"},{label:"unitPrice",type:"number"},{label:"subwalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","sell_coin: coin amount and proposed price cannot be 0.","!BlockchainSystem.SellCoin",1],returns:["number","string"]},get_pending_trade:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","No pending trades found"],returns:["string","list","null"]},cancel_pending_trade:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","No pending trades found"],returns:["string","null"]},get_global_offers:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string",{type:"map",keyType:"string",valueType:"list"},"null"]},list_global_coins:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string",{type:"list",valueType:"string"},"null"]},show_nodes:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","show_nodes: wallet does not exist","show_nodes: coin does not exist"],returns:["string","number","null"]},reset_password:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"newPassword",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","reset_password: only alphanumeric characters are allowed as password","reset_password: name and password cannot exceed the 16 character limit.","!BlockchainSystem.ResetWalletPass",1],returns:["number","string","null"]},get_pin:{type:"function",arguments:[{label:"self",type:"wallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","null"]},delete_mail:{type:"function",arguments:[{label:"self",type:"metaMail"},{label:"mailId",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","read: No internet access.",1],returns:["number","string","null"]},fetch:{type:"function",arguments:[{label:"self",type:"metaMail"}],returnVariations:["Unknown error: Unable to access to local computer","fetch: No internet access."],returns:[{type:"list",valueType:"string"},"string","null"]},read:{type:"function",arguments:[{label:"self",type:"metaMail"},{label:"mailId",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","fetch: No internet access.","Mail not found"],returns:["string","null"]},send:{type:"function",arguments:[{label:"self",type:"metaMail"},{label:"emailAddress",type:"string"},{label:"subject",type:"string"},{label:"message",type:"string"}],returnVariations:["The mail could not be sent. Wait a moment before sending another email.","Unknown error: Unable to access to local computer","read: No internet access.","read: No email account registered","!PlayerUtils.SendMail","!Database.GetMailAccount","Mail not delivered",1],returns:["string","number","null"]},port_number:{type:"function",arguments:[{label:"self",type:"port"}],returns:["number","null"]},is_closed:{type:"function",arguments:[{label:"self",type:"port"}],returnVariations:[0,1],returns:["number","null"]},get_lan_ip:{type:"function",arguments:[{label:"self",type:"port"}],returns:["string","null"]},reset_ctf_password:{type:"function",arguments:[{label:"newPassword",type:"string"}],returnVariations:["reset_ctf_password: password cannot be null","reset_ctf_password: password can't exceed the maximum limit of 32 characters","reset_ctf_password: password must be alphanumeric","reset_ctf_password: you do not have a registered CTF account",1],returns:["number","string"]},funcRef:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]},list:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]},map:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]},number:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]},string:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]},scan_debuglib:{type:"function",arguments:[{label:"self",type:"debugLibrary"}],returnVariations:["error: file not found","No potential issues have been found",`Potential problems have been found in the following code:
209
+ `)),{contents:s.toString()}})}n.connection.onHover(t=>B(this,null,function*(){if(!n.getConfiguration().hoverdocs)return;let i=yield n.fs.getTextDocument(t.textDocument.uri);if(i==null)return;let s=new qq.LookupHelper(i,n),o=s.lookupAST(t.position);if(!o)return;if(o.closest.type===Mq.ASTType.ImportCodeExpression)return yield e(i,o);if(o.closest.type===W0.ASTType.FeatureImportExpression||o.closest.type===W0.ASTType.FeatureIncludeExpression)return yield r(i,o);let l=yield s.lookupTypeInfo(o);if(!l)return;if(l.isCallable())return(0,Zb.createHover)(l);let u=new Jb.MarkdownString(""),a=Array.from(l.types).map(Qb.SignatureDefinitionTypeMeta.parse),c=`(${l.kind}) ${l.label}: ${(0,Zb.formatTypes)(a)}`;if(l.types.has(Qb.SignatureDefinitionBaseType.Map)){let p={};for(let[d,h]of l.values){let g=Array.from(h.types).map(Qb.SignatureDefinitionTypeMeta.parse);p[d.slice(2)]=(0,Zb.formatTypes)(g)}c+=" "+JSON.stringify(p,null,2)}return u.appendCodeblock(Fq.LanguageId,c),{contents:u.toString()}}))}bi.activate=Nq});var K0=S(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});up.activate=void 0;var G0=me(),$q=ks(),Uq=lp(),Bq=n=>{if(n.closest.type===G0.ASTType.CallExpression)return n.closest;for(let e=n.outer.length-1;e>=0;e--){let r=n.outer[e];if(r.type===G0.ASTType.CallExpression)return r}return null};function Wq(n){n.connection.onSignatureHelp(e=>B(this,null,function*(){if(!n.getConfiguration().autocomplete)return;let r=yield n.fs.getTextDocument(e.textDocument.uri);if(r==null)return;yield n.documentManager.getLatest(r);let t=new $q.LookupHelper(r,n),i=t.lookupAST(e.position);if(!i)return;let{closest:s}=i,o=Bq(i);if(o===null)return;let l=yield t.lookupTypeInfo({closest:o.base,outer:s.scope?[s.scope]:[]});if(!l||!l.isCallable())return;let a=o.arguments.findIndex(p=>{let d=p.start.character-1,h=p.end.character;return d<=e.position.character&&h>=e.position.character}),c={activeParameter:a===-1?0:a,signatures:[],activeSignature:0};return c.signatures.push(...(0,Uq.createSignatureInfo)(l)),c}))}up.activate=Wq});var Q0=S(cp=>{"use strict";Object.defineProperty(cp,"__esModule",{value:!0});cp.activate=void 0;var Y0=Xi();function Vq(n){let e=t=>t.languageId!==Y0.LanguageId?!1:n.documentManager.schedule(t),r=t=>{t.languageId===Y0.LanguageId&&n.documentManager.clear(t)};n.fs.on("text-document-open",e),n.fs.on("text-document-change",e),n.fs.on("text-document-close",r)}cp.activate=Vq});var Z0=S(J0=>{"use strict";Object.defineProperty(J0,"__esModule",{value:!0});var Te=en();Te.VariationRegistry.add("GreyInterpreter.CheckScpUpload",["unknown error","Invalid path","${filepath} not found","permission denied","permission denied. ${filename} is protected","The copy can not be made. Reached maximum number of files in a folder","The copy can not be made. Reached maximum limit"]);Te.VariationRegistry.add("PlayerUtils.ConnectComputer",["ip address not found","can't connect: the remote server has been temporarily disabled due to non-payment","can't connect: port ${port} not found","can't connect: port closed","can't connect: There is no active machine behind the port ${port}","can't connect: service not found behind the port ${port}"]);Te.VariationRegistry.add("PlayerUtils.RenameFichero",["Unknown error","${filepath} not found","Error: name cannot exceed the limit of 128 characters.","permission denied","permission denied. File protected","There is already a file with that name, please choose another one."]);Te.VariationRegistry.add("PlayerUtils.FirewallPingStatus",["Connection refused. Address unreachable","Connection refused. The target is behind a firewall."]);Te.VariationRegistry.add("Computer.CheckInicio",["Fatal error: ${filepath} corrupted!","Kernel panic: missing ${filepath} file!","Graphics error: ${filepath} not found!","Fatal error: ${filepath} not found!"]);Te.VariationRegistry.add("Networking.CheckServiceOnline",["No internet access.","Remote host is down","Unable to find service ${service}","Invalid target service port configuration.","connection rejected: port forward removed by admin","Unable to connect: missing ${library}","Unable to connect: invalid ${library}","Unexpected library found. Not a valid ${library} library.","Unknown error"]);Te.VariationRegistry.add("Networking.IsRouterAvailable",["can't connect: invalid or missing kernel_router.so in the target router","can't connect: unexpected library found. Not a valid kernel_router.so library in the target router.","can't connect: invalid or missing kernel_router.so in the target router"]);Te.VariationRegistry.add("BlockchainSystem.AddWallet",["Error: Wallet user already exists.","Error: Only one wallet per player allowed."]);Te.VariationRegistry.add("BlockchainSystem.RemoveCurrency",["Error: ${coinname} does not exist","Error: incorrect user/password"]);Te.VariationRegistry.add("BlockchainSystem.AddSubWallet",["Error: Wallet does not exists.","Error: Coin does not exist.","Error: This username already exists","Error: Incorrect PIN","Error: only a maximum of 10 subwallets per coin is allowed."]);Te.VariationRegistry.add("BlockchainSystem.Transaction",["Error: coin does not exist","Error: ${subWalletOrig} not found","Error: ${subWalletDest} not found","Error: wallet ${subWalletOrig} does not exist","Error: target wallet does not exist","${subWalletOrig} need to be registered in ${coinName} to be able to receive this coin.","Error: subwallet ${subWalletDest} does not have coins in the selected currency","Error: insufficient funds to complete the transaction"]);Te.VariationRegistry.add("BlockchainSystem.SetAddress",["Error: ${coinName} does not exist"]);Te.VariationRegistry.add("BlockchainSystem.GetAddress",["Error: ${coinName} does not exist"]);Te.VariationRegistry.add("BlockchainSystem.ResetCoinPass",["Error: coin does not exist","Error: Only the account owner can change the password"]);Te.VariationRegistry.add("PlayerUtils.CrearCarpeta",["Unknown error.","Error: empty destination path","Error: only alphanumeric allowed as folder name.","Error: name cannot exceed the limit of 128 characters.","permission denied","${filename} file exists","Can't create folder. Reached maximum limit","The copy can not be made. Reached maximum number of files in a folder","The maximum number of subfolders has been exceeded"]);Te.VariationRegistry.add("PlayerUtils.CrearArchivo",["Can't create file. Unknown error","Can't create file. Reached maximum limit","Invalid path","Can't create file ${pathFolderDest}/${filename}. Permission denied","There is not enough free space on the hard disk.","The copy can not be made. Reached maximum number of files in a folder"]);Te.VariationRegistry.add("Computer.ValidateNewUser",["Error: root user already exists.","Error: can't create guest user. Reserved user.","Error: can't create user. ${username} already exists."]);Te.VariationRegistry.add("NetworkLan.ConnectEthernet",["Error: Ethernet card not connected to the network","Unable to find ISP network to connect using Ethernet card","can't connect: the home network has been temporarily disabled due to non-payment","Error: the gateway cannot be the same device to connect","Error: gateway ${gateway} does not exist in the network","Error: address ${address} is already in use.","Unknown error: The current IP ${localIp} does not exist in this network","Error: unable to run command on routers/switches"]);Te.VariationRegistry.add("PlayerUtils.GetSmtpServer",["invalid IP address","host is down","host doesn't exist","ip address not found","port ${port} not found","host doesn't exist","invalid target service","service not found"]);Te.VariationRegistry.add("FileSystem.UpdatePermisos",["permission denied","permission denied. File protected.","Wrong format."]);Te.VariationRegistry.add("PlayerUtils.MoverFichero",["Unknown error","Error: Invalid path","${sourceFilepath} not found","${destinationParentPath} not found","permission denied","There is not enough free space on the hard disk.","permission denied. ${filename} is protected.","A file cannot overwrite a folder or vice versa","The copy can not be made. Reached maximum number of files in a folder","The copy can not be made. Reached maximum limit"]);Te.VariationRegistry.add("PlayerUtils.RemoveFile",["file not found: ${path}","permission denied","permission denied. File protected.","unknown error :/"]);Te.VariationRegistry.add("Database.GetMailAccount",["Unable to login into account. Wrong password.","${user} user not found","Unknown error: This email account cannot be obtained.","Unable to login into account. Wrong password."]);Te.VariationRegistry.add("PlayerUtils.SendMail",["Invalid email address","Mail subject too large","Mail message too large","Unknown error: attachment failed","Error: attachment not found","Unable to attach file: permission denied","The email couldn't be sent. The recipient has blocked this email address.","The email couldn't be sent. The recipient has blocked emails sent by other players.","The email couldn't be sent. The recipient has blocked emails sent by other players using npcs accounts."]);Te.VariationRegistry.add("PlayerUtils.ConnectToService",["Invalid service ID","can't connect: incorrect user/password"]);Te.VariationRegistry.add("BlockchainSystem.SetInfoSubWallet",["Error: ${coinName} does not exist","Error: ${subWalletUser} does not exist","Error: main wallet linked to ${subWalletUser} does not exist anymore"]);Te.VariationRegistry.add("BlockchainSystem.GetInfoSubWallet",["Error: ${coinName} does not exist","Error: ${subWalletUser} does not exist","Error: main wallet linked to ${subWalletUser} does not exist anymore","Error: Coin ${coinName}does not exist in the Wallet user"]);Te.VariationRegistry.add("BlockchainSystem.ResetWalletPass",["Error: Wallet does not exist.","Error: Only the account owner can change the password","Error: The password can only be reset once a day"]);Te.VariationRegistry.add("BlockchainSystem.SellCoin",["Error: Coin ${coinName} does not exist","Error: Wallet does not exist","Subwallet ${subwalletID} does not exist","Error: subwallet does not contain enough coins to sell","Error: exceeded maximum of 21 million coins","Purchase failed: It is necessary to create a bank account to make transactions","Error: You already have a pending sale. Cancel it to create a new sale.","Error: You already have a pending purchase. Cancel it to create a new sale.","Not enough buyers found. Transaction is pending until a buyer is found.","A partial transaction has occurred. The data of your offer has been updated"]);Te.VariationRegistry.add("BlockchainSystem.BuyCoin",["Error: Coin ${coinName} does not exist","Error: Wallet does not exist","You need to be registered in ${coinName} to be able to buy this coin.","Subwallet ${subwalletID} does not exist","Purchase failed: It is necessary to create a bank account to make transactions","Purchase failed: Insufficient money in the bank. Required $${price}","Error: You already have a pending sale. Cancel it to create a new purchase.","Error: You already have a pending purchase. Cancel it to create a new purchase.","Not enough sellers found. Transaction is pending until a seller is found.","A partial transaction has occurred. The data of your offer has been updated"])});var X0=S((sV,Hq)=>{Hq.exports={insert:{description:"Inserts a value into either a `list` or a `string`. If the passed index is not a `number`, this method throws an error, preventing further script execution.",example:["list = [2, 3, 4]","list.insert(2, 42)",'print("List with inserted item: " + list.join(", "))']},indexOf:{description:"Lookups index of value within `map`s, `list`s, or `string`s. For `list`s and `string`s, the behavior is very similar. On success, you'll receive a `number` representing the found index. On failure, it will return `null`. For `map`s, it's a bit different since the returned value could be of any type. On failure, it will return `null` as well.",example:['index = "test".indexOf("e")','print("e is at: " + index)']},hasIndex:{description:"Verifies if an index is available within an object. In case of success this method will return a `number` with the value one. In case of failure the value will be a zero. This method supports `map`s, `list`s and `string`s. Each passed type may result in different behavior therefore it is advisable to take a look at each of their specific signatures.",example:['print("List has index: " + [1, 2, 3].hasIndex(2)']},remove:{description:"Depending on the data type, this function will remove a value in the provided object, potentially mutating the object. This method works with `map`s, `list`s, and `string`s. Each passed type may support different types for the `key` argument. For example, using this method on a string would treat the key as a character index. Therefore, it is advised to review the signatures of each type. Passing a key with the type `null` may cause an error to be thrown, preventing further script execution.",example:["list = [9, 3, 5, 7]","list.remove(5)",'print("List after removal: " + list.join(", "))']},push:{description:"Allows pushing a value into an object, supporting `map`s and `list`s. However, it throws an error if you attempt to push a value into itself or into a map-like object such as a `file`, halting further script execution.",example:["list = [0, 1, 2, 3, 4, 5]","list.push(42)",'print("The answer to everything is: " + list.pop)']},pull:{description:"When passing a `list` to this method, it will return the value at the first index and remove it from the `list`. Additionally, if a `map` is passed, it will always return the value corresponding to the first matching key and mutate the `map` object accordingly. However, passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution.",example:["myList = [42, 1, 3]","answer = myList.pull",'print("Answer to everything: " + answer)']},pop:{description:"When passing a `list` to this method, it will return the value at the last index and remove it from the `list`. Additionally, if a `map` is passed, it will always return the value corresponding to the first matching key and mutate the `map` object accordingly. However, passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution.",example:["list = [0, 1, 2, 3, 4, 5]",'print("The last item is: " + list.pop)']},shuffle:{description:"Randomizes content of an object. Valid data types for this method are `list` and `map`. In case a map-like object such as a `file` or `computer` a runtime exception will be thrown.",example:["list = [0, 1, 2, 3, 4, 5]","list.shuffle",'print("And the winner is: " + list[0])']},sum:{description:"Returns a `number` representing the sum of all items within a `map` or a `list`.",example:["list = [0, 1, 2, 3, 4, 5]",'print("Sum of all items is: " + list.sum)']},indexes:{description:"Returns a `list` containing all indexes or keys of the passed object. This method supports `map`s, `list`s, and `string`s. The type of each item may vary when using this method on a `map` since keys could be any type. The other types will return a `list` where each item is a `number`.",example:['indexesOfStr = "test".indexes','print("Following indexes are available: " + indexesOfStr.join(", "))']},len:{description:"Returns `number` indicating what size the object is.",example:['length = "test".len','print("Length of string is: " + length)']},values:{description:"Returns a `list` containing all values of an object.",example:['indexesOfStr = "test".values','print("Following values are available: " + indexesOfStr.join(", "))']}}});var e1=S((oV,zq)=>{zq.exports={$meta:{description:'A `aptClient` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"aptclientLib"`.'},show:{description:'Show displays all the packages available in a repository. The repository must be listed in the `"/etc/apt/sources.txt"` file. If the provided repository value is anything other than a `string`, this method will return `null`. If it cannot find a repository, it will return various error messages. On success, it will return a `string` containing all packages and their descriptions, with each entry separated by a newline.',example:['aptClient = include_lib("/lib/aptclient.so")','packages = aptClient.show("177.202.15.132")',"packageList = packages.split(char(10) + char(10))","packageList.pop // remove last empty item","for packageItem in packageList"," entry = packageItem.split(char(10))"," packageName = entry[0]"," packageDescription = entry[1]",' print "Title: <b>" + packageName + "</b>"',' print "Description: <i>" + packageDescription + "</i>"',' print "----------------------------"',"end for"]},search:{description:'Search specifically looks for a package in any of the repositories listed in `"/etc/apt/sources.txt"`. If the provided search value is anything other than a `string`, this method will return `null`. On success, it will return a `string` containing all packages that partially match the provided search value. On failure, it will return a `string` with various error messages.',example:['aptClient = include_lib("/lib/aptclient.so")','packages = aptClient.search(".so")',"packageList = packages.split(char(10) + char(10))","for packageItem in packageList"," entry = packageItem.split(char(10))"," if entry.len != 2 then",' print "something wrong in: " + entry'," continue"," end if"," packageName = entry[0]"," packageDescription = entry[1]",' print "Title: <b>" + packageName + "</b>"',' print "Description: <i>" + packageDescription + "</i>"',' print "----------------------------"',"end for"]},update:{description:'Update refreshes the list of available packages after adding a new repository in `"/etc/apt/sources.txt"`, or if the remote repository has updated its information in `"/server/conf/repod.conf"`. If the update is successful, an empty `string` will be returned. In case of failure, a `string` with an error message will be returned. If for some reason the `"/etc/apt/sources.txt"` is malformed this method will return a number with the value zero.',example:['aptClient = include_lib("/lib/aptclient.so")',"result = aptClient.update",'if result == "" then',' print "Update successful!"',"else",' print "Error while updating: " + result',"end if"]},add_repo:{description:'Inserts a repository address into the `"/etc/apt/sources.txt"` file. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return an empty `string`. In case of failure, it will return a `string` with an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = aptClient.add_repo("177.202.15.132")','if result == "" then',' print "Addition successful!"',"else",' print "Error while adding: " + result',"end if"]},del_repo:{description:'Deletes a repository address from the `"/etc/apt/sources.txt"` file. If the provided repository value is anything other than a `string`, this method will return `null`. On success, it will return an empty `string`. In case of failure, it will return a `string` with an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = aptClient.del_repo("177.202.15.132")','if result == "" then',' print "Deletion successful!"',"else",' print "Error while deleting: " + result',"end if"]},install:{description:'Installs a program or library from a remote repository listed in `"/etc/apt/sources.txt"`. If no path is specified, the program installs in `"/lib"` if it is a library or in `"/bin"` otherwise. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, this method will return a `number` with the value one. In case of failure, it will return a `string` containing an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = aptClient.install("rshell_interface")',"if result == 1 then",' print "Installed program successful!"',"else",' print "Error while installing: " + result',"end if"]},check_upgrade:{description:"Checks if there is a newer version of the program or library in the repository. If the provided filepath value is anything other than a `string`, this method will return `null`. On success, it will return a `number`, which can be either zero or one. Zero indicates that there is no new version, while one indicates that there is a new version available. In case of failure, it will return a string containing an error message.",example:['aptClient = include_lib("/lib/aptclient.so")','result = aptClient.check_upgrade("/bin/rshell_interface")',"if result == 0 then",' print "Program doesnt need an update!"',"else if result == 1 then",' print "Program does need an update!"',"else",' print "Error while checking version: " + result',"end if"]}}});var t1=S((aV,Gq)=>{Gq.exports={$meta:{description:'A `blockchain` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"blockchainLib"`.'},coin_price:{description:"Returns a `number` representing the current unit value of the cryptocurrency. In case of an error, a `string` with the error details will be returned. If the provided `coinName` is anything other than a `string`, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','price = blockchain.coin_price("test")','if typeof(price) == "string" then',' exit "Couldnt get coin price due to: " + price',"end if",'print "Your coin price is " + price']},show_history:{description:"Returns a `map` with the latest changes in the value of a specific cryptocurrency. The key of the `map` is an index represented by a `number`. The value is a `list`, where index 0 is the historical price of the coin and index 1 is the date when the price change occurred. If the provided `coinName` is anything other than a `string` or if no coin exists with this name, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','history = blockchain.show_history("test")','if typeof(history) == "string" then',' exit "Couldnt fetch history due to: " + history',"else if history == null then",' exit "There doesnt seem to be a coin"',"end if","for entry in history.values"," price = entry[0]"," date = entry[1]",' print "The price on " + date + " was " + price',"end for"]},amount_mined:{description:"Returns a `number` representing the total amount of mined coins. In case of an error, it will return a `string` with the details. If the provided coinName is anything other than a `string`, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','mined = blockchain.amount_mined("test")','if typeof(mined) == "string" then',' exit "Couldnt get amount mined due to: " + mined',"end if",'print "Your mined amount is " + mined']},get_coin:{description:"Returns a `coin` object used to manage the currency. In case of an error, it will return a `string` with the details. If any of the provided parameters deviate from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','if typeof(coin) != "coin" then',' exit "Couldnt get coin object due to: " + coin',"end if",'print "Your coin address is " + coin.get_address']},get_coin_name:{description:"Returns a `string` with the name of the coin owned by the player. In case of an error, it returns a `string` with details. If any provided parameters deviate from the defined signature, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coinName = blockchain.get_coin_name("test", "test")','if not coinName.matches("^[A-Z]+$") then',' exit "Couldnt get coin name due to: " + coinName',"end if",`print "The name of the coin you're owning is " + coinName`]},login_wallet:{description:"Returns a `wallet` object on success. In case of an error, it will return a `string` indicating the reason. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','if typeof(wallet) == "string" then',' print "Login failed due to: " + wallet',"else",' print "Login was successful!"',"end if"]},create_wallet:{description:"Creates a `wallet` and returns a `wallet` object on success, which can be used to manage cryptocurrencies. In case of an error, it will return a `string` with the details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.create_wallet("test", "test")','if typeof(wallet) == "string" then',' print "Wallet creation failed due to: " + wallet',"else",' print "Wallet creation was successful!"',"end if"]},delete_coin:{description:"Removes a cryptocurrency from the world. The credentials used in the creation of the cryptocurrency are required. On success, it will return a `number` with the value one. On failure, it will return a `string` containing details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','result = blockchain.delete_coin("test", "test", "test")','if typeof(result) == "string" then',' exit "Couldnt delete coin due to: " + result',"end if",'print "Coin got deleted"']}}});var n1=S((lV,Kq)=>{Kq.exports={$meta:{description:"A class or object is a `map` with a special `__isa` entry that points to the parent. This is set automatically when you use the `new` operator.",example:['Shape = { "sides": 0 }',"Square = new Shape","Square.sides = 4","x = new Square","print(x.sides) // 4"]}}});var r1=S((uV,Yq)=>{Yq.exports={$meta:{description:'A `coin` object can be obtained by using [get_coin](#BLOCKCHAIN_GET_COIN). The `classID` used for this object is `"coin"`.'},set_cycle_mining:{description:"Defines the interval (in-game hours) in which each user receives a coin reward when mining. The interval cannot be lower than 1 and not higher than 2160. If the provided `rateHours` is not a `number`, this method will return `null`. On success, it will return a `number` with the value one. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.set_cycle_mining(20)","if result == 1 then",' print "Successful updated mining interval"',"else",' print "Failed updating mining interval"',"end if"]},get_cycle_mining:{description:"Returns a `number` representing the defined interval in which each user receives a coin reward when mining. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_cycle_mining",'if typeof(result) == "string" then',' exit "Failed getting cyclic mining value due to: " + result',"end if",'print "cyclic mining value: " + result']},get_reward:{description:"Returns a `number` representing the amount of coins that will be received as a reward after each mining cycle. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_reward",'if typeof(result) == "string" then',' exit "Failed getting reward value due to: " + result',"end if",'print "reward value: " + result']},set_reward:{description:"Assigns the reward that miners will receive after each mining cycle. The reward value has to be above one. If the provided `coinAmount` is not a `number`, this method will return `null`. On success, it will return a `number` with the value one. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.set_reward(-1)",'if typeof(result) == "string" then',' exit "Failed setting reward due to: " + result',"end if",'print "Successfully set reward!"']},transaction:{description:"Facilitates a transaction of the currency between the indicated subwallets. In case of an error, a `string` with the details is returned. In case of success, a `number` with a value of one will be returned. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','result = coin.transaction("test", "test2", 20)','if typeof(result) == "string" then',' exit "Failed transaction due to: " + result',"end if",'print "Successfully transfered!"']},create_subwallet:{description:"Registers a new account in the `coin` that can be used to manage services such as stores. It is necessary to provide the PIN of the owner's `wallet` that wants to register. In case of success, the method will return a `number` with the value one. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. In case of an error, a `string` with the details is returned.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','wallet = blockchain.login_wallet("test", "test")','result = coin.create_subwallet("test", wallet.get_pin, "test", "test")','if typeof(result) == "string" then',' exit "Failed to create subwallet due to: " + result',"end if",'print "Successfully created subwallet!"']},get_subwallet:{description:"Returns a `subWallet` object on success. In case of error, it returns a `string` with the details. If the provided `subWalletUser` is not a `string`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','result = coin.get_subwallet("test")','if typeof(result) == "string" then',' exit "Failed to get subwallet due to: " + result',"end if",'print "Successfully received subwallet!"']},get_subwallets:{description:"Returns a `list` where each item is a `subWallet` object, including all the accounts registered in the cryptocurrency. In case of error, it returns a `string` with the details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_subwallets",'if typeof(result) == "string" then',' exit "Failed to get subwallets due to: " + result',"end if","for subwallet in result",' print subwallet.get_user + " has " + subwallet.get_balance + " coins"',"end for"]},set_address:{description:"Configures a valid address that will be shown to users who do not have the currency, indicating where to register. In case of an error, it returns a `string` with the details. In case of success, a `number` with a value of one will be returned. If the provided address is not a `string`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','result = coin.set_address("12.12.12.12")','if typeof(result) == "string" then',' exit "Failed to set address due to: " + result',"end if",'print "Successfully set address!"']},get_address:{description:"Returns the configured address that will be shown to users who do not have the currency, indicating where they have to register. In case of an error, it returns a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_address","if not is_valid_ip(result) then",' exit "Failed to get address due to: " + result',"end if",'print "address: " + result']},get_mined_coins:{description:"Returns a `number` representing the amount of coins that have been mined so far. In case of an error, it returns a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_mined_coins",'if typeof(result) == "string" then',' exit "Failed to get mined coins due to: " + result',"end if",'print "mined coins: " + result']},reset_password:{description:"Resets the password of the coin. It returns a `number` with the value one if resetting was successful; otherwise, it will return a `string`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','result = coin.reset_password("test")','if typeof(result) == "string" then',' exit "Failed to reset password due to: " + result',"end if",'print "Successfully reset password"']}}});var i1=S((cV,Qq)=>{Qq.exports={$meta:{description:'A `computer` object can be obtained by either using [host_computer](#SHELL_HOST_COMPUTER) or [overflow](#METALIB_OVERFLOW). The `classID` used for this object is `"computer"`.'},get_ports:{description:"Returns a `list` of `port`s on the `computer` that are active.",example:["router = get_router","ports = get_shell.host_computer.get_ports","for port in ports",' print("Info: " + router.port_info(port))',"end for"]},get_name:{description:"Returns the hostname of the machine.",example:["computerName = get_shell.host_computer.get_name",'print("The name of your machine is " + computerName)']},local_ip:{description:"Returns a `string` with the local IP address of the `computer`.",example:["localIp = get_shell.host_computer.local_ip",'print("Local ip:" + localIp)']},public_ip:{description:"Returns a `string` with the public IP address of the `computer`.",example:["publicIp = get_shell.host_computer.public_ip",'print("Public ip:" + publicIp)']},File:{description:"Returns a `file` located at the path provided in the arguments. The path can be either relative or absolute. It's important to note that any `file` object can represent a folder as well. If the provided path cannot be resolved, meaning that no file or folder exists, this method will return `null`. Providing any other type than `string` or an empty value for the path will result in an error, interrupting the script execution.",example:['filePath = "/etc/passwd"',"file = get_shell.host_computer.File(filePath)","if file != null then"," print(file.get_content)","else",' print("File at given path " + filePath + " does not exist.")',"end if"]},create_folder:{description:"Creates a folder at the path provided in the arguments. There are certain limitations to creating a folder: the folder name has to be alphanumeric and below 128 characters. Creation will fail if there is already a folder in place or if there are lacking permissions. Additionally, there is a folder limit of about 250 in each folder and 3125 folders in the computer overall. In case the folder creation fails, the method will return a `string` with details. In case of success, it will return a `number` with the value one. Providing any type that deviates from the signature or using this method in an SSH encryption process will cause an error to be thrown, aborting further script execution.",example:['path = "/home/" + active_user + "/Desktop"',"hostComputer = get_shell.host_computer",'createResult = hostComputer.create_folder(path, "myfolder")','if typeof(createResult) == "string" then',' print("There was an error when creating the folder: " + createResult)',"else",' print("Folder got created at given path " + path)',"end if"]},is_network_active:{description:"Returns a `number` with either the value one or zero. If the `computer` has internet access, the value will be one. If there is no internet access, it will return zero instead.",example:["hostComputer = get_shell.host_computer","if hostComputer.is_network_active then",` print("You're connected.")`,"else",` print("You're not connected.")`,"end if"]},touch:{description:"Creates an empty text `file` at the provided path. Certain limitations apply to file creation: the `file` name must be alphanumeric and below 128 characters. Creation will fail if there is already a `file` in place or if permissions are lacking. Additionally, there is a file limit of about 250 in each folder and 3125 files in the computer overall. In case of success, it returns a `number` with the value one. In case of failure, it returns a `string` with details. Using this method in an SSH encryption process will cause an error to be thrown, preventing any further script execution.",example:['path = "/home/" + active_user + "/Desktop"',"hostComputer = get_shell.host_computer",'createResult = hostComputer.touch(path, "myFile.txt")','if typeof(createResult) == "string" then',' print("There was an error when creating the file: " + createResult)',"else",' print("File got created at given path " + path)',"end if"]},show_procs:{description:"Returns a `string` with an overview of all active processes on the `computer`, including information about the user, PID, CPU, memory, and command. Using this method in an SSH encryption process will cause an error to be thrown, preventing any further script execution.",example:["hostComputer = get_shell.host_computer","procs = hostComputer.show_procs","list = procs.split(char(10))[1:]","processes = []","for item in list",' parsedItem = item.split(" ")'," process = {}"," process.user = parsedItem[0]"," process.pid = parsedItem[1]"," process.cpu = parsedItem[2]"," process.mem = parsedItem[3]"," process.command = parsedItem[4]"," processes.push(process)","end for","print(processes)"]},network_devices:{description:"Returns a `string` containing information about all network devices available on the `computer`. Each item includes details about the interface name, chipset, and whether monitoring support is enabled.",example:["hostComputer = get_shell.host_computer","devices = hostComputer.network_devices","deviceList = devices.split(char(10))","for item in deviceList"," print(item)","end for"]},change_password:{description:"Changes the password of an existing user on the `computer`. Root access is necessary to successfully change the password. Passwords can only include alphanumeric characters and cannot exceed 15 characters. If the password change fails, this method will return a `string` containing information on why it failed. If the change succeeds, it will return a `number` with the value one. If the provided username is empty, an error will be thrown, preventing any further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','changeResult = hostComputer.change_password("test", "newPassword")','if typeof(changeResult) == "string" then',' print("There was an error when changing the password: " + changeResult)',"else",' print("Password got successfully changed.")',"end if"]},create_user:{description:"Creates a user on the `computer` with the specified name and password. Root access is necessary to successfully create a user. Both the username and password cannot exceed more than 15 characters and must be alphanumeric. There cannot be more than 15 users created on the same `computer`. If the creation fails, this method will return a `string` containing the reason for the failure. On success, it will return a `number` with the value one. If the provided username is empty or either of the values exceeds 15 characters, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','creationResult = hostComputer.create_user("newUser", "123")','if typeof(creationResult) == "string" then',' print("There was an error when creating an user: " + creationResult)',"else",' print("User got successfully created.")',"end if"]},delete_user:{description:"Deletes the indicated user from the `computer`. It can optionally delete the user's home folder as well, although by default the home folder will not be deleted. Root access is necessary to successfully delete a user. Keep in mind that you cannot delete the root user. If the deletion fails, this method will return a `string` containing the cause of failure. On success, it will return a `number` with the value one. If the provided username is empty, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','deletionResult = hostComputer.delete_user("test", true)','if typeof(deletionResult) == "string" then',' print("There was an error when deleting an user: " + deletionResult)',"else",' print("User got successfully deleted.")',"end if"]},create_group:{description:"Creates a new group associated with an existing user on the `computer`. Root access is necessary to successfully create a group. There are limitations when creating a group, such as a character limit of 15 and that the group name may only contain alphanumeric characters. If the group creation fails, this method will return a `string` containing the cause of failure. On success, it will return a `number` with the value one. If the provided arguments are empty or the username exceeds 15 characters, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','creationResult = hostComputer.create_group("test", "staff")','if typeof(creationResult) == "string" then',' print("There was an error when creating a group: " + creationResult)',"else",' print("Group got successfully created.")',"end if"]},delete_group:{description:"Deletes an existing group associated with an existing user on the `computer`. Root access is necessary to successfully delete a group. If the group deletion fails, this method will return a `string` containing the cause of failure. On success, it will return a `number` with the value one. If either of the provided values is empty, an error will be thrown, preventing further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','deletionResult = hostComputer.delete_group("test", "staff")','if typeof(deletionResult) == "string" then',' print("There was an error when deleting a group: " + deletionResult)',"else",' print("Group got successfully deleted.")',"end if"]},groups:{description:"Returns a `string` containing groups associated with an existing user on the `computer`. If the user does not exist, a `string` with an error message will be returned. If the provided username is empty, an error will be thrown, preventing further script execution. If the provided username is anything other than a `string`, this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','hostComputer.create_group("root", "staff")','groups = hostComputer.groups("root")',"listOfGroups = groups.split(char(10))","print(listOfGroups)"]},close_program:{description:"Closes a program associated with the provided PID. You can see the `list` of active programs by either using `show_procs` or typing ps into your terminal. To close a program, you need to either be the owner of the running process or root. If closing the program fails, this method will return a `string` containing details. On success, it will return a `number` with the value one. If there is no process with the provided PID, this method will return a `number` with the value zero. If the provided PID is anything other than a `number`, this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer',"processes = hostComputer.show_procs.split(char(10))[1:]",'pid = processes[1].split(" ")[1]',"closeResult = hostComputer.close_program(pid.to_int)",'if typeof(closeResult) == "string" then',' print("There was an error when closing a program: " + closeResult)',"else",' print("Program with pid " + pid + " got successfully closed.")',"end if"]},wifi_networks:{description:"Returns a `list` of the Wi-Fi networks that are available for the provided interface. Each item in the `list` is a `string` containing information on the BSSID, PWR, and ESSID. If no matching netDevice can be found, this method will return `null`. If the active network card is not a Wi-Fi card, an error will be thrown, preventing any further script execution.",example:['hostComputer = get_shell("root", "test").host_computer','networks = hostComputer.wifi_networks("wlan0")',"result = []","for network in networks",' parsedItem = network.split(" ")'," item = {}"," item.BSSID = parsedItem[0]"," item.PWR = parsedItem[1]"," item.ESSID = parsedItem[2]"," result.push(item)","end for","print(result)"]},connect_wifi:{description:"Connects to the indicated Wi-Fi network. It's not possible to connect to a new Wi-Fi while being logged in as a guest. If connecting to a new Wi-Fi fails, this method will return a `string` containing details. On success, it will return a `number` with the value one. Wi-Fi networks can be found via `wifi_networks` or by typing iwlist as a command in the terminal. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:["hostComputer = get_shell.host_computer","networks = hostComputer.wifi_networks",'firstNetwork = networks[0].split(" ")',"BSSID = firstNetwork[0]","ESSID = firstNetwork[2]",'connectionResult = hostComputer.connect_wifi("wlan0", BSSID, ESSID, "wifi-password")','if typeof(connectionResult) == "string" then',' print("There was an error while connecting to new Wifi: " + connectionResult)',"else",' print("Connected to new Wifi successfully.")',"end if"]},connect_ethernet:{description:"Sets up a new IP address on the computer through the Ethernet connection. It's not possible to set up a new IP address while being logged in as a guest. On failure, this method will either return a `string` with details or `null`. On success, it will return an empty `string`. If any of the provided parameters have a type that deviates from the defined signature or the computer is not connected to the internet, an error will be thrown, preventing any further script execution.",example:["hostComputer = get_shell.host_computer",'connectionResult = hostComputer.connect_ethernet("eth0", "192.168.0.4", get_router.local_ip)','if typeof(connectionResult) == "string" then',' print("There was an error while connecting: " + connectionResult)',"else",' print("Connected successfully.")',"end if"]},network_gateway:{description:"Returns a `string` with the gateway IP address configured on the computer.",example:["hostComputer = get_shell.host_computer","gatewayIp = hostComputer.network_gateway",'print("Gateway IP: " + gatewayIp)']},active_net_card:{description:'Returns a `string` which contains either the keyword `"WIFI"` or `"ETHERNET"` depending on the connection type your computer is currently using.',example:["hostComputer = get_shell.host_computer","netCard = hostComputer.active_net_card",'print("Connected by: " + netCard)']}}});var s1=S((pV,Jq)=>{Jq.exports={$meta:{description:'A `crypto` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"cryptoLib"`.'},aircrack:{description:"Returns a `string` containing the password based on the file which was generated via aireplay. In case of failure, it will return `null` instead. If the provided path is empty, an error will be thrown, interrupting the script execution.",example:['crypto = include_lib("/lib/crypto.so")','networks = get_shell.host_computer.wifi_networks("wlan0")','firstNetwork = networks[1].split(" ")',"bssid = firstNetwork[0]","pwr = firstNetwork[1][:-1].to_int","essid = firstNetwork[2]","aireplayResult = crypto.aireplay(bssid, essid, 300000 / pwr)","if (aireplayResult == null) then",' result = crypto.aircrack(home_dir + "/file.cap")'," print(result)","end if"]},airmon:{description:'Enables or disables the monitor mode of a network device. The `options` parameter can only be `"start"` or `"stop"`. Monitor mode can only be enabled on Wifi cards. If it wasn\'t possible to enable or disable the monitor mode, this method will return either a `number` with the value zero or a `string` with details. In case of success, it will return a `number` with the value one.',example:['crypto = include_lib("/lib/crypto.so")','airmonResult = crypto.airmon("start", "wlan0")','if typeof(airmonResult) == "string" then',' print("There was an error while switching monitoring mode: " + airmonResult)',"else",' print("Monitoring mode switched successfully.")',"end if"]},aireplay:{description:'Used to inject frames on wireless interfaces. Once the command with `"Control+C"` is stopped, it will save the captured information in a text file called `"file.cap"` in the path where the terminal is currently located. Alternatively, a maximum of captured `acks` can be specified for the command to stop automatically, saving the `"file.cap"` file as described above. To figure out how many ACKs are required, you can use the following formula: `"300000 / [Wifi PWR]"`. If there is an error, a `string` will be returned with the message indicating the problem. On success, it will return `null`, it is advised though to verify that the capture file actually exists. In case any of the provided values deviate from the signature types or bssid/essid is empty, an error will be thrown preventing any further script execution.',example:['crypto = include_lib("/lib/crypto.so")','networks = get_shell.host_computer.wifi_networks("wlan0")',"for index in range(0, networks.len - 1)",' print(index + ".) " + networks[index])',"end for",'selectedIndex = user_input("Select Wifi: ").to_int','if (typeof(selectedIndex) == "string" or selectedIndex < 0 or selectedIndex > networks.len - 1) then',' exit("Wrong index!")',"end if",'parsed = networks[selectedIndex].split(" ")',"bssid = parsed[0]","pwr = parsed[1][:-1].to_int","essid = parsed[2]","potentialAcks = 300000 / pwr","crypto.aireplay(bssid, essid, potentialAcks)",'wifiPassword = crypto.aircrack("/home/" + active_user + "/file.cap")','print("Wifi password for " + essid + " is " + wifiPassword)']},decipher:{description:"Returns a decrypted password via the provided password MD5 hash. Keep in mind that this method is not decrypting a password but rather checking for existing passwords within the game world with a matching MD5 hash. So in case a password does not exist in the game world, the decryption will fail. On failure, this method will return `null`. Using this method in an SSH encryption process will cause an error to be thrown, aborting further script execution.",example:['crypto = include_lib("/lib/crypto.so")','hostComputer = get_shell("root", "test").host_computer','passwdContent = hostComputer.File("/etc/passwd").get_content',"firstAccount = passwdContent.split(char(10))[0]",'parsed = firstAccount.split(":")',"username = parsed[0]","passwordHash = parsed[1]","password = crypto.decipher(passwordHash)",'print("User: " + username)','print("Password: " + password)']},smtp_user_list:{description:"Returns a `list` of the existing users on the `computer` where the SMTP service is running. If these users also have an email account registered on the SMTP server, it will be indicated in the `list`. SMTP services are usually running on port `25`. In case of failure, this method will return a `string` containing the cause. If any of the provided values deviate from the signature types, this method will return `null`.",example:['crypto = include_lib("/lib/crypto.so")','print(crypto.smtp_user_list("192.168.0.4", 25))']}}});var o1=S((dV,Zq)=>{Zq.exports={$meta:{description:'A `ctfEvent` object can be obtained by using [get_ctf](#GENERAL_GET_CTF). The `classID` used for this object is `"ctfEvent"`.'},get_description:{description:"Returns `string` with the CTF event description."},get_template:{description:"Returns `string` with the CTF event template."},player_success:{description:"Returns `number` with the value one if the CTF event got completed successfully. Otherwise this method will return a `number` with the value zero."},get_creator_name:{description:"Returns `string` with the name of the CTF event creator."},get_mail_content:{description:"Returns `string` with the mail content of the CTF event."}}});var a1=S((hV,Xq)=>{Xq.exports={$meta:{description:'A `file` object can be acquired by either using [File](#COMPUTER_FILE) or [overflow](#METALIB_OVERFLOW). The `classID` used for this object is `"file"`.'},chmod:{description:'Modifies the `file` permissions. Optionally, these permissions can also be applied recursively. The format for applying permissions is as follows: `"[references][operator][modes]"`. The references type is defined through three possible types: user `"u"`, group `"g"`, and other `"o"`. The operator is used to define if permissions get added `"+"` or removed `"-"`. There are three different modes that can be modified: read `"r"`, write `"w"`, and execute `"x"`. So, for example, `"o-wrx"` would remove all possible permissions for others. To add all permissions for others again, `"o+wrx"` would be used. In case the modification fails, this method will return a `string` containing information about the reason. Otherwise, an empty `string` is returned. In case any type other than `number` is used for the `isRecursive` parameter, an error will be thrown preventing further script execution.',example:['hostComputer = get_shell("root", "test").host_computer','rootFolder = hostComputer.File("/bin")',"oldPermissions = rootFolder.permissions",'rootFolder.chmod("o-wrx", true)',"newPermissions = rootFolder.permissions",'print("Old permissions: " + oldPermissions)','print("New permissions: " + newPermissions)']},copy:{description:"Copies the `file` to the provided path. Files can only be copied if the user has read and write permissions or is root. The new filename has to be below 128 characters and alphanumeric. After success, this method will return a `number` with the value one. Otherwise, it will return a `string` containing information about the reason for failure. If any of the parameter types deviate from the method signature, this method is used within an SSH encryption process, the new name exceeds 128 characters, or the path is too long, an error will be thrown, causing an interruption of script execution. In case the current file gets deleted, this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','copyResult = passwdFile.copy("/etc/", "duplicate")','if typeof(copyResult) == "string" then',' print("There was an error while copying file: " + copyResult)',"else",' print("File got copied successfully.")',"end if"]},move:{description:"Moves the `file` to the provided path. Files can only be moved if the user has read and write permissions or is root. The new filename has to be below 128 characters and alphanumeric. After success, this method will return a `number` with the value one. Otherwise, this method will return a `string` with details. If any of the parameter types deviate from the method signature, this method is used within an SSH encryption process, the new name exceeds 128 characters, or the path is too long, an error will be thrown, causing an interruption of script execution. In case the current file gets deleted, this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','moveResult = passwdFile.move("/etc/", "/moved/")','if typeof(moveResult) == "string" then',' print("There was an error while moving file: " + moveResult)',"else",' print("File got moved successfully.")',"end if"]},symlink:{description:"Creates a symlink to the specified path. Symlinks can only be created if the user has write permissions or is root. The new filename must be alphanumeric and under 128 characters. Upon success, this method returns a `number` with the value one. On failure, it returns a `string` with details. If any parameters deviate from the method signature, if used within an SSH encryption process, if the new name exceeds 128 characters, or if the path is too long, an error will be thrown, interrupting script execution. If the current file is deleted, this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','lsFile = hostComputer.File("/bin/ls")','symResult = lsFile.symlink("/bin", "alternativeLS")','if typeof(symResult) == "string" then',' print("There was an error while creating symlink: " + symResult)',"else",' print("Symlink got created successfully.")',"end if"]},rename:{description:"Rename the file with the name provided. Files can only be renamed if the user has write permissions or is root. The new filename has to be below 128 characters and alphanumeric. On failure, this method will return a `string` with details. Otherwise, this method will return an empty string. If this method is used within an SSH encryption process, an error will be thrown, causing the script execution to be interrupted. In case the provided name is `null`, this method will return a `number` with the value zero.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','renameResult = passwdFile.rename("renamed")','if typeof(renameResult) == "string" then',' print("There was an error while renaming file: " + renameResult)',"else",' print("File got renamed successfully.")',"end if"]},path:{description:"Returns a `string` containing the file path. If the file is a symlink, the optional `symlinkOrigPath` argument can be set to return the original path of the linked file instead. If the file has been deleted, this method will still return the path it had prior to deletion.",example:["hostComputer = get_shell.host_computer",'passwdFile = hostComputer.File("/etc/passwd")','print("File location: " + passwdFile.path)']},is_folder:{description:"Returns a `number`. The value is one if the file is a folder, zero otherwise. In case the file gets deleted this method will return `null` instead.",example:["hostComputer = get_shell.host_computer",'etcFolder = hostComputer.File("/etc")','print("Is a folder: " + etcFolder.is_folder)']},parent:{description:"Returns the parent folder of the current file or folder. In case there is no parent folder `null` will be returned instead. In case the file gets deleted this method will return `null` as well.",example:["hostComputer = get_shell.host_computer",'etcFolder = hostComputer.File("/etc")','print("Parent path: " + etcFolder.parent.path)']},name:{description:"Returns a `string` with the name of the file. In case the file gets deleted this method will return `null` instead.",example:["hostComputer = get_shell.host_computer",'passwdFile = hostComputer.File("/etc/passwd")','print("Filename: " + passwdFile.name)']},allow_import:{description:"Returns a `number`. If the file is binary and can be imported by other scripts, the value will be one; otherwise, the value will be zero. In case the file gets deleted, this method will cause a crash.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("File can be imported: " + lsBinary.allow_import)']},get_content:{description:"Returns a `string` representing the content of the file. To read a file, the user requires read access or being root. Note that you cannot read a binary file. In case of failure, `null` will be returned. If this method is used within an SSH encryption process, an error will be thrown, preventing any further script execution.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','print("File content: " + passwdFile.get_content)']},set_content:{description:"Saves text into a `file`. The content will not get appended to the `file`; therefore, existing content will be overridden. To set new content, the user requires write permissions or being root. Keep in mind that text files cannot exceed the character limit of 160,000. In case setting the content was successful, a `number` with the value one will be returned. Otherwise, a `string` with details will be returned. If this method is used within an SSH encryption process, an error will be thrown, preventing any further script execution. If the provided content is `null` or permissions are lacking, this method will return a `number` with the value zero. In case the file gets deleted this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','setResult = passwdFile.set_content("moo")','if typeof(setResult) == "string" then',' print("There was an error while setting file content: " + setResult)',"else if setResult == 0 then",' print("Unable to set content of file!")',"else",' print("File content got changed successfully.")',"end if"]},is_binary:{description:"Returns a `number`. If the file is a binary, the value will be one; otherwise, it will be zero. In case the file gets deleted, this method will return `null` instead.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("File is a binary: " + lsBinary.is_binary)']},is_symlink:{description:"Returns a `number`. If the file is a symlink, the value will be one; otherwise, it will be zero. In case the file gets deleted, this method will return `null` instead.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("File is a symlink: " + lsBinary.is_symlink)']},has_permission:{description:'Returns a `number` indicating if the user who launched the script has the requested permissions. One will indicate that the user has the correct permissions. In case permissions are lacking, the value will be zero. There are three different permission types: read `"r"`, write `"w"`, and execute `"x"`. In case the file gets deleted, this method will return `null` instead.',example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("Is able to execute ls: " + lsBinary.has_permission("x"))']},delete:{description:"Delete the current file. To delete files, write permissions are required or being root. In case of failure, a `string` with details will be returned. Otherwise, an empty `string` gets returned. Please note that deleting a file will leave a log entry.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")',"deletionResult = lsBinary.delete",'if typeof(deletionResult) == "string" and deletionResult.len > 0 then',' print("There was an error while deleting a file: " + deletionResult)',"else",' print("File got deleted successfully.")',"end if"]},get_folders:{description:"Returns a `list` of folders. In case the current entity is a file instead of a folder this method will return `null`, so it is advisable to first use the `is_folder` function before calling this method. In case the current folder gets deleted this method will return `null` as well.",example:["hostComputer = get_shell.host_computer",'binFolder = hostComputer.File("/home")',"folders = binFolder.get_folders","for folder in folders"," print(folder.path)","end for"]},get_files:{description:"Returns a `list` of files. In case the current entity is a file instead of a folder this method will return `null`, so it is advisable to first use the `is_folder` function before calling this method. In case the current folder gets deleted this method will return `null` as well.",example:["hostComputer = get_shell.host_computer",'binFolder = hostComputer.File("/bin")',"files = binFolder.get_files","for file in files"," print(file.path)","end for"]},permissions:{description:'Returns a `string` with the current file permissions. In case the current file gets deleted, this method will return `null`. The format for this permissions `string` is as follows: `"[fileType][wrx](u)[wrx](g)[wrx](o)"`. The file type is either `"d"` in case it\'s a directory or `"-"`. The user type gets defined through three possible types: user `"u"`, group `"g"`, and other `"o"`. There are three different permission types: read `"r"`, write `"w"`, and execute `"x"`. An example of a `string` returned by this method would be `"-rwxr-xr-x"`. Taking the latter as an example, the following things become clear:\n* The provided file is not a directory.\n* The user has full access.\n* The group and others have almost all permissions besides writing.\n',example:["hostComputer = get_shell.host_computer",'binFolder = hostComputer.File("/bin")',"permissions = binFolder.permissions","fileType = permissions[0]","permissionsForUser = permissions[1:4]","permissionsForGroup = permissions[4:7]","permissionsForOther = permissions[7:10]",'print("File type: " + fileType)','print("User permissions: " + permissionsForUser)','print("Group permissions: " + permissionsForGroup)','print("Other permissions: " + permissionsForOther)']},owner:{description:"Returns a `string` with the name of the file owner. User permissions get applied to whoever is the owner of a file. In case the current file gets deleted, this method will return `null`.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("Owner of ls is: " + lsBinary.owner)']},set_owner:{description:"Change the owner of this file. Optionally the owner can get applied recursively. The owner's name cannot exceed 15 characters. Additionally either write permissions or being root is required. In case of failure a `string` gets returned containing the cause. Otherwise an empty `string` gets returned. In case the current file gets deleted or the passed owner value is not a `string`, this method will return `null`. If the passed owner value is empty, the owner value is longer than 15 characters, or the passed recursive value deviates from its original type, an error will be thrown, interrupting further script execution.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','ownerResult = lsBinary.set_owner("root")','if typeof(ownerResult) == "string" then',' print("There was an error while changing owner: " + ownerResult)',"else",' print("File owner changed successfully.")',"end if"]},group:{description:"Returns a `string` with the name of the group to which this file belongs. Group permissions get applied to whoever is the owner of a file. In case the current file gets deleted, this method will return `null`.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("File is related to following group: " + lsBinary.group)']},set_group:{description:"Change the group related to this file. Optionally the group can get applied recursively. The group name cannot exceed 15 characters. Additionally either write permissions or being root is required. In case of failure, a `string` with details. On success, an empty `string` gets returned. In case the current file gets deleted or the passed group is not a `string`, this method will return `null`. If the passed group value is empty, the group value is longer than 15 characters, or the passed recursive value deviates from its original type, an error will be thrown, preventing further script execution.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','ownerResult = lsBinary.set_group("root")','if typeof(ownerResult) == "string" then',' print("There was an error while changing group: " + ownerResult)',"else",' print("File group changed successfully.")',"end if"]},size:{description:"Returns a `string` with the size of the file in bytes. There is no correlation between file size and actual file content. Instead, the file size is depending on the name of the file. In case the current file gets deleted, this method will return `null`.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")',"size = lsBinary.size","if size.to_int > 1000 then",' print("File size is bigger than 1000 bytes.")',"else",' print("File size is below 1000 bytes.")',"end if"]}}});var l1=S((fV,eF)=>{eF.exports={$meta:{description:'The FTP `shell` behaves just like the ssh `shell` and can be acquired by using [connect_service](#SHELL_CONNECT_SERVICE) and using the service type `"ftp"`. The `classID` used for this object is `"ftpshell"`. The port used for FTP is usually `21`.'},host_computer:{description:"Returns a `computer` related to the `shell`.",example:["shell = get_shell",'ftpShell = shell.connect_service("172.8.0.5", 21, "test", "test", "ftp")',"ftpComputer = ftpShell.host_computer",'print("FTP public ip: " + ftpComputer.public_ip)']},start_terminal:{description:"Launches an active terminal. The terminal's color will change, displaying the IP of the connected shell. Script execution will be stopped upon starting a new terminal, unless this is called from another script that was executed via `shell.launch`. In that case, you will enter the shell after closing your root-level script within that terminal window. Using this method within an SSH encryption process will cause an error to be thrown, preventing further script execution.",example:["shell = get_shell",'ftpShell = shell.connect_service("172.8.0.5", 21, "test", "test", "ftp")',"ftpShell.start_terminal"]},put:{description:"Send a `file` to the `computer` related to the provided `shell`. You require permission to read the `file` on the `computer` from which you are uploading and write permissions in the folder of the `computer` you are trying to upload to. In case of failure, this method will return a `string` with the cause. Otherwise, a `number` with the value one gets returned. If any of the passed arguments deviates from the types of the method signature, `null` will be returned. In case the `string` for sourceFile or destinationFolder is empty, an error will be thrown, preventing further script execution.",example:["shell = get_shell",'ftpShell = shell.connect_service("172.8.0.5", 21, "test", "test", "ftp")','putResult = ftpShell.put("/bin/ls", "/etc/", shell)','if typeof(putResult) == "string" then',' print("There was an error while sending file: " + putResult)',"else",' print("File got sent successfully.")',"end if"]}}});var u1=S((mV,tF)=>{tF.exports={$meta:{description:'Create a `function` with `"function()"`, including parameters with optional default values. Assign the result to a variable. Invoke by using that variable. Use `@` to reference a function without invoking.',example:["triple = function(n=1)"," return n * 3","end function","print triple // 3","print triple(5) // 15","f = @triple","print f(5)"]}}});var c1=S((gV,nF)=>{nF.exports={$meta:{description:"Use `if` blocks to do different things depending on some condition. Include zero or more `else if` blocks and one optional `else` block. Use a `while` block to loop as long as a condition is true. A `for` loop can loop over any `list`, including ones easily created with the `range` function. The `break` statement jumps out of a `while` or `for` loop. The `continue` statement jumps to the top of the loop, skipping the rest of the current iteration.",example:["// if block","if 2+2 == 4 then",' print "math works!"',"else if pi > 3 then",' print "pi is tasty"','else if "a" < "b" then',' print "I can sort"',"else",' print "last chance"',"end if","","// while loop",'s = "Spam"',"while s.len < 50",' s = s + ", spam"',"end while",'print s + " and spam!"',"","// for loop","for i in range(10, 1)",' print i + "..."',"end for",'print "Liftoff!"']},mail_login:{description:"Returns a `MetaMail` entity if the login was successful. On failure a `string` with details gets returned. In case any of the provided values deviate from the types defined in the signature this method will return `null`.",example:['metaMail = mail_login("test@test.com", "test")',"if metaMail == null then",' print("Loggin failed.")',"else",` print("You've got mail.")`,"end if"]},parent_path:{description:"Returns a `string` which is the parent path of the provided path. The path provided needs to be properly formatted. If the path is any other type than a `string` or is empty, this method will throw an error interrupting further script execution.",example:['print("Is proper parent path: " + (parent_path("/my/test/path") == "/my/test"))']},hasIndex:{description:"Verifies if an index is available within an object. In case of success this method will return a `number` with the value one. In case of failure the value will be a zero. This method supports `map`s, `list`s and `string`s. Each passed type may result in different behavior therefore it is advisable to take a look at each of their specific signatures. In case an unsupported value gets passed this method will return `null`.",example:['print("List has index: " + hasIndex([1, 2, 3], 2)']},typeof:{description:'Returns a `string` containing the type of the entity provided. There are following types by default: `"aptclientLib"`, `"blockchainLib"`, `"ctfEvent"`, `"coin"`, `"computer"`, `"cryptoLib"`, `"debugLibrary"`, `"file"`, `"function"`, `"list"`, `"map"`, `"MetaLib"`, `"MetaMail"`, `"MetaxploitLib"`, `"NetSession"`, `"null"`, `"number"`, `"port"`, `"router"`, `"service"`, `"shell"`, `"ftpshell"`, `"SmartAppliance"`, `"string"`, `"subwallet"`, `"TrafficNet"`, `"wallet"`. Custom types can be added as well by using the `classID` property in a `map`.',example:['myObj = { "classID": "myType" }','if typeof(myObj) == "myType" then',' print("Object is myType.")',"else",' print("Object is not myType.")',"end if"]},get_router:{description:"Returns by default the `router` to which the executing computer is connected to. Optionally an IP address can be provided. In case of failure `null` is returned. If there is no active internet connection, this method will throw an error, interrupting further script execution.",example:["router = get_router","if router.local_ip == get_shell.host_computer.network_gateway then",' print("Router is equal to network gateway.")',"else",' print("Router is not equal to network gateway.")',"end if"]},get_switch:{description:"Returns the switch on the local network whose IP address matches, otherwise it returns `null`.",example:['router = get_switch("192.168.0.2)','print("IP address of switch: " + router.local_ip)']},nslookup:{description:'Returns the IP address for the provided web address. In case the web address cannot be found a `string` gets returned containing the following message: `"Not found"`. If the provided web address is not a `string` or empty this method will throw an error preventing further script execution.',example:["url = params[0]",'print("IP for website is: " + nslookup(url))']},print:{description:"Print a message on the Terminal. Optionally replacing can be enabled which will replace all previous prints. This can be useful for creating a loading bar for example. There is also the possibility of styling output by using TextMeshPro rich-text tags.",example:["for i in range(9)",' print(("#" * (9 - i)) + ("-" * i) , true)'," wait(0.2)","end for"]},clear_screen:{description:"Removes any text existing in a Terminal prior to this point. Utilizing this method in an SSH encryption process will trigger an error, halting further script execution.",example:["for i in range(9)"," clear_screen",' print(("#" * (9 - i)) + ("-" * i))'," wait(0.2)","end for"]},active_user:{description:"Returns a `string` with the name of the user who is executing the current script.",example:['print("Current active user: " + active_user)']},home_dir:{description:"Returns a `string` with the home folder path of the user who is executing the current script.",example:['print("Home dir of current user: " + home_dir)']},get_shell:{description:"Returns the `shell` that is executing the current script. Optionally, a username and password can be provided, allowing the use of a shell with other user privileges. If the username or password does not match an existing user or if the provided values deviate from the defined signature, this method will return `null`.",example:['shell = get_shell("root", "test")',"if shell == null then",` print("Couldn't obtain root shell.")`,"else",' print("Obtained root shell.")',"end if"]},indexes:{description:"Returns a `list` containing all indexes or keys of the passed object. This method supports `map`s, `list`s, and `string`s. The type of each item may vary when using this method on a `map` since keys could be any type. The other types will return a `list` where each item is a `number`. In case a type is passed that is not supported, this method will return `null`.",example:['indexesOfStr = indexes("test")','print("Following indexes are available: " + indexesOfStr.join(", "))']},values:{description:"Returns a `list` containing all values of an object. Supported types are `map`s and `string`s. In case the passed type deviates from these two, it will return the passed value itself.",example:['indexesOfStr = values("test")','print("Following values are available: " + indexesOfStr.join(", "))']},indexOf:{description:"Lookups index of value within `map`s, `list`s, or `string`s. For `list`s and `string`s, the behavior is very similar. On success, you'll receive a `number` representing the found index. On failure, it will return `null`. For `map`s, it's a bit different since the returned value could be of any type. On failure, it will return `null` as well. If a value gets passed that is not supported, this method returns `null`.",example:['index = indexOf("test", "e")','print("e is at: " + index)']},len:{description:"Returns `number` indicating what size the passed object is. In case anything other than a `map`, `list` or `string` gets passed this method will return `null`.",example:['length = len("test")','print("Length of string is: " + length)']},shuffle:{description:"Randomizes content of an object. Valid data types for this method are `list` and `map`. In case a map-like object such as a `file` or `computer` a runtime exception will be thrown.",example:["list = [0, 1, 2, 3, 4, 5]","shuffle(list)",'print("And the winner is: " + list[0])']},val:{description:"Casts a `string` to a `number`. If the provided `string` does not represent a valid `number`, the `number` zero will be returned. If any type other than `string` or `number` is passed, this method will return `null`.",example:['num = val("1.25")','print("Number in string is: " + num)']},lower:{description:"Returns a `string` which is the lowercase transformed version of the provided `string`. In case anything other than a `string` gets passed this method will return the passed value again.",example:['myString = lower("HELLO WORLD")',"print(myString)"]},upper:{description:"Returns a `string` which is the uppercase transformed version of the provided `string`. In case anything other than a `string` gets passed this method will return the passed value again.",example:['myString = upper("hello world")',"print(myString)"]},sum:{description:"Returns a `number` representing the sum of all items within a `map` or a `list`. If any non-supported type is passed, this method will return a `number` with the value zero.",example:["list = [0, 1, 2, 3, 4, 5]",'print("Sum of all items is: " + sum(list))']},pop:{description:"When passing a `list` to this method, it will return the value at the last index and remove it from the `list`. Additionally, if a `map` is passed, it will always return the value corresponding to the first matching key and mutate the `map` object accordingly. However, passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution. If the passed object is empty or is anything other than a `map` or `list`, the method will return `null`.",example:["list = [0, 1, 2, 3, 4, 5]",'print("The last item is: " + pop(list))']},pull:{description:"When passing a `list` to this method, it will return the value at the first index and remove it from the `list`. Additionally, if a `map` is passed, it will always return the value corresponding to the first matching key and mutate the `map` object accordingly. However, passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution. If the passed object is empty or is anything other than a `map` or `list`, the method will return `null`.",example:["list = [0, 1, 2, 3, 4, 5]",'print("The first item is: " + pull(list))']},push:{description:"Allows pushing a value into an object, supporting `map`s and `list`s. However, it throws an error if you attempt to push a value into itself or into a map-like object such as a `file`, halting further script execution. If you try to push a value into an object that isn't a `map` or `list`, it returns `null`.",example:["list = [0, 1, 2, 3, 4, 5]","push(list, 42)",'print("The answer to everything is: " + pop(list))']},sort:{description:"Sorts the values of a `list` alphanumerically. This operation mutates the original `list`. Optionally, a key can be provided, which is used if the items are `map`s or `list`s. Finally, this method returns the updated `list`. If a type other than `list` is passed, the method returns the passed value without any changes.",example:["list = [9, 3, 5, 7]","sort(list)",'print("Sorted list: " + list.join(", "))']},remove:{description:"Depending on the data type, this function will remove a value in the provided object, potentially mutating the object. This method works with `map`s, `list`s, and `string`s. Each passed type may support different types for the `key` argument. For example, using this method on a string would treat the key as a character index. Therefore, it is advised to review the signatures of each type. Passing a key with the type `null` may cause an error to be thrown, preventing further script execution. The same will happen if the passed self value deviates from being a `map`, `list`, or `string`.",example:["list = [9, 3, 5, 7]","remove(list, 5)",'print("List after removal: " + list.join(", "))']},user_input:{description:"Puts script execution on hold to receive input from the user. Input can be submitted by pressing Enter. You can style the output message using TextMeshPro rich-text tags. Two optional arguments are available: `isPassword`, which defines whether input should be masked by asterisk signs, and `anyKey`, which enables capturing of keys individually. Using this method within an SSH encryption process or passing values deviating from the defined method signature will cause an error to be thrown, interrupting further script execution.",example:["num = 0",'aboveIncludingZeroTag = "<color=yellow>"','belowZeroTag = "<color=red>"',"while (true)"," clear_screen"," output = aboveIncludingZeroTag + num"," if (num < 0) then"," output = belowZeroTag + num"," end if"," print(output)",' key = user_input("Press arrow up/down to change value.", false, true)',' if (key == "UpArrow") then'," num = num + 1",' else if (key == "DownArrow") then'," num = num - 1"," else",' exit("Bye!")'," end if","end while"]},include_lib:{description:"Enables the inclusion of library binaries, which can be used inside your script. If successful, an object related to the provided library will be returned; otherwise, `null` is returned. This function is exclusively for importing library binaries. If you want to import custom scripts or binaries into your project, use `import_code` instead. Passing anything other than a `string` for the path, or leaving the path empty, will cause an error to be thrown, interrupting further script execution.",example:['crypto = include_lib("/lib/crypto.so")',"if crypto == null then",` print("Crypto library couldn't get imported.")`,"else",' print("Crypto library got imported.")',"end if"]},import_code:{description:'Enables to import code from different sources into one file. This is useful in case you want to split code into different files and also to avoid any limitation in regards to text file character limits. Note that `import_code` requires an absolute path and is called while compiling the file into a binary instead of during runtime. Additionally `import_code` cannot be nested. Code can be either imported from plain text files or binaries that have `"allow import"` enabled. `import_code` is also parsed wherever it is found, not even a `//` comment will prevent it being evaluated.',example:["//Content of main.src",'import_code("/home/user/my_module.src")','print("bye")',"//Content of my_module.src",'print("hello!")']},exit:{description:"Stops execution of the currently running script. Optionally a message can be provided which will be shown in the Terminal. There is also the possibility of styling output by using TextMeshPro rich-text tags.",example:["while (true)",' shouldExit = lower(user_input("Want to exit? (Y/N)"))',' if (shouldExit == "y") then',' exit("See you!")'," end if","end while"]},user_mail_address:{description:"Returns a `string` containing the email address of the player who is executing the script. If the user does not have an email address this method will return `null`.",example:['print("My EMail address is: " + user_mail_address)']},user_bank_number:{description:"Returns a `string` containing the bank account number of the player who is executing the script. If the user does not have a bank this method will return `null`.",example:['print("My Bank number is: " + user_bank_number)']},whois:{description:"Returns a `string` containing the administrator information behind an IP address provided. In case of failure the returned `string` will contain an error message instead. If the provided ip is not a `string` or is empty this method will throw an error causing the script to stop.",example:['adminInfo = whos("1.1.1.1")',"infoLines = adminInfo.split(char(10))","infoObject = {}",'infoObject.domainName = infoLines[0].split(":")[1].trim','infoObject.administrativeContact = infoLines[1].split(":")[1].trim','infoObject.emailAddress = infoLines[2].split(":")[1].trim','infoObject.phone = infoLines[3].split(":")[1].trim','print("Phone number: " + infoObject.phone)']},wait:{description:"Pauses the script execution. Optionally, the duration can be provided via the `time` argument. By default, the duration will be 1 second. The duration cannot be below 0.01 or above 300; otherwise, this method will throw a runtime exception.",example:["start = time","wait(5)","elapsed = time - start",'print("Waited: " + elapsed)']},command_info:{description:"Returns a `string` value of a translation. Translations include commands, documentation and other game-related things. Checkout [Grey-Texts](https://github.com/LoadingHome/Grey-Texts/blob/main/EnglishLang.json) for an overview of all available keys. If the provided command name is not a `string` or is empty this method will throw an error causing the script to stop.",example:['print(command_info("LS_USAGE"))']},program_path:{description:"Returns a `string` containing the path of the script that is currently executing. It will update when using `launch`, which makes it different from `launch_path`.",example:["path = program_path",'print("Script gets executed within: " + parent_path(path))']},current_path:{description:"Returns a `string` containing the path in which script that is currently executed from.",example:["path = current_path",'print("PWD: " + path)']},format_columns:{description:"Returns a `string` which is the formatted version of the provided text. Keep in mind that TextMeshPro rich-text tags might screw up the output. When using tags consider applying these after formatting. Passing anything other than a `string` will result in an empty `string`.",example:['text = "FIRST SECOND THIRD','1 2 3"',"print(format_columns(text))"]},current_date:{description:'Returns a `string` containing the current date and time. Ingame time passes 15 times as fast as real-time - 4 seconds per in-game minute. The initial time after every wipe will be the 1st of January 2000 at 6:00 AM. Additionally, the game time will not proceed while the server is offline.\n* Output schema: `"[day]/[month]/[year] - [hours]:[minutes]"`\n* Example output: `"27/Jan/2000 - 08:19"`\n',example:["dateStr = current_date",'dateSegments = dateStr.split(" - ")','date = dateSegments[0].split("/")',"day = date[0]","month = date[1]","year = date[2]",'dateTime = dateSegments[1].split(":")',"hours = dateTime[0]","minutes = dateTime[1]",'print("Current day: " + day)']},is_lan_ip:{description:"Returns a `number`. One indicates that the provided IP address is a valid LAN IP address. Otherwise, zero will be returned.",example:['print("Is Lan IP: " + is_lan_ip("192.168.0.1"))']},is_valid_ip:{description:"Returns a `number`. If the provided IP address is valid, its value will be one. Otherwise, its value is zero.",example:['print("Is valid IP: " + is_valid_ip("1.1.1.1"))']},bitwise:{description:'Returns a `number` by performing bitwise operations. Supported operators are: `"~"`, `"&"`, `"|"`, `"^"`, `"<<"`, `">>"`, `">>>"`. In case you want to use the tilde operator you only need to provide the operator and the left argument. If any of the required arguments is `null` this method will return `null`. Warning: If either operand is >= `0x80000000`, it\'ll always returns 0.',example:["num = params[0].to_int",'isOdd = bitwise("&", num, 1) == 1',"if isOdd then",' print("Number is odd.")',"else",' print("Number is even.")',"end if"]},abs:{description:"Returns the absolute value of `number`.",example:["a = 1","b = 5","difference = abs(a - b)",'print("Difference between a and b is: " + difference)']},acos:{description:"Returns the inverse cosine (in radians) of a `number`.",example:["adjacent = 8","hypotenuse = 10","calcAngle = acos(adjacent / hypotenuse)",'print("Angle: " + calcAngle)']},asin:{description:"Returns the inverse sine (in radians) of a `number`.",example:["opposite = 6","hypotenuse = 10","calcAngle = acos(opposite / hypotenuse)",'print("Angle: " + calcAngle)']},atan:{description:"Returns the inverse tangent (in radians) of a `number`.",example:["opposite = 8","hypotenuse = 10","calcAngle = atan(opposite / hypotenuse)",'print("Angle: " + calcAngle)']},tan:{description:"Returns the tangent of a `number` in radians.",example:["degrees = 90","tanFromDegrees = tan(degress * pi / 180)",'print("Tan from degrees: " + tanFromDegrees)']},cos:{description:"Returns the cosine of a `number` in radians.",example:["radians = 1","radius = 10","circleX = cos(radians) * radius","print(circleX)"]},code:{description:"Returns the Unicode `number` of the first character of the string. In case an empty `string` is provided the script execution will crash.",example:['key = user_input("Press a key!", false, true)',"isA = key.code == 97","if isA then",' print("You pressed A.")',"else",' print("You did not press A.")',"end if"]},char:{description:"Returns the UTF-16 character `string` related to the provided unicode `number`. The provided `number` needs to be between 0 and 65535. Any `number` which is outside this range will cause the script to throw a runtime error. Beware when passing non-ASCII values to intrinsics as they will likely get re-encoded as UTF-8. For example, `md5(char(255))` will actually return the hash of the two-byte sequence `0xC3` `0xBF`.",example:['key = user_input("Press a key!", false, true)',"isA = key == char(97)","if isA then",' print("You pressed A.")',"else",' print("You did not press A.")',"end if"]},sin:{description:"Returns the sine of a `number` in radians.",example:["radians = 1","radius = 10","circleY = sin(radians) * radius","print(circleY)"]},floor:{description:"Returns `number` rounded down to the integer value of the provided `number`.",example:["price = 25.43467","floored = floor(price * 100) / 100",'print("Floored price: " + floored)']},range:{description:"Generates a `list` where each item is a `number`. By default, the list starts with zero and increments by one for each item. You can optionally define a start and end value, as well as customize the incremental value. However, if the incremental value is zero, or if the list exceeds `16777215L` items, or if start/end is `null`, the function will throw a runtime error.",example:['print("Countdown:")',"for num in range(10)"," print(num)","end for",'print("Done!")']},round:{description:"Returns `number` rounded to the integer value of the provided `number`.",example:["price = 25.43467","rounded = round(price * 100) / 100",'print("Price: " + rounded)']},rnd:{description:"Returns a random `number` between 0 and 1. Optionally a seed `number` can be provided.",example:["min = 10","max = 20","output = floor(rnd * (max - min + 1) + min)",'input = user_input("Guess a number between 10 and 20!").to_int',"if (input == output) then",' print("You guessed right!")',"else",' print("You failed! The number was " + output)',"end if"]},sign:{description:"Returns a one or minus one, indicating the sign of the number passed as argument. If the input is zero, it will be returned as-is.",example:["print(sign(40))","print(sign(-40))","print(sign(0))"]},sqrt:{description:"Returns the square root of a `number`.",example:["a = 3","b = 4","calcHypotenuse = sqrt((a * a) + (b * b))",'print("Hypotenuse: " + calcHypotenuse)']},str:{description:"Returns the `string` value of provided data. Can be used to turn a `number` into a `string` or to get the signature of a `function`.",example:["signature = str(@user_input)","argSegment = signature[9:signature.len - 1]",'args = argSegment.split(",")','print("Function has " + args.len + " arguments.")']},ceil:{description:"Returns `number` rounded up to the integer value of the provided `number`.",example:["price = 25.43467","upperPrice = ceil(price * 100) / 100",'print("Upper price: " + upperPrice)']},pi:{description:"Returns the `number` PI to the precision of six.",example:["radius = 10","circumference = 2 * pi * radius",'print("Circumference: " + circumference)']},launch:{description:"Launches the binary located at the provided path. Optionally, parameters can be passed. Returns a `number`. If the launch was successful, the value will be one; otherwise, it will be zero. In some cases, a `string` will be returned containing an error message. If you need to share variables between a launched script and the current process, consider using `get_custom_object`. Note that launching a script is not asynchronous, meaning that the current script will pause its execution until the launched script finishes. This method cannot be used to execute binaries with an EXE extension (GUI interface). If any provided values deviate from the method signature, a runtime exception will be thrown.",example:['shell = get_shell("root", "test")','launch(shell, "/bin/cat", "/etc/passwd")']},launch_path:{description:"Returns a `string` containing the path of the script that was initially executed, meaning that even when using `launch`, it will still return the path of the initially executed script.",example:["path = launch_path",'print("Script gets executed within: " + parent_path(path))']},slice:{description:"Returns a sliced version of the passed object. Valid data types for slicing are `string` and `list`. The returned object will contain all elements related to the provided start and end index. If no start or end index is provided this method will essentially return a shallow copy of the passed object. If an invalid data type is passed, `null` is returned.",example:['myString = "not your text"','print("my " + slice(myString, 9))']},md5:{description:"Returns the MD5 hash `string` of the provided `string`. Using this method within an SSH encryption process or passing anything other than a `string` will cause an error to be thrown, stopping any further script execution.",example:['passwordHash = md5("test")',`print("Hash for the password 'test' is " + passwordHash)`]},hash:{description:"Returns numeric hash for the provided data. Using this method within a SSH encryption process will cause an error to be thrown causing the script execution to stop.",example:['hashA = hash({ "a": 2, "b": 1 })','hashB = hash({ "b": 1, "a": 2 })',"if (hashA == hashB) then",' print("Objects are alike!")',"else",' print("Objects are different!")',"end if"]},time:{description:"Returns a `number` of seconds representing the elapsed time since the script started.",example:["start = time","for i in range(10000)"," var = i * 100","end for","endTime = time - start",'print("Script execution done within: " + endTime)']},bitAnd:{description:"Performs a bitwise AND for the provided values. Returns a `number`. Warning: If either operand is >= `0x80000000`, it'll always return 0.",example:['print("Result of bitwise AND: " + bitAnd(1, 2))']},bitOr:{description:"Performs a bitwise OR for the provided values. Returns a `number`. Warning: If either operand is >= `0x80000000`, it'll always return 0.",example:['print("Result of bitwise OR: " + bitOr(1, 2))']},bitXor:{description:"Performs a bitwise XOR for the provided values. Returns a `number`. Warning: If either operand is >= `0x80000000`, it'll always return 0.",example:['print("Result of bitwise XOR: " + bitXor(1, 2))']},log:{description:"Returns the natural logarithm of a `number`. By default, the base is 10. Optionally the base can be changed.",example:["a = 2","b = 8","baseLog = log(a) / log(b)",'print("Base log is: " + baseLog)']},yield:{description:"Waits for the next tick.",example:["while (true)"," yield",' print("tick")',"end while"]},get_custom_object:{description:"Returns `map` which is shared throughout script execution. Can be helpful if it desired to pass or receive values when using `launch`. Using this method in a SSH encryption process will cause an error to be thrown preventing further script execution.",example:["get_custom_object.shouldEndScript = false","while (get_custom_object.shouldEndScript)",' print("Waiting...")'," wait(2)","end while"]},insert:{description:"Inserts a value into either a `list` or a `string`. If the method is used on any other data type or the passed index is not a `number`, this method throws an error, preventing further script execution.",example:["list = [2, 3, 4]","insert(list, 2, 42)",'print("List with inserted item: " + list.join(", "))']},to_int:{description:"Returns a `number` which is parsed from the `string` as an integer. In case the `string` is not numeric it will return the original `string`. If the passed value is not a `string` this method will return `null`.",example:['myString = "1"',"print(to_int(myString) + 41)"]},join:{description:"Returns a concatenated `string` containing all stringified values inside the `list`. These values will be separated via the provided separator. Passing anything other than a `list` will result in the original value being returned. In case the passed `list` exceeds `16777215L` items or the delimiter exceeds 128 characters, this method will throw an error, interrupting further script execution.",example:["myList = [42, 1, 3]",`print(join(myList, " .-*'*-. "))`]},split:{description:"Returns a `list` where each item is a segment of the `string`, separated by the provided separator `string`. This method uses regular expressions for matching, so remember to escape special characters such as dots. If any of the provided arguments deviate from the method signature types, this method will return `null`. In case the pattern is empty, the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','segments = split(myString, " ")','if segments[0] != "42" then',' print("Invalid information spotted!")',"else",' print("Information seems valid!")',"end if"]},replace:{description:"This function replaces a value within an object and returns the mutated object. Currently, it only supports `map`s and `list`s. Previously, it also supported `string`s, but that functionality has been replaced by `replace_regex`. If you use anything other than the supported types, a runtime error will be thrown.",example:["list = [1,2,3,42]","newList = replace(list, 42, 4)","print(newList)"]},replace_regex:{description:"Returns a `string` with the replaced content by using regular expressions. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','newString = replace_regex(myString, "\\w+$", "right")',"print(newString)"]},is_match:{description:"Uses regular expression to check if a string matches a certain pattern. If it matches, it will return a `number` with the value one. If it does not match, the value of the `number` will be zero. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','hasWordAtTheEnd = is_match(myString, "\\w+$")',"print(hasWordAtTheEnd)"]},matches:{description:"Returns a `map` with all search results for the provided regular expression. Each key contains the index and the value contains the matching `string`. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','result = matches(myString, "w")',"print(result)"]},get_ctf:{description:"Returns `ctfEvent` object if there is one available. In case of failure this method will return a `string` with details."},show:{description:'Displays all the packages available in a repository. The repository must be listed in the `"/etc/apt/sources.txt"` file. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. If it cannot find a repository, it will return a string with an error message. On success, it will return a `string` containing all packages and their descriptions, with each entry separated by a newline.',example:['aptClient = include_lib("/lib/aptclient.so")','packages = show(aptClient, "177.202.15.132")',"packageList = split(packages, char(10) + char(10))","pop(packageList) // remove last empty item","for packageItem in packageList"," entry = split(packageItem, char(10))"," packageName = entry[0]"," packageDescription = entry[1]",' print "Title: <b>" + packageName + "</b>"',' print "Description: <i>" + packageDescription + "</i>"',' print "----------------------------"',"end for"]},search:{description:'The `search` method specifically looks for a package in any of the repositories listed in `"/etc/apt/sources.txt"`. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return a `string` containing all packages that partially match the provided search value. On failure, it will return a `string` with various error messages.',example:['aptClient = include_lib("/lib/aptclient.so")','packages = search(aptClient, ".so")',"packageList = split(packages, char(10) + char(10))","for packageItem in packageList"," entry = split(packageItem, char(10))"," if len(entry) != 2 then",' print "something wrong in: " + entry'," continue"," end if"," packageName = entry[0]"," packageDescription = entry[1]",' print "Title: <b>" + packageName + "</b>"',' print "Description: <i>" + packageDescription + "</i>"',' print "----------------------------"',"end for"]},update:{description:'Refreshes the list of available packages after adding a new repository in `"/etc/apt/sources.txt"`, or if the remote repository has updated its information in `"/server/conf/repod.conf"`. If either the `"/etc/apt/sources.txt"` file has an invalid format or an invalid `aptClient` object is passed, this method will return a `number` with the value zero. On a successful update, an empty `string` will be returned. In case of failure, a `string` with an error message will be returned.',example:['aptClient = include_lib("/lib/aptclient.so")',"result = update(aptClient)",'if result == "" then',' print "Update successful!"',"else",' print "Error while updating: " + result',"end if"]},add_repo:{description:'Adds a repository address to the `"/etc/apt/sources.txt"` file. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return an empty `string`. In case of failure, it will return a `string` with an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = add_repo(aptClient, "177.202.15.132")','if result == "" then',' print "Addition successful!"',"else",' print "Error while adding: " + result',"end if"]},del_repo:{description:'Removes a repository address from the `"/etc/apt/sources.txt"` file. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return an empty `string`. In case of failure, it will return a `string` with an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = del_repo(aptClient, "177.202.15.132")','if result == "" then',' print "Deletion successful!"',"else",' print "Error while deleting: " + result',"end if"]},install:{description:'Installs a program or library from a remote repository listed in `"/etc/apt/sources.txt"`. If no path is specified, the program installs in `"/lib"` if it is a library or in `"/bin"` otherwise. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return a `number` with the value one. In case of failure, it will return a `string` containing an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = install(aptClient, "rshell_interface")',"if result == 1 then",' print "Installed program successful!"',"else",' print "Error while installing: " + result',"end if"]},check_upgrade:{description:"Verifies if there is a newer version of the program or library in the repository. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return a `number`, which can be either zero or one. Zero indicates that there is no new version available, while one indicates that there is a new version. In case of failure, it will return a string containing an error message.",example:['aptClient = include_lib("/lib/aptclient.so")','result = check_upgrade(aptClient, "/bin/rshell_interface")',"if result == 0 then",' print "Program doesnt need an update!"',"else if result == 1 then",' print "Program does need an update!"',"else",' print "Error while checking version: " + result',"end if"]},coin_price:{description:"Returns a `number` representing the current unit value of the cryptocurrency. In case of an error, it will return a `string` with the error details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','price = coin_price(blockchain, "test8")','if typeof(price) == "string" then',' exit "Couldnt get coin price due to: " + price',"end if",'print "Your coin price is " + price']},show_history:{description:"Returns a `map` with the latest changes in the value of a specific cryptocurrency. The key of the `map` is an index represented by a `number`. The value is a `list`, where index 0 is the historical price of the coin and index 1 is the date when the price change occurred. If any of the provided parameters have a type that deviates from the defined signature, or if no coin exists with this name, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','history = show_history(blockchain, "test")','if typeof(history) == "string" then',' exit "Couldnt fetch history due to: " + history',"end if","for entry in values(history)"," price = entry[0]"," date = entry[1]",' print "The price on " + date + " was " + price',"end for"]},amount_mined:{description:"Returns a `number` representing the total amount of mined coins. In case of an error, it will return a string with details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','mined = amount_mined(blockchain, "test")','if typeof(mined) == "string" then',' exit "Couldnt get amount mined due to: " + mined',"end if",'print "Your mined amount is " + mined']},get_coin:{description:"Returns a `coin` object used to manage the currency. In case of an error, it will return a `string` with the details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','if typeof(coin) != "coin" then',' exit "Couldnt get coin object due to: " + coin',"end if",'print "Your coin address is " + get_address(coin)']},get_coin_name:{description:"Returns a `string` with the name of the coin owned by the player. In case of an error, it will return a `string` with the details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coinName = get_coin_name(blockchain, "test", "test")','if not matches(coinName, "^[A-Z]+$") then',' exit "Couldnt get coin name due to: " + coinName',"end if",`print "The name of the coin you're owning is " + coinName`]},login_wallet:{description:"Returns a `wallet` object on success. In case of an error, it will return a `string` indicating the reason. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','if typeof(wallet) == "string" then',' print "Login failed due to: " + wallet',"else",' print "Login was successful!"',"end if"]},create_wallet:{description:"Creates a `wallet` and returns a `wallet` object on success, which can be used to manage cryptocurrencies. In case of an error, it will return a `string` with the details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = create_wallet(blockchain, "test", "test")','if typeof(wallet) == "string" then',' print "Wallet creation failed due to: " + wallet',"else",' print "Wallet creation was successful!"',"end if"]},delete_coin:{description:"Removes a cryptocurrency from the world. It is required to provide the credentials used in the creation of the cryptocurrency. On success, it will return a `number` with the value one. On failure, it will return a `string` containing details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','result = delete_coin(blockchain, "test", "test", "test")','if typeof(result) == "string" then',' exit "Couldnt delete coin due to: " + result',"end if",'print "Coin got deleted"']},set_cycle_mining:{description:"Defines the interval (in-game hours) in which each user receives a coin reward when mining. The interval cannot be lower than 1 and not be higher than 2160. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return a `number` with the value one. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = set_cycle_mining(coin, 20)","if result == 1 then",' print "Successful updated mining interval"',"else",' print "Failed updating mining interval"',"end if"]},get_cycle_mining:{description:"Returns a `number` representing the defined interval in which each user receives a coin reward when mining. In case of failure, the method will return a `string` with details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_cycle_mining(coin)",'if typeof(result) == "string" then',' exit "Failed getting cyclic mining value due to: " + result',"end if",'print "cyclic mining value: " + result']},get_reward:{description:"Returns a `number` representing the amount of coins that will be received as a reward after each mining cycle. In case of failure, the method will return a `string` with details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_reward(coin)",'if typeof(result) == "string" then',' exit "Failed getting reward value due to: " + result',"end if",'print "reward value: " + result']},set_reward:{description:"Assigns the reward that miners will receive after each mining cycle. The reward value has to be above one. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, the method will return a `number` with the value one. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = set_reward(coin, -1)",'if typeof(result) == "string" then',' exit "Failed setting reward due to: " + result',"end if",'print "Successfully set reward!"']},transaction:{description:"Makes a transaction of the currency between the indicated subwallets. In case of an error, a `string` with the details is returned. In case of success, a `number` with a value of one will be returned. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','result = transaction(coin, "test", "test2", 20)','if typeof(result) == "string" then',' exit "Failed transaction due to: " + result',"end if",'print "Successfully transfered!"']},create_subwallet:{description:"Registers a new account in the `coin` that can be used to manage services such as stores. It is necessary to provide the PIN of the owner's `wallet` that wants to register. In case of success, the method will return a `number` with the value one. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. In case of an error, a `string` with the details is returned.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','wallet = login_wallet(blockchain, "test", "test")','result = create_subwallet(coin, "test", wallet.get_pin, "test", "test")','if typeof(result) == "string" then',' exit "Failed to create subwallet due to: " + result',"end if",'print "Successfully created subwallet!"']},get_subwallet:{description:"Returns a `subWallet` object on success. In case of error, it returns a `string` with the details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','result = get_subwallet(coin, "test")','if typeof(result) == "string" then',' exit "Failed to get subwallet due to: " + result',"end if",'print "Successfully received subwallet!"']},get_subwallets:{description:"Returns a `list` where each item is a `subWallet` object, including all the accounts registered in the cryptocurrency. In case of error, it returns a `string` with the details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_subwallets(coin)",'if typeof(result) == "string" then',' exit "Failed to get subwallets due to: " + result',"end if","for subwallet in result",' print get_user(subwallet) + " has " + get_balance_subwallet(subwallet) + " coins"',"end for"]},set_address:{description:"Configures a valid address that will be shown to users who do not have the currency, indicating where to register. In case of an error, a `string` with the details is returned. In case of success, a `number` with a value of one will be returned. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','result = set_address(coin, "12.12.12.12")','if typeof(result) == "string" then',' exit "Failed to set address due to: " + result',"end if",'print "Successfully set address!"']},get_address:{description:"Returns the configured address that will be shown to users who do not have the currency, indicating where they have to register. In case of an error, the method will return a `string` with details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_address(coin)","if not is_valid_ip(result) then",' exit "Failed to get address due to: " + result',"end if",'print "address: " + result']},get_mined_coins:{description:"Returns a `number` representing the amount of coins that have been mined so far. In case of an error, the method will return a `string` with details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_mined_coins(coin)",'if typeof(result) == "string" then',' exit "Failed to get mined coins due to: " + result',"end if",'print "mined coins: " + result']},reset_password_coin:{description:"Resets the password of the coin. It returns a `number` with the value one if resetting was successful; otherwise, it will return a `string`. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','result = reset_password(coin, "test")','if typeof(result) == "string" then',' exit "Failed to reset password due to: " + result',"end if",'print "Successfully reset password"']},get_ports:{description:"Returns a `list` of `port`s on the `computer` which are active. If an invalid `computer` object is passed, this method will return `null`.",example:["router = get_router","ports = get_ports(host_computer(get_shell))","for port in ports",' print("Info: " + router.port_info(port))',"end for"]},get_name:{description:'Returns the hostname of the machine. If an invalid `computer` object is passed, this method will return a `string` containing `"Unknown"`.',example:["computerName = get_name(host_computer(get_shell))",'print("The name of your machine is " + computerName)']},lan_ip:{description:"Returns a `string` with the local IP address of the `computer`. If an invalid `computer` object is passed, this method will return `null`.",example:["localIp = lan_ip(host_computer(get_shell))",'print("Public ip:" + localIp)']},public_ip_pc:{description:"Returns a `string` with the public IP address of the `computer`. If an invalid `computer` object is passed, this method will return `null`.",example:["publicIp = public_ip_pc(host_computer(get_shell))",'print("Public ip:" + publicIp)']},File:{description:"Returns a `file` located at the path provided in the arguments. The path can be either relative or absolute. Keep in mind that any `file` object can be a folder as well. If the provided path cannot be resolved, meaning that no file or folder exists, this method will return `null`. Providing any other type than `string` or the value being empty for the path will result in an error thrown interrupting the script execution. If an invalid `computer` object is passed, this method will return `null`.",example:['filePath = "/etc/passwd"',"file = File(host_computer(get_shell), filePath)","if file != null then"," print(file.get_content)","else",' print("File at given path " + filePath + " does not exist.")',"end if"]},create_folder:{description:"Creates a folder at the path provided in the arguments. There are certain limitations when it comes to creating a folder. The folder name has to be alphanumeric and below 128 characters. Creation will fail as well when there is already a folder in place or if there are lacking permissions. Additionally, there is a folder limit of about 250 in each folder and 3125 folders in the computer overall. In case the folder creation fails, the method will return a `string` with details. In case of success, it will return a `number` with the value one. Providing any type that deviates from the signature or using this method in an SSH encryption process will cause an error to be thrown, aborting further script execution. If an invalid `computer` object is passed, this method will return `null`.",example:['path = "/home/" + active_user + "/Desktop"',"computer = host_computer(get_shell)",'createResult = create_folder(computer, path, "myfolder")','if typeof(createResult) == "string" then',' print("There was an error when creating the folder: " + createResult)',"else",' print("Folder got created at given path " + path)',"end if"]},is_network_active:{description:"Returns a `number` with either the value one or zero. The value will be one if the `computer` has internet access. If there is no internet access, it will return zero instead. In case an invalid `computer` object is passed, this method will return `null`.",example:["computer = host_computer(get_shell)","if is_network_active(computer) then",` print("You're connected.")`,"else",` print("You're not connected.")`,"end if"]},touch:{description:"Creates an empty text `file` at the provided path. Certain limitations apply to file creation: the `file` name must be alphanumeric and below 128 characters. Creation will fail if a `file` already exists at the specified path or if there are insufficient permissions. Additionally, there is a file limit of about 250 per folder and 3125 files overall on the computer. If successful, it returns a `number` with the value one. On failure, it returns a `string` with details. Using this method in an SSH encryption process will cause an error to be thrown, preventing further script execution. If an invalid `computer` object is passed, this method will return `null`.",example:['path = "/home/" + active_user + "/Desktop"',"computer = host_computer(get_shell)",'createResult = touch(computer, path, "myFile.txt")','if typeof(createResult) == "string" then',' print("There was an error when creating the file: " + createResult)',"else",' print("File got created at given path " + path)',"end if"]},show_procs:{description:"Returns a `string` providing an overview of all active processes on the `computer`. This includes information about the username, PID, CPU usage, memory consumption, and command name. Using this method in an SSH encryption process will throw an error, preventing further script execution. If an invalid `computer` object is passed, this method will return `null`.",example:["computer = host_computer(get_shell)","procs = show_procs(computer)","list = procs.split(char(10))[1:]","processes = []","for item in list",' parsedItem = item.split(" ")'," process = {}"," process.user = parsedItem[0]"," process.pid = parsedItem[1]"," process.cpu = parsedItem[2]"," process.mem = parsedItem[3]"," process.command = parsedItem[4]"," processes.push(process)","end for","print(processes)"]},network_devices:{description:"Returns a `string` containing all network devices available on the `computer`, with each item providing information about the interface name, chipset, and whether monitoring support is enabled. If an invalid `computer` object is passed, this method will return `null`.",example:["computer = host_computer(get_shell)","devices = network_devices(computer)","deviceList = devices.split(char(10))","for item in deviceList"," print(item)","end for"]},change_password:{description:"Changes the password of an existing user on the `computer`. Root permissions are necessary for successful password changes. Passwords can only include alphanumeric characters and cannot exceed 15 characters. If the password change fails, this method will return a `string` containing information on why it failed. If the change succeeds, it will return a `number` with the value one. If the provided username is empty, an error will be thrown, preventing any further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','changeResult = change_password(computer, "test", "newPassword")','if typeof(changeResult) == "string" then',' print("There was an error when changing the password: " + changeResult)',"else",' print("Password got successfully changed.")',"end if"]},create_user:{description:"Creates a user on the `computer`, with the specified name and password. Root permissions are necessary for successful user creation. Neither username nor password can exceed more than 15 characters and both need to be alphanumeric. There cannot be more than 15 users created on the same `computer`. In case the creation fails, this method will return a `string` containing the reason for the failure. On success, it will return a `number` with the value one. If the provided username is empty or either of the values exceeds 15 characters, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','creationResult = create_user(computer, "newUser", "123")','if typeof(creationResult) == "string" then',' print("There was an error when creating an user: " + creationResult)',"else",' print("User got successfully created.")',"end if"]},delete_user:{description:"Deletes the indicated user from the `computer`. It can optionally also delete the home folder related to the user. By default, the home folder will not be deleted. Root permissions are necessary to successfully delete a user. Keep in mind that you cannot delete the root user. In case the deletion fails, this method will return a `string` containing the cause of failure. On success, this method will return a `number` with the value one. If the provided username is empty, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','deletionResult = delete_user(computer, "test", true)','if typeof(deletionResult) == "string" then',' print("There was an error when deleting an user: " + deletionResult)',"else",' print("User got successfully deleted.")',"end if"]},create_group:{description:"Creates a new group associated with an existing user on the `computer`. It is necessary to be root to be able to successfully create a group. There are a few limitations when creating a group such as a character limit of 15 and that the group name may only contain alphanumeric characters. In case the group creation fails, this method will return a `string` containing the cause of failure. On success, it will return a `number` with the value one. In case the provided arguments are empty or the username exceeds 15 characters, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','creationResult = create_group(computer, "test", "staff")','if typeof(creationResult) == "string" then',' print("There was an error when creating a group: " + creationResult)',"else",' print("Group got successfully created.")',"end if"]},delete_group:{description:"Deletes an existing group associated with an existing user on the `computer`. It is necessary to be root to be able to successfully delete a group. In case the group deletion fails, this method will return a `string` containing the cause of failure. On success, it will return `number` with the value one. If either of the provided values is empty, an error will be thrown preventing further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','deletionResult = delete_group(computer, "test", "staff")','if typeof(deletionResult) == "string" then',' print("There was an error when deleting a group: " + deletionResult)',"else",' print("Group got successfully deleted.")',"end if"]},groups:{description:"Returns a `string` containing groups associated with an existing user on the `computer`. In case the user does not exist, a `string` will be returned with an error message. If the provided username is empty, an error will be thrown preventing further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','create_group(computer, "root", "staff")','groups = groups(computer, "root")',"listOfGroups = groups.split(char(10))","print(listOfGroups)"]},close_program:{description:"Closes a program associated with the provided PID. You can see the list of active programs by either using `show_procs` or typing `ps` into your terminal. To close a program, you need to be either the owner of the running process or root. In case the closing of a program fails, this method will return a `string` containing details. On success, it will return a `number` with the value one. If there is no process with the provided PID, this method will return a `number` with the value zero. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))',"processes = split(show_procs(computer), char(10))[1:]",'pid = split(processes[1], " ")[1]',"closeResult = close_program(computer, to_int(pid))",'if typeof(closeResult) == "string" then',' print("There was an error when closing a program: " + closeResult)',"else",' print("Program with pid " + pid + " got successfully closed.")',"end if"]},wifi_networks:{description:"Returns a list of the Wi-Fi networks that are available for the provided interface. Each item in the `list` is a `string` containing information on the BSSID, PWR, and ESSID. If no matching netDevice can be found or an invalid `computer` object is passed, this method will return `null`. In case the active network card is not a Wi-Fi card, an error will be thrown, preventing any further script execution.",example:['computer = host_computer(get_shell("root", "test"))','networks = wifi_networks(computer, "wlan0")',"result = []","for network in networks",' parsedItem = network.split(" ")'," item = {}"," item.BSSID = parsedItem[0]"," item.PWR = parsedItem[1]"," item.ESSID = parsedItem[2]"," result.push(item)","end for","print(result)"]},connect_wifi:{description:"Connects to the indicated Wi-Fi network. It is not possible to connect to a new Wi-Fi while being logged in as a guest. If connecting to a new Wi-Fi fails, this method will return a `string` containing details. On success, it will return a `number` with the value one. Wi-Fi networks can be found via `wifi_networks` or by typing `iwlist` as a command in the terminal. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:["computer = host_computer(get_shell)","networks = wifi_networks(computer)",'firstNetwork = networks[0].split(" ")',"BSSID = firstNetwork[0]","ESSID = firstNetwork[2]",'connectionResult = connect_wifi(host_computer, "wlan0", BSSID, ESSID, "wifi-password")','if typeof(connectionResult) == "string" then',' print("There was an error while connecting to new Wifi: " + connectionResult)',"else",' print("Connected to new Wifi successfully.")',"end if"]},connect_ethernet:{description:"Sets up a new IP address on the `computer` through the ethernet connection. It is not possible to set up a new IP address while being logged in as a guest. On failure, this method will either return a `string` with details or `null`. On success, it will return an empty `string`. If any of the provided parameters have a type that deviates from the defined signature or the computer is not connected to the internet, an error will be thrown preventing any further script execution.",example:["computer = host_computer(get_shell)",'connectionResult = connect_ethernet(computer, "eth0", "192.168.0.4", local_ip(get_router))','if typeof(connectionResult) == "string" then',' print("There was an error while connecting: " + connectionResult)',"else",' print("Connected successfully.")',"end if"]},network_gateway:{description:'Returns a `string` with the gateway IP address configured on the `computer`. If an invalid `computer` object gets passed, this method returns a `string` with the value `"0.0.0.0"`.',example:["computer = host_computer(get_shell)","gatewayIp = network_gateway(computer)",'print("Gateway IP: " + gatewayIp)']},active_net_card:{description:'Returns a `string` which contains either the keyword `"WIFI"` or `"ETHERNET"` depending on which connection type your `computer` is connected by. In case an invalid `computer` object gets passed, this method will return `null`.',example:["computer = host_computer(get_shell)","netCard = active_net_card(computer)",'print("Connected by: " + netCard)']},aircrack:{description:"Returns a `string` containing the password based on the file which was generated via aireplay. In case of failure, it will return `null` instead. If the provided path is empty, an error will be thrown, interrupting the script execution.",example:['crypto = include_lib("/lib/crypto.so")','networks = wifi_networks(host_computer(get_shell), "wlan0")','firstNetwork = networks[1].split(" ")',"bssid = firstNetwork[0]","pwr = firstNetwork[1][:-1].to_int","essid = firstNetwork[2]","aireplayResult = aireplay(crypto, bssid, essid, 300000 / pwr)","if (aireplayResult == null) then",' result = aircrack(crypto, home_dir + "/file.cap")'," print(result)","end if"]},airmon:{description:'Enables or disables the monitor mode of a network device. The `options` parameter can only be `"start"` or `"stop"`. Monitor mode can only be enabled on Wifi cards. If it wasn\'t possible to enable or disable the monitor mode, this method will return either a `number` with the value zero or a `string` with details. In case of success, it will return a `number` with the value one.',example:['crypto = include_lib("/lib/crypto.so")','airmonResult = airmon(crypto, "start", "wlan0")','if typeof(airmonResult) == "string" then',' print("There was an error while switching monitoring mode: " + airmonResult)',"else",' print("Monitoring mode switched successfully.")',"end if"]},aireplay:{description:'Used to inject frames on wireless interfaces. Once the command with `"Control+C"` is stopped, it will save the captured information in a text file called `"file.cap"` in the path where the terminal is currently located. Alternatively, a maximum of captured `acks` can be specified for the command to stop automatically, saving the `"file.cap"` file as described above. To figure out how many ACKs are required, you can use the following formula: `"300000 / [Wifi PWR]"`. If there is an error, a `string` will be returned with the message indicating the problem. On success, it will return `null`. It is advised though to verify that the capture file actually exists. If the passed `crypto` object is invalid, it will return `null` as well. In case any of the provided values deviate from the signature types or bssid/essid is empty, an error will be thrown preventing any further script execution.',example:['crypto = include_lib("/lib/crypto.so")','networks = wifi_networks(host_computer(get_shell), "wlan0")',"for index in range(0, networks.len - 1)",' print(index + ".) " + networks[index])',"end for",'selectedIndex = user_input("Select Wifi: ").to_int','if (typeof(selectedIndex) == "string" or selectedIndex < 0 or selectedIndex > networks.len - 1) then',' exit("Wrong index!")',"end if",'parsed = networks[selectedIndex].split(" ")',"bssid = parsed[0]","pwr = parsed[1][:-1].to_int","essid = parsed[2]","potentialAcks = 300000 / pwr","aireplaycrypto, bssid, essid, potentialAcks)",'wifiPassword = aircrack(crypto, "/home/" + active_user + "/file.cap")','print("Wifi password for " + essid + " is " + wifiPassword)']},decipher:{description:"Returns a decrypted password via the provided password MD5 hash. Keep in mind that this method is not decrypting a password but rather checking for existing passwords within the game world with a matching MD5 hash. So in case a password does not exist in the game world, the decryption will fail. On failure, this method will return `null`. Using this method in an SSH encryption process will cause an error to be thrown, aborting further script execution.",example:['crypto = include_lib("/lib/crypto.so")','computer = host_computer(get_shell("root", "test"))','passwdContent = get_content(File(computer, "/etc/passwd"))',"firstAccount = passwdContent.split(char(10))[0]",'parsed = firstAccount.split(":")',"username = parsed[0]","passwordHash = parsed[1]","password = decipher(crypto, passwordHash)",'print("User: " + username)','print("Password: " + password)']},smtp_user_list:{description:"Returns a `list` of the existing users on the `computer` where the SMTP service is running. If these users also have an email account registered on the SMTP server, it will be indicated in the `list`. SMTP services are usually running on port `25`. In case of failure, this method will return a `string` containing the cause. If any of the provided values deviate from the signature types, this method will return `null`.",example:['crypto = include_lib("/lib/crypto.so")','print(smtp_user_list(crypto, "192.168.0.4", 25))']},get_description:{description:"Returns a `string` with the CTF event description. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},get_template:{description:"Returns a `string` with the CTF event template. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},player_success:{description:"Returns a `number` with the value one if the CTF event was completed successfully. Otherwise, this method will return a `number` with the value zero. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},get_creator_name:{description:"Returns a `string` with the name of the CTF event creator. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},get_mail_content:{description:"Returns a `string` with the mail content of the CTF event. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},chmod:{description:'Modifies the `file` permissions. Optionally, these permissions can also be applied recursively. The format for applying permissions is as follows: `"[references][operator][modes]"`. The references type is defined through three possible types: user `"u"`, group `"g"`, and other `"o"`. The operator is used to define if permissions get added `"+"` or removed `"-"`. There are three different modes that can be modified: read `"r"`, write `"w"`, and execute `"x"`. So, for example, `"o-wrx"` would remove all possible permissions for others. To add all permissions for others again, `"o+wrx"` would be used. In case the modification fails, this method will return a `string` containing information about the reason. Otherwise, an empty `string` is returned. In case any type other than `number` is used for the `isRecursive` parameter, an error will be thrown preventing further script execution. If an invalid `file` object is passed, this method will return `null`.',example:['hostComputer = host_computer(get_shell("root", "test"))','rootFolder = File(hostComputer, "/bin")',"oldPermissions = permissions(rootFolder)",'chmod(rootFolder, "o-wrx", true)',"newPermissions = permissions(rootFolder)",'print("Old permissions: " + oldPermissions)','print("New permissions: " + newPermissions)']},copy:{description:"Copies the `file` to the provided path. Files can only be copied if the user has read and write permissions or is root. The new filename has to be below 128 characters and alphanumeric. After success, this method will return a `number` with the value one. Otherwise, it will return a `string` containing information about the reason for failure. If any of the parameter types deviate from the method signature, this method is used within an SSH encryption process, the new name exceeds 128 characters, or the path is too long, an error will be thrown, causing an interruption of script execution. In case the current file gets deleted or an invalid `file` object is passed, this method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','copyResult = copy(passwdFile, "/etc/", "duplicate")','if typeof(copyResult) == "string" then',' print("There was an error while copying file: " + copyResult)',"else",' print("File got copied successfully.")',"end if"]},move:{description:"Moves the `file` to the provided path. Files can only be moved if the user has read and write permissions or is root. The new filename has to be below 128 characters and alphanumeric. After success, this method will return a `number` with the value one. Otherwise, this method will return a `string` with details. If any of the parameter types deviate from the method signature, this method is used within an SSH encryption process, the new name exceeds 128 characters, or the path is too long, an error will be thrown, causing an interruption of script execution. In case the current file gets deleted or an invalid `file` object is passed, this method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','moveResult = move(passwdFile, "/etc/", "/moved/")','if typeof(moveResult) == "string" then',' print("There was an error while moving file: " + moveResult)',"else",' print("File got moved successfully.")',"end if"]},symlink:{description:"Creates a symlink to the specified path. Symlinks can only be created if the user has write permissions or is root. The new filename must be alphanumeric and under 128 characters. Upon success, this method returns a `number` with the value one. On failure, it returns a `string` with details. If any parameters deviate from the method signature, if used within an SSH encryption process, if the new name exceeds 128 characters, or if the path is too long, an error will be thrown, interrupting script execution. In case the current file gets deleted or an invalid `file` object is passed, this method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','lsFile = File(computer, "/bin/ls")','symResult = symlink(lsFile, "/bin", "alternativeLS")','if typeof(symResult) == "string" then',' print("There was an error while creating symlink: " + symResult)',"else",' print("Symlink got created successfully.")',"end if"]},rename:{description:"Rename the file with the name provided. Files can only be renamed if the user has write permissions or is root. The new filename has to be below 128 characters and alphanumeric. On failure, this method will return a `string` with details. Otherwise, this method will return an empty string. If this method is used within an SSH encryption process, an error will be thrown, causing the script execution to be interrupted. In case the provided name is `null` or an invalid `file` object is passed, this method will return a `number` with the value zero.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','renameResult = rename(passwdFile, "renamed")','if typeof(renameResult) == "string" then',' print("There was an error while renaming file: " + renameResult)',"else",' print("File got renamed successfully.")',"end if"]},path:{description:"Returns a `string` containing the file path. If the file is a symlink, the optional `symlinkOrigPath` argument can be set to return the original path of the linked file instead. If the file has been deleted, this method will still return the path it had prior to deletion. If an invalid `file` object is passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'passwdFile = File(computer, "/etc/passwd")','print("File location: " + path(passwdFile))']},is_folder:{description:"Returns a `number`. The value is one if the file is a folder, zero otherwise. In case the file gets deleted or an invalid `file` object is passed, this method will return `null` instead.",example:["computer = host_computer(get_shell)",'etcFolder = File(computer, "/etc")','print("Is a folder: " + is_folder(etcFolder))']},parent:{description:"Returns the parent folder of the current file or folder. In case there is no parent folder `null` will be returned instead. In case the file gets deleted or an invalid `file` object gets passed, this method will return `null` as well.",example:["computer = host_computer(get_shell)",'etcFolder = File(computer, "/etc")','print("Parent path: " + path(parent(etcFolder)))']},name:{description:"Returns a `string` with the name of the file. In case the file gets deleted or an invalid `file` object gets passed, this method will return `null` instead.",example:["computer = host_computer(get_shell)",'passwdFile = File(computer, "/etc/passwd")','print("Filename: " + name(passwdFile))']},allow_import:{description:"Returns a `number`. If the file is binary and can be imported by other scripts, the value will be one; otherwise, the value will be zero. In case the file gets deleted, this method will cause a crash. If an invalid `file` object gets passed, this method will return `null` instead.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("File can be imported: " + allow_import(lsBinary))']},get_content:{description:"Returns a `string` representing the content of the file. To read a file, the user requires read access or being root. Note that you cannot read a binary file. In case of failure, `null` will be returned. If this method is used within an SSH encryption process, an error will be thrown, preventing any further script execution.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','print("File content: " + get_content(passwdFile))']},set_content:{description:"Saves text into a `file`. The content will not get appended to the `file`; therefore, existing content will be overridden. To set new content, the user requires write permissions or being root. Keep in mind that text files cannot exceed the character limit of 160,000. In case setting the content was successful, a `number` with the value one will be returned. Otherwise, a `string` with details will be returned. If this method is used within an SSH encryption process, an error will be thrown, preventing any further script execution. If the provided content is `null`, an invalid `file` object gets passed or permissions are lacking, this method will return a `number` with the value zero. In case the file gets deleted this method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','setResult = set_content(passwdFile, "moo")','if typeof(setResult) == "string" then',' print("There was an error while setting file content: " + setResult)',"else if setResult == 0 then",' print("Unable to set content of file!")',"else",' print("File content got changed successfully.")',"end if"]},is_binary:{description:"Returns a `number`. If the file is a binary, the value will be one; otherwise, it will be zero. In case the file gets deleted or an invalid `file` object gets passed, this method will return `null` instead.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("File is a binary: " + is_binary(lsBinary))']},is_symlink:{description:"Returns a `number`. If the file is a symlink, the value will be one; otherwise, it will be zero. In case the file gets deleted or an invalid `file` object gets passed, this method will return `null` instead.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("File is a symlink: " + is_symlink(lsBinary))']},has_permission:{description:'Returns a `number` indicating if the user who launched the script has the requested permissions. One will indicate that the user has the correct permissions. In case permissions are lacking, the value will be zero. There are three different permission types: read `"r"`, write `"w"`, and execute `"x"`. In case the file gets deleted or an invalid `file` object gets passed, this method will return `null` instead.',example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("Is able to execute ls: " + has_permission(lsBinary, "x"))']},delete:{description:"Delete the current file. To delete files, write permissions are required or being root. In case of failure, a `string` with details will be returned. Otherwise, an empty `string` gets returned. Please note that deleting a file will leave a log entry. In case an invalid `file` object gets passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")',"deletionResult = delete(lsBinary)",'if typeof(deletionResult) == "string" and len(deletionResult) > 0 then',' print("There was an error while deleting a file: " + deletionResult)',"else",' print("File got deleted successfully.")',"end if"]},get_folders:{description:"Returns a `list` of folders. In case the current entity is a file instead of a folder this method will return `null`, so it is advisable to first use the `is_folder` function before calling this method. In case the current folder gets deleted or an invalid `file` object gets passed, this method will return `null` as well.",example:["computer = host_computer(get_shell)",'binFolder = File(computer, "/home")',"folders = get_folders(binFolder)","for folder in folders"," print(folder.path)","end for"]},get_files:{description:"Returns a `list` of files. In case the current entity is a file instead of a folder this method will return `null`, so it is advisable to first use the `is_folder` function before calling this method. In case the current folder gets deleted or an invalid `file` object gets passed, this method will return `null` as well.",example:["computer = host_computer(get_shell)",'binFolder = File(computer, "/bin")',"files = get_files(binFolder)","for file in files"," print(file.path)","end for"]},permissions:{description:'Returns a `string` with the current file permissions. In case the current file gets deleted or an invalid `file` object gets passed, this method will return `null`. The format for this permissions `string` is as follows: `"[fileType][wrx](u)[wrx](g)[wrx](o)"`. The file type is either `"d"` in case it\'s a directory or `"-"`. The user type gets defined through three possible types: user `"u"`, group `"g"`, and other `"o"`. There are three different permission types: read `"r"`, write `"w"`, and execute `"x"`. An example of a `string` returned by this method would be `"-rwxr-xr-x"`. Taking the latter as an example, the following things become clear:\n* The provided file is not a directory.\n* The user has full access.\n* The group and others have almost all permissions besides writing.\n',example:["computer = host_computer(get_shell)",'binFolder = File(computer, "/bin")',"perms = permissions(binFolder)","fileType = perms[0]","permissionsForUser = perms[1:4]","permissionsForGroup = perms[4:7]","permissionsForOther = perms[7:10]",'print("File type: " + fileType)','print("User permissions: " + permissionsForUser)','print("Group permissions: " + permissionsForGroup)','print("Other permissions: " + permissionsForOther)']},owner:{description:"Returns a `string` with the name of the file owner. User permissions get applied to whoever is the owner of a file. In case the current file gets deleted or an invalid `file` object gets passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("Owner of ls is: " + owner(lsBinary))']},set_owner:{description:"Change the owner of this file. Optionally the owner can get applied recursively. The owner's name cannot exceed 15 characters. Additionally either write permissions or being root is required. In case of failure a `string` gets returned containing the cause. Otherwise an empty `string` gets returned. In case the current file gets deleted, an invalid `file` object gets passed or the passed owner value is not a `string`, this method will return `null`. If the passed owner value is empty, the owner value is longer than 15 characters, or the passed recursive value deviates from its original type, an error will be thrown, interrupting further script execution.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','ownerResult = set_owner(lsBinary, "root")','if typeof(ownerResult) == "string" then',' print("There was an error while changing owner: " + ownerResult)',"else",' print("File owner changed successfully.")',"end if"]},group:{description:"Returns a `string` with the name of the group to which this file belongs. Group permissions get applied to whoever is the owner of a file. In case the current file gets deleted or an invalid `file` object gets passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("File is related to following group: " + group(lsBinary))']},set_group:{description:"Change the group related to this file. Optionally the group can get applied recursively. The group name cannot exceed 15 characters. Additionally either write permissions or being root is required. In case of failure, a `string` with details. On success, an empty `string` gets returned. In case the current file gets deleted, an invalid `file` object gets passed or the passed group is not a `string`, this method will return `null`. If the passed group value is empty, the group value is longer than 15 characters, or the passed recursive value deviates from its original type, an error will be thrown, preventing further script execution.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','ownerResult = set_group(lsBinary, "root")','if typeof(ownerResult) == "string" then',' print("There was an error while changing group: " + ownerResult)',"else",' print("File group changed successfully.")',"end if"]},size:{description:"Returns a `string` with the size of the file in bytes. There is no correlation between file size and actual file content. Instead, the file size is depending on the name of the file. In case the current file gets deleted or an invalid `file` object gets passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")',"size = size(lsBinary)","if size.to_int > 1000 then",' print("File size is bigger than 1000 bytes.")',"else",' print("File size is below 1000 bytes.")',"end if"]},load:{description:"Returns a `metaLib` object for the provided path to the library binary. Keep in mind that this can only be used on library files. On failure, this method will return `null`. If the provided path is empty, this method will throw a runtime exception, preventing further script execution.",example:['metax = include_lib("/lib/metaxploit.so")','libFolder = File(host_computer(get_shell), "/lib")',"for file in get_files(libFolder)"," metaLib = load(metax, file.path)",' print("Library: " + lib_name(metaLib) + " - " + version(metaLib))',"end for"]},net_use:{description:"Returns a `netSession` object for the provided IP address and port. Note that if the port is set to zero, it will return a `netSession` related to the kernel router. The main purpose of this method is to gain a `netSession` and then use `dump_lib` to receive a `metaLib` object to exploit vulnerabilities. In case of failure, this method will return `null`. If this method is used within an SSH encryption process or with disabled internet, or if an invalid target IP is provided, this method will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))',"for port in ports",' netSession = net_use(metax, "1.1.1.1", port_number(port))'," metaLib = dump_lib(netSession)",' print("Library: " + lib_name(metaLib) + " - " + version(metaLib) + " on port " + port_number(port))',"end for"]},rshell_client:{description:"Launches a process on the victim's `computer`, silently attempting to continuously connect in the background to the specified address and port. For the reverse shell to run successfully, the `rshell` service must be installed, and the port forward must be configured correctly on the machine where the server is waiting for the victim's connection. If the launch was successful, a `number` with the value one will be returned. In case of failure, a `string` with details will be returned.",example:['metax = include_lib("/lib/metaxploit.so")','rshell_client(metax, "1.1.1.1", 1222, "bgprocess")']},rshell_server:{description:"This method returns a `list` of `shell` objects that have been reverse shell connected to this computer. To manage the connections received, the `rshell` service must be installed on the machine that receives the victims' connections. In case of failure a `string` will be returned with details. If the provided object is anything other than `metaxploit` this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")',"shells = rshell_server(metax)","firstShell = shells[0]",'chmod(File(host_computer(firstShell), "/"), "o-wrx", true)']},scan:{description:'Returns a `list` where each item is a `string` representing a memory area which has vulnerabilities related to the provided library. These memory areas can be used to make further scans via `scan_address`. In case of failure, this method returns `null` instead. An example of a memory area would be "0x7BFC1EAA". Using this method within a SSH encryption process will throw a runtime exception.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")',"scanResult = scan(metax, metaLib)","for area in scanResult",' print("Memory area containg vulnerability: " + area)',"end for"]},scan_address:{description:"Returns a `string` containing information about each vulnerability in the provided library and memory area. In case the scanning fails this method will return `null`. Using this method within a SSH encryption process will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")',"scanResult = scan(metax, metaLib)","scanAddress = scan_address(metax, metaLib, scanResult[0])",'segments = split(scanAddress, "Unsafe check: ")[1:]',"exploits = []","for segment in segments",' labelStart = indexOf(segment, "<b>")',' labelEnd = indexOf(segment, "</b>")'," push(exploits, segment[labelStart + 3: labelEnd])","end for",'print("Available vulnerabilities: " + join(exploits, ", "))']},sniffer:{description:"The terminal listens to the network packets of any connection that passes through the computer. When any connection information gets captured, it will print a `string` with the obtained data. In case saving of encryption source is enabled it will download the source code of the script responsible for encryption. In case the operation fails this method will return `null`. Using this method within a SSH encryption process will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")',"result = sniffer(metax)","print(result)"]},overflow:{description:"Exploits vulnerabilities. The returned value can be of various data types. Therefore, using `typeof` is advisable. `optArgs` are required when changing a password or obtaining a `computer` via a router. It should be the desired password or LAN IP, respectively. Change password and firewall disable exploits will return a `number`, where the value is either one or zero. One indicates success while zero indicates failure. Shell, computer, and file exploits either return an instance of their type or `null`. Providing values that deviate from the defined signature will cause a runtime exception to be thrown.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")',"scanResult = scan(metax, metaLib)","target = scanResult[0]","scanAddress = scan_address(metax, metaLib, target)",'segments = split(scanAddress, "Unsafe check: ")',"exploit = null"," for segment in segments",' hasRequirement = indexOf(segment, "*") != null'," if (not hasRequirement) then",' labelStart = indexOf(segment, "<b>")',' labelEnd = indexOf(segment, "</b>")'," exploit = segment[labelStart + 3: labelEnd]"," end if","end for","if (exploit) then",' print("Exploiting... " + target + ":" + exploit)'," print(overflow(metaLib, target, exploit))","else",' print("No exploit found with zero requirements")',"end if"]},version:{description:'Returns a `string` containing the version number of the library. An example of a version number would be `"1.0.0"`. In case an invalid `metaLib` object gets passed this method will return `null`.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")','print("Init.so version: " + version(metaLib))']},lib_name:{description:'Returns a `string` containing the name of the library. An example of a name would be `"init.so"`. In case an invalid `metaLib` object gets passed this method will return `null`.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")','print("Name for library is: " + lib_name(metaLib))']},dump_lib:{description:"Returns the `metaLib` associated with the remote service. For example if the `metaxpoit` method `net_use` was used on a ssh port it will return the `metaLib` related to the ssh service. In case the port was zero is will return a `metaLib` related to the kernel router. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))',"metaLib = dump_lib(netSession)",'print("Library: " + lib_name(metaLib) + " - " + version(metaLib) + " on port " + port_number(ports[0]))']},get_num_conn_gateway:{description:"Returns the number of devices using this router as a gateway. If you obtained your `netSession` from a computer, it will fetch and return the value from its gateway router. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("Gateway clients: " + get_num_conn_gateway(netSession))']},get_num_portforward:{description:"Returns the number of ports forwarded by this router. If you obtained your `netSession` from a computer, it will fetch and return the value from its gateway router. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("Port forwards: " + get_num_portforward(netSession))']},get_num_users:{description:"Returns the number of user accounts on the system. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("User accounts: " + get_num_users(netSession))']},is_any_active_user:{description:"Returns a `number`. If there is an active user on the system it will be one. Otherwise, it will be zero. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("User Active?: " + is_any_active_user(netSession))']},is_root_active_user:{description:"Returns a `number`. If there is an active root on the system it will be one. Otherwise, it will be zero. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("Root Active?: " + is_root_active_user(netSession))']},device_ports:{description:"Returns a `list` where each item is an open `port` related to the device of the provided LAN IP address. The device needs to be within the network of the `router`. In case of failure, this method will return `null` or a `string` with details. In case an empty ip is provided this method will throw a runtime exception.",example:["router = get_router","devices = devices_lan_ip(router)","for ip in devices"," ports = device_ports(router, ip)"," openPorts = []"," for port in ports"," if is_closed(port) then continue"," push(openPorts, port)"," end for",""," if (len(openPorts) == 0) then",' print(ip + " has no open ports")'," else",' print(ip + " contains following open ports:")'," for port in openPorts",' print("|-" + port.port_number)'," end for"," end if","end for"]},devices_lan_ip:{description:"Returns a `list` where each item is a `string` representing a LAN IP address. All devices are within the network of the router and can be reached by using the `ping` method. Some of the devices might be behind a firewall. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","devices = devices_lan_ip(router)","for ip in devices",' print(ip + " found!")',"end for"]},bssid_name:{description:"Returns a `string` with the BSSID value of the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","bssid = bssid_name(router)",'print("BSSID: " + bssid)']},essid_name:{description:"Returns a `string` with the ESSID value of the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","essid = essid_name(router)",'print("ESSID: " + essid)']},firewall_rules:{description:"Returns a `list` where each item is a `string` containing a firewall rule. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","rules = firewall_rules(router)",'print("Firewall rules: " + join(rules, ", "))']},kernel_version:{description:"Returns a `string` with the version of the `kernel_router.so` library. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","version = kernel_version(router)",'print("Kernel router version: " + version)']},local_ip:{description:"Returns a `string` with the local IP address of the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","localIp = local_ip(router)",'print("Local IP: " + localIp)']},public_ip:{description:"Returns a `string` with the public IP address of the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","publicIp = public_ip(router)",'print("Public IP: " + publicIp)']},used_ports:{description:"Returns a `list` where each item is a `port` used inside the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","ports = used_ports(router)","for port in ports",' print("Port " + port_number(port) + " is available!")',"end for"]},ping_port:{description:"Returns a `port` that is behind the port `number` provided. In case the `port` does not exist `null` gets returned.",example:["router = get_router","ports = used_ports(router)","for port in ports"," pingedPort = ping_port(router, port.port_number)"," if (pingedPort == null) then continue",' print("Pinged " + port_number(pingedPort))',"end for"]},port_info:{description:'Returns a `string` with information about the provided port, including details about the running service and its version. For example, the output could be `"http 1.0.0"`. If the operation fails, `null` will be returned.',example:["router = get_router","ports = used_ports(router)","for port in ports"," info = port_info(router, port)"," print(info)","end for"]},install_service:{description:"Installs the necessary files for the correct functioning of the service and starts it. If the installation is completed successfully, it returns a `number` with the value one. In case of an error, it returns a `string` with details. If the passed object is not a `service` this method will cause a crash.",example:['service = include_lib("/lib/libhttp.so")',"result = install_service(service)","if result == 1 then",' print "Successfully installed service"',"else",' print "Service installation failed: " + result',"end if"]},start_service:{description:"Starts the service and opens its associated `port` on the local machine. The service requires a port forwarded to the router to be accessible from the outside. If the service starts correctly, it returns a `number` with the value one. In case of an error, it returns a `string` with details. If the passed object is not a `service` this method will cause a crash.",example:['service = include_lib("/lib/libhttp.so")',"result = start_service(service)","if result == 1 then",' print "Successfully started service"',"else",' print "Starting service failed: " + result',"end if"]},stop_service:{description:"Stops the service and closes its associated `port` on the local machine. If the service is stopped successfully, it returns a `number` with the value one. If an error occurs during the process, it returns a `string` with details. In some cases, the returned `number` might be zero, indicating that the service removal failed. If the passed object is not a `service` this method will cause a crash.",example:['service = include_lib("/lib/libhttp.so")',"result = stop_service(service)","if result == 1 then",' print "Successfully stopped service"',"else",' print "Stopping service failed: " + result',"end if"]},host_computer:{description:"Returns a `computer` related to the `shell`. If an invalid `shell` object gets passed this method will return `null`.",example:["shell = get_shell","computer = host_computer(shell)",'print("Computer public IP is: " + public_ip(computer))']},start_terminal:{description:"Launches an active terminal. The terminal's color will change, displaying the IP of the connected shell. Script execution will be stopped upon starting a new terminal, unless this is called from another script that was executed via `shell.launch`. In that case, you will enter the shell after closing your root-level script within that terminal window. Using this method within an SSH encryption process will cause an error to be thrown, preventing further script execution.",example:["start_terminal(get_shell)"]},build:{description:"Compiles a plain code file provided in the arguments to a binary. On success, the new binary will be available under the provided build folder. The binary name will be the same as the source file just without the file extension. Optionally, an allowImport flag can be set which enables the use of `import_code` on the binary. All provided paths must be absolute. Returns an empty string on success. On failure, it will return a string containing details about the reason for failure. In case any provided values deviate from the defined signature a runtime exception will be thrown.",example:["shell = get_shell","computer = host_computer(shell)",'touch(computer, home_dir, "test.src")','set_content(File(computer, home_dir + "/test.src"), "print(""hello world"")")','buildResult = build(shell, home_dir + "/test.src", home_dir + "/Desktop")','if buildResult != "" then',' print("There was an error while compiling: " + buildResult)',"else",' print("File has been compiled.")',"end if"]},connect_service:{description:"Returns a `shell` if the connection attempt to the provided IP was successful. This method can only connect to ports running an SSH or FTP service. SSH services usually run on port 22 and FTP services usually on port 21. Keep in mind to pass the right service value depending on which service is going to be used. By default, it will use SSH as the service. Please note that connecting will leave a log entry. In case of failure, a string is returned containing details. If any provided arguments deviate from the method signature, if this method is run in an SSH encryption process, or if the computer is not connected to the internet, a runtime exception will be thrown.",example:["shell = get_shell",'connectionResult = connect_service(shell, "1.1.1.1", 22, "test", "test")','if typeof(connectionResult) != "shell" then',' print("There was an error while connecting: " + connectionResult)',"else",' print("Connected!")',"end if"]},ping:{description:"Returns a `number`. If the remote address could be reached the value will be one, zero otherwise. Firewalls do not block ping requests. Passing an invalid ip will cause the method to return a `string` with an error message. If any provided arguments deviate from the method signature a runtime exception will be thrown. If the passed object is a map-like object such as `computer` or `file` but not `shell` this method will return `null`.",example:["shell = get_shell",'isPingable = ping(shell, "1.1.1.1")',"if isPingable then",' print("Ping was successful!")',"else",' print("Ping failed!")',"end if"]},scp:{description:"Send a `file` to the `computer` related to the provided `shell`. You require permission to read the `file` on the `computer` from which you are uploading and write permissions in the folder of the `computer` you are trying to upload to. In case of failure, this method will return a `string` with the cause. Otherwise, a `number` with the value one gets returned. If any of the passed arguments deviates from the types of the method signature, `null` will be returned. In case the `string` for sourceFile or destinationFolder is empty, an error will be thrown, preventing further script execution.",example:["shell = get_shell",'remoteShell = connect_service(shell, "1.1.1.1", 22, "test", "test")','result = scp(remoteShell, "/bin/ls", "/etc/", shell)','if typeof(result) == "string" then',' print("There was an error while sending file: " + result)',"else",' print("File got sent successfully.")',"end if"]},get_balance_subwallet:{description:"Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned. In case an object gets passed which is not a `subWallet` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Balance: " + get_balance_subwallet(subWallet)']},set_info:{description:"Stores optional information in the Subwallet for any use. Upon success, a `number` with the value one will be returned. In case of failure, a `string` with details will be returned. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','subWallet = coin.get_subwallet("test")','result = subWallet.set_info("test")',"if result == 1 then",' print "Subwallet info got set!"',"end if"]},get_info:{description:"Returns a `string` with the information stored by the coin creator. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Subwallet info: " + subWallet.get_info']},delete_subwallet:{description:"Deletes the account registered in the cryptocurrency. Returns a `number` where one indicates successful deletion and zero indicates failure. In case of certain failures, this method may return a `string` with details. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"result = subWallet.delete","if result == 1 then",' print "Subwallet got deleted!"',"end if"]},get_user:{description:"Returns a `string` with the username associated with this subwallet. On failure, this method returns a `string` with an error message. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Subwallet user: " + subWallet.get_user']},last_transaction:{description:"Returns a `list` with the information of the last transaction. Index 0 is a `string` with the other subWallet. Index 1 is an integer with the amount. Index 2 is a `number` indicating the direction of the transaction (0 for Deposit, 1 for Withdrawal). Index 3 is a `string` indicating the date of the transaction. On failure, this method will either return a `number` with the value zero or a `string` with an error message. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"transactionItem = subWallet.last_transaction","destinationAccount = transactionItem[0]","amount = transactionItem[1]","direction = transactionItem[2]","completeDate = transactionItem[3]","if direction == 0 then",' print "Received " + amount + " from " + destinationAccount + " got completed at the " + completeDate',"else",' print "Send " + amount + " to " + destinationAccount + " got completed at the " + completeDate',"end if "]},mining:{description:"Starts the process of mining the cryptocurrency. The process leaves the terminal busy until a coin is mined. On success, this method will return a `number` with the value one. On failure, this method will return a `string` with details. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"while subWallet.mining == 1",' print "Mining...", true',' print "Balance " + subWallet.get_balance',"end while"]},check_password:{description:"Returns a `number` with the value one if the credentials are correct, otherwise, the value is zero. For some cases, this method will return a `string` with an error message. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','password = user_input("SubWallet password:", true)',"if subWallet.check_password(password) == 1 then",' print "Password is correct!"',"end if"]},wallet_username:{description:"Returns a `string` with the name of the `wallet` to which this subwallet belongs. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "SubWallet username: " + subWallet.wallet_username']},list_coins:{description:"Returns a `list` where each item is a `string` with the names of the coins available in the `wallet`. On failure this method returns a `string` with an error message. If the passed value is not a `wallet` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','print "My wallet is connected to: " + join(list_coins(wallet), ", ")']},get_balance:{description:"Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned. Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")',"for coinName in list_coins(wallet)",' print "You have " + get_balance(wallet, coinName) + " coins of the currency """ + coinName + """"',"end for"]},buy_coin:{description:"Publishes a purchase offer indicating the number of coins you wish to buy and the price ($) per unit you are willing to pay. The purchase will be finalized if there is any sale offer with a price less than or equal to the one proposed in the purchase. If there is no eligible offer to sell at that time, the offer to buy will remain publicly visible until a new offer to sell satisfies the requirements. If the publication has been successful, a `number` with the value one is returned. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a runtime exception preventing further script execution.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = buy_coin(wallet, "test", 100, 20, "test")',"if result == 1 then",' print "Sucessfully created purchase offer!"',"else",' print "Failed: " + result',"end if"]},sell_coin:{description:"Publishes a sale offer indicating the amount of coins you want to sell and the price ($) per unit you want to assign. The sale will be finalized if there is any purchase offer with a price greater than or equal to that proposed in the sale. If there is no existing offer to buy that matches the requirements at that time, the offer to sell will remain publicly visible until a new offer to buy satisfies the requirements. If the publication has been successful, a `number` with the value one is returned. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a runtime exception preventing further script execution.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = sell_coin(wallet, "test", 100, 20, "test")',"if result == 1 then",' print "Sucessfully created sell offer!"',"else",' print "Failed: " + result',"end if"]},get_pending_trade:{description:"Returns a `list` with the pending sale or purchase offer of this wallet for a certain currency. Index 0 of the `list` represents the type of offer with a `string` (Buy/Sell), index 1 represents the quantity to be sold or bought, and index 2 represents the price per unit. On failure, this method will return a `string` with details. Any deviation from the method signature will result in a `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = get_pending_trade(wallet, "test")','isBuying = result[0] == "Buy"',"quantity = result[1]","unitPrice = result[2]",'currentBalance = get_balance(wallet, "test")',"if isBuying then",' print "After buying was successful your balance will be " + (quantity * unitPrice + currentBalance)',"else",' print "After selling was successful your balance will be " + (currentBalance - quantity * unitPrice)',"end if"]},cancel_pending_trade:{description:"Cancel any pending offer of a certain coin. On success, an empty `string` will be returned. On failure, a `string` with an error message will be returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','if cancel_pending_trade(wallet, "test") == "" then',' print "Trade got canceled!"',"end if"]},get_global_offers:{description:"Returns a `map` with all the offers made by any player of a given currency. The key of the `map` represents the WalletID of the player who has made the offer, and the value of the `map` is a `list` where index 0 represents the type of offer with a `string` (Buy/Sell), index 1 represents the amount to sell or buy, and index 2 represents the price per unit. In case of failure, this method returns a `string` with details. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','for item in get_global_offers(wallet, "test")'," walletId = item.key"," trade = item.value",' isBuying = trade[0] == "Buy"'," quantity = trade[1]"," unitPrice = trade[2]",' print "-" * 10',' print "<b>" + walletId + "</b>"'," if isBuying then",' print "<color=green>Is buying</color>"'," else",' print "<color=yellow>Is selling</color>"'," end if",' print quantity + " coins with a unit price of " + unitPrice',"end for"]},list_global_coins:{description:"Returns a `list` where each item is a `string` containing the names of all the currencies that exist. In case of failure, this method returns a `string` with details. If the passed value is not a `wallet` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','print "All existing coins: " join(list_global_coins(wallet), ", ")']},show_nodes:{description:"Returns a `number` representing the count of devices mining a specific coin for the same `wallet`. In case of an error, a `string` with details is returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','print "Active miners: " show_nodes(wallet, "test")']},reset_password:{description:"Change the password of the wallet. Only the account owner can perform this action. If the process is completed successfully, a `number` with the value one will be returned. In case of an error, a `string` with details will be returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','if reset_password(wallet, "test") == 1 then',' print "You got a new password!"',"end if"]},get_pin:{description:"Returns a `string` with a PIN that refreshes every few minutes. This PIN is used to obtain an account in cryptocurrency services. If the passed value is not a `wallet` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")',"myShell = get_shell","myComputer = host_computer(myShell)",'wallet = login_wallet(blockchain, "test", "test")','touch(myComputer, "/root", "pin_launch.src")','myFile = File(myComputer, "/root/pin_launch.src")','set_content(myFile, "',' blockchain = include_lib(""/lib/blockchain.so"")'," myShell = get_shell"," myComputer = host_computer(myShell)",' wallet = login_wallet(blockchain, ""test"", ""test"")'," if params[0] == get_pin(wallet) then",' get_custom_object.secret = ""The answer is 42""'," else",' get_custom_object.secret = ""The answer is 10053""'," end if",'")','build(myShell, "/root/pin_launch.src", "/root")',"delete(myFile)",'launch(myShell, "/root/pin_launch", get_pin(wallet))','print "The secret: " + get_custom_object.secret']},delete_mail:{description:"Delete the email corresponding to the provided email ID. Returns a `number` with the value one if the email removal was successful. Otherwise, a `string` with an error message will be returned. If any of the provided values deviate from the method signature, it will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")',"mails = fetch(metaMail)","results = []","for mail in mails"," segments = split(mail, char(10))"," mailId = segments[2][8:]"," print(delete_mail(metaMail, mailId))","end for",'print("Deleted every mail!")']},fetch:{description:"Returns a `list` where each item is a `string` containing mail id, from, subject and a small preview of the content consisting of the first 125 characters. In case of failure a `string` with details will be returned. If an invalid `metaMail` object gets passed this method will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")',"mails = fetch(metaMail)","results = []","for mail in mails"," segments = split(mail, char(10))"," item = {}"," item.mailId = segments[2][8:]"," item.from = segments[3][6:]"," item.subject = segments[4][9:]"," item.preview = segments[5:]"," push(results, item)","end for","print(results)"]},read:{description:'Returns a `string` containing the content of a mail related to the provided mail id. The mail id argument can be obtained with `fetch`. In case the mail cannot be found this method will return "Mail not found". If any of the provided values deviate from the method signature, it will return `null`.',example:['metaMail = mail_login(user_mail_address, "test")',"mails = fetch(metaMail)","results = []","for mail in mails"," segments = split(mail, char(10))"," mailId = segments[2][8:]"," print(read(metaMail, mailId))","end for"]},send:{description:"Send a new mail to the provided email address. Keep in mind that the subject can not exceed 128 characters and the message size should not exceed 2500 characters. Returns a `number` with the value one if the mail has been sent correctly, otherwise returns a `string` with an error. If any of the provided values deviate from the method signature, it will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")','result = send(metaMail, user_mail_address, "test subject", "test message")','if typeof(result) == "string" then',' print("There was an error while sending mail: " + result)',"else",' print("Mail got send successfully.")',"end if"]},port_number:{description:"Returns the `number` which is used for the port. In case the passed object is not a `port` this method will return `null`.",example:["router = get_router","ports = used_ports(router)","for port in ports",' print("Port " + port_number(port) + " is in use!")',"end for"]},is_closed:{description:"Returns a `number`, where one indicates that the specified `port` is open and zero indicates that the port is closed. In case the passed object is not a `port` this method will return `null`.",example:["router = get_router","ports = used_ports(router)","for port in ports",' state = "open"',' if (is_closed(port)) then state = "closed"',' print("Port " + port_number(port) + " is " + state + "!")',"end for"]},get_lan_ip:{description:"Returns a `string` containing the local IP address of the computer to which the port is pointing. In case the passed object is not a `port` this method will return `null`.",example:["router = get_router","ports = used_ports(router)","for port in ports",' print("Port " + port_number(port) + " is pointed to " + get_lan_ip(port) + "!")',"end for"]},reset_ctf_password:{description:"Resets the password of your CTF account. Returns a `number` with the value one if resetting was successful; otherwise, it will return a `string` containing the reason for failure.",example:['reset_ctf_password("mysafepassword")']},reverse:{description:"Reverses the order of all values in the `list`. This operation will mutate the `list`.",example:["myList = [42, 1, 3]","reverse(myList)",'print("Reversed list: " + myList.split(", "))']},trim:{description:"Returns a new `string` stripped of any spacing at the beginning and ending. If any value gets passed that is not a `string` this method will return `null`.",example:['myString = " 42 "',"print(trim(myString))"]},lastIndexOf:{description:"Returns a `number` indicating the last matching index of the provided value inside the `string`. If the value does not exist inside the `string`, `-1` is returned. If any of the provided values deviates from the defined types in the method signature, this method will return `null`.",example:['myString = "42 as an answer is wrong"','index = lastIndexOf(myString, "wrong")',"if index != -1 then",' print("Invalid information spotted at: " + index)',"else",' print("Information seems valid.")',"end if"]},funcRef:{description:"Returns a `map` which enables to extend function references with custom methods.",example:["funcRef.signature = function"," return str(@self)","end function","print (@print).signature"]},list:{description:"Returns a `map` which enables to extend list types with custom methods.",example:["list.map = function(callback)"," newList = []"," for item in self"," newList.push(callback(item, __item_idx))"," end for"," return newList","end function","myMapFunction = function(item, index)",' print "Mapping value at index: " + index'," return item.myValue","end function",'print [{ "myValue": 24 }].map(@myMapFunction)']},number:{description:"Returns a `map` which enables to extend number types with custom methods.",example:["number.bitwise = function(operator, right)"," return bitwise(operator, self, right)","end function",'print (1234).bitwise(">>", 1)']},string:{description:"Returns a `map` which enables to extend string types with custom methods.",example:['string.color = function(colorValue = "red")',' return "<color=" + colorValue + ">" + self + "</color>"',"end function",'print "My text: ".color + "Hello world".color("yellow")']},map:{description:"Returns a `map` which enables to extend map types with custom methods.",example:["map.extend = function(value)"," for item in value"," self[item.key] = item.value"," end for"," return self","end function",'test = {"123":123}','test.extend({"bar": "foo"})','print "My extended value: " + test.bar']},scan_debuglib:{description:"Scans the library in debug mode to identify potential code errors that may lead to vulnerabilities. If issues are detected, the relevant code snippets are printed. In case of an error, a `string` containing the error message is returned. If an invalid `debugLibrary` object is passed, this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")','debugLib = debug_tools(metaLib, "test", "test")','print("Debug Library result: " + scan_debuglib(debugLib))']},apply_patch:{description:"Applies a patch containing corrected code to the specified text file at the provided path. Returns a `string` with the result of the operation. If any of the provided values deviates from the defined types in the method signature, this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")','debugLib = debug_tools(metaLib, "test", "test")','print("Path result: " + apply_patch(debugLib, "/etc/passwd"))']},unit_testing:{description:"Conducts automated tests on the specified lines of code. If potential vulnerabilities are detected due to errors in these lines, this method will print partial objects that could be obtained by exploiting the vulnerability, along with the affected memory zone and detailed vulnerability information. In case of failure, this function returns a `string` with an error message. If any of the provided values deviates from the defined types in the method signature, this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")','debugLib = debug_tools(metaLib, "test", "test")','print("Unit test results: " + unit_testing(debugLib, [1, 2, 3]))']},camera_link_system:{description:"Accesses the traffic camera system, opening a window with controls to switch between different cameras. If the window opens successfully, this method returns a `number` with the value one. In case of an error, it returns a `string` with details. If an invalid traffic net object gets passed this method will return `null`.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"linkSystemResult = camera_link_system(libTraffic)","if linkSystemResult == 1 then",' print("Initiated camera broadcast!")',"end if"]},locate_vehicle:{description:"Performs a search for the specified license plate to locate the vehicle. If the vehicle is visible on any camera, the viewer will switch to the camera currently displaying it and return a `number` with the value one. If the vehicle cannot be located or the license plate is incorrect, a `string` indicating the error is returned. If any of the provided values deviates from the defined types in the method signature, this method will return `null`.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"camera_link_system(libTraffic)",'vehicleSearchResult = locate_vehicle(libTraffic, "1L2M3N")',"if vehicleSearchResult == 1 then",' print("Found vehicle!")',"end if"]},next_camera:{description:"Switches the viewer to the next available traffic camera. In case of an error, a `string` containing the details is returned. If an invalid traffic net object gets passed this method will return `null`.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"camera_link_system(libTraffic)","switchResult = next_camera(libTraffic)","if switchResult == 1 then",' print("Switched to next camera!")',"end if"]},prev_camera:{description:"Switches the viewer to the previous available traffic camera. In case of an error, a `string` containing the details is returned. If an invalid traffic net object gets passed this method will return `null`.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"camera_link_system(libTraffic)","switchResult = prev_camera(libTraffic)","if switchResult == 1 then",' print("Switched to previous camera!")',"end if"]},traffic_light_config:{description:"This method is not yet implemented.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"camera_link_system(libTraffic)","print(traffic_light_config(libTraffic))"]},model:{description:"Returns a `string` with the appliance model ID. If the passed object is not a `smartAppliance` this method will return `null`.",example:['libSmartapp = include_lib("/lib/libsmartappliance.so")',"modelResult = model(libSmartapp)",'if modelResult.matches("^[A-Z]+$") then',' print("Model is: " + modelResult)',"else",` print("Model couldn't be determined due to: " + modelResult)`,"end if"]},override_settings:{description:"Overrides the power and temperature settings of the appliance. If successful, it returns a `number` with the value one; otherwise, it returns a `string` detailing the error. If any arguments deviate from the defined signature, this method will return `null`.",example:['libSmartapp = include_lib("/lib/libsmartappliance.so")',"overrideResult = override_settings(libSmartapp, 1000, 20)","if overrideResult == 1 then",' print("Override was successful!")',"else",' print("Override failed due to: " + overrideResult)',"end if"]},set_alarm:{description:"Activates or deactivates the sound alarm indicating any appliance malfunction. If the operation is successful, a `number` with the value one is returned; otherwise, a `string` containing error details is returned. If any arguments deviate from the defined signature, this method will return `null`.",example:['libSmartapp = include_lib("/lib/libsmartappliance.so")',"setAlarmResult = set_alarm(libSmartapp, false)","if setAlarmResult == 1 then",' print("Alarm was disabled successfully!")',"else",' print("Disabling alarm failed due to: " + setAlarmResult)',"end if"]},debug_tools:{description:"Returns a library in debug mode as a `debugLibrary` object. A valid Neurobox engineer's username and password are required to access this mode. If successful, the `debugLibrary` object is returned; in case of an error, a `string` with details is provided. Passing values that deviate from the defined signature will result in `null`.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")','debugLib = debug_tools(metaLib, "test", "test")','if typeof(debugLib) == "debugLibrary" then',' print("Received debug libary object!")',"end if"]},payload:{description:"Returns a `list` containing a single partial `computer` object if zero-day vulnerabilities are detected within the specified memory zone. If a file path is provided, a partial `file` object associated with this path will also be included in the `list`. Additionally, if this file is a library, its corresponding `metaLib` object is added to the returned `list`. In case of an error, a `string` with details is returned. Providing arguments that deviate from the defined signature will result in `null`.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")','result = payload(metaLib, "0x7A69F4C3")','if typeof(result) == "list" and len(result) > 0 then',' print("Successfully executed payload!")',"end if"]}}});var p1=S((yV,rF)=>{rF.exports={$meta:{description:"Create a `list` with square brackets. Then iterate over the `list` with for, or pull out individual items with a 0-based index in square brackets. A negative index counts from the end. Get a slice (subset) of a `list` with two indices, separated by a colon.",example:["x = [2, 4, 6, 8]","print(x[0]) // get first item from list","print(x[-1]) // get last item from list","print(x[1:3]) // slice items from index 1 to 3","x[2] = 5 // set item at index 2 to 5","print(x)","print(x + [42]) // concatenate two lists"]},remove:{description:"Removes an item from the `list` with the provided index. Due to the removal the `list` will get mutated. If the passed index is `null` this method will throw an error preventing further script execution.",example:["myList = [1, 42, 3]","myList.remove(1)",'print("This list does not contain the answer to everything: " + myList.split(", "))']},insert:{description:"Inserts a value into the `list` at the index provided. Due to the insertion the `list` will get mutated. Returns the mutated `list`. If the passed index is not a `number`, this method throws an error, preventing further script execution.",example:["myList = [1, 3]","myList.insert(1, 42)",'print("This list does contain the answer to everything: " + myList.split(", "))']},push:{description:"Appends a value to the end of the `list`. This operation will mutate the `list`. Additionally, this method will return the updated `list`. However, it throws an error if you attempt to push a value into itself or into a map-like object such as a `file`, halting further script execution.",example:["myList = [1, 3]","myList.push(42)",'print("This list does contain the answer to everything: " + myList.split(", "))']},pop:{description:"Returns and removes the last item in the `list`. This operation will mutate the `list`. If the `map` is empty, this method will return `null`.",example:["myList = [1, 3, 42]","answer = myList.pop",'print("Answer to everything: " + answer)']},pull:{description:"Returns and removes the first item in the `list`. This operation will mutate the `list`. If the `map` is empty, this method will return `null`.",example:["myList = [42, 1, 3]","answer = myList.pull",'print("Answer to everything: " + answer)']},shuffle:{description:"Shuffles all values in the `list`. This operation will mutate the `list`.",example:["myList = [42, 1, 3]","myList.shuffle",'print("New list order: " + myList.split(", "))']},reverse:{description:"Reverses the order of all values in the `list`. This operation will mutate the `list`.",example:["myList = [42, 1, 3]","myList.reverse",'print("Reversed list: " + myList.split(", "))']},sum:{description:"Returns sum of all values inside the `list`. Any non-numeric values will be considered a zero.",example:["myList = [42, 1, 3]","sum = myList.sum",'print("Sum of all items in list: " + sum)']},hasIndex:{description:"Returns a `number`. If the provided index is available in the `list`, the value will be one. Otherwise, the value will be zero.",example:["myList = [42, 1, 3]","containsIndex = myList.hasIndex(1)","if containsIndex then",' print("List contains index of 1.")',"else",' print("List does not contain index of 1.")',"end if"]},indexOf:{description:"Returns a `number` which indicates the first matching index of the provided value inside the `list`. Optionally a start index can be provided. In case the value does not exist inside the `list` a `null` gets returned.",example:["myList = [42, 1, 3]","index = myList.indexOf(42)","if index != null then",' print("The answer for everything is at the following index: " + index)',"else",' print("No answer for everything found.")',"end if"]},sort:{description:"Sorts the values of a `list` alphanumerically. This operation mutates the original `list`. Optionally, a key can be provided, which is used if the items are `map`s or `list`s. Finally, this method returns the updated `list`.",example:['myList = [{ "key": 42 }, { "key": 2 }, { "key": 1 }]','myList.sort("key")',"print(myList)"]},join:{description:"Returns a concatenated `string` containing all stringified values inside the `list`. These values will be separated via the provided separator. In case the `list` exceeds `16777215L` items or the delimiter exceeds 128 characters, this method will throw an error, interrupting further script execution.",example:["myList = [42, 1, 3]",`print(myList.join(" .-*'*-. "))`]},indexes:{description:"Returns a `list` containing all available indexes.",example:["myList = [42, 1, 3]","for i in myList.indexes"," print(myList[i])","end for"]},len:{description:"Returns a `number` representing the count of values inside the `list`.",example:["myList = [42, 1, 3]",'print("myList contains " + myList.len + " items")']},values:{description:"Returns a `list` containing all available values. Note that this will not create a copy of the original `list`. The returned instance will the same as original `list`, so any mutations made to the returned `list` will also affect the original one.",example:["myList = [42, 1, 3]","for v in myList.values"," print(v)","end for"]},replace:{description:"Returns updated `list` where each value matching with the provided replace argument gets replaced. This operation will mutate the `list`.",example:["myList = [1, 2, 2, 7]","myList.replace(2, 3)",'print(myList.join(""))']}}});var d1=S((bV,iF)=>{iF.exports={$meta:{description:"A `map` is a set of values associated with unique keys. Create a `map` with curly braces; get or set a single value with square brackets. Keys and values may be any type.",example:['x = { "test": 123 }',"x.foo = 42 // set property foo to 42","print(x.foo) // get value of property foo",'print(x + { "bar": 2 }) // concatenate two maps']},remove:{description:"Removes an item from the `map` with the provided key. Due to the removal, the `map` will get mutated. If the value is removed successfully, this method will return a `number` with the value one. If the removal fails, the value will be zero. Passing any map-like object, such as a file or computer, will cause an error to be thrown, stopping further script execution.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }','myMap.remove("answer")',"print(myMap)"]},push:{description:"Adds the value 1 to the provided key. This operation will mutate the `map`. The updated `map` will be returned. However, it throws an error if you attempt to push a value into itself or into a map-like object such as a `file`, halting further script execution. If the passed key is `null` an error will be thrown as well.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }','myMap.push("answer")',"print(myMap.answer)"]},pull:{description:"Returns and removes the first item in the `map`. This operation will mutate the `map`. Passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution. If the `map` is empty, this method will return `null`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"print(myMap.pull)"]},pop:{description:"Returns and removes the first item in the `map`. This operation will mutate the `map`. Passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution. If the `map` is empty, this method will return `null`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"print(myMap.pop)"]},shuffle:{description:"Shuffles all values in the `map`. This operation will mutate the `map`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"myMap.shuffle","print(myMap)"]},sum:{description:"Returns sum of all values inside the `map`. Any non-numeric values will be considered a zero.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"sum = myMap.sum",'print("Sum of all items in map: " + sum)']},hasIndex:{description:"Returns a `number`. If the provided key is available in the `map`, the value will be one. Otherwise, the value will be zero.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }','containsIndex = myList.hasIndex("answer")',"if containsIndex then",' print("Map contains the answer.")',"else",' print("Map does not contain the answer.")',"end if"]},indexOf:{description:"Returns a value which can be of any type since `map` keys can be of any type. In case the value does not exist inside the `map`, `null` is returned.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"key = myList.indexOf(42)","if key != null then",' print("Map contains the answer.")',"else",' print("Map does not contain the answer.")',"end if"]},indexes:{description:"Returns a `list` containing all available keys. Keys can be of any type.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"for key in myMap.indexes"," print(myMap[key])","end for"]},len:{description:"Returns a `number` representing the count of items inside the `map`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }','print("myMap contains " + myMap.len + " items")']},values:{description:"Returns a `list` containing all available values within `map`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"for value in myMap.values"," print(value)","end for"]},replace:{description:"Returns updated `map` where each value matching with the provided replace argument gets replaced. This operation will mutate the `map`. In case this method gets used on a map-like object such as `file` this method will throw a runtime error.",example:['myObject = { "answer": 45 }',"myObject.replace(45, 42)","print(myObject.answer)"]}}});var h1=S((vV,sF)=>{sF.exports={$meta:{description:'A `metaLib` object can be obtained by either using [load](#METAXPLOIT_LOAD) or [dump_lib](#NETSESSION_DUMP_LIB). The `classID` used for this object is `"MetaLib"`.'},overflow:{description:"Exploits vulnerabilities. The returned value can be of various data types. Therefore, using `typeof` is advisable. `optArgs` are required when changing a password or obtaining a `computer` via a router. It should be the desired password or LAN IP, respectively. Change password and firewall disable exploits will return a `number`, where the value is either one or zero. One indicates success while zero indicates failure. Shell, computer, and file exploits either return an instance of their type or `null`. Providing values that deviate from the defined signature will cause a runtime exception to be thrown.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")',"scanResult = metax.scan(metaLib)","target = scanResult[0]","scanAddress = metax.scan_address(metaLib, target)",'segments = scanAddress.split("Unsafe check: ")',"exploit = null"," for segment in segments",' hasRequirement = segment.indexOf("*") != null'," if (not hasRequirement) then",' labelStart = segment.indexOf("<b>")',' labelEnd = segment.indexOf("</b>")'," exploit = segment[labelStart + 3: labelEnd]"," end if","end for","if (exploit) then",' print("Exploiting... " + target + ":" + exploit)'," print(metaLib.overflow(target, exploit))","else",' print("No exploit found with zero requirements")',"end if"]},version:{description:'Returns a `string` containing the version number of the library. An example of a version number would be `"1.0.0"`.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")','print("Init.so version: " + metaLib.version)']},lib_name:{description:'Returns a `string` containing the name of the library. An example of a name would be `"init.so"`.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")','print("Name for library is: " + metaLib.lib_name)']},debug_tools:{description:"Returns a library in debug mode as a `debugLibrary` object. A valid Neurobox engineer's username and password are required to access this mode. If successful, the `debugLibrary` object is returned; in case of an error, a `string` with details is provided. Passing values that deviate from the defined signature will result in `null`.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")','debugLib = metaLib.debug_tools("test", "test")','if typeof(debugLib) == "debugLibrary" then',' print("Received debug libary object!")',"end if"]},payload:{description:"Returns a `list` containing a single partial `computer` object if zero-day vulnerabilities are detected within the specified memory zone. If a file path is provided, a partial `file` object associated with this path will also be included in the `list`. Additionally, if this file is a library, its corresponding `metaLib` object is added to the returned `list`. In case of an error, a `string` with details is returned. Providing arguments that deviate from the defined signature will result in `null`.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")','result = metaLib.payload("0x7A69F4C3")','if typeof(result) == "list" and result.len > 0 then',' print("Successfully executed payload!")',"end if"]}}});var f1=S((_V,oF)=>{oF.exports={$meta:{description:'A `MetaMail` object can be obtained by using [mail_login](#GENERAL_MAIL_LOGIN). The `classID` used for this object is `"MetaMail"`.'},delete:{description:"Delete the email corresponding to the provided email ID. Returns a `number` with the value one if the email removal was successful. Otherwise, a `string` with an error message will be returned. If the provided mailId is anything other than a `string` this method will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")',"mails = metaMail.fetch","results = []","for mail in mails"," segments = mail.split(char(10))"," mailId = segments[2][8:]"," print(metaMail.delete(mailId))","end for",'print("Deleted every mail!")']},fetch:{description:"Returns a `list` where each item is a `string` containing mail id, from, subject and a small preview of the content consisting of the first 125 characters. If there is any issue a `string` will be returned with details.",example:['metaMail = mail_login(user_mail_address, "test")',"mails = metaMail.fetch","results = []","for mail in mails"," segments = mail.split(char(10))"," item = {}"," item.mailId = segments[2][8:]"," item.from = segments[3][6:]"," item.subject = segments[4][9:]"," item.preview = segments[5:]"," results.push(item)","end for","print(results)"]},read:{description:'Returns a `string` containing the content of a mail related to the provided mail id. The mail id argument can be obtained with `fetch`. In case the mail cannot be found this method will return "Mail not found". If the provided mailId is not a `string`, this method will return `null`.',example:['metaMail = mail_login(user_mail_address, "test")',"mails = metaMail.fetch","results = []","for mail in mails"," segments = mail.split(char(10))"," mailId = segments[2][8:]"," print(metaMail.read(mailId))","end for"]},send:{description:"Send a new mail to the provided email address. Keep in mind that the subject can not exceed 128 characters and the message size should not exceed 2500 characters. Returns a `number` with the value one if the mail has been sent correctly, otherwise returns a `string` with an error. If any of the provided values deviate from the method signature, it will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")','result = metaMail.send(user_mail_address, "test subject", "test message")','if typeof(result) == "string" then',' print("There was an error while sending mail: " + result)',"else",' print("Mail got send successfully.")',"end if"]}}});var m1=S((wV,aF)=>{aF.exports={$meta:{description:'A `metaxploit` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"MetaxploitLib"`.'},load:{description:"Returns a `metaLib` object for the provided path to the library binary. Keep in mind that this can only be used on library files. On failure, this method will return `null`. If the provided path is empty, this method will throw a runtime exception, preventing further script execution.",example:['metax = include_lib("/lib/metaxploit.so")','libFolder = get_shell.host_computer.File("/lib")',"for file in libFolder.get_files"," metaLib = metax.load(file.path)",' print("Library: " + metaLib.lib_name + " - " + metaLib.version)',"end for"]},net_use:{description:"Returns a `netSession` object for the provided IP address and port. Note that if the port is set to zero, it will return a `netSession` related to the kernel router. The main purpose of this method is to gain a `netSession` and then use `dump_lib` to receive a `metaLib` object to exploit vulnerabilities. In case of failure, this method will return `null`. If this method is used within an SSH encryption process or with disabled internet, or if an invalid target IP is provided, this method will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports',"for port in ports",' netSession = metax.net_use("1.1.1.1", port.port_number)'," metaLib = netSession.dump_lib",' print("Library: " + metaLib.lib_name + " - " + metaLib.version + " on port " + port.port_number)',"end for"]},rshell_client:{description:"Launches a process on the victim's `computer`, silently attempting to continuously connect in the background to the specified address and port. For the reverse shell to run successfully, the `rshell` service must be installed, and the port forward must be configured correctly on the machine where the server is waiting for the victim's connection. If the launch was successful, a `number` with the value one will be returned. In case of failure, a `string` with details will be returned.",example:['metax = include_lib("/lib/metaxploit.so")','metax.rshell_client("1.1.1.1", 1222, "bgprocess")']},rshell_server:{description:"This method returns a `list` of `shell` objects that have been reverse shell connected to this computer. To manage the connections received, the `rshell` service must be installed on the machine that receives the victims' connections. In case of failure a `string` will be returned with details.",example:['metax = include_lib("/lib/metaxploit.so")',"shells = metax.rshell_server","firstShell = shells[0]",'firstShell.host_computer.File("/").chmod("o-wrx", true)']},scan:{description:'Returns a `list` where each item is a `string` representing a memory area which has vulnerabilities related to the provided library. These memory areas can be used to make further scans via `scan_address`. In case of failure, this method returns `null` instead. An example of a memory area would be "0x7BFC1EAA". Using this method within a SSH encryption process will throw a runtime exception.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")',"scanResult = metax.scan(metaLib)","for area in scanResult",' print("Memory area containg vulnerability: " + area)',"end for"]},scan_address:{description:"Returns a `string` containing information about each vulnerability in the provided library and memory area. In case the scanning fails this method will return `null`. Using this method within a SSH encryption process will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")',"scanResult = metax.scan(metaLib)","scanAddress = metax.scan_address(metaLib, scanResult[0])",'segments = scanAddress.split("Unsafe check: ")[1:]',"exploits = []","for segment in segments",' labelStart = segment.indexOf("<b>")',' labelEnd = segment.indexOf("</b>")'," exploits.push(segment[labelStart + 3: labelEnd])","end for",'print("Available vulnerabilities: " + exploits.join(", "))']},sniffer:{description:"The terminal listens to the network packets of any connection that passes through the computer. When any connection information gets captured, it will print a `string` with the obtained data. In case saving of encryption source is enabled it will download the source code of the script responsible for encryption. In case the operation fails this method will return `null`. Using this method within a SSH encryption process will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")',"result = metax.sniffer","print(result)"]}}});var g1=S((xV,lF)=>{lF.exports={$meta:{description:'A `netSession` object can be obtained by using [net_use](#METAXPLOIT_NET_USE). The `classID` used for this object is `"NetSession"`.'},dump_lib:{description:"Returns the `metaLib` associated with the remote service. For example if the `metaxpoit` method `net_use` was used on a ssh port it will return the `metaLib` related to the ssh service. In case the port was zero is will return a `metaLib` related to the kernel router.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)',"metaLib = netSession.dump_lib",'print("Library: " + metaLib.lib_name + " - " + metaLib.version + " on port " + ports[0].port_number)']},get_num_conn_gateway:{description:"Returns the number of devices using this router as a gateway. If you obtained your `netSession` from a computer, it will fetch and return the value from its gateway router.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("Gateway clients: " + netSession.get_num_conn_gateway)']},get_num_portforward:{description:"Returns the number of ports forwarded by this router. If you obtained your `netSession` from a computer, it will fetch and return the value from its gateway router.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("Port forwards: " + netSession.get_num_portforward)']},get_num_users:{description:"Returns the number of user accounts on the system.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("User accounts: " + netSession.get_num_users)']},is_any_active_user:{description:"Returns a `number`. If there is an active user on the system it will be one. Otherwise, it will be zero.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("User Active?: " + netSession.is_any_active_user)']},is_root_active_user:{description:"Returns a `number`. If there is an active root on the system it will be one. Otherwise, it will be zero.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("Root Active?: " + netSession.is_root_active_user)']}}});var y1=S((kV,uF)=>{uF.exports={$meta:{description:"All numbers are stored in full-precision format. Numbers also represent `true == 1` and `false == 0`.",example:["a = 20","b = 22","print(a + b) // addition","print(a - b) // substraction","print(a / b) // division","print(a * b) // multiply","print(a % b) // modulo","print(a - b) // substraction","print(a ^ b) // power","print(a and b) // logical and","print(a or b) // logical or","print(not a) // logical not","print(a == b) // comparison equal","print(a != b) // comparison unequal","print(a > b) // comparison greater than","print(a < b) // comparison lower than","print(a >= b) // comparison greater equal than","print(a <= b) // comparison lower equal than"]}}});var b1=S((TV,cF)=>{cF.exports={$meta:{description:'A `port` object can be obtained by using [get_ports](#COMPUTER_GET_PORTS), [ping_port](#ROUTER_PING_PORT), [used_ports](#ROUTER_USED_PORTS) or [device_ports](#ROUTER_DEVICE_PORTS). The `classID` used for this object is `"port"`. Generally there are no restrictions in regards to which service runs on which port but there are some default ports for each service. List of the most common ports: `21` (FTP), `22` (SSH), `25` (SMTP), `80` (HTTP), `141` (SQL), `8080` (HTTP), `1222` (RSHELL), `1542` (Repository), `3306` (SQL), `3307` (SQL), `3308` (SQL), `6667` (Chat), `37777` (CCTV)'},port_number:{description:"Returns the `number` which is used for the port.",example:["router = get_router","ports = router.used_ports","for port in ports",' print("Port " + port.port_number + " is in use!")',"end for"]},is_closed:{description:"Returns a `number`, where one indicates that the specified `port` is open and zero indicates that the port is closed.",example:["router = get_router","ports = router.used_ports","for port in ports",' state = "open"',' if (port.is_closed) then state = "closed"',' print("Port " + port.port_number + " is " + state + "!")',"end for"]},get_lan_ip:{description:"Returns a `string` containing the local IP address of the computer to which the port is pointing.",example:["router = get_router","ports = router.used_ports","for port in ports",' print("Port " + port.port_number + " is pointed to " + port.get_lan_ip + "!")',"end for"]}}});var v1=S((SV,pF)=>{pF.exports={$meta:{description:'A `router` object can be obtained by either using [get_router](#GENERAL_GET_ROUTER) or [get_switch](#GENERAL_GET_SWITCH). The `classID` used for this object is `"router"`.'},device_ports:{description:"Returns a `list` where each item is an open `port` related to the device of the provided LAN IP address. The device needs to be within the network of the `router`. In case of failure, this method will return `null` or a `string` with details. In case an empty ip is provided this method will throw a runtime exception.",example:["router = get_router","devices = router.devices_lan_ip","for ip in devices"," ports = router.device_ports(ip)"," openPorts = []"," for port in ports"," if port.is_closed then continue"," openPorts.push(port)"," end for",""," if (openPorts.len == 0) then",' print(ip + " has no open ports")'," else",' print(ip + " contains following open ports:")'," for port in openPorts",' print("|-" + port.port_number)'," end for"," end if","end for"]},devices_lan_ip:{description:"Returns a `list` where each item is a `string` representing a LAN IP address. All devices are within the network of the router and can be reached by using the `ping` method. Some of the devices might be behind a firewall.",example:["router = get_router","devices = router.devices_lan_ip","for ip in devices",' print(ip + " found!")',"end for"]},bssid_name:{description:"Returns a `string` with the BSSID value of the router.",example:["router = get_router","bssid = router.bssid_name",'print("BSSID: " + bssid)']},essid_name:{description:"Returns a `string` with the ESSID value of the router.",example:["router = get_router","essid = router.essid_name",'print("ESSID: " + essid)']},firewall_rules:{description:"Returns a `list` where each item is a `string` containing a firewall rule.",example:["router = get_router","rules = router.firewall_rules",'print("Firewall rules: " + rules.join(", "))']},kernel_version:{description:"Returns a `string` with the version of the `kernel_router.so` library.",example:["router = get_router","version = router.kernel_version",'print("Kernel router version: " + version)']},local_ip:{description:"Returns a `string` with the local IP address of the router.",example:["router = get_router","localIp = router.local_ip",'print("Local IP: " + localIp)']},public_ip:{description:"Returns a `string` with the public IP address of the router.",example:["router = get_router","publicIp = router.public_ip",'print("Public IP: " + publicIp)']},used_ports:{description:"Returns a `list` where each item is a `port` used inside the router.",example:["router = get_router","ports = router.used_ports","for port in ports",' print("Port " + port.port_number + " is available!")',"end for"]},ping_port:{description:"Returns a `port` that is behind the port `number` provided. In case the `port` does not exist `null` gets returned.",example:["router = get_router","ports = router.used_ports","for port in ports"," pingedPort = router.ping_port(port.port_number)"," if (pingedPort == null) then continue",' print("Pinged " + pingedPort.port_number)',"end for"]},port_info:{description:'Returns a `string` with information about the provided port, including details about the running service and its version. For example, the output could be `"http 1.0.0"`. If the operation fails, `null` will be returned.',example:["router = get_router","ports = router.used_ports","for port in ports"," info = router.port_info(port)"," print(info)","end for"]}}});var _1=S((IV,dF)=>{dF.exports={$meta:{description:'The service object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"service"`. List of all installable services: `"FTP"`, `"SSH"`, `"HTTP"`, `"Repository"`, `"Chat"`'},install_service:{description:"Installs the necessary files for the correct functioning of the service and starts it. If the installation is completed successfully, it returns a `number` with the value one. In case of an error, it returns a `string` with details.",example:['service = include_lib("/lib/libhttp.so")',"result = service.install_service","if result == 1 then",' print "Successfully installed service"',"else",' print "Service installation failed: " + result',"end if"]},start_service:{description:"Starts the service and opens its associated `port` on the local machine. The service requires a port forwarded to the router to be accessible from the outside. If the service starts correctly, it returns a `number` with the value one. In case of an error, it returns a `string` with details.",example:['service = include_lib("/lib/libhttp.so")',"result = service.start_service","if result == 1 then",' print "Successfully started service"',"else",' print "Starting service failed: " + result',"end if"]},stop_service:{description:"Stops the service and closes its associated `port` on the local machine. If the service is stopped successfully, it returns a `number` with the value one. If an error occurs during the process, it returns a `string` with details. In some cases, the returned `number` might be zero, indicating that the service removal failed.",example:['service = include_lib("/lib/libhttp.so")',"result = service.stop_service","if result == 1 then",' print "Successfully stopped service"',"else",' print "Stopping service failed: " + result',"end if"]}}});var w1=S((EV,hF)=>{hF.exports={$meta:{description:'A `shell` object can be acquired by either using [get_shell](#GENERAL_GET_SHELL), [connect_service](#SHELL_CONNECT_SERVICE) or [overflow](#META_LIB_OVERFLOW). The `classID` used for this object is `"shell"`. In case you want to use [connect_service](#SHELL_CONNECT_SERVICE) to connect to a SSH port it will be usually at port `22`.'},host_computer:{description:"Returns a `computer` related to the `shell`.",example:["shell = get_shell","computer = shell.host_computer",'print("Computer public IP is: " + computer.public_ip)']},start_terminal:{description:"Launches an active terminal. The terminal's color will change, displaying the IP of the connected shell. Script execution will be stopped upon starting a new terminal, unless this is called from another script that was executed via `shell.launch`. In that case, you will enter the shell after closing your root-level script within that terminal window. Using this method within an SSH encryption process will cause an error to be thrown, preventing further script execution.",example:["shell = get_shell","shell.start_terminal"]},build:{description:"Compiles a plain code file provided in the arguments to a binary. On success, the new binary will be available under the provided build folder. The binary name will be the same as the source file just without the file extension. Optionally, an allowImport flag can be set which enables the use of `import_code` on the binary. All provided paths must be absolute. Returns an empty string on success. On failure, it will return a string containing details about the reason for failure. In case any provided values deviate from the defined signature a runtime exception will be thrown.",example:["shell = get_shell","computer = shell.host_computer",'computer.touch(home_dir, "test.src")','computer.File(home_dir + "/test.src").set_content("print(""hello world"")")','buildResult = shell.build(home_dir + "/test.src", home_dir + "/Desktop")','if buildResult != "" then',' print("There was an error while compiling: " + buildResult)',"else",' print("File has been compiled.")',"end if"]},connect_service:{description:"Returns a `shell` if the connection attempt to the provided IP was successful. This method can only connect to ports running an SSH or FTP service. SSH services usually run on port 22 and FTP services usually on port 21. Keep in mind to pass the right service value depending on which service is going to be used. By default, it will use SSH as the service. Please note that connecting will leave a log entry. In case of failure, a string is returned containing details. If any provided arguments deviate from the method signature, if this method is run in an SSH encryption process, or if the computer is not connected to the internet, a runtime exception will be thrown.",example:["shell = get_shell",'connectionResult = shell.connect_service("1.1.1.1", 22, "test", "test")','if typeof(connectionResult) != "shell" then',' print("There was an error while connecting: " + connectionResult)',"else",' print("Connected!")',"end if"]},launch:{description:"Launches the binary located at the provided path. Optionally, parameters can be passed. Returns a `number`. If the launch was successful, the value will be one; otherwise, it will be zero. In some cases, a `string` will be returned containing an error message. If you need to share variables between a launched script and the current process, consider using `get_custom_object`. Note that launching a script is not asynchronous, meaning that the current script will pause its execution until the launched script finishes. This method cannot be used to execute binaries with an EXE extension (GUI interface). If any provided values deviate from the method signature, a runtime exception will be thrown.",example:['shell = get_shell("root", "test")','shell.launch("/bin/cat", "/etc/passwd")']},ping:{description:"Returns a `number`. If the remote address could be reached the value will be one, zero otherwise. Firewalls do not block ping requests. Passing an invalid ip will cause the method to return a `string` with an error message. If any provided arguments deviate from the method signature a runtime exception will be thrown.",example:["shell = get_shell",'isPingable = shell.ping("1.1.1.1")',"if isPingable then",' print("Ping was successful!")',"else",' print("Ping failed!")',"end if"]},scp:{description:"Send a `file` to the `computer` related to the provided `shell`. You require permission to read the `file` on the `computer` from which you are uploading and write permissions in the folder of the `computer` you are trying to upload to. In case of failure, this method will return a `string` with the cause. Otherwise, a `number` with the value one gets returned. If any of the passed arguments deviates from the types of the method signature, `null` will be returned. In case the `string` for sourceFile or destinationFolder is empty, an error will be thrown, preventing further script execution",example:["shell = get_shell",'remoteShell = shell.connect_service("1.1.1.1", 22, "test", "test")','result = remoteShell.scp("/bin/ls", "/etc/", shell)','if typeof(result) == "string" then',' print("There was an error while sending file: " + result)',"else",' print("File got sent successfully.")',"end if"]}}});var x1=S((RV,fF)=>{fF.exports={$meta:{description:"Text is stored in strings of Unicode characters. Write strings by surrounding them with quotes. If you need to include a quotation mark in the string, write it twice.",example:['a = "hello"','b = "world"',"print(a + b) // concatinate a and b","print(a * 10) // repeat hello ten times","print(a[0]) // prints h","print(a[1:3]) // prints ell"]},remove:{description:"Returns a new `string` with the provided value removed. Any value other than `null` can be passed, but note that it will be cast to a string. If `null` is passed, this method will throw an error, preventing further script execution.",example:['myString = "42 as an answer is wrong"','newString = myString.remove("wrong")','print(newString + "right")']},hasIndex:{description:"Returns a `number`. If the provided index is available in the `string`, the value will be one. Otherwise, the value will be zero.",example:['myString = "42 as an answer is wrong"',"containsIndex = myString.hasIndex(1)","if containsIndex then",' print("String contains index of 1.")',"else",' print("String does not contain index of 1.")',"end if"]},insert:{description:"Returns a `string` with the newly inserted `string` at the provided index. If the passed index is not a `number`, this method throws an error, preventing further script execution.",example:['myString = "42 as an answer is wrong"','index = myString.lastIndexOf("w") - 1','newString = myString.insert(index, "not ")',"print(newString)"]},indexOf:{description:"Returns a `number` which indicates the first matching index of the provided value inside the `list`. Optionally a start index can be provided. In case the value does not exist inside the `string` a `null` gets returned.",example:['myString = "42 as an answer is wrong"','index = myString.indexOf("wrong")',"if index != null then",' print("Invalid information spotted at: " + index)',"else",' print("Information seems valid.")',"end if"]},lastIndexOf:{description:"Returns a `number` which indicates the last matching index of the provided value inside the `list`. In case the value does not exist inside the `string` a `-1` gets returned. If the provided searchStr is not a `string`, this method will return `null`.",example:['myString = "42 as an answer is wrong"','index = myString.lastIndexOf("wrong")',"if index != -1 then",' print("Invalid information spotted at: " + index)',"else",' print("Information seems valid.")',"end if"]},split:{description:"Returns a `list` where each item is a segment of the `string`, separated by the provided separator `string`. This method uses regular expressions for matching, so remember to escape special characters such as dots. If any of the provided arguments deviate from the method signature types, this method will return `null`. In case the pattern is empty, the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','segments = myString.split(" ")','if segments[0] != "42" then',' print("Invalid information spotted!")',"else",' print("Information seems valid!")',"end if"]},replace:{description:"Returns a `string` with the replaced content by using regular expressions. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','newString = myString.replace("wrong", "right")',"print(newString)"]},trim:{description:"Returns a new `string` stripped of any spacing at the beginning and ending.",example:['myString = " 42 "',"print(myString.trim)"]},indexes:{description:"Returns a `list` where each item is a `number` representing all available indexes in the `string`.",example:['myString = "42"',"print(myString.indexes)"]},code:{description:"Returns a `number` representing the Unicode code of the first character of the `string`.",example:['myString = "HELLO WORLD"',"print(myString.code)"]},len:{description:"Returns a `number` representing the length of the `string`.",example:['myString = "HELLO WORLD"','print("Size of string is: " + myString.len)']},lower:{description:"Returns a new `string` in which all characters are transformed into lowercase.",example:['myString = "HELLO WORLD"',"print(myString.lower)"]},upper:{description:"Returns a new `string` in which all characters are transformed into uppercase.",example:['myString = "hello world"',"print(myString.upper)"]},val:{description:"Returns a `number` which is parsed from the `string`. In case the `string` is not numeric it will return a zero.",example:['myString = "1.25"',"print(myString.val + 40.75)"]},values:{description:"Returns a `list` where each item is a `string` representing all available characters in the `string`. Could be compared to using `split` but without any separator.",example:['myString = "hello world"',"print(myString.values)"]},to_int:{description:"Returns a `number` which is parsed from the `string` as an integer. In case the `string` is not numeric it will return the original `string`.",example:['myString = "1"',"print(myString.to_int + 41)"]},is_match:{description:"Uses regular expression to check if a string matches a certain pattern. If it matches, it will return a `number` with the value one. If it does not match, the value of the `number` will be zero. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','hasWordAtTheEnd = myString.is_match("\\w+$")',"print(hasWordAtTheEnd)"]},matches:{description:"Returns a `map` with all search results for the provided regular expression. Each key contains the index and the value contains the matching `string`. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','result = myString.matches("w")',"print(result)"]}}});var k1=S((PV,mF)=>{mF.exports={$meta:{description:'A `subWallet` object can be obtained by either using [get_subwallet](#COIN_GET_SUBWALLET) or [get_subwallets](#COIN_GET_SUBWALLETS). The `classID` used for this object is `"subwallet"`.'},get_balance:{description:"Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','subWallet = coin.get_subwallet("test")','print "Balance: " + subWallet.get_balance']},set_info:{description:"Stores optional information in the Subwallet for any use. Upon success, a `number` with the value one will be returned. In case of failure, a `string` with details will be returned.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','result = set_info(subWallet, "test")',"if result == 1 then",' print "Subwallet info got set!"',"end if"]},get_info:{description:"Returns a `string` with the information stored by the coin creator.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Subwallet info: " + get_info(subWallet)']},delete:{description:"Deletes the account registered in the cryptocurrency. Returns a `number` where one indicates successful deletion and zero indicates failure. In case of certain failures, this method may return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"result = delete_subwallet(subWallet)","if result == 1 then",' print "Subwallet got deleted!"',"end if"]},get_user:{description:"Returns a `string` with the username associated with this subwallet. On failure, this method returns a `string` with an error message.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Subwallet user: " + get_user(subWallet)']},last_transaction:{description:"Returns a `list` with the information of the last transaction. Index 0 is a `string` with the other subWallet. Index 1 is an integer with the amount. Index 2 is a `number` indicating the direction of the transaction (0 for Deposit, 1 for Withdrawal). Index 3 is a `string` indicating the date of the transaction. On failure, this method will either return a `number` with the value zero or a `string` with an error message.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"transactionItem = last_transaction(subWallet)","destinationAccount = transactionItem[0]","amount = transactionItem[1]","direction = transactionItem[2]","completeDate = transactionItem[3]","if direction == 0 then",' print "Received " + amount + " from " + destinationAccount + " got completed at the " + completeDate',"else",' print "Send " + amount + " to " + destinationAccount + " got completed at the " + completeDate',"end if "]},mining:{description:"Starts the process of mining the cryptocurrency. The process leaves the terminal busy until a coin is mined. On success, this method will return a `number` with the value one. On failure, this method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"while mining(subWallet) == 1",' print "Mining...", true',' print "Balance " + get_balance_subwallet(subWallet)',"end while"]},check_password:{description:"Returns a `number` with the value one if the credentials are correct, otherwise, the value is zero. For some cases, this method will return a `string` with an error message.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','password = user_input("SubWallet password:", true)',"if check_password(subWallet, password) == 1 then",' print "Password is correct!"',"end if"]},wallet_username:{description:"Returns a `string` with the name of the `wallet` to which this subwallet belongs.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "SubWallet username: " + wallet_username(subWallet)']}}});var T1=S((CV,gF)=>{gF.exports={$meta:{description:'A `wallet` object can be obtained by either using [create_wallet](#BLOCKCHAIN_CREATE_WALLET) or [login_wallet](#BLOCKCHAIN_LOGIN_WALLET). The `classID` used for this object is `"wallet"`.'},list_coins:{description:"Returns a `list` where each item is a `string` with the names of the coins available in the `wallet`. On failure this method returns a `string` with an error message.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','print "My wallet is connected to: " + wallet.list_coins.join(", ")']},get_balance:{description:"Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned. If the passed coinName is anything other than a `string` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")',"for coinName in wallet.list_coins",' print "You have " + wallet.get_balance(coinName) + " coins of the currency """ + coinName + """"',"end for"]},buy_coin:{description:"Publishes a purchase offer indicating the number of coins you wish to buy and the price ($) per unit you are willing to pay. The purchase will be finalized if there is any sale offer with a price less than or equal to the one proposed in the purchase. If there is no eligible offer to sell at that time, the offer to buy will remain publicly visible until a new offer to sell satisfies the requirements. If the publication has been successful, a `number` with the value one is returned. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a runtime exception preventing further script execution.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = wallet.buy_coin("test", 100, 20, "test")',"if result == 1 then",' print "Sucessfully created purchase offer!"',"else",' print "Failed: " + result',"end if"]},sell_coin:{description:"Publishes a sale offer indicating the amount of coins you want to sell and the price ($) per unit you want to assign. The sale will be finalized if there is any purchase offer with a price greater than or equal to that proposed in the sale. If there is no existing offer to buy that matches the requirements at that time, the offer to sell will remain publicly visible until a new offer to buy satisfies the requirements. If the publication has been successful, a `number` with the value one is returned. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a runtime exception preventing further script execution.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = wallet.sell_coin("test", 100, 20, "test")',"if result == 1 then",' print "Sucessfully created sell offer!"',"else",' print "Failed: " + result',"end if"]},get_pending_trade:{description:"Returns a `list` with the pending sale or purchase offer of this wallet for a certain currency. Index 0 of the `list` represents the type of offer with a `string` (Buy/Sell), index 1 represents the quantity to be sold or bought, and index 2 represents the price per unit. On failure, this method will return a `string` with details. Any deviation from the method signature will result in a `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','result = wallet.get_pending_trade("test")','isBuying = result[0] == "Buy"',"quantity = result[1]","unitPrice = result[2]",'currentBalance = wallet.get_balance("test")',"if isBuying then",' print "After buying was successful your balance will be " + (quantity * unitPrice + currentBalance)',"else",' print "After selling was successful your balance will be " + (currentBalance - quantity * unitPrice)',"end if"]},cancel_pending_trade:{description:"Cancel any pending offer of a certain coin. On success, an empty `string` will be returned. On failure, a `string` with an error message will be returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','if wallet.cancel_pending_trade("test") == "" then',' print "Trade got canceled!"',"end if"]},get_global_offers:{description:"Returns a `map` with all the offers made by any player of a given currency. The key of the `map` represents the WalletID of the player who has made the offer, and the value of the `map` is a `list` where index 0 represents the type of offer with a `string` (Buy/Sell), index 1 represents the amount to sell or buy, and index 2 represents the price per unit. In case of failure, this method returns a `string` with details. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','for item in wallet.get_global_offers("test")'," walletId = item.key"," trade = item.value",' isBuying = trade[0] == "Buy"'," quantity = trade[1]"," unitPrice = trade[2]",' print "-" * 10',' print "<b>" + walletId + "</b>"'," if isBuying then",' print "<color=green>Is buying</color>"'," else",' print "<color=yellow>Is selling</color>"'," end if",' print quantity + " coins with a unit price of " + unitPrice',"end for"]},list_global_coins:{description:"Returns a `list` where each item is a `string` containing the names of all the currencies that exist. In case of failure, this method returns a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','print "All existing coins: " wallet.list_global_coins.join(", ")']},show_nodes:{description:"Returns a `number` representing the count of devices mining a specific coin for the same `wallet`. In case of an error, a `string` with details is returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','print "Active miners: " show_nodes(wallet, "test")']},reset_password:{description:"Change the password of the wallet. Only the account owner can perform this action. If the process is completed successfully, a `number` with the value one will be returned. In case of an error, a `string` with details will be returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','if wallet.reset_password("test") == 1 then',' print "You got a new password!"',"end if"]},get_pin:{description:"Returns a `string` with a PIN that refreshes every few minutes. This PIN is used to obtain an account in cryptocurrency services.",example:['blockchain = include_lib("/lib/blockchain.so")',"myShell = get_shell","myComputer = myShell.host_computer",'wallet = blockchain.login_wallet("test", "test")','myComputer.touch("/root", "pin_launch.src")','myFile = myComputer.File("/root/pin_launch.src")','myFile.set_content("',' blockchain = include_lib(""/lib/blockchain.so"")'," myShell = get_shell"," myComputer = myShell.host_computer",' wallet = blockchain.login_wallet(""test"", ""test"")'," if params[0] == wallet.get_pin then",' get_custom_object.secret = ""The answer is 42""'," else",' get_custom_object.secret = ""The answer is 10053""'," end if",'")','myShell.build("/root/pin_launch.src", "/root")',"myFile.delete",'myShell.launch("/root/pin_launch", wallet.get_pin)','print "The secret: " + get_custom_object.secret']}}});var S1=S((OV,yF)=>{yF.exports={$meta:{description:'A `debugLibrary` object can be acquired by using [debug_tools](#METALIB_DEBUG_TOOLS). The `classID` used for this object is `"debugLibrary"`.'},scan:{description:"Scans the library in debug mode to identify potential code errors that may lead to vulnerabilities. If issues are detected, the relevant code snippets are printed. In case of an error, a `string` containing the error message is returned.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")','debugLib = metaLib.debug_tools("test", "test")','print("Debug Library result: " + debugLib.scan)']},apply_patch:{description:"Applies a patch containing corrected code to the specified text file at the provided path. Returns a `string` with the result of the operation. If the path argument is not a `string` this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")','debugLib = metaLib.debug_tools("test", "test")','print("Path result: " + debugLib.apply_patch("/etc/passwd"))']},unit_testing:{description:"Conducts automated tests on the specified lines of code. If potential vulnerabilities are detected due to errors in these lines, this method will print partial objects that could be obtained by exploiting the vulnerability, along with the affected memory zone and detailed vulnerability information. In case of failure, this function returns a `string` with an error message. If the `error lines` argument is not a `list`, the method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")','debugLib = metaLib.debug_tools("test", "test")','print("Unit test results: " + debugLib.unit_testing([1, 2, 3]))']}}});var I1=S((AV,bF)=>{bF.exports={$meta:{description:'A `trafficNet` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"TrafficNet"`.'},camera_link_system:{description:"Accesses the traffic camera system, opening a window with controls to switch between different cameras. If the window opens successfully, this method returns a `number` with the value one. In case of an error, it returns a `string` with details.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"linkSystemResult = libTraffic.camera_link_system","if linkSystemResult == 1 then",' print("Initiated camera broadcast!")',"end if"]},locate_vehicle:{description:"Performs a search for the specified license plate to locate the vehicle. If the vehicle is visible on any camera, the viewer will switch to the camera currently displaying it and return a `number` with the value one. If the vehicle cannot be located or the license plate is incorrect, a `string` indicating the error is returned. If the provided license plate is not of `string` type, this method will return `null`.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"libTraffic.camera_link_system",'vehicleSearchResult = libTraffic.locate_vehicle("1L2M3N")',"if vehicleSearchResult == 1 then",' print("Found vehicle!")',"end if"]},next_camera:{description:"Switches the viewer to the next available traffic camera. In case of an error, a `string` containing the details is returned.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"libTraffic.camera_link_system","switchResult = libTraffic.next_camera","if switchResult == 1 then",' print("Switched to next camera!")',"end if"]},prev_camera:{description:"Switches the viewer to the previous available traffic camera. In case of an error, a `string` containing the details is returned.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"libTraffic.camera_link_system","switchResult = libTraffic.prev_camera","if switchResult == 1 then",' print("Switched to previous camera!")',"end if"]},traffic_light_config:{description:"This method is not yet implemented.",example:['libTraffic = include_lib("/lib/libtrafficnet.so")',"libTraffic.camera_link_system","print(libTraffic.traffic_light_config)"]}}});var E1=S((DV,vF)=>{vF.exports={$meta:{description:'A `smartAppliance` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"SmartAppliance"`.'},model:{description:"Returns a `string` with the appliance model ID.",example:['libSmartapp = include_lib("/lib/libsmartappliance.so")',"modelResult = libSmartapp.model",'if modelResult.matches("^[A-Z]+$") then',' print("Model is: " + modelResult)',"else",` print("Model couldn't be determined due to: " + modelResult)`,"end if"]},override_settings:{description:"Overrides the power and temperature settings of the appliance. If successful, it returns a `number` with the value one; otherwise, it returns a `string` detailing the error. If any arguments deviate from the defined signature, this method will return `null`.",example:['libSmartapp = include_lib("/lib/libsmartappliance.so")',"overrideResult = libSmartapp.override_settings(1000, 20)","if overrideResult == 1 then",' print("Override was successful!")',"else",' print("Override failed due to: " + overrideResult)',"end if"]},set_alarm:{description:"Activates or deactivates the sound alarm indicating any appliance malfunction. If the operation is successful, a `number` with the value one is returned; otherwise, a `string` containing error details is returned. If the `enable` argument deviates from the defined signature, the method will return `null`.",example:['libSmartapp = include_lib("/lib/libsmartappliance.so")',"setAlarmResult = libSmartapp.set_alarm(false)","if setAlarmResult == 1 then",' print("Alarm was disabled successfully!")',"else",' print("Disabling alarm failed due to: " + setAlarmResult)',"end if"]}}});var R1=S(ba=>{"use strict";var Ee=ba&&ba.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ba,"__esModule",{value:!0});var _F=Ee(X0()),wF=Ee(e1()),xF=Ee(t1()),kF=Ee(n1()),TF=Ee(r1()),SF=Ee(i1()),IF=Ee(s1()),EF=Ee(o1()),RF=Ee(a1()),PF=Ee(l1()),CF=Ee(u1()),OF=Ee(c1()),AF=Ee(p1()),DF=Ee(d1()),jF=Ee(h1()),LF=Ee(f1()),MF=Ee(m1()),qF=Ee(g1()),FF=Ee(y1()),NF=Ee(b1()),$F=Ee(v1()),UF=Ee(_1()),BF=Ee(w1()),WF=Ee(x1()),VF=Ee(k1()),HF=Ee(T1()),zF=Ee(S1()),GF=Ee(I1()),KF=Ee(E1()),YF={any:_F.default,aptClient:wF.default,blockchain:xF.default,class:kF.default,ctfEvent:EF.default,coin:TF.default,computer:SF.default,crypto:IF.default,function:CF.default,file:RF.default,ftpShell:PF.default,general:OF.default,list:AF.default,map:DF.default,metaLib:jF.default,metaMail:LF.default,metaxploit:MF.default,netSession:qF.default,port:NF.default,router:$F.default,service:UF.default,shell:BF.default,string:WF.default,subWallet:VF.default,wallet:HF.default,number:FF.default,debugLibrary:zF.default,trafficNet:GF.default,smartAppliance:KF.default};ba.default=YF});var P1=S((LV,QF)=>{QF.exports={WELCOME_TITLE:"GreyScript API \u2013 Unofficial Documentation",WELCOME_TEXT:'<p>Grey Hack enables players to create their own programs inside the game via the integrated scripting language called GreyScript. GreyScript is a fork of <a href="https://miniscript.org/" target="_blank">MiniScript</a> and can be compared to another language such as JavaScript or Lua.</p><p>Programs can be created within Grey Hack via the in-game CodeEditor. Alternatively you can also use <a href="https://code.visualstudio.com/" target="_blank">Visual Studio Code</a> with <a href="https://marketplace.visualstudio.com/items?itemName=ayecue.greybel-vs" target="_blank">greybel-vs</a> which includes syntax highlighting and other helpful features. Another alternative is to use the <a href="https://editor.greyscript.org" target="_blank">online editor</a> provided by <a href="https://github.com/ayecue/greybel-js" target="_blank">greybel-js</a>. The latter also provides a CLI which can be used for script execution outside the game and bundling of code files.</p><p>The best sources for Grey Hack scripts to get inspiration from are <a href="https://www.greyrepo.xyz/" target="_blank">greyrepo.xyz</a> and <a href="https://github.com/search?q=grey+hack" target="_blank">github.com</a>.</p>',DEFINITIONS_COPY:"copy",DEFINITIONS_OR:"or"}});var C1=S((MV,JF)=>{JF.exports={type:"any",definitions:{insert:{type:"function",arguments:[{label:"index",type:"number"},{label:"value",type:"any"}],returns:["list","string"]},indexOf:{type:"function",arguments:[{label:"value",type:"any"},{label:"value",type:"any"},{label:"after",type:"any",opt:!0}],returns:["any"]},hasIndex:{type:"function",arguments:[{label:"value",type:"any"}],returnVariations:[0,1],returns:["number"]},remove:{type:"function",arguments:[{label:"value",type:"any"}],returnVariations:[0,1],returns:["number","null","string"]},push:{type:"function",arguments:[{label:"value",type:"any"}],returns:["list","map"]},pull:{type:"function",returns:["any"]},pop:{type:"function",returns:["any"]},shuffle:{type:"function",returns:["null"]},sum:{type:"function",returns:["number"]},indexes:{type:"function",returns:["list"]},len:{type:"function",returns:["number"]},values:{type:"function",returns:["list"]}}}});var O1=S((qV,ZF)=>{ZF.exports={type:"aptClient",extends:"map",definitions:{show:{type:"function",arguments:[{label:"repository",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","${repository} repository not found","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file"],returns:["string","null"]},search:{type:"function",arguments:[{label:"search",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","${search} not found in any repository","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file"],returns:["string","null"]},update:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","apt_update: No internet access.","${source} repository not found","/etc/apt/sources.txt content is malformed",0],returns:["string","number"]},add_repo:{type:"function",arguments:[{label:"repository",type:"string"},{label:"port",type:"number",default:{type:"number",value:1542}}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/sources.txt does not exist","${repository} it is already added to sources.txt","/etc/apt/sources.txt content is malformed."],returns:["string","null"]},del_repo:{type:"function",arguments:[{label:"repository",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/sources.txt does not exist","${repository} not found in sources.txt","/etc/apt/sources.txt content is malformed."],returns:["string","null"]},install:{type:"function",arguments:[{label:"package",type:"string"},{label:"customPath",type:"string",default:{type:"string",value:""}}],returnVariations:["Unknown error: Unable to access to local computer","apt_install: No internet access.","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","package name can not be empty","There is not enough free space on the hard disk.","${customPath} not found.","permission denied","!PlayerUtils.ConnectComputer","!Computer.CheckInicio","!PlayerUtils.FirewallPingStatus","!Networking.IsRouterAvailable","!Networking.CheckServiceOnline","${serviceDBFile} does not exist in the server","apt folder content does not exist in the server","${package} does not exist in the server","!GreyInterpreter.CheckScpUpload","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file","${package} not found in the server",1],returns:["string","number","null"]},check_upgrade:{type:"function",arguments:[{label:"filepath",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","apt_check_upgrade: No internet access.","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","package name can not be empty","${filepath} does not exist in this filesystem","!PlayerUtils.ConnectComputer","!PlayerUtils.FirewallPingStatus","!Computer.CheckInicio","!Networking.CheckServiceOnline","${serviceDBFile} does not exist in the server","apt folder content does not exist in the server","${filepath} does not exist in the server","${filepath} does not exist in this filesystem","${serviceDBFile} file content is malformed in the server","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file","${filepath} not found in the server",1,0],returns:["string","number","null"]}}}});var A1=S((FV,XF)=>{XF.exports={type:"blockchain",definitions:{coin_price:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","coin_price: No internet access.","coin_price: Coin does not exist."],returns:["null","string","number"]},show_history:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","show_history: No internet access."],returns:[{type:"map",keyType:"number",valueType:"list"},"string","null"]},amount_mined:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","amount_mined: No internet access.","amount_mined: Coin does not exist."],returns:["string","number","null"]},get_coin:{type:"function",arguments:[{label:"coinName",type:"string"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","get_coin: No internet access.","get_coin: Incorrect user/password"],returns:["string","coin","null"]},get_coin_name:{type:"function",arguments:[{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","get_coin_name: No internet access.","get_coin_name: Incorrect user/password","get_coin_name: No currency has been found"],returns:["string","null"]},login_wallet:{type:"function",arguments:[{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","login_wallet: No internet access.","login_wallet: Account not found or incorrect password"],returns:["string","wallet","null"]},create_wallet:{type:"function",arguments:[{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","create_wallet: No internet access.","Error: only alphanumeric allowed as name and password","create_wallet: name and password cannot exceed the 16 character limit.","Error: It is necessary to have a bank account to be able to create a wallet.","!BlockchainSystem.AddWallet"],returns:["string","wallet","null"]},delete_coin:{type:"function",arguments:[{label:"coinName",type:"string"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","delete_coin: No internet access.","!BlockchainSystem.RemoveCurrency",1],returns:["number","string","null"]}}}});var D1=S((NV,eN)=>{eN.exports={type:"class",hidden:!0,definitions:{}}});var j1=S(($V,tN)=>{tN.exports={type:"coin",extends:"map",definitions:{set_cycle_mining:{type:"function",arguments:[{label:"rateHours",type:"number",default:{type:"number",value:3}}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","the mining cycle cannot exceed the maximum of 2160 hours","the mining cycle cannot be less than 1 hour",1],returns:["string","number","null"]},get_cycle_mining:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number"]},get_reward:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number"]},set_reward:{type:"function",arguments:[{label:"coinAmount",type:"number",default:{type:"number",value:1}}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","Error: The reward cannot be less than 1 coin","Error: Coin does not exist",1],returns:["number","string","null"]},transaction:{type:"function",arguments:[{label:"subWalletOrig",type:"string"},{label:"subWalletDest",type:"string"},{label:"valAmount",type:"number"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","Error: amount value cannot be less than 1","!BlockchainSystem.Transaction",1],returns:["string","number","null"]},create_subwallet:{type:"function",arguments:[{label:"walletID",type:"string"},{label:"pin",type:"string"},{label:"subWalletUser",type:"string"},{label:"subWalletPass",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","!BlockchainSystem.AddSubWallet",1],returns:["string","number","null"]},get_subwallet:{type:"function",arguments:[{label:"subWalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","get_subwallet: The account does not exist"],returns:["string","subWallet","null"]},get_subwallets:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string",{type:"list",valueType:"subWallet"}]},set_address:{type:"function",arguments:[{label:"address",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","set_address: address ${address}not found","!BlockchainSystem.SetAddress",1],returns:["number","string","null"]},get_address:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","!BlockchainSystem.GetAddress"],returns:["string"]},get_mined_coins:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number"]},reset_password:{type:"function",arguments:[{label:"newPassword",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","reset_password: only alphanumeric characters are allowed as password","reset_password: name and password cannot exceed the 16 character limit.","!BlockchainSystem.ResetCoinPass",1],returns:["number","string"]}}}});var L1=S((UV,nN)=>{nN.exports={type:"computer",extends:"map",definitions:{get_ports:{type:"function",returns:[{type:"list",valueType:"port"}]},get_name:{type:"function",returns:["string"]},local_ip:{type:"function",returns:["string"]},public_ip:{type:"function",returns:["string"]},File:{type:"function",arguments:[{label:"path",type:"string"}],returns:["file","null"]},create_folder:{type:"function",arguments:[{label:"path",type:"string"},{label:"folder",type:"string",default:{type:"string",value:"newFolder"}}],returnVariations:["Error: only alphanumeric allowed as folder name.","Error: name cannot exceed the limit of 128 characters.","create_folder: path too large","Error: invalid path","!PlayerUtils.CrearCarpeta",1],returns:["string","number"]},is_network_active:{type:"function",returnVariations:[0,1],returns:["number"]},touch:{type:"function",arguments:[{label:"path",type:"string"},{label:"fileName",type:"string"}],returnVariations:["Error: invalid path","Error: nameFile must be string","Error: only alphanumeric allowed as file name.","Error: name cannot exceed the limit of 128 characters.","touch: path too large","The file already exists","!PlayerUtils.CrearArchivo",1],returns:["number","string"]},show_procs:{type:"function",returns:["string"]},network_devices:{type:"function",returns:["string"]},change_password:{type:"function",arguments:[{label:"username",type:"string"},{label:"password",type:"string"}],returnVariations:["Error: only alphanumeric allowed as password.","Error: the password cannot exceed the limit of 15 characters.","Denied. Only root user can execute this command.","user ${username} does not exist",1],returns:["number","string","null"]},create_user:{type:"function",arguments:[{label:"usename",type:"string"},{label:"password",type:"string"}],returnVariations:["Error: only alphanumeric allowed as user name and password.","Denied. Only root user can execute this command.","!Computer.ValidateNewUser","Denied. Maximum number of registered users reached.",1],returns:["number","string","null"]},delete_user:{type:"function",arguments:[{label:"username",type:"string"},{label:"removeHome",type:"number",default:{type:"number",value:0}}],returnVariations:["Denied. Only root user can execute this command.","can't delete user. ${username} does not exist","the root user can't be deleted.","sorry, at the moment that account can't be deleted.","user ${username} not found.",1],returns:["number","string","null"]},create_group:{type:"function",arguments:[{label:"username",type:"string"},{label:"group",type:"string"}],returnVariations:["Error: only alphanumeric allowed as user and group names.","Denied. Only root user can execute this command.","Error: user ${username} does not exist.",1],returns:["number","string","null"]},delete_group:{type:"function",arguments:[{label:"username",type:"string"},{label:"group",type:"string"}],returnVariations:["Denied. Only root user can execute this command.","Error: user ${username} does not exist.","Error: group ${group} not found in user ${username}",1],returns:["number","string","null"]},groups:{type:"function",arguments:[{label:"username",type:"string"}],returnVariations:["Error: user ${username} does not exist."],returns:["string","null"]},close_program:{type:"function",arguments:[{label:"pid",type:"number"}],returnVariations:["Permission denied. PID ${pid} belongs to user <b>${username}</b>","Permission denied. Process protected.","Unable to close this process. The process belongs to this script.",1,0],returns:["number","string","null"]},wifi_networks:{type:"function",arguments:[{label:"netDevice",type:"string"}],returns:[{type:"list",valueType:"string"},"null"]},connect_wifi:{type:"function",arguments:[{label:"netDevice",type:"string"},{label:"bssid",type:"string"},{label:"essid",type:"string"},{label:"password",type:"string"}],returnVariations:["connect_wifi: permission denied. Guest users can not execute this method","connect_wifi: Network device not found","connect_wifi: Only wifi cards are supported","Can't connect. Incorrect password.","Can't connect. Router not found.","can't connect: the remote server has been temporarily disabled due to non-payment","Can't connect. Target is out of reach.","Can't connect. Incorrect password.",1],returns:["number","string","null"]},connect_ethernet:{type:"function",arguments:[{label:"netDevice",type:"string"},{label:"address",type:"string"},{label:"gateway",type:"string"}],returnVariations:["connect_ethernet: permission denied. Guest users can not execute this method","Error: Invalid IP address","Error: invalid gateway","Error: the IP address and the gateway must belong to the same subnet","connect_ethernet: Network device not found","connect_ethernet: Only ethernet cards are supported","!NetworkLan.ConnectEthernet"],returns:["string","null"]},network_gateway:{type:"function",returns:["string"]},active_net_card:{type:"function",returns:["string"]}}}});var M1=S((BV,rN)=>{rN.exports={type:"crypto",extends:"map",definitions:{aircrack:{type:"function",arguments:[{label:"path",type:"string"}],returns:["string","null"]},airmon:{type:"function",arguments:[{label:"option",type:"string"},{label:"device",type:"string"}],returnVariations:["Error: wifi card is disabled","airmon: monitor mode can only be activated on wifi cards","airmon: monitor mode is not supported by the chipset of this network card.",0,1],returns:["number","string"]},aireplay:{type:"function",arguments:[{label:"bssid",type:"string"},{label:"essid",type:"string"},{label:"maxAcks",type:"number",default:{type:"number",value:-1}}],returnVariations:["Error: wifi card is disabled","router not found!","Can't connect. Target is out of reach.","aireplay: no wifi card found with monitor mode enabled"],returns:["string","null"]},decipher:{type:"function",arguments:[{label:"encPass",type:"string"}],returns:["string","null"]},smtp_user_list:{type:"function",arguments:[{label:"ip",type:"string"},{label:"port",type:"number"}],returnVariations:["Error: Invalid ip address","!PlayerUtils.GetSmtpServer"],returns:[{type:"list",valueType:"string"},"string","null"]}}}});var q1=S((WV,iN)=>{iN.exports={type:"ctfEvent",extends:"map",definitions:{get_description:{type:"function",returns:["string"]},get_template:{type:"function",returns:["string"]},player_success:{type:"function",returnVariations:[0,1],returns:["number"]},get_creator_name:{type:"function",returns:["string"]},get_mail_content:{type:"function",returns:["string"]}}}});var F1=S((VV,sN)=>{sN.exports={type:"file",extends:"map",definitions:{chmod:{type:"function",arguments:[{label:"perms",type:"string",default:{type:"string",value:""}},{label:"isRecursive",type:"number",default:{type:"number",value:0}}],returnVariations:["${path} not found","!FileSystem.UpdatePermisos"],returns:["string"]},copy:{type:"function",arguments:[{label:"path",type:"string",default:{type:"string",value:""}},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","!PlayerUtils.MoverFichero",1],returns:["string","number","null"]},move:{type:"function",arguments:[{label:"path",type:"string",default:{type:"string",value:""}},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","!PlayerUtils.MoverFichero",1],returns:["string","number","null"]},symlink:{type:"function",arguments:[{label:"path",type:"string",default:{type:"string",value:""}},{label:"newName",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","Error: invalid path","The file already exists","!PlayerUtils.CrearCarpeta","!PlayerUtils.CrearArchivo",1],returns:["string","number","null"]},rename:{type:"function",arguments:[{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","Error: name cannot exceed the limit of 128 characters.","!PlayerUtils.RenameFichero",0],returns:["string","number"]},path:{type:"function",arguments:[{label:"symlinkOrigPath",type:"number",default:{type:"number",value:0}}],returns:["string"]},is_folder:{type:"function",returnVariations:[1,0],returns:["number","null"]},parent:{type:"function",returns:["file","null"]},name:{type:"function",returns:["string","null"]},allow_import:{type:"function",returns:["number"]},get_content:{type:"function",returnVariations:["Error: can't find the computer of this file","can't open ${filepath}. Binary file."],returns:["string","null"]},set_content:{type:"function",arguments:[{label:"content",type:"string",default:{type:"string",value:""}}],returnVariations:["I can't save the file. The maximum of 160,000 characters has been exceeded.","set_content: unable to use this method in encryption configuration","can't open ${filepath}. Binary file.",1],returns:["string","number","null"]},is_binary:{type:"function",returnVariations:[1,0],returns:["number","null"]},is_symlink:{type:"function",returnVariations:[1,0],returns:["number","null"]},has_permission:{type:"function",arguments:[{label:"perms",type:"string",default:{type:"string",value:""}}],returnVariations:[1,0],returns:["number","null"]},delete:{type:"function",returnVariations:["!PlayerUtils.RemoveFile"],returns:["string"]},get_folders:{type:"function",returns:[{type:"list",valueType:"file"},"null"]},get_files:{type:"function",returns:[{type:"list",valueType:"file"},"null"]},permissions:{type:"function",returns:["string","null"]},owner:{type:"function",returns:["string","null"]},set_owner:{type:"function",arguments:[{label:"owner",type:"string",default:{type:"string",value:""}},{label:"recursive",type:"number",default:{type:"number",value:0}}],returnVariations:["Permission denied"],returns:["string","null"]},group:{type:"function",returns:["string","null"]},set_group:{type:"function",arguments:[{label:"group",type:"string",default:{type:"string",value:""}},{label:"recursive",type:"number",default:{type:"number",value:0}}],returnVariations:["Permission denied"],returns:["string","null"]},size:{type:"function",returns:["string","null"]}}}});var N1=S((HV,oN)=>{oN.exports={type:"ftpShell",extends:"map",definitions:{host_computer:{type:"function",returns:["computer"]},start_terminal:{type:"function",returns:["null"]},put:{type:"function",arguments:[{label:"sourceFile",type:"string"},{label:"destinationFolder",type:"string"},{label:"remoteShell",type:"shell"}],returnVariations:["${sourceFile} not found","${destinationFolder} not found","${destinationFolder} it's not a folder","!GreyInterpreter.CheckScpUpload",1],returns:["number","string","null"]}}}});var $1=S((zV,aN)=>{aN.exports={type:"function",hidden:!0,definitions:{}}});var U1=S((GV,lN)=>{lN.exports={type:"general",definitions:{mail_login:{type:"function",arguments:[{label:"user",type:"string"},{label:"pass",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","login: No internet access.","!Database.GetMailAccount"],returns:["metaMail","string","null"]},parent_path:{type:"function",arguments:[{label:"directory",type:"string"}],returns:["string"]},trim:{type:"function",arguments:[{label:"self",type:"string"}],returns:["string","null"]},hasIndex:{type:"function",arguments:[{label:"value",types:["map","list","string"]},{label:"index",type:"any"}],returnVariations:[0,1],returns:["number","null"]},typeof:{type:"function",arguments:[{label:"value",type:"any"}],returns:["string"]},get_router:{type:"function",arguments:[{label:"ipAddress",type:"string",default:{type:"string",value:""}}],returns:["router","null"]},get_switch:{type:"function",arguments:[{label:"ipAddress",type:"string"}],returns:["router","null"]},nslookup:{type:"function",arguments:[{label:"webAddress",type:"string"}],returnVariations:["Not found"],returns:["string"]},print:{type:"function",arguments:[{label:"value",type:"any",default:{type:"string",value:""}},{label:"replaceText",type:"number",default:{type:"number",value:0}}],returns:["null"]},clear_screen:{type:"function",returns:["null"]},active_user:{type:"function",returns:["string"]},home_dir:{type:"function",returns:["string"]},get_shell:{type:"function",arguments:[{label:"user",type:"string",default:{type:"string",value:""}},{label:"pass",type:"string",default:{type:"string",value:""}}],returns:["shell","null"]},indexes:{type:"function",arguments:[{label:"self",types:["map","list","string"]}],returns:["list","null"]},values:{type:"function",arguments:[{label:"self",types:["map","string"]}],returns:["list"]},indexOf:{type:"function",arguments:[{label:"self",types:["list","map","string"]},{label:"value",type:"any"},{label:"after",type:"any",opt:!0}],returns:["any"]},len:{type:"function",arguments:[{label:"self",types:["list","map","string"]}],returns:["number","null"]},shuffle:{type:"function",arguments:[{label:"self",types:["list","map"]}],returns:["null"]},val:{type:"function",arguments:[{label:"self",types:["number","string"],default:{type:"number",value:0}}],returns:["number","null"]},lower:{type:"function",arguments:[{label:"self",type:"string"}],returns:["string"]},upper:{type:"function",arguments:[{label:"self",type:"string"}],returns:["string"]},sum:{type:"function",arguments:[{label:"self",types:["list","map"]}],returns:["number"]},pop:{type:"function",arguments:[{label:"self",types:["list","map"]}],returns:["any"]},pull:{type:"function",arguments:[{label:"self",types:["list","map"]}],returns:["any"]},push:{type:"function",arguments:[{label:"self",types:["list","map"]},{label:"value",type:"any"}],returns:["list","map","null"]},sort:{type:"function",arguments:[{label:"self",type:"list"},{label:"byKey",type:"any"},{label:"ascending",type:"number",default:{type:"number",value:1}}],returns:["list"]},remove:{type:"function",arguments:[{label:"self",types:["map","list","string"]},{label:"key",type:"any"}],returnVariations:[0,1],returns:["number","null","string"]},user_input:{type:"function",arguments:[{label:"message",type:"string",default:{type:"string",value:""}},{label:"isPassword",type:"number",default:{type:"number",value:0}},{label:"anyKey",type:"number",default:{type:"number",value:0}}],returns:["string"]},include_lib:{type:"function",arguments:[{label:"path",type:"string"}],returns:["crypto","metaxploit","service","blockchain","aptClient","smartAppliance","trafficNet","null"]},import_code:{type:"function",arguments:[{label:"path",type:"string"}],returns:["null"]},exit:{type:"function",arguments:[{label:"message",type:"string",default:{type:"string",value:""}}],returns:["null"]},user_mail_address:{type:"function",returns:["string","null"]},user_bank_number:{type:"function",returns:["string","null"]},whois:{type:"function",arguments:[{label:"ip",type:"string"}],returnVariations:["Invalid IP address: ${ip}","Error: the IP address must be public","No Info available","Address not found"],returns:["string"]},wait:{type:"function",arguments:[{label:"delay",type:"number",default:{type:"number",value:1}}],returns:["null"]},command_info:{type:"function",arguments:[{label:"commandName",type:"string"}],returnVariations:["Unknown info"],returns:["string"]},program_path:{type:"function",returns:["string"]},current_path:{type:"function",returns:["string"]},format_columns:{type:"function",arguments:[{label:"columns",type:"string"}],returns:["string"]},current_date:{type:"function",returns:["string"]},is_lan_ip:{type:"function",arguments:[{label:"ip",type:"string"}],returns:["number"]},is_valid_ip:{type:"function",arguments:[{label:"ip",type:"string"}],returns:["number"]},bitwise:{type:"function",arguments:[{label:"operator",type:"string"},{label:"left",type:"number"},{label:"right",type:"number"}],returns:["number","null"]},abs:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},acos:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},asin:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},atan:{type:"function",arguments:[{label:"y",type:"number",default:{type:"number",value:0}},{label:"x",type:"number",default:{type:"number",value:1}}],returns:["number"]},tan:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:1}}],returns:["number"]},cos:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},code:{type:"function",arguments:[{label:"value",type:"string"}],returns:["number"]},char:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:65}}],returns:["string"]},sin:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},floor:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},range:{type:"function",arguments:[{label:"start",type:"number",default:{type:"number",value:0}},{label:"end",type:"number",default:{type:"number",value:0}},{label:"inc",type:"number",opt:!0}],returns:[{type:"list",valueType:"number"}]},round:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}},{label:"fixed",type:"number",default:{type:"number",value:0}}],returns:["number"]},rnd:{type:"function",arguments:[{label:"seed",type:"number",opt:!0}],returns:["number"]},sign:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},sqrt:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},str:{type:"function",arguments:[{label:"value",type:"any"}],returns:["string"]},ceil:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},pi:{type:"function",returns:["number"]},launch:{type:"function",arguments:[{label:"shell",type:"shell"},{label:"program",type:"string"},{label:"params",type:"string",default:{type:"string",value:""}}],returnVariations:["Invalid shell","Can't find computer",1,0],returns:["string","number"]},launch_path:{type:"function",returns:["string"]},slice:{type:"function",arguments:[{label:"value",types:["list","string"]},{label:"startIndex",type:"number",default:{type:"number",value:0}},{label:"endIndex",type:"number",opt:!0}],returns:["list","string","null"]},md5:{type:"function",arguments:[{label:"value",type:"string"}],returns:["string"]},hash:{type:"function",arguments:[{label:"value",type:"any"}],returns:["number"]},time:{type:"function",returns:["number"]},bitAnd:{type:"function",arguments:[{label:"a",type:"number",default:{type:"number",value:0}},{label:"b",type:"number",default:{type:"number",value:0}}],returns:["number"]},bitOr:{type:"function",arguments:[{label:"a",type:"number",default:{type:"number",value:0}},{label:"b",type:"number",default:{type:"number",value:0}}],returns:["number"]},bitXor:{type:"function",arguments:[{label:"a",type:"number",default:{type:"number",value:0}},{label:"b",type:"number",default:{type:"number",value:0}}],returns:["number"]},log:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}},{label:"base",type:"number",default:{type:"number",value:10}}],returns:["number"]},yield:{type:"function",returns:["null"]},get_custom_object:{type:"function",returns:["map"]},insert:{type:"function",arguments:[{label:"object",types:["list","string"]},{label:"index",type:"number"},{label:"value",type:"any"}],returns:["list","string"]},to_int:{type:"function",arguments:[{label:"self",type:"string"}],returns:["string","number","null"]},join:{type:"function",arguments:[{label:"value",type:"list"},{label:"delimiter",type:"string",default:{type:"string",value:" "}}],returns:["string"]},split:{type:"function",arguments:[{label:"self",type:"string"},{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:[{type:"list",valueType:"string"},"null"]},reverse:{type:"function",arguments:[{label:"value",type:"list"}],returns:["null"]},replace:{type:"function",arguments:[{label:"value",types:["map","list"]},{label:"oldVal",type:"any"},{label:"newVal",type:"any"},{label:"maxCount",type:"number",opt:!0}],returns:["any"]},replace_regex:{type:"function",arguments:[{label:"self",type:"string"},{label:"pattern",type:"string"},{label:"newValue",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:["string"]},is_match:{type:"function",arguments:[{label:"value",type:"string"},{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returnVariations:[1,0],returns:["number"]},lastIndexOf:{type:"function",arguments:[{label:"self",type:"string"},{label:"searchStr",type:"string"}],returns:["number","null"]},matches:{type:"function",arguments:[{label:"value",type:"string"},{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:[{type:"map",keyType:"number",valueType:"string"}]},get_ctf:{type:"function",arguments:[{label:"user",type:"string"},{label:"password",type:"string"},{label:"eventName",type:"string"}],returnVariations:["get_ctf: user and password cannot be null","get_ctf: user or password incorrect"],returns:["ctfEvent","string"]},show:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"repository",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","${repository} repository not found","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file"],returns:["string","null"]},search:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"search",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","${search} not found in any repository","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file"],returns:["string","null"]},update:{type:"function",arguments:[{label:"self",type:"aptClient"}],returnVariations:["Unknown error: Unable to access to local computer","apt_update: No internet access.","${source} repository not found","/etc/apt/sources.txt content is malformed",0],returns:["string","number"]},add_repo:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"repository",type:"string"},{label:"port",type:"number",default:{type:"number",value:1542}}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/sources.txt does not exist","${repository} it is already added to sources.txt","/etc/apt/sources.txt content is malformed."],returns:["string","null"]},del_repo:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"repository",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/sources.txt does not exist","${repository} not found in sources.txt","/etc/apt/sources.txt content is malformed."],returns:["string","null"]},install:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"package",type:"string"},{label:"customPath",type:"string",default:{type:"string",value:""}}],returnVariations:["Unknown error: Unable to access to local computer","apt_install: No internet access.","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","package name can not be empty","There is not enough free space on the hard disk.","${customPath} not found.","permission denied","!PlayerUtils.ConnectComputer","!Computer.CheckInicio","!PlayerUtils.FirewallPingStatus","!Networking.IsRouterAvailable","!Networking.CheckServiceOnline","${serviceDBFile} does not exist in the server","apt folder content does not exist in the server","${package} does not exist in the server","!GreyInterpreter.CheckScpUpload","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file","${package} not found in the server",1],returns:["string","number","null"]},check_upgrade:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"filePath",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","apt_check_upgrade: No internet access.","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","package name can not be empty","${filepath} does not exist in this filesystem","!PlayerUtils.ConnectComputer","!PlayerUtils.FirewallPingStatus","!Computer.CheckInicio","!Networking.CheckServiceOnline","${serviceDBFile} does not exist in the server","apt folder content does not exist in the server","${filepath} does not exist in the server","${filepath} does not exist in this filesystem","${serviceDBFile} file content is malformed in the server","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file","${filepath} not found in the server",1,0],returns:["string","number","null"]},coin_price:{type:"function",arguments:[{label:"self",type:"blockchain"}],returnVariations:["Unknown error: Unable to access to local computer","coin_price: No internet access.","coin_price: Coin does not exist."],returns:["null","string","number"]},show_history:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","show_history: No internet access."],returns:[{type:"map",keyType:"number",valueType:"list"},"string","null"]},amount_mined:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","amount_mined: No internet access.","amount_mined: Coin does not exist."],returns:["string","number","null"]},get_coin:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"coinName",type:"string"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","get_coin: No internet access.","get_coin: Incorrect user/password"],returns:["string","coin","null"]},get_coin_name:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","get_coin_name: No internet access.","get_coin_name: Incorrect user/password","get_coin_name: No currency has been found"],returns:["string","null"]},login_wallet:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","login_wallet: No internet access.","login_wallet: Account not found or incorrect password"],returns:["string","wallet","null"]},create_wallet:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","create_wallet: No internet access.","Error: only alphanumeric allowed as name and password","create_wallet: name and password cannot exceed the 16 character limit.","Error: It is necessary to have a bank account to be able to create a wallet.","!BlockchainSystem.AddWallet"],returns:["string","wallet","null"]},delete_coin:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"coinName",type:"string"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","delete_coin: No internet access.","!BlockchainSystem.RemoveCurrency",1],returns:["number","string","null"]},set_cycle_mining:{type:"function",arguments:[{label:"self",type:"coin"},{label:"rateHours",type:"number",default:{type:"number",value:3}}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","the mining cycle cannot exceed the maximum of 2160 hours","the mining cycle cannot be less than 1 hour",1],returns:["string","number","null"]},get_cycle_mining:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number","null"]},get_reward:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number","null"]},set_reward:{type:"function",arguments:[{label:"self",type:"coin"},{label:"coinAmount",type:"number",default:{type:"number",value:1}}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","Error: The reward cannot be less than 1 coin","Error: Coin does not exist",1],returns:["number","string","null"]},transaction:{type:"function",arguments:[{label:"self",type:"coin"},{label:"subWalletOrig",type:"string"},{label:"subWalletDest",type:"string"},{label:"valAmount",type:"number"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","Error: amount value cannot be less than 1","!BlockchainSystem.Transaction",1],returns:["string","number","null"]},create_subwallet:{type:"function",arguments:[{label:"self",type:"coin"},{label:"walletID",type:"string"},{label:"pin",type:"string"},{label:"subWalletUser",type:"string"},{label:"subWalletPass",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","!BlockchainSystem.AddSubWallet",1],returns:["string","number","null"]},get_subwallet:{type:"function",arguments:[{label:"self",type:"coin"},{label:"subWalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","get_subwallet: The account does not exist"],returns:["string","subWallet","null"]},get_subwallets:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string",{type:"list",valueType:"subWallet"},"null"]},set_address:{type:"function",arguments:[{label:"self",type:"coin"},{label:"address",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","set_address: address ${address}not found","!BlockchainSystem.SetAddress",1],returns:["number","string","null"]},get_address:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","!BlockchainSystem.GetAddress"],returns:["string","null"]},get_mined_coins:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number","null"]},reset_password_coin:{type:"function",arguments:[{label:"self",type:"coin"},{label:"newPassword",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","reset_password: only alphanumeric characters are allowed as password","reset_password: name and password cannot exceed the 16 character limit.","!BlockchainSystem.ResetCoinPass",1],returns:["number","string","null"]},get_ports:{type:"function",arguments:[{label:"self",type:"computer"}],returns:[{type:"list",valueType:"port"},"null"]},get_name:{type:"function",arguments:[{label:"self",type:"computer"}],returnVariations:["Unknown"],returns:["string"]},lan_ip:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},public_ip_pc:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},File:{type:"function",arguments:[{label:"self",type:"computer"},{label:"path",type:"string"}],returns:["file","null"]},create_folder:{type:"function",arguments:[{label:"self",type:"computer"},{label:"path",type:"string"},{label:"folder",type:"string",default:{type:"string",value:"newFolder"}}],returnVariations:["Error: only alphanumeric allowed as folder name.","Error: name cannot exceed the limit of 128 characters.","create_folder: path too large","Error: invalid path","!PlayerUtils.CrearCarpeta",1],returns:["string","number","null"]},is_network_active:{type:"function",arguments:[{label:"self",type:"computer"}],returnVariations:[0,1],returns:["number","null"]},touch:{type:"function",arguments:[{label:"self",type:"computer"},{label:"path",type:"string"},{label:"fileName",type:"string"}],returnVariations:["Error: invalid path","Error: nameFile must be string","Error: only alphanumeric allowed as file name.","Error: name cannot exceed the limit of 128 characters.","touch: path too large","The file already exists","!PlayerUtils.CrearArchivo",1],returns:["number","string","null"]},show_procs:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},network_devices:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},change_password:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"pass",type:"string"}],returnVariations:["Error: only alphanumeric allowed as password.","Error: the password cannot exceed the limit of 15 characters.","Denied. Only root user can execute this command.","user ${username} does not exist",1],returns:["number","string","null"]},create_user:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"pass",type:"string"}],returnVariations:["Error: only alphanumeric allowed as user name and password.","Denied. Only root user can execute this command.","!Computer.ValidateNewUser","Denied. Maximum number of registered users reached.",1],returns:["number","string","null"]},delete_user:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"removeHome",type:"number",default:{type:"number",value:0}}],returnVariations:["Denied. Only root user can execute this command.","can't delete user. ${username} does not exist","the root user can't be deleted.","sorry, at the moment that account can't be deleted.","user ${username} not found.",1],returns:["number","string","null"]},create_group:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"group",type:"string"}],returnVariations:["Error: only alphanumeric allowed as user and group names.","Denied. Only root user can execute this command.","Error: user ${username} does not exist.",1],returns:["number","string","null"]},delete_group:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"group",type:"string"}],returnVariations:["Denied. Only root user can execute this command.","Error: user ${username} does not exist.","Error: group ${group} not found in user ${username}",1],returns:["number","string","null"]},groups:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"}],returns:["string","null"]},close_program:{type:"function",arguments:[{label:"self",type:"computer"},{label:"pid",type:"number"}],returnVariations:["Permission denied. PID ${pid} belongs to user <b>${username}</b>","Permission denied. Process protected.","Unable to close this process. The process belongs to this script.",1,0],returns:["number","string","null"]},wifi_networks:{type:"function",arguments:[{label:"self",type:"computer"},{label:"netDevice",type:"string"}],returns:[{type:"list",valueType:"string"},"null"]},connect_wifi:{type:"function",arguments:[{label:"self",type:"computer"},{label:"netDevice",type:"string"},{label:"bssid",type:"string"},{label:"essid",type:"string"},{label:"pass",type:"string"}],returnVariations:["connect_wifi: permission denied. Guest users can not execute this method","connect_wifi: Network device not found","connect_wifi: Only wifi cards are supported","Can't connect. Incorrect password.","Can't connect. Router not found.","can't connect: the remote server has been temporarily disabled due to non-payment","Can't connect. Target is out of reach.","Can't connect. Incorrect password.",1],returns:["number","string","null"]},connect_ethernet:{type:"function",arguments:[{label:"self",type:"computer"},{label:"netDevice",type:"string"},{label:"localIp",type:"string"},{label:"gateway",type:"string"}],returnVariations:["connect_ethernet: permission denied. Guest users can not execute this method","Error: Invalid IP address","Error: invalid gateway","Error: the IP address and the gateway must belong to the same subnet","connect_ethernet: Network device not found","connect_ethernet: Only ethernet cards are supported","!NetworkLan.ConnectEthernet"],returns:["string","null"]},network_gateway:{type:"function",arguments:[{label:"self",type:"computer"}],returnVariations:["0.0.0.0"],returns:["string"]},active_net_card:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},aircrack:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"path",type:"string"}],returns:["string","null"]},airmon:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"option",type:"string"},{label:"device",type:"string"}],returnVariations:["Error: wifi card is disabled","airmon: monitor mode can only be activated on wifi cards","airmon: monitor mode is not supported by the chipset of this network card.",0,1],returns:["number","string"]},aireplay:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"bssid",type:"string"},{label:"essid",type:"string"},{label:"maxAcks",type:"number",default:{type:"number",value:-1}}],returnVariations:["Error: wifi card is disabled","router not found!","Can't connect. Target is out of reach.","aireplay: no wifi card found with monitor mode enabled"],returns:["string","null"]},decipher:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"encPass",type:"string"}],returns:["string","null"]},smtp_user_list:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"ip",type:"string"},{label:"port",type:"number"}],returnVariations:["Error: Invalid ip address","!PlayerUtils.GetSmtpServer"],returns:[{type:"list",valueType:"string"},"string","null"]},get_description:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returns:["string","null"]},get_template:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returns:["string","null"]},player_success:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returnVariations:[0,1],returns:["number","null"]},get_creator_name:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returns:["string","null"]},get_mail_content:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returns:["string","null"]},chmod:{type:"function",arguments:[{label:"self",type:"file"},{label:"perms",type:"string",default:{type:"string",value:""}},{label:"isRecursive",type:"number",default:{type:"number",value:0}}],returnVariations:["${path} not found","!FileSystem.UpdatePermisos"],returns:["string","null"]},copy:{type:"function",arguments:[{label:"self",type:"file"},{label:"path",type:"string",default:{type:"string",value:""}},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","!PlayerUtils.MoverFichero",1],returns:["string","number","null"]},move:{type:"function",arguments:[{label:"self",type:"file"},{label:"path",type:"string",default:{type:"string",value:""}},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","!PlayerUtils.MoverFichero",1],returns:["string","number","null"]},symlink:{type:"function",arguments:[{label:"self",type:"file"},{label:"path",type:"string",default:{type:"string",value:""}},{label:"newName",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","Error: invalid path","The file already exists","!PlayerUtils.CrearCarpeta","!PlayerUtils.CrearArchivo",1],returns:["string","number","null"]},rename:{type:"function",arguments:[{label:"self",type:"file"},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","Error: name cannot exceed the limit of 128 characters.","!PlayerUtils.RenameFichero",0],returns:["string","number"]},path:{type:"function",arguments:[{label:"self",type:"file"},{label:"symlinkOrigPath",type:"number",default:{type:"number",value:0}}],returns:["string","null"]},is_folder:{type:"function",arguments:[{label:"self",type:"file"}],returnVariations:[1,0],returns:["number","null"]},parent:{type:"function",arguments:[{label:"self",type:"file"}],returns:["file","null"]},name:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},allow_import:{type:"function",arguments:[{label:"self",type:"file"}],returns:["number","null"]},get_content:{type:"function",arguments:[{label:"self",type:"file"}],returnVariations:["Error: can't find the computer of this file","can't open ${filepath}. Binary file."],returns:["string","null"]},set_content:{type:"function",arguments:[{label:"self",type:"file"},{label:"content",type:"string",default:{type:"string",value:""}}],returnVariations:["I can't save the file. The maximum of 160,000 characters has been exceeded.","set_content: unable to use this method in encryption configuration","can't open ${filepath}. Binary file.",1,0],returns:["string","number","null"]},is_binary:{type:"function",arguments:[{label:"self",type:"file"}],returnVariations:[1,0],returns:["number","null"]},is_symlink:{type:"function",arguments:[{label:"self",type:"file"}],returnVariations:[1,0],returns:["number","null"]},has_permission:{type:"function",arguments:[{label:"self",type:"file"},{label:"perms",type:"string",default:{type:"string",value:""}}],returnVariations:[1,0],returns:["number","null"]},delete:{type:"function",arguments:[{label:"self",type:"file"}],returnVariations:["!PlayerUtils.RemoveFile"],returns:["string","null"]},get_folders:{type:"function",arguments:[{label:"self",type:"file"}],returns:[{type:"list",valueType:"file"},"null"]},get_files:{type:"function",arguments:[{label:"self",type:"file"}],returns:[{type:"list",valueType:"file"},"null"]},permissions:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},owner:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},set_owner:{type:"function",arguments:[{label:"self",type:"file"},{label:"owner",type:"string",default:{type:"string",value:""}},{label:"recursive",type:"number",default:{type:"number",value:0}}],returnVariations:["Permission denied"],returns:["string","null"]},group:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},set_group:{type:"function",arguments:[{label:"self",type:"file"},{label:"group",type:"string",default:{type:"string",value:""}},{label:"recursive",type:"number",default:{type:"number",value:0}}],returnVariations:["Permission denied"],returns:["string","null"]},size:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},load:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"path",type:"string"}],returns:["metaLib","null"]},net_use:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"ip",type:"string"},{label:"port",type:"number",default:{type:"number",value:0}}],returns:["netSession","null"]},rshell_client:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"ip",type:"string"},{label:"port",type:"number",default:{type:"number",value:1222}},{label:"processName",type:"string",default:{type:"string",value:"rshell_client"}}],returnVariations:["rshell_client: Invalid IP address","Error: only alphanumeric allowed as proccess name.","Error: proccess name cannot exceed the limit of 28 characters.","Error: ${programName} is a reserved process name","rshell_client: IP address not found: ${ip}","rshell_client: unable to find remote server at port ${port}","!Networking.CheckServiceOnline",1],returns:["string","number","null"]},rshell_server:{type:"function",arguments:[{label:"self",type:"metaxploit"}],returnVariations:["rshell_server: No internet connection","rshell_server: The service cannot be started on this network.","error: service rshelld is not running","error: rshell portforward is not configured correctly"],returns:["string",{type:"list",valueType:"shell"},"null"]},scan:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"metaLib",type:"metaLib"}],returns:[{type:"list",valueType:"string"},"null"]},scan_address:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"metaLib",type:"metaLib"},{label:"memoryAddress",type:"string"}],returns:["string","null"]},sniffer:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"saveEncSource",type:"number",default:{type:"number",value:0}}],returns:["string","null"]},overflow:{type:"function",arguments:[{label:"self",type:"metaLib"},{label:"memoryAddress",type:"string"},{label:"unsecZone",type:"string"},{label:"optArgs",type:"string",default:{type:"string",value:""}}],returnVariations:["Exploit failed: the remote server has been temporarily disabled due to non-payment",0,1],returns:["string","number","shell","computer","file","null"]},version:{type:"function",arguments:[{label:"self",type:"metaLib"}],returns:["string","null"]},lib_name:{type:"function",arguments:[{label:"self",type:"metaLib"}],returns:["string","null"]},debug_tools:{type:"function",arguments:[{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Error: The file must be a library","Error: Incorrect password"],returns:["string","debugLibrary","null"]},payload:{type:"function",arguments:[{label:"memZone",type:"string"},{label:"pathFile",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: The file must be a library","Error: The library is patched against this vulnerability.","Failed: No vulnerabilities have been found in the specified memory area.","Error acquiring partial object file. Unable to access to resource: ${pathFile}"],returns:["string",{type:"list",valueType:"map"},"null"]},dump_lib:{type:"function",arguments:[{label:"self",type:"netSession"}],returns:["metaLib","null"]},get_num_conn_gateway:{type:"function",arguments:[{label:"self",type:"netSession"}],returns:["number","null"]},get_num_portforward:{type:"function",arguments:[{label:"self",type:"netSession"}],returns:["number","null"]},get_num_users:{type:"function",arguments:[{label:"self",type:"netSession"}],returns:["number","null"]},is_any_active_user:{type:"function",arguments:[{label:"self",type:"netSession"}],returnVariations:[0,1],returns:["number","null"]},is_root_active_user:{type:"function",arguments:[{label:"self",type:"netSession"}],returnVariations:[0,1],returns:["number","null"]},device_ports:{type:"function",arguments:[{label:"self",type:"router"},{label:"ip",type:"string"}],returnVariations:["device_ports: ${ip} is unreachable"],returns:["string",{type:"list",valueType:"port"},"null"]},devices_lan_ip:{type:"function",arguments:[{label:"self",type:"router"}],returns:[{type:"list",valueType:"string"},"null"]},bssid_name:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},essid_name:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},firewall_rules:{type:"function",arguments:[{label:"self",type:"router"}],returns:[{type:"list",valueType:"string"},"null"]},kernel_version:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},local_ip:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},public_ip:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},used_ports:{type:"function",arguments:[{label:"self",type:"router"}],returns:[{type:"list",valueType:"port"},"null"]},ping_port:{type:"function",arguments:[{label:"self",type:"router"},{label:"port",type:"number"}],returns:["port","null"]},port_info:{type:"function",arguments:[{label:"self",type:"router"},{label:"port",type:"port"}],returns:["string","null"]},install_service:{type:"function",arguments:[{label:"self",type:"service"}],returnVariations:["Denied. Only root user can install this service.",1],returns:["number","string","null"]},start_service:{type:"function",arguments:[{label:"self",type:"service"}],returnVariations:["Denied. Only root user can install this service.","<color=yellow>${reason} The chat service can't be accessed.</color>",1],returns:["number","string","null"]},stop_service:{type:"function",arguments:[{label:"self",type:"service"}],returnVariations:["Denied. Only root user can install this service.",1,0],returns:["number","string","null"]},host_computer:{type:"function",arguments:[{label:"self",type:"shell"}],returns:["computer","null"]},start_terminal:{type:"function",arguments:[{label:"self",type:"shell"}],returns:["null"]},build:{type:"function",arguments:[{label:"self",type:"shell"},{label:"pathSource",type:"string"},{label:"pathBinary",type:"string"},{label:"allowImport",type:"number",default:{type:"number",value:0}}],returnVariations:["pathSource and programName can't be empty","Invalid shell","Unknown error: Unable to access to local computer","Can't find ${pathSource}","Can't find ${pathBinary}","Can't access to ${pathSource}. Permission denied.","Can't build ${pathSource}. Binary file","Can't create binary in ${pathBinary}. Permission denied.","Can't build ${pathSource}. Invalid extension.","Can't compile. Source code is empty"],returns:["string"]},connect_service:{type:"function",arguments:[{label:"self",type:"shell"},{label:"ip",type:"string"},{label:"port",type:"number"},{label:"user",type:"string"},{label:"password",type:"string"},{label:"service",type:"string",default:{type:"string",value:"ssh"}}],returnVariations:["Unknown error: Unable to access to local computer","Direct connections cannot be made outside of this network","!PlayerUtils.ConnectToService","!PlayerUtils.ConnectComputer","!Networking.CheckServiceOnline"],returns:["shell","ftpShell","string","null"]},launch:{type:"function",arguments:[{label:"self",type:"shell"},{label:"program",type:"string"},{label:"params",type:"string",default:{type:"string",value:""}}],returns:["string","number"]},ping:{type:"function",arguments:[{label:"self",type:"shell"},{label:"ip",type:"string"}],returnVariations:["ping: invalid ip address",1,0],returns:["string","number","null"]},scp:{type:"function",arguments:[{label:"self",type:"shell"},{label:"sourceFile",type:"string"},{label:"destinationFolder",type:"string"},{label:"remoteShell",type:"shell"}],returnVariations:["${sourceFile} not found","${destinationFolder} not found","${destinationFolder} it's not a folder","!GreyInterpreter.CheckScpUpload",1],returns:["number","string","null"]},get_balance_subwallet:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["get_balance: The account does not exist.","Unknown error: Unable to access to local computer","No internet access."],returns:["number","string","null"]},set_info:{type:"function",arguments:[{label:"self",type:"subWallet"},{label:"info",type:"string"}],returnVariations:["Error: exceeded maximum of 256 characters","Unknown error: Unable to access to local computer","No internet access.","!BlockchainSystem.SetInfoSubWallet",1],returns:["number","string","null"]},get_info:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","!BlockchainSystem.GetInfoSubWallet"],returns:["string","null"]},delete_subwallet:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.",1,0],returns:["string","number","null"]},get_user:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","null"]},last_transaction:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.",0],returns:[{type:"list",valueType:"list"},"number","string","null"]},mining:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","all existing coins of ${coinName} have been mined.","Only one mining process is allowed.","Error: GPU is damaged. Unable to start the mining process.","Error: GPU returned corrupted data while performing floating point tests. Unable to start the mining process.","Hardware error",1],returns:["number","string","null"]},check_password:{type:"function",arguments:[{label:"self",type:"subWallet"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","login_subwallet: the account does not exist.",1,0],returns:["number","string","null"]},wallet_username:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","null"]},list_coins:{type:"function",arguments:[{label:"self",type:"wallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","Error: wallet does not exist/incorrect credentials."],returns:[{type:"list",valueType:"string"},"string","null"]},get_balance:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","Error: wallet does not exist/incorrect credentials.","get_balance: wallet does not have coins in the selected currency"],returns:["number","string","null"]},buy_coin:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"},{label:"coinAmount",type:"number"},{label:"unitPrice",type:"number"},{label:"subwalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","sell_coin: coin amount and proposed price cannot be 0.","!BlockchainSystem.BuyCoin",1],returns:["number","string"]},sell_coin:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"},{label:"coinAmount",type:"number"},{label:"unitPrice",type:"number"},{label:"subwalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","sell_coin: coin amount and proposed price cannot be 0.","!BlockchainSystem.SellCoin",1],returns:["number","string"]},get_pending_trade:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","No pending trades found"],returns:["string","list","null"]},cancel_pending_trade:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","No pending trades found"],returns:["string","null"]},get_global_offers:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string",{type:"map",keyType:"string",valueType:"list"},"null"]},list_global_coins:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string",{type:"list",valueType:"string"},"null"]},show_nodes:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","show_nodes: wallet does not exist","show_nodes: coin does not exist"],returns:["string","number","null"]},reset_password:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"newPassword",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","reset_password: only alphanumeric characters are allowed as password","reset_password: name and password cannot exceed the 16 character limit.","!BlockchainSystem.ResetWalletPass",1],returns:["number","string","null"]},get_pin:{type:"function",arguments:[{label:"self",type:"wallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","null"]},delete_mail:{type:"function",arguments:[{label:"self",type:"metaMail"},{label:"mailId",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","read: No internet access.",1],returns:["number","string","null"]},fetch:{type:"function",arguments:[{label:"self",type:"metaMail"}],returnVariations:["Unknown error: Unable to access to local computer","fetch: No internet access."],returns:[{type:"list",valueType:"string"},"string","null"]},read:{type:"function",arguments:[{label:"self",type:"metaMail"},{label:"mailId",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","fetch: No internet access.","Mail not found"],returns:["string","null"]},send:{type:"function",arguments:[{label:"self",type:"metaMail"},{label:"emailAddress",type:"string"},{label:"subject",type:"string"},{label:"message",type:"string"}],returnVariations:["The mail could not be sent. Wait a moment before sending another email.","Unknown error: Unable to access to local computer","read: No internet access.","read: No email account registered","!PlayerUtils.SendMail","!Database.GetMailAccount","Mail not delivered",1],returns:["string","number","null"]},port_number:{type:"function",arguments:[{label:"self",type:"port"}],returns:["number","null"]},is_closed:{type:"function",arguments:[{label:"self",type:"port"}],returnVariations:[0,1],returns:["number","null"]},get_lan_ip:{type:"function",arguments:[{label:"self",type:"port"}],returns:["string","null"]},reset_ctf_password:{type:"function",arguments:[{label:"newPassword",type:"string"}],returnVariations:["reset_ctf_password: password cannot be null","reset_ctf_password: password can't exceed the maximum limit of 32 characters","reset_ctf_password: password must be alphanumeric","reset_ctf_password: you do not have a registered CTF account",1],returns:["number","string"]},funcRef:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]},list:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]},map:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]},number:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]},string:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]},scan_debuglib:{type:"function",arguments:[{label:"self",type:"debugLibrary"}],returnVariations:["error: file not found","No potential issues have been found",`Potential problems have been found in the following code:
210
210
 
211
211
  \${callengeDescription}`],returns:["string","null"]},apply_patch:{type:"function",arguments:[{label:"self",type:"debugLibrary"},{label:"path",type:"string"}],returnVariations:["error: file not found","error: The file to apply the patch cannot be binary","error: The patch code is not correct.","The patch had already been applied.","The patch has been applied correctly."],returns:["string","null"]},unit_testing:{type:"function",arguments:[{label:"self",type:"debugLibrary"},{label:"errorLines",type:{type:"list",valueType:"number"}}],returnVariations:["error: file not found","Test failed: No potential issues have been found",`Starting testing in selected lines...
212
212
  \${methods}
213
213
 
214
- New vulnerability found: \${vulnerability}`,"Test failed: No errors have been found in one or more of the provided lines, or not all lines with errors have been provided."],returns:["string","null"]},camera_link_system:{type:"function",arguments:[{label:"self",type:"trafficNet"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: This device is not registered on any police network",1],returns:["number","string","null"]},locate_vehicle:{type:"function",arguments:[{label:"self",type:"trafficNet"},{label:"licensePlate",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: This device is not registered on any police network","locate_vehicle: License plate not found.","The vehicle could not be located in the camera system at this time.",1],returns:["number","string","null"]},next_camera:{type:"function",arguments:[{label:"self",type:"trafficNet"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: This device is not registered on any police network",1],returns:["number","string","null"]},prev_camera:{type:"function",arguments:[{label:"self",type:"trafficNet"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: This device is not registered on any police network",1],returns:["number","string","null"]},traffic_light_config:{type:"function",arguments:[{label:"self",type:"trafficNet"}],returnVariations:["Feature currently in development"],returns:["string"]},model:{type:"function",arguments:[{label:"self",type:"smartAppliance"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: Device hardware malfunction"],returns:["string","null"]},override_settings:{type:"function",arguments:[{label:"self",type:"smartAppliance"},{label:"power",type:"number"},{label:"temperature",type:"number"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: Device hardware malfunction","override_settings: denied: The settings are locked for security reasons.",1],returns:["string","number","null"]},set_alarm:{type:"function",arguments:[{label:"self",type:"smartAppliance"},{label:"enable",type:"number"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: Device hardware malfunction","set_alarm: denied: The alarm settings are locked for security reasons.",1],returns:["string","number","null"]}}}});var B1=S((G4,lN)=>{lN.exports={type:"list",definitions:{remove:{type:"function",arguments:[{label:"index",type:"number"}],returns:["null"]},insert:{type:"function",arguments:[{label:"index",type:"number"},{label:"value",type:"any"}],returns:["list"]},push:{type:"function",arguments:[{label:"value",type:"any"}],returns:["list"]},pop:{type:"function",returns:["any"]},pull:{type:"function",returns:["any"]},shuffle:{type:"function",returns:["null"]},reverse:{type:"function",returns:["null"]},sum:{type:"function",returns:["number"]},hasIndex:{type:"function",arguments:[{label:"index",type:"number"}],returnVariations:[0,1],returns:["number"]},indexOf:{type:"function",arguments:[{label:"value",type:"any"},{label:"offset",type:"number",opt:!0}],returns:["number","null"]},sort:{type:"function",arguments:[{label:"key",type:"any"},{label:"ascending",type:"number",default:{type:"number",value:1}}],returns:["list"]},join:{type:"function",arguments:[{label:"delimiter",type:"string"}],returns:["string"]},indexes:{type:"function",returns:[{type:"list",valueType:"number"}]},len:{type:"function",returns:["number"]},values:{type:"function",returns:["list"]},replace:{type:"function",arguments:[{label:"oldVal",type:"any"},{label:"newVal",type:"any"},{label:"maxCount",type:"number",opt:!0}],returns:["list"]}}}});var W1=S((K4,uN)=>{uN.exports={type:"map",definitions:{remove:{type:"function",arguments:[{label:"key",type:"string"}],returnVariations:[0,1],returns:["number"]},push:{type:"function",arguments:[{label:"key",type:"any"}],returns:["map"]},pull:{type:"function",returns:["any"]},pop:{type:"function",returns:["any"]},shuffle:{type:"function",returns:["null"]},sum:{type:"function",returns:["number"]},hasIndex:{type:"function",arguments:[{label:"key",type:"any"}],returnVariations:[0,1],returns:["number"]},indexOf:{type:"function",arguments:[{label:"value",type:"any"}],returns:["any"]},indexes:{type:"function",returns:["list"]},len:{type:"function",returns:["number"]},values:{type:"function",returns:["list"]},replace:{type:"function",arguments:[{label:"oldVal",type:"any"},{label:"newVal",type:"any"},{label:"maxCount",type:"number",opt:!0}],returns:["map"]}}}});var V1=S((Y4,cN)=>{cN.exports={type:"metaLib",extends:"map",definitions:{overflow:{type:"function",arguments:[{label:"memoryAddress",type:"string"},{label:"unsecZone",type:"string"},{label:"optArgs",type:"string",default:{type:"string",value:""}}],returnVariations:["Exploit failed: the remote server has been temporarily disabled due to non-payment",0,1],returns:["string","number","shell","computer","file","null"]},version:{type:"function",returns:["string"]},lib_name:{type:"function",returns:["string"]},debug_tools:{type:"function",arguments:[{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Error: The file must be a library","Error: Incorrect password"],returns:["string","debugLibrary","null"]},payload:{type:"function",arguments:[{label:"memZone",type:"string"},{label:"pathFile",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: The file must be a library","Error: The library is patched against this vulnerability.","Failed: No vulnerabilities have been found in the specified memory area.","Error acquiring partial object file. Unable to access to resource: ${pathFile}"],returns:["string",{type:"list",valueType:"map"},"null"]}}}});var H1=S((Q4,pN)=>{pN.exports={type:"metaMail",extends:"map",definitions:{delete:{type:"function",arguments:[{label:"mailId",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","read: No internet access.",1],returns:["number","string","null"]},fetch:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","fetch: No internet access."],returns:[{type:"list",valueType:"string"},"string"]},read:{type:"function",arguments:[{label:"mailId",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","fetch: No internet access.","Mail not found"],returns:["string","null"]},send:{type:"function",arguments:[{label:"emailAddress",type:"string"},{label:"subject",type:"string"},{label:"message",type:"string"}],returnVariations:["The mail could not be sent. Wait a moment before sending another email.","Unknown error: Unable to access to local computer","read: No internet access.","read: No email account registered","!PlayerUtils.SendMail","!Database.GetMailAccount","Mail not delivered",1],returns:["string","number","null"]}}}});var z1=S((J4,dN)=>{dN.exports={type:"metaxploit",extends:"map",definitions:{load:{type:"function",arguments:[{label:"path",type:"string"}],returns:["metaLib","null"]},net_use:{type:"function",arguments:[{label:"ip",type:"string"},{label:"port",type:"number",default:{type:"number",value:0}}],returns:["netSession","null"]},rshell_client:{type:"function",arguments:[{label:"ip",type:"string"},{label:"port",type:"number",default:{type:"number",value:1222}},{label:"processName",type:"string",default:{type:"string",value:"rshell_client"}}],returnVariations:["rshell_client: Invalid IP address","Error: only alphanumeric allowed as proccess name.","Error: proccess name cannot exceed the limit of 28 characters.","Error: ${programName} is a reserved process name","rshell_client: IP address not found: ${ip}","rshell_client: unable to find remote server at port ${port}","!Networking.CheckServiceOnline",1],returns:["string","number","null"]},rshell_server:{type:"function",returnVariations:["rshell_server: No internet connection","rshell_server: The service cannot be started on this network.","error: service rshelld is not running","error: rshell portforward is not configured correctly"],returns:["string",{type:"list",valueType:"shell"}]},scan:{type:"function",arguments:[{label:"metaLib",type:"metaLib"}],returns:[{type:"list",valueType:"string"},"null"]},scan_address:{type:"function",arguments:[{label:"metaLib",type:"metaLib"},{label:"memoryAddress",type:"string"}],returns:["string","null"]},sniffer:{type:"function",arguments:[{label:"saveEncSource",type:"number",default:{type:"number",value:0}}],returns:["string","null"]}}}});var G1=S((Z4,hN)=>{hN.exports={type:"netSession",extends:"map",definitions:{dump_lib:{type:"function",returns:["metaLib"]},get_num_conn_gateway:{type:"function",returns:["number"]},get_num_portforward:{type:"function",returns:["number"]},get_num_users:{type:"function",returns:["number"]},is_any_active_user:{type:"function",returnVariations:[0,1],returns:["number"]},is_root_active_user:{type:"function",returnVariations:[0,1],returns:["number"]}}}});var K1=S((X4,fN)=>{fN.exports={type:"number",definitions:{}}});var Y1=S((eV,mN)=>{mN.exports={type:"port",extends:"map",definitions:{port_number:{type:"function",returns:["number"]},is_closed:{type:"function",returnVariations:[0,1],returns:["number"]},get_lan_ip:{type:"function",returns:["string"]}}}});var Q1=S((tV,gN)=>{gN.exports={type:"router",extends:"map",definitions:{device_ports:{type:"function",arguments:[{label:"ip",type:"string"}],returns:["string",{type:"list",valueType:"port"},"null"]},devices_lan_ip:{type:"function",returns:[{type:"list",valueType:"string"}]},bssid_name:{type:"function",returns:["string"]},essid_name:{type:"function",returns:["string"]},firewall_rules:{type:"function",returns:[{type:"list",valueType:"string"}]},kernel_version:{type:"function",returns:["string"]},local_ip:{type:"function",returns:["string"]},public_ip:{type:"function",returns:["string"]},used_ports:{type:"function",returns:[{type:"list",valueType:"port"}]},ping_port:{type:"function",arguments:[{label:"port",type:"number"}],returns:["port","null"]},port_info:{type:"function",arguments:[{label:"port",type:"port"}],returns:["string","null"]}}}});var J1=S((nV,yN)=>{yN.exports={type:"service",extends:"map",definitions:{install_service:{type:"function",returnVariations:["Denied. Only root user can install this service.",1],returns:["number","string"]},start_service:{type:"function",returnVariations:["Denied. Only root user can install this service.","<color=yellow>${reason} The chat service can't be accessed.</color>",1],returns:["number","string"]},stop_service:{type:"function",returnVariations:["Denied. Only root user can install this service.",1,0],returns:["number","string"]}}}});var Z1=S((rV,bN)=>{bN.exports={type:"shell",extends:"map",definitions:{host_computer:{type:"function",returns:["computer"]},start_terminal:{type:"function",returns:["null"]},build:{type:"function",arguments:[{label:"pathSource",type:"string"},{label:"pathBinary",type:"string"},{label:"allowImport",type:"number",default:{type:"number",value:0}}],returnVariations:["pathSource and programName can't be empty","Invalid shell","Unknown error: Unable to access to local computer","Can't find ${pathSource}","Can't find ${pathBinary}","Can't access to ${pathSource}. Permission denied.","Can't build ${pathSource}. Binary file","Can't create binary in ${pathBinary}. Permission denied.","Can't build ${pathSource}. Invalid extension.","Can't compile. Source code is empty"],returns:["string"]},connect_service:{type:"function",arguments:[{label:"ip",type:"string"},{label:"port",type:"number"},{label:"user",type:"string"},{label:"password",type:"string"},{label:"service",type:"string",default:{type:"string",value:"ssh"}}],returnVariations:["Unknown error: Unable to access to local computer","Direct connections cannot be made outside of this network","!PlayerUtils.ConnectToService","!PlayerUtils.ConnectComputer","!Networking.CheckServiceOnline"],returns:["shell","ftpShell","string","null"]},launch:{type:"function",arguments:[{label:"program",type:"string"},{label:"params",type:"string",default:{type:"string",value:""}}],returnVariations:["Invalid shell","Can't find computer",1,0],returns:["string","number"]},ping:{type:"function",arguments:[{label:"ip",type:"string"}],returnVariations:["ping: invalid ip address",1,0],returns:["string","number"]},scp:{type:"function",arguments:[{label:"file",type:"string"},{label:"folder",type:"string"},{label:"remoteShell",type:"shell"}],returnVariations:["${sourceFile} not found","${destinationFolder} not found","${destinationFolder} it's not a folder","!GreyInterpreter.CheckScpUpload",1],returns:["number","string","null"]}}}});var X1=S((iV,vN)=>{vN.exports={type:"string",definitions:{remove:{type:"function",arguments:[{label:"value",type:"string"}],returns:["string"]},hasIndex:{type:"function",arguments:[{label:"index",type:"number"}],returnVariations:[0,1],returns:["number"]},insert:{type:"function",arguments:[{label:"index",type:"number"},{label:"value",type:"string"}],returns:["string"]},indexOf:{type:"function",arguments:[{label:"value",type:"string"},{label:"offset",type:"number",opt:!0}],returns:["number","null"]},lastIndexOf:{type:"function",arguments:[{label:"searchStr",type:"string"}],returns:["number"]},split:{type:"function",arguments:[{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:[{type:"list",valueType:"string"},"null"]},replace:{type:"function",arguments:[{label:"pattern",type:"string"},{label:"newValue",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:["string"]},trim:{type:"function",returns:["string"]},indexes:{type:"function",returns:[{type:"list",valueType:"number"}]},code:{type:"function",returns:["number"]},len:{type:"function",returns:["number"]},lower:{type:"function",returns:["string"]},upper:{type:"function",returns:["string"]},val:{type:"function",returns:["number"]},values:{type:"function",returns:[{type:"list",valueType:"string"}]},to_int:{type:"function",returns:["string","number"]},is_match:{type:"function",arguments:[{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returnVariations:[1,0],returns:["number"]},matches:{type:"function",arguments:[{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:[{type:"map",keyType:"number",valueType:"string"}]}}}});var eI=S((sV,_N)=>{_N.exports={type:"subWallet",extends:"map",definitions:{get_balance:{type:"function",returnVariations:["get_balance: The account does not exist.","Unknown error: Unable to access to local computer","No internet access."],returns:["number","string"]},set_info:{type:"function",arguments:[{label:"info",type:"string"}],returnVariations:["Error: exceeded maximum of 256 characters","Unknown error: Unable to access to local computer","No internet access.","!BlockchainSystem.SetInfoSubWallet",1],returns:["number","string"]},get_info:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.","!BlockchainSystem.GetInfoSubWallet"],returns:["string"]},delete:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.",1,0],returns:["string","number"]},get_user:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string"]},last_transaction:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.",0],returns:["list","number","string"]},mining:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.","all existing coins of ${coinName} have been mined.","Only one mining process is allowed.","Error: GPU is damaged. Unable to start the mining process.","Error: GPU returned corrupted data while performing floating point tests. Unable to start the mining process.","Hardware error",1],returns:["number","string"]},check_password:{type:"function",arguments:[{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","login_subwallet: the account does not exist.",1,0],returns:["number","string"]},wallet_username:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string"]}}}});var tI=S((oV,wN)=>{wN.exports={type:"wallet",extends:"map",definitions:{list_coins:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.","Error: wallet does not exist/incorrect credentials."],returns:[{type:"list",valueType:"string"},"string"]},get_balance:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","Error: wallet does not exist/incorrect credentials.","get_balance: wallet does not have coins in the selected currency"],returns:["number","string","null"]},buy_coin:{type:"function",arguments:[{label:"coinName",type:"string"},{label:"coinAmount",type:"number"},{label:"unitPrice",type:"number"},{label:"subwalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","sell_coin: coin amount and proposed price cannot be 0.",1],returns:["number","string"]},sell_coin:{type:"function",arguments:[{label:"coinName",type:"string"},{label:"coinAmount",type:"number"},{label:"unitPrice",type:"number"},{label:"subwalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","sell_coin: coin amount and proposed price cannot be 0.",1],returns:["number","string"]},get_pending_trade:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","list","null"]},cancel_pending_trade:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","null"]},get_global_offers:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string",{type:"map",keyType:"string",valueType:"list"},"null"]},list_global_coins:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string",{type:"list",valueType:"string"}]},show_nodes:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","show_nodes: wallet does not exist","show_nodes: coin does not exist"],returns:["string","number","null"]},reset_password:{type:"function",arguments:[{label:"newPassword",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","reset_password: only alphanumeric characters are allowed as password","reset_password: name and password cannot exceed the 16 character limit.","!BlockchainSystem.ResetWalletPass",1],returns:["number","string","null"]},get_pin:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string"]}}}});var nI=S((aV,xN)=>{xN.exports={type:"debugLibrary",extends:"map",definitions:{scan:{type:"function",returnVariations:["error: file not found","No potential issues have been found",`Potential problems have been found in the following code:
214
+ New vulnerability found: \${vulnerability}`,"Test failed: No errors have been found in one or more of the provided lines, or not all lines with errors have been provided."],returns:["string","null"]},camera_link_system:{type:"function",arguments:[{label:"self",type:"trafficNet"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: This device is not registered on any police network",1],returns:["number","string","null"]},locate_vehicle:{type:"function",arguments:[{label:"self",type:"trafficNet"},{label:"licensePlate",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: This device is not registered on any police network","locate_vehicle: License plate not found.","The vehicle could not be located in the camera system at this time.",1],returns:["number","string","null"]},next_camera:{type:"function",arguments:[{label:"self",type:"trafficNet"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: This device is not registered on any police network",1],returns:["number","string","null"]},prev_camera:{type:"function",arguments:[{label:"self",type:"trafficNet"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: This device is not registered on any police network",1],returns:["number","string","null"]},traffic_light_config:{type:"function",arguments:[{label:"self",type:"trafficNet"}],returnVariations:["Feature currently in development"],returns:["string"]},model:{type:"function",arguments:[{label:"self",type:"smartAppliance"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: Device hardware malfunction"],returns:["string","null"]},override_settings:{type:"function",arguments:[{label:"self",type:"smartAppliance"},{label:"power",type:"number"},{label:"temperature",type:"number"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: Device hardware malfunction","override_settings: denied: The settings are locked for security reasons.",1],returns:["string","number","null"]},set_alarm:{type:"function",arguments:[{label:"self",type:"smartAppliance"},{label:"enable",type:"number"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: Device hardware malfunction","set_alarm: denied: The alarm settings are locked for security reasons.",1],returns:["string","number","null"]}}}});var B1=S((KV,uN)=>{uN.exports={type:"list",definitions:{remove:{type:"function",arguments:[{label:"index",type:"number"}],returns:["null"]},insert:{type:"function",arguments:[{label:"index",type:"number"},{label:"value",type:"any"}],returns:["list"]},push:{type:"function",arguments:[{label:"value",type:"any"}],returns:["list"]},pop:{type:"function",returns:["any"]},pull:{type:"function",returns:["any"]},shuffle:{type:"function",returns:["null"]},reverse:{type:"function",returns:["null"]},sum:{type:"function",returns:["number"]},hasIndex:{type:"function",arguments:[{label:"index",type:"number"}],returnVariations:[0,1],returns:["number"]},indexOf:{type:"function",arguments:[{label:"value",type:"any"},{label:"offset",type:"number",opt:!0}],returns:["number","null"]},sort:{type:"function",arguments:[{label:"key",type:"any"},{label:"ascending",type:"number",default:{type:"number",value:1}}],returns:["list"]},join:{type:"function",arguments:[{label:"delimiter",type:"string"}],returns:["string"]},indexes:{type:"function",returns:[{type:"list",valueType:"number"}]},len:{type:"function",returns:["number"]},values:{type:"function",returns:["list"]},replace:{type:"function",arguments:[{label:"oldVal",type:"any"},{label:"newVal",type:"any"},{label:"maxCount",type:"number",opt:!0}],returns:["list"]}}}});var W1=S((YV,cN)=>{cN.exports={type:"map",definitions:{remove:{type:"function",arguments:[{label:"key",type:"string"}],returnVariations:[0,1],returns:["number"]},push:{type:"function",arguments:[{label:"key",type:"any"}],returns:["map"]},pull:{type:"function",returns:["any"]},pop:{type:"function",returns:["any"]},shuffle:{type:"function",returns:["null"]},sum:{type:"function",returns:["number"]},hasIndex:{type:"function",arguments:[{label:"key",type:"any"}],returnVariations:[0,1],returns:["number"]},indexOf:{type:"function",arguments:[{label:"value",type:"any"}],returns:["any"]},indexes:{type:"function",returns:["list"]},len:{type:"function",returns:["number"]},values:{type:"function",returns:["list"]},replace:{type:"function",arguments:[{label:"oldVal",type:"any"},{label:"newVal",type:"any"},{label:"maxCount",type:"number",opt:!0}],returns:["map"]}}}});var V1=S((QV,pN)=>{pN.exports={type:"metaLib",extends:"map",definitions:{overflow:{type:"function",arguments:[{label:"memoryAddress",type:"string"},{label:"unsecZone",type:"string"},{label:"optArgs",type:"string",default:{type:"string",value:""}}],returnVariations:["Exploit failed: the remote server has been temporarily disabled due to non-payment",0,1],returns:["string","number","shell","computer","file","null"]},version:{type:"function",returns:["string"]},lib_name:{type:"function",returns:["string"]},debug_tools:{type:"function",arguments:[{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Error: The file must be a library","Error: Incorrect password"],returns:["string","debugLibrary","null"]},payload:{type:"function",arguments:[{label:"memZone",type:"string"},{label:"pathFile",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: The file must be a library","Error: The library is patched against this vulnerability.","Failed: No vulnerabilities have been found in the specified memory area.","Error acquiring partial object file. Unable to access to resource: ${pathFile}"],returns:["string",{type:"list",valueType:"map"},"null"]}}}});var H1=S((JV,dN)=>{dN.exports={type:"metaMail",extends:"map",definitions:{delete:{type:"function",arguments:[{label:"mailId",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","read: No internet access.",1],returns:["number","string","null"]},fetch:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","fetch: No internet access."],returns:[{type:"list",valueType:"string"},"string"]},read:{type:"function",arguments:[{label:"mailId",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","fetch: No internet access.","Mail not found"],returns:["string","null"]},send:{type:"function",arguments:[{label:"emailAddress",type:"string"},{label:"subject",type:"string"},{label:"message",type:"string"}],returnVariations:["The mail could not be sent. Wait a moment before sending another email.","Unknown error: Unable to access to local computer","read: No internet access.","read: No email account registered","!PlayerUtils.SendMail","!Database.GetMailAccount","Mail not delivered",1],returns:["string","number","null"]}}}});var z1=S((ZV,hN)=>{hN.exports={type:"metaxploit",extends:"map",definitions:{load:{type:"function",arguments:[{label:"path",type:"string"}],returns:["metaLib","null"]},net_use:{type:"function",arguments:[{label:"ip",type:"string"},{label:"port",type:"number",default:{type:"number",value:0}}],returns:["netSession","null"]},rshell_client:{type:"function",arguments:[{label:"ip",type:"string"},{label:"port",type:"number",default:{type:"number",value:1222}},{label:"processName",type:"string",default:{type:"string",value:"rshell_client"}}],returnVariations:["rshell_client: Invalid IP address","Error: only alphanumeric allowed as proccess name.","Error: proccess name cannot exceed the limit of 28 characters.","Error: ${programName} is a reserved process name","rshell_client: IP address not found: ${ip}","rshell_client: unable to find remote server at port ${port}","!Networking.CheckServiceOnline",1],returns:["string","number","null"]},rshell_server:{type:"function",returnVariations:["rshell_server: No internet connection","rshell_server: The service cannot be started on this network.","error: service rshelld is not running","error: rshell portforward is not configured correctly"],returns:["string",{type:"list",valueType:"shell"}]},scan:{type:"function",arguments:[{label:"metaLib",type:"metaLib"}],returns:[{type:"list",valueType:"string"},"null"]},scan_address:{type:"function",arguments:[{label:"metaLib",type:"metaLib"},{label:"memoryAddress",type:"string"}],returns:["string","null"]},sniffer:{type:"function",arguments:[{label:"saveEncSource",type:"number",default:{type:"number",value:0}}],returns:["string","null"]}}}});var G1=S((XV,fN)=>{fN.exports={type:"netSession",extends:"map",definitions:{dump_lib:{type:"function",returns:["metaLib"]},get_num_conn_gateway:{type:"function",returns:["number"]},get_num_portforward:{type:"function",returns:["number"]},get_num_users:{type:"function",returns:["number"]},is_any_active_user:{type:"function",returnVariations:[0,1],returns:["number"]},is_root_active_user:{type:"function",returnVariations:[0,1],returns:["number"]}}}});var K1=S((e4,mN)=>{mN.exports={type:"number",definitions:{}}});var Y1=S((t4,gN)=>{gN.exports={type:"port",extends:"map",definitions:{port_number:{type:"function",returns:["number"]},is_closed:{type:"function",returnVariations:[0,1],returns:["number"]},get_lan_ip:{type:"function",returns:["string"]}}}});var Q1=S((n4,yN)=>{yN.exports={type:"router",extends:"map",definitions:{device_ports:{type:"function",arguments:[{label:"ip",type:"string"}],returns:["string",{type:"list",valueType:"port"},"null"]},devices_lan_ip:{type:"function",returns:[{type:"list",valueType:"string"}]},bssid_name:{type:"function",returns:["string"]},essid_name:{type:"function",returns:["string"]},firewall_rules:{type:"function",returns:[{type:"list",valueType:"string"}]},kernel_version:{type:"function",returns:["string"]},local_ip:{type:"function",returns:["string"]},public_ip:{type:"function",returns:["string"]},used_ports:{type:"function",returns:[{type:"list",valueType:"port"}]},ping_port:{type:"function",arguments:[{label:"port",type:"number"}],returns:["port","null"]},port_info:{type:"function",arguments:[{label:"port",type:"port"}],returns:["string","null"]}}}});var J1=S((r4,bN)=>{bN.exports={type:"service",extends:"map",definitions:{install_service:{type:"function",returnVariations:["Denied. Only root user can install this service.",1],returns:["number","string"]},start_service:{type:"function",returnVariations:["Denied. Only root user can install this service.","<color=yellow>${reason} The chat service can't be accessed.</color>",1],returns:["number","string"]},stop_service:{type:"function",returnVariations:["Denied. Only root user can install this service.",1,0],returns:["number","string"]}}}});var Z1=S((i4,vN)=>{vN.exports={type:"shell",extends:"map",definitions:{host_computer:{type:"function",returns:["computer"]},start_terminal:{type:"function",returns:["null"]},build:{type:"function",arguments:[{label:"pathSource",type:"string"},{label:"pathBinary",type:"string"},{label:"allowImport",type:"number",default:{type:"number",value:0}}],returnVariations:["pathSource and programName can't be empty","Invalid shell","Unknown error: Unable to access to local computer","Can't find ${pathSource}","Can't find ${pathBinary}","Can't access to ${pathSource}. Permission denied.","Can't build ${pathSource}. Binary file","Can't create binary in ${pathBinary}. Permission denied.","Can't build ${pathSource}. Invalid extension.","Can't compile. Source code is empty"],returns:["string"]},connect_service:{type:"function",arguments:[{label:"ip",type:"string"},{label:"port",type:"number"},{label:"user",type:"string"},{label:"password",type:"string"},{label:"service",type:"string",default:{type:"string",value:"ssh"}}],returnVariations:["Unknown error: Unable to access to local computer","Direct connections cannot be made outside of this network","!PlayerUtils.ConnectToService","!PlayerUtils.ConnectComputer","!Networking.CheckServiceOnline"],returns:["shell","ftpShell","string","null"]},launch:{type:"function",arguments:[{label:"program",type:"string"},{label:"params",type:"string",default:{type:"string",value:""}}],returnVariations:["Invalid shell","Can't find computer",1,0],returns:["string","number"]},ping:{type:"function",arguments:[{label:"ip",type:"string"}],returnVariations:["ping: invalid ip address",1,0],returns:["string","number"]},scp:{type:"function",arguments:[{label:"file",type:"string"},{label:"folder",type:"string"},{label:"remoteShell",type:"shell"}],returnVariations:["${sourceFile} not found","${destinationFolder} not found","${destinationFolder} it's not a folder","!GreyInterpreter.CheckScpUpload",1],returns:["number","string","null"]}}}});var X1=S((s4,_N)=>{_N.exports={type:"string",definitions:{remove:{type:"function",arguments:[{label:"value",type:"string"}],returns:["string"]},hasIndex:{type:"function",arguments:[{label:"index",type:"number"}],returnVariations:[0,1],returns:["number"]},insert:{type:"function",arguments:[{label:"index",type:"number"},{label:"value",type:"string"}],returns:["string"]},indexOf:{type:"function",arguments:[{label:"value",type:"string"},{label:"offset",type:"number",opt:!0}],returns:["number","null"]},lastIndexOf:{type:"function",arguments:[{label:"searchStr",type:"string"}],returns:["number"]},split:{type:"function",arguments:[{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:[{type:"list",valueType:"string"},"null"]},replace:{type:"function",arguments:[{label:"pattern",type:"string"},{label:"newValue",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:["string"]},trim:{type:"function",returns:["string"]},indexes:{type:"function",returns:[{type:"list",valueType:"number"}]},code:{type:"function",returns:["number"]},len:{type:"function",returns:["number"]},lower:{type:"function",returns:["string"]},upper:{type:"function",returns:["string"]},val:{type:"function",returns:["number"]},values:{type:"function",returns:[{type:"list",valueType:"string"}]},to_int:{type:"function",returns:["string","number"]},is_match:{type:"function",arguments:[{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returnVariations:[1,0],returns:["number"]},matches:{type:"function",arguments:[{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:[{type:"map",keyType:"number",valueType:"string"}]}}}});var eI=S((o4,wN)=>{wN.exports={type:"subWallet",extends:"map",definitions:{get_balance:{type:"function",returnVariations:["get_balance: The account does not exist.","Unknown error: Unable to access to local computer","No internet access."],returns:["number","string"]},set_info:{type:"function",arguments:[{label:"info",type:"string"}],returnVariations:["Error: exceeded maximum of 256 characters","Unknown error: Unable to access to local computer","No internet access.","!BlockchainSystem.SetInfoSubWallet",1],returns:["number","string"]},get_info:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.","!BlockchainSystem.GetInfoSubWallet"],returns:["string"]},delete:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.",1,0],returns:["string","number"]},get_user:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string"]},last_transaction:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.",0],returns:["list","number","string"]},mining:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.","all existing coins of ${coinName} have been mined.","Only one mining process is allowed.","Error: GPU is damaged. Unable to start the mining process.","Error: GPU returned corrupted data while performing floating point tests. Unable to start the mining process.","Hardware error",1],returns:["number","string"]},check_password:{type:"function",arguments:[{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","login_subwallet: the account does not exist.",1,0],returns:["number","string"]},wallet_username:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string"]}}}});var tI=S((a4,xN)=>{xN.exports={type:"wallet",extends:"map",definitions:{list_coins:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.","Error: wallet does not exist/incorrect credentials."],returns:[{type:"list",valueType:"string"},"string"]},get_balance:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","Error: wallet does not exist/incorrect credentials.","get_balance: wallet does not have coins in the selected currency"],returns:["number","string","null"]},buy_coin:{type:"function",arguments:[{label:"coinName",type:"string"},{label:"coinAmount",type:"number"},{label:"unitPrice",type:"number"},{label:"subwalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","sell_coin: coin amount and proposed price cannot be 0.",1],returns:["number","string"]},sell_coin:{type:"function",arguments:[{label:"coinName",type:"string"},{label:"coinAmount",type:"number"},{label:"unitPrice",type:"number"},{label:"subwalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","sell_coin: coin amount and proposed price cannot be 0.",1],returns:["number","string"]},get_pending_trade:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","list","null"]},cancel_pending_trade:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","null"]},get_global_offers:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string",{type:"map",keyType:"string",valueType:"list"},"null"]},list_global_coins:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string",{type:"list",valueType:"string"}]},show_nodes:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","show_nodes: wallet does not exist","show_nodes: coin does not exist"],returns:["string","number","null"]},reset_password:{type:"function",arguments:[{label:"newPassword",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","reset_password: only alphanumeric characters are allowed as password","reset_password: name and password cannot exceed the 16 character limit.","!BlockchainSystem.ResetWalletPass",1],returns:["number","string","null"]},get_pin:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string"]}}}});var nI=S((l4,kN)=>{kN.exports={type:"debugLibrary",extends:"map",definitions:{scan:{type:"function",returnVariations:["error: file not found","No potential issues have been found",`Potential problems have been found in the following code:
215
215
 
216
216
  \${callengeDescription}`],returns:["string"]},apply_patch:{type:"function",arguments:[{label:"path",type:"string"}],returnVariations:["error: file not found","error: The file to apply the patch cannot be binary","error: The patch code is not correct.","The patch had already been applied.","The patch has been applied correctly."],returns:["string","null"]},unit_testing:{type:"function",arguments:[{label:"errorLines",type:{type:"list",valueType:"number"}}],returnVariations:["error: file not found","Test failed: No potential issues have been found",`Starting testing in selected lines...
217
217
  \${methods}
218
218
 
219
- New vulnerability found: \${vulnerability}`,"Test failed: No errors have been found in one or more of the provided lines, or not all lines with errors have been provided."],returns:["string","null"]}}}});var rI=S((lV,kN)=>{kN.exports={type:"trafficNet",extends:"map",definitions:{camera_link_system:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: This device is not registered on any police network",1],returns:["number","string"]},locate_vehicle:{type:"function",arguments:[{label:"licensePlate",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: This device is not registered on any police network","locate_vehicle: License plate not found.","The vehicle could not be located in the camera system at this time.",1],returns:["number","string","null"]},next_camera:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: This device is not registered on any police network",1],returns:["number","string"]},prev_camera:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: This device is not registered on any police network",1],returns:["number","string"]},traffic_light_config:{type:"function",returnVariations:["Feature currently in development"],returns:["string"]}}}});var iI=S((uV,TN)=>{TN.exports={type:"smartAppliance",extends:"map",definitions:{model:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: Device hardware malfunction"],returns:["string"]},override_settings:{type:"function",arguments:[{label:"power",type:"number"},{label:"temperature",type:"number"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: Device hardware malfunction","override_settings: denied: The settings are locked for security reasons.",1],returns:["string","number","null"]},set_alarm:{type:"function",arguments:[{label:"enable",type:"number"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: Device hardware malfunction","set_alarm: denied: The alarm settings are locked for security reasons.",1],returns:["string","number","null"]}}}});var sI=S(ue=>{"use strict";var xe=ue&&ue.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ue,"__esModule",{value:!0});ue.getSiteDescription=ue.getSiteLanguageFile=ue.isNative=ue.greyscriptMeta=void 0;Z0();var SN=en(),IN=xe(R1()),EN=xe(P1()),RN=xe(C1()),PN=xe(O1()),CN=xe(A1()),ON=xe(D1()),AN=xe(j1()),DN=xe(L1()),jN=xe(M1()),LN=xe(q1()),MN=xe(F1()),qN=xe(N1()),FN=xe($1()),NN=xe(U1()),$N=xe(B1()),UN=xe(W1()),BN=xe(V1()),WN=xe(H1()),VN=xe(z1()),HN=xe(G1()),zN=xe(K1()),GN=xe(Y1()),KN=xe(Q1()),YN=xe(J1()),QN=xe(Z1()),JN=xe(X1()),ZN=xe(eI()),XN=xe(tI()),e$=xe(nI()),t$=xe(rI()),n$=xe(iI());ue.greyscriptMeta=new SN.Container;ue.greyscriptMeta.addTypeSignatureFromPayload(RN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(PN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(CN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(LN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(ON.default);ue.greyscriptMeta.addTypeSignatureFromPayload(AN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(DN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(jN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(MN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(qN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(FN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(NN.default);ue.greyscriptMeta.addTypeSignatureFromPayload($N.default);ue.greyscriptMeta.addTypeSignatureFromPayload(UN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(BN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(WN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(VN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(HN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(zN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(GN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(KN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(YN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(QN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(JN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(ZN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(XN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(e$.default);ue.greyscriptMeta.addTypeSignatureFromPayload(t$.default);ue.greyscriptMeta.addTypeSignatureFromPayload(n$.default);ue.greyscriptMeta.addMetaFromPayload("en",IN.default);var r$=function(n,e){return!!ue.greyscriptMeta.getDefinition(n,e)};ue.isNative=r$;var i$=function(n){switch(n===void 0&&(n="en"),n){case"en":return EN.default;default:throw new Error('Language "'.concat(n,'" is unknown.'))}};ue.getSiteLanguageFile=i$;var s$=function(n,e){var r=(0,ue.getSiteLanguageFile)(e);return r==null?void 0:r[n]};ue.getSiteDescription=s$});var Xb=S(vi=>{"use strict";var o$=vi&&vi.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),a$=vi&&vi.__exportStar||function(n,e){for(var r in n)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&o$(e,n,r)};Object.defineProperty(vi,"__esModule",{value:!0});a$(sI(),vi)});var va=S(ev=>{"use strict";Object.defineProperty(ev,"__esModule",{value:!0});var l$=Xb(),u$=ta();ev.default=new u$.TypeManager({container:l$.greyscriptMeta})});var aI=S(Us=>{"use strict";var c$=Us&&Us.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Us,"__esModule",{value:!0});Us.activate=void 0;var p$=me(),d$=ta(),h$=Ey(),f$=c$(va()),oI=(n,e)=>{var s;let r=f$.default.get(n.uri),t=r.resolveAllAssignmentsWithQuery(e),i=[];for(let o of t){if(o.node.type!==p$.ASTType.AssignmentStatement)continue;let l=o.node,u=r.resolveNamespace(l.variable,!0);if(u==null)continue;let a=(s=u==null?void 0:u.label)!=null?s:(0,d$.createExpressionId)(l.variable),c=u!=null&&u.kind?(0,h$.getSymbolItemKind)(u.kind):13,p={line:l.variable.start.line-1,character:l.variable.start.character-1},d={line:l.variable.end.line-1,character:l.variable.end.character-1};i.push({name:a,containerName:a,kind:c,location:{uri:n.uri,range:{start:p,end:d}}})}return i};function m$(n){n.connection.onDocumentSymbol(e=>B(this,null,function*(){let r=yield n.fs.getTextDocument(e.textDocument.uri);if(!(r==null||!n.documentManager.get(r).document))return oI(r,"")})),n.connection.onWorkspaceSymbol(e=>{let r=[];for(let t of n.fs.getAllTextDocuments())n.documentManager.get(t).document&&r.push(...oI(t,e.query));return r})}Us.activate=m$});var pp=S(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.buildTokens=yn.semanticTokensLegend=yn.SemanticTokenModifier=yn.SemanticTokenType=void 0;var It=qt(),cI=zn(),lI=Xb(),N=me(),K;(function(n){n[n.Keyword=0]="Keyword",n[n.String=1]="String",n[n.Number=2]="Number",n[n.Variable=3]="Variable",n[n.Property=4]="Property",n[n.Function=5]="Function",n[n.Parameter=6]="Parameter",n[n.Operator=7]="Operator",n[n.Comment=8]="Comment",n[n.Constant=9]="Constant",n[n.Punctuator=10]="Punctuator"})(K=yn.SemanticTokenType||(yn.SemanticTokenType={}));var tv;(function(n){n[n.Declaration=0]="Declaration",n[n.Definition=1]="Definition",n[n.Readonly=2]="Readonly",n[n.Static=3]="Static",n[n.Deprecated=4]="Deprecated",n[n.Abstract=5]="Abstract",n[n.Async=6]="Async",n[n.Modification=7]="Modification",n[n.Documentation=8]="Documentation",n[n.DefaultLibrary=9]="DefaultLibrary"})(tv=yn.SemanticTokenModifier||(yn.SemanticTokenModifier={}));yn.semanticTokensLegend={tokenTypes:["keyword","string","number","variable","property","function","parameter","operator","comment","constant","punctuator"],tokenModifiers:["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"]};var uI=n=>1<<n,nv=class{constructor(e,r){this._lexer=e,this._builder=r,this._validator=new N.ParserValidatorm}next(){this.previousToken=this.token,this.token=this._lexer.next()}isType(e){return this.token!==null&&e===this.token.type}consume(e){return e(this.token)?(this.next(),!0):!1}consumeMany(e){return e(this.token)?(this.next(),!0):!1}requireType(e){let r=this.token;return this.token.type!==e?null:(this.next(),r)}requireToken(e){let r=this.token;return e(r)?(this.next(),r):null}requireTokenOfAny(e){let r=this.token;return e(r)?(this.next(),r):null}skipNewlines(){let e=this;for(;;){if(N.Selectors.Comment(e.token))this._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length+2,K.Comment,0);else if(!N.Selectors.EndOfLine(e.token))break;e.next()}}processIdentifier(e=!1,r=!1){let t=this,i=t.requireType(N.TokenType.Identifier);if(i)if(r)t._builder.push(i.start.line-1,i.start.character-1,i.value.length,K.Parameter,0);else if(e){let o=(0,lI.isNative)(["any"],i.value)?uI(tv.DefaultLibrary):0;t._builder.push(i.start.line-1,i.start.character-1,i.value.length,K.Property,o)}else{let o=(0,lI.isNative)(["general"],i.value)?uI(tv.DefaultLibrary):0;t._builder.push(i.start.line-1,i.start.character-1,i.value.length,K.Variable,o)}}processLiteral(){let e=this.token;switch(e.type){case N.TokenType.StringLiteral:{this._builder.push(e.start.line-1,e.start.character-1,e.raw.length,K.String,0);break}case N.TokenType.NumericLiteral:{this._builder.push(e.start.line-1,e.start.character-1,e.raw.length,K.Number,0);break}case N.TokenType.BooleanLiteral:case N.TokenType.NilLiteral:{this._builder.push(e.start.line-1,e.start.character-1,e.raw.length,K.Constant,0);break}}this.next()}processAtom(e=!1,r=!1){let t=this;if(It.Selectors.Envar(t.token))return t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next(),t.processFeatureEnvarExpression();if(It.Selectors.Inject(t.token))return t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next(),t.processFeatureInjectExpression();if(It.Selectors.Line(t.token)){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next();return}else if(It.Selectors.File(t.token)){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next();return}if(t._validator.isLiteral(t.token.type))return t.processLiteral();if(t.isType(N.TokenType.Identifier))return t.processIdentifier()}processQuantity(e=!1,r=!1){let t=this;if(!N.Selectors.LParenthesis(t.token))return t.processAtom(e,r);t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.skipNewlines(),t.processExpr();let i=t.requireToken(N.Selectors.RParenthesis);i&&t._builder.push(i.start.line-1,i.start.character-1,i.value.length,K.Punctuator,0)}processList(e=!1,r=!1){let t=this;if(!N.Selectors.SLBracket(t.token))return t.processQuantity(e,r);if(t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),N.Selectors.SRBracket(t.token))t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next();else for(t.skipNewlines();!N.Selectors.EndOfFile(t.token);){if(N.Selectors.SRBracket(t.token)){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next();break}if(t.processExpr(),N.Selectors.MapSeperator(t.token)&&(t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.skipNewlines()),N.Selectors.SRBracket(t.token)){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next();break}}}processMap(e=!1,r=!1){let t=this;if(!N.Selectors.CLBracket(t.token))return t.processList(e,r);if(t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),N.Selectors.CRBracket(t.token))t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next();else for(t.skipNewlines();!N.Selectors.EndOfFile(t.token);){if(N.Selectors.CRBracket(t.token)){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next();break}t.processExpr();let i=t.requireToken(N.Selectors.MapKeyValueSeperator);if(!i)return;if(t._builder.push(i.start.line-1,i.start.character-1,i.value.length,K.Punctuator,0),t.skipNewlines(),t.processExpr(),N.Selectors.MapSeperator(t.token)&&(t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.skipNewlines()),N.Selectors.CRBracket(t.token)){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next();break}}}processCallArgs(){let e=this;if(N.Selectors.LParenthesis(e.token))if(e._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length,K.Punctuator,0),e.next(),N.Selectors.RParenthesis(e.token))e._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length,K.Punctuator,0),e.next();else for(;!N.Selectors.EndOfFile(e.token);){e.skipNewlines(),e.processExpr(),e.skipNewlines();let r=e.requireTokenOfAny(N.SelectorGroups.CallArgsEnd);if(!r)return;if(N.Selectors.RParenthesis(r)){e._builder.push(r.start.line-1,r.start.character-1,r.value.length,K.Punctuator,0);break}else if(!N.Selectors.ArgumentSeperator(r))break}}processCallExpr(e=!1,r=!1){let t=this;for(t.processMap(e,r);!N.Selectors.EndOfFile(t.token);)if(N.Selectors.MemberSeperator(t.token))t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.skipNewlines(),t.processIdentifier(!0);else if(N.Selectors.SLBracket(t.token)&&!t.token.afterSpace){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.skipNewlines(),N.Selectors.SliceSeperator(t.token)?(t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.skipNewlines(),N.Selectors.SRBracket(t.token)?t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0):t.processExpr()):(t.processExpr(),N.Selectors.SliceSeperator(t.token)&&(t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.skipNewlines(),N.Selectors.SRBracket(t.token)?t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0):t.processExpr()));let i=t.requireToken(N.Selectors.SRBracket);if(!i)return;t._builder.push(i.start.line-1,i.start.character-1,i.value.length,K.Punctuator,0)}else if(N.Selectors.LParenthesis(t.token)&&(!e||!t.token.afterSpace))t.processCallArgs();else break}processPower(e=!1,r=!1){let t=this;t.processCallExpr(e,r),N.Selectors.Power(t.token)&&(t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Operator,0),t.next(),t.skipNewlines(),t.processCallExpr())}processAddressOf(e=!1,r=!1){let t=this;if(!N.Selectors.Reference(t.token))return t.processPower(e,r);t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.skipNewlines(),t.processPower()}processNew(e=!1,r=!1){let t=this;if(!N.Selectors.New(t.token))return t.processAddressOf(e,r);t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next(),t.skipNewlines(),t.processNew()}processUnaryMinus(e=!1,r=!1){let t=this;if(!N.Selectors.Minus(t.token))return t.processNew(e,r);t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Operator,0),t.next(),t.skipNewlines(),t.processNew()}processMultDiv(e=!1,r=!1){let t=this;for(t.processUnaryMinus(e,r);N.SelectorGroups.MultiDivOperators(t.token);)t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Operator,0),t.next(),t.skipNewlines(),t.processUnaryMinus()}processBitwise(e=!1,r=!1){let t=this;for(t.processMultDiv(e,r);It.SelectorGroups.BitwiseOperators(t.token);)t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Operator,0),t.next(),t.skipNewlines(),t.processMultDiv()}processAddSub(e=!1,r=!1){let t=this;for(t.processBitwise(e,r);N.Selectors.Plus(t.token)||N.Selectors.Minus(t.token)&&(!r||!t.token.afterSpace||t._lexer.isAtWhitespace());)t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Operator,0),t.next(),t.skipNewlines(),t.processBitwise()}processComparisons(e=!1,r=!1){let t=this;if(t.processAddSub(e,r),!!N.SelectorGroups.ComparisonOperators(t.token))do t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Operator,0),t.next(),t.skipNewlines(),t.processAddSub();while(N.SelectorGroups.ComparisonOperators(t.token))}processBitwiseAnd(e=!1,r=!1){let t=this;for(t.processComparisons(e,r);It.Selectors.BitwiseAnd(t.token);)t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.processComparisons()}processBitwiseOr(e=!1,r=!1){let t=this;for(t.processBitwiseAnd(e,r);It.Selectors.BitwiseOr(t.token);)t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.processBitwiseAnd()}processIsa(e=!1,r=!1){let t=this;t.processBitwiseOr(e,r),N.Selectors.Isa(t.token)&&(t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next(),t.skipNewlines(),t.processBitwiseOr())}processNot(e=!1,r=!1){let t=this;if(N.Selectors.Not(t.token)){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next(),t.skipNewlines(),t.processIsa();return}t.processIsa(e,r)}processAnd(e=!1,r=!1){let t=this;for(t.processNot(e,r);N.Selectors.And(t.token);)t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next(),t.skipNewlines(),t.processNot()}processOr(e=!1,r=!1){let t=this;for(t.processAnd(e,r);N.Selectors.Or(t.token);)t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next(),t.skipNewlines(),t.processAnd()}processFunctionDeclaration(e=!1,r=!1){let t=this;if(!N.Selectors.Function(t.token))return t.processOr(e,r);if(t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next(),!N.SelectorGroups.BlockEndOfLine(t.token)){let i=t.requireToken(N.Selectors.LParenthesis);if(!i)return;for(t._builder.push(i.start.line-1,i.start.character-1,i.value.length,K.Punctuator,0);!N.SelectorGroups.FunctionDeclarationArgEnd(t.token)&&(t.processIdentifier(!1,!0),t.consume(N.Selectors.Assign)&&(t._builder.push(t.previousToken.start.line-1,t.previousToken.start.character-1,t.previousToken.value.length,K.Operator,0),t.processExpr()),!N.Selectors.RParenthesis(t.token));){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0);let o=t.requireToken(N.Selectors.ArgumentSeperator);if(!o)return;if(t._builder.push(o.start.line-1,o.start.character-1,o.value.length,K.Punctuator,0),N.Selectors.RParenthesis(t.token)){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0);break}}let s=t.requireToken(N.Selectors.RParenthesis);if(!s)return;t._builder.push(s.start.line-1,s.start.character-1,s.value.length,K.Punctuator,0)}}processExpr(e=!1,r=!1){this.processFunctionDeclaration(e,r)}processForShortcutStatement(){this.processShortcutStatement()}processForStatement(){let e=this;e.processIdentifier();let r=e.requireToken(N.Selectors.In);r&&(e._builder.push(r.start.line-1,r.start.character-1,r.value.length,K.Keyword,0),e.processExpr(),N.SelectorGroups.BlockEndOfLine(e.token)||e.processForShortcutStatement())}processWhileShortcutStatement(){this.processShortcutStatement()}processWhileStatement(){let e=this;if(e.processExpr(),!N.SelectorGroups.BlockEndOfLine(e.token))return e.processWhileShortcutStatement()}processIfShortcutStatement(){let e=this;e.processShortcutStatement(),N.Selectors.Else(e.token)&&(e._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length,K.Keyword,0),e.next(),e.processShortcutStatement())}processNextIfClause(e){let r=this;switch(e){case N.ASTType.ElseifClause:{r.processExpr();let t=r.requireToken(N.Selectors.Then);if(!t)return;r._builder.push(t.start.line-1,t.start.character-1,t.value.length,K.Keyword,0);break}case N.ASTType.ElseClause:break}}processIfStatement(){let e=this;e.processExpr();let r=e.requireToken(N.Selectors.Then);r&&(e._builder.push(r.start.line-1,r.start.character-1,r.value.length,K.Keyword,0),N.SelectorGroups.BlockEndOfLine(e.token)||e.processIfShortcutStatement())}processReturnStatement(){let e=this;N.SelectorGroups.ReturnStatementEnd(e.token)||e.processExpr()}processAssignment(){let e=this,r=e.token;if(e.processExpr(!0,!0),N.SelectorGroups.AssignmentEndOfExpr(e.token))return;if(N.Selectors.Assign(e.token)){e._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length,K.Operator,0),e.next(),e.processExpr();return}else if(N.SelectorGroups.AssignmentShorthand(e.token)){let i=e.token;e._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length,K.Operator,0),e.next(),e.processExpr();return}let t=[];for(;!N.Selectors.EndOfFile(e.token)&&(e.processExpr(),!(N.SelectorGroups.BlockEndOfLine(e.token)||N.Selectors.Else(e.token)));){if(N.Selectors.ArgumentSeperator(e.token)){e.next(),e.skipNewlines();continue}let i=e.requireTokenOfAny(N.SelectorGroups.AssignmentCommandArgs);if(!i)return;if(N.Selectors.EndOfLine(i)||N.Selectors.EndOfFile(i))break}t.length}processShortcutStatement(){let e=this;if(N.TokenType.Keyword===e.token.type&&N.Keyword.Not!==e.token.value){let r=e.token.value;switch(this._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length,K.Keyword,0),r){case N.Keyword.Return:e.next(),e.processReturnStatement();case N.Keyword.Continue:{e.next();return}case N.Keyword.Break:{e.next();return}default:}}return e.processAssignment()}processPathSegment(){let e=this;if(this.token.type===N.ASTType.StringLiteral){let t=this.token;e._builder.push(t.start.line-1,t.start.character-1,t.raw.length,K.String,0),this.next();return}let r="";for(;!It.SelectorGroups.PathSegmentEnd(e.token);)e._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length,K.String,0),r=r+e.token.value,e.next();return e.consumeMany(It.SelectorGroups.PathSegmentEnd)&&e._builder.push(e.previousToken.start.line-1,e.previousToken.start.character-1,e.previousToken.value.length,K.Punctuator,0),r}processFeatureEnvarExpression(){let e=this;e._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length,K.String,0),e.next()}processFeatureInjectExpression(){this.processPathSegment()}processFeatureImportStatement(){let e=this;e.processIdentifier(),e.consume(It.Selectors.From)&&(e._builder.push(e.previousToken.start.line-1,e.previousToken.start.character-1,e.previousToken.value.length,K.Keyword,0),e.processPathSegment())}processFeatureIncludeStatement(){this.processPathSegment()}processNativeImportCodeStatement(){let e=this;if(e.consume(N.Selectors.LParenthesis)){if(e._builder.push(e.previousToken.start.line-1,e.previousToken.start.character-1,e.previousToken.value.length,K.Punctuator,0),N.TokenType.StringLiteral===e.token.type){let r=e.token;e._builder.push(r.start.line-1,r.start.character-1,r.raw.length,K.String,0),e.next()}else return;if(e.consume(N.Selectors.ImportCodeSeperator)){if(e._builder.push(e.previousToken.start.line-1,e.previousToken.start.character-1,e.previousToken.value.length,K.Punctuator,0),!e.isType(N.TokenType.StringLiteral))return;let r=e.token;e._builder.push(r.start.line-1,r.start.character-1,r.raw.length,K.String,0),e.next()}e.consume(N.Selectors.RParenthesis)&&e._builder.push(e.previousToken.start.line-1,e.previousToken.start.character-1,e.previousToken.value.length,K.Punctuator,0)}}processKeyword(){let e=this,r=e.token.value;switch(this._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length,K.Keyword,0),r){case N.Keyword.Return:{e.next(),e.processReturnStatement();return}case N.Keyword.If:{e.next(),e.processIfStatement();return}case N.Keyword.ElseIf:{e.next(),e.processNextIfClause(N.ASTType.ElseifClause);return}case N.Keyword.Else:{e.next(),e.processNextIfClause(N.ASTType.ElseClause);return}case N.Keyword.While:{e.next(),e.processWhileStatement();return}case N.Keyword.For:{e.next(),e.processForStatement();return}case N.Keyword.EndFunction:{e.next();return}case N.Keyword.EndFor:{e.next();return}case N.Keyword.EndWhile:{e.next();return}case N.Keyword.EndIf:{e.next();return}case N.Keyword.Continue:{e.next();return}case N.Keyword.Break:{e.next();return}case It.GreybelKeyword.Include:case It.GreybelKeyword.IncludeWithComment:{e.next(),e.processFeatureIncludeStatement();return}case It.GreybelKeyword.Import:case It.GreybelKeyword.ImportWithComment:{e.next(),e.processFeatureImportStatement();return}case It.GreybelKeyword.Envar:{e.next(),e.processFeatureEnvarExpression();return}case It.GreybelKeyword.Inject:{e.next(),e.processFeatureInjectExpression();return}case It.GreybelKeyword.Debugger:{e.next();return}case cI.GreyScriptKeyword.ImportCode:e.next(),e.processNativeImportCodeStatement()}}processStatement(){let e=this;if(N.TokenType.Keyword===e.token.type&&N.Keyword.Not!==e.token.value){e.processKeyword();return}e.processAssignment()}process(){let e=this;for(e.next();!N.Selectors.EndOfFile(e.token)&&(e.skipNewlines(),!N.Selectors.EndOfFile(e.token));)e.processStatement()}};function g$(n,e){let r=new cI.Lexer(e.content,{unsafe:!0});return new nv(r,n).process(),n}yn.buildTokens=g$});var pI=S(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});dp.activate=void 0;var y$=pp();function b$(n){n.connection.languages.semanticTokens.on(e=>B(this,null,function*(){let r=yield n.fs.getTextDocument(e.textDocument.uri);if(r==null)return;let t=n.documentManager.get(r);if(!t.document)return;let i=n.createSemanticTokensBuilder();return(0,y$.buildTokens)(i,t),i.build()}))}dp.activate=b$});var dI=S(hp=>{"use strict";Object.defineProperty(hp,"__esModule",{value:!0});hp.buildFoldingRanges=void 0;var Kn=me(),rv=gf(),v$=uc();function _$(n){let e=[];return new v$.ScraperWalker((t,i)=>{if(t.start.line===t.end.line)return null;switch(t.type){case Kn.ASTType.Comment:return e.push({startLine:t.start.line-1,endLine:t.end.line-1,kind:rv.FoldingRangeKind.Comment}),null;case Kn.ASTType.MapConstructorExpression:case Kn.ASTType.ListConstructorExpression:case Kn.ASTType.StringLiteral:case Kn.ASTType.WhileStatement:case Kn.ASTType.ForGenericStatement:case Kn.ASTType.FunctionDeclaration:return e.push({startLine:t.start.line-1,endLine:t.end.line-1,kind:rv.FoldingRangeKind.Region}),null;case Kn.ASTType.IfClause:case Kn.ASTType.ElseifClause:case Kn.ASTType.ElseClause:return e.push({startLine:t.start.line-1,endLine:t.end.line-2,kind:rv.FoldingRangeKind.Region}),null}return null}).visit(n.document),e}hp.buildFoldingRanges=_$});var hI=S(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});fp.activate=void 0;var w$=dI();function x$(n){n.connection.languages.foldingRange.on(e=>B(this,null,function*(){let r=yield n.fs.getTextDocument(e.textDocument.uri);if(r==null)return;let t=n.documentManager.get(r);if(t.document)return(0,w$.buildFoldingRanges)(t)}))}fp.activate=x$});var _I=S((wV,vI)=>{var av=Object.defineProperty,k$=Object.getOwnPropertyDescriptor,T$=Object.getOwnPropertyNames,S$=Object.prototype.hasOwnProperty,I$=(n,e)=>{for(var r in e)av(n,r,{get:e[r],enumerable:!0})},E$=(n,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of T$(e))!S$.call(n,i)&&i!==r&&av(n,i,{get:()=>e[i],enumerable:!(t=k$(e,i))||t.enumerable});return n},R$=n=>E$(av({},"__esModule",{value:!0}),n),fI={};I$(fI,{ScheduleIntervalHelper:()=>iv,SchedulePostMessageHelper:()=>sv,ScheduleSetImmmediateHelper:()=>ov,schedule:()=>O$,scheduleProvider:()=>bI});vI.exports=R$(fI);var P$=Promise.prototype.then.bind(Promise.resolve()),Yn,lv=(Yn=class{constructor(){this.queue=[],this.sleep=0}static isApplicable(){return!1}static createCallback(){throw new Error("Cannot create callback from base schedule helper!")}tick(){let e=this.queue,r=Math.min(e.length,Yn.QUEUE_LIMIT);this.queue=this.queue.slice(Yn.QUEUE_LIMIT);for(let t=0;t<r;P$(e[t++]));if(this.queue.length>0&&(this.sleep=0),this.sleep++<=Yn.SLEEP_LIMIT){this.nextTick();return}this.endTick()}start(){this.isTickActive()||(this.sleep=0,this.startTick())}add(e){this.queue.push(e),this.start()}},Yn.SLEEP_LIMIT=512,Yn.QUEUE_LIMIT=1024,Yn),iv=class mI extends lv{constructor(){super(...arguments),this.timer=null,this.boundTick=this.tick.bind(this)}static isApplicable(){return!!globalThis.setInterval}static createCallback(){let e=new mI;return e.add.bind(e)}isTickActive(){return this.timer!==null}startTick(){this.timer=setInterval(this.boundTick,0)}nextTick(){}endTick(){clearInterval(this.timer),this.timer=null}},C$=()=>{try{return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}catch(n){}return!1},sv=class gI extends lv{constructor(){super(),this.id=(Math.random()+1).toString(36).substring(7),this.active=!1,self.addEventListener("message",this.onMessage.bind(this))}static isApplicable(){return!C$()&&!!self.postMessage&&!!self.addEventListener}static createCallback(){let e=new gI;return e.add.bind(e)}onMessage(e){e.source!==self||e.data!==this.id||this.tick()}isTickActive(){return this.active}startTick(){this.active=!0,self.postMessage(this.id)}nextTick(){self.postMessage(this.id)}endTick(){this.active=!1}},ov=class yI extends lv{constructor(){super(...arguments),this.immediate=null,this.boundTick=this.tick.bind(this)}static isApplicable(){return!!globalThis.setImmediate}static createCallback(){let e=new yI;return e.add.bind(e)}isTickActive(){return this.immediate!==null}startTick(){this.immediate=setImmediate(this.boundTick)}nextTick(){this.immediate=setImmediate(this.boundTick)}endTick(){clearImmediate(this.immediate),this.immediate=null}};function bI(){if(ov.isApplicable())return ov.createCallback();if(sv.isApplicable())return sv.createCallback();if(iv.isApplicable())return iv.createCallback();throw new Error("No schedule helper fulfills requirements!")}var O$=bI()});var xI=S(sn=>{"use strict";var cv=sn&&sn.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(sn,"__esModule",{value:!0});sn.DocumentManager=sn.PROCESSING_TIMEOUT=sn.ActiveDocument=sn.DocumentURIBuilder=void 0;var A$=cv((Xn(),mt(Zn))),D$=zn(),j$=cv(Yl()),wI=_I(),Bs=zl(),L$=cv(va()),_a=class{constructor(e,r=null){this.workspaceFolderUri=r,this.rootPath=e}getFromWorkspaceFolder(e){return this.workspaceFolderUri==null?(console.warn("Workspace folders are not available. Falling back to only relative paths."),Bs.Utils.joinPath(this.rootPath,e).toString()):Bs.Utils.joinPath(this.workspaceFolderUri,e).toString()}getFromRootPath(e){return Bs.Utils.joinPath(this.rootPath,e).toString()}};sn.DocumentURIBuilder=_a;var mp=class{constructor(e){this.documentManager=e.documentManager,this.content=e.content,this.textDocument=e.textDocument,this.document=e.document,this.errors=e.errors}getDirectory(){return Bs.Utils.joinPath(Bs.URI.parse(this.textDocument.uri),"..")}getNativeImports(e=null){return B(this,null,function*(){if(this.document==null)return[];let r=this.document,t=this.getDirectory(),i=new _a(t,e),s=this.documentManager.context;return(yield Promise.all(r.nativeImports.filter(l=>l.directory).map(l=>l.directory.startsWith("/")?s.fs.findExistingPath(i.getFromWorkspaceFolder(l.directory)):s.fs.findExistingPath(i.getFromRootPath(l.directory))))).filter(l=>l!=null)})}getImportsAndIncludes(e=null){return B(this,null,function*(){if(this.document==null)return[];let r=this.document,t=this.getDirectory(),i=this.documentManager.context,s=new _a(t,e),o=u=>u.startsWith("/")?i.fs.findExistingPath(s.getFromWorkspaceFolder(u),s.getFromWorkspaceFolder(`${u}.src`)):i.fs.findExistingPath(s.getFromRootPath(u),s.getFromRootPath(`${u}.src`));return(yield Promise.all([...r.imports.filter(u=>u.path).map(u=>o(u.path)),...r.includes.filter(u=>u.path).map(u=>o(u.path))])).filter(u=>u!=null)})}getDependencies(){return B(this,null,function*(){if(this.document==null)return[];if(this.dependencies)return this.dependencies;let e=yield this.documentManager.context.fs.getWorkspaceFolderUri(Bs.URI.parse(this.textDocument.uri)),r=yield this.getNativeImports(e),t=yield this.getImportsAndIncludes(e),i=new Set([...r,...t]);return this.dependencies=Array.from(i),this.dependencies})}getImports(e=!0){return B(this,null,function*(){if(this.document==null)return[];let r=new Set,t=new Set([this.textDocument.uri]),i=s=>B(this,null,function*(){let o=yield s.getDependencies();for(let l of o){if(t.has(l))continue;let u=yield this.documentManager.open(l);t.add(l),u!==null&&(r.add(u),u.document!==null&&e&&(yield i(u)))}});return yield i(this),Array.from(r)})}};sn.ActiveDocument=mp;sn.PROCESSING_TIMEOUT=100;var uv=class extends A$.default{get context(){return this._context}setContext(e){return this._context=e,this}constructor(e=sn.PROCESSING_TIMEOUT){super(),this._context=null,this._timer=null,this.results=new j$.default({ttl:1e3*60*20,ttlAutopurge:!0}),this.scheduledItems=new Map,this.tickRef=this.tick.bind(this),this.processingTimeout=e}tick(){if(this.scheduledItems.size===0){this._timer=null;return}let e=Date.now(),r=Array.from(this.scheduledItems.values());for(let t=0;t<r.length;t++){let i=r[t];e-i.createdAt>this.processingTimeout&&(0,wI.schedule)(()=>this.refresh(i.document))}this._timer=setTimeout(this.tickRef,0)}refresh(e){let r=e.uri;if(!this.scheduledItems.has(r)&&this.results.has(r))return this.results.get(r);let t=this.create(e);return this.results.set(r,t),this.emit("parsed",e,t),this.scheduledItems.delete(r),t}create(e){let r=e.getText(),t=new D$.Parser(r,{unsafe:!0}),i=t.parseChunk();return this._context.documentMerger.flushCacheKey(e.uri),L$.default.analyze(e.uri,i),new mp({documentManager:this,content:r,textDocument:e,document:i,errors:[...t.lexer.errors,...t.errors]})}schedule(e){var i;let r=e.uri,t=e.getText();return((i=this.results.get(r))==null?void 0:i.content)===t?!1:(this.scheduledItems.set(r,{document:e,createdAt:Date.now()}),this._timer===null&&(this._timer=setTimeout(this.tickRef,0)),!0)}open(e){return B(this,null,function*(){try{let r=yield this.context.fs.getTextDocument(e);return r==null?null:this.get(r)}catch(r){return null}})}get(e){return this.results.get(e.uri)||this.refresh(e)}getLatest(e,r=5e3){return new Promise(t=>{(0,wI.schedule)(()=>{if(!this.scheduledItems.has(e.uri))return t(this.get(e));let i=()=>{this.removeListener("parsed",s),t(this.get(e))},s=l=>{l.uri===e.uri&&(this.removeListener("parsed",s),clearTimeout(o),t(this.get(e)))},o=setTimeout(i,r);this.addListener("parsed",s)})})}clear(e){this.results.delete(e.uri),this.emit("cleared",e)}};sn.DocumentManager=uv});var pv=S(gp=>{"use strict";Object.defineProperty(gp,"__esModule",{value:!0});gp.hash=void 0;function M$(n){let e=5381,r=n.length;for(;r;)e=e*33^n.charCodeAt(--r);return e>>>0}gp.hash=M$});var II=S(Ws=>{"use strict";var SI=Ws&&Ws.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ws,"__esModule",{value:!0});Ws.DocumentMerger=void 0;var q$=SI(Yl()),kI=pv(),TI=SI(va()),dv=class{constructor(){this.keyToDocumentUriMap=new Map,this.results=new q$.default({ttl:1e3*60*20,ttlAutopurge:!0})}createCacheKey(e,r){let t=(0,kI.hash)(`${e.uri}-${e.version}`);for(let i=0;i<r.length;i++){let s=r[i];t^=(0,kI.hash)(`${s.textDocument.uri}-${s.textDocument.version}`),t=t>>>0}return t}registerCacheKey(e,r){this.flushCacheKey(r),this.keyToDocumentUriMap.set(r,e)}flushCacheKey(e){let r=this.keyToDocumentUriMap.get(e);r&&(this.results.delete(r),this.keyToDocumentUriMap.delete(e))}process(e,r,t){return B(this,null,function*(){let i=e.uri;if(t.has(i))return t.get(i);let s=TI.default.get(i);if(t.set(i,null),!s)return null;let o=[],l=yield r.documentManager.get(e).getImports(),u=this.createCacheKey(e,l);if(this.results.has(u))return this.results.get(u);this.registerCacheKey(u,i);let a=yield r.documentManager.get(e).getDependencies();yield Promise.all(a.map(p=>B(this,null,function*(){let d=r.documentManager.results.get(p);if(!d)return;let{document:h,textDocument:g}=d;if(!h)return;let f=yield this.process(g,r,t);f!==null&&o.push(f)})));let c=s.merge(...o);return t.set(i,c),this.results.set(u,c),c})}build(e,r){return B(this,null,function*(){let t=e.uri,i=TI.default.get(t);if(!i)return null;let s=[],o=yield r.documentManager.get(e).getImports(),l=this.createCacheKey(e,o);if(this.results.has(l))return this.results.get(l);this.registerCacheKey(l,t);let u=yield r.documentManager.get(e).getDependencies(),a=new Map([[t,null]]);yield Promise.all(u.map(p=>B(this,null,function*(){let d=r.documentManager.results.get(p);if(!d)return;let{document:h,textDocument:g}=d;if(!h)return;let f=yield this.process(g,r,a);f!==null&&s.push(f)})));let c=i.merge(...s);return this.results.set(l,c),c})}};Ws.DocumentMerger=dv});var PI=S(Vs=>{"use strict";var F$=Vs&&Vs.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Vs,"__esModule",{value:!0});Vs.CoreContext=void 0;var N$=F$((Xn(),mt(Zn))),hv=Xi(),EI=pp();function RI(n){var e,r,t,i,s,o,l,u,a,c,p,d,h;return{formatter:(e=n==null?void 0:n.formatter)!=null?e:!0,autocomplete:(r=n==null?void 0:n.autocomplete)!=null?r:!0,hoverdocs:(t=n==null?void 0:n.hoverdocs)!=null?t:!0,diagnostic:(i=n==null?void 0:n.diagnostic)!=null?i:!0,transpiler:{beautify:{keepParentheses:(l=(o=(s=n==null?void 0:n.transpiler)==null?void 0:s.beautify)==null?void 0:o.keepParentheses)!=null?l:!0,indentation:(c=(a=(u=n==null?void 0:n.transpiler)==null?void 0:u.beautify)==null?void 0:a.indentation)!=null?c:hv.IndentationType.Tab,indentationSpaces:(h=(d=(p=n==null?void 0:n.transpiler)==null?void 0:p.beautify)==null?void 0:d.indentationSpaces)!=null?h:2}}}}var fv=class extends N$.default{constructor(){super(),this._configuration=RI(),this._features={configuration:!1,workspaceFolder:!1}}get features(){return this._features}getConfiguration(){return this._configuration}syncConfiguraton(){return B(this,null,function*(){let e=yield this.connection.workspace.getConfiguration(hv.ConfigurationNamespace);this._configuration=RI(e)})}configureCapabilties(e){this._features.configuration=!!(e.workspace&&e.workspace.configuration),this._features.workspaceFolder=!!(e.workspace&&e.workspace.workspaceFolders)}onInitialize(e){return B(this,null,function*(){this.configureCapabilties(e.capabilities);let r={capabilities:{completionProvider:{triggerCharacters:["."],resolveProvider:!0},hoverProvider:!0,colorProvider:!0,definitionProvider:!0,foldingRangeProvider:!0,documentFormattingProvider:!0,signatureHelpProvider:{triggerCharacters:[",","("]},documentSymbolProvider:!0,workspaceSymbolProvider:!0,diagnosticProvider:{identifier:hv.LanguageId,interFileDependencies:!1,workspaceDiagnostics:!1},semanticTokensProvider:{legend:{tokenTypes:EI.semanticTokensLegend.tokenTypes,tokenModifiers:EI.semanticTokensLegend.tokenModifiers},full:!0},textDocumentSync:2}};return this._features.workspaceFolder&&(r.capabilities.workspace={workspaceFolders:{supported:!0}}),this.emit("ready",this),r})}onInitialized(e){return B(this,null,function*(){this._features.configuration&&(yield this.syncConfiguraton(),this.connection.onDidChangeConfiguration(()=>B(this,null,function*(){let r=this._configuration;yield this.syncConfiguraton(),this.emit("configuration-change",this,this._configuration,r)}))),this.emit("loaded",this)})}listen(){return B(this,null,function*(){this.fs.listen(this.connection),this.connection.onInitialize(this.onInitialize.bind(this)),this.connection.onInitialized(this.onInitialized.bind(this)),this.connection.listen()})}};Vs.CoreContext=fv});var yp=S(V=>{"use strict";var $$=V&&V.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),U$=V&&V.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),B$=V&&V.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var r in n)r!=="default"&&Object.prototype.hasOwnProperty.call(n,r)&&$$(e,n,r);return U$(e,n),e},W$=V&&V.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(V,"__esModule",{value:!0});V.CoreContext=V.buildTokens=V.semanticTokensLegend=V.lookupBase=V.lookupIdentifier=V.typeAnalyzer=V.appendTooltipHeader=V.appendTooltipBody=V.formatTypes=V.formatDefaultValue=V.createTooltipHeader=V.createSignatureInfo=V.createHover=V.hash=V.MarkdownString=V.LookupHelper=V.DocumentMerger=V.DocumentManager=V.ActiveDocument=V.ASTScraper=V.activateFoldingRange=V.activateSemantic=V.activateSymbol=V.activateSubscriptions=V.activateSignature=V.activateHover=V.activateFormatter=V.activateDiagnostic=V.activateDefinition=V.activateColor=V.activateAutocomplete=V.ConfigurationNamespace=V.LanguageId=V.IndentationType=void 0;var mv=Xi();Object.defineProperty(V,"IndentationType",{enumerable:!0,get:function(){return mv.IndentationType}});Object.defineProperty(V,"LanguageId",{enumerable:!0,get:function(){return mv.LanguageId}});Object.defineProperty(V,"ConfigurationNamespace",{enumerable:!0,get:function(){return mv.ConfigurationNamespace}});var V$=NS();Object.defineProperty(V,"activateAutocomplete",{enumerable:!0,get:function(){return V$.activate}});var H$=YS();Object.defineProperty(V,"activateColor",{enumerable:!0,get:function(){return H$.activate}});var z$=QS();Object.defineProperty(V,"activateDefinition",{enumerable:!0,get:function(){return z$.activate}});var G$=JS();Object.defineProperty(V,"activateDiagnostic",{enumerable:!0,get:function(){return G$.activate}});var K$=N0();Object.defineProperty(V,"activateFormatter",{enumerable:!0,get:function(){return K$.activate}});var Y$=z0();Object.defineProperty(V,"activateHover",{enumerable:!0,get:function(){return Y$.activate}});var Q$=K0();Object.defineProperty(V,"activateSignature",{enumerable:!0,get:function(){return Q$.activate}});var J$=Q0();Object.defineProperty(V,"activateSubscriptions",{enumerable:!0,get:function(){return J$.activate}});var Z$=aI();Object.defineProperty(V,"activateSymbol",{enumerable:!0,get:function(){return Z$.activate}});var X$=pI();Object.defineProperty(V,"activateSemantic",{enumerable:!0,get:function(){return X$.activate}});var e2=hI();Object.defineProperty(V,"activateFoldingRange",{enumerable:!0,get:function(){return e2.activate}});V.ASTScraper=B$(uc());var CI=xI();Object.defineProperty(V,"ActiveDocument",{enumerable:!0,get:function(){return CI.ActiveDocument}});Object.defineProperty(V,"DocumentManager",{enumerable:!0,get:function(){return CI.DocumentManager}});var t2=II();Object.defineProperty(V,"DocumentMerger",{enumerable:!0,get:function(){return t2.DocumentMerger}});var n2=ks();Object.defineProperty(V,"LookupHelper",{enumerable:!0,get:function(){return n2.LookupHelper}});var r2=ap();Object.defineProperty(V,"MarkdownString",{enumerable:!0,get:function(){return r2.MarkdownString}});var i2=pv();Object.defineProperty(V,"hash",{enumerable:!0,get:function(){return i2.hash}});var _i=lp();Object.defineProperty(V,"createHover",{enumerable:!0,get:function(){return _i.createHover}});Object.defineProperty(V,"createSignatureInfo",{enumerable:!0,get:function(){return _i.createSignatureInfo}});Object.defineProperty(V,"createTooltipHeader",{enumerable:!0,get:function(){return _i.createTooltipHeader}});Object.defineProperty(V,"formatDefaultValue",{enumerable:!0,get:function(){return _i.formatDefaultValue}});Object.defineProperty(V,"formatTypes",{enumerable:!0,get:function(){return _i.formatTypes}});Object.defineProperty(V,"appendTooltipBody",{enumerable:!0,get:function(){return _i.appendTooltipBody}});Object.defineProperty(V,"appendTooltipHeader",{enumerable:!0,get:function(){return _i.appendTooltipHeader}});var s2=va();Object.defineProperty(V,"typeAnalyzer",{enumerable:!0,get:function(){return W$(s2).default}});var OI=Py();Object.defineProperty(V,"lookupIdentifier",{enumerable:!0,get:function(){return OI.lookupIdentifier}});Object.defineProperty(V,"lookupBase",{enumerable:!0,get:function(){return OI.lookupBase}});var AI=pp();Object.defineProperty(V,"semanticTokensLegend",{enumerable:!0,get:function(){return AI.semanticTokensLegend}});Object.defineProperty(V,"buildTokens",{enumerable:!0,get:function(){return AI.buildTokens}});var o2=PI();Object.defineProperty(V,"CoreContext",{enumerable:!0,get:function(){return o2.CoreContext}})});var MI=S(ar=>{"use strict";var jI=ar&&ar.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ar,"__esModule",{value:!0});ar.FileSystem=ar.FileSystemRequest=void 0;var a2=yf(),DI=(Vk(),mt(Wk)),l2=jI((Xn(),mt(Zn))),gv=zl(),u2=jI(Yl()),c2=yp(),LI;(function(n){n.FileContent="read-file"})(LI=ar.FileSystemRequest||(ar.FileSystemRequest={}));var yv=class extends l2.default{constructor(e){super(),this._context=e,this._textDocumentManager=new a2.TextDocuments(DI.TextDocument),this._tempTextDocumentCache=new u2.default({ttl:1e3,max:100})}getWorkspaceFolderUris(){return B(this,null,function*(){if(!this._context.features.workspaceFolder)return[];let e=yield this._workspace.getWorkspaceFolders();return e==null?[]:Array.from(new Set(e.map(r=>r.uri))).map(r=>gv.URI.parse(r))})}getWorkspaceFolderUri(e){return B(this,null,function*(){return(yield this.getWorkspaceFolderUris()).find(t=>e.path.startsWith(t.path))||null})}findExistingPath(...e){return B(this,null,function*(){if(e.length===0)return null;for(let r=0;r<e.length;r++)if((yield this.getTextDocument(e[r]))!=null)return e[r];return null})}getAllTextDocuments(){return this._textDocumentManager.all()}requestFileContent(e){return B(this,null,function*(){let r=`custom/${LI.FileContent}`;try{return yield this._context.connection.sendRequest(r,e.toString())}catch(t){return console.error(`Cannot fetch text document! Maybe the client does not support ${r}`,t),null}})}fetchTextDocument(e){return B(this,null,function*(){let r=gv.URI.parse(e),t=this._tempTextDocumentCache.get(e);if(t!=null)return t;let i=null,s=yield this.requestFileContent(r);return s!=null&&(i=DI.TextDocument.create(e,c2.LanguageId,0,s)),this._tempTextDocumentCache.set(e,i),i})}getTextDocument(e){return B(this,null,function*(){let r=this._textDocumentManager.get(e);return r||(gv.URI.parse(e).scheme=="file"?yield this.fetchTextDocument(e):null)})}readFile(e){return B(this,null,function*(){return(yield this.getTextDocument(e)).getText()})}listen(e){this._workspace=e.workspace,this._textDocumentManager.listen(e),this._textDocumentManager.onDidOpen(r=>{this.emit("text-document-open",r.document)}),this._textDocumentManager.onDidChangeContent(r=>{this.emit("text-document-change",r.document)}),this._textDocumentManager.onDidClose(r=>{this.emit("text-document-close",r.document)})}};ar.FileSystem=yv});var qI=S(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});bp.BrowserContext=void 0;var wa=yf(),p2=MI(),bv=yp(),vv=class extends bv.CoreContext{constructor(){super(),this.documentManager=new bv.DocumentManager().setContext(this),this.documentMerger=new bv.DocumentMerger,this._messageReader=new wa.BrowserMessageReader(self),this._messageWriter=new wa.BrowserMessageWriter(self),this.connection=(0,wa.createConnection)(wa.ProposedFeatures.all,this._messageReader,this._messageWriter),this.fs=new p2.FileSystem(this)}createSemanticTokensBuilder(){return new wa.SemanticTokensBuilder}};bp.BrowserContext=vv});var h2=S(NI=>{Object.defineProperty(NI,"__esModule",{value:!0});var d2=qI(),En=yp(),FI=new d2.BrowserContext;FI.on("ready",n=>{(0,En.activateAutocomplete)(n),(0,En.activateColor)(n),(0,En.activateDefinition)(n),(0,En.activateDiagnostic)(n),(0,En.activateFormatter)(n),(0,En.activateHover)(n),(0,En.activateSignature)(n),(0,En.activateSubscriptions)(n),(0,En.activateSymbol)(n),(0,En.activateSemantic)(n),(0,En.activateFoldingRange)(n)});FI.listen()});h2();})();
219
+ New vulnerability found: \${vulnerability}`,"Test failed: No errors have been found in one or more of the provided lines, or not all lines with errors have been provided."],returns:["string","null"]}}}});var rI=S((u4,TN)=>{TN.exports={type:"trafficNet",extends:"map",definitions:{camera_link_system:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: This device is not registered on any police network",1],returns:["number","string"]},locate_vehicle:{type:"function",arguments:[{label:"licensePlate",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: This device is not registered on any police network","locate_vehicle: License plate not found.","The vehicle could not be located in the camera system at this time.",1],returns:["number","string","null"]},next_camera:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: This device is not registered on any police network",1],returns:["number","string"]},prev_camera:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: This device is not registered on any police network",1],returns:["number","string"]},traffic_light_config:{type:"function",returnVariations:["Feature currently in development"],returns:["string"]}}}});var iI=S((c4,SN)=>{SN.exports={type:"smartAppliance",extends:"map",definitions:{model:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: Device hardware malfunction"],returns:["string"]},override_settings:{type:"function",arguments:[{label:"power",type:"number"},{label:"temperature",type:"number"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: Device hardware malfunction","override_settings: denied: The settings are locked for security reasons.",1],returns:["string","number","null"]},set_alarm:{type:"function",arguments:[{label:"enable",type:"number"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","error: Device hardware malfunction","set_alarm: denied: The alarm settings are locked for security reasons.",1],returns:["string","number","null"]}}}});var sI=S(ue=>{"use strict";var xe=ue&&ue.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ue,"__esModule",{value:!0});ue.getSiteDescription=ue.getSiteLanguageFile=ue.isNative=ue.greyscriptMeta=void 0;Z0();var IN=en(),EN=xe(R1()),RN=xe(P1()),PN=xe(C1()),CN=xe(O1()),ON=xe(A1()),AN=xe(D1()),DN=xe(j1()),jN=xe(L1()),LN=xe(M1()),MN=xe(q1()),qN=xe(F1()),FN=xe(N1()),NN=xe($1()),$N=xe(U1()),UN=xe(B1()),BN=xe(W1()),WN=xe(V1()),VN=xe(H1()),HN=xe(z1()),zN=xe(G1()),GN=xe(K1()),KN=xe(Y1()),YN=xe(Q1()),QN=xe(J1()),JN=xe(Z1()),ZN=xe(X1()),XN=xe(eI()),e$=xe(tI()),t$=xe(nI()),n$=xe(rI()),r$=xe(iI());ue.greyscriptMeta=new IN.Container;ue.greyscriptMeta.addTypeSignatureFromPayload(PN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(CN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(ON.default);ue.greyscriptMeta.addTypeSignatureFromPayload(MN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(AN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(DN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(jN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(LN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(qN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(FN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(NN.default);ue.greyscriptMeta.addTypeSignatureFromPayload($N.default);ue.greyscriptMeta.addTypeSignatureFromPayload(UN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(BN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(WN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(VN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(HN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(zN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(GN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(KN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(YN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(QN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(JN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(ZN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(XN.default);ue.greyscriptMeta.addTypeSignatureFromPayload(e$.default);ue.greyscriptMeta.addTypeSignatureFromPayload(t$.default);ue.greyscriptMeta.addTypeSignatureFromPayload(n$.default);ue.greyscriptMeta.addTypeSignatureFromPayload(r$.default);ue.greyscriptMeta.addMetaFromPayload("en",EN.default);var i$=function(n,e){return!!ue.greyscriptMeta.getDefinition(n,e)};ue.isNative=i$;var s$=function(n){switch(n===void 0&&(n="en"),n){case"en":return RN.default;default:throw new Error('Language "'.concat(n,'" is unknown.'))}};ue.getSiteLanguageFile=s$;var o$=function(n,e){var r=(0,ue.getSiteLanguageFile)(e);return r==null?void 0:r[n]};ue.getSiteDescription=o$});var Xb=S(vi=>{"use strict";var a$=vi&&vi.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),l$=vi&&vi.__exportStar||function(n,e){for(var r in n)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&a$(e,n,r)};Object.defineProperty(vi,"__esModule",{value:!0});l$(sI(),vi)});var va=S(ev=>{"use strict";Object.defineProperty(ev,"__esModule",{value:!0});var u$=Xb(),c$=ta();ev.default=new c$.TypeManager({container:u$.greyscriptMeta})});var aI=S(Us=>{"use strict";var p$=Us&&Us.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Us,"__esModule",{value:!0});Us.activate=void 0;var d$=me(),h$=ta(),f$=Ey(),m$=p$(va()),oI=(n,e)=>{var s;let r=m$.default.get(n.uri),t=r.resolveAllAssignmentsWithQuery(e),i=[];for(let o of t){if(o.node.type!==d$.ASTType.AssignmentStatement)continue;let l=o.node,u=r.resolveNamespace(l.variable,!0);if(u==null)continue;let a=(s=u==null?void 0:u.label)!=null?s:(0,h$.createExpressionId)(l.variable),c=u!=null&&u.kind?(0,f$.getSymbolItemKind)(u.kind):13,p={line:l.variable.start.line-1,character:l.variable.start.character-1},d={line:l.variable.end.line-1,character:l.variable.end.character-1};i.push({name:a,containerName:a,kind:c,location:{uri:n.uri,range:{start:p,end:d}}})}return i};function g$(n){n.connection.onDocumentSymbol(e=>B(this,null,function*(){let r=yield n.fs.getTextDocument(e.textDocument.uri);if(!(r==null||!n.documentManager.get(r).document))return oI(r,"")})),n.connection.onWorkspaceSymbol(e=>{let r=[];for(let t of n.fs.getAllTextDocuments())n.documentManager.get(t).document&&r.push(...oI(t,e.query));return r})}Us.activate=g$});var pp=S(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.buildTokens=yn.semanticTokensLegend=yn.SemanticTokenModifier=yn.SemanticTokenType=void 0;var It=qt(),cI=zn(),lI=Xb(),N=me(),K;(function(n){n[n.Keyword=0]="Keyword",n[n.String=1]="String",n[n.Number=2]="Number",n[n.Variable=3]="Variable",n[n.Property=4]="Property",n[n.Function=5]="Function",n[n.Parameter=6]="Parameter",n[n.Operator=7]="Operator",n[n.Comment=8]="Comment",n[n.Constant=9]="Constant",n[n.Punctuator=10]="Punctuator"})(K=yn.SemanticTokenType||(yn.SemanticTokenType={}));var tv;(function(n){n[n.Declaration=0]="Declaration",n[n.Definition=1]="Definition",n[n.Readonly=2]="Readonly",n[n.Static=3]="Static",n[n.Deprecated=4]="Deprecated",n[n.Abstract=5]="Abstract",n[n.Async=6]="Async",n[n.Modification=7]="Modification",n[n.Documentation=8]="Documentation",n[n.DefaultLibrary=9]="DefaultLibrary"})(tv=yn.SemanticTokenModifier||(yn.SemanticTokenModifier={}));yn.semanticTokensLegend={tokenTypes:["keyword","string","number","variable","property","function","parameter","operator","comment","constant","punctuator"],tokenModifiers:["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"]};var uI=n=>1<<n,nv=class{constructor(e,r){this._lexer=e,this._builder=r,this._validator=new N.ParserValidatorm}next(){this.previousToken=this.token,this.token=this._lexer.next()}isType(e){return this.token!==null&&e===this.token.type}consume(e){return e(this.token)?(this.next(),!0):!1}consumeMany(e){return e(this.token)?(this.next(),!0):!1}requireType(e){let r=this.token;return this.token.type!==e?null:(this.next(),r)}requireToken(e){let r=this.token;return e(r)?(this.next(),r):null}requireTokenOfAny(e){let r=this.token;return e(r)?(this.next(),r):null}skipNewlines(){let e=this;for(;;){if(N.Selectors.Comment(e.token))this._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length+2,K.Comment,0);else if(!N.Selectors.EndOfLine(e.token))break;e.next()}}processIdentifier(e=!1,r=!1){let t=this,i=t.requireType(N.TokenType.Identifier);if(i)if(r)t._builder.push(i.start.line-1,i.start.character-1,i.value.length,K.Parameter,0);else if(e){let o=(0,lI.isNative)(["any"],i.value)?uI(tv.DefaultLibrary):0;t._builder.push(i.start.line-1,i.start.character-1,i.value.length,K.Property,o)}else{let o=(0,lI.isNative)(["general"],i.value)?uI(tv.DefaultLibrary):0;t._builder.push(i.start.line-1,i.start.character-1,i.value.length,K.Variable,o)}}processLiteral(){let e=this.token;switch(e.type){case N.TokenType.StringLiteral:{this._builder.push(e.start.line-1,e.start.character-1,e.raw.length,K.String,0);break}case N.TokenType.NumericLiteral:{this._builder.push(e.start.line-1,e.start.character-1,e.raw.length,K.Number,0);break}case N.TokenType.BooleanLiteral:case N.TokenType.NilLiteral:{this._builder.push(e.start.line-1,e.start.character-1,e.raw.length,K.Constant,0);break}}this.next()}processAtom(e=!1,r=!1){let t=this;if(It.Selectors.Envar(t.token))return t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next(),t.processFeatureEnvarExpression();if(It.Selectors.Inject(t.token))return t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next(),t.processFeatureInjectExpression();if(It.Selectors.Line(t.token)){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next();return}else if(It.Selectors.File(t.token)){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next();return}if(t._validator.isLiteral(t.token.type))return t.processLiteral();if(t.isType(N.TokenType.Identifier))return t.processIdentifier()}processQuantity(e=!1,r=!1){let t=this;if(!N.Selectors.LParenthesis(t.token))return t.processAtom(e,r);t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.skipNewlines(),t.processExpr();let i=t.requireToken(N.Selectors.RParenthesis);i&&t._builder.push(i.start.line-1,i.start.character-1,i.value.length,K.Punctuator,0)}processList(e=!1,r=!1){let t=this;if(!N.Selectors.SLBracket(t.token))return t.processQuantity(e,r);if(t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),N.Selectors.SRBracket(t.token))t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next();else for(t.skipNewlines();!N.Selectors.EndOfFile(t.token);){if(N.Selectors.SRBracket(t.token)){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next();break}if(t.processExpr(),N.Selectors.MapSeperator(t.token)&&(t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.skipNewlines()),N.Selectors.SRBracket(t.token)){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next();break}}}processMap(e=!1,r=!1){let t=this;if(!N.Selectors.CLBracket(t.token))return t.processList(e,r);if(t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),N.Selectors.CRBracket(t.token))t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next();else for(t.skipNewlines();!N.Selectors.EndOfFile(t.token);){if(N.Selectors.CRBracket(t.token)){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next();break}t.processExpr();let i=t.requireToken(N.Selectors.MapKeyValueSeperator);if(!i)return;if(t._builder.push(i.start.line-1,i.start.character-1,i.value.length,K.Punctuator,0),t.skipNewlines(),t.processExpr(),N.Selectors.MapSeperator(t.token)&&(t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.skipNewlines()),N.Selectors.CRBracket(t.token)){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next();break}}}processCallArgs(){let e=this;if(N.Selectors.LParenthesis(e.token))if(e._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length,K.Punctuator,0),e.next(),N.Selectors.RParenthesis(e.token))e._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length,K.Punctuator,0),e.next();else for(;!N.Selectors.EndOfFile(e.token);){e.skipNewlines(),e.processExpr(),e.skipNewlines();let r=e.requireTokenOfAny(N.SelectorGroups.CallArgsEnd);if(!r)return;if(N.Selectors.RParenthesis(r)){e._builder.push(r.start.line-1,r.start.character-1,r.value.length,K.Punctuator,0);break}else if(!N.Selectors.ArgumentSeperator(r))break}}processCallExpr(e=!1,r=!1){let t=this;for(t.processMap(e,r);!N.Selectors.EndOfFile(t.token);)if(N.Selectors.MemberSeperator(t.token))t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.skipNewlines(),t.processIdentifier(!0);else if(N.Selectors.SLBracket(t.token)&&!t.token.afterSpace){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.skipNewlines(),N.Selectors.SliceSeperator(t.token)?(t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.skipNewlines(),N.Selectors.SRBracket(t.token)?t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0):t.processExpr()):(t.processExpr(),N.Selectors.SliceSeperator(t.token)&&(t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.skipNewlines(),N.Selectors.SRBracket(t.token)?t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0):t.processExpr()));let i=t.requireToken(N.Selectors.SRBracket);if(!i)return;t._builder.push(i.start.line-1,i.start.character-1,i.value.length,K.Punctuator,0)}else if(N.Selectors.LParenthesis(t.token)&&(!e||!t.token.afterSpace))t.processCallArgs();else break}processPower(e=!1,r=!1){let t=this;t.processCallExpr(e,r),N.Selectors.Power(t.token)&&(t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Operator,0),t.next(),t.skipNewlines(),t.processCallExpr())}processAddressOf(e=!1,r=!1){let t=this;if(!N.Selectors.Reference(t.token))return t.processPower(e,r);t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.skipNewlines(),t.processPower()}processNew(e=!1,r=!1){let t=this;if(!N.Selectors.New(t.token))return t.processAddressOf(e,r);t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next(),t.skipNewlines(),t.processNew()}processUnaryMinus(e=!1,r=!1){let t=this;if(!N.Selectors.Minus(t.token))return t.processNew(e,r);t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Operator,0),t.next(),t.skipNewlines(),t.processNew()}processMultDiv(e=!1,r=!1){let t=this;for(t.processUnaryMinus(e,r);N.SelectorGroups.MultiDivOperators(t.token);)t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Operator,0),t.next(),t.skipNewlines(),t.processUnaryMinus()}processBitwise(e=!1,r=!1){let t=this;for(t.processMultDiv(e,r);It.SelectorGroups.BitwiseOperators(t.token);)t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Operator,0),t.next(),t.skipNewlines(),t.processMultDiv()}processAddSub(e=!1,r=!1){let t=this;for(t.processBitwise(e,r);N.Selectors.Plus(t.token)||N.Selectors.Minus(t.token)&&(!r||!t.token.afterSpace||t._lexer.isAtWhitespace());)t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Operator,0),t.next(),t.skipNewlines(),t.processBitwise()}processComparisons(e=!1,r=!1){let t=this;if(t.processAddSub(e,r),!!N.SelectorGroups.ComparisonOperators(t.token))do t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Operator,0),t.next(),t.skipNewlines(),t.processAddSub();while(N.SelectorGroups.ComparisonOperators(t.token))}processBitwiseAnd(e=!1,r=!1){let t=this;for(t.processComparisons(e,r);It.Selectors.BitwiseAnd(t.token);)t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.processComparisons()}processBitwiseOr(e=!1,r=!1){let t=this;for(t.processBitwiseAnd(e,r);It.Selectors.BitwiseOr(t.token);)t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0),t.next(),t.processBitwiseAnd()}processIsa(e=!1,r=!1){let t=this;t.processBitwiseOr(e,r),N.Selectors.Isa(t.token)&&(t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next(),t.skipNewlines(),t.processBitwiseOr())}processNot(e=!1,r=!1){let t=this;if(N.Selectors.Not(t.token)){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next(),t.skipNewlines(),t.processIsa();return}t.processIsa(e,r)}processAnd(e=!1,r=!1){let t=this;for(t.processNot(e,r);N.Selectors.And(t.token);)t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next(),t.skipNewlines(),t.processNot()}processOr(e=!1,r=!1){let t=this;for(t.processAnd(e,r);N.Selectors.Or(t.token);)t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next(),t.skipNewlines(),t.processAnd()}processFunctionDeclaration(e=!1,r=!1){let t=this;if(!N.Selectors.Function(t.token))return t.processOr(e,r);if(t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Keyword,0),t.next(),!N.SelectorGroups.BlockEndOfLine(t.token)){let i=t.requireToken(N.Selectors.LParenthesis);if(!i)return;for(t._builder.push(i.start.line-1,i.start.character-1,i.value.length,K.Punctuator,0);!N.SelectorGroups.FunctionDeclarationArgEnd(t.token)&&(t.processIdentifier(!1,!0),t.consume(N.Selectors.Assign)&&(t._builder.push(t.previousToken.start.line-1,t.previousToken.start.character-1,t.previousToken.value.length,K.Operator,0),t.processExpr()),!N.Selectors.RParenthesis(t.token));){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0);let o=t.requireToken(N.Selectors.ArgumentSeperator);if(!o)return;if(t._builder.push(o.start.line-1,o.start.character-1,o.value.length,K.Punctuator,0),N.Selectors.RParenthesis(t.token)){t._builder.push(t.token.start.line-1,t.token.start.character-1,t.token.value.length,K.Punctuator,0);break}}let s=t.requireToken(N.Selectors.RParenthesis);if(!s)return;t._builder.push(s.start.line-1,s.start.character-1,s.value.length,K.Punctuator,0)}}processExpr(e=!1,r=!1){this.processFunctionDeclaration(e,r)}processForShortcutStatement(){this.processShortcutStatement()}processForStatement(){let e=this;e.processIdentifier();let r=e.requireToken(N.Selectors.In);r&&(e._builder.push(r.start.line-1,r.start.character-1,r.value.length,K.Keyword,0),e.processExpr(),N.SelectorGroups.BlockEndOfLine(e.token)||e.processForShortcutStatement())}processWhileShortcutStatement(){this.processShortcutStatement()}processWhileStatement(){let e=this;if(e.processExpr(),!N.SelectorGroups.BlockEndOfLine(e.token))return e.processWhileShortcutStatement()}processIfShortcutStatement(){let e=this;e.processShortcutStatement(),N.Selectors.Else(e.token)&&(e._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length,K.Keyword,0),e.next(),e.processShortcutStatement())}processNextIfClause(e){let r=this;switch(e){case N.ASTType.ElseifClause:{r.processExpr();let t=r.requireToken(N.Selectors.Then);if(!t)return;r._builder.push(t.start.line-1,t.start.character-1,t.value.length,K.Keyword,0);break}case N.ASTType.ElseClause:break}}processIfStatement(){let e=this;e.processExpr();let r=e.requireToken(N.Selectors.Then);r&&(e._builder.push(r.start.line-1,r.start.character-1,r.value.length,K.Keyword,0),N.SelectorGroups.BlockEndOfLine(e.token)||e.processIfShortcutStatement())}processReturnStatement(){let e=this;N.SelectorGroups.ReturnStatementEnd(e.token)||e.processExpr()}processAssignment(){let e=this,r=e.token;if(e.processExpr(!0,!0),N.SelectorGroups.AssignmentEndOfExpr(e.token))return;if(N.Selectors.Assign(e.token)){e._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length,K.Operator,0),e.next(),e.processExpr();return}else if(N.SelectorGroups.AssignmentShorthand(e.token)){let i=e.token;e._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length,K.Operator,0),e.next(),e.processExpr();return}let t=[];for(;!N.Selectors.EndOfFile(e.token)&&(e.processExpr(),!(N.SelectorGroups.BlockEndOfLine(e.token)||N.Selectors.Else(e.token)));){if(N.Selectors.ArgumentSeperator(e.token)){e.next(),e.skipNewlines();continue}let i=e.requireTokenOfAny(N.SelectorGroups.AssignmentCommandArgs);if(!i)return;if(N.Selectors.EndOfLine(i)||N.Selectors.EndOfFile(i))break}t.length}processShortcutStatement(){let e=this;if(N.TokenType.Keyword===e.token.type&&N.Keyword.Not!==e.token.value){let r=e.token.value;switch(this._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length,K.Keyword,0),r){case N.Keyword.Return:e.next(),e.processReturnStatement();case N.Keyword.Continue:{e.next();return}case N.Keyword.Break:{e.next();return}default:}}return e.processAssignment()}processPathSegment(){let e=this;if(this.token.type===N.ASTType.StringLiteral){let t=this.token;e._builder.push(t.start.line-1,t.start.character-1,t.raw.length,K.String,0),this.next();return}let r="";for(;!It.SelectorGroups.PathSegmentEnd(e.token);)e._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length,K.String,0),r=r+e.token.value,e.next();return e.consumeMany(It.SelectorGroups.PathSegmentEnd)&&e._builder.push(e.previousToken.start.line-1,e.previousToken.start.character-1,e.previousToken.value.length,K.Punctuator,0),r}processFeatureEnvarExpression(){let e=this;e._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length,K.String,0),e.next()}processFeatureInjectExpression(){this.processPathSegment()}processFeatureImportStatement(){let e=this;e.processIdentifier(),e.consume(It.Selectors.From)&&(e._builder.push(e.previousToken.start.line-1,e.previousToken.start.character-1,e.previousToken.value.length,K.Keyword,0),e.processPathSegment())}processFeatureIncludeStatement(){this.processPathSegment()}processNativeImportCodeStatement(){let e=this;if(e.consume(N.Selectors.LParenthesis)){if(e._builder.push(e.previousToken.start.line-1,e.previousToken.start.character-1,e.previousToken.value.length,K.Punctuator,0),N.TokenType.StringLiteral===e.token.type){let r=e.token;e._builder.push(r.start.line-1,r.start.character-1,r.raw.length,K.String,0),e.next()}else return;if(e.consume(N.Selectors.ImportCodeSeperator)){if(e._builder.push(e.previousToken.start.line-1,e.previousToken.start.character-1,e.previousToken.value.length,K.Punctuator,0),!e.isType(N.TokenType.StringLiteral))return;let r=e.token;e._builder.push(r.start.line-1,r.start.character-1,r.raw.length,K.String,0),e.next()}e.consume(N.Selectors.RParenthesis)&&e._builder.push(e.previousToken.start.line-1,e.previousToken.start.character-1,e.previousToken.value.length,K.Punctuator,0)}}processKeyword(){let e=this,r=e.token.value;switch(this._builder.push(e.token.start.line-1,e.token.start.character-1,e.token.value.length,K.Keyword,0),r){case N.Keyword.Return:{e.next(),e.processReturnStatement();return}case N.Keyword.If:{e.next(),e.processIfStatement();return}case N.Keyword.ElseIf:{e.next(),e.processNextIfClause(N.ASTType.ElseifClause);return}case N.Keyword.Else:{e.next(),e.processNextIfClause(N.ASTType.ElseClause);return}case N.Keyword.While:{e.next(),e.processWhileStatement();return}case N.Keyword.For:{e.next(),e.processForStatement();return}case N.Keyword.EndFunction:{e.next();return}case N.Keyword.EndFor:{e.next();return}case N.Keyword.EndWhile:{e.next();return}case N.Keyword.EndIf:{e.next();return}case N.Keyword.Continue:{e.next();return}case N.Keyword.Break:{e.next();return}case It.GreybelKeyword.Include:case It.GreybelKeyword.IncludeWithComment:{e.next(),e.processFeatureIncludeStatement();return}case It.GreybelKeyword.Import:case It.GreybelKeyword.ImportWithComment:{e.next(),e.processFeatureImportStatement();return}case It.GreybelKeyword.Envar:{e.next(),e.processFeatureEnvarExpression();return}case It.GreybelKeyword.Inject:{e.next(),e.processFeatureInjectExpression();return}case It.GreybelKeyword.Debugger:{e.next();return}case cI.GreyScriptKeyword.ImportCode:e.next(),e.processNativeImportCodeStatement()}}processStatement(){let e=this;if(N.TokenType.Keyword===e.token.type&&N.Keyword.Not!==e.token.value){e.processKeyword();return}e.processAssignment()}process(){let e=this;for(e.next();!N.Selectors.EndOfFile(e.token)&&(e.skipNewlines(),!N.Selectors.EndOfFile(e.token));)e.processStatement()}};function y$(n,e){let r=new cI.Lexer(e.content,{unsafe:!0});return new nv(r,n).process(),n}yn.buildTokens=y$});var pI=S(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});dp.activate=void 0;var b$=pp();function v$(n){n.connection.languages.semanticTokens.on(e=>B(this,null,function*(){let r=yield n.fs.getTextDocument(e.textDocument.uri);if(r==null)return;let t=n.documentManager.get(r);if(!t.document)return;let i=n.createSemanticTokensBuilder();return(0,b$.buildTokens)(i,t),i.build()}))}dp.activate=v$});var dI=S(hp=>{"use strict";Object.defineProperty(hp,"__esModule",{value:!0});hp.buildFoldingRanges=void 0;var Kn=me(),rv=gf(),_$=uc();function w$(n){let e=[];return new _$.ScraperWalker((t,i)=>{if(t.start.line===t.end.line)return null;switch(t.type){case Kn.ASTType.Comment:return e.push({startLine:t.start.line-1,endLine:t.end.line-1,kind:rv.FoldingRangeKind.Comment}),null;case Kn.ASTType.MapConstructorExpression:case Kn.ASTType.ListConstructorExpression:case Kn.ASTType.StringLiteral:case Kn.ASTType.WhileStatement:case Kn.ASTType.ForGenericStatement:case Kn.ASTType.FunctionDeclaration:return e.push({startLine:t.start.line-1,endLine:t.end.line-1,kind:rv.FoldingRangeKind.Region}),null;case Kn.ASTType.IfClause:case Kn.ASTType.ElseifClause:case Kn.ASTType.ElseClause:return e.push({startLine:t.start.line-1,endLine:t.end.line-2,kind:rv.FoldingRangeKind.Region}),null}return null}).visit(n.document),e}hp.buildFoldingRanges=w$});var hI=S(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});fp.activate=void 0;var x$=dI();function k$(n){n.connection.languages.foldingRange.on(e=>B(this,null,function*(){let r=yield n.fs.getTextDocument(e.textDocument.uri);if(r==null)return;let t=n.documentManager.get(r);if(t.document)return(0,x$.buildFoldingRanges)(t)}))}fp.activate=k$});var _I=S((x4,vI)=>{var av=Object.defineProperty,T$=Object.getOwnPropertyDescriptor,S$=Object.getOwnPropertyNames,I$=Object.prototype.hasOwnProperty,E$=(n,e)=>{for(var r in e)av(n,r,{get:e[r],enumerable:!0})},R$=(n,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of S$(e))!I$.call(n,i)&&i!==r&&av(n,i,{get:()=>e[i],enumerable:!(t=T$(e,i))||t.enumerable});return n},P$=n=>R$(av({},"__esModule",{value:!0}),n),fI={};E$(fI,{ScheduleIntervalHelper:()=>iv,SchedulePostMessageHelper:()=>sv,ScheduleSetImmmediateHelper:()=>ov,schedule:()=>A$,scheduleProvider:()=>bI});vI.exports=P$(fI);var C$=Promise.prototype.then.bind(Promise.resolve()),Yn,lv=(Yn=class{constructor(){this.queue=[],this.sleep=0}static isApplicable(){return!1}static createCallback(){throw new Error("Cannot create callback from base schedule helper!")}tick(){let e=this.queue,r=Math.min(e.length,Yn.QUEUE_LIMIT);this.queue=this.queue.slice(Yn.QUEUE_LIMIT);for(let t=0;t<r;C$(e[t++]));if(this.queue.length>0&&(this.sleep=0),this.sleep++<=Yn.SLEEP_LIMIT){this.nextTick();return}this.endTick()}start(){this.isTickActive()||(this.sleep=0,this.startTick())}add(e){this.queue.push(e),this.start()}},Yn.SLEEP_LIMIT=512,Yn.QUEUE_LIMIT=1024,Yn),iv=class mI extends lv{constructor(){super(...arguments),this.timer=null,this.boundTick=this.tick.bind(this)}static isApplicable(){return!!globalThis.setInterval}static createCallback(){let e=new mI;return e.add.bind(e)}isTickActive(){return this.timer!==null}startTick(){this.timer=setInterval(this.boundTick,0)}nextTick(){}endTick(){clearInterval(this.timer),this.timer=null}},O$=()=>{try{return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}catch(n){}return!1},sv=class gI extends lv{constructor(){super(),this.id=(Math.random()+1).toString(36).substring(7),this.active=!1,self.addEventListener("message",this.onMessage.bind(this))}static isApplicable(){return!O$()&&!!self.postMessage&&!!self.addEventListener}static createCallback(){let e=new gI;return e.add.bind(e)}onMessage(e){e.source!==self||e.data!==this.id||this.tick()}isTickActive(){return this.active}startTick(){this.active=!0,self.postMessage(this.id)}nextTick(){self.postMessage(this.id)}endTick(){this.active=!1}},ov=class yI extends lv{constructor(){super(...arguments),this.immediate=null,this.boundTick=this.tick.bind(this)}static isApplicable(){return!!globalThis.setImmediate}static createCallback(){let e=new yI;return e.add.bind(e)}isTickActive(){return this.immediate!==null}startTick(){this.immediate=setImmediate(this.boundTick)}nextTick(){this.immediate=setImmediate(this.boundTick)}endTick(){clearImmediate(this.immediate),this.immediate=null}};function bI(){if(ov.isApplicable())return ov.createCallback();if(sv.isApplicable())return sv.createCallback();if(iv.isApplicable())return iv.createCallback();throw new Error("No schedule helper fulfills requirements!")}var A$=bI()});var xI=S(sn=>{"use strict";var cv=sn&&sn.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(sn,"__esModule",{value:!0});sn.DocumentManager=sn.PROCESSING_TIMEOUT=sn.ActiveDocument=sn.DocumentURIBuilder=void 0;var D$=cv((Xn(),mt(Zn))),j$=zn(),L$=cv(Yl()),wI=_I(),Bs=zl(),M$=cv(va()),_a=class{constructor(e,r=null){this.workspaceFolderUri=r,this.rootPath=e}getFromWorkspaceFolder(e){return this.workspaceFolderUri==null?(console.warn("Workspace folders are not available. Falling back to only relative paths."),Bs.Utils.joinPath(this.rootPath,e).toString()):Bs.Utils.joinPath(this.workspaceFolderUri,e).toString()}getFromRootPath(e){return Bs.Utils.joinPath(this.rootPath,e).toString()}};sn.DocumentURIBuilder=_a;var mp=class{constructor(e){this.documentManager=e.documentManager,this.content=e.content,this.textDocument=e.textDocument,this.document=e.document,this.errors=e.errors}getDirectory(){return Bs.Utils.joinPath(Bs.URI.parse(this.textDocument.uri),"..")}getNativeImports(e=null){return B(this,null,function*(){if(this.document==null)return[];let r=this.document,t=this.getDirectory(),i=new _a(t,e),s=this.documentManager.context;return(yield Promise.all(r.nativeImports.filter(l=>l.directory).map(l=>l.directory.startsWith("/")?s.fs.findExistingPath(i.getFromWorkspaceFolder(l.directory)):s.fs.findExistingPath(i.getFromRootPath(l.directory))))).filter(l=>l!=null)})}getImportsAndIncludes(e=null){return B(this,null,function*(){if(this.document==null)return[];let r=this.document,t=this.getDirectory(),i=this.documentManager.context,s=new _a(t,e),o=u=>u.startsWith("/")?i.fs.findExistingPath(s.getFromWorkspaceFolder(u),s.getFromWorkspaceFolder(`${u}.src`)):i.fs.findExistingPath(s.getFromRootPath(u),s.getFromRootPath(`${u}.src`));return(yield Promise.all([...r.imports.filter(u=>u.path).map(u=>o(u.path)),...r.includes.filter(u=>u.path).map(u=>o(u.path))])).filter(u=>u!=null)})}getDependencies(){return B(this,null,function*(){if(this.document==null)return[];if(this.dependencies)return this.dependencies;let e=yield this.documentManager.context.fs.getWorkspaceFolderUri(Bs.URI.parse(this.textDocument.uri)),r=yield this.getNativeImports(e),t=yield this.getImportsAndIncludes(e),i=new Set([...r,...t]);return this.dependencies=Array.from(i),this.dependencies})}getImports(e=!0){return B(this,null,function*(){if(this.document==null)return[];let r=new Set,t=new Set([this.textDocument.uri]),i=s=>B(this,null,function*(){let o=yield s.getDependencies();for(let l of o){if(t.has(l))continue;let u=yield this.documentManager.open(l);t.add(l),u!==null&&(r.add(u),u.document!==null&&e&&(yield i(u)))}});return yield i(this),Array.from(r)})}};sn.ActiveDocument=mp;sn.PROCESSING_TIMEOUT=100;var uv=class extends D$.default{get context(){return this._context}setContext(e){return this._context=e,this}constructor(e=sn.PROCESSING_TIMEOUT){super(),this._context=null,this._timer=null,this.results=new L$.default({ttl:1e3*60*20,ttlAutopurge:!0}),this.scheduledItems=new Map,this.tickRef=this.tick.bind(this),this.processingTimeout=e}tick(){if(this.scheduledItems.size===0){this._timer=null;return}let e=Date.now(),r=Array.from(this.scheduledItems.values());for(let t=0;t<r.length;t++){let i=r[t];e-i.createdAt>this.processingTimeout&&(0,wI.schedule)(()=>this.refresh(i.document))}this._timer=setTimeout(this.tickRef,0)}refresh(e){let r=e.uri;if(!this.scheduledItems.has(r)&&this.results.has(r))return this.results.get(r);let t=this.create(e);return this.results.set(r,t),this.emit("parsed",e,t),this.scheduledItems.delete(r),t}create(e){let r=e.getText(),t=new j$.Parser(r,{unsafe:!0}),i=t.parseChunk();return this._context.documentMerger.flushCacheKey(e.uri),M$.default.analyze(e.uri,i),new mp({documentManager:this,content:r,textDocument:e,document:i,errors:[...t.lexer.errors,...t.errors]})}schedule(e){var i;let r=e.uri,t=e.getText();return((i=this.results.get(r))==null?void 0:i.content)===t?!1:(this.scheduledItems.set(r,{document:e,createdAt:Date.now()}),this._timer===null&&(this._timer=setTimeout(this.tickRef,0)),!0)}open(e){return B(this,null,function*(){try{let r=yield this.context.fs.getTextDocument(e);return r==null?null:this.get(r)}catch(r){return null}})}get(e){return this.results.get(e.uri)||this.refresh(e)}getLatest(e,r=5e3){return new Promise(t=>{(0,wI.schedule)(()=>{if(!this.scheduledItems.has(e.uri))return t(this.get(e));let i=()=>{this.removeListener("parsed",s),t(this.get(e))},s=l=>{l.uri===e.uri&&(this.removeListener("parsed",s),clearTimeout(o),t(this.get(e)))},o=setTimeout(i,r);this.addListener("parsed",s)})})}clear(e){this.results.delete(e.uri),this.emit("cleared",e)}};sn.DocumentManager=uv});var pv=S(gp=>{"use strict";Object.defineProperty(gp,"__esModule",{value:!0});gp.hash=void 0;function q$(n){let e=5381,r=n.length;for(;r;)e=e*33^n.charCodeAt(--r);return e>>>0}gp.hash=q$});var II=S(Ws=>{"use strict";var SI=Ws&&Ws.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ws,"__esModule",{value:!0});Ws.DocumentMerger=void 0;var F$=SI(Yl()),kI=pv(),TI=SI(va()),dv=class{constructor(){this.keyToDocumentUriMap=new Map,this.results=new F$.default({ttl:1e3*60*20,ttlAutopurge:!0})}createCacheKey(e,r){let t=(0,kI.hash)(`${e.uri}-${e.version}`);for(let i=0;i<r.length;i++){let s=r[i];t^=(0,kI.hash)(`${s.textDocument.uri}-${s.textDocument.version}`),t=t>>>0}return t}registerCacheKey(e,r){this.flushCacheKey(r),this.keyToDocumentUriMap.set(r,e)}flushCacheKey(e){let r=this.keyToDocumentUriMap.get(e);r&&(this.results.delete(r),this.keyToDocumentUriMap.delete(e))}process(e,r,t){return B(this,null,function*(){let i=e.uri;if(t.has(i))return t.get(i);let s=TI.default.get(i);if(t.set(i,null),!s)return null;let o=[],l=yield r.documentManager.get(e).getImports(),u=this.createCacheKey(e,l);if(this.results.has(u))return this.results.get(u);this.registerCacheKey(u,i);let a=yield r.documentManager.get(e).getDependencies();yield Promise.all(a.map(p=>B(this,null,function*(){let d=r.documentManager.results.get(p);if(!d)return;let{document:h,textDocument:g}=d;if(!h)return;let f=yield this.process(g,r,t);f!==null&&o.push(f)})));let c=s.merge(...o);return t.set(i,c),this.results.set(u,c),c})}build(e,r){return B(this,null,function*(){let t=e.uri,i=TI.default.get(t);if(!i)return null;let s=[],o=yield r.documentManager.get(e).getImports(),l=this.createCacheKey(e,o);if(this.results.has(l))return this.results.get(l);this.registerCacheKey(l,t);let u=yield r.documentManager.get(e).getDependencies(),a=new Map([[t,null]]);yield Promise.all(u.map(p=>B(this,null,function*(){let d=r.documentManager.results.get(p);if(!d)return;let{document:h,textDocument:g}=d;if(!h)return;let f=yield this.process(g,r,a);f!==null&&s.push(f)})));let c=i.merge(...s);return this.results.set(l,c),c})}};Ws.DocumentMerger=dv});var PI=S(Vs=>{"use strict";var N$=Vs&&Vs.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Vs,"__esModule",{value:!0});Vs.CoreContext=void 0;var $$=N$((Xn(),mt(Zn))),hv=Xi(),EI=pp();function RI(n){var e,r,t,i,s,o,l,u,a,c,p,d,h;return{formatter:(e=n==null?void 0:n.formatter)!=null?e:!0,autocomplete:(r=n==null?void 0:n.autocomplete)!=null?r:!0,hoverdocs:(t=n==null?void 0:n.hoverdocs)!=null?t:!0,diagnostic:(i=n==null?void 0:n.diagnostic)!=null?i:!0,transpiler:{beautify:{keepParentheses:(l=(o=(s=n==null?void 0:n.transpiler)==null?void 0:s.beautify)==null?void 0:o.keepParentheses)!=null?l:!0,indentation:(c=(a=(u=n==null?void 0:n.transpiler)==null?void 0:u.beautify)==null?void 0:a.indentation)!=null?c:hv.IndentationType.Tab,indentationSpaces:(h=(d=(p=n==null?void 0:n.transpiler)==null?void 0:p.beautify)==null?void 0:d.indentationSpaces)!=null?h:2}}}}var fv=class extends $$.default{constructor(){super(),this._configuration=RI(),this._features={configuration:!1,workspaceFolder:!1}}get features(){return this._features}getConfiguration(){return this._configuration}syncConfiguraton(){return B(this,null,function*(){let e=yield this.connection.workspace.getConfiguration(hv.ConfigurationNamespace);this._configuration=RI(e)})}configureCapabilties(e){this._features.configuration=!!(e.workspace&&e.workspace.configuration),this._features.workspaceFolder=!!(e.workspace&&e.workspace.workspaceFolders)}onInitialize(e){return B(this,null,function*(){this.configureCapabilties(e.capabilities);let r={capabilities:{completionProvider:{triggerCharacters:["."],resolveProvider:!0},hoverProvider:!0,colorProvider:!0,definitionProvider:!0,foldingRangeProvider:!0,documentFormattingProvider:!0,signatureHelpProvider:{triggerCharacters:[",","("]},documentSymbolProvider:!0,workspaceSymbolProvider:!0,diagnosticProvider:{identifier:hv.LanguageId,interFileDependencies:!1,workspaceDiagnostics:!1},semanticTokensProvider:{legend:{tokenTypes:EI.semanticTokensLegend.tokenTypes,tokenModifiers:EI.semanticTokensLegend.tokenModifiers},full:!0},textDocumentSync:2}};return this._features.workspaceFolder&&(r.capabilities.workspace={workspaceFolders:{supported:!0}}),this.emit("ready",this),r})}onInitialized(e){return B(this,null,function*(){this._features.configuration&&(yield this.syncConfiguraton(),this.connection.onDidChangeConfiguration(()=>B(this,null,function*(){let r=this._configuration;yield this.syncConfiguraton(),this.emit("configuration-change",this,this._configuration,r)}))),this.emit("loaded",this)})}listen(){return B(this,null,function*(){this.fs.listen(this.connection),this.connection.onInitialize(this.onInitialize.bind(this)),this.connection.onInitialized(this.onInitialized.bind(this)),this.connection.listen()})}};Vs.CoreContext=fv});var yp=S(V=>{"use strict";var U$=V&&V.__createBinding||(Object.create?function(n,e,r,t){t===void 0&&(t=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(n,t,i)}:function(n,e,r,t){t===void 0&&(t=r),n[t]=e[r]}),B$=V&&V.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),W$=V&&V.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var r in n)r!=="default"&&Object.prototype.hasOwnProperty.call(n,r)&&U$(e,n,r);return B$(e,n),e},V$=V&&V.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(V,"__esModule",{value:!0});V.CoreContext=V.buildTokens=V.semanticTokensLegend=V.lookupBase=V.lookupIdentifier=V.typeAnalyzer=V.appendTooltipHeader=V.appendTooltipBody=V.formatTypes=V.formatDefaultValue=V.createTooltipHeader=V.createSignatureInfo=V.createHover=V.hash=V.MarkdownString=V.LookupHelper=V.DocumentMerger=V.DocumentManager=V.ActiveDocument=V.ASTScraper=V.activateFoldingRange=V.activateSemantic=V.activateSymbol=V.activateSubscriptions=V.activateSignature=V.activateHover=V.activateFormatter=V.activateDiagnostic=V.activateDefinition=V.activateColor=V.activateAutocomplete=V.ConfigurationNamespace=V.LanguageId=V.IndentationType=void 0;var mv=Xi();Object.defineProperty(V,"IndentationType",{enumerable:!0,get:function(){return mv.IndentationType}});Object.defineProperty(V,"LanguageId",{enumerable:!0,get:function(){return mv.LanguageId}});Object.defineProperty(V,"ConfigurationNamespace",{enumerable:!0,get:function(){return mv.ConfigurationNamespace}});var H$=NS();Object.defineProperty(V,"activateAutocomplete",{enumerable:!0,get:function(){return H$.activate}});var z$=YS();Object.defineProperty(V,"activateColor",{enumerable:!0,get:function(){return z$.activate}});var G$=QS();Object.defineProperty(V,"activateDefinition",{enumerable:!0,get:function(){return G$.activate}});var K$=JS();Object.defineProperty(V,"activateDiagnostic",{enumerable:!0,get:function(){return K$.activate}});var Y$=N0();Object.defineProperty(V,"activateFormatter",{enumerable:!0,get:function(){return Y$.activate}});var Q$=z0();Object.defineProperty(V,"activateHover",{enumerable:!0,get:function(){return Q$.activate}});var J$=K0();Object.defineProperty(V,"activateSignature",{enumerable:!0,get:function(){return J$.activate}});var Z$=Q0();Object.defineProperty(V,"activateSubscriptions",{enumerable:!0,get:function(){return Z$.activate}});var X$=aI();Object.defineProperty(V,"activateSymbol",{enumerable:!0,get:function(){return X$.activate}});var e2=pI();Object.defineProperty(V,"activateSemantic",{enumerable:!0,get:function(){return e2.activate}});var t2=hI();Object.defineProperty(V,"activateFoldingRange",{enumerable:!0,get:function(){return t2.activate}});V.ASTScraper=W$(uc());var CI=xI();Object.defineProperty(V,"ActiveDocument",{enumerable:!0,get:function(){return CI.ActiveDocument}});Object.defineProperty(V,"DocumentManager",{enumerable:!0,get:function(){return CI.DocumentManager}});var n2=II();Object.defineProperty(V,"DocumentMerger",{enumerable:!0,get:function(){return n2.DocumentMerger}});var r2=ks();Object.defineProperty(V,"LookupHelper",{enumerable:!0,get:function(){return r2.LookupHelper}});var i2=ap();Object.defineProperty(V,"MarkdownString",{enumerable:!0,get:function(){return i2.MarkdownString}});var s2=pv();Object.defineProperty(V,"hash",{enumerable:!0,get:function(){return s2.hash}});var _i=lp();Object.defineProperty(V,"createHover",{enumerable:!0,get:function(){return _i.createHover}});Object.defineProperty(V,"createSignatureInfo",{enumerable:!0,get:function(){return _i.createSignatureInfo}});Object.defineProperty(V,"createTooltipHeader",{enumerable:!0,get:function(){return _i.createTooltipHeader}});Object.defineProperty(V,"formatDefaultValue",{enumerable:!0,get:function(){return _i.formatDefaultValue}});Object.defineProperty(V,"formatTypes",{enumerable:!0,get:function(){return _i.formatTypes}});Object.defineProperty(V,"appendTooltipBody",{enumerable:!0,get:function(){return _i.appendTooltipBody}});Object.defineProperty(V,"appendTooltipHeader",{enumerable:!0,get:function(){return _i.appendTooltipHeader}});var o2=va();Object.defineProperty(V,"typeAnalyzer",{enumerable:!0,get:function(){return V$(o2).default}});var OI=Py();Object.defineProperty(V,"lookupIdentifier",{enumerable:!0,get:function(){return OI.lookupIdentifier}});Object.defineProperty(V,"lookupBase",{enumerable:!0,get:function(){return OI.lookupBase}});var AI=pp();Object.defineProperty(V,"semanticTokensLegend",{enumerable:!0,get:function(){return AI.semanticTokensLegend}});Object.defineProperty(V,"buildTokens",{enumerable:!0,get:function(){return AI.buildTokens}});var a2=PI();Object.defineProperty(V,"CoreContext",{enumerable:!0,get:function(){return a2.CoreContext}})});var MI=S(ar=>{"use strict";var jI=ar&&ar.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ar,"__esModule",{value:!0});ar.FileSystem=ar.FileSystemRequest=void 0;var l2=yf(),DI=(Vk(),mt(Wk)),u2=jI((Xn(),mt(Zn))),gv=zl(),c2=jI(Yl()),p2=yp(),LI;(function(n){n.FileContent="read-file"})(LI=ar.FileSystemRequest||(ar.FileSystemRequest={}));var yv=class extends u2.default{constructor(e){super(),this._context=e,this._textDocumentManager=new l2.TextDocuments(DI.TextDocument),this._tempTextDocumentCache=new c2.default({ttl:1e3,max:100})}getWorkspaceFolderUris(){return B(this,null,function*(){if(!this._context.features.workspaceFolder)return[];let e=yield this._workspace.getWorkspaceFolders();return e==null?[]:Array.from(new Set(e.map(r=>r.uri))).map(r=>gv.URI.parse(r))})}getWorkspaceFolderUri(e){return B(this,null,function*(){return(yield this.getWorkspaceFolderUris()).find(t=>e.path.startsWith(t.path))||null})}findExistingPath(...e){return B(this,null,function*(){if(e.length===0)return null;for(let r=0;r<e.length;r++)if((yield this.getTextDocument(e[r]))!=null)return e[r];return null})}getAllTextDocuments(){return this._textDocumentManager.all()}requestFileContent(e){return B(this,null,function*(){let r=`custom/${LI.FileContent}`;try{return yield this._context.connection.sendRequest(r,e.toString())}catch(t){return console.error(`Cannot fetch text document! Maybe the client does not support ${r}`,t),null}})}fetchTextDocument(e){return B(this,null,function*(){let r=gv.URI.parse(e),t=this._tempTextDocumentCache.get(e);if(t!=null)return t;let i=null,s=yield this.requestFileContent(r);return s!=null&&(i=DI.TextDocument.create(e,p2.LanguageId,0,s)),this._tempTextDocumentCache.set(e,i),i})}getTextDocument(e){return B(this,null,function*(){let r=this._textDocumentManager.get(e);return r||(gv.URI.parse(e).scheme=="file"?yield this.fetchTextDocument(e):null)})}readFile(e){return B(this,null,function*(){return(yield this.getTextDocument(e)).getText()})}listen(e){this._workspace=e.workspace,this._textDocumentManager.listen(e),this._textDocumentManager.onDidOpen(r=>{this.emit("text-document-open",r.document)}),this._textDocumentManager.onDidChangeContent(r=>{this.emit("text-document-change",r.document)}),this._textDocumentManager.onDidClose(r=>{this.emit("text-document-close",r.document)})}};ar.FileSystem=yv});var qI=S(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});bp.BrowserContext=void 0;var wa=yf(),d2=MI(),bv=yp(),vv=class extends bv.CoreContext{constructor(){super(),this.documentManager=new bv.DocumentManager().setContext(this),this.documentMerger=new bv.DocumentMerger,this._messageReader=new wa.BrowserMessageReader(self),this._messageWriter=new wa.BrowserMessageWriter(self),this.connection=(0,wa.createConnection)(wa.ProposedFeatures.all,this._messageReader,this._messageWriter),this.fs=new d2.FileSystem(this)}createSemanticTokensBuilder(){return new wa.SemanticTokensBuilder}};bp.BrowserContext=vv});var f2=S(NI=>{Object.defineProperty(NI,"__esModule",{value:!0});var h2=qI(),En=yp(),FI=new h2.BrowserContext;FI.on("ready",n=>{(0,En.activateAutocomplete)(n),(0,En.activateColor)(n),(0,En.activateDefinition)(n),(0,En.activateDiagnostic)(n),(0,En.activateFormatter)(n),(0,En.activateHover)(n),(0,En.activateSignature)(n),(0,En.activateSubscriptions)(n),(0,En.activateSymbol)(n),(0,En.activateSemantic)(n),(0,En.activateFoldingRange)(n)});FI.listen()});f2();})();