UNPKG

lix

Version:

lix - Libraries for Haxe

2 lines 166 kB
#!/usr/bin/env node (()=>{var e={4:function(e,t,r){(function(e){"use strict";var $estr=function(){return js_Boot.__string_rec(this,"")},t=t||{},i;function $extend(e,t){var r=Object.create(e);for(var i in t)r[i]=t[i];if(t.toString!==Object.prototype.toString)r.toString=t.toString;return r}var n=t["Attribute"]={__ename__:true,__constructs__:["Off","Bold","Underline","Blink","ReverseVideo","Concealed","BoldOff","UnderlineOff","BlinkOff","NormalVideo","ConcealedOff","Black","Red","Green","Yellow","Blue","Magenta","Cyan","White","DefaultForeground","BlackBack","RedBack","GreenBack","YellowBack","BlueBack","MagentaBack","CyanBack","WhiteBack","DefaultBackground"],Off:{_hx_index:0,__enum__:"Attribute",toString:$estr},Bold:{_hx_index:1,__enum__:"Attribute",toString:$estr},Underline:{_hx_index:2,__enum__:"Attribute",toString:$estr},Blink:{_hx_index:3,__enum__:"Attribute",toString:$estr},ReverseVideo:{_hx_index:4,__enum__:"Attribute",toString:$estr},Concealed:{_hx_index:5,__enum__:"Attribute",toString:$estr},BoldOff:{_hx_index:6,__enum__:"Attribute",toString:$estr},UnderlineOff:{_hx_index:7,__enum__:"Attribute",toString:$estr},BlinkOff:{_hx_index:8,__enum__:"Attribute",toString:$estr},NormalVideo:{_hx_index:9,__enum__:"Attribute",toString:$estr},ConcealedOff:{_hx_index:10,__enum__:"Attribute",toString:$estr},Black:{_hx_index:11,__enum__:"Attribute",toString:$estr},Red:{_hx_index:12,__enum__:"Attribute",toString:$estr},Green:{_hx_index:13,__enum__:"Attribute",toString:$estr},Yellow:{_hx_index:14,__enum__:"Attribute",toString:$estr},Blue:{_hx_index:15,__enum__:"Attribute",toString:$estr},Magenta:{_hx_index:16,__enum__:"Attribute",toString:$estr},Cyan:{_hx_index:17,__enum__:"Attribute",toString:$estr},White:{_hx_index:18,__enum__:"Attribute",toString:$estr},DefaultForeground:{_hx_index:19,__enum__:"Attribute",toString:$estr},BlackBack:{_hx_index:20,__enum__:"Attribute",toString:$estr},RedBack:{_hx_index:21,__enum__:"Attribute",toString:$estr},GreenBack:{_hx_index:22,__enum__:"Attribute",toString:$estr},YellowBack:{_hx_index:23,__enum__:"Attribute",toString:$estr},BlueBack:{_hx_index:24,__enum__:"Attribute",toString:$estr},MagentaBack:{_hx_index:25,__enum__:"Attribute",toString:$estr},CyanBack:{_hx_index:26,__enum__:"Attribute",toString:$estr},WhiteBack:{_hx_index:27,__enum__:"Attribute",toString:$estr},DefaultBackground:{_hx_index:28,__enum__:"Attribute",toString:$estr}};var Sys=function(){};Sys.__name__=true;Sys.systemName=function(){var e=process.platform;switch(e){case"darwin":return"Mac";case"freebsd":return"BSD";case"linux":return"Linux";case"win32":return"Windows";default:var t=e;return t}};var s=r(2081);var Reflect=function(){};Reflect.__name__=true;Reflect.field=function(e,t){try{return e[t]}catch(e){var r=e instanceof js__$Boot_HaxeError?e.val:e;return null}};Reflect.fields=function(e){var t=[];if(e!=null){var r=Object.prototype.hasOwnProperty;for(var i in e){if(i!="__id__"&&i!="hx__closures__"&&r.call(e,i)){t.push(i)}}}return t};Reflect.compare=function(e,t){if(e==t){return 0}else if(e>t){return 1}else{return-1}};Reflect.isEnumValue=function(e){if(e!=null){return e.__enum__!=null}else{return false}};Reflect.copy=function(e){if(e==null){return null}var t={};var r=0;var i=Reflect.fields(e);while(r<i.length){var n=i[r];++r;t[n]=Reflect.field(e,n)}return t};var js_Boot=function(){};js_Boot.__name__=true;js_Boot.getClass=function(e){if(e==null){return null}else if(e instanceof Array){return Array}else{var t=e.__class__;if(t!=null){return t}var r=js_Boot.__nativeClassName(e);if(r!=null){return js_Boot.__resolveNativeClass(r)}return null}};js_Boot.__string_rec=function(e,r){if(e==null){return"null"}if(r.length>=5){return"<...>"}var i=typeof e;if(i=="function"&&(e.__name__||e.__ename__)){i="object"}switch(i){case"function":return"<function>";case"object":if(e.__enum__){var n=t[e.__enum__];var s=n.__constructs__[e._hx_index];var o=n[s];if(o.__params__){r=r+"\t";return s+"("+function(t){var i;var n=[];{var s=0;var a=o.__params__;while(true){if(!(s<a.length)){break}var l=a[s];s=s+1;n.push(js_Boot.__string_rec(e[l],r))}}i=n;return i}(this).join(",")+")"}else{return s}}if(e instanceof Array){var a="[";r+="\t";var l=0;var c=e.length;while(l<c){var u=l++;a+=(u>0?",":"")+js_Boot.__string_rec(e[u],r)}a+="]";return a}var h;try{h=e.toString}catch(e){var d=e instanceof js__$Boot_HaxeError?e.val:e;return"???"}if(h!=null&&h!=Object.toString&&typeof h=="function"){var p=e.toString();if(p!="[object Object]"){return p}}var m="{\n";r+="\t";var _=e.hasOwnProperty!=null;var y=null;for(y in e){if(_&&!e.hasOwnProperty(y)){continue}if(y=="prototype"||y=="__class__"||y=="__super__"||y=="__interfaces__"||y=="__properties__"){continue}if(m.length!=2){m+=", \n"}m+=r+y+" : "+js_Boot.__string_rec(e[y],r)}r=r.substring(1);m+="\n"+r+"}";return m;case"string":return e;default:return String(e)}};js_Boot.__interfLoop=function(e,t){if(e==null){return false}if(e==t){return true}if(Object.prototype.hasOwnProperty.call(e,"__interfaces__")){var r=e.__interfaces__;var i=0;var n=r.length;while(i<n){var s=i++;var o=r[s];if(o==t||js_Boot.__interfLoop(o,t)){return true}}}return js_Boot.__interfLoop(e.__super__,t)};js_Boot.__instanceof=function(e,r){if(r==null){return false}switch(r){case Array:return e instanceof Array;case T:return typeof e=="boolean";case I:return e!=null;case L:return typeof e=="number";case A:if(typeof e=="number"){return(e|0)===e}else{return false}break;case String:return typeof e=="string";default:if(e!=null){if(typeof r=="function"){if(js_Boot.__downcastCheck(e,r)){return true}}else if(typeof r=="object"&&js_Boot.__isNativeObj(r)){if(e instanceof r){return true}}}else{return false}if(r==F?e.__name__!=null:false){return true}if(r==B?e.__ename__!=null:false){return true}return e.__enum__!=null?t[e.__enum__]==r:false}};js_Boot.__downcastCheck=function(e,t){if(!(e instanceof t)){if(t.__isInterface__){return js_Boot.__interfLoop(js_Boot.getClass(e),t)}else{return false}}else{return true}};js_Boot.__nativeClassName=function(e){var t=js_Boot.__toStr.call(e).slice(8,-1);if(t=="Object"||t=="Function"||t=="Math"||t=="JSON"){return null}return t};js_Boot.__isNativeObj=function(e){return js_Boot.__nativeClassName(e)!=null};js_Boot.__resolveNativeClass=function(t){return e[t]};var Std=function(){};Std.__name__=true;Std.string=function(e){return js_Boot.__string_rec(e,"")};Std.parseInt=function(e){if(e!=null){var t=0;var r=e.length;while(t<r){var i=t++;var n=e.charCodeAt(i);if(n<=8||n>=14&&n!=32&&n!=45){var s=parseInt(e,e[i+1]=="x"||e[i+1]=="X"?16:10);if(isNaN(s)){return null}else{return s}}}}return null};var ANSI=function(){};ANSI.__name__=true;ANSI.aset=function(e){if(ANSI.strip||ANSI.stripIfUnavailable&&!ANSI.available){return""}var t=""+"[";var r=[];var i=0;while(i<e.length){var s=e[i];++i;if(!js_Boot.__instanceof(s,n)){throw new js__$Boot_HaxeError("Set argument is not an Attribute: "+Std.string(s))}r.push(ANSI.values.get(s))}return t+r.join(";")+"m"};ANSI.detectSupport=function(){if(Sys.systemName().toLowerCase().indexOf("window")==-1){var e=-1;try{e=s.spawnSync("tput",["colors"]).error==null?0:125}catch(e){var t=e instanceof js__$Boot_HaxeError?e.val:e}return e==0}else{return process.env["ANSICON"]!=null}};var HxOverrides=function(){};HxOverrides.__name__=true;HxOverrides.cca=function(e,t){var r=e.charCodeAt(t);if(r!=r){return undefined}return r};HxOverrides.substr=function(e,t,r){if(r==null){r=e.length}else if(r<0){if(t==0){r=e.length+r}else{return""}}return e.substr(t,r)};HxOverrides.iter=function(e){return{cur:0,arr:e,hasNext:function(){return this.cur<this.arr.length},next:function(){return this.arr[this.cur++]}}};Math.__name__=true;var StringTools=function(){};StringTools.__name__=true;StringTools.startsWith=function(e,t){if(e.length>=t.length){return e.lastIndexOf(t,0)==0}else{return false}};StringTools.endsWith=function(e,t){var r=t.length;var i=e.length;if(i>=r){return e.indexOf(t,i-r)==i-r}else{return false}};StringTools.lpad=function(e,t,r){if(t.length<=0){return e}var i="";r-=e.length;while(i.length<r)i+=t==null?"null":""+t;i+=e==null?"null":""+e;return i};StringTools.replace=function(e,t,r){return e.split(t).join(r)};var haxe_io_Output=function(){};haxe_io_Output.__name__=true;haxe_io_Output.prototype={writeByte:function(e){throw new js__$Boot_HaxeError("Not implemented")},writeBytes:function(e,t,r){if(t<0||r<0||t+r>e.length){throw new js__$Boot_HaxeError(c.OutsideBounds)}var i=e.b;var n=r;while(n>0){this.writeByte(i[t]);++t;--n}return r},writeFullBytes:function(e,t,r){while(r>0){var i=this.writeBytes(e,t,r);t+=i;r-=i}},writeString:function(e,t){var r=haxe_io_Bytes.ofString(e,t);this.writeFullBytes(r,0,r.length)},__class__:haxe_io_Output};var _$Sys_FileOutput=function(e){this.fd=e};_$Sys_FileOutput.__name__=true;_$Sys_FileOutput.__super__=haxe_io_Output;_$Sys_FileOutput.prototype=$extend(haxe_io_Output.prototype,{writeByte:function(e){d.writeSync(this.fd,String.fromCodePoint(e))},writeBytes:function(e,t,r){var i=e.b;return d.writeSync(this.fd,g.from(i.buffer,i.byteOffset,e.length),t,r)},writeString:function(e,t){d.writeSync(this.fd,e)},__class__:_$Sys_FileOutput});var Type=function(){};Type.__name__=true;Type.enumParameters=function(e){var r=t[e.__enum__];var i=r.__constructs__[e._hx_index];var n=r[i].__params__;if(n!=null){var s=[];var o=0;while(o<n.length){var a=n[o];++o;s.push(e[a])}return s}else{return[]}};var o=t["haxe.StackItem"]={__ename__:true,__constructs__:["CFunction","Module","FilePos","Method","LocalFunction"],CFunction:{_hx_index:0,__enum__:"haxe.StackItem",toString:$estr},Module:(i=function(e){return{_hx_index:1,m:e,__enum__:"haxe.StackItem",toString:$estr}},i.__params__=["m"],i),FilePos:(i=function(e,t,r,i){return{_hx_index:2,s:e,file:t,line:r,column:i,__enum__:"haxe.StackItem",toString:$estr}},i.__params__=["s","file","line","column"],i),Method:(i=function(e,t){return{_hx_index:3,classname:e,method:t,__enum__:"haxe.StackItem",toString:$estr}},i.__params__=["classname","method"],i),LocalFunction:(i=function(e){return{_hx_index:4,v:e,__enum__:"haxe.StackItem",toString:$estr}},i.__params__=["v"],i)};var haxe_IMap=function(){};haxe_IMap.__name__=true;haxe_IMap.__isInterface__=true;var haxe_Timer=function(e){var t=this;this.id=setInterval((function(){t.run()}),e)};haxe_Timer.__name__=true;haxe_Timer.delay=function(e,t){var r=new haxe_Timer(t);r.run=function(){r.stop();e()};return r};haxe_Timer.prototype={stop:function(){if(this.id==null){return}clearInterval(this.id);this.id=null},run:function(){},__class__:haxe_Timer};var haxe_ds_BalancedTree=function(){};haxe_ds_BalancedTree.__name__=true;haxe_ds_BalancedTree.__interfaces__=[haxe_IMap];haxe_ds_BalancedTree.prototype={set:function(e,t){this.root=this.setLoop(e,t,this.root)},get:function(e){var t=this.root;while(t!=null){var r=this.compare(e,t.key);if(r==0){return t.value}if(r<0){t=t.left}else{t=t.right}}return null},setLoop:function(e,t,r){if(r==null){return new haxe_ds_TreeNode(null,e,t,null)}var i=this.compare(e,r.key);if(i==0){return new haxe_ds_TreeNode(r.left,e,t,r.right,r==null?0:r._height)}else if(i<0){var n=this.setLoop(e,t,r.left);return this.balance(n,r.key,r.value,r.right)}else{var s=this.setLoop(e,t,r.right);return this.balance(r.left,r.key,r.value,s)}},balance:function(e,t,r,i){var n=e==null?0:e._height;var s=i==null?0:i._height;if(n>s+2){var o=e.left;var a=e.right;if((o==null?0:o._height)>=(a==null?0:a._height)){return new haxe_ds_TreeNode(e.left,e.key,e.value,new haxe_ds_TreeNode(e.right,t,r,i))}else{return new haxe_ds_TreeNode(new haxe_ds_TreeNode(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new haxe_ds_TreeNode(e.right.right,t,r,i))}}else if(s>n+2){var l=i.right;var c=i.left;if((l==null?0:l._height)>(c==null?0:c._height)){return new haxe_ds_TreeNode(new haxe_ds_TreeNode(e,t,r,i.left),i.key,i.value,i.right)}else{return new haxe_ds_TreeNode(new haxe_ds_TreeNode(e,t,r,i.left.left),i.left.key,i.left.value,new haxe_ds_TreeNode(i.left.right,i.key,i.value,i.right))}}else{return new haxe_ds_TreeNode(e,t,r,i,(n>s?n:s)+1)}},compare:function(e,t){return Reflect.compare(e,t)},__class__:haxe_ds_BalancedTree};var haxe_ds_TreeNode=function(e,t,r,i,n){if(n==null){n=-1}this.left=e;this.key=t;this.value=r;this.right=i;if(n==-1){var s;var o=this.left;var a=this.right;if((o==null?0:o._height)>(a==null?0:a._height)){var l=this.left;s=l==null?0:l._height}else{var c=this.right;s=c==null?0:c._height}this._height=s+1}else{this._height=n}};haxe_ds_TreeNode.__name__=true;haxe_ds_TreeNode.prototype={__class__:haxe_ds_TreeNode};var haxe_ds_EnumValueMap=function(){haxe_ds_BalancedTree.call(this)};haxe_ds_EnumValueMap.__name__=true;haxe_ds_EnumValueMap.__interfaces__=[haxe_IMap];haxe_ds_EnumValueMap.__super__=haxe_ds_BalancedTree;haxe_ds_EnumValueMap.prototype=$extend(haxe_ds_BalancedTree.prototype,{compare:function(e,t){var r=e._hx_index-t._hx_index;if(r!=0){return r}var i=Type.enumParameters(e);var n=Type.enumParameters(t);if(i.length==0&&n.length==0){return 0}return this.compareArgs(i,n)},compareArgs:function(e,t){var r=e.length-t.length;if(r!=0){return r}var i=0;var n=e.length;while(i<n){var s=i++;var o=this.compareArg(e[s],t[s]);if(o!=0){return o}}return 0},compareArg:function(e,t){if(Reflect.isEnumValue(e)&&Reflect.isEnumValue(t)){return this.compare(e,t)}else if(e instanceof Array&&t instanceof Array){return this.compareArgs(e,t)}else{return Reflect.compare(e,t)}},__class__:haxe_ds_EnumValueMap});var a=t["haxe.ds.Option"]={__ename__:true,__constructs__:["Some","None"],Some:(i=function(e){return{_hx_index:0,v:e,__enum__:"haxe.ds.Option",toString:$estr}},i.__params__=["v"],i),None:{_hx_index:1,__enum__:"haxe.ds.Option",toString:$estr}};var haxe_ds_StringMap=function(){this.h={}};haxe_ds_StringMap.__name__=true;haxe_ds_StringMap.__interfaces__=[haxe_IMap];haxe_ds_StringMap.prototype={setReserved:function(e,t){if(this.rh==null){this.rh={}}this.rh["$"+e]=t},getReserved:function(e){if(this.rh==null){return null}else{return this.rh["$"+e]}},keys:function(){return HxOverrides.iter(this.arrayKeys())},arrayKeys:function(){var e=[];for(var t in this.h){if(this.h.hasOwnProperty(t)){e.push(t)}}if(this.rh!=null){for(var t in this.rh){if(t.charCodeAt(0)==36){e.push(t.substr(1))}}}return e},__class__:haxe_ds_StringMap};var haxe_io_Bytes=function(e){this.length=e.byteLength;this.b=new Uint8Array(e);this.b.bufferValue=e;e.hxBytes=this;e.bytes=this.b};haxe_io_Bytes.__name__=true;haxe_io_Bytes.ofString=function(e,t){if(t==l.RawNative){var r=new Uint8Array(e.length<<1);var i=0;var n=e.length;while(i<n){var s=i++;var o=e.charCodeAt(s);r[s<<1]=o&255;r[s<<1|1]=o>>8}return new haxe_io_Bytes(r.buffer)}var a=[];var c=0;while(c<e.length){var u=e.charCodeAt(c++);if(55296<=u&&u<=56319){u=u-55232<<10|e.charCodeAt(c++)&1023}if(u<=127){a.push(u)}else if(u<=2047){a.push(192|u>>6);a.push(128|u&63)}else if(u<=65535){a.push(224|u>>12);a.push(128|u>>6&63);a.push(128|u&63)}else{a.push(240|u>>18);a.push(128|u>>12&63);a.push(128|u>>6&63);a.push(128|u&63)}}return new haxe_io_Bytes(new Uint8Array(a).buffer)};haxe_io_Bytes.prototype={sub:function(e,t){if(e<0||t<0||e+t>this.length){throw new js__$Boot_HaxeError(c.OutsideBounds)}return new haxe_io_Bytes(this.b.buffer.slice(e+this.b.byteOffset,e+this.b.byteOffset+t))},__class__:haxe_io_Bytes};var l=t["haxe.io.Encoding"]={__ename__:true,__constructs__:["UTF8","RawNative"],UTF8:{_hx_index:0,__enum__:"haxe.io.Encoding",toString:$estr},RawNative:{_hx_index:1,__enum__:"haxe.io.Encoding",toString:$estr}};var c=t["haxe.io.Error"]={__ename__:true,__constructs__:["Blocked","Overflow","OutsideBounds","Custom"],Blocked:{_hx_index:0,__enum__:"haxe.io.Error",toString:$estr},Overflow:{_hx_index:1,__enum__:"haxe.io.Error",toString:$estr},OutsideBounds:{_hx_index:2,__enum__:"haxe.io.Error",toString:$estr},Custom:(i=function(e){return{_hx_index:3,e:e,__enum__:"haxe.io.Error",toString:$estr}},i.__params__=["e"],i)};var haxe_io_Path=function(e){switch(e){case".":case"..":this.dir=e;this.file="";return}var t=e.lastIndexOf("/");var r=e.lastIndexOf("\\");if(t<r){this.dir=HxOverrides.substr(e,0,r);e=HxOverrides.substr(e,r+1,null);this.backslash=true}else if(r<t){this.dir=HxOverrides.substr(e,0,t);e=HxOverrides.substr(e,t+1,null)}else{this.dir=null}var i=e.lastIndexOf(".");if(i!=-1){this.ext=HxOverrides.substr(e,i+1,null);this.file=HxOverrides.substr(e,0,i)}else{this.ext=null;this.file=e}};haxe_io_Path.__name__=true;haxe_io_Path.directory=function(e){var t=new haxe_io_Path(e);if(t.dir==null){return""}return t.dir};haxe_io_Path.addTrailingSlash=function(e){if(e.length==0){return"/"}var t=e.lastIndexOf("/");var r=e.lastIndexOf("\\");if(t<r){if(r!=e.length-1){return e+"\\"}else{return e}}else if(t!=e.length-1){return e+"/"}else{return e}};haxe_io_Path.removeTrailingSlashes=function(e){e:while(true){var t=HxOverrides.cca(e,e.length-1);if(t==null){break}else{switch(t){case 47:case 92:e=HxOverrides.substr(e,0,-1);break;default:break e}}}return e};haxe_io_Path.prototype={__class__:haxe_io_Path};var haxeshim_Attempt=function(){};haxeshim_Attempt.__name__=true;haxeshim_Attempt.to=function(e,t,r){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyFunc((function(){return tink_core_TypedError.catchExceptions(t,(function(t){return tink_core_TypedError.withData(null,"Failed to "+e,t,r)}),{fileName:"haxeshim/Attempt.hx",lineNumber:8,className:"haxeshim.Attempt",methodName:"to"})})))};var u={};u.__name__=true;u.ofVars=function(e){var t={};var r=t;var i=0;var n=Reflect.fields(e);while(i<n.length){var s=n[i];++i;r[haxeshim_Os.IS_WINDOWS?s.toUpperCase():s]=e[s]}var o=r;return o};u.ofMap=function(e){var t={};var r=t;var i=e.keys();while(i.hasNext()){var n=i.next();r[haxeshim_Os.IS_WINDOWS?n.toUpperCase():n]=C[n]!=null?e.getReserved(n):e.h[n]}var s=r;return s};u.vars=function(e){return e};u.toVars=function(e){return Reflect.copy(e)};u.get=function(e,t){return e[haxeshim_Os.IS_WINDOWS?t.toUpperCase():t]};u.mergeInto=function(e,t){var r=u.vars(t);if(e==null){var i=r;var n=i;return n}else if(r==null){var s=e;var o=s;return o}else{var a=e;var l=r;var c={};var h=c;var d=l;var p=0;var m=Reflect.fields(d);while(p<m.length){var _=m[p];++p;h[_]=d[_]}var y=a;var v=0;var g=Reflect.fields(y);while(v<g.length){var w=g[v];++v;h[w]=y[w]}var b=h;return b}};var haxeshim_Exec=function(){};haxeshim_Exec.__name__=true;haxeshim_Exec.mergeEnv=function(e){return u.mergeInto(e,u.ofVars(process.env))};haxeshim_Exec.sync=function(e,t,r,i){var n=s.spawnSync(e,r,{cwd:t,stdio:"inherit",env:u.toVars(haxeshim_Exec.mergeEnv(i))});var o=n.stdout;var a=n.stderr;var l=n.status;var c=n.signal;var h=n.pid;var d=n.output;var m=n.error;if(m==null){var _=l;return p.Success(_)}else{var y=l;var v=m;return p.Failure(new tink_core_TypedError(y,"Failed to call "+e+" because "+Std.string(v),{fileName:"haxeshim/Exec.hx",lineNumber:54,className:"haxeshim.Exec",methodName:"sync"}))}};var haxeshim_Fs=function(){};haxeshim_Fs.__name__=true;haxeshim_Fs.exists=function(e){var t=e;return haxeshim_Attempt.to("check the existence of "+e,(function(){return sys_FileSystem.exists(t)}),{fileName:"haxeshim/Fs.hx",lineNumber:26,className:"haxeshim.Fs",methodName:"exists"})};haxeshim_Fs.ensureDir=function(e){var t=StringTools.endsWith(e,"/")||StringTools.endsWith(e,"\\");if(t){e=haxe_io_Path.removeTrailingSlashes(e)}var r=haxe_io_Path.directory(e);if(haxe_io_Path.removeTrailingSlashes(r)==e){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Success(R.Noise)))}else{return k.next(k.next(haxeshim_Fs.exists(r),(function(e){if(e){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Success(R.Noise)))}else{return haxeshim_Fs.ensureDir(haxe_io_Path.addTrailingSlash(r))}})),(function(r){if(t){return k.next(haxeshim_Fs.exists(e),(function(t){return haxeshim_Attempt.to("create directory "+e,(function(){if(!t){sys_FileSystem.createDirectory(e)}return R.Noise}),{fileName:"haxeshim/Fs.hx",lineNumber:49,className:"haxeshim.Fs",methodName:"ensureDir"})}))}else{return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Success(R.Noise)))}}))}};haxeshim_Fs.peel=function(e,t){var r=0;var i=0;var n=t;while(i<n){var s=i++;var o=e.indexOf("/",r);if(o==-1){return a.None}else{var l=o;r=l+1}}return a.Some(HxOverrides.substr(e,r,null))};var haxeshim_Os=function(){};haxeshim_Os.__name__=true;haxeshim_Os.slashes=function(e){if(haxeshim_Os.IS_WINDOWS){return StringTools.replace(e,"/","\\")}else{return e}};var haxeshim_Logger=function(){};haxeshim_Logger.__name__=true;haxeshim_Logger.get=function(e){if(e==null){e=false}if(e){if(haxeshim_Logger.SILENT==null){haxeshim_Logger.SILENT=new haxeshim_Logger}return haxeshim_Logger.SILENT}else{if(haxeshim_Logger.DEFAULT==null){haxeshim_Logger.DEFAULT=new haxeshim__$Logger_SysLogger}return haxeshim_Logger.DEFAULT}};haxeshim_Logger.prototype={error:function(e){},info:function(e){},success:function(e){},progress:function(e){},__class__:haxeshim_Logger};var haxeshim__$Logger_SysLogger=function(){haxeshim_Logger.call(this)};haxeshim__$Logger_SysLogger.__name__=true;haxeshim__$Logger_SysLogger.__super__=haxeshim_Logger;haxeshim__$Logger_SysLogger.prototype=$extend(haxeshim_Logger.prototype,{log:function(e,t){this.progress("");var r=haxeshim__$Logger_SysLogger.out;var i;switch(e._hx_index){case 0:i=[n.Red];break;case 1:i=[n.Yellow];break;case 2:i=[n.DefaultForeground];break;case 3:i=[n.Green];break}r.writeString(ANSI.aset(i)+t+ANSI.aset([n.Off])+"\n")},error:function(e){this.log(h.Error,e)},info:function(e){this.log(h.Info,e)},success:function(e){this.log(h.Success,e)},progress:function(e){if(haxeshim__$Logger_SysLogger.isTTY){if(e.length>80){e=HxOverrides.substr(e,0,77)+"..."}haxeshim__$Logger_SysLogger.out.writeString((ANSI.strip||ANSI.stripIfUnavailable&&!ANSI.available?"":"")+(ANSI.strip||ANSI.stripIfUnavailable&&!ANSI.available?"":"["+1+"G")+e)}},__class__:haxeshim__$Logger_SysLogger});var h=t["haxeshim._Logger.Level"]={__ename__:true,__constructs__:["Error","Warning","Info","Success"],Error:{_hx_index:0,__enum__:"haxeshim._Logger.Level",toString:$estr},Warning:{_hx_index:1,__enum__:"haxeshim._Logger.Level",toString:$estr},Info:{_hx_index:2,__enum__:"haxeshim._Logger.Level",toString:$estr},Success:{_hx_index:3,__enum__:"haxeshim._Logger.Level",toString:$estr}};var tink_core__$Lazy_LazyObject=function(){};tink_core__$Lazy_LazyObject.__name__=true;tink_core__$Lazy_LazyObject.__isInterface__=true;tink_core__$Lazy_LazyObject.prototype={__class__:tink_core__$Lazy_LazyObject};var tink_core__$Lazy_LazyConst=function(e){this.value=e};tink_core__$Lazy_LazyConst.__name__=true;tink_core__$Lazy_LazyConst.__interfaces__=[tink_core__$Lazy_LazyObject];tink_core__$Lazy_LazyConst.prototype={get:function(){return this.value},__class__:tink_core__$Lazy_LazyConst};var sys_FileSystem=function(){};sys_FileSystem.__name__=true;sys_FileSystem.exists=function(e){try{d.accessSync(e);return true}catch(e){var t=e instanceof js__$Boot_HaxeError?e.val:e;return false}};sys_FileSystem.createDirectory=function(e){try{d.mkdirSync(e)}catch(n){var t=n instanceof js__$Boot_HaxeError?n.val:n;if(t.code=="ENOENT"){sys_FileSystem.createDirectory(y.dirname(e));d.mkdirSync(e)}else{var r;try{r=d.statSync(e)}catch(e){var i=e instanceof js__$Boot_HaxeError?e.val:e;throw t}if(!r.isDirectory()){throw t}}}};var d=r(7147);var p=t["tink.core.Outcome"]={__ename__:true,__constructs__:["Success","Failure"],Success:(i=function(e){return{_hx_index:0,data:e,__enum__:"tink.core.Outcome",toString:$estr}},i.__params__=["data"],i),Failure:(i=function(e){return{_hx_index:1,failure:e,__enum__:"tink.core.Outcome",toString:$estr}},i.__params__=["failure"],i)};var haxeshim_Scope=function(){};haxeshim_Scope.__name__=true;haxeshim_Scope.env=function(e){var t=process.env[e];if(t==null){return a.None}else if(t==""){return a.None}else{var r=t;return a.Some(r)}};var haxeshim_Neko=function(){};haxeshim_Neko.__name__=true;haxeshim_Neko.setEnv=function(){if(haxeshim_Neko.isset){if(haxeshim_Os.IS_WINDOWS){var e=0;var t=haxeshim_Neko.ENV;var r=t==null?[]:Reflect.fields(t);while(e<r.length){var i=r[e];++e;var n=u.get(haxeshim_Neko.ENV,i);process.env[i]=n}}haxeshim_Neko.isset=false}};var haxeshim_NekoCli=function(){};haxeshim_NekoCli.__name__=true;haxeshim_NekoCli.main=function(){haxeshim_Neko.setEnv();var e=haxeshim_Os.IS_WINDOWS?"neko.exe":"neko";var t=process.argv.slice(2);var r=process.cwd();var i={};var n;var s=haxeshim_Exec.sync(haxeshim_Neko.PATH+("/"+e),r,t,u.mergeInto(haxeshim_Neko.ENV,u.ofVars(i)));switch(s._hx_index){case 0:var o=s.data;n=o;break;case 1:var a=s.failure;n=a.code;break}process.exit(n)};var js__$Boot_HaxeError=function(e){Error.call(this);this.val=e;if(Error.captureStackTrace){Error.captureStackTrace(this,js__$Boot_HaxeError)}};js__$Boot_HaxeError.__name__=true;js__$Boot_HaxeError.__super__=Error;js__$Boot_HaxeError.prototype=$extend(Error.prototype,{__class__:js__$Boot_HaxeError});var js_lib__$ArrayBuffer_ArrayBufferCompat=function(){};js_lib__$ArrayBuffer_ArrayBufferCompat.__name__=true;js_lib__$ArrayBuffer_ArrayBufferCompat.sliceImpl=function(e,t){var r=new Uint8Array(this,e,t==null?null:t-e);var i=new Uint8Array(r.byteLength);i.set(r);return i.buffer};var m=r(3685);var _=r(5687);var y=r(1017);var v=r(7310);var g=r(4300).Buffer;var js_node_buffer__$Buffer_Helper=function(){};js_node_buffer__$Buffer_Helper.__name__=true;js_node_buffer__$Buffer_Helper.bytesOfBuffer=function(e){var t=Object.create(haxe_io_Bytes.prototype);t.length=e.byteLength;t.b=e;e.bufferValue=e;e.hxBytes=t;e.bytes=e;return t};var w=r(2781).PassThrough;var lix_cli_Command=function(){};lix_cli_Command.__name__=true;lix_cli_Command.attempt=function(e,t){var r=N.ofSync(lix_cli_Command.reportError);var i=e.flatMap((function(e){switch(e._hx_index){case 0:var t=e.data;return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(t));case 1:var i=e.failure;return r(i)}}));i.gather().handle(t)};lix_cli_Command.reportError=function(e){haxeshim_Logger.get().error(e.message);process.exit(e.code);return null};var lix_cli_NekoCmd=function(){};lix_cli_NekoCmd.__name__=true;lix_cli_NekoCmd.ensure=function(e){return lix_client_haxe_Switcher.ensureNeko(e)};lix_cli_NekoCmd.main=function(){lix_cli_Command.attempt(lix_cli_NekoCmd.ensure(haxeshim_Logger.get()),E.fromNiladic(haxeshim_NekoCli.main))};var b=r(8781);var lix_client_Download=function(){};lix_client_Download.__name__=true;lix_client_Download.buffered=function(e){return O.async((function(t){var r=[];e.on("data",$bind(r,$arrayPush));e.on("end",(function(){var e=p.Success(js_node_buffer__$Buffer_Helper.bytesOfBuffer(g.concat(r)));t(e)}))}))};lix_client_Download.unzip=function(e,t,i,n,s){k.next(lix_client_Download.buffered(n),(function(n){return O.async((function(o){var a=n.length-4;while(a-- >0)if(n.b[a]==80&&n.b[a+1]==75&&n.b[a+2]==5&&n.b[a+3]==6){n.b[a+20]=0;n.b[a+21]=0;n=n.sub(0,a+22);break}if(a==0){var l=p.Failure(new tink_core_TypedError(422,"Unzip failed to find central directory in "+e,{fileName:"src/lix/client/Download.hx",lineNumber:70,className:"lix.client.Download",methodName:"unzip"}));o(l);return}var c=n.b;b.fromBuffer(g.from(c.buffer,c.byteOffset,n.length),(function(n,a){var l=-1;var done=function(){l+=1;s.onProgress(l,a.entryCount,false);if(l==a.entryCount){var e=o;var r=p.Success(t);haxe_Timer.delay((function(){e(r)}),100)}};if(n!=null){var c=p.Failure(new tink_core_TypedError(422,"Failed to unzip "+e+" because "+Std.string(n),{fileName:"src/lix/client/Download.hx",lineNumber:83,className:"lix.client.Download",methodName:"unzip"}));o(c)}a.on("entry",(function(e){var n=haxeshim_Fs.peel(lix_client_Download.stripLeadingSlashes(e.fileName),i);switch(n._hx_index){case 0:var s=n.v;var o=""+t+"/"+s;if(StringTools.endsWith(o,"/")){done()}else{haxeshim_Fs.ensureDir(o).eager();a.openReadStream(e,(function(e,t){var i=r(7758).createWriteStream(o);t.pipe(i,{end:true});i.on("close",done)}))}break;case 1:break}}));a.on("end",(function(){a.close();done()}))}))}))})).handle($bind(s,s.done))};lix_client_Download.stripLeadingSlashes=function(e){if(e.charAt(0)=="/"){return lix_client_Download.stripLeadingSlashes(HxOverrides.substr(e,1,null))}else{return e}};lix_client_Download.untar=function(e,t,i,n,s){return O.async((function(e){var o=0;var a=0;var l=[];var update=function(){s.onProgress(a,o+1,true)};var c=1;var done=function(r){if(r==null){r=0}a+=r;update();haxe_Timer.delay((function(){if((c-=1)<=0){s.onProgress(o,o,true);var r=[];var i=0;while(i<l.length){var n=[l[i]];++i;r.push(O.async(function(e){return function(t){d.unlink(e[0].to,function(e){return function(r){d.symlink(e[0].from,e[0].to,function(){return function(e){var r=e==null?p.Success(R.Noise):p.Failure(new tink_core_TypedError(null,e.message,{fileName:"src/lix/client/Download.hx",lineNumber:142,className:"lix.client.Download",methodName:"untar"}));t(r)}}())}}(e))}}(n)))}k.next(k.inParallel(r),(function(e){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Success(t)))})).handle(e)}}),100)};var u=null;var fail=function(t){u=new tink_core_TypedError(null,t,{fileName:"src/lix/client/Download.hx",lineNumber:154,className:"lix.client.Download",methodName:"untar"});e(p.Failure(u))};lix_client_uncompress_Tar.parse(n,(function(n){if(u!=null){return}o+=n.size;update();var skip=function(){n.on("data",(function(){}))};var s=haxeshim_Fs.peel(lix_client_Download.stripLeadingSlashes(n.path),i);switch(s._hx_index){case 0:var a=s.v;var h=""+t+"/"+a;if(StringTools.endsWith(h,"/")){skip()}else{haxeshim_Fs.ensureDir(h).handle((function(t){if(t._hx_index==1){var i=t.failure;u=i;e(p.Failure(u))}else if(n.type=="SymbolicLink"){skip();l.push({from:n.linkpath,to:h})}else{c+=1;var s=new w;var o=r(7758).createWriteStream(h,{mode:n.mode});n.pipe(s,{end:true});s.pipe(o,{end:true});var a=done;var d=n.size;o.on("close",(function(){a(d)}))}}))}break;case 1:skip();break}})).handle((function(t){if(t._hx_index==1){var r=t.failure;e(p.Failure(r))}else{done()}}))})).handle($bind(s,s.done))};lix_client_Download.tar=function(e,t,r,i){var n=r;var s=t;return lix_client_Download.download(e,lix_client_Download.withLogger(i,(function(e,t,r){return lix_client_Download.untar(e,n,s,t,r)})))};lix_client_Download.zip=function(e,t,r,i){var n=r;var s=t;return lix_client_Download.download(e,lix_client_Download.withLogger(i,(function(e,t,r){lix_client_Download.unzip(e,n,s,t,r)})))};lix_client_Download.withLogger=function(e,t){return function(r,i,n){var s=Std.parseInt(i.headers["content-length"]);var o=0;var a=0;var l=1;var c=null;var progress=function(t){if(t==c){return}c=t;e.progress(t)};var pct=function(e){e=Math.min(1,Math.max(0,e));var t=Std.string(Math.round(1e3*e)/10);var r;if(t.indexOf(".")==-1){var i=t;r=""+i+".0"}else{var n=t;r=n}return StringTools.lpad(r," ",5)+"%"};var u=new Date(0).getTime();var update=function(){if(!(a==l||a/l>=1)){var e=(new Date).getTime();if(e>u+137){u=e;var t=[];if(o<s){t.push("Downloaded: "+pct(o/s))}if(a>0){t.push("Saved: "+pct(a/l))}var r=" "+t.join(" ");progress(r)}}};i.on("data",(function(e){o+=e.length;update()}));var h=0;t(r,i,{onProgress:function(e,t,r){a=e;l=t;if(r){var i=o/s;var n=a/l;var c=i*n;if(c<h){c=h}h=c;a=Math.round(c*1e3);l=1e3}update()},done:function(t){e.success("-> Done!");n(t)}})}};lix_client_Download.download=function(e,t){return O.async((function(r){var i=v.parse(e);i.agent=false;if(i.headers==null){i.headers={}}i.headers["user-agent"]=lix_client_Download.USER_AGENT;var fail=function(t){var i=p.Failure(tink_core_TypedError.withData(null,"Failed to download "+e+" because "+t.message,t,{fileName:"src/lix/client/Download.hx",lineNumber:293,className:"lix.client.Download",methodName:"download"}));r(i)};var n=StringTools.startsWith(e,"https:")?_.get(i):m.get(i);n.setTimeout(3e4);n.on("error",fail);n.on("response",(function(n){if(n.statusCode>=400){var s=p.Failure(tink_core_TypedError.withData(n.statusCode,n.statusMessage,n,{fileName:"src/lix/client/Download.hx",lineNumber:304,className:"lix.client.Download",methodName:"download"}));r(s)}else{var o=n.headers["location"];if(o==null){n.on("error",fail);t(e,n,(function(e){switch(e._hx_index){case 0:var t=e.data;r(p.Success(t));break;case 1:var i=e.failure;r(p.Failure(i));break}}))}else{var a=o;var l=v.parse(a);var c=l.slashes;var u=l.search;var h=l.query;var d=l.port;var m=l.pathname;var _=l.path;var y=l.href;var g=l.hostname;var w=l.host;var b=l.hash;var S=l.auth;lix_client_Download.download(l.protocol==null?i.protocol+"//"+i.host+a:a,t).handle(r)}}}))}))};var lix_client_haxe_Switcher=function(){};lix_client_haxe_Switcher.__name__=true;lix_client_haxe_Switcher.ensureNeko=function(e){var t=haxeshim_Neko.PATH;if(sys_FileSystem.exists(t)){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Success(t)))}else{e.info("Neko seems to be missing. Attempting download ...");var getUrl=function(e){return"https://github.com/HaxeFoundation/neko/releases/download/v2-4-0/neko-2.4.0-"+e};var r;var i=process.arch;switch(Sys.systemName()){case"Mac":var n=getUrl("osx-universal.tar.gz");r=function(e,t,r){return lix_client_Download.tar(n,e,t,r)};break;case"Windows":var s=getUrl("win.zip");r=function(e,t,r){return lix_client_Download.zip(s,e,t,r)};break;default:if(i=="arm64"){var o=getUrl("linux-arm64.tar.gz");r=function(e,t,r){return lix_client_Download.tar(o,e,t,r)}}else{var a=getUrl("linux64.tar.gz");r=function(e,t,r){return lix_client_Download.tar(a,e,t,r)}}}return k.next(r(1,t,e),(function(t){e.success("done");return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Success(t)))}))}};var lix_client_uncompress_Tar=function(){};lix_client_uncompress_Tar.__name__=true;lix_client_uncompress_Tar.parse=function(e,t){return O.async((function(r){var i=0;var n=0;var s=new S({onentry:function(e){i+=1;t(e)}});s.on("warn",(function(){n+=1}));s.on("end",(function(){var e=i==0&&n!=0?p.Failure(new tink_core_TypedError(422,"Invalid tar archive.",{fileName:"src/lix/client/uncompress/Tar.hx",lineNumber:23,className:"lix.client.uncompress.Tar",methodName:"parse"})):p.Success(R.Noise);r(e)}));s.on("error",(function(e){var t=p.Failure(new tink_core_TypedError(null,e.message,{fileName:"src/lix/client/uncompress/Tar.hx",lineNumber:26,className:"lix.client.uncompress.Tar",methodName:"parse"}));r(t)}));e.pipe(s,{end:true})}))};var S=r(4674).Parse;var E={};E.__name__=true;E.invoke=function(e,t){if(E.depth<500){E.depth++;e(t);E.depth--}else{var r=e;var f=function(e){E.invoke(r,e)};var i=t;E.defer((function(){f(i)}))}};E.fromNiladic=function(e){return e};E.defer=function(e){process.nextTick(e)};var tink_core_LinkObject=function(){};tink_core_LinkObject.__name__=true;tink_core_LinkObject.__isInterface__=true;tink_core_LinkObject.prototype={__class__:tink_core_LinkObject};var x={};x.__name__=true;x.fromMany=function(e){var t=new tink_core_SimpleLink((function(){if(e!=null){var t=0;while(t<e.length){var r=e[t];++t;if(r!=null){r.cancel()}}}else{e=null}}));return t};var tink_core_SimpleLink=function(e){this.f=e};tink_core_SimpleLink.__name__=true;tink_core_SimpleLink.__interfaces__=[tink_core_LinkObject];tink_core_SimpleLink.prototype={cancel:function(){if(this.f!=null){this.f();this.f=null}},__class__:tink_core_SimpleLink};var tink_core__$Callback_LinkPair=function(e,t){this.dissolved=false;this.a=e;this.b=t};tink_core__$Callback_LinkPair.__name__=true;tink_core__$Callback_LinkPair.__interfaces__=[tink_core_LinkObject];tink_core__$Callback_LinkPair.prototype={cancel:function(){if(!this.dissolved){this.dissolved=true;var e=this.a;if(e!=null){e.cancel()}var t=this.b;if(t!=null){t.cancel()}this.a=null;this.b=null}},__class__:tink_core__$Callback_LinkPair};var tink_core__$Callback_ListCell=function(e,t){if(e==null){throw new js__$Boot_HaxeError("callback expected but null received")}this.cb=e;this.list=t};tink_core__$Callback_ListCell.__name__=true;tink_core__$Callback_ListCell.__interfaces__=[tink_core_LinkObject];tink_core__$Callback_ListCell.prototype={cancel:function(){if(this.list!=null){var e=this.list;this.cb=null;this.list=null;if(--e.used<e.used>>1){e.compact()}}},__class__:tink_core__$Callback_ListCell};var tink_core_CallbackList=function(){this.busy=false;this.queue=[];this.used=0;this.cells=[]};tink_core_CallbackList.__name__=true;tink_core_CallbackList.prototype={ondrain:function(){},invoke:function(e,t){if(this.busy){var r=$bind(this,this.invoke);var i=e;var n=t;var tmp=function(){r(i,n);return};this.queue.push(tmp)}else{this.busy=true;var s=this.cells.length;var o=0;var a=s;while(o<a){var l=o++;var c=this.cells[l];if(c.list!=null){E.invoke(c.cb,e)}}this.busy=false;if(t){var u=this.cells.length-s;var h=0;var d=s;while(h<d){var p=h++;var m=this.cells[p];m.cb=null;m.list=null}var _=0;var y=u;while(_<y){var v=_++;this.cells[v]=this.cells[s+v]}this.resize(u)}else if(this.used<this.cells.length){this.compact()}if(this.queue.length>0){this.queue.shift()()}}},compact:function(){if(this.busy){return}else if(this.used==0){this.resize(0);this.ondrain()}else{var e=0;var t=0;var r=this.cells.length;while(t<r){var i=t++;var n=this.cells[i];var s=n.list;if(n.cb!=null){var o=n;if(e!=i){this.cells[e]=o}if(++e==this.used){break}}}this.resize(this.used)}},resize:function(e){this.cells.length=e},__class__:tink_core_CallbackList};var tink_core_TypedError=function(e,t,r){if(e==null){e=500}this.isTinkError=true;this.code=e;this.message=t;this.pos=r;this.exceptionStack=[];this.callStack=[]};tink_core_TypedError.__name__=true;tink_core_TypedError.withData=function(e,t,r,i){return tink_core_TypedError.typed(e,t,r,i)};tink_core_TypedError.typed=function(e,t,r,i){var n=new tink_core_TypedError(e,t,i);n.data=r;return n};tink_core_TypedError.asError=function(e){if(e!=null&&e.isTinkError){return e}else{return null}};tink_core_TypedError.catchExceptions=function(e,t,r){try{return p.Success(e())}catch(e){var i=e instanceof js__$Boot_HaxeError?e.val:e;var n=tink_core_TypedError.asError(i);var s;if(n==null){s=t==null?tink_core_TypedError.withData(null,"Unexpected Error",i,r):t(i)}else{var o=n;s=o}return p.Failure(s)}};tink_core_TypedError.prototype={__class__:tink_core_TypedError};var tink_core_FutureObject=function(){};tink_core_FutureObject.__name__=true;tink_core_FutureObject.__isInterface__=true;tink_core_FutureObject.prototype={__class__:tink_core_FutureObject};var R=t["tink.core.Noise"]={__ename__:true,__constructs__:["Noise"],Noise:{_hx_index:0,__enum__:"tink.core.Noise",toString:$estr}};var tink_core__$Future_SyncFuture=function(e){this.value=e};tink_core__$Future_SyncFuture.__name__=true;tink_core__$Future_SyncFuture.__interfaces__=[tink_core_FutureObject];tink_core__$Future_SyncFuture.prototype={flatMap:function(e){var t=this;return new tink_core__$Future_SuspendableFuture((function(r){var i=t.value.get();return e(i).handle(r)}))},handle:function(e){E.invoke(e,this.value.get());return null},eager:function(){return this},gather:function(){return this},__class__:tink_core__$Future_SyncFuture};var O={};O.__name__=true;O.flatten=function(e){return new tink_core__$Future_SuspendableFuture((function(t){var r=null;var i=e.handle((function(e){r=e.handle(t)}));var n=new tink_core_SimpleLink((function(){if(r!=null){r.cancel()}}));return new tink_core__$Callback_LinkPair(i,n)}))};O.async=function(e,t){if(t==null){t=false}if(t){return new tink_core__$Future_SuspendableFuture((function(t){e(t);return null}))}else{var r=new tink_core_FutureTrigger;var i=e;E.invoke(i,$bind(r,r.trigger));return r}};var tink_core_FutureTrigger=function(){this.list=new tink_core_CallbackList};tink_core_FutureTrigger.__name__=true;tink_core_FutureTrigger.__interfaces__=[tink_core_FutureObject];tink_core_FutureTrigger.prototype={handle:function(e){var t=this.list;if(t==null){E.invoke(e,this.result);return null}else{var r=t;var i=new tink_core__$Callback_ListCell(e,r);r.cells.push(i);r.used++;return i}},flatMap:function(e){var t=this.list;if(t==null){return e(this.result)}else{var r=t;var i=new tink_core_FutureTrigger;var n=this.list;var s=new tink_core__$Callback_ListCell((function(t){e(t).handle($bind(i,i.trigger))}),n);n.cells.push(s);n.used++;return i}},gather:function(){return this},eager:function(){return this},trigger:function(e){if(this.list==null){return false}else{var t=this.list;this.list=null;this.result=e;t.invoke(e,true);return true}},__class__:tink_core_FutureTrigger};var tink_core__$Future_SuspendableFuture=function(e){this.suspended=true;var t=this;this.wakeup=e;this.callbacks=new tink_core_CallbackList;this.callbacks.ondrain=function(){if(t.callbacks!=null){t.suspended=true;var e=t.link;if(e!=null){e.cancel()}t.link=null}}};tink_core__$Future_SuspendableFuture.__name__=true;tink_core__$Future_SuspendableFuture.__interfaces__=[tink_core_FutureObject];tink_core__$Future_SuspendableFuture.prototype={trigger:function(e){var t=this.callbacks;if(t!=null){var r=t;this.callbacks=null;this.suspended=false;this.result=e;this.link=null;this.wakeup=null;r.invoke(e,true)}},handle:function(e){var t=this.callbacks;if(t==null){E.invoke(e,this.result);return null}else{var r=t;var i=this.callbacks;var n=new tink_core__$Callback_ListCell(e,i);i.cells.push(n);i.used++;var s=n;if(this.suspended){this.suspended=false;this.link=this.wakeup($bind(this,this.trigger))}return s}},map:function(e){var t=this;return new tink_core__$Future_SuspendableFuture((function(r){return t.handle((function(t){var i=e(t);r(i)}))}))},flatMap:function(e){return O.flatten(this.map(e))},gather:function(){return this},eager:function(){this.handle(E.fromNiladic((function(){})));return this},__class__:tink_core__$Future_SuspendableFuture};var tink_core__$Lazy_LazyFunc=function(e){this.f=e};tink_core__$Lazy_LazyFunc.__name__=true;tink_core__$Lazy_LazyFunc.__interfaces__=[tink_core__$Lazy_LazyObject];tink_core__$Lazy_LazyFunc.prototype={get:function(){if(this.f!=null){this.result=this.f();this.f=null}return this.result},__class__:tink_core__$Lazy_LazyFunc};var k={};k.__name__=true;k.next=function(e,t,r){if(r==null){r=true}var i=r;if(i==null){i=true}var n=e.flatMap((function(e){switch(e._hx_index){case 0:var r=e.data;return t(r);case 1:var i=e.failure;return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Failure(i)))}}));if(i){return n.gather()}else{return n}};k.inParallel=function(e,t,r){if(e.length==0){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Success([])))}else{return O.async((function(r){var i=[];var n=e.length;var s=null;var o=[];var a=false;var l=0;var c=HxOverrides.iter(e);var u=null;var done=function(e){if(s==null){a=true}else if(s!=null){s.cancel()}r(e)};var fail=function(e){n=0;done(p.Failure(e))};var set=function(e,t){i[e]=t;if((n-=1)==0){done(p.Success(i))}else if(c.hasNext()&&n>0){u()}};u=function(){l+=1;var e=l-1;var t=c.next().handle((function(t){switch(t._hx_index){case 0:var r=t.data;set(e,r);break;case 1:var i=t.failure;fail(i);break}}));o.push(t)};while(true){var h;if(c.hasNext()&&n>0){if(t!=null){t-=1;h=t+1>0}else{h=true}}else{h=false}if(!h){break}u()}s=x.fromMany(o);if(a){if(s!=null){s.cancel()}}}),r)}};var N={};N.__name__=true;N.ofSync=function(e){return function(t){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(e(t)))}};function $bind(t,r){if(r==null)return null;if(r.__id__==null)r.__id__=e.$haxeUID++;var i;if(t.hx__closures__==null)t.hx__closures__={};else i=t.hx__closures__[r.__id__];if(i==null){i=r.bind(t);t.hx__closures__[r.__id__]=i}return i}function $arrayPush(e){this.push(e)}e.$haxeUID|=0;js_Boot.__toStr={}.toString;if(String.fromCodePoint==null)String.fromCodePoint=function(e){return e<65536?String.fromCharCode(e):String.fromCharCode((e>>10)+55232)+String.fromCharCode((e&1023)+56320)};String.prototype.__class__=String;String.__name__=true;Array.__name__=true;Date.prototype.__class__=Date;Date.__name__="Date";var A={};var I={};var L=Number;var T=Boolean;var F={};var B={};var C={};Object.defineProperty(js__$Boot_HaxeError.prototype,"message",{get:function(){return String(this.val)}});if(ArrayBuffer.prototype.slice==null){ArrayBuffer.prototype.slice=js_lib__$ArrayBuffer_ArrayBufferCompat.sliceImpl}ANSI.values=function(e){var t;var r=new haxe_ds_EnumValueMap;r.set(n.Off,0);r.set(n.Bold,1);r.set(n.Underline,4);r.set(n.Blink,5);r.set(n.ReverseVideo,7);r.set(n.Concealed,8);r.set(n.BoldOff,22);r.set(n.UnderlineOff,24);r.set(n.BlinkOff,25);r.set(n.NormalVideo,27);r.set(n.ConcealedOff,28);r.set(n.Black,30);r.set(n.Red,31);r.set(n.Green,32);r.set(n.Yellow,33);r.set(n.Blue,34);r.set(n.Magenta,35);r.set(n.Cyan,36);r.set(n.White,37);r.set(n.DefaultForeground,39);r.set(n.BlackBack,40);r.set(n.RedBack,41);r.set(n.GreenBack,42);r.set(n.YellowBack,43);r.set(n.BlueBack,44);r.set(n.MagentaBack,45);r.set(n.CyanBack,46);r.set(n.WhiteBack,47);r.set(n.DefaultBackground,49);t=r;return t}(this);ANSI.available=ANSI.detectSupport();ANSI.strip=false;ANSI.stripIfUnavailable=true;haxeshim_Os.IS_WINDOWS=Sys.systemName()=="Windows";haxeshim_Os.DELIMITER=haxeshim_Os.IS_WINDOWS?";":":";haxeshim__$Logger_SysLogger.isTTY=process.stderr.isTTY;haxeshim__$Logger_SysLogger.out=function(e){var t;ANSI.available=haxeshim__$Logger_SysLogger.isTTY;t=new _$Sys_FileOutput(2);return t}(this);haxeshim_Scope.DEFAULT_ROOT=function(e){var t;var r=haxeshim_Scope.env("HAXE_ROOT");var i=haxeshim_Scope.env("HAXESHIM_ROOT");var n=new tink_core__$Lazy_LazyConst(process.env[haxeshim_Os.IS_WINDOWS?"APPDATA":"HOME"]+"/haxe");var s;if(i._hx_index==0){var o=i.v;s=o}else{s=n.get()}var a=new tink_core__$Lazy_LazyConst(s);t=r._hx_index==0?function(e){var t;var i=r.v;t=i;return t}(e):a.get();return t}(this);haxeshim_Neko.PATH=haxeshim_Os.slashes(haxeshim_Scope.DEFAULT_ROOT+"/neko");haxeshim_Neko.isset=false;haxeshim_Neko.ENV=function(e){var t;var r;switch(Sys.systemName()){case"Mac":r="DYLD_LIBRARY_PATH";break;case"Windows":r="PATH";break;default:r="LD_LIBRARY_PATH"}var i=process.env[r];t=i==null?function(e){var t;var i=new haxe_ds_StringMap;{var n=haxeshim_Neko.PATH;if(C[r]!=null){i.setReserved(r,n)}else{i.h[r]=n}}t=u.ofMap(i);return t}(e):function(e){var t;var n=i;t=n.indexOf(haxeshim_Neko.PATH)!=-1?u.ofVars({}):function(e){var t;var n=i;var s=new haxe_ds_StringMap;{var o=n+haxeshim_Os.DELIMITER+haxeshim_Neko.PATH;if(C[r]!=null){s.setReserved(r,o)}else{s.h[r]=o}}t=u.ofMap(s);return t}(e);return t}(e);return t}(this);lix_client_Download.initZip=function(e){var t;var r=b.validateFileName;b.validateFileName=function(e){return null};t=true;return t}(this);lix_client_Download.USER_AGENT="switchx";E.depth=0;lix_cli_NekoCmd.main()})(typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this)},4794:(e,t,r)=>{var i=r(4300).Buffer;var n=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];if(typeof Int32Array!=="undefined"){n=new Int32Array(n)}function ensureBuffer(e){if(i.isBuffer(e)){return e}var t=typeof i.alloc==="function"&&typeof i.from==="function";if(typeof e==="number"){return t?i.alloc(e):new i(e)}else if(typeof e==="string"){return t?i.from(e):new i(e)}else{throw new Error("input must be buffer, number, or string, received "+typeof e)}}function bufferizeInt(e){var t=ensureBuffer(4);t.writeInt32BE(e,0);return t}function _crc32(e,t){e=ensureBuffer(e);if(i.isBuffer(t)){t=t.readUInt32BE(0)}var r=~~t^-1;for(var s=0;s<e.length;s++){r=n[(r^e[s])&255]^r>>>8}return r^-1}function crc32(){return bufferizeInt(_crc32.apply(null,arguments))}crc32.signed=function(){return _crc32.ap