lix 15.12.4 → 16.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- (()=>{var e={3423:function(e,t,r){(function(e){"use strict";var $estr=function(){return js_Boot.__string_rec(this,"")},t=t||{},n;function $extend(e,t){var r=Object.create(e);for(var n in t)r[n]=t[n];if(t.toString!==Object.prototype.toString)r.toString=t.toString;return r}var i=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 n in e){if(n!="__id__"&&n!="hx__closures__"&&r.call(e,n)){t.push(n)}}}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 n=Reflect.fields(e);while(r<n.length){var i=n[r];++r;t[i]=Reflect.field(e,i)}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 n=typeof e;if(n=="function"&&(e.__name__||e.__ename__)){n="object"}switch(n){case"function":return"<function>";case"object":if(e.__enum__){var i=t[e.__enum__];var s=i.__constructs__[e._hx_index];var a=i[s];if(a.__params__){r=r+"\t";return s+"("+function(t){var n;var i=[];{var s=0;var o=a.__params__;while(true){if(!(s<o.length)){break}var l=o[s];s=s+1;i.push(js_Boot.__string_rec(e[l],r))}}n=i;return n}(this).join(",")+")"}else{return s}}if(e instanceof Array){var o="[";r+="\t";var l=0;var c=e.length;while(l<c){var u=l++;o+=(u>0?",":"")+js_Boot.__string_rec(e[u],r)}o+="]";return o}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 v=null;for(v in e){if(_&&!e.hasOwnProperty(v)){continue}if(v=="prototype"||v=="__class__"||v=="__super__"||v=="__interfaces__"||v=="__properties__"){continue}if(m.length!=2){m+=", \n"}m+=r+v+" : "+js_Boot.__string_rec(e[v],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 n=0;var i=r.length;while(n<i){var s=n++;var a=r[s];if(a==t||js_Boot.__interfLoop(a,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 H:return typeof e=="boolean";case U:return e!=null;case z:return typeof e=="number";case P: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==W?e.__name__!=null:false){return true}if(r==j?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 n=t++;var i=e.charCodeAt(n);if(i<=8||i>=14&&i!=32&&i!=45){var s=parseInt(e,e[n+1]=="x"||e[n+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 n=0;while(n<e.length){var s=e[n];++n;if(!js_Boot.__instanceof(s,i)){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 DateTools=function(){};DateTools.__name__=true;DateTools.__format_get=function(e,t){switch(t){case"%":return"%";case"A":return DateTools.DAY_NAMES[e.getDay()];case"B":return DateTools.MONTH_NAMES[e.getMonth()];case"C":return StringTools.lpad(Std.string(e.getFullYear()/100|0),"0",2);case"D":return DateTools.__format(e,"%m/%d/%y");case"F":return DateTools.__format(e,"%Y-%m-%d");case"I":case"l":var r=e.getHours()%12;return StringTools.lpad(Std.string(r==0?12:r),t=="I"?"0":" ",2);case"M":return StringTools.lpad(Std.string(e.getMinutes()),"0",2);case"R":return DateTools.__format(e,"%H:%M");case"S":return StringTools.lpad(Std.string(e.getSeconds()),"0",2);case"T":return DateTools.__format(e,"%H:%M:%S");case"Y":return Std.string(e.getFullYear());case"a":return DateTools.DAY_SHORT_NAMES[e.getDay()];case"b":case"h":return DateTools.MONTH_SHORT_NAMES[e.getMonth()];case"d":return StringTools.lpad(Std.string(e.getDate()),"0",2);case"e":return Std.string(e.getDate());case"H":case"k":return StringTools.lpad(Std.string(e.getHours()),t=="H"?"0":" ",2);case"m":return StringTools.lpad(Std.string(e.getMonth()+1),"0",2);case"n":return"\n";case"p":if(e.getHours()>11){return"PM"}else{return"AM"}break;case"r":return DateTools.__format(e,"%I:%M:%S %p");case"s":return Std.string(e.getTime()/1e3|0);case"t":return"\t";case"u":var n=e.getDay();if(n==0){return"7"}else if(n==null){return"null"}else{return""+n}break;case"w":return Std.string(e.getDay());case"y":return StringTools.lpad(Std.string(e.getFullYear()%100),"0",2);default:throw new js__$Boot_HaxeError("Date.format %"+t+"- not implemented yet.")}};DateTools.__format=function(e,t){var r="";var n=0;while(true){var i=t.indexOf("%",n);if(i<0){break}var s=i-n;r+=s==null?HxOverrides.substr(t,n,null):HxOverrides.substr(t,n,s);r+=Std.string(DateTools.__format_get(e,HxOverrides.substr(t,i+1,1)));n=i+2}var a=t.length-n;r+=a==null?HxOverrides.substr(t,n,null):HxOverrides.substr(t,n,a);return r};DateTools.format=function(e,t){return DateTools.__format(e,t)};var EReg=function(e,t){this.r=new RegExp(e,t.split("u").join(""))};EReg.__name__=true;EReg.prototype={match:function(e){if(this.r.global){this.r.lastIndex=0}this.r.m=this.r.exec(e);this.r.s=e;return this.r.m!=null},__class__:EReg};var HxOverrides=function(){};HxOverrides.__name__=true;HxOverrides.dateStr=function(e){var t=e.getMonth()+1;var r=e.getDate();var n=e.getHours();var i=e.getMinutes();var s=e.getSeconds();return e.getFullYear()+"-"+(t<10?"0"+t:""+t)+"-"+(r<10?"0"+r:""+r)+" "+(n<10?"0"+n:""+n)+":"+(i<10?"0"+i:""+i)+":"+(s<10?"0"+s:""+s)};HxOverrides.strDate=function(e){switch(e.length){case 8:var t=e.split(":");var r=new Date;r["setTime"](0);r["setUTCHours"](t[0]);r["setUTCMinutes"](t[1]);r["setUTCSeconds"](t[2]);return r;case 10:var n=e.split("-");return new Date(n[0],n[1]-1,n[2],0,0,0);case 19:var i=e.split(" ");var s=i[0].split("-");var a=i[1].split(":");return new Date(s[0],s[1]-1,s[2],a[0],a[1],a[2]);default:throw new js__$Boot_HaxeError("Invalid date format : "+e)}};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++]}}};var Lambda=function(){};Lambda.__name__=true;Lambda.has=function(e,t){var r=$getIterator(e);while(r.hasNext()){var n=r.next();if(n==t){return true}}return false};Math.__name__=true;var StringBuf=function(){this.b=""};StringBuf.__name__=true;StringBuf.prototype={__class__:StringBuf};var haxe_SysTools=function(){};haxe_SysTools.__name__=true;haxe_SysTools.quoteUnixArg=function(e){if(e==""){return"''"}if(!new EReg("[^a-zA-Z0-9_@%+=:,./-]","").match(e)){return e}return"'"+StringTools.replace(e,"'","'\"'\"'")+"'"};haxe_SysTools.quoteWinArg=function(e,t){if(!new EReg('^[^ \t\\\\"]+$',"").match(e)){var r="";var n=e.indexOf(" ")!=-1||e.indexOf("\t")!=-1||e=="";if(n){r+='"'}var i=new StringBuf;var s=0;var a=e.length;while(s<a){var o=s++;var l=HxOverrides.cca(e,o);if(l==null){var c=l;if(i.b.length>0){r+=Std.string(i.b);i=new StringBuf}r+=String.fromCodePoint(c)}else{switch(l){case 34:var u=i.b;r+=u==null?"null":""+u;r+=u==null?"null":""+u;i=new StringBuf;r+='\\"';break;case 92:i.b+="\\";break;default:var h=l;if(i.b.length>0){r+=Std.string(i.b);i=new StringBuf}r+=String.fromCodePoint(h)}}}r+=Std.string(i.b);if(n){r+=Std.string(i.b);r+='"'}e=r}if(t){var d="";var p=0;var m=e.length;while(p<m){var _=p++;var v=HxOverrides.cca(e,_);if(haxe_SysTools.winMetaCharacters.indexOf(v)>=0){d+=String.fromCodePoint(94)}d+=String.fromCodePoint(v)}return d}else{return e}};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 n=e.length;if(n>=r){return e.indexOf(t,n-r)==n-r}else{return false}};StringTools.isSpace=function(e,t){var r=HxOverrides.cca(e,t);if(!(r>8&&r<14)){return r==32}else{return true}};StringTools.ltrim=function(e){var t=e.length;var r=0;while(r<t&&StringTools.isSpace(e,r))++r;if(r>0){return HxOverrides.substr(e,r,t-r)}else{return e}};StringTools.rtrim=function(e){var t=e.length;var r=0;while(r<t&&StringTools.isSpace(e,t-r-1))++r;if(r>0){return HxOverrides.substr(e,0,t-r)}else{return e}};StringTools.trim=function(e){return StringTools.ltrim(StringTools.rtrim(e))};StringTools.lpad=function(e,t,r){if(t.length<=0){return e}var n="";r-=e.length;while(n.length<r)n+=t==null?"null":""+t;n+=e==null?"null":""+e;return n};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 n=e.b;var i=r;while(i>0){this.writeByte(n[t]);++t;--i}return r},writeFullBytes:function(e,t,r){while(r>0){var n=this.writeBytes(e,t,r);t+=n;r-=n}},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){m.writeSync(this.fd,String.fromCodePoint(e))},writeBytes:function(e,t,r){var n=e.b;return m.writeSync(this.fd,b.from(n.buffer,n.byteOffset,e.length),t,r)},writeString:function(e,t){m.writeSync(this.fd,e)},__class__:_$Sys_FileOutput});var Type=function(){};Type.__name__=true;Type.enumParameters=function(e){var r=t[e.__enum__];var n=r.__constructs__[e._hx_index];var i=r[n].__params__;if(i!=null){var s=[];var a=0;while(a<i.length){var o=i[a];++a;s.push(e[o])}return s}else{return[]}};var a=t["haxe.StackItem"]={__ename__:true,__constructs__:["CFunction","Module","FilePos","Method","LocalFunction"],CFunction:{_hx_index:0,__enum__:"haxe.StackItem",toString:$estr},Module:(n=function(e){return{_hx_index:1,m:e,__enum__:"haxe.StackItem",toString:$estr}},n.__params__=["m"],n),FilePos:(n=function(e,t,r,n){return{_hx_index:2,s:e,file:t,line:r,column:n,__enum__:"haxe.StackItem",toString:$estr}},n.__params__=["s","file","line","column"],n),Method:(n=function(e,t){return{_hx_index:3,classname:e,method:t,__enum__:"haxe.StackItem",toString:$estr}},n.__params__=["classname","method"],n),LocalFunction:(n=function(e){return{_hx_index:4,v:e,__enum__:"haxe.StackItem",toString:$estr}},n.__params__=["v"],n)};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 n=this.compare(e,r.key);if(n==0){return new haxe_ds_TreeNode(r.left,e,t,r.right,r==null?0:r._height)}else if(n<0){var i=this.setLoop(e,t,r.left);return this.balance(i,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,n){var i=e==null?0:e._height;var s=n==null?0:n._height;if(i>s+2){var a=e.left;var o=e.right;if((a==null?0:a._height)>=(o==null?0:o._height)){return new haxe_ds_TreeNode(e.left,e.key,e.value,new haxe_ds_TreeNode(e.right,t,r,n))}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,n))}}else if(s>i+2){var l=n.right;var c=n.left;if((l==null?0:l._height)>(c==null?0:c._height)){return new haxe_ds_TreeNode(new haxe_ds_TreeNode(e,t,r,n.left),n.key,n.value,n.right)}else{return new haxe_ds_TreeNode(new haxe_ds_TreeNode(e,t,r,n.left.left),n.left.key,n.left.value,new haxe_ds_TreeNode(n.left.right,n.key,n.value,n.right))}}else{return new haxe_ds_TreeNode(e,t,r,n,(i>s?i:s)+1)}},compare:function(e,t){return Reflect.compare(e,t)},__class__:haxe_ds_BalancedTree};var haxe_ds_TreeNode=function(e,t,r,n,i){if(i==null){i=-1}this.left=e;this.key=t;this.value=r;this.right=n;if(i==-1){var s;var a=this.left;var o=this.right;if((a==null?0:a._height)>(o==null?0:o._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=i}};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 n=Type.enumParameters(e);var i=Type.enumParameters(t);if(n.length==0&&i.length==0){return 0}return this.compareArgs(n,i)},compareArgs:function(e,t){var r=e.length-t.length;if(r!=0){return r}var n=0;var i=e.length;while(n<i){var s=n++;var a=this.compareArg(e[s],t[s]);if(a!=0){return a}}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 haxe_ds_IntMap=function(){this.h={}};haxe_ds_IntMap.__name__=true;haxe_ds_IntMap.__interfaces__=[haxe_IMap];haxe_ds_IntMap.prototype={__class__:haxe_ds_IntMap};var o=t["haxe.ds.Option"]={__ename__:true,__constructs__:["Some","None"],Some:(n=function(e){return{_hx_index:0,v:e,__enum__:"haxe.ds.Option",toString:$estr}},n.__params__=["v"],n),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 n=0;var i=e.length;while(n<i){var s=n++;var a=e.charCodeAt(s);r[s<<1]=a&255;r[s<<1|1]=a>>8}return new haxe_io_Bytes(r.buffer)}var o=[];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){o.push(u)}else if(u<=2047){o.push(192|u>>6);o.push(128|u&63)}else if(u<=65535){o.push(224|u>>12);o.push(128|u>>6&63);o.push(128|u&63)}else{o.push(240|u>>18);o.push(128|u>>12&63);o.push(128|u>>6&63);o.push(128|u&63)}}return new haxe_io_Bytes(new Uint8Array(o).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))},getString:function(e,t,r){if(e<0||t<0||e+t>this.length){throw new js__$Boot_HaxeError(c.OutsideBounds)}if(r==null){r=l.UTF8}var n="";var i=this.b;var s=e;var a=e+t;switch(r._hx_index){case 0:var o=e>0;while(s<a){var u=i[s++];if(u<128){if(u==0){break}n+=String.fromCodePoint(u)}else if(u<224){var h=(u&63)<<6|i[s++]&127;n+=String.fromCodePoint(h)}else if(u<240){var d=i[s++];var p=(u&31)<<12|(d&127)<<6|i[s++]&127;n+=String.fromCodePoint(p)}else{var m=i[s++];var _=i[s++];var v=(u&15)<<18|(m&127)<<12|(_&127)<<6|i[s++]&127;n+=String.fromCodePoint(v)}}break;case 1:while(s<a){var y=i[s++]|i[s++]<<8;n+=String.fromCodePoint(y)}break}return n},toString:function(){return this.getString(0,this.length)},__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:(n=function(e){return{_hx_index:3,e:e,__enum__:"haxe.io.Error",toString:$estr}},n.__params__=["e"],n)};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 n=e.lastIndexOf(".");if(n!=-1){this.ext=HxOverrides.substr(e,n+1,null);this.file=HxOverrides.substr(e,0,n)}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.extension=function(e){var t=new haxe_io_Path(e);if(t.ext==null){return""}return t.ext};haxe_io_Path.join=function(e){var t=[];var r=0;var n=e;while(r<n.length){var i=n[r];++r;if(i!=null&&i!=""){t.push(i)}}var s=t;if(s.length==0){return""}var a=s[0];var o=1;var l=s.length;while(o<l){var c=o++;a=haxe_io_Path.addTrailingSlash(a);a+=s[c]}return haxe_io_Path.normalize(a)};haxe_io_Path.normalize=function(e){var t="/";e=e.split("\\").join(t);if(e==t){return t}var r=[];var n=0;var i=e.split(t);while(n<i.length){var s=i[n];++n;if(s==".."&&r.length>0&&r[r.length-1]!=".."){r.pop()}else if(s==""){if(r.length>0||HxOverrides.cca(e,0)==47){r.push(s)}}else if(s!="."){r.push(s)}}var a=r.join(t);var o="";var l=false;var c=false;var u=0;var h=a;while(u<h.length){var d=h;var p=u++;var m=d.charCodeAt(p);if(m>=55296&&m<=56319){m=m-55232<<10|d.charCodeAt(p+1)&1023}var _=m;if(_>=65536){++u}var v=_;switch(v){case 47:if(!l){c=true}else{var y=v;l=false;if(c){o+="/";c=false}o+=String.fromCodePoint(y)}break;case 58:o+=":";l=true;break;default:var g=v;l=false;if(c){o+="/";c=false}o+=String.fromCodePoint(g)}}return o};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.isAbsolute=function(e){if(StringTools.startsWith(e,"/")){return true}if(e.charAt(1)==":"){return true}if(StringTools.startsWith(e,"\\\\")){return true}return false};haxe_io_Path.prototype={__class__:haxe_io_Path};var haxeshim_Args=function(e,t){this.cwd=e;this.args=t};haxeshim_Args.__name__=true;haxeshim_Args.interpolate=function(e,t){if(e.indexOf("${")==-1){return _.Success(e)}var r="";var n=0;while(n<e.length){var i=e.indexOf("${",n);if(i==-1){var s=null;r+=s==null?HxOverrides.substr(e,n,null):HxOverrides.substr(e,n,s);break}else{var a=i;var o=a-n;r+=o==null?HxOverrides.substr(e,n,null):HxOverrides.substr(e,n,o);var l=a+2;var c;var u=e.indexOf("}",l);if(u==-1){return _.Failure("unclosed interpolation in "+e)}else{var h=u;c=h}var d=HxOverrides.substr(e,l,c-l);var p;var m=t(d);if(m==null){return _.Failure("unknown variable "+d)}else{var v=m;if(v=="$"+"{"+d+"}"){p=v}else{var y=haxeshim_Args.interpolate(v,t);if(y._hx_index==0){var g=y.data;p=g}else{var w=y;return w}}}r+=Std.string(p);n=c+1}}return _.Success(r)};haxeshim_Args.fromMultilineString=function(e,t,r,n){if(n==null){n=false}var i=[];var s=new haxeshim_Errors;var getVar1=function(e){if(e=="__dirname"){return haxe_io_Path.directory(t)}else{return r(e)}};var add=function(e,r){var add1=function(e){i.push({pos:h.File(t,r),val:e})};if(e.charAt(0)=="-"){add1(e)}else{var n=haxeshim_Args.interpolate(e,getVar1);switch(n._hx_index){case 0:var a=n.data;add1(a);break;case 1:var o=n.failure;s.fail(o,h.File(t,r));break}}};var a=e.split("\n");var o=StringTools.trim;var l=new Array(a.length);var c=0;var u=a.length;while(c<u){var d=c++;l[d]=o(a[d])}var p=l;var m=0;var _=p.length;while(m<_){var v=m++;var y=p[v];var g=function(e,t){return function(r){t[0](r,e[0])}}([v],[add]);var w=y.charAt(0);if(w!=null){switch(w){case"#":break;case"-":var b=y.indexOf(" ");if(b==-1){g(y)}else{var S=b;g(HxOverrides.substr(y,0,S));g(StringTools.trim(HxOverrides.substr(y,S,null)))}break;default:var x=StringTools.trim(y);if(x!=""){var E=x;if(n){g("-cp")}g(E)}}}}return s.produce(i)};haxeshim_Args.getNdll=function(e){if(StringTools.startsWith(e,"ndll:")){return o.Some(HxOverrides.substr(e,5,null))}else{return o.None}};haxeshim_Args.split=function(e,t,r,n){var i=[];var s=0;var a=e.length;while(s<a){var o=s++;i.push({val:e[o],pos:h.Cmd(o)})}var l=i;var c=[];var u=[];var d=[];var p=new haxeshim_Errors;var resolvePath=function(e){if(haxe_io_Path.isAbsolute(e)){return e}else{return haxe_io_Path.join([t,e])}};var flush=function(){if(u.length>0){var e=c.concat(u);var r=new haxeshim_Args(t,e);u=[];d.push(r)}};while(true){var m=l.shift();if(m==null){flush();break}else{var _=[m];var v=function(e){return function(t){var r=l.shift();if(r==null){p.fail(""+e[0].val+" without argument",e[0].pos)}else{var n=r;t(n)}}}(_);var y=_[0].val;switch(y){case"--each":c=u;u=[];break;case"--next":flush();break;case"--run":case"-x":var g=[_[0]].concat(l);u=u.concat(g);l=[];flush();break;case"--cwd":case"-C":var w=l.shift();if(w==null){p.fail(""+_[0].val+" without argument",_[0].pos)}else{var b=w;t=resolvePath(b.val);if(!r.isDirectory(t)){p.fail("Cannot use "+t+" as working directory",b.pos);l=[]}}break;default:var S=y;if(haxe_io_Path.extension(S)=="hxml"){l=haxeshim_Args.readHxml(resolvePath(S),r,n,p,_[0].pos).concat(l)}else{var x=y;if(StringTools.startsWith(x,"${")){var E=haxeshim_Args.interpolate(x,n);switch(E._hx_index){case 0:var R=E.data;u.push({val:R,pos:_[0].pos});break;case 1:var O=E.failure;p.fail(O,_[0].pos);break}}else{u.push(_[0])}}}}}return p.produce(d)};haxeshim_Args.readHxml=function(e,t,r,n,i){var s=t.readFile(e);switch(s._hx_index){case 0:var a=s.data;return n.getResult(haxeshim_Args.fromMultilineString(a,e,r));case 1:var o=s.failure;n.fail(o,i);return[]}};haxeshim_Args.prototype={__class__:haxeshim_Args};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 n=0;var i=Reflect.fields(e);while(n<i.length){var s=i[n];++n;r[haxeshim_Os.IS_WINDOWS?s.toUpperCase():s]=e[s]}var a=r;return a};u.ofMap=function(e){var t={};var r=t;var n=e.keys();while(n.hasNext()){var i=n.next();r[haxeshim_Os.IS_WINDOWS?i.toUpperCase():i]=Y[i]!=null?e.getReserved(i):e.h[i]}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 n=r;var i=n;return i}else if(r==null){var s=e;var a=s;return a}else{var o=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 v=o;var y=0;var g=Reflect.fields(v);while(y<g.length){var w=g[y];++y;h[w]=v[w]}var b=h;return b}};var haxeshim_Errors=function(){this.errors=[]};haxeshim_Errors.__name__=true;haxeshim_Errors.prototype={fail:function(e,t,r){this.errors.push({message:e,pos:t,code:r})},produce:function(e){if(this.errors.length==0){return _.Success(e)}else{return _.Failure({result:e,errors:this.errors})}},getResult:function(e){switch(e._hx_index){case 0:var t=e.data;return t;case 1:var r=e.failure;var n=0;var i=r.errors;while(n<i.length){var s=i[n];++n;this.errors.push(s)}return r.result}},__class__:haxeshim_Errors};var h=t["haxeshim.Pos"]={__ename__:true,__constructs__:["File","Cmd","Custom"],File:(n=function(e,t){return{_hx_index:0,path:e,line:t,__enum__:"haxeshim.Pos",toString:$estr}},n.__params__=["path","line"],n),Cmd:(n=function(e){return{_hx_index:1,index:e,__enum__:"haxeshim.Pos",toString:$estr}},n.__params__=["index"],n),Custom:(n=function(e){return{_hx_index:2,source:e,__enum__:"haxeshim.Pos",toString:$estr}},n.__params__=["source"],n)};var haxeshim_Exec=function(){};haxeshim_Exec.__name__=true;haxeshim_Exec.die=function(e,t){if(t!=null){haxeshim_Logger.get().error(t)}process.exit(e);throw new js__$Boot_HaxeError("unreachable")};haxeshim_Exec.gracefully=function(e){try{return e()}catch(e){var t=e instanceof js__$Boot_HaxeError?e.val:e;if(t instanceof tink_core_TypedError){var r=t;return haxeshim_Exec.die(r.code,r.message)}else{return haxeshim_Exec.die(500,Std.string(t))}}};haxeshim_Exec.mergeEnv=function(e){return u.mergeInto(e,u.ofVars(process.env))};haxeshim_Exec.shell=function(e,t,r){try{return _.Success(s.execSync(e,{cwd:t,stdio:"inherit",env:u.toVars(haxeshim_Exec.mergeEnv(r))}))}catch(t){var n=t instanceof js__$Boot_HaxeError?t.val:t;return _.Failure(new tink_core_TypedError(n.status,"Failed to invoke `"+e+"` because "+Std.string(n),{fileName:"haxeshim/Exec.hx",lineNumber:47,className:"haxeshim.Exec",methodName:"shell"}))}};haxeshim_Exec.sync=function(e,t,r,n){var i=s.spawnSync(e,r,{cwd:t,stdio:"inherit",env:u.toVars(haxeshim_Exec.mergeEnv(n))});var a=i.stdout;var o=i.stderr;var l=i.status;var c=i.signal;var h=i.pid;var d=i.output;var p=i.error;if(p==null){var m=l;return _.Success(m)}else{var v=l;var y=p;return _.Failure(new tink_core_TypedError(v,"Failed to call "+e+" because "+Std.string(y),{fileName:"haxeshim/Exec.hx",lineNumber:54,className:"haxeshim.Exec",methodName:"sync"}))}};haxeshim_Exec.eval=function(e,t,r,n){var i=s.spawnSync(e,r,{cwd:t,env:u.toVars(haxeshim_Exec.mergeEnv(n))});var a=i;if(a.error==null){return _.Success({status:a.status,stdout:a.stdout.toString(),stderr:a.stderr.toString()})}else{var o=i.stdout;var l=i.stderr;var c=i.status;var h=i.signal;var d=i.pid;var p=i.output;var m=i.error;return _.Failure(new tink_core_TypedError(null,"Failed to call "+e+" because "+Std.string(m),{fileName:"haxeshim/Exec.hx",lineNumber:66,className:"haxeshim.Exec",methodName:"eval"}))}};var d={};d.__name__=true;d.ofString=function(e){return haxe_io_Bytes.ofString(e)};var haxeshim_Fs=function(){};haxeshim_Fs.__name__=true;haxeshim_Fs.get=function(e,t){var r=e;return haxeshim_Attempt.to("get content of "+e,(function(){return m.readFileSync(r,{encoding:"utf8"})}),t)};haxeshim_Fs.save=function(e,t,r){return C.noise(C.next(haxeshim_Fs.ensureDir(e),(function(n){var i=e;var f=function(e){var t=e.b;var r=b.from(t.buffer,t.byteOffset,e.length);m.writeFileSync(i,r)};var s=t;var tmp=function(){f(s)};return haxeshim_Attempt.to("save to "+e,tmp,r)})))};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(_.Success(L.Noise)))}else{return C.next(C.next(haxeshim_Fs.exists(r),(function(e){if(e){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(L.Noise)))}else{return haxeshim_Fs.ensureDir(haxe_io_Path.addTrailingSlash(r))}})),(function(r){if(t){return C.next(haxeshim_Fs.exists(e),(function(t){return haxeshim_Attempt.to("create directory "+e,(function(){if(!t){sys_FileSystem.createDirectory(e)}return L.Noise}),{fileName:"haxeshim/Fs.hx",lineNumber:49,className:"haxeshim.Fs",methodName:"ensureDir"})}))}else{return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(L.Noise)))}}))}};haxeshim_Fs.ls=function(e,t){var r=[];var n=0;var i=m.readdirSync(e);while(n<i.length){var s=i[n];++n;var a=""+e+"/"+s;var o;if(t==null||t(a)){o=a}else{continue}r.push(o)}return r};haxeshim_Fs.delete=function(e){return haxeshim_Attempt.to("delete "+e,(function(){if(e!=null&&sys_FileSystem.exists(e)){if(sys_FileSystem.isDirectory(e)){var t=0;var r=m.readdirSync(e);while(t<r.length){var n=r[t];++t;haxeshim_Fs.delete(""+e+"/"+n)}if(sys_FileSystem.exists(e)){var i=0;var s=m.readdirSync(e);while(i<s.length){var a=s[i];++i;var o=e+"/"+a;if(sys_FileSystem.isDirectory(o)){if(sys_FileSystem.exists(o)){var l=0;var c=m.readdirSync(o);while(l<c.length){var u=c[l];++l;var h=o+"/"+u;if(sys_FileSystem.isDirectory(h)){sys_FileSystem.deleteDirectory(h)}else{m.unlinkSync(h)}}m.rmdirSync(o)}}else{m.unlinkSync(o)}}m.rmdirSync(e)}}else{m.unlinkSync(e)}}return}),{fileName:"haxeshim/Fs.hx",lineNumber:107,className:"haxeshim.Fs",methodName:"delete"})};haxeshim_Fs.peel=function(e,t){var r=0;var n=0;var i=t;while(n<i){var s=n++;var a=e.indexOf("/",r);if(a==-1){return o.None}else{var l=a;r=l+1}}return o.Some(HxOverrides.substr(e,r,null))};haxeshim_Fs.findNearest=function(e,t){while(true)if(sys_FileSystem.exists(""+t+"/"+e)){return o.Some(""+t+"/"+e)}else{var r=haxe_io_Path.directory(t);var n=r;if(t==n){return o.None}else{var i=r;t=i}}};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_HaxeInstallation=function(e,t,r){this.path=e;this.version=t;this.compiler=""+e+"/haxe"+haxeshim_HaxeInstallation.EXT;this.haxelib=""+e+"/haxelib"+haxeshim_HaxeInstallation.EXT;this.stdLib=""+e+"/std";this.haxelibRepo=r};haxeshim_HaxeInstallation.__name__=true;haxeshim_HaxeInstallation.prototype={env:function(){var e=u.ofVars({HAXE_STD_PATH:this.stdLib,HAXEPATH:this.path,HAXELIB_PATH:this.haxelibRepo,HAXE_VERSION:this.version});return u.mergeInto(e,haxeshim_Neko.ENV)},__class__:haxeshim_HaxeInstallation};var haxeshim_HaxelibCli=function(e){haxeshim_Neko.setEnv();this.scope=e;this.installation=e.haxeInstallation};haxeshim_HaxelibCli.__name__=true;haxeshim_HaxelibCli.exit=function(e){switch(e._hx_index){case 0:var t=e.data;process.exit(0);break;case 1:var r=e.failure;haxeshim_Exec.die(r.code,r.message);break}};haxeshim_HaxelibCli.exitWithCode=function(e){switch(e._hx_index){case 0:var t=e.data;process.exit(t);break;case 1:var r=e.failure;haxeshim_Exec.die(r.code,r.message);break}};haxeshim_HaxelibCli.main=function(){process.stdout.on("error",(function(){}));new haxeshim_HaxelibCli(haxeshim_Scope.seek()).dispatch(process.argv.slice(2))};haxeshim_HaxelibCli.prototype={callHaxelib:function(e){haxeshim_HaxelibCli.exitWithCode(haxeshim_Exec.sync(this.installation.haxelib,process.cwd(),e,this.installation.env()))},path:function(e){var t=[];var r=[];var i=0;while(i<e.length){var s=e[i];++i;var a=haxeshim_Args.getNdll(s);if(a._hx_index==0){var o=a.v;r.push("-L "+o)}else{t.push("-lib");t.push(s.split(":")[0])}}var l=(n=this.scope,$bind(n,n.resolve));var c=t;var u=haxeshim_Exec.gracefully((function(){return l(c)}));var h=0;while(h<u.length){var d=u[h];switch(d){case"--cwd":++h;break;case"-cp":r.push(haxe_io_Path.addTrailingSlash(u[++h]));break;case"-lib":var p=u[++h];var m=haxeshim_Args.getNdll(p);if(m._hx_index==0){var _=m.v;r.push("-L "+_)}else{var v=p;var y="Unexpected -lib "+v+" returned from haxelib path "+e.join(" ");process.stdout.write(Std.string(y));process.stdout.write("\n");process.exit(500)}break;default:var g=d;if(HxOverrides.cca(g,0)==45){r.push(""+g+" "+u[++h])}}++h}var w=r.join("\n");process.stdout.write(Std.string(w));process.exit(0)},run:function(e){var t=this;this.scope.getLibCommand(e).handle((function(r){switch(r._hx_index){case 0:var n=r.data;haxeshim_HaxelibCli.exit(n());break;case 1:var i=r.failure;var s=["run"].concat(e);t.callHaxelib(s);break}}))},runDir:function(e,t,r){var n=this;C.next(C.next(haxeshim_Fs.get(""+t+"/haxelib.json",{fileName:"haxeshim/HaxelibCli.hx",lineNumber:81,className:"haxeshim.HaxelibCli",methodName:"runDir"}),(function(e){try{return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(JSON.parse(e).main)))}catch(e){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Failure(tink_core_TypedError.withData(null,"failed to parse haxelib.json",e instanceof js__$Boot_HaxeError?e.val:e,{fileName:"haxeshim/HaxelibCli.hx",lineNumber:85,className:"haxeshim.HaxelibCli",methodName:"runDir"}))))}})),(function(i){if(i==null){var s=[""+t+"/run.n"].concat(r).concat([haxe_io_Path.removeTrailingSlashes(process.cwd())+"/"]);return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(haxeshim_Exec.sync("neko",t,s,u.ofVars({HAXELIB_RUN:"1",HAXELIB_LIBNAME:e}))))}else{var a=i;var o=n.installation.compiler;var l=o;if(sys_FileSystem.exists(l)){var c=["--run",i].concat(r).concat([haxe_io_Path.removeTrailingSlashes(process.cwd())+"/"]);return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(haxeshim_Exec.sync(l,t,c,u.ofVars({HAXELIB_RUN:"1",HAXELIB_LIBNAME:e}))))}else{var h=o;return haxeshim_Exec.die(404,'haxe compiler not found at the expected location "'+h+'"')}}})).handle(haxeshim_HaxelibCli.exitWithCode)},dispatch:function(e){switch(e[0]){case"path":this.path(e.slice(1));break;case"run":this.run(e.slice(1));break;case"run-dir":if(e.length<3){haxeshim_Exec.die(402,"Not enough arguments. Syntax is `haxelib run-dir <name> <path> <...args>")}var t=e.slice(1);var r=(n=this.scope,$bind(n,n.interpolate));var f1=function(e){return r(e)};var i=new Array(t.length);var s=0;var a=t.length;while(s<a){var o=s++;i[o]=f1(t[o])}e=i;var l=e.shift();var c=e.shift();this.runDir(l,c,e);break;default:this.callHaxelib(e)}},__class__:haxeshim_HaxelibCli};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 n;switch(e._hx_index){case 0:n=[i.Red];break;case 1:n=[i.Yellow];break;case 2:n=[i.DefaultForeground];break;case 3:n=[i.Green];break}r.writeString(ANSI.aset(n)+t+ANSI.aset([i.Off])+"\n")},error:function(e){this.log(p.Error,e)},info:function(e){this.log(p.Info,e)},success:function(e){this.log(p.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 p=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{m.accessSync(e);return true}catch(e){var t=e instanceof js__$Boot_HaxeError?e.val:e;return false}};sys_FileSystem.isDirectory=function(e){try{return m.statSync(e).isDirectory()}catch(e){var t=e instanceof js__$Boot_HaxeError?e.val:e;return false}};sys_FileSystem.createDirectory=function(e){try{m.mkdirSync(e)}catch(i){var t=i instanceof js__$Boot_HaxeError?i.val:i;if(t.code=="ENOENT"){sys_FileSystem.createDirectory(g.dirname(e));m.mkdirSync(e)}else{var r;try{r=m.statSync(e)}catch(e){var n=e instanceof js__$Boot_HaxeError?e.val:e;throw t}if(!r.isDirectory()){throw t}}}};sys_FileSystem.deleteDirectory=function(e){if(sys_FileSystem.exists(e)){var t=0;var r=m.readdirSync(e);while(t<r.length){var n=r[t];++t;var i=e+"/"+n;if(sys_FileSystem.isDirectory(i)){sys_FileSystem.deleteDirectory(i)}else{m.unlinkSync(i)}}m.rmdirSync(e)}};var m=r(7147);var _=t["tink.core.Outcome"]={__ename__:true,__constructs__:["Success","Failure"],Success:(n=function(e){return{_hx_index:0,data:e,__enum__:"tink.core.Outcome",toString:$estr}},n.__params__=["data"],n),Failure:(n=function(e){return{_hx_index:1,failure:e,__enum__:"tink.core.Outcome",toString:$estr}},n.__params__=["failure"],n)};var haxeshim_Scope=function(e,t,r,n){this.haxeshimRoot=e;this.isGlobal=t;this.scopeDir=r;this.scopeLibDir=""+r+"/haxe_libraries";this.cwd=n;this.configFile=""+r+"/"+haxeshim_Scope.CONFIG_FILE;this.versionDir=""+e+"/versions";this.haxelibRepo=""+e+"/haxelib";var i=process.env["HAXE_LIBCACHE"];var s=process.env["HAXESHIM_LIBCACHE"];var a;if(s==null){if(i==null){a=""+e+"/haxe_libraries"}else{var o=i;a=o}}else{var l=s;a=l}this.libCache=a};haxeshim_Scope.__name__=true;haxeshim_Scope.create=function(e,t){return haxeshim_Fs.save(""+e+"/"+haxeshim_Scope.CONFIG_FILE,d.ofString(JSON.stringify(t,null," ")),{fileName:"haxeshim/Scope.hx",lineNumber:194,className:"haxeshim.Scope",methodName:"create"})};haxeshim_Scope.exists=function(e){return sys_FileSystem.exists(""+e+"/"+haxeshim_Scope.CONFIG_FILE)};haxeshim_Scope.seek=function(e){if(e==null){e={}}var t;var r=e.cwd;if(r==null){t=process.cwd()}else{var n=r;t=n}var i;var s=e.startLookingIn;if(s==null){i=t}else{var a=s;i=a}var o;var l=e.haxeshimRoot;if(l==null){o=haxeshim_Scope.DEFAULT_ROOT}else{var c=l;o=c}var f=function(e,t,r,n){return new haxeshim_Scope(e,t,r,n)};var u=o;var h=t;var make=function(e,t){return f(u,e,t,h)};var d;var p=haxeshim_Fs.findNearest(haxeshim_Scope.CONFIG_FILE,g.resolve(i));switch(p._hx_index){case 0:var m=p.v;d=make(false,haxe_io_Path.directory(m));break;case 1:d=make(true,o);break}d.reload();return d};haxeshim_Scope.env=function(e){var t=process.env[e];if(t==null){return o.None}else if(t==""){return o.None}else{var r=t;return o.Some(r)}};haxeshim_Scope.prototype={reload:function(){var e;try{e=m.readFileSync(this.configFile,{encoding:"utf8"})}catch(e){throw new js__$Boot_HaxeError(this.isGlobal?"Global config file "+this.configFile+" does not exist or cannot be opened":"Unable to open file "+this.configFile+" because "+Std.string(e instanceof js__$Boot_HaxeError?e.val:e))}var t;try{t=JSON.parse(e)}catch(t){var r=t instanceof js__$Boot_HaxeError?t.val:t;new _$Sys_FileOutput(2).writeString("Invalid JSON in file "+this.configFile+":\n\n"+e+"\n\n");throw js__$Boot_HaxeError.wrap(r)}this.setConfig(t)},setConfig:function(e){if(e.version==null){throw new js__$Boot_HaxeError("No version set in "+this.configFile)}if(e.resolveLibs==null){e.resolveLibs=this.isGlobal?"mixed":"scoped"}var t=e.resolveLibs;switch(t){case"haxelib":case"mixed":case"scoped":break;default:var r=t;throw new js__$Boot_HaxeError("invalid value "+r+" for `resolveLibs` in "+this.configFile)}this.config=e;this.haxeInstallation=this.getInstallation(e.version)},getVar:function(e){var t=process.env[e];if(t==null){return this.getDefault(e)}else if(t==""){return this.getDefault(e)}else{var r=t;return r}},getDefault:function(e){switch(e){case"CWD":return this.cwd;case"HAXESHIM_LIBCACHE":case"HAXE_LIBCACHE":return this.libCache;case"SCOPE_DIR":return this.scopeDir;default:return null}},reconfigure:function(e){var t=this;return C.next(haxeshim_Fs.save(this.configFile,d.ofString(JSON.stringify(e,null," ")),{fileName:"haxeshim/Scope.hx",lineNumber:201,className:"haxeshim.Scope",methodName:"reconfigure"}),(function(r){t.setConfig(e);return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(r)))}))},path:function(e){if(haxe_io_Path.isAbsolute(e)){return o.Some(e)}else if(StringTools.startsWith(e,"./")||StringTools.startsWith(e,"../")){return o.Some(""+this.cwd+"/"+e)}else{return o.None}},getInstallation:function(e){var t=this.path(e);switch(t._hx_index){case 0:var r=t.v;return new haxeshim_HaxeInstallation(r,e,this.haxelibRepo);case 1:return new haxeshim_HaxeInstallation(""+this.versionDir+"/"+e,e,this.haxelibRepo)}},resolveThroughHaxelib:function(e){var t=this.haxeInstallation.haxelib;var r=this.cwd;var n=[];var i=0;while(i<e.length){var s=e[i];++i;n.push(s.val)}var a=haxeshim_Exec.eval(t,r,["path"].concat(n),this.haxeInstallation.env());switch(a._hx_index){case 0:var o=a.data;var l;var c=o.stderr;if(o.status==0){var u=o.stdout;return tink_core_OutcomeTools.map(haxeshim_Args.fromMultilineString(u,"haxelib path",$bind(this,this.getVar),true),(function(e){var t=0;var r=e.length;while(t<r){var n=t++;if(e[n].val=="-L"){var set=function(t,r){var n=e[t].pos;var i=r(e[t].val);e[t]={pos:n,val:i}};set(n,(function(e){return"-lib"}));set(n+1,(function(e){return"ndll:"+e}))}}return e}))}else{l=new tink_core_TypedError(o.status,o.stdout+o.stderr,{fileName:"haxeshim/Scope.hx",lineNumber:248,className:"haxeshim.Scope",methodName:"resolveThroughHaxelib"});var d=l;var p=new haxeshim_Errors;p.fail(d.message,h.Custom("haxelib path"),d.code);return p.produce([])}break;case 1:var m=a.failure;var _=new haxeshim_Errors;_.fail(m.message,h.Custom("haxelib path"),m.code);return _.produce([])}},interpolate:function(e,t){var r=this;var n;if(t==null){n=$bind(this,this.getVar)}else{var i=t;n=function(e){var t=i(e);if(t==null){return r.getVar(e)}else{var n=t;return n}}}return tink_core_OutcomeTools.sure(haxeshim_Args.interpolate(e,n))},parseDirectives:function(e){var t=new haxe_ds_StringMap;var r=0;var n=e.split("\n");var i=StringTools.trim;var s=new Array(n.length);var a=0;var o=n.length;while(a<o){var l=a++;s[l]=i(n[l])}var c=s;while(r<c.length){var u=c[r];++r;if(StringTools.startsWith(u,"#")){var h=StringTools.ltrim(HxOverrides.substr(u,1,null));if(StringTools.startsWith(h,"@")){var d=h.indexOf(":");if(d!=-1){var p=d;var m=h.substring(1,p);var _;var v=Y[m]!=null?t.getReserved(m):t.h[m];if(v==null){var y=[];if(Y[m]!=null){t.setReserved(m,y)}else{t.h[m]=y}_=y}else{var g=v;_=g}_.push(this.interpolate(StringTools.ltrim(HxOverrides.substr(h,p+1,null))))}}}}return t},libHxml:function(e){return""+this.scopeLibDir+"/"+e+".hxml"},getDirectives:function(e){return C.next(haxeshim_Fs.get(this.libHxml(e),{fileName:"haxeshim/Scope.hx",lineNumber:286,className:"haxeshim.Scope",methodName:"getDirectives"}),B.ofSafeSync($bind(this,this.parseDirectives)))},getLibCommand:function(e){var t=this;var r=[];var n=0;while(n<e.length){var i=e[n];++n;r.push(this.interpolate(i))}e=r;var s=e.shift();return C.next(this.getDirectives(s),(function(r){var n=Y["run"]!=null?r.getReserved("run"):r.h["run"];if(n==null){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Failure(new tink_core_TypedError(null,"no @run directive found for library "+s,{fileName:"haxeshim/Scope.hx",lineNumber:295,className:"haxeshim.Scope",methodName:"getLibCommand"}))))}else{switch(n.length){case 0:return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Failure(new tink_core_TypedError(null,"no @run directive found for library "+s,{fileName:"haxeshim/Scope.hx",lineNumber:295,className:"haxeshim.Scope",methodName:"getLibCommand"}))));case 1:var i=n[0];var a=[t.interpolate(i)];var o=haxeshim_Os.IS_WINDOWS?function(e){return haxe_SysTools.quoteWinArg(e,true)}:haxe_SysTools.quoteUnixArg;var l=new Array(e.length);var c=0;var u=e.length;while(c<u){var h=c++;l[h]=o(e[h])}var d=a.concat(l).join(" ");var p=process.cwd();var m=t.haxeInstallation.env();return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success((function(){return haxeshim_Exec.shell(d,p,m)}))));default:return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Failure(new tink_core_TypedError(null,"more than one @run directive for library "+s,{fileName:"haxeshim/Scope.hx",lineNumber:300,className:"haxeshim.Scope",methodName:"getLibCommand"}))))}}}))},resolveArgs:function(e){var t=this.cwd;var resolvePath=function(e){if(haxe_io_Path.isAbsolute(e)){return e}else{return haxe_io_Path.join([t,e])}};t=resolvePath(e.cwd);var r=[];var n=[];var i=new haxeshim_Errors;var s=[];var a=[];var o=[];var l=0;e:while(l<e.args.length){var c=e.args[l++];switch(c.val){case"--run":o=e.args.slice(l-1);break e;case"--connect":case"--display":case"--server-connect":case"--server-listen":a.push(c);var u=e.args[l++];if(u==null){i.fail(""+c.val+" requires argument",c.pos)}else{var h=u;a.push(h)}break;case"--wait":a.push(c);break;default:s.push(c)}}var d=new haxe_ds_StringMap;e:while(s.length>0){var p=[s.shift()];var m=function(e){return function(t){i.fail(t,e[0].pos)}}(p);var _=p[0].val;switch(_){case"--connect":case"--cwd":case"--each":case"--next":case"--run":case"--wait":case"-C":var v=_;if(StringTools.endsWith(v,".hxml")){s=haxeshim_Args.readHxml(resolvePath(v),haxeshim_Scope.fs,$bind(this,this.getVar),i,p[0].pos).concat(s)}else{var y=_;m(""+y+" not allowed here");break e}break;case"--lib":case"-L":case"-lib":var g=s.shift();var w;if(g==null){m("-lib requires argument")}else{w=haxeshim_Args.getNdll(g.val);if(w._hx_index==0){var b=w.v;var S=g;r.push(p[0]);r.push(S)}else{var x=g;var E=x.val;if(!(Y[E]!=null?d.getReserved(E):d.h[E])){var R=x.val;if(Y[R]!=null){d.setReserved(R,true)}else{d.h[R]=true}var O=this.config.resolveLibs;var N;if(O=="haxelib"){n.push(x)}else{N=O=="mixed";var k=N;var A=this.libHxml(x.val);var I=haxeshim_Scope.fs.readFile(A);switch(I._hx_index){case 0:var F=I.data;var T=haxeshim_Args.fromMultilineString(F,A,$bind(this,this.getVar));s=i.getResult(T).concat(s);break;case 1:var L=I.failure;if(sys_FileSystem.exists(A)){m(L)}else if(k){n.push(x)}else{m("-lib "+x.val+" is missing "+A)}break}}}}}break;default:var D=_;if(StringTools.endsWith(D,".hxml")){s=haxeshim_Args.readHxml(resolvePath(D),haxeshim_Scope.fs,$bind(this,this.getVar),i,p[0].pos).concat(s)}else{r.push(p[0])}}}var C=a.concat(r);var B=this.resolveThroughHaxelib(n);r=C.concat(i.getResult(B)).concat(o);return i.produce(new haxeshim_ResolvedArgs(t,r))},resolve:function(e){var t=[];var r=new haxeshim_Errors;var n=0;var i=r.getResult(haxeshim_Args.split(e,this.cwd,haxeshim_Scope.fs,$bind(this,this.getVar)));while(n<i.length){var s=i[n];++n;if(s.args.length>0){if(t.length!=0){t.push("--next")}if(s.cwd!=this.cwd){t.push("--cwd");t.push(s.cwd)}var a=0;var o=r.getResult(this.resolveArgs(s)).args;while(a<o.length){var l=o[a];++a;t.push(l.val)}}}var c=r.produce(42);if(c._hx_index==1){var u;u=c.failure.errors[0];var h=u;process.stdout.write(Std.string(h.message));process.stdout.write("\n");var d;var p=h.code;if(p==null){d=500}else{var m=p;d=m}process.exit(d)}return t},__class__:haxeshim_Scope};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 n=r[e];++e;var i=u.get(haxeshim_Neko.ENV,n);process.env[n]=i}}haxeshim_Neko.isset=false}};var haxeshim_ResolvedArgs=function(e,t){haxeshim_Args.call(this,e,t)};haxeshim_ResolvedArgs.__name__=true;haxeshim_ResolvedArgs.__super__=haxeshim_Args;haxeshim_ResolvedArgs.prototype=$extend(haxeshim_Args.prototype,{__class__:haxeshim_ResolvedArgs});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.wrap=function(e){if(e instanceof Error){return e}else{return new js__$Boot_HaxeError(e)}};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 n=new Uint8Array(r.byteLength);n.set(r);return n.buffer};var v=r(3685);var y=r(5687);var g=r(1017);var w=r(7310);var b=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 S=r(2781).PassThrough;var lix_cli_Command=function(){};lix_cli_Command.__name__=true;lix_cli_Command.attempt=function(e,t){var r=M.ofSync(lix_cli_Command.reportError);var n=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 n=e.failure;return r(n)}}));n.gather().handle(t)};lix_cli_Command.reportError=function(e){haxeshim_Logger.get().error(e.message);process.exit(e.code);return null};var lix_cli_HaxeCmd=function(){};lix_cli_HaxeCmd.__name__=true;lix_cli_HaxeCmd.ensureScope=function(){if(haxeshim_Scope.exists(haxeshim_Scope.DEFAULT_ROOT)){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(L.Noise)))}else{return haxeshim_Scope.create(haxeshim_Scope.DEFAULT_ROOT,{version:"stable",resolveLibs:"mixed"})}};lix_cli_HaxeCmd.ensure=function(e){return C.next(lix_cli_HaxeCmd.ensureScope(),(function(t){var r=haxeshim_Scope.seek();var n=new lix_client_haxe_Switcher(r,e);var i;if(!sys_FileSystem.exists(n.scope.haxeInstallation.path)){var s=n.scope.config.version;e.info("Version "+s+" configured in "+n.scope.configFile+" does not exist. Attempting download ...");i=n.install(s,{force:false})}else{i=new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(L.Noise)))}return C.next(i,(function(e){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(L.Noise)))}))}))};var lix_cli_HaxelibCmd=function(){};lix_cli_HaxelibCmd.__name__=true;lix_cli_HaxelibCmd.ensure=function(e){return C.next(lix_cli_NekoCmd.ensure(e),(function(t){return lix_cli_HaxeCmd.ensure(e)}))};lix_cli_HaxelibCmd.main=function(){lix_cli_Command.attempt(lix_cli_HaxelibCmd.ensure(haxeshim_Logger.get()),F.fromNiladic(haxeshim_HaxelibCli.main))};var lix_cli_NekoCmd=function(){};lix_cli_NekoCmd.__name__=true;lix_cli_NekoCmd.ensure=function(e){return lix_client_haxe_Switcher.ensureNeko(e)};var x=r(8781);var lix_client_Download=function(){};lix_client_Download.__name__=true;lix_client_Download.text=function(e){return C.next(lix_client_Download.bytes(e),(function(e){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(e.toString())))}))};lix_client_Download.bytes=function(e){return lix_client_Download.download(e,(function(e,t,r){lix_client_Download.buffered(t).handle(r)}))};lix_client_Download.buffered=function(e){return D.async((function(t){var r=[];e.on("data",$bind(r,$arrayPush));e.on("end",(function(){var e=_.Success(js_node_buffer__$Buffer_Helper.bytesOfBuffer(b.concat(r)));t(e)}))}))};lix_client_Download.archive=function(e,t,r,n){var i=lix_client_Download.withLogger(n,(function(n,i,s){if(i.headers["content-type"]=="application/zip"||StringTools.endsWith(e,".zip")||StringTools.endsWith(n,".zip")){lix_client_Download.unzip(e,r,t,i,s)}else{lix_client_Download.untar(e,r,t,i,s)}}));return lix_client_Download.download(e,i)};lix_client_Download.unzip=function(e,t,n,i,s){C.next(lix_client_Download.buffered(i),(function(i){return D.async((function(a){var o=i.length-4;while(o-- >0)if(i.b[o]==80&&i.b[o+1]==75&&i.b[o+2]==5&&i.b[o+3]==6){i.b[o+20]=0;i.b[o+21]=0;i=i.sub(0,o+22);break}if(o==0){var l=_.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"}));a(l);return}var c=i.b;x.fromBuffer(b.from(c.buffer,c.byteOffset,i.length),(function(i,o){var l=-1;var done=function(){l+=1;s.onProgress(l,o.entryCount,false);if(l==o.entryCount){var e=a;var r=_.Success(t);haxe_Timer.delay((function(){e(r)}),100)}};if(i!=null){var c=_.Failure(new tink_core_TypedError(422,"Failed to unzip "+e+" because "+Std.string(i),{fileName:"src/lix/client/Download.hx",lineNumber:83,className:"lix.client.Download",methodName:"unzip"}));a(c)}o.on("entry",(function(e){var i=haxeshim_Fs.peel(lix_client_Download.stripLeadingSlashes(e.fileName),n);switch(i._hx_index){case 0:var s=i.v;var a=""+t+"/"+s;if(StringTools.endsWith(a,"/")){done()}else{haxeshim_Fs.ensureDir(a).eager();o.openReadStream(e,(function(e,t){var n=r(7758).createWriteStream(a);t.pipe(n,{end:true});n.on("close",done)}))}break;case 1:break}}));o.on("end",(function(){o.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,n,i,s){return D.async((function(e){var a=0;var o=0;var l=[];var update=function(){s.onProgress(o,a+1,true)};var c=1;var done=function(r){if(r==null){r=0}o+=r;update();haxe_Timer.delay((function(){if((c-=1)<=0){s.onProgress(a,a,true);var r=[];var n=0;while(n<l.length){var i=[l[n]];++n;r.push(D.async(function(e){return function(t){m.unlink(e[0].to,function(e){return function(r){m.symlink(e[0].from,e[0].to,function(){return function(e){var r=e==null?_.Success(L.Noise):_.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))}}(i)))}C.next(C.inParallel(r),(function(e){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.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(_.Failure(u))};lix_client_uncompress_Tar.parse(i,(function(i){if(u!=null){return}a+=i.size;update();var skip=function(){i.on("data",(function(){}))};var s=haxeshim_Fs.peel(lix_client_Download.stripLeadingSlashes(i.path),n);switch(s._hx_index){case 0:var o=s.v;var h=""+t+"/"+o;if(StringTools.endsWith(h,"/")){skip()}else{haxeshim_Fs.ensureDir(h).handle((function(t){if(t._hx_index==1){var n=t.failure;u=n;e(_.Failure(u))}else if(i.type=="SymbolicLink"){skip();l.push({from:i.linkpath,to:h})}else{c+=1;var s=new S;var a=r(7758).createWriteStream(h,{mode:i.mode});i.pipe(s,{end:true});s.pipe(a,{end:true});var o=done;var d=i.size;a.on("close",(function(){o(d)}))}}))}break;case 1:skip();break}})).handle((function(t){if(t._hx_index==1){var r=t.failure;e(_.Failure(r))}else{done()}}))})).handle($bind(s,s.done))};lix_client_Download.tar=function(e,t,r,n){var i=r;var s=t;return lix_client_Download.download(e,lix_client_Download.withLogger(n,(function(e,t,r){return lix_client_Download.untar(e,i,s,t,r)})))};lix_client_Download.zip=function(e,t,r,n){var i=r;var s=t;return lix_client_Download.download(e,lix_client_Download.withLogger(n,(function(e,t,r){lix_client_Download.unzip(e,i,s,t,r)})))};lix_client_Download.withLogger=function(e,t){return function(r,n,i){var s=Std.parseInt(n.headers["content-length"]);var a=0;var o=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 n=t;r=""+n+".0"}else{var i=t;r=i}return StringTools.lpad(r," ",5)+"%"};var u=new Date(0).getTime();var update=function(){if(!(o==l||o/l>=1)){var e=(new Date).getTime();if(e>u+137){u=e;var t=[];if(a<s){t.push("Downloaded: "+pct(a/s))}if(o>0){t.push("Saved: "+pct(o/l))}var r=" "+t.join(" ");progress(r)}}};n.on("data",(function(e){a+=e.length;update()}));var h=0;t(r,n,{onProgress:function(e,t,r){o=e;l=t;if(r){var n=a/s;var i=o/l;var c=n*i;if(c<h){c=h}h=c;o=Math.round(c*1e3);l=1e3}update()},done:function(t){e.success("-> Done!");i(t)}})}};lix_client_Download.download=function(e,t){return D.async((function(r){var n=w.parse(e);n.agent=false;if(n.headers==null){n.headers={}}n.headers["user-agent"]=lix_client_Download.USER_AGENT;var fail=function(t){var n=_.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(n)};var i=StringTools.startsWith(e,"https:")?y.get(n):v.get(n);i.setTimeout(3e4);i.on("error",fail);i.on("response",(function(i){if(i.statusCode>=400){var s=_.Failure(tink_core_TypedError.withData(i.statusCode,i.statusMessage,i,{fileName:"src/lix/client/Download.hx",lineNumber:304,className:"lix.client.Download",methodName:"download"}));r(s)}else{var a=i.headers["location"];if(a==null){i.on("error",fail);t(e,i,(function(e){switch(e._hx_index){case 0:var t=e.data;r(_.Success(t));break;case 1:var n=e.failure;r(_.Failure(n));break}}))}else{var o=a;var l=w.parse(o);var c=l.slashes;var u=l.search;var h=l.query;var d=l.port;var p=l.pathname;var m=l.path;var v=l.href;var y=l.hostname;var g=l.host;var b=l.hash;var S=l.auth;lix_client_Download.download(l.protocol==null?n.protocol+"//"+n.host+o:o,t).handle(r)}}}))}))};var E={};E.__name__=true;E.get_isPrerelease=function(e){return e.indexOf("-")!=-1};E.isNumber=function(e){return new EReg("^[0-9]*$","").match(e)};E.fragment=function(e,t){if(E.isNumber(e)&&E.isNumber(t)){return Std.parseInt(e)-Std.parseInt(t)}else{return Reflect.compare(e,t)}};E.compare=function(e,t){var r=e.split("-");var n=t.split("-");var i=0;while(i<r.length&&i<n.length){var s=r[i].split(".");var a=n[i++].split(".");var o=0;while(o<s.length&&o<a.length){var l=E.fragment(s[o],a[o]);if(l==0){++o}else{var c=l;return-c}}var u=s.length-a.length;if(u!=0){var h=u;return-h}}return(r.length-n.length)*(i==1?1:-1)};var R=t["lix.client.haxe.ResolvedUserVersionData"]={__ename__:true,__constructs__:["RNightly","ROfficial","RCustom"],RNightly:(n=function(e){return{_hx_index:0,nightly:e,__enum__:"lix.client.haxe.ResolvedUserVersionData",toString:$estr}},n.__params__=["nightly"],n),ROfficial:(n=function(e){return{_hx_index:1,version:e,__enum__:"lix.client.haxe.ResolvedUserVersionData",toString:$estr}},n.__params__=["version"],n),RCustom:(n=function(e){return{_hx_index:2,path:e,__enum__:"lix.client.haxe.ResolvedUserVersionData",toString:$estr}},n.__params__=["path"],n)};var O={};O.__name__=true;O.get_id=function(e){switch(e._hx_index){case 0:var t=e.nightly;var r=t.published;var n=t.file;var i=t.development;var s=t.hash;return s;case 1:var a=e.version;return a;case 2:var o=e.path;return o}};O.toString=function(e){return k.toString(k.ofResolved(e))};var N=t["lix.client.haxe.PickOfficial"]={__ename__:true,__constructs__:["StableOnly","IncludePrereleases"],StableOnly:{_hx_index:0,__enum__:"lix.client.haxe.PickOfficial",toString:$estr},IncludePrereleases:{_hx_index:1,__enum__:"lix.client.haxe.PickOfficial",toString:$estr}};var lix_client_haxe_Switcher=function(e,t){this.scope=e;this.logger=t;haxeshim_Fs.ensureDir(haxe_io_Path.addTrailingSlash(e.versionDir)).eager();haxeshim_Fs.ensureDir(haxe_io_Path.addTrailingSlash(e.haxelibRepo)).eager();haxeshim_Fs.ensureDir(this.downloads=e.haxeshimRoot+"/downloads/").eager()};lix_client_haxe_Switcher.__name__=true;lix_client_haxe_Switcher.linkToNightly=function(e,t,r){if(r==null){var n=lix_client_haxe_Switcher.PLATFORM=="windows"&&t.getTime()>14944608e5?"zip":"tar.gz";r=DateTools.format(t,"haxe_%Y-%m-%d_development_"+e+"."+n)}return DateTools.format(t,""+lix_client_haxe_Switcher.NIGHTLIES+"/"+lix_client_haxe_Switcher.PLATFORM+"/"+r)};lix_client_haxe_Switcher.sortedOfficial=function(e,t){if(e==N.StableOnly){var r=[];var n=0;while(n<t.length){var i=t[n];++n;if(!E.get_isPrerelease(i)){r.push(i)}}t=r}t.sort(E.compare);return t};lix_client_haxe_Switcher.officialOnline=function(e){return C.next(lix_client_Download.text("https://haxe.org/website-content/downloads/versions.json"),(function(t){var r=JSON.parse(t).versions.map((function(e){return e.version}));return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(lix_client_haxe_Switcher.sortedOfficial(e,r))))}))};lix_client_haxe_Switcher.sortedNightlies=function(e){e.sort((function(e,t){return Reflect.compare(t.published.getTime(),e.published.getTime())}));return e};lix_client_haxe_Switcher.nightliesOnline=function(){return C.next(lix_client_Download.text(""+lix_client_haxe_Switcher.NIGHTLIES+"/"+lix_client_haxe_Switcher.PLATFORM+"/"),B.ofSafeSync((function(e){var t=e.split("------------------\n").pop().split("\n");var r=[];var parseDate=function(e){try{return o.Some(HxOverrides.strDate(e))}catch(e){var t=e instanceof js__$Boot_HaxeError?e.val:e;return o.None}};var n=0;while(n<t.length){var i=t[n];++n;var s=StringTools.trim(i).split('<a href="');if(s.length==2){var a=s[1];var l=parseDate(s[0].split(" ")[0]);if(l._hx_index==0){var c;c=a.split('"')[0];var u=c;var h=l.v;var d=u.split(".")[0].split("_").pop();if(d==null){var p=d;r.push({hash:p,file:u,development:u.indexOf("_development_")!=-1,published:h})}else if(d!="latest"){var m=d;r.push({hash:m,file:u,development:u.indexOf("_development_")!=-1,published:h})}}}}return lix_client_haxe_Switcher.sortedNightlies(r)})))};lix_client_haxe_Switcher.attempt=function(e,t){try{return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(t.get())))}catch(t){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Failure(new tink_core_TypedError(null,"Failed to "+e+" because "+Std.string(t instanceof js__$Boot_HaxeError?t.val:t),{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:107,className:"lix.client.haxe.Switcher",methodName:"attempt"}))))}};lix_client_haxe_Switcher.pickFirst=function(e,t,r){if(r==null){return lix_client_haxe_Switcher.pickFirst(e,t,(function(e){return true}))}else{return function(n){var i=$getIterator(n);while(i.hasNext()){var s=i.next();if(r(s)){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(t(s))))}}return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Failure(new tink_core_TypedError(404,"No "+e+" build found",{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:141,className:"lix.client.haxe.Switcher",methodName:"pickFirst"}))))}}};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(_.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 n=process.arch;switch(Sys.systemName()){case"Mac":var i=getUrl("osx-universal.tar.gz");r=function(e,t,r){return lix_client_Download.tar(i,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(n=="arm64"){var a=getUrl("linux-arm64.tar.gz");r=function(e,t,r){return lix_client_Download.tar(a,e,t,r)}}else{var o=getUrl("linux64.tar.gz");r=function(e,t,r){return lix_client_Download.tar(o,e,t,r)}}}return C.next(r(1,t,e),(function(t){e.success("done");return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(t)))}))}};lix_client_haxe_Switcher.prototype={officialInstalled:function(e){var t=[];var r=0;var n=m.readdirSync(this.scope.versionDir);while(r<n.length){var i=n[r];++r;if(!k.isHash(i)&&sys_FileSystem.isDirectory(this.versionDir(i))){t.push(i)}}return lix_client_haxe_Switcher.attempt("Get installed Haxe versions",new tink_core__$Lazy_LazyConst(lix_client_haxe_Switcher.sortedOfficial(e,t)))},nightliesInstalled:function(){var e=[];var t=0;var r=k.isHash;var n=[];var i=0;var s=m.readdirSync(this.scope.versionDir);while(i<s.length){var a=s[i];++i;if(r(a)){n.push(a)}}var o=n;while(t<o.length){var l=o[t];++t;e.push({hash:l,published:HxOverrides.strDate(JSON.parse(m.readFileSync(""+this.versionDir(l)+"/"+lix_client_haxe_Switcher.VERSION_INFO,{encoding:"utf8"})).published)})}return lix_client_haxe_Switcher.attempt("get installed Haxe versions",new tink_core__$Lazy_LazyConst(lix_client_haxe_Switcher.sortedNightlies(e)))},switchTo:function(e){if(O.get_id(e)==this.scope.config.version){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(L.Noise)))}else{return this.scope.reconfigure({version:O.get_id(e),resolveLibs:this.scope.config.resolveLibs})}},resolveInstalled:function(e){return this.resolve(e,$bind(this,this.officialInstalled),$bind(this,this.nightliesInstalled))},resolveOnline:function(e){return this.resolve(e,lix_client_haxe_Switcher.officialOnline,lix_client_haxe_Switcher.nightliesOnline)},resolve:function(e,t,r){switch(e._hx_index){case 0:return C.next(r(),lix_client_haxe_Switcher.pickFirst("nightly",R.RNightly,(function(e){return e.development!=false})));case 1:return C.next(t(N.IncludePrereleases),lix_client_haxe_Switcher.pickFirst("official",R.ROfficial));case 2:return C.next(t(N.StableOnly),lix_client_haxe_Switcher.pickFirst("stable",R.ROfficial));case 3:var n=e.hash;return C.ofSpecific(C.next(r(),(function(e){var t=$getIterator(e);while(t.hasNext()){var r=t.next();if(r.hash==n){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(R.RNightly(r))))}}return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Failure(new tink_core_TypedError(404,"Unable to resolve nightly version "+n+" locally, install it first with `lix install haxe "+n+"`",{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:166,className:"lix.client.haxe.Switcher",methodName:"resolve"}))))})));case 4:var i=e.version;return C.ofSpecific(C.next(t(N.IncludePrereleases),(function(e){if(Lambda.has(e,i)){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(R.ROfficial(i))))}else{return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Failure(new tink_core_TypedError(404,"Unable to resolve version "+i+" locally, install it first with `lix install haxe "+i+"`",{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:174,className:"lix.client.haxe.Switcher",methodName:"resolve"}))))}})));case 5:var s=e.path;return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(R.RCustom(s))))}},versionDir:function(e){return this.scope.getInstallation(e).path},isDownloaded:function(e){return sys_FileSystem.exists(this.versionDir(O.get_id(e)))},linkToOfficial:function(e){var t="https://haxe.org/website-content/downloads/"+e+"/downloads/haxe-"+e+"-";var r;switch(Sys.systemName()){case"Mac":r="osx.tar.gz";break;case"Windows":var n="";r="win"+n+".zip";break;default:r=e<"3"?"linux.tar.gz":"linux64.tar.gz"}return t+r},replace:function(e,t,r,n){var i=t;while(true){var s=haxeshim_Fs.ls(t);if(s.length==1){var a=s[0];t=a}else{break}}if(n!=null){n(t)}if(sys_FileSystem.exists(e)){var o=""+this.downloads+"/"+r+"@"+Math.floor(m.statSync(e).ctime.getTime());m.renameSync(e,o);m.renameSync(t,e)}else{m.renameSync(t,e)}if(sys_FileSystem.exists(i)){haxeshim_Fs.delete(i)}},install:function(e,t){return C.next(this.resolveAndDownload(e,t),$bind(this,this.switchTo))},resolveAndDownload:function(e,t){var r=this;var n;var i=k.ofString(e);if(i._hx_index==4){var s=i.version;n=this.resolveInstalled(k.ofString(e))}else{n=new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Failure(new tink_core_TypedError(null,""+e+" needs to be resolved online",{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:251,className:"lix.client.haxe.Switcher",methodName:"resolveAndDownload"}))))}var f=function(t){r.logger.info('Looking up Haxe version "'+e+'" online');return C.next(r.resolveOnline(k.ofString(e)),(function(e){r.logger.info(" Resolved to "+O.toString(e)+". Downloading ...");return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(e)))}))};var a=n.flatMap((function(e){switch(e._hx_index){case 0:var t=e.data;return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(e));case 1:var r=e.failure;return f(r)}}));return C.next(a.gather(),(function(e){return C.next(r.download(e,t),(function(t){r.logger.success(!t?" ... already downloaded!":" ... download complete!");return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(e)))}))}))},download:function(e,t){var r=this;var getDownloadDir=function(e){return""+r.downloads+"/"+e+"@"+Math.floor((new Date).getTime())+"_"+process.pid};if(this.isDownloaded(e)==true){if(t.force!=true){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(false)))}else{switch(e._hx_index){case 0:var n=e.nightly;var i=n.development;var s=n.published;var a=n.hash;var o=n.file;var l=lix_client_haxe_Switcher.linkToNightly(a,s,o);var c=getDownloadDir(a);r.logger.info("Downloading Haxe: "+O.toString(e));return C.next(lix_client_Download.archive(l,0,c,r.logger),(function(e){var t=r.versionDir(a);r.replace(t,e,a,(function(e){m.writeFileSync(""+e+"/"+lix_client_haxe_Switcher.VERSION_INFO,JSON.stringify({published:HxOverrides.dateStr(s)}))}));return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(true)))}));case 1:var u=e.version;var h=this.linkToOfficial(u);var d=getDownloadDir(u);r.logger.info("Downloading Haxe: "+O.toString(e));return C.next(lix_client_Download.archive(h,0,d,r.logger),(function(e){var t=r.versionDir(u);r.replace(t,e,u);return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(true)))}));case 2:var p=e.path;return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Failure(new tink_core_TypedError(null,"Cannot download custom version",{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:290,className:"lix.client.haxe.Switcher",methodName:"download"}))))}}}else{switch(e._hx_index){case 0:var v=e.nightly;var y=v.development;var g=v.published;var w=v.hash;var b=v.file;var S=lix_client_haxe_Switcher.linkToNightly(w,g,b);var x=getDownloadDir(w);r.logger.info("Downloading Haxe: "+O.toString(e));return C.next(lix_client_Download.archive(S,0,x,r.logger),(function(e){var t=r.versionDir(w);r.replace(t,e,w,(function(e){m.writeFileSync(""+e+"/"+lix_client_haxe_Switcher.VERSION_INFO,JSON.stringify({published:HxOverrides.dateStr(g)}))}));return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(true)))}));case 1:var E=e.version;var R=this.linkToOfficial(E);var N=getDownloadDir(E);r.logger.info("Downloading Haxe: "+O.toString(e));return C.next(lix_client_Download.archive(R,0,N,r.logger),(function(e){var t=r.versionDir(E);r.replace(t,e,E);return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(true)))}));case 2:var k=e.path;return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Failure(new tink_core_TypedError(null,"Cannot download custom version",{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:290,className:"lix.client.haxe.Switcher",methodName:"download"}))))}}},__class__:lix_client_haxe_Switcher};var k={};k.__name__=true;k.ofResolved=function(e){switch(e._hx_index){case 0:var t=e.nightly;var r=t.published;var n=t.file;var i=t.development;var s=t.hash;return A.UNightly(s);case 1:var a=e.version;return A.UOfficial(a);case 2:var o=e.path;return A.UCustom(o)}};k.isHash=function(e){var t=0;var r=e.length;while(t<r){var n=t++;var i=k.hex;var s=e.charCodeAt(n);if(!i.h[s]){return false}}return true};k.toString=function(e){switch(e._hx_index){case 0:return"latest nightly build";case 1:return"latest official";case 2:return"latest stable release";case 3:var t=e.hash;return"nightly build "+t;case 4:var r=e.version;return"official release "+r;case 5:var n=e.path;return"custom version at `"+n+"`"}};k.isPath=function(e){if(!haxe_io_Path.isAbsolute(e)){return e.charAt(0)=="."}else{return true}};k.ofString=function(e){if(e==null){return null}else{var t;var r;if(e==null){t=k.isHash(e);if(t==true){return A.UNightly(e)}else{r=k.isPath(e);if(r==true){return A.UCustom(e)}else{return A.UOfficial(e)}}}else{switch(e){case"auto":return null;case"latest":return A.ULatest;case"edge":case"nightly":return A.UEdge;case"stable":return A.UStable;default:t=k.isHash(e);if(t==true){return A.UNightly(e)}else{r=k.isPath(e);if(r==true){return A.UCustom(e)}else{return A.UOfficial(e)}}}}}};var A=t["lix.client.haxe.UserVersionData"]={__ename__:true,__constructs__:["UEdge","ULatest","UStable","UNightly","UOfficial","UCustom"],UEdge:{_hx_index:0,__enum__:"lix.client.haxe.UserVersionData",toString:$estr},ULatest:{_hx_index:1,__enum__:"lix.client.haxe.UserVersionData",toString:$estr},UStable:{_hx_index:2,__enum__:"lix.client.haxe.UserVersionData",toString:$estr},UNightly:(n=function(e){return{_hx_index:3,hash:e,__enum__:"lix.client.haxe.UserVersionData",toString:$estr}},n.__params__=["hash"],n),UOfficial:(n=function(e){return{_hx_index:4,version:e,__enum__:"lix.client.haxe.UserVersionData",toString:$estr}},n.__params__=["version"],n),UCustom:(n=function(e){return{_hx_index:5,path:e,__enum__:"lix.client.haxe.UserVersionData",toString:$estr}},n.__params__=["path"],n)};var lix_client_uncompress_Tar=function(){};lix_client_uncompress_Tar.__name__=true;lix_client_uncompress_Tar.parse=function(e,t){return D.async((function(r){var n=0;var i=0;var s=new I({onentry:function(e){n+=1;t(e)}});s.on("warn",(function(){i+=1}));s.on("end",(function(){var e=n==0&&i!=0?_.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"})):_.Success(L.Noise);r(e)}));s.on("error",(function(e){var t=_.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 I=r(4674).Parse;var F={};F.__name__=true;F.invoke=function(e,t){if(F.depth<500){F.depth++;e(t);F.depth--}else{var r=e;var f=function(e){F.invoke(r,e)};var n=t;F.defer((function(){f(n)}))}};F.fromNiladic=function(e){return e};F.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 T={};T.__name__=true;T.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 n=e;var i=t;var tmp=function(){r(n,i);return};this.queue.push(tmp)}else{this.busy=true;var s=this.cells.length;var a=0;var o=s;while(a<o){var l=a++;var c=this.cells[l];if(c.list!=null){F.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 v=u;while(_<v){var y=_++;this.cells[y]=this.cells[s+y]}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 n=t++;var i=this.cells[n];var s=i.list;if(i.cb!=null){var a=i;if(e!=n){this.cells[e]=a}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,n){return tink_core_TypedError.typed(e,t,r,n)};tink_core_TypedError.typed=function(e,t,r,n){var i=new tink_core_TypedError(e,t,n);i.data=r;return i};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 _.Success(e())}catch(e){var n=e instanceof js__$Boot_HaxeError?e.val:e;var i=tink_core_TypedError.asError(n);var s;if(i==null){s=t==null?tink_core_TypedError.withData(null,"Unexpected Error",n,r):t(n)}else{var a=i;s=a}return _.Failure(s)}};tink_core_TypedError.prototype={throwSelf:function(){var e=this;throw js__$Boot_HaxeError.wrap(e)},__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 L=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 n=t.value.get();return e(n).handle(r)}))},handle:function(e){F.invoke(e,this.value.get());return null},eager:function(){return this},gather:function(){return this},__class__:tink_core__$Future_SyncFuture};var D={};D.__name__=true;D.flatten=function(e){return new tink_core__$Future_SuspendableFuture((function(t){var r=null;var n=e.handle((function(e){r=e.handle(t)}));var i=new tink_core_SimpleLink((function(){if(r!=null){r.cancel()}}));return new tink_core__$Callback_LinkPair(n,i)}))};D.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 n=e;F.invoke(n,$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){F.invoke(e,this.result);return null}else{var r=t;var n=new tink_core__$Callback_ListCell(e,r);r.cells.push(n);r.used++;return n}},flatMap:function(e){var t=this.list;if(t==null){return e(this.result)}else{var r=t;var n=new tink_core_FutureTrigger;var i=this.list;var s=new tink_core__$Callback_ListCell((function(t){e(t).handle($bind(n,n.trigger))}),i);i.cells.push(s);i.used++;return n}},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){F.invoke(e,this.result);return null}else{var r=t;var n=this.callbacks;var i=new tink_core__$Callback_ListCell(e,n);n.cells.push(i);n.used++;var s=i;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 n=e(t);r(n)}))}))},flatMap:function(e){return D.flatten(this.map(e))},gather:function(){return this},eager:function(){this.handle(F.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 tink_core_OutcomeTools=function(){};tink_core_OutcomeTools.__name__=true;tink_core_OutcomeTools.sure=function(e){switch(e._hx_index){case 0:var t=e.data;return t;case 1:var r=e.failure;var n=tink_core_TypedError.asError(r);if(n==null){throw new js__$Boot_HaxeError(r)}else{var i=n;return i.throwSelf()}break}};tink_core_OutcomeTools.map=function(e,t){switch(e._hx_index){case 0:var r=e.data;return _.Success(t(r));case 1:var n=e.failure;return _.Failure(n)}};var C={};C.__name__=true;C.noise=function(e){return C.next(e,(function(e){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(L.Noise)))}))};C.next=function(e,t,r){if(r==null){r=true}var n=r;if(n==null){n=true}var i=e.flatMap((function(e){switch(e._hx_index){case 0:var r=e.data;return t(r);case 1:var n=e.failure;return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Failure(n)))}}));if(n){return i.gather()}else{return i}};C.ofSpecific=function(e){return e};C.inParallel=function(e,t,r){if(e.length==0){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success([])))}else{return D.async((function(r){var n=[];var i=e.length;var s=null;var a=[];var o=false;var l=0;var c=HxOverrides.iter(e);var u=null;var done=function(e){if(s==null){o=true}else if(s!=null){s.cancel()}r(e)};var fail=function(e){i=0;done(_.Failure(e))};var set=function(e,t){n[e]=t;if((i-=1)==0){done(_.Success(n))}else if(c.hasNext()&&i>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 n=t.failure;fail(n);break}}));a.push(t)};while(true){var h;if(c.hasNext()&&i>0){if(t!=null){t-=1;h=t+1>0}else{h=true}}else{h=false}if(!h){break}u()}s=T.fromMany(a);if(o){if(s!=null){s.cancel()}}}),r)}};var B={};B.__name__=true;B.ofSafeSync=function(e){return function(t){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(_.Success(e(t))))}};var M={};M.__name__=true;M.ofSync=function(e){return function(t){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(e(t)))}};function $getIterator(e){if(e instanceof Array)return HxOverrides.iter(e);else return e.iterator()}function $bind(t,r){if(r==null)return null;if(r.__id__==null)r.__id__=e.$haxeUID++;var n;if(t.hx__closures__==null)t.hx__closures__={};else n=t.hx__closures__[r.__id__];if(n==null){n=r.bind(t);t.hx__closures__[r.__id__]=n}return n}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 P={};var U={};var z=Number;var H=Boolean;var W={};var j={};var Y={};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(i.Off,0);r.set(i.Bold,1);r.set(i.Underline,4);r.set(i.Blink,5);r.set(i.ReverseVideo,7);r.set(i.Concealed,8);r.set(i.BoldOff,22);r.set(i.UnderlineOff,24);r.set(i.BlinkOff,25);r.set(i.NormalVideo,27);r.set(i.ConcealedOff,28);r.set(i.Black,30);r.set(i.Red,31);r.set(i.Green,32);r.set(i.Yellow,33);r.set(i.Blue,34);r.set(i.Magenta,35);r.set(i.Cyan,36);r.set(i.White,37);r.set(i.DefaultForeground,39);r.set(i.BlackBack,40);r.set(i.RedBack,41);r.set(i.GreenBack,42);r.set(i.YellowBack,43);r.set(i.BlueBack,44);r.set(i.MagentaBack,45);r.set(i.CyanBack,46);r.set(i.WhiteBack,47);r.set(i.DefaultBackground,49);t=r;return t}(this);ANSI.available=ANSI.detectSupport();ANSI.strip=false;ANSI.stripIfUnavailable=true;DateTools.DAY_SHORT_NAMES=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];DateTools.DAY_NAMES=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];DateTools.MONTH_SHORT_NAMES=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];DateTools.MONTH_NAMES=["January","February","March","April","May","June","July","August","September","October","November","December"];haxe_SysTools.winMetaCharacters=[32,40,41,37,33,94,34,60,62,38,124,10,13,44,59];haxeshim_Os.IS_WINDOWS=Sys.systemName()=="Windows";haxeshim_Os.DELIMITER=haxeshim_Os.IS_WINDOWS?";":":";haxeshim_HaxeInstallation.EXT=haxeshim_Os.IS_WINDOWS?".exe":"";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.CONFIG_FILE=".haxerc";haxeshim_Scope.fs={isDirectory:function(e){try{return sys_FileSystem.isDirectory(e)}catch(e){var t=e instanceof js__$Boot_HaxeError?e.val:e;return false}},readFile:function(e){try{return _.Success(m.readFileSync(e,{encoding:"utf8"}))}catch(t){return _.Failure("Cannot read "+e+" because "+Std.string(t instanceof js__$Boot_HaxeError?t.val:t))}}};haxeshim_Scope.DEFAULT_ROOT=function(e){var t;var r=haxeshim_Scope.env("HAXE_ROOT");var n=haxeshim_Scope.env("HAXESHIM_ROOT");var i=new tink_core__$Lazy_LazyConst(process.env[haxeshim_Os.IS_WINDOWS?"APPDATA":"HOME"]+"/haxe");var s;if(n._hx_index==0){var a=n.v;s=a}else{s=i.get()}var o=new tink_core__$Lazy_LazyConst(s);t=r._hx_index==0?function(e){var t;var n=r.v;t=n;return t}(e):o.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 n=process.env[r];t=n==null?function(e){var t;var n=new haxe_ds_StringMap;{var i=haxeshim_Neko.PATH;if(Y[r]!=null){n.setReserved(r,i)}else{n.h[r]=i}}t=u.ofMap(n);return t}(e):function(e){var t;var i=n;t=i.indexOf(haxeshim_Neko.PATH)!=-1?u.ofVars({}):function(e){var t;var i=n;var s=new haxe_ds_StringMap;{var a=i+haxeshim_Os.DELIMITER+haxeshim_Neko.PATH;if(Y[r]!=null){s.setReserved(r,a)}else{s.h[r]=a}}t=u.ofMap(s);return t}(e);return t}(e);return t}(this);lix_client_Download.initZip=function(e){var t;var r=x.validateFileName;x.validateFileName=function(e){return null};t=true;return t}(this);lix_client_Download.USER_AGENT="switchx";lix_client_haxe_Switcher.VERSION_INFO="version.json";lix_client_haxe_Switcher.NIGHTLIES="https://build.haxe.org/builds/haxe";lix_client_haxe_Switcher.PLATFORM=function(e){var t;var r=process.arch;t=function(e){var t;switch(Sys.systemName()){case"Mac":t="mac";break;case"Windows":t="windows";break;default:t=r=="arm64"?"linux-arm64":"linux64"}return t}(e);return t}(this);k.hex=function(e){var t;var r=new haxe_ds_IntMap;{var n=0;var i="0123456789abcdefABCDEF".split("");while(n<i.length){var s=i[n];++n;r.h[HxOverrides.cca(s,0)]=true}}t=r;return t}(this);F.depth=0;lix_cli_HaxelibCmd.main()})(typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this)},4794:(e,t,r)=>{var n=r(4300).Buffer;var i=[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"){i=new Int32Array(i)}function ensureBuffer(e){if(n.isBuffer(e)){return e}var t=typeof n.alloc==="function"&&typeof n.from==="function";if(typeof e==="number"){return t?n.alloc(e):new n(e)}else if(typeof e==="string"){return t?n.from(e):new n(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(n.isBuffer(t)){t=t.readUInt32BE(0)}var r=~~t^-1;for(var s=0;s<e.length;s++){r=i[(r^e[s])&255]^r>>>8}return r^-1}function crc32(){return bufferizeInt(_crc32.apply(null,arguments))}crc32.signed=function(){return _crc32.apply(null,arguments)};crc32.unsigned=function(){return _crc32.apply(null,arguments)>>>0};e.exports=crc32},9051:(e,t,r)=>{"use strict";const n=r(7147);const i=r(1017);const s=n.lchown?"lchown":"chown";const a=n.lchownSync?"lchownSync":"chownSync";const o=n.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/);const lchownSync=(e,t,r)=>{try{return n[a](e,t,r)}catch(e){if(e.code!=="ENOENT")throw e}};const chownSync=(e,t,r)=>{try{return n.chownSync(e,t,r)}catch(e){if(e.code!=="ENOENT")throw e}};const l=o?(e,t,r,i)=>s=>{if(!s||s.code!=="EISDIR")i(s);else n.chown(e,t,r,i)}:(e,t,r,n)=>n;const c=o?(e,t,r)=>{try{return lchownSync(e,t,r)}catch(n){if(n.code!=="EISDIR")throw n;chownSync(e,t,r)}}:(e,t,r)=>lchownSync(e,t,r);const u=process.version;let readdir=(e,t,r)=>n.readdir(e,t,r);let readdirSync=(e,t)=>n.readdirSync(e,t);if(/^v4\./.test(u))readdir=(e,t,r)=>n.readdir(e,r);const chown=(e,t,r,i)=>{n[s](e,t,r,l(e,t,r,(e=>{i(e&&e.code!=="ENOENT"?e:null)})))};const chownrKid=(e,t,r,s,a)=>{if(typeof t==="string")return n.lstat(i.resolve(e,t),((n,i)=>{if(n)return a(n.code!=="ENOENT"?n:null);i.name=t;chownrKid(e,i,r,s,a)}));if(t.isDirectory()){chownr(i.resolve(e,t.name),r,s,(n=>{if(n)return a(n);const o=i.resolve(e,t.name);chown(o,r,s,a)}))}else{const n=i.resolve(e,t.name);chown(n,r,s,a)}};const chownr=(e,t,r,n)=>{readdir(e,{withFileTypes:true},((i,s)=>{if(i){if(i.code==="ENOENT")return n();else if(i.code!=="ENOTDIR"&&i.code!=="ENOTSUP")return n(i)}if(i||!s.length)return chown(e,t,r,n);let a=s.length;let o=null;const then=i=>{if(o)return;if(i)return n(o=i);if(--a===0)return chown(e,t,r,n)};s.forEach((n=>chownrKid(e,n,t,r,then)))}))};const chownrKidSync=(e,t,r,s)=>{if(typeof t==="string"){try{const r=n.lstatSync(i.resolve(e,t));r.name=t;t=r}catch(e){if(e.code==="ENOENT")return;else throw e}}if(t.isDirectory())chownrSync(i.resolve(e,t.name),r,s);c(i.resolve(e,t.name),r,s)};const chownrSync=(e,t,r)=>{let n;try{n=readdirSync(e,{withFileTypes:true})}catch(n){if(n.code==="ENOENT")return;else if(n.code==="ENOTDIR"||n.code==="ENOTSUP")return c(e,t,r);else throw n}if(n&&n.length)n.forEach((n=>chownrKidSync(e,n,t,r)));return c(e,t,r)};e.exports=chownr;chownr.sync=chownrSync},5010:(e,t,r)=>{var n=r(7147);var i=r(3837);var s=r(2781);var a=s.Readable;var o=s.Writable;var l=s.PassThrough;var c=r(4833);var u=r(2361).EventEmitter;t.createFromBuffer=createFromBuffer;t.createFromFd=createFromFd;t.BufferSlicer=BufferSlicer;t.FdSlicer=FdSlicer;i.inherits(FdSlicer,u);function FdSlicer(e,t){t=t||{};u.call(this);this.fd=e;this.pend=new c;this.pend.max=1;this.refCount=0;this.autoClose=!!t.autoClose}FdSlicer.prototype.read=function(e,t,r,i,s){var a=this;a.pend.go((function(o){n.read(a.fd,e,t,r,i,(function(e,t,r){o();s(e,t,r)}))}))};FdSlicer.prototype.write=function(e,t,r,i,s){var a=this;a.pend.go((function(o){n.write(a.fd,e,t,r,i,(function(e,t,r){o();s(e,t,r)}))}))};FdSlicer.prototype.createReadStream=function(e){return new ReadStream(this,e)};FdSlicer.prototype.createWriteStream=function(e){return new WriteStream(this,e)};FdSlicer.prototype.ref=function(){this.refCount+=1};FdSlicer.prototype.unref=function(){var e=this;e.refCount-=1;if(e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");if(e.autoClose){n.close(e.fd,onCloseDone)}function onCloseDone(t){if(t){e.emit("error",t)}else{e.emit("close")}}};i.inherits(ReadStream,a);function ReadStream(e,t){t=t||{};a.call(this,t);this.context=e;this.context.ref();this.start=t.start||0;this.endOffset=t.end;this.pos=this.start;this.destroyed=false}ReadStream.prototype._read=function(e){var t=this;if(t.destroyed)return;var r=Math.min(t._readableState.highWaterMark,e);if(t.endOffset!=null){r=Math.min(r,t.endOffset-t.pos)}if(r<=0){t.destroyed=true;t.push(null);t.context.unref();return}t.context.pend.go((function(e){if(t.destroyed)return e();var i=new Buffer(r);n.read(t.context.fd,i,0,r,t.pos,(function(r,n){if(r){t.destroy(r)}else if(n===0){t.destroyed=true;t.push(null);t.context.unref()}else{t.pos+=n;t.push(i.slice(0,n))}e()}))}))};ReadStream.prototype.destroy=function(e){if(this.destroyed)return;e=e||new Error("stream destroyed");this.destroyed=true;this.emit("error",e);this.context.unref()};i.inherits(WriteStream,o);function WriteStream(e,t){t=t||{};o.call(this,t);this.context=e;this.context.ref();this.start=t.start||0;this.endOffset=t.end==null?Infinity:+t.end;this.bytesWritten=0;this.pos=this.start;this.destroyed=false;this.on("finish",this.destroy.bind(this))}WriteStream.prototype._write=function(e,t,r){var i=this;if(i.destroyed)return;if(i.pos+e.length>i.endOffset){var s=new Error("maximum file length exceeded");s.code="ETOOBIG";i.destroy();r(s);return}i.context.pend.go((function(t){if(i.destroyed)return t();n.write(i.context.fd,e,0,e.length,i.pos,(function(e,n){if(e){i.destroy();t();r(e)}else{i.bytesWritten+=n;i.pos+=n;i.emit("progress");t();r()}}))}))};WriteStream.prototype.destroy=function(){if(this.destroyed)return;this.destroyed=true;this.context.unref()};i.inherits(BufferSlicer,u);function BufferSlicer(e,t){u.call(this);t=t||{};this.refCount=0;this.buffer=e;this.maxChunkSize=t.maxChunkSize||Number.MAX_SAFE_INTEGER}BufferSlicer.prototype.read=function(e,t,r,n,i){var s=n+r;var a=s-this.buffer.length;var o=a>0?a:r;this.buffer.copy(e,t,n,s);setImmediate((function(){i(null,o)}))};BufferSlicer.prototype.write=function(e,t,r,n,i){e.copy(this.buffer,n,t,t+r);setImmediate((function(){i(null,r,e)}))};BufferSlicer.prototype.createReadStream=function(e){e=e||{};var t=new l(e);t.destroyed=false;t.start=e.start||0;t.endOffset=e.end;t.pos=t.endOffset||this.buffer.length;var r=this.buffer.slice(t.start,t.pos);var n=0;while(true){var i=n+this.maxChunkSize;if(i>=r.length){if(n<r.length){t.write(r.slice(n,r.length))}break}t.write(r.slice(n,i));n=i}t.end();t.destroy=function(){t.destroyed=true};return t};BufferSlicer.prototype.createWriteStream=function(e){var t=this;e=e||{};var r=new o(e);r.start=e.start||0;r.endOffset=e.end==null?this.buffer.length:+e.end;r.bytesWritten=0;r.pos=r.start;r.destroyed=false;r._write=function(e,n,i){if(r.destroyed)return;var s=r.pos+e.length;if(s>r.endOffset){var a=new Error("maximum file length exceeded");a.code="ETOOBIG";r.destroyed=true;i(a);return}e.copy(t.buffer,r.pos,0,e.length);r.bytesWritten+=e.length;r.pos=s;r.emit("progress");i()};r.destroy=function(){r.destroyed=true};return r};BufferSlicer.prototype.ref=function(){this.refCount+=1};BufferSlicer.prototype.unref=function(){this.refCount-=1;if(this.refCount<0){throw new Error("invalid unref")}};function createFromBuffer(e,t){return new BufferSlicer(e,t)}function createFromFd(e,t){return new FdSlicer(e,t)}},7714:(e,t,r)=>{"use strict";const n=r(1077);const i=r(2361).EventEmitter;const s=r(7147);let a=s.writev;if(!a){const e=process.binding("fs");const t=e.FSReqWrap||e.FSReqCallback;a=(r,n,i,s)=>{const done=(e,t)=>s(e,t,n);const a=new t;a.oncomplete=done;e.writeBuffers(r,n,i,a)}}const o=Symbol("_autoClose");const l=Symbol("_close");const c=Symbol("_ended");const u=Symbol("_fd");const h=Symbol("_finished");const d=Symbol("_flags");const p=Symbol("_flush");const m=Symbol("_handleChunk");const _=Symbol("_makeBuf");const v=Symbol("_mode");const y=Symbol("_needDrain");const g=Symbol("_onerror");const w=Symbol("_onopen");const b=Symbol("_onread");const S=Symbol("_onwrite");const x=Symbol("_open");const E=Symbol("_path");const R=Symbol("_pos");const O=Symbol("_queue");const N=Symbol("_read");const k=Symbol("_readSize");const A=Symbol("_reading");const I=Symbol("_remain");const F=Symbol("_size");const T=Symbol("_write");const L=Symbol("_writing");const D=Symbol("_defaultFlag");const C=Symbol("_errored");class ReadStream extends n{constructor(e,t){t=t||{};super(t);this.readable=true;this.writable=false;if(typeof e!=="string")throw new TypeError("path must be a string");this[C]=false;this[u]=typeof t.fd==="number"?t.fd:null;this[E]=e;this[k]=t.readSize||16*1024*1024;this[A]=false;this[F]=typeof t.size==="number"?t.size:Infinity;this[I]=this[F];this[o]=typeof t.autoClose==="boolean"?t.autoClose:true;if(typeof this[u]==="number")this[N]();else this[x]()}get fd(){return this[u]}get path(){return this[E]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[x](){s.open(this[E],"r",((e,t)=>this[w](e,t)))}[w](e,t){if(e)this[g](e);else{this[u]=t;this.emit("open",t);this[N]()}}[_](){return Buffer.allocUnsafe(Math.min(this[k],this[I]))}[N](){if(!this[A]){this[A]=true;const e=this[_]();if(e.length===0)return process.nextTick((()=>this[b](null,0,e)));s.read(this[u],e,0,e.length,null,((e,t,r)=>this[b](e,t,r)))}}[b](e,t,r){this[A]=false;if(e)this[g](e);else if(this[m](t,r))this[N]()}[l](){if(this[o]&&typeof this[u]==="number"){const e=this[u];this[u]=null;s.close(e,(e=>e?this.emit("error",e):this.emit("close")))}}[g](e){this[A]=true;this[l]();this.emit("error",e)}[m](e,t){let r=false;this[I]-=e;if(e>0)r=super.write(e<t.length?t.slice(0,e):t);if(e===0||this[I]<=0){r=false;this[l]();super.end()}return r}emit(e,t){switch(e){case"prefinish":case"finish":break;case"drain":if(typeof this[u]==="number")this[N]();break;case"error":if(this[C])return;this[C]=true;return super.emit(e,t);default:return super.emit(e,t)}}}class ReadStreamSync extends ReadStream{[x](){let e=true;try{this[w](null,s.openSync(this[E],"r"));e=false}finally{if(e)this[l]()}}[N](){let e=true;try{if(!this[A]){this[A]=true;do{const e=this[_]();const t=e.length===0?0:s.readSync(this[u],e,0,e.length,null);if(!this[m](t,e))break}while(true);this[A]=false}e=false}finally{if(e)this[l]()}}[l](){if(this[o]&&typeof this[u]==="number"){const e=this[u];this[u]=null;s.closeSync(e);this.emit("close")}}}class WriteStream extends i{constructor(e,t){t=t||{};super(t);this.readable=false;this.writable=true;this[C]=false;this[L]=false;this[c]=false;this[y]=false;this[O]=[];this[E]=e;this[u]=typeof t.fd==="number"?t.fd:null;this[v]=t.mode===undefined?438:t.mode;this[R]=typeof t.start==="number"?t.start:null;this[o]=typeof t.autoClose==="boolean"?t.autoClose:true;const r=this[R]!==null?"r+":"w";this[D]=t.flags===undefined;this[d]=this[D]?r:t.flags;if(this[u]===null)this[x]()}emit(e,t){if(e==="error"){if(this[C])return;this[C]=true}return super.emit(e,t)}get fd(){return this[u]}get path(){return this[E]}[g](e){this[l]();this[L]=true;this.emit("error",e)}[x](){s.open(this[E],this[d],this[v],((e,t)=>this[w](e,t)))}[w](e,t){if(this[D]&&this[d]==="r+"&&e&&e.code==="ENOENT"){this[d]="w";this[x]()}else if(e)this[g](e);else{this[u]=t;this.emit("open",t);this[p]()}}end(e,t){if(e)this.write(e,t);this[c]=true;if(!this[L]&&!this[O].length&&typeof this[u]==="number")this[S](null,0);return this}write(e,t){if(typeof e==="string")e=Buffer.from(e,t);if(this[c]){this.emit("error",new Error("write() after end()"));return false}if(this[u]===null||this[L]||this[O].length){this[O].push(e);this[y]=true;return false}this[L]=true;this[T](e);return true}[T](e){s.write(this[u],e,0,e.length,this[R],((e,t)=>this[S](e,t)))}[S](e,t){if(e)this[g](e);else{if(this[R]!==null)this[R]+=t;if(this[O].length)this[p]();else{this[L]=false;if(this[c]&&!this[h]){this[h]=true;this[l]();this.emit("finish")}else if(this[y]){this[y]=false;this.emit("drain")}}}}[p](){if(this[O].length===0){if(this[c])this[S](null,0)}else if(this[O].length===1)this[T](this[O].pop());else{const e=this[O];this[O]=[];a(this[u],e,this[R],((e,t)=>this[S](e,t)))}}[l](){if(this[o]&&typeof this[u]==="number"){const e=this[u];this[u]=null;s.close(e,(e=>e?this.emit("error",e):this.emit("close")))}}}class WriteStreamSync extends WriteStream{[x](){let e;if(this[D]&&this[d]==="r+"){try{e=s.openSync(this[E],this[d],this[v])}catch(e){if(e.code==="ENOENT"){this[d]="w";return this[x]()}else throw e}}else e=s.openSync(this[E],this[d],this[v]);this[w](null,e)}[l](){if(this[o]&&typeof this[u]==="number"){const e=this[u];this[u]=null;s.closeSync(e);this.emit("close")}}[T](e){let t=true;try{this[S](null,s.writeSync(this[u],e,0,e.length,this[R]));t=false}finally{if(t)try{this[l]()}catch(e){}}}}t.ReadStream=ReadStream;t.ReadStreamSync=ReadStreamSync;t.WriteStream=WriteStream;t.WriteStreamSync=WriteStreamSync},7356:e=>{"use strict";e.exports=clone;function clone(e){if(e===null||typeof e!=="object")return e;if(e instanceof Object)var t={__proto__:e.__proto__};else var t=Object.create(null);Object.getOwnPropertyNames(e).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}));return t}},7758:(e,t,r)=>{var n=r(7147);var i=r(263);var s=r(3086);var a=r(7356);var o=r(3837);var l;var c;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){l=Symbol.for("graceful-fs.queue");c=Symbol.for("graceful-fs.previous")}else{l="___graceful-fs.queue";c="___graceful-fs.previous"}function noop(){}var u=noop;if(o.debuglog)u=o.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))u=function(){var e=o.format.apply(o,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: ");console.error(e)};if(!global[l]){var h=[];Object.defineProperty(global,l,{get:function(){return h}});n.close=function(e){function close(t,r){return e.call(n,t,(function(e){if(!e){retry()}if(typeof r==="function")r.apply(this,arguments)}))}Object.defineProperty(close,c,{value:e});return close}(n.close);n.closeSync=function(e){function closeSync(t){e.apply(n,arguments);retry()}Object.defineProperty(closeSync,c,{value:e});return closeSync}(n.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",(function(){u(global[l]);r(9491).equal(global[l].length,0)}))}}e.exports=patch(a(n));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!n.__patched){e.exports=patch(n);n.__patched=true}function patch(e){i(e);e.gracefulify=patch;e.createReadStream=createReadStream;e.createWriteStream=createWriteStream;var t=e.readFile;e.readFile=readFile;function readFile(e,r,n){if(typeof r==="function")n=r,r=null;return go$readFile(e,r,n);function go$readFile(e,r,n){return t(e,r,(function(t){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))enqueue([go$readFile,[e,r,n]]);else{if(typeof n==="function")n.apply(this,arguments);retry()}}))}}var r=e.writeFile;e.writeFile=writeFile;function writeFile(e,t,n,i){if(typeof n==="function")i=n,n=null;return go$writeFile(e,t,n,i);function go$writeFile(e,t,n,i){return r(e,t,n,(function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))enqueue([go$writeFile,[e,t,n,i]]);else{if(typeof i==="function")i.apply(this,arguments);retry()}}))}}var n=e.appendFile;if(n)e.appendFile=appendFile;function appendFile(e,t,r,i){if(typeof r==="function")i=r,r=null;return go$appendFile(e,t,r,i);function go$appendFile(e,t,r,i){return n(e,t,r,(function(n){if(n&&(n.code==="EMFILE"||n.code==="ENFILE"))enqueue([go$appendFile,[e,t,r,i]]);else{if(typeof i==="function")i.apply(this,arguments);retry()}}))}}var a=e.readdir;e.readdir=readdir;function readdir(e,t,r){var n=[e];if(typeof t!=="function"){n.push(t)}else{r=t}n.push(go$readdir$cb);return go$readdir(n);function go$readdir$cb(e,t){if(t&&t.sort)t.sort();if(e&&(e.code==="EMFILE"||e.code==="ENFILE"))enqueue([go$readdir,[n]]);else{if(typeof r==="function")r.apply(this,arguments);retry()}}}function go$readdir(t){return a.apply(e,t)}if(process.version.substr(0,4)==="v0.8"){var o=s(e);ReadStream=o.ReadStream;WriteStream=o.WriteStream}var l=e.ReadStream;if(l){ReadStream.prototype=Object.create(l.prototype);ReadStream.prototype.open=ReadStream$open}var c=e.WriteStream;if(c){WriteStream.prototype=Object.create(c.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(e,"ReadStream",{get:function(){return ReadStream},set:function(e){ReadStream=e},enumerable:true,configurable:true});Object.defineProperty(e,"WriteStream",{get:function(){return WriteStream},set:function(e){WriteStream=e},enumerable:true,configurable:true});var u=ReadStream;Object.defineProperty(e,"FileReadStream",{get:function(){return u},set:function(e){u=e},enumerable:true,configurable:true});var h=WriteStream;Object.defineProperty(e,"FileWriteStream",{get:function(){return h},set:function(e){h=e},enumerable:true,configurable:true});function ReadStream(e,t){if(this instanceof ReadStream)return l.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(t,r){if(t){if(e.autoClose)e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r);e.read()}}))}function WriteStream(e,t){if(this instanceof WriteStream)return c.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(t,r){if(t){e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r)}}))}function createReadStream(t,r){return new e.ReadStream(t,r)}function createWriteStream(t,r){return new e.WriteStream(t,r)}var d=e.open;e.open=open;function open(e,t,r,n){if(typeof r==="function")n=r,r=null;return go$open(e,t,r,n);function go$open(e,t,r,n){return d(e,t,r,(function(i,s){if(i&&(i.code==="EMFILE"||i.code==="ENFILE"))enqueue([go$open,[e,t,r,n]]);else{if(typeof n==="function")n.apply(this,arguments);retry()}}))}}return e}function enqueue(e){u("ENQUEUE",e[0].name,e[1]);global[l].push(e)}function retry(){var e=global[l].shift();if(e){u("RETRY",e[0].name,e[1]);e[0].apply(null,e[1])}}},3086:(e,t,r)=>{var n=r(2781).Stream;e.exports=legacy;function legacy(e){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(t,r){if(!(this instanceof ReadStream))return new ReadStream(t,r);n.call(this);var i=this;this.path=t;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;r=r||{};var s=Object.keys(r);for(var a=0,o=s.length;a<o;a++){var l=s[a];this[l]=r[l]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==undefined){if("number"!==typeof this.start){throw TypeError("start must be a Number")}if(this.end===undefined){this.end=Infinity}else if("number"!==typeof this.end){throw TypeError("end must be a Number")}if(this.start>this.end){throw new Error("start must be <= end")}this.pos=this.start}if(this.fd!==null){process.nextTick((function(){i._read()}));return}e.open(this.path,this.flags,this.mode,(function(e,t){if(e){i.emit("error",e);i.readable=false;return}i.fd=t;i.emit("open",t);i._read()}))}function WriteStream(t,r){if(!(this instanceof WriteStream))return new WriteStream(t,r);n.call(this);this.path=t;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;r=r||{};var i=Object.keys(r);for(var s=0,a=i.length;s<a;s++){var o=i[s];this[o]=r[o]}if(this.start!==undefined){if("number"!==typeof this.start){throw TypeError("start must be a Number")}if(this.start<0){throw new Error("start must be >= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=e.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},263:(e,t,r)=>{var n=r(2057);var i=process.cwd;var s=null;var a=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!s)s=i.call(process);return s};try{process.cwd()}catch(e){}var o=process.chdir;process.chdir=function(e){s=null;o.call(process,e)};e.exports=patch;function patch(e){if(n.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(e)}if(!e.lutimes){patchLutimes(e)}e.chown=chownFix(e.chown);e.fchown=chownFix(e.fchown);e.lchown=chownFix(e.lchown);e.chmod=chmodFix(e.chmod);e.fchmod=chmodFix(e.fchmod);e.lchmod=chmodFix(e.lchmod);e.chownSync=chownFixSync(e.chownSync);e.fchownSync=chownFixSync(e.fchownSync);e.lchownSync=chownFixSync(e.lchownSync);e.chmodSync=chmodFixSync(e.chmodSync);e.fchmodSync=chmodFixSync(e.fchmodSync);e.lchmodSync=chmodFixSync(e.lchmodSync);e.stat=statFix(e.stat);e.fstat=statFix(e.fstat);e.lstat=statFix(e.lstat);e.statSync=statFixSync(e.statSync);e.fstatSync=statFixSync(e.fstatSync);e.lstatSync=statFixSync(e.lstatSync);if(!e.lchmod){e.lchmod=function(e,t,r){if(r)process.nextTick(r)};e.lchmodSync=function(){}}if(!e.lchown){e.lchown=function(e,t,r,n){if(n)process.nextTick(n)};e.lchownSync=function(){}}if(a==="win32"){e.rename=function(t){return function(r,n,i){var s=Date.now();var a=0;t(r,n,(function CB(o){if(o&&(o.code==="EACCES"||o.code==="EPERM")&&Date.now()-s<6e4){setTimeout((function(){e.stat(n,(function(e,s){if(e&&e.code==="ENOENT")t(r,n,CB);else i(o)}))}),a);if(a<100)a+=10;return}if(i)i(o)}))}}(e.rename)}e.read=function(t){function read(r,n,i,s,a,o){var l;if(o&&typeof o==="function"){var c=0;l=function(u,h,d){if(u&&u.code==="EAGAIN"&&c<10){c++;return t.call(e,r,n,i,s,a,l)}o.apply(this,arguments)}}return t.call(e,r,n,i,s,a,l)}read.__proto__=t;return read}(e.read);e.readSync=function(t){return function(r,n,i,s,a){var o=0;while(true){try{return t.call(e,r,n,i,s,a)}catch(e){if(e.code==="EAGAIN"&&o<10){o++;continue}throw e}}}}(e.readSync);function patchLchmod(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,(function(t,n){if(t){if(i)i(t);return}e.fchmod(n,r,(function(t){e.close(n,(function(e){if(i)i(t||e)}))}))}))};e.lchmodSync=function(t,r){var i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r);var s=true;var a;try{a=e.fchmodSync(i,r);s=false}finally{if(s){try{e.closeSync(i)}catch(e){}}else{e.closeSync(i)}}return a}}function patchLutimes(e){if(n.hasOwnProperty("O_SYMLINK")){e.lutimes=function(t,r,i,s){e.open(t,n.O_SYMLINK,(function(t,n){if(t){if(s)s(t);return}e.futimes(n,r,i,(function(t){e.close(n,(function(e){if(s)s(t||e)}))}))}))};e.lutimesSync=function(t,r,i){var s=e.openSync(t,n.O_SYMLINK);var a;var o=true;try{a=e.futimesSync(s,r,i);o=false}finally{if(o){try{e.closeSync(s)}catch(e){}}else{e.closeSync(s)}}return a}}else{e.lutimes=function(e,t,r,n){if(n)process.nextTick(n)};e.lutimesSync=function(){}}}function chmodFix(t){if(!t)return t;return function(r,n,i){return t.call(e,r,n,(function(e){if(chownErOk(e))e=null;if(i)i.apply(this,arguments)}))}}function chmodFixSync(t){if(!t)return t;return function(r,n){try{return t.call(e,r,n)}catch(e){if(!chownErOk(e))throw e}}}function chownFix(t){if(!t)return t;return function(r,n,i,s){return t.call(e,r,n,i,(function(e){if(chownErOk(e))e=null;if(s)s.apply(this,arguments)}))}}function chownFixSync(t){if(!t)return t;return function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!chownErOk(e))throw e}}}function statFix(t){if(!t)return t;return function(r,n,i){if(typeof n==="function"){i=n;n=null}function callback(e,t){if(t){if(t.uid<0)t.uid+=4294967296;if(t.gid<0)t.gid+=4294967296}if(i)i.apply(this,arguments)}return n?t.call(e,r,n,callback):t.call(e,r,callback)}}function statFixSync(t){if(!t)return t;return function(r,n){var i=n?t.call(e,r,n):t.call(e,r);if(i.uid<0)i.uid+=4294967296;if(i.gid<0)i.gid+=4294967296;return i}}function chownErOk(e){if(!e)return true;if(e.code==="ENOSYS")return true;var t=!process.getuid||process.getuid()!==0;if(t){if(e.code==="EINVAL"||e.code==="EPERM")return true}return false}}},1077:(e,t,r)=>{"use strict";const n=r(2361);const i=r(2781);const s=r(665);const a=r(1576).StringDecoder;const o=Symbol("EOF");const l=Symbol("maybeEmitEnd");const c=Symbol("emittedEnd");const u=Symbol("emittingEnd");const h=Symbol("closed");const d=Symbol("read");const p=Symbol("flush");const m=Symbol("flushChunk");const _=Symbol("encoding");const v=Symbol("decoder");const y=Symbol("flowing");const g=Symbol("paused");const w=Symbol("resume");const b=Symbol("bufferLength");const S=Symbol("bufferPush");const x=Symbol("bufferShift");const E=Symbol("objectMode");const R=Symbol("destroyed");const O=global._MP_NO_ITERATOR_SYMBOLS_!=="1";const N=O&&Symbol.asyncIterator||Symbol("asyncIterator not implemented");const k=O&&Symbol.iterator||Symbol("iterator not implemented");const isEndish=e=>e==="end"||e==="finish"||e==="prefinish";const isArrayBuffer=e=>e instanceof ArrayBuffer||typeof e==="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0;const isArrayBufferView=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);e.exports=class Minipass extends i{constructor(e){super();this[y]=false;this[g]=false;this.pipes=new s;this.buffer=new s;this[E]=e&&e.objectMode||false;if(this[E])this[_]=null;else this[_]=e&&e.encoding||null;if(this[_]==="buffer")this[_]=null;this[v]=this[_]?new a(this[_]):null;this[o]=false;this[c]=false;this[u]=false;this[h]=false;this.writable=true;this.readable=true;this[b]=0;this[R]=false}get bufferLength(){return this[b]}get encoding(){return this[_]}set encoding(e){if(this[E])throw new Error("cannot set encoding in objectMode");if(this[_]&&e!==this[_]&&(this[v]&&this[v].lastNeed||this[b]))throw new Error("cannot change encoding");if(this[_]!==e){this[v]=e?new a(e):null;if(this.buffer.length)this.buffer=this.buffer.map((e=>this[v].write(e)))}this[_]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[E]}set objectMode(e){this[E]=this[E]||!!e}write(e,t,r){if(this[o])throw new Error("write after end");if(this[R]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof t==="function")r=t,t="utf8";if(!t)t="utf8";if(!this[E]&&!Buffer.isBuffer(e)){if(isArrayBufferView(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(isArrayBuffer(e))e=Buffer.from(e);else if(typeof e!=="string")this.objectMode=true}if(!this.objectMode&&!e.length){const e=this.flowing;if(this[b]!==0)this.emit("readable");if(r)r();return e}if(typeof e==="string"&&!this[E]&&!(t===this[_]&&!this[v].lastNeed)){e=Buffer.from(e,t)}if(Buffer.isBuffer(e)&&this[_])e=this[v].write(e);try{return this.flowing?(this.emit("data",e),this.flowing):(this[S](e),false)}finally{if(this[b]!==0)this.emit("readable");if(r)r()}}read(e){if(this[R])return null;try{if(this[b]===0||e===0||e>this[b])return null;if(this[E])e=null;if(this.buffer.length>1&&!this[E]){if(this.encoding)this.buffer=new s([Array.from(this.buffer).join("")]);else this.buffer=new s([Buffer.concat(Array.from(this.buffer),this[b])])}return this[d](e||null,this.buffer.head.value)}finally{this[l]()}}[d](e,t){if(e===t.length||e===null)this[x]();else{this.buffer.head.value=t.slice(e);t=t.slice(0,e);this[b]-=e}this.emit("data",t);if(!this.buffer.length&&!this[o])this.emit("drain");return t}end(e,t,r){if(typeof e==="function")r=e,e=null;if(typeof t==="function")r=t,t="utf8";if(e)this.write(e,t);if(r)this.once("end",r);this[o]=true;this.writable=false;if(this.flowing||!this[g])this[l]();return this}[w](){if(this[R])return;this[g]=false;this[y]=true;this.emit("resume");if(this.buffer.length)this[p]();else if(this[o])this[l]();else this.emit("drain")}resume(){return this[w]()}pause(){this[y]=false;this[g]=true}get destroyed(){return this[R]}get flowing(){return this[y]}get paused(){return this[g]}[S](e){if(this[E])this[b]+=1;else this[b]+=e.length;return this.buffer.push(e)}[x](){if(this.buffer.length){if(this[E])this[b]-=1;else this[b]-=this.buffer.head.value.length}return this.buffer.shift()}[p](){do{}while(this[m](this[x]()));if(!this.buffer.length&&!this[o])this.emit("drain")}[m](e){return e?(this.emit("data",e),this.flowing):false}pipe(e,t){if(this[R])return;const r=this[c];t=t||{};if(e===process.stdout||e===process.stderr)t.end=false;else t.end=t.end!==false;const n={dest:e,opts:t,ondrain:e=>this[w]()};this.pipes.push(n);e.on("drain",n.ondrain);this[w]();if(r&&n.opts.end)n.dest.end();return e}addListener(e,t){return this.on(e,t)}on(e,t){try{return super.on(e,t)}finally{if(e==="data"&&!this.pipes.length&&!this.flowing)this[w]();else if(isEndish(e)&&this[c]){super.emit(e);this.removeAllListeners(e)}}}get emittedEnd(){return this[c]}[l](){if(!this[u]&&!this[c]&&!this[R]&&this.buffer.length===0&&this[o]){this[u]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[h])this.emit("close");this[u]=false}}emit(e,t){if(e!=="error"&&e!=="close"&&e!==R&&this[R])return;else if(e==="data"){if(!t)return;if(this.pipes.length)this.pipes.forEach((e=>e.dest.write(t)===false&&this.pause()))}else if(e==="end"){if(this[c]===true)return;this[c]=true;this.readable=false;if(this[v]){t=this[v].end();if(t){this.pipes.forEach((e=>e.dest.write(t)));super.emit("data",t)}}this.pipes.forEach((e=>{e.dest.removeListener("drain",e.ondrain);if(e.opts.end)e.dest.end()}))}else if(e==="close"){this[h]=true;if(!this[c]&&!this[R])return}const r=new Array(arguments.length);r[0]=e;r[1]=t;if(arguments.length>2){for(let e=2;e<arguments.length;e++){r[e]=arguments[e]}}try{return super.emit.apply(this,r)}finally{if(!isEndish(e))this[l]();else this.removeAllListeners(e)}}collect(){const e=[];if(!this[E])e.dataLength=0;const t=this.promise();this.on("data",(t=>{e.push(t);if(!this[E])e.dataLength+=t.length}));return t.then((()=>e))}concat(){return this[E]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then((e=>this[E]?Promise.reject(new Error("cannot concat in objectMode")):this[_]?e.join(""):Buffer.concat(e,e.dataLength)))}promise(){return new Promise(((e,t)=>{this.on(R,(()=>t(new Error("stream destroyed"))));this.on("end",(()=>e()));this.on("error",(e=>t(e)))}))}[N](){const next=()=>{const e=this.read();if(e!==null)return Promise.resolve({done:false,value:e});if(this[o])return Promise.resolve({done:true});let t=null;let r=null;const onerr=e=>{this.removeListener("data",ondata);this.removeListener("end",onend);r(e)};const ondata=e=>{this.removeListener("error",onerr);this.removeListener("end",onend);this.pause();t({value:e,done:!!this[o]})};const onend=()=>{this.removeListener("error",onerr);this.removeListener("data",ondata);t({done:true})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((e,n)=>{r=n;t=e;this.once(R,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next}}[k](){const next=()=>{const e=this.read();const t=e===null;return{value:e,done:t}};return{next:next}}destroy(e){if(this[R]){if(e)this.emit("error",e);else this.emit(R);return this}this[R]=true;this.buffer=new s;this[b]=0;if(typeof this.close==="function"&&!this[h])this.close();if(e)this.emit("error",e);else this.emit(R);return this}static isStream(e){return!!e&&(e instanceof Minipass||e instanceof i||e instanceof n&&(typeof e.pipe==="function"||typeof e.write==="function"&&typeof e.end==="function"))}}},6769:(e,t,r)=>{const n=r(9796).constants||{ZLIB_VERNUM:4736};e.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:Infinity,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},n))},3486:(e,t,r)=>{"use strict";const n=r(9491);const i=r(4300).Buffer;const s=r(9796);const a=t.constants=r(6769);const o=r(1077);const l=i.concat;const c=Symbol("_superWrite");class ZlibError extends Error{constructor(e){super("zlib: "+e.message);this.code=e.code;this.errno=e.errno;if(!this.code)this.code="ZLIB_ERROR";this.message="zlib: "+e.message;Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}}const u=Symbol("opts");const h=Symbol("flushFlag");const d=Symbol("finishFlushFlag");const p=Symbol("fullFlushFlag");const m=Symbol("handle");const _=Symbol("onError");const v=Symbol("sawError");const y=Symbol("level");const g=Symbol("strategy");const w=Symbol("ended");const b=Symbol("_defaultFullFlush");class ZlibBase extends o{constructor(e,t){if(!e||typeof e!=="object")throw new TypeError("invalid options for ZlibBase constructor");super(e);this[w]=false;this[u]=e;this[h]=e.flush;this[d]=e.finishFlush;try{this[m]=new s[t](e)}catch(e){throw new ZlibError(e)}this[_]=e=>{this[v]=true;this.close();this.emit("error",e)};this[m].on("error",(e=>this[_](new ZlibError(e))));this.once("end",(()=>this.close))}close(){if(this[m]){this[m].close();this[m]=null;this.emit("close")}}reset(){if(!this[v]){n(this[m],"zlib binding closed");return this[m].reset()}}flush(e){if(this.ended)return;if(typeof e!=="number")e=this[p];this.write(Object.assign(i.alloc(0),{[h]:e}))}end(e,t,r){if(e)this.write(e,t);this.flush(this[d]);this[w]=true;return super.end(null,null,r)}get ended(){return this[w]}write(e,t,r){if(typeof t==="function")r=t,t="utf8";if(typeof e==="string")e=i.from(e,t);if(this[v])return;n(this[m],"zlib binding closed");const s=this[m]._handle;const a=s.close;s.close=()=>{};const o=this[m].close;this[m].close=()=>{};i.concat=e=>e;let u;try{const t=typeof e[h]==="number"?e[h]:this[h];u=this[m]._processChunk(e,t);i.concat=l}catch(e){i.concat=l;this[_](new ZlibError(e))}finally{if(this[m]){this[m]._handle=s;s.close=a;this[m].close=o;this[m].removeAllListeners("error")}}let d;if(u){if(Array.isArray(u)&&u.length>0){d=this[c](i.from(u[0]));for(let e=1;e<u.length;e++){d=this[c](u[e])}}else{d=this[c](i.from(u))}}if(r)r();return d}[c](e){return super.write(e)}}class Zlib extends ZlibBase{constructor(e,t){e=e||{};e.flush=e.flush||a.Z_NO_FLUSH;e.finishFlush=e.finishFlush||a.Z_FINISH;super(e,t);this[p]=a.Z_FULL_FLUSH;this[y]=e.level;this[g]=e.strategy}params(e,t){if(this[v])return;if(!this[m])throw new Error("cannot switch params when binding is closed");if(!this[m].params)throw new Error("not supported in this implementation");if(this[y]!==e||this[g]!==t){this.flush(a.Z_SYNC_FLUSH);n(this[m],"zlib binding closed");const r=this[m].flush;this[m].flush=(e,t)=>{this.flush(e);t()};try{this[m].params(e,t)}finally{this[m].flush=r}if(this[m]){this[y]=e;this[g]=t}}}}class Deflate extends Zlib{constructor(e){super(e,"Deflate")}}class Inflate extends Zlib{constructor(e){super(e,"Inflate")}}const S=Symbol("_portable");class Gzip extends Zlib{constructor(e){super(e,"Gzip");this[S]=e&&!!e.portable}[c](e){if(!this[S])return super[c](e);this[S]=false;e[9]=255;return super[c](e)}}class Gunzip extends Zlib{constructor(e){super(e,"Gunzip")}}class DeflateRaw extends Zlib{constructor(e){super(e,"DeflateRaw")}}class InflateRaw extends Zlib{constructor(e){super(e,"InflateRaw")}}class Unzip extends Zlib{constructor(e){super(e,"Unzip")}}class Brotli extends ZlibBase{constructor(e,t){e=e||{};e.flush=e.flush||a.BROTLI_OPERATION_PROCESS;e.finishFlush=e.finishFlush||a.BROTLI_OPERATION_FINISH;super(e,t);this[p]=a.BROTLI_OPERATION_FLUSH}}class BrotliCompress extends Brotli{constructor(e){super(e,"BrotliCompress")}}class BrotliDecompress extends Brotli{constructor(e){super(e,"BrotliDecompress")}}t.Deflate=Deflate;t.Inflate=Inflate;t.Gzip=Gzip;t.Gunzip=Gunzip;t.DeflateRaw=DeflateRaw;t.InflateRaw=InflateRaw;t.Unzip=Unzip;if(typeof s.BrotliCompress==="function"){t.BrotliCompress=BrotliCompress;t.BrotliDecompress=BrotliDecompress}else{t.BrotliCompress=t.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}}},6186:(e,t,r)=>{const n=r(2853);const i=r(2930);const{mkdirpNative:s,mkdirpNativeSync:a}=r(4983);const{mkdirpManual:o,mkdirpManualSync:l}=r(356);const{useNative:c,useNativeSync:u}=r(4518);const mkdirp=(e,t)=>{e=i(e);t=n(t);return c(t)?s(e,t):o(e,t)};const mkdirpSync=(e,t)=>{e=i(e);t=n(t);return u(t)?a(e,t):l(e,t)};mkdirp.sync=mkdirpSync;mkdirp.native=(e,t)=>s(i(e),n(t));mkdirp.manual=(e,t)=>o(i(e),n(t));mkdirp.nativeSync=(e,t)=>a(i(e),n(t));mkdirp.manualSync=(e,t)=>l(i(e),n(t));e.exports=mkdirp},4992:(e,t,r)=>{const{dirname:n}=r(1017);const findMade=(e,t,r=undefined)=>{if(r===t)return Promise.resolve();return e.statAsync(t).then((e=>e.isDirectory()?r:undefined),(r=>r.code==="ENOENT"?findMade(e,n(t),t):undefined))};const findMadeSync=(e,t,r=undefined)=>{if(r===t)return undefined;try{return e.statSync(t).isDirectory()?r:undefined}catch(r){return r.code==="ENOENT"?findMadeSync(e,n(t),t):undefined}};e.exports={findMade:findMade,findMadeSync:findMadeSync}},356:(e,t,r)=>{const{dirname:n}=r(1017);const mkdirpManual=(e,t,r)=>{t.recursive=false;const i=n(e);if(i===e){return t.mkdirAsync(e,t).catch((e=>{if(e.code!=="EISDIR")throw e}))}return t.mkdirAsync(e,t).then((()=>r||e),(n=>{if(n.code==="ENOENT")return mkdirpManual(i,t).then((r=>mkdirpManual(e,t,r)));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;return t.statAsync(e).then((e=>{if(e.isDirectory())return r;else throw n}),(()=>{throw n}))}))};const mkdirpManualSync=(e,t,r)=>{const i=n(e);t.recursive=false;if(i===e){try{return t.mkdirSync(e,t)}catch(e){if(e.code!=="EISDIR")throw e;else return}}try{t.mkdirSync(e,t);return r||e}catch(n){if(n.code==="ENOENT")return mkdirpManualSync(e,t,mkdirpManualSync(i,t,r));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;try{if(!t.statSync(e).isDirectory())throw n}catch(e){throw n}}};e.exports={mkdirpManual:mkdirpManual,mkdirpManualSync:mkdirpManualSync}},4983:(e,t,r)=>{const{dirname:n}=r(1017);const{findMade:i,findMadeSync:s}=r(4992);const{mkdirpManual:a,mkdirpManualSync:o}=r(356);const mkdirpNative=(e,t)=>{t.recursive=true;const r=n(e);if(r===e)return t.mkdirAsync(e,t);return i(t,e).then((r=>t.mkdirAsync(e,t).then((()=>r)).catch((r=>{if(r.code==="ENOENT")return a(e,t);else throw r}))))};const mkdirpNativeSync=(e,t)=>{t.recursive=true;const r=n(e);if(r===e)return t.mkdirSync(e,t);const i=s(t,e);try{t.mkdirSync(e,t);return i}catch(r){if(r.code==="ENOENT")return o(e,t);else throw r}};e.exports={mkdirpNative:mkdirpNative,mkdirpNativeSync:mkdirpNativeSync}},2853:(e,t,r)=>{const{promisify:n}=r(3837);const i=r(7147);const optsArg=e=>{if(!e)e={mode:511&~process.umask(),fs:i};else if(typeof e==="object")e={mode:511&~process.umask(),fs:i,...e};else if(typeof e==="number")e={mode:e,fs:i};else if(typeof e==="string")e={mode:parseInt(e,8),fs:i};else throw new TypeError("invalid options argument");e.mkdir=e.mkdir||e.fs.mkdir||i.mkdir;e.mkdirAsync=n(e.mkdir);e.stat=e.stat||e.fs.stat||i.stat;e.statAsync=n(e.stat);e.statSync=e.statSync||e.fs.statSync||i.statSync;e.mkdirSync=e.mkdirSync||e.fs.mkdirSync||i.mkdirSync;return e};e.exports=optsArg},2930:(e,t,r)=>{const n=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform;const{resolve:i,parse:s}=r(1017);const pathArg=e=>{if(/\0/.test(e)){throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"})}e=i(e);if(n==="win32"){const t=/[*|"<>?:]/;const{root:r}=s(e);if(t.test(e.substr(r.length))){throw Object.assign(new Error("Illegal characters in path."),{path:e,code:"EINVAL"})}}return e};e.exports=pathArg},4518:(e,t,r)=>{const n=r(7147);const i=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version;const s=i.replace(/^v/,"").split(".");const a=+s[0]>10||+s[0]===10&&+s[1]>=12;const o=!a?()=>false:e=>e.mkdir===n.mkdir;const l=!a?()=>false:e=>e.mkdirSync===n.mkdirSync;e.exports={useNative:o,useNativeSync:l}},4833:e=>{e.exports=Pend;function Pend(){this.pending=0;this.max=Infinity;this.listeners=[];this.waiting=[];this.error=null}Pend.prototype.go=function(e){if(this.pending<this.max){pendGo(this,e)}else{this.waiting.push(e)}};Pend.prototype.wait=function(e){if(this.pending===0){e(this.error)}else{this.listeners.push(e)}};Pend.prototype.hold=function(){return pendHold(this)};function pendHold(e){e.pending+=1;var t=false;return onCb;function onCb(r){if(t)throw new Error("callback called twice");t=true;e.error=e.error||r;e.pending-=1;if(e.waiting.length>0&&e.pending<e.max){pendGo(e,e.waiting.shift())}else if(e.pending===0){var n=e.listeners;e.listeners=[];n.forEach(cbListener)}}function cbListener(t){t(e.error)}}function pendGo(e,t){t(pendHold(e))}},4674:(e,t,r)=>{"use strict";var n;n=r(4016);n=r(5923);n=r(1525);n=r(4404);n=r(5317);r(7900);r(7628);t.Parse=r(8917);r(8116);r(5450);r(6043);r(7996);r(4173)},4016:(e,t,r)=>{"use strict";const n=r(5274);const i=r(7900);const s=r(7147);const a=r(7714);const o=r(1525);const l=r(1017);const c=e.exports=(e,t,r)=>{if(typeof t==="function")r=t;if(Array.isArray(e))t=e,e={};if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");t=Array.from(t);const i=n(e);if(i.sync&&typeof r==="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof r==="function")throw new TypeError("callback only supported with file option");return i.file&&i.sync?createFileSync(i,t):i.file?createFile(i,t,r):i.sync?createSync(i,t):create(i,t)};const createFileSync=(e,t)=>{const r=new i.Sync(e);const n=new a.WriteStreamSync(e.file,{mode:e.mode||438});r.pipe(n);addFilesSync(r,t)};const createFile=(e,t,r)=>{const n=new i(e);const s=new a.WriteStream(e.file,{mode:e.mode||438});n.pipe(s);const o=new Promise(((e,t)=>{s.on("error",t);s.on("close",e);n.on("error",t)}));addFilesAsync(n,t);return r?o.then(r,r):o};const addFilesSync=(e,t)=>{t.forEach((t=>{if(t.charAt(0)==="@")o({file:l.resolve(e.cwd,t.substr(1)),sync:true,noResume:true,onentry:t=>e.add(t)});else e.add(t)}));e.end()};const addFilesAsync=(e,t)=>{while(t.length){const r=t.shift();if(r.charAt(0)==="@")return o({file:l.resolve(e.cwd,r.substr(1)),noResume:true,onentry:t=>e.add(t)}).then((r=>addFilesAsync(e,t)));else e.add(r)}e.end()};const createSync=(e,t)=>{const r=new i.Sync(e);addFilesSync(r,t);return r};const create=(e,t)=>{const r=new i(e);addFilesAsync(r,t);return r}},5317:(e,t,r)=>{"use strict";const n=r(5274);const i=r(7628);const s=r(7147);const a=r(7714);const o=r(1017);const l=e.exports=(e,t,r)=>{if(typeof e==="function")r=e,t=null,e={};else if(Array.isArray(e))t=e,e={};if(typeof t==="function")r=t,t=null;if(!t)t=[];else t=Array.from(t);const i=n(e);if(i.sync&&typeof r==="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof r==="function")throw new TypeError("callback only supported with file option");if(t.length)filesFilter(i,t);return i.file&&i.sync?extractFileSync(i):i.file?extractFile(i,r):i.sync?extractSync(i):extract(i)};const filesFilter=(e,t)=>{const r=new Map(t.map((e=>[e.replace(/\/+$/,""),true])));const n=e.filter;const mapHas=(e,t)=>{const n=t||o.parse(e).root||".";const i=e===n?false:r.has(e)?r.get(e):mapHas(o.dirname(e),n);r.set(e,i);return i};e.filter=n?(e,t)=>n(e,t)&&mapHas(e.replace(/\/+$/,"")):e=>mapHas(e.replace(/\/+$/,""))};const extractFileSync=e=>{const t=new i.Sync(e);const r=e.file;let n=true;let o;const l=s.statSync(r);const c=e.maxReadSize||16*1024*1024;const u=new a.ReadStreamSync(r,{readSize:c,size:l.size});u.pipe(t)};const extractFile=(e,t)=>{const r=new i(e);const n=e.maxReadSize||16*1024*1024;const o=e.file;const l=new Promise(((e,t)=>{r.on("error",t);r.on("close",e);s.stat(o,((e,i)=>{if(e)t(e);else{const e=new a.ReadStream(o,{readSize:n,size:i.size});e.on("error",t);e.pipe(r)}}))}));return t?l.then(t,t):l};const extractSync=e=>new i.Sync(e);const extract=e=>new i(e)},1172:(e,t,r)=>{const n=process.env.__FAKE_PLATFORM__||process.platform;const i=n==="win32";const s=global.__FAKE_TESTING_FS__||r(7147);const{O_CREAT:a,O_TRUNC:o,O_WRONLY:l,UV_FS_O_FILEMAP:c=0}=s.constants;const u=i&&!!c;const h=512*1024;const d=c|o|a|l;e.exports=!u?()=>"w":e=>e<h?d:"w"},6043:(e,t,r)=>{"use strict";const n=r(4173);const i=r(1017).posix;const s=r(2370);const a=Symbol("slurp");const o=Symbol("type");class Header{constructor(e,t,r,n){this.cksumValid=false;this.needPax=false;this.nullBlock=false;this.block=null;this.path=null;this.mode=null;this.uid=null;this.gid=null;this.size=null;this.mtime=null;this.cksum=null;this[o]="0";this.linkpath=null;this.uname=null;this.gname=null;this.devmaj=0;this.devmin=0;this.atime=null;this.ctime=null;if(Buffer.isBuffer(e))this.decode(e,t||0,r,n);else if(e)this.set(e)}decode(e,t,r,n){if(!t)t=0;if(!e||!(e.length>=t+512))throw new Error("need 512 bytes for header");this.path=decString(e,t,100);this.mode=decNumber(e,t+100,8);this.uid=decNumber(e,t+108,8);this.gid=decNumber(e,t+116,8);this.size=decNumber(e,t+124,12);this.mtime=decDate(e,t+136,12);this.cksum=decNumber(e,t+148,12);this[a](r);this[a](n,true);this[o]=decString(e,t+156,1);if(this[o]==="")this[o]="0";if(this[o]==="0"&&this.path.substr(-1)==="/")this[o]="5";if(this[o]==="5")this.size=0;this.linkpath=decString(e,t+157,100);if(e.slice(t+257,t+265).toString()==="ustar\x0000"){this.uname=decString(e,t+265,32);this.gname=decString(e,t+297,32);this.devmaj=decNumber(e,t+329,8);this.devmin=decNumber(e,t+337,8);if(e[t+475]!==0){const r=decString(e,t+345,155);this.path=r+"/"+this.path}else{const r=decString(e,t+345,130);if(r)this.path=r+"/"+this.path;this.atime=decDate(e,t+476,12);this.ctime=decDate(e,t+488,12)}}let i=8*32;for(let r=t;r<t+148;r++){i+=e[r]}for(let r=t+156;r<t+512;r++){i+=e[r]}this.cksumValid=i===this.cksum;if(this.cksum===null&&i===8*32)this.nullBlock=true}[a](e,t){for(let r in e){if(e[r]!==null&&e[r]!==undefined&&!(t&&r==="path"))this[r]=e[r]}}encode(e,t){if(!e){e=this.block=Buffer.alloc(512);t=0}if(!t)t=0;if(!(e.length>=t+512))throw new Error("need 512 bytes for header");const r=this.ctime||this.atime?130:155;const n=splitPrefix(this.path||"",r);const i=n[0];const s=n[1];this.needPax=n[2];this.needPax=encString(e,t,100,i)||this.needPax;this.needPax=encNumber(e,t+100,8,this.mode)||this.needPax;this.needPax=encNumber(e,t+108,8,this.uid)||this.needPax;this.needPax=encNumber(e,t+116,8,this.gid)||this.needPax;this.needPax=encNumber(e,t+124,12,this.size)||this.needPax;this.needPax=encDate(e,t+136,12,this.mtime)||this.needPax;e[t+156]=this[o].charCodeAt(0);this.needPax=encString(e,t+157,100,this.linkpath)||this.needPax;e.write("ustar\x0000",t+257,8);this.needPax=encString(e,t+265,32,this.uname)||this.needPax;this.needPax=encString(e,t+297,32,this.gname)||this.needPax;this.needPax=encNumber(e,t+329,8,this.devmaj)||this.needPax;this.needPax=encNumber(e,t+337,8,this.devmin)||this.needPax;this.needPax=encString(e,t+345,r,s)||this.needPax;if(e[t+475]!==0)this.needPax=encString(e,t+345,155,s)||this.needPax;else{this.needPax=encString(e,t+345,130,s)||this.needPax;this.needPax=encDate(e,t+476,12,this.atime)||this.needPax;this.needPax=encDate(e,t+488,12,this.ctime)||this.needPax}let a=8*32;for(let r=t;r<t+148;r++){a+=e[r]}for(let r=t+156;r<t+512;r++){a+=e[r]}this.cksum=a;encNumber(e,t+148,8,this.cksum);this.cksumValid=true;return this.needPax}set(e){for(let t in e){if(e[t]!==null&&e[t]!==undefined)this[t]=e[t]}}get type(){return n.name.get(this[o])||this[o]}get typeKey(){return this[o]}set type(e){if(n.code.has(e))this[o]=n.code.get(e);else this[o]=e}}const splitPrefix=(e,t)=>{const r=100;let n=e;let s="";let a;const o=i.parse(e).root||".";if(Buffer.byteLength(n)<r)a=[n,s,false];else{s=i.dirname(n);n=i.basename(n);do{if(Buffer.byteLength(n)<=r&&Buffer.byteLength(s)<=t)a=[n,s,false];else if(Buffer.byteLength(n)>r&&Buffer.byteLength(s)<=t)a=[n.substr(0,r-1),s,true];else{n=i.join(i.basename(s),n);s=i.dirname(s)}}while(s!==o&&!a);if(!a)a=[e.substr(0,r-1),"",true]}return a};const decString=(e,t,r)=>e.slice(t,t+r).toString("utf8").replace(/\0.*/,"");const decDate=(e,t,r)=>numToDate(decNumber(e,t,r));const numToDate=e=>e===null?null:new Date(e*1e3);const decNumber=(e,t,r)=>e[t]&128?s.parse(e.slice(t,t+r)):decSmallNumber(e,t,r);const nanNull=e=>isNaN(e)?null:e;const decSmallNumber=(e,t,r)=>nanNull(parseInt(e.slice(t,t+r).toString("utf8").replace(/\0.*$/,"").trim(),8));const l={12:8589934591,8:2097151};const encNumber=(e,t,r,n)=>n===null?false:n>l[r]||n<0?(s.encode(n,e.slice(t,t+r)),true):(encSmallNumber(e,t,r,n),false);const encSmallNumber=(e,t,r,n)=>e.write(octalString(n,r),t,r,"ascii");const octalString=(e,t)=>padOctal(Math.floor(e).toString(8),t);const padOctal=(e,t)=>(e.length===t-1?e:new Array(t-e.length-1).join("0")+e+" ")+"\0";const encDate=(e,t,r,n)=>n===null?false:encNumber(e,t,r,n.getTime()/1e3);const c=new Array(156).join("\0");const encString=(e,t,r,n)=>n===null?false:(e.write(n+c,t,r,"utf8"),n.length!==Buffer.byteLength(n)||n.length>r);e.exports=Header},5274:e=>{"use strict";const t=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);const r=e.exports=e=>e?Object.keys(e).map((r=>[t.has(r)?t.get(r):r,e[r]])).reduce(((e,t)=>(e[t[0]]=t[1],e)),Object.create(null)):{}},2370:(e,t)=>{"use strict";const r=t.encode=(e,t)=>{if(!Number.isSafeInteger(e))throw Error("cannot encode number outside of javascript safe integer range");else if(e<0)encodeNegative(e,t);else encodePositive(e,t);return t};const encodePositive=(e,t)=>{t[0]=128;for(var r=t.length;r>1;r--){t[r-1]=e&255;e=Math.floor(e/256)}};const encodeNegative=(e,t)=>{t[0]=255;var r=false;e=e*-1;for(var n=t.length;n>1;n--){var i=e&255;e=Math.floor(e/256);if(r)t[n-1]=onesComp(i);else if(i===0)t[n-1]=0;else{r=true;t[n-1]=twosComp(i)}}};const n=t.parse=e=>{var t=e[e.length-1];var r=e[0];var n;if(r===128)n=pos(e.slice(1,e.length));else if(r===255)n=twos(e);else throw Error("invalid base256 encoding");if(!Number.isSafeInteger(n))throw Error("parsed number outside of javascript safe integer range");return n};const twos=e=>{var t=e.length;var r=0;var n=false;for(var i=t-1;i>-1;i--){var s=e[i];var a;if(n)a=onesComp(s);else if(s===0)a=s;else{n=true;a=twosComp(s)}if(a!==0)r-=a*Math.pow(256,t-i-1)}return r};const pos=e=>{var t=e.length;var r=0;for(var n=t-1;n>-1;n--){var i=e[n];if(i!==0)r+=i*Math.pow(256,t-n-1)}return r};const onesComp=e=>(255^e)&255;const twosComp=e=>(255^e)+1&255},1525:(e,t,r)=>{"use strict";const n=r(5274);const i=r(8917);const s=r(7147);const a=r(7714);const o=r(1017);const l=e.exports=(e,t,r)=>{if(typeof e==="function")r=e,t=null,e={};else if(Array.isArray(e))t=e,e={};if(typeof t==="function")r=t,t=null;if(!t)t=[];else t=Array.from(t);const i=n(e);if(i.sync&&typeof r==="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof r==="function")throw new TypeError("callback only supported with file option");if(t.length)filesFilter(i,t);if(!i.noResume)onentryFunction(i);return i.file&&i.sync?listFileSync(i):i.file?listFile(i,r):list(i)};const onentryFunction=e=>{const t=e.onentry;e.onentry=t?e=>{t(e);e.resume()}:e=>e.resume()};const filesFilter=(e,t)=>{const r=new Map(t.map((e=>[e.replace(/\/+$/,""),true])));const n=e.filter;const mapHas=(e,t)=>{const n=t||o.parse(e).root||".";const i=e===n?false:r.has(e)?r.get(e):mapHas(o.dirname(e),n);r.set(e,i);return i};e.filter=n?(e,t)=>n(e,t)&&mapHas(e.replace(/\/+$/,"")):e=>mapHas(e.replace(/\/+$/,""))};const listFileSync=e=>{const t=list(e);const r=e.file;let n=true;let i;try{const a=s.statSync(r);const o=e.maxReadSize||16*1024*1024;if(a.size<o){t.end(s.readFileSync(r))}else{let e=0;const n=Buffer.allocUnsafe(o);i=s.openSync(r,"r");while(e<a.size){let r=s.readSync(i,n,0,o,e);e+=r;t.write(n.slice(0,r))}t.end()}n=false}finally{if(n&&i)try{s.closeSync(i)}catch(e){}}};const listFile=(e,t)=>{const r=new i(e);const n=e.maxReadSize||16*1024*1024;const o=e.file;const l=new Promise(((e,t)=>{r.on("error",t);r.on("end",e);s.stat(o,((e,i)=>{if(e)t(e);else{const e=new a.ReadStream(o,{readSize:n,size:i.size});e.on("error",t);e.pipe(r)}}))}));return t?l.then(t,t):l};const list=e=>new i(e)},9624:(e,t,r)=>{"use strict";const n=r(6186);const i=r(7147);const s=r(1017);const a=r(9051);class SymlinkError extends Error{constructor(e,t){super("Cannot extract through symbolic link");this.path=t;this.symlink=e}get name(){return"SylinkError"}}class CwdError extends Error{constructor(e,t){super(t+": Cannot cd into '"+e+"'");this.path=e;this.code=t}get name(){return"CwdError"}}const o=e.exports=(e,t,r)=>{const o=t.umask;const l=t.mode|448;const c=(l&o)!==0;const u=t.uid;const h=t.gid;const d=typeof u==="number"&&typeof h==="number"&&(u!==t.processUid||h!==t.processGid);const p=t.preserve;const m=t.unlink;const _=t.cache;const v=t.cwd;const done=(t,n)=>{if(t)r(t);else{_.set(e,true);if(n&&d)a(n,u,h,(e=>done(e)));else if(c)i.chmod(e,l,r);else r()}};if(_&&_.get(e)===true)return done();if(e===v)return i.stat(e,((t,r)=>{if(t||!r.isDirectory())t=new CwdError(e,t&&t.code||"ENOTDIR");done(t)}));if(p)return n(e,{mode:l}).then((e=>done(null,e)),done);const y=s.relative(v,e);const g=y.split(/\/|\\/);mkdir_(v,g,l,_,m,v,null,done)};const mkdir_=(e,t,r,n,s,a,o,l)=>{if(!t.length)return l(null,o);const c=t.shift();const u=e+"/"+c;if(n.get(u))return mkdir_(u,t,r,n,s,a,o,l);i.mkdir(u,r,onmkdir(u,t,r,n,s,a,o,l))};const onmkdir=(e,t,r,n,a,o,l,c)=>u=>{if(u){if(u.path&&s.dirname(u.path)===o&&(u.code==="ENOTDIR"||u.code==="ENOENT"))return c(new CwdError(o,u.code));i.lstat(e,((s,h)=>{if(s)c(s);else if(h.isDirectory())mkdir_(e,t,r,n,a,o,l,c);else if(a)i.unlink(e,(s=>{if(s)return c(s);i.mkdir(e,r,onmkdir(e,t,r,n,a,o,l,c))}));else if(h.isSymbolicLink())return c(new SymlinkError(e,e+"/"+t.join("/")));else c(u)}))}else{l=l||e;mkdir_(e,t,r,n,a,o,l,c)}};const l=e.exports.sync=(e,t)=>{const r=t.umask;const o=t.mode|448;const l=(o&r)!==0;const c=t.uid;const u=t.gid;const h=typeof c==="number"&&typeof u==="number"&&(c!==t.processUid||u!==t.processGid);const d=t.preserve;const p=t.unlink;const m=t.cache;const _=t.cwd;const done=t=>{m.set(e,true);if(t&&h)a.sync(t,c,u);if(l)i.chmodSync(e,o)};if(m&&m.get(e)===true)return done();if(e===_){let t=false;let r="ENOTDIR";try{t=i.statSync(e).isDirectory()}catch(e){r=e.code}finally{if(!t)throw new CwdError(e,r)}done();return}if(d)return done(n.sync(e,o));const v=s.relative(_,e);const y=v.split(/\/|\\/);let g=null;for(let e=y.shift(),t=_;e&&(t+="/"+e);e=y.shift()){if(m.get(t))continue;try{i.mkdirSync(t,o);g=g||t;m.set(t,true)}catch(e){if(e.path&&s.dirname(e.path)===_&&(e.code==="ENOTDIR"||e.code==="ENOENT"))return new CwdError(_,e.code);const r=i.lstatSync(t);if(r.isDirectory()){m.set(t,true);continue}else if(p){i.unlinkSync(t);i.mkdirSync(t,o);g=g||t;m.set(t,true);continue}else if(r.isSymbolicLink())return new SymlinkError(t,t+"/"+y.join("/"))}}return done(g)}},8371:e=>{"use strict";e.exports=(e,t,r)=>{e&=4095;if(r){e=(e|384)&~18}if(t){if(e&256)e|=64;if(e&32)e|=8;if(e&4)e|=1}return e}},7900:(e,t,r)=>{"use strict";class PackJob{constructor(e,t){this.path=e||"./";this.absolute=t;this.entry=null;this.stat=null;this.readdir=null;this.pending=false;this.ignore=false;this.piped=false}}const n=r(1077);const i=r(3486);const s=r(8116);const a=r(5450);const o=a.Sync;const l=a.Tar;const c=r(665);const u=Buffer.alloc(1024);const h=Symbol("onStat");const d=Symbol("ended");const p=Symbol("queue");const m=Symbol("current");const _=Symbol("process");const v=Symbol("processing");const y=Symbol("processJob");const g=Symbol("jobs");const w=Symbol("jobDone");const b=Symbol("addFSEntry");const S=Symbol("addTarEntry");const x=Symbol("stat");const E=Symbol("readdir");const R=Symbol("onreaddir");const O=Symbol("pipe");const N=Symbol("entry");const k=Symbol("entryOpt");const A=Symbol("writeEntryClass");const I=Symbol("write");const F=Symbol("ondrain");const T=r(7147);const L=r(1017);const D=r(5899);const C=D(class Pack extends n{constructor(e){super(e);e=e||Object.create(null);this.opt=e;this.file=e.file||"";this.cwd=e.cwd||process.cwd();this.maxReadSize=e.maxReadSize;this.preservePaths=!!e.preservePaths;this.strict=!!e.strict;this.noPax=!!e.noPax;this.prefix=(e.prefix||"").replace(/(\\|\/)+$/,"");this.linkCache=e.linkCache||new Map;this.statCache=e.statCache||new Map;this.readdirCache=e.readdirCache||new Map;this[A]=a;if(typeof e.onwarn==="function")this.on("warn",e.onwarn);this.portable=!!e.portable;this.zip=null;if(e.gzip){if(typeof e.gzip!=="object")e.gzip={};if(this.portable)e.gzip.portable=true;this.zip=new i.Gzip(e.gzip);this.zip.on("data",(e=>super.write(e)));this.zip.on("end",(e=>super.end()));this.zip.on("drain",(e=>this[F]()));this.on("resume",(e=>this.zip.resume()))}else this.on("drain",this[F]);this.noDirRecurse=!!e.noDirRecurse;this.follow=!!e.follow;this.noMtime=!!e.noMtime;this.mtime=e.mtime||null;this.filter=typeof e.filter==="function"?e.filter:e=>true;this[p]=new c;this[g]=0;this.jobs=+e.jobs||4;this[v]=false;this[d]=false}[I](e){return super.write(e)}add(e){this.write(e);return this}end(e){if(e)this.write(e);this[d]=true;this[_]();return this}write(e){if(this[d])throw new Error("write after end");if(e instanceof s)this[S](e);else this[b](e);return this.flowing}[S](e){const t=L.resolve(this.cwd,e.path);if(this.prefix)e.path=this.prefix+"/"+e.path.replace(/^\.(\/+|$)/,"");if(!this.filter(e.path,e))e.resume();else{const r=new PackJob(e.path,t,false);r.entry=new l(e,this[k](r));r.entry.on("end",(e=>this[w](r)));this[g]+=1;this[p].push(r)}this[_]()}[b](e){const t=L.resolve(this.cwd,e);if(this.prefix)e=this.prefix+"/"+e.replace(/^\.(\/+|$)/,"");this[p].push(new PackJob(e,t));this[_]()}[x](e){e.pending=true;this[g]+=1;const t=this.follow?"stat":"lstat";T[t](e.absolute,((t,r)=>{e.pending=false;this[g]-=1;if(t)this.emit("error",t);else this[h](e,r)}))}[h](e,t){this.statCache.set(e.absolute,t);e.stat=t;if(!this.filter(e.path,t))e.ignore=true;this[_]()}[E](e){e.pending=true;this[g]+=1;T.readdir(e.absolute,((t,r)=>{e.pending=false;this[g]-=1;if(t)return this.emit("error",t);this[R](e,r)}))}[R](e,t){this.readdirCache.set(e.absolute,t);e.readdir=t;this[_]()}[_](){if(this[v])return;this[v]=true;for(let e=this[p].head;e!==null&&this[g]<this.jobs;e=e.next){this[y](e.value);if(e.value.ignore){const t=e.next;this[p].removeNode(e);e.next=t}}this[v]=false;if(this[d]&&!this[p].length&&this[g]===0){if(this.zip)this.zip.end(u);else{super.write(u);super.end()}}}get[m](){return this[p]&&this[p].head&&this[p].head.value}[w](e){this[p].shift();this[g]-=1;this[_]()}[y](e){if(e.pending)return;if(e.entry){if(e===this[m]&&!e.piped)this[O](e);return}if(!e.stat){if(this.statCache.has(e.absolute))this[h](e,this.statCache.get(e.absolute));else this[x](e)}if(!e.stat)return;if(e.ignore)return;if(!this.noDirRecurse&&e.stat.isDirectory()&&!e.readdir){if(this.readdirCache.has(e.absolute))this[R](e,this.readdirCache.get(e.absolute));else this[E](e);if(!e.readdir)return}e.entry=this[N](e);if(!e.entry){e.ignore=true;return}if(e===this[m]&&!e.piped)this[O](e)}[k](e){return{onwarn:(e,t,r)=>this.warn(e,t,r),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime}}[N](e){this[g]+=1;try{return new this[A](e.path,this[k](e)).on("end",(()=>this[w](e))).on("error",(e=>this.emit("error",e)))}catch(e){this.emit("error",e)}}[F](){if(this[m]&&this[m].entry)this[m].entry.resume()}[O](e){e.piped=true;if(e.readdir)e.readdir.forEach((t=>{const r=this.prefix?e.path.slice(this.prefix.length+1)||"./":e.path;const n=r==="./"?"":r.replace(/\/*$/,"/");this[b](n+t)}));const t=e.entry;const r=this.zip;if(r)t.on("data",(e=>{if(!r.write(e))t.pause()}));else t.on("data",(e=>{if(!super.write(e))t.pause()}))}pause(){if(this.zip)this.zip.pause();return super.pause()}});class PackSync extends C{constructor(e){super(e);this[A]=o}pause(){}resume(){}[x](e){const t=this.follow?"statSync":"lstatSync";this[h](e,T[t](e.absolute))}[E](e,t){this[R](e,T.readdirSync(e.absolute))}[O](e){const t=e.entry;const r=this.zip;if(e.readdir)e.readdir.forEach((t=>{const r=this.prefix?e.path.slice(this.prefix.length+1)||"./":e.path;const n=r==="./"?"":r.replace(/\/*$/,"/");this[b](n+t)}));if(r)t.on("data",(e=>{r.write(e)}));else t.on("data",(e=>{super[I](e)}))}}C.Sync=PackSync;e.exports=C},8917:(e,t,r)=>{"use strict";const n=r(5899);const i=r(1017);const s=r(6043);const a=r(2361);const o=r(665);const l=1024*1024;const c=r(8116);const u=r(7996);const h=r(3486);const d=Buffer.from([31,139]);const p=Symbol("state");const m=Symbol("writeEntry");const _=Symbol("readEntry");const v=Symbol("nextEntry");const y=Symbol("processEntry");const g=Symbol("extendedHeader");const w=Symbol("globalExtendedHeader");const b=Symbol("meta");const S=Symbol("emitMeta");const x=Symbol("buffer");const E=Symbol("queue");const R=Symbol("ended");const O=Symbol("emittedEnd");const N=Symbol("emit");const k=Symbol("unzip");const A=Symbol("consumeChunk");const I=Symbol("consumeChunkSub");const F=Symbol("consumeBody");const T=Symbol("consumeMeta");const L=Symbol("consumeHeader");const D=Symbol("consuming");const C=Symbol("bufferConcat");const B=Symbol("maybeEnd");const M=Symbol("writing");const P=Symbol("aborted");const U=Symbol("onDone");const z=Symbol("sawValidEntry");const H=Symbol("sawNullBlock");const W=Symbol("sawEOF");const noop=e=>true;e.exports=n(class Parser extends a{constructor(e){e=e||{};super(e);this.file=e.file||"";this[z]=null;this.on(U,(e=>{if(this[p]==="begin"||this[z]===false){this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}}));if(e.ondone)this.on(U,e.ondone);else this.on(U,(e=>{this.emit("prefinish");this.emit("finish");this.emit("end");this.emit("close")}));this.strict=!!e.strict;this.maxMetaEntrySize=e.maxMetaEntrySize||l;this.filter=typeof e.filter==="function"?e.filter:noop;this.writable=true;this.readable=false;this[E]=new o;this[x]=null;this[_]=null;this[m]=null;this[p]="begin";this[b]="";this[g]=null;this[w]=null;this[R]=false;this[k]=null;this[P]=false;this[H]=false;this[W]=false;if(typeof e.onwarn==="function")this.on("warn",e.onwarn);if(typeof e.onentry==="function")this.on("entry",e.onentry)}[L](e,t){if(this[z]===null)this[z]=false;let r;try{r=new s(e,t,this[g],this[w])}catch(e){return this.warn("TAR_ENTRY_INVALID",e)}if(r.nullBlock){if(this[H]){this[W]=true;if(this[p]==="begin")this[p]="header";this[N]("eof")}else{this[H]=true;this[N]("nullBlock")}}else{this[H]=false;if(!r.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:r});else if(!r.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:r});else{const e=r.type;if(/^(Symbolic)?Link$/.test(e)&&!r.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:r});else if(!/^(Symbolic)?Link$/.test(e)&&r.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:r});else{const e=this[m]=new c(r,this[g],this[w]);if(!this[z]){if(e.remain){const onend=()=>{if(!e.invalid)this[z]=true};e.on("end",onend)}else{this[z]=true}}if(e.meta){if(e.size>this.maxMetaEntrySize){e.ignore=true;this[N]("ignoredEntry",e);this[p]="ignore";e.resume()}else if(e.size>0){this[b]="";e.on("data",(e=>this[b]+=e));this[p]="meta"}}else{this[g]=null;e.ignore=e.ignore||!this.filter(e.path,e);if(e.ignore){this[N]("ignoredEntry",e);this[p]=e.remain?"ignore":"header";e.resume()}else{if(e.remain)this[p]="body";else{this[p]="header";e.end()}if(!this[_]){this[E].push(e);this[v]()}else this[E].push(e)}}}}}}[y](e){let t=true;if(!e){this[_]=null;t=false}else if(Array.isArray(e))this.emit.apply(this,e);else{this[_]=e;this.emit("entry",e);if(!e.emittedEnd){e.on("end",(e=>this[v]()));t=false}}return t}[v](){do{}while(this[y](this[E].shift()));if(!this[E].length){const e=this[_];const t=!e||e.flowing||e.size===e.remain;if(t){if(!this[M])this.emit("drain")}else e.once("drain",(e=>this.emit("drain")))}}[F](e,t){const r=this[m];const n=r.blockRemain;const i=n>=e.length&&t===0?e:e.slice(t,t+n);r.write(i);if(!r.blockRemain){this[p]="header";this[m]=null;r.end()}return i.length}[T](e,t){const r=this[m];const n=this[F](e,t);if(!this[m])this[S](r);return n}[N](e,t,r){if(!this[E].length&&!this[_])this.emit(e,t,r);else this[E].push([e,t,r])}[S](e){this[N]("meta",this[b]);switch(e.type){case"ExtendedHeader":case"OldExtendedHeader":this[g]=u.parse(this[b],this[g],false);break;case"GlobalExtendedHeader":this[w]=u.parse(this[b],this[w],true);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[g]=this[g]||Object.create(null);this[g].path=this[b].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[g]=this[g]||Object.create(null);this[g].linkpath=this[b].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[P]=true;this.emit("abort",e);this.warn("TAR_ABORT",e,{recoverable:false})}write(e){if(this[P])return;if(this[k]===null&&e){if(this[x]){e=Buffer.concat([this[x],e]);this[x]=null}if(e.length<d.length){this[x]=e;return true}for(let t=0;this[k]===null&&t<d.length;t++){if(e[t]!==d[t])this[k]=false}if(this[k]===null){const t=this[R];this[R]=false;this[k]=new h.Unzip;this[k].on("data",(e=>this[A](e)));this[k].on("error",(e=>this.abort(e)));this[k].on("end",(e=>{this[R]=true;this[A]()}));this[M]=true;const r=this[k][t?"end":"write"](e);this[M]=false;return r}}this[M]=true;if(this[k])this[k].write(e);else this[A](e);this[M]=false;const t=this[E].length?false:this[_]?this[_].flowing:true;if(!t&&!this[E].length)this[_].once("drain",(e=>this.emit("drain")));return t}[C](e){if(e&&!this[P])this[x]=this[x]?Buffer.concat([this[x],e]):e}[B](){if(this[R]&&!this[O]&&!this[P]&&!this[D]){this[O]=true;const e=this[m];if(e&&e.blockRemain){const t=this[x]?this[x].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e});if(this[x])e.write(this[x]);e.end()}this[N](U)}}[A](e){if(this[D])this[C](e);else if(!e&&!this[x])this[B]();else{this[D]=true;if(this[x]){this[C](e);const t=this[x];this[x]=null;this[I](t)}else{this[I](e)}while(this[x]&&this[x].length>=512&&!this[P]&&!this[W]){const e=this[x];this[x]=null;this[I](e)}this[D]=false}if(!this[x]||this[R])this[B]()}[I](e){let t=0;let r=e.length;while(t+512<=r&&!this[P]&&!this[W]){switch(this[p]){case"begin":case"header":this[L](e,t);t+=512;break;case"ignore":case"body":t+=this[F](e,t);break;case"meta":t+=this[T](e,t);break;default:throw new Error("invalid state: "+this[p])}}if(t<r){if(this[x])this[x]=Buffer.concat([e.slice(t),this[x]]);else this[x]=e.slice(t)}}end(e){if(!this[P]){if(this[k])this[k].end(e);else{this[R]=true;this.write(e)}}}})},9587:(e,t,r)=>{const n=r(9491);e.exports=()=>{const e=new Map;const t=new Map;const{join:i}=r(1017);const getDirs=e=>i(e).split(/[\\\/]/).slice(0,-1).reduce(((e,t)=>e.length?e.concat(i(e[e.length-1],t)):[t]),[]);const s=new Set;const getQueues=r=>{const n=t.get(r);if(!n)throw new Error("function does not have any path reservations");return{paths:n.paths.map((t=>e.get(t))),dirs:[...n.dirs].map((t=>e.get(t)))}};const check=e=>{const{paths:t,dirs:r}=getQueues(e);return t.every((t=>t[0]===e))&&r.every((t=>t[0]instanceof Set&&t[0].has(e)))};const run=e=>{if(s.has(e)||!check(e))return false;s.add(e);e((()=>clear(e)));return true};const clear=r=>{if(!s.has(r))return false;const{paths:i,dirs:a}=t.get(r);const o=new Set;i.forEach((t=>{const i=e.get(t);n.equal(i[0],r);if(i.length===1)e.delete(t);else{i.shift();if(typeof i[0]==="function")o.add(i[0]);else i[0].forEach((e=>o.add(e)))}}));a.forEach((t=>{const i=e.get(t);n(i[0]instanceof Set);if(i[0].size===1&&i.length===1){e.delete(t)}else if(i[0].size===1){i.shift();o.add(i[0])}else i[0].delete(r)}));s.delete(r);o.forEach((e=>run(e)));return true};const reserve=(r,n)=>{const i=new Set(r.map((e=>getDirs(e))).reduce(((e,t)=>e.concat(t))));t.set(n,{dirs:i,paths:r});r.forEach((t=>{const r=e.get(t);if(!r)e.set(t,[n]);else r.push(n)}));i.forEach((t=>{const r=e.get(t);if(!r)e.set(t,[new Set([n])]);else if(r[r.length-1]instanceof Set)r[r.length-1].add(n);else r.push(new Set([n]))}));return run(n)};return{check:check,reserve:reserve}}},7996:(e,t,r)=>{"use strict";const n=r(6043);const i=r(1017);class Pax{constructor(e,t){this.atime=e.atime||null;this.charset=e.charset||null;this.comment=e.comment||null;this.ctime=e.ctime||null;this.gid=e.gid||null;this.gname=e.gname||null;this.linkpath=e.linkpath||null;this.mtime=e.mtime||null;this.path=e.path||null;this.size=e.size||null;this.uid=e.uid||null;this.uname=e.uname||null;this.dev=e.dev||null;this.ino=e.ino||null;this.nlink=e.nlink||null;this.global=t||false}encode(){const e=this.encodeBody();if(e==="")return null;const t=Buffer.byteLength(e);const r=512*Math.ceil(1+t/512);const s=Buffer.allocUnsafe(r);for(let e=0;e<512;e++){s[e]=0}new n({path:("PaxHeader/"+i.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:t,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(s);s.write(e,512,t,"utf8");for(let e=t+512;e<s.length;e++){s[e]=0}return s}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(e){if(this[e]===null||this[e]===undefined)return"";const t=this[e]instanceof Date?this[e].getTime()/1e3:this[e];const r=" "+(e==="dev"||e==="ino"||e==="nlink"?"SCHILY.":"")+e+"="+t+"\n";const n=Buffer.byteLength(r);let i=Math.floor(Math.log(n)/Math.log(10))+1;if(n+i>=Math.pow(10,i))i+=1;const s=i+n;return s+r}}Pax.parse=(e,t,r)=>new Pax(merge(parseKV(e),t),r);const merge=(e,t)=>t?Object.keys(e).reduce(((t,r)=>(t[r]=e[r],t)),t):e;const parseKV=e=>e.replace(/\n$/,"").split("\n").reduce(parseKVLine,Object.create(null));const parseKVLine=(e,t)=>{const r=parseInt(t,10);if(r!==Buffer.byteLength(t)+1)return e;t=t.substr((r+" ").length);const n=t.split("=");const i=n.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!i)return e;const s=n.join("=");e[i]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(i)?new Date(s*1e3):/^[0-9]+$/.test(s)?+s:s;return e};e.exports=Pax},8116:(e,t,r)=>{"use strict";const n=r(4173);const i=r(1077);const s=Symbol("slurp");e.exports=class ReadEntry extends i{constructor(e,t,r){super();this.pause();this.extended=t;this.globalExtended=r;this.header=e;this.startBlockSize=512*Math.ceil(e.size/512);this.blockRemain=this.startBlockSize;this.remain=e.size;this.type=e.type;this.meta=false;this.ignore=false;switch(this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=true;break;default:this.ignore=true}this.path=e.path;this.mode=e.mode;if(this.mode)this.mode=this.mode&4095;this.uid=e.uid;this.gid=e.gid;this.uname=e.uname;this.gname=e.gname;this.size=e.size;this.mtime=e.mtime;this.atime=e.atime;this.ctime=e.ctime;this.linkpath=e.linkpath;this.uname=e.uname;this.gname=e.gname;if(t)this[s](t);if(r)this[s](r,true)}write(e){const t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");const r=this.remain;const n=this.blockRemain;this.remain=Math.max(0,r-t);this.blockRemain=Math.max(0,n-t);if(this.ignore)return true;if(r>=t)return super.write(e);return super.write(e.slice(0,r))}[s](e,t){for(let r in e){if(e[r]!==null&&e[r]!==undefined&&!(t&&r==="path"))this[r]=e[r]}}}},5923:(e,t,r)=>{"use strict";const n=r(5274);const i=r(7900);const s=r(8917);const a=r(7147);const o=r(7714);const l=r(1525);const c=r(1017);const u=r(6043);const h=e.exports=(e,t,r)=>{const i=n(e);if(!i.file)throw new TypeError("file is required");if(i.gzip)throw new TypeError("cannot append to compressed archives");if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");t=Array.from(t);return i.sync?replaceSync(i,t):replace(i,t,r)};const replaceSync=(e,t)=>{const r=new i.Sync(e);let n=true;let s;let o;try{try{s=a.openSync(e.file,"r+")}catch(t){if(t.code==="ENOENT")s=a.openSync(e.file,"w+");else throw t}const i=a.fstatSync(s);const l=Buffer.alloc(512);e:for(o=0;o<i.size;o+=512){for(let e=0,t=0;e<512;e+=t){t=a.readSync(s,l,e,l.length-e,o+e);if(o===0&&l[0]===31&&l[1]===139)throw new Error("cannot append to compressed archives");if(!t)break e}let t=new u(l);if(!t.cksumValid)break;let r=512*Math.ceil(t.size/512);if(o+r+512>i.size)break;o+=r;if(e.mtimeCache)e.mtimeCache.set(t.path,t.mtime)}n=false;streamSync(e,r,o,s,t)}finally{if(n)try{a.closeSync(s)}catch(e){}}};const streamSync=(e,t,r,n,i)=>{const s=new o.WriteStreamSync(e.file,{fd:n,start:r});t.pipe(s);addFilesSync(t,i)};const replace=(e,t,r)=>{t=Array.from(t);const n=new i(e);const getPos=(t,r,n)=>{const cb=(e,r)=>{if(e)a.close(t,(t=>n(e)));else n(null,r)};let i=0;if(r===0)return cb(null,0);let s=0;const o=Buffer.alloc(512);const onread=(n,l)=>{if(n)return cb(n);s+=l;if(s<512&&l)return a.read(t,o,s,o.length-s,i+s,onread);if(i===0&&o[0]===31&&o[1]===139)return cb(new Error("cannot append to compressed archives"));if(s<512)return cb(null,i);const c=new u(o);if(!c.cksumValid)return cb(null,i);const h=512*Math.ceil(c.size/512);if(i+h+512>r)return cb(null,i);i+=h+512;if(i>=r)return cb(null,i);if(e.mtimeCache)e.mtimeCache.set(c.path,c.mtime);s=0;a.read(t,o,0,512,i,onread)};a.read(t,o,0,512,i,onread)};const s=new Promise(((r,i)=>{n.on("error",i);let s="r+";const onopen=(l,c)=>{if(l&&l.code==="ENOENT"&&s==="r+"){s="w+";return a.open(e.file,s,onopen)}if(l)return i(l);a.fstat(c,((s,a)=>{if(s)return i(s);getPos(c,a.size,((s,a)=>{if(s)return i(s);const l=new o.WriteStream(e.file,{fd:c,start:a});n.pipe(l);l.on("error",i);l.on("close",r);addFilesAsync(n,t)}))}))};a.open(e.file,s,onopen)}));return r?s.then(r,r):s};const addFilesSync=(e,t)=>{t.forEach((t=>{if(t.charAt(0)==="@")l({file:c.resolve(e.cwd,t.substr(1)),sync:true,noResume:true,onentry:t=>e.add(t)});else e.add(t)}));e.end()};const addFilesAsync=(e,t)=>{while(t.length){const r=t.shift();if(r.charAt(0)==="@")return l({file:c.resolve(e.cwd,r.substr(1)),noResume:true,onentry:t=>e.add(t)}).then((r=>addFilesAsync(e,t)));else e.add(r)}e.end()}},4173:(e,t)=>{"use strict";t.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);t.code=new Map(Array.from(t.name).map((e=>[e[1],e[0]])))},7628:(e,t,r)=>{"use strict";const n=r(9491);const i=r(2361).EventEmitter;const s=r(8917);const a=r(7147);const o=r(7714);const l=r(1017);const c=r(9624);const u=c.sync;const h=r(4808);const d=r(9587);const p=Symbol("onEntry");const m=Symbol("checkFs");const _=Symbol("checkFs2");const v=Symbol("isReusable");const y=Symbol("makeFs");const g=Symbol("file");const w=Symbol("directory");const b=Symbol("link");const S=Symbol("symlink");const x=Symbol("hardlink");const E=Symbol("unsupported");const R=Symbol("unknown");const O=Symbol("checkPath");const N=Symbol("mkdir");const k=Symbol("onError");const A=Symbol("pending");const I=Symbol("pend");const F=Symbol("unpend");const T=Symbol("ended");const L=Symbol("maybeClose");const D=Symbol("skip");const C=Symbol("doChown");const B=Symbol("uid");const M=Symbol("gid");const P=r(6113);const U=r(1172);const neverCalled=()=>{throw new Error("sync function called cb somehow?!?")};const unlinkFile=(e,t)=>{if(process.platform!=="win32")return a.unlink(e,t);const r=e+".DELETE."+P.randomBytes(16).toString("hex");a.rename(e,r,(e=>{if(e)return t(e);a.unlink(r,t)}))};const unlinkFileSync=e=>{if(process.platform!=="win32")return a.unlinkSync(e);const t=e+".DELETE."+P.randomBytes(16).toString("hex");a.renameSync(e,t);a.unlinkSync(t)};const uint32=(e,t,r)=>e===e>>>0?e:t===t>>>0?t:r;class Unpack extends s{constructor(e){if(!e)e={};e.ondone=e=>{this[T]=true;this[L]()};super(e);this.reservations=d();this.transform=typeof e.transform==="function"?e.transform:null;this.writable=true;this.readable=false;this[A]=0;this[T]=false;this.dirCache=e.dirCache||new Map;if(typeof e.uid==="number"||typeof e.gid==="number"){if(typeof e.uid!=="number"||typeof e.gid!=="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid;this.gid=e.gid;this.setOwner=true}else{this.uid=null;this.gid=null;this.setOwner=false}if(e.preserveOwner===undefined&&typeof e.uid!=="number")this.preserveOwner=process.getuid&&process.getuid()===0;else this.preserveOwner=!!e.preserveOwner;this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null;this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null;this.forceChown=e.forceChown===true;this.win32=!!e.win32||process.platform==="win32";this.newer=!!e.newer;this.keep=!!e.keep;this.noMtime=!!e.noMtime;this.preservePaths=!!e.preservePaths;this.unlink=!!e.unlink;this.cwd=l.resolve(e.cwd||process.cwd());this.strip=+e.strip||0;this.processUmask=process.umask();this.umask=typeof e.umask==="number"?e.umask:this.processUmask;this.dmode=e.dmode||511&~this.umask;this.fmode=e.fmode||438&~this.umask;this.on("entry",(e=>this[p](e)))}warn(e,t,r={}){if(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")r.recoverable=false;return super.warn(e,t,r)}[L](){if(this[T]&&this[A]===0){this.emit("prefinish");this.emit("finish");this.emit("end");this.emit("close")}}[O](e){if(this.strip){const t=e.path.split(/\/|\\/);if(t.length<this.strip)return false;e.path=t.slice(this.strip).join("/");if(e.type==="Link"){const t=e.linkpath.split(/\/|\\/);if(t.length>=this.strip)e.linkpath=t.slice(this.strip).join("/")}}if(!this.preservePaths){const t=e.path;if(t.match(/(^|\/|\\)\.\.(\\|\/|$)/)){this.warn("TAR_ENTRY_ERROR",`path contains '..'`,{entry:e,path:t});return false}if(l.win32.isAbsolute(t)){const r=l.win32.parse(t);e.path=t.substr(r.root.length);const n=r.root;this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:e,path:t})}}if(this.win32){const t=l.win32.parse(e.path);e.path=t.root===""?h.encode(e.path):t.root+h.encode(e.path.substr(t.root.length))}if(l.isAbsolute(e.path))e.absolute=e.path;else e.absolute=l.resolve(this.cwd,e.path);return true}[p](e){if(!this[O](e))return e.resume();n.equal(typeof e.absolute,"string");switch(e.type){case"Directory":case"GNUDumpDir":if(e.mode)e.mode=e.mode|448;case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[m](e);case"CharacterDevice":case"BlockDevice":case"FIFO":return this[E](e)}}[k](e,t){if(e.name==="CwdError")this.emit("error",e);else{this.warn("TAR_ENTRY_ERROR",e,{entry:t});this[F]();t.resume()}}[N](e,t,r){c(e,{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t},r)}[C](e){return this.forceChown||this.preserveOwner&&(typeof e.uid==="number"&&e.uid!==this.processUid||typeof e.gid==="number"&&e.gid!==this.processGid)||(typeof this.uid==="number"&&this.uid!==this.processUid||typeof this.gid==="number"&&this.gid!==this.processGid)}[B](e){return uint32(this.uid,e.uid,this.processUid)}[M](e){return uint32(this.gid,e.gid,this.processGid)}[g](e,t){const r=e.mode&4095||this.fmode;const n=new o.WriteStream(e.absolute,{flags:U(e.size),mode:r,autoClose:false});n.on("error",(t=>this[k](t,e)));let i=1;const done=r=>{if(r)return this[k](r,e);if(--i===0){a.close(n.fd,(r=>{t();r?this[k](r,e):this[F]()}))}};n.on("finish",(t=>{const r=e.absolute;const s=n.fd;if(e.mtime&&!this.noMtime){i++;const t=e.atime||new Date;const n=e.mtime;a.futimes(s,t,n,(e=>e?a.utimes(r,t,n,(t=>done(t&&e))):done()))}if(this[C](e)){i++;const t=this[B](e);const n=this[M](e);a.fchown(s,t,n,(e=>e?a.chown(r,t,n,(t=>done(t&&e))):done()))}done()}));const s=this.transform?this.transform(e)||e:e;if(s!==e){s.on("error",(t=>this[k](t,e)));e.pipe(s)}s.pipe(n)}[w](e,t){const r=e.mode&4095||this.dmode;this[N](e.absolute,r,(r=>{if(r){t();return this[k](r,e)}let n=1;const done=r=>{if(--n===0){t();this[F]();e.resume()}};if(e.mtime&&!this.noMtime){n++;a.utimes(e.absolute,e.atime||new Date,e.mtime,done)}if(this[C](e)){n++;a.chown(e.absolute,this[B](e),this[M](e),done)}done()}))}[E](e){e.unsupported=true;this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e});e.resume()}[S](e,t){this[b](e,e.linkpath,"symlink",t)}[x](e,t){this[b](e,l.resolve(this.cwd,e.linkpath),"link",t)}[I](){this[A]++}[F](){this[A]--;this[L]()}[D](e){this[F]();e.resume()}[v](e,t){return e.type==="File"&&!this.unlink&&t.isFile()&&t.nlink<=1&&process.platform!=="win32"}[m](e){this[I]();const t=[e.path];if(e.linkpath)t.push(e.linkpath);this.reservations.reserve(t,(t=>this[_](e,t)))}[_](e,t){this[N](l.dirname(e.absolute),this.dmode,(r=>{if(r){t();return this[k](r,e)}a.lstat(e.absolute,((r,n)=>{if(n&&(this.keep||this.newer&&n.mtime>e.mtime)){this[D](e);t()}else if(r||this[v](e,n)){this[y](null,e,t)}else if(n.isDirectory()){if(e.type==="Directory"){if(!e.mode||(n.mode&4095)===e.mode)this[y](null,e,t);else a.chmod(e.absolute,e.mode,(r=>this[y](r,e,t)))}else a.rmdir(e.absolute,(r=>this[y](r,e,t)))}else unlinkFile(e.absolute,(r=>this[y](r,e,t)))}))}))}[y](e,t,r){if(e)return this[k](e,t);switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[g](t,r);case"Link":return this[x](t,r);case"SymbolicLink":return this[S](t,r);case"Directory":case"GNUDumpDir":return this[w](t,r)}}[b](e,t,r,n){a[r](t,e.absolute,(t=>{if(t)return this[k](t,e);n();this[F]();e.resume()}))}}class UnpackSync extends Unpack{constructor(e){super(e)}[m](e){const t=this[N](l.dirname(e.absolute),this.dmode,neverCalled);if(t)return this[k](t,e);try{const r=a.lstatSync(e.absolute);if(this.keep||this.newer&&r.mtime>e.mtime)return this[D](e);else if(this[v](e,r))return this[y](null,e,neverCalled);else{try{if(r.isDirectory()){if(e.type==="Directory"){if(e.mode&&(r.mode&4095)!==e.mode)a.chmodSync(e.absolute,e.mode)}else a.rmdirSync(e.absolute)}else unlinkFileSync(e.absolute);return this[y](null,e,neverCalled)}catch(t){return this[k](t,e)}}}catch(t){return this[y](null,e,neverCalled)}}[g](e,t){const r=e.mode&4095||this.fmode;const oner=t=>{let r;try{a.closeSync(i)}catch(e){r=e}if(t||r)this[k](t||r,e)};let n;let i;try{i=a.openSync(e.absolute,U(e.size),r)}catch(e){return oner(e)}const s=this.transform?this.transform(e)||e:e;if(s!==e){s.on("error",(t=>this[k](t,e)));e.pipe(s)}s.on("data",(e=>{try{a.writeSync(i,e,0,e.length)}catch(e){oner(e)}}));s.on("end",(t=>{let r=null;if(e.mtime&&!this.noMtime){const t=e.atime||new Date;const n=e.mtime;try{a.futimesSync(i,t,n)}catch(i){try{a.utimesSync(e.absolute,t,n)}catch(e){r=i}}}if(this[C](e)){const t=this[B](e);const n=this[M](e);try{a.fchownSync(i,t,n)}catch(i){try{a.chownSync(e.absolute,t,n)}catch(e){r=r||i}}}oner(r)}))}[w](e,t){const r=e.mode&4095||this.dmode;const n=this[N](e.absolute,r);if(n)return this[k](n,e);if(e.mtime&&!this.noMtime){try{a.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch(n){}}if(this[C](e)){try{a.chownSync(e.absolute,this[B](e),this[M](e))}catch(n){}}e.resume()}[N](e,t){try{return c.sync(e,{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t})}catch(e){return e}}[b](e,t,r,n){try{a[r+"Sync"](t,e.absolute);e.resume()}catch(t){return this[k](t,e)}}}Unpack.Sync=UnpackSync;e.exports=Unpack},4404:(e,t,r)=>{"use strict";const n=r(5274);const i=r(5923);const s=e.exports=(e,t,r)=>{const s=n(e);if(!s.file)throw new TypeError("file is required");if(s.gzip)throw new TypeError("cannot append to compressed archives");if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");t=Array.from(t);mtimeFilter(s);return i(s,t,r)};const mtimeFilter=e=>{const t=e.filter;if(!e.mtimeCache)e.mtimeCache=new Map;e.filter=t?(r,n)=>t(r,n)&&!(e.mtimeCache.get(r)>n.mtime):(t,r)=>!(e.mtimeCache.get(t)>r.mtime)}},5899:e=>{"use strict";e.exports=e=>class extends e{warn(e,t,r={}){if(this.file)r.file=this.file;if(this.cwd)r.cwd=this.cwd;r.code=t instanceof Error&&t.code||e;r.tarCode=e;if(!this.strict&&r.recoverable!==false){if(t instanceof Error){r=Object.assign(t,r);t=t.message}this.emit("warn",r.tarCode,t,r)}else if(t instanceof Error){this.emit("error",Object.assign(t,r))}else this.emit("error",Object.assign(new Error(`${e}: ${t}`),r))}}},4808:e=>{"use strict";const t=["|","<",">","?",":"];const r=t.map((e=>String.fromCharCode(61440+e.charCodeAt(0))));const n=new Map(t.map(((e,t)=>[e,r[t]])));const i=new Map(r.map(((e,r)=>[e,t[r]])));e.exports={encode:e=>t.reduce(((e,t)=>e.split(t).join(n.get(t))),e),decode:e=>r.reduce(((e,t)=>e.split(t).join(i.get(t))),e)}},5450:(e,t,r)=>{"use strict";const n=r(1077);const i=r(7996);const s=r(6043);const a=r(8116);const o=r(7147);const l=r(1017);const c=r(4173);const u=16*1024*1024;const h=Symbol("process");const d=Symbol("file");const p=Symbol("directory");const m=Symbol("symlink");const _=Symbol("hardlink");const v=Symbol("header");const y=Symbol("read");const g=Symbol("lstat");const w=Symbol("onlstat");const b=Symbol("onread");const S=Symbol("onreadlink");const x=Symbol("openfile");const E=Symbol("onopenfile");const R=Symbol("close");const O=Symbol("mode");const N=r(5899);const k=r(4808);const A=r(8371);const I=N(class WriteEntry extends n{constructor(e,t){t=t||{};super(t);if(typeof e!=="string")throw new TypeError("path is required");this.path=e;this.portable=!!t.portable;this.myuid=process.getuid&&process.getuid();this.myuser=process.env.USER||"";this.maxReadSize=t.maxReadSize||u;this.linkCache=t.linkCache||new Map;this.statCache=t.statCache||new Map;this.preservePaths=!!t.preservePaths;this.cwd=t.cwd||process.cwd();this.strict=!!t.strict;this.noPax=!!t.noPax;this.noMtime=!!t.noMtime;this.mtime=t.mtime||null;if(typeof t.onwarn==="function")this.on("warn",t.onwarn);let r=false;if(!this.preservePaths&&l.win32.isAbsolute(e)){const t=l.win32.parse(e);this.path=e.substr(t.root.length);r=t.root}this.win32=!!t.win32||process.platform==="win32";if(this.win32){this.path=k.decode(this.path.replace(/\\/g,"/"));e=e.replace(/\\/g,"/")}this.absolute=t.absolute||l.resolve(this.cwd,e);if(this.path==="")this.path="./";if(r){this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path})}if(this.statCache.has(this.absolute))this[w](this.statCache.get(this.absolute));else this[g]()}[g](){o.lstat(this.absolute,((e,t)=>{if(e)return this.emit("error",e);this[w](t)}))}[w](e){this.statCache.set(this.absolute,e);this.stat=e;if(!e.isFile())e.size=0;this.type=getType(e);this.emit("stat",e);this[h]()}[h](){switch(this.type){case"File":return this[d]();case"Directory":return this[p]();case"SymbolicLink":return this[m]();default:return this.end()}}[O](e){return A(e,this.type==="Directory",this.portable)}[v](){if(this.type==="Directory"&&this.portable)this.noMtime=true;this.header=new s({path:this.path,linkpath:this.linkpath,mode:this[O](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime});if(this.header.encode()&&!this.noPax)this.write(new i({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this.path,linkpath:this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode());this.write(this.header.block)}[p](){if(this.path.substr(-1)!=="/")this.path+="/";this.stat.size=0;this[v]();this.end()}[m](){o.readlink(this.absolute,((e,t)=>{if(e)return this.emit("error",e);this[S](t)}))}[S](e){this.linkpath=e.replace(/\\/g,"/");this[v]();this.end()}[_](e){this.type="Link";this.linkpath=l.relative(this.cwd,e).replace(/\\/g,"/");this.stat.size=0;this[v]();this.end()}[d](){if(this.stat.nlink>1){const e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){const t=this.linkCache.get(e);if(t.indexOf(this.cwd)===0)return this[_](t)}this.linkCache.set(e,this.absolute)}this[v]();if(this.stat.size===0)return this.end();this[x]()}[x](){o.open(this.absolute,"r",((e,t)=>{if(e)return this.emit("error",e);this[E](t)}))}[E](e){const t=512*Math.ceil(this.stat.size/512);const r=Math.min(t,this.maxReadSize);const n=Buffer.allocUnsafe(r);this[y](e,n,0,n.length,0,this.stat.size,t)}[y](e,t,r,n,i,s,a){o.read(e,t,r,n,i,((o,l)=>{if(o){return this[R](e,(()=>this.emit("error",o)))}this[b](e,t,r,n,i,s,a,l)}))}[R](e,t){o.close(e,t)}[b](e,t,r,n,i,s,a,o){if(o<=0&&s>0){const t=new Error("encountered unexpected EOF");t.path=this.absolute;t.syscall="read";t.code="EOF";return this[R](e,(()=>this.emit("error",t)))}if(o>s){const t=new Error("did not encounter expected EOF");t.path=this.absolute;t.syscall="read";t.code="EOF";return this[R](e,(()=>this.emit("error",t)))}if(o===s){for(let e=o;e<n&&o<a;e++){t[e+r]=0;o++;s++}}const l=r===0&&o===t.length?t:t.slice(r,r+o);s-=o;a-=o;i+=o;r+=o;this.write(l);if(!s){if(a)this.write(Buffer.alloc(a));return this[R](e,(e=>e?this.emit("error",e):this.end()))}if(r>=n){t=Buffer.allocUnsafe(n);r=0}n=t.length-r;this[y](e,t,r,n,i,s,a)}});class WriteEntrySync extends I{constructor(e,t){super(e,t)}[g](){this[w](o.lstatSync(this.absolute))}[m](){this[S](o.readlinkSync(this.absolute))}[x](){this[E](o.openSync(this.absolute,"r"))}[y](e,t,r,n,i,s,a){let l=true;try{const c=o.readSync(e,t,r,n,i);this[b](e,t,r,n,i,s,a,c);l=false}finally{if(l)try{this[R](e,(()=>{}))}catch(e){}}}[R](e,t){o.closeSync(e);t()}}const F=N(class WriteEntryTar extends n{constructor(e,t){t=t||{};super(t);this.preservePaths=!!t.preservePaths;this.portable=!!t.portable;this.strict=!!t.strict;this.noPax=!!t.noPax;this.noMtime=!!t.noMtime;this.readEntry=e;this.type=e.type;if(this.type==="Directory"&&this.portable)this.noMtime=true;this.path=e.path;this.mode=this[O](e.mode);this.uid=this.portable?null:e.uid;this.gid=this.portable?null:e.gid;this.uname=this.portable?null:e.uname;this.gname=this.portable?null:e.gname;this.size=e.size;this.mtime=this.noMtime?null:t.mtime||e.mtime;this.atime=this.portable?null:e.atime;this.ctime=this.portable?null:e.ctime;this.linkpath=e.linkpath;if(typeof t.onwarn==="function")this.on("warn",t.onwarn);let r=false;if(l.isAbsolute(this.path)&&!this.preservePaths){const e=l.parse(this.path);r=e.root;this.path=this.path.substr(e.root.length)}this.remain=e.size;this.blockRemain=e.startBlockSize;this.header=new s({path:this.path,linkpath:this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime});if(r){this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path})}if(this.header.encode()&&!this.noPax)super.write(new i({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this.path,linkpath:this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode());super.write(this.header.block);e.pipe(this)}[O](e){return A(e,this.type==="Directory",this.portable)}write(e){const t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");this.blockRemain-=t;return super.write(e)}end(){if(this.blockRemain)this.write(Buffer.alloc(this.blockRemain));return super.end()}});I.Sync=WriteEntrySync;I.Tar=F;const getType=e=>e.isFile()?"File":e.isDirectory()?"Directory":e.isSymbolicLink()?"SymbolicLink":"Unsupported";e.exports=I},4091:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},665:(e,t,r)=>{"use strict";e.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(e){var t=this;if(!(t instanceof Yallist)){t=new Yallist}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach((function(e){t.push(e)}))}else if(arguments.length>0){for(var r=0,n=arguments.length;r<n;r++){t.push(arguments[r])}}return t}Yallist.prototype.removeNode=function(e){if(e.list!==this){throw new Error("removing node which does not belong to this list")}var t=e.next;var r=e.prev;if(t){t.prev=r}if(r){r.next=t}if(e===this.head){this.head=t}if(e===this.tail){this.tail=r}e.list.length--;e.next=null;e.prev=null;e.list=null;return t};Yallist.prototype.unshiftNode=function(e){if(e===this.head){return}if(e.list){e.list.removeNode(e)}var t=this.head;e.list=this;e.next=t;if(t){t.prev=e}this.head=e;if(!this.tail){this.tail=e}this.length++};Yallist.prototype.pushNode=function(e){if(e===this.tail){return}if(e.list){e.list.removeNode(e)}var t=this.tail;e.list=this;e.prev=t;if(t){t.next=e}this.tail=e;if(!this.head){this.head=e}this.length++};Yallist.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++){push(this,arguments[e])}return this.length};Yallist.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++){unshift(this,arguments[e])}return this.length};Yallist.prototype.pop=function(){if(!this.tail){return undefined}var e=this.tail.value;this.tail=this.tail.prev;if(this.tail){this.tail.next=null}else{this.head=null}this.length--;return e};Yallist.prototype.shift=function(){if(!this.head){return undefined}var e=this.head.value;this.head=this.head.next;if(this.head){this.head.prev=null}else{this.tail=null}this.length--;return e};Yallist.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;r!==null;n++){e.call(t,r.value,n,this);r=r.next}};Yallist.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;r!==null;n--){e.call(t,r.value,n,this);r=r.prev}};Yallist.prototype.get=function(e){for(var t=0,r=this.head;r!==null&&t<e;t++){r=r.next}if(t===e&&r!==null){return r.value}};Yallist.prototype.getReverse=function(e){for(var t=0,r=this.tail;r!==null&&t<e;t++){r=r.prev}if(t===e&&r!==null){return r.value}};Yallist.prototype.map=function(e,t){t=t||this;var r=new Yallist;for(var n=this.head;n!==null;){r.push(e.call(t,n.value,this));n=n.next}return r};Yallist.prototype.mapReverse=function(e,t){t=t||this;var r=new Yallist;for(var n=this.tail;n!==null;){r.push(e.call(t,n.value,this));n=n.prev}return r};Yallist.prototype.reduce=function(e,t){var r;var n=this.head;if(arguments.length>1){r=t}else if(this.head){n=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=0;n!==null;i++){r=e(r,n.value,i);n=n.next}return r};Yallist.prototype.reduceReverse=function(e,t){var r;var n=this.tail;if(arguments.length>1){r=t}else if(this.tail){n=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=this.length-1;n!==null;i--){r=e(r,n.value,i);n=n.prev}return r};Yallist.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,r=this.head;r!==null;t++){e[t]=r.value;r=r.next}return e};Yallist.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,r=this.tail;r!==null;t++){e[t]=r.value;r=r.prev}return e};Yallist.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(t<e||t<0){return r}if(e<0){e=0}if(t>this.length){t=this.length}for(var n=0,i=this.head;i!==null&&n<e;n++){i=i.next}for(;i!==null&&n<t;n++,i=i.next){r.push(i.value)}return r};Yallist.prototype.sliceReverse=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(t<e||t<0){return r}if(e<0){e=0}if(t>this.length){t=this.length}for(var n=this.length,i=this.tail;i!==null&&n>t;n--){i=i.prev}for(;i!==null&&n>e;n--,i=i.prev){r.push(i.value)}return r};Yallist.prototype.splice=function(e,t,...r){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var n=0,i=this.head;i!==null&&n<e;n++){i=i.next}var s=[];for(var n=0;i&&n<t;n++){s.push(i.value);i=this.removeNode(i)}if(i===null){i=this.tail}if(i!==this.head&&i!==this.tail){i=i.prev}for(var n=0;n<r.length;n++){i=insert(this,i,r[n])}return s};Yallist.prototype.reverse=function(){var e=this.head;var t=this.tail;for(var r=e;r!==null;r=r.prev){var n=r.prev;r.prev=r.next;r.next=n}this.head=t;this.tail=e;return this};function insert(e,t,r){var n=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);if(n.next===null){e.tail=n}if(n.prev===null){e.head=n}e.length++;return n}function push(e,t){e.tail=new Node(t,e.tail,null,e);if(!e.head){e.head=e.tail}e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e);if(!e.tail){e.tail=e.head}e.length++}function Node(e,t,r,n){if(!(this instanceof Node)){return new Node(e,t,r,n)}this.list=n;this.value=e;if(t){t.next=this;this.prev=t}else{this.prev=null}if(r){r.prev=this;this.next=r}else{this.next=null}}try{r(4091)(Yallist)}catch(e){}},8781:(e,t,r)=>{var n=r(7147);var i=r(9796);var s=r(5010);var a=r(4794);var o=r(3837);var l=r(2361).EventEmitter;var c=r(2781).Transform;var u=r(2781).PassThrough;var h=r(2781).Writable;t.open=open;t.fromFd=fromFd;t.fromBuffer=fromBuffer;t.fromRandomAccessReader=fromRandomAccessReader;t.dosDateTimeToDate=dosDateTimeToDate;t.validateFileName=validateFileName;t.ZipFile=ZipFile;t.Entry=Entry;t.RandomAccessReader=RandomAccessReader;function open(e,t,r){if(typeof t==="function"){r=t;t=null}if(t==null)t={};if(t.autoClose==null)t.autoClose=true;if(t.lazyEntries==null)t.lazyEntries=false;if(t.decodeStrings==null)t.decodeStrings=true;if(t.validateEntrySizes==null)t.validateEntrySizes=true;if(t.strictFileNames==null)t.strictFileNames=false;if(r==null)r=defaultCallback;n.open(e,"r",(function(e,i){if(e)return r(e);fromFd(i,t,(function(e,t){if(e)n.close(i,defaultCallback);r(e,t)}))}))}function fromFd(e,t,r){if(typeof t==="function"){r=t;t=null}if(t==null)t={};if(t.autoClose==null)t.autoClose=false;if(t.lazyEntries==null)t.lazyEntries=false;if(t.decodeStrings==null)t.decodeStrings=true;if(t.validateEntrySizes==null)t.validateEntrySizes=true;if(t.strictFileNames==null)t.strictFileNames=false;if(r==null)r=defaultCallback;n.fstat(e,(function(n,i){if(n)return r(n);var a=s.createFromFd(e,{autoClose:true});fromRandomAccessReader(a,i.size,t,r)}))}function fromBuffer(e,t,r){if(typeof t==="function"){r=t;t=null}if(t==null)t={};t.autoClose=false;if(t.lazyEntries==null)t.lazyEntries=false;if(t.decodeStrings==null)t.decodeStrings=true;if(t.validateEntrySizes==null)t.validateEntrySizes=true;if(t.strictFileNames==null)t.strictFileNames=false;var n=s.createFromBuffer(e,{maxChunkSize:65536});fromRandomAccessReader(n,e.length,t,r)}function fromRandomAccessReader(e,t,r,n){if(typeof r==="function"){n=r;r=null}if(r==null)r={};if(r.autoClose==null)r.autoClose=true;if(r.lazyEntries==null)r.lazyEntries=false;if(r.decodeStrings==null)r.decodeStrings=true;var i=!!r.decodeStrings;if(r.validateEntrySizes==null)r.validateEntrySizes=true;if(r.strictFileNames==null)r.strictFileNames=false;if(n==null)n=defaultCallback;if(typeof t!=="number")throw new Error("expected totalSize parameter to be a number");if(t>Number.MAX_SAFE_INTEGER){throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double.")}e.ref();var s=22;var a=65535;var o=Math.min(s+a,t);var l=p(o);var c=t-l.length;readAndAssertNoEof(e,l,0,o,c,(function(a){if(a)return n(a);for(var u=o-s;u>=0;u-=1){if(l.readUInt32LE(u)!==101010256)continue;var h=l.slice(u);var d=h.readUInt16LE(4);if(d!==0){return n(new Error("multi-disk zip files are not supported: found disk number: "+d))}var m=h.readUInt16LE(10);var _=h.readUInt32LE(16);var v=h.readUInt16LE(20);var y=h.length-s;if(v!==y){return n(new Error("invalid comment length. expected: "+y+". found: "+v))}var g=i?decodeBuffer(h,22,h.length,false):h.slice(22);if(!(m===65535||_===4294967295)){return n(null,new ZipFile(e,_,t,m,g,r.autoClose,r.lazyEntries,i,r.validateEntrySizes,r.strictFileNames))}var w=p(20);var b=c+u-w.length;readAndAssertNoEof(e,w,0,w.length,b,(function(s){if(s)return n(s);if(w.readUInt32LE(0)!==117853008){return n(new Error("invalid zip64 end of central directory locator signature"))}var a=readUInt64LE(w,8);var o=p(56);readAndAssertNoEof(e,o,0,o.length,a,(function(s){if(s)return n(s);if(o.readUInt32LE(0)!==101075792){return n(new Error("invalid zip64 end of central directory record signature"))}m=readUInt64LE(o,32);_=readUInt64LE(o,48);return n(null,new ZipFile(e,_,t,m,g,r.autoClose,r.lazyEntries,i,r.validateEntrySizes,r.strictFileNames))}))}));return}n(new Error("end of central directory record signature not found"))}))}o.inherits(ZipFile,l);function ZipFile(e,t,r,n,i,s,a,o,c,u){var h=this;l.call(h);h.reader=e;h.reader.on("error",(function(e){emitError(h,e)}));h.reader.once("close",(function(){h.emit("close")}));h.readEntryCursor=t;h.fileSize=r;h.entryCount=n;h.comment=i;h.entriesRead=0;h.autoClose=!!s;h.lazyEntries=!!a;h.decodeStrings=!!o;h.validateEntrySizes=!!c;h.strictFileNames=!!u;h.isOpen=true;h.emittedError=false;if(!h.lazyEntries)h._readEntry()}ZipFile.prototype.close=function(){if(!this.isOpen)return;this.isOpen=false;this.reader.unref()};function emitErrorAndAutoClose(e,t){if(e.autoClose)e.close();emitError(e,t)}function emitError(e,t){if(e.emittedError)return;e.emittedError=true;e.emit("error",t)}ZipFile.prototype.readEntry=function(){if(!this.lazyEntries)throw new Error("readEntry() called without lazyEntries:true");this._readEntry()};ZipFile.prototype._readEntry=function(){var e=this;if(e.entryCount===e.entriesRead){setImmediate((function(){if(e.autoClose)e.close();if(e.emittedError)return;e.emit("end")}));return}if(e.emittedError)return;var r=p(46);readAndAssertNoEof(e.reader,r,0,r.length,e.readEntryCursor,(function(n){if(n)return emitErrorAndAutoClose(e,n);if(e.emittedError)return;var i=new Entry;var s=r.readUInt32LE(0);if(s!==33639248)return emitErrorAndAutoClose(e,new Error("invalid central directory file header signature: 0x"+s.toString(16)));i.versionMadeBy=r.readUInt16LE(4);i.versionNeededToExtract=r.readUInt16LE(6);i.generalPurposeBitFlag=r.readUInt16LE(8);i.compressionMethod=r.readUInt16LE(10);i.lastModFileTime=r.readUInt16LE(12);i.lastModFileDate=r.readUInt16LE(14);i.crc32=r.readUInt32LE(16);i.compressedSize=r.readUInt32LE(20);i.uncompressedSize=r.readUInt32LE(24);i.fileNameLength=r.readUInt16LE(28);i.extraFieldLength=r.readUInt16LE(30);i.fileCommentLength=r.readUInt16LE(32);i.internalFileAttributes=r.readUInt16LE(36);i.externalFileAttributes=r.readUInt32LE(38);i.relativeOffsetOfLocalHeader=r.readUInt32LE(42);if(i.generalPurposeBitFlag&64)return emitErrorAndAutoClose(e,new Error("strong encryption is not supported"));e.readEntryCursor+=46;r=p(i.fileNameLength+i.extraFieldLength+i.fileCommentLength);readAndAssertNoEof(e.reader,r,0,r.length,e.readEntryCursor,(function(n){if(n)return emitErrorAndAutoClose(e,n);if(e.emittedError)return;var s=(i.generalPurposeBitFlag&2048)!==0;i.fileName=e.decodeStrings?decodeBuffer(r,0,i.fileNameLength,s):r.slice(0,i.fileNameLength);var o=i.fileNameLength+i.extraFieldLength;var l=r.slice(i.fileNameLength,o);i.extraFields=[];var c=0;while(c<l.length-3){var u=l.readUInt16LE(c+0);var h=l.readUInt16LE(c+2);var d=c+4;var m=d+h;if(m>l.length)return emitErrorAndAutoClose(e,new Error("extra field length exceeds extra field buffer size"));var _=p(h);l.copy(_,0,d,m);i.extraFields.push({id:u,data:_});c=m}i.fileComment=e.decodeStrings?decodeBuffer(r,o,o+i.fileCommentLength,s):r.slice(o,o+i.fileCommentLength);i.comment=i.fileComment;e.readEntryCursor+=r.length;e.entriesRead+=1;if(i.uncompressedSize===4294967295||i.compressedSize===4294967295||i.relativeOffsetOfLocalHeader===4294967295){var v=null;for(var c=0;c<i.extraFields.length;c++){var y=i.extraFields[c];if(y.id===1){v=y.data;break}}if(v==null){return emitErrorAndAutoClose(e,new Error("expected zip64 extended information extra field"))}var g=0;if(i.uncompressedSize===4294967295){if(g+8>v.length){return emitErrorAndAutoClose(e,new Error("zip64 extended information extra field does not include uncompressed size"))}i.uncompressedSize=readUInt64LE(v,g);g+=8}if(i.compressedSize===4294967295){if(g+8>v.length){return emitErrorAndAutoClose(e,new Error("zip64 extended information extra field does not include compressed size"))}i.compressedSize=readUInt64LE(v,g);g+=8}if(i.relativeOffsetOfLocalHeader===4294967295){if(g+8>v.length){return emitErrorAndAutoClose(e,new Error("zip64 extended information extra field does not include relative header offset"))}i.relativeOffsetOfLocalHeader=readUInt64LE(v,g);g+=8}}if(e.decodeStrings){for(var c=0;c<i.extraFields.length;c++){var y=i.extraFields[c];if(y.id===28789){if(y.data.length<6){continue}if(y.data.readUInt8(0)!==1){continue}var w=y.data.readUInt32LE(1);if(a.unsigned(r.slice(0,i.fileNameLength))!==w){continue}i.fileName=decodeBuffer(y.data,5,y.data.length,true);break}}}if(e.validateEntrySizes&&i.compressionMethod===0){var b=i.uncompressedSize;if(i.isEncrypted()){b+=12}if(i.compressedSize!==b){var S="compressed/uncompressed size mismatch for stored file: "+i.compressedSize+" != "+i.uncompressedSize;return emitErrorAndAutoClose(e,new Error(S))}}if(e.decodeStrings){if(!e.strictFileNames){i.fileName=i.fileName.replace(/\\/g,"/")}var x=t.validateFileName(i.fileName);if(x!=null)return emitErrorAndAutoClose(e,new Error(x))}e.emit("entry",i);if(!e.lazyEntries)e._readEntry()}))}))};ZipFile.prototype.openReadStream=function(e,t,r){var n=this;var s=0;var a=e.compressedSize;if(r==null){r=t;t={}}else{if(t.decrypt!=null){if(!e.isEncrypted()){throw new Error("options.decrypt can only be specified for encrypted entries")}if(t.decrypt!==false)throw new Error("invalid options.decrypt value: "+t.decrypt);if(e.isCompressed()){if(t.decompress!==false)throw new Error("entry is encrypted and compressed, and options.decompress !== false")}}if(t.decompress!=null){if(!e.isCompressed()){throw new Error("options.decompress can only be specified for compressed entries")}if(!(t.decompress===false||t.decompress===true)){throw new Error("invalid options.decompress value: "+t.decompress)}}if(t.start!=null||t.end!=null){if(e.isCompressed()&&t.decompress!==false){throw new Error("start/end range not allowed for compressed entry without options.decompress === false")}if(e.isEncrypted()&&t.decrypt!==false){throw new Error("start/end range not allowed for encrypted entry without options.decrypt === false")}}if(t.start!=null){s=t.start;if(s<0)throw new Error("options.start < 0");if(s>e.compressedSize)throw new Error("options.start > entry.compressedSize")}if(t.end!=null){a=t.end;if(a<0)throw new Error("options.end < 0");if(a>e.compressedSize)throw new Error("options.end > entry.compressedSize");if(a<s)throw new Error("options.end < options.start")}}if(!n.isOpen)return r(new Error("closed"));if(e.isEncrypted()){if(t.decrypt!==false)return r(new Error("entry is encrypted, and options.decrypt !== false"))}n.reader.ref();var o=p(30);readAndAssertNoEof(n.reader,o,0,o.length,e.relativeOffsetOfLocalHeader,(function(l){try{if(l)return r(l);var c=o.readUInt32LE(0);if(c!==67324752){return r(new Error("invalid local file header signature: 0x"+c.toString(16)))}var u=o.readUInt16LE(26);var h=o.readUInt16LE(28);var d=e.relativeOffsetOfLocalHeader+o.length+u+h;var p;if(e.compressionMethod===0){p=false}else if(e.compressionMethod===8){p=t.decompress!=null?t.decompress:true}else{return r(new Error("unsupported compression method: "+e.compressionMethod))}var m=d;var _=m+e.compressedSize;if(e.compressedSize!==0){if(_>n.fileSize){return r(new Error("file data overflows file bounds: "+m+" + "+e.compressedSize+" > "+n.fileSize))}}var v=n.reader.createReadStream({start:m+s,end:m+a});var y=v;if(p){var g=false;var w=i.createInflateRaw();v.on("error",(function(e){setImmediate((function(){if(!g)w.emit("error",e)}))}));v.pipe(w);if(n.validateEntrySizes){y=new AssertByteCountStream(e.uncompressedSize);w.on("error",(function(e){setImmediate((function(){if(!g)y.emit("error",e)}))}));w.pipe(y)}else{y=w}y.destroy=function(){g=true;if(w!==y)w.unpipe(y);v.unpipe(w);v.destroy()}}r(null,y)}finally{n.reader.unref()}}))};function Entry(){}Entry.prototype.getLastModDate=function(){return dosDateTimeToDate(this.lastModFileDate,this.lastModFileTime)};Entry.prototype.isEncrypted=function(){return(this.generalPurposeBitFlag&1)!==0};Entry.prototype.isCompressed=function(){return this.compressionMethod===8};function dosDateTimeToDate(e,t){var r=e&31;var n=(e>>5&15)-1;var i=(e>>9&127)+1980;var s=0;var a=(t&31)*2;var o=t>>5&63;var l=t>>11&31;return new Date(i,n,r,l,o,a,s)}function validateFileName(e){if(e.indexOf("\\")!==-1){return"invalid characters in fileName: "+e}if(/^[a-zA-Z]:/.test(e)||/^\//.test(e)){return"absolute path: "+e}if(e.split("/").indexOf("..")!==-1){return"invalid relative path: "+e}return null}function readAndAssertNoEof(e,t,r,n,i,s){if(n===0){return setImmediate((function(){s(null,p(0))}))}e.read(t,r,n,i,(function(e,t){if(e)return s(e);if(t<n){return s(new Error("unexpected EOF"))}s()}))}o.inherits(AssertByteCountStream,c);function AssertByteCountStream(e){c.call(this);this.actualByteCount=0;this.expectedByteCount=e}AssertByteCountStream.prototype._transform=function(e,t,r){this.actualByteCount+=e.length;if(this.actualByteCount>this.expectedByteCount){var n="too many bytes in the stream. expected "+this.expectedByteCount+". got at least "+this.actualByteCount;return r(new Error(n))}r(null,e)};AssertByteCountStream.prototype._flush=function(e){if(this.actualByteCount<this.expectedByteCount){var t="not enough bytes in the stream. expected "+this.expectedByteCount+". got only "+this.actualByteCount;return e(new Error(t))}e()};o.inherits(RandomAccessReader,l);function RandomAccessReader(){l.call(this);this.refCount=0}RandomAccessReader.prototype.ref=function(){this.refCount+=1};RandomAccessReader.prototype.unref=function(){var e=this;e.refCount-=1;if(e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");e.close(onCloseDone);function onCloseDone(t){if(t)return e.emit("error",t);e.emit("close")}};RandomAccessReader.prototype.createReadStream=function(e){var t=e.start;var r=e.end;if(t===r){var n=new u;setImmediate((function(){n.end()}));return n}var i=this._readStreamForRange(t,r);var s=false;var a=new RefUnrefFilter(this);i.on("error",(function(e){setImmediate((function(){if(!s)a.emit("error",e)}))}));a.destroy=function(){i.unpipe(a);a.unref();i.destroy()};var o=new AssertByteCountStream(r-t);a.on("error",(function(e){setImmediate((function(){if(!s)o.emit("error",e)}))}));o.destroy=function(){s=true;a.unpipe(o);a.destroy()};return i.pipe(a).pipe(o)};RandomAccessReader.prototype._readStreamForRange=function(e,t){throw new Error("not implemented")};RandomAccessReader.prototype.read=function(e,t,r,n,i){var s=this.createReadStream({start:n,end:n+r});var a=new h;var o=0;a._write=function(r,n,i){r.copy(e,t+o,0,r.length);o+=r.length;i()};a.on("finish",i);s.on("error",(function(e){i(e)}));s.pipe(a)};RandomAccessReader.prototype.close=function(e){setImmediate(e)};o.inherits(RefUnrefFilter,u);function RefUnrefFilter(e){u.call(this);this.context=e;this.context.ref();this.unreffedYet=false}RefUnrefFilter.prototype._flush=function(e){this.unref();e()};RefUnrefFilter.prototype.unref=function(e){if(this.unreffedYet)return;this.unreffedYet=true;this.context.unref()};var d="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ";function decodeBuffer(e,t,r,n){if(n){return e.toString("utf8",t,r)}else{var i="";for(var s=t;s<r;s++){i+=d[e[s]]}return i}}function readUInt64LE(e,t){var r=e.readUInt32LE(t);var n=e.readUInt32LE(t+4);return n*4294967296+r}var p;if(typeof Buffer.allocUnsafe==="function"){p=function(e){return Buffer.allocUnsafe(e)}}else{p=function(e){return new Buffer(e)}}function defaultCallback(e){if(e)throw e}},9491:e=>{"use strict";e.exports=require("assert")},4300:e=>{"use strict";e.exports=require("buffer")},2081:e=>{"use strict";e.exports=require("child_process")},2057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1017:e=>{"use strict";e.exports=require("path")},2781:e=>{"use strict";e.exports=require("stream")},1576:e=>{"use strict";e.exports=require("string_decoder")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={exports:{}};var s=true;try{e[r].call(i.exports,i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(3423);module.exports=r})();
2
+ (()=>{var e={3423:function(e,t,r){(function(e){"use strict";var $estr=function(){return js_Boot.__string_rec(this,"")},t=t||{},n;function $extend(e,t){var r=Object.create(e);for(var n in t)r[n]=t[n];if(t.toString!==Object.prototype.toString)r.toString=t.toString;return r}var i=t["Attribute"]={__ename__:true,__constructs__:null,Off:{_hx_name:"Off",_hx_index:0,__enum__:"Attribute",toString:$estr},Bold:{_hx_name:"Bold",_hx_index:1,__enum__:"Attribute",toString:$estr},Underline:{_hx_name:"Underline",_hx_index:2,__enum__:"Attribute",toString:$estr},Blink:{_hx_name:"Blink",_hx_index:3,__enum__:"Attribute",toString:$estr},ReverseVideo:{_hx_name:"ReverseVideo",_hx_index:4,__enum__:"Attribute",toString:$estr},Concealed:{_hx_name:"Concealed",_hx_index:5,__enum__:"Attribute",toString:$estr},BoldOff:{_hx_name:"BoldOff",_hx_index:6,__enum__:"Attribute",toString:$estr},UnderlineOff:{_hx_name:"UnderlineOff",_hx_index:7,__enum__:"Attribute",toString:$estr},BlinkOff:{_hx_name:"BlinkOff",_hx_index:8,__enum__:"Attribute",toString:$estr},NormalVideo:{_hx_name:"NormalVideo",_hx_index:9,__enum__:"Attribute",toString:$estr},ConcealedOff:{_hx_name:"ConcealedOff",_hx_index:10,__enum__:"Attribute",toString:$estr},Black:{_hx_name:"Black",_hx_index:11,__enum__:"Attribute",toString:$estr},Red:{_hx_name:"Red",_hx_index:12,__enum__:"Attribute",toString:$estr},Green:{_hx_name:"Green",_hx_index:13,__enum__:"Attribute",toString:$estr},Yellow:{_hx_name:"Yellow",_hx_index:14,__enum__:"Attribute",toString:$estr},Blue:{_hx_name:"Blue",_hx_index:15,__enum__:"Attribute",toString:$estr},Magenta:{_hx_name:"Magenta",_hx_index:16,__enum__:"Attribute",toString:$estr},Cyan:{_hx_name:"Cyan",_hx_index:17,__enum__:"Attribute",toString:$estr},White:{_hx_name:"White",_hx_index:18,__enum__:"Attribute",toString:$estr},DefaultForeground:{_hx_name:"DefaultForeground",_hx_index:19,__enum__:"Attribute",toString:$estr},BlackBack:{_hx_name:"BlackBack",_hx_index:20,__enum__:"Attribute",toString:$estr},RedBack:{_hx_name:"RedBack",_hx_index:21,__enum__:"Attribute",toString:$estr},GreenBack:{_hx_name:"GreenBack",_hx_index:22,__enum__:"Attribute",toString:$estr},YellowBack:{_hx_name:"YellowBack",_hx_index:23,__enum__:"Attribute",toString:$estr},BlueBack:{_hx_name:"BlueBack",_hx_index:24,__enum__:"Attribute",toString:$estr},MagentaBack:{_hx_name:"MagentaBack",_hx_index:25,__enum__:"Attribute",toString:$estr},CyanBack:{_hx_name:"CyanBack",_hx_index:26,__enum__:"Attribute",toString:$estr},WhiteBack:{_hx_name:"WhiteBack",_hx_index:27,__enum__:"Attribute",toString:$estr},DefaultBackground:{_hx_name:"DefaultBackground",_hx_index:28,__enum__:"Attribute",toString:$estr}};i.__constructs__=[i.Off,i.Bold,i.Underline,i.Blink,i.ReverseVideo,i.Concealed,i.BoldOff,i.UnderlineOff,i.BlinkOff,i.NormalVideo,i.ConcealedOff,i.Black,i.Red,i.Green,i.Yellow,i.Blue,i.Magenta,i.Cyan,i.White,i.DefaultForeground,i.BlackBack,i.RedBack,i.GreenBack,i.YellowBack,i.BlueBack,i.MagentaBack,i.CyanBack,i.WhiteBack,i.DefaultBackground];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){return null}};Reflect.fields=function(e){var t=[];if(e!=null){var r=Object.prototype.hasOwnProperty;for(var n in e){if(n!="__id__"&&n!="hx__closures__"&&r.call(e,n)){t.push(n)}}}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 n=Reflect.fields(e);while(r<n.length){var i=n[r];++r;t[i]=Reflect.field(e,i)}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 n=typeof e;if(n=="function"&&(e.__name__||e.__ename__)){n="object"}switch(n){case"function":return"<function>";case"object":if(e.__enum__){var i=t[e.__enum__];var s=i.__constructs__[e._hx_index];var a=s._hx_name;if(s.__params__){r=r+"\t";return a+"("+function(t){var n;var i=[];{var a=0;var o=s.__params__;while(true){if(!(a<o.length)){break}var l=o[a];a=a+1;i.push(js_Boot.__string_rec(e[l],r))}}n=i;return n}(this).join(",")+")"}else{return a}}if(e instanceof Array){var o="[";r+="\t";var l=0;var c=e.length;while(l<c){var u=l++;o+=(u>0?",":"")+js_Boot.__string_rec(e[u],r)}o+="]";return o}var h;try{h=e.toString}catch(l){return"???"}if(h!=null&&h!=Object.toString&&typeof h=="function"){var f=e.toString();if(f!="[object Object]"){return f}}var o="{\n";r+="\t";var d=e.hasOwnProperty!=null;var p=null;for(p in e){if(d&&!e.hasOwnProperty(p)){continue}if(p=="prototype"||p=="__class__"||p=="__super__"||p=="__interfaces__"||p=="__properties__"){continue}if(o.length!=2){o+=", \n"}o+=r+p+" : "+js_Boot.__string_rec(e[p],r)}r=r.substring(1);o+="\n"+r+"}";return o;case"string":return e;default:return String(e)}};js_Boot.__interfLoop=function(e,t){if(e==null){return false}if(e==t){return true}var r=e.__interfaces__;if(r!=null){var n=0;var i=r.length;while(n<i){var s=n++;var a=r[s];if(a==t||js_Boot.__interfLoop(a,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 B:return typeof e=="boolean";case T:return e!=null;case C:return typeof e=="number";case F: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==D?e.__name__!=null:false){return true}if(r==M?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){var t=parseInt(e);if(isNaN(t)){return null}return t};var ANSI=function(){};ANSI.__name__=true;ANSI.aset=function(e){if(ANSI.strip||ANSI.stripIfUnavailable&&!ANSI.available){return""}var t=""+"[";var r=[];var n=0;while(n<e.length){var s=e[n];++n;if(!js_Boot.__instanceof(s,i)){throw haxe_Exception.thrown("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){}return e==0}else{return process.env["ANSICON"]!=null}};var EReg=function(e,t){this.r=new RegExp(e,t.split("u").join(""))};EReg.__name__=true;EReg.prototype={match:function(e){if(this.r.global){this.r.lastIndex=0}this.r.m=this.r.exec(e);this.r.s=e;return this.r.m!=null},__class__:EReg};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.now=function(){return Date.now()};Math.__name__=true;var StringBuf=function(){this.b=""};StringBuf.__name__=true;StringBuf.prototype={__class__:StringBuf};var haxe_SysTools=function(){};haxe_SysTools.__name__=true;haxe_SysTools.quoteUnixArg=function(e){if(e==""){return"''"}if(!new EReg("[^a-zA-Z0-9_@%+=:,./-]","").match(e)){return e}return"'"+StringTools.replace(e,"'","'\"'\"'")+"'"};haxe_SysTools.quoteWinArg=function(e,t){if(!new EReg('^(/)?[^ \t/\\\\"]+$',"").match(e)){var r="";var n=e.indexOf(" ")!=-1||e.indexOf("\t")!=-1||e==""||e.indexOf("/")>0;if(n){r+='"'}var i=new StringBuf;var s=0;var a=e.length;while(s<a){var o=s++;var l=HxOverrides.cca(e,o);if(l==null){var c=l;if(i.b.length>0){r+=Std.string(i.b);i=new StringBuf}r+=String.fromCodePoint(c)}else{switch(l){case 34:var u=i.b;r+=u==null?"null":""+u;r+=u==null?"null":""+u;i=new StringBuf;r+='\\"';break;case 92:i.b+="\\";break;default:var h=l;if(i.b.length>0){r+=Std.string(i.b);i=new StringBuf}r+=String.fromCodePoint(h)}}}r+=Std.string(i.b);if(n){r+=Std.string(i.b);r+='"'}e=r}if(t){var r="";var s=0;var a=e.length;while(s<a){var o=s++;var c=HxOverrides.cca(e,o);if(haxe_SysTools.winMetaCharacters.indexOf(c)>=0){r+=String.fromCodePoint(94)}r+=String.fromCodePoint(c)}return r}else{return e}};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 n=e.length;if(n>=r){return e.indexOf(t,n-r)==n-r}else{return false}};StringTools.isSpace=function(e,t){var r=HxOverrides.cca(e,t);if(!(r>8&&r<14)){return r==32}else{return true}};StringTools.ltrim=function(e){var t=e.length;var r=0;while(r<t&&StringTools.isSpace(e,r))++r;if(r>0){return HxOverrides.substr(e,r,t-r)}else{return e}};StringTools.rtrim=function(e){var t=e.length;var r=0;while(r<t&&StringTools.isSpace(e,t-r-1))++r;if(r>0){return HxOverrides.substr(e,0,t-r)}else{return e}};StringTools.trim=function(e){return StringTools.ltrim(StringTools.rtrim(e))};StringTools.lpad=function(e,t,r){if(t.length<=0){return e}var n="";r-=e.length;while(n.length<r)n+=t==null?"null":""+t;n+=e==null?"null":""+e;return n};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 haxe_exceptions_NotImplementedException(null,null,{fileName:"haxe/io/Output.hx",lineNumber:47,className:"haxe.io.Output",methodName:"writeByte"})},writeBytes:function(e,t,r){if(t<0||r<0||t+r>e.length){throw haxe_Exception.thrown(c.OutsideBounds)}var n=e.b;var i=r;while(i>0){this.writeByte(n[t]);++t;--i}return r},writeFullBytes:function(e,t,r){while(r>0){var n=this.writeBytes(e,t,r);t+=n;r-=n}},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 n=e.b;return d.writeSync(this.fd,g.from(n.buffer,n.byteOffset,e.length),t,r)},writeString:function(e,t){d.writeSync(this.fd,e)},__class__:_$Sys_FileOutput});var haxe_io_Input=function(){};haxe_io_Input.__name__=true;haxe_io_Input.prototype={readByte:function(){throw new haxe_exceptions_NotImplementedException(null,null,{fileName:"haxe/io/Input.hx",lineNumber:53,className:"haxe.io.Input",methodName:"readByte"})},readBytes:function(e,t,r){var n=r;var i=e.b;if(t<0||r<0||t+r>e.length){throw haxe_Exception.thrown(c.OutsideBounds)}try{while(n>0){i[t]=this.readByte();++t;--n}}catch(e){if(!(haxe_Exception.caught(e).unwrap()instanceof haxe_io_Eof)){throw e}}return r-n},read:function(e){var t=new haxe_io_Bytes(new ArrayBuffer(e));var r=0;while(e>0){var n=this.readBytes(t,r,e);if(n==0){throw haxe_Exception.thrown(c.Blocked)}r+=n;e-=n}return t},__class__:haxe_io_Input};var Type=function(){};Type.__name__=true;Type.enumParameters=function(e){var r=t[e.__enum__];var n=r.__constructs__[e._hx_index].__params__;if(n!=null){var i=[];var s=0;while(s<n.length){var a=n[s];++s;i.push(e[a])}return i}else{return[]}};var a=t["haxe.StackItem"]={__ename__:true,__constructs__:null,CFunction:{_hx_name:"CFunction",_hx_index:0,__enum__:"haxe.StackItem",toString:$estr},Module:(n=function(e){return{_hx_index:1,m:e,__enum__:"haxe.StackItem",toString:$estr}},n._hx_name="Module",n.__params__=["m"],n),FilePos:(n=function(e,t,r,n){return{_hx_index:2,s:e,file:t,line:r,column:n,__enum__:"haxe.StackItem",toString:$estr}},n._hx_name="FilePos",n.__params__=["s","file","line","column"],n),Method:(n=function(e,t){return{_hx_index:3,classname:e,method:t,__enum__:"haxe.StackItem",toString:$estr}},n._hx_name="Method",n.__params__=["classname","method"],n),LocalFunction:(n=function(e){return{_hx_index:4,v:e,__enum__:"haxe.StackItem",toString:$estr}},n._hx_name="LocalFunction",n.__params__=["v"],n)};a.__constructs__=[a.CFunction,a.Module,a.FilePos,a.Method,a.LocalFunction];var haxe_IMap=function(){};haxe_IMap.__name__=true;haxe_IMap.__isInterface__=true;var haxe_Exception=function(e,t,r){Error.call(this,e);this.message=e;this.__previousException=t;this.__nativeException=r!=null?r:this};haxe_Exception.__name__=true;haxe_Exception.caught=function(e){if(e instanceof haxe_Exception){return e}else if(e instanceof Error){return new haxe_Exception(e.message,null,e)}else{return new haxe_ValueException(e,null,e)}};haxe_Exception.thrown=function(e){if(e instanceof haxe_Exception){return e.get_native()}else if(e instanceof Error){return e}else{var t=new haxe_ValueException(e);return t}};haxe_Exception.__super__=Error;haxe_Exception.prototype=$extend(Error.prototype,{unwrap:function(){return this.__nativeException},toString:function(){return this.get_message()},get_message:function(){return this.message},get_native:function(){return this.__nativeException},__class__:haxe_Exception});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_ValueException=function(e,t,r){haxe_Exception.call(this,String(e),t,r);this.value=e};haxe_ValueException.__name__=true;haxe_ValueException.__super__=haxe_Exception;haxe_ValueException.prototype=$extend(haxe_Exception.prototype,{unwrap:function(){return this.value},__class__:haxe_ValueException});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 n=this.compare(e,r.key);if(n==0){return new haxe_ds_TreeNode(r.left,e,t,r.right,r==null?0:r._height)}else if(n<0){var i=this.setLoop(e,t,r.left);return this.balance(i,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,n){var i=e==null?0:e._height;var s=n==null?0:n._height;if(i>s+2){var a=e.left;var o=e.right;if((a==null?0:a._height)>=(o==null?0:o._height)){return new haxe_ds_TreeNode(e.left,e.key,e.value,new haxe_ds_TreeNode(e.right,t,r,n))}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,n))}}else if(s>i+2){var a=n.right;var o=n.left;if((a==null?0:a._height)>(o==null?0:o._height)){return new haxe_ds_TreeNode(new haxe_ds_TreeNode(e,t,r,n.left),n.key,n.value,n.right)}else{return new haxe_ds_TreeNode(new haxe_ds_TreeNode(e,t,r,n.left.left),n.left.key,n.left.value,new haxe_ds_TreeNode(n.left.right,n.key,n.value,n.right))}}else{return new haxe_ds_TreeNode(e,t,r,n,(i>s?i:s)+1)}},compare:function(e,t){return Reflect.compare(e,t)},__class__:haxe_ds_BalancedTree};var haxe_ds_TreeNode=function(e,t,r,n,i){if(i==null){i=-1}this.left=e;this.key=t;this.value=r;this.right=n;if(i==-1){var s;var a=this.left;var o=this.right;if((a==null?0:a._height)>(o==null?0:o._height)){var a=this.left;s=a==null?0:a._height}else{var a=this.right;s=a==null?0:a._height}this._height=s+1}else{this._height=i}};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 n=Type.enumParameters(e);var i=Type.enumParameters(t);if(n.length==0&&i.length==0){return 0}return this.compareArgs(n,i)},compareArgs:function(e,t){var r=e.length-t.length;if(r!=0){return r}var n=0;var i=e.length;while(n<i){var s=n++;var a=this.compareArg(e[s],t[s]);if(a!=0){return a}}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 o=t["haxe.ds.Option"]={__ename__:true,__constructs__:null,Some:(n=function(e){return{_hx_index:0,v:e,__enum__:"haxe.ds.Option",toString:$estr}},n._hx_name="Some",n.__params__=["v"],n),None:{_hx_name:"None",_hx_index:1,__enum__:"haxe.ds.Option",toString:$estr}};o.__constructs__=[o.Some,o.None];var haxe_ds_StringMap=function(){this.h=Object.create(null)};haxe_ds_StringMap.__name__=true;haxe_ds_StringMap.__interfaces__=[haxe_IMap];haxe_ds_StringMap.prototype={__class__:haxe_ds_StringMap};var haxe_exceptions_PosException=function(e,t,r){haxe_Exception.call(this,e,t);if(r==null){this.posInfos={fileName:"(unknown)",lineNumber:0,className:"(unknown)",methodName:"(unknown)"}}else{this.posInfos=r}};haxe_exceptions_PosException.__name__=true;haxe_exceptions_PosException.__super__=haxe_Exception;haxe_exceptions_PosException.prototype=$extend(haxe_Exception.prototype,{toString:function(){return""+haxe_Exception.prototype.toString.call(this)+" in "+this.posInfos.className+"."+this.posInfos.methodName+" at "+this.posInfos.fileName+":"+this.posInfos.lineNumber},__class__:haxe_exceptions_PosException});var haxe_exceptions_NotImplementedException=function(e,t,r){if(e==null){e="Not implemented"}haxe_exceptions_PosException.call(this,e,t,r)};haxe_exceptions_NotImplementedException.__name__=true;haxe_exceptions_NotImplementedException.__super__=haxe_exceptions_PosException;haxe_exceptions_NotImplementedException.prototype=$extend(haxe_exceptions_PosException.prototype,{__class__:haxe_exceptions_NotImplementedException});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 n=0;var i=e.length;while(n<i){var s=n++;var a=e.charCodeAt(s);r[s<<1]=a&255;r[s<<1|1]=a>>8}return new haxe_io_Bytes(r.buffer)}var o=[];var s=0;while(s<e.length){var a=e.charCodeAt(s++);if(55296<=a&&a<=56319){a=a-55232<<10|e.charCodeAt(s++)&1023}if(a<=127){o.push(a)}else if(a<=2047){o.push(192|a>>6);o.push(128|a&63)}else if(a<=65535){o.push(224|a>>12);o.push(128|a>>6&63);o.push(128|a&63)}else{o.push(240|a>>18);o.push(128|a>>12&63);o.push(128|a>>6&63);o.push(128|a&63)}}return new haxe_io_Bytes(new Uint8Array(o).buffer)};haxe_io_Bytes.prototype={sub:function(e,t){if(e<0||t<0||e+t>this.length){throw haxe_Exception.thrown(c.OutsideBounds)}return new haxe_io_Bytes(this.b.buffer.slice(e+this.b.byteOffset,e+this.b.byteOffset+t))},getInt32:function(e){if(this.data==null){this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength)}return this.data.getInt32(e,true)},__class__:haxe_io_Bytes};var l=t["haxe.io.Encoding"]={__ename__:true,__constructs__:null,UTF8:{_hx_name:"UTF8",_hx_index:0,__enum__:"haxe.io.Encoding",toString:$estr},RawNative:{_hx_name:"RawNative",_hx_index:1,__enum__:"haxe.io.Encoding",toString:$estr}};l.__constructs__=[l.UTF8,l.RawNative];var haxe_io_Eof=function(){};haxe_io_Eof.__name__=true;haxe_io_Eof.prototype={toString:function(){return"Eof"},__class__:haxe_io_Eof};var c=t["haxe.io.Error"]={__ename__:true,__constructs__:null,Blocked:{_hx_name:"Blocked",_hx_index:0,__enum__:"haxe.io.Error",toString:$estr},Overflow:{_hx_name:"Overflow",_hx_index:1,__enum__:"haxe.io.Error",toString:$estr},OutsideBounds:{_hx_name:"OutsideBounds",_hx_index:2,__enum__:"haxe.io.Error",toString:$estr},Custom:(n=function(e){return{_hx_index:3,e:e,__enum__:"haxe.io.Error",toString:$estr}},n._hx_name="Custom",n.__params__=["e"],n)};c.__constructs__=[c.Blocked,c.Overflow,c.OutsideBounds,c.Custom];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 n=e.lastIndexOf(".");if(n!=-1){this.ext=HxOverrides.substr(e,n+1,null);this.file=HxOverrides.substr(e,0,n)}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.extension=function(e){var t=new haxe_io_Path(e);if(t.ext==null){return""}return t.ext};haxe_io_Path.join=function(e){var t=[];var r=0;var n=e;while(r<n.length){var i=n[r];++r;if(i!=null&&i!=""){t.push(i)}}var e=t;if(e.length==0){return""}var s=e[0];var t=1;var r=e.length;while(t<r){var a=t++;s=haxe_io_Path.addTrailingSlash(s);s+=e[a]}return haxe_io_Path.normalize(s)};haxe_io_Path.normalize=function(e){var t="/";e=e.split("\\").join(t);if(e==t){return t}var r=[];var n=0;var i=e.split(t);while(n<i.length){var s=i[n];++n;if(s==".."&&r.length>0&&r[r.length-1]!=".."){r.pop()}else if(s==""){if(r.length>0||HxOverrides.cca(e,0)==47){r.push(s)}}else if(s!="."){r.push(s)}}var a=r.join(t);var o="";var l=false;var c=false;var u=0;var h=a;while(u<h.length){var f=h;var d=u++;var p=f.charCodeAt(d);if(p>=55296&&p<=56319){p=p-55232<<10|f.charCodeAt(d+1)&1023}var _=p;if(_>=65536){++u}var m=_;switch(m){case 47:if(!l){c=true}else{var v=m;l=false;if(c){o+="/";c=false}o+=String.fromCodePoint(v)}break;case 58:o+=":";l=true;break;default:var y=m;l=false;if(c){o+="/";c=false}o+=String.fromCodePoint(y)}}return o};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.isAbsolute=function(e){if(StringTools.startsWith(e,"/")){return true}if(e.charAt(1)==":"){return true}if(StringTools.startsWith(e,"\\\\")){return true}return false};haxe_io_Path.prototype={__class__:haxe_io_Path};var haxe_iterators_ArrayIterator=function(e){this.current=0;this.array=e};haxe_iterators_ArrayIterator.__name__=true;haxe_iterators_ArrayIterator.prototype={hasNext:function(){return this.current<this.array.length},next:function(){return this.array[this.current++]},__class__:haxe_iterators_ArrayIterator};var haxeshim_Args=function(e,t){this.cwd=e;this.args=t};haxeshim_Args.__name__=true;haxeshim_Args.interpolate=function(e,t){if(e.indexOf("${")==-1){return p.Success(e)}var r="";var n=0;while(n<e.length){var i=e.indexOf("${",n);if(i==-1){var s=null;r+=s==null?HxOverrides.substr(e,n,null):HxOverrides.substr(e,n,s);break}else{var a=i;var o=a-n;r+=o==null?HxOverrides.substr(e,n,null):HxOverrides.substr(e,n,o);var l=a+2;var c;var u=e.indexOf("}",l);if(u==-1){return p.Failure("unclosed interpolation in "+e)}else{var h=u;c=h}var f=HxOverrides.substr(e,l,c-l);var d;var _=t(f);if(_==null){return p.Failure("unknown variable "+f)}else{var m=_;if(m=="$"+"{"+f+"}"){d=m}else{var v=haxeshim_Args.interpolate(m,t);if(v._hx_index==0){var y=v.data;d=y}else{var w=v;return w}}}r+=Std.string(d);n=c+1}}return p.Success(r)};haxeshim_Args.fromMultilineString=function(e,t,r,n){if(n==null){n=false}var i=[];var s=new haxeshim_Errors;var getVar1=function(e){if(e=="__dirname"){return haxe_io_Path.directory(t)}else{return r(e)}};var add=function(e,r){var add=function(e){i.push({pos:u.File(t,r),val:e})};if(e.charAt(0)=="-"){add(e)}else{var n=haxeshim_Args.interpolate(e,getVar1);switch(n._hx_index){case 0:var a=n.data;add(a);break;case 1:var o=n.failure;s.fail(o,u.File(t,r));break}}};var a=e.split("\n");var o=StringTools.trim;var l=new Array(a.length);var c=0;var h=a.length;while(c<h){var f=c++;l[f]=o(a[f])}var d=l;var c=0;var h=d.length;while(c<h){var p=c++;var _=d[p];var m=function(e){return function(t){add(t,e[0])}}([p]);var v=_.charAt(0);if(v!=null){switch(v){case"#":break;case"-":var y=_.indexOf(" ");if(y==-1){m(_)}else{var w=y;m(HxOverrides.substr(_,0,w));m(StringTools.trim(HxOverrides.substr(_,w,null)))}break;default:var g=StringTools.trim(_);if(g!=""){var b=g;if(n){m("-cp")}m(b)}}}}return s.produce(i)};haxeshim_Args.getNdll=function(e){if(StringTools.startsWith(e,"ndll:")){return o.Some(HxOverrides.substr(e,5,null))}else{return o.None}};haxeshim_Args.split=function(e,t,r,n){var i=[];var s=0;var a=e.length;while(s<a){var o=s++;i.push({val:e[o],pos:u.Cmd(o)})}var e=i;var l=[];var c=[];var h=[];var f=new haxeshim_Errors;var resolvePath=function(e){if(haxe_io_Path.isAbsolute(e)){return e}else{return haxe_io_Path.join([t,e])}};var flush=function(){if(c.length>0){var e=new haxeshim_Args(t,l.concat(c));c=[];h.push(e)}};while(true){var i=e.shift();if(i==null){flush();break}else{var d=i;var s=d.val;switch(s){case"--each":l=c;c=[];break;case"--next":flush();break;case"--cwd":case"-C":var a=e.shift();if(a==null){f.fail(""+d.val+" without argument",d.pos)}else{var p=a;t=resolvePath(p.val);if(!r.isDirectory(t)){f.fail("Cannot use "+t+" as working directory",p.pos);e=[]}}break;case"--run":case"-x":c=c.concat([d].concat(e));e=[];flush();break;default:var _=s;if(haxe_io_Path.extension(_)=="hxml"){e=haxeshim_Args.readHxml(resolvePath(_),r,n,f,d.pos).concat(e)}else{var m=s;if(StringTools.startsWith(m,"${")){var v=haxeshim_Args.interpolate(m,n);switch(v._hx_index){case 0:var y=v.data;c.push({val:y,pos:d.pos});break;case 1:var w=v.failure;f.fail(w,d.pos);break}}else{c.push(d)}}}}}return f.produce(h)};haxeshim_Args.readHxml=function(e,t,r,n,i){var s=t.readFile(e);switch(s._hx_index){case 0:var a=s.data;return n.getResult(haxeshim_Args.fromMultilineString(a,e,r));case 1:var o=s.failure;n.fail(o,i);return[]}};haxeshim_Args.prototype={__class__:haxeshim_Args};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 haxeshim_Errors=function(){this.errors=[]};haxeshim_Errors.__name__=true;haxeshim_Errors.prototype={fail:function(e,t,r){this.errors.push({message:e,pos:t,code:r})},produce:function(e){if(this.errors.length==0){return p.Success(e)}else{return p.Failure({result:e,errors:this.errors})}},getResult:function(e){switch(e._hx_index){case 0:var t=e.data;return t;case 1:var t=e.failure;var r=0;var n=t.errors;while(r<n.length){var i=n[r];++r;this.errors.push(i)}return t.result}},__class__:haxeshim_Errors};var u=t["haxeshim.Pos"]={__ename__:true,__constructs__:null,File:(n=function(e,t){return{_hx_index:0,path:e,line:t,__enum__:"haxeshim.Pos",toString:$estr}},n._hx_name="File",n.__params__=["path","line"],n),Cmd:(n=function(e){return{_hx_index:1,index:e,__enum__:"haxeshim.Pos",toString:$estr}},n._hx_name="Cmd",n.__params__=["index"],n),Custom:(n=function(e){return{_hx_index:2,source:e,__enum__:"haxeshim.Pos",toString:$estr}},n._hx_name="Custom",n.__params__=["source"],n)};u.__constructs__=[u.File,u.Cmd,u.Custom];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 n;switch(e._hx_index){case 0:n=[i.Red];break;case 1:n=[i.Yellow];break;case 2:n=[i.DefaultForeground];break;case 3:n=[i.Green];break}r.writeString(ANSI.aset(n)+t+ANSI.aset([i.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__:null,Error:{_hx_name:"Error",_hx_index:0,__enum__:"haxeshim._Logger.Level",toString:$estr},Warning:{_hx_name:"Warning",_hx_index:1,__enum__:"haxeshim._Logger.Level",toString:$estr},Info:{_hx_name:"Info",_hx_index:2,__enum__:"haxeshim._Logger.Level",toString:$estr},Success:{_hx_name:"Success",_hx_index:3,__enum__:"haxeshim._Logger.Level",toString:$estr}};h.__constructs__=[h.Error,h.Warning,h.Info,h.Success];var haxeshim_cli_HaxelibCli=function(e){this.scope=e;this.installation=e.haxeInstallation};haxeshim_cli_HaxelibCli.__name__=true;haxeshim_cli_HaxelibCli.exit=function(e){switch(e._hx_index){case 0:var t=e.data;process.exit(0);break;case 1:var r=e.failure;haxeshim_sys_Exec.die(r.code,r.message);break}};haxeshim_cli_HaxelibCli.exitWithCode=function(e){switch(e._hx_index){case 0:var t=e.data;process.exit(t);break;case 1:var r=e.failure;haxeshim_sys_Exec.die(r.code,r.message);break}};haxeshim_cli_HaxelibCli.exec=function(e,t){var r=t;new haxeshim_cli_HaxelibCli(e).dispatch(r!=null?r:process.argv.slice(2))};haxeshim_cli_HaxelibCli.prototype={callHaxelib:function(e){haxeshim_cli_HaxelibCli.exitWithCode(haxeshim_sys_Exec.sync(this.installation.haxelib,haxe_io_Path.addTrailingSlash(process.cwd()),e,this.installation.env))},path:function(e){var t=this;var r=[];var n=[];var i=0;while(i<e.length){var s=e[i];++i;var a=haxeshim_Args.getNdll(s);if(a._hx_index==0){var o=a.v;n.push("-L "+o)}else{r.push("-lib");r.push(s.split(":")[0])}}var l=haxeshim_sys_Exec.gracefully((function(){return t.scope.resolve(r)}));var c=0;while(c<l.length){var i=l[c];switch(i){case"--cwd":++c;break;case"-cp":n.push(haxe_io_Path.addTrailingSlash(l[++c]));break;case"-lib":var a=l[++c];var u=haxeshim_Args.getNdll(a);if(u._hx_index==0){var o=u.v;n.push("-L "+o)}else{var h=a;var f="Unexpected -lib "+h+" returned from haxelib path "+e.join(" ");process.stdout.write(Std.string(f));process.stdout.write("\n");process.exit(500)}break;default:var d=i;if(HxOverrides.cca(d,0)==45){n.push(""+d+" "+l[++c])}}++c}var o=n.join("\n");process.stdout.write(Std.string(o));process.exit(0)},libpath:function(e){var t=this;var resolve=function(e){var r=t.scope.resolve(["-lib",e]);var n=0;var i=r.length;while(n<i){var s=n++;if(r[s]=="-cp"){var a=r[s+1];if(a.indexOf("/"+e+"/")!=-1){do{if(sys_FileSystem.exists(haxe_io_Path.join([a,"haxelib.json"]))){return haxe_io_Path.addTrailingSlash(a)}a=haxe_io_Path.directory(a)}while(a!="");process.stdout.write(Std.string("Unable to find haxelib.json for "+e+" at "+r[s+1]));process.stdout.write("\n");process.exit(500)}}}process.stdout.write(Std.string("Unable to resolve libpath for "+e));process.stdout.write("\n");process.exit(500);throw haxe_Exception.thrown("unreachable")};var r=resolve;var n=new Array(e.length);var i=0;var s=e.length;while(i<s){var a=i++;n[a]=r(e[a])}var o=n.join("\n");process.stdout.write(Std.string(o));process.stdout.write("\n")},run:function(e){var t=this;this.scope.getLibCommand(e).handle((function(r){switch(r._hx_index){case 0:var n=r.data;haxeshim_cli_HaxelibCli.exit(n());break;case 1:var i=r.failure;t.callHaxelib(["run"].concat(e));break}}))},runDir:function(e,t,r){var n=this;A.next(A.next(haxeshim_sys_Fs.get(""+t+"/haxelib.json",{fileName:"haxeshim/cli/HaxelibCli.hx",lineNumber:110,className:"haxeshim.cli.HaxelibCli",methodName:"runDir"}),(function(e){try{return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Success(JSON.parse(e).main)))}catch(e){var t=haxe_Exception.caught(e).unwrap();return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Failure(tink_core_TypedError.withData(null,"failed to parse haxelib.json",t,{fileName:"haxeshim/cli/HaxelibCli.hx",lineNumber:114,className:"haxeshim.cli.HaxelibCli",methodName:"runDir"}))))}})),(function(i){if(i==null){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(haxeshim_sys_Exec.sync("neko",t,[""+t+"/run.n"].concat(r).concat([haxe_io_Path.removeTrailingSlashes(haxe_io_Path.addTrailingSlash(process.cwd()))+"/"]),_.ofObj({HAXELIB_RUN:"1",HAXELIB_LIBNAME:e}))))}else{var s=i;var a=n.installation.compiler;var o=a;if(sys_FileSystem.exists(o)){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(haxeshim_sys_Exec.sync(o,t,["--run",i].concat(r).concat([haxe_io_Path.removeTrailingSlashes(haxe_io_Path.addTrailingSlash(process.cwd()))+"/"]),_.ofObj({HAXELIB_RUN:"1",HAXELIB_LIBNAME:e}))))}else{var l=a;return haxeshim_sys_Exec.die(404,'haxe compiler not found at the expected location "'+l+'"')}}})).handle(haxeshim_cli_HaxelibCli.exitWithCode)},dispatch:function(e){var t=this;switch(e[0]){case"libpath":this.libpath(e.slice(1));break;case"path":this.path(e.slice(1));break;case"run":this.run(e.slice(1));break;case"run-dir":if(e.length<3){haxeshim_sys_Exec.die(402,"Not enough arguments. Syntax is `haxelib run-dir <name> <path> <...args>")}var r=e.slice(1);var n=new Array(r.length);var i=0;var s=r.length;while(i<s){var a=i++;n[a]=t.scope.interpolate(r[a])}e=n;var o=e.shift();var l=e.shift();this.runDir(o,l,e);break;default:this.callHaxelib(e)}},__class__:haxeshim_cli_HaxelibCli};var haxeshim_scope_HaxeInstallation=function(e,t,r,n){this.path=e;this.version=t;this.compiler=""+e+"/haxe"+haxeshim_sys_Os.EXECUTABLE_EXTENSION;this.haxelib=""+e+"/haxelib"+haxeshim_sys_Os.EXECUTABLE_EXTENSION;this.stdLib=""+e+"/std";this.haxelibRepo=r;this.neko=n;this.env=_.mergeInto(n.env,_.ofObj({HAXE_STD_PATH:this.stdLib,HAXEPATH:e,HAXELIB_PATH:r,HAXE_VERSION:t}))};haxeshim_scope_HaxeInstallation.__name__=true;haxeshim_scope_HaxeInstallation.at=function(e){var t=e.path;var r=e.version;var n=""+t+"/platform.txt";var i;if(sys_FileSystem.exists(n)){i=d.readFileSync(n,{encoding:"utf8"})}else if(!sys_FileSystem.exists(t)){i=haxeshim_sys_Os.get_platform()}else{var s=new sys_io_FileInput(d.openSync(""+t+"/haxe"+haxeshim_sys_Os.EXECUTABLE_EXTENSION,"r"));var a=s.read(1024);var o=m.detect(a);try{d.writeFileSync(n,o)}catch(e){var l=haxe_Exception.caught(e).unwrap();haxeshim_Logger.get().error("Failed to cache platform in info: "+Std.string(l))}i=o}var c=i;return new haxeshim_scope_HaxeInstallation(t,r,e.haxelibRepo,haxeshim_scope_NekoInstallation.get(e.root,c,r))};haxeshim_scope_HaxeInstallation.prototype={__class__:haxeshim_scope_HaxeInstallation};var haxeshim_scope_NekoInstallation=function(e){this.path=e.path;this.platform=e.platform;this.version=e.version;this.executable=""+this.path+"/neko"+haxeshim_sys_Os.EXECUTABLE_EXTENSION;var t;switch(Sys.systemName()){case"Mac":t="DYLD_LIBRARY_PATH";break;case"Windows":t="PATH";break;default:t="LD_LIBRARY_PATH"}var r=process.env[t];var n;if(r==null){var i=new haxe_ds_StringMap;i.h[t]=this.path;n=_.ofMap(i)}else{var s=r;if(s.indexOf(this.path)!=-1){n=_.ofObj({})}else{var a=r;var r=new haxe_ds_StringMap;r.h[t]=a+haxeshim_sys_Os.DELIMITER+this.path;n=_.ofMap(r)}}this.env=n};haxeshim_scope_NekoInstallation.__name__=true;haxeshim_scope_NekoInstallation.get=function(e,t,r){var n="2.4.0";return new haxeshim_scope_NekoInstallation({platform:t,version:n,path:""+e+"/neko/versions/"+n+"-"+t})};haxeshim_scope_NekoInstallation.prototype={__class__:haxeshim_scope_NekoInstallation};var haxeshim_sys_Os=function(){};haxeshim_sys_Os.__name__=true;haxeshim_sys_Os.get_platform=function(){var e;if(haxeshim_sys_Os.platform!=null){e=haxeshim_sys_Os.platform}else{var t=process.platform;var r=process.arch;switch(t){case"darwin":switch(r){case"arm64":e="mac-arm";break;case"x64":e="mac64";break;default:e="unknown"}break;case"linux":switch(r){case"arm":e="linux-arm";break;case"arm64":e="linux-arm64";break;case"ia32":e="linux32";break;case"riscv64":e="linux-riscv";break;case"x64":e="linux64";break;default:e="unknown"}break;case"win32":switch(r){case"ia32":e="win32";break;case"x64":e="win64";break;default:e="unknown"}break;default:e="unknown"}}return haxeshim_sys_Os.platform=e};var tink_core__$Lazy_Computable=function(){};tink_core__$Lazy_Computable.__name__=true;tink_core__$Lazy_Computable.__isInterface__=true;tink_core__$Lazy_Computable.prototype={__class__:tink_core__$Lazy_Computable};var tink_core__$Lazy_LazyObject=function(){};tink_core__$Lazy_LazyObject.__name__=true;tink_core__$Lazy_LazyObject.__isInterface__=true;tink_core__$Lazy_LazyObject.__interfaces__=[tink_core__$Lazy_Computable];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={isComputed:function(){return true},get:function(){return this.value},compute:function(){},underlying:function(){return null},__class__:tink_core__$Lazy_LazyConst};var f={};f.get=function(e){e.compute();return e.get()};var sys_FileSystem=function(){};sys_FileSystem.__name__=true;sys_FileSystem.exists=function(e){try{d.accessSync(e);return true}catch(e){return false}};sys_FileSystem.isDirectory=function(e){try{return d.statSync(e).isDirectory()}catch(e){return false}};sys_FileSystem.createDirectory=function(e){try{d.mkdirSync(e)}catch(n){var t=haxe_Exception.caught(n).unwrap();if(t.code=="ENOENT"){sys_FileSystem.createDirectory(w.dirname(e));d.mkdirSync(e)}else{var r;try{r=d.statSync(e)}catch(e){throw t}if(!r.isDirectory()){throw t}}}};var d=r(7147);var p=t["tink.core.Outcome"]={__ename__:true,__constructs__:null,Success:(n=function(e){return{_hx_index:0,data:e,__enum__:"tink.core.Outcome",toString:$estr}},n._hx_name="Success",n.__params__=["data"],n),Failure:(n=function(e){return{_hx_index:1,failure:e,__enum__:"tink.core.Outcome",toString:$estr}},n._hx_name="Failure",n.__params__=["failure"],n)};p.__constructs__=[p.Success,p.Failure];var haxeshim_scope_Scope=function(e,t,r,n){this.haxeshimRoot=e;this.isGlobal=t;this.scopeDir=r;this.scopeLibDir=""+r+"/haxe_libraries";this.cwd=n;this.configFile=""+r+"/"+haxeshim_scope_Scope.CONFIG_FILE;this.versionDir=""+e+"/versions";this.haxelibRepo=""+e+"/haxelib";var i=process.env["HAXESHIM_LIBCACHE"];var s=process.env["HAXE_LIBCACHE"];var a;if(i==null){if(s==null){a=""+e+"/haxe_libraries"}else{var o=s;a=o}}else{var o=i;a=o}this.libCache=a};haxeshim_scope_Scope.__name__=true;haxeshim_scope_Scope.seek=function(e){if(e==null){e={}}var t;var r=e.cwd;if(r==null){t=haxe_io_Path.addTrailingSlash(process.cwd())}else{var n=r;t=n}var i;var r=e.startLookingIn;if(r==null){i=t}else{var n=r;i=n}var s;var r=e.haxeshimRoot;if(r==null){s=haxeshim_scope_Scope.DEFAULT_ROOT}else{var n=r;s=n}var a=s;var o=t;var make=function(e,t){return new haxeshim_scope_Scope(a,e,t,o)};var l;var r=haxeshim_sys_Fs.findNearest(haxeshim_scope_Scope.CONFIG_FILE,haxe_io_Path.isAbsolute(i)?i:w.resolve(i));switch(r._hx_index){case 0:var n=r.v;l=make(false,haxe_io_Path.directory(n));break;case 1:l=make(true,s);break}l.reload();return l};haxeshim_scope_Scope.env=function(e){var t=process.env[e];if(t==null){return o.None}else if(t==""){return o.None}else{var r=t;return o.Some(r)}};haxeshim_scope_Scope.prototype={reload:function(){var e;try{e=d.readFileSync(this.configFile,{encoding:"utf8"})}catch(e){var t=haxe_Exception.caught(e).unwrap();throw haxe_Exception.thrown(this.isGlobal?"Global config file "+this.configFile+" does not exist or cannot be opened":"Unable to open file "+this.configFile+" because "+Std.string(t))}var r;try{r=JSON.parse(e)}catch(r){var t=haxe_Exception.caught(r).unwrap();new _$Sys_FileOutput(2).writeString("Invalid JSON in file "+this.configFile+":\n\n"+e+"\n\n");throw haxe_Exception.thrown(t)}this.setConfig(r)},setConfig:function(e){if(e.version==null){throw haxe_Exception.thrown("No version set in "+this.configFile)}if(e.resolveLibs==null){e.resolveLibs=this.isGlobal?"mixed":"scoped"}var t=e.resolveLibs;switch(t){case"haxelib":case"mixed":case"scoped":break;default:var r=t;throw haxe_Exception.thrown("invalid value "+r+" for `resolveLibs` in "+this.configFile)}this.config=e;this.haxeInstallation=this.getInstallation(e.version)},getVar:function(e){var t=process.env[e];if(t==null){return this.getDefault(e)}else if(t==""){return this.getDefault(e)}else{var r=t;return r}},getDefault:function(e){switch(e){case"CWD":return this.cwd;case"HAXESHIM_LIBCACHE":case"HAXE_LIBCACHE":return this.libCache;case"SCOPE_DIR":return this.scopeDir;default:return null}},path:function(e){if(haxe_io_Path.isAbsolute(e)){return o.Some(e)}else if(StringTools.startsWith(e,"./")||StringTools.startsWith(e,"../")){return o.Some(""+this.cwd+"/"+e)}else{return o.None}},getInstallation:function(e){var t=this.haxeshimRoot;var r=this.haxelibRepo;var n=this.path(e);var i;switch(n._hx_index){case 0:var s=n.v;i=s;break;case 1:i=""+this.versionDir+"/"+e;break}return haxeshim_scope_HaxeInstallation.at({root:t,version:e,haxelibRepo:r,path:i})},resolveThroughHaxelib:function(e){if(e.length==0){return p.Success([])}else{var t=this.haxeInstallation.haxelib;var r=this.cwd;var n=[];var i=0;while(i<e.length){var s=e[i];++i;n.push(s.val)}var i=haxeshim_sys_Exec.eval(t,r,["path"].concat(n),this.haxeInstallation.env);switch(i._hx_index){case 0:var t=i.data;var a;var r=t.stderr;if(t.status==0){var o=t.stdout;return tink_core_OutcomeTools.map(haxeshim_Args.fromMultilineString(o,"haxelib path",$bind(this,this.getVar),true),(function(e){var t=0;var r=e.length;while(t<r){var n=t++;if(e[n].val=="-L"){var set=function(t,r){e[t]={pos:e[t].pos,val:r(e[t].val)}};set(n,(function(e){return"-lib"}));set(n+1,(function(e){return"ndll:"+e}))}}return e}))}else{a=new tink_core_TypedError(t.status,t.stdout+t.stderr,{fileName:"haxeshim/scope/Scope.hx",lineNumber:251,className:"haxeshim.scope.Scope",methodName:"resolveThroughHaxelib"});var l=a;var c=new haxeshim_Errors;c.fail(l.message,u.Custom("haxelib path"),l.code);return c.produce([])}break;case 1:var l=i.failure;var c=new haxeshim_Errors;c.fail(l.message,u.Custom("haxelib path"),l.code);return c.produce([])}}},interpolate:function(e,t){var r=this;var n;if(t==null){n=$bind(this,this.getVar)}else{var i=t;n=function(e){var t=i(e);if(t==null){return r.getVar(e)}else{var n=t;return n}}}return tink_core_OutcomeTools.sure(haxeshim_Args.interpolate(e,n))},parseDirectives:function(e){var t=new haxe_ds_StringMap;var r=0;var n=e.split("\n");var i=StringTools.trim;var s=new Array(n.length);var a=0;var o=n.length;while(a<o){var l=a++;s[l]=i(n[l])}var a=s;while(r<a.length){var c=a[r];++r;if(StringTools.startsWith(c,"#")){var u=StringTools.ltrim(HxOverrides.substr(c,1,null));if(StringTools.startsWith(u,"@")){var o=u.indexOf(":");if(o!=-1){var h=o;var f=u.substring(1,h);var d;var p=t.h[f];if(p==null){var _=[];t.h[f]=_;d=_}else{var m=p;d=m}d.push(this.interpolate(StringTools.ltrim(HxOverrides.substr(u,h+1,null))))}}}}return t},libHxml:function(e){return""+this.scopeLibDir+"/"+e+".hxml"},getDirectives:function(e){return A.next(haxeshim_sys_Fs.get(this.libHxml(e),{fileName:"haxeshim/scope/Scope.hx",lineNumber:289,className:"haxeshim.scope.Scope",methodName:"getDirectives"}),I.ofSafeSync($bind(this,this.parseDirectives)))},getLibCommand:function(e){var t=this;var r=[];var n=0;while(n<e.length){var i=e[n];++n;r.push(this.interpolate(i))}e=r;var s=e.shift();return A.next(this.getDirectives(s),(function(r){var n=r.h["run"];if(n==null){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Failure(new tink_core_TypedError(null,"no @run directive found for library "+s,{fileName:"haxeshim/scope/Scope.hx",lineNumber:298,className:"haxeshim.scope.Scope",methodName:"getLibCommand"}))))}else{switch(n.length){case 0:return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Failure(new tink_core_TypedError(null,"no @run directive found for library "+s,{fileName:"haxeshim/scope/Scope.hx",lineNumber:298,className:"haxeshim.scope.Scope",methodName:"getLibCommand"}))));case 1:var i=n[0];var a=[t.interpolate(i)];var o;if(haxeshim_sys_Os.IS_WINDOWS){var l=true;o=function(e){return haxe_SysTools.quoteWinArg(e,l)}}else{o=haxe_SysTools.quoteUnixArg}var c=new Array(e.length);var n=0;var u=e.length;while(n<u){var h=n++;c[h]=o(e[h])}var i=a.concat(c).join(" ");var f=haxe_io_Path.addTrailingSlash(process.cwd());var d=t.haxeInstallation.env;return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Success((function(){return haxeshim_sys_Exec.shell(i,f,d)}))));default:return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Failure(new tink_core_TypedError(null,"more than one @run directive for library "+s,{fileName:"haxeshim/scope/Scope.hx",lineNumber:303,className:"haxeshim.scope.Scope",methodName:"getLibCommand"}))))}}}))},resolveArgs:function(e){var t=this.cwd;var resolvePath=function(e){if(haxe_io_Path.isAbsolute(e)){return e}else{return haxe_io_Path.join([t,e])}};t=resolvePath(e.cwd);var r=[];var n=[];var i=new haxeshim_Errors;var s=[];var a=[];var o=[];var l=0;e:while(l<e.args.length){var c=e.args[l++];switch(c.val){case"--run":o=e.args.slice(l-1);break e;case"--connect":case"--display":case"--server-connect":case"--server-listen":a.push(c);var u=e.args[l++];if(u==null){i.fail(""+c.val+" requires argument",c.pos)}else{var h=u;a.push(h)}break;case"--wait":a.push(c);break;default:s.push(c)}}var f=Object.create(null);e:while(s.length>0){var c=[s.shift()];var d=function(e){return function(t){i.fail(t,e[0].pos)}}(c);var u=c[0].val;switch(u){case"--connect":case"--cwd":case"--each":case"--next":case"--run":case"--wait":case"-C":var p=u;if(StringTools.endsWith(p,".hxml")){s=haxeshim_Args.readHxml(resolvePath(p),haxeshim_scope_Scope.fs,$bind(this,this.getVar),i,c[0].pos).concat(s)}else{var _=u;d(""+_+" not allowed here");break e}break;case"--lib":case"-L":case"-lib":var m=s.shift();var v;if(m==null){d("-lib requires argument")}else{v=haxeshim_Args.getNdll(m.val);if(v._hx_index==0){var y=v.v;var h=m;r.push(c[0]);r.push(h)}else{var w=m;if(!f[w.val]){f[w.val]=true;var g=this.config.resolveLibs;var b;if(g=="haxelib"){n.push(w)}else{b=g=="mixed";var S=b;var x=this.libHxml(w.val);var E=haxeshim_scope_Scope.fs.readFile(x);switch(E._hx_index){case 0:var R=E.data;s=i.getResult(haxeshim_Args.fromMultilineString(R,x,$bind(this,this.getVar))).concat(s);break;case 1:var k=E.failure;if(sys_FileSystem.exists(x)){d(k)}else if(S){n.push(w)}else{d("-lib "+w.val+" is missing "+x)}break}}}}}break;default:var O=u;if(StringTools.endsWith(O,".hxml")){s=haxeshim_Args.readHxml(resolvePath(O),haxeshim_scope_Scope.fs,$bind(this,this.getVar),i,c[0].pos).concat(s)}else{r.push(c[0])}}}r=a.concat(r).concat(i.getResult(this.resolveThroughHaxelib(n))).concat(o);return i.produce(new haxeshim_scope_ResolvedArgs(t,r))},resolve:function(e){var t=[];var r=new haxeshim_Errors;var n=0;var i=r.getResult(haxeshim_Args.split(e,this.cwd,haxeshim_scope_Scope.fs,$bind(this,this.getVar)));while(n<i.length){var s=i[n];++n;if(s.args.length>0){if(t.length!=0){t.push("--next")}if(s.cwd!=this.cwd){t.push("--cwd");t.push(s.cwd)}var a=0;var o=r.getResult(this.resolveArgs(s)).args;while(a<o.length){var l=o[a];++a;t.push(l.val)}}}var n=r.produce(42);if(n._hx_index==1){var c;c=n.failure.errors[0];var u=c;var h=u.message;process.stdout.write(Std.string(h));process.stdout.write("\n");var f;var n=u.code;if(n==null){f=500}else{var h=n;f=h}process.exit(f)}return t},__class__:haxeshim_scope_Scope};var haxeshim_scope_ResolvedArgs=function(e,t){haxeshim_Args.call(this,e,t)};haxeshim_scope_ResolvedArgs.__name__=true;haxeshim_scope_ResolvedArgs.__super__=haxeshim_Args;haxeshim_scope_ResolvedArgs.prototype=$extend(haxeshim_Args.prototype,{__class__:haxeshim_scope_ResolvedArgs});var _={};_.ofObj=function(e){return _.ofVars(e)};_.ofVars=function(e){var t={};var r=0;var n=Reflect.fields(e);while(r<n.length){var i=n[r];++r;t[haxeshim_sys_Os.IS_WINDOWS?i.toUpperCase():i]=e[i]}return t};_.ofMap=function(e){var t={};var r=e.h;var n=r;var i=Object.keys(r);var s=i.length;var a=0;while(a<s){var o=i[a++];t[haxeshim_sys_Os.IS_WINDOWS?o.toUpperCase():o]=e.h[o]}return t};_.vars=function(e){return e};_.toVars=function(e){return Reflect.copy(e)};_.mergeInto=function(e,t){var r=_.vars(t);if(e==null){var n=r;return n}else if(r==null){var n=e;return n}else{var i=e;var s=r;var a={};var o=s;var r=0;var l=Reflect.fields(o);while(r<l.length){var c=l[r];++r;a[c]=o[c]}var o=i;var r=0;var l=Reflect.fields(o);while(r<l.length){var c=l[r];++r;a[c]=o[c]}return a}};var haxeshim_sys_Exec=function(){};haxeshim_sys_Exec.__name__=true;haxeshim_sys_Exec.die=function(e,t){if(t!=null){haxeshim_Logger.get().error(t)}process.exit(e);throw haxe_Exception.thrown("unreachable")};haxeshim_sys_Exec.gracefully=function(e){try{return e()}catch(e){var t=haxe_Exception.caught(e).unwrap();if(t instanceof tink_core_TypedError){var r=t;return haxeshim_sys_Exec.die(r.code,r.message)}else{var r=t;return haxeshim_sys_Exec.die(500,Std.string(r))}}};haxeshim_sys_Exec.mergeEnv=function(e){return _.mergeInto(e,_.ofVars(process.env))};haxeshim_sys_Exec.shell=function(e,t,r){try{return p.Success(s.execSync(e,{cwd:t,stdio:"inherit",env:_.toVars(haxeshim_sys_Exec.mergeEnv(r))}))}catch(t){var n=haxe_Exception.caught(t).unwrap();return p.Failure(new tink_core_TypedError(n.status,"Failed to invoke `"+e+"` because "+Std.string(n),{fileName:"haxeshim/sys/Exec.hx",lineNumber:47,className:"haxeshim.sys.Exec",methodName:"shell"}))}};haxeshim_sys_Exec.sync=function(e,t,r,n){var i=s.spawnSync(e,r,{cwd:t,stdio:"inherit",env:_.toVars(haxeshim_sys_Exec.mergeEnv(n))});var a=i.error;var o=i.output;var o=i.pid;var o=i.signal;var o=i.status;var l=i.stderr;var l=i.stdout;if(a==null){var c=o;return p.Success(c)}else{var u=a;var c=o;return p.Failure(new tink_core_TypedError(c,"Failed to call "+e+" because "+Std.string(u),{fileName:"haxeshim/sys/Exec.hx",lineNumber:54,className:"haxeshim.sys.Exec",methodName:"sync"}))}};haxeshim_sys_Exec.eval=function(e,t,r,n){var i=s.spawnSync(e,r,{cwd:t,env:_.toVars(haxeshim_sys_Exec.mergeEnv(n))});var a=i;if(a.error==null){return p.Success({status:a.status,stdout:a.stdout.toString(),stderr:a.stderr.toString()})}else{var o=i.output;var o=i.pid;var o=i.signal;var o=i.status;var o=i.stderr;var o=i.stdout;var l=i.error;return p.Failure(new tink_core_TypedError(null,"Failed to call "+e+" because "+Std.string(l),{fileName:"haxeshim/sys/Exec.hx",lineNumber:66,className:"haxeshim.sys.Exec",methodName:"eval"}))}};var haxeshim_sys_Fs=function(){};haxeshim_sys_Fs.__name__=true;haxeshim_sys_Fs.get=function(e,t){var r=e;return haxeshim_Attempt.to("get content of "+e,(function(){return d.readFileSync(r,{encoding:"utf8"})}),t)};haxeshim_sys_Fs.exists=function(e){var t=e;return haxeshim_Attempt.to("check the existence of "+e,(function(){return sys_FileSystem.exists(t)}),{fileName:"haxeshim/sys/Fs.hx",lineNumber:23,className:"haxeshim.sys.Fs",methodName:"exists"})};haxeshim_sys_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(null)))}else{return A.next(A.next(haxeshim_sys_Fs.exists(r),(function(e){if(e){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Success(null)))}else{return haxeshim_sys_Fs.ensureDir(haxe_io_Path.addTrailingSlash(r))}})),(function(r){if(t){return A.next(haxeshim_sys_Fs.exists(e),(function(t){return haxeshim_Attempt.to("create directory "+e,(function(){if(!t){sys_FileSystem.createDirectory(e)}return null}),{fileName:"haxeshim/sys/Fs.hx",lineNumber:46,className:"haxeshim.sys.Fs",methodName:"ensureDir"})}))}else{return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Success(null)))}}))}};haxeshim_sys_Fs.peel=function(e,t){var r=0;var n=0;var i=t;while(n<i){var s=n++;var a=e.indexOf("/",r);if(a==-1){return o.None}else{var l=a;r=l+1}}return o.Some(HxOverrides.substr(e,r,null))};haxeshim_sys_Fs.findNearest=function(e,t){while(true)if(sys_FileSystem.exists(""+t+"/"+e)){return o.Some(""+t+"/"+e)}else{var r=haxe_io_Path.directory(t);var n=r;if(t==n){return o.None}else{var i=r;t=i}}};var m={};m.detect=function(e){var t=e;if(t.length>=5&&t.b[0]==127&&t.b[1]==69&&t.b[2]==76&&t.b[3]==70){var r=t.b[4];var n=t.b[18]|t.b[19]<<8;switch(n){case 3:if(r==1){return"linux32"}else{return"linux64"}break;case 40:return"linux-arm";case 62:return"linux64";case 183:return"linux-arm64";case 243:return"linux-riscv";default:if(r==1){return"linux32"}else{return"linux64"}}}if(t.length>=64){var i=t.getInt32(60);if(t.b[i++]==80&&t.b[i++]==69&&t.b[i++]==0&&t.b[i++]==0){var s=t.b[i++]|t.b[i++]<<8;switch(s){case 332:return"win32";case 34404:return"win64";default:return"unknown"}}}if(t.length>=4){var a=t.b[0]<<24|t.b[1]<<16|t.b[2]<<8|t.b[3];if(a==-17958193||a==-805638658){switch(t.b[4]<<24|t.b[5]<<16|t.b[6]<<8|t.b[7]){case 16777223:return"mac64";case 16777228:return"mac-arm";default:return"mac64"}}if(a==-17958194||a==-822415874){return"mac64"}if(a==-889275714||a==-1095041334){return"mac-universal"}}return"unknown"};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 n=new Uint8Array(r.byteLength);n.set(r);return n.buffer};var v=r(3685);var y=r(5687);var w=r(1017);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 b=r(2781).PassThrough;var S=r(7310).URL;var lix_cli_Command=function(){};lix_cli_Command.__name__=true;lix_cli_Command.attempt=function(e,t){var r=L.ofSync(lix_cli_Command.reportError);O.flatMap(e,(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 n=e.failure;return r(n)}})).handle(t)};lix_cli_Command.reportError=function(e){haxeshim_Logger.get().error(e.message);var t=e.code;process.exit(t);return null};var lix_cli_HaxelibCmd=function(){};lix_cli_HaxelibCmd.__name__=true;lix_cli_HaxelibCmd.main=function(){var e=haxeshim_scope_Scope.seek();lix_cli_Command.attempt(lix_client_haxe_Switcher.ensureNeko(e.haxeInstallation.neko,haxeshim_Logger.get()),(function(){haxeshim_cli_HaxelibCli.exec(e)}))};var x=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(){t(p.Success(js_node_buffer__$Buffer_Helper.bytesOfBuffer(g.concat(r))))}))}))};lix_client_Download.unzip=function(e,t,n,i,s){A.next(lix_client_Download.buffered(i),(function(i){return O.async((function(a){var o=i.length-4;while(o-- >0)if(i.b[o]==80&&i.b[o+1]==75&&i.b[o+2]==5&&i.b[o+3]==6){i.b[o+20]=0;i.b[o+21]=0;i=i.sub(0,o+22);break}if(o==0){a(p.Failure(new tink_core_TypedError(422,"Unzip failed to find central directory in "+e,{fileName:"src/lix/client/Download.hx",lineNumber:65,className:"lix.client.Download",methodName:"unzip"})));return}var l=i.b;x.fromBuffer(g.from(l.buffer,l.byteOffset,i.length),(function(i,o){var l=-1;var done=function(){l+=1;s.onProgress(l,o.entryCount,false);if(l==o.entryCount){var e=a;var r=p.Success(t);haxe_Timer.delay((function(){e(r)}),100)}};if(i!=null){a(p.Failure(new tink_core_TypedError(422,"Failed to unzip "+e+" because "+Std.string(i),{fileName:"src/lix/client/Download.hx",lineNumber:78,className:"lix.client.Download",methodName:"unzip"})))}o.on("entry",(function(e){var i=haxeshim_sys_Fs.peel(lix_client_Download.stripLeadingSlashes(e.fileName),n);switch(i._hx_index){case 0:var s=i.v;var a=""+t+"/"+s;if(StringTools.endsWith(a,"/")){done()}else{haxeshim_sys_Fs.ensureDir(a).eager();o.openReadStream(e,(function(e,t){var n=r(7758).createWriteStream(a);t.pipe(n,{end:true});n.on("close",done)}))}break;case 1:break}}));o.on("end",(function(){o.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,n,i,s){return O.async((function(e){var a=0;var o=0;var l=[];var update=function(){s.onProgress(o,a+1,true)};var c=1;var done=function(r){if(r==null){r=0}o+=r;update();haxe_Timer.delay((function(){if((c-=1)<=0){s.onProgress(a,a,true);var r=[];var n=0;while(n<l.length){var i=[l[n]];++n;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){t(e==null?p.Success(null):p.Failure(new tink_core_TypedError(null,e.message,{fileName:"src/lix/client/Download.hx",lineNumber:137,className:"lix.client.Download",methodName:"untar"})))}}())}}(e))}}(i)))}A.next(A.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){var r=e;u=new tink_core_TypedError(null,t,{fileName:"src/lix/client/Download.hx",lineNumber:149,className:"lix.client.Download",methodName:"untar"});r(p.Failure(u))};lix_client_uncompress_Tar.parse(i,(function(i){if(u!=null){return}a+=i.size;update();var skip=function(){i.on("data",(function(){}))};var s=haxeshim_sys_Fs.peel(lix_client_Download.stripLeadingSlashes(i.path),n);switch(s._hx_index){case 0:var o=s.v;var h=""+t+"/"+o;if(StringTools.endsWith(h,"/")){skip()}else{haxeshim_sys_Fs.ensureDir(h).handle((function(t){if(t._hx_index==1){var n=t.failure;u=n;e(p.Failure(u))}else if(i.type=="SymbolicLink"){skip();l.push({from:i.linkpath,to:h})}else{c+=1;var s=new b;var a=r(7758).createWriteStream(h,{mode:i.mode});i.pipe(s,{end:true});s.pipe(a,{end:true});var o=i.size;a.on("close",(function(){done(o)}))}}))}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,n){var i=r;var s=t;return lix_client_Download.download(e,lix_client_Download.withLogger(n,(function(e,t,r){return lix_client_Download.untar(e,i,s,t,r)})))};lix_client_Download.zip=function(e,t,r,n){var i=r;var s=t;return lix_client_Download.download(e,lix_client_Download.withLogger(n,(function(e,t,r){lix_client_Download.unzip(e,i,s,t,r)})))};lix_client_Download.withLogger=function(e,t){return function(r,n,i){var s=Std.parseInt(n.headers["content-length"]);var a=0;var o=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 n=t;r=""+n+".0"}else{var i=t;r=i}return StringTools.lpad(r," ",5)+"%"};var u=new Date(0).getTime();var update=function(){if(!(o==l||o/l>=1)){var e=(new Date).getTime();if(e>u+137){u=e;var t=[];if(a<s){t.push("Downloaded: "+pct(a/s))}if(o>0){t.push("Saved: "+pct(o/l))}progress(" "+t.join(" "))}}};n.on("data",(function(e){a+=e.length;update()}));var h=0;t(r,n,{onProgress:function(e,t,r){o=e;l=t;if(r){var n=a/s;var i=o/l;var c=n*i;if(c<h){c=h}h=c;o=Math.round(c*1e3);l=1e3}update()},done:function(t){e.success("-> Done!");i(t)}})}};lix_client_Download.download=function(e,t){return O.async((function(r){var n=new S(e);var i=n.search;var s={protocol:n.protocol,host:n.host,path:""+n.pathname+(i!=null?i:"")};if(n.username!=null&&n.password!=null){s.auth=n.username+":"+n.password}var a=s;a.agent=false;if(a.headers==null){a.headers={}}a.headers["user-agent"]=lix_client_Download.USER_AGENT;var fail=function(t){r(p.Failure(tink_core_TypedError.withData(null,"Failed to download "+e+" because "+t.message,t,{fileName:"src/lix/client/Download.hx",lineNumber:300,className:"lix.client.Download",methodName:"download"})))};var o=StringTools.startsWith(e,"https:")?y.get(a):v.get(a);o.setTimeout(3e4);o.on("error",fail);o.on("response",(function(n){if(n.statusCode>=400){r(p.Failure(tink_core_TypedError.withData(n.statusCode,n.statusMessage,n,{fileName:"src/lix/client/Download.hx",lineNumber:311,className:"lix.client.Download",methodName:"download"})))}else{var i=n.headers["location"];if(i==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 n=e.failure;r(p.Failure(n));break}}))}else{var s=i;lix_client_Download.download(new S(s,e).toString(),t).handle(r)}}}))}))};var lix_client_haxe_Switcher=function(){};lix_client_haxe_Switcher.__name__=true;lix_client_haxe_Switcher.ensureNeko=function(e,t){var r=e.path;if(sys_FileSystem.exists(r)){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Success(r)))}else{t.info("Neko seems to be missing. Attempting download ...");var n=lix_client_haxe_Switcher.getNekoUrl(e);switch(n._hx_index){case 0:var i=n.data;var s=StringTools.startsWith(e.platform,"win")?lix_client_Download.zip:lix_client_Download.tar;return A.next(s(i,1,r,t),(function(e){t.success("done");return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Success(e)))}));case 1:var a=n.failure;return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Failure(a)))}}};lix_client_haxe_Switcher.getNekoUrl=function(e){var t;var r=e.platform;switch(r){case"linux-arm64":t="linux-arm64";break;case"linux64":t="linux64";break;case"mac-arm":case"mac-universal":case"mac64":t="osx-universal";break;case"win32":t="win";break;case"win64":t="win64";break;default:var n=r;return p.Failure(new tink_core_TypedError(null,"Unsupported platform: "+n,{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:319,className:"lix.client.haxe.Switcher",methodName:"getNekoUrl"}))}return p.Success("https://github.com/HaxeFoundation/neko/releases/download/v"+StringTools.replace(e.version,".","-")+"/neko-"+e.version+"-"+t+"."+(StringTools.startsWith(e.platform,"win")?"zip":"tar.gz"))};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 n=0;var i=0;var s=new E({onentry:function(e){n+=1;t(e)}});s.on("warn",(function(){i+=1}));s.on("end",(function(){r(n==0&&i!=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(null))}));s.on("error",(function(e){r(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"})))}));e.pipe(s,{end:true})}))};var E=r(4674).Parse;var sys_io_FileInput=function(e){this.hasReachedEof=false;this.fd=e;this.pos=0};sys_io_FileInput.__name__=true;sys_io_FileInput.__super__=haxe_io_Input;sys_io_FileInput.prototype=$extend(haxe_io_Input.prototype,{readByte:function(){var e=g.alloc(1);var t;try{t=d.readSync(this.fd,e,0,1,this.pos)}catch(e){var r=haxe_Exception.caught(e).unwrap();if(r.code=="EOF"){this.hasReachedEof=true;throw haxe_Exception.thrown(new haxe_io_Eof)}throw haxe_Exception.thrown(c.Custom(r))}if(t==0){this.hasReachedEof=true;throw haxe_Exception.thrown(new haxe_io_Eof)}this.pos++;return e[0]},readBytes:function(e,t,r){var n=e.b;var i=g.from(n.buffer,n.byteOffset,e.length);var s;try{s=d.readSync(this.fd,i,t,r,this.pos)}catch(e){var a=haxe_Exception.caught(e).unwrap();if(a.code=="EOF"){this.hasReachedEof=true;throw haxe_Exception.thrown(new haxe_io_Eof)}throw haxe_Exception.thrown(c.Custom(a))}if(s==0){this.hasReachedEof=true;throw haxe_Exception.thrown(new haxe_io_Eof)}this.pos+=s;return s},__class__:sys_io_FileInput});var R={};R.invoke=function(e,t){if(R.depth<500){R.depth++;e(t);R.depth--}else{R.defer((function(){e(t)}))}};R.defer=function(e){global.setImmediate(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 tink_core_CallbackLinkRef=function(){};tink_core_CallbackLinkRef.__name__=true;tink_core_CallbackLinkRef.__interfaces__=[tink_core_LinkObject];tink_core_CallbackLinkRef.prototype={cancel:function(){var e=this.link;if(e!=null){e.cancel()}},__class__:tink_core_CallbackLinkRef};var k={};k.fromMany=function(e){return 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}}))};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 e=this.b;if(e!=null){e.cancel()}this.a=null;this.b=null}},__class__:tink_core__$Callback_LinkPair};var tink_core__$Callback_ListCell=function(e,t){if(e==null){throw haxe_Exception.thrown("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.cells.length>>1){e.compact()}}},__class__:tink_core__$Callback_ListCell};var tink_core_Disposable=function(){};tink_core_Disposable.__name__=true;tink_core_Disposable.__isInterface__=true;var tink_core_OwnedDisposable=function(){};tink_core_OwnedDisposable.__name__=true;tink_core_OwnedDisposable.__isInterface__=true;tink_core_OwnedDisposable.__interfaces__=[tink_core_Disposable];var tink_core_SimpleDisposable=function(e){this.disposeHandlers=[];this.f=e};tink_core_SimpleDisposable.__name__=true;tink_core_SimpleDisposable.__interfaces__=[tink_core_OwnedDisposable];tink_core_SimpleDisposable.noop=function(){};tink_core_SimpleDisposable.prototype={dispose:function(){var e=this.disposeHandlers;if(e!=null){var t=e;this.disposeHandlers=null;var r=this.f;this.f=tink_core_SimpleDisposable.noop;r();var e=0;while(e<t.length){var n=t[e];++e;n()}}},__class__:tink_core_SimpleDisposable};var tink_core_CallbackList=function(e){if(e==null){e=false}this.onfill=function(){};this.ondrain=function(){};this.busy=false;this.queue=[];this.used=0;var t=this;tink_core_SimpleDisposable.call(this,(function(){if(!t.busy){t.destroy()}}));this.destructive=e;this.cells=[]};tink_core_CallbackList.__name__=true;tink_core_CallbackList.__super__=tink_core_SimpleDisposable;tink_core_CallbackList.prototype=$extend(tink_core_SimpleDisposable.prototype,{destroy:function(){var e=0;var t=this.cells;while(e<t.length){var r=t[e];++e;r.cb=null;r.list=null}this.queue=null;this.cells=null;if(this.used>0){this.used=0;var n=this.ondrain;if(R.depth<500){R.depth++;n();R.depth--}else{R.defer(n)}}},invoke:function(e){var t=this;if(R.depth<500){R.depth++;if(t.disposeHandlers!=null){if(t.busy){if(t.destructive!=true){var r=t;var n=e;var tmp=function(){r.invoke(n)};t.queue.push(tmp)}}else{t.busy=true;if(t.destructive){t.dispose()}var i=t.cells.length;var s=0;var a=i;while(s<a){var o=s++;var l=t.cells[o];if(l.list!=null){l.cb(e)}}t.busy=false;if(t.disposeHandlers==null){t.destroy()}else{if(t.used<t.cells.length){t.compact()}if(t.queue.length>0){t.queue.shift()()}}}}R.depth--}else{R.defer((function(){if(t.disposeHandlers!=null){if(t.busy){if(t.destructive!=true){var r=t;var n=e;var tmp=function(){r.invoke(n)};t.queue.push(tmp)}}else{t.busy=true;if(t.destructive){t.dispose()}var i=t.cells.length;var s=0;var a=i;while(s<a){var o=s++;var l=t.cells[o];if(l.list!=null){l.cb(e)}}t.busy=false;if(t.disposeHandlers==null){t.destroy()}else{if(t.used<t.cells.length){t.compact()}if(t.queue.length>0){t.queue.shift()()}}}}}))}},compact:function(){if(this.busy){return}else if(this.used==0){this.resize(0);var e=this.ondrain;if(R.depth<500){R.depth++;e();R.depth--}else{R.defer(e)}}else{var t=0;var r=0;var n=this.cells.length;while(r<n){var i=r++;var s=this.cells[i];var a=s.list;if(s.cb!=null){var o=s;if(t!=i){this.cells[t]=o}if(++t==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,n){return tink_core_TypedError.typed(e,t,r,n)};tink_core_TypedError.typed=function(e,t,r,n){var i=new tink_core_TypedError(e,t,n);i.data=r;return i};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 n=haxe_Exception.caught(e).unwrap();var i=tink_core_TypedError.asError(n);var s;if(i==null){s=t==null?tink_core_TypedError.withData(null,"Unexpected Error",n,r):t(n)}else{var a=i;s=a}return p.Failure(s)}};tink_core_TypedError.prototype={throwSelf:function(){var e=this;throw haxe_Exception.thrown(e)},__class__:tink_core_TypedError};var tink_core__$Future_FutureObject=function(){};tink_core__$Future_FutureObject.__name__=true;tink_core__$Future_FutureObject.prototype={getStatus:function(){return N.NeverEver},handle:function(e){return null},eager:function(){},__class__:tink_core__$Future_FutureObject};var tink_core__$Future_SyncFuture=function(e){tink_core__$Future_FutureObject.call(this);this.value=e};tink_core__$Future_SyncFuture.__name__=true;tink_core__$Future_SyncFuture.__super__=tink_core__$Future_FutureObject;tink_core__$Future_SyncFuture.prototype=$extend(tink_core__$Future_FutureObject.prototype,{getStatus:function(){return N.Ready(this.value)},handle:function(e){R.invoke(e,f.get(this.value));return null},eager:function(){if(!this.value.isComputed()){f.get(this.value)}},__class__:tink_core__$Future_SyncFuture});var O={};O.never=function(){return O.NEVER_INST};O.flatMap=function(e,t,r){var n=e.getStatus();switch(n._hx_index){case 3:var i=n.result;return new tink_core__$Future_SuspendableFuture((function(e,r){return t(f.get(i)).handle((function(t){e(t)}))}));case 4:return O.never();default:return new tink_core__$Future_SuspendableFuture((function(r,n){var i=new tink_core_CallbackLinkRef;var s=e.handle((function(e){var s=t(e);if(s.getStatus()._hx_index==4){n()}else{var a=s;var o=a.handle(r);var l=i.link;if(l!=null){l.cancel()}i.link=o}}));return new tink_core__$Callback_LinkPair(s,i)}))}};O.processMany=function(e,t,r,n){if(e.length==0){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(n(p.Success([]))))}else{var wakeup=function(i){var s=[];var a=[];var o=0;while(o<e.length){var l=e[o];++o;a.push(null)}var c=a;var u=0;var h=0;var d=false;var _;if(t==null){_=e.length}else{var m=t;_=m<1?1:m>e.length?e.length:m}var fireWhenReady=function(){if(u==c.length){if(h==0){var e=n(p.Success(c));d=true;i(e);return true}else{return false}}else{return false}};var v=null;v=function(){if(!d&&!fireWhenReady()){while(u<c.length){u+=1;var t=[u-1];var a=e[t[0]];var o=[function(e){return function(t){var a=r(t);switch(a._hx_index){case 0:var o=a.data;c[e[0]]=o;fireWhenReady();break;case 1:var l=a.failure;var a=0;while(a<s.length){var u=s[a];++a;if(u!=null){u.cancel()}}var o=n(p.Failure(l));d=true;i(o);break}}}(t)];var l=a.getStatus();if(l._hx_index==3){var _;_=f.get(l.result);var m=_;o[0](m);if(!d){continue}}else{h+=1;s.push(a.handle(function(e){return function(t){h-=1;e[0](t);if(!d){v()}}}(o)))}break}}};var a=0;var o=_;while(a<o){var y=a++;v()}return k.fromMany(s)};return new tink_core__$Future_SuspendableFuture((function(e,t){return wakeup(e)}))}};O.async=function(e,t){if(t==null){t=false}var r=O.irreversible(e);if(t){return r}else{r.eager();return r}};O.irreversible=function(e){return new tink_core__$Future_SuspendableFuture((function(t,r){e(t);return null}))};var N=t["tink.core.FutureStatus"]={__ename__:true,__constructs__:null,Suspended:{_hx_name:"Suspended",_hx_index:0,__enum__:"tink.core.FutureStatus",toString:$estr},Awaited:{_hx_name:"Awaited",_hx_index:1,__enum__:"tink.core.FutureStatus",toString:$estr},EagerlyAwaited:{_hx_name:"EagerlyAwaited",_hx_index:2,__enum__:"tink.core.FutureStatus",toString:$estr},Ready:(n=function(e){return{_hx_index:3,result:e,__enum__:"tink.core.FutureStatus",toString:$estr}},n._hx_name="Ready",n.__params__=["result"],n),NeverEver:{_hx_name:"NeverEver",_hx_index:4,__enum__:"tink.core.FutureStatus",toString:$estr}};N.__constructs__=[N.Suspended,N.Awaited,N.EagerlyAwaited,N.Ready,N.NeverEver];var tink_core__$Future_SuspendableFuture=function(e){this.status=N.Suspended;var t=this;tink_core__$Future_FutureObject.call(this);this.wakeup=e;this.callbacks=new tink_core_CallbackList(true);this.callbacks.ondrain=function(){if(t.status==N.Awaited){t.status=N.Suspended;var e=t.link;if(e!=null){e.cancel()}t.link=null}};this.callbacks.onfill=function(){if(t.status==N.Suspended){t.status=N.Awaited;t.arm()}}};tink_core__$Future_SuspendableFuture.__name__=true;tink_core__$Future_SuspendableFuture.__super__=tink_core__$Future_FutureObject;tink_core__$Future_SuspendableFuture.prototype=$extend(tink_core__$Future_FutureObject.prototype,{getStatus:function(){return this.status},trigger:function(e){var t=this.status;if(t._hx_index==3){var r=t.result}else{this.status=N.Ready(new tink_core__$Lazy_LazyConst(e));var n=this.link;this.link=null;this.wakeup=null;this.callbacks.invoke(e);if(n!=null){n.cancel()}}},handle:function(e){var t=this.status;if(t._hx_index==3){var r=t.result;R.invoke(e,f.get(r));return null}else{var n=this.callbacks;if(n.disposeHandlers==null){return null}else{var i=new tink_core__$Callback_ListCell(e,n);n.cells.push(i);if(n.used++==0){var s=n.onfill;if(R.depth<500){R.depth++;s();R.depth--}else{R.defer(s)}}return i}}},destroy:function(){this.callbacks.dispose();this.status=N.NeverEver},arm:function(){var e=this;this.link=this.wakeup((function(t){e.trigger(t)}),$bind(this,this.destroy))},eager:function(){switch(this.status._hx_index){case 0:this.status=N.EagerlyAwaited;this.arm();break;case 1:this.status=N.EagerlyAwaited;break;default:}},__class__:tink_core__$Future_SuspendableFuture});var tink_core__$Lazy_LazyFunc=function(e,t){this.f=e;this.from=t};tink_core__$Lazy_LazyFunc.__name__=true;tink_core__$Lazy_LazyFunc.__interfaces__=[tink_core__$Lazy_LazyObject];tink_core__$Lazy_LazyFunc.prototype={underlying:function(){return this.from},isComputed:function(){return this.f==null},get:function(){return this.result},compute:function(){var e=this.f;if(e!=null){var t=e;this.f=null;var e=this.from;if(e!=null){var r=e;this.from=null;var n=[];while(r!=null&&!r.isComputed()){n.push(r);r=r.underlying()}n.reverse();var e=0;while(e<n.length){var i=n[e];++e;i.compute()}}this.result=t()}},__class__:tink_core__$Lazy_LazyFunc};var tink_core_OutcomeTools=function(){};tink_core_OutcomeTools.__name__=true;tink_core_OutcomeTools.sure=function(e){switch(e._hx_index){case 0:var t=e.data;return t;case 1:var r=e.failure;var n=tink_core_TypedError.asError(r);if(n==null){throw haxe_Exception.thrown(r)}else{var i=n;return i.throwSelf()}break}};tink_core_OutcomeTools.map=function(e,t){switch(e._hx_index){case 0:var r=e.data;return p.Success(t(r));case 1:var n=e.failure;return p.Failure(n)}};var A={};A.next=function(e,t,r){return O.flatMap(e,(function(e){switch(e._hx_index){case 0:var r=e.data;return t(r);case 1:var n=e.failure;return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Failure(n)))}}))};A.inParallel=function(e,t){return A.many(e,t)};A.many=function(e,t){return O.processMany(e,t,(function(e){return e}),(function(e){return e}))};var I={};I.ofSafeSync=function(e){return function(t){return new tink_core__$Future_SyncFuture(new tink_core__$Lazy_LazyConst(p.Success(e(t))))}};var L={};L.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 n;if(t.hx__closures__==null)t.hx__closures__={};else n=t.hx__closures__[r.__id__];if(n==null){n=r.bind(t);t.hx__closures__[r.__id__]=n}return n}function $arrayPush(e){return 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)};Object.defineProperty(String.prototype,"__class__",{value:String,enumerable:false,writable:true});String.__name__=true;Array.__name__=true;Date.prototype.__class__=Date;Date.__name__="Date";var F={};var T={};var C=Number;var B=Boolean;var D={};var M={};if(typeof performance!="undefined"?typeof performance.now=="function":false){HxOverrides.now=performance.now.bind(performance)}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(i.Off,0);r.set(i.Bold,1);r.set(i.Underline,4);r.set(i.Blink,5);r.set(i.ReverseVideo,7);r.set(i.Concealed,8);r.set(i.BoldOff,22);r.set(i.UnderlineOff,24);r.set(i.BlinkOff,25);r.set(i.NormalVideo,27);r.set(i.ConcealedOff,28);r.set(i.Black,30);r.set(i.Red,31);r.set(i.Green,32);r.set(i.Yellow,33);r.set(i.Blue,34);r.set(i.Magenta,35);r.set(i.Cyan,36);r.set(i.White,37);r.set(i.DefaultForeground,39);r.set(i.BlackBack,40);r.set(i.RedBack,41);r.set(i.GreenBack,42);r.set(i.YellowBack,43);r.set(i.BlueBack,44);r.set(i.MagentaBack,45);r.set(i.CyanBack,46);r.set(i.WhiteBack,47);r.set(i.DefaultBackground,49);t=r;return t}(this);ANSI.available=ANSI.detectSupport();ANSI.strip=false;ANSI.stripIfUnavailable=true;haxe_SysTools.winMetaCharacters=[32,40,41,37,33,94,34,60,62,38,124,10,13,44,59];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_sys_Os.IS_WINDOWS=Sys.systemName()=="Windows";haxeshim_sys_Os.DELIMITER=haxeshim_sys_Os.IS_WINDOWS?";":":";haxeshim_sys_Os.EXECUTABLE_EXTENSION=haxeshim_sys_Os.IS_WINDOWS?".exe":"";haxeshim_scope_Scope.CONFIG_FILE=".haxerc";haxeshim_scope_Scope.fs={isDirectory:function(e){try{return sys_FileSystem.isDirectory(e)}catch(e){return false}},readFile:function(e){try{return p.Success(d.readFileSync(e,{encoding:"utf8"}))}catch(r){var t=haxe_Exception.caught(r).unwrap();return p.Failure("Cannot read "+e+" because "+Std.string(t))}}};haxeshim_scope_Scope.DEFAULT_ROOT=function(e){var t;var r=haxeshim_scope_Scope.env("HAXE_ROOT");var n=haxeshim_scope_Scope.env("HAXESHIM_ROOT");var i=haxeshim_sys_Os.IS_WINDOWS?"APPDATA":"HOME";var s=new tink_core__$Lazy_LazyConst(process.env[i]+"/haxe");var a;if(n._hx_index==0){var o=n.v;a=o}else{a=f.get(s)}var s=new tink_core__$Lazy_LazyConst(a);t=r._hx_index==0?function(e){var t;var n=r.v;t=n;return t}(e):f.get(s);return t}(this);lix_client_Download.initZip=function(e){var t;var r=x.validateFileName;x.validateFileName=function(e){return null};t=true;return t}(this);lix_client_Download.USER_AGENT="lix";R.depth=0;O.NEVER_INST=new tink_core__$Future_FutureObject;lix_cli_HaxelibCmd.main()})(typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this)},4794:(e,t,r)=>{var n=r(4300).Buffer;var i=[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"){i=new Int32Array(i)}function ensureBuffer(e){if(n.isBuffer(e)){return e}var t=typeof n.alloc==="function"&&typeof n.from==="function";if(typeof e==="number"){return t?n.alloc(e):new n(e)}else if(typeof e==="string"){return t?n.from(e):new n(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(n.isBuffer(t)){t=t.readUInt32BE(0)}var r=~~t^-1;for(var s=0;s<e.length;s++){r=i[(r^e[s])&255]^r>>>8}return r^-1}function crc32(){return bufferizeInt(_crc32.apply(null,arguments))}crc32.signed=function(){return _crc32.apply(null,arguments)};crc32.unsigned=function(){return _crc32.apply(null,arguments)>>>0};e.exports=crc32},9051:(e,t,r)=>{"use strict";const n=r(7147);const i=r(1017);const s=n.lchown?"lchown":"chown";const a=n.lchownSync?"lchownSync":"chownSync";const o=n.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/);const lchownSync=(e,t,r)=>{try{return n[a](e,t,r)}catch(e){if(e.code!=="ENOENT")throw e}};const chownSync=(e,t,r)=>{try{return n.chownSync(e,t,r)}catch(e){if(e.code!=="ENOENT")throw e}};const l=o?(e,t,r,i)=>s=>{if(!s||s.code!=="EISDIR")i(s);else n.chown(e,t,r,i)}:(e,t,r,n)=>n;const c=o?(e,t,r)=>{try{return lchownSync(e,t,r)}catch(n){if(n.code!=="EISDIR")throw n;chownSync(e,t,r)}}:(e,t,r)=>lchownSync(e,t,r);const u=process.version;let readdir=(e,t,r)=>n.readdir(e,t,r);let readdirSync=(e,t)=>n.readdirSync(e,t);if(/^v4\./.test(u))readdir=(e,t,r)=>n.readdir(e,r);const chown=(e,t,r,i)=>{n[s](e,t,r,l(e,t,r,(e=>{i(e&&e.code!=="ENOENT"?e:null)})))};const chownrKid=(e,t,r,s,a)=>{if(typeof t==="string")return n.lstat(i.resolve(e,t),((n,i)=>{if(n)return a(n.code!=="ENOENT"?n:null);i.name=t;chownrKid(e,i,r,s,a)}));if(t.isDirectory()){chownr(i.resolve(e,t.name),r,s,(n=>{if(n)return a(n);const o=i.resolve(e,t.name);chown(o,r,s,a)}))}else{const n=i.resolve(e,t.name);chown(n,r,s,a)}};const chownr=(e,t,r,n)=>{readdir(e,{withFileTypes:true},((i,s)=>{if(i){if(i.code==="ENOENT")return n();else if(i.code!=="ENOTDIR"&&i.code!=="ENOTSUP")return n(i)}if(i||!s.length)return chown(e,t,r,n);let a=s.length;let o=null;const then=i=>{if(o)return;if(i)return n(o=i);if(--a===0)return chown(e,t,r,n)};s.forEach((n=>chownrKid(e,n,t,r,then)))}))};const chownrKidSync=(e,t,r,s)=>{if(typeof t==="string"){try{const r=n.lstatSync(i.resolve(e,t));r.name=t;t=r}catch(e){if(e.code==="ENOENT")return;else throw e}}if(t.isDirectory())chownrSync(i.resolve(e,t.name),r,s);c(i.resolve(e,t.name),r,s)};const chownrSync=(e,t,r)=>{let n;try{n=readdirSync(e,{withFileTypes:true})}catch(n){if(n.code==="ENOENT")return;else if(n.code==="ENOTDIR"||n.code==="ENOTSUP")return c(e,t,r);else throw n}if(n&&n.length)n.forEach((n=>chownrKidSync(e,n,t,r)));return c(e,t,r)};e.exports=chownr;chownr.sync=chownrSync},5010:(e,t,r)=>{var n=r(7147);var i=r(3837);var s=r(2781);var a=s.Readable;var o=s.Writable;var l=s.PassThrough;var c=r(4833);var u=r(2361).EventEmitter;t.createFromBuffer=createFromBuffer;t.createFromFd=createFromFd;t.BufferSlicer=BufferSlicer;t.FdSlicer=FdSlicer;i.inherits(FdSlicer,u);function FdSlicer(e,t){t=t||{};u.call(this);this.fd=e;this.pend=new c;this.pend.max=1;this.refCount=0;this.autoClose=!!t.autoClose}FdSlicer.prototype.read=function(e,t,r,i,s){var a=this;a.pend.go((function(o){n.read(a.fd,e,t,r,i,(function(e,t,r){o();s(e,t,r)}))}))};FdSlicer.prototype.write=function(e,t,r,i,s){var a=this;a.pend.go((function(o){n.write(a.fd,e,t,r,i,(function(e,t,r){o();s(e,t,r)}))}))};FdSlicer.prototype.createReadStream=function(e){return new ReadStream(this,e)};FdSlicer.prototype.createWriteStream=function(e){return new WriteStream(this,e)};FdSlicer.prototype.ref=function(){this.refCount+=1};FdSlicer.prototype.unref=function(){var e=this;e.refCount-=1;if(e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");if(e.autoClose){n.close(e.fd,onCloseDone)}function onCloseDone(t){if(t){e.emit("error",t)}else{e.emit("close")}}};i.inherits(ReadStream,a);function ReadStream(e,t){t=t||{};a.call(this,t);this.context=e;this.context.ref();this.start=t.start||0;this.endOffset=t.end;this.pos=this.start;this.destroyed=false}ReadStream.prototype._read=function(e){var t=this;if(t.destroyed)return;var r=Math.min(t._readableState.highWaterMark,e);if(t.endOffset!=null){r=Math.min(r,t.endOffset-t.pos)}if(r<=0){t.destroyed=true;t.push(null);t.context.unref();return}t.context.pend.go((function(e){if(t.destroyed)return e();var i=new Buffer(r);n.read(t.context.fd,i,0,r,t.pos,(function(r,n){if(r){t.destroy(r)}else if(n===0){t.destroyed=true;t.push(null);t.context.unref()}else{t.pos+=n;t.push(i.slice(0,n))}e()}))}))};ReadStream.prototype.destroy=function(e){if(this.destroyed)return;e=e||new Error("stream destroyed");this.destroyed=true;this.emit("error",e);this.context.unref()};i.inherits(WriteStream,o);function WriteStream(e,t){t=t||{};o.call(this,t);this.context=e;this.context.ref();this.start=t.start||0;this.endOffset=t.end==null?Infinity:+t.end;this.bytesWritten=0;this.pos=this.start;this.destroyed=false;this.on("finish",this.destroy.bind(this))}WriteStream.prototype._write=function(e,t,r){var i=this;if(i.destroyed)return;if(i.pos+e.length>i.endOffset){var s=new Error("maximum file length exceeded");s.code="ETOOBIG";i.destroy();r(s);return}i.context.pend.go((function(t){if(i.destroyed)return t();n.write(i.context.fd,e,0,e.length,i.pos,(function(e,n){if(e){i.destroy();t();r(e)}else{i.bytesWritten+=n;i.pos+=n;i.emit("progress");t();r()}}))}))};WriteStream.prototype.destroy=function(){if(this.destroyed)return;this.destroyed=true;this.context.unref()};i.inherits(BufferSlicer,u);function BufferSlicer(e,t){u.call(this);t=t||{};this.refCount=0;this.buffer=e;this.maxChunkSize=t.maxChunkSize||Number.MAX_SAFE_INTEGER}BufferSlicer.prototype.read=function(e,t,r,n,i){var s=n+r;var a=s-this.buffer.length;var o=a>0?a:r;this.buffer.copy(e,t,n,s);setImmediate((function(){i(null,o)}))};BufferSlicer.prototype.write=function(e,t,r,n,i){e.copy(this.buffer,n,t,t+r);setImmediate((function(){i(null,r,e)}))};BufferSlicer.prototype.createReadStream=function(e){e=e||{};var t=new l(e);t.destroyed=false;t.start=e.start||0;t.endOffset=e.end;t.pos=t.endOffset||this.buffer.length;var r=this.buffer.slice(t.start,t.pos);var n=0;while(true){var i=n+this.maxChunkSize;if(i>=r.length){if(n<r.length){t.write(r.slice(n,r.length))}break}t.write(r.slice(n,i));n=i}t.end();t.destroy=function(){t.destroyed=true};return t};BufferSlicer.prototype.createWriteStream=function(e){var t=this;e=e||{};var r=new o(e);r.start=e.start||0;r.endOffset=e.end==null?this.buffer.length:+e.end;r.bytesWritten=0;r.pos=r.start;r.destroyed=false;r._write=function(e,n,i){if(r.destroyed)return;var s=r.pos+e.length;if(s>r.endOffset){var a=new Error("maximum file length exceeded");a.code="ETOOBIG";r.destroyed=true;i(a);return}e.copy(t.buffer,r.pos,0,e.length);r.bytesWritten+=e.length;r.pos=s;r.emit("progress");i()};r.destroy=function(){r.destroyed=true};return r};BufferSlicer.prototype.ref=function(){this.refCount+=1};BufferSlicer.prototype.unref=function(){this.refCount-=1;if(this.refCount<0){throw new Error("invalid unref")}};function createFromBuffer(e,t){return new BufferSlicer(e,t)}function createFromFd(e,t){return new FdSlicer(e,t)}},7714:(e,t,r)=>{"use strict";const n=r(1077);const i=r(2361).EventEmitter;const s=r(7147);let a=s.writev;if(!a){const e=process.binding("fs");const t=e.FSReqWrap||e.FSReqCallback;a=(r,n,i,s)=>{const done=(e,t)=>s(e,t,n);const a=new t;a.oncomplete=done;e.writeBuffers(r,n,i,a)}}const o=Symbol("_autoClose");const l=Symbol("_close");const c=Symbol("_ended");const u=Symbol("_fd");const h=Symbol("_finished");const f=Symbol("_flags");const d=Symbol("_flush");const p=Symbol("_handleChunk");const _=Symbol("_makeBuf");const m=Symbol("_mode");const v=Symbol("_needDrain");const y=Symbol("_onerror");const w=Symbol("_onopen");const g=Symbol("_onread");const b=Symbol("_onwrite");const S=Symbol("_open");const x=Symbol("_path");const E=Symbol("_pos");const R=Symbol("_queue");const k=Symbol("_read");const O=Symbol("_readSize");const N=Symbol("_reading");const A=Symbol("_remain");const I=Symbol("_size");const L=Symbol("_write");const F=Symbol("_writing");const T=Symbol("_defaultFlag");const C=Symbol("_errored");class ReadStream extends n{constructor(e,t){t=t||{};super(t);this.readable=true;this.writable=false;if(typeof e!=="string")throw new TypeError("path must be a string");this[C]=false;this[u]=typeof t.fd==="number"?t.fd:null;this[x]=e;this[O]=t.readSize||16*1024*1024;this[N]=false;this[I]=typeof t.size==="number"?t.size:Infinity;this[A]=this[I];this[o]=typeof t.autoClose==="boolean"?t.autoClose:true;if(typeof this[u]==="number")this[k]();else this[S]()}get fd(){return this[u]}get path(){return this[x]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[S](){s.open(this[x],"r",((e,t)=>this[w](e,t)))}[w](e,t){if(e)this[y](e);else{this[u]=t;this.emit("open",t);this[k]()}}[_](){return Buffer.allocUnsafe(Math.min(this[O],this[A]))}[k](){if(!this[N]){this[N]=true;const e=this[_]();if(e.length===0)return process.nextTick((()=>this[g](null,0,e)));s.read(this[u],e,0,e.length,null,((e,t,r)=>this[g](e,t,r)))}}[g](e,t,r){this[N]=false;if(e)this[y](e);else if(this[p](t,r))this[k]()}[l](){if(this[o]&&typeof this[u]==="number"){const e=this[u];this[u]=null;s.close(e,(e=>e?this.emit("error",e):this.emit("close")))}}[y](e){this[N]=true;this[l]();this.emit("error",e)}[p](e,t){let r=false;this[A]-=e;if(e>0)r=super.write(e<t.length?t.slice(0,e):t);if(e===0||this[A]<=0){r=false;this[l]();super.end()}return r}emit(e,t){switch(e){case"prefinish":case"finish":break;case"drain":if(typeof this[u]==="number")this[k]();break;case"error":if(this[C])return;this[C]=true;return super.emit(e,t);default:return super.emit(e,t)}}}class ReadStreamSync extends ReadStream{[S](){let e=true;try{this[w](null,s.openSync(this[x],"r"));e=false}finally{if(e)this[l]()}}[k](){let e=true;try{if(!this[N]){this[N]=true;do{const e=this[_]();const t=e.length===0?0:s.readSync(this[u],e,0,e.length,null);if(!this[p](t,e))break}while(true);this[N]=false}e=false}finally{if(e)this[l]()}}[l](){if(this[o]&&typeof this[u]==="number"){const e=this[u];this[u]=null;s.closeSync(e);this.emit("close")}}}class WriteStream extends i{constructor(e,t){t=t||{};super(t);this.readable=false;this.writable=true;this[C]=false;this[F]=false;this[c]=false;this[v]=false;this[R]=[];this[x]=e;this[u]=typeof t.fd==="number"?t.fd:null;this[m]=t.mode===undefined?438:t.mode;this[E]=typeof t.start==="number"?t.start:null;this[o]=typeof t.autoClose==="boolean"?t.autoClose:true;const r=this[E]!==null?"r+":"w";this[T]=t.flags===undefined;this[f]=this[T]?r:t.flags;if(this[u]===null)this[S]()}emit(e,t){if(e==="error"){if(this[C])return;this[C]=true}return super.emit(e,t)}get fd(){return this[u]}get path(){return this[x]}[y](e){this[l]();this[F]=true;this.emit("error",e)}[S](){s.open(this[x],this[f],this[m],((e,t)=>this[w](e,t)))}[w](e,t){if(this[T]&&this[f]==="r+"&&e&&e.code==="ENOENT"){this[f]="w";this[S]()}else if(e)this[y](e);else{this[u]=t;this.emit("open",t);this[d]()}}end(e,t){if(e)this.write(e,t);this[c]=true;if(!this[F]&&!this[R].length&&typeof this[u]==="number")this[b](null,0);return this}write(e,t){if(typeof e==="string")e=Buffer.from(e,t);if(this[c]){this.emit("error",new Error("write() after end()"));return false}if(this[u]===null||this[F]||this[R].length){this[R].push(e);this[v]=true;return false}this[F]=true;this[L](e);return true}[L](e){s.write(this[u],e,0,e.length,this[E],((e,t)=>this[b](e,t)))}[b](e,t){if(e)this[y](e);else{if(this[E]!==null)this[E]+=t;if(this[R].length)this[d]();else{this[F]=false;if(this[c]&&!this[h]){this[h]=true;this[l]();this.emit("finish")}else if(this[v]){this[v]=false;this.emit("drain")}}}}[d](){if(this[R].length===0){if(this[c])this[b](null,0)}else if(this[R].length===1)this[L](this[R].pop());else{const e=this[R];this[R]=[];a(this[u],e,this[E],((e,t)=>this[b](e,t)))}}[l](){if(this[o]&&typeof this[u]==="number"){const e=this[u];this[u]=null;s.close(e,(e=>e?this.emit("error",e):this.emit("close")))}}}class WriteStreamSync extends WriteStream{[S](){let e;if(this[T]&&this[f]==="r+"){try{e=s.openSync(this[x],this[f],this[m])}catch(e){if(e.code==="ENOENT"){this[f]="w";return this[S]()}else throw e}}else e=s.openSync(this[x],this[f],this[m]);this[w](null,e)}[l](){if(this[o]&&typeof this[u]==="number"){const e=this[u];this[u]=null;s.closeSync(e);this.emit("close")}}[L](e){let t=true;try{this[b](null,s.writeSync(this[u],e,0,e.length,this[E]));t=false}finally{if(t)try{this[l]()}catch(e){}}}}t.ReadStream=ReadStream;t.ReadStreamSync=ReadStreamSync;t.WriteStream=WriteStream;t.WriteStreamSync=WriteStreamSync},7356:e=>{"use strict";e.exports=clone;function clone(e){if(e===null||typeof e!=="object")return e;if(e instanceof Object)var t={__proto__:e.__proto__};else var t=Object.create(null);Object.getOwnPropertyNames(e).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}));return t}},7758:(e,t,r)=>{var n=r(7147);var i=r(263);var s=r(3086);var a=r(7356);var o=r(3837);var l;var c;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){l=Symbol.for("graceful-fs.queue");c=Symbol.for("graceful-fs.previous")}else{l="___graceful-fs.queue";c="___graceful-fs.previous"}function noop(){}var u=noop;if(o.debuglog)u=o.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))u=function(){var e=o.format.apply(o,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: ");console.error(e)};if(!global[l]){var h=[];Object.defineProperty(global,l,{get:function(){return h}});n.close=function(e){function close(t,r){return e.call(n,t,(function(e){if(!e){retry()}if(typeof r==="function")r.apply(this,arguments)}))}Object.defineProperty(close,c,{value:e});return close}(n.close);n.closeSync=function(e){function closeSync(t){e.apply(n,arguments);retry()}Object.defineProperty(closeSync,c,{value:e});return closeSync}(n.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",(function(){u(global[l]);r(9491).equal(global[l].length,0)}))}}e.exports=patch(a(n));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!n.__patched){e.exports=patch(n);n.__patched=true}function patch(e){i(e);e.gracefulify=patch;e.createReadStream=createReadStream;e.createWriteStream=createWriteStream;var t=e.readFile;e.readFile=readFile;function readFile(e,r,n){if(typeof r==="function")n=r,r=null;return go$readFile(e,r,n);function go$readFile(e,r,n){return t(e,r,(function(t){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))enqueue([go$readFile,[e,r,n]]);else{if(typeof n==="function")n.apply(this,arguments);retry()}}))}}var r=e.writeFile;e.writeFile=writeFile;function writeFile(e,t,n,i){if(typeof n==="function")i=n,n=null;return go$writeFile(e,t,n,i);function go$writeFile(e,t,n,i){return r(e,t,n,(function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))enqueue([go$writeFile,[e,t,n,i]]);else{if(typeof i==="function")i.apply(this,arguments);retry()}}))}}var n=e.appendFile;if(n)e.appendFile=appendFile;function appendFile(e,t,r,i){if(typeof r==="function")i=r,r=null;return go$appendFile(e,t,r,i);function go$appendFile(e,t,r,i){return n(e,t,r,(function(n){if(n&&(n.code==="EMFILE"||n.code==="ENFILE"))enqueue([go$appendFile,[e,t,r,i]]);else{if(typeof i==="function")i.apply(this,arguments);retry()}}))}}var a=e.readdir;e.readdir=readdir;function readdir(e,t,r){var n=[e];if(typeof t!=="function"){n.push(t)}else{r=t}n.push(go$readdir$cb);return go$readdir(n);function go$readdir$cb(e,t){if(t&&t.sort)t.sort();if(e&&(e.code==="EMFILE"||e.code==="ENFILE"))enqueue([go$readdir,[n]]);else{if(typeof r==="function")r.apply(this,arguments);retry()}}}function go$readdir(t){return a.apply(e,t)}if(process.version.substr(0,4)==="v0.8"){var o=s(e);ReadStream=o.ReadStream;WriteStream=o.WriteStream}var l=e.ReadStream;if(l){ReadStream.prototype=Object.create(l.prototype);ReadStream.prototype.open=ReadStream$open}var c=e.WriteStream;if(c){WriteStream.prototype=Object.create(c.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(e,"ReadStream",{get:function(){return ReadStream},set:function(e){ReadStream=e},enumerable:true,configurable:true});Object.defineProperty(e,"WriteStream",{get:function(){return WriteStream},set:function(e){WriteStream=e},enumerable:true,configurable:true});var u=ReadStream;Object.defineProperty(e,"FileReadStream",{get:function(){return u},set:function(e){u=e},enumerable:true,configurable:true});var h=WriteStream;Object.defineProperty(e,"FileWriteStream",{get:function(){return h},set:function(e){h=e},enumerable:true,configurable:true});function ReadStream(e,t){if(this instanceof ReadStream)return l.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(t,r){if(t){if(e.autoClose)e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r);e.read()}}))}function WriteStream(e,t){if(this instanceof WriteStream)return c.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(t,r){if(t){e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r)}}))}function createReadStream(t,r){return new e.ReadStream(t,r)}function createWriteStream(t,r){return new e.WriteStream(t,r)}var f=e.open;e.open=open;function open(e,t,r,n){if(typeof r==="function")n=r,r=null;return go$open(e,t,r,n);function go$open(e,t,r,n){return f(e,t,r,(function(i,s){if(i&&(i.code==="EMFILE"||i.code==="ENFILE"))enqueue([go$open,[e,t,r,n]]);else{if(typeof n==="function")n.apply(this,arguments);retry()}}))}}return e}function enqueue(e){u("ENQUEUE",e[0].name,e[1]);global[l].push(e)}function retry(){var e=global[l].shift();if(e){u("RETRY",e[0].name,e[1]);e[0].apply(null,e[1])}}},3086:(e,t,r)=>{var n=r(2781).Stream;e.exports=legacy;function legacy(e){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(t,r){if(!(this instanceof ReadStream))return new ReadStream(t,r);n.call(this);var i=this;this.path=t;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;r=r||{};var s=Object.keys(r);for(var a=0,o=s.length;a<o;a++){var l=s[a];this[l]=r[l]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==undefined){if("number"!==typeof this.start){throw TypeError("start must be a Number")}if(this.end===undefined){this.end=Infinity}else if("number"!==typeof this.end){throw TypeError("end must be a Number")}if(this.start>this.end){throw new Error("start must be <= end")}this.pos=this.start}if(this.fd!==null){process.nextTick((function(){i._read()}));return}e.open(this.path,this.flags,this.mode,(function(e,t){if(e){i.emit("error",e);i.readable=false;return}i.fd=t;i.emit("open",t);i._read()}))}function WriteStream(t,r){if(!(this instanceof WriteStream))return new WriteStream(t,r);n.call(this);this.path=t;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;r=r||{};var i=Object.keys(r);for(var s=0,a=i.length;s<a;s++){var o=i[s];this[o]=r[o]}if(this.start!==undefined){if("number"!==typeof this.start){throw TypeError("start must be a Number")}if(this.start<0){throw new Error("start must be >= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=e.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},263:(e,t,r)=>{var n=r(2057);var i=process.cwd;var s=null;var a=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!s)s=i.call(process);return s};try{process.cwd()}catch(e){}var o=process.chdir;process.chdir=function(e){s=null;o.call(process,e)};e.exports=patch;function patch(e){if(n.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(e)}if(!e.lutimes){patchLutimes(e)}e.chown=chownFix(e.chown);e.fchown=chownFix(e.fchown);e.lchown=chownFix(e.lchown);e.chmod=chmodFix(e.chmod);e.fchmod=chmodFix(e.fchmod);e.lchmod=chmodFix(e.lchmod);e.chownSync=chownFixSync(e.chownSync);e.fchownSync=chownFixSync(e.fchownSync);e.lchownSync=chownFixSync(e.lchownSync);e.chmodSync=chmodFixSync(e.chmodSync);e.fchmodSync=chmodFixSync(e.fchmodSync);e.lchmodSync=chmodFixSync(e.lchmodSync);e.stat=statFix(e.stat);e.fstat=statFix(e.fstat);e.lstat=statFix(e.lstat);e.statSync=statFixSync(e.statSync);e.fstatSync=statFixSync(e.fstatSync);e.lstatSync=statFixSync(e.lstatSync);if(!e.lchmod){e.lchmod=function(e,t,r){if(r)process.nextTick(r)};e.lchmodSync=function(){}}if(!e.lchown){e.lchown=function(e,t,r,n){if(n)process.nextTick(n)};e.lchownSync=function(){}}if(a==="win32"){e.rename=function(t){return function(r,n,i){var s=Date.now();var a=0;t(r,n,(function CB(o){if(o&&(o.code==="EACCES"||o.code==="EPERM")&&Date.now()-s<6e4){setTimeout((function(){e.stat(n,(function(e,s){if(e&&e.code==="ENOENT")t(r,n,CB);else i(o)}))}),a);if(a<100)a+=10;return}if(i)i(o)}))}}(e.rename)}e.read=function(t){function read(r,n,i,s,a,o){var l;if(o&&typeof o==="function"){var c=0;l=function(u,h,f){if(u&&u.code==="EAGAIN"&&c<10){c++;return t.call(e,r,n,i,s,a,l)}o.apply(this,arguments)}}return t.call(e,r,n,i,s,a,l)}read.__proto__=t;return read}(e.read);e.readSync=function(t){return function(r,n,i,s,a){var o=0;while(true){try{return t.call(e,r,n,i,s,a)}catch(e){if(e.code==="EAGAIN"&&o<10){o++;continue}throw e}}}}(e.readSync);function patchLchmod(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,(function(t,n){if(t){if(i)i(t);return}e.fchmod(n,r,(function(t){e.close(n,(function(e){if(i)i(t||e)}))}))}))};e.lchmodSync=function(t,r){var i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r);var s=true;var a;try{a=e.fchmodSync(i,r);s=false}finally{if(s){try{e.closeSync(i)}catch(e){}}else{e.closeSync(i)}}return a}}function patchLutimes(e){if(n.hasOwnProperty("O_SYMLINK")){e.lutimes=function(t,r,i,s){e.open(t,n.O_SYMLINK,(function(t,n){if(t){if(s)s(t);return}e.futimes(n,r,i,(function(t){e.close(n,(function(e){if(s)s(t||e)}))}))}))};e.lutimesSync=function(t,r,i){var s=e.openSync(t,n.O_SYMLINK);var a;var o=true;try{a=e.futimesSync(s,r,i);o=false}finally{if(o){try{e.closeSync(s)}catch(e){}}else{e.closeSync(s)}}return a}}else{e.lutimes=function(e,t,r,n){if(n)process.nextTick(n)};e.lutimesSync=function(){}}}function chmodFix(t){if(!t)return t;return function(r,n,i){return t.call(e,r,n,(function(e){if(chownErOk(e))e=null;if(i)i.apply(this,arguments)}))}}function chmodFixSync(t){if(!t)return t;return function(r,n){try{return t.call(e,r,n)}catch(e){if(!chownErOk(e))throw e}}}function chownFix(t){if(!t)return t;return function(r,n,i,s){return t.call(e,r,n,i,(function(e){if(chownErOk(e))e=null;if(s)s.apply(this,arguments)}))}}function chownFixSync(t){if(!t)return t;return function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!chownErOk(e))throw e}}}function statFix(t){if(!t)return t;return function(r,n,i){if(typeof n==="function"){i=n;n=null}function callback(e,t){if(t){if(t.uid<0)t.uid+=4294967296;if(t.gid<0)t.gid+=4294967296}if(i)i.apply(this,arguments)}return n?t.call(e,r,n,callback):t.call(e,r,callback)}}function statFixSync(t){if(!t)return t;return function(r,n){var i=n?t.call(e,r,n):t.call(e,r);if(i.uid<0)i.uid+=4294967296;if(i.gid<0)i.gid+=4294967296;return i}}function chownErOk(e){if(!e)return true;if(e.code==="ENOSYS")return true;var t=!process.getuid||process.getuid()!==0;if(t){if(e.code==="EINVAL"||e.code==="EPERM")return true}return false}}},1077:(e,t,r)=>{"use strict";const n=r(2361);const i=r(2781);const s=r(665);const a=r(1576).StringDecoder;const o=Symbol("EOF");const l=Symbol("maybeEmitEnd");const c=Symbol("emittedEnd");const u=Symbol("emittingEnd");const h=Symbol("closed");const f=Symbol("read");const d=Symbol("flush");const p=Symbol("flushChunk");const _=Symbol("encoding");const m=Symbol("decoder");const v=Symbol("flowing");const y=Symbol("paused");const w=Symbol("resume");const g=Symbol("bufferLength");const b=Symbol("bufferPush");const S=Symbol("bufferShift");const x=Symbol("objectMode");const E=Symbol("destroyed");const R=global._MP_NO_ITERATOR_SYMBOLS_!=="1";const k=R&&Symbol.asyncIterator||Symbol("asyncIterator not implemented");const O=R&&Symbol.iterator||Symbol("iterator not implemented");const isEndish=e=>e==="end"||e==="finish"||e==="prefinish";const isArrayBuffer=e=>e instanceof ArrayBuffer||typeof e==="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0;const isArrayBufferView=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);e.exports=class Minipass extends i{constructor(e){super();this[v]=false;this[y]=false;this.pipes=new s;this.buffer=new s;this[x]=e&&e.objectMode||false;if(this[x])this[_]=null;else this[_]=e&&e.encoding||null;if(this[_]==="buffer")this[_]=null;this[m]=this[_]?new a(this[_]):null;this[o]=false;this[c]=false;this[u]=false;this[h]=false;this.writable=true;this.readable=true;this[g]=0;this[E]=false}get bufferLength(){return this[g]}get encoding(){return this[_]}set encoding(e){if(this[x])throw new Error("cannot set encoding in objectMode");if(this[_]&&e!==this[_]&&(this[m]&&this[m].lastNeed||this[g]))throw new Error("cannot change encoding");if(this[_]!==e){this[m]=e?new a(e):null;if(this.buffer.length)this.buffer=this.buffer.map((e=>this[m].write(e)))}this[_]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[x]}set objectMode(e){this[x]=this[x]||!!e}write(e,t,r){if(this[o])throw new Error("write after end");if(this[E]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof t==="function")r=t,t="utf8";if(!t)t="utf8";if(!this[x]&&!Buffer.isBuffer(e)){if(isArrayBufferView(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(isArrayBuffer(e))e=Buffer.from(e);else if(typeof e!=="string")this.objectMode=true}if(!this.objectMode&&!e.length){const e=this.flowing;if(this[g]!==0)this.emit("readable");if(r)r();return e}if(typeof e==="string"&&!this[x]&&!(t===this[_]&&!this[m].lastNeed)){e=Buffer.from(e,t)}if(Buffer.isBuffer(e)&&this[_])e=this[m].write(e);try{return this.flowing?(this.emit("data",e),this.flowing):(this[b](e),false)}finally{if(this[g]!==0)this.emit("readable");if(r)r()}}read(e){if(this[E])return null;try{if(this[g]===0||e===0||e>this[g])return null;if(this[x])e=null;if(this.buffer.length>1&&!this[x]){if(this.encoding)this.buffer=new s([Array.from(this.buffer).join("")]);else this.buffer=new s([Buffer.concat(Array.from(this.buffer),this[g])])}return this[f](e||null,this.buffer.head.value)}finally{this[l]()}}[f](e,t){if(e===t.length||e===null)this[S]();else{this.buffer.head.value=t.slice(e);t=t.slice(0,e);this[g]-=e}this.emit("data",t);if(!this.buffer.length&&!this[o])this.emit("drain");return t}end(e,t,r){if(typeof e==="function")r=e,e=null;if(typeof t==="function")r=t,t="utf8";if(e)this.write(e,t);if(r)this.once("end",r);this[o]=true;this.writable=false;if(this.flowing||!this[y])this[l]();return this}[w](){if(this[E])return;this[y]=false;this[v]=true;this.emit("resume");if(this.buffer.length)this[d]();else if(this[o])this[l]();else this.emit("drain")}resume(){return this[w]()}pause(){this[v]=false;this[y]=true}get destroyed(){return this[E]}get flowing(){return this[v]}get paused(){return this[y]}[b](e){if(this[x])this[g]+=1;else this[g]+=e.length;return this.buffer.push(e)}[S](){if(this.buffer.length){if(this[x])this[g]-=1;else this[g]-=this.buffer.head.value.length}return this.buffer.shift()}[d](){do{}while(this[p](this[S]()));if(!this.buffer.length&&!this[o])this.emit("drain")}[p](e){return e?(this.emit("data",e),this.flowing):false}pipe(e,t){if(this[E])return;const r=this[c];t=t||{};if(e===process.stdout||e===process.stderr)t.end=false;else t.end=t.end!==false;const n={dest:e,opts:t,ondrain:e=>this[w]()};this.pipes.push(n);e.on("drain",n.ondrain);this[w]();if(r&&n.opts.end)n.dest.end();return e}addListener(e,t){return this.on(e,t)}on(e,t){try{return super.on(e,t)}finally{if(e==="data"&&!this.pipes.length&&!this.flowing)this[w]();else if(isEndish(e)&&this[c]){super.emit(e);this.removeAllListeners(e)}}}get emittedEnd(){return this[c]}[l](){if(!this[u]&&!this[c]&&!this[E]&&this.buffer.length===0&&this[o]){this[u]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[h])this.emit("close");this[u]=false}}emit(e,t){if(e!=="error"&&e!=="close"&&e!==E&&this[E])return;else if(e==="data"){if(!t)return;if(this.pipes.length)this.pipes.forEach((e=>e.dest.write(t)===false&&this.pause()))}else if(e==="end"){if(this[c]===true)return;this[c]=true;this.readable=false;if(this[m]){t=this[m].end();if(t){this.pipes.forEach((e=>e.dest.write(t)));super.emit("data",t)}}this.pipes.forEach((e=>{e.dest.removeListener("drain",e.ondrain);if(e.opts.end)e.dest.end()}))}else if(e==="close"){this[h]=true;if(!this[c]&&!this[E])return}const r=new Array(arguments.length);r[0]=e;r[1]=t;if(arguments.length>2){for(let e=2;e<arguments.length;e++){r[e]=arguments[e]}}try{return super.emit.apply(this,r)}finally{if(!isEndish(e))this[l]();else this.removeAllListeners(e)}}collect(){const e=[];if(!this[x])e.dataLength=0;const t=this.promise();this.on("data",(t=>{e.push(t);if(!this[x])e.dataLength+=t.length}));return t.then((()=>e))}concat(){return this[x]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then((e=>this[x]?Promise.reject(new Error("cannot concat in objectMode")):this[_]?e.join(""):Buffer.concat(e,e.dataLength)))}promise(){return new Promise(((e,t)=>{this.on(E,(()=>t(new Error("stream destroyed"))));this.on("end",(()=>e()));this.on("error",(e=>t(e)))}))}[k](){const next=()=>{const e=this.read();if(e!==null)return Promise.resolve({done:false,value:e});if(this[o])return Promise.resolve({done:true});let t=null;let r=null;const onerr=e=>{this.removeListener("data",ondata);this.removeListener("end",onend);r(e)};const ondata=e=>{this.removeListener("error",onerr);this.removeListener("end",onend);this.pause();t({value:e,done:!!this[o]})};const onend=()=>{this.removeListener("error",onerr);this.removeListener("data",ondata);t({done:true})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((e,n)=>{r=n;t=e;this.once(E,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next}}[O](){const next=()=>{const e=this.read();const t=e===null;return{value:e,done:t}};return{next:next}}destroy(e){if(this[E]){if(e)this.emit("error",e);else this.emit(E);return this}this[E]=true;this.buffer=new s;this[g]=0;if(typeof this.close==="function"&&!this[h])this.close();if(e)this.emit("error",e);else this.emit(E);return this}static isStream(e){return!!e&&(e instanceof Minipass||e instanceof i||e instanceof n&&(typeof e.pipe==="function"||typeof e.write==="function"&&typeof e.end==="function"))}}},6769:(e,t,r)=>{const n=r(9796).constants||{ZLIB_VERNUM:4736};e.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:Infinity,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},n))},3486:(e,t,r)=>{"use strict";const n=r(9491);const i=r(4300).Buffer;const s=r(9796);const a=t.constants=r(6769);const o=r(1077);const l=i.concat;const c=Symbol("_superWrite");class ZlibError extends Error{constructor(e){super("zlib: "+e.message);this.code=e.code;this.errno=e.errno;if(!this.code)this.code="ZLIB_ERROR";this.message="zlib: "+e.message;Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}}const u=Symbol("opts");const h=Symbol("flushFlag");const f=Symbol("finishFlushFlag");const d=Symbol("fullFlushFlag");const p=Symbol("handle");const _=Symbol("onError");const m=Symbol("sawError");const v=Symbol("level");const y=Symbol("strategy");const w=Symbol("ended");const g=Symbol("_defaultFullFlush");class ZlibBase extends o{constructor(e,t){if(!e||typeof e!=="object")throw new TypeError("invalid options for ZlibBase constructor");super(e);this[w]=false;this[u]=e;this[h]=e.flush;this[f]=e.finishFlush;try{this[p]=new s[t](e)}catch(e){throw new ZlibError(e)}this[_]=e=>{this[m]=true;this.close();this.emit("error",e)};this[p].on("error",(e=>this[_](new ZlibError(e))));this.once("end",(()=>this.close))}close(){if(this[p]){this[p].close();this[p]=null;this.emit("close")}}reset(){if(!this[m]){n(this[p],"zlib binding closed");return this[p].reset()}}flush(e){if(this.ended)return;if(typeof e!=="number")e=this[d];this.write(Object.assign(i.alloc(0),{[h]:e}))}end(e,t,r){if(e)this.write(e,t);this.flush(this[f]);this[w]=true;return super.end(null,null,r)}get ended(){return this[w]}write(e,t,r){if(typeof t==="function")r=t,t="utf8";if(typeof e==="string")e=i.from(e,t);if(this[m])return;n(this[p],"zlib binding closed");const s=this[p]._handle;const a=s.close;s.close=()=>{};const o=this[p].close;this[p].close=()=>{};i.concat=e=>e;let u;try{const t=typeof e[h]==="number"?e[h]:this[h];u=this[p]._processChunk(e,t);i.concat=l}catch(e){i.concat=l;this[_](new ZlibError(e))}finally{if(this[p]){this[p]._handle=s;s.close=a;this[p].close=o;this[p].removeAllListeners("error")}}let f;if(u){if(Array.isArray(u)&&u.length>0){f=this[c](i.from(u[0]));for(let e=1;e<u.length;e++){f=this[c](u[e])}}else{f=this[c](i.from(u))}}if(r)r();return f}[c](e){return super.write(e)}}class Zlib extends ZlibBase{constructor(e,t){e=e||{};e.flush=e.flush||a.Z_NO_FLUSH;e.finishFlush=e.finishFlush||a.Z_FINISH;super(e,t);this[d]=a.Z_FULL_FLUSH;this[v]=e.level;this[y]=e.strategy}params(e,t){if(this[m])return;if(!this[p])throw new Error("cannot switch params when binding is closed");if(!this[p].params)throw new Error("not supported in this implementation");if(this[v]!==e||this[y]!==t){this.flush(a.Z_SYNC_FLUSH);n(this[p],"zlib binding closed");const r=this[p].flush;this[p].flush=(e,t)=>{this.flush(e);t()};try{this[p].params(e,t)}finally{this[p].flush=r}if(this[p]){this[v]=e;this[y]=t}}}}class Deflate extends Zlib{constructor(e){super(e,"Deflate")}}class Inflate extends Zlib{constructor(e){super(e,"Inflate")}}const b=Symbol("_portable");class Gzip extends Zlib{constructor(e){super(e,"Gzip");this[b]=e&&!!e.portable}[c](e){if(!this[b])return super[c](e);this[b]=false;e[9]=255;return super[c](e)}}class Gunzip extends Zlib{constructor(e){super(e,"Gunzip")}}class DeflateRaw extends Zlib{constructor(e){super(e,"DeflateRaw")}}class InflateRaw extends Zlib{constructor(e){super(e,"InflateRaw")}}class Unzip extends Zlib{constructor(e){super(e,"Unzip")}}class Brotli extends ZlibBase{constructor(e,t){e=e||{};e.flush=e.flush||a.BROTLI_OPERATION_PROCESS;e.finishFlush=e.finishFlush||a.BROTLI_OPERATION_FINISH;super(e,t);this[d]=a.BROTLI_OPERATION_FLUSH}}class BrotliCompress extends Brotli{constructor(e){super(e,"BrotliCompress")}}class BrotliDecompress extends Brotli{constructor(e){super(e,"BrotliDecompress")}}t.Deflate=Deflate;t.Inflate=Inflate;t.Gzip=Gzip;t.Gunzip=Gunzip;t.DeflateRaw=DeflateRaw;t.InflateRaw=InflateRaw;t.Unzip=Unzip;if(typeof s.BrotliCompress==="function"){t.BrotliCompress=BrotliCompress;t.BrotliDecompress=BrotliDecompress}else{t.BrotliCompress=t.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}}},6186:(e,t,r)=>{const n=r(2853);const i=r(2930);const{mkdirpNative:s,mkdirpNativeSync:a}=r(4983);const{mkdirpManual:o,mkdirpManualSync:l}=r(356);const{useNative:c,useNativeSync:u}=r(4518);const mkdirp=(e,t)=>{e=i(e);t=n(t);return c(t)?s(e,t):o(e,t)};const mkdirpSync=(e,t)=>{e=i(e);t=n(t);return u(t)?a(e,t):l(e,t)};mkdirp.sync=mkdirpSync;mkdirp.native=(e,t)=>s(i(e),n(t));mkdirp.manual=(e,t)=>o(i(e),n(t));mkdirp.nativeSync=(e,t)=>a(i(e),n(t));mkdirp.manualSync=(e,t)=>l(i(e),n(t));e.exports=mkdirp},4992:(e,t,r)=>{const{dirname:n}=r(1017);const findMade=(e,t,r=undefined)=>{if(r===t)return Promise.resolve();return e.statAsync(t).then((e=>e.isDirectory()?r:undefined),(r=>r.code==="ENOENT"?findMade(e,n(t),t):undefined))};const findMadeSync=(e,t,r=undefined)=>{if(r===t)return undefined;try{return e.statSync(t).isDirectory()?r:undefined}catch(r){return r.code==="ENOENT"?findMadeSync(e,n(t),t):undefined}};e.exports={findMade:findMade,findMadeSync:findMadeSync}},356:(e,t,r)=>{const{dirname:n}=r(1017);const mkdirpManual=(e,t,r)=>{t.recursive=false;const i=n(e);if(i===e){return t.mkdirAsync(e,t).catch((e=>{if(e.code!=="EISDIR")throw e}))}return t.mkdirAsync(e,t).then((()=>r||e),(n=>{if(n.code==="ENOENT")return mkdirpManual(i,t).then((r=>mkdirpManual(e,t,r)));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;return t.statAsync(e).then((e=>{if(e.isDirectory())return r;else throw n}),(()=>{throw n}))}))};const mkdirpManualSync=(e,t,r)=>{const i=n(e);t.recursive=false;if(i===e){try{return t.mkdirSync(e,t)}catch(e){if(e.code!=="EISDIR")throw e;else return}}try{t.mkdirSync(e,t);return r||e}catch(n){if(n.code==="ENOENT")return mkdirpManualSync(e,t,mkdirpManualSync(i,t,r));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;try{if(!t.statSync(e).isDirectory())throw n}catch(e){throw n}}};e.exports={mkdirpManual:mkdirpManual,mkdirpManualSync:mkdirpManualSync}},4983:(e,t,r)=>{const{dirname:n}=r(1017);const{findMade:i,findMadeSync:s}=r(4992);const{mkdirpManual:a,mkdirpManualSync:o}=r(356);const mkdirpNative=(e,t)=>{t.recursive=true;const r=n(e);if(r===e)return t.mkdirAsync(e,t);return i(t,e).then((r=>t.mkdirAsync(e,t).then((()=>r)).catch((r=>{if(r.code==="ENOENT")return a(e,t);else throw r}))))};const mkdirpNativeSync=(e,t)=>{t.recursive=true;const r=n(e);if(r===e)return t.mkdirSync(e,t);const i=s(t,e);try{t.mkdirSync(e,t);return i}catch(r){if(r.code==="ENOENT")return o(e,t);else throw r}};e.exports={mkdirpNative:mkdirpNative,mkdirpNativeSync:mkdirpNativeSync}},2853:(e,t,r)=>{const{promisify:n}=r(3837);const i=r(7147);const optsArg=e=>{if(!e)e={mode:511&~process.umask(),fs:i};else if(typeof e==="object")e={mode:511&~process.umask(),fs:i,...e};else if(typeof e==="number")e={mode:e,fs:i};else if(typeof e==="string")e={mode:parseInt(e,8),fs:i};else throw new TypeError("invalid options argument");e.mkdir=e.mkdir||e.fs.mkdir||i.mkdir;e.mkdirAsync=n(e.mkdir);e.stat=e.stat||e.fs.stat||i.stat;e.statAsync=n(e.stat);e.statSync=e.statSync||e.fs.statSync||i.statSync;e.mkdirSync=e.mkdirSync||e.fs.mkdirSync||i.mkdirSync;return e};e.exports=optsArg},2930:(e,t,r)=>{const n=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform;const{resolve:i,parse:s}=r(1017);const pathArg=e=>{if(/\0/.test(e)){throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"})}e=i(e);if(n==="win32"){const t=/[*|"<>?:]/;const{root:r}=s(e);if(t.test(e.substr(r.length))){throw Object.assign(new Error("Illegal characters in path."),{path:e,code:"EINVAL"})}}return e};e.exports=pathArg},4518:(e,t,r)=>{const n=r(7147);const i=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version;const s=i.replace(/^v/,"").split(".");const a=+s[0]>10||+s[0]===10&&+s[1]>=12;const o=!a?()=>false:e=>e.mkdir===n.mkdir;const l=!a?()=>false:e=>e.mkdirSync===n.mkdirSync;e.exports={useNative:o,useNativeSync:l}},4833:e=>{e.exports=Pend;function Pend(){this.pending=0;this.max=Infinity;this.listeners=[];this.waiting=[];this.error=null}Pend.prototype.go=function(e){if(this.pending<this.max){pendGo(this,e)}else{this.waiting.push(e)}};Pend.prototype.wait=function(e){if(this.pending===0){e(this.error)}else{this.listeners.push(e)}};Pend.prototype.hold=function(){return pendHold(this)};function pendHold(e){e.pending+=1;var t=false;return onCb;function onCb(r){if(t)throw new Error("callback called twice");t=true;e.error=e.error||r;e.pending-=1;if(e.waiting.length>0&&e.pending<e.max){pendGo(e,e.waiting.shift())}else if(e.pending===0){var n=e.listeners;e.listeners=[];n.forEach(cbListener)}}function cbListener(t){t(e.error)}}function pendGo(e,t){t(pendHold(e))}},4674:(e,t,r)=>{"use strict";var n;n=r(4016);n=r(5923);n=r(1525);n=r(4404);n=r(5317);r(7900);r(7628);t.Parse=r(8917);r(8116);r(5450);r(6043);r(7996);r(4173)},4016:(e,t,r)=>{"use strict";const n=r(5274);const i=r(7900);const s=r(7147);const a=r(7714);const o=r(1525);const l=r(1017);const c=e.exports=(e,t,r)=>{if(typeof t==="function")r=t;if(Array.isArray(e))t=e,e={};if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");t=Array.from(t);const i=n(e);if(i.sync&&typeof r==="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof r==="function")throw new TypeError("callback only supported with file option");return i.file&&i.sync?createFileSync(i,t):i.file?createFile(i,t,r):i.sync?createSync(i,t):create(i,t)};const createFileSync=(e,t)=>{const r=new i.Sync(e);const n=new a.WriteStreamSync(e.file,{mode:e.mode||438});r.pipe(n);addFilesSync(r,t)};const createFile=(e,t,r)=>{const n=new i(e);const s=new a.WriteStream(e.file,{mode:e.mode||438});n.pipe(s);const o=new Promise(((e,t)=>{s.on("error",t);s.on("close",e);n.on("error",t)}));addFilesAsync(n,t);return r?o.then(r,r):o};const addFilesSync=(e,t)=>{t.forEach((t=>{if(t.charAt(0)==="@")o({file:l.resolve(e.cwd,t.substr(1)),sync:true,noResume:true,onentry:t=>e.add(t)});else e.add(t)}));e.end()};const addFilesAsync=(e,t)=>{while(t.length){const r=t.shift();if(r.charAt(0)==="@")return o({file:l.resolve(e.cwd,r.substr(1)),noResume:true,onentry:t=>e.add(t)}).then((r=>addFilesAsync(e,t)));else e.add(r)}e.end()};const createSync=(e,t)=>{const r=new i.Sync(e);addFilesSync(r,t);return r};const create=(e,t)=>{const r=new i(e);addFilesAsync(r,t);return r}},5317:(e,t,r)=>{"use strict";const n=r(5274);const i=r(7628);const s=r(7147);const a=r(7714);const o=r(1017);const l=e.exports=(e,t,r)=>{if(typeof e==="function")r=e,t=null,e={};else if(Array.isArray(e))t=e,e={};if(typeof t==="function")r=t,t=null;if(!t)t=[];else t=Array.from(t);const i=n(e);if(i.sync&&typeof r==="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof r==="function")throw new TypeError("callback only supported with file option");if(t.length)filesFilter(i,t);return i.file&&i.sync?extractFileSync(i):i.file?extractFile(i,r):i.sync?extractSync(i):extract(i)};const filesFilter=(e,t)=>{const r=new Map(t.map((e=>[e.replace(/\/+$/,""),true])));const n=e.filter;const mapHas=(e,t)=>{const n=t||o.parse(e).root||".";const i=e===n?false:r.has(e)?r.get(e):mapHas(o.dirname(e),n);r.set(e,i);return i};e.filter=n?(e,t)=>n(e,t)&&mapHas(e.replace(/\/+$/,"")):e=>mapHas(e.replace(/\/+$/,""))};const extractFileSync=e=>{const t=new i.Sync(e);const r=e.file;let n=true;let o;const l=s.statSync(r);const c=e.maxReadSize||16*1024*1024;const u=new a.ReadStreamSync(r,{readSize:c,size:l.size});u.pipe(t)};const extractFile=(e,t)=>{const r=new i(e);const n=e.maxReadSize||16*1024*1024;const o=e.file;const l=new Promise(((e,t)=>{r.on("error",t);r.on("close",e);s.stat(o,((e,i)=>{if(e)t(e);else{const e=new a.ReadStream(o,{readSize:n,size:i.size});e.on("error",t);e.pipe(r)}}))}));return t?l.then(t,t):l};const extractSync=e=>new i.Sync(e);const extract=e=>new i(e)},1172:(e,t,r)=>{const n=process.env.__FAKE_PLATFORM__||process.platform;const i=n==="win32";const s=global.__FAKE_TESTING_FS__||r(7147);const{O_CREAT:a,O_TRUNC:o,O_WRONLY:l,UV_FS_O_FILEMAP:c=0}=s.constants;const u=i&&!!c;const h=512*1024;const f=c|o|a|l;e.exports=!u?()=>"w":e=>e<h?f:"w"},6043:(e,t,r)=>{"use strict";const n=r(4173);const i=r(1017).posix;const s=r(2370);const a=Symbol("slurp");const o=Symbol("type");class Header{constructor(e,t,r,n){this.cksumValid=false;this.needPax=false;this.nullBlock=false;this.block=null;this.path=null;this.mode=null;this.uid=null;this.gid=null;this.size=null;this.mtime=null;this.cksum=null;this[o]="0";this.linkpath=null;this.uname=null;this.gname=null;this.devmaj=0;this.devmin=0;this.atime=null;this.ctime=null;if(Buffer.isBuffer(e))this.decode(e,t||0,r,n);else if(e)this.set(e)}decode(e,t,r,n){if(!t)t=0;if(!e||!(e.length>=t+512))throw new Error("need 512 bytes for header");this.path=decString(e,t,100);this.mode=decNumber(e,t+100,8);this.uid=decNumber(e,t+108,8);this.gid=decNumber(e,t+116,8);this.size=decNumber(e,t+124,12);this.mtime=decDate(e,t+136,12);this.cksum=decNumber(e,t+148,12);this[a](r);this[a](n,true);this[o]=decString(e,t+156,1);if(this[o]==="")this[o]="0";if(this[o]==="0"&&this.path.substr(-1)==="/")this[o]="5";if(this[o]==="5")this.size=0;this.linkpath=decString(e,t+157,100);if(e.slice(t+257,t+265).toString()==="ustar\x0000"){this.uname=decString(e,t+265,32);this.gname=decString(e,t+297,32);this.devmaj=decNumber(e,t+329,8);this.devmin=decNumber(e,t+337,8);if(e[t+475]!==0){const r=decString(e,t+345,155);this.path=r+"/"+this.path}else{const r=decString(e,t+345,130);if(r)this.path=r+"/"+this.path;this.atime=decDate(e,t+476,12);this.ctime=decDate(e,t+488,12)}}let i=8*32;for(let r=t;r<t+148;r++){i+=e[r]}for(let r=t+156;r<t+512;r++){i+=e[r]}this.cksumValid=i===this.cksum;if(this.cksum===null&&i===8*32)this.nullBlock=true}[a](e,t){for(let r in e){if(e[r]!==null&&e[r]!==undefined&&!(t&&r==="path"))this[r]=e[r]}}encode(e,t){if(!e){e=this.block=Buffer.alloc(512);t=0}if(!t)t=0;if(!(e.length>=t+512))throw new Error("need 512 bytes for header");const r=this.ctime||this.atime?130:155;const n=splitPrefix(this.path||"",r);const i=n[0];const s=n[1];this.needPax=n[2];this.needPax=encString(e,t,100,i)||this.needPax;this.needPax=encNumber(e,t+100,8,this.mode)||this.needPax;this.needPax=encNumber(e,t+108,8,this.uid)||this.needPax;this.needPax=encNumber(e,t+116,8,this.gid)||this.needPax;this.needPax=encNumber(e,t+124,12,this.size)||this.needPax;this.needPax=encDate(e,t+136,12,this.mtime)||this.needPax;e[t+156]=this[o].charCodeAt(0);this.needPax=encString(e,t+157,100,this.linkpath)||this.needPax;e.write("ustar\x0000",t+257,8);this.needPax=encString(e,t+265,32,this.uname)||this.needPax;this.needPax=encString(e,t+297,32,this.gname)||this.needPax;this.needPax=encNumber(e,t+329,8,this.devmaj)||this.needPax;this.needPax=encNumber(e,t+337,8,this.devmin)||this.needPax;this.needPax=encString(e,t+345,r,s)||this.needPax;if(e[t+475]!==0)this.needPax=encString(e,t+345,155,s)||this.needPax;else{this.needPax=encString(e,t+345,130,s)||this.needPax;this.needPax=encDate(e,t+476,12,this.atime)||this.needPax;this.needPax=encDate(e,t+488,12,this.ctime)||this.needPax}let a=8*32;for(let r=t;r<t+148;r++){a+=e[r]}for(let r=t+156;r<t+512;r++){a+=e[r]}this.cksum=a;encNumber(e,t+148,8,this.cksum);this.cksumValid=true;return this.needPax}set(e){for(let t in e){if(e[t]!==null&&e[t]!==undefined)this[t]=e[t]}}get type(){return n.name.get(this[o])||this[o]}get typeKey(){return this[o]}set type(e){if(n.code.has(e))this[o]=n.code.get(e);else this[o]=e}}const splitPrefix=(e,t)=>{const r=100;let n=e;let s="";let a;const o=i.parse(e).root||".";if(Buffer.byteLength(n)<r)a=[n,s,false];else{s=i.dirname(n);n=i.basename(n);do{if(Buffer.byteLength(n)<=r&&Buffer.byteLength(s)<=t)a=[n,s,false];else if(Buffer.byteLength(n)>r&&Buffer.byteLength(s)<=t)a=[n.substr(0,r-1),s,true];else{n=i.join(i.basename(s),n);s=i.dirname(s)}}while(s!==o&&!a);if(!a)a=[e.substr(0,r-1),"",true]}return a};const decString=(e,t,r)=>e.slice(t,t+r).toString("utf8").replace(/\0.*/,"");const decDate=(e,t,r)=>numToDate(decNumber(e,t,r));const numToDate=e=>e===null?null:new Date(e*1e3);const decNumber=(e,t,r)=>e[t]&128?s.parse(e.slice(t,t+r)):decSmallNumber(e,t,r);const nanNull=e=>isNaN(e)?null:e;const decSmallNumber=(e,t,r)=>nanNull(parseInt(e.slice(t,t+r).toString("utf8").replace(/\0.*$/,"").trim(),8));const l={12:8589934591,8:2097151};const encNumber=(e,t,r,n)=>n===null?false:n>l[r]||n<0?(s.encode(n,e.slice(t,t+r)),true):(encSmallNumber(e,t,r,n),false);const encSmallNumber=(e,t,r,n)=>e.write(octalString(n,r),t,r,"ascii");const octalString=(e,t)=>padOctal(Math.floor(e).toString(8),t);const padOctal=(e,t)=>(e.length===t-1?e:new Array(t-e.length-1).join("0")+e+" ")+"\0";const encDate=(e,t,r,n)=>n===null?false:encNumber(e,t,r,n.getTime()/1e3);const c=new Array(156).join("\0");const encString=(e,t,r,n)=>n===null?false:(e.write(n+c,t,r,"utf8"),n.length!==Buffer.byteLength(n)||n.length>r);e.exports=Header},5274:e=>{"use strict";const t=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);const r=e.exports=e=>e?Object.keys(e).map((r=>[t.has(r)?t.get(r):r,e[r]])).reduce(((e,t)=>(e[t[0]]=t[1],e)),Object.create(null)):{}},2370:(e,t)=>{"use strict";const r=t.encode=(e,t)=>{if(!Number.isSafeInteger(e))throw Error("cannot encode number outside of javascript safe integer range");else if(e<0)encodeNegative(e,t);else encodePositive(e,t);return t};const encodePositive=(e,t)=>{t[0]=128;for(var r=t.length;r>1;r--){t[r-1]=e&255;e=Math.floor(e/256)}};const encodeNegative=(e,t)=>{t[0]=255;var r=false;e=e*-1;for(var n=t.length;n>1;n--){var i=e&255;e=Math.floor(e/256);if(r)t[n-1]=onesComp(i);else if(i===0)t[n-1]=0;else{r=true;t[n-1]=twosComp(i)}}};const n=t.parse=e=>{var t=e[e.length-1];var r=e[0];var n;if(r===128)n=pos(e.slice(1,e.length));else if(r===255)n=twos(e);else throw Error("invalid base256 encoding");if(!Number.isSafeInteger(n))throw Error("parsed number outside of javascript safe integer range");return n};const twos=e=>{var t=e.length;var r=0;var n=false;for(var i=t-1;i>-1;i--){var s=e[i];var a;if(n)a=onesComp(s);else if(s===0)a=s;else{n=true;a=twosComp(s)}if(a!==0)r-=a*Math.pow(256,t-i-1)}return r};const pos=e=>{var t=e.length;var r=0;for(var n=t-1;n>-1;n--){var i=e[n];if(i!==0)r+=i*Math.pow(256,t-n-1)}return r};const onesComp=e=>(255^e)&255;const twosComp=e=>(255^e)+1&255},1525:(e,t,r)=>{"use strict";const n=r(5274);const i=r(8917);const s=r(7147);const a=r(7714);const o=r(1017);const l=e.exports=(e,t,r)=>{if(typeof e==="function")r=e,t=null,e={};else if(Array.isArray(e))t=e,e={};if(typeof t==="function")r=t,t=null;if(!t)t=[];else t=Array.from(t);const i=n(e);if(i.sync&&typeof r==="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof r==="function")throw new TypeError("callback only supported with file option");if(t.length)filesFilter(i,t);if(!i.noResume)onentryFunction(i);return i.file&&i.sync?listFileSync(i):i.file?listFile(i,r):list(i)};const onentryFunction=e=>{const t=e.onentry;e.onentry=t?e=>{t(e);e.resume()}:e=>e.resume()};const filesFilter=(e,t)=>{const r=new Map(t.map((e=>[e.replace(/\/+$/,""),true])));const n=e.filter;const mapHas=(e,t)=>{const n=t||o.parse(e).root||".";const i=e===n?false:r.has(e)?r.get(e):mapHas(o.dirname(e),n);r.set(e,i);return i};e.filter=n?(e,t)=>n(e,t)&&mapHas(e.replace(/\/+$/,"")):e=>mapHas(e.replace(/\/+$/,""))};const listFileSync=e=>{const t=list(e);const r=e.file;let n=true;let i;try{const a=s.statSync(r);const o=e.maxReadSize||16*1024*1024;if(a.size<o){t.end(s.readFileSync(r))}else{let e=0;const n=Buffer.allocUnsafe(o);i=s.openSync(r,"r");while(e<a.size){let r=s.readSync(i,n,0,o,e);e+=r;t.write(n.slice(0,r))}t.end()}n=false}finally{if(n&&i)try{s.closeSync(i)}catch(e){}}};const listFile=(e,t)=>{const r=new i(e);const n=e.maxReadSize||16*1024*1024;const o=e.file;const l=new Promise(((e,t)=>{r.on("error",t);r.on("end",e);s.stat(o,((e,i)=>{if(e)t(e);else{const e=new a.ReadStream(o,{readSize:n,size:i.size});e.on("error",t);e.pipe(r)}}))}));return t?l.then(t,t):l};const list=e=>new i(e)},9624:(e,t,r)=>{"use strict";const n=r(6186);const i=r(7147);const s=r(1017);const a=r(9051);class SymlinkError extends Error{constructor(e,t){super("Cannot extract through symbolic link");this.path=t;this.symlink=e}get name(){return"SylinkError"}}class CwdError extends Error{constructor(e,t){super(t+": Cannot cd into '"+e+"'");this.path=e;this.code=t}get name(){return"CwdError"}}const o=e.exports=(e,t,r)=>{const o=t.umask;const l=t.mode|448;const c=(l&o)!==0;const u=t.uid;const h=t.gid;const f=typeof u==="number"&&typeof h==="number"&&(u!==t.processUid||h!==t.processGid);const d=t.preserve;const p=t.unlink;const _=t.cache;const m=t.cwd;const done=(t,n)=>{if(t)r(t);else{_.set(e,true);if(n&&f)a(n,u,h,(e=>done(e)));else if(c)i.chmod(e,l,r);else r()}};if(_&&_.get(e)===true)return done();if(e===m)return i.stat(e,((t,r)=>{if(t||!r.isDirectory())t=new CwdError(e,t&&t.code||"ENOTDIR");done(t)}));if(d)return n(e,{mode:l}).then((e=>done(null,e)),done);const v=s.relative(m,e);const y=v.split(/\/|\\/);mkdir_(m,y,l,_,p,m,null,done)};const mkdir_=(e,t,r,n,s,a,o,l)=>{if(!t.length)return l(null,o);const c=t.shift();const u=e+"/"+c;if(n.get(u))return mkdir_(u,t,r,n,s,a,o,l);i.mkdir(u,r,onmkdir(u,t,r,n,s,a,o,l))};const onmkdir=(e,t,r,n,a,o,l,c)=>u=>{if(u){if(u.path&&s.dirname(u.path)===o&&(u.code==="ENOTDIR"||u.code==="ENOENT"))return c(new CwdError(o,u.code));i.lstat(e,((s,h)=>{if(s)c(s);else if(h.isDirectory())mkdir_(e,t,r,n,a,o,l,c);else if(a)i.unlink(e,(s=>{if(s)return c(s);i.mkdir(e,r,onmkdir(e,t,r,n,a,o,l,c))}));else if(h.isSymbolicLink())return c(new SymlinkError(e,e+"/"+t.join("/")));else c(u)}))}else{l=l||e;mkdir_(e,t,r,n,a,o,l,c)}};const l=e.exports.sync=(e,t)=>{const r=t.umask;const o=t.mode|448;const l=(o&r)!==0;const c=t.uid;const u=t.gid;const h=typeof c==="number"&&typeof u==="number"&&(c!==t.processUid||u!==t.processGid);const f=t.preserve;const d=t.unlink;const p=t.cache;const _=t.cwd;const done=t=>{p.set(e,true);if(t&&h)a.sync(t,c,u);if(l)i.chmodSync(e,o)};if(p&&p.get(e)===true)return done();if(e===_){let t=false;let r="ENOTDIR";try{t=i.statSync(e).isDirectory()}catch(e){r=e.code}finally{if(!t)throw new CwdError(e,r)}done();return}if(f)return done(n.sync(e,o));const m=s.relative(_,e);const v=m.split(/\/|\\/);let y=null;for(let e=v.shift(),t=_;e&&(t+="/"+e);e=v.shift()){if(p.get(t))continue;try{i.mkdirSync(t,o);y=y||t;p.set(t,true)}catch(e){if(e.path&&s.dirname(e.path)===_&&(e.code==="ENOTDIR"||e.code==="ENOENT"))return new CwdError(_,e.code);const r=i.lstatSync(t);if(r.isDirectory()){p.set(t,true);continue}else if(d){i.unlinkSync(t);i.mkdirSync(t,o);y=y||t;p.set(t,true);continue}else if(r.isSymbolicLink())return new SymlinkError(t,t+"/"+v.join("/"))}}return done(y)}},8371:e=>{"use strict";e.exports=(e,t,r)=>{e&=4095;if(r){e=(e|384)&~18}if(t){if(e&256)e|=64;if(e&32)e|=8;if(e&4)e|=1}return e}},7900:(e,t,r)=>{"use strict";class PackJob{constructor(e,t){this.path=e||"./";this.absolute=t;this.entry=null;this.stat=null;this.readdir=null;this.pending=false;this.ignore=false;this.piped=false}}const n=r(1077);const i=r(3486);const s=r(8116);const a=r(5450);const o=a.Sync;const l=a.Tar;const c=r(665);const u=Buffer.alloc(1024);const h=Symbol("onStat");const f=Symbol("ended");const d=Symbol("queue");const p=Symbol("current");const _=Symbol("process");const m=Symbol("processing");const v=Symbol("processJob");const y=Symbol("jobs");const w=Symbol("jobDone");const g=Symbol("addFSEntry");const b=Symbol("addTarEntry");const S=Symbol("stat");const x=Symbol("readdir");const E=Symbol("onreaddir");const R=Symbol("pipe");const k=Symbol("entry");const O=Symbol("entryOpt");const N=Symbol("writeEntryClass");const A=Symbol("write");const I=Symbol("ondrain");const L=r(7147);const F=r(1017);const T=r(5899);const C=T(class Pack extends n{constructor(e){super(e);e=e||Object.create(null);this.opt=e;this.file=e.file||"";this.cwd=e.cwd||process.cwd();this.maxReadSize=e.maxReadSize;this.preservePaths=!!e.preservePaths;this.strict=!!e.strict;this.noPax=!!e.noPax;this.prefix=(e.prefix||"").replace(/(\\|\/)+$/,"");this.linkCache=e.linkCache||new Map;this.statCache=e.statCache||new Map;this.readdirCache=e.readdirCache||new Map;this[N]=a;if(typeof e.onwarn==="function")this.on("warn",e.onwarn);this.portable=!!e.portable;this.zip=null;if(e.gzip){if(typeof e.gzip!=="object")e.gzip={};if(this.portable)e.gzip.portable=true;this.zip=new i.Gzip(e.gzip);this.zip.on("data",(e=>super.write(e)));this.zip.on("end",(e=>super.end()));this.zip.on("drain",(e=>this[I]()));this.on("resume",(e=>this.zip.resume()))}else this.on("drain",this[I]);this.noDirRecurse=!!e.noDirRecurse;this.follow=!!e.follow;this.noMtime=!!e.noMtime;this.mtime=e.mtime||null;this.filter=typeof e.filter==="function"?e.filter:e=>true;this[d]=new c;this[y]=0;this.jobs=+e.jobs||4;this[m]=false;this[f]=false}[A](e){return super.write(e)}add(e){this.write(e);return this}end(e){if(e)this.write(e);this[f]=true;this[_]();return this}write(e){if(this[f])throw new Error("write after end");if(e instanceof s)this[b](e);else this[g](e);return this.flowing}[b](e){const t=F.resolve(this.cwd,e.path);if(this.prefix)e.path=this.prefix+"/"+e.path.replace(/^\.(\/+|$)/,"");if(!this.filter(e.path,e))e.resume();else{const r=new PackJob(e.path,t,false);r.entry=new l(e,this[O](r));r.entry.on("end",(e=>this[w](r)));this[y]+=1;this[d].push(r)}this[_]()}[g](e){const t=F.resolve(this.cwd,e);if(this.prefix)e=this.prefix+"/"+e.replace(/^\.(\/+|$)/,"");this[d].push(new PackJob(e,t));this[_]()}[S](e){e.pending=true;this[y]+=1;const t=this.follow?"stat":"lstat";L[t](e.absolute,((t,r)=>{e.pending=false;this[y]-=1;if(t)this.emit("error",t);else this[h](e,r)}))}[h](e,t){this.statCache.set(e.absolute,t);e.stat=t;if(!this.filter(e.path,t))e.ignore=true;this[_]()}[x](e){e.pending=true;this[y]+=1;L.readdir(e.absolute,((t,r)=>{e.pending=false;this[y]-=1;if(t)return this.emit("error",t);this[E](e,r)}))}[E](e,t){this.readdirCache.set(e.absolute,t);e.readdir=t;this[_]()}[_](){if(this[m])return;this[m]=true;for(let e=this[d].head;e!==null&&this[y]<this.jobs;e=e.next){this[v](e.value);if(e.value.ignore){const t=e.next;this[d].removeNode(e);e.next=t}}this[m]=false;if(this[f]&&!this[d].length&&this[y]===0){if(this.zip)this.zip.end(u);else{super.write(u);super.end()}}}get[p](){return this[d]&&this[d].head&&this[d].head.value}[w](e){this[d].shift();this[y]-=1;this[_]()}[v](e){if(e.pending)return;if(e.entry){if(e===this[p]&&!e.piped)this[R](e);return}if(!e.stat){if(this.statCache.has(e.absolute))this[h](e,this.statCache.get(e.absolute));else this[S](e)}if(!e.stat)return;if(e.ignore)return;if(!this.noDirRecurse&&e.stat.isDirectory()&&!e.readdir){if(this.readdirCache.has(e.absolute))this[E](e,this.readdirCache.get(e.absolute));else this[x](e);if(!e.readdir)return}e.entry=this[k](e);if(!e.entry){e.ignore=true;return}if(e===this[p]&&!e.piped)this[R](e)}[O](e){return{onwarn:(e,t,r)=>this.warn(e,t,r),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime}}[k](e){this[y]+=1;try{return new this[N](e.path,this[O](e)).on("end",(()=>this[w](e))).on("error",(e=>this.emit("error",e)))}catch(e){this.emit("error",e)}}[I](){if(this[p]&&this[p].entry)this[p].entry.resume()}[R](e){e.piped=true;if(e.readdir)e.readdir.forEach((t=>{const r=this.prefix?e.path.slice(this.prefix.length+1)||"./":e.path;const n=r==="./"?"":r.replace(/\/*$/,"/");this[g](n+t)}));const t=e.entry;const r=this.zip;if(r)t.on("data",(e=>{if(!r.write(e))t.pause()}));else t.on("data",(e=>{if(!super.write(e))t.pause()}))}pause(){if(this.zip)this.zip.pause();return super.pause()}});class PackSync extends C{constructor(e){super(e);this[N]=o}pause(){}resume(){}[S](e){const t=this.follow?"statSync":"lstatSync";this[h](e,L[t](e.absolute))}[x](e,t){this[E](e,L.readdirSync(e.absolute))}[R](e){const t=e.entry;const r=this.zip;if(e.readdir)e.readdir.forEach((t=>{const r=this.prefix?e.path.slice(this.prefix.length+1)||"./":e.path;const n=r==="./"?"":r.replace(/\/*$/,"/");this[g](n+t)}));if(r)t.on("data",(e=>{r.write(e)}));else t.on("data",(e=>{super[A](e)}))}}C.Sync=PackSync;e.exports=C},8917:(e,t,r)=>{"use strict";const n=r(5899);const i=r(1017);const s=r(6043);const a=r(2361);const o=r(665);const l=1024*1024;const c=r(8116);const u=r(7996);const h=r(3486);const f=Buffer.from([31,139]);const d=Symbol("state");const p=Symbol("writeEntry");const _=Symbol("readEntry");const m=Symbol("nextEntry");const v=Symbol("processEntry");const y=Symbol("extendedHeader");const w=Symbol("globalExtendedHeader");const g=Symbol("meta");const b=Symbol("emitMeta");const S=Symbol("buffer");const x=Symbol("queue");const E=Symbol("ended");const R=Symbol("emittedEnd");const k=Symbol("emit");const O=Symbol("unzip");const N=Symbol("consumeChunk");const A=Symbol("consumeChunkSub");const I=Symbol("consumeBody");const L=Symbol("consumeMeta");const F=Symbol("consumeHeader");const T=Symbol("consuming");const C=Symbol("bufferConcat");const B=Symbol("maybeEnd");const D=Symbol("writing");const M=Symbol("aborted");const P=Symbol("onDone");const z=Symbol("sawValidEntry");const U=Symbol("sawNullBlock");const W=Symbol("sawEOF");const noop=e=>true;e.exports=n(class Parser extends a{constructor(e){e=e||{};super(e);this.file=e.file||"";this[z]=null;this.on(P,(e=>{if(this[d]==="begin"||this[z]===false){this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}}));if(e.ondone)this.on(P,e.ondone);else this.on(P,(e=>{this.emit("prefinish");this.emit("finish");this.emit("end");this.emit("close")}));this.strict=!!e.strict;this.maxMetaEntrySize=e.maxMetaEntrySize||l;this.filter=typeof e.filter==="function"?e.filter:noop;this.writable=true;this.readable=false;this[x]=new o;this[S]=null;this[_]=null;this[p]=null;this[d]="begin";this[g]="";this[y]=null;this[w]=null;this[E]=false;this[O]=null;this[M]=false;this[U]=false;this[W]=false;if(typeof e.onwarn==="function")this.on("warn",e.onwarn);if(typeof e.onentry==="function")this.on("entry",e.onentry)}[F](e,t){if(this[z]===null)this[z]=false;let r;try{r=new s(e,t,this[y],this[w])}catch(e){return this.warn("TAR_ENTRY_INVALID",e)}if(r.nullBlock){if(this[U]){this[W]=true;if(this[d]==="begin")this[d]="header";this[k]("eof")}else{this[U]=true;this[k]("nullBlock")}}else{this[U]=false;if(!r.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:r});else if(!r.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:r});else{const e=r.type;if(/^(Symbolic)?Link$/.test(e)&&!r.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:r});else if(!/^(Symbolic)?Link$/.test(e)&&r.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:r});else{const e=this[p]=new c(r,this[y],this[w]);if(!this[z]){if(e.remain){const onend=()=>{if(!e.invalid)this[z]=true};e.on("end",onend)}else{this[z]=true}}if(e.meta){if(e.size>this.maxMetaEntrySize){e.ignore=true;this[k]("ignoredEntry",e);this[d]="ignore";e.resume()}else if(e.size>0){this[g]="";e.on("data",(e=>this[g]+=e));this[d]="meta"}}else{this[y]=null;e.ignore=e.ignore||!this.filter(e.path,e);if(e.ignore){this[k]("ignoredEntry",e);this[d]=e.remain?"ignore":"header";e.resume()}else{if(e.remain)this[d]="body";else{this[d]="header";e.end()}if(!this[_]){this[x].push(e);this[m]()}else this[x].push(e)}}}}}}[v](e){let t=true;if(!e){this[_]=null;t=false}else if(Array.isArray(e))this.emit.apply(this,e);else{this[_]=e;this.emit("entry",e);if(!e.emittedEnd){e.on("end",(e=>this[m]()));t=false}}return t}[m](){do{}while(this[v](this[x].shift()));if(!this[x].length){const e=this[_];const t=!e||e.flowing||e.size===e.remain;if(t){if(!this[D])this.emit("drain")}else e.once("drain",(e=>this.emit("drain")))}}[I](e,t){const r=this[p];const n=r.blockRemain;const i=n>=e.length&&t===0?e:e.slice(t,t+n);r.write(i);if(!r.blockRemain){this[d]="header";this[p]=null;r.end()}return i.length}[L](e,t){const r=this[p];const n=this[I](e,t);if(!this[p])this[b](r);return n}[k](e,t,r){if(!this[x].length&&!this[_])this.emit(e,t,r);else this[x].push([e,t,r])}[b](e){this[k]("meta",this[g]);switch(e.type){case"ExtendedHeader":case"OldExtendedHeader":this[y]=u.parse(this[g],this[y],false);break;case"GlobalExtendedHeader":this[w]=u.parse(this[g],this[w],true);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[y]=this[y]||Object.create(null);this[y].path=this[g].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[y]=this[y]||Object.create(null);this[y].linkpath=this[g].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[M]=true;this.emit("abort",e);this.warn("TAR_ABORT",e,{recoverable:false})}write(e){if(this[M])return;if(this[O]===null&&e){if(this[S]){e=Buffer.concat([this[S],e]);this[S]=null}if(e.length<f.length){this[S]=e;return true}for(let t=0;this[O]===null&&t<f.length;t++){if(e[t]!==f[t])this[O]=false}if(this[O]===null){const t=this[E];this[E]=false;this[O]=new h.Unzip;this[O].on("data",(e=>this[N](e)));this[O].on("error",(e=>this.abort(e)));this[O].on("end",(e=>{this[E]=true;this[N]()}));this[D]=true;const r=this[O][t?"end":"write"](e);this[D]=false;return r}}this[D]=true;if(this[O])this[O].write(e);else this[N](e);this[D]=false;const t=this[x].length?false:this[_]?this[_].flowing:true;if(!t&&!this[x].length)this[_].once("drain",(e=>this.emit("drain")));return t}[C](e){if(e&&!this[M])this[S]=this[S]?Buffer.concat([this[S],e]):e}[B](){if(this[E]&&!this[R]&&!this[M]&&!this[T]){this[R]=true;const e=this[p];if(e&&e.blockRemain){const t=this[S]?this[S].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e});if(this[S])e.write(this[S]);e.end()}this[k](P)}}[N](e){if(this[T])this[C](e);else if(!e&&!this[S])this[B]();else{this[T]=true;if(this[S]){this[C](e);const t=this[S];this[S]=null;this[A](t)}else{this[A](e)}while(this[S]&&this[S].length>=512&&!this[M]&&!this[W]){const e=this[S];this[S]=null;this[A](e)}this[T]=false}if(!this[S]||this[E])this[B]()}[A](e){let t=0;let r=e.length;while(t+512<=r&&!this[M]&&!this[W]){switch(this[d]){case"begin":case"header":this[F](e,t);t+=512;break;case"ignore":case"body":t+=this[I](e,t);break;case"meta":t+=this[L](e,t);break;default:throw new Error("invalid state: "+this[d])}}if(t<r){if(this[S])this[S]=Buffer.concat([e.slice(t),this[S]]);else this[S]=e.slice(t)}}end(e){if(!this[M]){if(this[O])this[O].end(e);else{this[E]=true;this.write(e)}}}})},9587:(e,t,r)=>{const n=r(9491);e.exports=()=>{const e=new Map;const t=new Map;const{join:i}=r(1017);const getDirs=e=>i(e).split(/[\\\/]/).slice(0,-1).reduce(((e,t)=>e.length?e.concat(i(e[e.length-1],t)):[t]),[]);const s=new Set;const getQueues=r=>{const n=t.get(r);if(!n)throw new Error("function does not have any path reservations");return{paths:n.paths.map((t=>e.get(t))),dirs:[...n.dirs].map((t=>e.get(t)))}};const check=e=>{const{paths:t,dirs:r}=getQueues(e);return t.every((t=>t[0]===e))&&r.every((t=>t[0]instanceof Set&&t[0].has(e)))};const run=e=>{if(s.has(e)||!check(e))return false;s.add(e);e((()=>clear(e)));return true};const clear=r=>{if(!s.has(r))return false;const{paths:i,dirs:a}=t.get(r);const o=new Set;i.forEach((t=>{const i=e.get(t);n.equal(i[0],r);if(i.length===1)e.delete(t);else{i.shift();if(typeof i[0]==="function")o.add(i[0]);else i[0].forEach((e=>o.add(e)))}}));a.forEach((t=>{const i=e.get(t);n(i[0]instanceof Set);if(i[0].size===1&&i.length===1){e.delete(t)}else if(i[0].size===1){i.shift();o.add(i[0])}else i[0].delete(r)}));s.delete(r);o.forEach((e=>run(e)));return true};const reserve=(r,n)=>{const i=new Set(r.map((e=>getDirs(e))).reduce(((e,t)=>e.concat(t))));t.set(n,{dirs:i,paths:r});r.forEach((t=>{const r=e.get(t);if(!r)e.set(t,[n]);else r.push(n)}));i.forEach((t=>{const r=e.get(t);if(!r)e.set(t,[new Set([n])]);else if(r[r.length-1]instanceof Set)r[r.length-1].add(n);else r.push(new Set([n]))}));return run(n)};return{check:check,reserve:reserve}}},7996:(e,t,r)=>{"use strict";const n=r(6043);const i=r(1017);class Pax{constructor(e,t){this.atime=e.atime||null;this.charset=e.charset||null;this.comment=e.comment||null;this.ctime=e.ctime||null;this.gid=e.gid||null;this.gname=e.gname||null;this.linkpath=e.linkpath||null;this.mtime=e.mtime||null;this.path=e.path||null;this.size=e.size||null;this.uid=e.uid||null;this.uname=e.uname||null;this.dev=e.dev||null;this.ino=e.ino||null;this.nlink=e.nlink||null;this.global=t||false}encode(){const e=this.encodeBody();if(e==="")return null;const t=Buffer.byteLength(e);const r=512*Math.ceil(1+t/512);const s=Buffer.allocUnsafe(r);for(let e=0;e<512;e++){s[e]=0}new n({path:("PaxHeader/"+i.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:t,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(s);s.write(e,512,t,"utf8");for(let e=t+512;e<s.length;e++){s[e]=0}return s}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(e){if(this[e]===null||this[e]===undefined)return"";const t=this[e]instanceof Date?this[e].getTime()/1e3:this[e];const r=" "+(e==="dev"||e==="ino"||e==="nlink"?"SCHILY.":"")+e+"="+t+"\n";const n=Buffer.byteLength(r);let i=Math.floor(Math.log(n)/Math.log(10))+1;if(n+i>=Math.pow(10,i))i+=1;const s=i+n;return s+r}}Pax.parse=(e,t,r)=>new Pax(merge(parseKV(e),t),r);const merge=(e,t)=>t?Object.keys(e).reduce(((t,r)=>(t[r]=e[r],t)),t):e;const parseKV=e=>e.replace(/\n$/,"").split("\n").reduce(parseKVLine,Object.create(null));const parseKVLine=(e,t)=>{const r=parseInt(t,10);if(r!==Buffer.byteLength(t)+1)return e;t=t.substr((r+" ").length);const n=t.split("=");const i=n.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!i)return e;const s=n.join("=");e[i]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(i)?new Date(s*1e3):/^[0-9]+$/.test(s)?+s:s;return e};e.exports=Pax},8116:(e,t,r)=>{"use strict";const n=r(4173);const i=r(1077);const s=Symbol("slurp");e.exports=class ReadEntry extends i{constructor(e,t,r){super();this.pause();this.extended=t;this.globalExtended=r;this.header=e;this.startBlockSize=512*Math.ceil(e.size/512);this.blockRemain=this.startBlockSize;this.remain=e.size;this.type=e.type;this.meta=false;this.ignore=false;switch(this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=true;break;default:this.ignore=true}this.path=e.path;this.mode=e.mode;if(this.mode)this.mode=this.mode&4095;this.uid=e.uid;this.gid=e.gid;this.uname=e.uname;this.gname=e.gname;this.size=e.size;this.mtime=e.mtime;this.atime=e.atime;this.ctime=e.ctime;this.linkpath=e.linkpath;this.uname=e.uname;this.gname=e.gname;if(t)this[s](t);if(r)this[s](r,true)}write(e){const t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");const r=this.remain;const n=this.blockRemain;this.remain=Math.max(0,r-t);this.blockRemain=Math.max(0,n-t);if(this.ignore)return true;if(r>=t)return super.write(e);return super.write(e.slice(0,r))}[s](e,t){for(let r in e){if(e[r]!==null&&e[r]!==undefined&&!(t&&r==="path"))this[r]=e[r]}}}},5923:(e,t,r)=>{"use strict";const n=r(5274);const i=r(7900);const s=r(8917);const a=r(7147);const o=r(7714);const l=r(1525);const c=r(1017);const u=r(6043);const h=e.exports=(e,t,r)=>{const i=n(e);if(!i.file)throw new TypeError("file is required");if(i.gzip)throw new TypeError("cannot append to compressed archives");if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");t=Array.from(t);return i.sync?replaceSync(i,t):replace(i,t,r)};const replaceSync=(e,t)=>{const r=new i.Sync(e);let n=true;let s;let o;try{try{s=a.openSync(e.file,"r+")}catch(t){if(t.code==="ENOENT")s=a.openSync(e.file,"w+");else throw t}const i=a.fstatSync(s);const l=Buffer.alloc(512);e:for(o=0;o<i.size;o+=512){for(let e=0,t=0;e<512;e+=t){t=a.readSync(s,l,e,l.length-e,o+e);if(o===0&&l[0]===31&&l[1]===139)throw new Error("cannot append to compressed archives");if(!t)break e}let t=new u(l);if(!t.cksumValid)break;let r=512*Math.ceil(t.size/512);if(o+r+512>i.size)break;o+=r;if(e.mtimeCache)e.mtimeCache.set(t.path,t.mtime)}n=false;streamSync(e,r,o,s,t)}finally{if(n)try{a.closeSync(s)}catch(e){}}};const streamSync=(e,t,r,n,i)=>{const s=new o.WriteStreamSync(e.file,{fd:n,start:r});t.pipe(s);addFilesSync(t,i)};const replace=(e,t,r)=>{t=Array.from(t);const n=new i(e);const getPos=(t,r,n)=>{const cb=(e,r)=>{if(e)a.close(t,(t=>n(e)));else n(null,r)};let i=0;if(r===0)return cb(null,0);let s=0;const o=Buffer.alloc(512);const onread=(n,l)=>{if(n)return cb(n);s+=l;if(s<512&&l)return a.read(t,o,s,o.length-s,i+s,onread);if(i===0&&o[0]===31&&o[1]===139)return cb(new Error("cannot append to compressed archives"));if(s<512)return cb(null,i);const c=new u(o);if(!c.cksumValid)return cb(null,i);const h=512*Math.ceil(c.size/512);if(i+h+512>r)return cb(null,i);i+=h+512;if(i>=r)return cb(null,i);if(e.mtimeCache)e.mtimeCache.set(c.path,c.mtime);s=0;a.read(t,o,0,512,i,onread)};a.read(t,o,0,512,i,onread)};const s=new Promise(((r,i)=>{n.on("error",i);let s="r+";const onopen=(l,c)=>{if(l&&l.code==="ENOENT"&&s==="r+"){s="w+";return a.open(e.file,s,onopen)}if(l)return i(l);a.fstat(c,((s,a)=>{if(s)return i(s);getPos(c,a.size,((s,a)=>{if(s)return i(s);const l=new o.WriteStream(e.file,{fd:c,start:a});n.pipe(l);l.on("error",i);l.on("close",r);addFilesAsync(n,t)}))}))};a.open(e.file,s,onopen)}));return r?s.then(r,r):s};const addFilesSync=(e,t)=>{t.forEach((t=>{if(t.charAt(0)==="@")l({file:c.resolve(e.cwd,t.substr(1)),sync:true,noResume:true,onentry:t=>e.add(t)});else e.add(t)}));e.end()};const addFilesAsync=(e,t)=>{while(t.length){const r=t.shift();if(r.charAt(0)==="@")return l({file:c.resolve(e.cwd,r.substr(1)),noResume:true,onentry:t=>e.add(t)}).then((r=>addFilesAsync(e,t)));else e.add(r)}e.end()}},4173:(e,t)=>{"use strict";t.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);t.code=new Map(Array.from(t.name).map((e=>[e[1],e[0]])))},7628:(e,t,r)=>{"use strict";const n=r(9491);const i=r(2361).EventEmitter;const s=r(8917);const a=r(7147);const o=r(7714);const l=r(1017);const c=r(9624);const u=c.sync;const h=r(4808);const f=r(9587);const d=Symbol("onEntry");const p=Symbol("checkFs");const _=Symbol("checkFs2");const m=Symbol("isReusable");const v=Symbol("makeFs");const y=Symbol("file");const w=Symbol("directory");const g=Symbol("link");const b=Symbol("symlink");const S=Symbol("hardlink");const x=Symbol("unsupported");const E=Symbol("unknown");const R=Symbol("checkPath");const k=Symbol("mkdir");const O=Symbol("onError");const N=Symbol("pending");const A=Symbol("pend");const I=Symbol("unpend");const L=Symbol("ended");const F=Symbol("maybeClose");const T=Symbol("skip");const C=Symbol("doChown");const B=Symbol("uid");const D=Symbol("gid");const M=r(6113);const P=r(1172);const neverCalled=()=>{throw new Error("sync function called cb somehow?!?")};const unlinkFile=(e,t)=>{if(process.platform!=="win32")return a.unlink(e,t);const r=e+".DELETE."+M.randomBytes(16).toString("hex");a.rename(e,r,(e=>{if(e)return t(e);a.unlink(r,t)}))};const unlinkFileSync=e=>{if(process.platform!=="win32")return a.unlinkSync(e);const t=e+".DELETE."+M.randomBytes(16).toString("hex");a.renameSync(e,t);a.unlinkSync(t)};const uint32=(e,t,r)=>e===e>>>0?e:t===t>>>0?t:r;class Unpack extends s{constructor(e){if(!e)e={};e.ondone=e=>{this[L]=true;this[F]()};super(e);this.reservations=f();this.transform=typeof e.transform==="function"?e.transform:null;this.writable=true;this.readable=false;this[N]=0;this[L]=false;this.dirCache=e.dirCache||new Map;if(typeof e.uid==="number"||typeof e.gid==="number"){if(typeof e.uid!=="number"||typeof e.gid!=="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid;this.gid=e.gid;this.setOwner=true}else{this.uid=null;this.gid=null;this.setOwner=false}if(e.preserveOwner===undefined&&typeof e.uid!=="number")this.preserveOwner=process.getuid&&process.getuid()===0;else this.preserveOwner=!!e.preserveOwner;this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null;this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null;this.forceChown=e.forceChown===true;this.win32=!!e.win32||process.platform==="win32";this.newer=!!e.newer;this.keep=!!e.keep;this.noMtime=!!e.noMtime;this.preservePaths=!!e.preservePaths;this.unlink=!!e.unlink;this.cwd=l.resolve(e.cwd||process.cwd());this.strip=+e.strip||0;this.processUmask=process.umask();this.umask=typeof e.umask==="number"?e.umask:this.processUmask;this.dmode=e.dmode||511&~this.umask;this.fmode=e.fmode||438&~this.umask;this.on("entry",(e=>this[d](e)))}warn(e,t,r={}){if(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")r.recoverable=false;return super.warn(e,t,r)}[F](){if(this[L]&&this[N]===0){this.emit("prefinish");this.emit("finish");this.emit("end");this.emit("close")}}[R](e){if(this.strip){const t=e.path.split(/\/|\\/);if(t.length<this.strip)return false;e.path=t.slice(this.strip).join("/");if(e.type==="Link"){const t=e.linkpath.split(/\/|\\/);if(t.length>=this.strip)e.linkpath=t.slice(this.strip).join("/")}}if(!this.preservePaths){const t=e.path;if(t.match(/(^|\/|\\)\.\.(\\|\/|$)/)){this.warn("TAR_ENTRY_ERROR",`path contains '..'`,{entry:e,path:t});return false}if(l.win32.isAbsolute(t)){const r=l.win32.parse(t);e.path=t.substr(r.root.length);const n=r.root;this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:e,path:t})}}if(this.win32){const t=l.win32.parse(e.path);e.path=t.root===""?h.encode(e.path):t.root+h.encode(e.path.substr(t.root.length))}if(l.isAbsolute(e.path))e.absolute=e.path;else e.absolute=l.resolve(this.cwd,e.path);return true}[d](e){if(!this[R](e))return e.resume();n.equal(typeof e.absolute,"string");switch(e.type){case"Directory":case"GNUDumpDir":if(e.mode)e.mode=e.mode|448;case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[p](e);case"CharacterDevice":case"BlockDevice":case"FIFO":return this[x](e)}}[O](e,t){if(e.name==="CwdError")this.emit("error",e);else{this.warn("TAR_ENTRY_ERROR",e,{entry:t});this[I]();t.resume()}}[k](e,t,r){c(e,{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t},r)}[C](e){return this.forceChown||this.preserveOwner&&(typeof e.uid==="number"&&e.uid!==this.processUid||typeof e.gid==="number"&&e.gid!==this.processGid)||(typeof this.uid==="number"&&this.uid!==this.processUid||typeof this.gid==="number"&&this.gid!==this.processGid)}[B](e){return uint32(this.uid,e.uid,this.processUid)}[D](e){return uint32(this.gid,e.gid,this.processGid)}[y](e,t){const r=e.mode&4095||this.fmode;const n=new o.WriteStream(e.absolute,{flags:P(e.size),mode:r,autoClose:false});n.on("error",(t=>this[O](t,e)));let i=1;const done=r=>{if(r)return this[O](r,e);if(--i===0){a.close(n.fd,(r=>{t();r?this[O](r,e):this[I]()}))}};n.on("finish",(t=>{const r=e.absolute;const s=n.fd;if(e.mtime&&!this.noMtime){i++;const t=e.atime||new Date;const n=e.mtime;a.futimes(s,t,n,(e=>e?a.utimes(r,t,n,(t=>done(t&&e))):done()))}if(this[C](e)){i++;const t=this[B](e);const n=this[D](e);a.fchown(s,t,n,(e=>e?a.chown(r,t,n,(t=>done(t&&e))):done()))}done()}));const s=this.transform?this.transform(e)||e:e;if(s!==e){s.on("error",(t=>this[O](t,e)));e.pipe(s)}s.pipe(n)}[w](e,t){const r=e.mode&4095||this.dmode;this[k](e.absolute,r,(r=>{if(r){t();return this[O](r,e)}let n=1;const done=r=>{if(--n===0){t();this[I]();e.resume()}};if(e.mtime&&!this.noMtime){n++;a.utimes(e.absolute,e.atime||new Date,e.mtime,done)}if(this[C](e)){n++;a.chown(e.absolute,this[B](e),this[D](e),done)}done()}))}[x](e){e.unsupported=true;this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e});e.resume()}[b](e,t){this[g](e,e.linkpath,"symlink",t)}[S](e,t){this[g](e,l.resolve(this.cwd,e.linkpath),"link",t)}[A](){this[N]++}[I](){this[N]--;this[F]()}[T](e){this[I]();e.resume()}[m](e,t){return e.type==="File"&&!this.unlink&&t.isFile()&&t.nlink<=1&&process.platform!=="win32"}[p](e){this[A]();const t=[e.path];if(e.linkpath)t.push(e.linkpath);this.reservations.reserve(t,(t=>this[_](e,t)))}[_](e,t){this[k](l.dirname(e.absolute),this.dmode,(r=>{if(r){t();return this[O](r,e)}a.lstat(e.absolute,((r,n)=>{if(n&&(this.keep||this.newer&&n.mtime>e.mtime)){this[T](e);t()}else if(r||this[m](e,n)){this[v](null,e,t)}else if(n.isDirectory()){if(e.type==="Directory"){if(!e.mode||(n.mode&4095)===e.mode)this[v](null,e,t);else a.chmod(e.absolute,e.mode,(r=>this[v](r,e,t)))}else a.rmdir(e.absolute,(r=>this[v](r,e,t)))}else unlinkFile(e.absolute,(r=>this[v](r,e,t)))}))}))}[v](e,t,r){if(e)return this[O](e,t);switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[y](t,r);case"Link":return this[S](t,r);case"SymbolicLink":return this[b](t,r);case"Directory":case"GNUDumpDir":return this[w](t,r)}}[g](e,t,r,n){a[r](t,e.absolute,(t=>{if(t)return this[O](t,e);n();this[I]();e.resume()}))}}class UnpackSync extends Unpack{constructor(e){super(e)}[p](e){const t=this[k](l.dirname(e.absolute),this.dmode,neverCalled);if(t)return this[O](t,e);try{const r=a.lstatSync(e.absolute);if(this.keep||this.newer&&r.mtime>e.mtime)return this[T](e);else if(this[m](e,r))return this[v](null,e,neverCalled);else{try{if(r.isDirectory()){if(e.type==="Directory"){if(e.mode&&(r.mode&4095)!==e.mode)a.chmodSync(e.absolute,e.mode)}else a.rmdirSync(e.absolute)}else unlinkFileSync(e.absolute);return this[v](null,e,neverCalled)}catch(t){return this[O](t,e)}}}catch(t){return this[v](null,e,neverCalled)}}[y](e,t){const r=e.mode&4095||this.fmode;const oner=t=>{let r;try{a.closeSync(i)}catch(e){r=e}if(t||r)this[O](t||r,e)};let n;let i;try{i=a.openSync(e.absolute,P(e.size),r)}catch(e){return oner(e)}const s=this.transform?this.transform(e)||e:e;if(s!==e){s.on("error",(t=>this[O](t,e)));e.pipe(s)}s.on("data",(e=>{try{a.writeSync(i,e,0,e.length)}catch(e){oner(e)}}));s.on("end",(t=>{let r=null;if(e.mtime&&!this.noMtime){const t=e.atime||new Date;const n=e.mtime;try{a.futimesSync(i,t,n)}catch(i){try{a.utimesSync(e.absolute,t,n)}catch(e){r=i}}}if(this[C](e)){const t=this[B](e);const n=this[D](e);try{a.fchownSync(i,t,n)}catch(i){try{a.chownSync(e.absolute,t,n)}catch(e){r=r||i}}}oner(r)}))}[w](e,t){const r=e.mode&4095||this.dmode;const n=this[k](e.absolute,r);if(n)return this[O](n,e);if(e.mtime&&!this.noMtime){try{a.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch(n){}}if(this[C](e)){try{a.chownSync(e.absolute,this[B](e),this[D](e))}catch(n){}}e.resume()}[k](e,t){try{return c.sync(e,{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t})}catch(e){return e}}[g](e,t,r,n){try{a[r+"Sync"](t,e.absolute);e.resume()}catch(t){return this[O](t,e)}}}Unpack.Sync=UnpackSync;e.exports=Unpack},4404:(e,t,r)=>{"use strict";const n=r(5274);const i=r(5923);const s=e.exports=(e,t,r)=>{const s=n(e);if(!s.file)throw new TypeError("file is required");if(s.gzip)throw new TypeError("cannot append to compressed archives");if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");t=Array.from(t);mtimeFilter(s);return i(s,t,r)};const mtimeFilter=e=>{const t=e.filter;if(!e.mtimeCache)e.mtimeCache=new Map;e.filter=t?(r,n)=>t(r,n)&&!(e.mtimeCache.get(r)>n.mtime):(t,r)=>!(e.mtimeCache.get(t)>r.mtime)}},5899:e=>{"use strict";e.exports=e=>class extends e{warn(e,t,r={}){if(this.file)r.file=this.file;if(this.cwd)r.cwd=this.cwd;r.code=t instanceof Error&&t.code||e;r.tarCode=e;if(!this.strict&&r.recoverable!==false){if(t instanceof Error){r=Object.assign(t,r);t=t.message}this.emit("warn",r.tarCode,t,r)}else if(t instanceof Error){this.emit("error",Object.assign(t,r))}else this.emit("error",Object.assign(new Error(`${e}: ${t}`),r))}}},4808:e=>{"use strict";const t=["|","<",">","?",":"];const r=t.map((e=>String.fromCharCode(61440+e.charCodeAt(0))));const n=new Map(t.map(((e,t)=>[e,r[t]])));const i=new Map(r.map(((e,r)=>[e,t[r]])));e.exports={encode:e=>t.reduce(((e,t)=>e.split(t).join(n.get(t))),e),decode:e=>r.reduce(((e,t)=>e.split(t).join(i.get(t))),e)}},5450:(e,t,r)=>{"use strict";const n=r(1077);const i=r(7996);const s=r(6043);const a=r(8116);const o=r(7147);const l=r(1017);const c=r(4173);const u=16*1024*1024;const h=Symbol("process");const f=Symbol("file");const d=Symbol("directory");const p=Symbol("symlink");const _=Symbol("hardlink");const m=Symbol("header");const v=Symbol("read");const y=Symbol("lstat");const w=Symbol("onlstat");const g=Symbol("onread");const b=Symbol("onreadlink");const S=Symbol("openfile");const x=Symbol("onopenfile");const E=Symbol("close");const R=Symbol("mode");const k=r(5899);const O=r(4808);const N=r(8371);const A=k(class WriteEntry extends n{constructor(e,t){t=t||{};super(t);if(typeof e!=="string")throw new TypeError("path is required");this.path=e;this.portable=!!t.portable;this.myuid=process.getuid&&process.getuid();this.myuser=process.env.USER||"";this.maxReadSize=t.maxReadSize||u;this.linkCache=t.linkCache||new Map;this.statCache=t.statCache||new Map;this.preservePaths=!!t.preservePaths;this.cwd=t.cwd||process.cwd();this.strict=!!t.strict;this.noPax=!!t.noPax;this.noMtime=!!t.noMtime;this.mtime=t.mtime||null;if(typeof t.onwarn==="function")this.on("warn",t.onwarn);let r=false;if(!this.preservePaths&&l.win32.isAbsolute(e)){const t=l.win32.parse(e);this.path=e.substr(t.root.length);r=t.root}this.win32=!!t.win32||process.platform==="win32";if(this.win32){this.path=O.decode(this.path.replace(/\\/g,"/"));e=e.replace(/\\/g,"/")}this.absolute=t.absolute||l.resolve(this.cwd,e);if(this.path==="")this.path="./";if(r){this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path})}if(this.statCache.has(this.absolute))this[w](this.statCache.get(this.absolute));else this[y]()}[y](){o.lstat(this.absolute,((e,t)=>{if(e)return this.emit("error",e);this[w](t)}))}[w](e){this.statCache.set(this.absolute,e);this.stat=e;if(!e.isFile())e.size=0;this.type=getType(e);this.emit("stat",e);this[h]()}[h](){switch(this.type){case"File":return this[f]();case"Directory":return this[d]();case"SymbolicLink":return this[p]();default:return this.end()}}[R](e){return N(e,this.type==="Directory",this.portable)}[m](){if(this.type==="Directory"&&this.portable)this.noMtime=true;this.header=new s({path:this.path,linkpath:this.linkpath,mode:this[R](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime});if(this.header.encode()&&!this.noPax)this.write(new i({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this.path,linkpath:this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode());this.write(this.header.block)}[d](){if(this.path.substr(-1)!=="/")this.path+="/";this.stat.size=0;this[m]();this.end()}[p](){o.readlink(this.absolute,((e,t)=>{if(e)return this.emit("error",e);this[b](t)}))}[b](e){this.linkpath=e.replace(/\\/g,"/");this[m]();this.end()}[_](e){this.type="Link";this.linkpath=l.relative(this.cwd,e).replace(/\\/g,"/");this.stat.size=0;this[m]();this.end()}[f](){if(this.stat.nlink>1){const e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){const t=this.linkCache.get(e);if(t.indexOf(this.cwd)===0)return this[_](t)}this.linkCache.set(e,this.absolute)}this[m]();if(this.stat.size===0)return this.end();this[S]()}[S](){o.open(this.absolute,"r",((e,t)=>{if(e)return this.emit("error",e);this[x](t)}))}[x](e){const t=512*Math.ceil(this.stat.size/512);const r=Math.min(t,this.maxReadSize);const n=Buffer.allocUnsafe(r);this[v](e,n,0,n.length,0,this.stat.size,t)}[v](e,t,r,n,i,s,a){o.read(e,t,r,n,i,((o,l)=>{if(o){return this[E](e,(()=>this.emit("error",o)))}this[g](e,t,r,n,i,s,a,l)}))}[E](e,t){o.close(e,t)}[g](e,t,r,n,i,s,a,o){if(o<=0&&s>0){const t=new Error("encountered unexpected EOF");t.path=this.absolute;t.syscall="read";t.code="EOF";return this[E](e,(()=>this.emit("error",t)))}if(o>s){const t=new Error("did not encounter expected EOF");t.path=this.absolute;t.syscall="read";t.code="EOF";return this[E](e,(()=>this.emit("error",t)))}if(o===s){for(let e=o;e<n&&o<a;e++){t[e+r]=0;o++;s++}}const l=r===0&&o===t.length?t:t.slice(r,r+o);s-=o;a-=o;i+=o;r+=o;this.write(l);if(!s){if(a)this.write(Buffer.alloc(a));return this[E](e,(e=>e?this.emit("error",e):this.end()))}if(r>=n){t=Buffer.allocUnsafe(n);r=0}n=t.length-r;this[v](e,t,r,n,i,s,a)}});class WriteEntrySync extends A{constructor(e,t){super(e,t)}[y](){this[w](o.lstatSync(this.absolute))}[p](){this[b](o.readlinkSync(this.absolute))}[S](){this[x](o.openSync(this.absolute,"r"))}[v](e,t,r,n,i,s,a){let l=true;try{const c=o.readSync(e,t,r,n,i);this[g](e,t,r,n,i,s,a,c);l=false}finally{if(l)try{this[E](e,(()=>{}))}catch(e){}}}[E](e,t){o.closeSync(e);t()}}const I=k(class WriteEntryTar extends n{constructor(e,t){t=t||{};super(t);this.preservePaths=!!t.preservePaths;this.portable=!!t.portable;this.strict=!!t.strict;this.noPax=!!t.noPax;this.noMtime=!!t.noMtime;this.readEntry=e;this.type=e.type;if(this.type==="Directory"&&this.portable)this.noMtime=true;this.path=e.path;this.mode=this[R](e.mode);this.uid=this.portable?null:e.uid;this.gid=this.portable?null:e.gid;this.uname=this.portable?null:e.uname;this.gname=this.portable?null:e.gname;this.size=e.size;this.mtime=this.noMtime?null:t.mtime||e.mtime;this.atime=this.portable?null:e.atime;this.ctime=this.portable?null:e.ctime;this.linkpath=e.linkpath;if(typeof t.onwarn==="function")this.on("warn",t.onwarn);let r=false;if(l.isAbsolute(this.path)&&!this.preservePaths){const e=l.parse(this.path);r=e.root;this.path=this.path.substr(e.root.length)}this.remain=e.size;this.blockRemain=e.startBlockSize;this.header=new s({path:this.path,linkpath:this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime});if(r){this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path})}if(this.header.encode()&&!this.noPax)super.write(new i({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this.path,linkpath:this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode());super.write(this.header.block);e.pipe(this)}[R](e){return N(e,this.type==="Directory",this.portable)}write(e){const t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");this.blockRemain-=t;return super.write(e)}end(){if(this.blockRemain)this.write(Buffer.alloc(this.blockRemain));return super.end()}});A.Sync=WriteEntrySync;A.Tar=I;const getType=e=>e.isFile()?"File":e.isDirectory()?"Directory":e.isSymbolicLink()?"SymbolicLink":"Unsupported";e.exports=A},4091:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},665:(e,t,r)=>{"use strict";e.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(e){var t=this;if(!(t instanceof Yallist)){t=new Yallist}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach((function(e){t.push(e)}))}else if(arguments.length>0){for(var r=0,n=arguments.length;r<n;r++){t.push(arguments[r])}}return t}Yallist.prototype.removeNode=function(e){if(e.list!==this){throw new Error("removing node which does not belong to this list")}var t=e.next;var r=e.prev;if(t){t.prev=r}if(r){r.next=t}if(e===this.head){this.head=t}if(e===this.tail){this.tail=r}e.list.length--;e.next=null;e.prev=null;e.list=null;return t};Yallist.prototype.unshiftNode=function(e){if(e===this.head){return}if(e.list){e.list.removeNode(e)}var t=this.head;e.list=this;e.next=t;if(t){t.prev=e}this.head=e;if(!this.tail){this.tail=e}this.length++};Yallist.prototype.pushNode=function(e){if(e===this.tail){return}if(e.list){e.list.removeNode(e)}var t=this.tail;e.list=this;e.prev=t;if(t){t.next=e}this.tail=e;if(!this.head){this.head=e}this.length++};Yallist.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++){push(this,arguments[e])}return this.length};Yallist.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++){unshift(this,arguments[e])}return this.length};Yallist.prototype.pop=function(){if(!this.tail){return undefined}var e=this.tail.value;this.tail=this.tail.prev;if(this.tail){this.tail.next=null}else{this.head=null}this.length--;return e};Yallist.prototype.shift=function(){if(!this.head){return undefined}var e=this.head.value;this.head=this.head.next;if(this.head){this.head.prev=null}else{this.tail=null}this.length--;return e};Yallist.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;r!==null;n++){e.call(t,r.value,n,this);r=r.next}};Yallist.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;r!==null;n--){e.call(t,r.value,n,this);r=r.prev}};Yallist.prototype.get=function(e){for(var t=0,r=this.head;r!==null&&t<e;t++){r=r.next}if(t===e&&r!==null){return r.value}};Yallist.prototype.getReverse=function(e){for(var t=0,r=this.tail;r!==null&&t<e;t++){r=r.prev}if(t===e&&r!==null){return r.value}};Yallist.prototype.map=function(e,t){t=t||this;var r=new Yallist;for(var n=this.head;n!==null;){r.push(e.call(t,n.value,this));n=n.next}return r};Yallist.prototype.mapReverse=function(e,t){t=t||this;var r=new Yallist;for(var n=this.tail;n!==null;){r.push(e.call(t,n.value,this));n=n.prev}return r};Yallist.prototype.reduce=function(e,t){var r;var n=this.head;if(arguments.length>1){r=t}else if(this.head){n=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=0;n!==null;i++){r=e(r,n.value,i);n=n.next}return r};Yallist.prototype.reduceReverse=function(e,t){var r;var n=this.tail;if(arguments.length>1){r=t}else if(this.tail){n=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=this.length-1;n!==null;i--){r=e(r,n.value,i);n=n.prev}return r};Yallist.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,r=this.head;r!==null;t++){e[t]=r.value;r=r.next}return e};Yallist.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,r=this.tail;r!==null;t++){e[t]=r.value;r=r.prev}return e};Yallist.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(t<e||t<0){return r}if(e<0){e=0}if(t>this.length){t=this.length}for(var n=0,i=this.head;i!==null&&n<e;n++){i=i.next}for(;i!==null&&n<t;n++,i=i.next){r.push(i.value)}return r};Yallist.prototype.sliceReverse=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(t<e||t<0){return r}if(e<0){e=0}if(t>this.length){t=this.length}for(var n=this.length,i=this.tail;i!==null&&n>t;n--){i=i.prev}for(;i!==null&&n>e;n--,i=i.prev){r.push(i.value)}return r};Yallist.prototype.splice=function(e,t,...r){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var n=0,i=this.head;i!==null&&n<e;n++){i=i.next}var s=[];for(var n=0;i&&n<t;n++){s.push(i.value);i=this.removeNode(i)}if(i===null){i=this.tail}if(i!==this.head&&i!==this.tail){i=i.prev}for(var n=0;n<r.length;n++){i=insert(this,i,r[n])}return s};Yallist.prototype.reverse=function(){var e=this.head;var t=this.tail;for(var r=e;r!==null;r=r.prev){var n=r.prev;r.prev=r.next;r.next=n}this.head=t;this.tail=e;return this};function insert(e,t,r){var n=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);if(n.next===null){e.tail=n}if(n.prev===null){e.head=n}e.length++;return n}function push(e,t){e.tail=new Node(t,e.tail,null,e);if(!e.head){e.head=e.tail}e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e);if(!e.tail){e.tail=e.head}e.length++}function Node(e,t,r,n){if(!(this instanceof Node)){return new Node(e,t,r,n)}this.list=n;this.value=e;if(t){t.next=this;this.prev=t}else{this.prev=null}if(r){r.prev=this;this.next=r}else{this.next=null}}try{r(4091)(Yallist)}catch(e){}},8781:(e,t,r)=>{var n=r(7147);var i=r(9796);var s=r(5010);var a=r(4794);var o=r(3837);var l=r(2361).EventEmitter;var c=r(2781).Transform;var u=r(2781).PassThrough;var h=r(2781).Writable;t.open=open;t.fromFd=fromFd;t.fromBuffer=fromBuffer;t.fromRandomAccessReader=fromRandomAccessReader;t.dosDateTimeToDate=dosDateTimeToDate;t.validateFileName=validateFileName;t.ZipFile=ZipFile;t.Entry=Entry;t.RandomAccessReader=RandomAccessReader;function open(e,t,r){if(typeof t==="function"){r=t;t=null}if(t==null)t={};if(t.autoClose==null)t.autoClose=true;if(t.lazyEntries==null)t.lazyEntries=false;if(t.decodeStrings==null)t.decodeStrings=true;if(t.validateEntrySizes==null)t.validateEntrySizes=true;if(t.strictFileNames==null)t.strictFileNames=false;if(r==null)r=defaultCallback;n.open(e,"r",(function(e,i){if(e)return r(e);fromFd(i,t,(function(e,t){if(e)n.close(i,defaultCallback);r(e,t)}))}))}function fromFd(e,t,r){if(typeof t==="function"){r=t;t=null}if(t==null)t={};if(t.autoClose==null)t.autoClose=false;if(t.lazyEntries==null)t.lazyEntries=false;if(t.decodeStrings==null)t.decodeStrings=true;if(t.validateEntrySizes==null)t.validateEntrySizes=true;if(t.strictFileNames==null)t.strictFileNames=false;if(r==null)r=defaultCallback;n.fstat(e,(function(n,i){if(n)return r(n);var a=s.createFromFd(e,{autoClose:true});fromRandomAccessReader(a,i.size,t,r)}))}function fromBuffer(e,t,r){if(typeof t==="function"){r=t;t=null}if(t==null)t={};t.autoClose=false;if(t.lazyEntries==null)t.lazyEntries=false;if(t.decodeStrings==null)t.decodeStrings=true;if(t.validateEntrySizes==null)t.validateEntrySizes=true;if(t.strictFileNames==null)t.strictFileNames=false;var n=s.createFromBuffer(e,{maxChunkSize:65536});fromRandomAccessReader(n,e.length,t,r)}function fromRandomAccessReader(e,t,r,n){if(typeof r==="function"){n=r;r=null}if(r==null)r={};if(r.autoClose==null)r.autoClose=true;if(r.lazyEntries==null)r.lazyEntries=false;if(r.decodeStrings==null)r.decodeStrings=true;var i=!!r.decodeStrings;if(r.validateEntrySizes==null)r.validateEntrySizes=true;if(r.strictFileNames==null)r.strictFileNames=false;if(n==null)n=defaultCallback;if(typeof t!=="number")throw new Error("expected totalSize parameter to be a number");if(t>Number.MAX_SAFE_INTEGER){throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double.")}e.ref();var s=22;var a=65535;var o=Math.min(s+a,t);var l=d(o);var c=t-l.length;readAndAssertNoEof(e,l,0,o,c,(function(a){if(a)return n(a);for(var u=o-s;u>=0;u-=1){if(l.readUInt32LE(u)!==101010256)continue;var h=l.slice(u);var f=h.readUInt16LE(4);if(f!==0){return n(new Error("multi-disk zip files are not supported: found disk number: "+f))}var p=h.readUInt16LE(10);var _=h.readUInt32LE(16);var m=h.readUInt16LE(20);var v=h.length-s;if(m!==v){return n(new Error("invalid comment length. expected: "+v+". found: "+m))}var y=i?decodeBuffer(h,22,h.length,false):h.slice(22);if(!(p===65535||_===4294967295)){return n(null,new ZipFile(e,_,t,p,y,r.autoClose,r.lazyEntries,i,r.validateEntrySizes,r.strictFileNames))}var w=d(20);var g=c+u-w.length;readAndAssertNoEof(e,w,0,w.length,g,(function(s){if(s)return n(s);if(w.readUInt32LE(0)!==117853008){return n(new Error("invalid zip64 end of central directory locator signature"))}var a=readUInt64LE(w,8);var o=d(56);readAndAssertNoEof(e,o,0,o.length,a,(function(s){if(s)return n(s);if(o.readUInt32LE(0)!==101075792){return n(new Error("invalid zip64 end of central directory record signature"))}p=readUInt64LE(o,32);_=readUInt64LE(o,48);return n(null,new ZipFile(e,_,t,p,y,r.autoClose,r.lazyEntries,i,r.validateEntrySizes,r.strictFileNames))}))}));return}n(new Error("end of central directory record signature not found"))}))}o.inherits(ZipFile,l);function ZipFile(e,t,r,n,i,s,a,o,c,u){var h=this;l.call(h);h.reader=e;h.reader.on("error",(function(e){emitError(h,e)}));h.reader.once("close",(function(){h.emit("close")}));h.readEntryCursor=t;h.fileSize=r;h.entryCount=n;h.comment=i;h.entriesRead=0;h.autoClose=!!s;h.lazyEntries=!!a;h.decodeStrings=!!o;h.validateEntrySizes=!!c;h.strictFileNames=!!u;h.isOpen=true;h.emittedError=false;if(!h.lazyEntries)h._readEntry()}ZipFile.prototype.close=function(){if(!this.isOpen)return;this.isOpen=false;this.reader.unref()};function emitErrorAndAutoClose(e,t){if(e.autoClose)e.close();emitError(e,t)}function emitError(e,t){if(e.emittedError)return;e.emittedError=true;e.emit("error",t)}ZipFile.prototype.readEntry=function(){if(!this.lazyEntries)throw new Error("readEntry() called without lazyEntries:true");this._readEntry()};ZipFile.prototype._readEntry=function(){var e=this;if(e.entryCount===e.entriesRead){setImmediate((function(){if(e.autoClose)e.close();if(e.emittedError)return;e.emit("end")}));return}if(e.emittedError)return;var r=d(46);readAndAssertNoEof(e.reader,r,0,r.length,e.readEntryCursor,(function(n){if(n)return emitErrorAndAutoClose(e,n);if(e.emittedError)return;var i=new Entry;var s=r.readUInt32LE(0);if(s!==33639248)return emitErrorAndAutoClose(e,new Error("invalid central directory file header signature: 0x"+s.toString(16)));i.versionMadeBy=r.readUInt16LE(4);i.versionNeededToExtract=r.readUInt16LE(6);i.generalPurposeBitFlag=r.readUInt16LE(8);i.compressionMethod=r.readUInt16LE(10);i.lastModFileTime=r.readUInt16LE(12);i.lastModFileDate=r.readUInt16LE(14);i.crc32=r.readUInt32LE(16);i.compressedSize=r.readUInt32LE(20);i.uncompressedSize=r.readUInt32LE(24);i.fileNameLength=r.readUInt16LE(28);i.extraFieldLength=r.readUInt16LE(30);i.fileCommentLength=r.readUInt16LE(32);i.internalFileAttributes=r.readUInt16LE(36);i.externalFileAttributes=r.readUInt32LE(38);i.relativeOffsetOfLocalHeader=r.readUInt32LE(42);if(i.generalPurposeBitFlag&64)return emitErrorAndAutoClose(e,new Error("strong encryption is not supported"));e.readEntryCursor+=46;r=d(i.fileNameLength+i.extraFieldLength+i.fileCommentLength);readAndAssertNoEof(e.reader,r,0,r.length,e.readEntryCursor,(function(n){if(n)return emitErrorAndAutoClose(e,n);if(e.emittedError)return;var s=(i.generalPurposeBitFlag&2048)!==0;i.fileName=e.decodeStrings?decodeBuffer(r,0,i.fileNameLength,s):r.slice(0,i.fileNameLength);var o=i.fileNameLength+i.extraFieldLength;var l=r.slice(i.fileNameLength,o);i.extraFields=[];var c=0;while(c<l.length-3){var u=l.readUInt16LE(c+0);var h=l.readUInt16LE(c+2);var f=c+4;var p=f+h;if(p>l.length)return emitErrorAndAutoClose(e,new Error("extra field length exceeds extra field buffer size"));var _=d(h);l.copy(_,0,f,p);i.extraFields.push({id:u,data:_});c=p}i.fileComment=e.decodeStrings?decodeBuffer(r,o,o+i.fileCommentLength,s):r.slice(o,o+i.fileCommentLength);i.comment=i.fileComment;e.readEntryCursor+=r.length;e.entriesRead+=1;if(i.uncompressedSize===4294967295||i.compressedSize===4294967295||i.relativeOffsetOfLocalHeader===4294967295){var m=null;for(var c=0;c<i.extraFields.length;c++){var v=i.extraFields[c];if(v.id===1){m=v.data;break}}if(m==null){return emitErrorAndAutoClose(e,new Error("expected zip64 extended information extra field"))}var y=0;if(i.uncompressedSize===4294967295){if(y+8>m.length){return emitErrorAndAutoClose(e,new Error("zip64 extended information extra field does not include uncompressed size"))}i.uncompressedSize=readUInt64LE(m,y);y+=8}if(i.compressedSize===4294967295){if(y+8>m.length){return emitErrorAndAutoClose(e,new Error("zip64 extended information extra field does not include compressed size"))}i.compressedSize=readUInt64LE(m,y);y+=8}if(i.relativeOffsetOfLocalHeader===4294967295){if(y+8>m.length){return emitErrorAndAutoClose(e,new Error("zip64 extended information extra field does not include relative header offset"))}i.relativeOffsetOfLocalHeader=readUInt64LE(m,y);y+=8}}if(e.decodeStrings){for(var c=0;c<i.extraFields.length;c++){var v=i.extraFields[c];if(v.id===28789){if(v.data.length<6){continue}if(v.data.readUInt8(0)!==1){continue}var w=v.data.readUInt32LE(1);if(a.unsigned(r.slice(0,i.fileNameLength))!==w){continue}i.fileName=decodeBuffer(v.data,5,v.data.length,true);break}}}if(e.validateEntrySizes&&i.compressionMethod===0){var g=i.uncompressedSize;if(i.isEncrypted()){g+=12}if(i.compressedSize!==g){var b="compressed/uncompressed size mismatch for stored file: "+i.compressedSize+" != "+i.uncompressedSize;return emitErrorAndAutoClose(e,new Error(b))}}if(e.decodeStrings){if(!e.strictFileNames){i.fileName=i.fileName.replace(/\\/g,"/")}var S=t.validateFileName(i.fileName);if(S!=null)return emitErrorAndAutoClose(e,new Error(S))}e.emit("entry",i);if(!e.lazyEntries)e._readEntry()}))}))};ZipFile.prototype.openReadStream=function(e,t,r){var n=this;var s=0;var a=e.compressedSize;if(r==null){r=t;t={}}else{if(t.decrypt!=null){if(!e.isEncrypted()){throw new Error("options.decrypt can only be specified for encrypted entries")}if(t.decrypt!==false)throw new Error("invalid options.decrypt value: "+t.decrypt);if(e.isCompressed()){if(t.decompress!==false)throw new Error("entry is encrypted and compressed, and options.decompress !== false")}}if(t.decompress!=null){if(!e.isCompressed()){throw new Error("options.decompress can only be specified for compressed entries")}if(!(t.decompress===false||t.decompress===true)){throw new Error("invalid options.decompress value: "+t.decompress)}}if(t.start!=null||t.end!=null){if(e.isCompressed()&&t.decompress!==false){throw new Error("start/end range not allowed for compressed entry without options.decompress === false")}if(e.isEncrypted()&&t.decrypt!==false){throw new Error("start/end range not allowed for encrypted entry without options.decrypt === false")}}if(t.start!=null){s=t.start;if(s<0)throw new Error("options.start < 0");if(s>e.compressedSize)throw new Error("options.start > entry.compressedSize")}if(t.end!=null){a=t.end;if(a<0)throw new Error("options.end < 0");if(a>e.compressedSize)throw new Error("options.end > entry.compressedSize");if(a<s)throw new Error("options.end < options.start")}}if(!n.isOpen)return r(new Error("closed"));if(e.isEncrypted()){if(t.decrypt!==false)return r(new Error("entry is encrypted, and options.decrypt !== false"))}n.reader.ref();var o=d(30);readAndAssertNoEof(n.reader,o,0,o.length,e.relativeOffsetOfLocalHeader,(function(l){try{if(l)return r(l);var c=o.readUInt32LE(0);if(c!==67324752){return r(new Error("invalid local file header signature: 0x"+c.toString(16)))}var u=o.readUInt16LE(26);var h=o.readUInt16LE(28);var f=e.relativeOffsetOfLocalHeader+o.length+u+h;var d;if(e.compressionMethod===0){d=false}else if(e.compressionMethod===8){d=t.decompress!=null?t.decompress:true}else{return r(new Error("unsupported compression method: "+e.compressionMethod))}var p=f;var _=p+e.compressedSize;if(e.compressedSize!==0){if(_>n.fileSize){return r(new Error("file data overflows file bounds: "+p+" + "+e.compressedSize+" > "+n.fileSize))}}var m=n.reader.createReadStream({start:p+s,end:p+a});var v=m;if(d){var y=false;var w=i.createInflateRaw();m.on("error",(function(e){setImmediate((function(){if(!y)w.emit("error",e)}))}));m.pipe(w);if(n.validateEntrySizes){v=new AssertByteCountStream(e.uncompressedSize);w.on("error",(function(e){setImmediate((function(){if(!y)v.emit("error",e)}))}));w.pipe(v)}else{v=w}v.destroy=function(){y=true;if(w!==v)w.unpipe(v);m.unpipe(w);m.destroy()}}r(null,v)}finally{n.reader.unref()}}))};function Entry(){}Entry.prototype.getLastModDate=function(){return dosDateTimeToDate(this.lastModFileDate,this.lastModFileTime)};Entry.prototype.isEncrypted=function(){return(this.generalPurposeBitFlag&1)!==0};Entry.prototype.isCompressed=function(){return this.compressionMethod===8};function dosDateTimeToDate(e,t){var r=e&31;var n=(e>>5&15)-1;var i=(e>>9&127)+1980;var s=0;var a=(t&31)*2;var o=t>>5&63;var l=t>>11&31;return new Date(i,n,r,l,o,a,s)}function validateFileName(e){if(e.indexOf("\\")!==-1){return"invalid characters in fileName: "+e}if(/^[a-zA-Z]:/.test(e)||/^\//.test(e)){return"absolute path: "+e}if(e.split("/").indexOf("..")!==-1){return"invalid relative path: "+e}return null}function readAndAssertNoEof(e,t,r,n,i,s){if(n===0){return setImmediate((function(){s(null,d(0))}))}e.read(t,r,n,i,(function(e,t){if(e)return s(e);if(t<n){return s(new Error("unexpected EOF"))}s()}))}o.inherits(AssertByteCountStream,c);function AssertByteCountStream(e){c.call(this);this.actualByteCount=0;this.expectedByteCount=e}AssertByteCountStream.prototype._transform=function(e,t,r){this.actualByteCount+=e.length;if(this.actualByteCount>this.expectedByteCount){var n="too many bytes in the stream. expected "+this.expectedByteCount+". got at least "+this.actualByteCount;return r(new Error(n))}r(null,e)};AssertByteCountStream.prototype._flush=function(e){if(this.actualByteCount<this.expectedByteCount){var t="not enough bytes in the stream. expected "+this.expectedByteCount+". got only "+this.actualByteCount;return e(new Error(t))}e()};o.inherits(RandomAccessReader,l);function RandomAccessReader(){l.call(this);this.refCount=0}RandomAccessReader.prototype.ref=function(){this.refCount+=1};RandomAccessReader.prototype.unref=function(){var e=this;e.refCount-=1;if(e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");e.close(onCloseDone);function onCloseDone(t){if(t)return e.emit("error",t);e.emit("close")}};RandomAccessReader.prototype.createReadStream=function(e){var t=e.start;var r=e.end;if(t===r){var n=new u;setImmediate((function(){n.end()}));return n}var i=this._readStreamForRange(t,r);var s=false;var a=new RefUnrefFilter(this);i.on("error",(function(e){setImmediate((function(){if(!s)a.emit("error",e)}))}));a.destroy=function(){i.unpipe(a);a.unref();i.destroy()};var o=new AssertByteCountStream(r-t);a.on("error",(function(e){setImmediate((function(){if(!s)o.emit("error",e)}))}));o.destroy=function(){s=true;a.unpipe(o);a.destroy()};return i.pipe(a).pipe(o)};RandomAccessReader.prototype._readStreamForRange=function(e,t){throw new Error("not implemented")};RandomAccessReader.prototype.read=function(e,t,r,n,i){var s=this.createReadStream({start:n,end:n+r});var a=new h;var o=0;a._write=function(r,n,i){r.copy(e,t+o,0,r.length);o+=r.length;i()};a.on("finish",i);s.on("error",(function(e){i(e)}));s.pipe(a)};RandomAccessReader.prototype.close=function(e){setImmediate(e)};o.inherits(RefUnrefFilter,u);function RefUnrefFilter(e){u.call(this);this.context=e;this.context.ref();this.unreffedYet=false}RefUnrefFilter.prototype._flush=function(e){this.unref();e()};RefUnrefFilter.prototype.unref=function(e){if(this.unreffedYet)return;this.unreffedYet=true;this.context.unref()};var f="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ";function decodeBuffer(e,t,r,n){if(n){return e.toString("utf8",t,r)}else{var i="";for(var s=t;s<r;s++){i+=f[e[s]]}return i}}function readUInt64LE(e,t){var r=e.readUInt32LE(t);var n=e.readUInt32LE(t+4);return n*4294967296+r}var d;if(typeof Buffer.allocUnsafe==="function"){d=function(e){return Buffer.allocUnsafe(e)}}else{d=function(e){return new Buffer(e)}}function defaultCallback(e){if(e)throw e}},9491:e=>{"use strict";e.exports=require("assert")},4300:e=>{"use strict";e.exports=require("buffer")},2081:e=>{"use strict";e.exports=require("child_process")},2057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1017:e=>{"use strict";e.exports=require("path")},2781:e=>{"use strict";e.exports=require("stream")},1576:e=>{"use strict";e.exports=require("string_decoder")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={exports:{}};var s=true;try{e[r].call(i.exports,i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(3423);module.exports=r})();