greybel-languageserver-browser 1.1.0 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +6 -6
- package/package.json +4 -4
package/index.js
CHANGED
@@ -32,7 +32,7 @@ ${JSON.stringify(C,null,4)}`);let M=C;if($e.string(M.id)||$e.number(M.id)){let F
|
|
32
32
|
`,`\r
|
33
33
|
`,"\r"];(function(t){function e(s,o,l,c){return new ih(s,o,l,c)}t.create=e;function n(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))}t.is=n;function r(s,o){let l=s.getText(),c=i(o,(u,d)=>{let p=u.range.start.line-d.range.start.line;return p===0?u.range.start.character-d.range.start.character:p}),a=l.length;for(let u=c.length-1;u>=0;u--){let d=c[u],p=s.offsetAt(d.range.start),h=s.offsetAt(d.range.end);if(h<=a)l=l.substring(0,p)+d.newText+l.substring(h,l.length);else throw new Error("Overlapping edit");a=p}return l}t.applyEdits=r;function i(s,o){if(s.length<=1)return s;let l=s.length/2|0,c=s.slice(0,l),a=s.slice(l);i(c,o),i(a,o);let u=0,d=0,p=0;for(;u<c.length&&d<a.length;)o(c[u],a[d])<=0?s[p++]=c[u++]:s[p++]=a[d++];for(;u<c.length;)s[p++]=c[u++];for(;d<a.length;)s[p++]=a[d++];return s}})(rh||(rh={}));ih=class{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,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 n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){this._content=e.text,this._version=n,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],n=this._content,r=!0;for(let i=0;i<n.length;i++){r&&(e.push(i),r=!1);let s=n.charAt(i);r=s==="\r"||s===`
|
34
34
|
`,s==="\r"&&i+1<n.length&&n.charAt(i+1)===`
|
35
|
-
`&&i++}r&&n.length>0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return Jt.create(0,e);for(;r<i;){let o=Math.floor((r+i)/2);n[o]>e?i=o:r=o+1}let s=r-1;return Jt.create(s,e-n[s])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}};(function(t){let e=Object.prototype.toString;function n(h){return typeof h!="undefined"}t.defined=n;function r(h){return typeof h=="undefined"}t.undefined=r;function i(h){return h===!0||h===!1}t.boolean=i;function s(h){return e.call(h)==="[object String]"}t.string=s;function o(h){return e.call(h)==="[object Number]"}t.number=o;function l(h,m,f){return e.call(h)==="[object Number]"&&m<=h&&h<=f}t.numberRange=l;function c(h){return e.call(h)==="[object Number]"&&-2147483648<=h&&h<=2147483647}t.integer=c;function a(h){return e.call(h)==="[object Number]"&&0<=h&&h<=2147483647}t.uinteger=a;function u(h){return e.call(h)==="[object Function]"}t.func=u;function d(h){return h!==null&&typeof h=="object"}t.objectLiteral=d;function p(h,m){return Array.isArray(h)&&h.every(m)}t.typedArray=p})(D||(D={}))});var Le=T(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.ProtocolNotificationType=Lt.ProtocolNotificationType0=Lt.ProtocolRequestType=Lt.ProtocolRequestType0=Lt.RegistrationType=Lt.MessageDirection=void 0;var Pi=Nr(),iv;(function(t){t.clientToServer="clientToServer",t.serverToClient="serverToClient",t.both="both"})(iv||(Lt.MessageDirection=iv={}));var sh=class{constructor(e){this.method=e}};Lt.RegistrationType=sh;var oh=class extends Pi.RequestType0{constructor(e){super(e)}};Lt.ProtocolRequestType0=oh;var ah=class extends Pi.RequestType{constructor(e){super(e,Pi.ParameterStructures.byName)}};Lt.ProtocolRequestType=ah;var lh=class extends Pi.NotificationType0{constructor(e){super(e)}};Lt.ProtocolNotificationType0=lh;var ch=class extends Pi.NotificationType{constructor(e){super(e,Pi.ParameterStructures.byName)}};Lt.ProtocolNotificationType=ch});var qa=T(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.objectLiteral=tt.typedArray=tt.stringArray=tt.array=tt.func=tt.error=tt.number=tt.string=tt.boolean=void 0;function kI(t){return t===!0||t===!1}tt.boolean=kI;function sv(t){return typeof t=="string"||t instanceof String}tt.string=sv;function TI(t){return typeof t=="number"||t instanceof Number}tt.number=TI;function II(t){return t instanceof Error}tt.error=II;function EI(t){return typeof t=="function"}tt.func=EI;function ov(t){return Array.isArray(t)}tt.array=ov;function CI(t){return ov(t)&&t.every(e=>sv(e))}tt.stringArray=CI;function RI(t,e){return Array.isArray(t)&&t.every(e)}tt.typedArray=RI;function PI(t){return t!==null&&typeof t=="object"}tt.objectLiteral=PI});var cv=T(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.ImplementationRequest=void 0;var av=Le(),lv;(function(t){t.method="textDocument/implementation",t.messageDirection=av.MessageDirection.clientToServer,t.type=new av.ProtocolRequestType(t.method)})(lv||(Fa.ImplementationRequest=lv={}))});var pv=T(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.TypeDefinitionRequest=void 0;var uv=Le(),dv;(function(t){t.method="textDocument/typeDefinition",t.messageDirection=uv.MessageDirection.clientToServer,t.type=new uv.ProtocolRequestType(t.method)})(dv||(Na.TypeDefinitionRequest=dv={}))});var mv=T(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.DidChangeWorkspaceFoldersNotification=Ai.WorkspaceFoldersRequest=void 0;var $a=Le(),hv;(function(t){t.method="workspace/workspaceFolders",t.messageDirection=$a.MessageDirection.serverToClient,t.type=new $a.ProtocolRequestType0(t.method)})(hv||(Ai.WorkspaceFoldersRequest=hv={}));var fv;(function(t){t.method="workspace/didChangeWorkspaceFolders",t.messageDirection=$a.MessageDirection.clientToServer,t.type=new $a.ProtocolNotificationType(t.method)})(fv||(Ai.DidChangeWorkspaceFoldersNotification=fv={}))});var bv=T(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});Ba.ConfigurationRequest=void 0;var gv=Le(),yv;(function(t){t.method="workspace/configuration",t.messageDirection=gv.MessageDirection.serverToClient,t.type=new gv.ProtocolRequestType(t.method)})(yv||(Ba.ConfigurationRequest=yv={}))});var wv=T(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.ColorPresentationRequest=Oi.DocumentColorRequest=void 0;var Ua=Le(),vv;(function(t){t.method="textDocument/documentColor",t.messageDirection=Ua.MessageDirection.clientToServer,t.type=new Ua.ProtocolRequestType(t.method)})(vv||(Oi.DocumentColorRequest=vv={}));var _v;(function(t){t.method="textDocument/colorPresentation",t.messageDirection=Ua.MessageDirection.clientToServer,t.type=new Ua.ProtocolRequestType(t.method)})(_v||(Oi.ColorPresentationRequest=_v={}))});var kv=T(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.FoldingRangeRefreshRequest=Di.FoldingRangeRequest=void 0;var Wa=Le(),xv;(function(t){t.method="textDocument/foldingRange",t.messageDirection=Wa.MessageDirection.clientToServer,t.type=new Wa.ProtocolRequestType(t.method)})(xv||(Di.FoldingRangeRequest=xv={}));var Sv;(function(t){t.method="workspace/foldingRange/refresh",t.messageDirection=Wa.MessageDirection.serverToClient,t.type=new Wa.ProtocolRequestType0(t.method)})(Sv||(Di.FoldingRangeRefreshRequest=Sv={}))});var Ev=T(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.DeclarationRequest=void 0;var Tv=Le(),Iv;(function(t){t.method="textDocument/declaration",t.messageDirection=Tv.MessageDirection.clientToServer,t.type=new Tv.ProtocolRequestType(t.method)})(Iv||(Va.DeclarationRequest=Iv={}))});var Pv=T(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});Ha.SelectionRangeRequest=void 0;var Cv=Le(),Rv;(function(t){t.method="textDocument/selectionRange",t.messageDirection=Cv.MessageDirection.clientToServer,t.type=new Cv.ProtocolRequestType(t.method)})(Rv||(Ha.SelectionRangeRequest=Rv={}))});var jv=T(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.WorkDoneProgressCancelNotification=or.WorkDoneProgressCreateRequest=or.WorkDoneProgress=void 0;var AI=Nr(),za=Le(),Av;(function(t){t.type=new AI.ProgressType;function e(n){return n===t.type}t.is=e})(Av||(or.WorkDoneProgress=Av={}));var Ov;(function(t){t.method="window/workDoneProgress/create",t.messageDirection=za.MessageDirection.serverToClient,t.type=new za.ProtocolRequestType(t.method)})(Ov||(or.WorkDoneProgressCreateRequest=Ov={}));var Dv;(function(t){t.method="window/workDoneProgress/cancel",t.messageDirection=za.MessageDirection.clientToServer,t.type=new za.ProtocolNotificationType(t.method)})(Dv||(or.WorkDoneProgressCancelNotification=Dv={}))});var Fv=T(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.CallHierarchyOutgoingCallsRequest=ar.CallHierarchyIncomingCallsRequest=ar.CallHierarchyPrepareRequest=void 0;var ji=Le(),Lv;(function(t){t.method="textDocument/prepareCallHierarchy",t.messageDirection=ji.MessageDirection.clientToServer,t.type=new ji.ProtocolRequestType(t.method)})(Lv||(ar.CallHierarchyPrepareRequest=Lv={}));var Mv;(function(t){t.method="callHierarchy/incomingCalls",t.messageDirection=ji.MessageDirection.clientToServer,t.type=new ji.ProtocolRequestType(t.method)})(Mv||(ar.CallHierarchyIncomingCallsRequest=Mv={}));var qv;(function(t){t.method="callHierarchy/outgoingCalls",t.messageDirection=ji.MessageDirection.clientToServer,t.type=new ji.ProtocolRequestType(t.method)})(qv||(ar.CallHierarchyOutgoingCallsRequest=qv={}))});var Vv=T(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.SemanticTokensRefreshRequest=Mt.SemanticTokensRangeRequest=Mt.SemanticTokensDeltaRequest=Mt.SemanticTokensRequest=Mt.SemanticTokensRegistrationType=Mt.TokenFormat=void 0;var Nn=Le(),Nv;(function(t){t.Relative="relative"})(Nv||(Mt.TokenFormat=Nv={}));var Ys;(function(t){t.method="textDocument/semanticTokens",t.type=new Nn.RegistrationType(t.method)})(Ys||(Mt.SemanticTokensRegistrationType=Ys={}));var $v;(function(t){t.method="textDocument/semanticTokens/full",t.messageDirection=Nn.MessageDirection.clientToServer,t.type=new Nn.ProtocolRequestType(t.method),t.registrationMethod=Ys.method})($v||(Mt.SemanticTokensRequest=$v={}));var Bv;(function(t){t.method="textDocument/semanticTokens/full/delta",t.messageDirection=Nn.MessageDirection.clientToServer,t.type=new Nn.ProtocolRequestType(t.method),t.registrationMethod=Ys.method})(Bv||(Mt.SemanticTokensDeltaRequest=Bv={}));var Uv;(function(t){t.method="textDocument/semanticTokens/range",t.messageDirection=Nn.MessageDirection.clientToServer,t.type=new Nn.ProtocolRequestType(t.method),t.registrationMethod=Ys.method})(Uv||(Mt.SemanticTokensRangeRequest=Uv={}));var Wv;(function(t){t.method="workspace/semanticTokens/refresh",t.messageDirection=Nn.MessageDirection.serverToClient,t.type=new Nn.ProtocolRequestType0(t.method)})(Wv||(Mt.SemanticTokensRefreshRequest=Wv={}))});var Gv=T(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});Ga.ShowDocumentRequest=void 0;var Hv=Le(),zv;(function(t){t.method="window/showDocument",t.messageDirection=Hv.MessageDirection.serverToClient,t.type=new Hv.ProtocolRequestType(t.method)})(zv||(Ga.ShowDocumentRequest=zv={}))});var Qv=T(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});Ka.LinkedEditingRangeRequest=void 0;var Kv=Le(),Yv;(function(t){t.method="textDocument/linkedEditingRange",t.messageDirection=Kv.MessageDirection.clientToServer,t.type=new Kv.ProtocolRequestType(t.method)})(Yv||(Ka.LinkedEditingRangeRequest=Yv={}))});var i_=T(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.WillDeleteFilesRequest=kt.DidDeleteFilesNotification=kt.DidRenameFilesNotification=kt.WillRenameFilesRequest=kt.DidCreateFilesNotification=kt.WillCreateFilesRequest=kt.FileOperationPatternKind=void 0;var Xt=Le(),Jv;(function(t){t.file="file",t.folder="folder"})(Jv||(kt.FileOperationPatternKind=Jv={}));var Xv;(function(t){t.method="workspace/willCreateFiles",t.messageDirection=Xt.MessageDirection.clientToServer,t.type=new Xt.ProtocolRequestType(t.method)})(Xv||(kt.WillCreateFilesRequest=Xv={}));var Zv;(function(t){t.method="workspace/didCreateFiles",t.messageDirection=Xt.MessageDirection.clientToServer,t.type=new Xt.ProtocolNotificationType(t.method)})(Zv||(kt.DidCreateFilesNotification=Zv={}));var e_;(function(t){t.method="workspace/willRenameFiles",t.messageDirection=Xt.MessageDirection.clientToServer,t.type=new Xt.ProtocolRequestType(t.method)})(e_||(kt.WillRenameFilesRequest=e_={}));var t_;(function(t){t.method="workspace/didRenameFiles",t.messageDirection=Xt.MessageDirection.clientToServer,t.type=new Xt.ProtocolNotificationType(t.method)})(t_||(kt.DidRenameFilesNotification=t_={}));var n_;(function(t){t.method="workspace/didDeleteFiles",t.messageDirection=Xt.MessageDirection.clientToServer,t.type=new Xt.ProtocolNotificationType(t.method)})(n_||(kt.DidDeleteFilesNotification=n_={}));var r_;(function(t){t.method="workspace/willDeleteFiles",t.messageDirection=Xt.MessageDirection.clientToServer,t.type=new Xt.ProtocolRequestType(t.method)})(r_||(kt.WillDeleteFilesRequest=r_={}))});var c_=T(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.MonikerRequest=lr.MonikerKind=lr.UniquenessLevel=void 0;var s_=Le(),o_;(function(t){t.document="document",t.project="project",t.group="group",t.scheme="scheme",t.global="global"})(o_||(lr.UniquenessLevel=o_={}));var a_;(function(t){t.$import="import",t.$export="export",t.local="local"})(a_||(lr.MonikerKind=a_={}));var l_;(function(t){t.method="textDocument/moniker",t.messageDirection=s_.MessageDirection.clientToServer,t.type=new s_.ProtocolRequestType(t.method)})(l_||(lr.MonikerRequest=l_={}))});var h_=T(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.TypeHierarchySubtypesRequest=cr.TypeHierarchySupertypesRequest=cr.TypeHierarchyPrepareRequest=void 0;var Li=Le(),u_;(function(t){t.method="textDocument/prepareTypeHierarchy",t.messageDirection=Li.MessageDirection.clientToServer,t.type=new Li.ProtocolRequestType(t.method)})(u_||(cr.TypeHierarchyPrepareRequest=u_={}));var d_;(function(t){t.method="typeHierarchy/supertypes",t.messageDirection=Li.MessageDirection.clientToServer,t.type=new Li.ProtocolRequestType(t.method)})(d_||(cr.TypeHierarchySupertypesRequest=d_={}));var p_;(function(t){t.method="typeHierarchy/subtypes",t.messageDirection=Li.MessageDirection.clientToServer,t.type=new Li.ProtocolRequestType(t.method)})(p_||(cr.TypeHierarchySubtypesRequest=p_={}))});var g_=T(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.InlineValueRefreshRequest=Mi.InlineValueRequest=void 0;var Ya=Le(),f_;(function(t){t.method="textDocument/inlineValue",t.messageDirection=Ya.MessageDirection.clientToServer,t.type=new Ya.ProtocolRequestType(t.method)})(f_||(Mi.InlineValueRequest=f_={}));var m_;(function(t){t.method="workspace/inlineValue/refresh",t.messageDirection=Ya.MessageDirection.serverToClient,t.type=new Ya.ProtocolRequestType0(t.method)})(m_||(Mi.InlineValueRefreshRequest=m_={}))});var __=T(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.InlayHintRefreshRequest=ur.InlayHintResolveRequest=ur.InlayHintRequest=void 0;var qi=Le(),y_;(function(t){t.method="textDocument/inlayHint",t.messageDirection=qi.MessageDirection.clientToServer,t.type=new qi.ProtocolRequestType(t.method)})(y_||(ur.InlayHintRequest=y_={}));var b_;(function(t){t.method="inlayHint/resolve",t.messageDirection=qi.MessageDirection.clientToServer,t.type=new qi.ProtocolRequestType(t.method)})(b_||(ur.InlayHintResolveRequest=b_={}));var v_;(function(t){t.method="workspace/inlayHint/refresh",t.messageDirection=qi.MessageDirection.serverToClient,t.type=new qi.ProtocolRequestType0(t.method)})(v_||(ur.InlayHintRefreshRequest=v_={}))});var E_=T(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.DiagnosticRefreshRequest=Zt.WorkspaceDiagnosticRequest=Zt.DocumentDiagnosticRequest=Zt.DocumentDiagnosticReportKind=Zt.DiagnosticServerCancellationData=void 0;var I_=Nr(),OI=qa(),Fi=Le(),w_;(function(t){function e(n){let r=n;return r&&OI.boolean(r.retriggerRequest)}t.is=e})(w_||(Zt.DiagnosticServerCancellationData=w_={}));var x_;(function(t){t.Full="full",t.Unchanged="unchanged"})(x_||(Zt.DocumentDiagnosticReportKind=x_={}));var S_;(function(t){t.method="textDocument/diagnostic",t.messageDirection=Fi.MessageDirection.clientToServer,t.type=new Fi.ProtocolRequestType(t.method),t.partialResult=new I_.ProgressType})(S_||(Zt.DocumentDiagnosticRequest=S_={}));var k_;(function(t){t.method="workspace/diagnostic",t.messageDirection=Fi.MessageDirection.clientToServer,t.type=new Fi.ProtocolRequestType(t.method),t.partialResult=new I_.ProgressType})(k_||(Zt.WorkspaceDiagnosticRequest=k_={}));var T_;(function(t){t.method="workspace/diagnostic/refresh",t.messageDirection=Fi.MessageDirection.serverToClient,t.type=new Fi.ProtocolRequestType0(t.method)})(T_||(Zt.DiagnosticRefreshRequest=T_={}))});var j_=T(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.DidCloseNotebookDocumentNotification=Ue.DidSaveNotebookDocumentNotification=Ue.DidChangeNotebookDocumentNotification=Ue.NotebookCellArrayChange=Ue.DidOpenNotebookDocumentNotification=Ue.NotebookDocumentSyncRegistrationType=Ue.NotebookDocument=Ue.NotebookCell=Ue.ExecutionSummary=Ue.NotebookCellKind=void 0;var Qs=(Ma(),Qe(La)),un=qa(),xn=Le(),uh;(function(t){t.Markup=1,t.Code=2;function e(n){return n===1||n===2}t.is=e})(uh||(Ue.NotebookCellKind=uh={}));var dh;(function(t){function e(i,s){let o={executionOrder:i};return(s===!0||s===!1)&&(o.success=s),o}t.create=e;function n(i){let s=i;return un.objectLiteral(s)&&Qs.uinteger.is(s.executionOrder)&&(s.success===void 0||un.boolean(s.success))}t.is=n;function r(i,s){return i===s?!0:i==null||s===null||s===void 0?!1:i.executionOrder===s.executionOrder&&i.success===s.success}t.equals=r})(dh||(Ue.ExecutionSummary=dh={}));var Qa;(function(t){function e(s,o){return{kind:s,document:o}}t.create=e;function n(s){let o=s;return un.objectLiteral(o)&&uh.is(o.kind)&&Qs.DocumentUri.is(o.document)&&(o.metadata===void 0||un.objectLiteral(o.metadata))}t.is=n;function r(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)&&!dh.equals(s.executionSummary,o.executionSummary)&&l.add("executionSummary"),l}t.diff=r;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),c=Array.isArray(o);if(l!==c)return!1;if(l&&c){if(s.length!==o.length)return!1;for(let a=0;a<s.length;a++)if(!i(s[a],o[a]))return!1}if(un.objectLiteral(s)&&un.objectLiteral(o)){let a=Object.keys(s),u=Object.keys(o);if(a.length!==u.length||(a.sort(),u.sort(),!i(a,u)))return!1;for(let d=0;d<a.length;d++){let p=a[d];if(!i(s[p],o[p]))return!1}}return!0}})(Qa||(Ue.NotebookCell=Qa={}));var C_;(function(t){function e(r,i,s,o){return{uri:r,notebookType:i,version:s,cells:o}}t.create=e;function n(r){let i=r;return un.objectLiteral(i)&&un.string(i.uri)&&Qs.integer.is(i.version)&&un.typedArray(i.cells,Qa.is)}t.is=n})(C_||(Ue.NotebookDocument=C_={}));var Ni;(function(t){t.method="notebookDocument/sync",t.messageDirection=xn.MessageDirection.clientToServer,t.type=new xn.RegistrationType(t.method)})(Ni||(Ue.NotebookDocumentSyncRegistrationType=Ni={}));var R_;(function(t){t.method="notebookDocument/didOpen",t.messageDirection=xn.MessageDirection.clientToServer,t.type=new xn.ProtocolNotificationType(t.method),t.registrationMethod=Ni.method})(R_||(Ue.DidOpenNotebookDocumentNotification=R_={}));var P_;(function(t){function e(r){let i=r;return un.objectLiteral(i)&&Qs.uinteger.is(i.start)&&Qs.uinteger.is(i.deleteCount)&&(i.cells===void 0||un.typedArray(i.cells,Qa.is))}t.is=e;function n(r,i,s){let o={start:r,deleteCount:i};return s!==void 0&&(o.cells=s),o}t.create=n})(P_||(Ue.NotebookCellArrayChange=P_={}));var A_;(function(t){t.method="notebookDocument/didChange",t.messageDirection=xn.MessageDirection.clientToServer,t.type=new xn.ProtocolNotificationType(t.method),t.registrationMethod=Ni.method})(A_||(Ue.DidChangeNotebookDocumentNotification=A_={}));var O_;(function(t){t.method="notebookDocument/didSave",t.messageDirection=xn.MessageDirection.clientToServer,t.type=new xn.ProtocolNotificationType(t.method),t.registrationMethod=Ni.method})(O_||(Ue.DidSaveNotebookDocumentNotification=O_={}));var D_;(function(t){t.method="notebookDocument/didClose",t.messageDirection=xn.MessageDirection.clientToServer,t.type=new xn.ProtocolNotificationType(t.method),t.registrationMethod=Ni.method})(D_||(Ue.DidCloseNotebookDocumentNotification=D_={}))});var q_=T(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.InlineCompletionRequest=void 0;var L_=Le(),M_;(function(t){t.method="textDocument/inlineCompletion",t.messageDirection=L_.MessageDirection.clientToServer,t.type=new L_.ProtocolRequestType(t.method)})(M_||(Ja.InlineCompletionRequest=M_={}))});var Qw=T(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 q=Le(),F_=(Ma(),Qe(La)),ht=qa(),DI=cv();Object.defineProperty(E,"ImplementationRequest",{enumerable:!0,get:function(){return DI.ImplementationRequest}});var jI=pv();Object.defineProperty(E,"TypeDefinitionRequest",{enumerable:!0,get:function(){return jI.TypeDefinitionRequest}});var zw=mv();Object.defineProperty(E,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return zw.WorkspaceFoldersRequest}});Object.defineProperty(E,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return zw.DidChangeWorkspaceFoldersNotification}});var LI=bv();Object.defineProperty(E,"ConfigurationRequest",{enumerable:!0,get:function(){return LI.ConfigurationRequest}});var Gw=wv();Object.defineProperty(E,"DocumentColorRequest",{enumerable:!0,get:function(){return Gw.DocumentColorRequest}});Object.defineProperty(E,"ColorPresentationRequest",{enumerable:!0,get:function(){return Gw.ColorPresentationRequest}});var Kw=kv();Object.defineProperty(E,"FoldingRangeRequest",{enumerable:!0,get:function(){return Kw.FoldingRangeRequest}});Object.defineProperty(E,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return Kw.FoldingRangeRefreshRequest}});var MI=Ev();Object.defineProperty(E,"DeclarationRequest",{enumerable:!0,get:function(){return MI.DeclarationRequest}});var qI=Pv();Object.defineProperty(E,"SelectionRangeRequest",{enumerable:!0,get:function(){return qI.SelectionRangeRequest}});var gh=jv();Object.defineProperty(E,"WorkDoneProgress",{enumerable:!0,get:function(){return gh.WorkDoneProgress}});Object.defineProperty(E,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return gh.WorkDoneProgressCreateRequest}});Object.defineProperty(E,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return gh.WorkDoneProgressCancelNotification}});var yh=Fv();Object.defineProperty(E,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return yh.CallHierarchyIncomingCallsRequest}});Object.defineProperty(E,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return yh.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(E,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return yh.CallHierarchyPrepareRequest}});var $i=Vv();Object.defineProperty(E,"TokenFormat",{enumerable:!0,get:function(){return $i.TokenFormat}});Object.defineProperty(E,"SemanticTokensRequest",{enumerable:!0,get:function(){return $i.SemanticTokensRequest}});Object.defineProperty(E,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return $i.SemanticTokensDeltaRequest}});Object.defineProperty(E,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return $i.SemanticTokensRangeRequest}});Object.defineProperty(E,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return $i.SemanticTokensRefreshRequest}});Object.defineProperty(E,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return $i.SemanticTokensRegistrationType}});var FI=Gv();Object.defineProperty(E,"ShowDocumentRequest",{enumerable:!0,get:function(){return FI.ShowDocumentRequest}});var NI=Qv();Object.defineProperty(E,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return NI.LinkedEditingRangeRequest}});var Ur=i_();Object.defineProperty(E,"FileOperationPatternKind",{enumerable:!0,get:function(){return Ur.FileOperationPatternKind}});Object.defineProperty(E,"DidCreateFilesNotification",{enumerable:!0,get:function(){return Ur.DidCreateFilesNotification}});Object.defineProperty(E,"WillCreateFilesRequest",{enumerable:!0,get:function(){return Ur.WillCreateFilesRequest}});Object.defineProperty(E,"DidRenameFilesNotification",{enumerable:!0,get:function(){return Ur.DidRenameFilesNotification}});Object.defineProperty(E,"WillRenameFilesRequest",{enumerable:!0,get:function(){return Ur.WillRenameFilesRequest}});Object.defineProperty(E,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return Ur.DidDeleteFilesNotification}});Object.defineProperty(E,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return Ur.WillDeleteFilesRequest}});var bh=c_();Object.defineProperty(E,"UniquenessLevel",{enumerable:!0,get:function(){return bh.UniquenessLevel}});Object.defineProperty(E,"MonikerKind",{enumerable:!0,get:function(){return bh.MonikerKind}});Object.defineProperty(E,"MonikerRequest",{enumerable:!0,get:function(){return bh.MonikerRequest}});var vh=h_();Object.defineProperty(E,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return vh.TypeHierarchyPrepareRequest}});Object.defineProperty(E,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return vh.TypeHierarchySubtypesRequest}});Object.defineProperty(E,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return vh.TypeHierarchySupertypesRequest}});var Yw=g_();Object.defineProperty(E,"InlineValueRequest",{enumerable:!0,get:function(){return Yw.InlineValueRequest}});Object.defineProperty(E,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return Yw.InlineValueRefreshRequest}});var _h=__();Object.defineProperty(E,"InlayHintRequest",{enumerable:!0,get:function(){return _h.InlayHintRequest}});Object.defineProperty(E,"InlayHintResolveRequest",{enumerable:!0,get:function(){return _h.InlayHintResolveRequest}});Object.defineProperty(E,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return _h.InlayHintRefreshRequest}});var Js=E_();Object.defineProperty(E,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return Js.DiagnosticServerCancellationData}});Object.defineProperty(E,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return Js.DocumentDiagnosticReportKind}});Object.defineProperty(E,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return Js.DocumentDiagnosticRequest}});Object.defineProperty(E,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return Js.WorkspaceDiagnosticRequest}});Object.defineProperty(E,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return Js.DiagnosticRefreshRequest}});var Sn=j_();Object.defineProperty(E,"NotebookCellKind",{enumerable:!0,get:function(){return Sn.NotebookCellKind}});Object.defineProperty(E,"ExecutionSummary",{enumerable:!0,get:function(){return Sn.ExecutionSummary}});Object.defineProperty(E,"NotebookCell",{enumerable:!0,get:function(){return Sn.NotebookCell}});Object.defineProperty(E,"NotebookDocument",{enumerable:!0,get:function(){return Sn.NotebookDocument}});Object.defineProperty(E,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return Sn.NotebookDocumentSyncRegistrationType}});Object.defineProperty(E,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return Sn.DidOpenNotebookDocumentNotification}});Object.defineProperty(E,"NotebookCellArrayChange",{enumerable:!0,get:function(){return Sn.NotebookCellArrayChange}});Object.defineProperty(E,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return Sn.DidChangeNotebookDocumentNotification}});Object.defineProperty(E,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return Sn.DidSaveNotebookDocumentNotification}});Object.defineProperty(E,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return Sn.DidCloseNotebookDocumentNotification}});var $I=q_();Object.defineProperty(E,"InlineCompletionRequest",{enumerable:!0,get:function(){return $I.InlineCompletionRequest}});var ph;(function(t){function e(n){let r=n;return ht.string(r)||ht.string(r.language)||ht.string(r.scheme)||ht.string(r.pattern)}t.is=e})(ph||(E.TextDocumentFilter=ph={}));var hh;(function(t){function e(n){let r=n;return ht.objectLiteral(r)&&(ht.string(r.notebookType)||ht.string(r.scheme)||ht.string(r.pattern))}t.is=e})(hh||(E.NotebookDocumentFilter=hh={}));var fh;(function(t){function e(n){let r=n;return ht.objectLiteral(r)&&(ht.string(r.notebook)||hh.is(r.notebook))&&(r.language===void 0||ht.string(r.language))}t.is=e})(fh||(E.NotebookCellTextDocumentFilter=fh={}));var mh;(function(t){function e(n){if(!Array.isArray(n))return!1;for(let r of n)if(!ht.string(r)&&!ph.is(r)&&!fh.is(r))return!1;return!0}t.is=e})(mh||(E.DocumentSelector=mh={}));var N_;(function(t){t.method="client/registerCapability",t.messageDirection=q.MessageDirection.serverToClient,t.type=new q.ProtocolRequestType(t.method)})(N_||(E.RegistrationRequest=N_={}));var $_;(function(t){t.method="client/unregisterCapability",t.messageDirection=q.MessageDirection.serverToClient,t.type=new q.ProtocolRequestType(t.method)})($_||(E.UnregistrationRequest=$_={}));var B_;(function(t){t.Create="create",t.Rename="rename",t.Delete="delete"})(B_||(E.ResourceOperationKind=B_={}));var U_;(function(t){t.Abort="abort",t.Transactional="transactional",t.TextOnlyTransactional="textOnlyTransactional",t.Undo="undo"})(U_||(E.FailureHandlingKind=U_={}));var W_;(function(t){t.UTF8="utf-8",t.UTF16="utf-16",t.UTF32="utf-32"})(W_||(E.PositionEncodingKind=W_={}));var V_;(function(t){function e(n){let r=n;return r&&ht.string(r.id)&&r.id.length>0}t.hasId=e})(V_||(E.StaticRegistrationOptions=V_={}));var H_;(function(t){function e(n){let r=n;return r&&(r.documentSelector===null||mh.is(r.documentSelector))}t.is=e})(H_||(E.TextDocumentRegistrationOptions=H_={}));var z_;(function(t){function e(r){let i=r;return ht.objectLiteral(i)&&(i.workDoneProgress===void 0||ht.boolean(i.workDoneProgress))}t.is=e;function n(r){let i=r;return i&&ht.boolean(i.workDoneProgress)}t.hasWorkDoneProgress=n})(z_||(E.WorkDoneProgressOptions=z_={}));var G_;(function(t){t.method="initialize",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(G_||(E.InitializeRequest=G_={}));var K_;(function(t){t.unknownProtocolVersion=1})(K_||(E.InitializeErrorCodes=K_={}));var Y_;(function(t){t.method="initialized",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolNotificationType(t.method)})(Y_||(E.InitializedNotification=Y_={}));var Q_;(function(t){t.method="shutdown",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType0(t.method)})(Q_||(E.ShutdownRequest=Q_={}));var J_;(function(t){t.method="exit",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolNotificationType0(t.method)})(J_||(E.ExitNotification=J_={}));var X_;(function(t){t.method="workspace/didChangeConfiguration",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolNotificationType(t.method)})(X_||(E.DidChangeConfigurationNotification=X_={}));var Z_;(function(t){t.Error=1,t.Warning=2,t.Info=3,t.Log=4,t.Debug=5})(Z_||(E.MessageType=Z_={}));var ew;(function(t){t.method="window/showMessage",t.messageDirection=q.MessageDirection.serverToClient,t.type=new q.ProtocolNotificationType(t.method)})(ew||(E.ShowMessageNotification=ew={}));var tw;(function(t){t.method="window/showMessageRequest",t.messageDirection=q.MessageDirection.serverToClient,t.type=new q.ProtocolRequestType(t.method)})(tw||(E.ShowMessageRequest=tw={}));var nw;(function(t){t.method="window/logMessage",t.messageDirection=q.MessageDirection.serverToClient,t.type=new q.ProtocolNotificationType(t.method)})(nw||(E.LogMessageNotification=nw={}));var rw;(function(t){t.method="telemetry/event",t.messageDirection=q.MessageDirection.serverToClient,t.type=new q.ProtocolNotificationType(t.method)})(rw||(E.TelemetryEventNotification=rw={}));var iw;(function(t){t.None=0,t.Full=1,t.Incremental=2})(iw||(E.TextDocumentSyncKind=iw={}));var sw;(function(t){t.method="textDocument/didOpen",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolNotificationType(t.method)})(sw||(E.DidOpenTextDocumentNotification=sw={}));var ow;(function(t){function e(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}t.isIncremental=e;function n(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}t.isFull=n})(ow||(E.TextDocumentContentChangeEvent=ow={}));var aw;(function(t){t.method="textDocument/didChange",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolNotificationType(t.method)})(aw||(E.DidChangeTextDocumentNotification=aw={}));var lw;(function(t){t.method="textDocument/didClose",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolNotificationType(t.method)})(lw||(E.DidCloseTextDocumentNotification=lw={}));var cw;(function(t){t.method="textDocument/didSave",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolNotificationType(t.method)})(cw||(E.DidSaveTextDocumentNotification=cw={}));var uw;(function(t){t.Manual=1,t.AfterDelay=2,t.FocusOut=3})(uw||(E.TextDocumentSaveReason=uw={}));var dw;(function(t){t.method="textDocument/willSave",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolNotificationType(t.method)})(dw||(E.WillSaveTextDocumentNotification=dw={}));var pw;(function(t){t.method="textDocument/willSaveWaitUntil",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(pw||(E.WillSaveTextDocumentWaitUntilRequest=pw={}));var hw;(function(t){t.method="workspace/didChangeWatchedFiles",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolNotificationType(t.method)})(hw||(E.DidChangeWatchedFilesNotification=hw={}));var fw;(function(t){t.Created=1,t.Changed=2,t.Deleted=3})(fw||(E.FileChangeType=fw={}));var mw;(function(t){function e(n){let r=n;return ht.objectLiteral(r)&&(F_.URI.is(r.baseUri)||F_.WorkspaceFolder.is(r.baseUri))&&ht.string(r.pattern)}t.is=e})(mw||(E.RelativePattern=mw={}));var gw;(function(t){t.Create=1,t.Change=2,t.Delete=4})(gw||(E.WatchKind=gw={}));var yw;(function(t){t.method="textDocument/publishDiagnostics",t.messageDirection=q.MessageDirection.serverToClient,t.type=new q.ProtocolNotificationType(t.method)})(yw||(E.PublishDiagnosticsNotification=yw={}));var bw;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.TriggerForIncompleteCompletions=3})(bw||(E.CompletionTriggerKind=bw={}));var vw;(function(t){t.method="textDocument/completion",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(vw||(E.CompletionRequest=vw={}));var _w;(function(t){t.method="completionItem/resolve",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(_w||(E.CompletionResolveRequest=_w={}));var ww;(function(t){t.method="textDocument/hover",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(ww||(E.HoverRequest=ww={}));var xw;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.ContentChange=3})(xw||(E.SignatureHelpTriggerKind=xw={}));var Sw;(function(t){t.method="textDocument/signatureHelp",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Sw||(E.SignatureHelpRequest=Sw={}));var kw;(function(t){t.method="textDocument/definition",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(kw||(E.DefinitionRequest=kw={}));var Tw;(function(t){t.method="textDocument/references",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Tw||(E.ReferencesRequest=Tw={}));var Iw;(function(t){t.method="textDocument/documentHighlight",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Iw||(E.DocumentHighlightRequest=Iw={}));var Ew;(function(t){t.method="textDocument/documentSymbol",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Ew||(E.DocumentSymbolRequest=Ew={}));var Cw;(function(t){t.method="textDocument/codeAction",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Cw||(E.CodeActionRequest=Cw={}));var Rw;(function(t){t.method="codeAction/resolve",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Rw||(E.CodeActionResolveRequest=Rw={}));var Pw;(function(t){t.method="workspace/symbol",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Pw||(E.WorkspaceSymbolRequest=Pw={}));var Aw;(function(t){t.method="workspaceSymbol/resolve",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Aw||(E.WorkspaceSymbolResolveRequest=Aw={}));var Ow;(function(t){t.method="textDocument/codeLens",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Ow||(E.CodeLensRequest=Ow={}));var Dw;(function(t){t.method="codeLens/resolve",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Dw||(E.CodeLensResolveRequest=Dw={}));var jw;(function(t){t.method="workspace/codeLens/refresh",t.messageDirection=q.MessageDirection.serverToClient,t.type=new q.ProtocolRequestType0(t.method)})(jw||(E.CodeLensRefreshRequest=jw={}));var Lw;(function(t){t.method="textDocument/documentLink",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Lw||(E.DocumentLinkRequest=Lw={}));var Mw;(function(t){t.method="documentLink/resolve",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Mw||(E.DocumentLinkResolveRequest=Mw={}));var qw;(function(t){t.method="textDocument/formatting",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(qw||(E.DocumentFormattingRequest=qw={}));var Fw;(function(t){t.method="textDocument/rangeFormatting",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Fw||(E.DocumentRangeFormattingRequest=Fw={}));var Nw;(function(t){t.method="textDocument/rangesFormatting",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Nw||(E.DocumentRangesFormattingRequest=Nw={}));var $w;(function(t){t.method="textDocument/onTypeFormatting",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})($w||(E.DocumentOnTypeFormattingRequest=$w={}));var Bw;(function(t){t.Identifier=1})(Bw||(E.PrepareSupportDefaultBehavior=Bw={}));var Uw;(function(t){t.method="textDocument/rename",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Uw||(E.RenameRequest=Uw={}));var Ww;(function(t){t.method="textDocument/prepareRename",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Ww||(E.PrepareRenameRequest=Ww={}));var Vw;(function(t){t.method="workspace/executeCommand",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Vw||(E.ExecuteCommandRequest=Vw={}));var Hw;(function(t){t.method="workspace/applyEdit",t.messageDirection=q.MessageDirection.serverToClient,t.type=new q.ProtocolRequestType("workspace/applyEdit")})(Hw||(E.ApplyWorkspaceEditRequest=Hw={}))});var Xw=T(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});Xa.createProtocolConnection=void 0;var Jw=Nr();function BI(t,e,n,r){return Jw.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Jw.createMessageConnection)(t,e,n,r)}Xa.createProtocolConnection=BI});var ex=T(qt=>{"use strict";var UI=qt&&qt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Za=qt&&qt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&UI(e,t,n)};Object.defineProperty(qt,"__esModule",{value:!0});qt.LSPErrorCodes=qt.createProtocolConnection=void 0;Za(Nr(),qt);Za((Ma(),Qe(La)),qt);Za(Le(),qt);Za(Qw(),qt);var WI=Xw();Object.defineProperty(qt,"createProtocolConnection",{enumerable:!0,get:function(){return WI.createProtocolConnection}});var Zw;(function(t){t.lspReservedErrorRangeStart=-32899,t.RequestFailed=-32803,t.ServerCancelled=-32802,t.ContentModified=-32801,t.RequestCancelled=-32800,t.lspReservedErrorRangeEnd=-32800})(Zw||(qt.LSPErrorCodes=Zw={}))});var Je=T(kn=>{"use strict";var VI=kn&&kn.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),tx=kn&&kn.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&VI(e,t,n)};Object.defineProperty(kn,"__esModule",{value:!0});kn.createProtocolConnection=void 0;var HI=np();tx(np(),kn);tx(ex(),kn);function zI(t,e,n,r){return(0,HI.createMessageConnection)(t,e,n,r)}kn.createProtocolConnection=zI});var xh=T(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.SemanticTokensBuilder=dr.SemanticTokensDiff=dr.SemanticTokensFeature=void 0;var el=Je(),GI=t=>class extends t{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(el.SemanticTokensRefreshRequest.type),on:e=>{let n=el.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:e=>{let n=el.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:e=>{let n=el.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};dr.SemanticTokensFeature=GI;var tl=class{constructor(e,n){this.originalSequence=e,this.modifiedSequence=n}computeDiff(){let e=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r<n&&r<e&&this.originalSequence[r]===this.modifiedSequence[r];)r++;if(r<n&&r<e){let i=e-1,s=n-1;for(;i>=r&&s>=r&&this.originalSequence[i]===this.modifiedSequence[s];)i--,s--;(i<r||s<r)&&(i++,s++);let o=i-r+1,l=this.modifiedSequence.slice(r,s+1);return l.length===1&&l[0]===this.originalSequence[i]?[{start:r,deleteCount:o-1}]:[{start:r,deleteCount:o,data:l}]}else return r<n?[{start:r,deleteCount:0,data:this.modifiedSequence.slice(r)}]:r<e?[{start:r,deleteCount:e-r}]:[]}};dr.SemanticTokensDiff=tl;var wh=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,n,r,i,s){let o=e,l=n;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++]=r,this._data[this._dataLen++]=i,this._data[this._dataLen++]=s,this._prevLine=e,this._prevChar=n}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 tl(this._prevData,this._data).computeDiff()}:this.build()}};dr.SemanticTokensBuilder=wh});var nx=T(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.InlineCompletionFeature=void 0;var KI=Je(),YI=t=>class extends t{get inlineCompletion(){return{on:e=>this.connection.onRequest(KI.InlineCompletionRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n)))}}};nl.InlineCompletionFeature=YI});var kh=T(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.TextDocuments=void 0;var Wr=Je(),Sh=class{constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new Wr.Emitter,this._onDidOpen=new Wr.Emitter,this._onDidClose=new Wr.Emitter,this._onDidSave=new Wr.Emitter,this._onWillSave=new Wr.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=Wr.TextDocumentSyncKind.Incremental;let n=[];return n.push(e.onDidOpenTextDocument(r=>{let i=r.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)})),n.push(e.onDidChangeTextDocument(r=>{let i=r.textDocument,s=r.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})))})),n.push(e.onDidCloseTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:i})))})),n.push(e.onWillSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onWillSave.fire(Object.freeze({document:i,reason:r.reason}))})),n.push(e.onWillSaveTextDocumentWaitUntil((r,i)=>{let s=this._syncedDocuments.get(r.textDocument.uri);return s!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:s,reason:r.reason}),i):[]})),n.push(e.onDidSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onDidSave.fire(Object.freeze({document:i}))})),Wr.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};rl.TextDocuments=Sh});var Ih=T(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.NotebookDocuments=Bi.NotebookSyncFeature=void 0;var en=Je(),rx=kh(),QI=t=>class extends t{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(en.DidOpenNotebookDocumentNotification.type,n=>{e(n)}),onDidChangeNotebookDocument:e=>this.connection.onNotification(en.DidChangeNotebookDocumentNotification.type,n=>{e(n)}),onDidSaveNotebookDocument:e=>this.connection.onNotification(en.DidSaveNotebookDocumentNotification.type,n=>{e(n)}),onDidCloseNotebookDocument:e=>this.connection.onNotification(en.DidCloseNotebookDocumentNotification.type,n=>{e(n)})}}};Bi.NotebookSyncFeature=QI;var il=class t{onDidOpenTextDocument(e){return this.openHandler=e,en.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,en.Disposable.create(()=>{this.changeHandler=e})}changeTextDocument(e){this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,en.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(e){this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return t.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return t.NULL_DISPOSE}onDidSaveTextDocument(){return t.NULL_DISPOSE}};il.NULL_DISPOSE=Object.freeze({dispose:()=>{}});var Th=class{constructor(e){e instanceof rx.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new rx.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new en.Emitter,this._onDidChange=new en.Emitter,this._onDidSave=new en.Emitter,this._onDidClose=new en.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){let n=this.notebookCellMap.get(e);return n&&n[0]}findNotebookDocumentForCell(e){let n=typeof e=="string"?e:e.document,r=this.notebookCellMap.get(n);return r&&r[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 n=new il,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(e.notebooks.synchronization.onDidOpenNotebookDocument(i=>{this.notebookDocuments.set(i.notebookDocument.uri,i.notebookDocument);for(let s of i.cellTextDocuments)n.openTextDocument({textDocument:s});this.updateCellMap(i.notebookDocument),this._onDidOpen.fire(i.notebookDocument)})),r.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,c=i.change;c.metadata!==void 0&&(l=!0,s.metadata=c.metadata);let a=[],u=[],d=[],p=[];if(c.cells!==void 0){let b=c.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)n.openTextDocument({textDocument:_}),a.push(_.uri);if(b.structure.didClose)for(let _ of b.structure.didClose)n.closeTextDocument({textDocument:_}),u.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 S=s.cells.splice(_,1,w);if(d.push({old:S[0],new:w}),v.delete(w.document),v.size===0)break}}}if(b.textContent!==void 0)for(let v of b.textContent)n.changeTextDocument({textDocument:v.document,contentChanges:v.changes}),p.push(v.document.uri)}this.updateCellMap(s);let h={notebookDocument:s};l&&(h.metadata={old:o,new:s.metadata});let m=[];for(let b of a)m.push(this.getNotebookCell(b));let f=[];for(let b of u)f.push(this.getNotebookCell(b));let g=[];for(let b of p)g.push(this.getNotebookCell(b));(m.length>0||f.length>0||d.length>0||g.length>0)&&(h.cells={added:m,removed:f,changed:{data:d,textContent:g}}),(h.metadata!==void 0||h.cells!==void 0)&&this._onDidChange.fire(h)})),r.push(e.notebooks.synchronization.onDidSaveNotebookDocument(i=>{let s=this.notebookDocuments.get(i.notebookDocument.uri);s!==void 0&&this._onDidSave.fire(s)})),r.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)n.closeTextDocument({textDocument:o});this.notebookDocuments.delete(i.notebookDocument.uri);for(let o of s.cells)this.notebookCellMap.delete(o.document)}})),en.Disposable.create(()=>{r.forEach(i=>i.dispose())})}updateCellMap(e){for(let n of e.cells)this.notebookCellMap.set(n.document,[n,e])}};Bi.NotebookDocuments=Th});var Eh=T(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.thenable=nt.typedArray=nt.stringArray=nt.array=nt.func=nt.error=nt.number=nt.string=nt.boolean=void 0;function JI(t){return t===!0||t===!1}nt.boolean=JI;function ix(t){return typeof t=="string"||t instanceof String}nt.string=ix;function XI(t){return typeof t=="number"||t instanceof Number}nt.number=XI;function ZI(t){return t instanceof Error}nt.error=ZI;function sx(t){return typeof t=="function"}nt.func=sx;function ox(t){return Array.isArray(t)}nt.array=ox;function eE(t){return ox(t)&&t.every(e=>ix(e))}nt.stringArray=eE;function tE(t,e){return Array.isArray(t)&&t.every(e)}nt.typedArray=tE;function nE(t){return t&&sx(t.then)}nt.thenable=nE});var Ch=T(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.generateUuid=tn.parse=tn.isUUID=tn.v4=tn.empty=void 0;var Xs=class{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},Zs=class t extends Xs{static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return t._oneOf(t._chars)}constructor(){super([t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))}};Zs._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];Zs._timeHighBits=["8","9","a","b"];tn.empty=new Xs("00000000-0000-0000-0000-000000000000");function ax(){return new Zs}tn.v4=ax;var rE=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function lx(t){return rE.test(t)}tn.isUUID=lx;function iE(t){if(!lx(t))throw new Error("invalid uuid");return new Xs(t)}tn.parse=iE;function sE(){return ax().asHex()}tn.generateUuid=sE});var cx=T(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.attachPartialResult=hr.ProgressFeature=hr.attachWorkDone=void 0;var pr=Je(),oE=Ch(),Vr=class t{constructor(e,n){this._connection=e,this._token=n,t.Instances.set(this._token,this)}begin(e,n,r,i){let s={kind:"begin",title:e,percentage:n,message:r,cancellable:i};this._connection.sendProgress(pr.WorkDoneProgress.type,this._token,s)}report(e,n){let r={kind:"report"};typeof e=="number"?(r.percentage=e,n!==void 0&&(r.message=n)):r.message=e,this._connection.sendProgress(pr.WorkDoneProgress.type,this._token,r)}done(){t.Instances.delete(this._token),this._connection.sendProgress(pr.WorkDoneProgress.type,this._token,{kind:"end"})}};Vr.Instances=new Map;var sl=class extends Vr{constructor(e,n){super(e,n),this._source=new pr.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},eo=class{constructor(){}begin(){}report(){}done(){}},ol=class extends eo{constructor(){super(),this._source=new pr.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function aE(t,e){if(e===void 0||e.workDoneToken===void 0)return new eo;let n=e.workDoneToken;return delete e.workDoneToken,new Vr(t,n)}hr.attachWorkDone=aE;var lE=t=>class extends t{constructor(){super(),this._progressSupported=!1}initialize(e){var n;super.initialize(e),((n=e==null?void 0:e.window)==null?void 0:n.workDoneProgress)===!0&&(this._progressSupported=!0,this.connection.onNotification(pr.WorkDoneProgressCancelNotification.type,r=>{let i=Vr.Instances.get(r.token);(i instanceof sl||i instanceof ol)&&i.cancel()}))}attachWorkDoneProgress(e){return e===void 0?new eo:new Vr(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){let e=(0,oE.generateUuid)();return this.connection.sendRequest(pr.WorkDoneProgressCreateRequest.type,{token:e}).then(()=>new sl(this.connection,e))}else return Promise.resolve(new ol)}};hr.ProgressFeature=lE;var Rh;(function(t){t.type=new pr.ProgressType})(Rh||(Rh={}));var Ph=class{constructor(e,n){this._connection=e,this._token=n}report(e){this._connection.sendProgress(Rh.type,this._token,e)}};function cE(t,e){if(e===void 0||e.partialResultToken===void 0)return;let n=e.partialResultToken;return delete e.partialResultToken,new Ph(t,n)}hr.attachPartialResult=cE});var ux=T(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.ConfigurationFeature=void 0;var uE=Je(),dE=Eh(),pE=t=>class extends t{getConfiguration(e){return e?dE.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let n={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(uE.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(e)?r:r[0]:Array.isArray(e)?[]:null)}};al.ConfigurationFeature=pE});var dx=T(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.WorkspaceFoldersFeature=void 0;var ll=Je(),hE=t=>class extends t{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let n=e.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new ll.Emitter,this.connection.onNotification(ll.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(e){var r,i;super.fillServerCapabilities(e);let n=(i=(r=e.workspace)==null?void 0:r.workspaceFolders)==null?void 0:i.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(ll.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(ll.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};cl.WorkspaceFoldersFeature=hE});var px=T(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.CallHierarchyFeature=void 0;var Ah=Je(),fE=t=>class extends t{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(Ah.CallHierarchyPrepareRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:e=>{let n=Ah.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:e=>{let n=Ah.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};ul.CallHierarchyFeature=fE});var hx=T(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.ShowDocumentFeature=void 0;var mE=Je(),gE=t=>class extends t{showDocument(e){return this.connection.sendRequest(mE.ShowDocumentRequest.type,e)}};dl.ShowDocumentFeature=gE});var fx=T(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.FileOperationsFeature=void 0;var Ui=Je(),yE=t=>class extends t{onDidCreateFiles(e){return this.connection.onNotification(Ui.DidCreateFilesNotification.type,n=>{e(n)})}onDidRenameFiles(e){return this.connection.onNotification(Ui.DidRenameFilesNotification.type,n=>{e(n)})}onDidDeleteFiles(e){return this.connection.onNotification(Ui.DidDeleteFilesNotification.type,n=>{e(n)})}onWillCreateFiles(e){return this.connection.onRequest(Ui.WillCreateFilesRequest.type,(n,r)=>e(n,r))}onWillRenameFiles(e){return this.connection.onRequest(Ui.WillRenameFilesRequest.type,(n,r)=>e(n,r))}onWillDeleteFiles(e){return this.connection.onRequest(Ui.WillDeleteFilesRequest.type,(n,r)=>e(n,r))}};pl.FileOperationsFeature=yE});var mx=T(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.LinkedEditingRangeFeature=void 0;var bE=Je(),vE=t=>class extends t{onLinkedEditingRange(e){return this.connection.onRequest(bE.LinkedEditingRangeRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0))}};hl.LinkedEditingRangeFeature=vE});var gx=T(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});fl.TypeHierarchyFeature=void 0;var Oh=Je(),_E=t=>class extends t{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(Oh.TypeHierarchyPrepareRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:e=>{let n=Oh.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:e=>{let n=Oh.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};fl.TypeHierarchyFeature=_E});var bx=T(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});ml.InlineValueFeature=void 0;var yx=Je(),wE=t=>class extends t{get inlineValue(){return{refresh:()=>this.connection.sendRequest(yx.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(yx.InlineValueRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n)))}}};ml.InlineValueFeature=wE});var _x=T(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});gl.FoldingRangeFeature=void 0;var vx=Je(),xE=t=>class extends t{get foldingRange(){return{refresh:()=>this.connection.sendRequest(vx.FoldingRangeRefreshRequest.type),on:e=>{let n=vx.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};gl.FoldingRangeFeature=xE});var wx=T(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.InlayHintFeature=void 0;var Dh=Je(),SE=t=>class extends t{get inlayHint(){return{refresh:()=>this.connection.sendRequest(Dh.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(Dh.InlayHintRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n))),resolve:e=>this.connection.onRequest(Dh.InlayHintResolveRequest.type,(n,r)=>e(n,r))}}};yl.InlayHintFeature=SE});var xx=T(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});bl.DiagnosticFeature=void 0;var to=Je(),kE=t=>class extends t{get diagnostics(){return{refresh:()=>this.connection.sendRequest(to.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(to.DocumentDiagnosticRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(to.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:e=>this.connection.onRequest(to.WorkspaceDiagnosticRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(to.WorkspaceDiagnosticRequest.partialResult,n)))}}};bl.DiagnosticFeature=kE});var Sx=T(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.MonikerFeature=void 0;var TE=Je(),IE=t=>class extends t{get moniker(){return{on:e=>{let n=TE.MonikerRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};vl.MonikerFeature=IE});var Fx=T(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.createConnection=de.combineFeatures=de.combineNotebooksFeatures=de.combineLanguagesFeatures=de.combineWorkspaceFeatures=de.combineWindowFeatures=de.combineClientFeatures=de.combineTracerFeatures=de.combineTelemetryFeatures=de.combineConsoleFeatures=de._NotebooksImpl=de._LanguagesImpl=de.BulkUnregistration=de.BulkRegistration=de.ErrorMessageTracker=void 0;var N=Je(),nn=Eh(),Lh=Ch(),re=cx(),EE=ux(),CE=dx(),RE=px(),PE=xh(),AE=hx(),OE=fx(),DE=mx(),jE=gx(),LE=bx(),ME=_x(),qE=wx(),FE=xx(),NE=Ih(),$E=Sx();function jh(t){if(t!==null)return t}var Mh=class{constructor(){this._messages=Object.create(null)}add(e){let n=this._messages[e];n||(n=0),n++,this._messages[e]=n}sendErrors(e){Object.keys(this._messages).forEach(n=>{e.window.showErrorMessage(n)})}};de.ErrorMessageTracker=Mh;var _l=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(N.MessageType.Error,e)}warn(e){this.send(N.MessageType.Warning,e)}info(e){this.send(N.MessageType.Info,e)}log(e){this.send(N.MessageType.Log,e)}debug(e){this.send(N.MessageType.Debug,e)}send(e,n){this._rawConnection&&this._rawConnection.sendNotification(N.LogMessageNotification.type,{type:e,message:n}).catch(()=>{(0,N.RAL)().console.error("Sending log message failed")})}},qh=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,...n){let r={type:N.MessageType.Error,message:e,actions:n};return this.connection.sendRequest(N.ShowMessageRequest.type,r).then(jh)}showWarningMessage(e,...n){let r={type:N.MessageType.Warning,message:e,actions:n};return this.connection.sendRequest(N.ShowMessageRequest.type,r).then(jh)}showInformationMessage(e,...n){let r={type:N.MessageType.Info,message:e,actions:n};return this.connection.sendRequest(N.ShowMessageRequest.type,r).then(jh)}},kx=(0,AE.ShowDocumentFeature)((0,re.ProgressFeature)(qh)),Tx;(function(t){function e(){return new wl}t.create=e})(Tx||(de.BulkRegistration=Tx={}));var wl=class{constructor(){this._registrations=[],this._registered=new Set}add(e,n){let r=nn.string(e)?e:e.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let i=Lh.generateUuid();this._registrations.push({id:i,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},Ix;(function(t){function e(){return new no(void 0,[])}t.create=e})(Ix||(de.BulkUnregistration=Ix={}));var no=class{constructor(e,n){this._connection=e,this._unregistrations=new Map,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let r of this._unregistrations.values())e.push(r);let n={unregisterations:e};this._connection.sendRequest(N.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(e){let n=nn.string(e)?e:e.method,r=this._unregistrations.get(n);if(!r)return!1;let i={unregisterations:[r]};return this._connection.sendRequest(N.UnregistrationRequest.type,i).then(()=>{this._unregistrations.delete(n)},s=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},xl=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,n,r){return e instanceof wl?this.registerMany(e):e instanceof no?this.registerSingle1(e,n,r):this.registerSingle2(e,n)}registerSingle1(e,n,r){let i=nn.string(n)?n:n.method,s=Lh.generateUuid(),o={registrations:[{id:s,method:i,registerOptions:r||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(N.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,n){let r=nn.string(e)?e:e.method,i=Lh.generateUuid(),s={registrations:[{id:i,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(N.RegistrationRequest.type,s).then(o=>N.Disposable.create(()=>{this.unregisterSingle(i,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${i} failed.`)})}),o=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(o)))}unregisterSingle(e,n){let r={unregisterations:[{id:e,method:n}]};return this.connection.sendRequest(N.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)})}registerMany(e){let n=e.asRegistrationParams();return this.connection.sendRequest(N.RegistrationRequest.type,n).then(()=>new no(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Fh=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 n(i){return i&&!!i.edit}let r=n(e)?e:{edit:e};return this.connection.sendRequest(N.ApplyWorkspaceEditRequest.type,r)}},Ex=(0,OE.FileOperationsFeature)((0,CE.WorkspaceFoldersFeature)((0,EE.ConfigurationFeature)(Fh))),Sl=class{constructor(){this._trace=N.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,n){this._trace!==N.Trace.Off&&this.connection.sendNotification(N.LogTraceNotification.type,{message:e,verbose:this._trace===N.Trace.Verbose?n:void 0}).catch(()=>{})}},kl=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(N.TelemetryEventNotification.type,e).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},Tl=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,re.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,n){return(0,re.attachPartialResult)(this.connection,n)}};de._LanguagesImpl=Tl;var Cx=(0,ME.FoldingRangeFeature)((0,$E.MonikerFeature)((0,FE.DiagnosticFeature)((0,qE.InlayHintFeature)((0,LE.InlineValueFeature)((0,jE.TypeHierarchyFeature)((0,DE.LinkedEditingRangeFeature)((0,PE.SemanticTokensFeature)((0,RE.CallHierarchyFeature)(Tl))))))))),Il=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,re.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,n){return(0,re.attachPartialResult)(this.connection,n)}};de._NotebooksImpl=Il;var Rx=(0,NE.NotebookSyncFeature)(Il);function Px(t,e){return function(n){return e(t(n))}}de.combineConsoleFeatures=Px;function Ax(t,e){return function(n){return e(t(n))}}de.combineTelemetryFeatures=Ax;function Ox(t,e){return function(n){return e(t(n))}}de.combineTracerFeatures=Ox;function Dx(t,e){return function(n){return e(t(n))}}de.combineClientFeatures=Dx;function jx(t,e){return function(n){return e(t(n))}}de.combineWindowFeatures=jx;function Lx(t,e){return function(n){return e(t(n))}}de.combineWorkspaceFeatures=Lx;function Mx(t,e){return function(n){return e(t(n))}}de.combineLanguagesFeatures=Mx;function qx(t,e){return function(n){return e(t(n))}}de.combineNotebooksFeatures=qx;function BE(t,e){function n(i,s,o){return i&&s?o(i,s):i||s}return{__brand:"features",console:n(t.console,e.console,Px),tracer:n(t.tracer,e.tracer,Ox),telemetry:n(t.telemetry,e.telemetry,Ax),client:n(t.client,e.client,Dx),window:n(t.window,e.window,jx),workspace:n(t.workspace,e.workspace,Lx),languages:n(t.languages,e.languages,Mx),notebooks:n(t.notebooks,e.notebooks,qx)}}de.combineFeatures=BE;function UE(t,e,n){let r=n&&n.console?new(n.console(_l)):new _l,i=t(r);r.rawAttach(i);let s=n&&n.tracer?new(n.tracer(Sl)):new Sl,o=n&&n.telemetry?new(n.telemetry(kl)):new kl,l=n&&n.client?new(n.client(xl)):new xl,c=n&&n.window?new(n.window(kx)):new kx,a=n&&n.workspace?new(n.workspace(Ex)):new Ex,u=n&&n.languages?new(n.languages(Cx)):new Cx,d=n&&n.notebooks?new(n.notebooks(Rx)):new Rx,p=[r,s,o,l,c,a,u,d];function h(v){return v instanceof Promise?v:nn.thenable(v)?new Promise((_,w)=>{v.then(S=>_(S),S=>w(S))}):Promise.resolve(v)}let m,f,g,b={listen:()=>i.listen(),sendRequest:(v,..._)=>i.sendRequest(nn.string(v)?v:v.method,..._),onRequest:(v,_)=>i.onRequest(v,_),sendNotification:(v,_)=>{let w=nn.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(N.InitializedNotification.type,v),onShutdown:v=>(m=v,{dispose:()=>{m=void 0}}),onExit:v=>(g=v,{dispose:()=>{g=void 0}}),get console(){return r},get telemetry(){return o},get tracer(){return s},get client(){return l},get window(){return c},get workspace(){return a},get languages(){return u},get notebooks(){return d},onDidChangeConfiguration:v=>i.onNotification(N.DidChangeConfigurationNotification.type,v),onDidChangeWatchedFiles:v=>i.onNotification(N.DidChangeWatchedFilesNotification.type,v),__textDocumentSync:void 0,onDidOpenTextDocument:v=>i.onNotification(N.DidOpenTextDocumentNotification.type,v),onDidChangeTextDocument:v=>i.onNotification(N.DidChangeTextDocumentNotification.type,v),onDidCloseTextDocument:v=>i.onNotification(N.DidCloseTextDocumentNotification.type,v),onWillSaveTextDocument:v=>i.onNotification(N.WillSaveTextDocumentNotification.type,v),onWillSaveTextDocumentWaitUntil:v=>i.onRequest(N.WillSaveTextDocumentWaitUntilRequest.type,v),onDidSaveTextDocument:v=>i.onNotification(N.DidSaveTextDocumentNotification.type,v),sendDiagnostics:v=>i.sendNotification(N.PublishDiagnosticsNotification.type,v),onHover:v=>i.onRequest(N.HoverRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),void 0)),onCompletion:v=>i.onRequest(N.CompletionRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onCompletionResolve:v=>i.onRequest(N.CompletionResolveRequest.type,v),onSignatureHelp:v=>i.onRequest(N.SignatureHelpRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),void 0)),onDeclaration:v=>i.onRequest(N.DeclarationRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onDefinition:v=>i.onRequest(N.DefinitionRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onTypeDefinition:v=>i.onRequest(N.TypeDefinitionRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onImplementation:v=>i.onRequest(N.ImplementationRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onReferences:v=>i.onRequest(N.ReferencesRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onDocumentHighlight:v=>i.onRequest(N.DocumentHighlightRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onDocumentSymbol:v=>i.onRequest(N.DocumentSymbolRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onWorkspaceSymbol:v=>i.onRequest(N.WorkspaceSymbolRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onWorkspaceSymbolResolve:v=>i.onRequest(N.WorkspaceSymbolResolveRequest.type,v),onCodeAction:v=>i.onRequest(N.CodeActionRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onCodeActionResolve:v=>i.onRequest(N.CodeActionResolveRequest.type,(_,w)=>v(_,w)),onCodeLens:v=>i.onRequest(N.CodeLensRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onCodeLensResolve:v=>i.onRequest(N.CodeLensResolveRequest.type,(_,w)=>v(_,w)),onDocumentFormatting:v=>i.onRequest(N.DocumentFormattingRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),void 0)),onDocumentRangeFormatting:v=>i.onRequest(N.DocumentRangeFormattingRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),void 0)),onDocumentOnTypeFormatting:v=>i.onRequest(N.DocumentOnTypeFormattingRequest.type,(_,w)=>v(_,w)),onRenameRequest:v=>i.onRequest(N.RenameRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),void 0)),onPrepareRename:v=>i.onRequest(N.PrepareRenameRequest.type,(_,w)=>v(_,w)),onDocumentLinks:v=>i.onRequest(N.DocumentLinkRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onDocumentLinkResolve:v=>i.onRequest(N.DocumentLinkResolveRequest.type,(_,w)=>v(_,w)),onDocumentColor:v=>i.onRequest(N.DocumentColorRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onColorPresentation:v=>i.onRequest(N.ColorPresentationRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onFoldingRanges:v=>i.onRequest(N.FoldingRangeRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onSelectionRanges:v=>i.onRequest(N.SelectionRangeRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onExecuteCommand:v=>i.onRequest(N.ExecuteCommandRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),void 0)),dispose:()=>i.dispose()};for(let v of p)v.attach(b);return i.onRequest(N.InitializeRequest.type,v=>{e.initialize(v),nn.string(v.trace)&&(s.trace=N.Trace.fromString(v.trace));for(let _ of p)_.initialize(v.capabilities);if(f){let _=f(v,new N.CancellationTokenSource().token,(0,re.attachWorkDone)(i,v),void 0);return h(_).then(w=>{if(w instanceof N.ResponseError)return w;let S=w;S||(S={capabilities:{}});let y=S.capabilities;y||(y={},S.capabilities=y),y.textDocumentSync===void 0||y.textDocumentSync===null?y.textDocumentSync=nn.number(b.__textDocumentSync)?b.__textDocumentSync:N.TextDocumentSyncKind.None:!nn.number(y.textDocumentSync)&&!nn.number(y.textDocumentSync.change)&&(y.textDocumentSync.change=nn.number(b.__textDocumentSync)?b.__textDocumentSync:N.TextDocumentSyncKind.None);for(let x of p)x.fillServerCapabilities(y);return S})}else{let _={capabilities:{textDocumentSync:N.TextDocumentSyncKind.None}};for(let w of p)w.fillServerCapabilities(_.capabilities);return _}}),i.onRequest(N.ShutdownRequest.type,()=>{if(e.shutdownReceived=!0,m)return m(new N.CancellationTokenSource().token)}),i.onNotification(N.ExitNotification.type,()=>{try{g&&g()}finally{e.shutdownReceived?e.exit(0):e.exit(1)}}),i.onNotification(N.SetTraceNotification.type,v=>{s.trace=N.Trace.fromString(v.value)}),b}de.createConnection=UE});var Nh=T(Tt=>{"use strict";var WE=Tt&&Tt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),$x=Tt&&Tt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&WE(e,t,n)};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.ProposedFeatures=Tt.NotebookDocuments=Tt.TextDocuments=Tt.SemanticTokensBuilder=void 0;var VE=xh();Object.defineProperty(Tt,"SemanticTokensBuilder",{enumerable:!0,get:function(){return VE.SemanticTokensBuilder}});var HE=nx();$x(Je(),Tt);var zE=kh();Object.defineProperty(Tt,"TextDocuments",{enumerable:!0,get:function(){return zE.TextDocuments}});var GE=Ih();Object.defineProperty(Tt,"NotebookDocuments",{enumerable:!0,get:function(){return GE.NotebookDocuments}});$x(Fx(),Tt);var Nx;(function(t){t.all={__brand:"features",languages:HE.InlineCompletionFeature}})(Nx||(Tt.ProposedFeatures=Nx={}))});var Ux=T((K2,Bx)=>{"use strict";Bx.exports=Je()});var Hx=T(Tn=>{"use strict";var KE=Tn&&Tn.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Vx=Tn&&Tn.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&KE(e,t,n)};Object.defineProperty(Tn,"__esModule",{value:!0});Tn.createConnection=void 0;var El=Nh();Vx(Ux(),Tn);Vx(Nh(),Tn);var Wx=!1,YE={initialize:t=>{},get shutdownReceived(){return Wx},set shutdownReceived(t){Wx=t},exit:t=>{}};function QE(t,e,n,r){let i,s,o,l;t!==void 0&&t.__brand==="features"&&(i=t,t=e,e=n,n=r),El.ConnectionStrategy.is(t)||El.ConnectionOptions.is(t)?l=t:(s=t,o=e,l=n);let c=a=>(0,El.createProtocolConnection)(s,o,a,l);return(0,El.createConnection)(c,YE,i)}Tn.createConnection=QE});var $h=T((Q2,zx)=>{"use strict";zx.exports=Hx()});var Qx={};Ls(Qx,{TextDocument:()=>Bh});function Uh(t,e){if(t.length<=1)return t;let n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);Uh(r,e),Uh(i,e);let s=0,o=0,l=0;for(;s<r.length&&o<i.length;)e(r[s],i[o])<=0?t[l++]=r[s++]:t[l++]=i[o++];for(;s<r.length;)t[l++]=r[s++];for(;o<i.length;)t[l++]=i[o++];return t}function Gx(t,e,n=0){let r=e?[n]:[];for(let i=0;i<t.length;i++){let s=t.charCodeAt(i);Kx(s)&&(s===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function Kx(t){return t===13||t===10}function Yx(t){let e=t.start,n=t.end;return e.line>n.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function JE(t){let e=Yx(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var Cl,Bh,Jx=er(()=>{"use strict";Cl=class t{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,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 n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(let r of e)if(t.isIncremental(r)){let i=Yx(r.range),s=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(o,this._content.length);let l=Math.max(i.start.line,0),c=Math.max(i.end.line,0),a=this._lineOffsets,u=Gx(r.text,!1,s);if(c-l===u.length)for(let p=0,h=u.length;p<h;p++)a[p+l+1]=u[p];else u.length<1e4?a.splice(l+1,c-l,...u):this._lineOffsets=a=a.slice(0,l+1).concat(u,a.slice(c+1));let d=r.text.length-(o-s);if(d!==0)for(let p=l+1+u.length,h=a.length;p<h;p++)a[p]=a[p]+d}else if(t.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Gx(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return{line:0,character:e};for(;r<i;){let o=Math.floor((r+i)/2);n[o]>e?i=o:r=o+1}let s=r-1;return e=this.ensureBeforeEOL(e,n[s]),{line:s,character:e-n[s]}}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line];if(e.character<=0)return r;let i=e.line+1<n.length?n[e.line+1]:this._content.length,s=Math.min(r+e.character,i);return this.ensureBeforeEOL(s,r)}ensureBeforeEOL(e,n){for(;e>n&&Kx(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(t){function e(i,s,o,l){return new Cl(i,s,o,l)}t.create=e;function n(i,s,o){if(i instanceof Cl)return i.update(s,o),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function r(i,s){let o=i.getText(),l=Uh(s.map(JE),(u,d)=>{let p=u.range.start.line-d.range.start.line;return p===0?u.range.start.character-d.range.start.character:p}),c=0,a=[];for(let u of l){let d=i.offsetAt(u.range.start);if(d<c)throw new Error("Overlapping edit");d>c&&a.push(o.substring(c,d)),u.newText.length&&a.push(u.newText),c=i.offsetAt(u.range.end)}return a.push(o.substr(c)),a.join("")}t.applyEdits=r})(Bh||(Bh={}))});function _e(){_e.init.call(this)}function Rl(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function aS(t){return t._maxListeners===void 0?_e.defaultMaxListeners:t._maxListeners}function tS(t,e,n,r){var i,s,o,l;if(Rl(n),(s=t._events)===void 0?(s=t._events=Object.create(null),t._eventsCount=0):(s.newListener!==void 0&&(t.emit("newListener",e,n.listener?n.listener:n),s=t._events),o=s[e]),o===void 0)o=s[e]=n,++t._eventsCount;else if(typeof o=="function"?o=s[e]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=aS(t))>0&&o.length>i&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=o.length,l=c,console&&console.warn&&console.warn(l)}return t}function XE(){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 nS(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=XE.bind(r);return i.listener=n,r.wrapFn=i,i}function rS(t,e,n){var r=t._events;if(r===void 0)return[];var i=r[e];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?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):lS(i,i.length)}function iS(t){var e=this._events;if(e!==void 0){var n=e[t];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}function lS(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}var sS,oS,Wi,Xx,Zx,eS,Ft,Wh=er(()=>{Wi=typeof Reflect=="object"?Reflect:null,Xx=Wi&&typeof Wi.apply=="function"?Wi.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};oS=Wi&&typeof Wi.ownKeys=="function"?Wi.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};Zx=Number.isNaN||function(t){return t!=t};sS=_e,_e.EventEmitter=_e,_e.prototype._events=void 0,_e.prototype._eventsCount=0,_e.prototype._maxListeners=void 0;eS=10;Object.defineProperty(_e,"defaultMaxListeners",{enumerable:!0,get:function(){return eS},set:function(t){if(typeof t!="number"||t<0||Zx(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");eS=t}}),_e.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},_e.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Zx(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},_e.prototype.getMaxListeners=function(){return aS(this)},_e.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r=t==="error",i=this._events;if(i!==void 0)r=r&&i.error===void 0;else if(!r)return!1;if(r){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[t];if(l===void 0)return!1;if(typeof l=="function")Xx(l,this,e);else{var c=l.length,a=lS(l,c);for(n=0;n<c;++n)Xx(a[n],this,e)}return!0},_e.prototype.addListener=function(t,e){return tS(this,t,e,!1)},_e.prototype.on=_e.prototype.addListener,_e.prototype.prependListener=function(t,e){return tS(this,t,e,!0)},_e.prototype.once=function(t,e){return Rl(e),this.on(t,nS(this,t,e)),this},_e.prototype.prependOnceListener=function(t,e){return Rl(e),this.prependListener(t,nS(this,t,e)),this},_e.prototype.removeListener=function(t,e){var n,r,i,s,o;if(Rl(e),(r=this._events)===void 0)return this;if((n=r[t])===void 0)return this;if(n===e||n.listener===e)--this._eventsCount==0?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if(typeof n!="function"){for(i=-1,s=n.length-1;s>=0;s--)if(n[s]===e||n[s].listener===e){o=n[s].listener,i=s;break}if(i<0)return this;i===0?n.shift():function(l,c){for(;c+1<l.length;c++)l[c]=l[c+1];l.pop()}(n,i),n.length===1&&(r[t]=n[0]),r.removeListener!==void 0&&this.emit("removeListener",t,o||e)}return this},_e.prototype.off=_e.prototype.removeListener,_e.prototype.removeAllListeners=function(t){var e,n,r;if((n=this._events)===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i,s=Object.keys(n);for(r=0;r<s.length;++r)(i=s[r])!=="removeListener"&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(e=n[t])=="function")this.removeListener(t,e);else if(e!==void 0)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},_e.prototype.listeners=function(t){return rS(this,t,!0)},_e.prototype.rawListeners=function(t){return rS(this,t,!1)},_e.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):iS.call(t,e)},_e.prototype.listenerCount=iS,_e.prototype.eventNames=function(){return this._eventsCount>0?oS(this._events):[]};Ft=sS;Ft.EventEmitter;Ft.defaultMaxListeners;Ft.init;Ft.listenerCount;Ft.EventEmitter;Ft.defaultMaxListeners;Ft.init;Ft.listenerCount});var $n={};Ls($n,{EventEmitter:()=>ZE,default:()=>Ft,defaultMaxListeners:()=>eC,init:()=>tC,listenerCount:()=>nC,on:()=>rC,once:()=>iC});var ZE,eC,tC,nC,rC,iC,Bn=er(()=>{Wh();Wh();Ft.once=function(t,e){return new Promise((n,r)=>{function i(...o){s!==void 0&&t.removeListener("error",s),n(o)}let s;e!=="error"&&(s=o=>{t.removeListener(name,i),r(o)},t.once("error",s)),t.once(e,i)})};Ft.on=function(t,e){let n=[],r=[],i=null,s=!1,o={next(){return W(this,null,function*(){let u=n.shift();if(u)return createIterResult(u,!1);if(i){let d=Promise.reject(i);return i=null,d}return s?createIterResult(void 0,!0):new Promise((d,p)=>r.push({resolve:d,reject:p}))})},return(){return W(this,null,function*(){t.removeListener(e,l),t.removeListener("error",c),s=!0;for(let u of r)u.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)})},throw(u){i=u,t.removeListener(e,l),t.removeListener("error",c)},[Symbol.asyncIterator](){return this}};return t.on(e,l),t.on("error",c),o;function l(...u){let d=r.shift();d?d.resolve(createIterResult(u,!1)):n.push(u)}function c(u){s=!0;let d=r.shift();d?d.reject(u):i=u,o.return()}};({EventEmitter:ZE,defaultMaxListeners:eC,init:tC,listenerCount:nC,on:rC,once:iC}=Ft)});var Pl=T((ro,Vh)=>{(function(t,e){if(typeof ro=="object"&&typeof Vh=="object")Vh.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var n=e();for(var r in n)(typeof ro=="object"?ro:t)[r]=n[r]}})(ro,()=>(()=>{"use strict";var t={470:i=>{function s(c){if(typeof c!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(c))}function o(c,a){for(var u,d="",p=0,h=-1,m=0,f=0;f<=c.length;++f){if(f<c.length)u=c.charCodeAt(f);else{if(u===47)break;u=47}if(u===47){if(!(h===f-1||m===1))if(h!==f-1&&m===2){if(d.length<2||p!==2||d.charCodeAt(d.length-1)!==46||d.charCodeAt(d.length-2)!==46){if(d.length>2){var g=d.lastIndexOf("/");if(g!==d.length-1){g===-1?(d="",p=0):p=(d=d.slice(0,g)).length-1-d.lastIndexOf("/"),h=f,m=0;continue}}else if(d.length===2||d.length===1){d="",p=0,h=f,m=0;continue}}a&&(d.length>0?d+="/..":d="..",p=2)}else d.length>0?d+="/"+c.slice(h+1,f):d=c.slice(h+1,f),p=f-h-1;h=f,m=0}else u===46&&m!==-1?++m:m=-1}return d}var l={resolve:function(){for(var c,a="",u=!1,d=arguments.length-1;d>=-1&&!u;d--){var p;d>=0?p=arguments[d]:(c===void 0&&(c=process.cwd()),p=c),s(p),p.length!==0&&(a=p+"/"+a,u=p.charCodeAt(0)===47)}return a=o(a,!u),u?a.length>0?"/"+a:"/":a.length>0?a:"."},normalize:function(c){if(s(c),c.length===0)return".";var a=c.charCodeAt(0)===47,u=c.charCodeAt(c.length-1)===47;return(c=o(c,!a)).length!==0||a||(c="."),c.length>0&&u&&(c+="/"),a?"/"+c:c},isAbsolute:function(c){return s(c),c.length>0&&c.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var c,a=0;a<arguments.length;++a){var u=arguments[a];s(u),u.length>0&&(c===void 0?c=u:c+="/"+u)}return c===void 0?".":l.normalize(c)},relative:function(c,a){if(s(c),s(a),c===a||(c=l.resolve(c))===(a=l.resolve(a)))return"";for(var u=1;u<c.length&&c.charCodeAt(u)===47;++u);for(var d=c.length,p=d-u,h=1;h<a.length&&a.charCodeAt(h)===47;++h);for(var m=a.length-h,f=p<m?p:m,g=-1,b=0;b<=f;++b){if(b===f){if(m>f){if(a.charCodeAt(h+b)===47)return a.slice(h+b+1);if(b===0)return a.slice(h+b)}else p>f&&(c.charCodeAt(u+b)===47?g=b:b===0&&(g=0));break}var v=c.charCodeAt(u+b);if(v!==a.charCodeAt(h+b))break;v===47&&(g=b)}var _="";for(b=u+g+1;b<=d;++b)b!==d&&c.charCodeAt(b)!==47||(_.length===0?_+="..":_+="/..");return _.length>0?_+a.slice(h+g):(h+=g,a.charCodeAt(h)===47&&++h,a.slice(h))},_makeLong:function(c){return c},dirname:function(c){if(s(c),c.length===0)return".";for(var a=c.charCodeAt(0),u=a===47,d=-1,p=!0,h=c.length-1;h>=1;--h)if((a=c.charCodeAt(h))===47){if(!p){d=h;break}}else p=!1;return d===-1?u?"/":".":u&&d===1?"//":c.slice(0,d)},basename:function(c,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');s(c);var u,d=0,p=-1,h=!0;if(a!==void 0&&a.length>0&&a.length<=c.length){if(a.length===c.length&&a===c)return"";var m=a.length-1,f=-1;for(u=c.length-1;u>=0;--u){var g=c.charCodeAt(u);if(g===47){if(!h){d=u+1;break}}else f===-1&&(h=!1,f=u+1),m>=0&&(g===a.charCodeAt(m)?--m==-1&&(p=u):(m=-1,p=f))}return d===p?p=f:p===-1&&(p=c.length),c.slice(d,p)}for(u=c.length-1;u>=0;--u)if(c.charCodeAt(u)===47){if(!h){d=u+1;break}}else p===-1&&(h=!1,p=u+1);return p===-1?"":c.slice(d,p)},extname:function(c){s(c);for(var a=-1,u=0,d=-1,p=!0,h=0,m=c.length-1;m>=0;--m){var f=c.charCodeAt(m);if(f!==47)d===-1&&(p=!1,d=m+1),f===46?a===-1?a=m:h!==1&&(h=1):a!==-1&&(h=-1);else if(!p){u=m+1;break}}return a===-1||d===-1||h===0||h===1&&a===d-1&&a===u+1?"":c.slice(a,d)},format:function(c){if(c===null||typeof c!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof c);return function(a,u){var d=u.dir||u.root,p=u.base||(u.name||"")+(u.ext||"");return d?d===u.root?d+p:d+"/"+p:p}(0,c)},parse:function(c){s(c);var a={root:"",dir:"",base:"",ext:"",name:""};if(c.length===0)return a;var u,d=c.charCodeAt(0),p=d===47;p?(a.root="/",u=1):u=0;for(var h=-1,m=0,f=-1,g=!0,b=c.length-1,v=0;b>=u;--b)if((d=c.charCodeAt(b))!==47)f===-1&&(g=!1,f=b+1),d===46?h===-1?h=b:v!==1&&(v=1):h!==-1&&(v=-1);else if(!g){m=b+1;break}return h===-1||f===-1||v===0||v===1&&h===f-1&&h===m+1?f!==-1&&(a.base=a.name=m===0&&p?c.slice(1,f):c.slice(m,f)):(m===0&&p?(a.name=c.slice(1,h),a.base=c.slice(1,f)):(a.name=c.slice(m,h),a.base=c.slice(m,f)),a.ext=c.slice(h,f)),m>0?a.dir=c.slice(0,m-1):p&&(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),c=/^\w[\w\d+.-]*$/,a=/^\//,u=/^\/\//;function d(O,I){if(!O.scheme&&I)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${O.authority}", path: "${O.path}", query: "${O.query}", fragment: "${O.fragment}"}`);if(O.scheme&&!c.test(O.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(O.path){if(O.authority){if(!a.test(O.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(u.test(O.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let p="",h="/",m=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{constructor(I,P,A,j,V,H=!1){tr(this,"scheme");tr(this,"authority");tr(this,"path");tr(this,"query");tr(this,"fragment");typeof I=="object"?(this.scheme=I.scheme||p,this.authority=I.authority||p,this.path=I.path||p,this.query=I.query||p,this.fragment=I.fragment||p):(this.scheme=function(Te,ie){return Te||ie?Te:"file"}(I,H),this.authority=P||p,this.path=function(Te,ie){switch(Te){case"https":case"http":case"file":ie?ie[0]!==h&&(ie=h+ie):ie=h}return ie}(this.scheme,A||p),this.query=j||p,this.fragment=V||p,d(this,H))}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 S(this,!1)}with(I){if(!I)return this;let{scheme:P,authority:A,path:j,query:V,fragment:H}=I;return P===void 0?P=this.scheme:P===null&&(P=p),A===void 0?A=this.authority:A===null&&(A=p),j===void 0?j=this.path:j===null&&(j=p),V===void 0?V=this.query:V===null&&(V=p),H===void 0?H=this.fragment:H===null&&(H=p),P===this.scheme&&A===this.authority&&j===this.path&&V===this.query&&H===this.fragment?this:new b(P,A,j,V,H)}static parse(I,P=!1){let A=m.exec(I);return A?new b(A[2]||p,R(A[4]||p),R(A[5]||p),R(A[7]||p),R(A[9]||p),P):new b(p,p,p,p,p)}static file(I){let P=p;if(l.isWindows&&(I=I.replace(/\\/g,h)),I[0]===h&&I[1]===h){let A=I.indexOf(h,2);A===-1?(P=I.substring(2),I=h):(P=I.substring(2,A),I=I.substring(A)||h)}return new b("file",P,I,p,p)}static from(I){let P=new b(I.scheme,I.authority,I.path,I.query,I.fragment);return d(P,!0),P}toString(I=!1){return y(this,I)}toJSON(){return this}static revive(I){if(I){if(I instanceof f)return I;{let P=new b(I);return P._formatted=I.external,P._fsPath=I._sep===g?I.fsPath:null,P}}return I}}s.URI=f;let g=l.isWindows?1:void 0;class b extends f{constructor(){super(...arguments);tr(this,"_formatted",null);tr(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=S(this,!1)),this._fsPath}toString(P=!1){return P?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){let P={$mid:1};return this._fsPath&&(P.fsPath=this._fsPath,P._sep=g),this._formatted&&(P.external=this._formatted),this.path&&(P.path=this.path),this.scheme&&(P.scheme=this.scheme),this.authority&&(P.authority=this.authority),this.query&&(P.query=this.query),this.fragment&&(P.fragment=this.fragment),P}}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 _(O,I,P){let A,j=-1;for(let V=0;V<O.length;V++){let H=O.charCodeAt(V);if(H>=97&&H<=122||H>=65&&H<=90||H>=48&&H<=57||H===45||H===46||H===95||H===126||I&&H===47||P&&H===91||P&&H===93||P&&H===58)j!==-1&&(A+=encodeURIComponent(O.substring(j,V)),j=-1),A!==void 0&&(A+=O.charAt(V));else{A===void 0&&(A=O.substr(0,V));let Te=v[H];Te!==void 0?(j!==-1&&(A+=encodeURIComponent(O.substring(j,V)),j=-1),A+=Te):j===-1&&(j=V)}}return j!==-1&&(A+=encodeURIComponent(O.substring(j))),A!==void 0?A:O}function w(O){let I;for(let P=0;P<O.length;P++){let A=O.charCodeAt(P);A===35||A===63?(I===void 0&&(I=O.substr(0,P)),I+=v[A]):I!==void 0&&(I+=O[P])}return I!==void 0?I:O}function S(O,I){let P;return P=O.authority&&O.path.length>1&&O.scheme==="file"?`//${O.authority}${O.path}`:O.path.charCodeAt(0)===47&&(O.path.charCodeAt(1)>=65&&O.path.charCodeAt(1)<=90||O.path.charCodeAt(1)>=97&&O.path.charCodeAt(1)<=122)&&O.path.charCodeAt(2)===58?I?O.path.substr(1):O.path[1].toLowerCase()+O.path.substr(2):O.path,l.isWindows&&(P=P.replace(/\//g,"\\")),P}function y(O,I){let P=I?w:_,A="",{scheme:j,authority:V,path:H,query:Te,fragment:ie}=O;if(j&&(A+=j,A+=":"),(V||j==="file")&&(A+=h,A+=h),V){let te=V.indexOf("@");if(te!==-1){let Se=V.substr(0,te);V=V.substr(te+1),te=Se.lastIndexOf(":"),te===-1?A+=P(Se,!1,!1):(A+=P(Se.substr(0,te),!1,!1),A+=":",A+=P(Se.substr(te+1),!1,!0)),A+="@"}V=V.toLowerCase(),te=V.lastIndexOf(":"),te===-1?A+=P(V,!1,!0):(A+=P(V.substr(0,te),!1,!0),A+=V.substr(te))}if(H){if(H.length>=3&&H.charCodeAt(0)===47&&H.charCodeAt(2)===58){let te=H.charCodeAt(1);te>=65&&te<=90&&(H=`/${String.fromCharCode(te+32)}:${H.substr(3)}`)}else if(H.length>=2&&H.charCodeAt(1)===58){let te=H.charCodeAt(0);te>=65&&te<=90&&(H=`${String.fromCharCode(te+32)}:${H.substr(2)}`)}A+=P(H,!0,!1)}return Te&&(A+="?",A+=P(Te,!1,!1)),ie&&(A+="#",A+=I?ie:_(ie,!1,!1)),A}function x(O){try{return decodeURIComponent(O)}catch(I){return O.length>3?O.substr(0,3)+x(O.substr(3)):O}}s.uriToFsPath=S;let k=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function R(O){return O.match(k)?O.replace(k,I=>x(I)):O}},679:function(i,s,o){var l=this&&this.__createBinding||(Object.create?function(m,f,g,b){b===void 0&&(b=g);var v=Object.getOwnPropertyDescriptor(f,g);v&&!("get"in v?!f.__esModule:v.writable||v.configurable)||(v={enumerable:!0,get:function(){return f[g]}}),Object.defineProperty(m,b,v)}:function(m,f,g,b){b===void 0&&(b=g),m[b]=f[g]}),c=this&&this.__setModuleDefault||(Object.create?function(m,f){Object.defineProperty(m,"default",{enumerable:!0,value:f})}:function(m,f){m.default=f}),a=this&&this.__importStar||function(m){if(m&&m.__esModule)return m;var f={};if(m!=null)for(var g in m)g!=="default"&&Object.prototype.hasOwnProperty.call(m,g)&&l(f,m,g);return c(f,m),f};Object.defineProperty(s,"__esModule",{value:!0}),s.Utils=void 0;let u=a(o(470)),d=u.posix||u,p="/";var h;(function(m){m.joinPath=function(f,...g){return f.with({path:d.join(f.path,...g)})},m.resolvePath=function(f,...g){let b=f.path,v=!1;b[0]!==p&&(b=p+b,v=!0);let _=d.resolve(b,...g);return v&&_[0]===p&&!f.authority&&(_=_.substring(1)),f.with({path:_})},m.dirname=function(f){if(f.path.length===0||f.path===p)return f;let g=d.dirname(f.path);return g.length===1&&g.charCodeAt(0)===46&&(g=""),f.with({path:g})},m.basename=function(f){return d.basename(f.path)},m.extname=function(f){return d.extname(f.path)}})(h||(s.Utils=h={}))}},e={};function n(i){var s=e[i];if(s!==void 0)return s.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}var r={};return(()=>{var i=r;Object.defineProperty(i,"__esModule",{value:!0}),i.Utils=i.URI=void 0;let s=n(796);Object.defineProperty(i,"URI",{enumerable:!0,get:function(){return s.URI}});let o=n(679);Object.defineProperty(i,"Utils",{enumerable:!0,get:function(){return o.Utils}})})(),r})())});var Qh=T((i$,pS)=>{var io=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,sC=typeof AbortController=="function",Al=sC?AbortController:class{constructor(){this.signal=new cS}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})}},oC=typeof AbortSignal=="function",aC=typeof Al.AbortSignal=="function",cS=oC?AbortSignal:aC?Al.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(n=>n(e),this))}onabort(){}addEventListener(e,n){e==="abort"&&this._listeners.push(n)}removeEventListener(e,n){e==="abort"&&(this._listeners=this._listeners.filter(r=>r!==n))}},Kh=new Set,Hh=(t,e)=>{let n=`LRU_CACHE_OPTION_${t}`;Ol(n)&&Yh(n,`${t} option`,`options.${e}`,Hi)},zh=(t,e)=>{let n=`LRU_CACHE_METHOD_${t}`;if(Ol(n)){let{prototype:r}=Hi,{get:i}=Object.getOwnPropertyDescriptor(r,t);Yh(n,`${t} method`,`cache.${e}()`,i)}},lC=(t,e)=>{let n=`LRU_CACHE_PROPERTY_${t}`;if(Ol(n)){let{prototype:r}=Hi,{get:i}=Object.getOwnPropertyDescriptor(r,t);Yh(n,`${t} property`,`cache.${e}`,i)}},uS=(...t)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...t):console.error(...t)},Ol=t=>!Kh.has(t),Yh=(t,e,n,r)=>{Kh.add(t);let i=`The ${e} is deprecated. Please use ${n} instead.`;uS(i,"DeprecationWarning",t,r)},fr=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),dS=t=>fr(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Vi:null:null,Vi=class extends Array{constructor(e){super(e),this.fill(0)}},Gh=class{constructor(e){if(e===0)return[];let n=dS(e);this.heap=new n(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Hi=class t{constructor(e={}){let{max:n=0,ttl:r,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:l,allowStale:c,dispose:a,disposeAfter:u,noDisposeOnSet:d,noUpdateTTL:p,maxSize:h=0,maxEntrySize:m=0,sizeCalculation:f,fetchMethod:g,fetchContext:b,noDeleteOnFetchRejection:v,noDeleteOnStaleGet:_,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:S,ignoreFetchAbort:y}=e,{length:x,maxAge:k,stale:R}=e instanceof t?{}:e;if(n!==0&&!fr(n))throw new TypeError("max option must be a nonnegative integer");let O=n?dS(n):Array;if(!O)throw new Error("invalid max value: "+n);if(this.max=n,this.maxSize=h,this.maxEntrySize=m||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=g||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(n).fill(null),this.valList=new Array(n).fill(null),this.next=new O(n),this.prev=new O(n),this.head=0,this.tail=0,this.free=new Gh(n),this.initialFill=1,this.size=0,typeof a=="function"&&(this.dispose=a),typeof u=="function"?(this.disposeAfter=u,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!d,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!v,this.allowStaleOnFetchRejection=!!w,this.allowStaleOnFetchAbort=!!S,this.ignoreFetchAbort=!!y,this.maxEntrySize!==0){if(this.maxSize!==0&&!fr(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!fr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!c||!!R,this.noDeleteOnStaleGet=!!_,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!l,this.ttlResolution=fr(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=r||k||0,this.ttl){if(!fr(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";Ol(I)&&(Kh.add(I),uS("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",I,t))}R&&Hh("stale","allowStale"),k&&Hh("maxAge","ttl"),x&&Hh("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Vi(this.max),this.starts=new Vi(this.max),this.setItemTTL=(r,i,s=io.now())=>{if(this.starts[r]=i!==0?s:0,this.ttls[r]=i,i!==0&&this.ttlAutopurge){let o=setTimeout(()=>{this.isStale(r)&&this.delete(this.keyList[r])},i+1);o.unref&&o.unref()}},this.updateItemAge=r=>{this.starts[r]=this.ttls[r]!==0?io.now():0},this.statusTTL=(r,i)=>{r&&(r.ttl=this.ttls[i],r.start=this.starts[i],r.now=e||n(),r.remainingTTL=r.now+r.ttl-r.start)};let e=0,n=()=>{let r=io.now();if(this.ttlResolution>0){e=r;let i=setTimeout(()=>e=0,this.ttlResolution);i.unref&&i.unref()}return r};this.getRemainingTTL=r=>{let i=this.keyMap.get(r);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(e||n())},this.isStale=r=>this.ttls[r]!==0&&this.starts[r]!==0&&(e||n())-this.starts[r]>this.ttls[r]}updateItemAge(e){}statusTTL(e,n){}setItemTTL(e,n,r){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Vi(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,n,r,i)=>{if(this.isBackgroundFetch(n))return 0;if(!fr(r))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(r=i(n,e),!fr(r))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 r},this.addItemSize=(e,n,r)=>{if(this.sizes[e]=n,this.maxSize){let i=this.maxSize-this.sizes[e];for(;this.calculatedSize>i;)this.evict(!0)}this.calculatedSize+=this.sizes[e],r&&(r.entrySize=n,r.totalCalculatedSize=this.calculatedSize)}}removeItemSize(e){}addItemSize(e,n){}requireSize(e,n,r,i){if(r||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let n=this.tail;!(!this.isValidIndex(n)||((e||!this.isStale(n))&&(yield n),n===this.head));)n=this.prev[n]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let n=this.head;!(!this.isValidIndex(n)||((e||!this.isStale(n))&&(yield n),n===this.tail));)n=this.next[n]}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,n){for(let r of this.indexes()){let i=this.valList[r],s=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(s!==void 0&&e(s,this.keyList[r],this))return this.get(this.keyList[r],n)}}forEach(e,n=this){for(let r of this.indexes()){let i=this.valList[r],s=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(n,s,this.keyList[r],this)}}rforEach(e,n=this){for(let r of this.rindexes()){let i=this.valList[r],s=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(n,s,this.keyList[r],this)}}get prune(){return zh("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(let n of this.rindexes({allowStale:!0}))this.isStale(n)&&(this.delete(this.keyList[n]),e=!0);return e}dump(){let e=[];for(let n of this.indexes({allowStale:!0})){let r=this.keyList[n],i=this.valList[n],s=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(s===void 0)continue;let o={value:s};if(this.ttls){o.ttl=this.ttls[n];let l=io.now()-this.starts[n];o.start=Math.floor(Date.now()-l)}this.sizes&&(o.size=this.sizes[n]),e.unshift([r,o])}return e}load(e){this.clear();for(let[n,r]of e){if(r.start){let i=Date.now()-r.start;r.start=io.now()-i}this.set(n,r.value,r)}}dispose(e,n,r){}set(e,n,{ttl:r=this.ttl,start:i,noDisposeOnSet:s=this.noDisposeOnSet,size:o=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,status:a}={}){if(o=this.requireSize(e,n,o,l),this.maxEntrySize&&o>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.delete(e),this;let u=this.size===0?void 0:this.keyMap.get(e);if(u===void 0)u=this.newIndex(),this.keyList[u]=e,this.valList[u]=n,this.keyMap.set(e,u),this.next[this.tail]=u,this.prev[u]=this.tail,this.tail=u,this.size++,this.addItemSize(u,o,a),a&&(a.set="add"),c=!1;else{this.moveToTail(u);let d=this.valList[u];if(n!==d){if(this.isBackgroundFetch(d)?d.__abortController.abort(new Error("replaced")):s||(this.dispose(d,e,"set"),this.disposeAfter&&this.disposed.push([d,e,"set"])),this.removeItemSize(u),this.valList[u]=n,this.addItemSize(u,o,a),a){a.set="replace";let p=d&&this.isBackgroundFetch(d)?d.__staleWhileFetching:d;p!==void 0&&(a.oldValue=p)}}else a&&(a.set="update")}if(r!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),c||this.setItemTTL(u,r,i),this.statusTTL(a,u),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 n=this.head,r=this.keyList[n],i=this.valList[n];return this.isBackgroundFetch(i)?i.__abortController.abort(new Error("evicted")):(this.dispose(i,r,"evict"),this.disposeAfter&&this.disposed.push([i,r,"evict"])),this.removeItemSize(n),e&&(this.keyList[n]=null,this.valList[n]=null,this.free.push(n)),this.head=this.next[n],this.keyMap.delete(r),this.size--,n}has(e,{updateAgeOnHas:n=this.updateAgeOnHas,status:r}={}){let i=this.keyMap.get(e);if(i!==void 0)if(this.isStale(i))r&&(r.has="stale",this.statusTTL(r,i));else return n&&this.updateItemAge(i),r&&(r.has="hit"),this.statusTTL(r,i),!0;else r&&(r.has="miss");return!1}peek(e,{allowStale:n=this.allowStale}={}){let r=this.keyMap.get(e);if(r!==void 0&&(n||!this.isStale(r))){let i=this.valList[r];return this.isBackgroundFetch(i)?i.__staleWhileFetching:i}}backgroundFetch(e,n,r,i){let s=n===void 0?void 0:this.valList[n];if(this.isBackgroundFetch(s))return s;let o=new Al;r.signal&&r.signal.addEventListener("abort",()=>o.abort(r.signal.reason));let l={signal:o.signal,options:r,context:i},c=(h,m=!1)=>{let{aborted:f}=o.signal,g=r.ignoreFetchAbort&&h!==void 0;return r.status&&(f&&!m?(r.status.fetchAborted=!0,r.status.fetchError=o.signal.reason,g&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),f&&!g&&!m?u(o.signal.reason):(this.valList[n]===p&&(h===void 0?p.__staleWhileFetching?this.valList[n]=p.__staleWhileFetching:this.delete(e):(r.status&&(r.status.fetchUpdated=!0),this.set(e,h,l.options))),h)},a=h=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=h),u(h)),u=h=>{let{aborted:m}=o.signal,f=m&&r.allowStaleOnFetchAbort,g=f||r.allowStaleOnFetchRejection,b=g||r.noDeleteOnFetchRejection;if(this.valList[n]===p&&(!b||p.__staleWhileFetching===void 0?this.delete(e):f||(this.valList[n]=p.__staleWhileFetching)),g)return r.status&&p.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw h},d=(h,m)=>{this.fetchMethod(e,s,l).then(f=>h(f),m),o.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(h(),r.allowStaleOnFetchAbort&&(h=f=>c(f,!0)))})};r.status&&(r.status.fetchDispatched=!0);let p=new Promise(d).then(c,a);return p.__abortController=o,p.__staleWhileFetching=s,p.__returned=null,n===void 0?(this.set(e,p,vn(st({},l.options),{status:void 0})),n=this.keyMap.get(e)):this.valList[n]=p,p}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 W(this,arguments,function*(e,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:l=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:h=this.allowStaleOnFetchAbort,fetchContext:m=this.fetchContext,forceRefresh:f=!1,status:g,signal:b}={}){if(!this.fetchMethod)return g&&(g.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:g});let _={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:s,noDisposeOnSet:o,size:l,sizeCalculation:c,noUpdateTTL:a,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:h,ignoreFetchAbort:p,status:g,signal:b},w=this.keyMap.get(e);if(w===void 0){g&&(g.fetch="miss");let S=this.backgroundFetch(e,w,_,m);return S.__returned=S}else{let S=this.valList[w];if(this.isBackgroundFetch(S)){let O=n&&S.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",O&&(g.returnedStale=!0)),O?S.__staleWhileFetching:S.__returned=S}let y=this.isStale(w);if(!f&&!y)return g&&(g.fetch="hit"),this.moveToTail(w),r&&this.updateItemAge(w),this.statusTTL(g,w),S;let x=this.backgroundFetch(e,w,_,m),k=x.__staleWhileFetching!==void 0,R=k&&n;return g&&(g.fetch=k&&y?"stale":"refresh",R&&y&&(g.returnedStale=!0)),R?x.__staleWhileFetching:x.__returned=x}})}get(e,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:s}={}){let o=this.keyMap.get(e);if(o!==void 0){let l=this.valList[o],c=this.isBackgroundFetch(l);return this.statusTTL(s,o),this.isStale(o)?(s&&(s.get="stale"),c?(s&&(s.returnedStale=n&&l.__staleWhileFetching!==void 0),n?l.__staleWhileFetching:void 0):(i||this.delete(e),s&&(s.returnedStale=n),n?l:void 0)):(s&&(s.get="hit"),c?l.__staleWhileFetching:(this.moveToTail(o),r&&this.updateItemAge(o),l))}else s&&(s.get="miss")}connect(e,n){this.prev[n]=e,this.next[e]=n}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 zh("del","delete"),this.delete}delete(e){let n=!1;if(this.size!==0){let r=this.keyMap.get(e);if(r!==void 0)if(n=!0,this.size===1)this.clear();else{this.removeItemSize(r);let i=this.valList[r];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[r]=null,this.valList[r]=null,r===this.tail?this.tail=this.prev[r]:r===this.head?this.head=this.next[r]:(this.next[this.prev[r]]=this.next[r],this.prev[this.next[r]]=this.prev[r]),this.size--,this.free.push(r)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return n}clear(){for(let e of this.rindexes({allowStale:!0})){let n=this.valList[e];if(this.isBackgroundFetch(n))n.__abortController.abort(new Error("deleted"));else{let r=this.keyList[e];this.dispose(n,r,"delete"),this.disposeAfter&&this.disposed.push([n,r,"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 zh("reset","clear"),this.clear}get length(){return lC("length","size"),this.size}static get AbortController(){return Al}static get AbortSignal(){return cS}};pS.exports=Hi});var zi=T(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.IndentationType=Un.ConfigurationNamespace=Un.LanguageId=void 0;Un.LanguageId="greyscript";Un.ConfigurationNamespace="greybel";var cC;(function(t){t.Tab="Tab",t.Whitespace="Whitespace"})(cC=Un.IndentationType||(Un.IndentationType={}))});var Gi=T(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.Position=void 0;var Jh=class{constructor(e,n){this.line=e,this.character=n}toString(){return`${this.line}:${this.character}`}};Dl.Position=Jh});var mr=T(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.LiteralToken=Gt.Token=Gt.BaseToken=Gt.BaseTokenOptions=Gt.TokenType=void 0;var hS=Gi(),uC;(function(t){t.EOF="EOF",t.StringLiteral="StringLiteral",t.Keyword="Keyword",t.Identifier="Identifier",t.NumericLiteral="NumericLiteral",t.Punctuator="Punctuator",t.BooleanLiteral="BooleanLiteral",t.NilLiteral="NilLiteral",t.EOL="EOL",t.SliceOperator="SliceOperator",t.Comment="Comment",t.Invalid="Invalid"})(uC=Gt.TokenType||(Gt.TokenType={}));var Xh=class{};Gt.BaseTokenOptions=Xh;var so=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 n=e.offset,r=e.range;this.start=new hS.Position(this.line,r[0]-n+1),this.end=new hS.Position(this.lastLine||this.line,r[1]-n+1)}toString(){let e=this.line,n=this.lastLine!==void 0?this.lastLine:this.line,r=this.start.character,i=this.end.character,s=`${e}:${r} - ${n}:${i}`;return`${this.type}[${s}: value = '${this.value}']`}};Gt.BaseToken=so;var Zh=class extends so{};Gt.Token=Zh;var ef=class extends so{constructor(e){super(e),this.raw=e.raw}toString(){let e=this.line,n=this.lastLine!==void 0?this.lastLine:this.line,r=this.start.character,i=this.end.character,s=`${e}:${r} - ${n}:${i}`;return`${this.type}[${s}: value = ${this.raw}]`}};Gt.LiteralToken=ef});var jl=T(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.CharacterCode=void 0;var dC;(function(t){t[t.WHITESPACE=32]="WHITESPACE",t[t.QUOTE=34]="QUOTE",t[t.NUMBER_0=48]="NUMBER_0",t[t.NUMBER_1=49]="NUMBER_1",t[t.NUMBER_2=50]="NUMBER_2",t[t.NUMBER_3=51]="NUMBER_3",t[t.NUMBER_4=52]="NUMBER_4",t[t.NUMBER_5=53]="NUMBER_5",t[t.NUMBER_6=54]="NUMBER_6",t[t.NUMBER_7=55]="NUMBER_7",t[t.NUMBER_8=56]="NUMBER_8",t[t.NUMBER_9=57]="NUMBER_9",t[t.TAB=9]="TAB",t[t.NEW_LINE=10]="NEW_LINE",t[t.RETURN_LINE=13]="RETURN_LINE",t[t.SLASH=47]="SLASH",t[t.DOT=46]="DOT",t[t.EQUAL=61]="EQUAL",t[t.ASTERISK=42]="ASTERISK",t[t.CARET=94]="CARET",t[t.PERCENT=37]="PERCENT",t[t.COMMA=44]="COMMA",t[t.CURLY_BRACKET_LEFT=123]="CURLY_BRACKET_LEFT",t[t.CURLY_BRACKET_RIGHT=125]="CURLY_BRACKET_RIGHT",t[t.SQUARE_BRACKETS_LEFT=91]="SQUARE_BRACKETS_LEFT",t[t.SQUARE_BRACKETS_RIGHT=93]="SQUARE_BRACKETS_RIGHT",t[t.PARENTHESIS_LEFT=40]="PARENTHESIS_LEFT",t[t.PARENTHESIS_RIGHT=41]="PARENTHESIS_RIGHT",t[t.SEMICOLON=59]="SEMICOLON",t[t.HASH=35]="HASH",t[t.MINUS=45]="MINUS",t[t.PLUS=43]="PLUS",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.AT_SIGN=64]="AT_SIGN",t[t.COLON=58]="COLON",t[t.ARROW_LEFT=60]="ARROW_LEFT",t[t.ARROW_RIGHT=62]="ARROW_RIGHT",t[t.LETTER_E=69]="LETTER_E",t[t.LETTER_e=101]="LETTER_e"})(dC=oo.CharacterCode||(oo.CharacterCode={}))});var Ki=T(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.Keyword=void 0;var pC;(function(t){t.If="if",t.In="in",t.Or="or",t.And="and",t.Isa="isa",t.For="for",t.Not="not",t.New="new",t.End="end",t.EndFor="end for",t.EndWhile="end while",t.EndFunction="end function",t.EndIf="end if",t.Then="then",t.Else="else",t.Break="break",t.While="while",t.ElseIf="else if",t.Return="return",t.Function="function",t.Continue="continue",t.Repeat="repeat"})(pC=ao.Keyword||(ao.Keyword={}))});var rf=T(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});var rn=jl(),hC=Ki(),tf=class{constructor(){this.isKeyword=Set.prototype.has.bind(new Set(Object.values(hC.Keyword)))}isWhitespace(e){return rn.CharacterCode.WHITESPACE===e||rn.CharacterCode.TAB===e}isEndOfLine(e){return rn.CharacterCode.NEW_LINE===e||rn.CharacterCode.RETURN_LINE===e}isComment(e,n){return rn.CharacterCode.SLASH===e&&rn.CharacterCode.SLASH===n}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>=rn.CharacterCode.NUMBER_0&&e<=rn.CharacterCode.NUMBER_9}isWinNewline(e,n){switch(e){case rn.CharacterCode.RETURN_LINE:return rn.CharacterCode.NEW_LINE===n;case rn.CharacterCode.NEW_LINE:return rn.CharacterCode.RETURN_LINE===n}return!1}};nf.default=tf});var Ll=T(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.ParserException=Yi.LexerException=void 0;var sf=class extends Error{constructor(e,n){super(e),this.range=n}};Yi.LexerException=sf;var of=class extends Error{constructor(e,n){super(e),this.range=n}};Yi.ParserException=of});var af=T(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.Literal=void 0;var fC;(function(t){t.True="true",t.False="false",t.Null="null"})(fC=lo.Literal||(lo.Literal={}))});var Qi=T(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.Operator=void 0;var mC;(function(t){t.Plus="+",t.Asterik="*",t.Minus="-",t.Slash="/",t.Power="^",t.Modulo="%",t.LessThan="<",t.GreaterThan=">",t.LessThanOrEqual="<=",t.GreaterThanOrEqual=">=",t.NotEqual="!=",t.Equal="==",t.Or="or",t.And="and",t.Not="not",t.Isa="isa",t.AddShorthand="+=",t.SubtractShorthand="-=",t.MultiplyShorthand="*=",t.DivideShorthand="/=",t.PowerShorthand="^=",t.ModuloShorthand="%=",t.Member=".",t.Assign="=",t.EndOfLine=";",t.EndOfFile="<eof>",t.SliceSeperator=":",t.Comma=",",t.Escape='"',t.SLBracket="[",t.SRBracket="]",t.CLBracket="{",t.CRBracket="}",t.LParenthesis="(",t.RParenthesis=")",t.Reference="@",t.New="new"})(mC=co.Operator||(co.Operator={}))});var Ji=T(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});Ml.Range=void 0;var lf=class{constructor(e,n){this.start=e,this.end=n}toString(){return`${this.start} - ${this.end}`}};Ml.Range=lf});var df=T(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});var cf=class{constructor(){this._head=null,this._tail=null,this._size=0}enqueue(e){let n={value:e};this._head?this._tail.next=n:this._head=n,this._tail=n,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}};uf.default=cf});var ff=T(po=>{"use strict";var mS=po&&po.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(po,"__esModule",{value:!0});var Me=mr(),gC=mS(rf()),oe=jl(),yC=Ll(),pf=Ki(),uo=af(),qe=Qi(),Xi=Gi(),hf=Ji(),fS=mS(df());function gr(t){let e=this.content[this.index];return this.index+=e.length,this.createPunctuator(e,t)}var ql=class t{constructor(e,n={}){let r=this;r.content=e,r.length=e.length,r.index=0,r.tokenStart=null,r.tabWidth=n.tabWidth||1,r.line=1,r.lineStart=0,r.offset=0,r.validator=n.validator||new gC.default,r.unsafe=n.unsafe,r.errors=[],r.backlog=new fS.default,r.snapshot=new fS.default}scan(e,n){let r=t.scanHandlers[e];return r?r.call(this,n):this.validator.isDecDigit(e)?this.scanNumericLiteral(n):(this.index++,null)}isAtWhitespace(){return this.validator.isWhitespace(this.codeAt())}codeAt(e=0){let n=this.index+e;return n<this.length?this.content.charCodeAt(n):0}createEOL(e){let n=this,r=new Me.Token({type:Me.TokenType.EOL,value:qe.Operator.EndOfLine,line:n.line,lineStart:n.lineStart,range:[n.tokenStart,n.index],offset:n.offset,afterSpace:e});return n.snapshot.enqueue(r),r}createIdentifier(e,n){let r=this,i=new Me.Token({type:Me.TokenType.Identifier,value:e,line:r.line,lineStart:r.lineStart,range:[r.tokenStart,r.index],offset:r.offset,afterSpace:n});return r.snapshot.enqueue(i),i}createEOF(e){let n=this,r=new Me.Token({type:Me.TokenType.EOF,value:qe.Operator.EndOfFile,line:n.line,lineStart:n.lineStart,range:[n.index,n.index],offset:n.offset,afterSpace:e});return n.snapshot.enqueue(r),r}createBoolean(e,n){let r=this,i=new Me.LiteralToken({type:Me.TokenType.BooleanLiteral,value:e===uo.Literal.True,raw:e,line:r.line,lineStart:r.lineStart,range:[r.tokenStart,r.index],offset:r.offset,afterSpace:n});return r.snapshot.enqueue(i),i}createNull(e){let n=this,r=new Me.LiteralToken({type:Me.TokenType.NilLiteral,value:null,raw:uo.Literal.Null,line:n.line,lineStart:n.lineStart,range:[n.tokenStart,n.index],offset:n.offset,afterSpace:e});return n.snapshot.enqueue(r),r}createSlice(e){let n=new Me.Token({type:Me.TokenType.SliceOperator,value:qe.Operator.SliceSeperator,line:this.line,lineStart:this.lineStart,range:[this.tokenStart,this.index],offset:this.offset,afterSpace:e});return this.snapshot.enqueue(n),n}createPunctuator(e,n){let r=new Me.Token({type:Me.TokenType.Punctuator,value:e,line:this.line,lineStart:this.lineStart,range:[this.tokenStart,this.index],offset:this.offset,afterSpace:n});return this.snapshot.enqueue(r),r}createNumericLiteral(e,n,r){let i=new Me.LiteralToken({type:Me.TokenType.NumericLiteral,value:e,raw:n,line:this.line,lineStart:this.lineStart,range:[this.tokenStart,this.index],offset:this.offset,afterSpace:r});return this.snapshot.enqueue(i),i}scanStringLiteral(e){let n=this,r=n.validator,i=n.line,s=n.lineStart,o=0,l=n.offset,c=!1;for(;n.index<n.length;){n.index++;let p=n.codeAt();if(n.validator.isEndOfLine(p))r.isWinNewline(p,n.codeAt(1))&&n.index++,n.line++,o=n.index+1-n.offset,l=n.index+1;else if(oe.CharacterCode.QUOTE===p){if(oe.CharacterCode.QUOTE!==n.codeAt(1)){c=!0;break}n.index++}}if(!c)return n.raise("Unexpected string end of file.",new hf.Range(new Xi.Position(i,s-l+1),new Xi.Position(n.line,n.index-l+1)));n.index++;let a=n.content.slice(n.tokenStart,n.index),u=a.slice(1,-1).replace(/""/g,qe.Operator.Escape),d=new Me.LiteralToken({type:Me.TokenType.StringLiteral,value:u,raw:a,line:i,lineStart:s,range:[n.tokenStart,n.index-o],offset:n.offset,afterSpace:e,lastLine:n.line,lastLineStart:n.lineStart});return n.offset=l,n.snapshot.enqueue(d),d}scanComment(e){let n=this,r=n.validator,i=n.line,s=n.lineStart;for(;this.index<this.length&&!r.isEndOfLine(n.codeAt());n.index++);let o=n.content.slice(n.tokenStart+2,n.index),l=new Me.Token({type:Me.TokenType.Comment,value:o,line:i,lineStart:s,range:[n.tokenStart,n.index],offset:n.offset,afterSpace:e});return n.snapshot.enqueue(l),l}scanNumericLiteral(e){let n=this.validator,r,i;for(;this.index<this.length&&(r=i,i=this.codeAt(),n.isDecDigit(i)||oe.CharacterCode.DOT===i||oe.CharacterCode.LETTER_E===i||oe.CharacterCode.LETTER_e===i||(oe.CharacterCode.MINUS===i||oe.CharacterCode.PLUS===i)&&(oe.CharacterCode.LETTER_E===r||oe.CharacterCode.LETTER_e===r));)this.index++;let s=this.content.slice(this.tokenStart,this.index),o=Number(s);return isNaN(o)?this.raise(`Invalid numeric literal: ${s}`,new hf.Range(new Xi.Position(this.line,this.tokenStart-this.offset+1),new Xi.Position(this.line,this.index-this.offset+1))):this.createNumericLiteral(o,s,e)}scanPunctuator(e,n){return this.index+=e.length,this.createPunctuator(e,n)}skipWhiteSpace(){let e=this;for(;e.index<e.length;e.index++){let n=e.content[e.index];if(n===" ")e.offset-=e.tabWidth-1;else if(n!==" ")return}}scanKeyword(e,n){let r=this,i=r.validator,s=e;switch(e){case pf.Keyword.End:{for(r.index++;i.isIdentifierPart(r.codeAt());r.index++);s=r.content.slice(r.tokenStart,r.index);break}case pf.Keyword.Else:{let l=r.content.slice(r.tokenStart,r.index+3);l===pf.Keyword.ElseIf&&(r.index+=3,s=l);break}}let o=new Me.Token({type:Me.TokenType.Keyword,value:s,line:r.line,lineStart:r.lineStart,range:[r.tokenStart,r.index],offset:r.offset,afterSpace:n});return r.snapshot.enqueue(o),o}scanIdentifierOrKeyword(e){let n=this,r=n.validator;for(n.index++;r.isIdentifierPart(n.codeAt());n.index++);let i=n.content.slice(n.tokenStart,n.index);if(r.isKeyword(i))return n.scanKeyword(i,e);switch(i){case uo.Literal.True:case uo.Literal.False:return n.createBoolean(i,e);case uo.Literal.Null:return n.createNull(e)}return n.createIdentifier(i,e)}next(){let e=this;if(e.backlog.size)return e.backlog.dequeue();let n=e.index;e.skipWhiteSpace();let r=n<e.index,i=e.codeAt();if(e.validator.isComment(i,e.codeAt(1)))return e.tokenStart=e.index,e.scanComment(r);if(this.index>=this.length)return e.createEOF(r);if(e.tokenStart=e.index,e.validator.isEndOfLine(i)){e.validator.isWinNewline(i,e.codeAt(1))&&e.index++;let l=e.createEOL(r);return e.line++,e.offset=e.index+1,e.lineStart=++e.index,l}if(e.validator.isIdentifierStart(i))return e.scanIdentifierOrKeyword(r);let s=e.line,o=e.scan(i,r);return o||e.raise(`Invalid character ${i} (Code: ${String.fromCharCode(i)})`,new hf.Range(new Xi.Position(s,e.tokenStart-e.offset+1),new Xi.Position(e.line,e.index-e.offset+1)))}recordSnapshot(){this.snapshot.clear()}recoverFromSnapshot(){this.backlog.copyInto(this.snapshot)}raise(e,n){let r=this,i=new yC.LexerException(e,n);if(r.errors.push(i),r.unsafe)return new Me.Token({type:Me.TokenType.Invalid,value:"",line:r.line,lineStart:r.lineStart,range:[r.tokenStart,r.index],offset:r.offset});throw i}};po.default=ql;ql.scanHandlers={[oe.CharacterCode.QUOTE]:function(e){return this.scanStringLiteral(e)},[oe.CharacterCode.DOT]:function(e){return this.validator.isDecDigit(this.codeAt(1))?this.scanNumericLiteral(e):(this.index++,this.createPunctuator(qe.Operator.Member,e))},[oe.CharacterCode.EQUAL]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.Equal,e):this.scanPunctuator(qe.Operator.Assign,e)},[oe.CharacterCode.ARROW_LEFT]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.LessThanOrEqual,e):this.scanPunctuator(qe.Operator.LessThan,e)},[oe.CharacterCode.ARROW_RIGHT]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.GreaterThanOrEqual,e):this.scanPunctuator(qe.Operator.GreaterThan,e)},[oe.CharacterCode.EXCLAMATION_MARK]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.NotEqual,e):(this.index++,null)},[oe.CharacterCode.MINUS]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.SubtractShorthand,e):this.scanPunctuator(qe.Operator.Minus,e)},[oe.CharacterCode.PLUS]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.AddShorthand,e):this.scanPunctuator(qe.Operator.Plus,e)},[oe.CharacterCode.ASTERISK]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.MultiplyShorthand,e):this.scanPunctuator(qe.Operator.Asterik,e)},[oe.CharacterCode.SLASH]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.DivideShorthand,e):this.scanPunctuator(qe.Operator.Slash,e)},[oe.CharacterCode.COLON]:function(e){return this.index++,this.createSlice(e)},[oe.CharacterCode.CARET]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.PowerShorthand,e):this.scanPunctuator(qe.Operator.Power,e)},[oe.CharacterCode.PERCENT]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.ModuloShorthand,e):this.scanPunctuator(qe.Operator.Modulo,e)},[oe.CharacterCode.SEMICOLON]:function(e){return this.index++,this.createEOL(e)},[oe.CharacterCode.COMMA]:gr,[oe.CharacterCode.CURLY_BRACKET_LEFT]:gr,[oe.CharacterCode.CURLY_BRACKET_RIGHT]:gr,[oe.CharacterCode.SQUARE_BRACKETS_LEFT]:gr,[oe.CharacterCode.SQUARE_BRACKETS_RIGHT]:gr,[oe.CharacterCode.PARENTHESIS_LEFT]:gr,[oe.CharacterCode.PARENTHESIS_RIGHT]:gr,[oe.CharacterCode.AT_SIGN]:gr}});var We=T(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.ASTComment=Kt.ASTBaseBlockWithScope=Kt.ASTBaseBlock=Kt.ASTBase=Kt.ASTType=void 0;var gS;(function(t){t.BreakStatement="BreakStatement",t.ContinueStatement="ContinueStatement",t.ReturnStatement="ReturnStatement",t.IfShortcutStatement="IfShortcutStatement",t.IfShortcutClause="IfShortcutClause",t.ElseifShortcutClause="ElseifShortcutClause",t.ElseShortcutClause="ElseShortcutClause",t.IfStatement="IfStatement",t.IfClause="IfClause",t.ElseifClause="ElseifClause",t.ElseClause="ElseClause",t.WhileStatement="WhileStatement",t.AssignmentStatement="AssignmentStatement",t.CallStatement="CallStatement",t.FunctionDeclaration="FunctionDeclaration",t.ForGenericStatement="ForGenericStatement",t.Chunk="Chunk",t.Identifier="Identifier",t.StringLiteral="StringLiteral",t.NumericLiteral="NumericLiteral",t.BooleanLiteral="BooleanLiteral",t.NilLiteral="NilLiteral",t.Unknown="Unknown",t.MemberExpression="MemberExpression",t.CallExpression="CallExpression",t.Comment="Comment",t.NegationExpression="NegationExpression",t.BinaryNegatedExpression="BinaryNegatedExpression",t.UnaryExpression="UnaryExpression",t.MapKeyString="MapKeyString",t.MapValue="MapValue",t.MapConstructorExpression="MapConstructorExpression",t.MapCallExpression="MapCallExpression",t.ListValue="ListValue",t.ListConstructorExpression="ListConstructorExpression",t.EmptyExpression="EmptyExpression",t.IndexExpression="IndexExpression",t.BinaryExpression="BinaryExpression",t.LogicalExpression="LogicalExpression",t.IsaExpression="IsaExpression",t.SliceExpression="SliceExpression",t.ImportCodeExpression="ImportCodeExpression",t.InvalidCodeExpression="InvalidCodeExpression",t.ParenthesisExpression="ParenthesisExpression",t.ComparisonGroupExpression="ComparisonGroupExpression"})(gS=Kt.ASTType||(Kt.ASTType={}));var ho=class t{constructor(e,n){this.type=e,this.start=n.start,this.end=n.end,this.scope=n.scope||null}toString(){return`${this.type}[${this.start}-${this.end}][]`}clone(){return new t(this.type,{start:this.start,end:this.end,scope:this.scope})}};Kt.ASTBase=ho;var Fl=class t extends ho{constructor(e,n){super(e,n),this.body=n.body||[]}toString(){let e=this.body.map(n=>`${n}`).join(`
|
35
|
+
`&&i++}r&&n.length>0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return Jt.create(0,e);for(;r<i;){let o=Math.floor((r+i)/2);n[o]>e?i=o:r=o+1}let s=r-1;return Jt.create(s,e-n[s])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}};(function(t){let e=Object.prototype.toString;function n(h){return typeof h!="undefined"}t.defined=n;function r(h){return typeof h=="undefined"}t.undefined=r;function i(h){return h===!0||h===!1}t.boolean=i;function s(h){return e.call(h)==="[object String]"}t.string=s;function o(h){return e.call(h)==="[object Number]"}t.number=o;function l(h,m,f){return e.call(h)==="[object Number]"&&m<=h&&h<=f}t.numberRange=l;function c(h){return e.call(h)==="[object Number]"&&-2147483648<=h&&h<=2147483647}t.integer=c;function a(h){return e.call(h)==="[object Number]"&&0<=h&&h<=2147483647}t.uinteger=a;function u(h){return e.call(h)==="[object Function]"}t.func=u;function d(h){return h!==null&&typeof h=="object"}t.objectLiteral=d;function p(h,m){return Array.isArray(h)&&h.every(m)}t.typedArray=p})(D||(D={}))});var Le=T(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.ProtocolNotificationType=Lt.ProtocolNotificationType0=Lt.ProtocolRequestType=Lt.ProtocolRequestType0=Lt.RegistrationType=Lt.MessageDirection=void 0;var Pi=Nr(),iv;(function(t){t.clientToServer="clientToServer",t.serverToClient="serverToClient",t.both="both"})(iv||(Lt.MessageDirection=iv={}));var sh=class{constructor(e){this.method=e}};Lt.RegistrationType=sh;var oh=class extends Pi.RequestType0{constructor(e){super(e)}};Lt.ProtocolRequestType0=oh;var ah=class extends Pi.RequestType{constructor(e){super(e,Pi.ParameterStructures.byName)}};Lt.ProtocolRequestType=ah;var lh=class extends Pi.NotificationType0{constructor(e){super(e)}};Lt.ProtocolNotificationType0=lh;var ch=class extends Pi.NotificationType{constructor(e){super(e,Pi.ParameterStructures.byName)}};Lt.ProtocolNotificationType=ch});var qa=T(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.objectLiteral=tt.typedArray=tt.stringArray=tt.array=tt.func=tt.error=tt.number=tt.string=tt.boolean=void 0;function kI(t){return t===!0||t===!1}tt.boolean=kI;function sv(t){return typeof t=="string"||t instanceof String}tt.string=sv;function TI(t){return typeof t=="number"||t instanceof Number}tt.number=TI;function II(t){return t instanceof Error}tt.error=II;function EI(t){return typeof t=="function"}tt.func=EI;function ov(t){return Array.isArray(t)}tt.array=ov;function CI(t){return ov(t)&&t.every(e=>sv(e))}tt.stringArray=CI;function RI(t,e){return Array.isArray(t)&&t.every(e)}tt.typedArray=RI;function PI(t){return t!==null&&typeof t=="object"}tt.objectLiteral=PI});var cv=T(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.ImplementationRequest=void 0;var av=Le(),lv;(function(t){t.method="textDocument/implementation",t.messageDirection=av.MessageDirection.clientToServer,t.type=new av.ProtocolRequestType(t.method)})(lv||(Fa.ImplementationRequest=lv={}))});var pv=T(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.TypeDefinitionRequest=void 0;var uv=Le(),dv;(function(t){t.method="textDocument/typeDefinition",t.messageDirection=uv.MessageDirection.clientToServer,t.type=new uv.ProtocolRequestType(t.method)})(dv||(Na.TypeDefinitionRequest=dv={}))});var mv=T(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.DidChangeWorkspaceFoldersNotification=Ai.WorkspaceFoldersRequest=void 0;var $a=Le(),hv;(function(t){t.method="workspace/workspaceFolders",t.messageDirection=$a.MessageDirection.serverToClient,t.type=new $a.ProtocolRequestType0(t.method)})(hv||(Ai.WorkspaceFoldersRequest=hv={}));var fv;(function(t){t.method="workspace/didChangeWorkspaceFolders",t.messageDirection=$a.MessageDirection.clientToServer,t.type=new $a.ProtocolNotificationType(t.method)})(fv||(Ai.DidChangeWorkspaceFoldersNotification=fv={}))});var bv=T(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});Ba.ConfigurationRequest=void 0;var gv=Le(),yv;(function(t){t.method="workspace/configuration",t.messageDirection=gv.MessageDirection.serverToClient,t.type=new gv.ProtocolRequestType(t.method)})(yv||(Ba.ConfigurationRequest=yv={}))});var wv=T(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.ColorPresentationRequest=Oi.DocumentColorRequest=void 0;var Ua=Le(),vv;(function(t){t.method="textDocument/documentColor",t.messageDirection=Ua.MessageDirection.clientToServer,t.type=new Ua.ProtocolRequestType(t.method)})(vv||(Oi.DocumentColorRequest=vv={}));var _v;(function(t){t.method="textDocument/colorPresentation",t.messageDirection=Ua.MessageDirection.clientToServer,t.type=new Ua.ProtocolRequestType(t.method)})(_v||(Oi.ColorPresentationRequest=_v={}))});var kv=T(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.FoldingRangeRefreshRequest=Di.FoldingRangeRequest=void 0;var Wa=Le(),xv;(function(t){t.method="textDocument/foldingRange",t.messageDirection=Wa.MessageDirection.clientToServer,t.type=new Wa.ProtocolRequestType(t.method)})(xv||(Di.FoldingRangeRequest=xv={}));var Sv;(function(t){t.method="workspace/foldingRange/refresh",t.messageDirection=Wa.MessageDirection.serverToClient,t.type=new Wa.ProtocolRequestType0(t.method)})(Sv||(Di.FoldingRangeRefreshRequest=Sv={}))});var Ev=T(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.DeclarationRequest=void 0;var Tv=Le(),Iv;(function(t){t.method="textDocument/declaration",t.messageDirection=Tv.MessageDirection.clientToServer,t.type=new Tv.ProtocolRequestType(t.method)})(Iv||(Va.DeclarationRequest=Iv={}))});var Pv=T(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});Ha.SelectionRangeRequest=void 0;var Cv=Le(),Rv;(function(t){t.method="textDocument/selectionRange",t.messageDirection=Cv.MessageDirection.clientToServer,t.type=new Cv.ProtocolRequestType(t.method)})(Rv||(Ha.SelectionRangeRequest=Rv={}))});var jv=T(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.WorkDoneProgressCancelNotification=or.WorkDoneProgressCreateRequest=or.WorkDoneProgress=void 0;var AI=Nr(),za=Le(),Av;(function(t){t.type=new AI.ProgressType;function e(n){return n===t.type}t.is=e})(Av||(or.WorkDoneProgress=Av={}));var Ov;(function(t){t.method="window/workDoneProgress/create",t.messageDirection=za.MessageDirection.serverToClient,t.type=new za.ProtocolRequestType(t.method)})(Ov||(or.WorkDoneProgressCreateRequest=Ov={}));var Dv;(function(t){t.method="window/workDoneProgress/cancel",t.messageDirection=za.MessageDirection.clientToServer,t.type=new za.ProtocolNotificationType(t.method)})(Dv||(or.WorkDoneProgressCancelNotification=Dv={}))});var Fv=T(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.CallHierarchyOutgoingCallsRequest=ar.CallHierarchyIncomingCallsRequest=ar.CallHierarchyPrepareRequest=void 0;var ji=Le(),Lv;(function(t){t.method="textDocument/prepareCallHierarchy",t.messageDirection=ji.MessageDirection.clientToServer,t.type=new ji.ProtocolRequestType(t.method)})(Lv||(ar.CallHierarchyPrepareRequest=Lv={}));var Mv;(function(t){t.method="callHierarchy/incomingCalls",t.messageDirection=ji.MessageDirection.clientToServer,t.type=new ji.ProtocolRequestType(t.method)})(Mv||(ar.CallHierarchyIncomingCallsRequest=Mv={}));var qv;(function(t){t.method="callHierarchy/outgoingCalls",t.messageDirection=ji.MessageDirection.clientToServer,t.type=new ji.ProtocolRequestType(t.method)})(qv||(ar.CallHierarchyOutgoingCallsRequest=qv={}))});var Vv=T(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.SemanticTokensRefreshRequest=Mt.SemanticTokensRangeRequest=Mt.SemanticTokensDeltaRequest=Mt.SemanticTokensRequest=Mt.SemanticTokensRegistrationType=Mt.TokenFormat=void 0;var Nn=Le(),Nv;(function(t){t.Relative="relative"})(Nv||(Mt.TokenFormat=Nv={}));var Ys;(function(t){t.method="textDocument/semanticTokens",t.type=new Nn.RegistrationType(t.method)})(Ys||(Mt.SemanticTokensRegistrationType=Ys={}));var $v;(function(t){t.method="textDocument/semanticTokens/full",t.messageDirection=Nn.MessageDirection.clientToServer,t.type=new Nn.ProtocolRequestType(t.method),t.registrationMethod=Ys.method})($v||(Mt.SemanticTokensRequest=$v={}));var Bv;(function(t){t.method="textDocument/semanticTokens/full/delta",t.messageDirection=Nn.MessageDirection.clientToServer,t.type=new Nn.ProtocolRequestType(t.method),t.registrationMethod=Ys.method})(Bv||(Mt.SemanticTokensDeltaRequest=Bv={}));var Uv;(function(t){t.method="textDocument/semanticTokens/range",t.messageDirection=Nn.MessageDirection.clientToServer,t.type=new Nn.ProtocolRequestType(t.method),t.registrationMethod=Ys.method})(Uv||(Mt.SemanticTokensRangeRequest=Uv={}));var Wv;(function(t){t.method="workspace/semanticTokens/refresh",t.messageDirection=Nn.MessageDirection.serverToClient,t.type=new Nn.ProtocolRequestType0(t.method)})(Wv||(Mt.SemanticTokensRefreshRequest=Wv={}))});var Gv=T(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});Ga.ShowDocumentRequest=void 0;var Hv=Le(),zv;(function(t){t.method="window/showDocument",t.messageDirection=Hv.MessageDirection.serverToClient,t.type=new Hv.ProtocolRequestType(t.method)})(zv||(Ga.ShowDocumentRequest=zv={}))});var Qv=T(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});Ka.LinkedEditingRangeRequest=void 0;var Kv=Le(),Yv;(function(t){t.method="textDocument/linkedEditingRange",t.messageDirection=Kv.MessageDirection.clientToServer,t.type=new Kv.ProtocolRequestType(t.method)})(Yv||(Ka.LinkedEditingRangeRequest=Yv={}))});var i_=T(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.WillDeleteFilesRequest=kt.DidDeleteFilesNotification=kt.DidRenameFilesNotification=kt.WillRenameFilesRequest=kt.DidCreateFilesNotification=kt.WillCreateFilesRequest=kt.FileOperationPatternKind=void 0;var Xt=Le(),Jv;(function(t){t.file="file",t.folder="folder"})(Jv||(kt.FileOperationPatternKind=Jv={}));var Xv;(function(t){t.method="workspace/willCreateFiles",t.messageDirection=Xt.MessageDirection.clientToServer,t.type=new Xt.ProtocolRequestType(t.method)})(Xv||(kt.WillCreateFilesRequest=Xv={}));var Zv;(function(t){t.method="workspace/didCreateFiles",t.messageDirection=Xt.MessageDirection.clientToServer,t.type=new Xt.ProtocolNotificationType(t.method)})(Zv||(kt.DidCreateFilesNotification=Zv={}));var e_;(function(t){t.method="workspace/willRenameFiles",t.messageDirection=Xt.MessageDirection.clientToServer,t.type=new Xt.ProtocolRequestType(t.method)})(e_||(kt.WillRenameFilesRequest=e_={}));var t_;(function(t){t.method="workspace/didRenameFiles",t.messageDirection=Xt.MessageDirection.clientToServer,t.type=new Xt.ProtocolNotificationType(t.method)})(t_||(kt.DidRenameFilesNotification=t_={}));var n_;(function(t){t.method="workspace/didDeleteFiles",t.messageDirection=Xt.MessageDirection.clientToServer,t.type=new Xt.ProtocolNotificationType(t.method)})(n_||(kt.DidDeleteFilesNotification=n_={}));var r_;(function(t){t.method="workspace/willDeleteFiles",t.messageDirection=Xt.MessageDirection.clientToServer,t.type=new Xt.ProtocolRequestType(t.method)})(r_||(kt.WillDeleteFilesRequest=r_={}))});var c_=T(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.MonikerRequest=lr.MonikerKind=lr.UniquenessLevel=void 0;var s_=Le(),o_;(function(t){t.document="document",t.project="project",t.group="group",t.scheme="scheme",t.global="global"})(o_||(lr.UniquenessLevel=o_={}));var a_;(function(t){t.$import="import",t.$export="export",t.local="local"})(a_||(lr.MonikerKind=a_={}));var l_;(function(t){t.method="textDocument/moniker",t.messageDirection=s_.MessageDirection.clientToServer,t.type=new s_.ProtocolRequestType(t.method)})(l_||(lr.MonikerRequest=l_={}))});var h_=T(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.TypeHierarchySubtypesRequest=cr.TypeHierarchySupertypesRequest=cr.TypeHierarchyPrepareRequest=void 0;var Li=Le(),u_;(function(t){t.method="textDocument/prepareTypeHierarchy",t.messageDirection=Li.MessageDirection.clientToServer,t.type=new Li.ProtocolRequestType(t.method)})(u_||(cr.TypeHierarchyPrepareRequest=u_={}));var d_;(function(t){t.method="typeHierarchy/supertypes",t.messageDirection=Li.MessageDirection.clientToServer,t.type=new Li.ProtocolRequestType(t.method)})(d_||(cr.TypeHierarchySupertypesRequest=d_={}));var p_;(function(t){t.method="typeHierarchy/subtypes",t.messageDirection=Li.MessageDirection.clientToServer,t.type=new Li.ProtocolRequestType(t.method)})(p_||(cr.TypeHierarchySubtypesRequest=p_={}))});var g_=T(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.InlineValueRefreshRequest=Mi.InlineValueRequest=void 0;var Ya=Le(),f_;(function(t){t.method="textDocument/inlineValue",t.messageDirection=Ya.MessageDirection.clientToServer,t.type=new Ya.ProtocolRequestType(t.method)})(f_||(Mi.InlineValueRequest=f_={}));var m_;(function(t){t.method="workspace/inlineValue/refresh",t.messageDirection=Ya.MessageDirection.serverToClient,t.type=new Ya.ProtocolRequestType0(t.method)})(m_||(Mi.InlineValueRefreshRequest=m_={}))});var __=T(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.InlayHintRefreshRequest=ur.InlayHintResolveRequest=ur.InlayHintRequest=void 0;var qi=Le(),y_;(function(t){t.method="textDocument/inlayHint",t.messageDirection=qi.MessageDirection.clientToServer,t.type=new qi.ProtocolRequestType(t.method)})(y_||(ur.InlayHintRequest=y_={}));var b_;(function(t){t.method="inlayHint/resolve",t.messageDirection=qi.MessageDirection.clientToServer,t.type=new qi.ProtocolRequestType(t.method)})(b_||(ur.InlayHintResolveRequest=b_={}));var v_;(function(t){t.method="workspace/inlayHint/refresh",t.messageDirection=qi.MessageDirection.serverToClient,t.type=new qi.ProtocolRequestType0(t.method)})(v_||(ur.InlayHintRefreshRequest=v_={}))});var E_=T(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.DiagnosticRefreshRequest=Zt.WorkspaceDiagnosticRequest=Zt.DocumentDiagnosticRequest=Zt.DocumentDiagnosticReportKind=Zt.DiagnosticServerCancellationData=void 0;var I_=Nr(),OI=qa(),Fi=Le(),w_;(function(t){function e(n){let r=n;return r&&OI.boolean(r.retriggerRequest)}t.is=e})(w_||(Zt.DiagnosticServerCancellationData=w_={}));var x_;(function(t){t.Full="full",t.Unchanged="unchanged"})(x_||(Zt.DocumentDiagnosticReportKind=x_={}));var S_;(function(t){t.method="textDocument/diagnostic",t.messageDirection=Fi.MessageDirection.clientToServer,t.type=new Fi.ProtocolRequestType(t.method),t.partialResult=new I_.ProgressType})(S_||(Zt.DocumentDiagnosticRequest=S_={}));var k_;(function(t){t.method="workspace/diagnostic",t.messageDirection=Fi.MessageDirection.clientToServer,t.type=new Fi.ProtocolRequestType(t.method),t.partialResult=new I_.ProgressType})(k_||(Zt.WorkspaceDiagnosticRequest=k_={}));var T_;(function(t){t.method="workspace/diagnostic/refresh",t.messageDirection=Fi.MessageDirection.serverToClient,t.type=new Fi.ProtocolRequestType0(t.method)})(T_||(Zt.DiagnosticRefreshRequest=T_={}))});var j_=T(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.DidCloseNotebookDocumentNotification=Ue.DidSaveNotebookDocumentNotification=Ue.DidChangeNotebookDocumentNotification=Ue.NotebookCellArrayChange=Ue.DidOpenNotebookDocumentNotification=Ue.NotebookDocumentSyncRegistrationType=Ue.NotebookDocument=Ue.NotebookCell=Ue.ExecutionSummary=Ue.NotebookCellKind=void 0;var Qs=(Ma(),Qe(La)),un=qa(),xn=Le(),uh;(function(t){t.Markup=1,t.Code=2;function e(n){return n===1||n===2}t.is=e})(uh||(Ue.NotebookCellKind=uh={}));var dh;(function(t){function e(i,s){let o={executionOrder:i};return(s===!0||s===!1)&&(o.success=s),o}t.create=e;function n(i){let s=i;return un.objectLiteral(s)&&Qs.uinteger.is(s.executionOrder)&&(s.success===void 0||un.boolean(s.success))}t.is=n;function r(i,s){return i===s?!0:i==null||s===null||s===void 0?!1:i.executionOrder===s.executionOrder&&i.success===s.success}t.equals=r})(dh||(Ue.ExecutionSummary=dh={}));var Qa;(function(t){function e(s,o){return{kind:s,document:o}}t.create=e;function n(s){let o=s;return un.objectLiteral(o)&&uh.is(o.kind)&&Qs.DocumentUri.is(o.document)&&(o.metadata===void 0||un.objectLiteral(o.metadata))}t.is=n;function r(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)&&!dh.equals(s.executionSummary,o.executionSummary)&&l.add("executionSummary"),l}t.diff=r;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),c=Array.isArray(o);if(l!==c)return!1;if(l&&c){if(s.length!==o.length)return!1;for(let a=0;a<s.length;a++)if(!i(s[a],o[a]))return!1}if(un.objectLiteral(s)&&un.objectLiteral(o)){let a=Object.keys(s),u=Object.keys(o);if(a.length!==u.length||(a.sort(),u.sort(),!i(a,u)))return!1;for(let d=0;d<a.length;d++){let p=a[d];if(!i(s[p],o[p]))return!1}}return!0}})(Qa||(Ue.NotebookCell=Qa={}));var C_;(function(t){function e(r,i,s,o){return{uri:r,notebookType:i,version:s,cells:o}}t.create=e;function n(r){let i=r;return un.objectLiteral(i)&&un.string(i.uri)&&Qs.integer.is(i.version)&&un.typedArray(i.cells,Qa.is)}t.is=n})(C_||(Ue.NotebookDocument=C_={}));var Ni;(function(t){t.method="notebookDocument/sync",t.messageDirection=xn.MessageDirection.clientToServer,t.type=new xn.RegistrationType(t.method)})(Ni||(Ue.NotebookDocumentSyncRegistrationType=Ni={}));var R_;(function(t){t.method="notebookDocument/didOpen",t.messageDirection=xn.MessageDirection.clientToServer,t.type=new xn.ProtocolNotificationType(t.method),t.registrationMethod=Ni.method})(R_||(Ue.DidOpenNotebookDocumentNotification=R_={}));var P_;(function(t){function e(r){let i=r;return un.objectLiteral(i)&&Qs.uinteger.is(i.start)&&Qs.uinteger.is(i.deleteCount)&&(i.cells===void 0||un.typedArray(i.cells,Qa.is))}t.is=e;function n(r,i,s){let o={start:r,deleteCount:i};return s!==void 0&&(o.cells=s),o}t.create=n})(P_||(Ue.NotebookCellArrayChange=P_={}));var A_;(function(t){t.method="notebookDocument/didChange",t.messageDirection=xn.MessageDirection.clientToServer,t.type=new xn.ProtocolNotificationType(t.method),t.registrationMethod=Ni.method})(A_||(Ue.DidChangeNotebookDocumentNotification=A_={}));var O_;(function(t){t.method="notebookDocument/didSave",t.messageDirection=xn.MessageDirection.clientToServer,t.type=new xn.ProtocolNotificationType(t.method),t.registrationMethod=Ni.method})(O_||(Ue.DidSaveNotebookDocumentNotification=O_={}));var D_;(function(t){t.method="notebookDocument/didClose",t.messageDirection=xn.MessageDirection.clientToServer,t.type=new xn.ProtocolNotificationType(t.method),t.registrationMethod=Ni.method})(D_||(Ue.DidCloseNotebookDocumentNotification=D_={}))});var q_=T(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.InlineCompletionRequest=void 0;var L_=Le(),M_;(function(t){t.method="textDocument/inlineCompletion",t.messageDirection=L_.MessageDirection.clientToServer,t.type=new L_.ProtocolRequestType(t.method)})(M_||(Ja.InlineCompletionRequest=M_={}))});var Qw=T(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 q=Le(),F_=(Ma(),Qe(La)),ht=qa(),DI=cv();Object.defineProperty(E,"ImplementationRequest",{enumerable:!0,get:function(){return DI.ImplementationRequest}});var jI=pv();Object.defineProperty(E,"TypeDefinitionRequest",{enumerable:!0,get:function(){return jI.TypeDefinitionRequest}});var zw=mv();Object.defineProperty(E,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return zw.WorkspaceFoldersRequest}});Object.defineProperty(E,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return zw.DidChangeWorkspaceFoldersNotification}});var LI=bv();Object.defineProperty(E,"ConfigurationRequest",{enumerable:!0,get:function(){return LI.ConfigurationRequest}});var Gw=wv();Object.defineProperty(E,"DocumentColorRequest",{enumerable:!0,get:function(){return Gw.DocumentColorRequest}});Object.defineProperty(E,"ColorPresentationRequest",{enumerable:!0,get:function(){return Gw.ColorPresentationRequest}});var Kw=kv();Object.defineProperty(E,"FoldingRangeRequest",{enumerable:!0,get:function(){return Kw.FoldingRangeRequest}});Object.defineProperty(E,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return Kw.FoldingRangeRefreshRequest}});var MI=Ev();Object.defineProperty(E,"DeclarationRequest",{enumerable:!0,get:function(){return MI.DeclarationRequest}});var qI=Pv();Object.defineProperty(E,"SelectionRangeRequest",{enumerable:!0,get:function(){return qI.SelectionRangeRequest}});var gh=jv();Object.defineProperty(E,"WorkDoneProgress",{enumerable:!0,get:function(){return gh.WorkDoneProgress}});Object.defineProperty(E,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return gh.WorkDoneProgressCreateRequest}});Object.defineProperty(E,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return gh.WorkDoneProgressCancelNotification}});var yh=Fv();Object.defineProperty(E,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return yh.CallHierarchyIncomingCallsRequest}});Object.defineProperty(E,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return yh.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(E,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return yh.CallHierarchyPrepareRequest}});var $i=Vv();Object.defineProperty(E,"TokenFormat",{enumerable:!0,get:function(){return $i.TokenFormat}});Object.defineProperty(E,"SemanticTokensRequest",{enumerable:!0,get:function(){return $i.SemanticTokensRequest}});Object.defineProperty(E,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return $i.SemanticTokensDeltaRequest}});Object.defineProperty(E,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return $i.SemanticTokensRangeRequest}});Object.defineProperty(E,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return $i.SemanticTokensRefreshRequest}});Object.defineProperty(E,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return $i.SemanticTokensRegistrationType}});var FI=Gv();Object.defineProperty(E,"ShowDocumentRequest",{enumerable:!0,get:function(){return FI.ShowDocumentRequest}});var NI=Qv();Object.defineProperty(E,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return NI.LinkedEditingRangeRequest}});var Ur=i_();Object.defineProperty(E,"FileOperationPatternKind",{enumerable:!0,get:function(){return Ur.FileOperationPatternKind}});Object.defineProperty(E,"DidCreateFilesNotification",{enumerable:!0,get:function(){return Ur.DidCreateFilesNotification}});Object.defineProperty(E,"WillCreateFilesRequest",{enumerable:!0,get:function(){return Ur.WillCreateFilesRequest}});Object.defineProperty(E,"DidRenameFilesNotification",{enumerable:!0,get:function(){return Ur.DidRenameFilesNotification}});Object.defineProperty(E,"WillRenameFilesRequest",{enumerable:!0,get:function(){return Ur.WillRenameFilesRequest}});Object.defineProperty(E,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return Ur.DidDeleteFilesNotification}});Object.defineProperty(E,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return Ur.WillDeleteFilesRequest}});var bh=c_();Object.defineProperty(E,"UniquenessLevel",{enumerable:!0,get:function(){return bh.UniquenessLevel}});Object.defineProperty(E,"MonikerKind",{enumerable:!0,get:function(){return bh.MonikerKind}});Object.defineProperty(E,"MonikerRequest",{enumerable:!0,get:function(){return bh.MonikerRequest}});var vh=h_();Object.defineProperty(E,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return vh.TypeHierarchyPrepareRequest}});Object.defineProperty(E,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return vh.TypeHierarchySubtypesRequest}});Object.defineProperty(E,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return vh.TypeHierarchySupertypesRequest}});var Yw=g_();Object.defineProperty(E,"InlineValueRequest",{enumerable:!0,get:function(){return Yw.InlineValueRequest}});Object.defineProperty(E,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return Yw.InlineValueRefreshRequest}});var _h=__();Object.defineProperty(E,"InlayHintRequest",{enumerable:!0,get:function(){return _h.InlayHintRequest}});Object.defineProperty(E,"InlayHintResolveRequest",{enumerable:!0,get:function(){return _h.InlayHintResolveRequest}});Object.defineProperty(E,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return _h.InlayHintRefreshRequest}});var Js=E_();Object.defineProperty(E,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return Js.DiagnosticServerCancellationData}});Object.defineProperty(E,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return Js.DocumentDiagnosticReportKind}});Object.defineProperty(E,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return Js.DocumentDiagnosticRequest}});Object.defineProperty(E,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return Js.WorkspaceDiagnosticRequest}});Object.defineProperty(E,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return Js.DiagnosticRefreshRequest}});var Sn=j_();Object.defineProperty(E,"NotebookCellKind",{enumerable:!0,get:function(){return Sn.NotebookCellKind}});Object.defineProperty(E,"ExecutionSummary",{enumerable:!0,get:function(){return Sn.ExecutionSummary}});Object.defineProperty(E,"NotebookCell",{enumerable:!0,get:function(){return Sn.NotebookCell}});Object.defineProperty(E,"NotebookDocument",{enumerable:!0,get:function(){return Sn.NotebookDocument}});Object.defineProperty(E,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return Sn.NotebookDocumentSyncRegistrationType}});Object.defineProperty(E,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return Sn.DidOpenNotebookDocumentNotification}});Object.defineProperty(E,"NotebookCellArrayChange",{enumerable:!0,get:function(){return Sn.NotebookCellArrayChange}});Object.defineProperty(E,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return Sn.DidChangeNotebookDocumentNotification}});Object.defineProperty(E,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return Sn.DidSaveNotebookDocumentNotification}});Object.defineProperty(E,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return Sn.DidCloseNotebookDocumentNotification}});var $I=q_();Object.defineProperty(E,"InlineCompletionRequest",{enumerable:!0,get:function(){return $I.InlineCompletionRequest}});var ph;(function(t){function e(n){let r=n;return ht.string(r)||ht.string(r.language)||ht.string(r.scheme)||ht.string(r.pattern)}t.is=e})(ph||(E.TextDocumentFilter=ph={}));var hh;(function(t){function e(n){let r=n;return ht.objectLiteral(r)&&(ht.string(r.notebookType)||ht.string(r.scheme)||ht.string(r.pattern))}t.is=e})(hh||(E.NotebookDocumentFilter=hh={}));var fh;(function(t){function e(n){let r=n;return ht.objectLiteral(r)&&(ht.string(r.notebook)||hh.is(r.notebook))&&(r.language===void 0||ht.string(r.language))}t.is=e})(fh||(E.NotebookCellTextDocumentFilter=fh={}));var mh;(function(t){function e(n){if(!Array.isArray(n))return!1;for(let r of n)if(!ht.string(r)&&!ph.is(r)&&!fh.is(r))return!1;return!0}t.is=e})(mh||(E.DocumentSelector=mh={}));var N_;(function(t){t.method="client/registerCapability",t.messageDirection=q.MessageDirection.serverToClient,t.type=new q.ProtocolRequestType(t.method)})(N_||(E.RegistrationRequest=N_={}));var $_;(function(t){t.method="client/unregisterCapability",t.messageDirection=q.MessageDirection.serverToClient,t.type=new q.ProtocolRequestType(t.method)})($_||(E.UnregistrationRequest=$_={}));var B_;(function(t){t.Create="create",t.Rename="rename",t.Delete="delete"})(B_||(E.ResourceOperationKind=B_={}));var U_;(function(t){t.Abort="abort",t.Transactional="transactional",t.TextOnlyTransactional="textOnlyTransactional",t.Undo="undo"})(U_||(E.FailureHandlingKind=U_={}));var W_;(function(t){t.UTF8="utf-8",t.UTF16="utf-16",t.UTF32="utf-32"})(W_||(E.PositionEncodingKind=W_={}));var V_;(function(t){function e(n){let r=n;return r&&ht.string(r.id)&&r.id.length>0}t.hasId=e})(V_||(E.StaticRegistrationOptions=V_={}));var H_;(function(t){function e(n){let r=n;return r&&(r.documentSelector===null||mh.is(r.documentSelector))}t.is=e})(H_||(E.TextDocumentRegistrationOptions=H_={}));var z_;(function(t){function e(r){let i=r;return ht.objectLiteral(i)&&(i.workDoneProgress===void 0||ht.boolean(i.workDoneProgress))}t.is=e;function n(r){let i=r;return i&&ht.boolean(i.workDoneProgress)}t.hasWorkDoneProgress=n})(z_||(E.WorkDoneProgressOptions=z_={}));var G_;(function(t){t.method="initialize",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(G_||(E.InitializeRequest=G_={}));var K_;(function(t){t.unknownProtocolVersion=1})(K_||(E.InitializeErrorCodes=K_={}));var Y_;(function(t){t.method="initialized",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolNotificationType(t.method)})(Y_||(E.InitializedNotification=Y_={}));var Q_;(function(t){t.method="shutdown",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType0(t.method)})(Q_||(E.ShutdownRequest=Q_={}));var J_;(function(t){t.method="exit",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolNotificationType0(t.method)})(J_||(E.ExitNotification=J_={}));var X_;(function(t){t.method="workspace/didChangeConfiguration",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolNotificationType(t.method)})(X_||(E.DidChangeConfigurationNotification=X_={}));var Z_;(function(t){t.Error=1,t.Warning=2,t.Info=3,t.Log=4,t.Debug=5})(Z_||(E.MessageType=Z_={}));var ew;(function(t){t.method="window/showMessage",t.messageDirection=q.MessageDirection.serverToClient,t.type=new q.ProtocolNotificationType(t.method)})(ew||(E.ShowMessageNotification=ew={}));var tw;(function(t){t.method="window/showMessageRequest",t.messageDirection=q.MessageDirection.serverToClient,t.type=new q.ProtocolRequestType(t.method)})(tw||(E.ShowMessageRequest=tw={}));var nw;(function(t){t.method="window/logMessage",t.messageDirection=q.MessageDirection.serverToClient,t.type=new q.ProtocolNotificationType(t.method)})(nw||(E.LogMessageNotification=nw={}));var rw;(function(t){t.method="telemetry/event",t.messageDirection=q.MessageDirection.serverToClient,t.type=new q.ProtocolNotificationType(t.method)})(rw||(E.TelemetryEventNotification=rw={}));var iw;(function(t){t.None=0,t.Full=1,t.Incremental=2})(iw||(E.TextDocumentSyncKind=iw={}));var sw;(function(t){t.method="textDocument/didOpen",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolNotificationType(t.method)})(sw||(E.DidOpenTextDocumentNotification=sw={}));var ow;(function(t){function e(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}t.isIncremental=e;function n(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}t.isFull=n})(ow||(E.TextDocumentContentChangeEvent=ow={}));var aw;(function(t){t.method="textDocument/didChange",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolNotificationType(t.method)})(aw||(E.DidChangeTextDocumentNotification=aw={}));var lw;(function(t){t.method="textDocument/didClose",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolNotificationType(t.method)})(lw||(E.DidCloseTextDocumentNotification=lw={}));var cw;(function(t){t.method="textDocument/didSave",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolNotificationType(t.method)})(cw||(E.DidSaveTextDocumentNotification=cw={}));var uw;(function(t){t.Manual=1,t.AfterDelay=2,t.FocusOut=3})(uw||(E.TextDocumentSaveReason=uw={}));var dw;(function(t){t.method="textDocument/willSave",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolNotificationType(t.method)})(dw||(E.WillSaveTextDocumentNotification=dw={}));var pw;(function(t){t.method="textDocument/willSaveWaitUntil",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(pw||(E.WillSaveTextDocumentWaitUntilRequest=pw={}));var hw;(function(t){t.method="workspace/didChangeWatchedFiles",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolNotificationType(t.method)})(hw||(E.DidChangeWatchedFilesNotification=hw={}));var fw;(function(t){t.Created=1,t.Changed=2,t.Deleted=3})(fw||(E.FileChangeType=fw={}));var mw;(function(t){function e(n){let r=n;return ht.objectLiteral(r)&&(F_.URI.is(r.baseUri)||F_.WorkspaceFolder.is(r.baseUri))&&ht.string(r.pattern)}t.is=e})(mw||(E.RelativePattern=mw={}));var gw;(function(t){t.Create=1,t.Change=2,t.Delete=4})(gw||(E.WatchKind=gw={}));var yw;(function(t){t.method="textDocument/publishDiagnostics",t.messageDirection=q.MessageDirection.serverToClient,t.type=new q.ProtocolNotificationType(t.method)})(yw||(E.PublishDiagnosticsNotification=yw={}));var bw;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.TriggerForIncompleteCompletions=3})(bw||(E.CompletionTriggerKind=bw={}));var vw;(function(t){t.method="textDocument/completion",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(vw||(E.CompletionRequest=vw={}));var _w;(function(t){t.method="completionItem/resolve",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(_w||(E.CompletionResolveRequest=_w={}));var ww;(function(t){t.method="textDocument/hover",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(ww||(E.HoverRequest=ww={}));var xw;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.ContentChange=3})(xw||(E.SignatureHelpTriggerKind=xw={}));var Sw;(function(t){t.method="textDocument/signatureHelp",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Sw||(E.SignatureHelpRequest=Sw={}));var kw;(function(t){t.method="textDocument/definition",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(kw||(E.DefinitionRequest=kw={}));var Tw;(function(t){t.method="textDocument/references",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Tw||(E.ReferencesRequest=Tw={}));var Iw;(function(t){t.method="textDocument/documentHighlight",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Iw||(E.DocumentHighlightRequest=Iw={}));var Ew;(function(t){t.method="textDocument/documentSymbol",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Ew||(E.DocumentSymbolRequest=Ew={}));var Cw;(function(t){t.method="textDocument/codeAction",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Cw||(E.CodeActionRequest=Cw={}));var Rw;(function(t){t.method="codeAction/resolve",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Rw||(E.CodeActionResolveRequest=Rw={}));var Pw;(function(t){t.method="workspace/symbol",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Pw||(E.WorkspaceSymbolRequest=Pw={}));var Aw;(function(t){t.method="workspaceSymbol/resolve",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Aw||(E.WorkspaceSymbolResolveRequest=Aw={}));var Ow;(function(t){t.method="textDocument/codeLens",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Ow||(E.CodeLensRequest=Ow={}));var Dw;(function(t){t.method="codeLens/resolve",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Dw||(E.CodeLensResolveRequest=Dw={}));var jw;(function(t){t.method="workspace/codeLens/refresh",t.messageDirection=q.MessageDirection.serverToClient,t.type=new q.ProtocolRequestType0(t.method)})(jw||(E.CodeLensRefreshRequest=jw={}));var Lw;(function(t){t.method="textDocument/documentLink",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Lw||(E.DocumentLinkRequest=Lw={}));var Mw;(function(t){t.method="documentLink/resolve",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Mw||(E.DocumentLinkResolveRequest=Mw={}));var qw;(function(t){t.method="textDocument/formatting",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(qw||(E.DocumentFormattingRequest=qw={}));var Fw;(function(t){t.method="textDocument/rangeFormatting",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Fw||(E.DocumentRangeFormattingRequest=Fw={}));var Nw;(function(t){t.method="textDocument/rangesFormatting",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Nw||(E.DocumentRangesFormattingRequest=Nw={}));var $w;(function(t){t.method="textDocument/onTypeFormatting",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})($w||(E.DocumentOnTypeFormattingRequest=$w={}));var Bw;(function(t){t.Identifier=1})(Bw||(E.PrepareSupportDefaultBehavior=Bw={}));var Uw;(function(t){t.method="textDocument/rename",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Uw||(E.RenameRequest=Uw={}));var Ww;(function(t){t.method="textDocument/prepareRename",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Ww||(E.PrepareRenameRequest=Ww={}));var Vw;(function(t){t.method="workspace/executeCommand",t.messageDirection=q.MessageDirection.clientToServer,t.type=new q.ProtocolRequestType(t.method)})(Vw||(E.ExecuteCommandRequest=Vw={}));var Hw;(function(t){t.method="workspace/applyEdit",t.messageDirection=q.MessageDirection.serverToClient,t.type=new q.ProtocolRequestType("workspace/applyEdit")})(Hw||(E.ApplyWorkspaceEditRequest=Hw={}))});var Xw=T(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});Xa.createProtocolConnection=void 0;var Jw=Nr();function BI(t,e,n,r){return Jw.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Jw.createMessageConnection)(t,e,n,r)}Xa.createProtocolConnection=BI});var ex=T(qt=>{"use strict";var UI=qt&&qt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Za=qt&&qt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&UI(e,t,n)};Object.defineProperty(qt,"__esModule",{value:!0});qt.LSPErrorCodes=qt.createProtocolConnection=void 0;Za(Nr(),qt);Za((Ma(),Qe(La)),qt);Za(Le(),qt);Za(Qw(),qt);var WI=Xw();Object.defineProperty(qt,"createProtocolConnection",{enumerable:!0,get:function(){return WI.createProtocolConnection}});var Zw;(function(t){t.lspReservedErrorRangeStart=-32899,t.RequestFailed=-32803,t.ServerCancelled=-32802,t.ContentModified=-32801,t.RequestCancelled=-32800,t.lspReservedErrorRangeEnd=-32800})(Zw||(qt.LSPErrorCodes=Zw={}))});var Je=T(kn=>{"use strict";var VI=kn&&kn.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),tx=kn&&kn.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&VI(e,t,n)};Object.defineProperty(kn,"__esModule",{value:!0});kn.createProtocolConnection=void 0;var HI=np();tx(np(),kn);tx(ex(),kn);function zI(t,e,n,r){return(0,HI.createMessageConnection)(t,e,n,r)}kn.createProtocolConnection=zI});var xh=T(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.SemanticTokensBuilder=dr.SemanticTokensDiff=dr.SemanticTokensFeature=void 0;var el=Je(),GI=t=>class extends t{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(el.SemanticTokensRefreshRequest.type),on:e=>{let n=el.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:e=>{let n=el.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:e=>{let n=el.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};dr.SemanticTokensFeature=GI;var tl=class{constructor(e,n){this.originalSequence=e,this.modifiedSequence=n}computeDiff(){let e=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r<n&&r<e&&this.originalSequence[r]===this.modifiedSequence[r];)r++;if(r<n&&r<e){let i=e-1,s=n-1;for(;i>=r&&s>=r&&this.originalSequence[i]===this.modifiedSequence[s];)i--,s--;(i<r||s<r)&&(i++,s++);let o=i-r+1,l=this.modifiedSequence.slice(r,s+1);return l.length===1&&l[0]===this.originalSequence[i]?[{start:r,deleteCount:o-1}]:[{start:r,deleteCount:o,data:l}]}else return r<n?[{start:r,deleteCount:0,data:this.modifiedSequence.slice(r)}]:r<e?[{start:r,deleteCount:e-r}]:[]}};dr.SemanticTokensDiff=tl;var wh=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,n,r,i,s){let o=e,l=n;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++]=r,this._data[this._dataLen++]=i,this._data[this._dataLen++]=s,this._prevLine=e,this._prevChar=n}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 tl(this._prevData,this._data).computeDiff()}:this.build()}};dr.SemanticTokensBuilder=wh});var nx=T(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.InlineCompletionFeature=void 0;var KI=Je(),YI=t=>class extends t{get inlineCompletion(){return{on:e=>this.connection.onRequest(KI.InlineCompletionRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n)))}}};nl.InlineCompletionFeature=YI});var kh=T(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.TextDocuments=void 0;var Wr=Je(),Sh=class{constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new Wr.Emitter,this._onDidOpen=new Wr.Emitter,this._onDidClose=new Wr.Emitter,this._onDidSave=new Wr.Emitter,this._onWillSave=new Wr.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=Wr.TextDocumentSyncKind.Incremental;let n=[];return n.push(e.onDidOpenTextDocument(r=>{let i=r.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)})),n.push(e.onDidChangeTextDocument(r=>{let i=r.textDocument,s=r.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})))})),n.push(e.onDidCloseTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:i})))})),n.push(e.onWillSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onWillSave.fire(Object.freeze({document:i,reason:r.reason}))})),n.push(e.onWillSaveTextDocumentWaitUntil((r,i)=>{let s=this._syncedDocuments.get(r.textDocument.uri);return s!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:s,reason:r.reason}),i):[]})),n.push(e.onDidSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onDidSave.fire(Object.freeze({document:i}))})),Wr.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};rl.TextDocuments=Sh});var Ih=T(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.NotebookDocuments=Bi.NotebookSyncFeature=void 0;var en=Je(),rx=kh(),QI=t=>class extends t{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(en.DidOpenNotebookDocumentNotification.type,n=>{e(n)}),onDidChangeNotebookDocument:e=>this.connection.onNotification(en.DidChangeNotebookDocumentNotification.type,n=>{e(n)}),onDidSaveNotebookDocument:e=>this.connection.onNotification(en.DidSaveNotebookDocumentNotification.type,n=>{e(n)}),onDidCloseNotebookDocument:e=>this.connection.onNotification(en.DidCloseNotebookDocumentNotification.type,n=>{e(n)})}}};Bi.NotebookSyncFeature=QI;var il=class t{onDidOpenTextDocument(e){return this.openHandler=e,en.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,en.Disposable.create(()=>{this.changeHandler=e})}changeTextDocument(e){this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,en.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(e){this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return t.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return t.NULL_DISPOSE}onDidSaveTextDocument(){return t.NULL_DISPOSE}};il.NULL_DISPOSE=Object.freeze({dispose:()=>{}});var Th=class{constructor(e){e instanceof rx.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new rx.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new en.Emitter,this._onDidChange=new en.Emitter,this._onDidSave=new en.Emitter,this._onDidClose=new en.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){let n=this.notebookCellMap.get(e);return n&&n[0]}findNotebookDocumentForCell(e){let n=typeof e=="string"?e:e.document,r=this.notebookCellMap.get(n);return r&&r[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 n=new il,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(e.notebooks.synchronization.onDidOpenNotebookDocument(i=>{this.notebookDocuments.set(i.notebookDocument.uri,i.notebookDocument);for(let s of i.cellTextDocuments)n.openTextDocument({textDocument:s});this.updateCellMap(i.notebookDocument),this._onDidOpen.fire(i.notebookDocument)})),r.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,c=i.change;c.metadata!==void 0&&(l=!0,s.metadata=c.metadata);let a=[],u=[],d=[],p=[];if(c.cells!==void 0){let b=c.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)n.openTextDocument({textDocument:_}),a.push(_.uri);if(b.structure.didClose)for(let _ of b.structure.didClose)n.closeTextDocument({textDocument:_}),u.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 S=s.cells.splice(_,1,w);if(d.push({old:S[0],new:w}),v.delete(w.document),v.size===0)break}}}if(b.textContent!==void 0)for(let v of b.textContent)n.changeTextDocument({textDocument:v.document,contentChanges:v.changes}),p.push(v.document.uri)}this.updateCellMap(s);let h={notebookDocument:s};l&&(h.metadata={old:o,new:s.metadata});let m=[];for(let b of a)m.push(this.getNotebookCell(b));let f=[];for(let b of u)f.push(this.getNotebookCell(b));let g=[];for(let b of p)g.push(this.getNotebookCell(b));(m.length>0||f.length>0||d.length>0||g.length>0)&&(h.cells={added:m,removed:f,changed:{data:d,textContent:g}}),(h.metadata!==void 0||h.cells!==void 0)&&this._onDidChange.fire(h)})),r.push(e.notebooks.synchronization.onDidSaveNotebookDocument(i=>{let s=this.notebookDocuments.get(i.notebookDocument.uri);s!==void 0&&this._onDidSave.fire(s)})),r.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)n.closeTextDocument({textDocument:o});this.notebookDocuments.delete(i.notebookDocument.uri);for(let o of s.cells)this.notebookCellMap.delete(o.document)}})),en.Disposable.create(()=>{r.forEach(i=>i.dispose())})}updateCellMap(e){for(let n of e.cells)this.notebookCellMap.set(n.document,[n,e])}};Bi.NotebookDocuments=Th});var Eh=T(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.thenable=nt.typedArray=nt.stringArray=nt.array=nt.func=nt.error=nt.number=nt.string=nt.boolean=void 0;function JI(t){return t===!0||t===!1}nt.boolean=JI;function ix(t){return typeof t=="string"||t instanceof String}nt.string=ix;function XI(t){return typeof t=="number"||t instanceof Number}nt.number=XI;function ZI(t){return t instanceof Error}nt.error=ZI;function sx(t){return typeof t=="function"}nt.func=sx;function ox(t){return Array.isArray(t)}nt.array=ox;function eE(t){return ox(t)&&t.every(e=>ix(e))}nt.stringArray=eE;function tE(t,e){return Array.isArray(t)&&t.every(e)}nt.typedArray=tE;function nE(t){return t&&sx(t.then)}nt.thenable=nE});var Ch=T(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.generateUuid=tn.parse=tn.isUUID=tn.v4=tn.empty=void 0;var Xs=class{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},Zs=class t extends Xs{static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return t._oneOf(t._chars)}constructor(){super([t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))}};Zs._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];Zs._timeHighBits=["8","9","a","b"];tn.empty=new Xs("00000000-0000-0000-0000-000000000000");function ax(){return new Zs}tn.v4=ax;var rE=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function lx(t){return rE.test(t)}tn.isUUID=lx;function iE(t){if(!lx(t))throw new Error("invalid uuid");return new Xs(t)}tn.parse=iE;function sE(){return ax().asHex()}tn.generateUuid=sE});var cx=T(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.attachPartialResult=hr.ProgressFeature=hr.attachWorkDone=void 0;var pr=Je(),oE=Ch(),Vr=class t{constructor(e,n){this._connection=e,this._token=n,t.Instances.set(this._token,this)}begin(e,n,r,i){let s={kind:"begin",title:e,percentage:n,message:r,cancellable:i};this._connection.sendProgress(pr.WorkDoneProgress.type,this._token,s)}report(e,n){let r={kind:"report"};typeof e=="number"?(r.percentage=e,n!==void 0&&(r.message=n)):r.message=e,this._connection.sendProgress(pr.WorkDoneProgress.type,this._token,r)}done(){t.Instances.delete(this._token),this._connection.sendProgress(pr.WorkDoneProgress.type,this._token,{kind:"end"})}};Vr.Instances=new Map;var sl=class extends Vr{constructor(e,n){super(e,n),this._source=new pr.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},eo=class{constructor(){}begin(){}report(){}done(){}},ol=class extends eo{constructor(){super(),this._source=new pr.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function aE(t,e){if(e===void 0||e.workDoneToken===void 0)return new eo;let n=e.workDoneToken;return delete e.workDoneToken,new Vr(t,n)}hr.attachWorkDone=aE;var lE=t=>class extends t{constructor(){super(),this._progressSupported=!1}initialize(e){var n;super.initialize(e),((n=e==null?void 0:e.window)==null?void 0:n.workDoneProgress)===!0&&(this._progressSupported=!0,this.connection.onNotification(pr.WorkDoneProgressCancelNotification.type,r=>{let i=Vr.Instances.get(r.token);(i instanceof sl||i instanceof ol)&&i.cancel()}))}attachWorkDoneProgress(e){return e===void 0?new eo:new Vr(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){let e=(0,oE.generateUuid)();return this.connection.sendRequest(pr.WorkDoneProgressCreateRequest.type,{token:e}).then(()=>new sl(this.connection,e))}else return Promise.resolve(new ol)}};hr.ProgressFeature=lE;var Rh;(function(t){t.type=new pr.ProgressType})(Rh||(Rh={}));var Ph=class{constructor(e,n){this._connection=e,this._token=n}report(e){this._connection.sendProgress(Rh.type,this._token,e)}};function cE(t,e){if(e===void 0||e.partialResultToken===void 0)return;let n=e.partialResultToken;return delete e.partialResultToken,new Ph(t,n)}hr.attachPartialResult=cE});var ux=T(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.ConfigurationFeature=void 0;var uE=Je(),dE=Eh(),pE=t=>class extends t{getConfiguration(e){return e?dE.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let n={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(uE.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(e)?r:r[0]:Array.isArray(e)?[]:null)}};al.ConfigurationFeature=pE});var dx=T(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.WorkspaceFoldersFeature=void 0;var ll=Je(),hE=t=>class extends t{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let n=e.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new ll.Emitter,this.connection.onNotification(ll.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(e){var r,i;super.fillServerCapabilities(e);let n=(i=(r=e.workspace)==null?void 0:r.workspaceFolders)==null?void 0:i.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(ll.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(ll.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};cl.WorkspaceFoldersFeature=hE});var px=T(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.CallHierarchyFeature=void 0;var Ah=Je(),fE=t=>class extends t{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(Ah.CallHierarchyPrepareRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:e=>{let n=Ah.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:e=>{let n=Ah.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};ul.CallHierarchyFeature=fE});var hx=T(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.ShowDocumentFeature=void 0;var mE=Je(),gE=t=>class extends t{showDocument(e){return this.connection.sendRequest(mE.ShowDocumentRequest.type,e)}};dl.ShowDocumentFeature=gE});var fx=T(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.FileOperationsFeature=void 0;var Ui=Je(),yE=t=>class extends t{onDidCreateFiles(e){return this.connection.onNotification(Ui.DidCreateFilesNotification.type,n=>{e(n)})}onDidRenameFiles(e){return this.connection.onNotification(Ui.DidRenameFilesNotification.type,n=>{e(n)})}onDidDeleteFiles(e){return this.connection.onNotification(Ui.DidDeleteFilesNotification.type,n=>{e(n)})}onWillCreateFiles(e){return this.connection.onRequest(Ui.WillCreateFilesRequest.type,(n,r)=>e(n,r))}onWillRenameFiles(e){return this.connection.onRequest(Ui.WillRenameFilesRequest.type,(n,r)=>e(n,r))}onWillDeleteFiles(e){return this.connection.onRequest(Ui.WillDeleteFilesRequest.type,(n,r)=>e(n,r))}};pl.FileOperationsFeature=yE});var mx=T(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.LinkedEditingRangeFeature=void 0;var bE=Je(),vE=t=>class extends t{onLinkedEditingRange(e){return this.connection.onRequest(bE.LinkedEditingRangeRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0))}};hl.LinkedEditingRangeFeature=vE});var gx=T(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});fl.TypeHierarchyFeature=void 0;var Oh=Je(),_E=t=>class extends t{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(Oh.TypeHierarchyPrepareRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:e=>{let n=Oh.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:e=>{let n=Oh.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};fl.TypeHierarchyFeature=_E});var bx=T(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});ml.InlineValueFeature=void 0;var yx=Je(),wE=t=>class extends t{get inlineValue(){return{refresh:()=>this.connection.sendRequest(yx.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(yx.InlineValueRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n)))}}};ml.InlineValueFeature=wE});var _x=T(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});gl.FoldingRangeFeature=void 0;var vx=Je(),xE=t=>class extends t{get foldingRange(){return{refresh:()=>this.connection.sendRequest(vx.FoldingRangeRefreshRequest.type),on:e=>{let n=vx.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};gl.FoldingRangeFeature=xE});var wx=T(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.InlayHintFeature=void 0;var Dh=Je(),SE=t=>class extends t{get inlayHint(){return{refresh:()=>this.connection.sendRequest(Dh.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(Dh.InlayHintRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n))),resolve:e=>this.connection.onRequest(Dh.InlayHintResolveRequest.type,(n,r)=>e(n,r))}}};yl.InlayHintFeature=SE});var xx=T(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});bl.DiagnosticFeature=void 0;var to=Je(),kE=t=>class extends t{get diagnostics(){return{refresh:()=>this.connection.sendRequest(to.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(to.DocumentDiagnosticRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(to.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:e=>this.connection.onRequest(to.WorkspaceDiagnosticRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(to.WorkspaceDiagnosticRequest.partialResult,n)))}}};bl.DiagnosticFeature=kE});var Sx=T(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.MonikerFeature=void 0;var TE=Je(),IE=t=>class extends t{get moniker(){return{on:e=>{let n=TE.MonikerRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};vl.MonikerFeature=IE});var Fx=T(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.createConnection=de.combineFeatures=de.combineNotebooksFeatures=de.combineLanguagesFeatures=de.combineWorkspaceFeatures=de.combineWindowFeatures=de.combineClientFeatures=de.combineTracerFeatures=de.combineTelemetryFeatures=de.combineConsoleFeatures=de._NotebooksImpl=de._LanguagesImpl=de.BulkUnregistration=de.BulkRegistration=de.ErrorMessageTracker=void 0;var N=Je(),nn=Eh(),Lh=Ch(),re=cx(),EE=ux(),CE=dx(),RE=px(),PE=xh(),AE=hx(),OE=fx(),DE=mx(),jE=gx(),LE=bx(),ME=_x(),qE=wx(),FE=xx(),NE=Ih(),$E=Sx();function jh(t){if(t!==null)return t}var Mh=class{constructor(){this._messages=Object.create(null)}add(e){let n=this._messages[e];n||(n=0),n++,this._messages[e]=n}sendErrors(e){Object.keys(this._messages).forEach(n=>{e.window.showErrorMessage(n)})}};de.ErrorMessageTracker=Mh;var _l=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(N.MessageType.Error,e)}warn(e){this.send(N.MessageType.Warning,e)}info(e){this.send(N.MessageType.Info,e)}log(e){this.send(N.MessageType.Log,e)}debug(e){this.send(N.MessageType.Debug,e)}send(e,n){this._rawConnection&&this._rawConnection.sendNotification(N.LogMessageNotification.type,{type:e,message:n}).catch(()=>{(0,N.RAL)().console.error("Sending log message failed")})}},qh=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,...n){let r={type:N.MessageType.Error,message:e,actions:n};return this.connection.sendRequest(N.ShowMessageRequest.type,r).then(jh)}showWarningMessage(e,...n){let r={type:N.MessageType.Warning,message:e,actions:n};return this.connection.sendRequest(N.ShowMessageRequest.type,r).then(jh)}showInformationMessage(e,...n){let r={type:N.MessageType.Info,message:e,actions:n};return this.connection.sendRequest(N.ShowMessageRequest.type,r).then(jh)}},kx=(0,AE.ShowDocumentFeature)((0,re.ProgressFeature)(qh)),Tx;(function(t){function e(){return new wl}t.create=e})(Tx||(de.BulkRegistration=Tx={}));var wl=class{constructor(){this._registrations=[],this._registered=new Set}add(e,n){let r=nn.string(e)?e:e.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let i=Lh.generateUuid();this._registrations.push({id:i,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},Ix;(function(t){function e(){return new no(void 0,[])}t.create=e})(Ix||(de.BulkUnregistration=Ix={}));var no=class{constructor(e,n){this._connection=e,this._unregistrations=new Map,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let r of this._unregistrations.values())e.push(r);let n={unregisterations:e};this._connection.sendRequest(N.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(e){let n=nn.string(e)?e:e.method,r=this._unregistrations.get(n);if(!r)return!1;let i={unregisterations:[r]};return this._connection.sendRequest(N.UnregistrationRequest.type,i).then(()=>{this._unregistrations.delete(n)},s=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},xl=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,n,r){return e instanceof wl?this.registerMany(e):e instanceof no?this.registerSingle1(e,n,r):this.registerSingle2(e,n)}registerSingle1(e,n,r){let i=nn.string(n)?n:n.method,s=Lh.generateUuid(),o={registrations:[{id:s,method:i,registerOptions:r||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(N.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,n){let r=nn.string(e)?e:e.method,i=Lh.generateUuid(),s={registrations:[{id:i,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(N.RegistrationRequest.type,s).then(o=>N.Disposable.create(()=>{this.unregisterSingle(i,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${i} failed.`)})}),o=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(o)))}unregisterSingle(e,n){let r={unregisterations:[{id:e,method:n}]};return this.connection.sendRequest(N.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)})}registerMany(e){let n=e.asRegistrationParams();return this.connection.sendRequest(N.RegistrationRequest.type,n).then(()=>new no(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Fh=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 n(i){return i&&!!i.edit}let r=n(e)?e:{edit:e};return this.connection.sendRequest(N.ApplyWorkspaceEditRequest.type,r)}},Ex=(0,OE.FileOperationsFeature)((0,CE.WorkspaceFoldersFeature)((0,EE.ConfigurationFeature)(Fh))),Sl=class{constructor(){this._trace=N.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,n){this._trace!==N.Trace.Off&&this.connection.sendNotification(N.LogTraceNotification.type,{message:e,verbose:this._trace===N.Trace.Verbose?n:void 0}).catch(()=>{})}},kl=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(N.TelemetryEventNotification.type,e).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},Tl=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,re.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,n){return(0,re.attachPartialResult)(this.connection,n)}};de._LanguagesImpl=Tl;var Cx=(0,ME.FoldingRangeFeature)((0,$E.MonikerFeature)((0,FE.DiagnosticFeature)((0,qE.InlayHintFeature)((0,LE.InlineValueFeature)((0,jE.TypeHierarchyFeature)((0,DE.LinkedEditingRangeFeature)((0,PE.SemanticTokensFeature)((0,RE.CallHierarchyFeature)(Tl))))))))),Il=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,re.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,n){return(0,re.attachPartialResult)(this.connection,n)}};de._NotebooksImpl=Il;var Rx=(0,NE.NotebookSyncFeature)(Il);function Px(t,e){return function(n){return e(t(n))}}de.combineConsoleFeatures=Px;function Ax(t,e){return function(n){return e(t(n))}}de.combineTelemetryFeatures=Ax;function Ox(t,e){return function(n){return e(t(n))}}de.combineTracerFeatures=Ox;function Dx(t,e){return function(n){return e(t(n))}}de.combineClientFeatures=Dx;function jx(t,e){return function(n){return e(t(n))}}de.combineWindowFeatures=jx;function Lx(t,e){return function(n){return e(t(n))}}de.combineWorkspaceFeatures=Lx;function Mx(t,e){return function(n){return e(t(n))}}de.combineLanguagesFeatures=Mx;function qx(t,e){return function(n){return e(t(n))}}de.combineNotebooksFeatures=qx;function BE(t,e){function n(i,s,o){return i&&s?o(i,s):i||s}return{__brand:"features",console:n(t.console,e.console,Px),tracer:n(t.tracer,e.tracer,Ox),telemetry:n(t.telemetry,e.telemetry,Ax),client:n(t.client,e.client,Dx),window:n(t.window,e.window,jx),workspace:n(t.workspace,e.workspace,Lx),languages:n(t.languages,e.languages,Mx),notebooks:n(t.notebooks,e.notebooks,qx)}}de.combineFeatures=BE;function UE(t,e,n){let r=n&&n.console?new(n.console(_l)):new _l,i=t(r);r.rawAttach(i);let s=n&&n.tracer?new(n.tracer(Sl)):new Sl,o=n&&n.telemetry?new(n.telemetry(kl)):new kl,l=n&&n.client?new(n.client(xl)):new xl,c=n&&n.window?new(n.window(kx)):new kx,a=n&&n.workspace?new(n.workspace(Ex)):new Ex,u=n&&n.languages?new(n.languages(Cx)):new Cx,d=n&&n.notebooks?new(n.notebooks(Rx)):new Rx,p=[r,s,o,l,c,a,u,d];function h(v){return v instanceof Promise?v:nn.thenable(v)?new Promise((_,w)=>{v.then(S=>_(S),S=>w(S))}):Promise.resolve(v)}let m,f,g,b={listen:()=>i.listen(),sendRequest:(v,..._)=>i.sendRequest(nn.string(v)?v:v.method,..._),onRequest:(v,_)=>i.onRequest(v,_),sendNotification:(v,_)=>{let w=nn.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(N.InitializedNotification.type,v),onShutdown:v=>(m=v,{dispose:()=>{m=void 0}}),onExit:v=>(g=v,{dispose:()=>{g=void 0}}),get console(){return r},get telemetry(){return o},get tracer(){return s},get client(){return l},get window(){return c},get workspace(){return a},get languages(){return u},get notebooks(){return d},onDidChangeConfiguration:v=>i.onNotification(N.DidChangeConfigurationNotification.type,v),onDidChangeWatchedFiles:v=>i.onNotification(N.DidChangeWatchedFilesNotification.type,v),__textDocumentSync:void 0,onDidOpenTextDocument:v=>i.onNotification(N.DidOpenTextDocumentNotification.type,v),onDidChangeTextDocument:v=>i.onNotification(N.DidChangeTextDocumentNotification.type,v),onDidCloseTextDocument:v=>i.onNotification(N.DidCloseTextDocumentNotification.type,v),onWillSaveTextDocument:v=>i.onNotification(N.WillSaveTextDocumentNotification.type,v),onWillSaveTextDocumentWaitUntil:v=>i.onRequest(N.WillSaveTextDocumentWaitUntilRequest.type,v),onDidSaveTextDocument:v=>i.onNotification(N.DidSaveTextDocumentNotification.type,v),sendDiagnostics:v=>i.sendNotification(N.PublishDiagnosticsNotification.type,v),onHover:v=>i.onRequest(N.HoverRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),void 0)),onCompletion:v=>i.onRequest(N.CompletionRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onCompletionResolve:v=>i.onRequest(N.CompletionResolveRequest.type,v),onSignatureHelp:v=>i.onRequest(N.SignatureHelpRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),void 0)),onDeclaration:v=>i.onRequest(N.DeclarationRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onDefinition:v=>i.onRequest(N.DefinitionRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onTypeDefinition:v=>i.onRequest(N.TypeDefinitionRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onImplementation:v=>i.onRequest(N.ImplementationRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onReferences:v=>i.onRequest(N.ReferencesRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onDocumentHighlight:v=>i.onRequest(N.DocumentHighlightRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onDocumentSymbol:v=>i.onRequest(N.DocumentSymbolRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onWorkspaceSymbol:v=>i.onRequest(N.WorkspaceSymbolRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onWorkspaceSymbolResolve:v=>i.onRequest(N.WorkspaceSymbolResolveRequest.type,v),onCodeAction:v=>i.onRequest(N.CodeActionRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onCodeActionResolve:v=>i.onRequest(N.CodeActionResolveRequest.type,(_,w)=>v(_,w)),onCodeLens:v=>i.onRequest(N.CodeLensRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onCodeLensResolve:v=>i.onRequest(N.CodeLensResolveRequest.type,(_,w)=>v(_,w)),onDocumentFormatting:v=>i.onRequest(N.DocumentFormattingRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),void 0)),onDocumentRangeFormatting:v=>i.onRequest(N.DocumentRangeFormattingRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),void 0)),onDocumentOnTypeFormatting:v=>i.onRequest(N.DocumentOnTypeFormattingRequest.type,(_,w)=>v(_,w)),onRenameRequest:v=>i.onRequest(N.RenameRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),void 0)),onPrepareRename:v=>i.onRequest(N.PrepareRenameRequest.type,(_,w)=>v(_,w)),onDocumentLinks:v=>i.onRequest(N.DocumentLinkRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onDocumentLinkResolve:v=>i.onRequest(N.DocumentLinkResolveRequest.type,(_,w)=>v(_,w)),onDocumentColor:v=>i.onRequest(N.DocumentColorRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onColorPresentation:v=>i.onRequest(N.ColorPresentationRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onFoldingRanges:v=>i.onRequest(N.FoldingRangeRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onSelectionRanges:v=>i.onRequest(N.SelectionRangeRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),(0,re.attachPartialResult)(i,_))),onExecuteCommand:v=>i.onRequest(N.ExecuteCommandRequest.type,(_,w)=>v(_,w,(0,re.attachWorkDone)(i,_),void 0)),dispose:()=>i.dispose()};for(let v of p)v.attach(b);return i.onRequest(N.InitializeRequest.type,v=>{e.initialize(v),nn.string(v.trace)&&(s.trace=N.Trace.fromString(v.trace));for(let _ of p)_.initialize(v.capabilities);if(f){let _=f(v,new N.CancellationTokenSource().token,(0,re.attachWorkDone)(i,v),void 0);return h(_).then(w=>{if(w instanceof N.ResponseError)return w;let S=w;S||(S={capabilities:{}});let y=S.capabilities;y||(y={},S.capabilities=y),y.textDocumentSync===void 0||y.textDocumentSync===null?y.textDocumentSync=nn.number(b.__textDocumentSync)?b.__textDocumentSync:N.TextDocumentSyncKind.None:!nn.number(y.textDocumentSync)&&!nn.number(y.textDocumentSync.change)&&(y.textDocumentSync.change=nn.number(b.__textDocumentSync)?b.__textDocumentSync:N.TextDocumentSyncKind.None);for(let x of p)x.fillServerCapabilities(y);return S})}else{let _={capabilities:{textDocumentSync:N.TextDocumentSyncKind.None}};for(let w of p)w.fillServerCapabilities(_.capabilities);return _}}),i.onRequest(N.ShutdownRequest.type,()=>{if(e.shutdownReceived=!0,m)return m(new N.CancellationTokenSource().token)}),i.onNotification(N.ExitNotification.type,()=>{try{g&&g()}finally{e.shutdownReceived?e.exit(0):e.exit(1)}}),i.onNotification(N.SetTraceNotification.type,v=>{s.trace=N.Trace.fromString(v.value)}),b}de.createConnection=UE});var Nh=T(Tt=>{"use strict";var WE=Tt&&Tt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),$x=Tt&&Tt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&WE(e,t,n)};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.ProposedFeatures=Tt.NotebookDocuments=Tt.TextDocuments=Tt.SemanticTokensBuilder=void 0;var VE=xh();Object.defineProperty(Tt,"SemanticTokensBuilder",{enumerable:!0,get:function(){return VE.SemanticTokensBuilder}});var HE=nx();$x(Je(),Tt);var zE=kh();Object.defineProperty(Tt,"TextDocuments",{enumerable:!0,get:function(){return zE.TextDocuments}});var GE=Ih();Object.defineProperty(Tt,"NotebookDocuments",{enumerable:!0,get:function(){return GE.NotebookDocuments}});$x(Fx(),Tt);var Nx;(function(t){t.all={__brand:"features",languages:HE.InlineCompletionFeature}})(Nx||(Tt.ProposedFeatures=Nx={}))});var Ux=T((K2,Bx)=>{"use strict";Bx.exports=Je()});var Hx=T(Tn=>{"use strict";var KE=Tn&&Tn.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Vx=Tn&&Tn.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&KE(e,t,n)};Object.defineProperty(Tn,"__esModule",{value:!0});Tn.createConnection=void 0;var El=Nh();Vx(Ux(),Tn);Vx(Nh(),Tn);var Wx=!1,YE={initialize:t=>{},get shutdownReceived(){return Wx},set shutdownReceived(t){Wx=t},exit:t=>{}};function QE(t,e,n,r){let i,s,o,l;t!==void 0&&t.__brand==="features"&&(i=t,t=e,e=n,n=r),El.ConnectionStrategy.is(t)||El.ConnectionOptions.is(t)?l=t:(s=t,o=e,l=n);let c=a=>(0,El.createProtocolConnection)(s,o,a,l);return(0,El.createConnection)(c,YE,i)}Tn.createConnection=QE});var $h=T((Q2,zx)=>{"use strict";zx.exports=Hx()});var Qx={};Ls(Qx,{TextDocument:()=>Bh});function Uh(t,e){if(t.length<=1)return t;let n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);Uh(r,e),Uh(i,e);let s=0,o=0,l=0;for(;s<r.length&&o<i.length;)e(r[s],i[o])<=0?t[l++]=r[s++]:t[l++]=i[o++];for(;s<r.length;)t[l++]=r[s++];for(;o<i.length;)t[l++]=i[o++];return t}function Gx(t,e,n=0){let r=e?[n]:[];for(let i=0;i<t.length;i++){let s=t.charCodeAt(i);Kx(s)&&(s===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function Kx(t){return t===13||t===10}function Yx(t){let e=t.start,n=t.end;return e.line>n.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function JE(t){let e=Yx(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var Cl,Bh,Jx=er(()=>{"use strict";Cl=class t{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,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 n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(let r of e)if(t.isIncremental(r)){let i=Yx(r.range),s=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(o,this._content.length);let l=Math.max(i.start.line,0),c=Math.max(i.end.line,0),a=this._lineOffsets,u=Gx(r.text,!1,s);if(c-l===u.length)for(let p=0,h=u.length;p<h;p++)a[p+l+1]=u[p];else u.length<1e4?a.splice(l+1,c-l,...u):this._lineOffsets=a=a.slice(0,l+1).concat(u,a.slice(c+1));let d=r.text.length-(o-s);if(d!==0)for(let p=l+1+u.length,h=a.length;p<h;p++)a[p]=a[p]+d}else if(t.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Gx(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return{line:0,character:e};for(;r<i;){let o=Math.floor((r+i)/2);n[o]>e?i=o:r=o+1}let s=r-1;return e=this.ensureBeforeEOL(e,n[s]),{line:s,character:e-n[s]}}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line];if(e.character<=0)return r;let i=e.line+1<n.length?n[e.line+1]:this._content.length,s=Math.min(r+e.character,i);return this.ensureBeforeEOL(s,r)}ensureBeforeEOL(e,n){for(;e>n&&Kx(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(t){function e(i,s,o,l){return new Cl(i,s,o,l)}t.create=e;function n(i,s,o){if(i instanceof Cl)return i.update(s,o),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function r(i,s){let o=i.getText(),l=Uh(s.map(JE),(u,d)=>{let p=u.range.start.line-d.range.start.line;return p===0?u.range.start.character-d.range.start.character:p}),c=0,a=[];for(let u of l){let d=i.offsetAt(u.range.start);if(d<c)throw new Error("Overlapping edit");d>c&&a.push(o.substring(c,d)),u.newText.length&&a.push(u.newText),c=i.offsetAt(u.range.end)}return a.push(o.substr(c)),a.join("")}t.applyEdits=r})(Bh||(Bh={}))});function _e(){_e.init.call(this)}function Rl(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function aS(t){return t._maxListeners===void 0?_e.defaultMaxListeners:t._maxListeners}function tS(t,e,n,r){var i,s,o,l;if(Rl(n),(s=t._events)===void 0?(s=t._events=Object.create(null),t._eventsCount=0):(s.newListener!==void 0&&(t.emit("newListener",e,n.listener?n.listener:n),s=t._events),o=s[e]),o===void 0)o=s[e]=n,++t._eventsCount;else if(typeof o=="function"?o=s[e]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=aS(t))>0&&o.length>i&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=o.length,l=c,console&&console.warn&&console.warn(l)}return t}function XE(){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 nS(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=XE.bind(r);return i.listener=n,r.wrapFn=i,i}function rS(t,e,n){var r=t._events;if(r===void 0)return[];var i=r[e];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?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):lS(i,i.length)}function iS(t){var e=this._events;if(e!==void 0){var n=e[t];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}function lS(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}var sS,oS,Wi,Xx,Zx,eS,Ft,Wh=er(()=>{Wi=typeof Reflect=="object"?Reflect:null,Xx=Wi&&typeof Wi.apply=="function"?Wi.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};oS=Wi&&typeof Wi.ownKeys=="function"?Wi.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};Zx=Number.isNaN||function(t){return t!=t};sS=_e,_e.EventEmitter=_e,_e.prototype._events=void 0,_e.prototype._eventsCount=0,_e.prototype._maxListeners=void 0;eS=10;Object.defineProperty(_e,"defaultMaxListeners",{enumerable:!0,get:function(){return eS},set:function(t){if(typeof t!="number"||t<0||Zx(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");eS=t}}),_e.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},_e.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Zx(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},_e.prototype.getMaxListeners=function(){return aS(this)},_e.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r=t==="error",i=this._events;if(i!==void 0)r=r&&i.error===void 0;else if(!r)return!1;if(r){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[t];if(l===void 0)return!1;if(typeof l=="function")Xx(l,this,e);else{var c=l.length,a=lS(l,c);for(n=0;n<c;++n)Xx(a[n],this,e)}return!0},_e.prototype.addListener=function(t,e){return tS(this,t,e,!1)},_e.prototype.on=_e.prototype.addListener,_e.prototype.prependListener=function(t,e){return tS(this,t,e,!0)},_e.prototype.once=function(t,e){return Rl(e),this.on(t,nS(this,t,e)),this},_e.prototype.prependOnceListener=function(t,e){return Rl(e),this.prependListener(t,nS(this,t,e)),this},_e.prototype.removeListener=function(t,e){var n,r,i,s,o;if(Rl(e),(r=this._events)===void 0)return this;if((n=r[t])===void 0)return this;if(n===e||n.listener===e)--this._eventsCount==0?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if(typeof n!="function"){for(i=-1,s=n.length-1;s>=0;s--)if(n[s]===e||n[s].listener===e){o=n[s].listener,i=s;break}if(i<0)return this;i===0?n.shift():function(l,c){for(;c+1<l.length;c++)l[c]=l[c+1];l.pop()}(n,i),n.length===1&&(r[t]=n[0]),r.removeListener!==void 0&&this.emit("removeListener",t,o||e)}return this},_e.prototype.off=_e.prototype.removeListener,_e.prototype.removeAllListeners=function(t){var e,n,r;if((n=this._events)===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i,s=Object.keys(n);for(r=0;r<s.length;++r)(i=s[r])!=="removeListener"&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(e=n[t])=="function")this.removeListener(t,e);else if(e!==void 0)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},_e.prototype.listeners=function(t){return rS(this,t,!0)},_e.prototype.rawListeners=function(t){return rS(this,t,!1)},_e.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):iS.call(t,e)},_e.prototype.listenerCount=iS,_e.prototype.eventNames=function(){return this._eventsCount>0?oS(this._events):[]};Ft=sS;Ft.EventEmitter;Ft.defaultMaxListeners;Ft.init;Ft.listenerCount;Ft.EventEmitter;Ft.defaultMaxListeners;Ft.init;Ft.listenerCount});var $n={};Ls($n,{EventEmitter:()=>ZE,default:()=>Ft,defaultMaxListeners:()=>eC,init:()=>tC,listenerCount:()=>nC,on:()=>rC,once:()=>iC});var ZE,eC,tC,nC,rC,iC,Bn=er(()=>{Wh();Wh();Ft.once=function(t,e){return new Promise((n,r)=>{function i(...o){s!==void 0&&t.removeListener("error",s),n(o)}let s;e!=="error"&&(s=o=>{t.removeListener(name,i),r(o)},t.once("error",s)),t.once(e,i)})};Ft.on=function(t,e){let n=[],r=[],i=null,s=!1,o={next(){return W(this,null,function*(){let u=n.shift();if(u)return createIterResult(u,!1);if(i){let d=Promise.reject(i);return i=null,d}return s?createIterResult(void 0,!0):new Promise((d,p)=>r.push({resolve:d,reject:p}))})},return(){return W(this,null,function*(){t.removeListener(e,l),t.removeListener("error",c),s=!0;for(let u of r)u.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)})},throw(u){i=u,t.removeListener(e,l),t.removeListener("error",c)},[Symbol.asyncIterator](){return this}};return t.on(e,l),t.on("error",c),o;function l(...u){let d=r.shift();d?d.resolve(createIterResult(u,!1)):n.push(u)}function c(u){s=!0;let d=r.shift();d?d.reject(u):i=u,o.return()}};({EventEmitter:ZE,defaultMaxListeners:eC,init:tC,listenerCount:nC,on:rC,once:iC}=Ft)});var Pl=T((ro,Vh)=>{(function(t,e){if(typeof ro=="object"&&typeof Vh=="object")Vh.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var n=e();for(var r in n)(typeof ro=="object"?ro:t)[r]=n[r]}})(ro,()=>(()=>{"use strict";var t={470:i=>{function s(c){if(typeof c!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(c))}function o(c,a){for(var u,d="",p=0,h=-1,m=0,f=0;f<=c.length;++f){if(f<c.length)u=c.charCodeAt(f);else{if(u===47)break;u=47}if(u===47){if(!(h===f-1||m===1))if(h!==f-1&&m===2){if(d.length<2||p!==2||d.charCodeAt(d.length-1)!==46||d.charCodeAt(d.length-2)!==46){if(d.length>2){var g=d.lastIndexOf("/");if(g!==d.length-1){g===-1?(d="",p=0):p=(d=d.slice(0,g)).length-1-d.lastIndexOf("/"),h=f,m=0;continue}}else if(d.length===2||d.length===1){d="",p=0,h=f,m=0;continue}}a&&(d.length>0?d+="/..":d="..",p=2)}else d.length>0?d+="/"+c.slice(h+1,f):d=c.slice(h+1,f),p=f-h-1;h=f,m=0}else u===46&&m!==-1?++m:m=-1}return d}var l={resolve:function(){for(var c,a="",u=!1,d=arguments.length-1;d>=-1&&!u;d--){var p;d>=0?p=arguments[d]:(c===void 0&&(c=process.cwd()),p=c),s(p),p.length!==0&&(a=p+"/"+a,u=p.charCodeAt(0)===47)}return a=o(a,!u),u?a.length>0?"/"+a:"/":a.length>0?a:"."},normalize:function(c){if(s(c),c.length===0)return".";var a=c.charCodeAt(0)===47,u=c.charCodeAt(c.length-1)===47;return(c=o(c,!a)).length!==0||a||(c="."),c.length>0&&u&&(c+="/"),a?"/"+c:c},isAbsolute:function(c){return s(c),c.length>0&&c.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var c,a=0;a<arguments.length;++a){var u=arguments[a];s(u),u.length>0&&(c===void 0?c=u:c+="/"+u)}return c===void 0?".":l.normalize(c)},relative:function(c,a){if(s(c),s(a),c===a||(c=l.resolve(c))===(a=l.resolve(a)))return"";for(var u=1;u<c.length&&c.charCodeAt(u)===47;++u);for(var d=c.length,p=d-u,h=1;h<a.length&&a.charCodeAt(h)===47;++h);for(var m=a.length-h,f=p<m?p:m,g=-1,b=0;b<=f;++b){if(b===f){if(m>f){if(a.charCodeAt(h+b)===47)return a.slice(h+b+1);if(b===0)return a.slice(h+b)}else p>f&&(c.charCodeAt(u+b)===47?g=b:b===0&&(g=0));break}var v=c.charCodeAt(u+b);if(v!==a.charCodeAt(h+b))break;v===47&&(g=b)}var _="";for(b=u+g+1;b<=d;++b)b!==d&&c.charCodeAt(b)!==47||(_.length===0?_+="..":_+="/..");return _.length>0?_+a.slice(h+g):(h+=g,a.charCodeAt(h)===47&&++h,a.slice(h))},_makeLong:function(c){return c},dirname:function(c){if(s(c),c.length===0)return".";for(var a=c.charCodeAt(0),u=a===47,d=-1,p=!0,h=c.length-1;h>=1;--h)if((a=c.charCodeAt(h))===47){if(!p){d=h;break}}else p=!1;return d===-1?u?"/":".":u&&d===1?"//":c.slice(0,d)},basename:function(c,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');s(c);var u,d=0,p=-1,h=!0;if(a!==void 0&&a.length>0&&a.length<=c.length){if(a.length===c.length&&a===c)return"";var m=a.length-1,f=-1;for(u=c.length-1;u>=0;--u){var g=c.charCodeAt(u);if(g===47){if(!h){d=u+1;break}}else f===-1&&(h=!1,f=u+1),m>=0&&(g===a.charCodeAt(m)?--m==-1&&(p=u):(m=-1,p=f))}return d===p?p=f:p===-1&&(p=c.length),c.slice(d,p)}for(u=c.length-1;u>=0;--u)if(c.charCodeAt(u)===47){if(!h){d=u+1;break}}else p===-1&&(h=!1,p=u+1);return p===-1?"":c.slice(d,p)},extname:function(c){s(c);for(var a=-1,u=0,d=-1,p=!0,h=0,m=c.length-1;m>=0;--m){var f=c.charCodeAt(m);if(f!==47)d===-1&&(p=!1,d=m+1),f===46?a===-1?a=m:h!==1&&(h=1):a!==-1&&(h=-1);else if(!p){u=m+1;break}}return a===-1||d===-1||h===0||h===1&&a===d-1&&a===u+1?"":c.slice(a,d)},format:function(c){if(c===null||typeof c!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof c);return function(a,u){var d=u.dir||u.root,p=u.base||(u.name||"")+(u.ext||"");return d?d===u.root?d+p:d+"/"+p:p}(0,c)},parse:function(c){s(c);var a={root:"",dir:"",base:"",ext:"",name:""};if(c.length===0)return a;var u,d=c.charCodeAt(0),p=d===47;p?(a.root="/",u=1):u=0;for(var h=-1,m=0,f=-1,g=!0,b=c.length-1,v=0;b>=u;--b)if((d=c.charCodeAt(b))!==47)f===-1&&(g=!1,f=b+1),d===46?h===-1?h=b:v!==1&&(v=1):h!==-1&&(v=-1);else if(!g){m=b+1;break}return h===-1||f===-1||v===0||v===1&&h===f-1&&h===m+1?f!==-1&&(a.base=a.name=m===0&&p?c.slice(1,f):c.slice(m,f)):(m===0&&p?(a.name=c.slice(1,h),a.base=c.slice(1,f)):(a.name=c.slice(m,h),a.base=c.slice(m,f)),a.ext=c.slice(h,f)),m>0?a.dir=c.slice(0,m-1):p&&(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),c=/^\w[\w\d+.-]*$/,a=/^\//,u=/^\/\//;function d(O,I){if(!O.scheme&&I)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${O.authority}", path: "${O.path}", query: "${O.query}", fragment: "${O.fragment}"}`);if(O.scheme&&!c.test(O.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(O.path){if(O.authority){if(!a.test(O.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(u.test(O.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let p="",h="/",m=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{constructor(I,P,A,j,V,H=!1){tr(this,"scheme");tr(this,"authority");tr(this,"path");tr(this,"query");tr(this,"fragment");typeof I=="object"?(this.scheme=I.scheme||p,this.authority=I.authority||p,this.path=I.path||p,this.query=I.query||p,this.fragment=I.fragment||p):(this.scheme=function(Te,ie){return Te||ie?Te:"file"}(I,H),this.authority=P||p,this.path=function(Te,ie){switch(Te){case"https":case"http":case"file":ie?ie[0]!==h&&(ie=h+ie):ie=h}return ie}(this.scheme,A||p),this.query=j||p,this.fragment=V||p,d(this,H))}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 S(this,!1)}with(I){if(!I)return this;let{scheme:P,authority:A,path:j,query:V,fragment:H}=I;return P===void 0?P=this.scheme:P===null&&(P=p),A===void 0?A=this.authority:A===null&&(A=p),j===void 0?j=this.path:j===null&&(j=p),V===void 0?V=this.query:V===null&&(V=p),H===void 0?H=this.fragment:H===null&&(H=p),P===this.scheme&&A===this.authority&&j===this.path&&V===this.query&&H===this.fragment?this:new b(P,A,j,V,H)}static parse(I,P=!1){let A=m.exec(I);return A?new b(A[2]||p,R(A[4]||p),R(A[5]||p),R(A[7]||p),R(A[9]||p),P):new b(p,p,p,p,p)}static file(I){let P=p;if(l.isWindows&&(I=I.replace(/\\/g,h)),I[0]===h&&I[1]===h){let A=I.indexOf(h,2);A===-1?(P=I.substring(2),I=h):(P=I.substring(2,A),I=I.substring(A)||h)}return new b("file",P,I,p,p)}static from(I){let P=new b(I.scheme,I.authority,I.path,I.query,I.fragment);return d(P,!0),P}toString(I=!1){return y(this,I)}toJSON(){return this}static revive(I){if(I){if(I instanceof f)return I;{let P=new b(I);return P._formatted=I.external,P._fsPath=I._sep===g?I.fsPath:null,P}}return I}}s.URI=f;let g=l.isWindows?1:void 0;class b extends f{constructor(){super(...arguments);tr(this,"_formatted",null);tr(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=S(this,!1)),this._fsPath}toString(P=!1){return P?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){let P={$mid:1};return this._fsPath&&(P.fsPath=this._fsPath,P._sep=g),this._formatted&&(P.external=this._formatted),this.path&&(P.path=this.path),this.scheme&&(P.scheme=this.scheme),this.authority&&(P.authority=this.authority),this.query&&(P.query=this.query),this.fragment&&(P.fragment=this.fragment),P}}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 _(O,I,P){let A,j=-1;for(let V=0;V<O.length;V++){let H=O.charCodeAt(V);if(H>=97&&H<=122||H>=65&&H<=90||H>=48&&H<=57||H===45||H===46||H===95||H===126||I&&H===47||P&&H===91||P&&H===93||P&&H===58)j!==-1&&(A+=encodeURIComponent(O.substring(j,V)),j=-1),A!==void 0&&(A+=O.charAt(V));else{A===void 0&&(A=O.substr(0,V));let Te=v[H];Te!==void 0?(j!==-1&&(A+=encodeURIComponent(O.substring(j,V)),j=-1),A+=Te):j===-1&&(j=V)}}return j!==-1&&(A+=encodeURIComponent(O.substring(j))),A!==void 0?A:O}function w(O){let I;for(let P=0;P<O.length;P++){let A=O.charCodeAt(P);A===35||A===63?(I===void 0&&(I=O.substr(0,P)),I+=v[A]):I!==void 0&&(I+=O[P])}return I!==void 0?I:O}function S(O,I){let P;return P=O.authority&&O.path.length>1&&O.scheme==="file"?`//${O.authority}${O.path}`:O.path.charCodeAt(0)===47&&(O.path.charCodeAt(1)>=65&&O.path.charCodeAt(1)<=90||O.path.charCodeAt(1)>=97&&O.path.charCodeAt(1)<=122)&&O.path.charCodeAt(2)===58?I?O.path.substr(1):O.path[1].toLowerCase()+O.path.substr(2):O.path,l.isWindows&&(P=P.replace(/\//g,"\\")),P}function y(O,I){let P=I?w:_,A="",{scheme:j,authority:V,path:H,query:Te,fragment:ie}=O;if(j&&(A+=j,A+=":"),(V||j==="file")&&(A+=h,A+=h),V){let te=V.indexOf("@");if(te!==-1){let Se=V.substr(0,te);V=V.substr(te+1),te=Se.lastIndexOf(":"),te===-1?A+=P(Se,!1,!1):(A+=P(Se.substr(0,te),!1,!1),A+=":",A+=P(Se.substr(te+1),!1,!0)),A+="@"}V=V.toLowerCase(),te=V.lastIndexOf(":"),te===-1?A+=P(V,!1,!0):(A+=P(V.substr(0,te),!1,!0),A+=V.substr(te))}if(H){if(H.length>=3&&H.charCodeAt(0)===47&&H.charCodeAt(2)===58){let te=H.charCodeAt(1);te>=65&&te<=90&&(H=`/${String.fromCharCode(te+32)}:${H.substr(3)}`)}else if(H.length>=2&&H.charCodeAt(1)===58){let te=H.charCodeAt(0);te>=65&&te<=90&&(H=`${String.fromCharCode(te+32)}:${H.substr(2)}`)}A+=P(H,!0,!1)}return Te&&(A+="?",A+=P(Te,!1,!1)),ie&&(A+="#",A+=I?ie:_(ie,!1,!1)),A}function x(O){try{return decodeURIComponent(O)}catch(I){return O.length>3?O.substr(0,3)+x(O.substr(3)):O}}s.uriToFsPath=S;let k=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function R(O){return O.match(k)?O.replace(k,I=>x(I)):O}},679:function(i,s,o){var l=this&&this.__createBinding||(Object.create?function(m,f,g,b){b===void 0&&(b=g);var v=Object.getOwnPropertyDescriptor(f,g);v&&!("get"in v?!f.__esModule:v.writable||v.configurable)||(v={enumerable:!0,get:function(){return f[g]}}),Object.defineProperty(m,b,v)}:function(m,f,g,b){b===void 0&&(b=g),m[b]=f[g]}),c=this&&this.__setModuleDefault||(Object.create?function(m,f){Object.defineProperty(m,"default",{enumerable:!0,value:f})}:function(m,f){m.default=f}),a=this&&this.__importStar||function(m){if(m&&m.__esModule)return m;var f={};if(m!=null)for(var g in m)g!=="default"&&Object.prototype.hasOwnProperty.call(m,g)&&l(f,m,g);return c(f,m),f};Object.defineProperty(s,"__esModule",{value:!0}),s.Utils=void 0;let u=a(o(470)),d=u.posix||u,p="/";var h;(function(m){m.joinPath=function(f,...g){return f.with({path:d.join(f.path,...g)})},m.resolvePath=function(f,...g){let b=f.path,v=!1;b[0]!==p&&(b=p+b,v=!0);let _=d.resolve(b,...g);return v&&_[0]===p&&!f.authority&&(_=_.substring(1)),f.with({path:_})},m.dirname=function(f){if(f.path.length===0||f.path===p)return f;let g=d.dirname(f.path);return g.length===1&&g.charCodeAt(0)===46&&(g=""),f.with({path:g})},m.basename=function(f){return d.basename(f.path)},m.extname=function(f){return d.extname(f.path)}})(h||(s.Utils=h={}))}},e={};function n(i){var s=e[i];if(s!==void 0)return s.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}var r={};return(()=>{var i=r;Object.defineProperty(i,"__esModule",{value:!0}),i.Utils=i.URI=void 0;let s=n(796);Object.defineProperty(i,"URI",{enumerable:!0,get:function(){return s.URI}});let o=n(679);Object.defineProperty(i,"Utils",{enumerable:!0,get:function(){return o.Utils}})})(),r})())});var Qh=T((i$,pS)=>{var io=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,sC=typeof AbortController=="function",Al=sC?AbortController:class{constructor(){this.signal=new cS}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})}},oC=typeof AbortSignal=="function",aC=typeof Al.AbortSignal=="function",cS=oC?AbortSignal:aC?Al.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(n=>n(e),this))}onabort(){}addEventListener(e,n){e==="abort"&&this._listeners.push(n)}removeEventListener(e,n){e==="abort"&&(this._listeners=this._listeners.filter(r=>r!==n))}},Kh=new Set,Hh=(t,e)=>{let n=`LRU_CACHE_OPTION_${t}`;Ol(n)&&Yh(n,`${t} option`,`options.${e}`,Hi)},zh=(t,e)=>{let n=`LRU_CACHE_METHOD_${t}`;if(Ol(n)){let{prototype:r}=Hi,{get:i}=Object.getOwnPropertyDescriptor(r,t);Yh(n,`${t} method`,`cache.${e}()`,i)}},lC=(t,e)=>{let n=`LRU_CACHE_PROPERTY_${t}`;if(Ol(n)){let{prototype:r}=Hi,{get:i}=Object.getOwnPropertyDescriptor(r,t);Yh(n,`${t} property`,`cache.${e}`,i)}},uS=(...t)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...t):console.error(...t)},Ol=t=>!Kh.has(t),Yh=(t,e,n,r)=>{Kh.add(t);let i=`The ${e} is deprecated. Please use ${n} instead.`;uS(i,"DeprecationWarning",t,r)},fr=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),dS=t=>fr(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Vi:null:null,Vi=class extends Array{constructor(e){super(e),this.fill(0)}},Gh=class{constructor(e){if(e===0)return[];let n=dS(e);this.heap=new n(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Hi=class t{constructor(e={}){let{max:n=0,ttl:r,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:l,allowStale:c,dispose:a,disposeAfter:u,noDisposeOnSet:d,noUpdateTTL:p,maxSize:h=0,maxEntrySize:m=0,sizeCalculation:f,fetchMethod:g,fetchContext:b,noDeleteOnFetchRejection:v,noDeleteOnStaleGet:_,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:S,ignoreFetchAbort:y}=e,{length:x,maxAge:k,stale:R}=e instanceof t?{}:e;if(n!==0&&!fr(n))throw new TypeError("max option must be a nonnegative integer");let O=n?dS(n):Array;if(!O)throw new Error("invalid max value: "+n);if(this.max=n,this.maxSize=h,this.maxEntrySize=m||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=g||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(n).fill(null),this.valList=new Array(n).fill(null),this.next=new O(n),this.prev=new O(n),this.head=0,this.tail=0,this.free=new Gh(n),this.initialFill=1,this.size=0,typeof a=="function"&&(this.dispose=a),typeof u=="function"?(this.disposeAfter=u,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!d,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!v,this.allowStaleOnFetchRejection=!!w,this.allowStaleOnFetchAbort=!!S,this.ignoreFetchAbort=!!y,this.maxEntrySize!==0){if(this.maxSize!==0&&!fr(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!fr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!c||!!R,this.noDeleteOnStaleGet=!!_,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!l,this.ttlResolution=fr(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=r||k||0,this.ttl){if(!fr(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";Ol(I)&&(Kh.add(I),uS("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",I,t))}R&&Hh("stale","allowStale"),k&&Hh("maxAge","ttl"),x&&Hh("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Vi(this.max),this.starts=new Vi(this.max),this.setItemTTL=(r,i,s=io.now())=>{if(this.starts[r]=i!==0?s:0,this.ttls[r]=i,i!==0&&this.ttlAutopurge){let o=setTimeout(()=>{this.isStale(r)&&this.delete(this.keyList[r])},i+1);o.unref&&o.unref()}},this.updateItemAge=r=>{this.starts[r]=this.ttls[r]!==0?io.now():0},this.statusTTL=(r,i)=>{r&&(r.ttl=this.ttls[i],r.start=this.starts[i],r.now=e||n(),r.remainingTTL=r.now+r.ttl-r.start)};let e=0,n=()=>{let r=io.now();if(this.ttlResolution>0){e=r;let i=setTimeout(()=>e=0,this.ttlResolution);i.unref&&i.unref()}return r};this.getRemainingTTL=r=>{let i=this.keyMap.get(r);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(e||n())},this.isStale=r=>this.ttls[r]!==0&&this.starts[r]!==0&&(e||n())-this.starts[r]>this.ttls[r]}updateItemAge(e){}statusTTL(e,n){}setItemTTL(e,n,r){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Vi(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,n,r,i)=>{if(this.isBackgroundFetch(n))return 0;if(!fr(r))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(r=i(n,e),!fr(r))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 r},this.addItemSize=(e,n,r)=>{if(this.sizes[e]=n,this.maxSize){let i=this.maxSize-this.sizes[e];for(;this.calculatedSize>i;)this.evict(!0)}this.calculatedSize+=this.sizes[e],r&&(r.entrySize=n,r.totalCalculatedSize=this.calculatedSize)}}removeItemSize(e){}addItemSize(e,n){}requireSize(e,n,r,i){if(r||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let n=this.tail;!(!this.isValidIndex(n)||((e||!this.isStale(n))&&(yield n),n===this.head));)n=this.prev[n]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let n=this.head;!(!this.isValidIndex(n)||((e||!this.isStale(n))&&(yield n),n===this.tail));)n=this.next[n]}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,n){for(let r of this.indexes()){let i=this.valList[r],s=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(s!==void 0&&e(s,this.keyList[r],this))return this.get(this.keyList[r],n)}}forEach(e,n=this){for(let r of this.indexes()){let i=this.valList[r],s=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(n,s,this.keyList[r],this)}}rforEach(e,n=this){for(let r of this.rindexes()){let i=this.valList[r],s=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(n,s,this.keyList[r],this)}}get prune(){return zh("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(let n of this.rindexes({allowStale:!0}))this.isStale(n)&&(this.delete(this.keyList[n]),e=!0);return e}dump(){let e=[];for(let n of this.indexes({allowStale:!0})){let r=this.keyList[n],i=this.valList[n],s=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(s===void 0)continue;let o={value:s};if(this.ttls){o.ttl=this.ttls[n];let l=io.now()-this.starts[n];o.start=Math.floor(Date.now()-l)}this.sizes&&(o.size=this.sizes[n]),e.unshift([r,o])}return e}load(e){this.clear();for(let[n,r]of e){if(r.start){let i=Date.now()-r.start;r.start=io.now()-i}this.set(n,r.value,r)}}dispose(e,n,r){}set(e,n,{ttl:r=this.ttl,start:i,noDisposeOnSet:s=this.noDisposeOnSet,size:o=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,status:a}={}){if(o=this.requireSize(e,n,o,l),this.maxEntrySize&&o>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.delete(e),this;let u=this.size===0?void 0:this.keyMap.get(e);if(u===void 0)u=this.newIndex(),this.keyList[u]=e,this.valList[u]=n,this.keyMap.set(e,u),this.next[this.tail]=u,this.prev[u]=this.tail,this.tail=u,this.size++,this.addItemSize(u,o,a),a&&(a.set="add"),c=!1;else{this.moveToTail(u);let d=this.valList[u];if(n!==d){if(this.isBackgroundFetch(d)?d.__abortController.abort(new Error("replaced")):s||(this.dispose(d,e,"set"),this.disposeAfter&&this.disposed.push([d,e,"set"])),this.removeItemSize(u),this.valList[u]=n,this.addItemSize(u,o,a),a){a.set="replace";let p=d&&this.isBackgroundFetch(d)?d.__staleWhileFetching:d;p!==void 0&&(a.oldValue=p)}}else a&&(a.set="update")}if(r!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),c||this.setItemTTL(u,r,i),this.statusTTL(a,u),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 n=this.head,r=this.keyList[n],i=this.valList[n];return this.isBackgroundFetch(i)?i.__abortController.abort(new Error("evicted")):(this.dispose(i,r,"evict"),this.disposeAfter&&this.disposed.push([i,r,"evict"])),this.removeItemSize(n),e&&(this.keyList[n]=null,this.valList[n]=null,this.free.push(n)),this.head=this.next[n],this.keyMap.delete(r),this.size--,n}has(e,{updateAgeOnHas:n=this.updateAgeOnHas,status:r}={}){let i=this.keyMap.get(e);if(i!==void 0)if(this.isStale(i))r&&(r.has="stale",this.statusTTL(r,i));else return n&&this.updateItemAge(i),r&&(r.has="hit"),this.statusTTL(r,i),!0;else r&&(r.has="miss");return!1}peek(e,{allowStale:n=this.allowStale}={}){let r=this.keyMap.get(e);if(r!==void 0&&(n||!this.isStale(r))){let i=this.valList[r];return this.isBackgroundFetch(i)?i.__staleWhileFetching:i}}backgroundFetch(e,n,r,i){let s=n===void 0?void 0:this.valList[n];if(this.isBackgroundFetch(s))return s;let o=new Al;r.signal&&r.signal.addEventListener("abort",()=>o.abort(r.signal.reason));let l={signal:o.signal,options:r,context:i},c=(h,m=!1)=>{let{aborted:f}=o.signal,g=r.ignoreFetchAbort&&h!==void 0;return r.status&&(f&&!m?(r.status.fetchAborted=!0,r.status.fetchError=o.signal.reason,g&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),f&&!g&&!m?u(o.signal.reason):(this.valList[n]===p&&(h===void 0?p.__staleWhileFetching?this.valList[n]=p.__staleWhileFetching:this.delete(e):(r.status&&(r.status.fetchUpdated=!0),this.set(e,h,l.options))),h)},a=h=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=h),u(h)),u=h=>{let{aborted:m}=o.signal,f=m&&r.allowStaleOnFetchAbort,g=f||r.allowStaleOnFetchRejection,b=g||r.noDeleteOnFetchRejection;if(this.valList[n]===p&&(!b||p.__staleWhileFetching===void 0?this.delete(e):f||(this.valList[n]=p.__staleWhileFetching)),g)return r.status&&p.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw h},d=(h,m)=>{this.fetchMethod(e,s,l).then(f=>h(f),m),o.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(h(),r.allowStaleOnFetchAbort&&(h=f=>c(f,!0)))})};r.status&&(r.status.fetchDispatched=!0);let p=new Promise(d).then(c,a);return p.__abortController=o,p.__staleWhileFetching=s,p.__returned=null,n===void 0?(this.set(e,p,vn(st({},l.options),{status:void 0})),n=this.keyMap.get(e)):this.valList[n]=p,p}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 W(this,arguments,function*(e,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:l=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:h=this.allowStaleOnFetchAbort,fetchContext:m=this.fetchContext,forceRefresh:f=!1,status:g,signal:b}={}){if(!this.fetchMethod)return g&&(g.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:g});let _={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:s,noDisposeOnSet:o,size:l,sizeCalculation:c,noUpdateTTL:a,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:h,ignoreFetchAbort:p,status:g,signal:b},w=this.keyMap.get(e);if(w===void 0){g&&(g.fetch="miss");let S=this.backgroundFetch(e,w,_,m);return S.__returned=S}else{let S=this.valList[w];if(this.isBackgroundFetch(S)){let O=n&&S.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",O&&(g.returnedStale=!0)),O?S.__staleWhileFetching:S.__returned=S}let y=this.isStale(w);if(!f&&!y)return g&&(g.fetch="hit"),this.moveToTail(w),r&&this.updateItemAge(w),this.statusTTL(g,w),S;let x=this.backgroundFetch(e,w,_,m),k=x.__staleWhileFetching!==void 0,R=k&&n;return g&&(g.fetch=k&&y?"stale":"refresh",R&&y&&(g.returnedStale=!0)),R?x.__staleWhileFetching:x.__returned=x}})}get(e,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:s}={}){let o=this.keyMap.get(e);if(o!==void 0){let l=this.valList[o],c=this.isBackgroundFetch(l);return this.statusTTL(s,o),this.isStale(o)?(s&&(s.get="stale"),c?(s&&(s.returnedStale=n&&l.__staleWhileFetching!==void 0),n?l.__staleWhileFetching:void 0):(i||this.delete(e),s&&(s.returnedStale=n),n?l:void 0)):(s&&(s.get="hit"),c?l.__staleWhileFetching:(this.moveToTail(o),r&&this.updateItemAge(o),l))}else s&&(s.get="miss")}connect(e,n){this.prev[n]=e,this.next[e]=n}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 zh("del","delete"),this.delete}delete(e){let n=!1;if(this.size!==0){let r=this.keyMap.get(e);if(r!==void 0)if(n=!0,this.size===1)this.clear();else{this.removeItemSize(r);let i=this.valList[r];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[r]=null,this.valList[r]=null,r===this.tail?this.tail=this.prev[r]:r===this.head?this.head=this.next[r]:(this.next[this.prev[r]]=this.next[r],this.prev[this.next[r]]=this.prev[r]),this.size--,this.free.push(r)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return n}clear(){for(let e of this.rindexes({allowStale:!0})){let n=this.valList[e];if(this.isBackgroundFetch(n))n.__abortController.abort(new Error("deleted"));else{let r=this.keyList[e];this.dispose(n,r,"delete"),this.disposeAfter&&this.disposed.push([n,r,"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 zh("reset","clear"),this.clear}get length(){return lC("length","size"),this.size}static get AbortController(){return Al}static get AbortSignal(){return cS}};pS.exports=Hi});var zi=T(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.IndentationType=Un.ConfigurationNamespace=Un.LanguageId=void 0;Un.LanguageId="greyscript";Un.ConfigurationNamespace="greybel";var cC;(function(t){t.Tab="Tab",t.Whitespace="Whitespace"})(cC=Un.IndentationType||(Un.IndentationType={}))});var Gi=T(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.Position=void 0;var Jh=class{constructor(e,n){this.line=e,this.character=n}toString(){return`${this.line}:${this.character}`}};Dl.Position=Jh});var mr=T(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.LiteralToken=Gt.Token=Gt.BaseToken=Gt.BaseTokenOptions=Gt.TokenType=void 0;var hS=Gi(),uC;(function(t){t.EOF="EOF",t.StringLiteral="StringLiteral",t.Keyword="Keyword",t.Identifier="Identifier",t.NumericLiteral="NumericLiteral",t.Punctuator="Punctuator",t.BooleanLiteral="BooleanLiteral",t.NilLiteral="NilLiteral",t.EOL="EOL",t.SliceOperator="SliceOperator",t.Comment="Comment",t.Invalid="Invalid"})(uC=Gt.TokenType||(Gt.TokenType={}));var Xh=class{};Gt.BaseTokenOptions=Xh;var so=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 n=e.offset,r=e.range;this.start=new hS.Position(this.line,r[0]-n+1),this.end=new hS.Position(this.lastLine||this.line,r[1]-n+1)}toString(){let e=this.line,n=this.lastLine!==void 0?this.lastLine:this.line,r=this.start.character,i=this.end.character,s=`${e}:${r} - ${n}:${i}`;return`${this.type}[${s}: value = '${this.value}']`}};Gt.BaseToken=so;var Zh=class extends so{};Gt.Token=Zh;var ef=class extends so{constructor(e){super(e),this.raw=e.raw}toString(){let e=this.line,n=this.lastLine!==void 0?this.lastLine:this.line,r=this.start.character,i=this.end.character,s=`${e}:${r} - ${n}:${i}`;return`${this.type}[${s}: value = ${this.raw}]`}};Gt.LiteralToken=ef});var jl=T(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.CharacterCode=void 0;var dC;(function(t){t[t.WHITESPACE=32]="WHITESPACE",t[t.QUOTE=34]="QUOTE",t[t.NUMBER_0=48]="NUMBER_0",t[t.NUMBER_1=49]="NUMBER_1",t[t.NUMBER_2=50]="NUMBER_2",t[t.NUMBER_3=51]="NUMBER_3",t[t.NUMBER_4=52]="NUMBER_4",t[t.NUMBER_5=53]="NUMBER_5",t[t.NUMBER_6=54]="NUMBER_6",t[t.NUMBER_7=55]="NUMBER_7",t[t.NUMBER_8=56]="NUMBER_8",t[t.NUMBER_9=57]="NUMBER_9",t[t.TAB=9]="TAB",t[t.NEW_LINE=10]="NEW_LINE",t[t.RETURN_LINE=13]="RETURN_LINE",t[t.SLASH=47]="SLASH",t[t.DOT=46]="DOT",t[t.EQUAL=61]="EQUAL",t[t.ASTERISK=42]="ASTERISK",t[t.CARET=94]="CARET",t[t.PERCENT=37]="PERCENT",t[t.COMMA=44]="COMMA",t[t.CURLY_BRACKET_LEFT=123]="CURLY_BRACKET_LEFT",t[t.CURLY_BRACKET_RIGHT=125]="CURLY_BRACKET_RIGHT",t[t.SQUARE_BRACKETS_LEFT=91]="SQUARE_BRACKETS_LEFT",t[t.SQUARE_BRACKETS_RIGHT=93]="SQUARE_BRACKETS_RIGHT",t[t.PARENTHESIS_LEFT=40]="PARENTHESIS_LEFT",t[t.PARENTHESIS_RIGHT=41]="PARENTHESIS_RIGHT",t[t.SEMICOLON=59]="SEMICOLON",t[t.HASH=35]="HASH",t[t.MINUS=45]="MINUS",t[t.PLUS=43]="PLUS",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.AT_SIGN=64]="AT_SIGN",t[t.COLON=58]="COLON",t[t.ARROW_LEFT=60]="ARROW_LEFT",t[t.ARROW_RIGHT=62]="ARROW_RIGHT",t[t.LETTER_E=69]="LETTER_E",t[t.LETTER_e=101]="LETTER_e"})(dC=oo.CharacterCode||(oo.CharacterCode={}))});var Ki=T(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.Keyword=void 0;var pC;(function(t){t.If="if",t.In="in",t.Or="or",t.And="and",t.Isa="isa",t.For="for",t.Not="not",t.New="new",t.End="end",t.EndFor="end for",t.EndWhile="end while",t.EndFunction="end function",t.EndIf="end if",t.Then="then",t.Else="else",t.Break="break",t.While="while",t.ElseIf="else if",t.Return="return",t.Function="function",t.Continue="continue",t.Repeat="repeat"})(pC=ao.Keyword||(ao.Keyword={}))});var rf=T(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});var rn=jl(),hC=Ki(),tf=class{constructor(){this.isKeyword=Set.prototype.has.bind(new Set(Object.values(hC.Keyword)))}isWhitespace(e){return rn.CharacterCode.WHITESPACE===e||rn.CharacterCode.TAB===e}isEndOfLine(e){return rn.CharacterCode.NEW_LINE===e||rn.CharacterCode.RETURN_LINE===e}isComment(e,n){return rn.CharacterCode.SLASH===e&&rn.CharacterCode.SLASH===n}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>=rn.CharacterCode.NUMBER_0&&e<=rn.CharacterCode.NUMBER_9}isWinNewline(e,n){switch(e){case rn.CharacterCode.RETURN_LINE:return rn.CharacterCode.NEW_LINE===n;case rn.CharacterCode.NEW_LINE:return rn.CharacterCode.RETURN_LINE===n}return!1}};nf.default=tf});var Ll=T(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.ParserException=Yi.LexerException=void 0;var sf=class extends Error{constructor(e,n){super(e),this.range=n}};Yi.LexerException=sf;var of=class extends Error{constructor(e,n){super(e),this.range=n}};Yi.ParserException=of});var af=T(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.Literal=void 0;var fC;(function(t){t.True="true",t.False="false",t.Null="null"})(fC=lo.Literal||(lo.Literal={}))});var Qi=T(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.Operator=void 0;var mC;(function(t){t.Plus="+",t.Asterik="*",t.Minus="-",t.Slash="/",t.Power="^",t.Modulo="%",t.LessThan="<",t.GreaterThan=">",t.LessThanOrEqual="<=",t.GreaterThanOrEqual=">=",t.NotEqual="!=",t.Equal="==",t.Or="or",t.And="and",t.Not="not",t.Isa="isa",t.AddShorthand="+=",t.SubtractShorthand="-=",t.MultiplyShorthand="*=",t.DivideShorthand="/=",t.PowerShorthand="^=",t.ModuloShorthand="%=",t.Member=".",t.Assign="=",t.EndOfLine=";",t.EndOfFile="<eof>",t.SliceSeperator=":",t.Comma=",",t.Escape='"',t.SLBracket="[",t.SRBracket="]",t.CLBracket="{",t.CRBracket="}",t.LParenthesis="(",t.RParenthesis=")",t.Reference="@",t.New="new"})(mC=co.Operator||(co.Operator={}))});var Ji=T(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});Ml.Range=void 0;var lf=class{constructor(e,n){this.start=e,this.end=n}toString(){return`${this.start} - ${this.end}`}};Ml.Range=lf});var df=T(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});var cf=class{constructor(){this._head=null,this._tail=null,this._size=0}enqueue(e){let n={value:e};this._head?this._tail.next=n:this._head=n,this._tail=n,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}};uf.default=cf});var ff=T(po=>{"use strict";var mS=po&&po.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(po,"__esModule",{value:!0});var Me=mr(),gC=mS(rf()),oe=jl(),yC=Ll(),pf=Ki(),uo=af(),qe=Qi(),Xi=Gi(),hf=Ji(),fS=mS(df());function gr(t){let e=this.content[this.index];return this.index+=e.length,this.createPunctuator(e,t)}var ql=class t{constructor(e,n={}){let r=this;r.content=e,r.length=e.length,r.index=0,r.tokenStart=null,r.tabWidth=n.tabWidth||1,r.line=1,r.lineStart=0,r.offset=0,r.validator=n.validator||new gC.default,r.unsafe=n.unsafe,r.errors=[],r.backlog=new fS.default,r.snapshot=new fS.default}scan(e,n){let r=t.scanHandlers[e];return r?r.call(this,n):this.validator.isDecDigit(e)?this.scanNumericLiteral(n):(this.index++,null)}isAtWhitespace(){return this.validator.isWhitespace(this.codeAt())}codeAt(e=0){let n=this.index+e;return n<this.length?this.content.charCodeAt(n):0}createEOL(e){let n=this,r=new Me.Token({type:Me.TokenType.EOL,value:qe.Operator.EndOfLine,line:n.line,lineStart:n.lineStart,range:[n.tokenStart,n.index],offset:n.offset,afterSpace:e});return n.snapshot.enqueue(r),r}createIdentifier(e,n){let r=this,i=new Me.Token({type:Me.TokenType.Identifier,value:e,line:r.line,lineStart:r.lineStart,range:[r.tokenStart,r.index],offset:r.offset,afterSpace:n});return r.snapshot.enqueue(i),i}createEOF(e){let n=this,r=new Me.Token({type:Me.TokenType.EOF,value:qe.Operator.EndOfFile,line:n.line,lineStart:n.lineStart,range:[n.index,n.index],offset:n.offset,afterSpace:e});return n.snapshot.enqueue(r),r}createBoolean(e,n){let r=this,i=new Me.LiteralToken({type:Me.TokenType.BooleanLiteral,value:e===uo.Literal.True,raw:e,line:r.line,lineStart:r.lineStart,range:[r.tokenStart,r.index],offset:r.offset,afterSpace:n});return r.snapshot.enqueue(i),i}createNull(e){let n=this,r=new Me.LiteralToken({type:Me.TokenType.NilLiteral,value:null,raw:uo.Literal.Null,line:n.line,lineStart:n.lineStart,range:[n.tokenStart,n.index],offset:n.offset,afterSpace:e});return n.snapshot.enqueue(r),r}createSlice(e){let n=new Me.Token({type:Me.TokenType.SliceOperator,value:qe.Operator.SliceSeperator,line:this.line,lineStart:this.lineStart,range:[this.tokenStart,this.index],offset:this.offset,afterSpace:e});return this.snapshot.enqueue(n),n}createPunctuator(e,n){let r=new Me.Token({type:Me.TokenType.Punctuator,value:e,line:this.line,lineStart:this.lineStart,range:[this.tokenStart,this.index],offset:this.offset,afterSpace:n});return this.snapshot.enqueue(r),r}createNumericLiteral(e,n,r){let i=new Me.LiteralToken({type:Me.TokenType.NumericLiteral,value:e,raw:n,line:this.line,lineStart:this.lineStart,range:[this.tokenStart,this.index],offset:this.offset,afterSpace:r});return this.snapshot.enqueue(i),i}scanStringLiteral(e){let n=this,r=n.validator,i=n.line,s=n.lineStart,o=0,l=n.offset,c=!1;for(;n.index<n.length;){n.index++;let p=n.codeAt();if(n.validator.isEndOfLine(p))r.isWinNewline(p,n.codeAt(1))&&n.index++,n.line++,o=n.index+1-n.offset,l=n.index+1;else if(oe.CharacterCode.QUOTE===p){if(oe.CharacterCode.QUOTE!==n.codeAt(1)){c=!0;break}n.index++}}if(!c)return n.raise("Unexpected string end of file.",new hf.Range(new Xi.Position(i,s-l+1),new Xi.Position(n.line,n.index-l+1)));n.index++;let a=n.content.slice(n.tokenStart,n.index),u=a.slice(1,-1).replace(/""/g,qe.Operator.Escape),d=new Me.LiteralToken({type:Me.TokenType.StringLiteral,value:u,raw:a,line:i,lineStart:s,range:[n.tokenStart,n.index-o],offset:n.offset,afterSpace:e,lastLine:n.line,lastLineStart:n.lineStart});return n.offset=l,n.snapshot.enqueue(d),d}scanComment(e){let n=this,r=n.validator,i=n.line,s=n.lineStart;for(;this.index<this.length&&!r.isEndOfLine(n.codeAt());n.index++);r.isWinNewline(n.codeAt(),n.codeAt(1))&&n.index++;let o=n.content.slice(n.tokenStart+2,n.index),l=new Me.Token({type:Me.TokenType.Comment,value:o,line:i,lineStart:s,range:[n.tokenStart,n.index],offset:n.offset,afterSpace:e});return n.snapshot.enqueue(l),l}scanNumericLiteral(e){let n=this.validator,r,i;for(;this.index<this.length&&(r=i,i=this.codeAt(),n.isDecDigit(i)||oe.CharacterCode.DOT===i||oe.CharacterCode.LETTER_E===i||oe.CharacterCode.LETTER_e===i||(oe.CharacterCode.MINUS===i||oe.CharacterCode.PLUS===i)&&(oe.CharacterCode.LETTER_E===r||oe.CharacterCode.LETTER_e===r));)this.index++;let s=this.content.slice(this.tokenStart,this.index),o=Number(s);return isNaN(o)?this.raise(`Invalid numeric literal: ${s}`,new hf.Range(new Xi.Position(this.line,this.tokenStart-this.offset+1),new Xi.Position(this.line,this.index-this.offset+1))):this.createNumericLiteral(o,s,e)}scanPunctuator(e,n){return this.index+=e.length,this.createPunctuator(e,n)}skipWhiteSpace(){let e=this;for(;e.index<e.length;e.index++){let n=e.content[e.index];if(n===" ")e.offset-=e.tabWidth-1;else if(n!==" ")return}}scanKeyword(e,n){let r=this,i=r.validator,s=e;switch(e){case pf.Keyword.End:{for(r.index++;i.isIdentifierPart(r.codeAt());r.index++);s=r.content.slice(r.tokenStart,r.index);break}case pf.Keyword.Else:{let l=r.content.slice(r.tokenStart,r.index+3);l===pf.Keyword.ElseIf&&(r.index+=3,s=l);break}}let o=new Me.Token({type:Me.TokenType.Keyword,value:s,line:r.line,lineStart:r.lineStart,range:[r.tokenStart,r.index],offset:r.offset,afterSpace:n});return r.snapshot.enqueue(o),o}scanIdentifierOrKeyword(e){let n=this,r=n.validator;for(n.index++;r.isIdentifierPart(n.codeAt());n.index++);let i=n.content.slice(n.tokenStart,n.index);if(r.isKeyword(i))return n.scanKeyword(i,e);switch(i){case uo.Literal.True:case uo.Literal.False:return n.createBoolean(i,e);case uo.Literal.Null:return n.createNull(e)}return n.createIdentifier(i,e)}next(){let e=this;if(e.backlog.size)return e.backlog.dequeue();let n=e.index;e.skipWhiteSpace();let r=n<e.index,i=e.codeAt();if(e.validator.isComment(i,e.codeAt(1)))return e.tokenStart=e.index,e.scanComment(r);if(this.index>=this.length)return e.createEOF(r);if(e.tokenStart=e.index,e.validator.isEndOfLine(i)){e.validator.isWinNewline(i,e.codeAt(1))&&e.index++;let l=e.createEOL(r);return e.line++,e.offset=e.index+1,e.lineStart=++e.index,l}if(e.validator.isIdentifierStart(i))return e.scanIdentifierOrKeyword(r);let s=e.line,o=e.scan(i,r);return o||e.raise(`Invalid character ${i} (Code: ${String.fromCharCode(i)})`,new hf.Range(new Xi.Position(s,e.tokenStart-e.offset+1),new Xi.Position(e.line,e.index-e.offset+1)))}recordSnapshot(){this.snapshot.clear()}recoverFromSnapshot(){this.backlog.copyInto(this.snapshot)}raise(e,n){let r=this,i=new yC.LexerException(e,n);if(r.errors.push(i),r.unsafe)return new Me.Token({type:Me.TokenType.Invalid,value:"",line:r.line,lineStart:r.lineStart,range:[r.tokenStart,r.index],offset:r.offset});throw i}};po.default=ql;ql.scanHandlers={[oe.CharacterCode.QUOTE]:function(e){return this.scanStringLiteral(e)},[oe.CharacterCode.DOT]:function(e){return this.validator.isDecDigit(this.codeAt(1))?this.scanNumericLiteral(e):(this.index++,this.createPunctuator(qe.Operator.Member,e))},[oe.CharacterCode.EQUAL]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.Equal,e):this.scanPunctuator(qe.Operator.Assign,e)},[oe.CharacterCode.ARROW_LEFT]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.LessThanOrEqual,e):this.scanPunctuator(qe.Operator.LessThan,e)},[oe.CharacterCode.ARROW_RIGHT]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.GreaterThanOrEqual,e):this.scanPunctuator(qe.Operator.GreaterThan,e)},[oe.CharacterCode.EXCLAMATION_MARK]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.NotEqual,e):(this.index++,null)},[oe.CharacterCode.MINUS]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.SubtractShorthand,e):this.scanPunctuator(qe.Operator.Minus,e)},[oe.CharacterCode.PLUS]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.AddShorthand,e):this.scanPunctuator(qe.Operator.Plus,e)},[oe.CharacterCode.ASTERISK]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.MultiplyShorthand,e):this.scanPunctuator(qe.Operator.Asterik,e)},[oe.CharacterCode.SLASH]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.DivideShorthand,e):this.scanPunctuator(qe.Operator.Slash,e)},[oe.CharacterCode.COLON]:function(e){return this.index++,this.createSlice(e)},[oe.CharacterCode.CARET]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.PowerShorthand,e):this.scanPunctuator(qe.Operator.Power,e)},[oe.CharacterCode.PERCENT]:function(e){return oe.CharacterCode.EQUAL===this.codeAt(1)?this.scanPunctuator(qe.Operator.ModuloShorthand,e):this.scanPunctuator(qe.Operator.Modulo,e)},[oe.CharacterCode.SEMICOLON]:function(e){return this.index++,this.createEOL(e)},[oe.CharacterCode.COMMA]:gr,[oe.CharacterCode.CURLY_BRACKET_LEFT]:gr,[oe.CharacterCode.CURLY_BRACKET_RIGHT]:gr,[oe.CharacterCode.SQUARE_BRACKETS_LEFT]:gr,[oe.CharacterCode.SQUARE_BRACKETS_RIGHT]:gr,[oe.CharacterCode.PARENTHESIS_LEFT]:gr,[oe.CharacterCode.PARENTHESIS_RIGHT]:gr,[oe.CharacterCode.AT_SIGN]:gr}});var We=T(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.ASTComment=Kt.ASTBaseBlockWithScope=Kt.ASTBaseBlock=Kt.ASTBase=Kt.ASTType=void 0;var gS;(function(t){t.BreakStatement="BreakStatement",t.ContinueStatement="ContinueStatement",t.ReturnStatement="ReturnStatement",t.IfShortcutStatement="IfShortcutStatement",t.IfShortcutClause="IfShortcutClause",t.ElseifShortcutClause="ElseifShortcutClause",t.ElseShortcutClause="ElseShortcutClause",t.IfStatement="IfStatement",t.IfClause="IfClause",t.ElseifClause="ElseifClause",t.ElseClause="ElseClause",t.WhileStatement="WhileStatement",t.AssignmentStatement="AssignmentStatement",t.CallStatement="CallStatement",t.FunctionDeclaration="FunctionDeclaration",t.ForGenericStatement="ForGenericStatement",t.Chunk="Chunk",t.Identifier="Identifier",t.StringLiteral="StringLiteral",t.NumericLiteral="NumericLiteral",t.BooleanLiteral="BooleanLiteral",t.NilLiteral="NilLiteral",t.Unknown="Unknown",t.MemberExpression="MemberExpression",t.CallExpression="CallExpression",t.Comment="Comment",t.NegationExpression="NegationExpression",t.BinaryNegatedExpression="BinaryNegatedExpression",t.UnaryExpression="UnaryExpression",t.MapKeyString="MapKeyString",t.MapValue="MapValue",t.MapConstructorExpression="MapConstructorExpression",t.MapCallExpression="MapCallExpression",t.ListValue="ListValue",t.ListConstructorExpression="ListConstructorExpression",t.EmptyExpression="EmptyExpression",t.IndexExpression="IndexExpression",t.BinaryExpression="BinaryExpression",t.LogicalExpression="LogicalExpression",t.IsaExpression="IsaExpression",t.SliceExpression="SliceExpression",t.ImportCodeExpression="ImportCodeExpression",t.InvalidCodeExpression="InvalidCodeExpression",t.ParenthesisExpression="ParenthesisExpression",t.ComparisonGroupExpression="ComparisonGroupExpression"})(gS=Kt.ASTType||(Kt.ASTType={}));var ho=class t{constructor(e,n){this.type=e,this.start=n.start,this.end=n.end,this.scope=n.scope||null}toString(){return`${this.type}[${this.start}-${this.end}][]`}clone(){return new t(this.type,{start:this.start,end:this.end,scope:this.scope})}};Kt.ASTBase=ho;var Fl=class t extends ho{constructor(e,n){super(e,n),this.body=n.body||[]}toString(){let e=this.body.map(n=>`${n}`).join(`
|
36
36
|
`).split(`
|
37
37
|
`).map(n=>` ${n}`).join(`
|
38
38
|
`);return`${this.type}[${this.start}-${this.end}][${e.length>0?`
|
@@ -82,7 +82,7 @@ ${e}
|
|
82
82
|
`).map(n=>` ${n}`).join(`
|
83
83
|
`);return`WhileStatement[${this.start}-${this.end}][${this.condition}
|
84
84
|
${e}
|
85
|
-
]`}clone(){return new t({condition:this.condition.clone(),start:this.start,end:this.end,scope:this.scope})}};tc.ASTWhileStatement=dm});var gm=T($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.ASTWhileStatement=$.ASTUnaryExpression=$.ASTSliceExpression=$.ASTReturnStatement=$.ASTParenthesisExpression=$.ASTMapKeyString=$.ASTMapConstructorExpression=$.ASTLogicalExpression=$.ASTStringLiteral=$.ASTNumericLiteral=$.ASTNilLiteral=$.ASTLiteral=$.ASTBooleanLiteral=$.ASTListValue=$.ASTListConstructorExpression=$.ASTIsaExpression=$.ASTIfStatement=$.ASTIfClause=$.ASTElseClause=$.ASTClause=$.ASTMemberExpression=$.ASTIndexExpression=$.ASTIdentifier=$.ASTFunctionStatement=$.ASTForGenericStatement=$.ASTComparisonGroupExpression=$.ASTChunk=$.ASTCallStatement=$.ASTCallExpression=$.ASTBinaryExpression=$.ASTType=$.ASTComment=$.ASTBaseBlockWithScope=$.ASTBaseBlock=$.ASTBase=$.ASTAssignmentStatement=$.ASTProvider=void 0;var nc=mr(),bC=bf(),ot=We(),vC=_f(),AS=Sf(),_C=Tf(),wC=Ef(),xC=Rf(),SC=Af(),hm=Lf(),br=Nf(),kC=Bf(),OS=Vf(),rc=Qf(),TC=Xf(),DS=tm(),IC=rm(),EC=sm(),CC=am(),RC=um(),PC=pm(),fm=class{breakStatement(e){return new ot.ASTBase(ot.ASTType.BreakStatement,e)}continueStatement(e){return new ot.ASTBase(ot.ASTType.ContinueStatement,e)}returnStatement(e){return new EC.ASTReturnStatement(e)}ifShortcutStatement(e){return new br.ASTIfStatement(ot.ASTType.IfShortcutStatement,e)}ifShortcutClause(e){return new br.ASTIfClause(ot.ASTType.IfShortcutClause,e)}elseifShortcutClause(e){return new br.ASTIfClause(ot.ASTType.ElseifShortcutClause,e)}elseShortcutClause(e){return new br.ASTElseClause(ot.ASTType.ElseShortcutClause,e)}ifStatement(e){return new br.ASTIfStatement(ot.ASTType.IfStatement,e)}ifClause(e){return new br.ASTIfClause(ot.ASTType.IfClause,e)}elseifClause(e){return new br.ASTIfClause(ot.ASTType.ElseifClause,e)}elseClause(e){return new br.ASTElseClause(ot.ASTType.ElseClause,e)}whileStatement(e){return new PC.ASTWhileStatement(e)}assignmentStatement(e){return new bC.ASTAssignmentStatement(e)}callStatement(e){return new AS.ASTCallStatement(e)}functionStatement(e){return new SC.ASTFunctionStatement(e)}forGenericStatement(e){return new xC.ASTForGenericStatement(e)}chunk(e){return new _C.ASTChunk(e)}identifier(e){return new hm.ASTIdentifier(e)}literal(e,n){switch(e){case nc.TokenType.StringLiteral:return new rc.ASTStringLiteral(n);case nc.TokenType.NumericLiteral:return new rc.ASTNumericLiteral(n);case nc.TokenType.BooleanLiteral:return new rc.ASTBooleanLiteral(n);case nc.TokenType.NilLiteral:return new rc.ASTNilLiteral(n)}}memberExpression(e){return new hm.ASTMemberExpression(e)}callExpression(e){return new AS.ASTCallExpression(e)}comment(e){return new ot.ASTComment(e)}unaryExpression(e){return new RC.ASTUnaryExpression(e)}mapKeyString(e){return new DS.ASTMapKeyString(e)}mapConstructorExpression(e){return new DS.ASTMapConstructorExpression(e)}listValue(e){return new OS.ASTListValue(e)}listConstructorExpression(e){return new OS.ASTListConstructorExpression(e)}unknown(e){return new ot.ASTBase(ot.ASTType.Unknown,e)}emptyExpression(e){return new ot.ASTBase(ot.ASTType.EmptyExpression,e)}invalidCodeExpression(e){return new ot.ASTBase(ot.ASTType.InvalidCodeExpression,e)}indexExpression(e){return new hm.ASTIndexExpression(e)}logicalExpression(e){return new TC.ASTLogicalExpression(e)}isaExpression(e){return new kC.ASTIsaExpression(e)}binaryExpression(e){return new vC.ASTBinaryExpression(e)}sliceExpression(e){return new CC.ASTSliceExpression(e)}parenthesisExpression(e){return new IC.ASTParenthesisExpression(e)}comparisonGroupExpression(e){return new wC.ASTComparisonGroupExpression(e)}};$.ASTProvider=fm;var AC=bf();Object.defineProperty($,"ASTAssignmentStatement",{enumerable:!0,get:function(){return AC.ASTAssignmentStatement}});var mo=We();Object.defineProperty($,"ASTBase",{enumerable:!0,get:function(){return mo.ASTBase}});Object.defineProperty($,"ASTBaseBlock",{enumerable:!0,get:function(){return mo.ASTBaseBlock}});Object.defineProperty($,"ASTBaseBlockWithScope",{enumerable:!0,get:function(){return mo.ASTBaseBlockWithScope}});Object.defineProperty($,"ASTComment",{enumerable:!0,get:function(){return mo.ASTComment}});Object.defineProperty($,"ASTType",{enumerable:!0,get:function(){return mo.ASTType}});var OC=_f();Object.defineProperty($,"ASTBinaryExpression",{enumerable:!0,get:function(){return OC.ASTBinaryExpression}});var jS=Sf();Object.defineProperty($,"ASTCallExpression",{enumerable:!0,get:function(){return jS.ASTCallExpression}});Object.defineProperty($,"ASTCallStatement",{enumerable:!0,get:function(){return jS.ASTCallStatement}});var DC=Tf();Object.defineProperty($,"ASTChunk",{enumerable:!0,get:function(){return DC.ASTChunk}});var jC=Ef();Object.defineProperty($,"ASTComparisonGroupExpression",{enumerable:!0,get:function(){return jC.ASTComparisonGroupExpression}});var LC=Rf();Object.defineProperty($,"ASTForGenericStatement",{enumerable:!0,get:function(){return LC.ASTForGenericStatement}});var MC=Af();Object.defineProperty($,"ASTFunctionStatement",{enumerable:!0,get:function(){return MC.ASTFunctionStatement}});var mm=Lf();Object.defineProperty($,"ASTIdentifier",{enumerable:!0,get:function(){return mm.ASTIdentifier}});Object.defineProperty($,"ASTIndexExpression",{enumerable:!0,get:function(){return mm.ASTIndexExpression}});Object.defineProperty($,"ASTMemberExpression",{enumerable:!0,get:function(){return mm.ASTMemberExpression}});var ic=Nf();Object.defineProperty($,"ASTClause",{enumerable:!0,get:function(){return ic.ASTClause}});Object.defineProperty($,"ASTElseClause",{enumerable:!0,get:function(){return ic.ASTElseClause}});Object.defineProperty($,"ASTIfClause",{enumerable:!0,get:function(){return ic.ASTIfClause}});Object.defineProperty($,"ASTIfStatement",{enumerable:!0,get:function(){return ic.ASTIfStatement}});var qC=Bf();Object.defineProperty($,"ASTIsaExpression",{enumerable:!0,get:function(){return qC.ASTIsaExpression}});var LS=Vf();Object.defineProperty($,"ASTListConstructorExpression",{enumerable:!0,get:function(){return LS.ASTListConstructorExpression}});Object.defineProperty($,"ASTListValue",{enumerable:!0,get:function(){return LS.ASTListValue}});var go=Qf();Object.defineProperty($,"ASTBooleanLiteral",{enumerable:!0,get:function(){return go.ASTBooleanLiteral}});Object.defineProperty($,"ASTLiteral",{enumerable:!0,get:function(){return go.ASTLiteral}});Object.defineProperty($,"ASTNilLiteral",{enumerable:!0,get:function(){return go.ASTNilLiteral}});Object.defineProperty($,"ASTNumericLiteral",{enumerable:!0,get:function(){return go.ASTNumericLiteral}});Object.defineProperty($,"ASTStringLiteral",{enumerable:!0,get:function(){return go.ASTStringLiteral}});var FC=Xf();Object.defineProperty($,"ASTLogicalExpression",{enumerable:!0,get:function(){return FC.ASTLogicalExpression}});var MS=tm();Object.defineProperty($,"ASTMapConstructorExpression",{enumerable:!0,get:function(){return MS.ASTMapConstructorExpression}});Object.defineProperty($,"ASTMapKeyString",{enumerable:!0,get:function(){return MS.ASTMapKeyString}});var NC=rm();Object.defineProperty($,"ASTParenthesisExpression",{enumerable:!0,get:function(){return NC.ASTParenthesisExpression}});var $C=sm();Object.defineProperty($,"ASTReturnStatement",{enumerable:!0,get:function(){return $C.ASTReturnStatement}});var BC=am();Object.defineProperty($,"ASTSliceExpression",{enumerable:!0,get:function(){return BC.ASTSliceExpression}});var UC=um();Object.defineProperty($,"ASTUnaryExpression",{enumerable:!0,get:function(){return UC.ASTUnaryExpression}});var WC=pm();Object.defineProperty($,"ASTWhileStatement",{enumerable:!0,get:function(){return WC.ASTWhileStatement}})});var vm=T(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});var vr=mr(),ym=class{constructor(){this.isNonNilLiteral=Set.prototype.has.bind(new Set([vr.TokenType.StringLiteral,vr.TokenType.NumericLiteral,vr.TokenType.BooleanLiteral])),this.isLiteral=Set.prototype.has.bind(new Set([vr.TokenType.StringLiteral,vr.TokenType.NumericLiteral,vr.TokenType.BooleanLiteral,vr.TokenType.NilLiteral]))}isComment(e){return e===vr.TokenType.Comment}};bm.default=ym});var wm=T(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.SelectorGroups=ee.SelectorGroupType=ee.getSelectorsFromGroup=ee.createSelectorGroup=ee.Selectors=ee.getSelectorValue=ee.createSelector=ee.createSelectorOptions=ee.SelectorType=void 0;var Z=mr(),dn=Ki(),ae=Qi(),VC;(function(t){t.EndOfLine="EndOfLine",t.EndOfFile="EndOfFile",t.LParenthesis="LParenthesis",t.RParenthesis="RParenthesis",t.CLBracket="CLBracket",t.CRBracket="CRBracket",t.SLBracket="SLBracket",t.SRBracket="SRBracket",t.Assign="Assign",t.AddShorthand="AddShorthand",t.SubtractShorthand="SubtractShorthand",t.MultiplyShorthand="MultiplyShorthand",t.DivideShorthand="DivideShorthand",t.PowerShorthand="PowerShorthand",t.ModuloShorthand="ModuloShorthand",t.Seperator="Seperator",t.Function="Function",t.EndFunction="EndFunction",t.EndWhile="EndWhile",t.EndFor="EndFor",t.EndIf="EndIf",t.SliceSeperator="SliceSeperator",t.MapKeyValueSeperator="MapKeyValueSeperator",t.MapSeperator="MapSeperator",t.ListSeperator="ListSeperator",t.CallSeperator="CallSeperator",t.ArgumentSeperator="ArgumentSeperator",t.ImportCodeSeperator="ImportCodeSeperator",t.ElseIf="ElseIf",t.Then="Then",t.Else="Else",t.In="In",t.MemberSeperator="MemberSeperator",t.NumberSeperator="NumberSeperator",t.Reference="Reference",t.Isa="Isa",t.Or="Or",t.And="And",t.Minus="Minus",t.Plus="Plus",t.Times="Times",t.Divide="Divide",t.Power="Power",t.Mod="Mod",t.Equal="Equal",t.NotEqual="NotEqual",t.Greater="Greater",t.GreaterEqual="GreaterEqual",t.Lesser="Lesser",t.LessEqual="LessEqual",t.New="New",t.Not="Not",t.Comment="Comment"})(VC=ee.SelectorType||(ee.SelectorType={}));var _m=class{};ee.createSelectorOptions=_m;function J(t){let e;return t.value===void 0?(e=new Function("token",`if (token == null) return false;return token.type === '${t.type}';`),Object.defineProperty(e,"name",{value:`selector_${t.type}`,writable:!1})):(e=new Function("token",`if (token == null) return false;return token.value === '${t.value}' && token.type === '${t.type}';`),Object.defineProperty(e,"name",{value:`selector_${t.type}_${t.value}`,writable:!1})),e.data=t,e}ee.createSelector=J;function HC(t){return t.data.value}ee.getSelectorValue=HC;ee.Selectors={EndOfLine:J({type:Z.TokenType.EOL,value:ae.Operator.EndOfLine}),EndOfFile:J({type:Z.TokenType.EOF,value:ae.Operator.EndOfFile}),LParenthesis:J({type:Z.TokenType.Punctuator,value:ae.Operator.LParenthesis}),RParenthesis:J({type:Z.TokenType.Punctuator,value:ae.Operator.RParenthesis}),CLBracket:J({type:Z.TokenType.Punctuator,value:ae.Operator.CLBracket}),CRBracket:J({type:Z.TokenType.Punctuator,value:ae.Operator.CRBracket}),SLBracket:J({type:Z.TokenType.Punctuator,value:ae.Operator.SLBracket}),SRBracket:J({type:Z.TokenType.Punctuator,value:ae.Operator.SRBracket}),Assign:J({type:Z.TokenType.Punctuator,value:ae.Operator.Assign}),AddShorthand:J({type:Z.TokenType.Punctuator,value:ae.Operator.AddShorthand}),SubtractShorthand:J({type:Z.TokenType.Punctuator,value:ae.Operator.SubtractShorthand}),MultiplyShorthand:J({type:Z.TokenType.Punctuator,value:ae.Operator.MultiplyShorthand}),DivideShorthand:J({type:Z.TokenType.Punctuator,value:ae.Operator.DivideShorthand}),PowerShorthand:J({type:Z.TokenType.Punctuator,value:ae.Operator.PowerShorthand}),ModuloShorthand:J({type:Z.TokenType.Punctuator,value:ae.Operator.ModuloShorthand}),Seperator:J({type:Z.TokenType.Punctuator,value:ae.Operator.Comma}),Function:J({type:Z.TokenType.Keyword,value:dn.Keyword.Function}),EndFunction:J({type:Z.TokenType.Keyword,value:dn.Keyword.EndFunction}),EndWhile:J({type:Z.TokenType.Keyword,value:dn.Keyword.EndWhile}),EndFor:J({type:Z.TokenType.Keyword,value:dn.Keyword.EndFor}),EndIf:J({type:Z.TokenType.Keyword,value:dn.Keyword.EndIf}),SliceSeperator:J({type:Z.TokenType.SliceOperator,value:ae.Operator.SliceSeperator}),MapKeyValueSeperator:J({type:Z.TokenType.SliceOperator,value:ae.Operator.SliceSeperator}),MapSeperator:J({type:Z.TokenType.Punctuator,value:ae.Operator.Comma}),ListSeperator:J({type:Z.TokenType.Punctuator,value:ae.Operator.Comma}),CallSeperator:J({type:Z.TokenType.Punctuator,value:ae.Operator.Comma}),ArgumentSeperator:J({type:Z.TokenType.Punctuator,value:ae.Operator.Comma}),ImportCodeSeperator:J({type:Z.TokenType.SliceOperator,value:ae.Operator.SliceSeperator}),ElseIf:J({type:Z.TokenType.Keyword,value:dn.Keyword.ElseIf}),Then:J({type:Z.TokenType.Keyword,value:dn.Keyword.Then}),Else:J({type:Z.TokenType.Keyword,value:dn.Keyword.Else}),In:J({type:Z.TokenType.Keyword,value:dn.Keyword.In}),MemberSeperator:J({type:Z.TokenType.Punctuator,value:ae.Operator.Member}),NumberSeperator:J({type:Z.TokenType.Punctuator,value:ae.Operator.Member}),Reference:J({type:Z.TokenType.Punctuator,value:ae.Operator.Reference}),Isa:J({type:Z.TokenType.Keyword,value:ae.Operator.Isa}),Or:J({type:Z.TokenType.Keyword,value:ae.Operator.Or}),And:J({type:Z.TokenType.Keyword,value:ae.Operator.And}),Minus:J({type:Z.TokenType.Punctuator,value:ae.Operator.Minus}),Plus:J({type:Z.TokenType.Punctuator,value:ae.Operator.Plus}),Times:J({type:Z.TokenType.Punctuator,value:ae.Operator.Asterik}),Power:J({type:Z.TokenType.Punctuator,value:ae.Operator.Power}),Divide:J({type:Z.TokenType.Punctuator,value:ae.Operator.Slash}),Mod:J({type:Z.TokenType.Punctuator,value:ae.Operator.Modulo}),Equal:J({type:Z.TokenType.Punctuator,value:ae.Operator.Equal}),NotEqual:J({type:Z.TokenType.Punctuator,value:ae.Operator.NotEqual}),Greater:J({type:Z.TokenType.Punctuator,value:ae.Operator.GreaterThan}),GreaterEqual:J({type:Z.TokenType.Punctuator,value:ae.Operator.GreaterThanOrEqual}),Lesser:J({type:Z.TokenType.Punctuator,value:ae.Operator.LessThan}),LessEqual:J({type:Z.TokenType.Punctuator,value:ae.Operator.LessThanOrEqual}),New:J({type:Z.TokenType.Keyword,value:dn.Keyword.New}),Not:J({type:Z.TokenType.Keyword,value:dn.Keyword.Not}),Comment:J({type:Z.TokenType.Comment})};function En(t,e){let r=e.filter(l=>l.data.value!==void 0).map(l=>`case '${l.data.value}': return token.type === '${l.data.type}';`).join(`
|
85
|
+
]`}clone(){return new t({condition:this.condition.clone(),start:this.start,end:this.end,scope:this.scope})}};tc.ASTWhileStatement=dm});var gm=T($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.ASTWhileStatement=$.ASTUnaryExpression=$.ASTSliceExpression=$.ASTReturnStatement=$.ASTParenthesisExpression=$.ASTMapKeyString=$.ASTMapConstructorExpression=$.ASTLogicalExpression=$.ASTStringLiteral=$.ASTNumericLiteral=$.ASTNilLiteral=$.ASTLiteral=$.ASTBooleanLiteral=$.ASTListValue=$.ASTListConstructorExpression=$.ASTIsaExpression=$.ASTIfStatement=$.ASTIfClause=$.ASTElseClause=$.ASTClause=$.ASTMemberExpression=$.ASTIndexExpression=$.ASTIdentifier=$.ASTFunctionStatement=$.ASTForGenericStatement=$.ASTComparisonGroupExpression=$.ASTChunk=$.ASTCallStatement=$.ASTCallExpression=$.ASTBinaryExpression=$.ASTType=$.ASTComment=$.ASTBaseBlockWithScope=$.ASTBaseBlock=$.ASTBase=$.ASTAssignmentStatement=$.ASTProvider=void 0;var nc=mr(),bC=bf(),ot=We(),vC=_f(),AS=Sf(),_C=Tf(),wC=Ef(),xC=Rf(),SC=Af(),hm=Lf(),br=Nf(),kC=Bf(),OS=Vf(),rc=Qf(),TC=Xf(),DS=tm(),IC=rm(),EC=sm(),CC=am(),RC=um(),PC=pm(),fm=class{breakStatement(e){return new ot.ASTBase(ot.ASTType.BreakStatement,e)}continueStatement(e){return new ot.ASTBase(ot.ASTType.ContinueStatement,e)}returnStatement(e){return new EC.ASTReturnStatement(e)}ifShortcutStatement(e){return new br.ASTIfStatement(ot.ASTType.IfShortcutStatement,e)}ifShortcutClause(e){return new br.ASTIfClause(ot.ASTType.IfShortcutClause,e)}elseifShortcutClause(e){return new br.ASTIfClause(ot.ASTType.ElseifShortcutClause,e)}elseShortcutClause(e){return new br.ASTElseClause(ot.ASTType.ElseShortcutClause,e)}ifStatement(e){return new br.ASTIfStatement(ot.ASTType.IfStatement,e)}ifClause(e){return new br.ASTIfClause(ot.ASTType.IfClause,e)}elseifClause(e){return new br.ASTIfClause(ot.ASTType.ElseifClause,e)}elseClause(e){return new br.ASTElseClause(ot.ASTType.ElseClause,e)}whileStatement(e){return new PC.ASTWhileStatement(e)}assignmentStatement(e){return new bC.ASTAssignmentStatement(e)}callStatement(e){return new AS.ASTCallStatement(e)}functionStatement(e){return new SC.ASTFunctionStatement(e)}forGenericStatement(e){return new xC.ASTForGenericStatement(e)}chunk(e){return new _C.ASTChunk(e)}identifier(e){return new hm.ASTIdentifier(e)}literal(e,n){switch(e){case nc.TokenType.StringLiteral:return new rc.ASTStringLiteral(n);case nc.TokenType.NumericLiteral:return new rc.ASTNumericLiteral(n);case nc.TokenType.BooleanLiteral:return new rc.ASTBooleanLiteral(n);case nc.TokenType.NilLiteral:return new rc.ASTNilLiteral(n)}}memberExpression(e){return new hm.ASTMemberExpression(e)}callExpression(e){return new AS.ASTCallExpression(e)}comment(e){return new ot.ASTComment(e)}unaryExpression(e){return new RC.ASTUnaryExpression(e)}mapKeyString(e){return new DS.ASTMapKeyString(e)}mapConstructorExpression(e){return new DS.ASTMapConstructorExpression(e)}listValue(e){return new OS.ASTListValue(e)}listConstructorExpression(e){return new OS.ASTListConstructorExpression(e)}unknown(e){return new ot.ASTBase(ot.ASTType.Unknown,e)}emptyExpression(e){return new ot.ASTBase(ot.ASTType.EmptyExpression,e)}invalidCodeExpression(e){return new ot.ASTBase(ot.ASTType.InvalidCodeExpression,e)}indexExpression(e){return new hm.ASTIndexExpression(e)}logicalExpression(e){return new TC.ASTLogicalExpression(e)}isaExpression(e){return new kC.ASTIsaExpression(e)}binaryExpression(e){return new vC.ASTBinaryExpression(e)}sliceExpression(e){return new CC.ASTSliceExpression(e)}parenthesisExpression(e){return new IC.ASTParenthesisExpression(e)}comparisonGroupExpression(e){return new wC.ASTComparisonGroupExpression(e)}};$.ASTProvider=fm;var AC=bf();Object.defineProperty($,"ASTAssignmentStatement",{enumerable:!0,get:function(){return AC.ASTAssignmentStatement}});var mo=We();Object.defineProperty($,"ASTBase",{enumerable:!0,get:function(){return mo.ASTBase}});Object.defineProperty($,"ASTBaseBlock",{enumerable:!0,get:function(){return mo.ASTBaseBlock}});Object.defineProperty($,"ASTBaseBlockWithScope",{enumerable:!0,get:function(){return mo.ASTBaseBlockWithScope}});Object.defineProperty($,"ASTComment",{enumerable:!0,get:function(){return mo.ASTComment}});Object.defineProperty($,"ASTType",{enumerable:!0,get:function(){return mo.ASTType}});var OC=_f();Object.defineProperty($,"ASTBinaryExpression",{enumerable:!0,get:function(){return OC.ASTBinaryExpression}});var jS=Sf();Object.defineProperty($,"ASTCallExpression",{enumerable:!0,get:function(){return jS.ASTCallExpression}});Object.defineProperty($,"ASTCallStatement",{enumerable:!0,get:function(){return jS.ASTCallStatement}});var DC=Tf();Object.defineProperty($,"ASTChunk",{enumerable:!0,get:function(){return DC.ASTChunk}});var jC=Ef();Object.defineProperty($,"ASTComparisonGroupExpression",{enumerable:!0,get:function(){return jC.ASTComparisonGroupExpression}});var LC=Rf();Object.defineProperty($,"ASTForGenericStatement",{enumerable:!0,get:function(){return LC.ASTForGenericStatement}});var MC=Af();Object.defineProperty($,"ASTFunctionStatement",{enumerable:!0,get:function(){return MC.ASTFunctionStatement}});var mm=Lf();Object.defineProperty($,"ASTIdentifier",{enumerable:!0,get:function(){return mm.ASTIdentifier}});Object.defineProperty($,"ASTIndexExpression",{enumerable:!0,get:function(){return mm.ASTIndexExpression}});Object.defineProperty($,"ASTMemberExpression",{enumerable:!0,get:function(){return mm.ASTMemberExpression}});var ic=Nf();Object.defineProperty($,"ASTClause",{enumerable:!0,get:function(){return ic.ASTClause}});Object.defineProperty($,"ASTElseClause",{enumerable:!0,get:function(){return ic.ASTElseClause}});Object.defineProperty($,"ASTIfClause",{enumerable:!0,get:function(){return ic.ASTIfClause}});Object.defineProperty($,"ASTIfStatement",{enumerable:!0,get:function(){return ic.ASTIfStatement}});var qC=Bf();Object.defineProperty($,"ASTIsaExpression",{enumerable:!0,get:function(){return qC.ASTIsaExpression}});var LS=Vf();Object.defineProperty($,"ASTListConstructorExpression",{enumerable:!0,get:function(){return LS.ASTListConstructorExpression}});Object.defineProperty($,"ASTListValue",{enumerable:!0,get:function(){return LS.ASTListValue}});var go=Qf();Object.defineProperty($,"ASTBooleanLiteral",{enumerable:!0,get:function(){return go.ASTBooleanLiteral}});Object.defineProperty($,"ASTLiteral",{enumerable:!0,get:function(){return go.ASTLiteral}});Object.defineProperty($,"ASTNilLiteral",{enumerable:!0,get:function(){return go.ASTNilLiteral}});Object.defineProperty($,"ASTNumericLiteral",{enumerable:!0,get:function(){return go.ASTNumericLiteral}});Object.defineProperty($,"ASTStringLiteral",{enumerable:!0,get:function(){return go.ASTStringLiteral}});var FC=Xf();Object.defineProperty($,"ASTLogicalExpression",{enumerable:!0,get:function(){return FC.ASTLogicalExpression}});var MS=tm();Object.defineProperty($,"ASTMapConstructorExpression",{enumerable:!0,get:function(){return MS.ASTMapConstructorExpression}});Object.defineProperty($,"ASTMapKeyString",{enumerable:!0,get:function(){return MS.ASTMapKeyString}});var NC=rm();Object.defineProperty($,"ASTParenthesisExpression",{enumerable:!0,get:function(){return NC.ASTParenthesisExpression}});var $C=sm();Object.defineProperty($,"ASTReturnStatement",{enumerable:!0,get:function(){return $C.ASTReturnStatement}});var BC=am();Object.defineProperty($,"ASTSliceExpression",{enumerable:!0,get:function(){return BC.ASTSliceExpression}});var UC=um();Object.defineProperty($,"ASTUnaryExpression",{enumerable:!0,get:function(){return UC.ASTUnaryExpression}});var WC=pm();Object.defineProperty($,"ASTWhileStatement",{enumerable:!0,get:function(){return WC.ASTWhileStatement}})});var vm=T(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});var vr=mr(),ym=class{constructor(){this.isNonNilLiteral=Set.prototype.has.bind(new Set([vr.TokenType.StringLiteral,vr.TokenType.NumericLiteral,vr.TokenType.BooleanLiteral])),this.isLiteral=Set.prototype.has.bind(new Set([vr.TokenType.StringLiteral,vr.TokenType.NumericLiteral,vr.TokenType.BooleanLiteral,vr.TokenType.NilLiteral]))}isComment(e){return e===vr.TokenType.Comment}};bm.default=ym});var wm=T(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.SelectorGroups=X.SelectorGroupType=X.getSelectorsFromGroup=X.createSelectorGroup=X.Selectors=X.getSelectorValue=X.createSelector=X.createSelectorOptions=X.SelectorType=void 0;var ee=mr(),dn=Ki(),ae=Qi(),VC;(function(t){t.EndOfLine="EndOfLine",t.EndOfFile="EndOfFile",t.LParenthesis="LParenthesis",t.RParenthesis="RParenthesis",t.CLBracket="CLBracket",t.CRBracket="CRBracket",t.SLBracket="SLBracket",t.SRBracket="SRBracket",t.Assign="Assign",t.AddShorthand="AddShorthand",t.SubtractShorthand="SubtractShorthand",t.MultiplyShorthand="MultiplyShorthand",t.DivideShorthand="DivideShorthand",t.PowerShorthand="PowerShorthand",t.ModuloShorthand="ModuloShorthand",t.Seperator="Seperator",t.Function="Function",t.EndFunction="EndFunction",t.EndWhile="EndWhile",t.EndFor="EndFor",t.EndIf="EndIf",t.SliceSeperator="SliceSeperator",t.MapKeyValueSeperator="MapKeyValueSeperator",t.MapSeperator="MapSeperator",t.ListSeperator="ListSeperator",t.CallSeperator="CallSeperator",t.ArgumentSeperator="ArgumentSeperator",t.ImportCodeSeperator="ImportCodeSeperator",t.ElseIf="ElseIf",t.Then="Then",t.Else="Else",t.In="In",t.MemberSeperator="MemberSeperator",t.NumberSeperator="NumberSeperator",t.Reference="Reference",t.Isa="Isa",t.Or="Or",t.And="And",t.Minus="Minus",t.Plus="Plus",t.Times="Times",t.Divide="Divide",t.Power="Power",t.Mod="Mod",t.Equal="Equal",t.NotEqual="NotEqual",t.Greater="Greater",t.GreaterEqual="GreaterEqual",t.Lesser="Lesser",t.LessEqual="LessEqual",t.New="New",t.Not="Not",t.Comment="Comment"})(VC=X.SelectorType||(X.SelectorType={}));var _m=class{};X.createSelectorOptions=_m;function J(t){let e;return t.value===void 0?(e=new Function("token",`if (token == null) return false;return token.type === '${t.type}';`),Object.defineProperty(e,"name",{value:`selector_${t.type}`,writable:!1})):(e=new Function("token",`if (token == null) return false;return token.value === '${t.value}' && token.type === '${t.type}';`),Object.defineProperty(e,"name",{value:`selector_${t.type}_${t.value}`,writable:!1})),e.data=t,e}X.createSelector=J;function HC(t){return t.data.value}X.getSelectorValue=HC;X.Selectors={EndOfLine:J({type:ee.TokenType.EOL,value:ae.Operator.EndOfLine}),EndOfFile:J({type:ee.TokenType.EOF,value:ae.Operator.EndOfFile}),LParenthesis:J({type:ee.TokenType.Punctuator,value:ae.Operator.LParenthesis}),RParenthesis:J({type:ee.TokenType.Punctuator,value:ae.Operator.RParenthesis}),CLBracket:J({type:ee.TokenType.Punctuator,value:ae.Operator.CLBracket}),CRBracket:J({type:ee.TokenType.Punctuator,value:ae.Operator.CRBracket}),SLBracket:J({type:ee.TokenType.Punctuator,value:ae.Operator.SLBracket}),SRBracket:J({type:ee.TokenType.Punctuator,value:ae.Operator.SRBracket}),Assign:J({type:ee.TokenType.Punctuator,value:ae.Operator.Assign}),AddShorthand:J({type:ee.TokenType.Punctuator,value:ae.Operator.AddShorthand}),SubtractShorthand:J({type:ee.TokenType.Punctuator,value:ae.Operator.SubtractShorthand}),MultiplyShorthand:J({type:ee.TokenType.Punctuator,value:ae.Operator.MultiplyShorthand}),DivideShorthand:J({type:ee.TokenType.Punctuator,value:ae.Operator.DivideShorthand}),PowerShorthand:J({type:ee.TokenType.Punctuator,value:ae.Operator.PowerShorthand}),ModuloShorthand:J({type:ee.TokenType.Punctuator,value:ae.Operator.ModuloShorthand}),Seperator:J({type:ee.TokenType.Punctuator,value:ae.Operator.Comma}),Function:J({type:ee.TokenType.Keyword,value:dn.Keyword.Function}),EndFunction:J({type:ee.TokenType.Keyword,value:dn.Keyword.EndFunction}),EndWhile:J({type:ee.TokenType.Keyword,value:dn.Keyword.EndWhile}),EndFor:J({type:ee.TokenType.Keyword,value:dn.Keyword.EndFor}),EndIf:J({type:ee.TokenType.Keyword,value:dn.Keyword.EndIf}),SliceSeperator:J({type:ee.TokenType.SliceOperator,value:ae.Operator.SliceSeperator}),MapKeyValueSeperator:J({type:ee.TokenType.SliceOperator,value:ae.Operator.SliceSeperator}),MapSeperator:J({type:ee.TokenType.Punctuator,value:ae.Operator.Comma}),ListSeperator:J({type:ee.TokenType.Punctuator,value:ae.Operator.Comma}),CallSeperator:J({type:ee.TokenType.Punctuator,value:ae.Operator.Comma}),ArgumentSeperator:J({type:ee.TokenType.Punctuator,value:ae.Operator.Comma}),ImportCodeSeperator:J({type:ee.TokenType.SliceOperator,value:ae.Operator.SliceSeperator}),ElseIf:J({type:ee.TokenType.Keyword,value:dn.Keyword.ElseIf}),Then:J({type:ee.TokenType.Keyword,value:dn.Keyword.Then}),Else:J({type:ee.TokenType.Keyword,value:dn.Keyword.Else}),In:J({type:ee.TokenType.Keyword,value:dn.Keyword.In}),MemberSeperator:J({type:ee.TokenType.Punctuator,value:ae.Operator.Member}),NumberSeperator:J({type:ee.TokenType.Punctuator,value:ae.Operator.Member}),Reference:J({type:ee.TokenType.Punctuator,value:ae.Operator.Reference}),Isa:J({type:ee.TokenType.Keyword,value:ae.Operator.Isa}),Or:J({type:ee.TokenType.Keyword,value:ae.Operator.Or}),And:J({type:ee.TokenType.Keyword,value:ae.Operator.And}),Minus:J({type:ee.TokenType.Punctuator,value:ae.Operator.Minus}),Plus:J({type:ee.TokenType.Punctuator,value:ae.Operator.Plus}),Times:J({type:ee.TokenType.Punctuator,value:ae.Operator.Asterik}),Power:J({type:ee.TokenType.Punctuator,value:ae.Operator.Power}),Divide:J({type:ee.TokenType.Punctuator,value:ae.Operator.Slash}),Mod:J({type:ee.TokenType.Punctuator,value:ae.Operator.Modulo}),Equal:J({type:ee.TokenType.Punctuator,value:ae.Operator.Equal}),NotEqual:J({type:ee.TokenType.Punctuator,value:ae.Operator.NotEqual}),Greater:J({type:ee.TokenType.Punctuator,value:ae.Operator.GreaterThan}),GreaterEqual:J({type:ee.TokenType.Punctuator,value:ae.Operator.GreaterThanOrEqual}),Lesser:J({type:ee.TokenType.Punctuator,value:ae.Operator.LessThan}),LessEqual:J({type:ee.TokenType.Punctuator,value:ae.Operator.LessThanOrEqual}),New:J({type:ee.TokenType.Keyword,value:dn.Keyword.New}),Not:J({type:ee.TokenType.Keyword,value:dn.Keyword.Not}),Comment:J({type:ee.TokenType.Comment})};function En(t,e){let r=e.filter(l=>l.data.value!==void 0).map(l=>`case '${l.data.value}': return token.type === '${l.data.type}';`).join(`
|
86
86
|
`),s=e.filter(l=>l.data.value===void 0).map(l=>`case '${l.data.type}':`).join(`
|
87
87
|
`),o=new Function("token",`
|
88
88
|
${s.length>0?`switch(token.type) {
|
@@ -92,7 +92,7 @@ ${e}
|
|
92
92
|
${r.length>0?`switch(token.value) {
|
93
93
|
${r}
|
94
94
|
}`:""}
|
95
|
-
return false;`);return Object.defineProperty(o,"name",{value:`selector_group_${t}`,writable:!1}),o.selectors=e,o}ee.createSelectorGroup=En;function zC(t){return t.selectors}ee.getSelectorsFromGroup=zC;var Cn;(function(t){t.BlockEndOfLine="BlockEndOfLine",t.AssignmentEndOfExpr="AssignmentEndOfExpr",t.AssignmentShorthand="AssignmentShorthand",t.AssignmentCommandArgs="AssignmentCommandArgs",t.ReturnStatementEnd="ReturnStatementEnd",t.FunctionDeclarationArgEnd="FunctionDeclarationArgEnd",t.ComparisonOperators="ComparisonOperators",t.MultiDivOperators="MultiDivOperators",t.CallArgsEnd="CallArgsEnd"})(Cn=ee.SelectorGroupType||(ee.SelectorGroupType={}));ee.SelectorGroups={BlockEndOfLine:En(Cn.AssignmentEndOfExpr,[ee.Selectors.EndOfLine,ee.Selectors.Comment]),AssignmentEndOfExpr:En(Cn.AssignmentEndOfExpr,[ee.Selectors.EndOfFile,ee.Selectors.EndOfLine,ee.Selectors.Else,ee.Selectors.Comment]),AssignmentShorthand:En(Cn.AssignmentShorthand,[ee.Selectors.AddShorthand,ee.Selectors.SubtractShorthand,ee.Selectors.MultiplyShorthand,ee.Selectors.DivideShorthand,ee.Selectors.PowerShorthand,ee.Selectors.ModuloShorthand]),AssignmentCommandArgs:En(Cn.AssignmentCommandArgs,[ee.Selectors.ArgumentSeperator,ee.Selectors.EndOfLine,ee.Selectors.EndOfFile]),ReturnStatementEnd:En(Cn.ReturnStatementEnd,[ee.Selectors.EndOfLine,ee.Selectors.Else,ee.Selectors.Comment]),FunctionDeclarationArgEnd:En(Cn.FunctionDeclarationArgEnd,[ee.Selectors.RParenthesis,ee.Selectors.EndOfFile]),ComparisonOperators:En(Cn.ComparisonOperators,[ee.Selectors.Equal,ee.Selectors.NotEqual,ee.Selectors.Greater,ee.Selectors.GreaterEqual,ee.Selectors.Lesser,ee.Selectors.LessEqual]),MultiDivOperators:En(Cn.MultiDivOperators,[ee.Selectors.Times,ee.Selectors.Divide,ee.Selectors.Mod]),CallArgsEnd:En(Cn.CallArgsEnd,[ee.Selectors.ArgumentSeperator,ee.Selectors.RParenthesis])}});var Sm=T(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});sc.Stack=void 0;var xm=class{constructor(){this._items=[],this._last=null,this._default=null}setDefault(e){this._default=e}push(e){return this._items.push(this._last=e)}pop(){switch(this._items.length){case 0:return this._default;case 1:return this._last=null,this._items.pop()}let e=this._items.pop();return this._last=this._items[this._items.length-1],e}peek(){return this._last||this._default}};sc.Stack=xm});var Rm=T(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.PendingWhile=De.isPendingWhile=De.PendingIf=De.isPendingIf=De.PendingFunction=De.isPendingFunction=De.PendingFor=De.isPendingFor=De.PendingChunk=De.isPendingChunk=De.PendingBlockType=void 0;var pn;(function(t){t[t.Chunk=0]="Chunk",t[t.For=1]="For",t[t.Function=2]="Function",t[t.If=3]="If",t[t.While=4]="While"})(pn=De.PendingBlockType||(De.PendingBlockType={}));var zr=class{constructor(e,n){this.block=e,this.body=[],this.type=n,this.onComplete=null}complete(e){var n;(n=this.onComplete)===null||n===void 0||n.call(this,this)}};function GC(t){return t.type===pn.Chunk}De.isPendingChunk=GC;var km=class extends zr{constructor(e){super(e,pn.Chunk)}complete(e){this.block.body=this.body,this.block.end=e.end,super.complete(e)}};De.PendingChunk=km;function KC(t){return t.type===pn.For}De.isPendingFor=KC;var Tm=class extends zr{constructor(e){super(e,pn.For)}complete(e){this.block.body=this.body,this.block.end=e.end,super.complete(e)}};De.PendingFor=Tm;function YC(t){return t.type===pn.Function}De.isPendingFunction=YC;var Im=class extends zr{constructor(e){super(e,pn.Function)}complete(e){this.block.body=this.body,this.block.end=e.end,super.complete(e)}};De.PendingFunction=Im;function QC(t){return t.type===pn.If}De.isPendingIf=QC;var Em=class extends zr{constructor(e,n){super(e,pn.If),this.currentClause=n}next(e){this.currentClause.body=this.body,this.currentClause.end=e.end,this.block.clauses.push(this.currentClause),super.complete(e),this.body=[]}complete(e){this.body.length>0&&this.next(e),this.block.end=e.end,super.complete(e)}};De.PendingIf=Em;function JC(t){return t.type===pn.While}De.isPendingWhile=JC;var Cm=class extends zr{constructor(e){super(e,pn.While)}complete(e){this.block.body=this.body,this.block.end=e.end,super.complete(e)}};De.PendingWhile=Cm});var FS=T(yo=>{"use strict";var qS=yo&&yo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(yo,"__esModule",{value:!0});var XC=qS(ff()),_r=mr(),Rn=gm(),ZC=qS(vm()),eR=Ll(),_t=Ki(),Wn=Qi(),Rt=Ji(),B=wm(),tR=Sm(),Pn=Rm(),Pm=class{constructor(e,n={}){let r=this;r.content=e,r.backpatches=new tR.Stack,r.statementErrors=[],r.lexer=n.lexer||new XC.default(e,{unsafe:n.unsafe,tabWidth:n.tabWidth}),r.token=null,r.previousToken=null,r.lines={},r.scopes=[],r.currentScope=null,r.currentAssignment=null,r.outerScopes=[],r.literals=[],r.validator=n.validator||new ZC.default,r.astProvider=n.astProvider||new Rn.ASTProvider,r.unsafe=n.unsafe||!1,r.errors=[]}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,n){let r=this.token;return this.token.type!==e?(this.raise(`got ${r} where ${e} is required`,new Rt.Range(n||r.start,r.end)),null):(this.next(),r)}requireToken(e,n){let r=this.token;return e(r)?(this.next(),r):(this.raise(`got ${r} where "${(0,B.getSelectorValue)(e)}" is required`,new Rt.Range(n||r.start,r.end)),null)}requireTokenOfAny(e,n){let r=this.token;return e(r)?(this.next(),r):(this.raise(`got ${r} where any of ${(0,B.getSelectorsFromGroup)(e).map(i=>`"${(0,B.getSelectorValue)(i)}"`).join(", ")} is required`,new Rt.Range(n||r.start,r.end)),null)}addItemToLines(e){let n=this.lines,r=e.end.line;for(let i=e.start.line;i<=r;i++){let s=n[i];s?s.push(e):n[i]=[e]}}skipNewlines(){let e=this,n=0;for(;;){if(B.Selectors.Comment(e.token)){let r=e.astProvider.comment({value:e.token.value,start:e.token.start,end:e.token.end,scope:e.currentScope});e.addItemToLines(r),e.backpatches.peek().body.push(r)}else if(B.Selectors.EndOfLine(e.token))n++;else break;e.next()}return n}pushScope(e){let n=this;n.currentScope!==null&&(n.scopes.push(e),n.outerScopes.push(n.currentScope)),n.currentScope=e}popScope(){let e=this;e.currentScope=e.outerScopes.pop()}tryToRecover(){let e=this,n=e.statementErrors[0];if(e.errors.push(n),!e.unsafe)throw n;for(e.lexer.recoverFromSnapshot(),e.next();e.token.type!==_r.TokenType.EOL&&e.token.type!==_r.TokenType.EOF;e.next());}finishRemaingScopes(){let e=this,n=e.backpatches.pop();for(;!(0,Pn.isPendingChunk)(n);){let r=e.raise(`found open block ${n.block.type}`,new Rt.Range(n.block.start,n.block.start));if(n.complete(e.previousToken),e.errors.push(r),!e.unsafe)throw r;n=e.backpatches.pop()}}parseChunk(){let e=this;e.next();let n=e.token.start,r=e.astProvider.chunk({start:n,end:null}),i=new Pn.PendingChunk(r);for(e.backpatches.setDefault(i),e.pushScope(r);!B.Selectors.EndOfFile(e.token)&&(e.skipNewlines(),!B.Selectors.EndOfFile(e.token));)e.lexer.recordSnapshot(),e.statementErrors=[],e.parseStatement(),e.statementErrors.length>0&&e.tryToRecover();return e.finishRemaingScopes(),e.popScope(),i.complete(e.token),r.literals=e.literals,r.scopes=e.scopes,r.lines=e.lines,r}parseStatement(){let e=this;if(_r.TokenType.Keyword===e.token.type&&_t.Keyword.Not!==e.token.value){e.parseKeyword();return}let n=e.backpatches.peek(),r=e.parseAssignment();r.end!==null&&e.addItemToLines(r),n.body.push(r)}parseKeyword(){let e=this;switch(e.token.value){case _t.Keyword.Return:{let r=e.backpatches.peek();e.next();let i=e.parseReturnStatement();i.end!==null&&e.addItemToLines(i),r.body.push(i);return}case _t.Keyword.If:{e.next(),e.parseIfStatement();return}case _t.Keyword.ElseIf:{e.next(),e.nextIfClause(Rn.ASTType.ElseifClause);return}case _t.Keyword.Else:{e.next(),e.nextIfClause(Rn.ASTType.ElseClause);return}case _t.Keyword.While:{e.next(),e.parseWhileStatement();return}case _t.Keyword.For:{e.next(),e.parseForStatement();return}case _t.Keyword.EndFunction:{e.next(),e.finalizeFunction();return}case _t.Keyword.EndFor:{e.next(),e.finalizeForStatement();return}case _t.Keyword.EndWhile:{e.next(),e.finalizeWhileStatement();return}case _t.Keyword.EndIf:{e.next(),e.nextIfClause(null);return}case _t.Keyword.Continue:{let r=e.backpatches.peek();e.next();let i=e.astProvider.continueStatement({start:e.previousToken.start,end:e.previousToken.end,scope:e.currentScope});e.addItemToLines(i),r.body.push(i);return}case _t.Keyword.Break:{let r=e.backpatches.peek();e.next();let i=e.astProvider.breakStatement({start:e.previousToken.start,end:e.previousToken.end,scope:e.currentScope});e.addItemToLines(i),r.body.push(i);return}}e.raise(`unexpected keyword ${e.token} at start of line`,new Rt.Range(e.token.start,e.token.end))}parseShortcutStatement(){let e=this;if(_r.TokenType.Keyword===e.token.type&&_t.Keyword.Not!==e.token.value)switch(e.token.value){case _t.Keyword.Return:return e.next(),e.parseReturnStatement();case _t.Keyword.Continue:return e.next(),e.astProvider.continueStatement({start:e.previousToken.start,end:e.previousToken.end,scope:e.currentScope});case _t.Keyword.Break:return e.next(),e.astProvider.breakStatement({start:e.previousToken.start,end:e.previousToken.end,scope:e.currentScope});default:return e.raise(`unexpected keyword ${e.token} in shorthand statement`,new Rt.Range(e.token.start,e.token.end)),e.parseInvalidCode()}return e.parseAssignment()}parseAssignment(){let e=this,n=e.currentScope,r=e.token.start,i=e.parseExpr(null,!0,!0);if(B.SelectorGroups.AssignmentEndOfExpr(e.token))return i;if(B.Selectors.Assign(e.token)){e.next();let o=e.astProvider.assignmentStatement({variable:i,init:null,start:r,end:null,scope:n}),l=e.currentAssignment;if(e.currentAssignment=o,o.init=e.parseExpr(o),o.end=e.previousToken.end,o.init.type===Rn.ASTType.FunctionDeclaration){let c=e.backpatches.peek();c.onComplete=a=>o.end=a.block.end}return e.currentAssignment=l,n.assignments.push(o),o}else if(B.SelectorGroups.AssignmentShorthand(e.token)){let o=e.token;e.next();let l=e.astProvider.assignmentStatement({variable:i,init:null,start:r,end:null,scope:n}),c=e.currentAssignment;e.currentAssignment=l;let a=e.token.start,u=o.value.charAt(0),d=e.parseExpr(l),p=e.astProvider.parenthesisExpression({start:d.start,end:d.end,expression:d});return l.init=e.astProvider.binaryExpression({operator:u,left:i.clone(),right:p,start:a,end:e.previousToken.end,scope:n}),l.end=e.previousToken.end,e.currentAssignment=c,n.assignments.push(l),l}let s=[];for(;!B.Selectors.EndOfFile(e.token);){let o=e.parseExpr(null);if(s.push(o),B.SelectorGroups.BlockEndOfLine(e.token)||B.Selectors.Else(e.token))break;if(B.Selectors.ArgumentSeperator(e.token)){e.next(),e.skipNewlines();continue}let l=e.requireTokenOfAny(B.SelectorGroups.AssignmentCommandArgs,r);if(B.Selectors.EndOfLine(l)||B.Selectors.EndOfFile(l))break}return s.length===0?e.astProvider.callStatement({expression:i,start:r,end:e.previousToken.end,scope:n}):e.astProvider.callStatement({expression:e.astProvider.callExpression({base:i,arguments:s,start:r,end:e.previousToken.end,scope:n}),start:r,end:e.previousToken.end,scope:n})}parseReturnStatement(){let e=this,n=e.currentScope,r=e.previousToken.start,i=null,s=e.astProvider.returnStatement({argument:null,start:r,end:null,scope:n});if(B.SelectorGroups.ReturnStatementEnd(e.token))s.end=e.previousToken.end;else{if(i=e.parseExpr(s),i.type===Rn.ASTType.FunctionDeclaration){let o=e.backpatches.peek();o.onComplete=l=>s.end=l.block.end}else s.end=e.previousToken.end;s.argument=i}return n.returns.push(s),s}parseIfStatement(){let e=this,n=e.previousToken.start,r=e.parseExpr(null);if(e.addItemToLines(r),e.requireToken(B.Selectors.Then,n),!B.SelectorGroups.BlockEndOfLine(e.token)){e.parseIfShortcutStatement(r,n);return}let i=e.astProvider.ifStatement({clauses:[],start:n,end:null,scope:e.currentScope}),s=e.astProvider.ifClause({condition:r,start:n,end:e.token.end,scope:e.currentScope}),o=new Pn.PendingIf(i,s);e.backpatches.push(o)}nextIfClause(e){let n=this,r=n.backpatches.peek();if(!(0,Pn.isPendingIf)(r)){n.raise("no matching open if block",new Rt.Range(n.token.start,n.token.end));return}switch(r.next(n.previousToken),e){case Rn.ASTType.ElseifClause:{let i=n.token.start,s=n.parseExpr(null);n.requireToken(B.Selectors.Then,i),r.currentClause=n.astProvider.elseifClause({condition:s,start:i,end:null,scope:n.currentScope});break}case Rn.ASTType.ElseClause:{let i=n.token.start;r.currentClause=n.astProvider.elseClause({start:i,end:null,scope:n.currentScope});break}}e===null&&(r.complete(n.previousToken),n.addItemToLines(r.block),n.backpatches.pop(),n.backpatches.peek().body.push(r.block))}parseIfShortcutStatement(e,n){let r=this,i=[],s=r.backpatches.peek(),o=r.astProvider.ifShortcutStatement({clauses:i,start:n,end:null,scope:r.currentScope}),l=r.parseShortcutStatement();if(i.push(r.astProvider.ifShortcutClause({condition:e,body:[l],start:n,end:r.token.end,scope:r.currentScope})),B.Selectors.Else(r.token)){r.next();let c=r.token.start,a=r.parseShortcutStatement();i.push(r.astProvider.elseShortcutClause({body:[a],start:c,end:r.token.end,scope:r.currentScope}))}o.end=r.token.end,r.addItemToLines(o),s.body.push(o)}parseWhileStatement(){let e=this,n=e.previousToken.start,r=e.parseExpr(null);if(!r){e.raise("while requires a condition",new Rt.Range(n,e.token.end));return}if(!B.SelectorGroups.BlockEndOfLine(e.token))return e.parseWhileShortcutStatement(r,n);let i=e.astProvider.whileStatement({condition:r,start:n,end:null,scope:e.currentScope}),s=new Pn.PendingWhile(i);e.backpatches.push(s),s.onComplete=o=>{e.addItemToLines(o.block),e.backpatches.pop(),e.backpatches.peek().body.push(o.block)}}finalizeWhileStatement(){let e=this,n=e.backpatches.peek();if(!(0,Pn.isPendingWhile)(n)){e.raise("no matching open while block",new Rt.Range(e.token.start,e.token.end));return}n.complete(e.previousToken)}parseWhileShortcutStatement(e,n){let r=this,i=r.backpatches.peek(),s=r.parseShortcutStatement(),o=r.astProvider.whileStatement({condition:e,body:[s],start:n,end:r.previousToken.end,scope:r.currentScope});r.addItemToLines(o),i.body.push(o)}parseForStatement(){let e=this,n=e.currentScope,r=e.previousToken.start,i=e.parseIdentifier(),s=e.astProvider.assignmentStatement({variable:i,init:e.astProvider.unknown({start:i.start,end:i.end,scope:n}),start:i.start,end:i.end,scope:n}),o=e.astProvider.assignmentStatement({variable:e.astProvider.identifier({name:`__${i.name}_idx`,start:i.start,end:i.end,scope:n}),init:e.astProvider.literal(_r.TokenType.NumericLiteral,{value:0,raw:"0",start:i.start,end:i.end,scope:n}),start:i.start,end:i.end,scope:n});n.assignments.push(s,o),e.requireToken(B.Selectors.In,r);let l=e.parseExpr(null);if(!l){e.raise("sequence expression expected for 'for' loop",new Rt.Range(r,e.token.end));return}if(!B.SelectorGroups.BlockEndOfLine(e.token))return e.parseForShortcutStatement(i,l,r);let c=e.astProvider.forGenericStatement({variable:i,iterator:l,start:r,end:e.previousToken.end,scope:n}),a=new Pn.PendingFor(c);e.backpatches.push(a)}finalizeForStatement(){let e=this,n=e.backpatches.peek();if(!(0,Pn.isPendingFor)(n)){e.raise("no matching open for block",new Rt.Range(e.token.start,e.token.end));return}n.complete(e.previousToken),e.addItemToLines(n.block),e.backpatches.pop(),e.backpatches.peek().body.push(n.block)}parseForShortcutStatement(e,n,r){let i=this,s=i.backpatches.peek(),o=i.parseShortcutStatement(),l=i.astProvider.forGenericStatement({variable:e,iterator:n,body:[o],start:r,end:i.previousToken.end,scope:i.currentScope});i.addItemToLines(l),s.body.push(l)}parseExpr(e,n=!1,r=!1){return this.parseFunctionDeclaration(e,n,r)}parseFunctionDeclaration(e,n=!1,r=!1){let i=this;if(!B.Selectors.Function(i.token))return i.parseOr(n,r);i.next();let s=i.previousToken.start,o=i.astProvider.functionStatement({start:s,end:null,scope:i.currentScope,parent:i.outerScopes[i.outerScopes.length-1],assignment:i.currentAssignment}),l=[];if(i.pushScope(o),!B.SelectorGroups.BlockEndOfLine(i.token)){for(i.requireToken(B.Selectors.LParenthesis,s);!B.SelectorGroups.FunctionDeclarationArgEnd(i.token);){let a=i.parseIdentifier(),u=a.start;if(i.consume(B.Selectors.Assign)){let d=i.parseExpr(null);if(d instanceof Rn.ASTLiteral){let p=i.astProvider.assignmentStatement({variable:a,init:d,start:u,end:i.previousToken.end,scope:i.currentScope});i.currentScope.assignments.push(p),l.push(p)}else i.raise("parameter default value must be a literal value",new Rt.Range(u,i.token.end)),l.push(i.astProvider.invalidCodeExpression({start:u,end:i.previousToken.end}))}else{let d=i.astProvider.assignmentStatement({variable:a,init:i.astProvider.unknown({start:u,end:i.previousToken.end,scope:i.currentScope}),start:u,end:i.previousToken.end,scope:i.currentScope});i.currentScope.assignments.push(d),l.push(a)}if(B.Selectors.RParenthesis(i.token))break;if(i.requireToken(B.Selectors.ArgumentSeperator,s),B.Selectors.RParenthesis(i.token)){i.raise("expected argument instead received right parenthesis",new Rt.Range(i.previousToken.end,i.previousToken.end));break}}i.requireToken(B.Selectors.RParenthesis,s)}o.parameters=l;let c=new Pn.PendingFunction(o);return i.backpatches.push(c),c.onComplete=a=>{e!==null?(e.end=a.block.end,i.addItemToLines(e)):i.addItemToLines(a.block)},o}finalizeFunction(){let e=this,n=e.backpatches.peek();if(!(0,Pn.isPendingFunction)(n)){e.raise("no matching open function block",new Rt.Range(e.token.start,e.token.end));return}e.popScope(),n.complete(e.previousToken),e.backpatches.pop()}parseOr(e=!1,n=!1){let r=this,i=r.token.start,o=r.parseAnd(e,n);for(;B.Selectors.Or(r.token);){r.next(),r.skipNewlines();let l=r.parseAnd();o=r.astProvider.logicalExpression({operator:Wn.Operator.Or,left:o,right:l,start:i,end:r.previousToken.end,scope:r.currentScope})}return o}parseAnd(e=!1,n=!1){let r=this,i=r.token.start,o=r.parseNot(e,n);for(;B.Selectors.And(r.token);){r.next(),r.skipNewlines();let l=r.parseNot();o=r.astProvider.logicalExpression({operator:Wn.Operator.And,left:o,right:l,start:i,end:r.previousToken.end,scope:r.currentScope})}return o}parseNot(e=!1,n=!1){let r=this,i=r.token.start;if(B.Selectors.Not(r.token)){r.next(),r.skipNewlines();let s=r.parseIsa();return r.astProvider.unaryExpression({operator:Wn.Operator.Not,argument:s,start:i,end:r.previousToken.end,scope:r.currentScope})}return r.parseIsa(e,n)}parseIsa(e=!1,n=!1){let r=this,i=r.token.start,s=r.parseComparisons(e,n);if(B.Selectors.Isa(r.token)){r.next(),r.skipNewlines();let o=r.parseComparisons();return r.astProvider.isaExpression({operator:Wn.Operator.Isa,left:s,right:o,start:i,end:r.previousToken.end,scope:r.currentScope})}return s}parseComparisons(e=!1,n=!1){let r=this,i=r.token.start,s=r.parseAddSub(e,n);if(!B.SelectorGroups.ComparisonOperators(r.token))return s;let o=[s],l=[];do{let c=r.token;r.next(),r.skipNewlines();let a=r.parseAddSub();l.push(c.value),o.push(a)}while(B.SelectorGroups.ComparisonOperators(r.token));return l.length===1?r.astProvider.binaryExpression({operator:l[0],left:o[0],right:o[1],start:i,end:r.previousToken.end,scope:r.currentScope}):r.astProvider.comparisonGroupExpression({operators:l,expressions:o,start:i,end:r.previousToken.end,scope:r.currentScope})}parseAddSub(e=!1,n=!1){let r=this,i=r.token.start,o=r.parseMultDiv(e,n);for(;B.Selectors.Plus(r.token)||B.Selectors.Minus(r.token)&&(!n||!r.token.afterSpace||r.lexer.isAtWhitespace());){let l=r.token;r.next(),r.skipNewlines();let c=r.parseMultDiv();o=r.astProvider.binaryExpression({operator:l.value,left:o,right:c,start:i,end:r.previousToken.end,scope:r.currentScope})}return o}parseMultDiv(e=!1,n=!1){let r=this,i=r.token.start,o=r.parseUnaryMinus(e,n);for(;B.SelectorGroups.MultiDivOperators(r.token);){let l=r.token;r.next(),r.skipNewlines();let c=r.parseUnaryMinus();o=r.astProvider.binaryExpression({operator:l.value,left:o,right:c,start:i,end:r.previousToken.end,scope:r.currentScope})}return o}parseUnaryMinus(e=!1,n=!1){let r=this;if(!B.Selectors.Minus(r.token))return r.parseNew(e,n);let i=r.token.start;r.next(),r.skipNewlines();let s=r.parseNew();return s instanceof Rn.ASTNumericLiteral||s instanceof Rn.ASTBooleanLiteral?(s.negated=!0,s):r.astProvider.unaryExpression({operator:Wn.Operator.Minus,argument:s,start:i,end:r.previousToken.end,scope:r.currentScope})}parseNew(e=!1,n=!1){let r=this;if(!B.Selectors.New(r.token))return r.parseAddressOf(e,n);let i=r.token.start;r.next(),r.skipNewlines();let s=r.parseNew();return r.astProvider.unaryExpression({operator:Wn.Operator.New,argument:s,start:i,end:r.previousToken.end,scope:r.currentScope})}parseAddressOf(e=!1,n=!1){let r=this;if(!B.Selectors.Reference(r.token))return r.parsePower(e,n);let i=r.token.start;r.next(),r.skipNewlines();let s=r.parsePower();return r.astProvider.unaryExpression({operator:Wn.Operator.Reference,argument:s,start:i,end:r.previousToken.end,scope:r.currentScope})}parsePower(e=!1,n=!1){let r=this,i=r.token.start,s=r.parseCallExpr(e,n);if(B.Selectors.Power(r.token)){r.next(),r.skipNewlines();let o=r.parseCallExpr();return r.astProvider.binaryExpression({operator:Wn.Operator.Power,left:s,right:o,start:i,end:r.previousToken.end,scope:r.currentScope})}return s}parseCallExpr(e=!1,n=!1){let r=this,i=r.token.start,s=r.parseMap(e,n);for(;!B.Selectors.EndOfFile(r.token);)if(B.Selectors.MemberSeperator(r.token)){r.next(),r.skipNewlines();let o=r.parseIdentifier();s=r.astProvider.memberExpression({base:s,indexer:Wn.Operator.Member,identifier:o,start:i,end:r.previousToken.end,scope:r.currentScope})}else if(B.Selectors.SLBracket(r.token)&&!r.token.afterSpace){if(r.next(),r.skipNewlines(),B.Selectors.SliceSeperator(r.token)){let o=r.astProvider.emptyExpression({start:r.previousToken.start,end:r.previousToken.end,scope:r.currentScope});r.next(),r.skipNewlines();let l=B.Selectors.SRBracket(r.token)?r.astProvider.emptyExpression({start:r.previousToken.start,end:r.previousToken.end,scope:r.currentScope}):r.parseExpr(null);s=r.astProvider.sliceExpression({base:s,left:o,right:l,start:i,end:r.token.end,scope:r.currentScope})}else{let o=r.parseExpr(null);if(B.Selectors.SliceSeperator(r.token)){r.next(),r.skipNewlines();let l=B.Selectors.SRBracket(r.token)?r.astProvider.emptyExpression({start:r.previousToken.start,end:r.previousToken.end,scope:r.currentScope}):r.parseExpr(null);s=r.astProvider.sliceExpression({base:s,left:o,right:l,start:i,end:r.token.end,scope:r.currentScope})}else s=r.astProvider.indexExpression({base:s,index:o,start:i,end:r.token.end,scope:r.currentScope})}r.requireToken(B.Selectors.SRBracket,i)}else if(B.Selectors.LParenthesis(r.token)&&(!e||!r.token.afterSpace)){let o=r.parseCallArgs();s=r.astProvider.callExpression({base:s,arguments:o,start:i,end:r.previousToken.end,scope:r.currentScope})}else break;return s}parseCallArgs(){let e=this,n=[];if(B.Selectors.LParenthesis(e.token))if(e.next(),B.Selectors.RParenthesis(e.token))e.next();else for(;!B.Selectors.EndOfFile(e.token);){e.skipNewlines();let r=e.parseExpr(null);if(n.push(r),e.skipNewlines(),B.Selectors.RParenthesis(e.requireTokenOfAny(B.SelectorGroups.CallArgsEnd,r.start)))break}return n}parseMap(e=!1,n=!1){let r=this;if(!B.Selectors.CLBracket(r.token))return r.parseList(e,n);let i=r.currentScope,s=r.token.start,o=[],l=r.astProvider.mapConstructorExpression({fields:o,start:s,end:null,scope:i});if(r.next(),B.Selectors.CRBracket(r.token))r.next();else for(r.skipNewlines();!B.Selectors.EndOfFile(r.token);){if(B.Selectors.CRBracket(r.token)){r.next();break}let c=r.astProvider.mapKeyString({key:null,value:null,start:r.token.start,end:null,scope:i});if(c.key=r.parseExpr(null),r.requireToken(B.Selectors.MapKeyValueSeperator),r.skipNewlines(),r.currentAssignment){let a=r.astProvider.assignmentStatement({variable:r.astProvider.indexExpression({index:c.key,base:r.currentAssignment.variable,start:c.start,end:r.token.end,scope:i}),init:null,start:c.start,end:null}),u=r.currentAssignment;r.currentAssignment=a,c.value=r.parseExpr(c),r.currentAssignment=u,a.init=c.value,a.end=r.previousToken.end,i.assignments.push(a)}else c.value=r.parseExpr(c);if(c.end=r.previousToken.end,o.push(c),B.Selectors.MapSeperator(r.token)&&(r.next(),r.skipNewlines()),B.Selectors.CRBracket(r.token)){r.next();break}}return l.end=r.token.start,l}parseList(e=!1,n=!1){let r=this;if(!B.Selectors.SLBracket(r.token))return r.parseQuantity(e,n);let i=r.currentScope,s=r.token.start,o=[],l=r.astProvider.listConstructorExpression({fields:o,start:s,end:null,scope:i});if(r.next(),B.Selectors.SRBracket(r.token))r.next();else for(r.skipNewlines();!B.Selectors.EndOfFile(r.token);){if(B.Selectors.SRBracket(r.token)){r.next();break}let c=r.astProvider.listValue({value:null,start:r.token.start,end:null,scope:i});if(r.currentAssignment){let a=r.astProvider.assignmentStatement({variable:r.astProvider.indexExpression({index:r.astProvider.literal(_r.TokenType.NumericLiteral,{value:o.length,raw:`${o.length}`,start:s,end:r.token.end,scope:i}),base:r.currentAssignment.variable,start:null,end:null,scope:i}),init:null,start:null,end:null}),u=r.currentAssignment,d=r.token;r.currentAssignment=u,c.value=r.parseExpr(c),r.currentAssignment=u,a.variable.start=d.start,a.variable.end=r.previousToken.end,a.init=c.value,a.start=c.start,a.end=r.previousToken.end,i.assignments.push(a)}else c.value=r.parseExpr(c);if(c.end=r.previousToken.end,o.push(c),B.Selectors.MapSeperator(r.token)&&(r.next(),r.skipNewlines()),B.Selectors.SRBracket(r.token)){r.next();break}}return l.end=r.token.start,l}parseQuantity(e=!1,n=!1){let r=this;if(!B.Selectors.LParenthesis(r.token))return r.parseAtom(e,n);let i=r.token.start;r.next(),r.skipNewlines();let s=r.parseExpr(null);return r.requireToken(B.Selectors.RParenthesis,i),r.astProvider.parenthesisExpression({expression:s,start:i,end:r.previousToken.end,scope:r.currentScope})}parseAtom(e=!1,n=!1){let r=this;return r.validator.isLiteral(r.token.type)?r.parseLiteral():r.isType(_r.TokenType.Identifier)?r.parseIdentifier():(r.raise(`got ${r.token} where number, string, or identifier is required`,new Rt.Range(r.token.start,r.token.end)),r.parseInvalidCode())}parseLiteral(){let e=this,n=e.token.start,r=e.token.type,i=e.astProvider.literal(r,{value:e.token.value,raw:e.token.raw,start:n,end:e.token.end,scope:e.currentScope});return e.literals.push(i),e.next(),i}parseIdentifier(){let e=this,n=e.token.start,r=e.token.end,i=e.requireType(_r.TokenType.Identifier);return i===null?e.parseInvalidCode():(e.currentScope.namespaces.add(i.value),e.astProvider.identifier({name:i.value,start:n,end:r,scope:e.currentScope}))}parseInvalidCode(){let e=this,n=e.token.start,r=e.token.end,i=e.astProvider.invalidCodeExpression({start:n,end:r});return e.next(),i}raise(e,n){let r=this,i=new eR.ParserException(e,n);return r.statementErrors.push(i),i}};yo.default=Pm});var pe=T(fe=>{"use strict";var nR=fe&&fe.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),hn=fe&&fe.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&nR(e,t,n)},oc=fe&&fe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fe,"__esModule",{value:!0});fe.ASTRange=fe.ASTPosition=fe.ParserValidatorm=fe.Parser=fe.LexerValidator=fe.Lexer=void 0;var rR=ff();Object.defineProperty(fe,"Lexer",{enumerable:!0,get:function(){return oc(rR).default}});hn(mr(),fe);var iR=rf();Object.defineProperty(fe,"LexerValidator",{enumerable:!0,get:function(){return oc(iR).default}});var sR=FS();Object.defineProperty(fe,"Parser",{enumerable:!0,get:function(){return oc(sR).default}});hn(gm(),fe);var oR=vm();Object.defineProperty(fe,"ParserValidatorm",{enumerable:!0,get:function(){return oc(oR).default}});hn(Rm(),fe);hn(Sm(),fe);hn(df(),fe);hn(jl(),fe);hn(Ll(),fe);hn(Ki(),fe);hn(af(),fe);hn(Qi(),fe);var aR=Gi();Object.defineProperty(fe,"ASTPosition",{enumerable:!0,get:function(){return aR.Position}});var lR=Ji();Object.defineProperty(fe,"ASTRange",{enumerable:!0,get:function(){return lR.Range}});hn(wm(),fe)});var bo=T(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});ac.isValidIdentifierLiteral=void 0;var cR=pe(),uR=t=>{if(t.type!==cR.ASTType.StringLiteral)return!1;let e=t.value.toString();return/^[_a-z][_a-z0-9]*$/i.test(e)};ac.isValidIdentifierLiteral=uR});var Am=T(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.getStringHashCode=wr.getHashCode=wr.rotateBits=void 0;function dR(t){return t>>1|t<<31}wr.rotateBits=dR;function pR(t,e=0){let n=t>>>0;return n=(n>>16^n)*73244475,n=(n>>16^n)*73244475,n=n>>16^n,(e<<5)-e+n|0}wr.getHashCode=pR;wr.getStringHashCode=function(){let t=new Map,e=n=>{let r,i;for(r=0,i=0;r<n.length;r++)i=Math.imul(31,i)+n.charCodeAt(r)|0;return i};return n=>{if(n.length===0)return 0;let r=t.get(n);if(r!==void 0)return r;let i=e(n);return t.set(n,i),i}}()});var NS=T(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});lc.createExpressionHash=void 0;var Re=pe(),Xe=Am(),hR=bo(),wt=(t,e)=>t.$$hash=e,fR=t=>{var e;return(e=t.$$hash)!=null?e:null};function Fe(t){let e=fR(t);if(e!==null)return e;let n=(0,Xe.getStringHashCode)(t.type);switch(t.type){case Re.ASTType.BinaryExpression:{let r=t;return n^=(0,Xe.getStringHashCode)(r.operator),n^=Fe(r.left),n^=Fe(r.right),wt(t,n)}case Re.ASTType.LogicalExpression:{let r=t;return n^=(0,Xe.getStringHashCode)(r.operator),n^=Fe(r.left),n^=Fe(r.right),wt(t,n)}case Re.ASTType.IsaExpression:{let r=t;return n^=(0,Xe.getStringHashCode)(r.operator),n^=Fe(r.left),n^=Fe(r.right),wt(t,n)}case Re.ASTType.ComparisonGroupExpression:{let r=t;for(let i=0;i<r.expressions.length;i++)n^=Fe(r.expressions[i]);for(let i=0;i<r.operators.length;i++)n^=(0,Xe.getStringHashCode)(r.operators[i]);return wt(t,n)}case Re.ASTType.FunctionDeclaration:{let r=t;n^=(0,Xe.getHashCode)(r.parameters.length);for(let i=0;i<r.parameters.length;i++){let s=r.parameters[i];if(s.type===Re.ASTType.Identifier){n^=(0,Xe.getStringHashCode)(s.name);continue}let o=s;n^=(0,Xe.getStringHashCode)(o.variable.name),n^=Fe(o.init)}return wt(t,n)}case Re.ASTType.ParenthesisExpression:return Fe(t.expression);case Re.ASTType.MemberExpression:{let r=t;if(r.base.type===Re.ASTType.Identifier){let i=r.base.name;if(i==="globals"||i==="locals"||i==="outer")return n=(0,Xe.getStringHashCode)(Re.ASTType.Identifier),n^=(0,Xe.getStringHashCode)(r.identifier.name),wt(t,n)}return n^=Fe(r.base),n^=Fe(r.identifier),wt(t,n)}case Re.ASTType.IndexExpression:{let r=t;if((0,hR.isValidIdentifierLiteral)(r.index)){if(r.base.type===Re.ASTType.Identifier){let s=r.base.name;if(s==="globals"||s==="locals"||s==="outer")return n=(0,Xe.getStringHashCode)(Re.ASTType.Identifier),n^=(0,Xe.getStringHashCode)(r.index.value.toString()),wt(t,n)}n=(0,Xe.getStringHashCode)(Re.ASTType.MemberExpression),n^=Fe(r.base);let i=(0,Xe.getStringHashCode)(Re.ASTType.Identifier);i^=(0,Xe.getStringHashCode)(r.index.value.toString()),n^=i}else n^=Fe(r.base),n^=Fe(r.index);return wt(t,n)}case Re.ASTType.CallExpression:{let r=t;n^=Fe(r.base),n^=(0,Xe.getHashCode)(r.arguments.length);for(let i=0;i<r.arguments.length;i++){let s=r.arguments[i];n^=Fe(s)}return wt(t,n)}case Re.ASTType.NegationExpression:case Re.ASTType.BinaryNegatedExpression:case Re.ASTType.UnaryExpression:{let r=t;return n^=r.operator?(0,Xe.getStringHashCode)(r.operator):1,n^=Fe(r.argument),wt(t,n)}case Re.ASTType.Identifier:{let r=t;return n^=(0,Xe.getStringHashCode)(r.name),wt(t,n)}case Re.ASTType.NumericLiteral:case Re.ASTType.StringLiteral:case Re.ASTType.NilLiteral:return n^=(0,Xe.getStringHashCode)(t.value.toString()),wt(t,n);case Re.ASTType.MapConstructorExpression:{let r=t;n^=(0,Xe.getHashCode)(r.fields.length);for(let i=0;i<r.fields.length;i++){let s=r.fields[i];n^=Fe(s.key),n^=Fe(s.value)}return wt(t,n)}case Re.ASTType.ListConstructorExpression:{let r=t;n^=(0,Xe.getHashCode)(r.fields.length);for(let i=0;i<r.fields.length;i++){let s=r.fields[i];n^=Fe(s.value)}return wt(t,n)}case Re.ASTType.SliceExpression:{let r=t;return n^=Fe(r.base),n^=Fe(r.left),n^=Fe(r.right),wt(t,n)}}return console.warn(`Unexpected ast type ${t.type} in hash handler!`),wt(t,n)}function mR(t){return Fe(t)}lc.createExpressionHash=mR});var Om=T(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});cc.createExpressionId=void 0;var rt=pe(),gR=bo(),at=(t,e)=>t.$$id=e,yR=t=>{var e;return(e=t.$$id)!=null?e:null};function je(t){let e=yR(t);if(e!==null)return e;switch(t.type){case rt.ASTType.BinaryExpression:{let n=t;return at(t,je(n.left)+n.operator+je(n.right))}case rt.ASTType.LogicalExpression:{let n=t;return at(t,je(n.left)+n.operator+je(n.right))}case rt.ASTType.IsaExpression:{let n=t;return at(t,je(n.left)+n.operator+je(n.right))}case rt.ASTType.ComparisonGroupExpression:{let n=t,r=n.expressions.map(s=>je(s)),i=[r[0]];for(let s=0;s<n.operators.length;s++)i.push(n.operators[s],r[s+1]);return at(t,i.join(" "))}case rt.ASTType.FunctionDeclaration:{let n=t,r="function",i=[];for(let s=0;s<n.parameters.length;s++){let o=n.parameters[s];if(o.type===rt.ASTType.Identifier){i.push(o.name);continue}let l=o;i.push(l.variable.name+"="+je(l.init))}return i.length>0&&(r+="("+i.join(",")+")"),at(t,r)}case rt.ASTType.ParenthesisExpression:return at(t,je(t.expression));case rt.ASTType.MemberExpression:{let n=t;return at(t,je(n.base)+"."+n.identifier.name)}case rt.ASTType.IndexExpression:{let n=t;return(0,gR.isValidIdentifierLiteral)(n.index)?at(t,je(n.base)+"."+n.index.value.toString()):at(t,je(n.base)+"["+je(n.index)+"]")}case rt.ASTType.CallExpression:{let n=t,r=je(n.base),i=[];for(let s=0;s<n.arguments.length;s++){let o=n.arguments[s];i.push(je(o))}return i.length>0&&(r+="("+i.join(",")+")"),at(t,r)}case rt.ASTType.NegationExpression:case rt.ASTType.BinaryNegatedExpression:case rt.ASTType.UnaryExpression:{let n=t;return n.operator==null?at(t,je(n.argument)):n.operator==="@"?at(t,n.operator+je(n.argument)):at(t,n.operator+" "+je(n.argument))}case rt.ASTType.Identifier:return at(t,t.name);case rt.ASTType.NumericLiteral:case rt.ASTType.StringLiteral:case rt.ASTType.NilLiteral:return at(t,t.raw.toString());case rt.ASTType.MapConstructorExpression:{let n=t,r=[];for(let i=0;i<n.fields.length;i++){let s=n.fields[i];r.push(je(s.key)+":"+je(s.value))}return at(t,"{"+r.join(",")+"}")}case rt.ASTType.ListConstructorExpression:{let n=t,r=[];for(let i=0;i<n.fields.length;i++){let s=n.fields[i];r.push(je(s.value))}return at(t,"["+r.join(",")+"]")}case rt.ASTType.SliceExpression:{let n=t;return at(t,je(n.base)+"["+je(n.left)+":"+je(n.right)+"]")}}return console.warn(`Unexpected ast type ${t.type} in hash handler!`),at(t,"")}function bR(t){return je(t)}cc.createExpressionId=bR});var rs=T(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.Markers=void 0;var vR;(function(t){t.start="/**",t.nostart="/***",t.delim="*",t.end="*/"})(vR=vo.Markers||(vo.Markers={}))});var fn=T(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.rewireSpecs=Ve.rewireSource=Ve.seedTokens=Ve.seedSpec=Ve.seedBlock=Ve.splitLines=Ve.splitSpace=Ve.splitCR=Ve.hasCR=Ve.isSpace=void 0;function _R(t){return/^\s+$/.test(t)}Ve.isSpace=_R;function wR(t){return/\r$/.test(t)}Ve.hasCR=wR;function xR(t){let e=t.match(/\r+$/);return e==null?["",t]:[t.slice(-e[0].length),t.slice(0,-e[0].length)]}Ve.splitCR=xR;function SR(t){let e=t.match(/^\s+/);return e==null?["",t]:[t.slice(0,e[0].length),t.slice(e[0].length)]}Ve.splitSpace=SR;function kR(t){return t.split(/\n/)}Ve.splitLines=kR;function TR(t={}){return Object.assign({description:"",tags:[],source:[],problems:[]},t)}Ve.seedBlock=TR;function IR(t={}){return Object.assign({tag:"",name:"",type:"",optional:!1,description:"",problems:[],source:[]},t)}Ve.seedSpec=IR;function ER(t={}){return Object.assign({start:"",delimiter:"",postDelimiter:"",tag:"",postTag:"",name:"",postName:"",type:"",postType:"",description:"",end:"",lineEnd:""},t)}Ve.seedTokens=ER;function CR(t){let e=t.source.reduce((n,r)=>n.set(r.number,r),new Map);for(let n of t.tags)n.source=n.source.map(r=>e.get(r.number));return t}Ve.rewireSource=CR;function RR(t){let e=t.tags.reduce((n,r)=>r.source.reduce((i,s)=>i.set(s.number,s),n),new Map);return t.source=t.source.map(n=>e.get(n.number)||n),t}Ve.rewireSpecs=RR});var $S=T(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});var PR=/^@\S+/;function AR({fence:t="```"}={}){let e=OR(t),n=(r,i)=>e(r)?!i:i;return function(i){let s=[[]],o=!1;for(let l of i)PR.test(l.tokens.description)&&!o?s.push([l]):s[s.length-1].push(l),o=n(l.tokens.description,o);return s}}Dm.default=AR;function OR(t){return typeof t=="string"?e=>e.split(t).length%2===0:t}});var BS=T(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});var DR=rs(),_o=fn();function jR({startLine:t=0,markers:e=DR.Markers}={}){let n=null,r=t;return function(s){let o=s,l=(0,_o.seedTokens)();if([l.lineEnd,o]=(0,_o.splitCR)(o),[l.start,o]=(0,_o.splitSpace)(o),n===null&&o.startsWith(e.start)&&!o.startsWith(e.nostart)&&(n=[],l.delimiter=o.slice(0,e.start.length),o=o.slice(e.start.length),[l.postDelimiter,o]=(0,_o.splitSpace)(o)),n===null)return r++,null;let c=o.trimRight().endsWith(e.end);if(l.delimiter===""&&o.startsWith(e.delim)&&!o.startsWith(e.end)&&(l.delimiter=e.delim,o=o.slice(e.delim.length),[l.postDelimiter,o]=(0,_o.splitSpace)(o)),c){let a=o.trimRight();l.end=o.slice(a.length-e.end.length),o=a.slice(0,-e.end.length)}if(l.description=o,n.push({number:r,source:s,tokens:l}),r++,c){let a=n.slice();return n=null,a}return null}}jm.default=jR});var US=T(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});var LR=fn();function MR({tokenizers:t}){return function(n){var r;let i=(0,LR.seedSpec)({source:n});for(let s of t)if(i=s(i),!((r=i.problems[i.problems.length-1])===null||r===void 0)&&r.critical)break;return i}}Lm.default=MR});var qm=T(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});function qR(){return t=>{let{tokens:e}=t.source[0],n=e.description.match(/\s*(@(\S+))(\s*)/);return n===null?(t.problems.push({code:"spec:tag:prefix",message:'tag should start with "@" symbol',line:t.source[0].number,critical:!0}),t):(e.tag=n[1],e.postTag=n[3],e.description=e.description.slice(n[0].length),t.tag=n[2],t)}}Mm.default=qR});var Nm=T(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});var FR=fn();function NR(t="compact"){let e=BR(t);return n=>{let r=0,i=[];for(let[l,{tokens:c}]of n.source.entries()){let a="";if(l===0&&c.description[0]!=="{")return n;for(let u of c.description)if(u==="{"&&r++,u==="}"&&r--,a+=u,r===0)break;if(i.push([c,a]),r===0)break}if(r!==0)return n.problems.push({code:"spec:type:unpaired-curlies",message:"unpaired curlies",line:n.source[0].number,critical:!0}),n;let s=[],o=i[0][0].postDelimiter.length;for(let[l,[c,a]]of i.entries())c.type=a,l>0&&(c.type=c.postDelimiter.slice(o)+a,c.postDelimiter=c.postDelimiter.slice(0,o)),[c.postType,c.description]=(0,FR.splitSpace)(c.description.slice(a.length)),s.push(c.type);return s[0]=s[0].slice(1),s[s.length-1]=s[s.length-1].slice(0,-1),n.type=e(s),n}}Fm.default=NR;var $R=t=>t.trim();function BR(t){return t==="compact"?e=>e.map($R).join(""):t==="preserve"?e=>e.join(`
|
95
|
+
return false;`);return Object.defineProperty(o,"name",{value:`selector_group_${t}`,writable:!1}),o.selectors=e,o}X.createSelectorGroup=En;function zC(t){return t.selectors}X.getSelectorsFromGroup=zC;var Cn;(function(t){t.BlockEndOfLine="BlockEndOfLine",t.AssignmentEndOfExpr="AssignmentEndOfExpr",t.AssignmentShorthand="AssignmentShorthand",t.AssignmentCommandArgs="AssignmentCommandArgs",t.ReturnStatementEnd="ReturnStatementEnd",t.FunctionDeclarationArgEnd="FunctionDeclarationArgEnd",t.ComparisonOperators="ComparisonOperators",t.MultiDivOperators="MultiDivOperators",t.CallArgsEnd="CallArgsEnd"})(Cn=X.SelectorGroupType||(X.SelectorGroupType={}));X.SelectorGroups={BlockEndOfLine:En(Cn.AssignmentEndOfExpr,[X.Selectors.EndOfLine,X.Selectors.Comment]),AssignmentEndOfExpr:En(Cn.AssignmentEndOfExpr,[X.Selectors.EndOfFile,X.Selectors.EndOfLine,X.Selectors.Else,X.Selectors.Comment]),AssignmentShorthand:En(Cn.AssignmentShorthand,[X.Selectors.AddShorthand,X.Selectors.SubtractShorthand,X.Selectors.MultiplyShorthand,X.Selectors.DivideShorthand,X.Selectors.PowerShorthand,X.Selectors.ModuloShorthand]),AssignmentCommandArgs:En(Cn.AssignmentCommandArgs,[X.Selectors.ArgumentSeperator,X.Selectors.EndOfLine,X.Selectors.EndOfFile]),ReturnStatementEnd:En(Cn.ReturnStatementEnd,[X.Selectors.EndOfLine,X.Selectors.Else,X.Selectors.Comment]),FunctionDeclarationArgEnd:En(Cn.FunctionDeclarationArgEnd,[X.Selectors.RParenthesis,X.Selectors.EndOfFile,X.Selectors.EndOfLine]),ComparisonOperators:En(Cn.ComparisonOperators,[X.Selectors.Equal,X.Selectors.NotEqual,X.Selectors.Greater,X.Selectors.GreaterEqual,X.Selectors.Lesser,X.Selectors.LessEqual]),MultiDivOperators:En(Cn.MultiDivOperators,[X.Selectors.Times,X.Selectors.Divide,X.Selectors.Mod]),CallArgsEnd:En(Cn.CallArgsEnd,[X.Selectors.ArgumentSeperator,X.Selectors.RParenthesis])}});var Sm=T(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});sc.Stack=void 0;var xm=class{constructor(){this._items=[],this._last=null,this._default=null}setDefault(e){this._default=e}push(e){return this._items.push(this._last=e)}pop(){switch(this._items.length){case 0:return this._default;case 1:return this._last=null,this._items.pop()}let e=this._items.pop();return this._last=this._items[this._items.length-1],e}peek(){return this._last||this._default}};sc.Stack=xm});var Rm=T(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.PendingWhile=De.isPendingWhile=De.PendingIf=De.isPendingIf=De.PendingFunction=De.isPendingFunction=De.PendingFor=De.isPendingFor=De.PendingChunk=De.isPendingChunk=De.PendingBlockType=void 0;var pn;(function(t){t[t.Chunk=0]="Chunk",t[t.For=1]="For",t[t.Function=2]="Function",t[t.If=3]="If",t[t.While=4]="While"})(pn=De.PendingBlockType||(De.PendingBlockType={}));var zr=class{constructor(e,n){this.block=e,this.body=[],this.type=n,this.onComplete=null}complete(e){var n;(n=this.onComplete)===null||n===void 0||n.call(this,this)}};function GC(t){return t.type===pn.Chunk}De.isPendingChunk=GC;var km=class extends zr{constructor(e){super(e,pn.Chunk)}complete(e){this.block.body=this.body,this.block.end=e.end,super.complete(e)}};De.PendingChunk=km;function KC(t){return t.type===pn.For}De.isPendingFor=KC;var Tm=class extends zr{constructor(e){super(e,pn.For)}complete(e){this.block.body=this.body,this.block.end=e.end,super.complete(e)}};De.PendingFor=Tm;function YC(t){return t.type===pn.Function}De.isPendingFunction=YC;var Im=class extends zr{constructor(e){super(e,pn.Function)}complete(e){this.block.body=this.body,this.block.end=e.end,super.complete(e)}};De.PendingFunction=Im;function QC(t){return t.type===pn.If}De.isPendingIf=QC;var Em=class extends zr{constructor(e,n){super(e,pn.If),this.currentClause=n}next(e){this.currentClause.body=this.body,this.currentClause.end=e.end,this.block.clauses.push(this.currentClause),super.complete(e),this.body=[]}complete(e){this.body.length>0&&this.next(e),this.block.end=e.end,super.complete(e)}};De.PendingIf=Em;function JC(t){return t.type===pn.While}De.isPendingWhile=JC;var Cm=class extends zr{constructor(e){super(e,pn.While)}complete(e){this.block.body=this.body,this.block.end=e.end,super.complete(e)}};De.PendingWhile=Cm});var FS=T(yo=>{"use strict";var qS=yo&&yo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(yo,"__esModule",{value:!0});var XC=qS(ff()),_r=mr(),Rn=gm(),ZC=qS(vm()),eR=Ll(),_t=Ki(),Wn=Qi(),Rt=Ji(),B=wm(),tR=Sm(),Pn=Rm(),Pm=class{constructor(e,n={}){let r=this;r.content=e,r.backpatches=new tR.Stack,r.statementErrors=[],r.lexer=n.lexer||new XC.default(e,{unsafe:n.unsafe,tabWidth:n.tabWidth}),r.token=null,r.previousToken=null,r.lines={},r.scopes=[],r.currentScope=null,r.currentAssignment=null,r.outerScopes=[],r.literals=[],r.validator=n.validator||new ZC.default,r.astProvider=n.astProvider||new Rn.ASTProvider,r.unsafe=n.unsafe||!1,r.errors=[]}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,n){let r=this.token;return this.token.type!==e?(this.raise(`got ${r} where ${e} is required`,new Rt.Range(n||r.start,r.end)),null):(this.next(),r)}requireToken(e,n){let r=this.token;return e(r)?(this.next(),r):(this.raise(`got ${r} where "${(0,B.getSelectorValue)(e)}" is required`,new Rt.Range(n||r.start,r.end)),null)}requireTokenOfAny(e,n){let r=this.token;return e(r)?(this.next(),r):(this.raise(`got ${r} where any of ${(0,B.getSelectorsFromGroup)(e).map(i=>`"${(0,B.getSelectorValue)(i)}"`).join(", ")} is required`,new Rt.Range(n||r.start,r.end)),null)}addItemToLines(e){let n=this.lines,r=e.end.line;for(let i=e.start.line;i<=r;i++){let s=n[i];s?s.push(e):n[i]=[e]}}skipNewlines(){let e=this,n=0;for(;;){if(B.Selectors.Comment(e.token)){let r=e.astProvider.comment({value:e.token.value,start:e.token.start,end:e.token.end,scope:e.currentScope});e.addItemToLines(r),e.backpatches.peek().body.push(r)}else if(B.Selectors.EndOfLine(e.token))n++;else break;e.next()}return n}pushScope(e){let n=this;n.currentScope!==null&&(n.scopes.push(e),n.outerScopes.push(n.currentScope)),n.currentScope=e}popScope(){let e=this;e.currentScope=e.outerScopes.pop()}tryToRecover(){let e=this,n=e.statementErrors[0];if(e.errors.push(n),!e.unsafe)throw n;for(e.lexer.recoverFromSnapshot(),e.next();e.token.type!==_r.TokenType.EOL&&e.token.type!==_r.TokenType.EOF;e.next());}finishRemaingScopes(){let e=this,n=e.backpatches.pop();for(;!(0,Pn.isPendingChunk)(n);){let r=e.raise(`found open block ${n.block.type}`,new Rt.Range(n.block.start,n.block.start));if(n.complete(e.previousToken),e.errors.push(r),!e.unsafe)throw r;n=e.backpatches.pop()}}parseChunk(){let e=this;e.next();let n=e.token.start,r=e.astProvider.chunk({start:n,end:null}),i=new Pn.PendingChunk(r);for(e.backpatches.setDefault(i),e.pushScope(r);!B.Selectors.EndOfFile(e.token)&&(e.skipNewlines(),!B.Selectors.EndOfFile(e.token));)e.lexer.recordSnapshot(),e.statementErrors=[],e.parseStatement(),e.statementErrors.length>0&&e.tryToRecover();return e.finishRemaingScopes(),e.popScope(),i.complete(e.token),r.literals=e.literals,r.scopes=e.scopes,r.lines=e.lines,r}parseStatement(){let e=this;if(_r.TokenType.Keyword===e.token.type&&_t.Keyword.Not!==e.token.value){e.parseKeyword();return}let n=e.backpatches.peek(),r=e.parseAssignment();r.end!==null&&e.addItemToLines(r),n.body.push(r)}parseKeyword(){let e=this;switch(e.token.value){case _t.Keyword.Return:{let r=e.backpatches.peek();e.next();let i=e.parseReturnStatement();i.end!==null&&e.addItemToLines(i),r.body.push(i);return}case _t.Keyword.If:{e.next(),e.parseIfStatement();return}case _t.Keyword.ElseIf:{e.next(),e.nextIfClause(Rn.ASTType.ElseifClause);return}case _t.Keyword.Else:{e.next(),e.nextIfClause(Rn.ASTType.ElseClause);return}case _t.Keyword.While:{e.next(),e.parseWhileStatement();return}case _t.Keyword.For:{e.next(),e.parseForStatement();return}case _t.Keyword.EndFunction:{e.next(),e.finalizeFunction();return}case _t.Keyword.EndFor:{e.next(),e.finalizeForStatement();return}case _t.Keyword.EndWhile:{e.next(),e.finalizeWhileStatement();return}case _t.Keyword.EndIf:{e.next(),e.nextIfClause(null);return}case _t.Keyword.Continue:{let r=e.backpatches.peek();e.next();let i=e.astProvider.continueStatement({start:e.previousToken.start,end:e.previousToken.end,scope:e.currentScope});e.addItemToLines(i),r.body.push(i);return}case _t.Keyword.Break:{let r=e.backpatches.peek();e.next();let i=e.astProvider.breakStatement({start:e.previousToken.start,end:e.previousToken.end,scope:e.currentScope});e.addItemToLines(i),r.body.push(i);return}}e.raise(`unexpected keyword ${e.token} at start of line`,new Rt.Range(e.token.start,e.token.end))}parseShortcutStatement(){let e=this;if(_r.TokenType.Keyword===e.token.type&&_t.Keyword.Not!==e.token.value)switch(e.token.value){case _t.Keyword.Return:return e.next(),e.parseReturnStatement();case _t.Keyword.Continue:return e.next(),e.astProvider.continueStatement({start:e.previousToken.start,end:e.previousToken.end,scope:e.currentScope});case _t.Keyword.Break:return e.next(),e.astProvider.breakStatement({start:e.previousToken.start,end:e.previousToken.end,scope:e.currentScope});default:return e.raise(`unexpected keyword ${e.token} in shorthand statement`,new Rt.Range(e.token.start,e.token.end)),e.parseInvalidCode()}return e.parseAssignment()}parseAssignment(){let e=this,n=e.currentScope,r=e.token.start,i=e.parseExpr(null,!0,!0);if(B.SelectorGroups.AssignmentEndOfExpr(e.token))return i;if(B.Selectors.Assign(e.token)){e.next();let o=e.astProvider.assignmentStatement({variable:i,init:null,start:r,end:null,scope:n}),l=e.currentAssignment;if(e.currentAssignment=o,o.init=e.parseExpr(o),o.end=e.previousToken.end,o.init.type===Rn.ASTType.FunctionDeclaration){let c=e.backpatches.peek();c.onComplete=a=>o.end=a.block.end}return e.currentAssignment=l,n.assignments.push(o),o}else if(B.SelectorGroups.AssignmentShorthand(e.token)){let o=e.token;e.next();let l=e.astProvider.assignmentStatement({variable:i,init:null,start:r,end:null,scope:n}),c=e.currentAssignment;e.currentAssignment=l;let a=e.token.start,u=o.value.charAt(0),d=e.parseExpr(l),p=e.astProvider.parenthesisExpression({start:d.start,end:d.end,expression:d});return l.init=e.astProvider.binaryExpression({operator:u,left:i.clone(),right:p,start:a,end:e.previousToken.end,scope:n}),l.end=e.previousToken.end,e.currentAssignment=c,n.assignments.push(l),l}let s=[];for(;!B.Selectors.EndOfFile(e.token);){let o=e.parseExpr(null);if(s.push(o),B.SelectorGroups.BlockEndOfLine(e.token)||B.Selectors.Else(e.token))break;if(B.Selectors.ArgumentSeperator(e.token)){e.next(),e.skipNewlines();continue}let l=e.requireTokenOfAny(B.SelectorGroups.AssignmentCommandArgs,r);if(B.Selectors.EndOfLine(l)||B.Selectors.EndOfFile(l))break}return s.length===0?e.astProvider.callStatement({expression:i,start:r,end:e.previousToken.end,scope:n}):e.astProvider.callStatement({expression:e.astProvider.callExpression({base:i,arguments:s,start:r,end:e.previousToken.end,scope:n}),start:r,end:e.previousToken.end,scope:n})}parseReturnStatement(){let e=this,n=e.currentScope,r=e.previousToken.start,i=null,s=e.astProvider.returnStatement({argument:null,start:r,end:null,scope:n});if(B.SelectorGroups.ReturnStatementEnd(e.token))s.end=e.previousToken.end;else{if(i=e.parseExpr(s),i.type===Rn.ASTType.FunctionDeclaration){let o=e.backpatches.peek();o.onComplete=l=>s.end=l.block.end}else s.end=e.previousToken.end;s.argument=i}return n.returns.push(s),s}parseIfStatement(){let e=this,n=e.previousToken.start,r=e.parseExpr(null);if(e.addItemToLines(r),e.requireToken(B.Selectors.Then,n),!B.SelectorGroups.BlockEndOfLine(e.token)){e.parseIfShortcutStatement(r,n);return}let i=e.astProvider.ifStatement({clauses:[],start:n,end:null,scope:e.currentScope}),s=e.astProvider.ifClause({condition:r,start:n,end:e.token.end,scope:e.currentScope}),o=new Pn.PendingIf(i,s);e.backpatches.push(o)}nextIfClause(e){let n=this,r=n.backpatches.peek();if(!(0,Pn.isPendingIf)(r)){n.raise("no matching open if block",new Rt.Range(n.token.start,n.token.end));return}switch(r.next(n.previousToken),e){case Rn.ASTType.ElseifClause:{let i=n.token.start,s=n.parseExpr(null);n.requireToken(B.Selectors.Then,i),r.currentClause=n.astProvider.elseifClause({condition:s,start:i,end:null,scope:n.currentScope});break}case Rn.ASTType.ElseClause:{let i=n.token.start;r.currentClause=n.astProvider.elseClause({start:i,end:null,scope:n.currentScope});break}}e===null&&(r.complete(n.previousToken),n.addItemToLines(r.block),n.backpatches.pop(),n.backpatches.peek().body.push(r.block))}parseIfShortcutStatement(e,n){let r=this,i=[],s=r.backpatches.peek(),o=r.astProvider.ifShortcutStatement({clauses:i,start:n,end:null,scope:r.currentScope}),l=r.parseShortcutStatement();if(i.push(r.astProvider.ifShortcutClause({condition:e,body:[l],start:n,end:r.token.end,scope:r.currentScope})),B.Selectors.Else(r.token)){r.next();let c=r.token.start,a=r.parseShortcutStatement();i.push(r.astProvider.elseShortcutClause({body:[a],start:c,end:r.token.end,scope:r.currentScope}))}o.end=r.token.end,r.addItemToLines(o),s.body.push(o)}parseWhileStatement(){let e=this,n=e.previousToken.start,r=e.parseExpr(null);if(!r){e.raise("while requires a condition",new Rt.Range(n,e.token.end));return}if(!B.SelectorGroups.BlockEndOfLine(e.token))return e.parseWhileShortcutStatement(r,n);let i=e.astProvider.whileStatement({condition:r,start:n,end:null,scope:e.currentScope}),s=new Pn.PendingWhile(i);e.backpatches.push(s),s.onComplete=o=>{e.addItemToLines(o.block),e.backpatches.pop(),e.backpatches.peek().body.push(o.block)}}finalizeWhileStatement(){let e=this,n=e.backpatches.peek();if(!(0,Pn.isPendingWhile)(n)){e.raise("no matching open while block",new Rt.Range(e.token.start,e.token.end));return}n.complete(e.previousToken)}parseWhileShortcutStatement(e,n){let r=this,i=r.backpatches.peek(),s=r.parseShortcutStatement(),o=r.astProvider.whileStatement({condition:e,body:[s],start:n,end:r.previousToken.end,scope:r.currentScope});r.addItemToLines(o),i.body.push(o)}parseForStatement(){let e=this,n=e.currentScope,r=e.previousToken.start,i=e.parseIdentifier(),s=e.astProvider.assignmentStatement({variable:i,init:e.astProvider.unknown({start:i.start,end:i.end,scope:n}),start:i.start,end:i.end,scope:n}),o=e.astProvider.assignmentStatement({variable:e.astProvider.identifier({name:`__${i.name}_idx`,start:i.start,end:i.end,scope:n}),init:e.astProvider.literal(_r.TokenType.NumericLiteral,{value:0,raw:"0",start:i.start,end:i.end,scope:n}),start:i.start,end:i.end,scope:n});n.assignments.push(s,o),e.requireToken(B.Selectors.In,r);let l=e.parseExpr(null);if(!l){e.raise("sequence expression expected for 'for' loop",new Rt.Range(r,e.token.end));return}if(!B.SelectorGroups.BlockEndOfLine(e.token))return e.parseForShortcutStatement(i,l,r);let c=e.astProvider.forGenericStatement({variable:i,iterator:l,start:r,end:e.previousToken.end,scope:n}),a=new Pn.PendingFor(c);e.backpatches.push(a)}finalizeForStatement(){let e=this,n=e.backpatches.peek();if(!(0,Pn.isPendingFor)(n)){e.raise("no matching open for block",new Rt.Range(e.token.start,e.token.end));return}n.complete(e.previousToken),e.addItemToLines(n.block),e.backpatches.pop(),e.backpatches.peek().body.push(n.block)}parseForShortcutStatement(e,n,r){let i=this,s=i.backpatches.peek(),o=i.parseShortcutStatement(),l=i.astProvider.forGenericStatement({variable:e,iterator:n,body:[o],start:r,end:i.previousToken.end,scope:i.currentScope});i.addItemToLines(l),s.body.push(l)}parseExpr(e,n=!1,r=!1){return this.parseFunctionDeclaration(e,n,r)}parseFunctionDeclaration(e,n=!1,r=!1){let i=this;if(!B.Selectors.Function(i.token))return i.parseOr(n,r);i.next();let s=i.previousToken.start,o=i.astProvider.functionStatement({start:s,end:null,scope:i.currentScope,parent:i.outerScopes[i.outerScopes.length-1],assignment:i.currentAssignment}),l=[];if(i.pushScope(o),!B.SelectorGroups.BlockEndOfLine(i.token)){for(i.requireToken(B.Selectors.LParenthesis,s);!B.SelectorGroups.FunctionDeclarationArgEnd(i.token);){let a=i.parseIdentifier(),u=a.start;if(i.consume(B.Selectors.Assign)){let d=i.parseExpr(null);if(d instanceof Rn.ASTLiteral){let p=i.astProvider.assignmentStatement({variable:a,init:d,start:u,end:i.previousToken.end,scope:i.currentScope});i.currentScope.assignments.push(p),l.push(p)}else i.raise("parameter default value must be a literal value",new Rt.Range(u,i.token.end)),l.push(i.astProvider.invalidCodeExpression({start:u,end:i.previousToken.end}))}else{let d=i.astProvider.assignmentStatement({variable:a,init:i.astProvider.unknown({start:u,end:i.previousToken.end,scope:i.currentScope}),start:u,end:i.previousToken.end,scope:i.currentScope});i.currentScope.assignments.push(d),l.push(a)}if(B.Selectors.RParenthesis(i.token))break;if(i.requireToken(B.Selectors.ArgumentSeperator,s),B.Selectors.RParenthesis(i.token)){i.raise("expected argument instead received right parenthesis",new Rt.Range(i.previousToken.end,i.previousToken.end));break}}i.requireToken(B.Selectors.RParenthesis,s)}o.parameters=l;let c=new Pn.PendingFunction(o);return i.backpatches.push(c),c.onComplete=a=>{e!==null?(e.end=a.block.end,i.addItemToLines(e)):i.addItemToLines(a.block)},o}finalizeFunction(){let e=this,n=e.backpatches.peek();if(!(0,Pn.isPendingFunction)(n)){e.raise("no matching open function block",new Rt.Range(e.token.start,e.token.end));return}e.popScope(),n.complete(e.previousToken),e.backpatches.pop()}parseOr(e=!1,n=!1){let r=this,i=r.token.start,o=r.parseAnd(e,n);for(;B.Selectors.Or(r.token);){r.next(),r.skipNewlines();let l=r.parseAnd();o=r.astProvider.logicalExpression({operator:Wn.Operator.Or,left:o,right:l,start:i,end:r.previousToken.end,scope:r.currentScope})}return o}parseAnd(e=!1,n=!1){let r=this,i=r.token.start,o=r.parseNot(e,n);for(;B.Selectors.And(r.token);){r.next(),r.skipNewlines();let l=r.parseNot();o=r.astProvider.logicalExpression({operator:Wn.Operator.And,left:o,right:l,start:i,end:r.previousToken.end,scope:r.currentScope})}return o}parseNot(e=!1,n=!1){let r=this,i=r.token.start;if(B.Selectors.Not(r.token)){r.next(),r.skipNewlines();let s=r.parseIsa();return r.astProvider.unaryExpression({operator:Wn.Operator.Not,argument:s,start:i,end:r.previousToken.end,scope:r.currentScope})}return r.parseIsa(e,n)}parseIsa(e=!1,n=!1){let r=this,i=r.token.start,s=r.parseComparisons(e,n);if(B.Selectors.Isa(r.token)){r.next(),r.skipNewlines();let o=r.parseComparisons();return r.astProvider.isaExpression({operator:Wn.Operator.Isa,left:s,right:o,start:i,end:r.previousToken.end,scope:r.currentScope})}return s}parseComparisons(e=!1,n=!1){let r=this,i=r.token.start,s=r.parseAddSub(e,n);if(!B.SelectorGroups.ComparisonOperators(r.token))return s;let o=[s],l=[];do{let c=r.token;r.next(),r.skipNewlines();let a=r.parseAddSub();l.push(c.value),o.push(a)}while(B.SelectorGroups.ComparisonOperators(r.token));return l.length===1?r.astProvider.binaryExpression({operator:l[0],left:o[0],right:o[1],start:i,end:r.previousToken.end,scope:r.currentScope}):r.astProvider.comparisonGroupExpression({operators:l,expressions:o,start:i,end:r.previousToken.end,scope:r.currentScope})}parseAddSub(e=!1,n=!1){let r=this,i=r.token.start,o=r.parseMultDiv(e,n);for(;B.Selectors.Plus(r.token)||B.Selectors.Minus(r.token)&&(!n||!r.token.afterSpace||r.lexer.isAtWhitespace());){let l=r.token;r.next(),r.skipNewlines();let c=r.parseMultDiv();o=r.astProvider.binaryExpression({operator:l.value,left:o,right:c,start:i,end:r.previousToken.end,scope:r.currentScope})}return o}parseMultDiv(e=!1,n=!1){let r=this,i=r.token.start,o=r.parseUnaryMinus(e,n);for(;B.SelectorGroups.MultiDivOperators(r.token);){let l=r.token;r.next(),r.skipNewlines();let c=r.parseUnaryMinus();o=r.astProvider.binaryExpression({operator:l.value,left:o,right:c,start:i,end:r.previousToken.end,scope:r.currentScope})}return o}parseUnaryMinus(e=!1,n=!1){let r=this;if(!B.Selectors.Minus(r.token))return r.parseNew(e,n);let i=r.token.start;r.next(),r.skipNewlines();let s=r.parseNew();return s instanceof Rn.ASTNumericLiteral||s instanceof Rn.ASTBooleanLiteral?(s.negated=!0,s):r.astProvider.unaryExpression({operator:Wn.Operator.Minus,argument:s,start:i,end:r.previousToken.end,scope:r.currentScope})}parseNew(e=!1,n=!1){let r=this;if(!B.Selectors.New(r.token))return r.parseAddressOf(e,n);let i=r.token.start;r.next(),r.skipNewlines();let s=r.parseNew();return r.astProvider.unaryExpression({operator:Wn.Operator.New,argument:s,start:i,end:r.previousToken.end,scope:r.currentScope})}parseAddressOf(e=!1,n=!1){let r=this;if(!B.Selectors.Reference(r.token))return r.parsePower(e,n);let i=r.token.start;r.next(),r.skipNewlines();let s=r.parsePower();return r.astProvider.unaryExpression({operator:Wn.Operator.Reference,argument:s,start:i,end:r.previousToken.end,scope:r.currentScope})}parsePower(e=!1,n=!1){let r=this,i=r.token.start,s=r.parseCallExpr(e,n);if(B.Selectors.Power(r.token)){r.next(),r.skipNewlines();let o=r.parseCallExpr();return r.astProvider.binaryExpression({operator:Wn.Operator.Power,left:s,right:o,start:i,end:r.previousToken.end,scope:r.currentScope})}return s}parseCallExpr(e=!1,n=!1){let r=this,i=r.token.start,s=r.parseMap(e,n);for(;!B.Selectors.EndOfFile(r.token);)if(B.Selectors.MemberSeperator(r.token)){r.next(),r.skipNewlines();let o=r.parseIdentifier();s=r.astProvider.memberExpression({base:s,indexer:Wn.Operator.Member,identifier:o,start:i,end:r.previousToken.end,scope:r.currentScope})}else if(B.Selectors.SLBracket(r.token)&&!r.token.afterSpace){if(r.next(),r.skipNewlines(),B.Selectors.SliceSeperator(r.token)){let o=r.astProvider.emptyExpression({start:r.previousToken.start,end:r.previousToken.end,scope:r.currentScope});r.next(),r.skipNewlines();let l=B.Selectors.SRBracket(r.token)?r.astProvider.emptyExpression({start:r.previousToken.start,end:r.previousToken.end,scope:r.currentScope}):r.parseExpr(null);s=r.astProvider.sliceExpression({base:s,left:o,right:l,start:i,end:r.token.end,scope:r.currentScope})}else{let o=r.parseExpr(null);if(B.Selectors.SliceSeperator(r.token)){r.next(),r.skipNewlines();let l=B.Selectors.SRBracket(r.token)?r.astProvider.emptyExpression({start:r.previousToken.start,end:r.previousToken.end,scope:r.currentScope}):r.parseExpr(null);s=r.astProvider.sliceExpression({base:s,left:o,right:l,start:i,end:r.token.end,scope:r.currentScope})}else s=r.astProvider.indexExpression({base:s,index:o,start:i,end:r.token.end,scope:r.currentScope})}r.requireToken(B.Selectors.SRBracket,i)}else if(B.Selectors.LParenthesis(r.token)&&(!e||!r.token.afterSpace)){let o=r.parseCallArgs();s=r.astProvider.callExpression({base:s,arguments:o,start:i,end:r.previousToken.end,scope:r.currentScope})}else break;return s}parseCallArgs(){let e=this,n=[];if(B.Selectors.LParenthesis(e.token))if(e.next(),B.Selectors.RParenthesis(e.token))e.next();else for(;!B.Selectors.EndOfFile(e.token);){e.skipNewlines();let r=e.parseExpr(null);if(n.push(r),e.skipNewlines(),B.Selectors.RParenthesis(e.requireTokenOfAny(B.SelectorGroups.CallArgsEnd,r.start)))break}return n}parseMap(e=!1,n=!1){let r=this;if(!B.Selectors.CLBracket(r.token))return r.parseList(e,n);let i=r.currentScope,s=r.token.start,o=[],l=r.astProvider.mapConstructorExpression({fields:o,start:s,end:null,scope:i});if(r.next(),B.Selectors.CRBracket(r.token))r.next();else for(r.skipNewlines();!B.Selectors.EndOfFile(r.token);){if(B.Selectors.CRBracket(r.token)){r.next();break}let c=r.astProvider.mapKeyString({key:null,value:null,start:r.token.start,end:null,scope:i});if(c.key=r.parseExpr(null),r.requireToken(B.Selectors.MapKeyValueSeperator),r.skipNewlines(),r.currentAssignment){let a=r.astProvider.assignmentStatement({variable:r.astProvider.indexExpression({index:c.key,base:r.currentAssignment.variable,start:c.start,end:r.token.end,scope:i}),init:null,start:c.start,end:null}),u=r.currentAssignment;r.currentAssignment=a,c.value=r.parseExpr(c),r.currentAssignment=u,a.init=c.value,a.end=r.previousToken.end,i.assignments.push(a)}else c.value=r.parseExpr(c);if(c.end=r.previousToken.end,o.push(c),B.Selectors.MapSeperator(r.token)&&(r.next(),r.skipNewlines()),B.Selectors.CRBracket(r.token)){r.next();break}}return l.end=r.token.start,l}parseList(e=!1,n=!1){let r=this;if(!B.Selectors.SLBracket(r.token))return r.parseQuantity(e,n);let i=r.currentScope,s=r.token.start,o=[],l=r.astProvider.listConstructorExpression({fields:o,start:s,end:null,scope:i});if(r.next(),B.Selectors.SRBracket(r.token))r.next();else for(r.skipNewlines();!B.Selectors.EndOfFile(r.token);){if(B.Selectors.SRBracket(r.token)){r.next();break}let c=r.astProvider.listValue({value:null,start:r.token.start,end:null,scope:i});if(r.currentAssignment){let a=r.astProvider.assignmentStatement({variable:r.astProvider.indexExpression({index:r.astProvider.literal(_r.TokenType.NumericLiteral,{value:o.length,raw:`${o.length}`,start:s,end:r.token.end,scope:i}),base:r.currentAssignment.variable,start:null,end:null,scope:i}),init:null,start:null,end:null}),u=r.currentAssignment,d=r.token;r.currentAssignment=u,c.value=r.parseExpr(c),r.currentAssignment=u,a.variable.start=d.start,a.variable.end=r.previousToken.end,a.init=c.value,a.start=c.start,a.end=r.previousToken.end,i.assignments.push(a)}else c.value=r.parseExpr(c);if(c.end=r.previousToken.end,o.push(c),B.Selectors.MapSeperator(r.token)&&(r.next(),r.skipNewlines()),B.Selectors.SRBracket(r.token)){r.next();break}}return l.end=r.token.start,l}parseQuantity(e=!1,n=!1){let r=this;if(!B.Selectors.LParenthesis(r.token))return r.parseAtom(e,n);let i=r.token.start;r.next(),r.skipNewlines();let s=r.parseExpr(null);return r.requireToken(B.Selectors.RParenthesis,i),r.astProvider.parenthesisExpression({expression:s,start:i,end:r.previousToken.end,scope:r.currentScope})}parseAtom(e=!1,n=!1){let r=this;return r.validator.isLiteral(r.token.type)?r.parseLiteral():r.isType(_r.TokenType.Identifier)?r.parseIdentifier():(r.raise(`got ${r.token} where number, string, or identifier is required`,new Rt.Range(r.token.start,r.token.end)),r.parseInvalidCode())}parseLiteral(){let e=this,n=e.token.start,r=e.token.type,i=e.astProvider.literal(r,{value:e.token.value,raw:e.token.raw,start:n,end:e.token.end,scope:e.currentScope});return e.literals.push(i),e.next(),i}parseIdentifier(){let e=this,n=e.token.start,r=e.token.end,i=e.requireType(_r.TokenType.Identifier);return i===null?e.parseInvalidCode():(e.currentScope.namespaces.add(i.value),e.astProvider.identifier({name:i.value,start:n,end:r,scope:e.currentScope}))}parseInvalidCode(){let e=this,n=e.token.start,r=e.token.end,i=e.astProvider.invalidCodeExpression({start:n,end:r});return e.next(),i}raise(e,n){let r=this,i=new eR.ParserException(e,n);return r.statementErrors.push(i),i}};yo.default=Pm});var pe=T(fe=>{"use strict";var nR=fe&&fe.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),hn=fe&&fe.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&nR(e,t,n)},oc=fe&&fe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fe,"__esModule",{value:!0});fe.ASTRange=fe.ASTPosition=fe.ParserValidatorm=fe.Parser=fe.LexerValidator=fe.Lexer=void 0;var rR=ff();Object.defineProperty(fe,"Lexer",{enumerable:!0,get:function(){return oc(rR).default}});hn(mr(),fe);var iR=rf();Object.defineProperty(fe,"LexerValidator",{enumerable:!0,get:function(){return oc(iR).default}});var sR=FS();Object.defineProperty(fe,"Parser",{enumerable:!0,get:function(){return oc(sR).default}});hn(gm(),fe);var oR=vm();Object.defineProperty(fe,"ParserValidatorm",{enumerable:!0,get:function(){return oc(oR).default}});hn(Rm(),fe);hn(Sm(),fe);hn(df(),fe);hn(jl(),fe);hn(Ll(),fe);hn(Ki(),fe);hn(af(),fe);hn(Qi(),fe);var aR=Gi();Object.defineProperty(fe,"ASTPosition",{enumerable:!0,get:function(){return aR.Position}});var lR=Ji();Object.defineProperty(fe,"ASTRange",{enumerable:!0,get:function(){return lR.Range}});hn(wm(),fe)});var bo=T(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});ac.isValidIdentifierLiteral=void 0;var cR=pe(),uR=t=>{if(t.type!==cR.ASTType.StringLiteral)return!1;let e=t.value.toString();return/^[_a-z][_a-z0-9]*$/i.test(e)};ac.isValidIdentifierLiteral=uR});var Am=T(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.getStringHashCode=wr.getHashCode=wr.rotateBits=void 0;function dR(t){return t>>1|t<<31}wr.rotateBits=dR;function pR(t,e=0){let n=t>>>0;return n=(n>>16^n)*73244475,n=(n>>16^n)*73244475,n=n>>16^n,(e<<5)-e+n|0}wr.getHashCode=pR;wr.getStringHashCode=function(){let t=new Map,e=n=>{let r,i;for(r=0,i=0;r<n.length;r++)i=Math.imul(31,i)+n.charCodeAt(r)|0;return i};return n=>{if(n.length===0)return 0;let r=t.get(n);if(r!==void 0)return r;let i=e(n);return t.set(n,i),i}}()});var NS=T(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});lc.createExpressionHash=void 0;var Re=pe(),Xe=Am(),hR=bo(),wt=(t,e)=>t.$$hash=e,fR=t=>{var e;return(e=t.$$hash)!=null?e:null};function Fe(t){let e=fR(t);if(e!==null)return e;let n=(0,Xe.getStringHashCode)(t.type);switch(t.type){case Re.ASTType.BinaryExpression:{let r=t;return n^=(0,Xe.getStringHashCode)(r.operator),n^=Fe(r.left),n^=Fe(r.right),wt(t,n)}case Re.ASTType.LogicalExpression:{let r=t;return n^=(0,Xe.getStringHashCode)(r.operator),n^=Fe(r.left),n^=Fe(r.right),wt(t,n)}case Re.ASTType.IsaExpression:{let r=t;return n^=(0,Xe.getStringHashCode)(r.operator),n^=Fe(r.left),n^=Fe(r.right),wt(t,n)}case Re.ASTType.ComparisonGroupExpression:{let r=t;for(let i=0;i<r.expressions.length;i++)n^=Fe(r.expressions[i]);for(let i=0;i<r.operators.length;i++)n^=(0,Xe.getStringHashCode)(r.operators[i]);return wt(t,n)}case Re.ASTType.FunctionDeclaration:{let r=t;n^=(0,Xe.getHashCode)(r.parameters.length);for(let i=0;i<r.parameters.length;i++){let s=r.parameters[i];if(s.type===Re.ASTType.Identifier){n^=(0,Xe.getStringHashCode)(s.name);continue}let o=s;n^=(0,Xe.getStringHashCode)(o.variable.name),n^=Fe(o.init)}return wt(t,n)}case Re.ASTType.ParenthesisExpression:return Fe(t.expression);case Re.ASTType.MemberExpression:{let r=t;if(r.base.type===Re.ASTType.Identifier){let i=r.base.name;if(i==="globals"||i==="locals"||i==="outer")return n=(0,Xe.getStringHashCode)(Re.ASTType.Identifier),n^=(0,Xe.getStringHashCode)(r.identifier.name),wt(t,n)}return n^=Fe(r.base),n^=Fe(r.identifier),wt(t,n)}case Re.ASTType.IndexExpression:{let r=t;if((0,hR.isValidIdentifierLiteral)(r.index)){if(r.base.type===Re.ASTType.Identifier){let s=r.base.name;if(s==="globals"||s==="locals"||s==="outer")return n=(0,Xe.getStringHashCode)(Re.ASTType.Identifier),n^=(0,Xe.getStringHashCode)(r.index.value.toString()),wt(t,n)}n=(0,Xe.getStringHashCode)(Re.ASTType.MemberExpression),n^=Fe(r.base);let i=(0,Xe.getStringHashCode)(Re.ASTType.Identifier);i^=(0,Xe.getStringHashCode)(r.index.value.toString()),n^=i}else n^=Fe(r.base),n^=Fe(r.index);return wt(t,n)}case Re.ASTType.CallExpression:{let r=t;n^=Fe(r.base),n^=(0,Xe.getHashCode)(r.arguments.length);for(let i=0;i<r.arguments.length;i++){let s=r.arguments[i];n^=Fe(s)}return wt(t,n)}case Re.ASTType.NegationExpression:case Re.ASTType.BinaryNegatedExpression:case Re.ASTType.UnaryExpression:{let r=t;return n^=r.operator?(0,Xe.getStringHashCode)(r.operator):1,n^=Fe(r.argument),wt(t,n)}case Re.ASTType.Identifier:{let r=t;return n^=(0,Xe.getStringHashCode)(r.name),wt(t,n)}case Re.ASTType.NumericLiteral:case Re.ASTType.StringLiteral:case Re.ASTType.NilLiteral:return n^=(0,Xe.getStringHashCode)(t.value.toString()),wt(t,n);case Re.ASTType.MapConstructorExpression:{let r=t;n^=(0,Xe.getHashCode)(r.fields.length);for(let i=0;i<r.fields.length;i++){let s=r.fields[i];n^=Fe(s.key),n^=Fe(s.value)}return wt(t,n)}case Re.ASTType.ListConstructorExpression:{let r=t;n^=(0,Xe.getHashCode)(r.fields.length);for(let i=0;i<r.fields.length;i++){let s=r.fields[i];n^=Fe(s.value)}return wt(t,n)}case Re.ASTType.SliceExpression:{let r=t;return n^=Fe(r.base),n^=Fe(r.left),n^=Fe(r.right),wt(t,n)}}return wt(t,n)}function mR(t){return Fe(t)}lc.createExpressionHash=mR});var Om=T(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});cc.createExpressionId=void 0;var rt=pe(),gR=bo(),at=(t,e)=>t.$$id=e,yR=t=>{var e;return(e=t.$$id)!=null?e:null};function je(t){let e=yR(t);if(e!==null)return e;switch(t.type){case rt.ASTType.BinaryExpression:{let n=t;return at(t,je(n.left)+n.operator+je(n.right))}case rt.ASTType.LogicalExpression:{let n=t;return at(t,je(n.left)+n.operator+je(n.right))}case rt.ASTType.IsaExpression:{let n=t;return at(t,je(n.left)+n.operator+je(n.right))}case rt.ASTType.ComparisonGroupExpression:{let n=t,r=n.expressions.map(s=>je(s)),i=[r[0]];for(let s=0;s<n.operators.length;s++)i.push(n.operators[s],r[s+1]);return at(t,i.join(" "))}case rt.ASTType.FunctionDeclaration:{let n=t,r="function",i=[];for(let s=0;s<n.parameters.length;s++){let o=n.parameters[s];if(o.type===rt.ASTType.Identifier){i.push(o.name);continue}let l=o;i.push(l.variable.name+"="+je(l.init))}return i.length>0&&(r+="("+i.join(",")+")"),at(t,r)}case rt.ASTType.ParenthesisExpression:return at(t,je(t.expression));case rt.ASTType.MemberExpression:{let n=t;return at(t,je(n.base)+"."+n.identifier.name)}case rt.ASTType.IndexExpression:{let n=t;return(0,gR.isValidIdentifierLiteral)(n.index)?at(t,je(n.base)+"."+n.index.value.toString()):at(t,je(n.base)+"["+je(n.index)+"]")}case rt.ASTType.CallExpression:{let n=t,r=je(n.base),i=[];for(let s=0;s<n.arguments.length;s++){let o=n.arguments[s];i.push(je(o))}return i.length>0&&(r+="("+i.join(",")+")"),at(t,r)}case rt.ASTType.NegationExpression:case rt.ASTType.BinaryNegatedExpression:case rt.ASTType.UnaryExpression:{let n=t;return n.operator==null?at(t,je(n.argument)):n.operator==="@"?at(t,n.operator+je(n.argument)):at(t,n.operator+" "+je(n.argument))}case rt.ASTType.Identifier:return at(t,t.name);case rt.ASTType.NumericLiteral:case rt.ASTType.StringLiteral:case rt.ASTType.NilLiteral:return at(t,t.raw.toString());case rt.ASTType.MapConstructorExpression:{let n=t,r=[];for(let i=0;i<n.fields.length;i++){let s=n.fields[i];r.push(je(s.key)+":"+je(s.value))}return at(t,"{"+r.join(",")+"}")}case rt.ASTType.ListConstructorExpression:{let n=t,r=[];for(let i=0;i<n.fields.length;i++){let s=n.fields[i];r.push(je(s.value))}return at(t,"["+r.join(",")+"]")}case rt.ASTType.SliceExpression:{let n=t;return at(t,je(n.base)+"["+je(n.left)+":"+je(n.right)+"]")}}return at(t,"")}function bR(t){return je(t)}cc.createExpressionId=bR});var rs=T(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.Markers=void 0;var vR;(function(t){t.start="/**",t.nostart="/***",t.delim="*",t.end="*/"})(vR=vo.Markers||(vo.Markers={}))});var fn=T(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.rewireSpecs=Ve.rewireSource=Ve.seedTokens=Ve.seedSpec=Ve.seedBlock=Ve.splitLines=Ve.splitSpace=Ve.splitCR=Ve.hasCR=Ve.isSpace=void 0;function _R(t){return/^\s+$/.test(t)}Ve.isSpace=_R;function wR(t){return/\r$/.test(t)}Ve.hasCR=wR;function xR(t){let e=t.match(/\r+$/);return e==null?["",t]:[t.slice(-e[0].length),t.slice(0,-e[0].length)]}Ve.splitCR=xR;function SR(t){let e=t.match(/^\s+/);return e==null?["",t]:[t.slice(0,e[0].length),t.slice(e[0].length)]}Ve.splitSpace=SR;function kR(t){return t.split(/\n/)}Ve.splitLines=kR;function TR(t={}){return Object.assign({description:"",tags:[],source:[],problems:[]},t)}Ve.seedBlock=TR;function IR(t={}){return Object.assign({tag:"",name:"",type:"",optional:!1,description:"",problems:[],source:[]},t)}Ve.seedSpec=IR;function ER(t={}){return Object.assign({start:"",delimiter:"",postDelimiter:"",tag:"",postTag:"",name:"",postName:"",type:"",postType:"",description:"",end:"",lineEnd:""},t)}Ve.seedTokens=ER;function CR(t){let e=t.source.reduce((n,r)=>n.set(r.number,r),new Map);for(let n of t.tags)n.source=n.source.map(r=>e.get(r.number));return t}Ve.rewireSource=CR;function RR(t){let e=t.tags.reduce((n,r)=>r.source.reduce((i,s)=>i.set(s.number,s),n),new Map);return t.source=t.source.map(n=>e.get(n.number)||n),t}Ve.rewireSpecs=RR});var $S=T(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});var PR=/^@\S+/;function AR({fence:t="```"}={}){let e=OR(t),n=(r,i)=>e(r)?!i:i;return function(i){let s=[[]],o=!1;for(let l of i)PR.test(l.tokens.description)&&!o?s.push([l]):s[s.length-1].push(l),o=n(l.tokens.description,o);return s}}Dm.default=AR;function OR(t){return typeof t=="string"?e=>e.split(t).length%2===0:t}});var BS=T(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});var DR=rs(),_o=fn();function jR({startLine:t=0,markers:e=DR.Markers}={}){let n=null,r=t;return function(s){let o=s,l=(0,_o.seedTokens)();if([l.lineEnd,o]=(0,_o.splitCR)(o),[l.start,o]=(0,_o.splitSpace)(o),n===null&&o.startsWith(e.start)&&!o.startsWith(e.nostart)&&(n=[],l.delimiter=o.slice(0,e.start.length),o=o.slice(e.start.length),[l.postDelimiter,o]=(0,_o.splitSpace)(o)),n===null)return r++,null;let c=o.trimRight().endsWith(e.end);if(l.delimiter===""&&o.startsWith(e.delim)&&!o.startsWith(e.end)&&(l.delimiter=e.delim,o=o.slice(e.delim.length),[l.postDelimiter,o]=(0,_o.splitSpace)(o)),c){let a=o.trimRight();l.end=o.slice(a.length-e.end.length),o=a.slice(0,-e.end.length)}if(l.description=o,n.push({number:r,source:s,tokens:l}),r++,c){let a=n.slice();return n=null,a}return null}}jm.default=jR});var US=T(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});var LR=fn();function MR({tokenizers:t}){return function(n){var r;let i=(0,LR.seedSpec)({source:n});for(let s of t)if(i=s(i),!((r=i.problems[i.problems.length-1])===null||r===void 0)&&r.critical)break;return i}}Lm.default=MR});var qm=T(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});function qR(){return t=>{let{tokens:e}=t.source[0],n=e.description.match(/\s*(@(\S+))(\s*)/);return n===null?(t.problems.push({code:"spec:tag:prefix",message:'tag should start with "@" symbol',line:t.source[0].number,critical:!0}),t):(e.tag=n[1],e.postTag=n[3],e.description=e.description.slice(n[0].length),t.tag=n[2],t)}}Mm.default=qR});var Nm=T(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});var FR=fn();function NR(t="compact"){let e=BR(t);return n=>{let r=0,i=[];for(let[l,{tokens:c}]of n.source.entries()){let a="";if(l===0&&c.description[0]!=="{")return n;for(let u of c.description)if(u==="{"&&r++,u==="}"&&r--,a+=u,r===0)break;if(i.push([c,a]),r===0)break}if(r!==0)return n.problems.push({code:"spec:type:unpaired-curlies",message:"unpaired curlies",line:n.source[0].number,critical:!0}),n;let s=[],o=i[0][0].postDelimiter.length;for(let[l,[c,a]]of i.entries())c.type=a,l>0&&(c.type=c.postDelimiter.slice(o)+a,c.postDelimiter=c.postDelimiter.slice(0,o)),[c.postType,c.description]=(0,FR.splitSpace)(c.description.slice(a.length)),s.push(c.type);return s[0]=s[0].slice(1),s[s.length-1]=s[s.length-1].slice(0,-1),n.type=e(s),n}}Fm.default=NR;var $R=t=>t.trim();function BR(t){return t==="compact"?e=>e.map($R).join(""):t==="preserve"?e=>e.join(`
|
96
96
|
`):t}});var Um=T(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});var $m=fn(),UR=t=>t&&t.startsWith('"')&&t.endsWith('"');function WR(){let t=(e,{tokens:n},r)=>n.type===""?e:r;return e=>{let{tokens:n}=e.source[e.source.reduce(t,0)],r=n.description.trimLeft(),i=r.split('"');if(i.length>1&&i[0]===""&&i.length%2===1)return e.name=i[1],n.name=`"${i[1]}"`,[n.postName,n.description]=(0,$m.splitSpace)(r.slice(n.name.length)),e;let s=0,o="",l=!1,c;for(let u of r){if(s===0&&(0,$m.isSpace)(u))break;u==="["&&s++,u==="]"&&s--,o+=u}if(s!==0)return e.problems.push({code:"spec:name:unpaired-brackets",message:"unpaired brackets",line:e.source[0].number,critical:!0}),e;let a=o;if(o[0]==="["&&o[o.length-1]==="]"){l=!0,o=o.slice(1,-1);let u=o.split("=");if(o=u[0].trim(),u[1]!==void 0&&(c=u.slice(1).join("=").trim()),o==="")return e.problems.push({code:"spec:name:empty-name",message:"empty name",line:e.source[0].number,critical:!0}),e;if(c==="")return e.problems.push({code:"spec:name:empty-default",message:"empty default value",line:e.source[0].number,critical:!0}),e;if(!UR(c)&&/=(?!>)/.test(c))return e.problems.push({code:"spec:name:invalid-default",message:"invalid default value syntax",line:e.source[0].number,critical:!0}),e}return e.optional=l,e.name=o,n.name=a,c!==void 0&&(e.default=c),[n.postName,n.description]=(0,$m.splitSpace)(r.slice(n.name.length)),e}}Bm.default=WR});var Vm=T(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.getJoiner=void 0;var Wm=rs();function VR(t="compact",e=Wm.Markers){let n=WS(t);return r=>(r.description=n(r.source,e),r)}wo.default=VR;function WS(t){return t==="compact"?HR:t==="preserve"?KR:t}wo.getJoiner=WS;function HR(t,e=Wm.Markers){return t.map(({tokens:{description:n}})=>n.trim()).filter(n=>n!=="").join(" ")}var zR=(t,{tokens:e},n)=>e.type===""?t:n,GR=({tokens:t})=>(t.delimiter===""?t.start:t.postDelimiter.slice(1))+t.description;function KR(t,e=Wm.Markers){if(t.length===0)return"";t[0].tokens.description===""&&t[0].tokens.delimiter===e.start&&(t=t.slice(1));let n=t[t.length-1];return n!==void 0&&n.tokens.description===""&&n.tokens.end.endsWith(e.end)&&(t=t.slice(0,-1)),t=t.slice(t.reduce(zR,0)),t.map(GR).join(`
|
97
97
|
`)}});var HS=T(Hm=>{"use strict";Object.defineProperty(Hm,"__esModule",{value:!0});var YR=rs(),QR=fn(),JR=$S(),XR=BS(),ZR=US(),eP=qm(),tP=Nm(),nP=Um(),VS=Vm();function rP({startLine:t=0,fence:e="```",spacing:n="compact",markers:r=YR.Markers,tokenizers:i=[(0,eP.default)(),(0,tP.default)(n),(0,nP.default)(),(0,VS.default)(n)]}={}){if(t<0||t%1>0)throw new Error("Invalid startLine");let s=(0,XR.default)({startLine:t,markers:r}),o=(0,JR.default)({fence:e}),l=(0,ZR.default)({tokenizers:i}),c=(0,VS.getJoiner)(n);return function(a){let u=[];for(let d of(0,QR.splitLines)(a)){let p=s(d);if(p===null)continue;let h=o(p),m=h.slice(1).map(l);u.push({description:c(h[0],r),tags:m,source:p,problems:m.reduce((f,g)=>f.concat(g.problems),[])})}return u}}Hm.default=rP});var zS=T(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});function iP(t){return t.start+t.delimiter+t.postDelimiter+t.tag+t.postTag+t.type+t.postType+t.name+t.postName+t.description+t.end+t.lineEnd}function sP(){return t=>t.source.map(({tokens:e})=>iP(e)).join(`
|
98
98
|
`)}zm.default=sP});var KS=T(xo=>{"use strict";var oP=xo&&xo.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};Object.defineProperty(xo,"__esModule",{value:!0});var GS=rs(),aP=fn(),lP={start:0,tag:0,type:0,name:0},cP=(t=GS.Markers)=>(e,{tokens:n})=>({start:n.delimiter===t.start?n.start.length:e.start,tag:Math.max(e.tag,n.tag.length),type:Math.max(e.type,n.type.length),name:Math.max(e.name,n.name.length)}),Gr=t=>"".padStart(t," ");function uP(t=GS.Markers){let e=!1,n;function r(i){let s=Object.assign({},i.tokens);s.tag!==""&&(e=!0);let o=s.tag===""&&s.name===""&&s.type===""&&s.description==="";if(s.end===t.end&&o)return s.start=Gr(n.start+1),Object.assign(Object.assign({},i),{tokens:s});switch(s.delimiter){case t.start:s.start=Gr(n.start);break;case t.delim:s.start=Gr(n.start+1);break;default:s.delimiter="",s.start=Gr(n.start+2)}if(!e)return s.postDelimiter=s.description===""?"":" ",Object.assign(Object.assign({},i),{tokens:s});let l={delim:!1,tag:!1,type:!1,name:!1};return s.description===""&&(l.name=!0,s.postName="",s.name===""&&(l.type=!0,s.postType="",s.type===""&&(l.tag=!0,s.postTag="",s.tag===""&&(l.delim=!0)))),s.postDelimiter=l.delim?"":" ",l.tag||(s.postTag=Gr(n.tag-s.tag.length+1)),l.type||(s.postType=Gr(n.type-s.type.length+1)),l.name||(s.postName=Gr(n.name-s.name.length+1)),Object.assign(Object.assign({},i),{tokens:s})}return i=>{var{source:s}=i,o=oP(i,["source"]);return n=s.reduce(cP(t),Object.assign({},lP)),(0,aP.rewireSource)(Object.assign(Object.assign({},o),{source:s.map(r)}))}}xo.default=uP});var YS=T(So=>{"use strict";var dP=So&&So.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};Object.defineProperty(So,"__esModule",{value:!0});var pP=fn(),hP=t=>e=>e.slice(t),fP=t=>{let e="".padStart(t," ");return n=>n+e};function mP(t){let e,n=i=>{if(e===void 0){let s=t-i.length;e=s>0?fP(s):hP(-s)}return e(i)},r=i=>Object.assign(Object.assign({},i),{tokens:Object.assign(Object.assign({},i.tokens),{start:n(i.tokens.start)})});return i=>{var{source:s}=i,o=dP(i,["source"]);return(0,pP.rewireSource)(Object.assign(Object.assign({},o),{source:s.map(r)}))}}So.default=mP});var QS=T(ko=>{"use strict";var gP=ko&&ko.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};Object.defineProperty(ko,"__esModule",{value:!0});var yP=fn();function bP(t){function e(n){return Object.assign(Object.assign({},n),{tokens:Object.assign(Object.assign({},n.tokens),{lineEnd:t==="LF"?"":"\r"})})}return n=>{var{source:r}=n,i=gP(n,["source"]);return(0,yP.rewireSource)(Object.assign(Object.assign({},i),{source:r.map(e)}))}}ko.default=bP});var JS=T(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});uc.flow=void 0;function vP(...t){return e=>t.reduce((n,r)=>r(n),e)}uc.flow=vP});var tk=T(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0});var _P=fn(),ZS={line:0,start:0,delimiter:0,postDelimiter:0,tag:0,postTag:0,name:0,postName:0,type:0,postType:0,description:0,end:0,lineEnd:0},XS={lineEnd:"CR"},Gm=Object.keys(ZS),ek=t=>(0,_P.isSpace)(t)?`{${t.length}}`:t,wP=t=>"|"+t.join("|")+"|",xP=(t,e)=>Object.keys(e).map(n=>ek(e[n]).padEnd(t[n]));function SP({source:t}){var e,n;if(t.length===0)return"";let r=Object.assign({},ZS);for(let s of Gm)r[s]=((e=XS[s])!==null&&e!==void 0?e:s).length;for(let{number:s,tokens:o}of t){r.line=Math.max(r.line,s.toString().length);for(let l in o)r[l]=Math.max(r[l],ek(o[l]).length)}let i=[[],[]];for(let s of Gm)i[0].push(((n=XS[s])!==null&&n!==void 0?n:s).padEnd(r[s]));for(let s of Gm)i[1].push("-".padEnd(r[s],"-"));for(let{number:s,tokens:o}of t){let l=s.toString().padStart(r.line);i.push([l,...xP(r,o)])}return i.map(wP).join(`
|
@@ -103,8 +103,8 @@ ${e}
|
|
103
103
|
`),o=n.tags.filter(a=>a.tag==="param").map(a=>({label:a.name,types:a.type.split("|"),opt:a.optional})),l=(i=n.tags.find(a=>a.tag==="return"))!=null?i:{type:"any"},c=n.tags.filter(a=>a.tag==="example").map(fk);return hk.SignatureDefinitionFunction.parse({type:hk.SignatureDefinitionBaseType.Function,arguments:t.getArguments().map((a,u)=>{let d=a.getLabel(),p=a.getTypes().map(m=>m.toString()),h=a.isOptional();return vn(st({types:p,opt:h},o[u]),{label:d})}),returns:l.type.split("|"),description:s,example:c})}return t}yc.enrichWithMetaInformation=_A});var ig=T(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});bc.createResolveChain=void 0;var At=pe();function Ir(t,e,n=null,r=!1){switch(t.type){case At.ASTType.ParenthesisExpression:{Ir(t.expression,e,n);return}case At.ASTType.MemberExpression:{let i=t;Ir(i.base,e),e.push({ref:t,getter:i.identifier,unary:n,isInCallExpression:r});return}case At.ASTType.IndexExpression:{let i=t;Ir(i.base,e),e.push({ref:t,getter:i.index,unary:n,isInCallExpression:r});return}case At.ASTType.CallStatement:{Ir(t.expression,e,n,!0);return}case At.ASTType.CallExpression:{Ir(t.base,e,n,!0);return}case At.ASTType.NegationExpression:case At.ASTType.BinaryNegatedExpression:case At.ASTType.UnaryExpression:{let i=t;Ir(i.argument,e,i);return}case At.ASTType.Identifier:{e.push({ref:t,getter:t,unary:n,isInCallExpression:r});return}case At.ASTType.NumericLiteral:case At.ASTType.StringLiteral:case At.ASTType.NilLiteral:case At.ASTType.MapConstructorExpression:case At.ASTType.ListConstructorExpression:{e.push({ref:t,value:t,unary:n,isInCallExpression:r});return}case At.ASTType.SliceExpression:Ir(t.base,e),e.push({ref:t,unary:n,isInCallExpression:r})}}function wA(t){let e=[];return Ir(t,e),e}bc.createResolveChain=wA});var gk=T(sg=>{function mk(t,e){return t>e?1:-1}sg.hash=function t(e,n){var r=5381;if(typeof e=="object"&&e!==null&&(e.toString===Object.prototype.toString||e.toString===Array.prototype.toString)){n||(n=new WeakSet);for(var i=Object.keys(e).sort(mk),s=0;s<i.length;s++){var o=i[s],l=e[o];if(r=33*r^t(o,n),typeof l=="object"&&l!==null&&(e.toString===Object.prototype.toString||e.toString===Array.prototype.toString)){if(n.has(l))continue;n.add(l)}r=33*r^t(l,n)}return 33*r^t(e.constructor,n)}var c=typeof e;try{e instanceof Date?c+=e.getTime():c+=String(e)}catch(u){c+=String(Object.assign({},e))}for(var a=0;a<c.length;a++)r=33*r^c.charCodeAt(a);return r},sg.sortNumbers=mk});var lg=T(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});as.ObjectSet=as.ObjectSetIterator=void 0;var og=gk(),vc=class{constructor(e){let n=this;n.value=e,n.index=0}next(){let e=this;return e.index>=e.value.length?{value:null,done:!0}:{value:e.value[e.index++],done:!1}}};as.ObjectSetIterator=vc;var ag=class{constructor(e){let r=(e?Array.from(e):[]).map(i=>[(0,og.hash)(i),i]);this._map=new Map(r),this._first=null,this._last=null,r.length>0&&(this._first=r[0][0],this._last=r[r.length-1][0])}[Symbol.iterator](){return new vc(Array.from(this._map.values()))}first(){var e;return this._first!=null&&(e=this._map.get(this._first))!=null?e:null}last(){var e;return this._last!=null&&(e=this._map.get(this._last))!=null?e:null}toArray(){return Array.from(this._map.values())}add(e){var r;let n=(0,og.hash)(e);return this._map.set(n,e),(r=this._first)!=null||(this._first=n),this._last=n,this}delete(e){let n=(0,og.hash)(e);return this._map.delete(n)}extend(e){var n;for(let[r,i]of e._map)this._map.set(r,i),(n=this._first)!=null||(this._first=r),this._last=r;return this}toJSON(){return Array.from(this._map.values())}clear(){this._map.clear()}};as.ObjectSet=ag});var cg=T(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});_c.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION=void 0;_c.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION="This is a custom method. You can add a description for this method by adding a comment above or after the function.\n```\nmyFunction = function(a, b, c) // This function does xyz\n```\nor\n```\n/*\n This function does xyz\n*/\nmyFunction = function(a, b, c)\n```"});var Jr=T(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.CompletionItemKind=void 0;var xA;(function(t){t.Variable="var",t.Property="var",t.Function="function",t.Literal="literal",t.Constant="constant",t.ListConstructor="list",t.MapConstructor="map",t.Expression="expr",t.Unknown="unknown"})(xA=Co.CompletionItemKind||(Co.CompletionItemKind={}))});var ug=T(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.isResolveChainItemWithValue=jn.isResolveChainItemWithIdentifier=jn.isResolveChainItemWithMember=jn.isResolveChainItemWithIndex=void 0;var Er=pe(),SA=t=>t!=null&&t.ref.type===Er.ASTType.IndexExpression;jn.isResolveChainItemWithIndex=SA;var kA=t=>t!=null&&t.ref.type===Er.ASTType.MemberExpression;jn.isResolveChainItemWithMember=kA;var TA=t=>t!=null&&t.ref.type===Er.ASTType.Identifier;jn.isResolveChainItemWithIdentifier=TA;var IA=t=>t!=null&&(t.ref.type===Er.ASTType.NumericLiteral||t.ref.type===Er.ASTType.StringLiteral||t.ref.type===Er.ASTType.NilLiteral||t.ref.type===Er.ASTType.MapConstructorExpression||t.ref.type===Er.ASTType.ListConstructorExpression);jn.isResolveChainItemWithValue=IA});var dg=T(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});wc.isSignatureDefinitionFunction=void 0;var EA=Yt(),CA=t=>t.getType().type===EA.SignatureDefinitionBaseType.Function;wc.isSignatureDefinitionFunction=CA});var Ro=T(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.injectIdentifers=void 0;var RA=(t,e)=>{for(let[n,r]of e.values)n.startsWith("i:")&&t.set(n.slice(2),{kind:r.kind,line:r.line})};xc.injectIdentifers=RA});var kc=T(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});Sc.isEligibleForProperties=void 0;var pg=Yt(),PA=t=>t.types.has(pg.SignatureDefinitionBaseType.Map)||t.types.has(pg.SignatureDefinitionBaseType.List)||t.types.has(pg.SignatureDefinitionBaseType.Any);Sc.isEligibleForProperties=PA});var Ic=T(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});Tc.lookupProperty=void 0;var AA=kc(),OA=(t,e)=>{let n=t;for(;(0,AA.isEligibleForProperties)(n);){let r=n.values.get(`i:${e}`);if(r!=null)return r;let i=n.values.get("i:__isa");if(i==null)break;n=i}return null};Tc.lookupProperty=OA});var us=T(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.Entity=Cr.resolveEntity=void 0;var ls=Yt(),cs=Jr(),DA=dg(),jA=Ro(),Ec=kc(),yk=Ic(),bk=lg(),LA=(t,e,n=!1)=>{if(e.isCallable()&&!n){let r=e.getReturnEntity();if(r!==null)return r;let i=e.getCallableReturnTypes();return i?new Xr({kind:cs.CompletionItemKind.Variable,container:t,label:e.label,context:e.context}).addType(...i):new Xr({kind:cs.CompletionItemKind.Variable,container:t,label:e.label,context:e.context}).addType(ls.SignatureDefinitionBaseType.Any)}return e};Cr.resolveEntity=LA;var hg={hasProperty(t,e,n){return!!(0,yk.lookupProperty)(t,n)||!t.isAPI()&&!!e.getDefinition(Array.from(t.types),n,!0)},resolveProperty(t,e,n,r=!1){var s;let i=(s=(0,yk.lookupProperty)(t,n))!=null?s:null;return i==null?t.isAPI()?null:e.getDefinition(Array.from(t.types),n,r):(0,Cr.resolveEntity)(e,i,r)},setProperty(t,e,n,r){if(!(0,Ec.isEligibleForProperties)(t))return!1;let i=`i:${n}`,s=t.values.get(i);return s?s.extend(r):t.values.set(i,r.copy({container:e,label:n,context:t})),!0}},fg={hasProperty(t,e,n){if(!(0,Ec.isEligibleForProperties)(t))return!1;for(let r of n.types)if(t.values.has(`t:${r}`))return!0;return!1},resolveProperty(t,e,n,r=!1){if(!(0,Ec.isEligibleForProperties)(t))return new Xr({kind:cs.CompletionItemKind.Variable,container:e,label:n.label,context:t}).addType(ls.SignatureDefinitionBaseType.Any);let i=new Xr({kind:cs.CompletionItemKind.Variable,container:e,label:n.label,context:t});for(let s of n.types){let o=t.values.get(`t:${s}`);o&&i.extend(o)}return i.types.size===0&&i.addType(ls.SignatureDefinitionBaseType.Any),(0,Cr.resolveEntity)(e,i,r)},setProperty(t,e,n,r){if(!(0,Ec.isEligibleForProperties)(t))return!1;for(let i of n.types){let s=`t:${i}`,o=t.values.get(s);o?o.extend(r):t.values.set(s,r.copy({container:e,label:i,context:t}))}return!0}},Xr=class t{get kind(){return this._kind}get line(){return this._line}get signatureDefinitions(){return this._signatureDefinitions}get context(){return this._context}get label(){return this._label}get types(){return this._types}get values(){return this._values}constructor(e){var n,r,i,s,o,l,c,a,u;this._isAPI=(n=e.isAPI)!=null?n:!1,this._isFromSignature=(r=e.isFromSignature)!=null?r:!1,this._kind=e.kind,this._line=(i=e.line)!=null?i:-1,this._label=(s=e.label)!=null?s:"anonymous",this._signatureDefinitions=(o=e.signatureDefinitions)!=null?o:new bk.ObjectSet,this._types=(l=e.types)!=null?l:new Set,this._values=(c=e.values)!=null?c:new Map,this._context=(a=e.context)!=null?a:null,this._container=e.container,this._returnEntity=(u=e.returnEntity)!=null?u:null}isFromSignature(){return this._isFromSignature}hasContext(){return this._context!=null&&!this._context.isAPI}isAPI(){return this._isAPI}isCallable(){return this._types.has(ls.SignatureDefinitionBaseType.Function)}getCallableReturnTypes(){if(!this.isCallable())return null;let e=Array.from(this._signatureDefinitions).filter(n=>(0,DA.isSignatureDefinitionFunction)(n));return e.length===0?null:e.flatMap(n=>n.getReturns()).map(n=>n.type)}addSignatureType(e){return this._signatureDefinitions.add(e),this.addType(e.getType().type),this}setReturnEntity(e){return this._returnEntity=e,this}getReturnEntity(){return this._returnEntity}setKind(e){return this._kind=e,this}setLine(e){return this._line=e,this}setLabel(e){return this._label=e,this}setContext(e){return this._context=e,this}addType(...e){for(let n of e)this._types.add(n);return this}hasProperty(e){switch(typeof e){case"object":return fg.hasProperty(this,this._container,e);default:return hg.hasProperty(this,this._container,e)}}resolveProperty(e,n=!1){switch(typeof e){case"object":return fg.resolveProperty(this,this._container,e,n);default:return hg.resolveProperty(this,this._container,e,n)}}setProperty(e,n){switch(typeof e){case"object":return fg.setProperty(this,this._container,e,n);default:return hg.setProperty(this,this._container,e,n)}}extend(e){if(e===this)return this;this._isFromSignature=!1,this._signatureDefinitions.extend(e.signatureDefinitions),this.addType(...e.types);for(let[n,r]of e.values){let i=this.values.get(n);i==null?this.values.set(n,r.copy({container:this._container,context:this})):i.extend(r)}return this}insertSignature(e){let n=Object.keys(e.getDefinitions());this.addType(ls.SignatureDefinitionBaseType.Map);for(let r=0;r<n.length;r++){let i=n[r],s=e.getDefinition(i),o=new t({label:i,kind:s.getType().type===ls.SignatureDefinitionBaseType.Function?cs.CompletionItemKind.Function:cs.CompletionItemKind.Property,container:this._container,isFromSignature:!0});o.addSignatureType(s),this.setProperty(i,o)}return this}getAllIdentifier(){let e=new Map,n=this._values.get("i:__isa");if(n!=null)for(let r of n.getAllIdentifier())e.set(...r);for(let r of this._types){let i=this._container.getAllIdentifier(r);for(let s of i)e.set(...s)}return(0,jA.injectIdentifers)(e,this),e}toJSONInternal(e=new WeakMap){if(e.has(this))return e.get(this);let n={};return e.set(this,n),n.kind=this.kind,n.signatureDefinitions=this._signatureDefinitions.toJSON(),n.types=Array.from(this._types),n.values=Array.from(this._values).reduce((r,[i,s])=>(r[i]=s==null?void 0:s.toJSONInternal(e),r),{}),n}toJSON(){return this.toJSONInternal()}copy(e={}){var r,i,s,o,l,c,a;let n=new t({kind:(r=e.kind)!=null?r:this._kind,line:(i=e.line)!=null?i:this._line,isFromSignature:(s=e.isFromSignature)!=null?s:this._isFromSignature,isAPI:(o=e.isAPI)!=null?o:this._isAPI,container:(l=e.container)!=null?l:this._container,label:(c=e.label)!=null?c:this._label,context:(a=e.context)!=null?a:this._context,signatureDefinitions:new bk.ObjectSet(Array.from(this._signatureDefinitions,u=>u.copy())),types:new Set(this._types),returnEntity:this._returnEntity});return e.values?n._values=e.values:n._values=new Map(Array.from(this._values,([u,d])=>[u,d.copy({container:e.container,line:e.line,context:n,values:d.values})])),n}};Cr.Entity=Xr});var yg=T(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});Pc.Scope=void 0;var Cc=Yt(),Zr=Jr(),mg=Ro(),Rc=us(),gg=class t{get signatureDefinitions(){return null}get kind(){return Zr.CompletionItemKind.Constant}get line(){return this._locals.line}get label(){return this._locals.label}get context(){return this._locals.context}get types(){return new Set(Cc.SignatureDefinitionBaseType.Map)}get values(){return this._locals.values}get globals(){return this._globals}get outer(){var e,n;return(n=(e=this._parent)==null?void 0:e.locals)!=null?n:null}get locals(){return this._locals}constructor(e){var n,r;this._container=e.container,this._parent=(n=e.parent)!=null?n:null,this._globals=e.globals,this._locals=(r=e.locals)!=null?r:new Rc.Entity({kind:Zr.CompletionItemKind.Constant,container:this._container,label:"locals"}).addType(Cc.SignatureDefinitionBaseType.Map)}addSignatureType(){throw new Error("Cannot add signature type to scope!")}hasProperty(e){return this._locals.hasProperty(e)}resolveProperty(e,n){return this._locals.resolveProperty(e,n)}resolveNamespace(e,n=!1){var r,i,s;if(typeof e!="string")throw new Error("Invalid property type for scope!");if(e==="locals")return this._locals;if(e==="outer")return(i=(r=this._parent)==null?void 0:r.locals)!=null?i:this._globals;if(e==="globals")return this._globals;if(this._locals.values.has(`i:${e}`)){let o=this._locals.values.get(`i:${e}`);return(0,Rc.resolveEntity)(this._container,o,n)}else if((s=this._parent)!=null&&s.locals.values.has(`i:${e}`)){let o=this._parent.locals.values.get(`i:${e}`);return(0,Rc.resolveEntity)(this._container,o,n)}else if(this._globals.values.has(`i:${e}`)){let o=this._globals.values.get(`i:${e}`);return(0,Rc.resolveEntity)(this._container,o,n)}return this._container.getGeneralDefinition(e,n)}setProperty(e,n){return this._locals.setProperty(e,n)}extend(e){return this._locals.extend(e),this}addType(){throw new Error("Scope cannot get type assigned!")}setReturnEntity(){throw new Error("Scope cannot set return entity!")}getReturnEntity(){throw new Error("Scope cannot get return entity!")}setKind(e){return this._locals.setKind(e),this}setLine(e){return this._locals.setLine(e),this}setLabel(e){return this._locals.setLabel(e),this}setContext(e){return this._locals.setContext(e),this}insertSignature(e){return this._locals.insertSignature(e),this}isAPI(){return!1}hasContext(){return!1}isFromSignature(){return!1}isCallable(){return!1}getCallableReturnTypes(){return null}getAllIdentifier(){let e=new Map([["globals",{kind:Zr.CompletionItemKind.Constant,line:-1}],["locals",{kind:Zr.CompletionItemKind.Constant,line:-1}],["outer",{kind:Zr.CompletionItemKind.Constant,line:-1}],...this._container.getAllIdentifier(Cc.SignatureDefinitionBaseType.General)]);return this._locals!==this._globals&&(0,mg.injectIdentifers)(e,this._globals),this._parent&&(0,mg.injectIdentifers)(e,this._parent.locals),(0,mg.injectIdentifers)(e,this._locals),this.isSelfAvailable()&&e.set("self",{kind:Zr.CompletionItemKind.Constant,line:-1}),this.isSuperAvailable()&&e.set("super",{kind:Zr.CompletionItemKind.Constant,line:-1}),e}isSelfAvailable(){return this._locals.context!=null&&this._locals.context.types.has(Cc.SignatureDefinitionBaseType.Map)}isSuperAvailable(){return this.isSelfAvailable()&&this._locals.context.hasProperty("__isa")}toJSON(){return this._locals.toJSON()}copy(e={}){var n;return new t({container:(n=e.container)!=null?n:this._container,parent:this._parent.copy({container:e.container}),globals:this._globals.copy({container:e.container}),locals:this._locals.copy(e)})}};Pc.Scope=gg});var ds=T(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.GreybelKeyword=void 0;var MA;(function(t){t.Envar="#envar",t.Import="#import",t.Include="#include",t.ImportWithComment="//import",t.IncludeWithComment="//include",t.Debugger="debugger",t.Line="#line",t.File="#filename",t.Inject="#inject"})(MA=Po.GreybelKeyword||(Po.GreybelKeyword={}))});var _g=T(vg=>{"use strict";Object.defineProperty(vg,"__esModule",{value:!0});var ei=pe(),qA=ds(),bg=class extends ei.LexerValidator{constructor(){super(...arguments),this.isKeyword=Set.prototype.has.bind(new Set([...Object.values(ei.Keyword),...Object.values(qA.GreybelKeyword)]))}isIdentifierStart(e){return super.isIdentifierStart(e)||e===ei.CharacterCode.HASH}isMultilineComment(e,n){return ei.CharacterCode.SLASH===e&&ei.CharacterCode.ASTERISK===n}isMultilineCommentEnd(e,n){return ei.CharacterCode.ASTERISK===e&&ei.CharacterCode.SLASH===n}isComment(e,n){return super.isComment(e,n)||this.isMultilineComment(e,n)}};vg.default=bg});var wg=T(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.CharacterCode=void 0;var FA;(function(t){t[t.VERTICAL_LINE=124]="VERTICAL_LINE",t[t.AMPERSAND=38]="AMPERSAND"})(FA=Ao.CharacterCode||(Ao.CharacterCode={}))});var ps=T(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.Operator=void 0;var NA;(function(t){t.BitwiseAnd="&",t.BitwiseOr="|",t.LeftShift="<<",t.RightShift=">>",t.UnsignedRightShift=">>>"})(NA=Oo.Operator||(Oo.Operator={}))});var Sg=T(Do=>{"use strict";var $A=Do&&Do.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Do,"__esModule",{value:!0});var mn=pe(),BA=$A(_g()),vk=wg(),_k=ds(),xg=ps();function wk(t){let e=this.content[this.index];return this.index+=e.length,this.createPunctuator(e,t)}var Ac=class t extends mn.Lexer{constructor(e,n={}){n.validator=n.validator||new BA.default,super(e,n)}scan(e,n){let r=t.greybelScanHandlers[e];return r?r.call(this,n)||super.scan(e,n):super.scan(e,n)}scanMultilineComment(e){let n=this,r=n.line,i=n.lineStart,s=n.index+2,o=0,l=n.offset,c=!1;for(;n.index<n.length;){let d=n.codeAt();if(n.validator.isEndOfLine(d))n.validator.isWinNewline(d,n.codeAt(1))&&n.index++,n.line++,o=n.index+1-n.offset,l=n.index+1;else if(n.validator.isMultilineCommentEnd(n.codeAt(),n.codeAt(1))){c=!0;break}n.index++}if(!c)return n.raise("Unexpected end of file in multiline comment.",new mn.ASTRange(new mn.ASTPosition(r,i-l+1),new mn.ASTPosition(n.line,n.index-l+1)));let a=n.content.slice(s,n.index);n.index+=2;let u=new mn.Token({type:mn.TokenType.Comment,value:a,line:r,lineStart:i,range:[n.tokenStart,n.index-o],offset:n.offset,afterSpace:e,lastLine:n.line,lastLineStart:n.lineStart});return n.offset=l,n.snapshot.enqueue(u),u}scanComment(e){let n=this,r=n.validator;return n.content.startsWith(_k.GreybelKeyword.ImportWithComment,n.index)||n.content.startsWith(_k.GreybelKeyword.IncludeWithComment,n.index)?(n.index++,n.scanIdentifierOrKeyword(e)):r.isMultilineComment(n.codeAt(),n.codeAt(1))?n.scanMultilineComment(e):super.scanComment(e)}};Do.default=Ac;Ac.greybelScanHandlers={[mn.CharacterCode.ARROW_LEFT]:function(e){if(mn.CharacterCode.ARROW_LEFT===this.codeAt(1))return this.scanPunctuator(xg.Operator.LeftShift,e)},[mn.CharacterCode.ARROW_RIGHT]:function(e){if(mn.CharacterCode.ARROW_RIGHT===this.codeAt(1))return mn.CharacterCode.ARROW_RIGHT===this.codeAt(2)?this.scanPunctuator(xg.Operator.UnsignedRightShift,e):this.scanPunctuator(xg.Operator.RightShift,e)},[vk.CharacterCode.AMPERSAND]:wk,[vk.CharacterCode.VERTICAL_LINE]:wk}});var Oc=T(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.ASTType=void 0;var UA;(function(t){t.FeatureImportExpression="FeatureImportExpression",t.FeatureIncludeExpression="FeatureIncludeExpression",t.FeatureEnvarExpression="FeatureEnvarExpression",t.FeatureInjectExpression="FeatureInjectExpression",t.FeatureDebuggerExpression="FeatureDebuggerExpression",t.FeatureLineExpression="FeatureLineExpression",t.FeatureFileExpression="FeatureFileExpression"})(UA=jo.ASTType||(jo.ASTType={}))});var Tg=T(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});Dc.ASTChunkAdvanced=void 0;var WA=pe(),kg=class t extends WA.ASTChunk{constructor(e){super(e),this.imports=e.imports||[],this.includes=e.includes||[],this.injects=e.injects||[]}clone(){return new t({literals:this.literals.map(e=>e.clone()),scopes:this.scopes.map(e=>e.clone()),imports:this.imports.map(e=>e.clone()),includes:this.includes.map(e=>e.clone()),injects:this.injects.map(e=>e.clone()),lines:this.lines,start:this.start,end:this.end,scope:this.scope})}};Dc.ASTChunkAdvanced=kg});var Ag=T(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.ASTFeatureFileExpression=an.ASTFeatureInjectExpression=an.ASTFeatureEnvarExpression=an.ASTFeatureIncludeExpression=an.ASTFeatureImportExpression=void 0;var Lo=pe(),Mo=Oc(),Ig=class t extends Lo.ASTBase{constructor(e){super(Mo.ASTType.FeatureImportExpression,e),this.name=e.name,this.path=e.path,this.chunk=e.chunk,this.namespace=e.namespace}toString(){return`FeatureImportExpression[${this.start}-${this.end}][name = ${this.name}, path = ${this.path}]`}clone(){return new t({name:this.name.clone(),path:this.path,chunk:this.chunk.clone(),namespace:this.namespace,start:this.start,end:this.end,scope:this.scope})}};an.ASTFeatureImportExpression=Ig;var Eg=class t extends Lo.ASTBase{constructor(e){super(Mo.ASTType.FeatureIncludeExpression,e),this.path=e.path,this.chunk=e.chunk,this.namespace=e.namespace}toString(){return`FeatureIncludeExpression[${this.start}-${this.end}][path = ${this.path}]`}clone(){return new t({path:this.path,chunk:this.chunk.clone(),namespace:this.namespace,start:this.start,end:this.end,scope:this.scope})}};an.ASTFeatureIncludeExpression=Eg;var Cg=class t extends Lo.ASTBase{constructor(e){super(Mo.ASTType.FeatureEnvarExpression,e),this.name=e.name}toString(){return`FeatureEnvarExpression[${this.start}-${this.end}][name = ${this.name}]`}clone(){return new t({name:this.name,start:this.start,end:this.end,scope:this.scope})}};an.ASTFeatureEnvarExpression=Cg;var Rg=class t extends Lo.ASTBase{constructor(e){super(Mo.ASTType.FeatureInjectExpression,e),this.path=e.path}toString(){return`FeatureInjectExpression[${this.start}-${this.end}][path = ${this.path}]`}clone(){return new t({path:this.path,start:this.start,end:this.end,scope:this.scope})}};an.ASTFeatureInjectExpression=Rg;var Pg=class t extends Lo.ASTBase{constructor(e){super(Mo.ASTType.FeatureFileExpression,e),this.filename=e.filename}toString(){return`FeatureFileExpression[${this.start}-${this.end}][path = ${this.filename}]`}clone(){return new t({filename:this.filename,start:this.start,end:this.end,scope:this.scope})}};an.ASTFeatureFileExpression=Pg});var jg=T(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.ASTFeatureInjectExpression=ft.ASTFeatureIncludeExpression=ft.ASTFeatureImportExpression=ft.ASTFeatureFileExpression=ft.ASTFeatureEnvarExpression=ft.ASTChunkAdvanced=ft.ASTType=ft.ASTProvider=void 0;var Og=pe(),xk=Oc(),VA=Tg(),qo=Ag(),Dg=class extends Og.ASTProvider{featureImportExpression(e){return new qo.ASTFeatureImportExpression(e)}featureIncludeExpression(e){return new qo.ASTFeatureIncludeExpression(e)}featureEnvarExpression(e){return new qo.ASTFeatureEnvarExpression(e)}featureInjectExpression(e){return new qo.ASTFeatureInjectExpression(e)}featureDebuggerExpression(e){return new Og.ASTBase(xk.ASTType.FeatureDebuggerExpression,e)}featureLineExpression(e){return new Og.ASTBase(xk.ASTType.FeatureLineExpression,e)}featureFileExpression(e){return new qo.ASTFeatureFileExpression(e)}chunkAdvanced(e){return new VA.ASTChunkAdvanced(e)}};ft.ASTProvider=Dg;var HA=Oc();Object.defineProperty(ft,"ASTType",{enumerable:!0,get:function(){return HA.ASTType}});var zA=Tg();Object.defineProperty(ft,"ASTChunkAdvanced",{enumerable:!0,get:function(){return zA.ASTChunkAdvanced}});var Fo=Ag();Object.defineProperty(ft,"ASTFeatureEnvarExpression",{enumerable:!0,get:function(){return Fo.ASTFeatureEnvarExpression}});Object.defineProperty(ft,"ASTFeatureFileExpression",{enumerable:!0,get:function(){return Fo.ASTFeatureFileExpression}});Object.defineProperty(ft,"ASTFeatureImportExpression",{enumerable:!0,get:function(){return Fo.ASTFeatureImportExpression}});Object.defineProperty(ft,"ASTFeatureIncludeExpression",{enumerable:!0,get:function(){return Fo.ASTFeatureIncludeExpression}});Object.defineProperty(ft,"ASTFeatureInjectExpression",{enumerable:!0,get:function(){return Fo.ASTFeatureInjectExpression}})});var Lg=T(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.SelectorGroups=ze.SelectorGroupType=ze.Selectors=ze.SelectorTypes=void 0;var ve=pe(),jc=ds(),No=ps(),GA;(function(t){t.From="From",t.Envar="Envar",t.Inject="Inject",t.Line="Line",t.File="File",t.LeftShift="LeftShift",t.RightShift="RightShift",t.UnsignedRightShift="UnsignedRightShift",t.BitwiseOr="BitwiseOr",t.BitwiseAnd="BitwiseAnd",t.Escape="Escape"})(GA=ze.SelectorTypes||(ze.SelectorTypes={}));ze.Selectors=Object.assign(Object.assign({},ve.Selectors),{From:(0,ve.createSelector)({type:ve.TokenType.Identifier,value:"from"}),Envar:(0,ve.createSelector)({type:ve.TokenType.Keyword,value:jc.GreybelKeyword.Envar}),Inject:(0,ve.createSelector)({type:ve.TokenType.Keyword,value:jc.GreybelKeyword.Inject}),Line:(0,ve.createSelector)({type:ve.TokenType.Keyword,value:jc.GreybelKeyword.Line}),File:(0,ve.createSelector)({type:ve.TokenType.Keyword,value:jc.GreybelKeyword.File}),LeftShift:(0,ve.createSelector)({type:ve.TokenType.Punctuator,value:No.Operator.LeftShift}),RightShift:(0,ve.createSelector)({type:ve.TokenType.Punctuator,value:No.Operator.RightShift}),UnsignedRightShift:(0,ve.createSelector)({type:ve.TokenType.Punctuator,value:No.Operator.UnsignedRightShift}),BitwiseOr:(0,ve.createSelector)({type:ve.TokenType.Punctuator,value:No.Operator.BitwiseOr}),BitwiseAnd:(0,ve.createSelector)({type:ve.TokenType.Punctuator,value:No.Operator.BitwiseAnd}),Escape:(0,ve.createSelector)({type:ve.TokenType.Punctuator,value:ve.Operator.Escape})});var Vn;(function(t){t.MapSeparator="MapSeparator",t.ListSeparator="ListSeparator",t.PathSegmentEnd="PathSegmentEnd",t.BitwiseOperators="BitwiseOperators"})(Vn=ze.SelectorGroupType||(ze.SelectorGroupType={}));ze.SelectorGroups=Object.assign(Object.assign({},ve.SelectorGroups),{[Vn.MapSeparator]:(0,ve.createSelectorGroup)(Vn.MapSeparator,[ze.Selectors.MapSeperator,ze.Selectors.CRBracket]),[Vn.ListSeparator]:(0,ve.createSelectorGroup)(Vn.ListSeparator,[ze.Selectors.MapSeperator,ze.Selectors.SRBracket]),[Vn.PathSegmentEnd]:(0,ve.createSelectorGroup)(Vn.PathSegmentEnd,[ze.Selectors.EndOfLine,ze.Selectors.Comment,ze.Selectors.EndOfFile]),[Vn.BitwiseOperators]:(0,ve.createSelectorGroup)(Vn.BitwiseOperators,[ze.Selectors.LeftShift,ze.Selectors.RightShift,ze.Selectors.UnsignedRightShift])})});var Tk=T($o=>{"use strict";var KA=$o&&$o.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($o,"__esModule",{value:!0});var $t=pe(),YA=Gi(),Sk=Ji(),QA=KA(Sg()),JA=jg(),ti=ds(),kk=ps(),ge=Lg(),Mg=class extends $t.Parser{constructor(e,n={}){var r;n.lexer=n.lexer||new QA.default(e,{unsafe:n.unsafe,tabWidth:n.tabWidth}),n.astProvider=n.astProvider||new JA.ASTProvider,super(e,n);let i=this;i.filename=(r=n.filename)!==null&&r!==void 0?r:"unknown",i.imports=[],i.includes=[],i.injects=[]}skipNewlines(){let e=this,n=0;for(;;){if(ge.Selectors.Comment(e.token)){let r=e.astProvider.comment({value:e.token.value,isMultiline:e.token.value.indexOf(`
|
104
104
|
`)!==-1,start:e.token.start,end:e.token.end,scope:e.currentScope});e.addItemToLines(r),e.backpatches.peek().body.push(r)}else if(ge.Selectors.EndOfLine(e.token))n++;else break;e.next()}return n}parseMap(e=!1,n=!1){let r=this;if(!ge.Selectors.CLBracket(r.token))return r.parseList(e,n);let i=r.currentScope,s=r.token.start,o=[],l=r.astProvider.mapConstructorExpression({fields:o,start:s,end:null,scope:i});if(r.next(),ge.Selectors.CRBracket(r.token))r.next();else for(;!ge.Selectors.EndOfFile(r.token);){if(r.skipNewlines(),ge.Selectors.CRBracket(r.token)){r.next();break}let c=r.astProvider.mapKeyString({key:null,value:null,start:r.token.start,end:null,scope:i});if(c.key=r.parseExpr(null),r.requireToken(ge.Selectors.MapKeyValueSeperator),r.skipNewlines(),r.currentAssignment){let u=r.astProvider.assignmentStatement({variable:r.astProvider.indexExpression({index:c.key,base:r.currentAssignment.variable,start:c.start,end:r.token.end,scope:i}),init:null,start:c.start,end:null}),d=r.currentAssignment;r.currentAssignment=u,c.value=r.parseExpr(c),r.currentAssignment=d,u.init=c.value,u.end=r.previousToken.end,i.assignments.push(u)}else c.value=r.parseExpr(c);c.end=r.previousToken.end,o.push(c),r.skipNewlines();let a=r.requireTokenOfAny(ge.SelectorGroups.MapSeparator,s);if(ge.Selectors.CRBracket(a))break}return l.end=r.token.start,l}parseList(e=!1,n=!1){let r=this;if(!ge.Selectors.SLBracket(r.token))return r.parseQuantity(e,n);let i=r.currentScope,s=r.token.start,o=[],l=r.astProvider.listConstructorExpression({fields:o,start:s,end:null,scope:i});if(r.next(),ge.Selectors.SRBracket(r.token))r.next();else for(;!ge.Selectors.EndOfFile(r.token);){if(r.skipNewlines(),ge.Selectors.SRBracket(r.token)){r.next();break}let c=r.astProvider.listValue({value:null,start:r.token.start,end:null,scope:i});if(r.currentAssignment){let u=r.astProvider.assignmentStatement({variable:r.astProvider.indexExpression({index:r.astProvider.literal($t.TokenType.NumericLiteral,{value:o.length,raw:`${o.length}`,start:s,end:r.token.end,scope:i}),base:r.currentAssignment.variable,start:null,end:null,scope:i}),init:null,start:null,end:null}),d=r.currentAssignment,p=r.token;r.currentAssignment=d,c.value=r.parseExpr(c),r.currentAssignment=d,u.variable.start=p.start,u.variable.end=r.previousToken.end,u.init=c.value,u.start=c.start,u.end=r.previousToken.end,i.assignments.push(u)}else c.value=r.parseExpr(c);c.end=r.previousToken.end,o.push(c),r.skipNewlines();let a=r.requireTokenOfAny(ge.SelectorGroups.ListSeparator,s);if(ge.Selectors.SRBracket(a))break}return l.end=r.token.start,l}parsePathSegment(){let e=this;if(this.token.type===$t.ASTType.StringLiteral){let r=this.token.value;return this.next(),r}let n="";for(;!ge.SelectorGroups.PathSegmentEnd(e.token);)n=n+e.token.value,e.next();return e.consumeMany(ge.SelectorGroups.PathSegmentEnd),n}parseFeatureIncludeStatement(){let e=this,n=e.previousToken.start,r=e.parsePathSegment(),i=e.astProvider.featureIncludeExpression({path:r,start:n,end:e.previousToken.end,scope:e.currentScope});return e.includes.push(i),i}parseFeatureImportStatement(){var e;let n=this,r=n.previousToken.start,i=n.parseIdentifier();if(!n.consume(ge.Selectors.From))return n.raise("expected from keyword",new Sk.Range(r,new YA.Position((e=n.token.lastLine)!==null&&e!==void 0?e:n.token.line,n.token.end.character))),n.parseInvalidCode();let s=n.parsePathSegment(),o=n.astProvider.featureImportExpression({name:i,path:s,start:r,end:n.previousToken.end,scope:n.currentScope});n.imports.push(o);let l=n.astProvider.assignmentStatement({variable:i,init:n.astProvider.literal($t.TokenType.NilLiteral,{value:null,raw:"null",start:i.start,end:i.end,scope:n.currentScope}),start:i.start,end:i.end,scope:n.currentScope});return n.currentScope.assignments.push(l),o}parseFeatureEnvarExpression(){let e=this,n=e.previousToken.start,r=e.token.value;return e.next(),e.astProvider.featureEnvarExpression({name:r,start:n,end:e.previousToken.end,scope:e.currentScope})}parseFeatureInjectExpression(){let e=this,n=e.previousToken.start,r=this.parsePathSegment();e.next();let i=e.astProvider.featureInjectExpression({path:r,start:n,end:e.previousToken.end,scope:e.currentScope});return e.injects.push(i),i}parseIsa(e=!1,n=!1){let r=this,i=r.token.start,s=r.parseBitwiseOr(e,n);if(ge.Selectors.Isa(r.token)){r.next(),r.skipNewlines();let o=r.parseBitwiseOr();return r.astProvider.isaExpression({operator:$t.Operator.Isa,left:s,right:o,start:i,end:r.previousToken.end,scope:r.currentScope})}return s}parseBitwiseOr(e=!1,n=!1){let r=this,i=r.token.start,o=r.parseBitwiseAnd(e,n);for(;ge.Selectors.BitwiseOr(r.token);){r.next();let l=r.parseBitwiseAnd();o=r.astProvider.binaryExpression({operator:kk.Operator.BitwiseOr,left:o,right:l,start:i,end:r.previousToken.end,scope:r.currentScope})}return o}parseBitwiseAnd(e=!1,n=!1){let r=this,i=r.token.start,o=r.parseComparisons(e,n);for(;ge.Selectors.BitwiseAnd(r.token);){r.next();let l=r.parseComparisons();o=r.astProvider.binaryExpression({operator:kk.Operator.BitwiseAnd,left:o,right:l,start:i,end:r.previousToken.end,scope:r.currentScope})}return o}parseAddSub(e=!1,n=!1){let r=this,i=r.token.start,o=r.parseBitwise(e,n);for(;ge.Selectors.Plus(r.token)||ge.Selectors.Minus(r.token)&&(!n||!r.token.afterSpace||r.lexer.isAtWhitespace());){let l=r.token;r.next(),r.skipNewlines();let c=r.parseBitwise();o=r.astProvider.binaryExpression({operator:l.value,left:o,right:c,start:i,end:r.previousToken.end,scope:r.currentScope})}return o}parseBitwise(e=!1,n=!1){let r=this,i=r.token.start,o=r.parseMultDiv(e,n);for(;ge.SelectorGroups.BitwiseOperators(r.token);){let l=r.token;r.next(),r.skipNewlines();let c=r.parseMultDiv();o=r.astProvider.binaryExpression({operator:l.value,left:o,right:c,start:i,end:r.previousToken.end,scope:r.currentScope})}return o}parseAtom(){let e=this;return ge.Selectors.Envar(e.token)?(e.next(),e.parseFeatureEnvarExpression()):ge.Selectors.Inject(e.token)?(e.next(),e.parseFeatureInjectExpression()):ge.Selectors.Line(e.token)?(e.next(),e.astProvider.featureLineExpression({start:new $t.ASTPosition(e.previousToken.line,e.previousToken.start.character),end:new $t.ASTPosition(e.previousToken.line,e.previousToken.end.character),scope:e.currentScope})):ge.Selectors.File(e.token)?(e.next(),e.astProvider.featureFileExpression({filename:e.filename,start:new $t.ASTPosition(e.previousToken.line,e.previousToken.start.character),end:new $t.ASTPosition(e.previousToken.line,e.previousToken.end.character),scope:e.currentScope})):super.parseAtom()}parseStatement(){let e=this,n=e.backpatches.peek();if(e.isType($t.TokenType.Keyword))switch(e.token.value){case ti.GreybelKeyword.Include:case ti.GreybelKeyword.IncludeWithComment:{e.next();let i=e.parseFeatureIncludeStatement();e.addItemToLines(i),n.body.push(i);return}case ti.GreybelKeyword.Import:case ti.GreybelKeyword.ImportWithComment:{e.next();let i=e.parseFeatureImportStatement();e.addItemToLines(i),n.body.push(i);return}case ti.GreybelKeyword.Envar:{e.next();let i=e.parseFeatureEnvarExpression();e.addItemToLines(i),n.body.push(i);return}case ti.GreybelKeyword.Inject:{e.next();let i=e.parseFeatureInjectExpression();e.addItemToLines(i),n.body.push(i);return}case ti.GreybelKeyword.Debugger:{e.next();let i=e.astProvider.featureDebuggerExpression({start:new $t.ASTPosition(e.previousToken.line,e.previousToken.start.character),end:new $t.ASTPosition(e.previousToken.line,e.previousToken.end.character),scope:e.currentScope});e.addItemToLines(i),n.body.push(i);return}default:break}super.parseStatement()}parseChunk(){let e=this;e.next();let n=e.token.start,r=e.astProvider.chunkAdvanced({start:n,end:null}),i=new $t.PendingChunk(r);for(e.backpatches.setDefault(i),e.pushScope(r);!ge.Selectors.EndOfFile(e.token)&&(e.skipNewlines(),!ge.Selectors.EndOfFile(e.token));)e.lexer.recordSnapshot(),e.statementErrors=[],e.parseStatement(),e.statementErrors.length>0&&e.tryToRecover();let s=e.backpatches.pop();for(;!(0,$t.isPendingChunk)(s);){let o=e.raise(`found open block ${s.block.type}`,new Sk.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),r.literals=e.literals,r.scopes=e.scopes,r.lines=e.lines,r.imports=e.imports,r.includes=e.includes,r.injects=e.injects,r}};$o.default=Mg});var Bt=T(ct=>{"use strict";var XA=ct&&ct.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Bo=ct&&ct.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&XA(e,t,n)},qg=ct&&ct.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ct,"__esModule",{value:!0});ct.Parser=ct.LexerValidator=ct.Lexer=void 0;var ZA=Sg();Object.defineProperty(ct,"Lexer",{enumerable:!0,get:function(){return qg(ZA).default}});var eO=_g();Object.defineProperty(ct,"LexerValidator",{enumerable:!0,get:function(){return qg(eO).default}});var tO=Tk();Object.defineProperty(ct,"Parser",{enumerable:!0,get:function(){return qg(tO).default}});Bo(jg(),ct);Bo(wg(),ct);Bo(ds(),ct);Bo(ps(),ct);Bo(Lg(),ct)});var Ng=T(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});Mc.Aggregator=void 0;var Lc=Bt(),me=Yt(),we=pe(),nO=cg(),ue=Jr(),ni=ug(),Ik=Om(),rO=rg(),Ek=ig(),Ck=bo(),iO=us(),Fg=class{get definitions(){return this._definitions}get parent(){return this._parent}constructor(e){var n;this._root=e.root,this._scope=e.scope,this._document=e.document,this._parent=(n=e.parent)!=null?n:null,this._definitions=new Map}factory(e){return new iO.Entity({kind:e,container:this._document.container})}createFunctionDescription(e,n=nO.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION){let r=this._document.getLastASTItemOfLine(e.start.line-1),i=this._document.findASTItemInLine(e.start.line,we.ASTType.Comment);if(r instanceof we.ASTComment){let s=new Set,o=[],l=e.start.line-1;for(;l>=0;){let c=this._document.getLastASTItemOfLine(l--);if(!s.has(c))if(c instanceof we.ASTComment)s.add(c),o.unshift(c.value);else break}return o.join(`
|
105
105
|
|
106
|
-
`)}else if(i instanceof we.ASTComment)return i.value;return n}resolveFunctionStatement(e){let n=me.SignatureDefinitionFunction.parse({type:me.SignatureDefinitionBaseType.Function,description:this.createFunctionDescription(e),arguments:e.parameters.map(r=>{var s,o,l;if(r.type===we.ASTType.Identifier)return{label:(s=r.name)!=null?s:"unknown",type:me.SignatureDefinitionBaseType.Any};let i=r;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(ue.CompletionItemKind.Function).addType(me.SignatureDefinitionBaseType.Function).addSignatureType((0,rO.enrichWithMetaInformation)(n)).setLine(e.start.line)}resolveParenthesisExpression(e){return this.resolveTypeWithDefault(e.expression)}resolveBinaryExpression(e){let n=this.factory(ue.CompletionItemKind.Expression).setLabel("Binary Expr").setLine(e.start.line),r=this.resolveTypeWithDefault(e.left),i=this.resolveTypeWithDefault(e.right);return n.extend(r),n.extend(i),n}resolveLogicalExpression(e){return this.factory(ue.CompletionItemKind.Expression).setLabel("Logical Expr").addType(me.SignatureDefinitionBaseType.Number).setLine(e.start.line)}resolveComparisonGroupExpression(e){return this.factory(ue.CompletionItemKind.Expression).setLabel("Comparison Group Expr").addType(me.SignatureDefinitionBaseType.Number).setLine(e.start.line)}resolveIsaExpression(e){return this.factory(ue.CompletionItemKind.Expression).setLabel("Isa Expr").addType(me.SignatureDefinitionBaseType.Number).setLine(e.start.line)}resolveCallStatement(e){let n=this.resolveNamespace(e);return n===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):n}resolveCallExpression(e){let n=this.resolveNamespace(e);return n===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):n}resolveUnaryExpression(e){let n=this.resolveNamespace(e);return n===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):n}resolveMapConstructorExpression(e){let n=this.factory(ue.CompletionItemKind.MapConstructor).addType(me.SignatureDefinitionBaseType.Map);for(let r=0;r<e.fields.length;r++){let i=e.fields[r],s=this.resolveTypeWithDefault(i.value).setLine(i.start.line);if(i.key.type===we.ASTType.StringLiteral)n.setProperty(i.key.value.toString(),s);else{let o=this.resolveTypeWithDefault(i.key).setLine(i.start.line);n.setProperty(o,s)}}return n.setLabel("{}").setLine(e.start.line)}resolveListConstructorExpression(e){let n=this.factory(ue.CompletionItemKind.ListConstructor).addType(me.SignatureDefinitionBaseType.List);for(let r=0;r<e.fields.length;r++){let i=e.fields[r],s=this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Number).setLine(i.start.line),o=this.resolveTypeWithDefault(i.value).setLine(i.start.line);n.setProperty(s,o)}return n.setLabel("[]").setLine(e.start.line)}resolveSliceExpression(e){let n=this.resolveNamespace(e).setLine(e.start.line);return n===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):n}resolveIndexExpression(e,n=!1){let r=this.resolveNamespace(e,n);return r===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):r}resolveMemberExpression(e,n=!1){let r=this.resolveNamespace(e,n);return r===null?this.factory(ue.CompletionItemKind.Property).addType(me.SignatureDefinitionBaseType.Any).setLabel(e.identifier.name).setLine(e.start.line):r}resolveIdentifier(e,n=!1){let r=this.resolveNamespace(e,n);return r===null?this.factory(ue.CompletionItemKind.Property).addType(me.SignatureDefinitionBaseType.Any).setLabel(e.name).setLine(e.start.line):r}resolveType(e,n=!1){if(e==null)return null;switch(e.type){case we.ASTType.ParenthesisExpression:return this.resolveParenthesisExpression(e);case we.ASTType.CallStatement:return this.resolveCallStatement(e);case we.ASTType.CallExpression:return this.resolveCallExpression(e);case we.ASTType.BinaryExpression:return this.resolveBinaryExpression(e);case we.ASTType.LogicalExpression:return this.resolveLogicalExpression(e);case we.ASTType.IsaExpression:return this.resolveIsaExpression(e);case we.ASTType.ComparisonGroupExpression:return this.resolveComparisonGroupExpression(e);case we.ASTType.FunctionDeclaration:return this.resolveFunctionStatement(e);case we.ASTType.SliceExpression:return this.resolveSliceExpression(e);case we.ASTType.IndexExpression:return this.resolveIndexExpression(e,n);case we.ASTType.MemberExpression:return this.resolveMemberExpression(e,n);case we.ASTType.Identifier:return this.resolveIdentifier(e,n);case we.ASTType.MapConstructorExpression:return this.resolveMapConstructorExpression(e);case we.ASTType.ListConstructorExpression:return this.resolveListConstructorExpression(e);case we.ASTType.NegationExpression:case we.ASTType.BinaryNegatedExpression:case we.ASTType.UnaryExpression:return this.resolveUnaryExpression(e);case we.ASTType.NilLiteral:return this.factory(ue.CompletionItemKind.Literal).addType("null").setLabel("null").setLine(e.start.line);case we.ASTType.StringLiteral:{let r=e.value.toString();return this.factory(ue.CompletionItemKind.Literal).addType(me.SignatureDefinitionBaseType.String).setLabel(`"${r.length>20?r.substr(0,20)+"...":r}"`).setLine(e.start.line)}case we.ASTType.NumericLiteral:case we.ASTType.BooleanLiteral:{let r=e.value.toString();return this.factory(ue.CompletionItemKind.Literal).addType(me.SignatureDefinitionBaseType.Number).setLabel(r).setLine(e.start.line)}case Lc.ASTType.FeatureFileExpression:return this.factory(ue.CompletionItemKind.Expression).addType(me.SignatureDefinitionBaseType.String).setLabel("File Expr").setLine(e.start.line);case Lc.ASTType.FeatureLineExpression:return this.factory(ue.CompletionItemKind.Expression).addType(me.SignatureDefinitionBaseType.Number).setLabel("Line Expr").setLine(e.start.line);case Lc.ASTType.FeatureEnvarExpression:return this.factory(ue.CompletionItemKind.Expression).addType(me.SignatureDefinitionBaseType.String).setLabel("Envar Expr").setLine(e.start.line);case Lc.ASTType.FeatureInjectExpression:return this.factory(ue.CompletionItemKind.Expression).addType(me.SignatureDefinitionBaseType.String).setLabel("Inject Expr").setLine(e.start.line);default:return null}}resolveTypeWithDefault(e,n=!1){var r;return(r=this.resolveType(e,n))!=null?r:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line)}resolveChain(e,n=!1){var l,c,a,u,d,p,h,m,f,g,b;if(e.length===0)return null;let r=null,i=e[0],s=((l=i.unary)==null?void 0:l.operator)==="@"&&!i.isInCallExpression||n&&e.length===1;if((0,ni.isResolveChainItemWithIdentifier)(i))if(i.getter.name==="globals")r=this._scope.globals;else if(i.getter.name==="outer")r=this._scope.outer;else if(i.getter.name==="locals")r=this._scope.locals;else if(i.getter.name==="super"){let v=(a=(c=this._document.getScopeContext(i.ref.scope))==null?void 0:c.scope.context)==null?void 0:a.values.get("i:__isa");v==null?r=this.factory(ue.CompletionItemKind.Constant).addType("null").setLabel("super"):r=v.copy({kind:ue.CompletionItemKind.Constant,label:"super",values:v.values})}else if(i.getter.name==="self"){let v=(u=this._document.getScopeContext(i.ref.scope))==null?void 0:u.scope.context;v==null?r=this.factory(ue.CompletionItemKind.Constant).addType("null").setLabel("self"):r=v.copy({kind:ue.CompletionItemKind.Constant,label:"self",values:v.values})}else r=(d=this._scope.resolveNamespace(i.getter.name,s))!=null?d:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLabel(i.getter.name);else if((0,ni.isResolveChainItemWithValue)(i))r=this.resolveTypeWithDefault(i.value,s);else return null;if(((p=i.unary)==null?void 0:p.operator)==="new"&&r!==null){let v=this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Map).setLabel(r.label);v.setProperty("__isa",r),r=v}let o=e.length;for(let v=1;v<o&&r!==null;v++){let _=e[v],w=((h=_.unary)==null?void 0:h.operator)==="@"&&!_.isInCallExpression||n&&e.length-1===v;if((0,ni.isResolveChainItemWithMember)(_))r=(m=r.resolveProperty(_.getter.name,w))!=null?m:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLabel(_.getter.name);else if((0,ni.isResolveChainItemWithIndex)(_))if((0,Ck.isValidIdentifierLiteral)(_.getter)){let S=_.getter.value.toString();r=(f=r.resolveProperty(S,_.isInCallExpression))!=null?f:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLabel(S)}else{let S=this.resolveTypeWithDefault(_.getter);r=(g=r.resolveProperty(S,_.isInCallExpression))!=null?g:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any)}else if(_.ref.type===we.ASTType.SliceExpression)r=r.copy();else return null;if(((b=_.unary)==null?void 0:b.operator)==="new"&&r!==null){let S=this.factory(ue.CompletionItemKind.Property).addType(me.SignatureDefinitionBaseType.Map).setLabel(r.label);S.setProperty("__isa",r),r=S}}return r}resolveNamespace(e,n=!1){let r=(0,Ek.createResolveChain)(e);return this.resolveChain(r,n)}defineNamespace(e,n){let r=(0,Ek.createResolveChain)(e),i=r.pop();if(r.length>0){let o=this.resolveChain(r);if(o===null)return!1;if((0,ni.isResolveChainItemWithMember)(i))return o.setProperty(i.getter.name,n);if((0,ni.isResolveChainItemWithIndex)(i)){if((0,Ck.isValidIdentifierLiteral)(i.getter))return o.setProperty(i.getter.value.toString(),n);{let l=this.resolveTypeWithDefault(i.getter);return o.setProperty(l,n)}}return!1}let s=this._scope;return(0,ni.isResolveChainItemWithIdentifier)(i)?s.setProperty(i.getter.name,n):!1}resolveAvailableAssignmentsWithQuery(e){let n=[],r=new Set([this,this._parent,this._document.getRootScopeContext().aggregator]);for(let i of r){let s=i.definitions;for(let o of s.keys())if(o.includes(e)){let l=s.get(o);n.push(...l)}}return n}resolveAvailableAssignments(e){let n=(0,Ik.createExpressionId)(e),r=this;n.startsWith("globals.")?(r=this._document.getRootScopeContext().aggregator,n=n.slice(8)):n.startsWith("locals.")?(r=this,n=n.slice(7)):n.startsWith("outer.")&&(r=this.parent,n=n.slice(6));let i=[],s=new Set([r,r._parent,r._document.getRootScopeContext().aggregator]);for(let o of s){if(o==null)continue;let l=o._definitions.get(n);l!=null&&i.push(...l)}return i}analyze(){var e,n;for(let r=0;r<this._root.assignments.length;r++){let i=this._root.assignments[r],s=(n=(e=this.resolveType(i.init))==null?void 0:e.copy().setLine(i.start.line))!=null?n:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(i.start.line);this.defineNamespace(i.variable,s);let o=(0,Ik.createExpressionId)(i.variable),l=this._definitions;o.startsWith("globals.")?(l=this._document.getRootScopeContext().aggregator.definitions,o=o.slice(8)):o.startsWith("locals.")?(l=this._definitions,o=o.slice(7)):o.startsWith("outer.")&&(l=this.parent.definitions,o=o.slice(6));let c=l.get(o);c?c.push(i):l.set(o,[i])}}};Mc.Aggregator=Fg});var Bg=T(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});qc.Document=void 0;var Hn=Yt(),sO=pe(),Rk=Jr(),Pk=Ng(),Ak=us(),Ok=yg(),$g=class t{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 n,r,i,s;this._root=e.root,this._container=e.container,this._scopeMapping=(n=e.scopeMapping)!=null?n:new WeakMap,this._intrinscis=(r=e.intrinsics)!=null?r: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(Hn.SignatureDefinitionBaseType.Map),funcRef:this._container.primitives.get(Hn.SignatureDefinitionBaseType.Function),number:this._container.primitives.get(Hn.SignatureDefinitionBaseType.Number),string:this._container.primitives.get(Hn.SignatureDefinitionBaseType.String),list:this._container.primitives.get(Hn.SignatureDefinitionBaseType.List)}}initApi(){let e=this._container.primitives.get(Hn.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 Ak.Entity({kind:Rk.CompletionItemKind.Constant,container:this._container,label:"globals"}).addType(Hn.SignatureDefinitionBaseType.Map)}analyzeScope(e){let n=this._scopeMapping.get(e.scope),r=new Ok.Scope({container:this._container,parent:n==null?void 0:n.scope,globals:this._globals}),i=new Pk.Aggregator({scope:r,root:e,document:this,parent:n==null?void 0:n.aggregator});this._scopeMapping.set(e,{scope:r,aggregator:i});let s=e.assignment instanceof sO.ASTAssignmentStatement?this.resolveNamespace(e.assignment.variable,!0):null;if(s!==null){let o=s==null?void 0:s.context;o!=null&&o.types.has(Hn.SignatureDefinitionBaseType.Map)&&o!==this._globals&&r.setContext(o)}if(i.analyze(),s!==null){let o=s.signatureDefinitions.last();if(o!=null){let l=o.getArguments();for(let c=0;c<l.length;c++){let a=l[c],u=r.resolveProperty(a.getLabel(),!0),d=a.getTypes().map(p=>p.type);u===null?r.setProperty(a.getLabel(),new Ak.Entity({kind:Rk.CompletionItemKind.Variable,container:this._container}).addType(...d)):(u.types.delete(Hn.SignatureDefinitionBaseType.Any),u.addType(...d))}}}}analyze(){let e=new Ok.Scope({container:this._container,globals:this._globals,locals:this._globals}),n=new Pk.Aggregator({scope:e,root:this._root,document:this});this._scopeMapping.set(this._root,{scope:e,aggregator:n}),n.analyze();for(let r=0;r<this._root.scopes.length;r++){let i=this._root.scopes[r];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 n;return(n=this._scopeMapping.get(e))!=null?n:null}getLastASTItemOfLine(e){let n=this._root.lines[e];return n&&n.length>0?n[n.length-1]:null}findASTItemInLine(e,n){let r=this._root.lines[e];if(r&&r.length>0){let i=r.find(s=>s.type===n);if(i)return i}return null}resolveAllAssignmentsWithQuery(e){let n=[],r=[this._root,...this._root.scopes];for(let i=0;i<r.length;i++){let o=this._scopeMapping.get(r[i]).aggregator.definitions;for(let l of o.keys())if(l.includes(e)){let c=o.get(l);n.push(...c)}}return n}resolveAvailableAssignments(e){var n,r;return(r=(n=this._scopeMapping.get(e.scope))==null?void 0:n.aggregator.resolveAvailableAssignments(e))!=null?r:[]}resolveType(e,n){var r,i;return(i=(r=this._scopeMapping.get(e.scope))==null?void 0:r.aggregator.resolveType(e,n))!=null?i:null}resolveTypeWithDefault(e,n){var r;return(r=this._scopeMapping.get(e.scope))==null?void 0:r.aggregator.resolveTypeWithDefault(e,n)}resolveNamespace(e,n=!1){var r,i;return(i=(r=this._scopeMapping.get(e.scope))==null?void 0:r.aggregator.resolveNamespace(e,n))!=null?i:null}merge(...e){let n=new t({root:this._root,container:this._container.copy()});for(let r of e)n._globals.extend(r._globals.copy({line:-1})),n._intrinscis.map.extend(r._intrinscis.map.copy({line:-1})),n._intrinscis.funcRef.extend(r._intrinscis.funcRef.copy({line:-1})),n._intrinscis.number.extend(r._intrinscis.number.copy({line:-1})),n._intrinscis.string.extend(r._intrinscis.string.copy({line:-1})),n._intrinscis.list.extend(r._intrinscis.list.copy({line:-1}));return n.analyze(),n}};qc.Document=$g});var Vg=T(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});Fc.ContainerProxy=void 0;var Ln=Yt(),Rr=us(),Dk=Jr(),jk=Ro(),Ug=Ic(),Wg=class t{get primitives(){return this._primitives}get types(){return this._types}constructor(e){var n,r;this._container=e.container,this._primitives=(n=e.primitives)!=null?n:this.createPrimitives(),this._types=(r=e.types)!=null?r:this.createTypes()}createPrimitives(){let e=new Map;for(let[n,r]of this._container.getPrimitives()){let i=new Rr.Entity({kind:Dk.CompletionItemKind.Constant,container:this,isAPI:n===Ln.SignatureDefinitionBaseType.General}).addType(Ln.SignatureDefinitionBaseType.Map).insertSignature(r);e.set(n,i)}return e}createTypes(){let e=new Map;for(let[n,r]of this._container.getTypes()){let i=new Rr.Entity({kind:Dk.CompletionItemKind.Constant,container:this}).addType(Ln.SignatureDefinitionBaseType.Map).insertSignature(r);e.set(n,i)}return e}getTypeSignature(e){var n,r;return(r=(n=this._primitives.get(e))!=null?n:this._types.get(e))!=null?r:null}searchDefinitionMatches(e,n){if(typeof e=="string")return this.searchDefinitionMatches([e],n);let r=e.includes(Ln.SignatureDefinitionBaseType.Any)?new Set(this._container.getAllVisibleTypes()):new Set(e),i=new Map;for(let s of r){let o=this.getTypeSignature(s);if(o===null)continue;let l=(0,Ug.lookupProperty)(o,n);l!==null&&i.set(s,l)}return i}getDefinition(e,n,r=!1){if(typeof e=="string")return this.getDefinition([e],n);let i=(0,Ug.lookupProperty)(this._primitives.get(Ln.SignatureDefinitionBaseType.Any),n);if(e.includes(Ln.SignatureDefinitionBaseType.Any)&&i)return(0,Rr.resolveEntity)(this,i,r);let s=this.searchDefinitionMatches(e,n);return s.size===0?null:s.size===1?(0,Rr.resolveEntity)(this,s.values().next().value,r):s.has(Ln.SignatureDefinitionBaseType.Any)?(0,Rr.resolveEntity)(this,s.get(Ln.SignatureDefinitionBaseType.Any),r):i!==null?(0,Rr.resolveEntity)(this,i,r):(0,Rr.resolveEntity)(this,s.values().next().value,r)}getGeneralDefinition(e,n=!1){let r=(0,Ug.lookupProperty)(this._primitives.get(Ln.SignatureDefinitionBaseType.General),e);return r==null?null:(0,Rr.resolveEntity)(this,r,n)}getAllIdentifier(e){let n=new Map;if(e===Ln.SignatureDefinitionBaseType.Any){for(let i of this._container.getAllVisibleTypes()){let s=this.getTypeSignature(i);s!=null&&(0,jk.injectIdentifers)(n,s)}return n}let r=this.getTypeSignature(e);return r!=null&&(0,jk.injectIdentifers)(n,r),n}copy(){return new t({container:this._container})}};Fc.ContainerProxy=Wg});var Lk=T(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});Nc.TypeManager=void 0;var oO=Bg(),aO=Vg(),Hg=class{constructor(e){this._container=new aO.ContainerProxy({container:e.container}),this._types=new Map}analyze(e,n){let r=new oO.Document({container:this._container.copy(),root:n});try{r.analyze()}catch(i){console.error(i)}return this._types.set(e,r),r}get(e){var n;return(n=this._types.get(e))!=null?n:null}};Nc.TypeManager=Hg});var Uo=T(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.TypeManager=X.ContainerProxy=X.Document=X.Aggregator=X.Scope=X.Entity=X.lookupProperty=X.isEligibleForProperties=X.injectIdentifers=X.isSignatureDefinitionFunction=X.isResolveChainItemWithValue=X.isResolveChainItemWithMember=X.isResolveChainItemWithIndex=X.isResolveChainItemWithIdentifier=X.CompletionItemKind=X.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION=X.ObjectSetIterator=X.ObjectSet=X.rotateBits=X.getStringHashCode=X.getHashCode=X.createResolveChain=X.enrichWithMetaInformation=X.createExpressionId=X.createExpressionHash=X.isValidIdentifierLiteral=void 0;var lO=bo();Object.defineProperty(X,"isValidIdentifierLiteral",{enumerable:!0,get:function(){return lO.isValidIdentifierLiteral}});var cO=NS();Object.defineProperty(X,"createExpressionHash",{enumerable:!0,get:function(){return cO.createExpressionHash}});var uO=Om();Object.defineProperty(X,"createExpressionId",{enumerable:!0,get:function(){return uO.createExpressionId}});var dO=rg();Object.defineProperty(X,"enrichWithMetaInformation",{enumerable:!0,get:function(){return dO.enrichWithMetaInformation}});var pO=ig();Object.defineProperty(X,"createResolveChain",{enumerable:!0,get:function(){return pO.createResolveChain}});var zg=Am();Object.defineProperty(X,"getHashCode",{enumerable:!0,get:function(){return zg.getHashCode}});Object.defineProperty(X,"getStringHashCode",{enumerable:!0,get:function(){return zg.getStringHashCode}});Object.defineProperty(X,"rotateBits",{enumerable:!0,get:function(){return zg.rotateBits}});var Mk=lg();Object.defineProperty(X,"ObjectSet",{enumerable:!0,get:function(){return Mk.ObjectSet}});Object.defineProperty(X,"ObjectSetIterator",{enumerable:!0,get:function(){return Mk.ObjectSetIterator}});var hO=cg();Object.defineProperty(X,"DEFAULT_CUSTOM_FUNCTION_DESCRIPTION",{enumerable:!0,get:function(){return hO.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION}});var fO=Jr();Object.defineProperty(X,"CompletionItemKind",{enumerable:!0,get:function(){return fO.CompletionItemKind}});var $c=ug();Object.defineProperty(X,"isResolveChainItemWithIdentifier",{enumerable:!0,get:function(){return $c.isResolveChainItemWithIdentifier}});Object.defineProperty(X,"isResolveChainItemWithIndex",{enumerable:!0,get:function(){return $c.isResolveChainItemWithIndex}});Object.defineProperty(X,"isResolveChainItemWithMember",{enumerable:!0,get:function(){return $c.isResolveChainItemWithMember}});Object.defineProperty(X,"isResolveChainItemWithValue",{enumerable:!0,get:function(){return $c.isResolveChainItemWithValue}});var mO=dg();Object.defineProperty(X,"isSignatureDefinitionFunction",{enumerable:!0,get:function(){return mO.isSignatureDefinitionFunction}});var gO=Ro();Object.defineProperty(X,"injectIdentifers",{enumerable:!0,get:function(){return gO.injectIdentifers}});var yO=kc();Object.defineProperty(X,"isEligibleForProperties",{enumerable:!0,get:function(){return yO.isEligibleForProperties}});var bO=Ic();Object.defineProperty(X,"lookupProperty",{enumerable:!0,get:function(){return bO.lookupProperty}});var vO=us();Object.defineProperty(X,"Entity",{enumerable:!0,get:function(){return vO.Entity}});var _O=yg();Object.defineProperty(X,"Scope",{enumerable:!0,get:function(){return _O.Scope}});var wO=Ng();Object.defineProperty(X,"Aggregator",{enumerable:!0,get:function(){return wO.Aggregator}});var xO=Bg();Object.defineProperty(X,"Document",{enumerable:!0,get:function(){return xO.Document}});var SO=Vg();Object.defineProperty(X,"ContainerProxy",{enumerable:!0,get:function(){return SO.ContainerProxy}});var kO=Lk();Object.defineProperty(X,"TypeManager",{enumerable:!0,get:function(){return kO.TypeManager}})});var Gg=T(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.getSymbolItemKind=hs.getCompletionItemKind=void 0;var It=Uo(),TO=t=>{switch(t){case It.CompletionItemKind.Constant:return 21;case It.CompletionItemKind.Variable:return 6;case It.CompletionItemKind.Expression:return 6;case It.CompletionItemKind.Function:return 3;case It.CompletionItemKind.ListConstructor:case It.CompletionItemKind.MapConstructor:case It.CompletionItemKind.Literal:case It.CompletionItemKind.Unknown:return 12}};hs.getCompletionItemKind=TO;var IO=t=>{switch(t){case It.CompletionItemKind.Constant:return 14;case It.CompletionItemKind.Variable:return 13;case It.CompletionItemKind.Expression:return 13;case It.CompletionItemKind.Function:return 12;case It.CompletionItemKind.ListConstructor:return 18;case It.CompletionItemKind.MapConstructor:return 19;case It.CompletionItemKind.Literal:case It.CompletionItemKind.Unknown:return 13}};hs.getSymbolItemKind=IO});var Yg=T(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});Bc.findEx=void 0;var EO=pe(),CO=function(t){return{ParenthesisExpression:(e,n)=>{t(e.expression,n)},AssignmentStatement:function(e,n){t(e.init,n),t(e.variable,n)},MemberExpression:function(e,n){t(e.base,n),t(e.identifier,n)},FunctionDeclaration:function(e,n){for(let r=0;r<e.parameters.length;r++)t(e.parameters[r],n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},MapConstructorExpression:function(e,n){for(let r=0;r<e.fields.length;r++)t(e.fields[r],n)},ReturnStatement:function(e,n){e.argument&&t(e.argument,n)},WhileStatement:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},IndexExpression:function(e,n){t(e.base,n),t(e.index,n)},SliceExpression:function(e,n){t(e.base,n),t(e.left,n),t(e.right,n)},ListValue:function(e,n){t(e.value,n)},MapKeyString:function(e,n){t(e.key,n),t(e.value,n)},IfShortcutStatement:function(e,n){for(let r=0;r<e.clauses.length;r++)t(e.clauses[r],n)},IfShortcutClause:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ElseifShortcutClause:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ElseShortcutClause:function(e,n){for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ForGenericStatement:function(e,n){t(e.variable,n),t(e.iterator,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},IfStatement:function(e,n){for(let r=0;r<e.clauses.length;r++)t(e.clauses[r],n)},IfClause:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ElseifClause:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ElseClause:function(e,n){for(let r=0;r<e.body.length;r++)t(e.body[r],n)},NegationExpression:function(e,n){t(e.argument,n)},CallExpression:function(e,n){t(e.base,n);for(let r=0;r<e.arguments.length;r++)t(e.arguments[r],n)},CallStatement:function(e,n){t(e.expression,n)},ListConstructorExpression:function(e,n){for(let r=0;r<e.fields.length;r++)t(e.fields[r],n)},BinaryExpression:function(e,n){t(e.left,n),t(e.right,n)},BinaryNegatedExpression:function(e,n){t(e.argument,n)},IsaExpression:function(e,n){t(e.left,n),t(e.right,n)},LogicalExpression:function(e,n){t(e.left,n),t(e.right,n)},ComparisonGroupExpression:function(e,n){for(let r=0;r<e.expressions.length;r++)t(e.expressions[r],n)},UnaryExpression:function(e,n){t(e.argument,n)},Chunk:function(e,n){for(let r=0;r<e.body.length;r++)t(e.body[r],n)},InvalidCodeExpression:()=>{}}},Kg=class{constructor(e){this.map=CO(this.visit.bind(this)),this.callback=e,this.state={exit:!1}}visit(e,n=0){let r=this;if(e==null)return;if(e.type==null)throw console.error("Error ast type:",e),new Error("Unexpected as type");if(r.state=r.callback(e,n),r.state.exit||r.state.skip)return;let i=r.map[e.type];i!=null&&i.call(r,e,n+1)}};function RO(t,e){let n=[];return new Kg((i,s)=>{let o=t(i,s)||{};return o.valid&&i.type!==EO.ASTType.InvalidCodeExpression&&n.push(i),{exit:!!o.exit,skip:!!o.skip}}).visit(e),n}Bc.findEx=RO});var Fk=T(qk=>{"use strict";Object.defineProperty(qk,"__esModule",{value:!0});var ye=Yt();ye.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"]);ye.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}"]);ye.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."]);ye.VariationRegistry.add("PlayerUtils.FirewallPingStatus",["Connection refused. Address unreachable","Connection refused. The target is behind a firewall."]);ye.VariationRegistry.add("Computer.CheckInicio",["Fatal error: ${filepath} corrupted!","Kernel panic: missing ${filepath} file!","Graphics error: ${filepath} not found!","Fatal error: ${filepath} not found!"]);ye.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"]);ye.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"]);ye.VariationRegistry.add("BlockchainSystem.AddWallet",["Error: Wallet user already exists.","Error: Only one wallet per player allowed."]);ye.VariationRegistry.add("BlockchainSystem.RemoveCurrency",["Error: ${coinname} does not exist","Error: incorrect user/password"]);ye.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."]);ye.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"]);ye.VariationRegistry.add("BlockchainSystem.SetAddress",["Error: ${coinName} does not exist"]);ye.VariationRegistry.add("BlockchainSystem.GetAddress",["Error: ${coinName} does not exist"]);ye.VariationRegistry.add("BlockchainSystem.ResetCoinPass",["Error: coin does not exist","Error: Only the account owner can change the password"]);ye.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"]);ye.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"]);ye.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."]);ye.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"]);ye.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"]);ye.VariationRegistry.add("FileSystem.UpdatePermisos",["permission denied","permission denied. File protected.","Wrong format."]);ye.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"]);ye.VariationRegistry.add("PlayerUtils.RemoveFile",["file not found: ${path}","permission denied","permission denied. File protected.","unknown error :/"]);ye.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."]);ye.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."]);ye.VariationRegistry.add("PlayerUtils.ConnectToService",["Invalid service ID","can't connect: incorrect user/password"]);ye.VariationRegistry.add("BlockchainSystem.SetInfoSubWallet",["Error: ${coinName} does not exist","Error: ${subWalletUser} does not exist","Error: main wallet linked to ${subWalletUser} does not exist anymore"]);ye.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"]);ye.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"]);ye.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"]);ye.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 Nk=T((k5,PO)=>{PO.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 $k=T((T5,AO)=>{AO.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 Bk=T((I5,OO)=>{OO.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 are `null`, 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']},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 Uk=T((E5,DO)=>{DO.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 Wk=T((C5,jO)=>{jO.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 Vk=T((R5,LO)=>{LO.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 Hk=T((P5,MO)=>{MO.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 zk=T((A5,qO)=>{qO.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 Gk=T((O5,FO)=>{FO.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"]},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` with the path of the file. In case the file gets deleted it will still returns it's path 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 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)']},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 Kk=T((D5,NO)=>{NO.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 Yk=T((j5,$O)=>{$O.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 Qk=T((L5,BO)=>{BO.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"`, `"file"`, `"function"`, `"list"`, `"map"`, `"MetaLib"`, `"MetaMail"`, `"MetaxploitLib"`, `"NetSession"`, `"null"`, `"number"`, `"port"`, `"router"`, `"service"`, `"shell"`, `"ftpshell"`, `"string"`, `"subwallet"`, `"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)']},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"]},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` with the path of the file. In case the file gets deleted, it will still return its path 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 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))']},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']}}});var Jk=T((M5,UO)=>{UO.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 Xk=T((q5,WO)=>{WO.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 Zk=T((F5,VO)=>{VO.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)']}}});var e0=T((N5,HO)=>{HO.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 t0=T(($5,zO)=>{zO.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 n0=T((B5,GO)=>{GO.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 r0=T((U5,KO)=>{KO.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 i0=T((W5,YO)=>{YO.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 s0=T((V5,QO)=>{QO.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 o0=T((H5,JO)=>{JO.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 a0=T((z5,XO)=>{XO.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 l0=T((G5,ZO)=>{ZO.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 c0=T((K5,eD)=>{eD.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 u0=T((Y5,tD)=>{tD.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 d0=T(Wo=>{"use strict";var Pe=Wo&&Wo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Wo,"__esModule",{value:!0});var nD=Pe(Nk()),rD=Pe($k()),iD=Pe(Bk()),sD=Pe(Uk()),oD=Pe(Wk()),aD=Pe(Vk()),lD=Pe(Hk()),cD=Pe(zk()),uD=Pe(Gk()),dD=Pe(Kk()),pD=Pe(Yk()),hD=Pe(Qk()),fD=Pe(Jk()),mD=Pe(Xk()),gD=Pe(Zk()),yD=Pe(e0()),bD=Pe(t0()),vD=Pe(n0()),_D=Pe(r0()),wD=Pe(i0()),xD=Pe(s0()),SD=Pe(o0()),kD=Pe(a0()),TD=Pe(l0()),ID=Pe(c0()),ED=Pe(u0()),CD={any:nD.default,aptClient:rD.default,blockchain:iD.default,class:sD.default,ctfEvent:cD.default,coin:oD.default,computer:aD.default,crypto:lD.default,function:pD.default,file:uD.default,ftpShell:dD.default,general:hD.default,list:fD.default,map:mD.default,metaLib:gD.default,metaMail:yD.default,metaxploit:bD.default,netSession:vD.default,port:wD.default,router:xD.default,service:SD.default,shell:kD.default,string:TD.default,subWallet:ID.default,wallet:ED.default,number:_D.default};Wo.default=CD});var p0=T((J5,RD)=>{RD.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 h0=T((X5,PD)=>{PD.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 f0=T((Z5,AD)=>{AD.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.","!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 m0=T((eU,OD)=>{OD.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"]},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 g0=T((tU,DD)=>{DD.exports={type:"class",hidden:!0,definitions:{}}});var y0=T((nU,jD)=>{jD.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 b0=T((rU,LD)=>{LD.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 v0=T((iU,MD)=>{MD.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 _0=T((sU,qD)=>{qD.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 w0=T((oU,FD)=>{FD.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"]},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",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"]},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 x0=T((aU,ND)=>{ND.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 S0=T((lU,$D)=>{$D.exports={type:"function",hidden:!0,definitions:{}}});var k0=T((cU,BD)=>{BD.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","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.","!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"]},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"]},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"}],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"]},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"]},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"}]}}}});var T0=T((uU,UD)=>{UD.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 I0=T((dU,WD)=>{WD.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 E0=T((pU,VD)=>{VD.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"]}}}});var C0=T((hU,HD)=>{HD.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 R0=T((fU,zD)=>{zD.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 P0=T((mU,GD)=>{GD.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 A0=T((gU,KD)=>{KD.exports={type:"number",definitions:{}}});var O0=T((yU,YD)=>{YD.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 D0=T((bU,QD)=>{QD.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 j0=T((vU,JD)=>{JD.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 L0=T((_U,XD)=>{XD.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 M0=T((wU,ZD)=>{ZD.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 q0=T((xU,ej)=>{ej.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 F0=T((SU,tj)=>{tj.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 N0=T(ce=>{"use strict";var xe=ce&&ce.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ce,"__esModule",{value:!0});ce.getSiteDescription=ce.getSiteLanguageFile=ce.isNative=ce.greyscriptMeta=void 0;Fk();var nj=Yt(),rj=xe(d0()),ij=xe(p0()),sj=xe(h0()),oj=xe(f0()),aj=xe(m0()),lj=xe(g0()),cj=xe(y0()),uj=xe(b0()),dj=xe(v0()),pj=xe(_0()),hj=xe(w0()),fj=xe(x0()),mj=xe(S0()),gj=xe(k0()),yj=xe(T0()),bj=xe(I0()),vj=xe(E0()),_j=xe(C0()),wj=xe(R0()),xj=xe(P0()),Sj=xe(A0()),kj=xe(O0()),Tj=xe(D0()),Ij=xe(j0()),Ej=xe(L0()),Cj=xe(M0()),Rj=xe(q0()),Pj=xe(F0());ce.greyscriptMeta=new nj.Container;ce.greyscriptMeta.addTypeSignatureFromPayload(sj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(oj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(aj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(pj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(lj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(cj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(uj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(dj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(hj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(fj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(mj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(gj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(yj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(bj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(vj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(_j.default);ce.greyscriptMeta.addTypeSignatureFromPayload(wj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(xj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Sj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(kj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Tj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Ij.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Ej.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Cj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Rj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Pj.default);ce.greyscriptMeta.addMetaFromPayload("en",rj.default);var Aj=function(t,e){return!!ce.greyscriptMeta.getDefinition(t,e)};ce.isNative=Aj;var Oj=function(t){switch(t===void 0&&(t="en"),t){case"en":return ij.default;default:throw new Error('Language "'.concat(t,'" is unknown.'))}};ce.getSiteLanguageFile=Oj;var Dj=function(t,e){var n=(0,ce.getSiteLanguageFile)(e);return n==null?void 0:n[t]};ce.getSiteDescription=Dj});var $0=T(ri=>{"use strict";var jj=ri&&ri.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Lj=ri&&ri.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&jj(e,t,n)};Object.defineProperty(ri,"__esModule",{value:!0});Lj(N0(),ri)});var Vo=T(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.lookupBase=gn.lookupIdentifier=void 0;var Mj=$0(),zn=pe(),qj=Uo(),Fj=t=>{switch(t.type){case zn.ASTType.CallStatement:return(0,gn.lookupIdentifier)(t.expression);case zn.ASTType.CallExpression:return(0,gn.lookupIdentifier)(t.base);case zn.ASTType.Identifier:return t;case zn.ASTType.MemberExpression:return(0,gn.lookupIdentifier)(t.identifier);case zn.ASTType.IndexExpression:return(0,gn.lookupIdentifier)(t.index);default:return null}};gn.lookupIdentifier=Fj;var Nj=(t=null)=>{switch(t==null?void 0:t.type){case zn.ASTType.MemberExpression:return t.base;case zn.ASTType.IndexExpression:return t.base;case zn.ASTType.CallExpression:return t.base;case zn.ASTType.SliceExpression:return t.base;default:return null}};gn.lookupBase=Nj;gn.default=new qj.TypeManager({container:Mj.greyscriptMeta})});var ms=T(ln=>{"use strict";var $j=ln&&ln.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Bj=ln&&ln.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),U0=ln&&ln.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&$j(e,t,n);return Bj(e,t),e};Object.defineProperty(ln,"__esModule",{value:!0});ln.LookupHelper=ln.buildTypeDocument=void 0;var Uj=Yt(),B0=pe(),fs=Uo(),Wj=U0(Yg()),ii=U0(Vo());function Jg(r,i){return W(this,arguments,function*(t,e,n=new Map){let s=t.uri;if(n.has(s))return n.get(s);let o=ii.default.get(s);if(n.set(s,null),!o)return null;let l=[],c=yield e.documentManager.get(t).getImports();yield Promise.all(c.map(u=>W(this,null,function*(){let{document:d,textDocument:p}=u;if(!d)return;let h=yield Jg(p,e,n);h!==null&&l.push(h)})));let a=o.merge(...l);return n.set(s,a),a})}ln.buildTypeDocument=Jg;var Qg=class{constructor(e,n){this.document=e,this.context=n}findAllAssignmentsOfIdentifier(e,n){return ii.default.get(this.document.uri).getScopeContext(n).aggregator.resolveAvailableAssignmentsWithQuery(e)}findAllAssignmentsOfItem(e,n){return ii.default.get(this.document.uri).getScopeContext(n).aggregator.resolveAvailableAssignments(e)}findAllAvailableIdentifierInRoot(){return ii.default.get(this.document.uri).getRootScopeContext().scope.getAllIdentifier()}findAllAvailableIdentifier(e){return ii.default.get(this.document.uri).getScopeContext(e).scope.getAllIdentifier()}findAllAvailableIdentifierRelatedToPosition(e){let n=ii.default.get(this.document.uri),r=new Map,i=n.getScopeContext(e.scope);i.scope.isSelfAvailable()&&r.set("self",{kind:fs.CompletionItemKind.Constant,line:-1}),i.scope.isSuperAvailable()&&r.set("super",{kind:fs.CompletionItemKind.Constant,line:-1});let s=new Map;(0,fs.injectIdentifers)(s,i.scope);let o=Array.from(s.entries()).map(([l,c])=>st({identifier:l},c)).sort((l,c)=>l.line-c.line);for(let l=0;l<o.length;l++){let c=o[l];if(c.line>=e.end.line)break;r.set(c.identifier,{kind:c.kind,line:c.line})}i.scope.locals!==i.scope.globals&&(0,fs.injectIdentifers)(r,i.scope.globals),i.scope.outer&&(0,fs.injectIdentifers)(r,i.scope.outer);for(let l of n.container.getAllIdentifier(Uj.SignatureDefinitionBaseType.General))r.set(...l);return r}lookupAST(e){let n=this,i=this.context.documentManager.get(n.document).document.lines[e.line+1];if(!i)return null;for(let s=0;s<i.length;s++){let o=i[s],l=Wj.findEx((a,u)=>{let d=a.start.line-1,p=a.start.character-1,h=a.end.line-1,m=a.end.character-1;return d>e.line?{exit:!0}:d<h?{valid:e.line>d&&e.line<h||e.line===d&&p<=e.character||e.line===h&&m>=e.character}:{valid:d<=e.line&&p<=e.character&&h>=e.line&&m>=e.character}},o),c=l.pop();if(c)return{closest:c,outer:l}}return null}lookupBasePath(e){return W(this,null,function*(){let n=yield this.buildTypeMap();if(n===null)return null;let r=(0,ii.lookupBase)(e);return r?n.resolveNamespace(r):null})}buildTypeMap(){return W(this,null,function*(){return yield Jg(this.document,this.context)})}lookupTypeInfo(r){return W(this,arguments,function*({closest:e,outer:n}){let i=yield this.buildTypeMap();if(i===null)return null;let s=n.length>0?n[n.length-1]:void 0;return(s==null?void 0:s.type)===B0.ASTType.MemberExpression&&e===s.identifier||(s==null?void 0:s.type)===B0.ASTType.IndexExpression&&e===s.index&&(0,fs.isValidIdentifierLiteral)(e)?i.resolveType(s,!0):i.resolveType(e,!0)})}lookupType(e){let n=this,r=n.lookupAST(e);return r?n.lookupTypeInfo(r):null}};ln.LookupHelper=Qg});var W0=T(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.AVAILABLE_CONSTANTS=void 0;Uc.AVAILABLE_CONSTANTS=["true","false","null","params","globals","locals","outer"].map(t=>({label:t,kind:21}))});var Wc=T(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.GreyScriptKeyword=void 0;var Vj;(function(t){t.ImportCode="import_code"})(Vj=Ho.GreyScriptKeyword||(Ho.GreyScriptKeyword={}))});var ey=T(Zg=>{"use strict";Object.defineProperty(Zg,"__esModule",{value:!0});var Hj=pe(),V0=Bt(),zj=Wc(),Xg=class extends V0.LexerValidator{constructor(){super(...arguments),this.isKeyword=Set.prototype.has.bind(new Set([...Object.values(Hj.Keyword),...Object.values(V0.GreybelKeyword),...Object.values(zj.GreyScriptKeyword)]))}};Zg.default=Xg});var ny=T(zo=>{"use strict";var Gj=zo&&zo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(zo,"__esModule",{value:!0});var Kj=Bt(),Yj=Gj(ey()),ty=class extends Kj.Lexer{constructor(e,n={}){n.validator=n.validator||new Yj.default,super(e,n)}};zo.default=ty});var iy=T(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});Vc.ASTChunkGreyScript=void 0;var Qj=Bt(),ry=class t extends Qj.ASTChunkAdvanced{constructor(e){super(e),this.nativeImports=e.nativeImports||[]}clone(){return new t({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,scope:this.scope})}};Vc.ASTChunkGreyScript=ry});var sy=T(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.ASTType=void 0;var Jj;(function(t){t.ImportCodeExpression="ImportCodeExpression"})(Jj=Go.ASTType||(Go.ASTType={}))});var ay=T(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});Hc.ASTImportCodeExpression=void 0;var Xj=pe(),Zj=sy(),oy=class t extends Xj.ASTBase{constructor(e){super(Zj.ASTType.ImportCodeExpression,e),this.directory=e.directory}toString(){return`ImportCode[${this.start}-${this.end}][${this.directory}]`}clone(){return new t({directory:this.directory,start:this.start,end:this.end,scope:this.scope})}};Hc.ASTImportCodeExpression=oy});var cy=T(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.ASTImportCodeExpression=Mn.ASTChunkGreyScript=Mn.ASTType=Mn.ASTProvider=void 0;var eL=Bt(),tL=iy(),nL=ay(),ly=class extends eL.ASTProvider{chunkAdvanced(e){return new tL.ASTChunkGreyScript(e)}importCodeExpression(e){return new nL.ASTImportCodeExpression(e)}};Mn.ASTProvider=ly;var rL=sy();Object.defineProperty(Mn,"ASTType",{enumerable:!0,get:function(){return rL.ASTType}});var iL=iy();Object.defineProperty(Mn,"ASTChunkGreyScript",{enumerable:!0,get:function(){return iL.ASTChunkGreyScript}});var sL=ay();Object.defineProperty(Mn,"ASTImportCodeExpression",{enumerable:!0,get:function(){return sL.ASTImportCodeExpression}})});var H0=T(Ko=>{"use strict";var oL=Ko&&Ko.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ko,"__esModule",{value:!0});var gs=pe(),Ot=Bt(),zc=Gi(),ys=Ji(),aL=cy(),lL=oL(ny()),cL=Wc(),uy=class extends Ot.Parser{constructor(e,n={}){n.lexer=n.lexer||new lL.default(e,{unsafe:n.unsafe,tabWidth:n.tabWidth}),n.astProvider=n.astProvider||new aL.ASTProvider,super(e,n);let r=this;r.nativeImports=[]}parseStatement(){let e=this;if(e.isType(gs.TokenType.Keyword))switch(e.token.value){case cL.GreyScriptKeyword.ImportCode:e.next();let r=e.parseNativeImportCodeStatement();e.addItemToLines(r),e.backpatches.peek().body.push(r);return;default:break}return super.parseStatement()}parseFunctionDeclaration(e,n=!1,r=!1){let i=this;if(!Ot.Selectors.Function(i.token))return i.parseOr(n,r);i.next();let s=i.previousToken.start,o=i.astProvider.functionStatement({start:s,end:null,scope:i.currentScope,parent:i.outerScopes[i.outerScopes.length-1],assignment:i.currentAssignment}),l=[];if(i.pushScope(o),!Ot.SelectorGroups.BlockEndOfLine(i.token)){for(i.requireToken(Ot.Selectors.LParenthesis,s);!Ot.SelectorGroups.FunctionDeclarationArgEnd(i.token);){let a=i.parseIdentifier(),u=a.start;if(i.consume(Ot.Selectors.Assign)){let d=i.parseExpr(null),p=i.astProvider.assignmentStatement({variable:a,init:d,start:u,end:i.previousToken.end,scope:i.currentScope});i.currentScope.assignments.push(p),l.push(p)}else{let d=i.astProvider.assignmentStatement({variable:a,init:i.astProvider.unknown({start:u,end:i.previousToken.end,scope:i.currentScope}),start:u,end:i.previousToken.end,scope:i.currentScope});i.currentScope.assignments.push(d),l.push(a)}if(Ot.Selectors.RParenthesis(i.token))break;if(i.requireToken(Ot.Selectors.ArgumentSeperator,s),Ot.Selectors.RParenthesis(i.token)){i.raise("expected argument instead received right parenthesis",new ys.Range(i.previousToken.end,i.previousToken.end));break}}i.requireToken(Ot.Selectors.RParenthesis,s)}o.parameters=l;let c=new gs.PendingFunction(o);return i.backpatches.push(c),c.onComplete=a=>{e!==null?(e.end=a.block.end,i.addItemToLines(e)):i.addItemToLines(a.block)},o}parseNativeImportCodeStatement(){var e,n,r,i;let s=this,o=s.previousToken.start;if(!s.consume(Ot.Selectors.LParenthesis))return s.raise("expected import_code to have opening parenthesis",new ys.Range(o,new zc.Position((e=s.token.lastLine)!==null&&e!==void 0?e:s.token.line,s.token.end.character))),s.parseInvalidCode();let l;if(gs.TokenType.StringLiteral===s.token.type)l=s.token.value,s.next();else return s.raise("expected import_code argument to be string literal",new ys.Range(o,new zc.Position((n=s.token.lastLine)!==null&&n!==void 0?n:s.token.line,s.token.end.character))),s.parseInvalidCode();if(s.consume(Ot.Selectors.ImportCodeSeperator)){if(!s.isType(gs.TokenType.StringLiteral))return s.raise("expected import_code argument to be string literal",new ys.Range(o,new zc.Position((r=s.token.lastLine)!==null&&r!==void 0?r: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(Ot.Selectors.RParenthesis))return s.raise("expected import_code to have closing parenthesis",new ys.Range(o,new zc.Position((i=s.token.lastLine)!==null&&i!==void 0?i:s.token.line,s.token.end.character))),s.parseInvalidCode();let c=s.astProvider.importCodeExpression({directory:l,start:o,end:s.previousToken.end,scope:s.currentScope});return s.nativeImports.push(c),c}parseChunk(){let e=this;e.next();let n=e.token.start,r=e.astProvider.chunkAdvanced({start:n,end:null}),i=new gs.PendingChunk(r);for(e.backpatches.setDefault(i),e.pushScope(r);!Ot.Selectors.EndOfFile(e.token)&&(e.skipNewlines(),!Ot.Selectors.EndOfFile(e.token));)e.lexer.recordSnapshot(),e.statementErrors=[],e.parseStatement(),e.statementErrors.length>0&&e.tryToRecover();let s=e.backpatches.pop();for(;!(0,gs.isPendingChunk)(s);){let o=e.raise(`found open block ${s.block.type}`,new ys.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),r.literals=e.literals,r.scopes=e.scopes,r.lines=e.lines,r.nativeImports=e.nativeImports,r.imports=e.imports,r.includes=e.includes,r.injects=e.injects,r}};Ko.default=uy});var Gn=T(Et=>{"use strict";var uL=Et&&Et.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),z0=Et&&Et.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&uL(e,t,n)},dy=Et&&Et.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Et,"__esModule",{value:!0});Et.Parser=Et.LexerValidator=Et.Lexer=void 0;var dL=ny();Object.defineProperty(Et,"Lexer",{enumerable:!0,get:function(){return dy(dL).default}});var pL=ey();Object.defineProperty(Et,"LexerValidator",{enumerable:!0,get:function(){return dy(pL).default}});var hL=H0();Object.defineProperty(Et,"Parser",{enumerable:!0,get:function(){return dy(hL).default}});z0(cy(),Et);z0(Wc(),Et)});var G0=T(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.AVAILABLE_KEYWORDS=void 0;var bs=Bt(),fL=Gn(),Ct=pe();Gc.AVAILABLE_KEYWORDS=[Ct.Keyword.If,Ct.Keyword.In,Ct.Keyword.Or,Ct.Keyword.And,Ct.Keyword.Isa,Ct.Keyword.For,Ct.Keyword.New,Ct.Keyword.Not,Ct.Keyword.End,Ct.Keyword.Then,Ct.Keyword.Else,Ct.Keyword.Break,Ct.Keyword.While,Ct.Keyword.Return,Ct.Keyword.Function,Ct.Keyword.Continue,fL.GreyScriptKeyword.ImportCode,bs.GreybelKeyword.Envar,bs.GreybelKeyword.Import,bs.GreybelKeyword.Include,bs.GreybelKeyword.Debugger,bs.GreybelKeyword.Line,bs.GreybelKeyword.File].map(t=>({label:t,kind:14}))});var K0=T(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});Kc.AVAILABLE_OPERATORS=void 0;var Yo=ps(),mt=pe();Kc.AVAILABLE_OPERATORS=[mt.Operator.Plus,mt.Operator.Asterik,mt.Operator.Minus,mt.Operator.Slash,mt.Operator.Power,mt.Operator.Modulo,mt.Operator.LessThan,mt.Operator.GreaterThan,mt.Operator.LessThanOrEqual,mt.Operator.GreaterThanOrEqual,mt.Operator.NotEqual,mt.Operator.Equal,mt.Operator.AddShorthand,mt.Operator.SubtractShorthand,mt.Operator.MultiplyShorthand,mt.Operator.DivideShorthand,Yo.Operator.BitwiseAnd,Yo.Operator.BitwiseOr,Yo.Operator.LeftShift,Yo.Operator.RightShift,Yo.Operator.UnsignedRightShift,mt.Operator.Assign,mt.Operator.Reference].map(t=>({label:t,kind:24}))});var J0=T(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.activate=ut.getDefaultCompletionList=ut.getPropertyCompletionList=ut.transformToCompletionItems=void 0;var Y0=pe(),mL=Gg(),Q0=ms(),gL=W0(),yL=G0(),bL=K0(),vL=t=>{let e=[];for(let[n,r]of t)e.push({label:n,kind:(0,mL.getCompletionItemKind)(r.kind)});return e};ut.transformToCompletionItems=vL;var _L=(t,e)=>W(ut,null,function*(){let n=yield t.lookupBasePath(e);return n===null?[]:(0,ut.transformToCompletionItems)(n.getAllIdentifier())});ut.getPropertyCompletionList=_L;var wL=()=>[...yL.AVAILABLE_KEYWORDS,...bL.AVAILABLE_OPERATORS,...gL.AVAILABLE_CONSTANTS];ut.getDefaultCompletionList=wL;function xL(t){t.connection.onCompletion(e=>W(this,null,function*(){if(!t.getConfiguration().autocomplete)return;let n=yield t.fs.getTextDocument(e.textDocument.uri);if(n==null)return;let r=yield t.documentManager.getLatest(n),i=new Q0.LookupHelper(r.textDocument,t),s=i.lookupAST(e.position),o=[],l=!1;if(s){let{closest:u}=s;u instanceof Y0.ASTMemberExpression?(o.push(...yield(0,ut.getPropertyCompletionList)(i,u)),l=!0):u instanceof Y0.ASTIndexExpression?(o.push(...yield(0,ut.getPropertyCompletionList)(i,u)),l=!0):o.push(...(0,ut.getDefaultCompletionList)())}else o.push(...(0,ut.getDefaultCompletionList)()),o.push(...(0,ut.transformToCompletionItems)(i.findAllAvailableIdentifierInRoot()));if(!s||l)return o;let c=new Set([...o.map(u=>u.label)]),a=yield r.getImports();for(let u of a){let{document:d}=u;if(!d)continue;let p=new Q0.LookupHelper(u.textDocument,t);o.push(...(0,ut.transformToCompletionItems)(p.findAllAvailableIdentifier(d)).filter(h=>!c.has(h.label)).map(h=>(c.add(h.label),h)))}return o.push(...(0,ut.transformToCompletionItems)(i.findAllAvailableIdentifierRelatedToPosition(s.closest)).filter(u=>!c.has(u.label))),o})),t.connection.onCompletionResolve(e=>e)}ut.activate=xL});var Z0=T((WU,X0)=>{"use strict";X0.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 py=T((VU,tT)=>{var Qo=Z0(),eT={};for(let t of Object.keys(Qo))eT[Qo[t]]=t;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"]}};tT.exports=z;for(let t of Object.keys(z)){if(!("channels"in z[t]))throw new Error("missing channels property: "+t);if(!("labels"in z[t]))throw new Error("missing channel labels property: "+t);if(z[t].labels.length!==z[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:n}=z[t];delete z[t].channels,delete z[t].labels,Object.defineProperty(z[t],"channels",{value:e}),Object.defineProperty(z[t],"labels",{value:n})}z.rgb.hsl=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(e,n,r),s=Math.max(e,n,r),o=s-i,l,c;s===i?l=0:e===s?l=(n-r)/o:n===s?l=2+(r-e)/o:r===s&&(l=4+(e-n)/o),l=Math.min(l*60,360),l<0&&(l+=360);let a=(i+s)/2;return s===i?c=0:a<=.5?c=o/(s+i):c=o/(2-s-i),[l,c*100,a*100]};z.rgb.hsv=function(t){let e,n,r,i,s,o=t[0]/255,l=t[1]/255,c=t[2]/255,a=Math.max(o,l,c),u=a-Math.min(o,l,c),d=function(p){return(a-p)/6/u+1/2};return u===0?(i=0,s=0):(s=u/a,e=d(o),n=d(l),r=d(c),o===a?i=r-n:l===a?i=1/3+e-r:c===a&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,a*100]};z.rgb.hwb=function(t){let e=t[0],n=t[1],r=t[2],i=z.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(n,r));return r=1-1/255*Math.max(e,Math.max(n,r)),[i,s*100,r*100]};z.rgb.cmyk=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(1-e,1-n,1-r),s=(1-e-i)/(1-i)||0,o=(1-n-i)/(1-i)||0,l=(1-r-i)/(1-i)||0;return[s*100,o*100,l*100,i*100]};function SL(t,e){return it(t[0]-e[0],2)+it(t[1]-e[1],2)+it(t[2]-e[2],2)}z.rgb.keyword=function(t){let e=eT[t];if(e)return e;let n=1/0,r;for(let i of Object.keys(Qo)){let s=Qo[i],o=SL(t,s);o<n&&(n=o,r=i)}return r};z.keyword.rgb=function(t){return Qo[t]};z.rgb.xyz=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255;e=e>.04045?it((e+.055)/1.055,2.4):e/12.92,n=n>.04045?it((n+.055)/1.055,2.4):n/12.92,r=r>.04045?it((r+.055)/1.055,2.4):r/12.92;let i=e*.4124+n*.3576+r*.1805,s=e*.2126+n*.7152+r*.0722,o=e*.0193+n*.1192+r*.9505;return[i*100,s*100,o*100]};z.rgb.lab=function(t){let e=z.rgb.xyz(t),n=e[0],r=e[1],i=e[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?it(n,1/3):7.787*n+16/116,r=r>.008856?it(r,1/3):7.787*r+16/116,i=i>.008856?it(i,1/3):7.787*i+16/116;let s=116*r-16,o=500*(n-r),l=200*(r-i);return[s,o,l]};z.hsl.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i,s,o;if(n===0)return o=r*255,[o,o,o];r<.5?i=r*(1+n):i=r+n-r*n;let l=2*r-i,c=[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,c[a]=o*255;return c};z.hsl.hsv=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,i=n,s=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=s<=1?s:2-s;let o=(r+n)/2,l=r===0?2*i/(s+i):2*n/(r+n);return[e,l*100,o*100]};z.hsv.rgb=function(t){let e=t[0]/60,n=t[1]/100,r=t[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),o=255*r*(1-n),l=255*r*(1-n*s),c=255*r*(1-n*(1-s));switch(r*=255,i){case 0:return[r,c,o];case 1:return[l,r,o];case 2:return[o,r,c];case 3:return[o,l,r];case 4:return[c,o,r];case 5:return[r,o,l]}};z.hsv.hsl=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,i=Math.max(r,.01),s,o;o=(2-n)*r;let l=(2-n)*i;return s=n*i,s/=l<=1?l:2-l,s=s||0,o/=2,[e,s*100,o*100]};z.hwb.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=n+r,s;i>1&&(n/=i,r/=i);let o=Math.floor(6*e),l=1-r;s=6*e-o,o&1&&(s=1-s);let c=n+s*(l-n),a,u,d;switch(o){default:case 6:case 0:a=l,u=c,d=n;break;case 1:a=c,u=l,d=n;break;case 2:a=n,u=l,d=c;break;case 3:a=n,u=c,d=l;break;case 4:a=c,u=n,d=l;break;case 5:a=l,u=n,d=c;break}return[a*255,u*255,d*255]};z.cmyk.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,i=t[3]/100,s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),l=1-Math.min(1,r*(1-i)+i);return[s*255,o*255,l*255]};z.xyz.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,i,s,o;return i=e*3.2406+n*-1.5372+r*-.4986,s=e*-.9689+n*1.8758+r*.0415,o=e*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*it(i,1/2.4)-.055:i*12.92,s=s>.0031308?1.055*it(s,1/2.4)-.055:s*12.92,o=o>.0031308?1.055*it(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(t){let e=t[0],n=t[1],r=t[2];e/=95.047,n/=100,r/=108.883,e=e>.008856?it(e,1/3):7.787*e+16/116,n=n>.008856?it(n,1/3):7.787*n+16/116,r=r>.008856?it(r,1/3):7.787*r+16/116;let i=116*n-16,s=500*(e-n),o=200*(n-r);return[i,s,o]};z.lab.xyz=function(t){let e=t[0],n=t[1],r=t[2],i,s,o;s=(e+16)/116,i=n/500+s,o=s-r/200;let l=it(s,3),c=it(i,3),a=it(o,3);return s=l>.008856?l:(s-16/116)/7.787,i=c>.008856?c:(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(t){let e=t[0],n=t[1],r=t[2],i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);let o=Math.sqrt(n*n+r*r);return[e,o,i]};z.lch.lab=function(t){let e=t[0],n=t[1],i=t[2]/360*2*Math.PI,s=n*Math.cos(i),o=n*Math.sin(i);return[e,s,o]};z.rgb.ansi16=function(t,e=null){let[n,r,i]=t,s=e===null?z.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return s===2&&(o+=60),o};z.hsv.ansi16=function(t){return z.rgb.ansi16(z.hsv.rgb(t),t[2])};z.rgb.ansi256=function(t){let e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};z.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let n=(~~(t>50)+1)*.5,r=(e&1)*n*255,i=(e>>1&1)*n*255,s=(e>>2&1)*n*255;return[r,i,s]};z.ansi256.rgb=function(t){if(t>=232){let s=(t-232)*10+8;return[s,s,s]}t-=16;let e,n=Math.floor(t/36)/5*255,r=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[n,r,i]};z.rgb.hex=function(t){let n=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};z.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let n=e[0];e[0].length===3&&(n=n.split("").map(l=>l+l).join(""));let r=parseInt(n,16),i=r>>16&255,s=r>>8&255,o=r&255;return[i,s,o]};z.rgb.hcg=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.max(Math.max(e,n),r),s=Math.min(Math.min(e,n),r),o=i-s,l,c;return o<1?l=s/(1-o):l=0,o<=0?c=0:i===e?c=(n-r)/o%6:i===n?c=2+(r-e)/o:c=4+(e-n)/o,c/=6,c%=1,[c*360,o*100,l*100]};z.hsl.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=n<.5?2*e*n:2*e*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[t[0],r*100,i*100]};z.hsv.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=e*n,i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],r*100,i*100]};z.hcg.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100;if(n===0)return[r*255,r*255,r*255];let i=[0,0,0],s=e%1*6,o=s%1,l=1-o,c=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 c=(1-n)*r,[(n*i[0]+c)*255,(n*i[1]+c)*255,(n*i[2]+c)*255]};z.hcg.hsv=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e),i=0;return r>0&&(i=e/r),[t[0],i*100,r*100]};z.hcg.hsl=function(t){let e=t[1]/100,r=t[2]/100*(1-e)+.5*e,i=0;return r>0&&r<.5?i=e/(2*r):r>=.5&&r<1&&(i=e/(2*(1-r))),[t[0],i*100,r*100]};z.hcg.hwb=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e);return[t[0],(r-e)*100,(1-r)*100]};z.hwb.hcg=function(t){let e=t[1]/100,r=1-t[2]/100,i=r-e,s=0;return i<1&&(s=(r-i)/(1-i)),[t[0],i*100,s*100]};z.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};z.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};z.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};z.gray.hsl=function(t){return[0,0,t[0]]};z.gray.hsv=z.gray.hsl;z.gray.hwb=function(t){return[0,100,t[0]]};z.gray.cmyk=function(t){return[0,0,0,t[0]]};z.gray.lab=function(t){return[t[0],0,0]};z.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(r.length)+r};z.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var rT=T((zU,nT)=>{var Yc=py();function kL(){let t={},e=Object.keys(Yc);for(let n=e.length,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}function TL(t){let e=kL(),n=[t];for(e[t].distance=0;n.length;){let r=n.pop(),i=Object.keys(Yc[r]);for(let s=i.length,o=0;o<s;o++){let l=i[o],c=e[l];c.distance===-1&&(c.distance=e[r].distance+1,c.parent=r,n.unshift(l))}}return e}function IL(t,e){return function(n){return e(t(n))}}function EL(t,e){let n=[e[t].parent,t],r=Yc[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),r=IL(Yc[e[i].parent][i],r),i=e[i].parent;return r.conversion=n,r}nT.exports=function(t){let e=TL(t),n={},r=Object.keys(e);for(let i=r.length,s=0;s<i;s++){let o=r[s];e[o].parent!==null&&(n[o]=EL(o,e))}return n}});var sT=T((GU,iT)=>{var hy=py(),CL=rT(),vs={},RL=Object.keys(hy);function PL(t){let e=function(...n){let r=n[0];return r==null?r:(r.length>1&&(n=r),t(n))};return"conversion"in t&&(e.conversion=t.conversion),e}function AL(t){let e=function(...n){let r=n[0];if(r==null)return r;r.length>1&&(n=r);let i=t(n);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 t&&(e.conversion=t.conversion),e}RL.forEach(t=>{vs[t]={},Object.defineProperty(vs[t],"channels",{value:hy[t].channels}),Object.defineProperty(vs[t],"labels",{value:hy[t].labels});let e=CL(t);Object.keys(e).forEach(r=>{let i=e[r];vs[t][r]=AL(i),vs[t][r].raw=PL(i)})});iT.exports=vs});var aT=T(_s=>{"use strict";var OL=_s&&_s.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_s,"__esModule",{value:!0});_s.activate=void 0;var fy=OL(sT()),DL=pe(),oT;(function(t){t.Black="black",t.Blue="blue",t.Green="green",t.Orange="orange",t.Purple="purple",t.Red="red",t.White="white",t.Yellow="yellow"})(oT||(oT={}));var my={black:"#000000",blue:"#0000FF",green:"#00FF00",orange:"#FF8800",purple:"#CC8899",red:"#FF0000",white:"#FFFFFF",yellow:"#FFFF00"},jL=()=>new RegExp(`(?:mark|color)=(${Object.keys(my).join("|")}|(?:#[0-9a-f]{6}|#[0-9a-f]{3}))`,"ig"),LL=Object.prototype.hasOwnProperty;function ML(t){t.connection.onColorPresentation(e=>[{label:`#${fy.default.rgb.hex(e.color.red*255,e.color.green*255,e.color.blue*255)}`}]),t.connection.onDocumentColor(e=>W(this,null,function*(){let n=yield t.fs.getTextDocument(e.textDocument.uri);if(n==null)return;let s=(yield t.documentManager.getLatest(n)).document.literals.filter(c=>c.type===DL.ASTType.StringLiteral),o=[],l=({match:c,markup:a,value:u,astPosition:d,lineIndex:p})=>{let h=c.index+a.indexOf("=")+1,m=h+u.length,f=d.line-1+p,g=h,b=m;return p===0&&(g+=d.character,b+=d.character),{start:{line:f,character:g},end:{line:f,character:b}}};for(let c=0;c<s.length;c++){let a=s[c];if(!a.start)continue;let u=a.start,d=a.value.toString().split(`
|
107
|
-
`);for(let p=0;p<d.length;p++){let h=d[p],m=jL(),f;for(;f=m.exec(h);){let[g,b]=f,v=l({match:f,markup:g,value:b,astPosition:u,lineIndex:p});if(b.startsWith("#")){let[_,w,S]=fy.default.hex.rgb(b.slice(1));o.push({range:v,color:{red:_/255,green:w/255,blue:S/255,alpha:1}})}else if(LL.call(my,b)){let[_,w,S]=fy.default.hex.rgb(my[b].slice(1));o.push({range:v,color:{red:_/255,green:w/255,blue:S/255,alpha:1}})}else o.push({range:v,color:{red:0,green:0,blue:0,alpha:1}})}}}return o}))}_s.activate=ML});var uT=T(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.activate=void 0;var qL=pe(),lT=ms(),cT=(t,e,n)=>{let r=t.findAllAssignmentsOfItem(e,n),i=[];for(let s of r){if(!s.start||!s.end)continue;let o={line:s.start.line-1,character:s.start.character-1},l={line:s.end.line-1,character:s.end.character-1},c={targetUri:t.document.uri,targetRange:{start:o,end:l},targetSelectionRange:{start:o,end:l}};i.push(c)}return i};function FL(t){t.connection.onDefinition(e=>W(this,null,function*(){let n=yield t.fs.getTextDocument(e.textDocument.uri);if(n==null)return;let r=new lT.LookupHelper(n,t),i=r.lookupAST(e.position);if(!i)return;let{outer:s,closest:o}=i,l=s.length>0?s[s.length-1]:void 0,c=o;l&&l instanceof qL.ASTMemberExpression&&l.identifier===o&&(c=l);let a=cT(r,c,c.scope),u=yield t.documentManager.get(n).getImports();for(let d of u){let{document:p,textDocument:h}=d;if(!p)continue;let m=new lT.LookupHelper(h,t),f=cT(m,c,p);a.push(...f)}return a}))}Qc.activate=FL});var dT=T(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.activate=void 0;function NL(t,e){return W(this,null,function*(){let n=yield e.documentManager.getLatest(t);return n.errors.map(r=>{if(r!=null&&r.range){let i=r.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:r.message,severity:1}}return{range:{start:n.document.start,end:n.document.end},message:r.message,severity:1}})})}function $L(t){t.connection.languages.diagnostics.on(e=>W(this,null,function*(){if(!t.getConfiguration().diagnostic)return;let n=yield t.fs.getTextDocument(e.textDocument.uri);if(n==null)return;let r=yield NL(n,t);return r.length===0?{kind:"full",items:[]}:{kind:"full",items:r}}))}Jc.activate=$L});function BL(){if(pT)return gy;pT=!0;var t=gy={},e,n;function r(){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=r}catch(f){e=r}try{typeof clearTimeout=="function"?n=clearTimeout:n=i}catch(f){n=i}})();function s(f){if(e===setTimeout)return setTimeout(f,0);if((e===r||!e)&&setTimeout)return e=setTimeout,setTimeout(f,0);try{return e(f,0)}catch(g){try{return e.call(null,f,0)}catch(b){return e.call(this||ws,f,0)}}}function o(f){if(n===clearTimeout)return clearTimeout(f);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(f);try{return n(f)}catch(g){try{return n.call(null,f)}catch(b){return n.call(this||ws,f)}}}var l=[],c=!1,a,u=-1;function d(){!c||!a||(c=!1,a.length?l=a.concat(l):u=-1,l.length&&p())}function p(){if(!c){var f=s(d);c=!0;for(var g=l.length;g;){for(a=l,l=[];++u<g;)a&&a[u].run();u=-1,g=l.length}a=null,c=!1,o(f)}}t.nextTick=function(f){var g=new Array(arguments.length-1);if(arguments.length>1)for(var b=1;b<arguments.length;b++)g[b-1]=arguments[b];l.push(new h(f,g)),l.length===1&&!c&&s(p)};function h(f,g){(this||ws).fun=f,(this||ws).array=g}h.prototype.run=function(){(this||ws).fun.apply(null,(this||ws).array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={};function m(){}return t.on=m,t.addListener=m,t.once=m,t.off=m,t.removeListener=m,t.removeAllListeners=m,t.emit=m,t.prependListener=m,t.prependOnceListener=m,t.listeners=function(f){return[]},t.binding=function(f){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(f){throw new Error("process.chdir is not supported")},t.umask=function(){return 0},gy}var gy,pT,ws,Ne,yy=er(()=>{gy={},pT=!1,ws=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:global;Ne=BL();Ne.platform="browser";Ne.addListener;Ne.argv;Ne.binding;Ne.browser;Ne.chdir;Ne.cwd;Ne.emit;Ne.env;Ne.listeners;Ne.nextTick;Ne.off;Ne.on;Ne.once;Ne.prependListener;Ne.prependOnceListener;Ne.removeAllListeners;Ne.removeListener;Ne.title;Ne.umask;Ne.version;Ne.versions});function UL(){if(hT)return by;hT=!0;var t=Ne;function e(s){if(typeof s!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(s))}function n(s,o){for(var l="",c=0,a=-1,u=0,d,p=0;p<=s.length;++p){if(p<s.length)d=s.charCodeAt(p);else{if(d===47)break;d=47}if(d===47){if(!(a===p-1||u===1))if(a!==p-1&&u===2){if(l.length<2||c!==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="",c=0):(l=l.slice(0,h),c=l.length-1-l.lastIndexOf("/")),a=p,u=0;continue}}else if(l.length===2||l.length===1){l="",c=0,a=p,u=0;continue}}o&&(l.length>0?l+="/..":l="..",c=2)}else l.length>0?l+="/"+s.slice(a+1,p):l=s.slice(a+1,p),c=p-a-1;a=p,u=0}else d===46&&u!==-1?++u:u=-1}return l}function r(s,o){var l=o.dir||o.root,c=o.base||(o.name||"")+(o.ext||"");return l?l===o.root?l+c:l+s+c:c}var i={resolve:function(){for(var o="",l=!1,c,a=arguments.length-1;a>=-1&&!l;a--){var u;a>=0?u=arguments[a]:(c===void 0&&(c=t.cwd()),u=c),e(u),u.length!==0&&(o=u+"/"+o,l=u.charCodeAt(0)===47)}return o=n(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,c=o.charCodeAt(o.length-1)===47;return o=n(o,!l),o.length===0&&!l&&(o="."),o.length>0&&c&&(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 c=arguments[l];e(c),c.length>0&&(o===void 0?o=c:o+="/"+c)}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 c=1;c<o.length&&o.charCodeAt(c)===47;++c);for(var a=o.length,u=a-c,d=1;d<l.length&&l.charCodeAt(d)===47;++d);for(var p=l.length,h=p-d,m=u<h?u:h,f=-1,g=0;g<=m;++g){if(g===m){if(h>m){if(l.charCodeAt(d+g)===47)return l.slice(d+g+1);if(g===0)return l.slice(d+g)}else u>m&&(o.charCodeAt(c+g)===47?f=g:g===0&&(f=0));break}var b=o.charCodeAt(c+g),v=l.charCodeAt(d+g);if(b!==v)break;b===47&&(f=g)}var _="";for(g=c+f+1;g<=a;++g)(g===a||o.charCodeAt(g)===47)&&(_.length===0?_+="..":_+="/..");return _.length>0?_+l.slice(d+f):(d+=f,l.charCodeAt(d)===47&&++d,l.slice(d))},_makeLong:function(o){return o},dirname:function(o){if(e(o),o.length===0)return".";for(var l=o.charCodeAt(0),c=l===47,a=-1,u=!0,d=o.length-1;d>=1;--d)if(l=o.charCodeAt(d),l===47){if(!u){a=d;break}}else u=!1;return a===-1?c?"/":".":c&&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 c=0,a=-1,u=!0,d;if(l!==void 0&&l.length>0&&l.length<=o.length){if(l.length===o.length&&l===o)return"";var p=l.length-1,h=-1;for(d=o.length-1;d>=0;--d){var m=o.charCodeAt(d);if(m===47){if(!u){c=d+1;break}}else h===-1&&(u=!1,h=d+1),p>=0&&(m===l.charCodeAt(p)?--p===-1&&(a=d):(p=-1,a=h))}return c===a?a=h:a===-1&&(a=o.length),o.slice(c,a)}else{for(d=o.length-1;d>=0;--d)if(o.charCodeAt(d)===47){if(!u){c=d+1;break}}else a===-1&&(u=!1,a=d+1);return a===-1?"":o.slice(c,a)}},extname:function(o){e(o);for(var l=-1,c=0,a=-1,u=!0,d=0,p=o.length-1;p>=0;--p){var h=o.charCodeAt(p);if(h===47){if(!u){c=p+1;break}continue}a===-1&&(u=!1,a=p+1),h===46?l===-1?l=p:d!==1&&(d=1):l!==-1&&(d=-1)}return l===-1||a===-1||d===0||d===1&&l===a-1&&l===c+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 r("/",o)},parse:function(o){e(o);var l={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return l;var c=o.charCodeAt(0),a=c===47,u;a?(l.root="/",u=1):u=0;for(var d=-1,p=0,h=-1,m=!0,f=o.length-1,g=0;f>=u;--f){if(c=o.charCodeAt(f),c===47){if(!m){p=f+1;break}continue}h===-1&&(m=!1,h=f+1),c===46?d===-1?d=f:g!==1&&(g=1):d!==-1&&(g=-1)}return d===-1||h===-1||g===0||g===1&&d===h-1&&d===p+1?h!==-1&&(p===0&&a?l.base=l.name=o.slice(1,h):l.base=l.name=o.slice(p,h)):(p===0&&a?(l.name=o.slice(1,d),l.base=o.slice(1,h)):(l.name=o.slice(p,d),l.base=o.slice(p,h)),l.ext=o.slice(d,h)),p>0?l.dir=o.slice(0,p-1):a&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};return i.posix=i,by=i,by}var by,hT,gt,vy=er(()=>{yy();by={},hT=!1;gt=UL()});var Kn={};Ls(Kn,{_makeLong:()=>WL,basename:()=>VL,default:()=>gt,delimiter:()=>HL,dirname:()=>zL,extname:()=>GL,format:()=>KL,isAbsolute:()=>YL,join:()=>QL,normalize:()=>JL,parse:()=>XL,posix:()=>ZL,relative:()=>eM,resolve:()=>tM,sep:()=>nM,win32:()=>rM});var WL,VL,HL,zL,GL,KL,YL,QL,JL,XL,ZL,eM,tM,nM,rM,Yn=er(()=>{vy();vy();yy();WL=gt._makeLong,VL=gt.basename,HL=gt.delimiter,zL=gt.dirname,GL=gt.extname,KL=gt.format,YL=gt.isAbsolute,QL=gt.join,JL=gt.normalize,XL=gt.parse,ZL=gt.posix,eM=gt.relative,tM=gt.resolve,nM=gt.sep,rM=gt.win32});var fT=T(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});Xc.getStringHashCode=void 0;Xc.getStringHashCode=function(){let t=new Map,e=n=>{let r,i;for(r=0,i=0;r<n.length;r++)i=Math.imul(31,i)+n.charCodeAt(r)|0;return i};return n=>{if(n.length===0)return 0;let r=t.get(n);if(r!==void 0)return r;let i=e(n);return t.set(n,i),i}}()});var _y=T(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.createExpressionHash=void 0;var Zc=pe(),mT=fT(),eu=(t,e)=>t.$$hash=e,iM=t=>{var e;return(e=t.$$hash)!==null&&e!==void 0?e:null};function xs(t){let e=iM(t);if(e!==null)return e;let n=(0,mT.getStringHashCode)(t.type);switch(t.type){case Zc.ASTType.ParenthesisExpression:return xs(t.expression);case Zc.ASTType.MemberExpression:{let r=t;return n^=xs(r.base),n^=xs(r.identifier),eu(t,n)}case Zc.ASTType.IndexExpression:{let r=t;return n^=xs(r.base),n^=xs(r.index),eu(t,n)}case Zc.ASTType.Identifier:{let r=t;return n^=(0,mT.getStringHashCode)(r.name),eu(t,n)}}return eu(t,n)}function sM(t){return xs(t)}tu.createExpressionHash=sM});var nu=T(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.hasEmptyBody=dt.containsMultilineItemInShortcutClauses=dt.getLastComment=dt.unwrap=dt.transformBitOperation=dt.countRightBinaryExpressions=dt.SHORTHAND_OPERATORS=void 0;var Ut=pe();dt.SHORTHAND_OPERATORS=[Ut.Operator.Plus,Ut.Operator.Minus,Ut.Operator.Asterik,Ut.Operator.Slash,Ut.Operator.Modulo,Ut.Operator.Power];var oM=t=>{if(t=(0,dt.unwrap)(t),t instanceof Ut.ASTComparisonGroupExpression)return t.expressions.length;let e=[t],n=0;for(;e.length>0;){let r=e.pop();r instanceof Ut.ASTBinaryExpression&&n++,(r instanceof Ut.ASTBinaryExpression||r instanceof Ut.ASTLogicalExpression||r instanceof Ut.ASTIsaExpression)&&(e.push((0,dt.unwrap)(r.left)),e.push((0,dt.unwrap)(r.right)))}return n};dt.countRightBinaryExpressions=oM;var aM=(t,e,n,r)=>{if(r==="|")return"bitOr("+[e,n].join(", ")+")";if(r==="&")return"bitAnd("+[e,n].join(", ")+")";if(r==="<<"||r===">>"||r===">>>")throw new Error("Operators in binary expression are not supported");return t};dt.transformBitOperation=aM;var lM=t=>{for(;t instanceof Ut.ASTParenthesisExpression;)t=t.expression;return t};dt.unwrap=lM;var cM=t=>{for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.type===Ut.ASTType.Comment)return n}return null};dt.getLastComment=cM;var uM=(t,e)=>e.some(n=>t.line<n.body[0].end.line);dt.containsMultilineItemInShortcutClauses=uM;var dM=t=>!t.some(e=>!(e instanceof Ut.ASTComment));dt.hasEmptyBody=dM});var xy=T(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.BeautifyContext=oi.IndentationType=void 0;var si=pe(),pM=nu(),gT;(function(t){t[t.Tab=0]="Tab",t[t.Whitespace=1]="Whitespace"})(gT=oi.IndentationType||(oi.IndentationType={}));var wy=class{get indent(){return this._indent}get isMultilineAllowed(){return this._isMultilineAllowed}constructor(e,n){this.transformer=e,this.options=n,this._indent=0,this._isMultilineAllowed=!0,this.chunks=[],this.usedComments=new Set,this.putIndent=n.indentation===gT.Tab?(r,i=0)=>`${" ".repeat(this._indent+i)}${r}`:(r,i=0)=>`${" ".repeat(n.indentationSpaces).repeat(this._indent+i)}${r}`}pushLines(e){this.chunks.push(e)}popLines(){return this.chunks.pop()}getLines(){return this.chunks[this.chunks.length-1]}useComment(e,n=" "){let r=this.getLines()[e.line];if(r==null)return"";let i=(0,pM.getLastComment)(r);return i!=null&&!this.usedComments.has(i)?(this.usedComments.add(i),n+this.transformer.make(i)):""}appendComment(e,n){return n+this.useComment(e)}disableMultiline(){this._isMultilineAllowed=!1}enableMultiline(){this._isMultilineAllowed=!0}incIndent(){this._indent++}decIndent(){this._indent--}getBlockOpenerEndLine(e){return e instanceof si.ASTIfClause||e instanceof si.ASTWhileStatement?e.condition.end.line:e instanceof si.ASTForGenericStatement?e.iterator.end.line:e.start.line}getPreviousEndLine(e){if(e==null)return 0;if(e.type===si.ASTType.IfShortcutStatement){let n=e;return n.clauses[n.clauses.length-1].body[0].end.line}return e.end.line}buildBlock(e){var n;if(e.body.length===0)return[];let r=[...e.body].sort((c,a)=>c.start.line-a.start.line),i=[],s=null;for(let c=0;c<r.length;c++){let a=r[c],u=(n=r[c+1])!==null&&n!==void 0?n:null;if(a.type!==si.ASTType.Comment&&(s==null?void 0:s.end.line)===a.start.line){let p=this.transformer.make(a,{isCommand:!0});i.push(this.putIndent(this.appendComment(a.end,p))),s=a;continue}if(this.usedComments.has(a)){a.isMultiline&&(s=a);continue}if(a.type===si.ASTType.Comment&&a.start.line===(u==null?void 0:u.start.line))continue;let d=Math.max(s?a.start.line-this.getPreviousEndLine(s)-1:a.start.line-this.getBlockOpenerEndLine(e)-1,0);if(d>0&&i.push(...new Array(d).fill("")),a instanceof si.ASTComment){this.usedComments.add(a);let p=this.transformer.make(a,{isCommand:!0});i.push(this.putIndent(p))}else{let p=this.transformer.make(a,{isCommand:!0});i.push(this.putIndent(this.appendComment(a.end,p)))}s=a}let o=e.body[e.body.length-1],l=Math.max(e.end.line-this.getPreviousEndLine(o)-1,0);return l>0&&i.push(...new Array(l).fill("")),i}};oi.BeautifyContext=wy});var Sy=T(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.beautifyFactory=void 0;var Jo=pe(),hM=(Yn(),Qe(Kn)),yT=_y(),bT=xy(),Dt=nu(),fM=t=>{let{keepParentheses:e=!1,indentation:n=bT.IndentationType.Tab,indentationSpaces:r=2,isDevMode:i=!1}=t.buildOptions,s=new bT.BeautifyContext(t,{keepParentheses:e,indentation:n,indentationSpaces:r,isDevMode:i});return{ParenthesisExpression:(o,l)=>"("+t.make(o.expression,{hasLogicalIndentActive:l.hasLogicalIndentActive})+")",Comment:(o,l)=>o.isMultiline?i?`/*${o.value}*/`:o.value.split(`
|
106
|
+
`)}else if(i instanceof we.ASTComment)return i.value;return n}resolveFunctionStatement(e){let n=me.SignatureDefinitionFunction.parse({type:me.SignatureDefinitionBaseType.Function,description:this.createFunctionDescription(e),arguments:e.parameters.map(r=>{var s,o,l;if(r.type===we.ASTType.Identifier)return{label:(s=r.name)!=null?s:"unknown",type:me.SignatureDefinitionBaseType.Any};let i=r;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(ue.CompletionItemKind.Function).addType(me.SignatureDefinitionBaseType.Function).addSignatureType((0,rO.enrichWithMetaInformation)(n)).setLine(e.start.line)}resolveParenthesisExpression(e){return this.resolveTypeWithDefault(e.expression)}resolveBinaryExpression(e){let n=this.factory(ue.CompletionItemKind.Expression).setLabel("Binary Expr").setLine(e.start.line),r=this.resolveTypeWithDefault(e.left),i=this.resolveTypeWithDefault(e.right);return n.extend(r),n.extend(i),n}resolveLogicalExpression(e){return this.factory(ue.CompletionItemKind.Expression).setLabel("Logical Expr").addType(me.SignatureDefinitionBaseType.Number).setLine(e.start.line)}resolveComparisonGroupExpression(e){return this.factory(ue.CompletionItemKind.Expression).setLabel("Comparison Group Expr").addType(me.SignatureDefinitionBaseType.Number).setLine(e.start.line)}resolveIsaExpression(e){return this.factory(ue.CompletionItemKind.Expression).setLabel("Isa Expr").addType(me.SignatureDefinitionBaseType.Number).setLine(e.start.line)}resolveCallStatement(e){let n=this.resolveNamespace(e);return n===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):n}resolveCallExpression(e){let n=this.resolveNamespace(e);return n===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):n}resolveUnaryExpression(e){let n=this.resolveNamespace(e);return n===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):n}resolveMapConstructorExpression(e){let n=this.factory(ue.CompletionItemKind.MapConstructor).addType(me.SignatureDefinitionBaseType.Map);for(let r=0;r<e.fields.length;r++){let i=e.fields[r],s=this.resolveTypeWithDefault(i.value).setLine(i.start.line);if(i.key.type===we.ASTType.StringLiteral)n.setProperty(i.key.value.toString(),s);else{let o=this.resolveTypeWithDefault(i.key).setLine(i.start.line);n.setProperty(o,s)}}return n.setLabel("{}").setLine(e.start.line)}resolveListConstructorExpression(e){let n=this.factory(ue.CompletionItemKind.ListConstructor).addType(me.SignatureDefinitionBaseType.List);for(let r=0;r<e.fields.length;r++){let i=e.fields[r],s=this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Number).setLine(i.start.line),o=this.resolveTypeWithDefault(i.value).setLine(i.start.line);n.setProperty(s,o)}return n.setLabel("[]").setLine(e.start.line)}resolveSliceExpression(e){let n=this.resolveNamespace(e).setLine(e.start.line);return n===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):n}resolveIndexExpression(e,n=!1){let r=this.resolveNamespace(e,n);return r===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):r}resolveMemberExpression(e,n=!1){let r=this.resolveNamespace(e,n);return r===null?this.factory(ue.CompletionItemKind.Property).addType(me.SignatureDefinitionBaseType.Any).setLabel(e.identifier.name).setLine(e.start.line):r}resolveIdentifier(e,n=!1){let r=this.resolveNamespace(e,n);return r===null?this.factory(ue.CompletionItemKind.Property).addType(me.SignatureDefinitionBaseType.Any).setLabel(e.name).setLine(e.start.line):r}resolveType(e,n=!1){if(e==null)return null;switch(e.type){case we.ASTType.ParenthesisExpression:return this.resolveParenthesisExpression(e);case we.ASTType.CallStatement:return this.resolveCallStatement(e);case we.ASTType.CallExpression:return this.resolveCallExpression(e);case we.ASTType.BinaryExpression:return this.resolveBinaryExpression(e);case we.ASTType.LogicalExpression:return this.resolveLogicalExpression(e);case we.ASTType.IsaExpression:return this.resolveIsaExpression(e);case we.ASTType.ComparisonGroupExpression:return this.resolveComparisonGroupExpression(e);case we.ASTType.FunctionDeclaration:return this.resolveFunctionStatement(e);case we.ASTType.SliceExpression:return this.resolveSliceExpression(e);case we.ASTType.IndexExpression:return this.resolveIndexExpression(e,n);case we.ASTType.MemberExpression:return this.resolveMemberExpression(e,n);case we.ASTType.Identifier:return this.resolveIdentifier(e,n);case we.ASTType.MapConstructorExpression:return this.resolveMapConstructorExpression(e);case we.ASTType.ListConstructorExpression:return this.resolveListConstructorExpression(e);case we.ASTType.NegationExpression:case we.ASTType.BinaryNegatedExpression:case we.ASTType.UnaryExpression:return this.resolveUnaryExpression(e);case we.ASTType.NilLiteral:return this.factory(ue.CompletionItemKind.Literal).addType("null").setLabel("null").setLine(e.start.line);case we.ASTType.StringLiteral:{let r=e.value.toString();return this.factory(ue.CompletionItemKind.Literal).addType(me.SignatureDefinitionBaseType.String).setLabel(`"${r.length>20?r.substr(0,20)+"...":r}"`).setLine(e.start.line)}case we.ASTType.NumericLiteral:case we.ASTType.BooleanLiteral:{let r=e.value.toString();return this.factory(ue.CompletionItemKind.Literal).addType(me.SignatureDefinitionBaseType.Number).setLabel(r).setLine(e.start.line)}case Lc.ASTType.FeatureFileExpression:return this.factory(ue.CompletionItemKind.Expression).addType(me.SignatureDefinitionBaseType.String).setLabel("File Expr").setLine(e.start.line);case Lc.ASTType.FeatureLineExpression:return this.factory(ue.CompletionItemKind.Expression).addType(me.SignatureDefinitionBaseType.Number).setLabel("Line Expr").setLine(e.start.line);case Lc.ASTType.FeatureEnvarExpression:return this.factory(ue.CompletionItemKind.Expression).addType(me.SignatureDefinitionBaseType.String).setLabel("Envar Expr").setLine(e.start.line);case Lc.ASTType.FeatureInjectExpression:return this.factory(ue.CompletionItemKind.Expression).addType(me.SignatureDefinitionBaseType.String).setLabel("Inject Expr").setLine(e.start.line);default:return null}}resolveTypeWithDefault(e=null,n=!1){let r=this.resolveType(e,n);if(r==null){let i=this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any);return e!=null&&i.setLine(e.start.line),i}return r}resolveChain(e,n=!1){var l,c,a,u,d,p,h,m,f,g,b;if(e.length===0)return null;let r=null,i=e[0],s=((l=i.unary)==null?void 0:l.operator)==="@"&&!i.isInCallExpression||n&&e.length===1;if((0,ni.isResolveChainItemWithIdentifier)(i))if(i.getter.name==="globals")r=this._scope.globals;else if(i.getter.name==="outer")r=this._scope.outer;else if(i.getter.name==="locals")r=this._scope.locals;else if(i.getter.name==="super"){let v=(a=(c=this._document.getScopeContext(i.ref.scope))==null?void 0:c.scope.context)==null?void 0:a.values.get("i:__isa");v==null?r=this.factory(ue.CompletionItemKind.Constant).addType("null").setLabel("super"):r=v.copy({kind:ue.CompletionItemKind.Constant,label:"super",values:v.values})}else if(i.getter.name==="self"){let v=(u=this._document.getScopeContext(i.ref.scope))==null?void 0:u.scope.context;v==null?r=this.factory(ue.CompletionItemKind.Constant).addType("null").setLabel("self"):r=v.copy({kind:ue.CompletionItemKind.Constant,label:"self",values:v.values})}else r=(d=this._scope.resolveNamespace(i.getter.name,s))!=null?d:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLabel(i.getter.name);else if((0,ni.isResolveChainItemWithValue)(i))r=this.resolveTypeWithDefault(i.value,s);else return null;if(((p=i.unary)==null?void 0:p.operator)==="new"&&r!==null){let v=this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Map).setLabel(r.label);v.setProperty("__isa",r),r=v}let o=e.length;for(let v=1;v<o&&r!==null;v++){let _=e[v],w=((h=_.unary)==null?void 0:h.operator)==="@"&&!_.isInCallExpression||n&&e.length-1===v;if((0,ni.isResolveChainItemWithMember)(_))r=(m=r.resolveProperty(_.getter.name,w))!=null?m:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLabel(_.getter.name);else if((0,ni.isResolveChainItemWithIndex)(_))if((0,Ck.isValidIdentifierLiteral)(_.getter)){let S=_.getter.value.toString();r=(f=r.resolveProperty(S,_.isInCallExpression))!=null?f:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLabel(S)}else{let S=this.resolveTypeWithDefault(_.getter);r=(g=r.resolveProperty(S,_.isInCallExpression))!=null?g:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any)}else if(_.ref.type===we.ASTType.SliceExpression)r=r.copy();else return null;if(((b=_.unary)==null?void 0:b.operator)==="new"&&r!==null){let S=this.factory(ue.CompletionItemKind.Property).addType(me.SignatureDefinitionBaseType.Map).setLabel(r.label);S.setProperty("__isa",r),r=S}}return r}resolveNamespace(e,n=!1){let r=(0,Ek.createResolveChain)(e);return this.resolveChain(r,n)}defineNamespace(e,n){let r=(0,Ek.createResolveChain)(e),i=r.pop();if(r.length>0){let o=this.resolveChain(r);if(o===null)return!1;if((0,ni.isResolveChainItemWithMember)(i))return o.setProperty(i.getter.name,n);if((0,ni.isResolveChainItemWithIndex)(i)){if((0,Ck.isValidIdentifierLiteral)(i.getter))return o.setProperty(i.getter.value.toString(),n);{let l=this.resolveTypeWithDefault(i.getter);return o.setProperty(l,n)}}return!1}let s=this._scope;return(0,ni.isResolveChainItemWithIdentifier)(i)?s.setProperty(i.getter.name,n):!1}resolveAvailableAssignmentsWithQuery(e){let n=[],r=new Set([this,this._parent,this._document.getRootScopeContext().aggregator]);for(let i of r){let s=i.definitions;for(let o of s.keys())if(o.includes(e)){let l=s.get(o);n.push(...l)}}return n}resolveAvailableAssignments(e){let n=(0,Ik.createExpressionId)(e),r=this;n.startsWith("globals.")?(r=this._document.getRootScopeContext().aggregator,n=n.slice(8)):n.startsWith("locals.")?(r=this,n=n.slice(7)):n.startsWith("outer.")&&(r=this.parent,n=n.slice(6));let i=[],s=new Set([r,r._parent,r._document.getRootScopeContext().aggregator]);for(let o of s){if(o==null)continue;let l=o._definitions.get(n);l!=null&&i.push(...l)}return i}analyze(){var e,n;for(let r=0;r<this._root.assignments.length;r++){let i=this._root.assignments[r],s=(n=(e=this.resolveType(i.init))==null?void 0:e.copy().setLine(i.start.line))!=null?n:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(i.start.line);this.defineNamespace(i.variable,s);let o=(0,Ik.createExpressionId)(i.variable),l=this._definitions;o.startsWith("globals.")?(l=this._document.getRootScopeContext().aggregator.definitions,o=o.slice(8)):o.startsWith("locals.")?(l=this._definitions,o=o.slice(7)):o.startsWith("outer.")&&(l=this.parent.definitions,o=o.slice(6));let c=l.get(o);c?c.push(i):l.set(o,[i])}}};Mc.Aggregator=Fg});var Bg=T(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});qc.Document=void 0;var Hn=Yt(),sO=pe(),Rk=Jr(),Pk=Ng(),Ak=us(),Ok=yg(),$g=class t{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 n,r,i,s;this._root=e.root,this._container=e.container,this._scopeMapping=(n=e.scopeMapping)!=null?n:new WeakMap,this._intrinscis=(r=e.intrinsics)!=null?r: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(Hn.SignatureDefinitionBaseType.Map),funcRef:this._container.primitives.get(Hn.SignatureDefinitionBaseType.Function),number:this._container.primitives.get(Hn.SignatureDefinitionBaseType.Number),string:this._container.primitives.get(Hn.SignatureDefinitionBaseType.String),list:this._container.primitives.get(Hn.SignatureDefinitionBaseType.List)}}initApi(){let e=this._container.primitives.get(Hn.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 Ak.Entity({kind:Rk.CompletionItemKind.Constant,container:this._container,label:"globals"}).addType(Hn.SignatureDefinitionBaseType.Map)}analyzeScope(e){let n=this._scopeMapping.get(e.scope),r=new Ok.Scope({container:this._container,parent:n==null?void 0:n.scope,globals:this._globals}),i=new Pk.Aggregator({scope:r,root:e,document:this,parent:n==null?void 0:n.aggregator});this._scopeMapping.set(e,{scope:r,aggregator:i});let s=e.assignment instanceof sO.ASTAssignmentStatement?this.resolveNamespace(e.assignment.variable,!0):null;if(s!==null){let o=s==null?void 0:s.context;o!=null&&o.types.has(Hn.SignatureDefinitionBaseType.Map)&&o!==this._globals&&r.setContext(o)}if(i.analyze(),s!==null){let o=s.signatureDefinitions.last();if(o!=null){let l=o.getArguments();for(let c=0;c<l.length;c++){let a=l[c],u=r.resolveProperty(a.getLabel(),!0),d=a.getTypes().map(p=>p.type);u===null?r.setProperty(a.getLabel(),new Ak.Entity({kind:Rk.CompletionItemKind.Variable,container:this._container}).addType(...d)):(u.types.delete(Hn.SignatureDefinitionBaseType.Any),u.addType(...d))}}}}analyze(){let e=new Ok.Scope({container:this._container,globals:this._globals,locals:this._globals}),n=new Pk.Aggregator({scope:e,root:this._root,document:this});this._scopeMapping.set(this._root,{scope:e,aggregator:n}),n.analyze();for(let r=0;r<this._root.scopes.length;r++){let i=this._root.scopes[r];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 n;return(n=this._scopeMapping.get(e))!=null?n:null}getLastASTItemOfLine(e){let n=this._root.lines[e];return n&&n.length>0?n[n.length-1]:null}findASTItemInLine(e,n){let r=this._root.lines[e];if(r&&r.length>0){let i=r.find(s=>s.type===n);if(i)return i}return null}resolveAllAssignmentsWithQuery(e){let n=[],r=[this._root,...this._root.scopes];for(let i=0;i<r.length;i++){let o=this._scopeMapping.get(r[i]).aggregator.definitions;for(let l of o.keys())if(l.includes(e)){let c=o.get(l);n.push(...c)}}return n}resolveAvailableAssignments(e){var n,r;return(r=(n=this._scopeMapping.get(e.scope))==null?void 0:n.aggregator.resolveAvailableAssignments(e))!=null?r:[]}resolveType(e,n){var r,i;return(i=(r=this._scopeMapping.get(e.scope))==null?void 0:r.aggregator.resolveType(e,n))!=null?i:null}resolveTypeWithDefault(e,n){var r;return(r=this._scopeMapping.get(e.scope))==null?void 0:r.aggregator.resolveTypeWithDefault(e,n)}resolveNamespace(e,n=!1){var r,i;return(i=(r=this._scopeMapping.get(e.scope))==null?void 0:r.aggregator.resolveNamespace(e,n))!=null?i:null}merge(...e){let n=new t({root:this._root,container:this._container.copy()});for(let r of e)n._globals.extend(r._globals.copy({line:-1})),n._intrinscis.map.extend(r._intrinscis.map.copy({line:-1})),n._intrinscis.funcRef.extend(r._intrinscis.funcRef.copy({line:-1})),n._intrinscis.number.extend(r._intrinscis.number.copy({line:-1})),n._intrinscis.string.extend(r._intrinscis.string.copy({line:-1})),n._intrinscis.list.extend(r._intrinscis.list.copy({line:-1}));return n.analyze(),n}};qc.Document=$g});var Vg=T(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});Fc.ContainerProxy=void 0;var Ln=Yt(),Rr=us(),Dk=Jr(),jk=Ro(),Ug=Ic(),Wg=class t{get primitives(){return this._primitives}get types(){return this._types}constructor(e){var n,r;this._container=e.container,this._primitives=(n=e.primitives)!=null?n:this.createPrimitives(),this._types=(r=e.types)!=null?r:this.createTypes()}createPrimitives(){let e=new Map;for(let[n,r]of this._container.getPrimitives()){let i=new Rr.Entity({kind:Dk.CompletionItemKind.Constant,container:this,isAPI:n===Ln.SignatureDefinitionBaseType.General}).addType(Ln.SignatureDefinitionBaseType.Map).insertSignature(r);e.set(n,i)}return e}createTypes(){let e=new Map;for(let[n,r]of this._container.getTypes()){let i=new Rr.Entity({kind:Dk.CompletionItemKind.Constant,container:this}).addType(Ln.SignatureDefinitionBaseType.Map).insertSignature(r);e.set(n,i)}return e}getTypeSignature(e){var n,r;return(r=(n=this._primitives.get(e))!=null?n:this._types.get(e))!=null?r:null}searchDefinitionMatches(e,n){if(typeof e=="string")return this.searchDefinitionMatches([e],n);let r=e.includes(Ln.SignatureDefinitionBaseType.Any)?new Set(this._container.getAllVisibleTypes()):new Set(e),i=new Map;for(let s of r){let o=this.getTypeSignature(s);if(o===null)continue;let l=(0,Ug.lookupProperty)(o,n);l!==null&&i.set(s,l)}return i}getDefinition(e,n,r=!1){if(typeof e=="string")return this.getDefinition([e],n);let i=(0,Ug.lookupProperty)(this._primitives.get(Ln.SignatureDefinitionBaseType.Any),n);if(e.includes(Ln.SignatureDefinitionBaseType.Any)&&i)return(0,Rr.resolveEntity)(this,i,r);let s=this.searchDefinitionMatches(e,n);return s.size===0?null:s.size===1?(0,Rr.resolveEntity)(this,s.values().next().value,r):s.has(Ln.SignatureDefinitionBaseType.Any)?(0,Rr.resolveEntity)(this,s.get(Ln.SignatureDefinitionBaseType.Any),r):i!==null?(0,Rr.resolveEntity)(this,i,r):(0,Rr.resolveEntity)(this,s.values().next().value,r)}getGeneralDefinition(e,n=!1){let r=(0,Ug.lookupProperty)(this._primitives.get(Ln.SignatureDefinitionBaseType.General),e);return r==null?null:(0,Rr.resolveEntity)(this,r,n)}getAllIdentifier(e){let n=new Map;if(e===Ln.SignatureDefinitionBaseType.Any){for(let i of this._container.getAllVisibleTypes()){let s=this.getTypeSignature(i);s!=null&&(0,jk.injectIdentifers)(n,s)}return n}let r=this.getTypeSignature(e);return r!=null&&(0,jk.injectIdentifers)(n,r),n}copy(){return new t({container:this._container})}};Fc.ContainerProxy=Wg});var Lk=T(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});Nc.TypeManager=void 0;var oO=Bg(),aO=Vg(),Hg=class{constructor(e){this._container=new aO.ContainerProxy({container:e.container}),this._types=new Map}analyze(e,n){let r=new oO.Document({container:this._container.copy(),root:n});try{r.analyze()}catch(i){console.error(i)}return this._types.set(e,r),r}get(e){var n;return(n=this._types.get(e))!=null?n:null}};Nc.TypeManager=Hg});var Uo=T(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.TypeManager=Z.ContainerProxy=Z.Document=Z.Aggregator=Z.Scope=Z.Entity=Z.lookupProperty=Z.isEligibleForProperties=Z.injectIdentifers=Z.isSignatureDefinitionFunction=Z.isResolveChainItemWithValue=Z.isResolveChainItemWithMember=Z.isResolveChainItemWithIndex=Z.isResolveChainItemWithIdentifier=Z.CompletionItemKind=Z.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION=Z.ObjectSetIterator=Z.ObjectSet=Z.rotateBits=Z.getStringHashCode=Z.getHashCode=Z.createResolveChain=Z.enrichWithMetaInformation=Z.createExpressionId=Z.createExpressionHash=Z.isValidIdentifierLiteral=void 0;var lO=bo();Object.defineProperty(Z,"isValidIdentifierLiteral",{enumerable:!0,get:function(){return lO.isValidIdentifierLiteral}});var cO=NS();Object.defineProperty(Z,"createExpressionHash",{enumerable:!0,get:function(){return cO.createExpressionHash}});var uO=Om();Object.defineProperty(Z,"createExpressionId",{enumerable:!0,get:function(){return uO.createExpressionId}});var dO=rg();Object.defineProperty(Z,"enrichWithMetaInformation",{enumerable:!0,get:function(){return dO.enrichWithMetaInformation}});var pO=ig();Object.defineProperty(Z,"createResolveChain",{enumerable:!0,get:function(){return pO.createResolveChain}});var zg=Am();Object.defineProperty(Z,"getHashCode",{enumerable:!0,get:function(){return zg.getHashCode}});Object.defineProperty(Z,"getStringHashCode",{enumerable:!0,get:function(){return zg.getStringHashCode}});Object.defineProperty(Z,"rotateBits",{enumerable:!0,get:function(){return zg.rotateBits}});var Mk=lg();Object.defineProperty(Z,"ObjectSet",{enumerable:!0,get:function(){return Mk.ObjectSet}});Object.defineProperty(Z,"ObjectSetIterator",{enumerable:!0,get:function(){return Mk.ObjectSetIterator}});var hO=cg();Object.defineProperty(Z,"DEFAULT_CUSTOM_FUNCTION_DESCRIPTION",{enumerable:!0,get:function(){return hO.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION}});var fO=Jr();Object.defineProperty(Z,"CompletionItemKind",{enumerable:!0,get:function(){return fO.CompletionItemKind}});var $c=ug();Object.defineProperty(Z,"isResolveChainItemWithIdentifier",{enumerable:!0,get:function(){return $c.isResolveChainItemWithIdentifier}});Object.defineProperty(Z,"isResolveChainItemWithIndex",{enumerable:!0,get:function(){return $c.isResolveChainItemWithIndex}});Object.defineProperty(Z,"isResolveChainItemWithMember",{enumerable:!0,get:function(){return $c.isResolveChainItemWithMember}});Object.defineProperty(Z,"isResolveChainItemWithValue",{enumerable:!0,get:function(){return $c.isResolveChainItemWithValue}});var mO=dg();Object.defineProperty(Z,"isSignatureDefinitionFunction",{enumerable:!0,get:function(){return mO.isSignatureDefinitionFunction}});var gO=Ro();Object.defineProperty(Z,"injectIdentifers",{enumerable:!0,get:function(){return gO.injectIdentifers}});var yO=kc();Object.defineProperty(Z,"isEligibleForProperties",{enumerable:!0,get:function(){return yO.isEligibleForProperties}});var bO=Ic();Object.defineProperty(Z,"lookupProperty",{enumerable:!0,get:function(){return bO.lookupProperty}});var vO=us();Object.defineProperty(Z,"Entity",{enumerable:!0,get:function(){return vO.Entity}});var _O=yg();Object.defineProperty(Z,"Scope",{enumerable:!0,get:function(){return _O.Scope}});var wO=Ng();Object.defineProperty(Z,"Aggregator",{enumerable:!0,get:function(){return wO.Aggregator}});var xO=Bg();Object.defineProperty(Z,"Document",{enumerable:!0,get:function(){return xO.Document}});var SO=Vg();Object.defineProperty(Z,"ContainerProxy",{enumerable:!0,get:function(){return SO.ContainerProxy}});var kO=Lk();Object.defineProperty(Z,"TypeManager",{enumerable:!0,get:function(){return kO.TypeManager}})});var Gg=T(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.getSymbolItemKind=hs.getCompletionItemKind=void 0;var It=Uo(),TO=t=>{switch(t){case It.CompletionItemKind.Constant:return 21;case It.CompletionItemKind.Variable:return 6;case It.CompletionItemKind.Expression:return 6;case It.CompletionItemKind.Function:return 3;case It.CompletionItemKind.ListConstructor:case It.CompletionItemKind.MapConstructor:case It.CompletionItemKind.Literal:case It.CompletionItemKind.Unknown:return 12}};hs.getCompletionItemKind=TO;var IO=t=>{switch(t){case It.CompletionItemKind.Constant:return 14;case It.CompletionItemKind.Variable:return 13;case It.CompletionItemKind.Expression:return 13;case It.CompletionItemKind.Function:return 12;case It.CompletionItemKind.ListConstructor:return 18;case It.CompletionItemKind.MapConstructor:return 19;case It.CompletionItemKind.Literal:case It.CompletionItemKind.Unknown:return 13}};hs.getSymbolItemKind=IO});var Yg=T(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});Bc.findEx=void 0;var EO=pe(),CO=function(t){return{ParenthesisExpression:(e,n)=>{t(e.expression,n)},AssignmentStatement:function(e,n){t(e.init,n),t(e.variable,n)},MemberExpression:function(e,n){t(e.base,n),t(e.identifier,n)},FunctionDeclaration:function(e,n){for(let r=0;r<e.parameters.length;r++)t(e.parameters[r],n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},MapConstructorExpression:function(e,n){for(let r=0;r<e.fields.length;r++)t(e.fields[r],n)},ReturnStatement:function(e,n){e.argument&&t(e.argument,n)},WhileStatement:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},IndexExpression:function(e,n){t(e.base,n),t(e.index,n)},SliceExpression:function(e,n){t(e.base,n),t(e.left,n),t(e.right,n)},ListValue:function(e,n){t(e.value,n)},MapKeyString:function(e,n){t(e.key,n),t(e.value,n)},IfShortcutStatement:function(e,n){for(let r=0;r<e.clauses.length;r++)t(e.clauses[r],n)},IfShortcutClause:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ElseifShortcutClause:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ElseShortcutClause:function(e,n){for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ForGenericStatement:function(e,n){t(e.variable,n),t(e.iterator,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},IfStatement:function(e,n){for(let r=0;r<e.clauses.length;r++)t(e.clauses[r],n)},IfClause:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ElseifClause:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ElseClause:function(e,n){for(let r=0;r<e.body.length;r++)t(e.body[r],n)},NegationExpression:function(e,n){t(e.argument,n)},CallExpression:function(e,n){t(e.base,n);for(let r=0;r<e.arguments.length;r++)t(e.arguments[r],n)},CallStatement:function(e,n){t(e.expression,n)},ListConstructorExpression:function(e,n){for(let r=0;r<e.fields.length;r++)t(e.fields[r],n)},BinaryExpression:function(e,n){t(e.left,n),t(e.right,n)},BinaryNegatedExpression:function(e,n){t(e.argument,n)},IsaExpression:function(e,n){t(e.left,n),t(e.right,n)},LogicalExpression:function(e,n){t(e.left,n),t(e.right,n)},ComparisonGroupExpression:function(e,n){for(let r=0;r<e.expressions.length;r++)t(e.expressions[r],n)},UnaryExpression:function(e,n){t(e.argument,n)},Chunk:function(e,n){for(let r=0;r<e.body.length;r++)t(e.body[r],n)},InvalidCodeExpression:()=>{}}},Kg=class{constructor(e){this.map=CO(this.visit.bind(this)),this.callback=e,this.state={exit:!1}}visit(e,n=0){let r=this;if(e==null)return;if(e.type==null)throw console.error("Error ast type:",e),new Error("Unexpected as type");if(r.state=r.callback(e,n),r.state.exit||r.state.skip)return;let i=r.map[e.type];i!=null&&i.call(r,e,n+1)}};function RO(t,e){let n=[];return new Kg((i,s)=>{let o=t(i,s)||{};return o.valid&&i.type!==EO.ASTType.InvalidCodeExpression&&n.push(i),{exit:!!o.exit,skip:!!o.skip}}).visit(e),n}Bc.findEx=RO});var Fk=T(qk=>{"use strict";Object.defineProperty(qk,"__esModule",{value:!0});var ye=Yt();ye.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"]);ye.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}"]);ye.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."]);ye.VariationRegistry.add("PlayerUtils.FirewallPingStatus",["Connection refused. Address unreachable","Connection refused. The target is behind a firewall."]);ye.VariationRegistry.add("Computer.CheckInicio",["Fatal error: ${filepath} corrupted!","Kernel panic: missing ${filepath} file!","Graphics error: ${filepath} not found!","Fatal error: ${filepath} not found!"]);ye.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"]);ye.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"]);ye.VariationRegistry.add("BlockchainSystem.AddWallet",["Error: Wallet user already exists.","Error: Only one wallet per player allowed."]);ye.VariationRegistry.add("BlockchainSystem.RemoveCurrency",["Error: ${coinname} does not exist","Error: incorrect user/password"]);ye.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."]);ye.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"]);ye.VariationRegistry.add("BlockchainSystem.SetAddress",["Error: ${coinName} does not exist"]);ye.VariationRegistry.add("BlockchainSystem.GetAddress",["Error: ${coinName} does not exist"]);ye.VariationRegistry.add("BlockchainSystem.ResetCoinPass",["Error: coin does not exist","Error: Only the account owner can change the password"]);ye.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"]);ye.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"]);ye.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."]);ye.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"]);ye.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"]);ye.VariationRegistry.add("FileSystem.UpdatePermisos",["permission denied","permission denied. File protected.","Wrong format."]);ye.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"]);ye.VariationRegistry.add("PlayerUtils.RemoveFile",["file not found: ${path}","permission denied","permission denied. File protected.","unknown error :/"]);ye.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."]);ye.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."]);ye.VariationRegistry.add("PlayerUtils.ConnectToService",["Invalid service ID","can't connect: incorrect user/password"]);ye.VariationRegistry.add("BlockchainSystem.SetInfoSubWallet",["Error: ${coinName} does not exist","Error: ${subWalletUser} does not exist","Error: main wallet linked to ${subWalletUser} does not exist anymore"]);ye.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"]);ye.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"]);ye.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"]);ye.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 Nk=T((k5,PO)=>{PO.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 $k=T((T5,AO)=>{AO.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 Bk=T((I5,OO)=>{OO.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 are `null`, 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']},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 Uk=T((E5,DO)=>{DO.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 Wk=T((C5,jO)=>{jO.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 Vk=T((R5,LO)=>{LO.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 Hk=T((P5,MO)=>{MO.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 zk=T((A5,qO)=>{qO.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 Gk=T((O5,FO)=>{FO.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"]},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` with the path of the file. In case the file gets deleted it will still returns it's path 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 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)']},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 Kk=T((D5,NO)=>{NO.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 Yk=T((j5,$O)=>{$O.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 Qk=T((L5,BO)=>{BO.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"`, `"file"`, `"function"`, `"list"`, `"map"`, `"MetaLib"`, `"MetaMail"`, `"MetaxploitLib"`, `"NetSession"`, `"null"`, `"number"`, `"port"`, `"router"`, `"service"`, `"shell"`, `"ftpshell"`, `"string"`, `"subwallet"`, `"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)']},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"]},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` with the path of the file. In case the file gets deleted, it will still return its path 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 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))']},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']}}});var Jk=T((M5,UO)=>{UO.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 Xk=T((q5,WO)=>{WO.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 Zk=T((F5,VO)=>{VO.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)']}}});var e0=T((N5,HO)=>{HO.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 t0=T(($5,zO)=>{zO.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 n0=T((B5,GO)=>{GO.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 r0=T((U5,KO)=>{KO.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 i0=T((W5,YO)=>{YO.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 s0=T((V5,QO)=>{QO.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 o0=T((H5,JO)=>{JO.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 a0=T((z5,XO)=>{XO.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 l0=T((G5,ZO)=>{ZO.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 c0=T((K5,eD)=>{eD.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 u0=T((Y5,tD)=>{tD.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 d0=T(Wo=>{"use strict";var Pe=Wo&&Wo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Wo,"__esModule",{value:!0});var nD=Pe(Nk()),rD=Pe($k()),iD=Pe(Bk()),sD=Pe(Uk()),oD=Pe(Wk()),aD=Pe(Vk()),lD=Pe(Hk()),cD=Pe(zk()),uD=Pe(Gk()),dD=Pe(Kk()),pD=Pe(Yk()),hD=Pe(Qk()),fD=Pe(Jk()),mD=Pe(Xk()),gD=Pe(Zk()),yD=Pe(e0()),bD=Pe(t0()),vD=Pe(n0()),_D=Pe(r0()),wD=Pe(i0()),xD=Pe(s0()),SD=Pe(o0()),kD=Pe(a0()),TD=Pe(l0()),ID=Pe(c0()),ED=Pe(u0()),CD={any:nD.default,aptClient:rD.default,blockchain:iD.default,class:sD.default,ctfEvent:cD.default,coin:oD.default,computer:aD.default,crypto:lD.default,function:pD.default,file:uD.default,ftpShell:dD.default,general:hD.default,list:fD.default,map:mD.default,metaLib:gD.default,metaMail:yD.default,metaxploit:bD.default,netSession:vD.default,port:wD.default,router:xD.default,service:SD.default,shell:kD.default,string:TD.default,subWallet:ID.default,wallet:ED.default,number:_D.default};Wo.default=CD});var p0=T((J5,RD)=>{RD.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 h0=T((X5,PD)=>{PD.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 f0=T((Z5,AD)=>{AD.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.","!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 m0=T((eU,OD)=>{OD.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"]},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 g0=T((tU,DD)=>{DD.exports={type:"class",hidden:!0,definitions:{}}});var y0=T((nU,jD)=>{jD.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 b0=T((rU,LD)=>{LD.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 v0=T((iU,MD)=>{MD.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 _0=T((sU,qD)=>{qD.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 w0=T((oU,FD)=>{FD.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"]},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",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"]},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 x0=T((aU,ND)=>{ND.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 S0=T((lU,$D)=>{$D.exports={type:"function",hidden:!0,definitions:{}}});var k0=T((cU,BD)=>{BD.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","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.","!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"]},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"]},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"}],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"]},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"]},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"}]}}}});var T0=T((uU,UD)=>{UD.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 I0=T((dU,WD)=>{WD.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 E0=T((pU,VD)=>{VD.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"]}}}});var C0=T((hU,HD)=>{HD.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 R0=T((fU,zD)=>{zD.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 P0=T((mU,GD)=>{GD.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 A0=T((gU,KD)=>{KD.exports={type:"number",definitions:{}}});var O0=T((yU,YD)=>{YD.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 D0=T((bU,QD)=>{QD.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 j0=T((vU,JD)=>{JD.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 L0=T((_U,XD)=>{XD.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 M0=T((wU,ZD)=>{ZD.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 q0=T((xU,ej)=>{ej.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 F0=T((SU,tj)=>{tj.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 N0=T(ce=>{"use strict";var xe=ce&&ce.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ce,"__esModule",{value:!0});ce.getSiteDescription=ce.getSiteLanguageFile=ce.isNative=ce.greyscriptMeta=void 0;Fk();var nj=Yt(),rj=xe(d0()),ij=xe(p0()),sj=xe(h0()),oj=xe(f0()),aj=xe(m0()),lj=xe(g0()),cj=xe(y0()),uj=xe(b0()),dj=xe(v0()),pj=xe(_0()),hj=xe(w0()),fj=xe(x0()),mj=xe(S0()),gj=xe(k0()),yj=xe(T0()),bj=xe(I0()),vj=xe(E0()),_j=xe(C0()),wj=xe(R0()),xj=xe(P0()),Sj=xe(A0()),kj=xe(O0()),Tj=xe(D0()),Ij=xe(j0()),Ej=xe(L0()),Cj=xe(M0()),Rj=xe(q0()),Pj=xe(F0());ce.greyscriptMeta=new nj.Container;ce.greyscriptMeta.addTypeSignatureFromPayload(sj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(oj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(aj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(pj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(lj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(cj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(uj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(dj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(hj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(fj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(mj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(gj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(yj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(bj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(vj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(_j.default);ce.greyscriptMeta.addTypeSignatureFromPayload(wj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(xj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Sj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(kj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Tj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Ij.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Ej.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Cj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Rj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Pj.default);ce.greyscriptMeta.addMetaFromPayload("en",rj.default);var Aj=function(t,e){return!!ce.greyscriptMeta.getDefinition(t,e)};ce.isNative=Aj;var Oj=function(t){switch(t===void 0&&(t="en"),t){case"en":return ij.default;default:throw new Error('Language "'.concat(t,'" is unknown.'))}};ce.getSiteLanguageFile=Oj;var Dj=function(t,e){var n=(0,ce.getSiteLanguageFile)(e);return n==null?void 0:n[t]};ce.getSiteDescription=Dj});var $0=T(ri=>{"use strict";var jj=ri&&ri.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Lj=ri&&ri.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&jj(e,t,n)};Object.defineProperty(ri,"__esModule",{value:!0});Lj(N0(),ri)});var Vo=T(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.lookupBase=gn.lookupIdentifier=void 0;var Mj=$0(),zn=pe(),qj=Uo(),Fj=t=>{switch(t.type){case zn.ASTType.CallStatement:return(0,gn.lookupIdentifier)(t.expression);case zn.ASTType.CallExpression:return(0,gn.lookupIdentifier)(t.base);case zn.ASTType.Identifier:return t;case zn.ASTType.MemberExpression:return(0,gn.lookupIdentifier)(t.identifier);case zn.ASTType.IndexExpression:return(0,gn.lookupIdentifier)(t.index);default:return null}};gn.lookupIdentifier=Fj;var Nj=(t=null)=>{switch(t==null?void 0:t.type){case zn.ASTType.MemberExpression:return t.base;case zn.ASTType.IndexExpression:return t.base;case zn.ASTType.CallExpression:return t.base;case zn.ASTType.SliceExpression:return t.base;default:return null}};gn.lookupBase=Nj;gn.default=new qj.TypeManager({container:Mj.greyscriptMeta})});var ms=T(ln=>{"use strict";var $j=ln&&ln.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Bj=ln&&ln.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),U0=ln&&ln.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&$j(e,t,n);return Bj(e,t),e};Object.defineProperty(ln,"__esModule",{value:!0});ln.LookupHelper=ln.buildTypeDocument=void 0;var Uj=Yt(),B0=pe(),fs=Uo(),Wj=U0(Yg()),ii=U0(Vo());function Jg(r,i){return W(this,arguments,function*(t,e,n=new Map){let s=t.uri;if(n.has(s))return n.get(s);let o=ii.default.get(s);if(n.set(s,null),!o)return null;let l=[],c=yield e.documentManager.get(t).getImports();yield Promise.all(c.map(u=>W(this,null,function*(){let{document:d,textDocument:p}=u;if(!d)return;let h=yield Jg(p,e,n);h!==null&&l.push(h)})));let a=o.merge(...l);return n.set(s,a),a})}ln.buildTypeDocument=Jg;var Qg=class{constructor(e,n){this.document=e,this.context=n}findAllAssignmentsOfIdentifier(e,n){return ii.default.get(this.document.uri).getScopeContext(n).aggregator.resolveAvailableAssignmentsWithQuery(e)}findAllAssignmentsOfItem(e,n){return ii.default.get(this.document.uri).getScopeContext(n).aggregator.resolveAvailableAssignments(e)}findAllAvailableIdentifierInRoot(){return ii.default.get(this.document.uri).getRootScopeContext().scope.getAllIdentifier()}findAllAvailableIdentifier(e){return ii.default.get(this.document.uri).getScopeContext(e).scope.getAllIdentifier()}findAllAvailableIdentifierRelatedToPosition(e){let n=ii.default.get(this.document.uri),r=new Map,i=n.getScopeContext(e.scope);i.scope.isSelfAvailable()&&r.set("self",{kind:fs.CompletionItemKind.Constant,line:-1}),i.scope.isSuperAvailable()&&r.set("super",{kind:fs.CompletionItemKind.Constant,line:-1});let s=new Map;(0,fs.injectIdentifers)(s,i.scope);let o=Array.from(s.entries()).map(([l,c])=>st({identifier:l},c)).sort((l,c)=>l.line-c.line);for(let l=0;l<o.length;l++){let c=o[l];if(c.line>=e.end.line)break;r.set(c.identifier,{kind:c.kind,line:c.line})}i.scope.locals!==i.scope.globals&&(0,fs.injectIdentifers)(r,i.scope.globals),i.scope.outer&&(0,fs.injectIdentifers)(r,i.scope.outer);for(let l of n.container.getAllIdentifier(Uj.SignatureDefinitionBaseType.General))r.set(...l);return r}lookupAST(e){let n=this,i=this.context.documentManager.get(n.document).document.lines[e.line+1];if(!i)return null;for(let s=0;s<i.length;s++){let o=i[s],l=Wj.findEx((a,u)=>{let d=a.start.line-1,p=a.start.character-1,h=a.end.line-1,m=a.end.character-1;return d>e.line?{exit:!0}:d<h?{valid:e.line>d&&e.line<h||e.line===d&&p<=e.character||e.line===h&&m>=e.character}:{valid:d<=e.line&&p<=e.character&&h>=e.line&&m>=e.character}},o),c=l.pop();if(c)return{closest:c,outer:l}}return null}lookupBasePath(e){return W(this,null,function*(){let n=yield this.buildTypeMap();if(n===null)return null;let r=(0,ii.lookupBase)(e);return r?n.resolveNamespace(r):null})}buildTypeMap(){return W(this,null,function*(){return yield Jg(this.document,this.context)})}lookupTypeInfo(r){return W(this,arguments,function*({closest:e,outer:n}){let i=yield this.buildTypeMap();if(i===null)return null;let s=n.length>0?n[n.length-1]:void 0;return(s==null?void 0:s.type)===B0.ASTType.MemberExpression&&e===s.identifier||(s==null?void 0:s.type)===B0.ASTType.IndexExpression&&e===s.index&&(0,fs.isValidIdentifierLiteral)(e)?i.resolveType(s,!0):i.resolveType(e,!0)})}lookupType(e){let n=this,r=n.lookupAST(e);return r?n.lookupTypeInfo(r):null}};ln.LookupHelper=Qg});var W0=T(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.AVAILABLE_CONSTANTS=void 0;Uc.AVAILABLE_CONSTANTS=["true","false","null","params","globals","locals","outer"].map(t=>({label:t,kind:21}))});var Wc=T(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.GreyScriptKeyword=void 0;var Vj;(function(t){t.ImportCode="import_code"})(Vj=Ho.GreyScriptKeyword||(Ho.GreyScriptKeyword={}))});var ey=T(Zg=>{"use strict";Object.defineProperty(Zg,"__esModule",{value:!0});var Hj=pe(),V0=Bt(),zj=Wc(),Xg=class extends V0.LexerValidator{constructor(){super(...arguments),this.isKeyword=Set.prototype.has.bind(new Set([...Object.values(Hj.Keyword),...Object.values(V0.GreybelKeyword),...Object.values(zj.GreyScriptKeyword)]))}};Zg.default=Xg});var ny=T(zo=>{"use strict";var Gj=zo&&zo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(zo,"__esModule",{value:!0});var Kj=Bt(),Yj=Gj(ey()),ty=class extends Kj.Lexer{constructor(e,n={}){n.validator=n.validator||new Yj.default,super(e,n)}};zo.default=ty});var iy=T(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});Vc.ASTChunkGreyScript=void 0;var Qj=Bt(),ry=class t extends Qj.ASTChunkAdvanced{constructor(e){super(e),this.nativeImports=e.nativeImports||[]}clone(){return new t({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,scope:this.scope})}};Vc.ASTChunkGreyScript=ry});var sy=T(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.ASTType=void 0;var Jj;(function(t){t.ImportCodeExpression="ImportCodeExpression"})(Jj=Go.ASTType||(Go.ASTType={}))});var ay=T(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});Hc.ASTImportCodeExpression=void 0;var Xj=pe(),Zj=sy(),oy=class t extends Xj.ASTBase{constructor(e){super(Zj.ASTType.ImportCodeExpression,e),this.directory=e.directory}toString(){return`ImportCode[${this.start}-${this.end}][${this.directory}]`}clone(){return new t({directory:this.directory,start:this.start,end:this.end,scope:this.scope})}};Hc.ASTImportCodeExpression=oy});var cy=T(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.ASTImportCodeExpression=Mn.ASTChunkGreyScript=Mn.ASTType=Mn.ASTProvider=void 0;var eL=Bt(),tL=iy(),nL=ay(),ly=class extends eL.ASTProvider{chunkAdvanced(e){return new tL.ASTChunkGreyScript(e)}importCodeExpression(e){return new nL.ASTImportCodeExpression(e)}};Mn.ASTProvider=ly;var rL=sy();Object.defineProperty(Mn,"ASTType",{enumerable:!0,get:function(){return rL.ASTType}});var iL=iy();Object.defineProperty(Mn,"ASTChunkGreyScript",{enumerable:!0,get:function(){return iL.ASTChunkGreyScript}});var sL=ay();Object.defineProperty(Mn,"ASTImportCodeExpression",{enumerable:!0,get:function(){return sL.ASTImportCodeExpression}})});var H0=T(Ko=>{"use strict";var oL=Ko&&Ko.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ko,"__esModule",{value:!0});var gs=pe(),Ot=Bt(),zc=Gi(),ys=Ji(),aL=cy(),lL=oL(ny()),cL=Wc(),uy=class extends Ot.Parser{constructor(e,n={}){n.lexer=n.lexer||new lL.default(e,{unsafe:n.unsafe,tabWidth:n.tabWidth}),n.astProvider=n.astProvider||new aL.ASTProvider,super(e,n);let r=this;r.nativeImports=[]}parseStatement(){let e=this;if(e.isType(gs.TokenType.Keyword))switch(e.token.value){case cL.GreyScriptKeyword.ImportCode:e.next();let r=e.parseNativeImportCodeStatement();e.addItemToLines(r),e.backpatches.peek().body.push(r);return;default:break}return super.parseStatement()}parseFunctionDeclaration(e,n=!1,r=!1){let i=this;if(!Ot.Selectors.Function(i.token))return i.parseOr(n,r);i.next();let s=i.previousToken.start,o=i.astProvider.functionStatement({start:s,end:null,scope:i.currentScope,parent:i.outerScopes[i.outerScopes.length-1],assignment:i.currentAssignment}),l=[];if(i.pushScope(o),!Ot.SelectorGroups.BlockEndOfLine(i.token)){for(i.requireToken(Ot.Selectors.LParenthesis,s);!Ot.SelectorGroups.FunctionDeclarationArgEnd(i.token);){let a=i.parseIdentifier(),u=a.start;if(i.consume(Ot.Selectors.Assign)){let d=i.parseExpr(null),p=i.astProvider.assignmentStatement({variable:a,init:d,start:u,end:i.previousToken.end,scope:i.currentScope});i.currentScope.assignments.push(p),l.push(p)}else{let d=i.astProvider.assignmentStatement({variable:a,init:i.astProvider.unknown({start:u,end:i.previousToken.end,scope:i.currentScope}),start:u,end:i.previousToken.end,scope:i.currentScope});i.currentScope.assignments.push(d),l.push(a)}if(Ot.Selectors.RParenthesis(i.token))break;if(i.requireToken(Ot.Selectors.ArgumentSeperator,s),Ot.Selectors.RParenthesis(i.token)){i.raise("expected argument instead received right parenthesis",new ys.Range(i.previousToken.end,i.previousToken.end));break}}i.requireToken(Ot.Selectors.RParenthesis,s)}o.parameters=l;let c=new gs.PendingFunction(o);return i.backpatches.push(c),c.onComplete=a=>{e!==null?(e.end=a.block.end,i.addItemToLines(e)):i.addItemToLines(a.block)},o}parseNativeImportCodeStatement(){var e,n,r,i;let s=this,o=s.previousToken.start;if(!s.consume(Ot.Selectors.LParenthesis))return s.raise("expected import_code to have opening parenthesis",new ys.Range(o,new zc.Position((e=s.token.lastLine)!==null&&e!==void 0?e:s.token.line,s.token.end.character))),s.parseInvalidCode();let l;if(gs.TokenType.StringLiteral===s.token.type)l=s.token.value,s.next();else return s.raise("expected import_code argument to be string literal",new ys.Range(o,new zc.Position((n=s.token.lastLine)!==null&&n!==void 0?n:s.token.line,s.token.end.character))),s.parseInvalidCode();if(s.consume(Ot.Selectors.ImportCodeSeperator)){if(!s.isType(gs.TokenType.StringLiteral))return s.raise("expected import_code argument to be string literal",new ys.Range(o,new zc.Position((r=s.token.lastLine)!==null&&r!==void 0?r: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(Ot.Selectors.RParenthesis))return s.raise("expected import_code to have closing parenthesis",new ys.Range(o,new zc.Position((i=s.token.lastLine)!==null&&i!==void 0?i:s.token.line,s.token.end.character))),s.parseInvalidCode();let c=s.astProvider.importCodeExpression({directory:l,start:o,end:s.previousToken.end,scope:s.currentScope});return s.nativeImports.push(c),c}parseChunk(){let e=this;e.next();let n=e.token.start,r=e.astProvider.chunkAdvanced({start:n,end:null}),i=new gs.PendingChunk(r);for(e.backpatches.setDefault(i),e.pushScope(r);!Ot.Selectors.EndOfFile(e.token)&&(e.skipNewlines(),!Ot.Selectors.EndOfFile(e.token));)e.lexer.recordSnapshot(),e.statementErrors=[],e.parseStatement(),e.statementErrors.length>0&&e.tryToRecover();let s=e.backpatches.pop();for(;!(0,gs.isPendingChunk)(s);){let o=e.raise(`found open block ${s.block.type}`,new ys.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),r.literals=e.literals,r.scopes=e.scopes,r.lines=e.lines,r.nativeImports=e.nativeImports,r.imports=e.imports,r.includes=e.includes,r.injects=e.injects,r}};Ko.default=uy});var Gn=T(Et=>{"use strict";var uL=Et&&Et.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),z0=Et&&Et.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&uL(e,t,n)},dy=Et&&Et.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Et,"__esModule",{value:!0});Et.Parser=Et.LexerValidator=Et.Lexer=void 0;var dL=ny();Object.defineProperty(Et,"Lexer",{enumerable:!0,get:function(){return dy(dL).default}});var pL=ey();Object.defineProperty(Et,"LexerValidator",{enumerable:!0,get:function(){return dy(pL).default}});var hL=H0();Object.defineProperty(Et,"Parser",{enumerable:!0,get:function(){return dy(hL).default}});z0(cy(),Et);z0(Wc(),Et)});var G0=T(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.AVAILABLE_KEYWORDS=void 0;var bs=Bt(),fL=Gn(),Ct=pe();Gc.AVAILABLE_KEYWORDS=[Ct.Keyword.If,Ct.Keyword.In,Ct.Keyword.Or,Ct.Keyword.And,Ct.Keyword.Isa,Ct.Keyword.For,Ct.Keyword.New,Ct.Keyword.Not,Ct.Keyword.End,Ct.Keyword.Then,Ct.Keyword.Else,Ct.Keyword.Break,Ct.Keyword.While,Ct.Keyword.Return,Ct.Keyword.Function,Ct.Keyword.Continue,fL.GreyScriptKeyword.ImportCode,bs.GreybelKeyword.Envar,bs.GreybelKeyword.Import,bs.GreybelKeyword.Include,bs.GreybelKeyword.Debugger,bs.GreybelKeyword.Line,bs.GreybelKeyword.File].map(t=>({label:t,kind:14}))});var K0=T(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});Kc.AVAILABLE_OPERATORS=void 0;var Yo=ps(),mt=pe();Kc.AVAILABLE_OPERATORS=[mt.Operator.Plus,mt.Operator.Asterik,mt.Operator.Minus,mt.Operator.Slash,mt.Operator.Power,mt.Operator.Modulo,mt.Operator.LessThan,mt.Operator.GreaterThan,mt.Operator.LessThanOrEqual,mt.Operator.GreaterThanOrEqual,mt.Operator.NotEqual,mt.Operator.Equal,mt.Operator.AddShorthand,mt.Operator.SubtractShorthand,mt.Operator.MultiplyShorthand,mt.Operator.DivideShorthand,Yo.Operator.BitwiseAnd,Yo.Operator.BitwiseOr,Yo.Operator.LeftShift,Yo.Operator.RightShift,Yo.Operator.UnsignedRightShift,mt.Operator.Assign,mt.Operator.Reference].map(t=>({label:t,kind:24}))});var J0=T(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.activate=ut.getDefaultCompletionList=ut.getPropertyCompletionList=ut.transformToCompletionItems=void 0;var Y0=pe(),mL=Gg(),Q0=ms(),gL=W0(),yL=G0(),bL=K0(),vL=t=>{let e=[];for(let[n,r]of t)e.push({label:n,kind:(0,mL.getCompletionItemKind)(r.kind)});return e};ut.transformToCompletionItems=vL;var _L=(t,e)=>W(ut,null,function*(){let n=yield t.lookupBasePath(e);return n===null?[]:(0,ut.transformToCompletionItems)(n.getAllIdentifier())});ut.getPropertyCompletionList=_L;var wL=()=>[...yL.AVAILABLE_KEYWORDS,...bL.AVAILABLE_OPERATORS,...gL.AVAILABLE_CONSTANTS];ut.getDefaultCompletionList=wL;function xL(t){t.connection.onCompletion(e=>W(this,null,function*(){if(!t.getConfiguration().autocomplete)return;let n=yield t.fs.getTextDocument(e.textDocument.uri);if(n==null)return;let r=yield t.documentManager.getLatest(n),i=new Q0.LookupHelper(r.textDocument,t),s=i.lookupAST(e.position),o=[],l=!1;if(s){let{closest:u}=s;u instanceof Y0.ASTMemberExpression?(o.push(...yield(0,ut.getPropertyCompletionList)(i,u)),l=!0):u instanceof Y0.ASTIndexExpression?(o.push(...yield(0,ut.getPropertyCompletionList)(i,u)),l=!0):o.push(...(0,ut.getDefaultCompletionList)())}else o.push(...(0,ut.getDefaultCompletionList)()),o.push(...(0,ut.transformToCompletionItems)(i.findAllAvailableIdentifierInRoot()));if(!s||l)return o;let c=new Set([...o.map(u=>u.label)]),a=yield r.getImports();for(let u of a){let{document:d}=u;if(!d)continue;let p=new Q0.LookupHelper(u.textDocument,t);o.push(...(0,ut.transformToCompletionItems)(p.findAllAvailableIdentifier(d)).filter(h=>!c.has(h.label)).map(h=>(c.add(h.label),h)))}return o.push(...(0,ut.transformToCompletionItems)(i.findAllAvailableIdentifierRelatedToPosition(s.closest)).filter(u=>!c.has(u.label))),o})),t.connection.onCompletionResolve(e=>e)}ut.activate=xL});var Z0=T((WU,X0)=>{"use strict";X0.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 py=T((VU,tT)=>{var Qo=Z0(),eT={};for(let t of Object.keys(Qo))eT[Qo[t]]=t;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"]}};tT.exports=z;for(let t of Object.keys(z)){if(!("channels"in z[t]))throw new Error("missing channels property: "+t);if(!("labels"in z[t]))throw new Error("missing channel labels property: "+t);if(z[t].labels.length!==z[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:n}=z[t];delete z[t].channels,delete z[t].labels,Object.defineProperty(z[t],"channels",{value:e}),Object.defineProperty(z[t],"labels",{value:n})}z.rgb.hsl=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(e,n,r),s=Math.max(e,n,r),o=s-i,l,c;s===i?l=0:e===s?l=(n-r)/o:n===s?l=2+(r-e)/o:r===s&&(l=4+(e-n)/o),l=Math.min(l*60,360),l<0&&(l+=360);let a=(i+s)/2;return s===i?c=0:a<=.5?c=o/(s+i):c=o/(2-s-i),[l,c*100,a*100]};z.rgb.hsv=function(t){let e,n,r,i,s,o=t[0]/255,l=t[1]/255,c=t[2]/255,a=Math.max(o,l,c),u=a-Math.min(o,l,c),d=function(p){return(a-p)/6/u+1/2};return u===0?(i=0,s=0):(s=u/a,e=d(o),n=d(l),r=d(c),o===a?i=r-n:l===a?i=1/3+e-r:c===a&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,a*100]};z.rgb.hwb=function(t){let e=t[0],n=t[1],r=t[2],i=z.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(n,r));return r=1-1/255*Math.max(e,Math.max(n,r)),[i,s*100,r*100]};z.rgb.cmyk=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(1-e,1-n,1-r),s=(1-e-i)/(1-i)||0,o=(1-n-i)/(1-i)||0,l=(1-r-i)/(1-i)||0;return[s*100,o*100,l*100,i*100]};function SL(t,e){return it(t[0]-e[0],2)+it(t[1]-e[1],2)+it(t[2]-e[2],2)}z.rgb.keyword=function(t){let e=eT[t];if(e)return e;let n=1/0,r;for(let i of Object.keys(Qo)){let s=Qo[i],o=SL(t,s);o<n&&(n=o,r=i)}return r};z.keyword.rgb=function(t){return Qo[t]};z.rgb.xyz=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255;e=e>.04045?it((e+.055)/1.055,2.4):e/12.92,n=n>.04045?it((n+.055)/1.055,2.4):n/12.92,r=r>.04045?it((r+.055)/1.055,2.4):r/12.92;let i=e*.4124+n*.3576+r*.1805,s=e*.2126+n*.7152+r*.0722,o=e*.0193+n*.1192+r*.9505;return[i*100,s*100,o*100]};z.rgb.lab=function(t){let e=z.rgb.xyz(t),n=e[0],r=e[1],i=e[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?it(n,1/3):7.787*n+16/116,r=r>.008856?it(r,1/3):7.787*r+16/116,i=i>.008856?it(i,1/3):7.787*i+16/116;let s=116*r-16,o=500*(n-r),l=200*(r-i);return[s,o,l]};z.hsl.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i,s,o;if(n===0)return o=r*255,[o,o,o];r<.5?i=r*(1+n):i=r+n-r*n;let l=2*r-i,c=[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,c[a]=o*255;return c};z.hsl.hsv=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,i=n,s=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=s<=1?s:2-s;let o=(r+n)/2,l=r===0?2*i/(s+i):2*n/(r+n);return[e,l*100,o*100]};z.hsv.rgb=function(t){let e=t[0]/60,n=t[1]/100,r=t[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),o=255*r*(1-n),l=255*r*(1-n*s),c=255*r*(1-n*(1-s));switch(r*=255,i){case 0:return[r,c,o];case 1:return[l,r,o];case 2:return[o,r,c];case 3:return[o,l,r];case 4:return[c,o,r];case 5:return[r,o,l]}};z.hsv.hsl=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,i=Math.max(r,.01),s,o;o=(2-n)*r;let l=(2-n)*i;return s=n*i,s/=l<=1?l:2-l,s=s||0,o/=2,[e,s*100,o*100]};z.hwb.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=n+r,s;i>1&&(n/=i,r/=i);let o=Math.floor(6*e),l=1-r;s=6*e-o,o&1&&(s=1-s);let c=n+s*(l-n),a,u,d;switch(o){default:case 6:case 0:a=l,u=c,d=n;break;case 1:a=c,u=l,d=n;break;case 2:a=n,u=l,d=c;break;case 3:a=n,u=c,d=l;break;case 4:a=c,u=n,d=l;break;case 5:a=l,u=n,d=c;break}return[a*255,u*255,d*255]};z.cmyk.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,i=t[3]/100,s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),l=1-Math.min(1,r*(1-i)+i);return[s*255,o*255,l*255]};z.xyz.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,i,s,o;return i=e*3.2406+n*-1.5372+r*-.4986,s=e*-.9689+n*1.8758+r*.0415,o=e*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*it(i,1/2.4)-.055:i*12.92,s=s>.0031308?1.055*it(s,1/2.4)-.055:s*12.92,o=o>.0031308?1.055*it(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(t){let e=t[0],n=t[1],r=t[2];e/=95.047,n/=100,r/=108.883,e=e>.008856?it(e,1/3):7.787*e+16/116,n=n>.008856?it(n,1/3):7.787*n+16/116,r=r>.008856?it(r,1/3):7.787*r+16/116;let i=116*n-16,s=500*(e-n),o=200*(n-r);return[i,s,o]};z.lab.xyz=function(t){let e=t[0],n=t[1],r=t[2],i,s,o;s=(e+16)/116,i=n/500+s,o=s-r/200;let l=it(s,3),c=it(i,3),a=it(o,3);return s=l>.008856?l:(s-16/116)/7.787,i=c>.008856?c:(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(t){let e=t[0],n=t[1],r=t[2],i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);let o=Math.sqrt(n*n+r*r);return[e,o,i]};z.lch.lab=function(t){let e=t[0],n=t[1],i=t[2]/360*2*Math.PI,s=n*Math.cos(i),o=n*Math.sin(i);return[e,s,o]};z.rgb.ansi16=function(t,e=null){let[n,r,i]=t,s=e===null?z.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return s===2&&(o+=60),o};z.hsv.ansi16=function(t){return z.rgb.ansi16(z.hsv.rgb(t),t[2])};z.rgb.ansi256=function(t){let e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};z.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let n=(~~(t>50)+1)*.5,r=(e&1)*n*255,i=(e>>1&1)*n*255,s=(e>>2&1)*n*255;return[r,i,s]};z.ansi256.rgb=function(t){if(t>=232){let s=(t-232)*10+8;return[s,s,s]}t-=16;let e,n=Math.floor(t/36)/5*255,r=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[n,r,i]};z.rgb.hex=function(t){let n=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};z.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let n=e[0];e[0].length===3&&(n=n.split("").map(l=>l+l).join(""));let r=parseInt(n,16),i=r>>16&255,s=r>>8&255,o=r&255;return[i,s,o]};z.rgb.hcg=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.max(Math.max(e,n),r),s=Math.min(Math.min(e,n),r),o=i-s,l,c;return o<1?l=s/(1-o):l=0,o<=0?c=0:i===e?c=(n-r)/o%6:i===n?c=2+(r-e)/o:c=4+(e-n)/o,c/=6,c%=1,[c*360,o*100,l*100]};z.hsl.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=n<.5?2*e*n:2*e*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[t[0],r*100,i*100]};z.hsv.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=e*n,i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],r*100,i*100]};z.hcg.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100;if(n===0)return[r*255,r*255,r*255];let i=[0,0,0],s=e%1*6,o=s%1,l=1-o,c=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 c=(1-n)*r,[(n*i[0]+c)*255,(n*i[1]+c)*255,(n*i[2]+c)*255]};z.hcg.hsv=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e),i=0;return r>0&&(i=e/r),[t[0],i*100,r*100]};z.hcg.hsl=function(t){let e=t[1]/100,r=t[2]/100*(1-e)+.5*e,i=0;return r>0&&r<.5?i=e/(2*r):r>=.5&&r<1&&(i=e/(2*(1-r))),[t[0],i*100,r*100]};z.hcg.hwb=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e);return[t[0],(r-e)*100,(1-r)*100]};z.hwb.hcg=function(t){let e=t[1]/100,r=1-t[2]/100,i=r-e,s=0;return i<1&&(s=(r-i)/(1-i)),[t[0],i*100,s*100]};z.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};z.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};z.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};z.gray.hsl=function(t){return[0,0,t[0]]};z.gray.hsv=z.gray.hsl;z.gray.hwb=function(t){return[0,100,t[0]]};z.gray.cmyk=function(t){return[0,0,0,t[0]]};z.gray.lab=function(t){return[t[0],0,0]};z.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(r.length)+r};z.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var rT=T((zU,nT)=>{var Yc=py();function kL(){let t={},e=Object.keys(Yc);for(let n=e.length,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}function TL(t){let e=kL(),n=[t];for(e[t].distance=0;n.length;){let r=n.pop(),i=Object.keys(Yc[r]);for(let s=i.length,o=0;o<s;o++){let l=i[o],c=e[l];c.distance===-1&&(c.distance=e[r].distance+1,c.parent=r,n.unshift(l))}}return e}function IL(t,e){return function(n){return e(t(n))}}function EL(t,e){let n=[e[t].parent,t],r=Yc[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),r=IL(Yc[e[i].parent][i],r),i=e[i].parent;return r.conversion=n,r}nT.exports=function(t){let e=TL(t),n={},r=Object.keys(e);for(let i=r.length,s=0;s<i;s++){let o=r[s];e[o].parent!==null&&(n[o]=EL(o,e))}return n}});var sT=T((GU,iT)=>{var hy=py(),CL=rT(),vs={},RL=Object.keys(hy);function PL(t){let e=function(...n){let r=n[0];return r==null?r:(r.length>1&&(n=r),t(n))};return"conversion"in t&&(e.conversion=t.conversion),e}function AL(t){let e=function(...n){let r=n[0];if(r==null)return r;r.length>1&&(n=r);let i=t(n);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 t&&(e.conversion=t.conversion),e}RL.forEach(t=>{vs[t]={},Object.defineProperty(vs[t],"channels",{value:hy[t].channels}),Object.defineProperty(vs[t],"labels",{value:hy[t].labels});let e=CL(t);Object.keys(e).forEach(r=>{let i=e[r];vs[t][r]=AL(i),vs[t][r].raw=PL(i)})});iT.exports=vs});var aT=T(_s=>{"use strict";var OL=_s&&_s.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_s,"__esModule",{value:!0});_s.activate=void 0;var fy=OL(sT()),DL=pe(),oT;(function(t){t.Black="black",t.Blue="blue",t.Green="green",t.Orange="orange",t.Purple="purple",t.Red="red",t.White="white",t.Yellow="yellow"})(oT||(oT={}));var my={black:"#000000",blue:"#0000FF",green:"#00FF00",orange:"#FF8800",purple:"#CC8899",red:"#FF0000",white:"#FFFFFF",yellow:"#FFFF00"},jL=()=>new RegExp(`(?:mark|color)=(${Object.keys(my).join("|")}|(?:#[0-9a-f]{6}|#[0-9a-f]{3}))`,"ig"),LL=Object.prototype.hasOwnProperty;function ML(t){t.connection.onColorPresentation(e=>[{label:`#${fy.default.rgb.hex(e.color.red*255,e.color.green*255,e.color.blue*255)}`}]),t.connection.onDocumentColor(e=>W(this,null,function*(){let n=yield t.fs.getTextDocument(e.textDocument.uri);if(n==null)return;let s=(yield t.documentManager.getLatest(n)).document.literals.filter(c=>c.type===DL.ASTType.StringLiteral),o=[],l=({match:c,markup:a,value:u,astPosition:d,lineIndex:p})=>{let h=c.index+a.indexOf("=")+1,m=h+u.length,f=d.line-1+p,g=h,b=m;return p===0&&(g+=d.character,b+=d.character),{start:{line:f,character:g},end:{line:f,character:b}}};for(let c=0;c<s.length;c++){let a=s[c];if(!a.start)continue;let u=a.start,d=a.value.toString().split(`
|
107
|
+
`);for(let p=0;p<d.length;p++){let h=d[p],m=jL(),f;for(;f=m.exec(h);){let[g,b]=f,v=l({match:f,markup:g,value:b,astPosition:u,lineIndex:p});if(b.startsWith("#")){let[_,w,S]=fy.default.hex.rgb(b.slice(1));o.push({range:v,color:{red:_/255,green:w/255,blue:S/255,alpha:1}})}else if(LL.call(my,b)){let[_,w,S]=fy.default.hex.rgb(my[b].slice(1));o.push({range:v,color:{red:_/255,green:w/255,blue:S/255,alpha:1}})}else o.push({range:v,color:{red:0,green:0,blue:0,alpha:1}})}}}return o}))}_s.activate=ML});var uT=T(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.activate=void 0;var qL=pe(),lT=ms(),cT=(t,e,n)=>{let r=t.findAllAssignmentsOfItem(e,n),i=[];for(let s of r){if(!s.start||!s.end)continue;let o={line:s.start.line-1,character:s.start.character-1},l={line:s.end.line-1,character:s.end.character-1},c={targetUri:t.document.uri,targetRange:{start:o,end:l},targetSelectionRange:{start:o,end:l}};i.push(c)}return i};function FL(t){t.connection.onDefinition(e=>W(this,null,function*(){let n=yield t.fs.getTextDocument(e.textDocument.uri);if(n==null)return;let r=new lT.LookupHelper(n,t),i=r.lookupAST(e.position);if(!i)return;let{outer:s,closest:o}=i,l=s.length>0?s[s.length-1]:void 0,c=o;l&&l instanceof qL.ASTMemberExpression&&l.identifier===o&&(c=l);let a=cT(r,c,c.scope),u=yield t.documentManager.get(n).getImports();for(let d of u){let{document:p,textDocument:h}=d;if(!p)continue;let m=new lT.LookupHelper(h,t),f=cT(m,c,p);a.push(...f)}return a}))}Qc.activate=FL});var dT=T(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.activate=void 0;function NL(t,e){return W(this,null,function*(){let n=yield e.documentManager.getLatest(t);return n.errors.map(r=>{if(r!=null&&r.range){let i=r.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:r.message,severity:1}}return{range:{start:n.document.start,end:n.document.end},message:r.message,severity:1}})})}function $L(t){t.connection.languages.diagnostics.on(e=>W(this,null,function*(){if(!t.getConfiguration().diagnostic)return;let n=yield t.fs.getTextDocument(e.textDocument.uri);if(n==null)return;let r=yield NL(n,t);return r.length===0?{kind:"full",items:[]}:{kind:"full",items:r}}))}Jc.activate=$L});function BL(){if(pT)return gy;pT=!0;var t=gy={},e,n;function r(){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=r}catch(f){e=r}try{typeof clearTimeout=="function"?n=clearTimeout:n=i}catch(f){n=i}})();function s(f){if(e===setTimeout)return setTimeout(f,0);if((e===r||!e)&&setTimeout)return e=setTimeout,setTimeout(f,0);try{return e(f,0)}catch(g){try{return e.call(null,f,0)}catch(b){return e.call(this||ws,f,0)}}}function o(f){if(n===clearTimeout)return clearTimeout(f);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(f);try{return n(f)}catch(g){try{return n.call(null,f)}catch(b){return n.call(this||ws,f)}}}var l=[],c=!1,a,u=-1;function d(){!c||!a||(c=!1,a.length?l=a.concat(l):u=-1,l.length&&p())}function p(){if(!c){var f=s(d);c=!0;for(var g=l.length;g;){for(a=l,l=[];++u<g;)a&&a[u].run();u=-1,g=l.length}a=null,c=!1,o(f)}}t.nextTick=function(f){var g=new Array(arguments.length-1);if(arguments.length>1)for(var b=1;b<arguments.length;b++)g[b-1]=arguments[b];l.push(new h(f,g)),l.length===1&&!c&&s(p)};function h(f,g){(this||ws).fun=f,(this||ws).array=g}h.prototype.run=function(){(this||ws).fun.apply(null,(this||ws).array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={};function m(){}return t.on=m,t.addListener=m,t.once=m,t.off=m,t.removeListener=m,t.removeAllListeners=m,t.emit=m,t.prependListener=m,t.prependOnceListener=m,t.listeners=function(f){return[]},t.binding=function(f){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(f){throw new Error("process.chdir is not supported")},t.umask=function(){return 0},gy}var gy,pT,ws,Ne,yy=er(()=>{gy={},pT=!1,ws=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:global;Ne=BL();Ne.platform="browser";Ne.addListener;Ne.argv;Ne.binding;Ne.browser;Ne.chdir;Ne.cwd;Ne.emit;Ne.env;Ne.listeners;Ne.nextTick;Ne.off;Ne.on;Ne.once;Ne.prependListener;Ne.prependOnceListener;Ne.removeAllListeners;Ne.removeListener;Ne.title;Ne.umask;Ne.version;Ne.versions});function UL(){if(hT)return by;hT=!0;var t=Ne;function e(s){if(typeof s!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(s))}function n(s,o){for(var l="",c=0,a=-1,u=0,d,p=0;p<=s.length;++p){if(p<s.length)d=s.charCodeAt(p);else{if(d===47)break;d=47}if(d===47){if(!(a===p-1||u===1))if(a!==p-1&&u===2){if(l.length<2||c!==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="",c=0):(l=l.slice(0,h),c=l.length-1-l.lastIndexOf("/")),a=p,u=0;continue}}else if(l.length===2||l.length===1){l="",c=0,a=p,u=0;continue}}o&&(l.length>0?l+="/..":l="..",c=2)}else l.length>0?l+="/"+s.slice(a+1,p):l=s.slice(a+1,p),c=p-a-1;a=p,u=0}else d===46&&u!==-1?++u:u=-1}return l}function r(s,o){var l=o.dir||o.root,c=o.base||(o.name||"")+(o.ext||"");return l?l===o.root?l+c:l+s+c:c}var i={resolve:function(){for(var o="",l=!1,c,a=arguments.length-1;a>=-1&&!l;a--){var u;a>=0?u=arguments[a]:(c===void 0&&(c=t.cwd()),u=c),e(u),u.length!==0&&(o=u+"/"+o,l=u.charCodeAt(0)===47)}return o=n(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,c=o.charCodeAt(o.length-1)===47;return o=n(o,!l),o.length===0&&!l&&(o="."),o.length>0&&c&&(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 c=arguments[l];e(c),c.length>0&&(o===void 0?o=c:o+="/"+c)}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 c=1;c<o.length&&o.charCodeAt(c)===47;++c);for(var a=o.length,u=a-c,d=1;d<l.length&&l.charCodeAt(d)===47;++d);for(var p=l.length,h=p-d,m=u<h?u:h,f=-1,g=0;g<=m;++g){if(g===m){if(h>m){if(l.charCodeAt(d+g)===47)return l.slice(d+g+1);if(g===0)return l.slice(d+g)}else u>m&&(o.charCodeAt(c+g)===47?f=g:g===0&&(f=0));break}var b=o.charCodeAt(c+g),v=l.charCodeAt(d+g);if(b!==v)break;b===47&&(f=g)}var _="";for(g=c+f+1;g<=a;++g)(g===a||o.charCodeAt(g)===47)&&(_.length===0?_+="..":_+="/..");return _.length>0?_+l.slice(d+f):(d+=f,l.charCodeAt(d)===47&&++d,l.slice(d))},_makeLong:function(o){return o},dirname:function(o){if(e(o),o.length===0)return".";for(var l=o.charCodeAt(0),c=l===47,a=-1,u=!0,d=o.length-1;d>=1;--d)if(l=o.charCodeAt(d),l===47){if(!u){a=d;break}}else u=!1;return a===-1?c?"/":".":c&&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 c=0,a=-1,u=!0,d;if(l!==void 0&&l.length>0&&l.length<=o.length){if(l.length===o.length&&l===o)return"";var p=l.length-1,h=-1;for(d=o.length-1;d>=0;--d){var m=o.charCodeAt(d);if(m===47){if(!u){c=d+1;break}}else h===-1&&(u=!1,h=d+1),p>=0&&(m===l.charCodeAt(p)?--p===-1&&(a=d):(p=-1,a=h))}return c===a?a=h:a===-1&&(a=o.length),o.slice(c,a)}else{for(d=o.length-1;d>=0;--d)if(o.charCodeAt(d)===47){if(!u){c=d+1;break}}else a===-1&&(u=!1,a=d+1);return a===-1?"":o.slice(c,a)}},extname:function(o){e(o);for(var l=-1,c=0,a=-1,u=!0,d=0,p=o.length-1;p>=0;--p){var h=o.charCodeAt(p);if(h===47){if(!u){c=p+1;break}continue}a===-1&&(u=!1,a=p+1),h===46?l===-1?l=p:d!==1&&(d=1):l!==-1&&(d=-1)}return l===-1||a===-1||d===0||d===1&&l===a-1&&l===c+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 r("/",o)},parse:function(o){e(o);var l={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return l;var c=o.charCodeAt(0),a=c===47,u;a?(l.root="/",u=1):u=0;for(var d=-1,p=0,h=-1,m=!0,f=o.length-1,g=0;f>=u;--f){if(c=o.charCodeAt(f),c===47){if(!m){p=f+1;break}continue}h===-1&&(m=!1,h=f+1),c===46?d===-1?d=f:g!==1&&(g=1):d!==-1&&(g=-1)}return d===-1||h===-1||g===0||g===1&&d===h-1&&d===p+1?h!==-1&&(p===0&&a?l.base=l.name=o.slice(1,h):l.base=l.name=o.slice(p,h)):(p===0&&a?(l.name=o.slice(1,d),l.base=o.slice(1,h)):(l.name=o.slice(p,d),l.base=o.slice(p,h)),l.ext=o.slice(d,h)),p>0?l.dir=o.slice(0,p-1):a&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};return i.posix=i,by=i,by}var by,hT,gt,vy=er(()=>{yy();by={},hT=!1;gt=UL()});var Kn={};Ls(Kn,{_makeLong:()=>WL,basename:()=>VL,default:()=>gt,delimiter:()=>HL,dirname:()=>zL,extname:()=>GL,format:()=>KL,isAbsolute:()=>YL,join:()=>QL,normalize:()=>JL,parse:()=>XL,posix:()=>ZL,relative:()=>eM,resolve:()=>tM,sep:()=>nM,win32:()=>rM});var WL,VL,HL,zL,GL,KL,YL,QL,JL,XL,ZL,eM,tM,nM,rM,Yn=er(()=>{vy();vy();yy();WL=gt._makeLong,VL=gt.basename,HL=gt.delimiter,zL=gt.dirname,GL=gt.extname,KL=gt.format,YL=gt.isAbsolute,QL=gt.join,JL=gt.normalize,XL=gt.parse,ZL=gt.posix,eM=gt.relative,tM=gt.resolve,nM=gt.sep,rM=gt.win32});var fT=T(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});Xc.getStringHashCode=void 0;Xc.getStringHashCode=function(){let t=new Map,e=n=>{let r,i;for(r=0,i=0;r<n.length;r++)i=Math.imul(31,i)+n.charCodeAt(r)|0;return i};return n=>{if(n.length===0)return 0;let r=t.get(n);if(r!==void 0)return r;let i=e(n);return t.set(n,i),i}}()});var _y=T(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.createExpressionHash=void 0;var Zc=pe(),mT=fT(),eu=(t,e)=>t.$$hash=e,iM=t=>{var e;return(e=t.$$hash)!==null&&e!==void 0?e:null};function xs(t){let e=iM(t);if(e!==null)return e;let n=(0,mT.getStringHashCode)(t.type);switch(t.type){case Zc.ASTType.ParenthesisExpression:return xs(t.expression);case Zc.ASTType.MemberExpression:{let r=t;return n^=xs(r.base),n^=xs(r.identifier),eu(t,n)}case Zc.ASTType.IndexExpression:{let r=t;return n^=xs(r.base),n^=xs(r.index),eu(t,n)}case Zc.ASTType.Identifier:{let r=t;return n^=(0,mT.getStringHashCode)(r.name),eu(t,n)}}return eu(t,n)}function sM(t){return xs(t)}tu.createExpressionHash=sM});var nu=T(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.hasEmptyBody=dt.containsMultilineItemInShortcutClauses=dt.getLastComment=dt.unwrap=dt.transformBitOperation=dt.countRightBinaryExpressions=dt.SHORTHAND_OPERATORS=void 0;var Ut=pe();dt.SHORTHAND_OPERATORS=[Ut.Operator.Plus,Ut.Operator.Minus,Ut.Operator.Asterik,Ut.Operator.Slash,Ut.Operator.Modulo,Ut.Operator.Power];var oM=t=>{if(t=(0,dt.unwrap)(t),t instanceof Ut.ASTComparisonGroupExpression)return t.expressions.length;let e=[t],n=0;for(;e.length>0;){let r=e.pop();r instanceof Ut.ASTBinaryExpression&&n++,(r instanceof Ut.ASTBinaryExpression||r instanceof Ut.ASTLogicalExpression||r instanceof Ut.ASTIsaExpression)&&(e.push((0,dt.unwrap)(r.left)),e.push((0,dt.unwrap)(r.right)))}return n};dt.countRightBinaryExpressions=oM;var aM=(t,e,n,r)=>{if(r==="|")return"bitOr("+[e,n].join(", ")+")";if(r==="&")return"bitAnd("+[e,n].join(", ")+")";if(r==="<<"||r===">>"||r===">>>")throw new Error("Operators in binary expression are not supported");return t};dt.transformBitOperation=aM;var lM=t=>{for(;t instanceof Ut.ASTParenthesisExpression;)t=t.expression;return t};dt.unwrap=lM;var cM=t=>{for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.type===Ut.ASTType.Comment)return n}return null};dt.getLastComment=cM;var uM=(t,e)=>e.some(n=>t.line<n.body[0].end.line);dt.containsMultilineItemInShortcutClauses=uM;var dM=t=>!t.some(e=>!(e instanceof Ut.ASTComment));dt.hasEmptyBody=dM});var xy=T(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.BeautifyContext=oi.IndentationType=void 0;var si=pe(),pM=nu(),gT;(function(t){t[t.Tab=0]="Tab",t[t.Whitespace=1]="Whitespace"})(gT=oi.IndentationType||(oi.IndentationType={}));var wy=class{get indent(){return this._indent}get isMultilineAllowed(){return this._isMultilineAllowed}constructor(e,n){this.transformer=e,this.options=n,this._indent=0,this._isMultilineAllowed=!0,this.chunks=[],this.usedComments=new Set,this.putIndent=n.indentation===gT.Tab?(r,i=0)=>`${" ".repeat(this._indent+i)}${r}`:(r,i=0)=>`${" ".repeat(n.indentationSpaces).repeat(this._indent+i)}${r}`}pushLines(e){this.chunks.push(e)}popLines(){return this.chunks.pop()}getLines(){return this.chunks[this.chunks.length-1]}useComment(e,n=" "){let r=this.getLines()[e.line];if(r==null)return"";let i=(0,pM.getLastComment)(r);return i!=null&&!this.usedComments.has(i)?(this.usedComments.add(i),n+this.transformer.make(i)):""}appendComment(e,n){return n+this.useComment(e)}disableMultiline(){this._isMultilineAllowed=!1}enableMultiline(){this._isMultilineAllowed=!0}incIndent(){this._indent++}decIndent(){this._indent--}getBlockOpenerEndLine(e){return e instanceof si.ASTIfClause||e instanceof si.ASTWhileStatement?e.condition.end.line:e instanceof si.ASTForGenericStatement?e.iterator.end.line:e.start.line}getPreviousEndLine(e){if(e==null)return 0;if(e.type===si.ASTType.IfShortcutStatement){let n=e;return n.clauses[n.clauses.length-1].body[0].end.line}return e.end.line}buildBlock(e){var n;if(e.body.length===0)return[];let r=[...e.body].sort((c,a)=>c.start.line-a.start.line),i=[],s=null;for(let c=0;c<r.length;c++){let a=r[c],u=(n=r[c+1])!==null&&n!==void 0?n:null;if(a.type!==si.ASTType.Comment&&(s==null?void 0:s.end.line)===a.start.line){let p=this.transformer.make(a,{isCommand:!0});i.push(this.putIndent(this.appendComment(a.end,p))),s=a;continue}if(this.usedComments.has(a)){a.isMultiline&&(s=a);continue}if(a.type===si.ASTType.Comment&&a.start.line===(u==null?void 0:u.start.line))continue;let d=Math.max(s?a.start.line-this.getPreviousEndLine(s)-1:a.start.line-this.getBlockOpenerEndLine(e)-1,0);if(d>0&&i.push(...new Array(d).fill("")),a instanceof si.ASTComment){this.usedComments.add(a);let p=this.transformer.make(a,{isCommand:!0});i.push(this.putIndent(p))}else{let p=this.transformer.make(a,{isCommand:!0});i.push(this.putIndent(this.appendComment(a.end,p)))}s=a}let o=e.body[e.body.length-1],l=Math.max(e.end.line-this.getPreviousEndLine(o)-1,0);return l>0&&i.push(...new Array(l).fill("")),i}};oi.BeautifyContext=wy});var Sy=T(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.beautifyFactory=void 0;var Jo=pe(),hM=(Yn(),Qe(Kn)),yT=_y(),bT=xy(),Dt=nu(),fM=t=>{let{keepParentheses:e=!1,indentation:n=bT.IndentationType.Tab,indentationSpaces:r=2,isDevMode:i=!1}=t.buildOptions,s=new bT.BeautifyContext(t,{keepParentheses:e,indentation:n,indentationSpaces:r,isDevMode:i});return{ParenthesisExpression:(o,l)=>{let c=s.useComment(o.end);return"("+t.make(o.expression,{hasLogicalIndentActive:l.hasLogicalIndentActive})+")"+c},Comment:(o,l)=>o.isMultiline?i?`/*${o.value}*/`:o.value.split(`
|
108
108
|
`).map(c=>`//${c}`).join(`
|
109
109
|
`):"// "+o.value.trimStart(),AssignmentStatement:(o,l)=>{let c=o.variable,a=o.init,u=t.make(c);if((c instanceof Jo.ASTIdentifier||c instanceof Jo.ASTMemberExpression)&&a instanceof Jo.ASTBinaryExpression&&(a.left instanceof Jo.ASTIdentifier||a.left instanceof Jo.ASTMemberExpression)&&Dt.SHORTHAND_OPERATORS.includes(a.operator)&&(0,yT.createExpressionHash)(c)===(0,yT.createExpressionHash)(a.left)){let p=t.make((0,Dt.unwrap)(a.right));return u+" "+a.operator+"= "+p}let d=t.make(a);return u+" = "+d},MemberExpression:(o,l)=>{let c=t.make(o.identifier);return[t.make(o.base),c].join(o.indexer)},FunctionDeclaration:(o,l)=>{s.disableMultiline();let c=o.parameters.map(p=>t.make(p));s.enableMultiline();let a=s.appendComment(o.start,c.length===0?"function":"function("+c.join(", ")+")"),u=s.putIndent("end function");if((0,Dt.hasEmptyBody)(o.body))return a+`
|
110
110
|
`+u;s.incIndent();let d=s.buildBlock(o);return s.decIndent(),a+`
|
@@ -210,7 +210,7 @@ end if`},IfClause:(n,r)=>{let i=t.make(n.condition),s=[],o;for(o of n.body){let
|
|
210
210
|
end function`).parseChunk();Ar.MAIN_BOILERPLATE=new $y.Parser('"$0"').parseChunk()});var xu=T(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.OutputProcessor=void 0;var TT=By(),Uy=class{constructor(e,n,{header:r=TT.HEADER_BOILERPLATE,main:i=TT.MAIN_BOILERPLATE}={}){this.context=e,this.transformer=n,this.processed=[],this.headerBoilerplate=this.transformer.transform(r),this.mainBoilerplate=this.transformer.transform(i)}addLiteralsOptimization(){let e=this.context,n=Array.from(e.literals.getMapping().values()).filter(i=>i.namespace!=null),r=e.variables.get("globals");return n.length>0&&this.processed.push("globals."+r+"=globals",...n.map(i=>`${r}.${i.namespace}=${i.literal.raw}`)),this}addHeader(){return this.processed.push(this.headerBoilerplate),this}addCode(e,n=!1){if(n){let r=this.mainBoilerplate.replace('"$0"',e);this.processed.push(r)}else this.processed.push(e);return this}build(){return this.processed.join(`
|
211
211
|
`)}};wu.OutputProcessor=Uy});var IT=T(ks=>{"use strict";var jM=ks&&ks.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ks,"__esModule",{value:!0});ks.DirectTranspiler=void 0;var LM=jM((Bn(),Qe($n))),MM=Bt(),Su=ou(),qM=Zo(),FM=yu(),NM=_u(),$M=hu(),BM=xu(),UM=Object.prototype.hasOwnProperty,Wy=class extends LM.default{constructor(e){super();let n=this;n.code=e.code,n.obfuscation=UM.call(e,"obfuscation")?e.obfuscation:!0,n.buildType=e.buildType||Su.BuildType.DEFAULT,n.buildOptions=e.buildOptions||{isDevMode:!1},n.disableLiteralsOptimization=e.disableLiteralsOptimization||n.buildType!==Su.BuildType.UGLIFY,n.disableNamespacesOptimization=e.disableNamespacesOptimization||n.buildType!==Su.BuildType.UGLIFY,n.environmentVariables=e.environmentVariables||new Map,n.excludedNamespaces=e.excludedNamespaces||[]}parse(){let e=this,n=(0,Su.getFactory)(e.buildType),i=new MM.Parser(e.code).parseChunk(),s=(0,$M.fetchNamespaces)(i),o=[].concat(i.literals),l=(0,NM.generateCharsetMap)(e.obfuscation),c=new qM.Context({variablesCharset:l.variables,variablesExcluded:e.excludedNamespaces,modulesCharset:l.modules});e.disableNamespacesOptimization||new Set(s).forEach(h=>c.variables.createNamespace(h)),e.disableLiteralsOptimization||o.forEach(p=>c.literals.add(p));let a=new FM.Transformer({buildOptions:e.buildOptions,mapFactory:n,context:c,environmentVariables:e.environmentVariables}),u=new BM.OutputProcessor(c,a);e.disableLiteralsOptimization||u.addLiteralsOptimization();let d=a.transform(i);return u.addCode(d),u.build()}};ks.DirectTranspiler=Wy});var ET={};Ls(ET,{default:()=>WM});var WM,CT=er(()=>{WM={}});var Hy=T(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.ResourceProvider=void 0;var Vy=class{getHandler(){let e=(CT(),Qe(ET)),n=(Yn(),Qe(Kn));return{getTargetRelativeTo:(r,i)=>{let s=n.resolve(r,".."),o=n.resolve(s,i);return Promise.resolve(e.existsSync(o)?o:o+".src")},has:r=>Promise.resolve(e.existsSync(r)),get:r=>Promise.resolve(e.readFileSync(r,"utf8")),resolve:r=>Promise.resolve(n.resolve(r))}}};ku.ResourceProvider=Vy});var Gy=T(Or=>{"use strict";var VM=Or&&Or.__awaiter||function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function l(u){try{a(r.next(u))}catch(d){o(d)}}function c(u){try{a(r.throw(u))}catch(d){o(d)}}function a(u){u.done?s(u.value):i(u.value).then(l,c)}a((r=r.apply(t,e||[])).next())})},HM=Or&&Or.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Or,"__esModule",{value:!0});Or.Target=void 0;var zM=HM((Bn(),Qe($n))),GM=Bt(),KM=My(),RT=du(),zy=class extends zM.default{constructor(e){super();let n=this;n.target=e.target,n.resourceHandler=e.resourceHandler,n.context=e.context}parse(e){return VM(this,void 0,void 0,function*(){let n=this,r=n.resourceHandler,i=yield r.resolve(n.target);if(!(yield r.has(i)))throw new Error("Target "+i+" does not exist...");let s=n.context,o=yield r.get(i);n.emit("parse-before",i);try{let c=new GM.Parser(o,{filename:i}).parseChunk(),a=new KM.Dependency({target:i,resourceHandler:r,chunk:c,context:s}),{namespaces:u,literals:d}=yield a.findDependencies();if(!e.disableNamespacesOptimization){let p=new Set(u);for(let h of p)s.variables.createNamespace(h)}if(!e.disableLiteralsOptimization)for(let p of d)s.literals.add(p);return{main:{chunk:c,dependency:a}}}catch(l){throw l instanceof RT.BuildError?l:new RT.BuildError(l.message,{target:this.target,range:l.range})}})}};Or.Target=zy});var PT=T(Ts=>{"use strict";var YM=Ts&&Ts.__awaiter||function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function l(u){try{a(r.next(u))}catch(d){o(d)}}function c(u){try{a(r.throw(u))}catch(d){o(d)}}function a(u){u.done?s(u.value):i(u.value).then(l,c)}a((r=r.apply(t,e||[])).next())})};Object.defineProperty(Ts,"__esModule",{value:!0});Ts.Transpiler=void 0;var QM=Dr(),JM=By(),Tu=ou(),XM=Zo(),ZM=Hy(),eq=Gy(),tq=yu(),nq=_u(),rq=xu(),iq=Object.prototype.hasOwnProperty,Ky=class{constructor(e){let n=this;n.target=e.target,n.resourceHandler=e.resourceHandler||new ZM.ResourceProvider().getHandler(),n.obfuscation=iq.call(e,"obfuscation")?e.obfuscation:!0;let r=(0,nq.generateCharsetMap)(n.obfuscation);n.context=new XM.Context({variablesCharset:r.variables,variablesExcluded:e.excludedNamespaces,modulesCharset:r.modules}),n.buildType=e.buildType||Tu.BuildType.DEFAULT,n.buildOptions=e.buildOptions||{isDevMode:!1},n.installer=e.installer||!1,n.disableLiteralsOptimization=e.disableLiteralsOptimization||n.buildType!==Tu.BuildType.UGLIFY,n.disableNamespacesOptimization=e.disableNamespacesOptimization||n.buildType!==Tu.BuildType.UGLIFY,n.environmentVariables=e.environmentVariables||new Map}parse(){return YM(this,void 0,void 0,function*(){let e=this,n=(0,Tu.getFactory)(e.buildType),r=e.context,s=yield new eq.Target({target:e.target,resourceHandler:e.resourceHandler,context:e.context}).parse({disableLiteralsOptimization:e.disableLiteralsOptimization,disableNamespacesOptimization:e.disableNamespacesOptimization}),o=new tq.Transformer({buildOptions:e.buildOptions,mapFactory:n,context:r,environmentVariables:e.environmentVariables,resourceHandler:e.resourceHandler}),l=s.main,c=o.transform(JM.MODULE_BOILERPLATE),a=(u,d)=>{let p=r.modules.get(u.getId()),h={},m=0,f=function(v){let _=v.getNamespace();if(!(_ in h)){if(_!==p&&v.type===QM.DependencyType.Import){let w=o.transform(v.chunk,v);h[_]=c.replace('"$0"','"'+_+'"').replace('"$1"',w),m++}for(let w of v.dependencies)f(w)}};f(u);let g=new rq.OutputProcessor(r,o);d&&g.addLiteralsOptimization(),m>0&&g.addHeader(),Object.keys(h).forEach(v=>g.addCode(h[v]));let b=o.transform(u.chunk,u);return g.addCode(b,!0),g.build()};return{[e.target]:a(l.dependency,!e.disableLiteralsOptimization)}})}};Ts.Transpiler=Ky});var Dr=T(Q=>{"use strict";var AT=Q&&Q.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),sq=Q&&Q.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),oq=Q&&Q.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&AT(e,t,n);return sq(e,t),e},aq=Q&&Q.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&AT(e,t,n)};Object.defineProperty(Q,"__esModule",{value:!0});Q.Stack=Q.OutputProcessor=Q.NamespaceGenerator=Q.LiteralsMapper=Q.fetchNamespaces=Q.BuildError=Q.generateCharsetMap=Q.DependencyType=Q.Transpiler=Q.Transformer=Q.Target=Q.DirectTranspiler=Q.Dependency=Q.ContextDataProperty=Q.Context=Q.uglifyFactory=Q.defaultFactory=Q.BeautifyUtils=Q.BeautifyContext=Q.beautifyFactory=Q.getFactory=Q.BuildType=void 0;var OT=ou();Object.defineProperty(Q,"BuildType",{enumerable:!0,get:function(){return OT.BuildType}});Object.defineProperty(Q,"getFactory",{enumerable:!0,get:function(){return OT.getFactory}});var lq=Sy();Object.defineProperty(Q,"beautifyFactory",{enumerable:!0,get:function(){return lq.beautifyFactory}});var cq=xy();Object.defineProperty(Q,"BeautifyContext",{enumerable:!0,get:function(){return cq.BeautifyContext}});Q.BeautifyUtils=oq(nu());var uq=ky();Object.defineProperty(Q,"defaultFactory",{enumerable:!0,get:function(){return uq.defaultFactory}});var dq=Ty();Object.defineProperty(Q,"uglifyFactory",{enumerable:!0,get:function(){return dq.uglifyFactory}});var DT=Zo();Object.defineProperty(Q,"Context",{enumerable:!0,get:function(){return DT.Context}});Object.defineProperty(Q,"ContextDataProperty",{enumerable:!0,get:function(){return DT.ContextDataProperty}});var pq=My();Object.defineProperty(Q,"Dependency",{enumerable:!0,get:function(){return pq.Dependency}});var hq=IT();Object.defineProperty(Q,"DirectTranspiler",{enumerable:!0,get:function(){return hq.DirectTranspiler}});aq(Hy(),Q);var fq=Gy();Object.defineProperty(Q,"Target",{enumerable:!0,get:function(){return fq.Target}});var mq=yu();Object.defineProperty(Q,"Transformer",{enumerable:!0,get:function(){return mq.Transformer}});var gq=PT();Object.defineProperty(Q,"Transpiler",{enumerable:!0,get:function(){return gq.Transpiler}});var yq=Ay();Object.defineProperty(Q,"DependencyType",{enumerable:!0,get:function(){return yq.DependencyType}});var bq=_u();Object.defineProperty(Q,"generateCharsetMap",{enumerable:!0,get:function(){return bq.generateCharsetMap}});var vq=du();Object.defineProperty(Q,"BuildError",{enumerable:!0,get:function(){return vq.BuildError}});var _q=hu();Object.defineProperty(Q,"fetchNamespaces",{enumerable:!0,get:function(){return _q.fetchNamespaces}});var wq=Ey();Object.defineProperty(Q,"LiteralsMapper",{enumerable:!0,get:function(){return wq.LiteralsMapper}});var xq=Ry();Object.defineProperty(Q,"NamespaceGenerator",{enumerable:!0,get:function(){return xq.NamespaceGenerator}});var Sq=xu();Object.defineProperty(Q,"OutputProcessor",{enumerable:!0,get:function(){return Sq.OutputProcessor}});var kq=Fy();Object.defineProperty(Q,"Stack",{enumerable:!0,get:function(){return kq.Stack}})});var Iu=T(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.ContextDataProperty=void 0;var Tq;(function(t){t.ProcessImportPathCallback="processImportPathCallback",t.ASTRefDependencyMap="astRefDependencyMap",t.ASTRefsVisited="astRefsVisited"})(Tq=ta.ContextDataProperty||(ta.ContextDataProperty={}))});var Cu=T(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.injectImport=void 0;var Iq=Gn(),Yy=Iu();function Eq(t,e){let n=t.get(Yy.ContextDataProperty.ASTRefDependencyMap),r=t.getOrCreateData(Yy.ContextDataProperty.ProcessImportPathCallback,()=>s=>s);if(!n)return`import_code("${r(e.directory)}")`;let i=t.getOrCreateData(Yy.ContextDataProperty.ASTRefsVisited,()=>new Set);if(n.has(e)){let s=[],o=n.get(e);if(i.has(o.main.target))return s.join(`
|
212
212
|
`);for(let l of o.imports)i.has(l.target)||(l.ref instanceof Iq.ASTImportCodeExpression&&s.push(`import_code("${r(l.target)}")`),i.add(l.target));return s.push(`import_code("${r(o.main.target)}")`),i.add(o.main.target),s.join(`
|
213
|
-
`)}return""}Eu.injectImport=Eq});var jT=T(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.transformBitOperation=void 0;var Cq=(t,e,n,r)=>((r==="<<"||r===">>"||r===">>>"||r==="|"||r==="&")&&(t="bitwise("+['"'+r+'"',e,n].join(", ")+")"),t);Ru.transformBitOperation=Cq});var FT=T(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.beautifyFactory=ci.IndentationType=void 0;var MT=Dr(),LT=_y(),na=pe(),Rq=(Yn(),Qe(Kn)),Pq=Cu(),Aq=jT(),{SHORTHAND_OPERATORS:Oq,countRightBinaryExpressions:Dq,unwrap:jr,containsMultilineItemInShortcutClauses:jq,hasEmptyBody:Qy}=MT.BeautifyUtils,qT;(function(t){t[t.Tab=0]="Tab",t[t.Whitespace=1]="Whitespace"})(qT=ci.IndentationType||(ci.IndentationType={}));var Lq=t=>{let{isDevMode:e=!1,keepParentheses:n=!1,indentation:r=qT.Tab,indentationSpaces:i=2}=t.buildOptions,s=new MT.BeautifyContext(t,{keepParentheses:n,indentation:r,indentationSpaces:i,isDevMode:e});return{ParenthesisExpression:(o,l)=>"("+t.make(o.expression,{hasLogicalIndentActive:l.hasLogicalIndentActive})+")",Comment:(o,l)=>o.isMultiline?e?`/*${o.value}*/`:o.value.split(`
|
213
|
+
`)}return""}Eu.injectImport=Eq});var jT=T(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.transformBitOperation=void 0;var Cq=(t,e,n,r)=>((r==="<<"||r===">>"||r===">>>"||r==="|"||r==="&")&&(t="bitwise("+['"'+r+'"',e,n].join(", ")+")"),t);Ru.transformBitOperation=Cq});var FT=T(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.beautifyFactory=ci.IndentationType=void 0;var MT=Dr(),LT=_y(),na=pe(),Rq=(Yn(),Qe(Kn)),Pq=Cu(),Aq=jT(),{SHORTHAND_OPERATORS:Oq,countRightBinaryExpressions:Dq,unwrap:jr,containsMultilineItemInShortcutClauses:jq,hasEmptyBody:Qy}=MT.BeautifyUtils,qT;(function(t){t[t.Tab=0]="Tab",t[t.Whitespace=1]="Whitespace"})(qT=ci.IndentationType||(ci.IndentationType={}));var Lq=t=>{let{isDevMode:e=!1,keepParentheses:n=!1,indentation:r=qT.Tab,indentationSpaces:i=2}=t.buildOptions,s=new MT.BeautifyContext(t,{keepParentheses:n,indentation:r,indentationSpaces:i,isDevMode:e});return{ParenthesisExpression:(o,l)=>{let c=s.useComment(o.end);return"("+t.make(o.expression,{hasLogicalIndentActive:l.hasLogicalIndentActive})+")"+c},Comment:(o,l)=>o.isMultiline?e?`/*${o.value}*/`:o.value.split(`
|
214
214
|
`).map(c=>`//${c}`).join(`
|
215
215
|
`):"// "+o.value.trimStart(),AssignmentStatement:(o,l)=>{let c=o.variable,a=o.init,u=t.make(c);if(e&&(c instanceof na.ASTIdentifier||c instanceof na.ASTMemberExpression)&&a instanceof na.ASTBinaryExpression&&(a.left instanceof na.ASTIdentifier||a.left instanceof na.ASTMemberExpression)&&Oq.includes(a.operator)&&(0,LT.createExpressionHash)(c)===(0,LT.createExpressionHash)(a.left)){let p=t.make(jr(a.right));return u+" "+a.operator+"= "+p}let d=t.make(a);return u+" = "+d},MemberExpression:(o,l)=>{let c=t.make(o.identifier);return[t.make(o.base),c].join(o.indexer)},FunctionDeclaration:(o,l)=>{s.disableMultiline();let c=o.parameters.map(p=>t.make(p));s.enableMultiline();let a=s.appendComment(o.start,c.length===0?"function":"function("+c.join(", ")+")"),u=s.putIndent("end function");if(Qy(o.body))return a+`
|
216
216
|
`+u;s.incIndent();let d=s.buildBlock(o);return s.decIndent(),a+`
|