codemod 0.18.10 → 0.18.12

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.
Files changed (2) hide show
  1. package/dist/index.cjs +1 -1
  2. package/package.json +7 -7
package/dist/index.cjs CHANGED
@@ -674,7 +674,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);return new xI(t,e).found}f
674
674
  See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof xI))return new xI(t,e);if(c3i(this,t,e),this.noprocess)return this;var n=this.minimatch.set.length;this.matches=new Array(n);for(var i=0;i<n;i++)this._process(this.minimatch.set[i],i,!1);this._finish()}xI.prototype._finish=function(){if(enr.ok(this instanceof xI),this.realpath){var t=this;this.matches.forEach(function(e,n){var i=t.matches[n]=Object.create(null);for(var s in e)try{s=t._makeAbs(s);var o=l3i.realpathSync(s,t.realpathCache);i[o]=!0}catch(f){if(f.syscall==="stat")i[t._makeAbs(s)]=!0;else throw f}})}QDe.finish(this)};xI.prototype._process=function(t,e,n){enr.ok(this instanceof xI);for(var i=0;typeof t[i]=="string";)i++;var s;switch(i){case t.length:this._processSimple(t.join("/"),e);return;case 0:s=null;break;default:s=t.slice(0,i).join("/");break}var o=t.slice(i),f;s===null?f=".":((LEt(s)||LEt(t.map(function(x){return typeof x=="string"?x:"[*]"}).join("/")))&&(!s||!LEt(s))&&(s="/"+s),f=s);var h=this._makeAbs(f);if(!u3i(this,f)){var _=o[0]===Ztr.GLOBSTAR;_?this._processGlobStar(s,f,h,o,e,n):this._processReaddir(s,f,h,o,e,n)}};xI.prototype._processReaddir=function(t,e,n,i,s,o){var f=this._readdir(n,o);if(f){for(var h=i[0],_=!!this.minimatch.negate,x=h._glob,v=this.dot||x.charAt(0)===".",T=[],A=0;A<f.length;A++){var w=f[A];if(w.charAt(0)!=="."||v){var N;_&&!t?N=!w.match(h):N=w.match(h),N&&T.push(w)}}var P=T.length;if(P!==0){if(i.length===1&&!this.mark&&!this.stat){this.matches[s]||(this.matches[s]=Object.create(null));for(var A=0;A<P;A++){var w=T[A];t&&(t.slice(-1)!=="/"?w=t+"/"+w:w=t+w),w.charAt(0)==="/"&&!this.nomount&&(w=jln.join(this.root,w)),this._emitMatch(s,w)}return}i.shift();for(var A=0;A<P;A++){var w=T[A],F;t?F=[t,w]:F=[w],this._process(F.concat(i),s,o)}}}};xI.prototype._emitMatch=function(t,e){if(!f3i(this,e)){var n=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=n),!this.matches[t][e]){if(this.nodir){var i=this.cache[n];if(i==="DIR"||Array.isArray(i))return}this.matches[t][e]=!0,this.stat&&this._stat(e)}}};xI.prototype._readdirInGlobStar=function(t){if(this.follow)return this._readdir(t,!1);var e,n,i;try{n=this.fs.lstatSync(t)}catch(o){if(o.code==="ENOENT")return null}var s=n&&n.isSymbolicLink();return this.symlinks[t]=s,!s&&n&&!n.isDirectory()?this.cache[t]="FILE":e=this._readdir(t,!1),e};xI.prototype._readdir=function(t,e){var n;if(e&&!zln(this.symlinks,t))return this._readdirInGlobStar(t);if(zln(this.cache,t)){var i=this.cache[t];if(!i||i==="FILE")return null;if(Array.isArray(i))return i}try{return this._readdirEntries(t,this.fs.readdirSync(t))}catch(s){return this._readdirError(t,s),null}};xI.prototype._readdirEntries=function(t,e){if(!this.mark&&!this.stat)for(var n=0;n<e.length;n++){var i=e[n];t==="/"?i=t+i:i=t+"/"+i,this.cache[i]=!0}return this.cache[t]=e,e};xI.prototype._readdirError=function(t,e){switch(e.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(t);if(this.cache[n]="FILE",n===this.cwdAbs){var i=new Error(e.code+" invalid cwd "+this.cwd);throw i.path=this.cwd,i.code=e.code,i}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:if(this.cache[this._makeAbs(t)]=!1,this.strict)throw e;this.silent||console.error("glob error",e);break}};xI.prototype._processGlobStar=function(t,e,n,i,s,o){var f=this._readdir(n,o);if(f){var h=i.slice(1),_=t?[t]:[],x=_.concat(h);this._process(x,s,!1);var v=f.length,T=this.symlinks[n];if(!(T&&o))for(var A=0;A<v;A++){var w=f[A];if(!(w.charAt(0)==="."&&!this.dot)){var N=_.concat(f[A],h);this._process(N,s,!0);var P=_.concat(f[A],i);this._process(P,s,!0)}}}};xI.prototype._processSimple=function(t,e){var n=this._stat(t);if(this.matches[e]||(this.matches[e]=Object.create(null)),!!n){if(t&&LEt(t)&&!this.nomount){var i=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=jln.join(this.root,t):(t=jln.resolve(this.root,t),i&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t)}};xI.prototype._stat=function(t){var e=this._makeAbs(t),n=t.slice(-1)==="/";if(t.length>this.maxLength)return!1;if(!this.stat&&zln(this.cache,e)){var f=this.cache[e];if(Array.isArray(f)&&(f="DIR"),!n||f==="DIR")return f;if(n&&f==="FILE")return!1}var i,s=this.statCache[e];if(!s){var o;try{o=this.fs.lstatSync(e)}catch(h){if(h&&(h.code==="ENOENT"||h.code==="ENOTDIR"))return this.statCache[e]=!1,!1}if(o&&o.isSymbolicLink())try{s=this.fs.statSync(e)}catch{s=o}else s=o}this.statCache[e]=s;var f=!0;return s&&(f=s.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||f,n&&f==="FILE"?!1:f};xI.prototype._mark=function(t){return QDe.mark(this,t)};xI.prototype._makeAbs=function(t){return QDe.makeAbs(this,t)}});var Uln=le((WBa,snr)=>{snr.exports=inr;function inr(t,e){if(t&&e)return inr(t)(e);if(typeof t!="function")throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(i){n[i]=t[i]}),n;function n(){for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];var o=t.apply(this,i),f=i[i.length-1];return typeof o=="function"&&o!==f&&Object.keys(f).forEach(function(h){o[h]=f[h]}),o}}});var qln=le((jBa,Vln)=>{var anr=Uln();Vln.exports=anr(MEt);Vln.exports.strict=anr(onr);MEt.proto=MEt(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return MEt(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onr(this)},configurable:!0})});function MEt(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function onr(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},n=t.name||"Function wrapped with `once`";return e.onceError=n+" shouldn't be called more than once",e.called=!1,e}});var cnr=le((zBa,lnr)=>{var d3i=Uln(),Vet=Object.create(null),p3i=qln();lnr.exports=d3i(h3i);function h3i(t,e){return Vet[t]?(Vet[t].push(e),null):(Vet[t]=[e],m3i(t))}function m3i(t){return p3i(function e(){var n=Vet[t],i=n.length,s=_3i(arguments);try{for(var o=0;o<i;o++)n[o].apply(null,s)}finally{n.length>i?(n.splice(0,i),process.nextTick(function(){e.apply(null,s)})):delete Vet[t]}})}function _3i(t){for(var e=t.length,n=[],i=0;i<e;i++)n[i]=t[i];return n}});var Gln=le((VBa,fnr)=>{fnr.exports=ZDe;var g3i=kln(),unr=kEt(),GBa=unr.Minimatch,x3i=j2(),y3i=require("events").EventEmitter,Hln=require("path"),Kln=require("assert"),qet=OEt(),$ln=rnr(),eAe=Wln(),v3i=eAe.setopts,Jln=eAe.ownProp,Xln=cnr(),UBa=require("util"),b3i=eAe.childrenIgnored,E3i=eAe.isIgnored,S3i=qln();function ZDe(t,e,n){if(typeof e=="function"&&(n=e,e={}),e||(e={}),e.sync){if(n)throw new TypeError("callback provided to sync glob");return $ln(t,e)}return new lv(t,e,n)}ZDe.sync=$ln;var T3i=ZDe.GlobSync=$ln.GlobSync;ZDe.glob=ZDe;function D3i(t,e){if(e===null||typeof e!="object")return t;for(var n=Object.keys(e),i=n.length;i--;)t[n[i]]=e[n[i]];return t}ZDe.hasMagic=function(t,e){var n=D3i({},e);n.noprocess=!0;var i=new lv(t,n),s=i.minimatch.set;if(!t)return!1;if(s.length>1)return!0;for(var o=0;o<s[0].length;o++)if(typeof s[0][o]!="string")return!0;return!1};ZDe.Glob=lv;x3i(lv,y3i);function lv(t,e,n){if(typeof e=="function"&&(n=e,e=null),e&&e.sync){if(n)throw new TypeError("callback provided to sync glob");return new T3i(t,e)}if(!(this instanceof lv))return new lv(t,e,n);v3i(this,t,e),this._didRealPath=!1;var i=this.minimatch.set.length;this.matches=new Array(i),typeof n=="function"&&(n=S3i(n),this.on("error",n),this.on("end",function(_){n(null,_)}));var s=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(i===0)return h();for(var o=!0,f=0;f<i;f++)this._process(this.minimatch.set[f],f,!1,h);o=!1;function h(){--s._processing,s._processing<=0&&(o?process.nextTick(function(){s._finish()}):s._finish())}}lv.prototype._finish=function(){if(Kln(this instanceof lv),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();eAe.finish(this),this.emit("end",this.found)}};lv.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var t=this.matches.length;if(t===0)return this._finish();for(var e=this,n=0;n<this.matches.length;n++)this._realpathSet(n,i);function i(){--t===0&&e._finish()}};lv.prototype._realpathSet=function(t,e){var n=this.matches[t];if(!n)return e();var i=Object.keys(n),s=this,o=i.length;if(o===0)return e();var f=this.matches[t]=Object.create(null);i.forEach(function(h,_){h=s._makeAbs(h),g3i.realpath(h,s.realpathCache,function(x,v){x?x.syscall==="stat"?f[h]=!0:s.emit("error",x):f[v]=!0,--o===0&&(s.matches[t]=f,e())})})};lv.prototype._mark=function(t){return eAe.mark(this,t)};lv.prototype._makeAbs=function(t){return eAe.makeAbs(this,t)};lv.prototype.abort=function(){this.aborted=!0,this.emit("abort")};lv.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};lv.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var t=this._emitQueue.slice(0);this._emitQueue.length=0;for(var e=0;e<t.length;e++){var n=t[e];this._emitMatch(n[0],n[1])}}if(this._processQueue.length){var i=this._processQueue.slice(0);this._processQueue.length=0;for(var e=0;e<i.length;e++){var s=i[e];this._processing--,this._process(s[0],s[1],s[2],s[3])}}}};lv.prototype._process=function(t,e,n,i){if(Kln(this instanceof lv),Kln(typeof i=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([t,e,n,i]);return}for(var s=0;typeof t[s]=="string";)s++;var o;switch(s){case t.length:this._processSimple(t.join("/"),e,i);return;case 0:o=null;break;default:o=t.slice(0,s).join("/");break}var f=t.slice(s),h;o===null?h=".":((qet(o)||qet(t.map(function(v){return typeof v=="string"?v:"[*]"}).join("/")))&&(!o||!qet(o))&&(o="/"+o),h=o);var _=this._makeAbs(h);if(b3i(this,h))return i();var x=f[0]===unr.GLOBSTAR;x?this._processGlobStar(o,h,_,f,e,n,i):this._processReaddir(o,h,_,f,e,n,i)}};lv.prototype._processReaddir=function(t,e,n,i,s,o,f){var h=this;this._readdir(n,o,function(_,x){return h._processReaddir2(t,e,n,i,s,o,x,f)})};lv.prototype._processReaddir2=function(t,e,n,i,s,o,f,h){if(!f)return h();for(var _=i[0],x=!!this.minimatch.negate,v=_._glob,T=this.dot||v.charAt(0)===".",A=[],w=0;w<f.length;w++){var N=f[w];if(N.charAt(0)!=="."||T){var P;x&&!t?P=!N.match(_):P=N.match(_),P&&A.push(N)}}var F=A.length;if(F===0)return h();if(i.length===1&&!this.mark&&!this.stat){this.matches[s]||(this.matches[s]=Object.create(null));for(var w=0;w<F;w++){var N=A[w];t&&(t!=="/"?N=t+"/"+N:N=t+N),N.charAt(0)==="/"&&!this.nomount&&(N=Hln.join(this.root,N)),this._emitMatch(s,N)}return h()}i.shift();for(var w=0;w<F;w++){var N=A[w],j;t&&(t!=="/"?N=t+"/"+N:N=t+N),this._process([N].concat(i),s,o,h)}h()};lv.prototype._emitMatch=function(t,e){if(!this.aborted&&!E3i(this,e)){if(this.paused){this._emitQueue.push([t,e]);return}var n=qet(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=n),!this.matches[t][e]){if(this.nodir){var i=this.cache[n];if(i==="DIR"||Array.isArray(i))return}this.matches[t][e]=!0;var s=this.statCache[n];s&&this.emit("stat",e,s),this.emit("match",e)}}};lv.prototype._readdirInGlobStar=function(t,e){if(this.aborted)return;if(this.follow)return this._readdir(t,!1,e);var n="lstat\0"+t,i=this,s=Xln(n,o);s&&i.fs.lstat(t,s);function o(f,h){if(f&&f.code==="ENOENT")return e();var _=h&&h.isSymbolicLink();i.symlinks[t]=_,!_&&h&&!h.isDirectory()?(i.cache[t]="FILE",e()):i._readdir(t,!1,e)}};lv.prototype._readdir=function(t,e,n){if(!this.aborted&&(n=Xln("readdir\0"+t+"\0"+e,n),!!n)){if(e&&!Jln(this.symlinks,t))return this._readdirInGlobStar(t,n);if(Jln(this.cache,t)){var i=this.cache[t];if(!i||i==="FILE")return n();if(Array.isArray(i))return n(null,i)}var s=this;s.fs.readdir(t,A3i(this,t,n))}};function A3i(t,e,n){return function(i,s){i?t._readdirError(e,i,n):t._readdirEntries(e,s,n)}}lv.prototype._readdirEntries=function(t,e,n){if(!this.aborted){if(!this.mark&&!this.stat)for(var i=0;i<e.length;i++){var s=e[i];t==="/"?s=t+s:s=t+"/"+s,this.cache[s]=!0}return this.cache[t]=e,n(null,e)}};lv.prototype._readdirError=function(t,e,n){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":var i=this._makeAbs(t);if(this.cache[i]="FILE",i===this.cwdAbs){var s=new Error(e.code+" invalid cwd "+this.cwd);s.path=this.cwd,s.code=e.code,this.emit("error",s),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:this.cache[this._makeAbs(t)]=!1,this.strict&&(this.emit("error",e),this.abort()),this.silent||console.error("glob error",e);break}return n()}};lv.prototype._processGlobStar=function(t,e,n,i,s,o,f){var h=this;this._readdir(n,o,function(_,x){h._processGlobStar2(t,e,n,i,s,o,x,f)})};lv.prototype._processGlobStar2=function(t,e,n,i,s,o,f,h){if(!f)return h();var _=i.slice(1),x=t?[t]:[],v=x.concat(_);this._process(v,s,!1,h);var T=this.symlinks[n],A=f.length;if(T&&o)return h();for(var w=0;w<A;w++){var N=f[w];if(!(N.charAt(0)==="."&&!this.dot)){var P=x.concat(f[w],_);this._process(P,s,!0,h);var F=x.concat(f[w],i);this._process(F,s,!0,h)}}h()};lv.prototype._processSimple=function(t,e,n){var i=this;this._stat(t,function(s,o){i._processSimple2(t,e,s,o,n)})};lv.prototype._processSimple2=function(t,e,n,i,s){if(this.matches[e]||(this.matches[e]=Object.create(null)),!i)return s();if(t&&qet(t)&&!this.nomount){var o=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=Hln.join(this.root,t):(t=Hln.resolve(this.root,t),o&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t),s()};lv.prototype._stat=function(t,e){var n=this._makeAbs(t),i=t.slice(-1)==="/";if(t.length>this.maxLength)return e();if(!this.stat&&Jln(this.cache,n)){var s=this.cache[n];if(Array.isArray(s)&&(s="DIR"),!i||s==="DIR")return e(null,s);if(i&&s==="FILE")return e()}var o,f=this.statCache[n];if(f!==void 0){if(f===!1)return e(null,f);var h=f.isDirectory()?"DIR":"FILE";return i&&h==="FILE"?e():e(null,h,f)}var _=this,x=Xln("stat\0"+n,v);x&&_.fs.lstat(n,x);function v(T,A){if(A&&A.isSymbolicLink())return _.fs.stat(n,function(w,N){w?_._stat2(t,n,null,A,e):_._stat2(t,n,w,N,e)});_._stat2(t,n,T,A,e)}};lv.prototype._stat2=function(t,e,n,i,s){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return this.statCache[e]=!1,s();var o=t.slice(-1)==="/";if(this.statCache[e]=i,e.slice(-1)==="/"&&i&&!i.isDirectory())return s(null,!1,i);var f=!0;return i&&(f=i.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||f,o&&f==="FILE"?s():s(null,f,i)}});var ecn=le((qBa,ynr)=>{ynr.exports=Zln;Zln.sync=xnr;var My=require("assert"),mnr=require("path"),dnr=require("fs"),R8e=void 0;try{R8e=Gln()}catch{}var _nr=parseInt("666",8),C3i={nosort:!0,silent:!0},Yln=0,Het=process.platform==="win32";function gnr(t){var e=["unlink","chmod","stat","lstat","rmdir","readdir"];if(e.forEach(function(n){t[n]=t[n]||dnr[n],n=n+"Sync",t[n]=t[n]||dnr[n]}),t.maxBusyTries=t.maxBusyTries||3,t.emfileWait=t.emfileWait||1e3,t.glob===!1&&(t.disableGlob=!0),t.disableGlob!==!0&&R8e===void 0)throw Error("glob dependency not found, set `options.disableGlob = true` if intentional");t.disableGlob=t.disableGlob||!1,t.glob=t.glob||C3i}function Zln(t,e,n){typeof e=="function"&&(n=e,e={}),My(t,"rimraf: missing path"),My.equal(typeof t,"string","rimraf: path should be a string"),My.equal(typeof n,"function","rimraf: callback function required"),My(e,"rimraf: invalid options argument provided"),My.equal(typeof e,"object","rimraf: options should be object"),gnr(e);var i=0,s=null,o=0;if(e.disableGlob||!R8e.hasMagic(t))return h(null,[t]);e.lstat(t,function(_,x){if(!_)return h(null,[t]);R8e(t,e.glob,h)});function f(_){s=s||_,--o===0&&n(s)}function h(_,x){if(_)return n(_);if(o=x.length,o===0)return n();x.forEach(function(v){Qln(v,e,function T(A){if(A){if((A.code==="EBUSY"||A.code==="ENOTEMPTY"||A.code==="EPERM")&&i<e.maxBusyTries){i++;var w=i*100;return setTimeout(function(){Qln(v,e,T)},w)}if(A.code==="EMFILE"&&Yln<e.emfileWait)return setTimeout(function(){Qln(v,e,T)},Yln++);A.code==="ENOENT"&&(A=null)}Yln=0,f(A)})})}}function Qln(t,e,n){My(t),My(e),My(typeof n=="function"),e.lstat(t,function(i,s){if(i&&i.code==="ENOENT")return n(null);if(i&&i.code==="EPERM"&&Het&&pnr(t,e,i,n),s&&s.isDirectory())return FEt(t,e,i,n);e.unlink(t,function(o){if(o){if(o.code==="ENOENT")return n(null);if(o.code==="EPERM")return Het?pnr(t,e,o,n):FEt(t,e,o,n);if(o.code==="EISDIR")return FEt(t,e,o,n)}return n(o)})})}function pnr(t,e,n,i){My(t),My(e),My(typeof i=="function"),n&&My(n instanceof Error),e.chmod(t,_nr,function(s){s?i(s.code==="ENOENT"?null:n):e.stat(t,function(o,f){o?i(o.code==="ENOENT"?null:n):f.isDirectory()?FEt(t,e,n,i):e.unlink(t,i)})})}function hnr(t,e,n){My(t),My(e),n&&My(n instanceof Error);try{e.chmodSync(t,_nr)}catch(s){if(s.code==="ENOENT")return;throw n}try{var i=e.statSync(t)}catch(s){if(s.code==="ENOENT")return;throw n}i.isDirectory()?BEt(t,e,n):e.unlinkSync(t)}function FEt(t,e,n,i){My(t),My(e),n&&My(n instanceof Error),My(typeof i=="function"),e.rmdir(t,function(s){s&&(s.code==="ENOTEMPTY"||s.code==="EEXIST"||s.code==="EPERM")?w3i(t,e,i):s&&s.code==="ENOTDIR"?i(n):i(s)})}function w3i(t,e,n){My(t),My(e),My(typeof n=="function"),e.readdir(t,function(i,s){if(i)return n(i);var o=s.length;if(o===0)return e.rmdir(t,n);var f;s.forEach(function(h){Zln(mnr.join(t,h),e,function(_){if(!f){if(_)return n(f=_);--o===0&&e.rmdir(t,n)}})})})}function xnr(t,e){e=e||{},gnr(e),My(t,"rimraf: missing path"),My.equal(typeof t,"string","rimraf: path should be a string"),My(e,"rimraf: missing options"),My.equal(typeof e,"object","rimraf: options should be object");var n;if(e.disableGlob||!R8e.hasMagic(t))n=[t];else try{e.lstatSync(t),n=[t]}catch{n=R8e.sync(t,e.glob)}if(n.length)for(var i=0;i<n.length;i++){var t=n[i];try{var s=e.lstatSync(t)}catch(f){if(f.code==="ENOENT")return;f.code==="EPERM"&&Het&&hnr(t,e,f)}try{s&&s.isDirectory()?BEt(t,e,null):e.unlinkSync(t)}catch(f){if(f.code==="ENOENT")return;if(f.code==="EPERM")return Het?hnr(t,e,f):BEt(t,e,f);if(f.code!=="EISDIR")throw f;BEt(t,e,f)}}}function BEt(t,e,n){My(t),My(e),n&&My(n instanceof Error);try{e.rmdirSync(t)}catch(i){if(i.code==="ENOENT")return;if(i.code==="ENOTDIR")throw n;(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")&&I3i(t,e)}}function I3i(t,e){My(t),My(e),e.readdirSync(t).forEach(function(f){xnr(mnr.join(t,f),e)});var n=Het?100:1,i=0;do{var s=!0;try{var o=e.rmdirSync(t,e);return s=!1,o}finally{if(++i<n&&s)continue}}while(!0)}});var tcn=le((HBa,Enr)=>{var Ket=require("path"),vnr=require("fs"),bnr=parseInt("0777",8);Enr.exports=O8e.mkdirp=O8e.mkdirP=O8e;function O8e(t,e,n,i){typeof e=="function"?(n=e,e={}):(!e||typeof e!="object")&&(e={mode:e});var s=e.mode,o=e.fs||vnr;s===void 0&&(s=bnr),i||(i=null);var f=n||function(){};t=Ket.resolve(t),o.mkdir(t,s,function(h){if(!h)return i=i||t,f(null,i);switch(h.code){case"ENOENT":if(Ket.dirname(t)===t)return f(h);O8e(Ket.dirname(t),e,function(_,x){_?f(_,x):O8e(t,e,f,x)});break;default:o.stat(t,function(_,x){_||!x.isDirectory()?f(h,i):f(null,i)});break}})}O8e.sync=function t(e,n,i){(!n||typeof n!="object")&&(n={mode:n});var s=n.mode,o=n.fs||vnr;s===void 0&&(s=bnr),i||(i=null),e=Ket.resolve(e);try{o.mkdirSync(e,s),i=i||e}catch(h){switch(h.code){case"ENOENT":i=t(Ket.dirname(e),n,i),t(e,n,i);break;default:var f;try{f=o.statSync(e)}catch{throw h}if(!f.isDirectory())throw h;break}}return i}});var WEt=le((KBa,Snr)=>{Snr.exports=ncn;function ncn(t){if(t._collected)return;if(t._paused)return t.on("resume",ncn.bind(null,t));t._collected=!0,t.pause(),t.on("data",n),t.on("end",n);var e=[];function n(f){typeof f=="string"&&(f=new Buffer(f)),!(Buffer.isBuffer(f)&&!f.length)&&e.push(f)}t.on("entry",s);var i=[];function s(f){ncn(f),i.push(f)}t.on("proxy",o);function o(f){f.pause()}t.pipe=function(f){return function(h){var _=0;(function v(){var T=i[_++];if(!T)return x();T.on("end",v),h?h.add(T):t.emit("entry",T)})();function x(){t.removeListener("entry",s),t.removeListener("data",n),t.removeListener("end",n),t.pipe=f,h&&t.pipe(h),e.forEach(function(v){v?t.emit("data",v):t.emit("end")}),t.resume()}return h}}(t.pipe)}});var rcn=le((JBa,Dnr)=>{Dnr.exports=p_e;var jEt=L8e(),P3i=j2(),N3i=tcn(),Tnr=require("path"),k3i=WEt();P3i(p_e,jEt);function p_e(t){var e=this;e instanceof p_e||e.error("DirWriter must be called as constructor.",null,!0),(t.type!=="Directory"||!t.Directory)&&e.error("Non-directory type "+t.type+" "+JSON.stringify(t),null,!0),jEt.call(this,t)}p_e.prototype._create=function(){var t=this;N3i(t._path,jEt.dirmode,function(e){if(e)return t.error(e);t.ready=!0,t.emit("ready"),t._process()})};p_e.prototype.write=function(){return!0};p_e.prototype.end=function(){this._ended=!0,this._process()};p_e.prototype.add=function(t){var e=this;return k3i(t),!e.ready||e._currentEntry?(e._buffer.push(t),!1):e._ended?e.error("add after end"):(e._buffer.push(t),e._process(),this._buffer.length===0)};p_e.prototype._process=function(){var t=this;if(t._processing)return;var e=t._buffer.shift();if(!e){t.emit("drain"),t._ended&&t._finish();return}t._processing=!0,t.emit("entry",e);var n=e,i;do{if(i=n._path||n.path,i===t.root._path||i===t._path||i&&i.indexOf(t._path)===0)return t._processing=!1,e._collected&&e.pipe(),t._process();n=n.parent}while(n);var s={parent:t,root:t.root||t,type:e.type,depth:t.depth+1};i=e._path||e.path||e.props.path,e.parent&&(i=i.substr(e.parent._path.length+1)),s.path=Tnr.join(t.path,Tnr.join("/",i)),s.filter=t.filter,Object.keys(e.props).forEach(function(_){s.hasOwnProperty(_)||(s[_]=e.props[_])});var o=t._currentChild=new jEt(s);o.on("ready",function(){e.pipe(o),e.resume()}),o.on("error",function(_){o._swallowErrors?(t.warn(_),o.emit("end"),o.emit("close")):t.emit("error",_)}),o.on("close",h);var f=!1;function h(){f||(f=!0,t._currentChild=null,t._processing=!1,t._process())}}});var icn=le(($Ba,Pnr)=>{Pnr.exports=Jet;var Cnr=qee(),wnr=L8e(),R3i=j2(),O3i=require("path"),L3i=ecn();R3i(Jet,wnr);function Jet(t){var e=this;if(!(e instanceof Jet))throw new Error("LinkWriter must be called as constructor.");if(!(t.type==="Link"&&t.Link||t.type==="SymbolicLink"&&t.SymbolicLink))throw new Error("Non-link type "+t.type);t.linkpath===""&&(t.linkpath="."),t.linkpath||e.error("Need linkpath property to create "+t.type),wnr.call(this,t)}Jet.prototype._create=function(){var t=this,e=t.type==="Link"||process.platform==="win32",n=e?"link":"symlink",i=e?O3i.resolve(t.dirname,t.linkpath):t.linkpath;if(e)return Anr(t,i,n);Cnr.readlink(t._path,function(s,o){if(o&&o===i)return Inr(t);Anr(t,i,n)})};function Anr(t,e,n){L3i(t._path,function(i){if(i)return t.error(i);M3i(t,e,n)})}function M3i(t,e,n){Cnr[n](e,t._path,function(i){if(i)if((i.code==="ENOENT"||i.code==="EACCES"||i.code==="EPERM")&&process.platform==="win32")t.ready=!0,t.emit("ready"),t.emit("end"),t.emit("close"),t.end=t._finish=function(){};else return t.error(i);Inr(t)})}function Inr(t){t.ready=!0,t.emit("ready"),t._ended&&!t._finished&&t._finish()}Jet.prototype.end=function(){this._ended=!0,this.ready&&(this._finished=!0,this._finish())}});var scn=le((XBa,knr)=>{knr.exports=tAe;var F3i=qee(),zEt=L8e(),B3i=j2(),Nnr={};B3i(tAe,zEt);function tAe(t){var e=this;if(!(e instanceof tAe))throw new Error("FileWriter must be called as constructor.");if(t.type!=="File"||!t.File)throw new Error("Non-file type "+t.type);e._buffer=[],e._bytesWritten=0,zEt.call(this,t)}tAe.prototype._create=function(){var t=this;if(!t._stream){var e={};t.props.flags&&(e.flags=t.props.flags),e.mode=zEt.filemode,t._old&&t._old.blksize&&(e.bufferSize=t._old.blksize),t._stream=F3i.createWriteStream(t._path,e),t._stream.on("open",function(){t.ready=!0,t._buffer.forEach(function(n){n===Nnr?t._stream.end():t._stream.write(n)}),t.emit("ready"),t.emit("drain")}),t._stream.on("error",function(n){t.emit("error",n)}),t._stream.on("drain",function(){t.emit("drain")}),t._stream.on("close",function(){t._finish()})}};tAe.prototype.write=function(t){var e=this;if(e._bytesWritten+=t.length,!e.ready){if(!Buffer.isBuffer(t)&&typeof t!="string")throw new Error("invalid write data");return e._buffer.push(t),!1}var n=e._stream.write(t);return n===!1&&e._stream._queue?e._stream._queue.length<=2:n};tAe.prototype.end=function(t){var e=this;return t&&e.write(t),e.ready?e._stream.end():(e._buffer.push(Nnr),!1)};tAe.prototype._finish=function(){var t=this;typeof t.size=="number"&&t._bytesWritten!==t.size&&t.error(`Did not get expected byte count.
675
675
  expect: `+t.size+`
676
676
  actual: `+t._bytesWritten),zEt.prototype._finish.call(t)}});var ocn=le((YBa,Rnr)=>{Rnr.exports=h_e;var acn=L8e(),W3i=Bet(),j3i=j2(),z3i=WEt(),G3i=require("fs");j3i(h_e,acn);function h_e(t){var e=this;if(!(e instanceof h_e))throw new Error("ProxyWriter must be called as constructor.");e.props=t,e._needDrain=!1,acn.call(e,t)}h_e.prototype._stat=function(){var t=this,e=t.props,n=e.follow?"stat":"lstat";G3i[n](e.path,function(i,s){var o;i||!s?o="File":o=W3i(s),e[o]=!0,e.type=t.type=o,t._old=s,t._addProxy(acn(e,s))})};h_e.prototype._addProxy=function(t){var e=this;if(e._proxy)return e.error("proxy already set");e._proxy=t,["ready","error","close","pipe","drain","warn"].forEach(function(i){t.on(i,e.emit.bind(e,i))}),e.emit("proxy",t);var n=e._buffer;n.forEach(function(i){t[i[0]].apply(t,i[1])}),e._buffer.length=0,e._needsDrain&&e.emit("drain")};h_e.prototype.add=function(t){return z3i(t),this._proxy?this._proxy.add(t):(this._buffer.push(["add",[t]]),this._needDrain=!0,!1)};h_e.prototype.write=function(t){return this._proxy?this._proxy.write(t):(this._buffer.push(["write",[t]]),this._needDrain=!0,!1)};h_e.prototype.end=function(t){return this._proxy?this._proxy.end(t):(this._buffer.push(["end",[t]]),!1)}});var L8e=le((QBa,Gnr)=>{Gnr.exports=uU;var cU=qee(),U3i=j2(),V3i=ecn(),q3i=tcn(),$et=require("path"),Lnr=process.platform==="win32"?0:process.umask(),Mnr=Bet(),Fnr=SEt();U3i(uU,Fnr);uU.dirmode=parseInt("0777",8)&~Lnr;uU.filemode=parseInt("0666",8)&~Lnr;var H3i=rcn(),K3i=icn(),J3i=scn(),$3i=ocn();function uU(t,e){var n=this;typeof t=="string"&&(t={path:t});var i=Mnr(t),s=uU;switch(i){case"Directory":s=H3i;break;case"File":s=J3i;break;case"Link":case"SymbolicLink":s=K3i;break;case null:default:s=$3i;break}if(!(n instanceof s))return new s(t);Fnr.call(n),t.path||n.error("Must provide a path",null,!0),n.type=t.type,n.props=t,n.depth=t.depth||0,n.clobber=t.clobber===!1?t.clobber:!0,n.parent=t.parent||null,n.root=t.root||t.parent&&t.parent.root||n,n._path=n.path=$et.resolve(t.path),process.platform==="win32"&&(n.path=n._path=n.path.replace(/\?/g,"_"),n._path.length>=260&&(n._swallowErrors=!0,n._path="\\\\?\\"+n.path.replace(/\//g,"\\"))),n.basename=$et.basename(t.path),n.dirname=$et.dirname(t.path),n.linkpath=t.linkpath||null,t.parent=t.root=null,n.size=t.size,typeof t.mode=="string"&&(t.mode=parseInt(t.mode,8)),n.readable=!1,n.writable=!0,n._buffer=[],n.ready=!1,n.filter=typeof t.filter=="function"?t.filter:null,n._stat(e)}uU.prototype._create=function(){var t=this;cU[t.props.follow?"stat":"lstat"](t._path,function(e){if(e)return t.warn("Cannot create "+t._path+`
677
- Unsupported type: `+t.type,"ENOTSUP");t._finish()})};uU.prototype._stat=function(t){var e=this,n=e.props,i=n.follow?"stat":"lstat",s=e._proxy||e;t?o(null,t):cU[i](e._path,o);function o(f,h){if(e.filter&&!e.filter.call(s,s,h)){e._aborted=!0,e.emit("end"),e.emit("close");return}if(f||!h)return lcn(e);e._old=h;var _=Mnr(h);if(_!==e.type||e.type==="File"&&h.nlink>1)return V3i(e._path,function(x){if(x)return e.error(x);e._old=null,lcn(e)});lcn(e)}};function lcn(t){q3i($et.dirname(t._path),uU.dirmode,function(e,n){return e?t.error(e):(t._madeDir=n,t._create())})}function Bnr(t,e,n,i,s){var o=e.mode,f=e.follow||t.type!=="SymbolicLink"?"chmod":"lchmod";if(!cU[f]||typeof o!="number")return s();var h=n.mode&parseInt("0777",8);if(o=o&parseInt("0777",8),o===h)return s();cU[f](i,o,s)}function Wnr(t,e,n,i,s){if(process.platform==="win32"||!process.getuid||process.getuid()!==0||typeof e.uid!="number"&&typeof e.gid!="number"||n.uid===e.uid&&n.gid===e.gid)return s();var o=t.props.follow||t.type!=="SymbolicLink"?"chown":"lchown";if(!cU[o])return s();typeof e.uid!="number"&&(e.uid=n.uid),typeof e.gid!="number"&&(e.gid=n.gid),cU[o](i,e.uid,e.gid,s)}function jnr(t,e,n,i,s){if(!cU.utimes||process.platform==="win32")return s();var o=e.follow||t.type!=="SymbolicLink"?"utimes":"lutimes";if(o==="lutimes"&&!cU[o]&&(o="utimes"),!cU[o])return s();var f=n.atime,h=n.mtime,_=e.atime,x=e.mtime;if(_===void 0&&(_=f),x===void 0&&(x=h),Onr(_)||(_=new Date(_)),Onr(x)||(_=new Date(x)),_.getTime()===f.getTime()&&x.getTime()===h.getTime())return s();cU[o](i,_,x,s)}uU.prototype._finish=function(){var t=this;if(t._finishing)return;t._finishing=!0;var e=0,n=null,i=!1;if(t._old)t._old.atime=new Date(0),t._old.mtime=new Date(0),o(t._old);else{var s=t.props.follow?"stat":"lstat";cU[s](t._path,function(h,_){if(h)if(h.code==="ENOENT"&&(t.type==="Link"||t.type==="SymbolicLink")&&process.platform==="win32"){t.ready=!0,t.emit("ready"),t.emit("end"),t.emit("close"),t.end=t._finish=function(){};return}else return t.error(h);o(t._old=_)})}return;function o(h){e+=3,Bnr(t,t.props,h,t._path,f("chmod")),Wnr(t,t.props,h,t._path,f("chown")),jnr(t,t.props,h,t._path,f("utimes"))}function f(h){return function(_){if(n)return;if(_)return _.fstream_finish_call=h,t.error(n=_);if(--e>0||i)return;if(i=!0,t._madeDir)znr(t,t._path,x);else return x();function x(v){if(v)return v.fstream_finish_call="setupMadeDir",t.error(v);t.emit("end"),t.emit("close")}}}};function znr(t,e,n){var i=t._madeDir,s=$et.dirname(e);X3i(t,s,function(o){if(o)return n(o);if(s===i)return n();znr(t,s,n)})}function X3i(t,e,n){var i={};Object.keys(t.props).forEach(function(h){i[h]=t.props[h],h==="mode"&&t.type!=="Directory"&&(i[h]=i[h]|parseInt("0111",8))});var s=3,o=null;cU.stat(e,function(h,_){if(h)return n(o=h);Bnr(t,i,_,e,f),Wnr(t,i,_,e,f),jnr(t,i,_,e,f)});function f(h){if(!o){if(h)return n(o=h);if(--s===0)return n()}}}uU.prototype.pipe=function(){this.error("Can't pipe from writable stream")};uU.prototype.add=function(){this.error("Can't add to non-Directory type")};uU.prototype.write=function(){return!0};function Y3i(t){return Object.prototype.toString.call(t)}function Onr(t){return typeof t=="object"&&Y3i(t)==="[object Date]"}});var ccn=le(Ax=>{Ax.Abstract=SEt();Ax.Reader=JDe();Ax.Writer=L8e();Ax.File={Reader:Sln(),Writer:scn()};Ax.Dir={Reader:Eln(),Writer:rcn()};Ax.Link={Reader:vln(),Writer:icn()};Ax.Proxy={Reader:Dln(),Writer:ocn()};Ax.Reader.Dir=Ax.DirReader=Ax.Dir.Reader;Ax.Reader.File=Ax.FileReader=Ax.File.Reader;Ax.Reader.Link=Ax.LinkReader=Ax.Link.Reader;Ax.Reader.Proxy=Ax.ProxyReader=Ax.Proxy.Reader;Ax.Writer.Dir=Ax.DirWriter=Ax.Dir.Writer;Ax.Writer.File=Ax.FileWriter=Ax.File.Writer;Ax.Writer.Link=Ax.LinkWriter=Ax.Link.Writer;Ax.Writer.Proxy=Ax.ProxyWriter=Ax.Proxy.Writer;Ax.collect=WEt()});var Vnr=le((e9a,Unr)=>{Unr.exports=rFi;var Q3i=fEt(),Z3i=ccn().Writer,ucn=require("path"),eFi=require("stream"),tFi=dln(),nFi=i_e();function rFi(t){t.path=ucn.resolve(ucn.normalize(t.path));var e=new Q3i(t),n=new eFi.Writable({objectMode:!0});n._write=function(s,o,f){if(s.type=="Directory")return f();var h=ucn.join(t.path,s.path.replace(/\\/g,"/"));if(h.indexOf(t.path)!=0)return f();let _=t.getWriter?t.getWriter({path:h}):Z3i({path:h});s.pipe(_).on("error",f).on("close",f)};var i=tFi(e,n);return e.once("crx-header",function(s){i.crxHeader=s}),e.pipe(n).on("finish",function(){i.emit("close")}),i.promise=function(){return new nFi(function(s,o){i.on("close",s),i.on("error",o)})},i}});var qnr=le((t9a,GEt)=>{var yI=function(t){"use strict";var e=1e7,n=7,i=9007199254740992,s=A(i),o="0123456789abcdefghijklmnopqrstuvwxyz",f=typeof BigInt=="function";function h(it,Yt,Qt,On){return typeof it>"u"?h[0]:typeof Yt<"u"?+Yt==10&&!Qt?jr(it):Fr(it,Yt,Qt,On):jr(it)}function _(it,Yt){this.value=it,this.sign=Yt,this.isSmall=!1}_.prototype=Object.create(h.prototype);function x(it){this.value=it,this.sign=it<0,this.isSmall=!0}x.prototype=Object.create(h.prototype);function v(it){this.value=it}v.prototype=Object.create(h.prototype);function T(it){return-i<it&&it<i}function A(it){return it<1e7?[it]:it<1e14?[it%1e7,Math.floor(it/1e7)]:[it%1e7,Math.floor(it/1e7)%1e7,Math.floor(it/1e14)]}function w(it){N(it);var Yt=it.length;if(Yt<4&&tn(it,s)<0)switch(Yt){case 0:return 0;case 1:return it[0];case 2:return it[0]+it[1]*e;default:return it[0]+(it[1]+it[2]*e)*e}return it}function N(it){for(var Yt=it.length;it[--Yt]===0;);it.length=Yt+1}function P(it){for(var Yt=new Array(it),Qt=-1;++Qt<it;)Yt[Qt]=0;return Yt}function F(it){return it>0?Math.floor(it):Math.ceil(it)}function j(it,Yt){var Qt=it.length,On=Yt.length,lt=new Array(Qt),er=0,gi=e,dr,xi;for(xi=0;xi<On;xi++)dr=it[xi]+Yt[xi]+er,er=dr>=gi?1:0,lt[xi]=dr-er*gi;for(;xi<Qt;)dr=it[xi]+er,er=dr===gi?1:0,lt[xi++]=dr-er*gi;return er>0&&lt.push(er),lt}function X(it,Yt){return it.length>=Yt.length?j(it,Yt):j(Yt,it)}function oe(it,Yt){var Qt=it.length,On=new Array(Qt),lt=e,er,gi;for(gi=0;gi<Qt;gi++)er=it[gi]-lt+Yt,Yt=Math.floor(er/lt),On[gi]=er-Yt*lt,Yt+=1;for(;Yt>0;)On[gi++]=Yt%lt,Yt=Math.floor(Yt/lt);return On}_.prototype.add=function(it){var Yt=jr(it);if(this.sign!==Yt.sign)return this.subtract(Yt.negate());var Qt=this.value,On=Yt.value;return Yt.isSmall?new _(oe(Qt,Math.abs(On)),this.sign):new _(X(Qt,On),this.sign)},_.prototype.plus=_.prototype.add,x.prototype.add=function(it){var Yt=jr(it),Qt=this.value;if(Qt<0!==Yt.sign)return this.subtract(Yt.negate());var On=Yt.value;if(Yt.isSmall){if(T(Qt+On))return new x(Qt+On);On=A(Math.abs(On))}return new _(oe(On,Math.abs(Qt)),Qt<0)},x.prototype.plus=x.prototype.add,v.prototype.add=function(it){return new v(this.value+jr(it).value)},v.prototype.plus=v.prototype.add;function ee(it,Yt){var Qt=it.length,On=Yt.length,lt=new Array(Qt),er=0,gi=e,dr,xi;for(dr=0;dr<On;dr++)xi=it[dr]-er-Yt[dr],xi<0?(xi+=gi,er=1):er=0,lt[dr]=xi;for(dr=On;dr<Qt;dr++){if(xi=it[dr]-er,xi<0)xi+=gi;else{lt[dr++]=xi;break}lt[dr]=xi}for(;dr<Qt;dr++)lt[dr]=it[dr];return N(lt),lt}function ge(it,Yt,Qt){var On;return tn(it,Yt)>=0?On=ee(it,Yt):(On=ee(Yt,it),Qt=!Qt),On=w(On),typeof On=="number"?(Qt&&(On=-On),new x(On)):new _(On,Qt)}function Le(it,Yt,Qt){var On=it.length,lt=new Array(On),er=-Yt,gi=e,dr,xi;for(dr=0;dr<On;dr++)xi=it[dr]+er,er=Math.floor(xi/gi),xi%=gi,lt[dr]=xi<0?xi+gi:xi;return lt=w(lt),typeof lt=="number"?(Qt&&(lt=-lt),new x(lt)):new _(lt,Qt)}_.prototype.subtract=function(it){var Yt=jr(it);if(this.sign!==Yt.sign)return this.add(Yt.negate());var Qt=this.value,On=Yt.value;return Yt.isSmall?Le(Qt,Math.abs(On),this.sign):ge(Qt,On,this.sign)},_.prototype.minus=_.prototype.subtract,x.prototype.subtract=function(it){var Yt=jr(it),Qt=this.value;if(Qt<0!==Yt.sign)return this.add(Yt.negate());var On=Yt.value;return Yt.isSmall?new x(Qt-On):Le(On,Math.abs(Qt),Qt>=0)},x.prototype.minus=x.prototype.subtract,v.prototype.subtract=function(it){return new v(this.value-jr(it).value)},v.prototype.minus=v.prototype.subtract,_.prototype.negate=function(){return new _(this.value,!this.sign)},x.prototype.negate=function(){var it=this.sign,Yt=new x(-this.value);return Yt.sign=!it,Yt},v.prototype.negate=function(){return new v(-this.value)},_.prototype.abs=function(){return new _(this.value,!1)},x.prototype.abs=function(){return new x(Math.abs(this.value))},v.prototype.abs=function(){return new v(this.value>=0?this.value:-this.value)};function xe(it,Yt){var Qt=it.length,On=Yt.length,lt=Qt+On,er=P(lt),gi=e,dr,xi,Ys,Ml,hl;for(Ys=0;Ys<Qt;++Ys){Ml=it[Ys];for(var Wc=0;Wc<On;++Wc)hl=Yt[Wc],dr=Ml*hl+er[Ys+Wc],xi=Math.floor(dr/gi),er[Ys+Wc]=dr-xi*gi,er[Ys+Wc+1]+=xi}return N(er),er}function Se(it,Yt){var Qt=it.length,On=new Array(Qt),lt=e,er=0,gi,dr;for(dr=0;dr<Qt;dr++)gi=it[dr]*Yt+er,er=Math.floor(gi/lt),On[dr]=gi-er*lt;for(;er>0;)On[dr++]=er%lt,er=Math.floor(er/lt);return On}function Ve(it,Yt){for(var Qt=[];Yt-- >0;)Qt.push(0);return Qt.concat(it)}function Xe(it,Yt){var Qt=Math.max(it.length,Yt.length);if(Qt<=30)return xe(it,Yt);Qt=Math.ceil(Qt/2);var On=it.slice(Qt),lt=it.slice(0,Qt),er=Yt.slice(Qt),gi=Yt.slice(0,Qt),dr=Xe(lt,gi),xi=Xe(On,er),Ys=Xe(X(lt,On),X(gi,er)),Ml=X(X(dr,Ve(ee(ee(Ys,dr),xi),Qt)),Ve(xi,2*Qt));return N(Ml),Ml}function Ne(it,Yt){return-.012*it-.012*Yt+15e-6*it*Yt>0}_.prototype.multiply=function(it){var Yt=jr(it),Qt=this.value,On=Yt.value,lt=this.sign!==Yt.sign,er;if(Yt.isSmall){if(On===0)return h[0];if(On===1)return this;if(On===-1)return this.negate();if(er=Math.abs(On),er<e)return new _(Se(Qt,er),lt);On=A(er)}return Ne(Qt.length,On.length)?new _(Xe(Qt,On),lt):new _(xe(Qt,On),lt)},_.prototype.times=_.prototype.multiply;function tt(it,Yt,Qt){return it<e?new _(Se(Yt,it),Qt):new _(xe(Yt,A(it)),Qt)}x.prototype._multiplyBySmall=function(it){return T(it.value*this.value)?new x(it.value*this.value):tt(Math.abs(it.value),A(Math.abs(this.value)),this.sign!==it.sign)},_.prototype._multiplyBySmall=function(it){return it.value===0?h[0]:it.value===1?this:it.value===-1?this.negate():tt(Math.abs(it.value),this.value,this.sign!==it.sign)},x.prototype.multiply=function(it){return jr(it)._multiplyBySmall(this)},x.prototype.times=x.prototype.multiply,v.prototype.multiply=function(it){return new v(this.value*jr(it).value)},v.prototype.times=v.prototype.multiply;function zt(it){var Yt=it.length,Qt=P(Yt+Yt),On=e,lt,er,gi,dr,xi;for(gi=0;gi<Yt;gi++){dr=it[gi],er=0-dr*dr;for(var Ys=gi;Ys<Yt;Ys++)xi=it[Ys],lt=2*(dr*xi)+Qt[gi+Ys]+er,er=Math.floor(lt/On),Qt[gi+Ys]=lt-er*On;Qt[gi+Yt]=er}return N(Qt),Qt}_.prototype.square=function(){return new _(zt(this.value),!1)},x.prototype.square=function(){var it=this.value*this.value;return T(it)?new x(it):new _(zt(A(Math.abs(this.value))),!1)},v.prototype.square=function(it){return new v(this.value*this.value)};function yt(it,Yt){var Qt=it.length,On=Yt.length,lt=e,er=P(Yt.length),gi=Yt[On-1],dr=Math.ceil(lt/(2*gi)),xi=Se(it,dr),Ys=Se(Yt,dr),Ml,hl,Wc,Ed,rp,Cf,cs;for(xi.length<=Qt&&xi.push(0),Ys.push(0),gi=Ys[On-1],hl=Qt-On;hl>=0;hl--){for(Ml=lt-1,xi[hl+On]!==gi&&(Ml=Math.floor((xi[hl+On]*lt+xi[hl+On-1])/gi)),Wc=0,Ed=0,Cf=Ys.length,rp=0;rp<Cf;rp++)Wc+=Ml*Ys[rp],cs=Math.floor(Wc/lt),Ed+=xi[hl+rp]-(Wc-cs*lt),Wc=cs,Ed<0?(xi[hl+rp]=Ed+lt,Ed=-1):(xi[hl+rp]=Ed,Ed=0);for(;Ed!==0;){for(Ml-=1,Wc=0,rp=0;rp<Cf;rp++)Wc+=xi[hl+rp]-lt+Ys[rp],Wc<0?(xi[hl+rp]=Wc+lt,Wc=0):(xi[hl+rp]=Wc,Wc=1);Ed+=Wc}er[hl]=Ml}return xi=dt(xi,dr)[0],[w(er),w(xi)]}function nn(it,Yt){for(var Qt=it.length,On=Yt.length,lt=[],er=[],gi=e,dr,xi,Ys,Ml,hl;Qt;){if(er.unshift(it[--Qt]),N(er),tn(er,Yt)<0){lt.push(0);continue}xi=er.length,Ys=er[xi-1]*gi+er[xi-2],Ml=Yt[On-1]*gi+Yt[On-2],xi>On&&(Ys=(Ys+1)*gi),dr=Math.ceil(Ys/Ml);do{if(hl=Se(Yt,dr),tn(hl,er)<=0)break;dr--}while(dr);lt.push(dr),er=ee(er,hl)}return lt.reverse(),[w(lt),w(er)]}function dt(it,Yt){var Qt=it.length,On=P(Qt),lt=e,er,gi,dr,xi;for(dr=0,er=Qt-1;er>=0;--er)xi=dr*lt+it[er],gi=F(xi/Yt),dr=xi-gi*Yt,On[er]=gi|0;return[On,dr|0]}function Ht(it,Yt){var Qt,On=jr(Yt);if(f)return[new v(it.value/On.value),new v(it.value%On.value)];var lt=it.value,er=On.value,gi;if(er===0)throw new Error("Cannot divide by zero");if(it.isSmall)return On.isSmall?[new x(F(lt/er)),new x(lt%er)]:[h[0],it];if(On.isSmall){if(er===1)return[it,h[0]];if(er==-1)return[it.negate(),h[0]];var dr=Math.abs(er);if(dr<e){Qt=dt(lt,dr),gi=w(Qt[0]);var xi=Qt[1];return it.sign&&(xi=-xi),typeof gi=="number"?(it.sign!==On.sign&&(gi=-gi),[new x(gi),new x(xi)]):[new _(gi,it.sign!==On.sign),new x(xi)]}er=A(dr)}var Ys=tn(lt,er);if(Ys===-1)return[h[0],it];if(Ys===0)return[h[it.sign===On.sign?1:-1],h[0]];lt.length+er.length<=200?Qt=yt(lt,er):Qt=nn(lt,er),gi=Qt[0];var Ml=it.sign!==On.sign,hl=Qt[1],Wc=it.sign;return typeof gi=="number"?(Ml&&(gi=-gi),gi=new x(gi)):gi=new _(gi,Ml),typeof hl=="number"?(Wc&&(hl=-hl),hl=new x(hl)):hl=new _(hl,Wc),[gi,hl]}_.prototype.divmod=function(it){var Yt=Ht(this,it);return{quotient:Yt[0],remainder:Yt[1]}},v.prototype.divmod=x.prototype.divmod=_.prototype.divmod,_.prototype.divide=function(it){return Ht(this,it)[0]},v.prototype.over=v.prototype.divide=function(it){return new v(this.value/jr(it).value)},x.prototype.over=x.prototype.divide=_.prototype.over=_.prototype.divide,_.prototype.mod=function(it){return Ht(this,it)[1]},v.prototype.mod=v.prototype.remainder=function(it){return new v(this.value%jr(it).value)},x.prototype.remainder=x.prototype.mod=_.prototype.remainder=_.prototype.mod,_.prototype.pow=function(it){var Yt=jr(it),Qt=this.value,On=Yt.value,lt,er,gi;if(On===0)return h[1];if(Qt===0)return h[0];if(Qt===1)return h[1];if(Qt===-1)return Yt.isEven()?h[1]:h[-1];if(Yt.sign)return h[0];if(!Yt.isSmall)throw new Error("The exponent "+Yt.toString()+" is too large.");if(this.isSmall&&T(lt=Math.pow(Qt,On)))return new x(F(lt));for(er=this,gi=h[1];On&!0&&(gi=gi.times(er),--On),On!==0;)On/=2,er=er.square();return gi},x.prototype.pow=_.prototype.pow,v.prototype.pow=function(it){var Yt=jr(it),Qt=this.value,On=Yt.value,lt=BigInt(0),er=BigInt(1),gi=BigInt(2);if(On===lt)return h[1];if(Qt===lt)return h[0];if(Qt===er)return h[1];if(Qt===BigInt(-1))return Yt.isEven()?h[1]:h[-1];if(Yt.isNegative())return new v(lt);for(var dr=this,xi=h[1];(On&er)===er&&(xi=xi.times(dr),--On),On!==lt;)On/=gi,dr=dr.square();return xi},_.prototype.modPow=function(it,Yt){if(it=jr(it),Yt=jr(Yt),Yt.isZero())throw new Error("Cannot take modPow with modulus 0");var Qt=h[1],On=this.mod(Yt);for(it.isNegative()&&(it=it.multiply(h[-1]),On=On.modInv(Yt));it.isPositive();){if(On.isZero())return h[0];it.isOdd()&&(Qt=Qt.multiply(On).mod(Yt)),it=it.divide(2),On=On.square().mod(Yt)}return Qt},v.prototype.modPow=x.prototype.modPow=_.prototype.modPow;function tn(it,Yt){if(it.length!==Yt.length)return it.length>Yt.length?1:-1;for(var Qt=it.length-1;Qt>=0;Qt--)if(it[Qt]!==Yt[Qt])return it[Qt]>Yt[Qt]?1:-1;return 0}_.prototype.compareAbs=function(it){var Yt=jr(it),Qt=this.value,On=Yt.value;return Yt.isSmall?1:tn(Qt,On)},x.prototype.compareAbs=function(it){var Yt=jr(it),Qt=Math.abs(this.value),On=Yt.value;return Yt.isSmall?(On=Math.abs(On),Qt===On?0:Qt>On?1:-1):-1},v.prototype.compareAbs=function(it){var Yt=this.value,Qt=jr(it).value;return Yt=Yt>=0?Yt:-Yt,Qt=Qt>=0?Qt:-Qt,Yt===Qt?0:Yt>Qt?1:-1},_.prototype.compare=function(it){if(it===1/0)return-1;if(it===-1/0)return 1;var Yt=jr(it),Qt=this.value,On=Yt.value;return this.sign!==Yt.sign?Yt.sign?1:-1:Yt.isSmall?this.sign?-1:1:tn(Qt,On)*(this.sign?-1:1)},_.prototype.compareTo=_.prototype.compare,x.prototype.compare=function(it){if(it===1/0)return-1;if(it===-1/0)return 1;var Yt=jr(it),Qt=this.value,On=Yt.value;return Yt.isSmall?Qt==On?0:Qt>On?1:-1:Qt<0!==Yt.sign?Qt<0?-1:1:Qt<0?1:-1},x.prototype.compareTo=x.prototype.compare,v.prototype.compare=function(it){if(it===1/0)return-1;if(it===-1/0)return 1;var Yt=this.value,Qt=jr(it).value;return Yt===Qt?0:Yt>Qt?1:-1},v.prototype.compareTo=v.prototype.compare,_.prototype.equals=function(it){return this.compare(it)===0},v.prototype.eq=v.prototype.equals=x.prototype.eq=x.prototype.equals=_.prototype.eq=_.prototype.equals,_.prototype.notEquals=function(it){return this.compare(it)!==0},v.prototype.neq=v.prototype.notEquals=x.prototype.neq=x.prototype.notEquals=_.prototype.neq=_.prototype.notEquals,_.prototype.greater=function(it){return this.compare(it)>0},v.prototype.gt=v.prototype.greater=x.prototype.gt=x.prototype.greater=_.prototype.gt=_.prototype.greater,_.prototype.lesser=function(it){return this.compare(it)<0},v.prototype.lt=v.prototype.lesser=x.prototype.lt=x.prototype.lesser=_.prototype.lt=_.prototype.lesser,_.prototype.greaterOrEquals=function(it){return this.compare(it)>=0},v.prototype.geq=v.prototype.greaterOrEquals=x.prototype.geq=x.prototype.greaterOrEquals=_.prototype.geq=_.prototype.greaterOrEquals,_.prototype.lesserOrEquals=function(it){return this.compare(it)<=0},v.prototype.leq=v.prototype.lesserOrEquals=x.prototype.leq=x.prototype.lesserOrEquals=_.prototype.leq=_.prototype.lesserOrEquals,_.prototype.isEven=function(){return(this.value[0]&1)===0},x.prototype.isEven=function(){return(this.value&1)===0},v.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},_.prototype.isOdd=function(){return(this.value[0]&1)===1},x.prototype.isOdd=function(){return(this.value&1)===1},v.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},_.prototype.isPositive=function(){return!this.sign},x.prototype.isPositive=function(){return this.value>0},v.prototype.isPositive=x.prototype.isPositive,_.prototype.isNegative=function(){return this.sign},x.prototype.isNegative=function(){return this.value<0},v.prototype.isNegative=x.prototype.isNegative,_.prototype.isUnit=function(){return!1},x.prototype.isUnit=function(){return Math.abs(this.value)===1},v.prototype.isUnit=function(){return this.abs().value===BigInt(1)},_.prototype.isZero=function(){return!1},x.prototype.isZero=function(){return this.value===0},v.prototype.isZero=function(){return this.value===BigInt(0)},_.prototype.isDivisibleBy=function(it){var Yt=jr(it);return Yt.isZero()?!1:Yt.isUnit()?!0:Yt.compareAbs(2)===0?this.isEven():this.mod(Yt).isZero()},v.prototype.isDivisibleBy=x.prototype.isDivisibleBy=_.prototype.isDivisibleBy;function Or(it){var Yt=it.abs();if(Yt.isUnit())return!1;if(Yt.equals(2)||Yt.equals(3)||Yt.equals(5))return!0;if(Yt.isEven()||Yt.isDivisibleBy(3)||Yt.isDivisibleBy(5))return!1;if(Yt.lesser(49))return!0}function Kt(it,Yt){for(var Qt=it.prev(),On=Qt,lt=0,er,gi,dr,xi;On.isEven();)On=On.divide(2),lt++;e:for(dr=0;dr<Yt.length;dr++)if(!it.lesser(Yt[dr])&&(xi=yI(Yt[dr]).modPow(On,it),!(xi.isUnit()||xi.equals(Qt)))){for(er=lt-1;er!=0;er--){if(xi=xi.square().mod(it),xi.isUnit())return!1;if(xi.equals(Qt))continue e}return!1}return!0}_.prototype.isPrime=function(it){var Yt=Or(this);if(Yt!==t)return Yt;var Qt=this.abs(),On=Qt.bitLength();if(On<=64)return Kt(Qt,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var lt=Math.log(2)*On.toJSNumber(),er=Math.ceil(it===!0?2*Math.pow(lt,2):lt),gi=[],dr=0;dr<er;dr++)gi.push(yI(dr+2));return Kt(Qt,gi)},v.prototype.isPrime=x.prototype.isPrime=_.prototype.isPrime,_.prototype.isProbablePrime=function(it,Yt){var Qt=Or(this);if(Qt!==t)return Qt;for(var On=this.abs(),lt=it===t?5:it,er=[],gi=0;gi<lt;gi++)er.push(yI.randBetween(2,On.minus(2),Yt));return Kt(On,er)},v.prototype.isProbablePrime=x.prototype.isProbablePrime=_.prototype.isProbablePrime,_.prototype.modInv=function(it){for(var Yt=yI.zero,Qt=yI.one,On=jr(it),lt=this.abs(),er,gi,dr;!lt.isZero();)er=On.divide(lt),gi=Yt,dr=On,Yt=Qt,On=lt,Qt=gi.subtract(er.multiply(Qt)),lt=dr.subtract(er.multiply(lt));if(!On.isUnit())throw new Error(this.toString()+" and "+it.toString()+" are not co-prime");return Yt.compare(0)===-1&&(Yt=Yt.add(it)),this.isNegative()?Yt.negate():Yt},v.prototype.modInv=x.prototype.modInv=_.prototype.modInv,_.prototype.next=function(){var it=this.value;return this.sign?Le(it,1,this.sign):new _(oe(it,1),this.sign)},x.prototype.next=function(){var it=this.value;return it+1<i?new x(it+1):new _(s,!1)},v.prototype.next=function(){return new v(this.value+BigInt(1))},_.prototype.prev=function(){var it=this.value;return this.sign?new _(oe(it,1),!0):Le(it,1,this.sign)},x.prototype.prev=function(){var it=this.value;return it-1>-i?new x(it-1):new _(s,!0)},v.prototype.prev=function(){return new v(this.value-BigInt(1))};for(var Gn=[1];2*Gn[Gn.length-1]<=e;)Gn.push(2*Gn[Gn.length-1]);var En=Gn.length,At=Gn[En-1];function Un(it){return Math.abs(it)<=e}_.prototype.shiftLeft=function(it){var Yt=jr(it).toJSNumber();if(!Un(Yt))throw new Error(String(Yt)+" is too large for shifting.");if(Yt<0)return this.shiftRight(-Yt);var Qt=this;if(Qt.isZero())return Qt;for(;Yt>=En;)Qt=Qt.multiply(At),Yt-=En-1;return Qt.multiply(Gn[Yt])},v.prototype.shiftLeft=x.prototype.shiftLeft=_.prototype.shiftLeft,_.prototype.shiftRight=function(it){var Yt,Qt=jr(it).toJSNumber();if(!Un(Qt))throw new Error(String(Qt)+" is too large for shifting.");if(Qt<0)return this.shiftLeft(-Qt);for(var On=this;Qt>=En;){if(On.isZero()||On.isNegative()&&On.isUnit())return On;Yt=Ht(On,At),On=Yt[1].isNegative()?Yt[0].prev():Yt[0],Qt-=En-1}return Yt=Ht(On,Gn[Qt]),Yt[1].isNegative()?Yt[0].prev():Yt[0]},v.prototype.shiftRight=x.prototype.shiftRight=_.prototype.shiftRight;function Hr(it,Yt,Qt){Yt=jr(Yt);for(var On=it.isNegative(),lt=Yt.isNegative(),er=On?it.not():it,gi=lt?Yt.not():Yt,dr=0,xi=0,Ys=null,Ml=null,hl=[];!er.isZero()||!gi.isZero();)Ys=Ht(er,At),dr=Ys[1].toJSNumber(),On&&(dr=At-1-dr),Ml=Ht(gi,At),xi=Ml[1].toJSNumber(),lt&&(xi=At-1-xi),er=Ys[0],gi=Ml[0],hl.push(Qt(dr,xi));for(var Wc=Qt(On?1:0,lt?1:0)!==0?yI(-1):yI(0),Ed=hl.length-1;Ed>=0;Ed-=1)Wc=Wc.multiply(At).add(yI(hl[Ed]));return Wc}_.prototype.not=function(){return this.negate().prev()},v.prototype.not=x.prototype.not=_.prototype.not,_.prototype.and=function(it){return Hr(this,it,function(Yt,Qt){return Yt&Qt})},v.prototype.and=x.prototype.and=_.prototype.and,_.prototype.or=function(it){return Hr(this,it,function(Yt,Qt){return Yt|Qt})},v.prototype.or=x.prototype.or=_.prototype.or,_.prototype.xor=function(it){return Hr(this,it,function(Yt,Qt){return Yt^Qt})},v.prototype.xor=x.prototype.xor=_.prototype.xor;var Kr=1<<30,Ur=(e&-e)*(e&-e)|Kr;function Gi(it){var Yt=it.value,Qt=typeof Yt=="number"?Yt|Kr:typeof Yt=="bigint"?Yt|BigInt(Kr):Yt[0]+Yt[1]*e|Ur;return Qt&-Qt}function $i(it,Yt){if(Yt.compareTo(it)<=0){var Qt=$i(it,Yt.square(Yt)),On=Qt.p,lt=Qt.e,er=On.multiply(Yt);return er.compareTo(it)<=0?{p:er,e:lt*2+1}:{p:On,e:lt*2}}return{p:yI(1),e:0}}_.prototype.bitLength=function(){var it=this;return it.compareTo(yI(0))<0&&(it=it.negate().subtract(yI(1))),it.compareTo(yI(0))===0?yI(0):yI($i(it,yI(2)).e).add(yI(1))},v.prototype.bitLength=x.prototype.bitLength=_.prototype.bitLength;function Ta(it,Yt){return it=jr(it),Yt=jr(Yt),it.greater(Yt)?it:Yt}function Rt(it,Yt){return it=jr(it),Yt=jr(Yt),it.lesser(Yt)?it:Yt}function Fa(it,Yt){if(it=jr(it).abs(),Yt=jr(Yt).abs(),it.equals(Yt))return it;if(it.isZero())return Yt;if(Yt.isZero())return it;for(var Qt=h[1],On,lt;it.isEven()&&Yt.isEven();)On=Rt(Gi(it),Gi(Yt)),it=it.divide(On),Yt=Yt.divide(On),Qt=Qt.multiply(On);for(;it.isEven();)it=it.divide(Gi(it));do{for(;Yt.isEven();)Yt=Yt.divide(Gi(Yt));it.greater(Yt)&&(lt=Yt,Yt=it,it=lt),Yt=Yt.subtract(it)}while(!Yt.isZero());return Qt.isUnit()?it:it.multiply(Qt)}function ls(it,Yt){return it=jr(it).abs(),Yt=jr(Yt).abs(),it.divide(Fa(it,Yt)).multiply(Yt)}function Kl(it,Yt,Qt){it=jr(it),Yt=jr(Yt);var On=Qt||Math.random,lt=Rt(it,Yt),er=Ta(it,Yt),gi=er.subtract(lt).add(1);if(gi.isSmall)return lt.add(Math.floor(On()*gi));for(var dr=ws(gi,e).value,xi=[],Ys=!0,Ml=0;Ml<dr.length;Ml++){var hl=Ys?dr[Ml]+(Ml+1<dr.length?dr[Ml+1]/e:0):e,Wc=F(On()*hl);xi.push(Wc),Wc<dr[Ml]&&(Ys=!1)}return lt.add(h.fromArray(xi,e,!1))}var Fr=function(it,Yt,Qt,On){Qt=Qt||o,it=String(it),On||(it=it.toLowerCase(),Qt=Qt.toLowerCase());var lt=it.length,er,gi=Math.abs(Yt),dr={};for(er=0;er<Qt.length;er++)dr[Qt[er]]=er;for(er=0;er<lt;er++){var xi=it[er];if(xi!=="-"&&xi in dr&&dr[xi]>=gi){if(xi==="1"&&gi===1)continue;throw new Error(xi+" is not a valid digit in base "+Yt+".")}}Yt=jr(Yt);var Ys=[],Ml=it[0]==="-";for(er=Ml?1:0;er<it.length;er++){var xi=it[er];if(xi in dr)Ys.push(jr(dr[xi]));else if(xi==="<"){var hl=er;do er++;while(it[er]!==">"&&er<it.length);Ys.push(jr(it.slice(hl+1,er)))}else throw new Error(xi+" is not a valid character")}return Hi(Ys,Yt,Ml)};function Hi(it,Yt,Qt){var On=h[0],lt=h[1],er;for(er=it.length-1;er>=0;er--)On=On.add(it[er].times(lt)),lt=lt.times(Yt);return Qt?On.negate():On}function yo(it,Yt){return Yt=Yt||o,it<Yt.length?Yt[it]:"<"+it+">"}function ws(it,Yt){if(Yt=yI(Yt),Yt.isZero()){if(it.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(Yt.equals(-1)){if(it.isZero())return{value:[0],isNegative:!1};if(it.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-it.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var Qt=Array.apply(null,Array(it.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return Qt.unshift([1]),{value:[].concat.apply([],Qt),isNegative:!1}}var On=!1;if(it.isNegative()&&Yt.isPositive()&&(On=!0,it=it.abs()),Yt.isUnit())return it.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(it.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:On};for(var lt=[],er=it,gi;er.isNegative()||er.compareAbs(Yt)>=0;){gi=er.divmod(Yt),er=gi.quotient;var dr=gi.remainder;dr.isNegative()&&(dr=Yt.minus(dr).abs(),er=er.next()),lt.push(dr.toJSNumber())}return lt.push(er.toJSNumber()),{value:lt.reverse(),isNegative:On}}function Mr(it,Yt,Qt){var On=ws(it,Yt);return(On.isNegative?"-":"")+On.value.map(function(lt){return yo(lt,Qt)}).join("")}_.prototype.toArray=function(it){return ws(this,it)},x.prototype.toArray=function(it){return ws(this,it)},v.prototype.toArray=function(it){return ws(this,it)},_.prototype.toString=function(it,Yt){if(it===t&&(it=10),it!==10||Yt)return Mr(this,it,Yt);for(var Qt=this.value,On=Qt.length,lt=String(Qt[--On]),er="0000000",gi;--On>=0;)gi=String(Qt[On]),lt+=er.slice(gi.length)+gi;var dr=this.sign?"-":"";return dr+lt},x.prototype.toString=function(it,Yt){return it===t&&(it=10),it!=10||Yt?Mr(this,it,Yt):String(this.value)},v.prototype.toString=x.prototype.toString,v.prototype.toJSON=_.prototype.toJSON=x.prototype.toJSON=function(){return this.toString()},_.prototype.valueOf=function(){return parseInt(this.toString(),10)},_.prototype.toJSNumber=_.prototype.valueOf,x.prototype.valueOf=function(){return this.value},x.prototype.toJSNumber=x.prototype.valueOf,v.prototype.valueOf=v.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function Yi(it){if(T(+it)){var Yt=+it;if(Yt===F(Yt))return f?new v(BigInt(Yt)):new x(Yt);throw new Error("Invalid integer: "+it)}var Qt=it[0]==="-";Qt&&(it=it.slice(1));var On=it.split(/e/i);if(On.length>2)throw new Error("Invalid integer: "+On.join("e"));if(On.length===2){var lt=On[1];if(lt[0]==="+"&&(lt=lt.slice(1)),lt=+lt,lt!==F(lt)||!T(lt))throw new Error("Invalid integer: "+lt+" is not a valid exponent.");var er=On[0],gi=er.indexOf(".");if(gi>=0&&(lt-=er.length-gi-1,er=er.slice(0,gi)+er.slice(gi+1)),lt<0)throw new Error("Cannot include negative exponent part for integers");er+=new Array(lt+1).join("0"),it=er}var dr=/^([0-9][0-9]*)$/.test(it);if(!dr)throw new Error("Invalid integer: "+it);if(f)return new v(BigInt(Qt?"-"+it:it));for(var xi=[],Ys=it.length,Ml=n,hl=Ys-Ml;Ys>0;)xi.push(+it.slice(hl,Ys)),hl-=Ml,hl<0&&(hl=0),Ys-=Ml;return N(xi),new _(xi,Qt)}function Lr(it){if(f)return new v(BigInt(it));if(T(it)){if(it!==F(it))throw new Error(it+" is not an integer.");return new x(it)}return Yi(it.toString())}function jr(it){return typeof it=="number"?Lr(it):typeof it=="string"?Yi(it):typeof it=="bigint"?new v(it):it}for(var lr=0;lr<1e3;lr++)h[lr]=jr(lr),lr>0&&(h[-lr]=jr(-lr));return h.one=h[1],h.zero=h[0],h.minusOne=h[-1],h.max=Ta,h.min=Rt,h.gcd=Fa,h.lcm=ls,h.isInstance=function(it){return it instanceof _||it instanceof x||it instanceof v},h.randBetween=Kl,h.fromArray=function(it,Yt,Qt){return Hi(it.map(jr),jr(Yt||10),Qt)},h}();typeof GEt<"u"&&GEt.hasOwnProperty("exports")&&(GEt.exports=yI);typeof define=="function"&&define.amd&&define(function(){return yI})});var Jnr=le((n9a,Knr)=>{var m_e=qnr(),iFi=require("stream"),UEt;function sFi(){var t=3988292384,e,n,i;for(UEt=[],n=0;n<256;n++){for(e=n,i=0;i<8;i++)e=e&1?t^e>>>1:e=e>>>1;UEt[n]=e>>>0}}function Hnr(t,e){return UEt||sFi(),t.charCodeAt&&(t=t.charCodeAt(0)),m_e(e).shiftRight(8).and(16777215).xor(UEt[m_e(e).xor(t).and(255)]).value}function M8e(){if(!(this instanceof M8e))return new M8e;this.key0=305419896,this.key1=591751049,this.key2=878082192}M8e.prototype.update=function(t){this.key0=Hnr(t,this.key0),this.key1=m_e(this.key0).and(255).and(4294967295).add(this.key1),this.key1=m_e(this.key1).multiply(134775813).add(1).and(4294967295).value,this.key2=Hnr(m_e(this.key1).shiftRight(24).and(255),this.key2)};M8e.prototype.decryptByte=function(t){var e=m_e(this.key2).or(2);return t=t^m_e(e).multiply(m_e(e^1)).shiftRight(8).and(255),this.update(t),t};M8e.prototype.stream=function(){var t=iFi.Transform(),e=this;return t._transform=function(n,i,s){for(var o=0;o<n.length;o++)n[o]=e.decryptByte(n[o]);this.push(n),s()},t};Knr.exports=M8e});var Ynr=le((r9a,Xnr)=>{var aFi=i_e(),oFi=Jnr(),lFi=oEt(),$nr=require("stream"),cFi=require("zlib"),uFi=cEt(),fFi=uEt(),dFi=Cet();Xnr.exports=function(e,n,i,s,o){var f=lFi(),h=$nr.PassThrough(),_=e.stream(n,o);return _.pipe(f).on("error",function(x){h.emit("error",x)}),h.vars=f.pull(30).then(function(x){var v=dFi.parse(x,[["signature",4],["versionsNeededToExtract",2],["flags",2],["compressionMethod",2],["lastModifiedTime",2],["lastModifiedDate",2],["crc32",4],["compressedSize",4],["uncompressedSize",4],["fileNameLength",2],["extraFieldLength",2]]);return v.lastModifiedDateTime=fFi(v.lastModifiedDate,v.lastModifiedTime),f.pull(v.fileNameLength).then(function(T){return v.fileName=T.toString("utf8"),f.pull(v.extraFieldLength)}).then(function(T){var A;return v.extra=uFi(T,v),s&&s.compressedSize&&(v=s),v.flags&1&&(A=f.pull(12).then(function(w){if(!i)throw new Error("MISSING_PASSWORD");var N=oFi();String(i).split("").forEach(function(j){N.update(j)});for(var P=0;P<w.length;P++)w[P]=N.decryptByte(w[P]);v.decrypt=N,v.compressedSize-=12;var F=v.flags&8?v.lastModifiedTime>>8&255:v.crc32>>24&255;if(w[11]!==F)throw new Error("BAD_PASSWORD");return v})),aFi.resolve(A).then(function(){return h.emit("vars",v),v})})}),h.vars.then(function(x){var v=!(x.flags&8)||x.compressedSize>0,T,A=x.compressionMethod?cFi.createInflateRaw():$nr.PassThrough();v?(h.size=x.uncompressedSize,T=x.compressedSize):(T=Buffer.alloc(4),T.writeUInt32LE(134695760,0));var w=f.stream(T);x.decrypt&&(w=w.pipe(x.decrypt.stream())),w.pipe(A).on("error",function(N){h.emit("error",N)}).pipe(h).on("finish",function(){_.destroy?_.destroy():_.abort?_.abort():_.close?_.close():_.push?_.push():console.log("warning - unable to close stream")})}).catch(function(x){h.emit("error",x)}),h}});var err=le((i9a,Znr)=>{var Yet=oEt(),pFi=Ynr(),Xet=i_e(),hFi=lEt(),mFi=cEt(),fcn=require("path"),_Fi=ccn().Writer,gFi=uEt(),Qet=Cet(),Qnr=Buffer.alloc(4);Qnr.writeUInt32LE(101010256,0);function xFi(t){var e=t.stream(0).pipe(Yet());return e.pull(4).then(function(n){var i=n.readUInt32LE(0);if(i===875721283){var s;return e.pull(12).then(function(o){s=Qet.parse(o,[["version",4],["pubKeyLength",4],["signatureLength",4]])}).then(function(){return e.pull(s.pubKeyLength+s.signatureLength)}).then(function(o){return s.publicKey=o.slice(0,s.pubKeyLength),s.signature=o.slice(s.pubKeyLength),s.size=16+s.pubKeyLength+s.signatureLength,s})}})}function yFi(t,e){var n=Qet.parse(e,[["signature",4],["diskNumber",4],["offsetToStartOfCentralDirectory",8],["numberOfDisks",4]]);if(n.signature!=117853008)throw new Error("invalid zip64 end of central dir locator signature (0x07064b50): 0x"+n.signature.toString(16));var i=Yet();return t.stream(n.offsetToStartOfCentralDirectory).pipe(i),i.pull(56)}function vFi(t){var e=Qet.parse(t,[["signature",4],["sizeOfCentralDirectory",8],["version",2],["versionsNeededToExtract",2],["diskNumber",4],["diskStart",4],["numberOfRecordsOnDisk",8],["numberOfRecords",8],["sizeOfCentralDirectory",8],["offsetToStartOfCentralDirectory",8]]);if(e.signature!=101075792)throw new Error("invalid zip64 end of central dir locator signature (0x06064b50): 0x0"+e.signature.toString(16));return e}Znr.exports=function(e,n){var i=Yet(),s=Yet(),o=n&&n.tailSize||80,f,h,_,x;return n&&n.crx&&(h=xFi(e)),e.size().then(function(v){return f=v,e.stream(Math.max(0,v-o)).on("error",function(T){i.emit("error",T)}).pipe(i),i.pull(Qnr)}).then(function(){return Xet.props({directory:i.pull(22),crxHeader:h})}).then(function(v){var T=v.directory;if(_=v.crxHeader&&v.crxHeader.size||0,x=Qet.parse(T,[["signature",4],["diskNumber",2],["diskStart",2],["numberOfRecordsOnDisk",2],["numberOfRecords",2],["sizeOfCentralDirectory",4],["offsetToStartOfCentralDirectory",4],["commentLength",2]]),x.numberOfRecords==65535||x.numberOfRecords==65535||x.offsetToStartOfCentralDirectory==4294967295){let w=f-(o-i.match+20),N=Yet();return e.stream(w).pipe(N),N.pull(20).then(function(P){return yFi(e,P)}).then(function(P){x=vFi(P)})}else x.offsetToStartOfCentralDirectory+=_}).then(function(){if(x.commentLength)return i.pull(x.commentLength).then(function(v){x.comment=v.toString("utf8")})}).then(function(){return e.stream(x.offsetToStartOfCentralDirectory).pipe(s),x.extract=function(v){if(!v||!v.path)throw new Error("PATH_MISSING");return v.path=fcn.resolve(fcn.normalize(v.path)),x.files.then(function(T){return Xet.map(T,function(A){if(A.type!="Directory"){var w=fcn.join(v.path,A.path);if(w.indexOf(v.path)==0){var N=v.getWriter?v.getWriter({path:w}):_Fi({path:w});return new Xet(function(P,F){A.stream(v.password).on("error",F).pipe(N).on("close",P).on("error",F)})}}},{concurrency:v.concurrency>1?v.concurrency:1})})},x.files=Xet.mapSeries(Array(x.numberOfRecords),function(){return s.pull(46).then(function(v){var T=T=Qet.parse(v,[["signature",4],["versionMadeBy",2],["versionsNeededToExtract",2],["flags",2],["compressionMethod",2],["lastModifiedTime",2],["lastModifiedDate",2],["crc32",4],["compressedSize",4],["uncompressedSize",4],["fileNameLength",2],["extraFieldLength",2],["fileCommentLength",2],["diskNumber",2],["internalFileAttributes",2],["externalFileAttributes",4],["offsetToLocalFileHeader",4]]);return T.offsetToLocalFileHeader+=_,T.lastModifiedDateTime=gFi(T.lastModifiedDate,T.lastModifiedTime),s.pull(T.fileNameLength).then(function(A){return T.pathBuffer=A,T.path=A.toString("utf8"),T.isUnicode=(T.flags&2048)!=0,s.pull(T.extraFieldLength)}).then(function(A){return T.extra=mFi(A,T),s.pull(T.fileCommentLength)}).then(function(A){T.comment=A,T.type=T.uncompressedSize===0&&/[\/\\]$/.test(T.path)?"Directory":"File";var w=n&&n.padding||1e3;return T.stream=function(N){var P=30+w+(T.extraFieldLength||0)+(T.fileNameLength||0)+T.compressedSize;return pFi(e,T.offsetToLocalFileHeader,N,T,P)},T.buffer=function(N){return hFi(T.stream(N))},T})})}),Xet.props(x)})}});var rrr=le((s9a,nrr)=>{var trr=qee(),VEt=i_e(),Zet=err(),bFi=require("stream");nrr.exports={buffer:function(t,e){var n={stream:function(i,s){var o=bFi.PassThrough(),f=s?i+s:void 0;return o.end(t.slice(i,f)),o},size:function(){return VEt.resolve(t.length)}};return Zet(n,e)},file:function(t,e){var n={stream:function(i,s){var o=s?i+s:void 0;return trr.createReadStream(t,{start:i,end:o})},size:function(){return new VEt(function(i,s){trr.stat(t,function(o,f){o?s(o):i(f.size)})})}};return Zet(n,e)},url:function(t,e,n){if(typeof e=="string"&&(e={url:e}),!e.url)throw"URL missing";e.headers=e.headers||{};var i={stream:function(s,o){var f=Object.create(e),h=o?s+o:"";return f.headers=Object.create(e.headers),f.headers.range="bytes="+s+"-"+h,t(f)},size:function(){return new VEt(function(s,o){var f=t(e);f.on("response",function(h){f.abort(),h.headers["content-length"]?s(h.headers["content-length"]):o(new Error("Missing content length header"))}).on("error",o)})}};return Zet(i,n)},s3:function(t,e,n){var i={size:function(){return new VEt(function(s,o){t.headObject(e,function(f,h){f?o(f):s(h.ContentLength)})})},stream:function(s,o){var f={};for(var h in e)f[h]=e[h];var _=o?s+o:"";return f.Range="bytes="+s+"-"+_,t.getObject(f).createReadStream()}};return Zet(i,n)},custom:function(t,e){return Zet(t,e)}}});var irr=le(ett=>{"use strict";ett.Parse=fEt();ett.ParseOne=Zer();ett.Extract=Vnr();ett.Open=rrr()});var EFi,dcn,pcn,srr,Kee,arr,orr,lrr,crr,urr=Ct(()=>{"use strict";EFi=Ho(XHn(),1);gJn();dcn=Ho(xYn(),1),pcn=Ho(yQn(),1),srr=Ho(irr(),1),Kee=require("node:fs/promises"),arr=async(t,e)=>{await(0,Kee.access)(t,Kee.constants.F_OK).catch(()=>{throw new Error(`[Archiver]: source ${t} does not exist`)}),await(0,Kee.access)(e,Kee.constants.F_OK).catch(()=>(0,Kee.mkdir)(e,{recursive:!0}))},orr=async(t,e)=>(await arr(t,e),dcn.x({file:t,cwd:e})),lrr=async(t,e)=>(await arr(t,e),await srr.default.Open.file(t).then(n=>n.extract({path:e,concurrency:5})),e),crr=async t=>{let e=pcn.pack();for(let{name:s,data:o}of Object.values(t))e.entry({name:s},o);e.finalize();let n=[];return e.on("data",s=>n.push(s)),await new Promise((s,o)=>{e.on("end",s),e.on("error",o)}),Buffer.from(_Jn.gzip(Buffer.concat(n)))}});async function Jee(t){let{source:e,throwOnNotFound:n=!1}=t,i=await(0,frr.readFile)((0,drr.join)(e,".codemodrc.json"),{encoding:"utf-8"}).catch(()=>null);if(i===null){let o=`Could not locate the .codemodrc.json file at ${e}`;if(n)throw new Error(o);return{config:null,error:o}}let s;try{s=vme(JSON.parse(i))}catch{let f=`Failed to parse the .codemodrc.json file at ${e}`;if(n)throw new Error(f);return{config:null,error:f}}return{config:s,error:null}}async function hle(t){let{source:e,throwOnNotFound:n}=t,{config:i,error:s}=await Jee({source:e,throwOnNotFound:!1});if(i===null){if(n)throw new Error(s);return{path:null,error:s}}let o;switch(i.engine){case"ast-grep":o="**/rule.yaml";break;default:o="src/index.{ts,js}";break}let f=i.entry?`Make sure the entry point path under ${F2("entry")} key is correct in .codemodrc.json`:`Could not find an entry point under ${F2(o)}. Either create it or provide a path at ${F2("entry")} key in .codemodrc.json`,_=(await n3(i.entry??o,{absolute:!0,cwd:e,nodir:!0})).at(0)??null;if(_===null){if(n)throw new Error(f);return{path:null,error:f}}return{path:_,error:null}}var frr,drr,prr=Ct(()=>{"use strict";frr=require("node:fs/promises"),drr=require("node:path");Ame();vQe();e1t()});var hrr=Ct(()=>{"use strict"});var mrr=Ct(()=>{"use strict"});var _rr=Ct(()=>{"use strict"});var grr,xrr,pN,yrr,hcn=Ct(()=>{"use strict";grr=require("node:child_process"),xrr=require("node:util"),pN=(0,xrr.promisify)(grr.exec),yrr=async t=>{let e=t(),{done:n}=await e.next();return n}});async function qEt(t,e=!1){let n=null,i=null;try{let{stdout:o}=await pN("git rev-parse --show-toplevel",{cwd:t}),f=o.trim();if(f.length&&(i=f,e))return{rootPath:i}}catch{}if(i===null){let o=t;for(;;){try{await(0,cJ.access)((0,nAe.join)(o,".git"),cJ.constants.R_OK|cJ.constants.W_OK);let h=(0,nAe.join)(o,"package.json");await(0,cJ.access)(h,cJ.constants.R_OK|cJ.constants.W_OK),i=o}catch{}if(i){if(e)return{rootPath:i};break}let f=(0,nAe.dirname)(o);if(f===o)break;o=f}}let s=t;for(;;){for(let f of Object.keys(vrr))try{await(0,cJ.access)((0,nAe.join)(s,f),cJ.constants.R_OK|cJ.constants.W_OK),n=vrr[f],i===null&&(i=s);break}catch{}if(i){if(e)return{rootPath:i};break}let o=(0,nAe.dirname)(s);if(o===s)break;s=o}return{rootPath:i,detectedPackageManager:n}}var cJ,nAe,vrr,brr=Ct(()=>{"use strict";cJ=require("node:fs/promises"),nAe=require("node:path");hcn();vrr={"package-lock.json":"npm","yarn.lock":"yarn","pnpm-lock.yaml":"pnpm","bun.lockb":"bun"}});var SFi,ttt,Err,mcn=Ct(()=>{"use strict";lR();SFi=M_({engine:Lf("jscodeshift"),parser:ky([Lf("babel"),Lf("babylon"),Lf("flow"),Lf("ts"),Lf("tsx")])}),ttt=ky([SFi]),Err=t=>{let e=oR(ttt,t);return e.success?e.output:null}});var Srr,_cn,gcn,Trr,xcn,Drr,ntt,rAe,Arr,Crr=Ct(()=>{"use strict";lR();n1t();vQe();mcn();Srr=M_({$schema:Zd(ep()),path:ep(),source:ky([Lf("local"),Lf("remote")]),type:ky([Lf("standalone"),Lf("package")]),safeArgumentRecord:Zd(t1t,{}),engineOptions:Zd(eQe(ttt),null)}),_cn=M_({...Srr.entries,...M_({config:ctn}).entries}),gcn=M_({...Srr.entries,...M_({config:utn,codemods:Zd(mI(_cn),[])}).entries}),Trr=ky([_cn,gcn]),xcn=t=>oR(_cn,t),Drr=t=>oR(gcn,t),ntt=t=>men(gcn,t),rAe=t=>ZO(Trr,t),Arr=t=>oR(Trr,t)});var wrr=Ct(()=>{"use strict"});var T9a,D9a,Irr=Ct(()=>{"use strict";lR();T9a=M_({codemodSource:ep(),codemodEngine:ky([Lf("jscodeshift"),Lf("ts-morph"),Lf("workflow")]),codemodArguments:Zd(ep()),repoUrl:Zd(ep()),branch:Zd(ep()),persistent:Zd(L2())}),D9a=M_({jobId:ep()})});var uL=Ct(()=>{"use strict";vBn();Rjn();vHn();urr();prr();hrr();mrr();e1t();_rr();hcn();brr();Gen();n1t();vQe();Crr();mcn();wrr();Irr()});var TFi,Prr,Nrr=Ct(()=>{"use strict";lR();uL();TFi=ky([M_({kind:Lf("initialization"),path:ep(),codemodSource:ep(),engine:ky([Lf("jscodeshift"),Lf("ts-morph"),Lf("ast-grep"),Lf("workflow")]),format:L2(),safeArgumentRecord:t1t,engineOptions:eQe(ttt)}),M_({kind:Lf("exit")}),M_({kind:Lf("runCodemod"),path:ep(),data:ep()})]),Prr=t=>ZO(TFi,t)});var krr=Ct(()=>{"use strict"});var DFi,Rrr,Orr=Ct(()=>{"use strict";lR();yen();DFi=ky([M_({kind:Lf("commands"),commands:xen(),path:Zd(ep())}),M_({kind:Lf("error"),message:ep(),path:Zd(ep())}),M_({kind:Lf("console"),consoleKind:yBn,message:ep()})]),Rrr=t=>ZO(DFi,t)});var RC=Ct(()=>{"use strict";aR();n5n();cBn();mBn();yen();Nrr();krr();Orr()});var mle,rtt=Ct(()=>{mle="0.18.10"});var Lrr,Mrr,ycn,uJ,vcn,oWa,itt=Ct(()=>{"use strict";Lrr=Ho(require("node:os"),1),Mrr=require("node:path");RC();ycn=process.stdout.write,uJ=(0,Mrr.join)(Lrr.homedir(),".codemod"),vcn=Ii.green("\u2714"),oWa=Ii.red("\u2716")});var bcn,F8e,Ecn,HEt,KEt,Scn=Ct(()=>{"use strict";bcn=Ho(require("node:fs"),1),F8e=Ho(require("node:os"),1),Ecn=require("node:path");RC();uL();rtt();itt();HEt=(0,Ecn.join)(uJ,"logs"),KEt=async t=>{let{prefix:e,content:n,fatal:i}=t,s=(0,Ecn.join)(HEt,`${i?"FATAL-":""}${new Date().toISOString()}-error.log`),o=`- CLI version: ${mle}
677
+ Unsupported type: `+t.type,"ENOTSUP");t._finish()})};uU.prototype._stat=function(t){var e=this,n=e.props,i=n.follow?"stat":"lstat",s=e._proxy||e;t?o(null,t):cU[i](e._path,o);function o(f,h){if(e.filter&&!e.filter.call(s,s,h)){e._aborted=!0,e.emit("end"),e.emit("close");return}if(f||!h)return lcn(e);e._old=h;var _=Mnr(h);if(_!==e.type||e.type==="File"&&h.nlink>1)return V3i(e._path,function(x){if(x)return e.error(x);e._old=null,lcn(e)});lcn(e)}};function lcn(t){q3i($et.dirname(t._path),uU.dirmode,function(e,n){return e?t.error(e):(t._madeDir=n,t._create())})}function Bnr(t,e,n,i,s){var o=e.mode,f=e.follow||t.type!=="SymbolicLink"?"chmod":"lchmod";if(!cU[f]||typeof o!="number")return s();var h=n.mode&parseInt("0777",8);if(o=o&parseInt("0777",8),o===h)return s();cU[f](i,o,s)}function Wnr(t,e,n,i,s){if(process.platform==="win32"||!process.getuid||process.getuid()!==0||typeof e.uid!="number"&&typeof e.gid!="number"||n.uid===e.uid&&n.gid===e.gid)return s();var o=t.props.follow||t.type!=="SymbolicLink"?"chown":"lchown";if(!cU[o])return s();typeof e.uid!="number"&&(e.uid=n.uid),typeof e.gid!="number"&&(e.gid=n.gid),cU[o](i,e.uid,e.gid,s)}function jnr(t,e,n,i,s){if(!cU.utimes||process.platform==="win32")return s();var o=e.follow||t.type!=="SymbolicLink"?"utimes":"lutimes";if(o==="lutimes"&&!cU[o]&&(o="utimes"),!cU[o])return s();var f=n.atime,h=n.mtime,_=e.atime,x=e.mtime;if(_===void 0&&(_=f),x===void 0&&(x=h),Onr(_)||(_=new Date(_)),Onr(x)||(_=new Date(x)),_.getTime()===f.getTime()&&x.getTime()===h.getTime())return s();cU[o](i,_,x,s)}uU.prototype._finish=function(){var t=this;if(t._finishing)return;t._finishing=!0;var e=0,n=null,i=!1;if(t._old)t._old.atime=new Date(0),t._old.mtime=new Date(0),o(t._old);else{var s=t.props.follow?"stat":"lstat";cU[s](t._path,function(h,_){if(h)if(h.code==="ENOENT"&&(t.type==="Link"||t.type==="SymbolicLink")&&process.platform==="win32"){t.ready=!0,t.emit("ready"),t.emit("end"),t.emit("close"),t.end=t._finish=function(){};return}else return t.error(h);o(t._old=_)})}return;function o(h){e+=3,Bnr(t,t.props,h,t._path,f("chmod")),Wnr(t,t.props,h,t._path,f("chown")),jnr(t,t.props,h,t._path,f("utimes"))}function f(h){return function(_){if(n)return;if(_)return _.fstream_finish_call=h,t.error(n=_);if(--e>0||i)return;if(i=!0,t._madeDir)znr(t,t._path,x);else return x();function x(v){if(v)return v.fstream_finish_call="setupMadeDir",t.error(v);t.emit("end"),t.emit("close")}}}};function znr(t,e,n){var i=t._madeDir,s=$et.dirname(e);X3i(t,s,function(o){if(o)return n(o);if(s===i)return n();znr(t,s,n)})}function X3i(t,e,n){var i={};Object.keys(t.props).forEach(function(h){i[h]=t.props[h],h==="mode"&&t.type!=="Directory"&&(i[h]=i[h]|parseInt("0111",8))});var s=3,o=null;cU.stat(e,function(h,_){if(h)return n(o=h);Bnr(t,i,_,e,f),Wnr(t,i,_,e,f),jnr(t,i,_,e,f)});function f(h){if(!o){if(h)return n(o=h);if(--s===0)return n()}}}uU.prototype.pipe=function(){this.error("Can't pipe from writable stream")};uU.prototype.add=function(){this.error("Can't add to non-Directory type")};uU.prototype.write=function(){return!0};function Y3i(t){return Object.prototype.toString.call(t)}function Onr(t){return typeof t=="object"&&Y3i(t)==="[object Date]"}});var ccn=le(Ax=>{Ax.Abstract=SEt();Ax.Reader=JDe();Ax.Writer=L8e();Ax.File={Reader:Sln(),Writer:scn()};Ax.Dir={Reader:Eln(),Writer:rcn()};Ax.Link={Reader:vln(),Writer:icn()};Ax.Proxy={Reader:Dln(),Writer:ocn()};Ax.Reader.Dir=Ax.DirReader=Ax.Dir.Reader;Ax.Reader.File=Ax.FileReader=Ax.File.Reader;Ax.Reader.Link=Ax.LinkReader=Ax.Link.Reader;Ax.Reader.Proxy=Ax.ProxyReader=Ax.Proxy.Reader;Ax.Writer.Dir=Ax.DirWriter=Ax.Dir.Writer;Ax.Writer.File=Ax.FileWriter=Ax.File.Writer;Ax.Writer.Link=Ax.LinkWriter=Ax.Link.Writer;Ax.Writer.Proxy=Ax.ProxyWriter=Ax.Proxy.Writer;Ax.collect=WEt()});var Vnr=le((e9a,Unr)=>{Unr.exports=rFi;var Q3i=fEt(),Z3i=ccn().Writer,ucn=require("path"),eFi=require("stream"),tFi=dln(),nFi=i_e();function rFi(t){t.path=ucn.resolve(ucn.normalize(t.path));var e=new Q3i(t),n=new eFi.Writable({objectMode:!0});n._write=function(s,o,f){if(s.type=="Directory")return f();var h=ucn.join(t.path,s.path.replace(/\\/g,"/"));if(h.indexOf(t.path)!=0)return f();let _=t.getWriter?t.getWriter({path:h}):Z3i({path:h});s.pipe(_).on("error",f).on("close",f)};var i=tFi(e,n);return e.once("crx-header",function(s){i.crxHeader=s}),e.pipe(n).on("finish",function(){i.emit("close")}),i.promise=function(){return new nFi(function(s,o){i.on("close",s),i.on("error",o)})},i}});var qnr=le((t9a,GEt)=>{var yI=function(t){"use strict";var e=1e7,n=7,i=9007199254740992,s=A(i),o="0123456789abcdefghijklmnopqrstuvwxyz",f=typeof BigInt=="function";function h(it,Yt,Qt,On){return typeof it>"u"?h[0]:typeof Yt<"u"?+Yt==10&&!Qt?jr(it):Fr(it,Yt,Qt,On):jr(it)}function _(it,Yt){this.value=it,this.sign=Yt,this.isSmall=!1}_.prototype=Object.create(h.prototype);function x(it){this.value=it,this.sign=it<0,this.isSmall=!0}x.prototype=Object.create(h.prototype);function v(it){this.value=it}v.prototype=Object.create(h.prototype);function T(it){return-i<it&&it<i}function A(it){return it<1e7?[it]:it<1e14?[it%1e7,Math.floor(it/1e7)]:[it%1e7,Math.floor(it/1e7)%1e7,Math.floor(it/1e14)]}function w(it){N(it);var Yt=it.length;if(Yt<4&&tn(it,s)<0)switch(Yt){case 0:return 0;case 1:return it[0];case 2:return it[0]+it[1]*e;default:return it[0]+(it[1]+it[2]*e)*e}return it}function N(it){for(var Yt=it.length;it[--Yt]===0;);it.length=Yt+1}function P(it){for(var Yt=new Array(it),Qt=-1;++Qt<it;)Yt[Qt]=0;return Yt}function F(it){return it>0?Math.floor(it):Math.ceil(it)}function j(it,Yt){var Qt=it.length,On=Yt.length,lt=new Array(Qt),er=0,gi=e,dr,xi;for(xi=0;xi<On;xi++)dr=it[xi]+Yt[xi]+er,er=dr>=gi?1:0,lt[xi]=dr-er*gi;for(;xi<Qt;)dr=it[xi]+er,er=dr===gi?1:0,lt[xi++]=dr-er*gi;return er>0&&lt.push(er),lt}function X(it,Yt){return it.length>=Yt.length?j(it,Yt):j(Yt,it)}function oe(it,Yt){var Qt=it.length,On=new Array(Qt),lt=e,er,gi;for(gi=0;gi<Qt;gi++)er=it[gi]-lt+Yt,Yt=Math.floor(er/lt),On[gi]=er-Yt*lt,Yt+=1;for(;Yt>0;)On[gi++]=Yt%lt,Yt=Math.floor(Yt/lt);return On}_.prototype.add=function(it){var Yt=jr(it);if(this.sign!==Yt.sign)return this.subtract(Yt.negate());var Qt=this.value,On=Yt.value;return Yt.isSmall?new _(oe(Qt,Math.abs(On)),this.sign):new _(X(Qt,On),this.sign)},_.prototype.plus=_.prototype.add,x.prototype.add=function(it){var Yt=jr(it),Qt=this.value;if(Qt<0!==Yt.sign)return this.subtract(Yt.negate());var On=Yt.value;if(Yt.isSmall){if(T(Qt+On))return new x(Qt+On);On=A(Math.abs(On))}return new _(oe(On,Math.abs(Qt)),Qt<0)},x.prototype.plus=x.prototype.add,v.prototype.add=function(it){return new v(this.value+jr(it).value)},v.prototype.plus=v.prototype.add;function ee(it,Yt){var Qt=it.length,On=Yt.length,lt=new Array(Qt),er=0,gi=e,dr,xi;for(dr=0;dr<On;dr++)xi=it[dr]-er-Yt[dr],xi<0?(xi+=gi,er=1):er=0,lt[dr]=xi;for(dr=On;dr<Qt;dr++){if(xi=it[dr]-er,xi<0)xi+=gi;else{lt[dr++]=xi;break}lt[dr]=xi}for(;dr<Qt;dr++)lt[dr]=it[dr];return N(lt),lt}function ge(it,Yt,Qt){var On;return tn(it,Yt)>=0?On=ee(it,Yt):(On=ee(Yt,it),Qt=!Qt),On=w(On),typeof On=="number"?(Qt&&(On=-On),new x(On)):new _(On,Qt)}function Le(it,Yt,Qt){var On=it.length,lt=new Array(On),er=-Yt,gi=e,dr,xi;for(dr=0;dr<On;dr++)xi=it[dr]+er,er=Math.floor(xi/gi),xi%=gi,lt[dr]=xi<0?xi+gi:xi;return lt=w(lt),typeof lt=="number"?(Qt&&(lt=-lt),new x(lt)):new _(lt,Qt)}_.prototype.subtract=function(it){var Yt=jr(it);if(this.sign!==Yt.sign)return this.add(Yt.negate());var Qt=this.value,On=Yt.value;return Yt.isSmall?Le(Qt,Math.abs(On),this.sign):ge(Qt,On,this.sign)},_.prototype.minus=_.prototype.subtract,x.prototype.subtract=function(it){var Yt=jr(it),Qt=this.value;if(Qt<0!==Yt.sign)return this.add(Yt.negate());var On=Yt.value;return Yt.isSmall?new x(Qt-On):Le(On,Math.abs(Qt),Qt>=0)},x.prototype.minus=x.prototype.subtract,v.prototype.subtract=function(it){return new v(this.value-jr(it).value)},v.prototype.minus=v.prototype.subtract,_.prototype.negate=function(){return new _(this.value,!this.sign)},x.prototype.negate=function(){var it=this.sign,Yt=new x(-this.value);return Yt.sign=!it,Yt},v.prototype.negate=function(){return new v(-this.value)},_.prototype.abs=function(){return new _(this.value,!1)},x.prototype.abs=function(){return new x(Math.abs(this.value))},v.prototype.abs=function(){return new v(this.value>=0?this.value:-this.value)};function xe(it,Yt){var Qt=it.length,On=Yt.length,lt=Qt+On,er=P(lt),gi=e,dr,xi,Ys,Ml,hl;for(Ys=0;Ys<Qt;++Ys){Ml=it[Ys];for(var Wc=0;Wc<On;++Wc)hl=Yt[Wc],dr=Ml*hl+er[Ys+Wc],xi=Math.floor(dr/gi),er[Ys+Wc]=dr-xi*gi,er[Ys+Wc+1]+=xi}return N(er),er}function Se(it,Yt){var Qt=it.length,On=new Array(Qt),lt=e,er=0,gi,dr;for(dr=0;dr<Qt;dr++)gi=it[dr]*Yt+er,er=Math.floor(gi/lt),On[dr]=gi-er*lt;for(;er>0;)On[dr++]=er%lt,er=Math.floor(er/lt);return On}function Ve(it,Yt){for(var Qt=[];Yt-- >0;)Qt.push(0);return Qt.concat(it)}function Xe(it,Yt){var Qt=Math.max(it.length,Yt.length);if(Qt<=30)return xe(it,Yt);Qt=Math.ceil(Qt/2);var On=it.slice(Qt),lt=it.slice(0,Qt),er=Yt.slice(Qt),gi=Yt.slice(0,Qt),dr=Xe(lt,gi),xi=Xe(On,er),Ys=Xe(X(lt,On),X(gi,er)),Ml=X(X(dr,Ve(ee(ee(Ys,dr),xi),Qt)),Ve(xi,2*Qt));return N(Ml),Ml}function Ne(it,Yt){return-.012*it-.012*Yt+15e-6*it*Yt>0}_.prototype.multiply=function(it){var Yt=jr(it),Qt=this.value,On=Yt.value,lt=this.sign!==Yt.sign,er;if(Yt.isSmall){if(On===0)return h[0];if(On===1)return this;if(On===-1)return this.negate();if(er=Math.abs(On),er<e)return new _(Se(Qt,er),lt);On=A(er)}return Ne(Qt.length,On.length)?new _(Xe(Qt,On),lt):new _(xe(Qt,On),lt)},_.prototype.times=_.prototype.multiply;function tt(it,Yt,Qt){return it<e?new _(Se(Yt,it),Qt):new _(xe(Yt,A(it)),Qt)}x.prototype._multiplyBySmall=function(it){return T(it.value*this.value)?new x(it.value*this.value):tt(Math.abs(it.value),A(Math.abs(this.value)),this.sign!==it.sign)},_.prototype._multiplyBySmall=function(it){return it.value===0?h[0]:it.value===1?this:it.value===-1?this.negate():tt(Math.abs(it.value),this.value,this.sign!==it.sign)},x.prototype.multiply=function(it){return jr(it)._multiplyBySmall(this)},x.prototype.times=x.prototype.multiply,v.prototype.multiply=function(it){return new v(this.value*jr(it).value)},v.prototype.times=v.prototype.multiply;function zt(it){var Yt=it.length,Qt=P(Yt+Yt),On=e,lt,er,gi,dr,xi;for(gi=0;gi<Yt;gi++){dr=it[gi],er=0-dr*dr;for(var Ys=gi;Ys<Yt;Ys++)xi=it[Ys],lt=2*(dr*xi)+Qt[gi+Ys]+er,er=Math.floor(lt/On),Qt[gi+Ys]=lt-er*On;Qt[gi+Yt]=er}return N(Qt),Qt}_.prototype.square=function(){return new _(zt(this.value),!1)},x.prototype.square=function(){var it=this.value*this.value;return T(it)?new x(it):new _(zt(A(Math.abs(this.value))),!1)},v.prototype.square=function(it){return new v(this.value*this.value)};function yt(it,Yt){var Qt=it.length,On=Yt.length,lt=e,er=P(Yt.length),gi=Yt[On-1],dr=Math.ceil(lt/(2*gi)),xi=Se(it,dr),Ys=Se(Yt,dr),Ml,hl,Wc,Ed,rp,Cf,cs;for(xi.length<=Qt&&xi.push(0),Ys.push(0),gi=Ys[On-1],hl=Qt-On;hl>=0;hl--){for(Ml=lt-1,xi[hl+On]!==gi&&(Ml=Math.floor((xi[hl+On]*lt+xi[hl+On-1])/gi)),Wc=0,Ed=0,Cf=Ys.length,rp=0;rp<Cf;rp++)Wc+=Ml*Ys[rp],cs=Math.floor(Wc/lt),Ed+=xi[hl+rp]-(Wc-cs*lt),Wc=cs,Ed<0?(xi[hl+rp]=Ed+lt,Ed=-1):(xi[hl+rp]=Ed,Ed=0);for(;Ed!==0;){for(Ml-=1,Wc=0,rp=0;rp<Cf;rp++)Wc+=xi[hl+rp]-lt+Ys[rp],Wc<0?(xi[hl+rp]=Wc+lt,Wc=0):(xi[hl+rp]=Wc,Wc=1);Ed+=Wc}er[hl]=Ml}return xi=dt(xi,dr)[0],[w(er),w(xi)]}function nn(it,Yt){for(var Qt=it.length,On=Yt.length,lt=[],er=[],gi=e,dr,xi,Ys,Ml,hl;Qt;){if(er.unshift(it[--Qt]),N(er),tn(er,Yt)<0){lt.push(0);continue}xi=er.length,Ys=er[xi-1]*gi+er[xi-2],Ml=Yt[On-1]*gi+Yt[On-2],xi>On&&(Ys=(Ys+1)*gi),dr=Math.ceil(Ys/Ml);do{if(hl=Se(Yt,dr),tn(hl,er)<=0)break;dr--}while(dr);lt.push(dr),er=ee(er,hl)}return lt.reverse(),[w(lt),w(er)]}function dt(it,Yt){var Qt=it.length,On=P(Qt),lt=e,er,gi,dr,xi;for(dr=0,er=Qt-1;er>=0;--er)xi=dr*lt+it[er],gi=F(xi/Yt),dr=xi-gi*Yt,On[er]=gi|0;return[On,dr|0]}function Ht(it,Yt){var Qt,On=jr(Yt);if(f)return[new v(it.value/On.value),new v(it.value%On.value)];var lt=it.value,er=On.value,gi;if(er===0)throw new Error("Cannot divide by zero");if(it.isSmall)return On.isSmall?[new x(F(lt/er)),new x(lt%er)]:[h[0],it];if(On.isSmall){if(er===1)return[it,h[0]];if(er==-1)return[it.negate(),h[0]];var dr=Math.abs(er);if(dr<e){Qt=dt(lt,dr),gi=w(Qt[0]);var xi=Qt[1];return it.sign&&(xi=-xi),typeof gi=="number"?(it.sign!==On.sign&&(gi=-gi),[new x(gi),new x(xi)]):[new _(gi,it.sign!==On.sign),new x(xi)]}er=A(dr)}var Ys=tn(lt,er);if(Ys===-1)return[h[0],it];if(Ys===0)return[h[it.sign===On.sign?1:-1],h[0]];lt.length+er.length<=200?Qt=yt(lt,er):Qt=nn(lt,er),gi=Qt[0];var Ml=it.sign!==On.sign,hl=Qt[1],Wc=it.sign;return typeof gi=="number"?(Ml&&(gi=-gi),gi=new x(gi)):gi=new _(gi,Ml),typeof hl=="number"?(Wc&&(hl=-hl),hl=new x(hl)):hl=new _(hl,Wc),[gi,hl]}_.prototype.divmod=function(it){var Yt=Ht(this,it);return{quotient:Yt[0],remainder:Yt[1]}},v.prototype.divmod=x.prototype.divmod=_.prototype.divmod,_.prototype.divide=function(it){return Ht(this,it)[0]},v.prototype.over=v.prototype.divide=function(it){return new v(this.value/jr(it).value)},x.prototype.over=x.prototype.divide=_.prototype.over=_.prototype.divide,_.prototype.mod=function(it){return Ht(this,it)[1]},v.prototype.mod=v.prototype.remainder=function(it){return new v(this.value%jr(it).value)},x.prototype.remainder=x.prototype.mod=_.prototype.remainder=_.prototype.mod,_.prototype.pow=function(it){var Yt=jr(it),Qt=this.value,On=Yt.value,lt,er,gi;if(On===0)return h[1];if(Qt===0)return h[0];if(Qt===1)return h[1];if(Qt===-1)return Yt.isEven()?h[1]:h[-1];if(Yt.sign)return h[0];if(!Yt.isSmall)throw new Error("The exponent "+Yt.toString()+" is too large.");if(this.isSmall&&T(lt=Math.pow(Qt,On)))return new x(F(lt));for(er=this,gi=h[1];On&!0&&(gi=gi.times(er),--On),On!==0;)On/=2,er=er.square();return gi},x.prototype.pow=_.prototype.pow,v.prototype.pow=function(it){var Yt=jr(it),Qt=this.value,On=Yt.value,lt=BigInt(0),er=BigInt(1),gi=BigInt(2);if(On===lt)return h[1];if(Qt===lt)return h[0];if(Qt===er)return h[1];if(Qt===BigInt(-1))return Yt.isEven()?h[1]:h[-1];if(Yt.isNegative())return new v(lt);for(var dr=this,xi=h[1];(On&er)===er&&(xi=xi.times(dr),--On),On!==lt;)On/=gi,dr=dr.square();return xi},_.prototype.modPow=function(it,Yt){if(it=jr(it),Yt=jr(Yt),Yt.isZero())throw new Error("Cannot take modPow with modulus 0");var Qt=h[1],On=this.mod(Yt);for(it.isNegative()&&(it=it.multiply(h[-1]),On=On.modInv(Yt));it.isPositive();){if(On.isZero())return h[0];it.isOdd()&&(Qt=Qt.multiply(On).mod(Yt)),it=it.divide(2),On=On.square().mod(Yt)}return Qt},v.prototype.modPow=x.prototype.modPow=_.prototype.modPow;function tn(it,Yt){if(it.length!==Yt.length)return it.length>Yt.length?1:-1;for(var Qt=it.length-1;Qt>=0;Qt--)if(it[Qt]!==Yt[Qt])return it[Qt]>Yt[Qt]?1:-1;return 0}_.prototype.compareAbs=function(it){var Yt=jr(it),Qt=this.value,On=Yt.value;return Yt.isSmall?1:tn(Qt,On)},x.prototype.compareAbs=function(it){var Yt=jr(it),Qt=Math.abs(this.value),On=Yt.value;return Yt.isSmall?(On=Math.abs(On),Qt===On?0:Qt>On?1:-1):-1},v.prototype.compareAbs=function(it){var Yt=this.value,Qt=jr(it).value;return Yt=Yt>=0?Yt:-Yt,Qt=Qt>=0?Qt:-Qt,Yt===Qt?0:Yt>Qt?1:-1},_.prototype.compare=function(it){if(it===1/0)return-1;if(it===-1/0)return 1;var Yt=jr(it),Qt=this.value,On=Yt.value;return this.sign!==Yt.sign?Yt.sign?1:-1:Yt.isSmall?this.sign?-1:1:tn(Qt,On)*(this.sign?-1:1)},_.prototype.compareTo=_.prototype.compare,x.prototype.compare=function(it){if(it===1/0)return-1;if(it===-1/0)return 1;var Yt=jr(it),Qt=this.value,On=Yt.value;return Yt.isSmall?Qt==On?0:Qt>On?1:-1:Qt<0!==Yt.sign?Qt<0?-1:1:Qt<0?1:-1},x.prototype.compareTo=x.prototype.compare,v.prototype.compare=function(it){if(it===1/0)return-1;if(it===-1/0)return 1;var Yt=this.value,Qt=jr(it).value;return Yt===Qt?0:Yt>Qt?1:-1},v.prototype.compareTo=v.prototype.compare,_.prototype.equals=function(it){return this.compare(it)===0},v.prototype.eq=v.prototype.equals=x.prototype.eq=x.prototype.equals=_.prototype.eq=_.prototype.equals,_.prototype.notEquals=function(it){return this.compare(it)!==0},v.prototype.neq=v.prototype.notEquals=x.prototype.neq=x.prototype.notEquals=_.prototype.neq=_.prototype.notEquals,_.prototype.greater=function(it){return this.compare(it)>0},v.prototype.gt=v.prototype.greater=x.prototype.gt=x.prototype.greater=_.prototype.gt=_.prototype.greater,_.prototype.lesser=function(it){return this.compare(it)<0},v.prototype.lt=v.prototype.lesser=x.prototype.lt=x.prototype.lesser=_.prototype.lt=_.prototype.lesser,_.prototype.greaterOrEquals=function(it){return this.compare(it)>=0},v.prototype.geq=v.prototype.greaterOrEquals=x.prototype.geq=x.prototype.greaterOrEquals=_.prototype.geq=_.prototype.greaterOrEquals,_.prototype.lesserOrEquals=function(it){return this.compare(it)<=0},v.prototype.leq=v.prototype.lesserOrEquals=x.prototype.leq=x.prototype.lesserOrEquals=_.prototype.leq=_.prototype.lesserOrEquals,_.prototype.isEven=function(){return(this.value[0]&1)===0},x.prototype.isEven=function(){return(this.value&1)===0},v.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},_.prototype.isOdd=function(){return(this.value[0]&1)===1},x.prototype.isOdd=function(){return(this.value&1)===1},v.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},_.prototype.isPositive=function(){return!this.sign},x.prototype.isPositive=function(){return this.value>0},v.prototype.isPositive=x.prototype.isPositive,_.prototype.isNegative=function(){return this.sign},x.prototype.isNegative=function(){return this.value<0},v.prototype.isNegative=x.prototype.isNegative,_.prototype.isUnit=function(){return!1},x.prototype.isUnit=function(){return Math.abs(this.value)===1},v.prototype.isUnit=function(){return this.abs().value===BigInt(1)},_.prototype.isZero=function(){return!1},x.prototype.isZero=function(){return this.value===0},v.prototype.isZero=function(){return this.value===BigInt(0)},_.prototype.isDivisibleBy=function(it){var Yt=jr(it);return Yt.isZero()?!1:Yt.isUnit()?!0:Yt.compareAbs(2)===0?this.isEven():this.mod(Yt).isZero()},v.prototype.isDivisibleBy=x.prototype.isDivisibleBy=_.prototype.isDivisibleBy;function Or(it){var Yt=it.abs();if(Yt.isUnit())return!1;if(Yt.equals(2)||Yt.equals(3)||Yt.equals(5))return!0;if(Yt.isEven()||Yt.isDivisibleBy(3)||Yt.isDivisibleBy(5))return!1;if(Yt.lesser(49))return!0}function Kt(it,Yt){for(var Qt=it.prev(),On=Qt,lt=0,er,gi,dr,xi;On.isEven();)On=On.divide(2),lt++;e:for(dr=0;dr<Yt.length;dr++)if(!it.lesser(Yt[dr])&&(xi=yI(Yt[dr]).modPow(On,it),!(xi.isUnit()||xi.equals(Qt)))){for(er=lt-1;er!=0;er--){if(xi=xi.square().mod(it),xi.isUnit())return!1;if(xi.equals(Qt))continue e}return!1}return!0}_.prototype.isPrime=function(it){var Yt=Or(this);if(Yt!==t)return Yt;var Qt=this.abs(),On=Qt.bitLength();if(On<=64)return Kt(Qt,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var lt=Math.log(2)*On.toJSNumber(),er=Math.ceil(it===!0?2*Math.pow(lt,2):lt),gi=[],dr=0;dr<er;dr++)gi.push(yI(dr+2));return Kt(Qt,gi)},v.prototype.isPrime=x.prototype.isPrime=_.prototype.isPrime,_.prototype.isProbablePrime=function(it,Yt){var Qt=Or(this);if(Qt!==t)return Qt;for(var On=this.abs(),lt=it===t?5:it,er=[],gi=0;gi<lt;gi++)er.push(yI.randBetween(2,On.minus(2),Yt));return Kt(On,er)},v.prototype.isProbablePrime=x.prototype.isProbablePrime=_.prototype.isProbablePrime,_.prototype.modInv=function(it){for(var Yt=yI.zero,Qt=yI.one,On=jr(it),lt=this.abs(),er,gi,dr;!lt.isZero();)er=On.divide(lt),gi=Yt,dr=On,Yt=Qt,On=lt,Qt=gi.subtract(er.multiply(Qt)),lt=dr.subtract(er.multiply(lt));if(!On.isUnit())throw new Error(this.toString()+" and "+it.toString()+" are not co-prime");return Yt.compare(0)===-1&&(Yt=Yt.add(it)),this.isNegative()?Yt.negate():Yt},v.prototype.modInv=x.prototype.modInv=_.prototype.modInv,_.prototype.next=function(){var it=this.value;return this.sign?Le(it,1,this.sign):new _(oe(it,1),this.sign)},x.prototype.next=function(){var it=this.value;return it+1<i?new x(it+1):new _(s,!1)},v.prototype.next=function(){return new v(this.value+BigInt(1))},_.prototype.prev=function(){var it=this.value;return this.sign?new _(oe(it,1),!0):Le(it,1,this.sign)},x.prototype.prev=function(){var it=this.value;return it-1>-i?new x(it-1):new _(s,!0)},v.prototype.prev=function(){return new v(this.value-BigInt(1))};for(var Gn=[1];2*Gn[Gn.length-1]<=e;)Gn.push(2*Gn[Gn.length-1]);var En=Gn.length,At=Gn[En-1];function Un(it){return Math.abs(it)<=e}_.prototype.shiftLeft=function(it){var Yt=jr(it).toJSNumber();if(!Un(Yt))throw new Error(String(Yt)+" is too large for shifting.");if(Yt<0)return this.shiftRight(-Yt);var Qt=this;if(Qt.isZero())return Qt;for(;Yt>=En;)Qt=Qt.multiply(At),Yt-=En-1;return Qt.multiply(Gn[Yt])},v.prototype.shiftLeft=x.prototype.shiftLeft=_.prototype.shiftLeft,_.prototype.shiftRight=function(it){var Yt,Qt=jr(it).toJSNumber();if(!Un(Qt))throw new Error(String(Qt)+" is too large for shifting.");if(Qt<0)return this.shiftLeft(-Qt);for(var On=this;Qt>=En;){if(On.isZero()||On.isNegative()&&On.isUnit())return On;Yt=Ht(On,At),On=Yt[1].isNegative()?Yt[0].prev():Yt[0],Qt-=En-1}return Yt=Ht(On,Gn[Qt]),Yt[1].isNegative()?Yt[0].prev():Yt[0]},v.prototype.shiftRight=x.prototype.shiftRight=_.prototype.shiftRight;function Hr(it,Yt,Qt){Yt=jr(Yt);for(var On=it.isNegative(),lt=Yt.isNegative(),er=On?it.not():it,gi=lt?Yt.not():Yt,dr=0,xi=0,Ys=null,Ml=null,hl=[];!er.isZero()||!gi.isZero();)Ys=Ht(er,At),dr=Ys[1].toJSNumber(),On&&(dr=At-1-dr),Ml=Ht(gi,At),xi=Ml[1].toJSNumber(),lt&&(xi=At-1-xi),er=Ys[0],gi=Ml[0],hl.push(Qt(dr,xi));for(var Wc=Qt(On?1:0,lt?1:0)!==0?yI(-1):yI(0),Ed=hl.length-1;Ed>=0;Ed-=1)Wc=Wc.multiply(At).add(yI(hl[Ed]));return Wc}_.prototype.not=function(){return this.negate().prev()},v.prototype.not=x.prototype.not=_.prototype.not,_.prototype.and=function(it){return Hr(this,it,function(Yt,Qt){return Yt&Qt})},v.prototype.and=x.prototype.and=_.prototype.and,_.prototype.or=function(it){return Hr(this,it,function(Yt,Qt){return Yt|Qt})},v.prototype.or=x.prototype.or=_.prototype.or,_.prototype.xor=function(it){return Hr(this,it,function(Yt,Qt){return Yt^Qt})},v.prototype.xor=x.prototype.xor=_.prototype.xor;var Kr=1<<30,Ur=(e&-e)*(e&-e)|Kr;function Gi(it){var Yt=it.value,Qt=typeof Yt=="number"?Yt|Kr:typeof Yt=="bigint"?Yt|BigInt(Kr):Yt[0]+Yt[1]*e|Ur;return Qt&-Qt}function $i(it,Yt){if(Yt.compareTo(it)<=0){var Qt=$i(it,Yt.square(Yt)),On=Qt.p,lt=Qt.e,er=On.multiply(Yt);return er.compareTo(it)<=0?{p:er,e:lt*2+1}:{p:On,e:lt*2}}return{p:yI(1),e:0}}_.prototype.bitLength=function(){var it=this;return it.compareTo(yI(0))<0&&(it=it.negate().subtract(yI(1))),it.compareTo(yI(0))===0?yI(0):yI($i(it,yI(2)).e).add(yI(1))},v.prototype.bitLength=x.prototype.bitLength=_.prototype.bitLength;function Ta(it,Yt){return it=jr(it),Yt=jr(Yt),it.greater(Yt)?it:Yt}function Rt(it,Yt){return it=jr(it),Yt=jr(Yt),it.lesser(Yt)?it:Yt}function Fa(it,Yt){if(it=jr(it).abs(),Yt=jr(Yt).abs(),it.equals(Yt))return it;if(it.isZero())return Yt;if(Yt.isZero())return it;for(var Qt=h[1],On,lt;it.isEven()&&Yt.isEven();)On=Rt(Gi(it),Gi(Yt)),it=it.divide(On),Yt=Yt.divide(On),Qt=Qt.multiply(On);for(;it.isEven();)it=it.divide(Gi(it));do{for(;Yt.isEven();)Yt=Yt.divide(Gi(Yt));it.greater(Yt)&&(lt=Yt,Yt=it,it=lt),Yt=Yt.subtract(it)}while(!Yt.isZero());return Qt.isUnit()?it:it.multiply(Qt)}function ls(it,Yt){return it=jr(it).abs(),Yt=jr(Yt).abs(),it.divide(Fa(it,Yt)).multiply(Yt)}function Kl(it,Yt,Qt){it=jr(it),Yt=jr(Yt);var On=Qt||Math.random,lt=Rt(it,Yt),er=Ta(it,Yt),gi=er.subtract(lt).add(1);if(gi.isSmall)return lt.add(Math.floor(On()*gi));for(var dr=ws(gi,e).value,xi=[],Ys=!0,Ml=0;Ml<dr.length;Ml++){var hl=Ys?dr[Ml]+(Ml+1<dr.length?dr[Ml+1]/e:0):e,Wc=F(On()*hl);xi.push(Wc),Wc<dr[Ml]&&(Ys=!1)}return lt.add(h.fromArray(xi,e,!1))}var Fr=function(it,Yt,Qt,On){Qt=Qt||o,it=String(it),On||(it=it.toLowerCase(),Qt=Qt.toLowerCase());var lt=it.length,er,gi=Math.abs(Yt),dr={};for(er=0;er<Qt.length;er++)dr[Qt[er]]=er;for(er=0;er<lt;er++){var xi=it[er];if(xi!=="-"&&xi in dr&&dr[xi]>=gi){if(xi==="1"&&gi===1)continue;throw new Error(xi+" is not a valid digit in base "+Yt+".")}}Yt=jr(Yt);var Ys=[],Ml=it[0]==="-";for(er=Ml?1:0;er<it.length;er++){var xi=it[er];if(xi in dr)Ys.push(jr(dr[xi]));else if(xi==="<"){var hl=er;do er++;while(it[er]!==">"&&er<it.length);Ys.push(jr(it.slice(hl+1,er)))}else throw new Error(xi+" is not a valid character")}return Hi(Ys,Yt,Ml)};function Hi(it,Yt,Qt){var On=h[0],lt=h[1],er;for(er=it.length-1;er>=0;er--)On=On.add(it[er].times(lt)),lt=lt.times(Yt);return Qt?On.negate():On}function yo(it,Yt){return Yt=Yt||o,it<Yt.length?Yt[it]:"<"+it+">"}function ws(it,Yt){if(Yt=yI(Yt),Yt.isZero()){if(it.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(Yt.equals(-1)){if(it.isZero())return{value:[0],isNegative:!1};if(it.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-it.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var Qt=Array.apply(null,Array(it.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return Qt.unshift([1]),{value:[].concat.apply([],Qt),isNegative:!1}}var On=!1;if(it.isNegative()&&Yt.isPositive()&&(On=!0,it=it.abs()),Yt.isUnit())return it.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(it.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:On};for(var lt=[],er=it,gi;er.isNegative()||er.compareAbs(Yt)>=0;){gi=er.divmod(Yt),er=gi.quotient;var dr=gi.remainder;dr.isNegative()&&(dr=Yt.minus(dr).abs(),er=er.next()),lt.push(dr.toJSNumber())}return lt.push(er.toJSNumber()),{value:lt.reverse(),isNegative:On}}function Mr(it,Yt,Qt){var On=ws(it,Yt);return(On.isNegative?"-":"")+On.value.map(function(lt){return yo(lt,Qt)}).join("")}_.prototype.toArray=function(it){return ws(this,it)},x.prototype.toArray=function(it){return ws(this,it)},v.prototype.toArray=function(it){return ws(this,it)},_.prototype.toString=function(it,Yt){if(it===t&&(it=10),it!==10||Yt)return Mr(this,it,Yt);for(var Qt=this.value,On=Qt.length,lt=String(Qt[--On]),er="0000000",gi;--On>=0;)gi=String(Qt[On]),lt+=er.slice(gi.length)+gi;var dr=this.sign?"-":"";return dr+lt},x.prototype.toString=function(it,Yt){return it===t&&(it=10),it!=10||Yt?Mr(this,it,Yt):String(this.value)},v.prototype.toString=x.prototype.toString,v.prototype.toJSON=_.prototype.toJSON=x.prototype.toJSON=function(){return this.toString()},_.prototype.valueOf=function(){return parseInt(this.toString(),10)},_.prototype.toJSNumber=_.prototype.valueOf,x.prototype.valueOf=function(){return this.value},x.prototype.toJSNumber=x.prototype.valueOf,v.prototype.valueOf=v.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function Yi(it){if(T(+it)){var Yt=+it;if(Yt===F(Yt))return f?new v(BigInt(Yt)):new x(Yt);throw new Error("Invalid integer: "+it)}var Qt=it[0]==="-";Qt&&(it=it.slice(1));var On=it.split(/e/i);if(On.length>2)throw new Error("Invalid integer: "+On.join("e"));if(On.length===2){var lt=On[1];if(lt[0]==="+"&&(lt=lt.slice(1)),lt=+lt,lt!==F(lt)||!T(lt))throw new Error("Invalid integer: "+lt+" is not a valid exponent.");var er=On[0],gi=er.indexOf(".");if(gi>=0&&(lt-=er.length-gi-1,er=er.slice(0,gi)+er.slice(gi+1)),lt<0)throw new Error("Cannot include negative exponent part for integers");er+=new Array(lt+1).join("0"),it=er}var dr=/^([0-9][0-9]*)$/.test(it);if(!dr)throw new Error("Invalid integer: "+it);if(f)return new v(BigInt(Qt?"-"+it:it));for(var xi=[],Ys=it.length,Ml=n,hl=Ys-Ml;Ys>0;)xi.push(+it.slice(hl,Ys)),hl-=Ml,hl<0&&(hl=0),Ys-=Ml;return N(xi),new _(xi,Qt)}function Lr(it){if(f)return new v(BigInt(it));if(T(it)){if(it!==F(it))throw new Error(it+" is not an integer.");return new x(it)}return Yi(it.toString())}function jr(it){return typeof it=="number"?Lr(it):typeof it=="string"?Yi(it):typeof it=="bigint"?new v(it):it}for(var lr=0;lr<1e3;lr++)h[lr]=jr(lr),lr>0&&(h[-lr]=jr(-lr));return h.one=h[1],h.zero=h[0],h.minusOne=h[-1],h.max=Ta,h.min=Rt,h.gcd=Fa,h.lcm=ls,h.isInstance=function(it){return it instanceof _||it instanceof x||it instanceof v},h.randBetween=Kl,h.fromArray=function(it,Yt,Qt){return Hi(it.map(jr),jr(Yt||10),Qt)},h}();typeof GEt<"u"&&GEt.hasOwnProperty("exports")&&(GEt.exports=yI);typeof define=="function"&&define.amd&&define(function(){return yI})});var Jnr=le((n9a,Knr)=>{var m_e=qnr(),iFi=require("stream"),UEt;function sFi(){var t=3988292384,e,n,i;for(UEt=[],n=0;n<256;n++){for(e=n,i=0;i<8;i++)e=e&1?t^e>>>1:e=e>>>1;UEt[n]=e>>>0}}function Hnr(t,e){return UEt||sFi(),t.charCodeAt&&(t=t.charCodeAt(0)),m_e(e).shiftRight(8).and(16777215).xor(UEt[m_e(e).xor(t).and(255)]).value}function M8e(){if(!(this instanceof M8e))return new M8e;this.key0=305419896,this.key1=591751049,this.key2=878082192}M8e.prototype.update=function(t){this.key0=Hnr(t,this.key0),this.key1=m_e(this.key0).and(255).and(4294967295).add(this.key1),this.key1=m_e(this.key1).multiply(134775813).add(1).and(4294967295).value,this.key2=Hnr(m_e(this.key1).shiftRight(24).and(255),this.key2)};M8e.prototype.decryptByte=function(t){var e=m_e(this.key2).or(2);return t=t^m_e(e).multiply(m_e(e^1)).shiftRight(8).and(255),this.update(t),t};M8e.prototype.stream=function(){var t=iFi.Transform(),e=this;return t._transform=function(n,i,s){for(var o=0;o<n.length;o++)n[o]=e.decryptByte(n[o]);this.push(n),s()},t};Knr.exports=M8e});var Ynr=le((r9a,Xnr)=>{var aFi=i_e(),oFi=Jnr(),lFi=oEt(),$nr=require("stream"),cFi=require("zlib"),uFi=cEt(),fFi=uEt(),dFi=Cet();Xnr.exports=function(e,n,i,s,o){var f=lFi(),h=$nr.PassThrough(),_=e.stream(n,o);return _.pipe(f).on("error",function(x){h.emit("error",x)}),h.vars=f.pull(30).then(function(x){var v=dFi.parse(x,[["signature",4],["versionsNeededToExtract",2],["flags",2],["compressionMethod",2],["lastModifiedTime",2],["lastModifiedDate",2],["crc32",4],["compressedSize",4],["uncompressedSize",4],["fileNameLength",2],["extraFieldLength",2]]);return v.lastModifiedDateTime=fFi(v.lastModifiedDate,v.lastModifiedTime),f.pull(v.fileNameLength).then(function(T){return v.fileName=T.toString("utf8"),f.pull(v.extraFieldLength)}).then(function(T){var A;return v.extra=uFi(T,v),s&&s.compressedSize&&(v=s),v.flags&1&&(A=f.pull(12).then(function(w){if(!i)throw new Error("MISSING_PASSWORD");var N=oFi();String(i).split("").forEach(function(j){N.update(j)});for(var P=0;P<w.length;P++)w[P]=N.decryptByte(w[P]);v.decrypt=N,v.compressedSize-=12;var F=v.flags&8?v.lastModifiedTime>>8&255:v.crc32>>24&255;if(w[11]!==F)throw new Error("BAD_PASSWORD");return v})),aFi.resolve(A).then(function(){return h.emit("vars",v),v})})}),h.vars.then(function(x){var v=!(x.flags&8)||x.compressedSize>0,T,A=x.compressionMethod?cFi.createInflateRaw():$nr.PassThrough();v?(h.size=x.uncompressedSize,T=x.compressedSize):(T=Buffer.alloc(4),T.writeUInt32LE(134695760,0));var w=f.stream(T);x.decrypt&&(w=w.pipe(x.decrypt.stream())),w.pipe(A).on("error",function(N){h.emit("error",N)}).pipe(h).on("finish",function(){_.destroy?_.destroy():_.abort?_.abort():_.close?_.close():_.push?_.push():console.log("warning - unable to close stream")})}).catch(function(x){h.emit("error",x)}),h}});var err=le((i9a,Znr)=>{var Yet=oEt(),pFi=Ynr(),Xet=i_e(),hFi=lEt(),mFi=cEt(),fcn=require("path"),_Fi=ccn().Writer,gFi=uEt(),Qet=Cet(),Qnr=Buffer.alloc(4);Qnr.writeUInt32LE(101010256,0);function xFi(t){var e=t.stream(0).pipe(Yet());return e.pull(4).then(function(n){var i=n.readUInt32LE(0);if(i===875721283){var s;return e.pull(12).then(function(o){s=Qet.parse(o,[["version",4],["pubKeyLength",4],["signatureLength",4]])}).then(function(){return e.pull(s.pubKeyLength+s.signatureLength)}).then(function(o){return s.publicKey=o.slice(0,s.pubKeyLength),s.signature=o.slice(s.pubKeyLength),s.size=16+s.pubKeyLength+s.signatureLength,s})}})}function yFi(t,e){var n=Qet.parse(e,[["signature",4],["diskNumber",4],["offsetToStartOfCentralDirectory",8],["numberOfDisks",4]]);if(n.signature!=117853008)throw new Error("invalid zip64 end of central dir locator signature (0x07064b50): 0x"+n.signature.toString(16));var i=Yet();return t.stream(n.offsetToStartOfCentralDirectory).pipe(i),i.pull(56)}function vFi(t){var e=Qet.parse(t,[["signature",4],["sizeOfCentralDirectory",8],["version",2],["versionsNeededToExtract",2],["diskNumber",4],["diskStart",4],["numberOfRecordsOnDisk",8],["numberOfRecords",8],["sizeOfCentralDirectory",8],["offsetToStartOfCentralDirectory",8]]);if(e.signature!=101075792)throw new Error("invalid zip64 end of central dir locator signature (0x06064b50): 0x0"+e.signature.toString(16));return e}Znr.exports=function(e,n){var i=Yet(),s=Yet(),o=n&&n.tailSize||80,f,h,_,x;return n&&n.crx&&(h=xFi(e)),e.size().then(function(v){return f=v,e.stream(Math.max(0,v-o)).on("error",function(T){i.emit("error",T)}).pipe(i),i.pull(Qnr)}).then(function(){return Xet.props({directory:i.pull(22),crxHeader:h})}).then(function(v){var T=v.directory;if(_=v.crxHeader&&v.crxHeader.size||0,x=Qet.parse(T,[["signature",4],["diskNumber",2],["diskStart",2],["numberOfRecordsOnDisk",2],["numberOfRecords",2],["sizeOfCentralDirectory",4],["offsetToStartOfCentralDirectory",4],["commentLength",2]]),x.numberOfRecords==65535||x.numberOfRecords==65535||x.offsetToStartOfCentralDirectory==4294967295){let w=f-(o-i.match+20),N=Yet();return e.stream(w).pipe(N),N.pull(20).then(function(P){return yFi(e,P)}).then(function(P){x=vFi(P)})}else x.offsetToStartOfCentralDirectory+=_}).then(function(){if(x.commentLength)return i.pull(x.commentLength).then(function(v){x.comment=v.toString("utf8")})}).then(function(){return e.stream(x.offsetToStartOfCentralDirectory).pipe(s),x.extract=function(v){if(!v||!v.path)throw new Error("PATH_MISSING");return v.path=fcn.resolve(fcn.normalize(v.path)),x.files.then(function(T){return Xet.map(T,function(A){if(A.type!="Directory"){var w=fcn.join(v.path,A.path);if(w.indexOf(v.path)==0){var N=v.getWriter?v.getWriter({path:w}):_Fi({path:w});return new Xet(function(P,F){A.stream(v.password).on("error",F).pipe(N).on("close",P).on("error",F)})}}},{concurrency:v.concurrency>1?v.concurrency:1})})},x.files=Xet.mapSeries(Array(x.numberOfRecords),function(){return s.pull(46).then(function(v){var T=T=Qet.parse(v,[["signature",4],["versionMadeBy",2],["versionsNeededToExtract",2],["flags",2],["compressionMethod",2],["lastModifiedTime",2],["lastModifiedDate",2],["crc32",4],["compressedSize",4],["uncompressedSize",4],["fileNameLength",2],["extraFieldLength",2],["fileCommentLength",2],["diskNumber",2],["internalFileAttributes",2],["externalFileAttributes",4],["offsetToLocalFileHeader",4]]);return T.offsetToLocalFileHeader+=_,T.lastModifiedDateTime=gFi(T.lastModifiedDate,T.lastModifiedTime),s.pull(T.fileNameLength).then(function(A){return T.pathBuffer=A,T.path=A.toString("utf8"),T.isUnicode=(T.flags&2048)!=0,s.pull(T.extraFieldLength)}).then(function(A){return T.extra=mFi(A,T),s.pull(T.fileCommentLength)}).then(function(A){T.comment=A,T.type=T.uncompressedSize===0&&/[\/\\]$/.test(T.path)?"Directory":"File";var w=n&&n.padding||1e3;return T.stream=function(N){var P=30+w+(T.extraFieldLength||0)+(T.fileNameLength||0)+T.compressedSize;return pFi(e,T.offsetToLocalFileHeader,N,T,P)},T.buffer=function(N){return hFi(T.stream(N))},T})})}),Xet.props(x)})}});var rrr=le((s9a,nrr)=>{var trr=qee(),VEt=i_e(),Zet=err(),bFi=require("stream");nrr.exports={buffer:function(t,e){var n={stream:function(i,s){var o=bFi.PassThrough(),f=s?i+s:void 0;return o.end(t.slice(i,f)),o},size:function(){return VEt.resolve(t.length)}};return Zet(n,e)},file:function(t,e){var n={stream:function(i,s){var o=s?i+s:void 0;return trr.createReadStream(t,{start:i,end:o})},size:function(){return new VEt(function(i,s){trr.stat(t,function(o,f){o?s(o):i(f.size)})})}};return Zet(n,e)},url:function(t,e,n){if(typeof e=="string"&&(e={url:e}),!e.url)throw"URL missing";e.headers=e.headers||{};var i={stream:function(s,o){var f=Object.create(e),h=o?s+o:"";return f.headers=Object.create(e.headers),f.headers.range="bytes="+s+"-"+h,t(f)},size:function(){return new VEt(function(s,o){var f=t(e);f.on("response",function(h){f.abort(),h.headers["content-length"]?s(h.headers["content-length"]):o(new Error("Missing content length header"))}).on("error",o)})}};return Zet(i,n)},s3:function(t,e,n){var i={size:function(){return new VEt(function(s,o){t.headObject(e,function(f,h){f?o(f):s(h.ContentLength)})})},stream:function(s,o){var f={};for(var h in e)f[h]=e[h];var _=o?s+o:"";return f.Range="bytes="+s+"-"+_,t.getObject(f).createReadStream()}};return Zet(i,n)},custom:function(t,e){return Zet(t,e)}}});var irr=le(ett=>{"use strict";ett.Parse=fEt();ett.ParseOne=Zer();ett.Extract=Vnr();ett.Open=rrr()});var EFi,dcn,pcn,srr,Kee,arr,orr,lrr,crr,urr=Ct(()=>{"use strict";EFi=Ho(XHn(),1);gJn();dcn=Ho(xYn(),1),pcn=Ho(yQn(),1),srr=Ho(irr(),1),Kee=require("node:fs/promises"),arr=async(t,e)=>{await(0,Kee.access)(t,Kee.constants.F_OK).catch(()=>{throw new Error(`[Archiver]: source ${t} does not exist`)}),await(0,Kee.access)(e,Kee.constants.F_OK).catch(()=>(0,Kee.mkdir)(e,{recursive:!0}))},orr=async(t,e)=>(await arr(t,e),dcn.x({file:t,cwd:e})),lrr=async(t,e)=>(await arr(t,e),await srr.default.Open.file(t).then(n=>n.extract({path:e,concurrency:5})),e),crr=async t=>{let e=pcn.pack();for(let{name:s,data:o}of Object.values(t))e.entry({name:s},o);e.finalize();let n=[];return e.on("data",s=>n.push(s)),await new Promise((s,o)=>{e.on("end",s),e.on("error",o)}),Buffer.from(_Jn.gzip(Buffer.concat(n)))}});async function Jee(t){let{source:e,throwOnNotFound:n=!1}=t,i=await(0,frr.readFile)((0,drr.join)(e,".codemodrc.json"),{encoding:"utf-8"}).catch(()=>null);if(i===null){let o=`Could not locate the .codemodrc.json file at ${e}`;if(n)throw new Error(o);return{config:null,error:o}}let s;try{s=vme(JSON.parse(i))}catch{let f=`Failed to parse the .codemodrc.json file at ${e}`;if(n)throw new Error(f);return{config:null,error:f}}return{config:s,error:null}}async function hle(t){let{source:e,throwOnNotFound:n}=t,{config:i,error:s}=await Jee({source:e,throwOnNotFound:!1});if(i===null){if(n)throw new Error(s);return{path:null,error:s}}let o;switch(i.engine){case"ast-grep":o="**/rule.yaml";break;default:o="src/index.{ts,js}";break}let f=i.entry?`Make sure the entry point path under ${F2("entry")} key is correct in .codemodrc.json`:`Could not find an entry point under ${F2(o)}. Either create it or provide a path at ${F2("entry")} key in .codemodrc.json`,_=(await n3(i.entry??o,{absolute:!0,cwd:e,nodir:!0})).at(0)??null;if(_===null){if(n)throw new Error(f);return{path:null,error:f}}return{path:_,error:null}}var frr,drr,prr=Ct(()=>{"use strict";frr=require("node:fs/promises"),drr=require("node:path");Ame();vQe();e1t()});var hrr=Ct(()=>{"use strict"});var mrr=Ct(()=>{"use strict"});var _rr=Ct(()=>{"use strict"});var grr,xrr,pN,yrr,hcn=Ct(()=>{"use strict";grr=require("node:child_process"),xrr=require("node:util"),pN=(0,xrr.promisify)(grr.exec),yrr=async t=>{let e=t(),{done:n}=await e.next();return n}});async function qEt(t,e=!1){let n=null,i=null;try{let{stdout:o}=await pN("git rev-parse --show-toplevel",{cwd:t}),f=o.trim();if(f.length&&(i=f,e))return{rootPath:i}}catch{}if(i===null){let o=t;for(;;){try{await(0,cJ.access)((0,nAe.join)(o,".git"),cJ.constants.R_OK|cJ.constants.W_OK);let h=(0,nAe.join)(o,"package.json");await(0,cJ.access)(h,cJ.constants.R_OK|cJ.constants.W_OK),i=o}catch{}if(i){if(e)return{rootPath:i};break}let f=(0,nAe.dirname)(o);if(f===o)break;o=f}}let s=t;for(;;){for(let f of Object.keys(vrr))try{await(0,cJ.access)((0,nAe.join)(s,f),cJ.constants.R_OK|cJ.constants.W_OK),n=vrr[f],i===null&&(i=s);break}catch{}if(i){if(e)return{rootPath:i};break}let o=(0,nAe.dirname)(s);if(o===s)break;s=o}return{rootPath:i,detectedPackageManager:n}}var cJ,nAe,vrr,brr=Ct(()=>{"use strict";cJ=require("node:fs/promises"),nAe=require("node:path");hcn();vrr={"package-lock.json":"npm","yarn.lock":"yarn","pnpm-lock.yaml":"pnpm","bun.lockb":"bun"}});var SFi,ttt,Err,mcn=Ct(()=>{"use strict";lR();SFi=M_({engine:Lf("jscodeshift"),parser:ky([Lf("babel"),Lf("babylon"),Lf("flow"),Lf("ts"),Lf("tsx")])}),ttt=ky([SFi]),Err=t=>{let e=oR(ttt,t);return e.success?e.output:null}});var Srr,_cn,gcn,Trr,xcn,Drr,ntt,rAe,Arr,Crr=Ct(()=>{"use strict";lR();n1t();vQe();mcn();Srr=M_({$schema:Zd(ep()),path:ep(),source:ky([Lf("local"),Lf("remote")]),type:ky([Lf("standalone"),Lf("package")]),safeArgumentRecord:Zd(t1t,{}),engineOptions:Zd(eQe(ttt),null)}),_cn=M_({...Srr.entries,...M_({config:ctn}).entries}),gcn=M_({...Srr.entries,...M_({config:utn,codemods:Zd(mI(_cn),[])}).entries}),Trr=ky([_cn,gcn]),xcn=t=>oR(_cn,t),Drr=t=>oR(gcn,t),ntt=t=>men(gcn,t),rAe=t=>ZO(Trr,t),Arr=t=>oR(Trr,t)});var wrr=Ct(()=>{"use strict"});var T9a,D9a,Irr=Ct(()=>{"use strict";lR();T9a=M_({codemodSource:ep(),codemodEngine:ky([Lf("jscodeshift"),Lf("ts-morph"),Lf("workflow")]),codemodArguments:Zd(ep()),repoUrl:Zd(ep()),branch:Zd(ep()),persistent:Zd(L2())}),D9a=M_({jobId:ep()})});var uL=Ct(()=>{"use strict";vBn();Rjn();vHn();urr();prr();hrr();mrr();e1t();_rr();hcn();brr();Gen();n1t();vQe();Crr();mcn();wrr();Irr()});var TFi,Prr,Nrr=Ct(()=>{"use strict";lR();uL();TFi=ky([M_({kind:Lf("initialization"),path:ep(),codemodSource:ep(),engine:ky([Lf("jscodeshift"),Lf("ts-morph"),Lf("ast-grep"),Lf("workflow")]),format:L2(),safeArgumentRecord:t1t,engineOptions:eQe(ttt)}),M_({kind:Lf("exit")}),M_({kind:Lf("runCodemod"),path:ep(),data:ep()})]),Prr=t=>ZO(TFi,t)});var krr=Ct(()=>{"use strict"});var DFi,Rrr,Orr=Ct(()=>{"use strict";lR();yen();DFi=ky([M_({kind:Lf("commands"),commands:xen(),path:Zd(ep())}),M_({kind:Lf("error"),message:ep(),path:Zd(ep())}),M_({kind:Lf("console"),consoleKind:yBn,message:ep()})]),Rrr=t=>ZO(DFi,t)});var RC=Ct(()=>{"use strict";aR();n5n();cBn();mBn();yen();Nrr();krr();Orr()});var mle,rtt=Ct(()=>{mle="0.18.12"});var Lrr,Mrr,ycn,uJ,vcn,oWa,itt=Ct(()=>{"use strict";Lrr=Ho(require("node:os"),1),Mrr=require("node:path");RC();ycn=process.stdout.write,uJ=(0,Mrr.join)(Lrr.homedir(),".codemod"),vcn=Ii.green("\u2714"),oWa=Ii.red("\u2716")});var bcn,F8e,Ecn,HEt,KEt,Scn=Ct(()=>{"use strict";bcn=Ho(require("node:fs"),1),F8e=Ho(require("node:os"),1),Ecn=require("node:path");RC();uL();rtt();itt();HEt=(0,Ecn.join)(uJ,"logs"),KEt=async t=>{let{prefix:e,content:n,fatal:i}=t,s=(0,Ecn.join)(HEt,`${i?"FATAL-":""}${new Date().toISOString()}-error.log`),o=`- CLI version: ${mle}
678
678
  - Node version: ${process.versions.node}
679
679
  - OS: ${F8e.type()} ${F8e.release()} ${F8e.arch()}
680
680
 
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "imports": {
5
5
  "#*": "./src/*"
6
6
  },
7
- "version": "0.18.10",
7
+ "version": "0.18.12",
8
8
  "description": "A codemod engine for Node.js libraries (jscodeshift, ts-morph, etc.)",
9
9
  "type": "module",
10
10
  "exports": null,
@@ -61,11 +61,11 @@
61
61
  "vitest": "^1.0.1",
62
62
  "yargs": "^17.6.2",
63
63
  "@codemod-com/api-types": "1.0.1",
64
- "@codemod-com/filemod": "2.1.0",
65
- "@codemod-com/telemetry": "1.1.0",
66
64
  "@codemod-com/printer": "1.0.1",
67
- "@codemod-com/runner": "1.3.10",
68
- "@codemod-com/utilities": "1.2.1"
65
+ "@codemod-com/runner": "1.3.11",
66
+ "@codemod-com/filemod": "2.1.0",
67
+ "@codemod-com/utilities": "1.2.1",
68
+ "@codemod-com/telemetry": "1.1.0"
69
69
  },
70
70
  "engines": {
71
71
  "node": ">=18.5.0"
@@ -86,11 +86,11 @@
86
86
  "dependencies": {
87
87
  "@ast-grep/cli": "^0.32.0",
88
88
  "@ast-grep/napi": "^0.32.0",
89
+ "@codemod.com/workflow": "0.0.31",
89
90
  "@octokit/rest": "^20.0.2",
90
91
  "blessed": "^0.1.81",
91
92
  "esbuild": "^0.23.0",
92
- "keytar": "^7.9.0",
93
- "@codemod.com/workflow": "0.0.32"
93
+ "keytar": "^7.9.0"
94
94
  },
95
95
  "scripts": {
96
96
  "build": "tsc && node ./build.js",