vbapm 0.7.0 → 0.8.0
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.
- package/README.md +40 -0
- package/addins/build/vbapm.xlam +0 -0
- package/lib/actions/export-project.d.ts +2 -0
- package/lib/actions/update-project.d.ts +7 -0
- package/lib/{add-source-_Z4tr2ea.js → add-source-BOumGmx7.js} +1 -1
- package/lib/addin.d.ts +1 -0
- package/lib/bin/vbapm-update.d.ts +2 -0
- package/lib/build-project-De7NPBpt.js +3 -0
- package/lib/build-target-ooHNsSLD.js +9 -0
- package/lib/{create-project-CTAlegO8.js → create-project-BYc3XMZw.js} +1 -1
- package/lib/errors.d.ts +2 -0
- package/lib/export-project-CgFMyE-g.js +4 -0
- package/lib/export-target-C0RYJqUX.js +4 -0
- package/lib/{get-target-Ba_ZoGUl.js → get-target-LUoY1UWJ.js} +1 -1
- package/lib/index-C61lSPb5.js +1 -0
- package/lib/{index-CB6KQLC7.js → index-CBGUBgfk.js} +3 -3
- package/lib/{index-_8uEunjn.js → index-ClUEyMCY.js} +1 -1
- package/lib/{index-mBZsirl0.js → index-Cp8MNK26.js} +1 -1
- package/lib/{index-Cwtynogk.js → index-Dv6JxqGo.js} +1 -1
- package/lib/index.js +1 -1
- package/lib/{init-project-BY-a8CIk.js → init-project-9RKSVG_H.js} +3 -3
- package/lib/installer-DPj-zT7L.js +9 -0
- package/lib/{load-from-project-wNJg8fme.js → load-from-project-ClF4qaC0.js} +1 -1
- package/lib/messages.d.ts +2 -0
- package/lib/{project-DFh-2QTw.js → project-BPmPCkUS.js} +4 -4
- package/lib/run-macro-C1-aJWu5.js +1 -0
- package/lib/{sat-solver-CqS8Vf6C.js → sat-solver-B6RXdyQs.js} +1 -1
- package/lib/targets/build-target.d.ts +1 -0
- package/lib/targets/export-target.d.ts +3 -1
- package/lib/targets/transforms/format-xml.d.ts +2 -0
- package/lib/test-project-DXBFZH3o.js +1 -0
- package/lib/transform-build-graph-DgRrocSn.js +1 -0
- package/lib/transform-target-CYhuozxP.js +2 -0
- package/lib/utils/encoding.d.ts +30 -0
- package/lib/utils/run.d.ts +4 -1
- package/lib/utils/xml.d.ts +14 -0
- package/lib/{vbapm-add-QPN5uEGK.js → vbapm-add-CASFjXAL.js} +1 -1
- package/lib/vbapm-build-Bhm_pqQW.js +9 -0
- package/lib/vbapm-export-8KDCdFOz.js +9 -0
- package/lib/{vbapm-init-BMY4x_xq.js → vbapm-init-Ba2xCez2.js} +1 -1
- package/lib/{vbapm-new-DLW9SdvJ.js → vbapm-new-YQRNQ4Iq.js} +1 -1
- package/lib/{vbapm-run-DzRxAhlD.js → vbapm-run-J-R--noZ.js} +2 -2
- package/lib/{vbapm-test-DInh0MDC.js → vbapm-test-C4KWMPLz.js} +1 -1
- package/lib/vbapm-update-DnbmW8tc.js +13 -0
- package/lib/{vbapm-version-3Xv7JjGv.js → vbapm-version-CRicT8YA.js} +1 -1
- package/lib/vbapm.js +2 -1
- package/package.json +6 -3
- package/run-scripts/run.applescript +18 -7
- package/run-scripts/run.ps1 +42 -10
- package/lib/build-project-CIZanDh1.js +0 -3
- package/lib/build-target-B03OPzeI.js +0 -9
- package/lib/export-project-DdTYRyAw.js +0 -4
- package/lib/export-target-CEupP86g.js +0 -4
- package/lib/installer-C0iBwEpK.js +0 -9
- package/lib/run-macro-Ck_8Iku3.js +0 -1
- package/lib/test-project-CM-XUOdH.js +0 -1
- package/lib/transform-target-DJmqMjY0.js +0 -2
- package/lib/vbapm-build-BKtQ6OeP.js +0 -9
- package/lib/vbapm-export-4H_qDinP.js +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var t,e,r=require("./_commonjsHelpers-Bjf42z7h.js"),i=require("fs"),n=require("events"),s=require("./transform-target-DJmqMjY0.js"),o=require("path"),a=require("./installer-C0iBwEpK.js"),l=require("util"),u=require("stream"),h=require("./string_decoder-CW-j4E6X.js"),c=require("buffer"),f=require("./index-CEojr58e.js"),d=require("node:url"),p=require("node:path"),y=require("node:fs"),b=require("node:fs/promises"),m=require("node:events"),g=require("node:stream"),w=require("node:string_decoder"),v=require("./crc32-Cc3OMFYk.js"),S=require("zlib");function E(t,e){return e.forEach(function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(function(r){if("default"!==r&&!(r in t)){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}})}),Object.freeze(t)}function x(){if(e)return t;e=1,t=d;const r=i,{EventEmitter:a}=n,{Minimatch:l}=s.requireCommonjs(),{resolve:u}=o;function h(t,e){return new Promise((i,n)=>{(e?r.stat:r.lstat)(t,(r,n)=>{if(r)if("ENOENT"===r.code)i(e?h(t,!1):null);else i(null);else i(n)})})}async function*c(t,e,i,n,s,o){let a=await function(t,e){return new Promise((i,n)=>{r.readdir(t,{withFileTypes:!0},(t,r)=>{if(t)switch(t.code){case"ENOTDIR":e?n(t):i([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":i([]);break;default:n(t)}else i(r)})})}(e+t,o);for(const r of a){let o=r.name;void 0===o&&(o=r,n=!0);const a=t+"/"+o,l=a.slice(1),u=e+"/"+l;let f=null;(n||i)&&(f=await h(u,i)),f||void 0===r.name||(f=r),null===f&&(f={isDirectory:()=>!1}),f.isDirectory()?s(l)||(yield{relative:l,absolute:u,stats:f},yield*c(a,e,i,n,s,!1)):yield{relative:l,absolute:u,stats:f}}}class f extends a{constructor(t,e,r){if(super(),"function"==typeof e&&(r=e,e=null),this.options=function(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}(e||{}),this.matchers=[],this.options.pattern){const t=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=t.map(t=>new l(t,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){const t=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=t.map(t=>new l(t,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){const t=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=t.map(t=>new l(t,{dot:!0}))}this.iterator=async function*(t,e,r,i){yield*c("",t,e,r,i,!0)}(u(t||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,r&&(this._matches=[],this.on("match",t=>this._matches.push(this.options.absolute?t.absolute:t.relative)),this.on("error",t=>r(t)),this.on("end",()=>r(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(t){return this.skipMatchers.some(e=>e.match(t))}_fileMatches(t,e){const r=t+(e?"/":"");return(0===this.matchers.length||this.matchers.some(t=>t.match(r)))&&!this.ignoreMatchers.some(t=>t.match(r))&&(!this.options.nodir||!e)}_next(){this.paused||this.aborted?this.inactive=!0:this.iterator.next().then(t=>{if(t.done)this.emit("end");else{const e=t.value.stats.isDirectory();if(this._fileMatches(t.value.relative,e)){let r=t.value.relative,i=t.value.absolute;this.options.mark&&e&&(r+="/",i+="/"),this.options.stat?this.emit("match",{relative:r,absolute:i,stat:t.value.stats}):this.emit("match",{relative:r,absolute:i})}this._next(this.iterator)}}).catch(t=>{this.abort(),this.emit("error",t),t.code||this.options.silent||console.error(t)})}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}}function d(t,e,r){return new f(t,e,r)}return d.ReaddirGlob=f,t}function k(t,...e){return(...r)=>t(...e,...r)}function T(t){return function(...e){var r=e.pop();return t.call(this,e,r)}}var R="function"==typeof queueMicrotask&&queueMicrotask,A="function"==typeof setImmediate&&setImmediate,L="object"==typeof process&&"function"==typeof process.nextTick;function O(t){setTimeout(t,0)}function I(t){return(e,...r)=>t(()=>e(...r))}var P=I(R?queueMicrotask:A?setImmediate:L?process.nextTick:O);function D(t){return N(t)?function(...e){const r=e.pop();return M(t.apply(this,e),r)}:T(function(e,r){var i;try{i=t.apply(this,e)}catch(t){return r(t)}if(i&&"function"==typeof i.then)return M(i,r);r(null,i)})}function M(t,e){return t.then(t=>{C(e,null,t)},t=>{C(e,t&&(t instanceof Error||t.message)?t:new Error(t))})}function C(t,e,r){try{t(e,r)}catch(t){P(t=>{throw t},t)}}function N(t){return"AsyncFunction"===t[Symbol.toStringTag]}function j(t){if("function"!=typeof t)throw new Error("expected a function");return N(t)?D(t):t}function F(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[e-1]?t.apply(this,r):new Promise((i,n)=>{r[e-1]=(t,...e)=>{if(t)return n(t);i(e.length>1?e:e[0])},t.apply(this,r)})}}function B(t){return function(e,...r){return F(function(i){var n=this;return t(e,(t,e)=>{j(t).apply(n,r.concat(e))},i)})}}function z(t,e,r,i){e=e||[];var n=[],s=0,o=j(r);return t(e,(t,e,r)=>{var i=s++;o(t,(t,e)=>{n[i]=e,r(t)})},t=>{i(t,n)})}function W(t){return t&&"number"==typeof t.length&&t.length>=0&&t.length%1==0}const U={};function G(t){function e(...e){if(null!==t){var r=t;t=null,r.apply(this,e)}}return Object.assign(e,t),e}function q(t){if(W(t))return function(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}(t);var e,r,i,n,s=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()}(t);return s?function(t){var e=-1;return function(){var r=t.next();return r.done?null:(e++,{value:r.value,key:e})}}(s):(r=(e=t)?Object.keys(e):[],i=-1,n=r.length,function t(){var s=r[++i];return"__proto__"===s?t():i<n?{value:e[s],key:s}:null})}function H(t){return function(...e){if(null===t)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}function $(t,e,r,i){let n=!1,s=!1,o=!1,a=0,l=0;function u(){a>=e||o||n||(o=!0,t.next().then(({value:t,done:e})=>{if(!s&&!n){if(o=!1,e)return n=!0,void(a<=0&&i(null));a++,r(t,l,h),l++,u()}}).catch(c))}function h(t,e){if(a-=1,!s)return t?c(t):!1===t?(n=!0,void(s=!0)):e===U||n&&a<=0?(n=!0,i(null)):void u()}function c(t){s||(o=!1,n=!0,i(t))}u()}var V=t=>(e,r,i)=>{if(i=G(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if("AsyncGenerator"===e[Symbol.toStringTag])return $(e,t,r,i);if(function(t){return"function"==typeof t[Symbol.asyncIterator]}(e))return $(e[Symbol.asyncIterator](),t,r,i);var n=q(e),s=!1,o=!1,a=0,l=!1;function u(t,e){if(!o)if(a-=1,t)s=!0,i(t);else if(!1===t)s=!0,o=!0;else{if(e===U||s&&a<=0)return s=!0,i(null);l||h()}}function h(){for(l=!0;a<t&&!s;){var e=n();if(null===e)return s=!0,void(a<=0&&i(null));a+=1,r(e.value,e.key,H(u))}l=!1}h()};var Z=F(function(t,e,r,i){return V(e)(t,j(r),i)},4);function Y(t,e,r){r=G(r);var i=0,n=0,{length:s}=t,o=!1;function a(t,e){!1===t&&(o=!0),!0!==o&&(t?r(t):++n!==s&&e!==U||r(null))}for(0===s&&r(null);i<s;i++)e(t[i],i,H(a))}function Q(t,e,r){return Z(t,1/0,e,r)}var K=F(function(t,e,r){return(W(t)?Y:Q)(t,j(e),r)},3);var X=F(function(t,e,r){return z(K,t,e,r)},3),J=B(X);var tt=F(function(t,e,r){return Z(t,1,e,r)},3);var et=F(function(t,e,r){return z(tt,t,e,r)},3),rt=B(et);const it=Symbol("promiseCallback");function nt(){let t,e;function r(r,...i){if(r)return e(r);t(i.length>1?i:i[0])}return r[it]=new Promise((r,i)=>{t=r,e=i}),r}function st(t,e,r){"number"!=typeof e&&(r=e,e=null),r=G(r||nt());var i=Object.keys(t).length;if(!i)return r(null);e||(e=i);var n={},s=0,o=!1,a=!1,l=Object.create(null),u=[],h=[],c={};function f(t,e){u.push(()=>function(t,e){if(a)return;var i=H((e,...i)=>{if(s--,!1!==e)if(i.length<2&&([i]=i),e){var u={};if(Object.keys(n).forEach(t=>{u[t]=n[t]}),u[t]=i,a=!0,l=Object.create(null),o)return;r(e,u)}else n[t]=i,(l[t]||[]).forEach(t=>t()),d();else o=!0});s++;var u=j(e[e.length-1]);e.length>1?u(n,i):u(i)}(t,e))}function d(){if(!o){if(0===u.length&&0===s)return r(null,n);for(;u.length&&s<e;){u.shift()()}}}function p(e){var r=[];return Object.keys(t).forEach(i=>{const n=t[i];Array.isArray(n)&&n.indexOf(e)>=0&&r.push(i)}),r}return Object.keys(t).forEach(e=>{var r=t[e];if(!Array.isArray(r))return f(e,[r]),void h.push(e);var i=r.slice(0,r.length-1),n=i.length;if(0===n)return f(e,r),void h.push(e);c[e]=n,i.forEach(s=>{if(!t[s])throw new Error("async.auto task `"+e+"` has a non-existent dependency `"+s+"` in "+i.join(", "));!function(t,e){var r=l[t];r||(r=l[t]=[]);r.push(e)}(s,()=>{0===--n&&f(e,r)})})}),function(){var t=0;for(;h.length;)t++,p(h.pop()).forEach(t=>{0===--c[t]&&h.push(t)});if(t!==i)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),d(),r[it]}var ot=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,at=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,lt=/,/,ut=/(=.+)?(\s*)$/;function ht(t,e){var r={};return Object.keys(t).forEach(e=>{var i,n=t[e],s=N(n),o=!s&&1===n.length||s&&0===n.length;if(Array.isArray(n))i=[...n],n=i.pop(),r[e]=i.concat(i.length>0?a:n);else if(o)r[e]=n;else{if(i=function(t){const e=function(t){let e="",r=0,i=t.indexOf("*/");for(;r<t.length;)if("/"===t[r]&&"/"===t[r+1]){let e=t.indexOf("\n",r);r=-1===e?t.length:e}else if(-1!==i&&"/"===t[r]&&"*"===t[r+1]){let n=t.indexOf("*/",r);-1!==n?(r=n+2,i=t.indexOf("*/",r)):(e+=t[r],r++)}else e+=t[r],r++;return e}(t.toString());let r=e.match(ot);if(r||(r=e.match(at)),!r)throw new Error("could not parse args in autoInject\nSource:\n"+e);let[,i]=r;return i.replace(/\s/g,"").split(lt).map(t=>t.replace(ut,"").trim())}(n),0===n.length&&!s&&0===i.length)throw new Error("autoInject task functions require explicit parameters.");s||i.pop(),r[e]=i.concat(a)}function a(t,e){var r=i.map(e=>t[e]);r.push(e),j(n)(...r)}}),st(r,e)}class ct{constructor(){this.head=this.tail=null,this.length=0}removeLink(t){return t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev,t.prev=t.next=null,this.length-=1,t}empty(){for(;this.head;)this.shift();return this}insertAfter(t,e){e.prev=t,e.next=t.next,t.next?t.next.prev=e:this.tail=e,t.next=e,this.length+=1}insertBefore(t,e){e.prev=t.prev,e.next=t,t.prev?t.prev.next=e:this.head=e,t.prev=e,this.length+=1}unshift(t){this.head?this.insertBefore(this.head,t):ft(this,t)}push(t){this.tail?this.insertAfter(this.tail,t):ft(this,t)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var t=this.head;t;)yield t.data,t=t.next}remove(t){for(var e=this.head;e;){var{next:r}=e;t(e)&&this.removeLink(e),e=r}return this}}function ft(t,e){t.length=1,t.head=t.tail=e}function dt(t,e,r){if(null==e)e=1;else if(0===e)throw new RangeError("Concurrency must not be zero");var i=j(t),n=0,s=[];const o={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(t,e){return t?e?void(o[t]=o[t].filter(t=>t!==e)):o[t]=[]:Object.keys(o).forEach(t=>o[t]=[])}function l(t,...e){o[t].forEach(t=>t(...e))}var u=!1;function h(t,e,r,i){if(null!=i&&"function"!=typeof i)throw new Error("task callback must be a function");var n,s;function o(t,...e){return t?r?s(t):n():e.length<=1?n(e[0]):void n(e)}y.started=!0;var a=y._createTaskItem(t,r?o:i||o);if(e?y._tasks.unshift(a):y._tasks.push(a),u||(u=!0,P(()=>{u=!1,y.process()})),r||!i)return new Promise((t,e)=>{n=t,s=e})}function c(t){return function(e,...r){n-=1;for(var i=0,o=t.length;i<o;i++){var a=t[i],u=s.indexOf(a);0===u?s.shift():u>0&&s.splice(u,1),a.callback(e,...r),null!=e&&l("error",e,a.data)}n<=y.concurrency-y.buffer&&l("unsaturated"),y.idle()&&l("drain"),y.process()}}function f(t){return!(0!==t.length||!y.idle())&&(P(()=>l("drain")),!0)}const d=t=>e=>{if(!e)return new Promise((e,r)=>{!function(t,e){const r=(...i)=>{a(t,r),e(...i)};o[t].push(r)}(t,(t,i)=>{if(t)return r(t);e(i)})});a(t),function(t,e){o[t].push(e)}(t,e)};var p=!1,y={_tasks:new ct,_createTaskItem:(t,e)=>({data:t,callback:e}),*[Symbol.iterator](){yield*y._tasks[Symbol.iterator]()},concurrency:e,payload:r,buffer:e/4,started:!1,paused:!1,push(t,e){if(Array.isArray(t)){if(f(t))return;return t.map(t=>h(t,!1,!1,e))}return h(t,!1,!1,e)},pushAsync(t,e){if(Array.isArray(t)){if(f(t))return;return t.map(t=>h(t,!1,!0,e))}return h(t,!1,!0,e)},kill(){a(),y._tasks.empty()},unshift(t,e){if(Array.isArray(t)){if(f(t))return;return t.map(t=>h(t,!0,!1,e))}return h(t,!0,!1,e)},unshiftAsync(t,e){if(Array.isArray(t)){if(f(t))return;return t.map(t=>h(t,!0,!0,e))}return h(t,!0,!0,e)},remove(t){y._tasks.remove(t)},process(){if(!p){for(p=!0;!y.paused&&n<y.concurrency&&y._tasks.length;){var t=[],e=[],r=y._tasks.length;y.payload&&(r=Math.min(r,y.payload));for(var o=0;o<r;o++){var a=y._tasks.shift();t.push(a),s.push(a),e.push(a.data)}n+=1,0===y._tasks.length&&l("empty"),n===y.concurrency&&l("saturated");var u=H(c(t));i(e,u)}p=!1}},length:()=>y._tasks.length,running:()=>n,workersList:()=>s,idle:()=>y._tasks.length+n===0,pause(){y.paused=!0},resume(){!1!==y.paused&&(y.paused=!1,P(y.process))}};return Object.defineProperties(y,{saturated:{writable:!1,value:d("saturated")},unsaturated:{writable:!1,value:d("unsaturated")},empty:{writable:!1,value:d("empty")},drain:{writable:!1,value:d("drain")},error:{writable:!1,value:d("error")}}),y}function pt(t,e){return dt(t,1,e)}function yt(t,e,r){return dt(t,e,r)}var bt=F(function(t,e,r,i){i=G(i);var n=j(r);return tt(t,(t,r,i)=>{n(e,t,(t,r)=>{e=r,i(t)})},t=>i(t,e))},4);function mt(...t){var e=t.map(j);return function(...t){var r=this,i=t[t.length-1];return"function"==typeof i?t.pop():i=nt(),bt(e,t,(t,e,i)=>{e.apply(r,t.concat((t,...e)=>{i(t,e)}))},(t,e)=>i(t,...e)),i[it]}}function gt(...t){return mt(...t.reverse())}var _t=F(function(t,e,r,i){return z(V(e),t,r,i)},4);var wt=F(function(t,e,r,i){var n=j(r);return _t(t,e,(t,e)=>{n(t,(t,...r)=>t?e(t):e(t,r))},(t,e)=>{for(var r=[],n=0;n<e.length;n++)e[n]&&(r=r.concat(...e[n]));return i(t,r)})},4);var vt=F(function(t,e,r){return wt(t,1/0,e,r)},3);var St=F(function(t,e,r){return wt(t,1,e,r)},3);function Et(...t){return function(...e){return e.pop()(null,...t)}}function xt(t,e){return(r,i,n,s)=>{var o,a=!1;const l=j(n);r(i,(r,i,n)=>{l(r,(i,s)=>i||!1===i?n(i):t(s)&&!o?(a=!0,o=e(!0,r),n(null,U)):void n())},t=>{if(t)return s(t);s(null,a?o:e(!1))})}}var kt=F(function(t,e,r){return xt(t=>t,(t,e)=>e)(K,t,e,r)},3);var Tt=F(function(t,e,r,i){return xt(t=>t,(t,e)=>e)(V(e),t,r,i)},4);var Rt=F(function(t,e,r){return xt(t=>t,(t,e)=>e)(V(1),t,e,r)},3);function At(t){return(e,...r)=>j(e)(...r,(e,...r)=>{"object"==typeof console&&(e?console.error&&console.error(e):console[t]&&r.forEach(e=>console[t](e)))})}var Lt=At("dir");var Ot=F(function(t,e,r){r=H(r);var i,n=j(t),s=j(e);function o(t,...e){if(t)return r(t);!1!==t&&(i=e,s(...e,a))}function a(t,e){return t?r(t):!1!==t?e?void n(o):r(null,...i):void 0}return a(null,!0)},3);function It(t,e,r){const i=j(e);return Ot(t,(...t)=>{const e=t.pop();i(...t,(t,r)=>e(t,!r))},r)}function Pt(t){return(e,r,i)=>t(e,i)}var Dt=F(function(t,e,r){return K(t,Pt(j(e)),r)},3);var Mt=F(function(t,e,r,i){return V(e)(t,Pt(j(r)),i)},4);var Ct=F(function(t,e,r){return Mt(t,1,e,r)},3);function Nt(t){return N(t)?t:function(...e){var r=e.pop(),i=!0;e.push((...t)=>{i?P(()=>r(...t)):r(...t)}),t.apply(this,e),i=!1}}var jt=F(function(t,e,r){return xt(t=>!t,t=>!t)(K,t,e,r)},3);var Ft=F(function(t,e,r,i){return xt(t=>!t,t=>!t)(V(e),t,r,i)},4);var Bt=F(function(t,e,r){return xt(t=>!t,t=>!t)(tt,t,e,r)},3);function zt(t,e,r,i){var n=new Array(e.length);t(e,(t,e,i)=>{r(t,(t,r)=>{n[e]=!!r,i(t)})},t=>{if(t)return i(t);for(var r=[],s=0;s<e.length;s++)n[s]&&r.push(e[s]);i(null,r)})}function Wt(t,e,r,i){var n=[];t(e,(t,e,i)=>{r(t,(r,s)=>{if(r)return i(r);s&&n.push({index:e,value:t}),i(r)})},t=>{if(t)return i(t);i(null,n.sort((t,e)=>t.index-e.index).map(t=>t.value))})}function Ut(t,e,r,i){return(W(e)?zt:Wt)(t,e,j(r),i)}var Gt=F(function(t,e,r){return Ut(K,t,e,r)},3);var qt=F(function(t,e,r,i){return Ut(V(e),t,r,i)},4);var Ht=F(function(t,e,r){return Ut(tt,t,e,r)},3);var $t=F(function(t,e){var r=H(e),i=j(Nt(t));return function t(e){if(e)return r(e);!1!==e&&i(t)}()},2);var Vt=F(function(t,e,r,i){var n=j(r);return _t(t,e,(t,e)=>{n(t,(r,i)=>r?e(r):e(r,{key:i,val:t}))},(t,e)=>{for(var r={},{hasOwnProperty:n}=Object.prototype,s=0;s<e.length;s++)if(e[s]){var{key:o}=e[s],{val:a}=e[s];n.call(r,o)?r[o].push(a):r[o]=[a]}return i(t,r)})},4);function Zt(t,e,r){return Vt(t,1/0,e,r)}function Yt(t,e,r){return Vt(t,1,e,r)}var Qt=At("log");var Kt=F(function(t,e,r,i){i=G(i);var n={},s=j(r);return V(e)(t,(t,e,r)=>{s(t,e,(t,i)=>{if(t)return r(t);n[e]=i,r(t)})},t=>i(t,n))},4);function Xt(t,e,r){return Kt(t,1/0,e,r)}function Jt(t,e,r){return Kt(t,1,e,r)}function te(t,e=t=>t){var r=Object.create(null),i=Object.create(null),n=j(t),s=T((t,s)=>{var o=e(...t);o in r?P(()=>s(null,...r[o])):o in i?i[o].push(s):(i[o]=[s],n(...t,(t,...e)=>{t||(r[o]=e);var n=i[o];delete i[o];for(var s=0,a=n.length;s<a;s++)n[s](t,...e)}))});return s.memo=r,s.unmemoized=t,s}var ee=I(L?process.nextTick:A?setImmediate:O),re=F((t,e,r)=>{var i=W(e)?[]:{};t(e,(t,e,r)=>{j(t)((t,...n)=>{n.length<2&&([n]=n),i[e]=n,r(t)})},t=>r(t,i))},3);function ie(t,e){return re(K,t,e)}function ne(t,e,r){return re(V(e),t,r)}function se(t,e){var r=j(t);return dt((t,e)=>{r(t[0],e)},e,1)}class oe{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(t){let e;for(;t>0&&ue(this.heap[t],this.heap[e=le(t)]);){let r=this.heap[t];this.heap[t]=this.heap[e],this.heap[e]=r,t=e}}percDown(t){let e;for(;(e=ae(t))<this.heap.length&&(e+1<this.heap.length&&ue(this.heap[e+1],this.heap[e])&&(e+=1),!ue(this.heap[t],this.heap[e]));){let r=this.heap[t];this.heap[t]=this.heap[e],this.heap[e]=r,t=e}}push(t){t.pushCount=++this.pushCount,this.heap.push(t),this.percUp(this.heap.length-1)}unshift(t){return this.heap.push(t)}shift(){let[t]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),t}toArray(){return[...this]}*[Symbol.iterator](){for(let t=0;t<this.heap.length;t++)yield this.heap[t].data}remove(t){let e=0;for(let r=0;r<this.heap.length;r++)t(this.heap[r])||(this.heap[e]=this.heap[r],e++);this.heap.splice(e);for(let t=le(this.heap.length-1);t>=0;t--)this.percDown(t);return this}}function ae(t){return 1+(t<<1)}function le(t){return(t+1>>1)-1}function ue(t,e){return t.priority!==e.priority?t.priority<e.priority:t.pushCount<e.pushCount}function he(t,e){var r=se(t,e),{push:i,pushAsync:n}=r;function s(t,e){return Array.isArray(t)?t.map(t=>({data:t,priority:e})):{data:t,priority:e}}return r._tasks=new oe,r._createTaskItem=({data:t,priority:e},r)=>({data:t,priority:e,callback:r}),r.push=function(t,e=0,r){return i(s(t,e),r)},r.pushAsync=function(t,e=0,r){return n(s(t,e),r)},delete r.unshift,delete r.unshiftAsync,r}var ce=F(function(t,e){if(e=G(e),!Array.isArray(t))return e(new TypeError("First argument to race must be an array of functions"));if(!t.length)return e();for(var r=0,i=t.length;r<i;r++)j(t[r])(e)},2);function fe(t,e,r,i){var n=[...t].reverse();return bt(n,e,r,i)}function de(t){var e=j(t);return T(function(t,r){return t.push((t,...e)=>{let i={};if(t&&(i.error=t),e.length>0){var n=e;e.length<=1&&([n]=e),i.value=n}r(null,i)}),e.apply(this,t)})}function pe(t){var e;return Array.isArray(t)?e=t.map(de):(e={},Object.keys(t).forEach(r=>{e[r]=de.call(this,t[r])})),e}function ye(t,e,r,i){const n=j(r);return Ut(t,e,(t,e)=>{n(t,(t,r)=>{e(t,!r)})},i)}var be=F(function(t,e,r){return ye(K,t,e,r)},3);var me=F(function(t,e,r,i){return ye(V(e),t,r,i)},4);var ge=F(function(t,e,r){return ye(tt,t,e,r)},3);function _e(t){return function(){return t}}function we(t,e,r){var i={times:5,intervalFunc:_e(0)};if(arguments.length<3&&"function"==typeof t?(r=e||nt(),e=t):(!function(t,e){if("object"==typeof e)t.times=+e.times||5,t.intervalFunc="function"==typeof e.interval?e.interval:_e(+e.interval||0),t.errorFilter=e.errorFilter;else{if("number"!=typeof e&&"string"!=typeof e)throw new Error("Invalid arguments for async.retry");t.times=+e||5}}(i,t),r=r||nt()),"function"!=typeof e)throw new Error("Invalid arguments for async.retry");var n=j(e),s=1;return function t(){n((e,...n)=>{!1!==e&&(e&&s++<i.times&&("function"!=typeof i.errorFilter||i.errorFilter(e))?setTimeout(t,i.intervalFunc(s-1)):r(e,...n))})}(),r[it]}function ve(t,e){e||(e=t,t=null);let r=t&&t.arity||e.length;N(e)&&(r+=1);var i=j(e);return T((e,n)=>{function s(t){i(...e,t)}return(e.length<r-1||null==n)&&(e.push(n),n=nt()),t?we(t,s,n):we(s,n),n[it]})}function Se(t,e){return re(tt,t,e)}var Ee=F(function(t,e,r){return xt(Boolean,t=>t)(K,t,e,r)},3);var xe=F(function(t,e,r,i){return xt(Boolean,t=>t)(V(e),t,r,i)},4);var ke=F(function(t,e,r){return xt(Boolean,t=>t)(tt,t,e,r)},3);var Te=F(function(t,e,r){var i=j(e);return X(t,(t,e)=>{i(t,(r,i)=>{if(r)return e(r);e(r,{value:t,criteria:i})})},(t,e)=>{if(t)return r(t);r(null,e.sort(n).map(t=>t.value))});function n(t,e){var r=t.criteria,i=e.criteria;return r<i?-1:r>i?1:0}},3);function Re(t,e,r){var i=j(t);return T((n,s)=>{var o,a=!1;n.push((...t)=>{a||(s(...t),clearTimeout(o))}),o=setTimeout(function(){var e=t.name||"anonymous",i=new Error('Callback function "'+e+'" timed out.');i.code="ETIMEDOUT",r&&(i.info=r),a=!0,s(i)},e),i(...n)})}function Ae(t,e,r,i){var n=j(r);return _t(function(t){for(var e=Array(t);t--;)e[t]=t;return e}(t),e,n,i)}function Le(t,e,r){return Ae(t,1/0,e,r)}function Oe(t,e,r){return Ae(t,1,e,r)}function Ie(t,e,r,i){arguments.length<=3&&"function"==typeof e&&(i=r,r=e,e=Array.isArray(t)?[]:{}),i=G(i||nt());var n=j(r);return K(t,(t,r,i)=>{n(e,t,r,i)},t=>i(t,e)),i[it]}var Pe=F(function(t,e){var r,i=null;return Ct(t,(t,e)=>{j(t)((t,...n)=>{if(!1===t)return e(t);n.length<2?[r]=n:r=n,i=t,e(t?null:{})})},()=>e(i,r))});function De(t){return(...e)=>(t.unmemoized||t)(...e)}var Me=F(function(t,e,r){r=H(r);var i=j(e),n=j(t),s=[];function o(t,...e){if(t)return r(t);s=e,!1!==t&&n(a)}function a(t,e){return t?r(t):!1!==t?e?void i(o):r(null,...s):void 0}return n(a)},3);function Ce(t,e,r){const i=j(t);return Me(t=>i((e,r)=>t(e,!r)),e,r)}var Ne,je,Fe=F(function(t,e){if(e=G(e),!Array.isArray(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();var r=0;function i(e){j(t[r++])(...e,H(n))}function n(n,...s){if(!1!==n)return n||r===t.length?e(n,...s):void i(s)}i([])}),Be={apply:k,applyEach:J,applyEachSeries:rt,asyncify:D,auto:st,autoInject:ht,cargo:pt,cargoQueue:yt,compose:gt,concat:vt,concatLimit:wt,concatSeries:St,constant:Et,detect:kt,detectLimit:Tt,detectSeries:Rt,dir:Lt,doUntil:It,doWhilst:Ot,each:Dt,eachLimit:Mt,eachOf:K,eachOfLimit:Z,eachOfSeries:tt,eachSeries:Ct,ensureAsync:Nt,every:jt,everyLimit:Ft,everySeries:Bt,filter:Gt,filterLimit:qt,filterSeries:Ht,forever:$t,groupBy:Zt,groupByLimit:Vt,groupBySeries:Yt,log:Qt,map:X,mapLimit:_t,mapSeries:et,mapValues:Xt,mapValuesLimit:Kt,mapValuesSeries:Jt,memoize:te,nextTick:ee,parallel:ie,parallelLimit:ne,priorityQueue:he,queue:se,race:ce,reduce:bt,reduceRight:fe,reflect:de,reflectAll:pe,reject:be,rejectLimit:me,rejectSeries:ge,retry:we,retryable:ve,seq:mt,series:Se,setImmediate:P,some:Ee,someLimit:xe,someSeries:ke,sortBy:Te,timeout:Re,times:Le,timesLimit:Ae,timesSeries:Oe,transform:Ie,tryEach:Pe,unmemoize:De,until:Ce,waterfall:Fe,whilst:Me,all:jt,allLimit:Ft,allSeries:Bt,any:Ee,anyLimit:xe,anySeries:ke,find:kt,findLimit:Tt,findSeries:Rt,flatMap:vt,flatMapLimit:wt,flatMapSeries:St,forEach:Dt,forEachSeries:Ct,forEachLimit:Mt,forEachOf:K,forEachOfSeries:tt,forEachOfLimit:Z,inject:bt,foldl:bt,foldr:fe,select:Gt,selectLimit:qt,selectSeries:Ht,wrapSync:D,during:Me,doDuring:Ot},ze=Object.freeze({__proto__:null,all:jt,allLimit:Ft,allSeries:Bt,any:Ee,anyLimit:xe,anySeries:ke,apply:k,applyEach:J,applyEachSeries:rt,asyncify:D,auto:st,autoInject:ht,cargo:pt,cargoQueue:yt,compose:gt,concat:vt,concatLimit:wt,concatSeries:St,constant:Et,default:Be,detect:kt,detectLimit:Tt,detectSeries:Rt,dir:Lt,doDuring:Ot,doUntil:It,doWhilst:Ot,during:Me,each:Dt,eachLimit:Mt,eachOf:K,eachOfLimit:Z,eachOfSeries:tt,eachSeries:Ct,ensureAsync:Nt,every:jt,everyLimit:Ft,everySeries:Bt,filter:Gt,filterLimit:qt,filterSeries:Ht,find:kt,findLimit:Tt,findSeries:Rt,flatMap:vt,flatMapLimit:wt,flatMapSeries:St,foldl:bt,foldr:fe,forEach:Dt,forEachLimit:Mt,forEachOf:K,forEachOfLimit:Z,forEachOfSeries:tt,forEachSeries:Ct,forever:$t,groupBy:Zt,groupByLimit:Vt,groupBySeries:Yt,inject:bt,log:Qt,map:X,mapLimit:_t,mapSeries:et,mapValues:Xt,mapValuesLimit:Kt,mapValuesSeries:Jt,memoize:te,nextTick:ee,parallel:ie,parallelLimit:ne,priorityQueue:he,queue:se,race:ce,reduce:bt,reduceRight:fe,reflect:de,reflectAll:pe,reject:be,rejectLimit:me,rejectSeries:ge,retry:we,retryable:ve,select:Gt,selectLimit:qt,selectSeries:Ht,seq:mt,series:Se,setImmediate:P,some:Ee,someLimit:xe,someSeries:ke,sortBy:Te,timeout:Re,times:Le,timesLimit:Ae,timesSeries:Oe,transform:Ie,tryEach:Pe,unmemoize:De,until:Ce,waterfall:Fe,whilst:Me,wrapSync:D}),We=r.getAugmentedNamespace(ze),Ue={exports:{}};var Ge,qe,He={exports:{}};function $e(){return qe?Ge:(qe=1,Ge=u)}var Ve,Ze={exports:{}};function Ye(){return Ve||(Ve=1,function(t,e){var r=c,i=r.Buffer;function n(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(n(r,e),e.Buffer=s),n(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}}(Ze,Ze.exports)),Ze.exports}var Qe,Ke,Xe,Je,tr,er,rr,ir,nr,sr,or,ar,lr,ur,hr,cr,fr,dr,pr,yr,br,mr,gr,_r,wr,vr,Sr,Er,xr,kr,Tr,Rr,Ar,Lr,Or,Ir,Pr,Dr,Mr,Cr,Nr,jr,Fr,Br,zr,Wr,Ur,Gr,qr,Hr,$r,Vr,Zr,Yr,Qr,Kr,Xr,Jr,ti,ei,ri,ii,ni,si,oi,ai,li,ui,hi,ci,fi,di,pi,yi,bi,mi,gi,_i,wi,vi,Si,Ei,xi,ki,Ti,Ri,Ai={exports:{}};function Li(){return Qe||(Qe=1,function(t){var e=Ye().Buffer,r=l;function i(t,e,r){t.copy(e,r)}t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return e.alloc(0);for(var r=e.allocUnsafe(t>>>0),n=this.head,s=0;n;)i(n.data,r,s),s+=n.data.length,n=n.next;return r},t}(),r&&r.inspect&&r.inspect.custom&&(t.exports.prototype[r.inspect.custom]=function(){var t=r.inspect({length:this.length});return this.constructor.name+" "+t})}(Ai)),Ai.exports}function Oi(){if(Xe)return Ke;Xe=1;var t=h.requireProcessNextickArgs();function e(t,e){t.emit("error",e)}return Ke={destroy:function(r,i){var n=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(i?i(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(e,this,r)):t.nextTick(e,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(r){!i&&r?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,t.nextTick(e,n,r)):t.nextTick(e,n,r):i&&i(r)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}function Ii(){if(tr)return Je;tr=1;var t=h.requireProcessNextickArgs();function e(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var i=t.entry;t.entry=null;for(;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}(e,t)}}Je=b;var i,n=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:t.nextTick;b.WritableState=y;var s=Object.create(h.requireUtil());s.inherits=f.requireInherits();var o={deprecate:h.requireNode()},a=$e(),l=Ye().Buffer,u=(void 0!==r.commonjsGlobal?r.commonjsGlobal:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,d=Oi();function p(){}function y(r,s){i=i||Pi(),r=r||{};var o=s instanceof i;this.objectMode=!!r.objectMode,o&&(this.objectMode=this.objectMode||!!r.writableObjectMode);var a=r.highWaterMark,l=r.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:o&&(l||0===l)?l:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===r.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=r.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,r){var i=e._writableState,s=i.sync,o=i.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(i),r)!function(e,r,i,n,s){--r.pendingcb,i?(t.nextTick(s,n),t.nextTick(S,e,r),e._writableState.errorEmitted=!0,e.emit("error",n)):(s(n),e._writableState.errorEmitted=!0,e.emit("error",n),S(e,r))}(e,i,s,r,o);else{var a=w(i);a||i.corked||i.bufferProcessing||!i.bufferedRequest||_(e,i),s?n(g,e,i,a,o):g(e,i,a,o)}}(s,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function b(t){if(i=i||Pi(),!(c.call(b,this)||this instanceof i))return new b(t);this._writableState=new y(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function m(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function g(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),S(t,e)}function _(t,r){r.bufferProcessing=!0;var i=r.bufferedRequest;if(t._writev&&i&&i.next){var n=r.bufferedRequestCount,s=new Array(n),o=r.corkedRequestsFree;o.entry=i;for(var a=0,l=!0;i;)s[a]=i,i.isBuf||(l=!1),i=i.next,a+=1;s.allBuffers=l,m(t,r,!0,r.length,s,"",o.finish),r.pendingcb++,r.lastBufferedRequest=null,o.next?(r.corkedRequestsFree=o.next,o.next=null):r.corkedRequestsFree=new e(r),r.bufferedRequestCount=0}else{for(;i;){var u=i.chunk,h=i.encoding,c=i.callback;if(m(t,r,!1,r.objectMode?1:u.length,u,h,c),i=i.next,r.bufferedRequestCount--,r.writing)break}null===i&&(r.lastBufferedRequest=null)}r.bufferedRequest=i,r.bufferProcessing=!1}function w(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function v(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),S(t,e)})}function S(e,r){var i=w(r);return i&&(!function(e,r){r.prefinished||r.finalCalled||("function"==typeof e._final?(r.pendingcb++,r.finalCalled=!0,t.nextTick(v,e,r)):(r.prefinished=!0,e.emit("prefinish")))}(e,r),0===r.pendingcb&&(r.finished=!0,e.emit("finish"))),i}return s.inherits(b,a),y.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(y.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(t){return!!c.call(this,t)||this===b&&(t&&t._writableState instanceof y)}})):c=function(t){return t instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,r,i){var n,s=this._writableState,o=!1,a=!s.objectMode&&(n=e,l.isBuffer(n)||n instanceof u);return a&&!l.isBuffer(e)&&(e=function(t){return l.from(t)}(e)),"function"==typeof r&&(i=r,r=null),a?r="buffer":r||(r=s.defaultEncoding),"function"!=typeof i&&(i=p),s.ended?function(e,r){var i=new Error("write after end");e.emit("error",i),t.nextTick(r,i)}(this,i):(a||function(e,r,i,n){var s=!0,o=!1;return null===i?o=new TypeError("May not write null values to stream"):"string"==typeof i||void 0===i||r.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),t.nextTick(n,o),s=!1),s}(this,s,e,i))&&(s.pendingcb++,o=function(t,e,r,i,n,s){if(!r){var o=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=l.from(e,r));return e}(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var h=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},h?h.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else m(t,e,!1,a,i,n,s);return u}(this,s,a,e,r,i)),o},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||_(this,t))},b.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,r,i){var n=this._writableState;"function"==typeof e?(i=e,e=null,r=null):"function"==typeof r&&(i=r,r=null),null!=e&&this.write(e,r),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,r,i){r.ending=!0,S(e,r),i&&(r.finished?t.nextTick(i):e.once("finish",i));r.ended=!0,e.writable=!1}(this,n,i)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),b.prototype.destroy=d.destroy,b.prototype._undestroy=d.undestroy,b.prototype._destroy=function(t,e){this.end(),e(t)},Je}function Pi(){if(rr)return er;rr=1;var t=h.requireProcessNextickArgs(),e=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};er=l;var r=Object.create(h.requireUtil());r.inherits=f.requireInherits();var i=Di(),n=Ii();r.inherits(l,i);for(var s=e(n.prototype),o=0;o<s.length;o++){var a=s[o];l.prototype[a]||(l.prototype[a]=n.prototype[a])}function l(t){if(!(this instanceof l))return new l(t);i.call(this,t),n.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",u)}function u(){this.allowHalfOpen||this._writableState.ended||t.nextTick(c,this)}function c(t){t.end()}return Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),l.prototype._destroy=function(e,r){this.push(null),this.end(),t.nextTick(r,e)},er}function Di(){if(nr)return ir;nr=1;var t=h.requireProcessNextickArgs();ir=w;var e,i=h.requireIsarray();w.ReadableState=_,n.EventEmitter;var s=function(t,e){return t.listeners(e).length},o=$e(),a=Ye().Buffer,u=(void 0!==r.commonjsGlobal?r.commonjsGlobal:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c=Object.create(h.requireUtil());c.inherits=f.requireInherits();var d=l,p=void 0;p=d&&d.debuglog?d.debuglog("stream"):function(){};var y,b=Li(),m=Oi();c.inherits(w,o);var g=["error","close","destroy","pause","resume"];function _(t,r){t=t||{};var i=r instanceof(e=e||Pi());this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,s=t.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(s||0===s)?s:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new b,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(y||(y=h.requireString_decoder().StringDecoder),this.decoder=new y(t.encoding),this.encoding=t.encoding)}function w(t){if(e=e||Pi(),!(this instanceof w))return new w(t);this._readableState=new _(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function v(t,e,r,i,n){var s,o=t._readableState;null===e?(o.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,k(t)}(t,o)):(n||(s=function(t,e){var r;i=e,a.isBuffer(i)||i instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var i;return r}(o,e)),s?t.emit("error",s):o.objectMode||e&&e.length>0?("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),i?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):S(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?S(t,o,e,!1):R(t,o)):S(t,o,e,!1))):i||(o.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(o)}function S(t,e,r,i){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&k(t)),R(t,e)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),w.prototype.destroy=m.destroy,w.prototype._undestroy=m.undestroy,w.prototype._destroy=function(t,e){this.push(null),e(t)},w.prototype.push=function(t,e){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof t&&((e=e||i.defaultEncoding)!==i.encoding&&(t=a.from(t,e),e=""),r=!0),v(this,t,e,!1,r)},w.prototype.unshift=function(t){return v(this,t,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(t){return y||(y=h.requireString_decoder().StringDecoder),this._readableState.decoder=new y(t),this._readableState.encoding=t,this};var E=8388608;function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(e){var r=e._readableState;r.needReadable=!1,r.emittedReadable||(p("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?t.nextTick(T,e):T(e))}function T(t){p("emit readable"),t.emit("readable"),I(t)}function R(e,r){r.readingMore||(r.readingMore=!0,t.nextTick(A,e,r))}function A(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(p("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function L(t){p("readable nexttick read 0"),t.read(0)}function O(t,e){e.reading||(p("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),I(t),e.flowing&&!e.reading&&t.read(0)}function I(t){var e=t._readableState;for(p("flow",e.flowing);e.flowing&&null!==t.read(););}function P(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var i;t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):i=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,i=1,n=r.data;t-=n.length;for(;r=r.next;){var s=r.data,o=t>s.length?s.length:t;if(o===s.length?n+=s:n+=s.slice(0,t),0===(t-=o)){o===s.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(o));break}++i}return e.length-=i,n}(t,e):function(t,e){var r=a.allocUnsafe(t),i=e.head,n=1;i.data.copy(r),t-=i.data.length;for(;i=i.next;){var s=i.data,o=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,o),0===(t-=o)){o===s.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=s.slice(o));break}++n}return e.length-=n,r}(t,e);return i}(t,e.buffer,e.decoder),r);var r}function D(e){var r=e._readableState;if(r.length>0)throw new Error('"endReadable()" called on non-empty stream');r.endEmitted||(r.ended=!0,t.nextTick(M,r,e))}function M(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function C(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}return w.prototype.read=function(t){p("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?D(this):k(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&D(this),null;var i,n=e.needReadable;return p("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&p("length less than watermark",n=!0),e.ended||e.reading?p("reading or ended",n=!1):n&&(p("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(r,e))),null===(i=t>0?P(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&D(this)),null!==i&&this.emit("data",i),i},w.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(e,r){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,r);var a=(!r||!1!==r.end)&&e!==process.stdout&&e!==process.stderr?u:g;function l(t,r){p("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),e.removeListener("close",b),e.removeListener("finish",m),e.removeListener("drain",h),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",u),n.removeListener("end",g),n.removeListener("data",d),c=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function u(){p("onend"),e.end()}o.endEmitted?t.nextTick(a):n.once("end",a),e.on("unpipe",l);var h=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,I(t))}}(n);e.on("drain",h);var c=!1;var f=!1;function d(t){p("ondata"),f=!1,!1!==e.write(t)||f||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==C(o.pipes,e))&&!c&&(p("false write response, pause",o.awaitDrain),o.awaitDrain++,f=!0),n.pause())}function y(t){p("onerror",t),g(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",m),g()}function m(){p("onfinish"),e.removeListener("close",b),g()}function g(){p("unpipe"),n.unpipe(e)}return n.on("data",d),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?i(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(e,"error",y),e.once("close",b),e.once("finish",m),e.emit("pipe",n),o.flowing||(p("pipe resume"),n.resume()),e},w.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=C(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},w.prototype.on=function(e,r){var i=o.prototype.on.call(this,e,r);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&k(this):t.nextTick(L,this))}return i},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var e=this._readableState;return e.flowing||(p("resume"),e.flowing=!0,function(e,r){r.resumeScheduled||(r.resumeScheduled=!0,t.nextTick(O,e,r))}(this,e)),this},w.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",function(){if(p("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(n){(p("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause()))}),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var s=0;s<g.length;s++)t.on(g[s],this.emit.bind(this,g[s]));return this._read=function(e){p("wrapped _read",e),i&&(i=!1,t.resume())},this},Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),w._fromList=P,ir}function Mi(){if(or)return sr;or=1,sr=i;var t=Pi(),e=Object.create(h.requireUtil());function r(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function i(e){if(!(this instanceof i))return new i(e);t.call(this,e),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",n)}function n(){var t=this;"function"==typeof this._flush?this._flush(function(e,r){s(t,e,r)}):s(this,null,null)}function s(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}return e.inherits=f.requireInherits(),e.inherits(i,t),i.prototype.push=function(e,r){return this._transformState.needTransform=!1,t.prototype.push.call(this,e,r)},i.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},i.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},i.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},i.prototype._destroy=function(e,r){var i=this;t.prototype._destroy.call(this,e,function(t){r(t),i.emit("close")})},sr}function Ci(){return ur||(ur=1,t=He,e=He.exports,(r=u)?(t.exports=r,(e=t.exports=r.Readable).Readable=r.Readable,e.Writable=r.Writable,e.Duplex=r.Duplex,e.Transform=r.Transform,e.PassThrough=r.PassThrough,e.Stream=r):((e=t.exports=Di()).Stream=r||e,e.Readable=e,e.Writable=Ii(),e.Duplex=Pi(),e.Transform=Mi(),e.PassThrough=function(){if(lr)return ar;lr=1,ar=r;var t=Mi(),e=Object.create(h.requireUtil());function r(e){if(!(this instanceof r))return new r(e);t.call(this,e)}return e.inherits=f.requireInherits(),e.inherits(r,t),r.prototype._transform=function(t,e,r){r(null,t)},ar}())),He.exports;var t,e,r}function Ni(){if(dr)return fr;dr=1;var t=l,e=cr?hr:(cr=1,hr=Ci().PassThrough);function r(t,e,r){t[e]=function(){return delete t[e],r.apply(this,arguments),this[e].apply(this,arguments)}}function i(t,n){if(!(this instanceof i))return new i(t,n);e.call(this,n),r(this,"_read",function(){var e=t.call(this,n),r=this.emit.bind(this,"error");e.on("error",r),e.pipe(this)}),this.emit("readable")}function n(t,i){if(!(this instanceof n))return new n(t,i);e.call(this,i),r(this,"_write",function(){var e=t.call(this,i),r=this.emit.bind(this,"error");e.on("error",r),this.pipe(e)}),this.emit("writable")}return fr={Readable:i,Writable:n},t.inherits(i,e),t.inherits(n,e),fr}
|
|
1
|
+
"use strict";var t,e,r=require("./_commonjsHelpers-Bjf42z7h.js"),i=require("fs"),n=require("events"),s=require("./transform-build-graph-DgRrocSn.js"),o=require("path"),a=require("./installer-DPj-zT7L.js"),l=require("util"),u=require("stream"),h=require("./string_decoder-CW-j4E6X.js"),c=require("buffer"),f=require("./index-CEojr58e.js"),d=require("node:url"),p=require("node:path"),y=require("node:fs"),b=require("node:fs/promises"),m=require("node:events"),g=require("node:stream"),w=require("node:string_decoder"),v=require("./crc32-Cc3OMFYk.js"),S=require("zlib");function E(t,e){return e.forEach(function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(function(r){if("default"!==r&&!(r in t)){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}})}),Object.freeze(t)}function x(){if(e)return t;e=1,t=d;const r=i,{EventEmitter:a}=n,{Minimatch:l}=s.requireCommonjs(),{resolve:u}=o;function h(t,e){return new Promise((i,n)=>{(e?r.stat:r.lstat)(t,(r,n)=>{if(r)if("ENOENT"===r.code)i(e?h(t,!1):null);else i(null);else i(n)})})}async function*c(t,e,i,n,s,o){let a=await function(t,e){return new Promise((i,n)=>{r.readdir(t,{withFileTypes:!0},(t,r)=>{if(t)switch(t.code){case"ENOTDIR":e?n(t):i([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":i([]);break;default:n(t)}else i(r)})})}(e+t,o);for(const r of a){let o=r.name;void 0===o&&(o=r,n=!0);const a=t+"/"+o,l=a.slice(1),u=e+"/"+l;let f=null;(n||i)&&(f=await h(u,i)),f||void 0===r.name||(f=r),null===f&&(f={isDirectory:()=>!1}),f.isDirectory()?s(l)||(yield{relative:l,absolute:u,stats:f},yield*c(a,e,i,n,s,!1)):yield{relative:l,absolute:u,stats:f}}}class f extends a{constructor(t,e,r){if(super(),"function"==typeof e&&(r=e,e=null),this.options=function(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}(e||{}),this.matchers=[],this.options.pattern){const t=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=t.map(t=>new l(t,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){const t=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=t.map(t=>new l(t,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){const t=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=t.map(t=>new l(t,{dot:!0}))}this.iterator=async function*(t,e,r,i){yield*c("",t,e,r,i,!0)}(u(t||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,r&&(this._matches=[],this.on("match",t=>this._matches.push(this.options.absolute?t.absolute:t.relative)),this.on("error",t=>r(t)),this.on("end",()=>r(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(t){return this.skipMatchers.some(e=>e.match(t))}_fileMatches(t,e){const r=t+(e?"/":"");return(0===this.matchers.length||this.matchers.some(t=>t.match(r)))&&!this.ignoreMatchers.some(t=>t.match(r))&&(!this.options.nodir||!e)}_next(){this.paused||this.aborted?this.inactive=!0:this.iterator.next().then(t=>{if(t.done)this.emit("end");else{const e=t.value.stats.isDirectory();if(this._fileMatches(t.value.relative,e)){let r=t.value.relative,i=t.value.absolute;this.options.mark&&e&&(r+="/",i+="/"),this.options.stat?this.emit("match",{relative:r,absolute:i,stat:t.value.stats}):this.emit("match",{relative:r,absolute:i})}this._next(this.iterator)}}).catch(t=>{this.abort(),this.emit("error",t),t.code||this.options.silent||console.error(t)})}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}}function d(t,e,r){return new f(t,e,r)}return d.ReaddirGlob=f,t}function k(t,...e){return(...r)=>t(...e,...r)}function T(t){return function(...e){var r=e.pop();return t.call(this,e,r)}}var R="function"==typeof queueMicrotask&&queueMicrotask,A="function"==typeof setImmediate&&setImmediate,L="object"==typeof process&&"function"==typeof process.nextTick;function O(t){setTimeout(t,0)}function I(t){return(e,...r)=>t(()=>e(...r))}var P=I(R?queueMicrotask:A?setImmediate:L?process.nextTick:O);function D(t){return N(t)?function(...e){const r=e.pop();return M(t.apply(this,e),r)}:T(function(e,r){var i;try{i=t.apply(this,e)}catch(t){return r(t)}if(i&&"function"==typeof i.then)return M(i,r);r(null,i)})}function M(t,e){return t.then(t=>{C(e,null,t)},t=>{C(e,t&&(t instanceof Error||t.message)?t:new Error(t))})}function C(t,e,r){try{t(e,r)}catch(t){P(t=>{throw t},t)}}function N(t){return"AsyncFunction"===t[Symbol.toStringTag]}function j(t){if("function"!=typeof t)throw new Error("expected a function");return N(t)?D(t):t}function F(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[e-1]?t.apply(this,r):new Promise((i,n)=>{r[e-1]=(t,...e)=>{if(t)return n(t);i(e.length>1?e:e[0])},t.apply(this,r)})}}function B(t){return function(e,...r){return F(function(i){var n=this;return t(e,(t,e)=>{j(t).apply(n,r.concat(e))},i)})}}function z(t,e,r,i){e=e||[];var n=[],s=0,o=j(r);return t(e,(t,e,r)=>{var i=s++;o(t,(t,e)=>{n[i]=e,r(t)})},t=>{i(t,n)})}function W(t){return t&&"number"==typeof t.length&&t.length>=0&&t.length%1==0}const U={};function G(t){function e(...e){if(null!==t){var r=t;t=null,r.apply(this,e)}}return Object.assign(e,t),e}function q(t){if(W(t))return function(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}(t);var e,r,i,n,s=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()}(t);return s?function(t){var e=-1;return function(){var r=t.next();return r.done?null:(e++,{value:r.value,key:e})}}(s):(r=(e=t)?Object.keys(e):[],i=-1,n=r.length,function t(){var s=r[++i];return"__proto__"===s?t():i<n?{value:e[s],key:s}:null})}function H(t){return function(...e){if(null===t)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}function $(t,e,r,i){let n=!1,s=!1,o=!1,a=0,l=0;function u(){a>=e||o||n||(o=!0,t.next().then(({value:t,done:e})=>{if(!s&&!n){if(o=!1,e)return n=!0,void(a<=0&&i(null));a++,r(t,l,h),l++,u()}}).catch(c))}function h(t,e){if(a-=1,!s)return t?c(t):!1===t?(n=!0,void(s=!0)):e===U||n&&a<=0?(n=!0,i(null)):void u()}function c(t){s||(o=!1,n=!0,i(t))}u()}var V=t=>(e,r,i)=>{if(i=G(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if("AsyncGenerator"===e[Symbol.toStringTag])return $(e,t,r,i);if(function(t){return"function"==typeof t[Symbol.asyncIterator]}(e))return $(e[Symbol.asyncIterator](),t,r,i);var n=q(e),s=!1,o=!1,a=0,l=!1;function u(t,e){if(!o)if(a-=1,t)s=!0,i(t);else if(!1===t)s=!0,o=!0;else{if(e===U||s&&a<=0)return s=!0,i(null);l||h()}}function h(){for(l=!0;a<t&&!s;){var e=n();if(null===e)return s=!0,void(a<=0&&i(null));a+=1,r(e.value,e.key,H(u))}l=!1}h()};var Z=F(function(t,e,r,i){return V(e)(t,j(r),i)},4);function Y(t,e,r){r=G(r);var i=0,n=0,{length:s}=t,o=!1;function a(t,e){!1===t&&(o=!0),!0!==o&&(t?r(t):++n!==s&&e!==U||r(null))}for(0===s&&r(null);i<s;i++)e(t[i],i,H(a))}function Q(t,e,r){return Z(t,1/0,e,r)}var K=F(function(t,e,r){return(W(t)?Y:Q)(t,j(e),r)},3);var X=F(function(t,e,r){return z(K,t,e,r)},3),J=B(X);var tt=F(function(t,e,r){return Z(t,1,e,r)},3);var et=F(function(t,e,r){return z(tt,t,e,r)},3),rt=B(et);const it=Symbol("promiseCallback");function nt(){let t,e;function r(r,...i){if(r)return e(r);t(i.length>1?i:i[0])}return r[it]=new Promise((r,i)=>{t=r,e=i}),r}function st(t,e,r){"number"!=typeof e&&(r=e,e=null),r=G(r||nt());var i=Object.keys(t).length;if(!i)return r(null);e||(e=i);var n={},s=0,o=!1,a=!1,l=Object.create(null),u=[],h=[],c={};function f(t,e){u.push(()=>function(t,e){if(a)return;var i=H((e,...i)=>{if(s--,!1!==e)if(i.length<2&&([i]=i),e){var u={};if(Object.keys(n).forEach(t=>{u[t]=n[t]}),u[t]=i,a=!0,l=Object.create(null),o)return;r(e,u)}else n[t]=i,(l[t]||[]).forEach(t=>t()),d();else o=!0});s++;var u=j(e[e.length-1]);e.length>1?u(n,i):u(i)}(t,e))}function d(){if(!o){if(0===u.length&&0===s)return r(null,n);for(;u.length&&s<e;){u.shift()()}}}function p(e){var r=[];return Object.keys(t).forEach(i=>{const n=t[i];Array.isArray(n)&&n.indexOf(e)>=0&&r.push(i)}),r}return Object.keys(t).forEach(e=>{var r=t[e];if(!Array.isArray(r))return f(e,[r]),void h.push(e);var i=r.slice(0,r.length-1),n=i.length;if(0===n)return f(e,r),void h.push(e);c[e]=n,i.forEach(s=>{if(!t[s])throw new Error("async.auto task `"+e+"` has a non-existent dependency `"+s+"` in "+i.join(", "));!function(t,e){var r=l[t];r||(r=l[t]=[]);r.push(e)}(s,()=>{0===--n&&f(e,r)})})}),function(){var t=0;for(;h.length;)t++,p(h.pop()).forEach(t=>{0===--c[t]&&h.push(t)});if(t!==i)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),d(),r[it]}var ot=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,at=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,lt=/,/,ut=/(=.+)?(\s*)$/;function ht(t,e){var r={};return Object.keys(t).forEach(e=>{var i,n=t[e],s=N(n),o=!s&&1===n.length||s&&0===n.length;if(Array.isArray(n))i=[...n],n=i.pop(),r[e]=i.concat(i.length>0?a:n);else if(o)r[e]=n;else{if(i=function(t){const e=function(t){let e="",r=0,i=t.indexOf("*/");for(;r<t.length;)if("/"===t[r]&&"/"===t[r+1]){let e=t.indexOf("\n",r);r=-1===e?t.length:e}else if(-1!==i&&"/"===t[r]&&"*"===t[r+1]){let n=t.indexOf("*/",r);-1!==n?(r=n+2,i=t.indexOf("*/",r)):(e+=t[r],r++)}else e+=t[r],r++;return e}(t.toString());let r=e.match(ot);if(r||(r=e.match(at)),!r)throw new Error("could not parse args in autoInject\nSource:\n"+e);let[,i]=r;return i.replace(/\s/g,"").split(lt).map(t=>t.replace(ut,"").trim())}(n),0===n.length&&!s&&0===i.length)throw new Error("autoInject task functions require explicit parameters.");s||i.pop(),r[e]=i.concat(a)}function a(t,e){var r=i.map(e=>t[e]);r.push(e),j(n)(...r)}}),st(r,e)}class ct{constructor(){this.head=this.tail=null,this.length=0}removeLink(t){return t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev,t.prev=t.next=null,this.length-=1,t}empty(){for(;this.head;)this.shift();return this}insertAfter(t,e){e.prev=t,e.next=t.next,t.next?t.next.prev=e:this.tail=e,t.next=e,this.length+=1}insertBefore(t,e){e.prev=t.prev,e.next=t,t.prev?t.prev.next=e:this.head=e,t.prev=e,this.length+=1}unshift(t){this.head?this.insertBefore(this.head,t):ft(this,t)}push(t){this.tail?this.insertAfter(this.tail,t):ft(this,t)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var t=this.head;t;)yield t.data,t=t.next}remove(t){for(var e=this.head;e;){var{next:r}=e;t(e)&&this.removeLink(e),e=r}return this}}function ft(t,e){t.length=1,t.head=t.tail=e}function dt(t,e,r){if(null==e)e=1;else if(0===e)throw new RangeError("Concurrency must not be zero");var i=j(t),n=0,s=[];const o={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(t,e){return t?e?void(o[t]=o[t].filter(t=>t!==e)):o[t]=[]:Object.keys(o).forEach(t=>o[t]=[])}function l(t,...e){o[t].forEach(t=>t(...e))}var u=!1;function h(t,e,r,i){if(null!=i&&"function"!=typeof i)throw new Error("task callback must be a function");var n,s;function o(t,...e){return t?r?s(t):n():e.length<=1?n(e[0]):void n(e)}y.started=!0;var a=y._createTaskItem(t,r?o:i||o);if(e?y._tasks.unshift(a):y._tasks.push(a),u||(u=!0,P(()=>{u=!1,y.process()})),r||!i)return new Promise((t,e)=>{n=t,s=e})}function c(t){return function(e,...r){n-=1;for(var i=0,o=t.length;i<o;i++){var a=t[i],u=s.indexOf(a);0===u?s.shift():u>0&&s.splice(u,1),a.callback(e,...r),null!=e&&l("error",e,a.data)}n<=y.concurrency-y.buffer&&l("unsaturated"),y.idle()&&l("drain"),y.process()}}function f(t){return!(0!==t.length||!y.idle())&&(P(()=>l("drain")),!0)}const d=t=>e=>{if(!e)return new Promise((e,r)=>{!function(t,e){const r=(...i)=>{a(t,r),e(...i)};o[t].push(r)}(t,(t,i)=>{if(t)return r(t);e(i)})});a(t),function(t,e){o[t].push(e)}(t,e)};var p=!1,y={_tasks:new ct,_createTaskItem:(t,e)=>({data:t,callback:e}),*[Symbol.iterator](){yield*y._tasks[Symbol.iterator]()},concurrency:e,payload:r,buffer:e/4,started:!1,paused:!1,push(t,e){if(Array.isArray(t)){if(f(t))return;return t.map(t=>h(t,!1,!1,e))}return h(t,!1,!1,e)},pushAsync(t,e){if(Array.isArray(t)){if(f(t))return;return t.map(t=>h(t,!1,!0,e))}return h(t,!1,!0,e)},kill(){a(),y._tasks.empty()},unshift(t,e){if(Array.isArray(t)){if(f(t))return;return t.map(t=>h(t,!0,!1,e))}return h(t,!0,!1,e)},unshiftAsync(t,e){if(Array.isArray(t)){if(f(t))return;return t.map(t=>h(t,!0,!0,e))}return h(t,!0,!0,e)},remove(t){y._tasks.remove(t)},process(){if(!p){for(p=!0;!y.paused&&n<y.concurrency&&y._tasks.length;){var t=[],e=[],r=y._tasks.length;y.payload&&(r=Math.min(r,y.payload));for(var o=0;o<r;o++){var a=y._tasks.shift();t.push(a),s.push(a),e.push(a.data)}n+=1,0===y._tasks.length&&l("empty"),n===y.concurrency&&l("saturated");var u=H(c(t));i(e,u)}p=!1}},length:()=>y._tasks.length,running:()=>n,workersList:()=>s,idle:()=>y._tasks.length+n===0,pause(){y.paused=!0},resume(){!1!==y.paused&&(y.paused=!1,P(y.process))}};return Object.defineProperties(y,{saturated:{writable:!1,value:d("saturated")},unsaturated:{writable:!1,value:d("unsaturated")},empty:{writable:!1,value:d("empty")},drain:{writable:!1,value:d("drain")},error:{writable:!1,value:d("error")}}),y}function pt(t,e){return dt(t,1,e)}function yt(t,e,r){return dt(t,e,r)}var bt=F(function(t,e,r,i){i=G(i);var n=j(r);return tt(t,(t,r,i)=>{n(e,t,(t,r)=>{e=r,i(t)})},t=>i(t,e))},4);function mt(...t){var e=t.map(j);return function(...t){var r=this,i=t[t.length-1];return"function"==typeof i?t.pop():i=nt(),bt(e,t,(t,e,i)=>{e.apply(r,t.concat((t,...e)=>{i(t,e)}))},(t,e)=>i(t,...e)),i[it]}}function gt(...t){return mt(...t.reverse())}var _t=F(function(t,e,r,i){return z(V(e),t,r,i)},4);var wt=F(function(t,e,r,i){var n=j(r);return _t(t,e,(t,e)=>{n(t,(t,...r)=>t?e(t):e(t,r))},(t,e)=>{for(var r=[],n=0;n<e.length;n++)e[n]&&(r=r.concat(...e[n]));return i(t,r)})},4);var vt=F(function(t,e,r){return wt(t,1/0,e,r)},3);var St=F(function(t,e,r){return wt(t,1,e,r)},3);function Et(...t){return function(...e){return e.pop()(null,...t)}}function xt(t,e){return(r,i,n,s)=>{var o,a=!1;const l=j(n);r(i,(r,i,n)=>{l(r,(i,s)=>i||!1===i?n(i):t(s)&&!o?(a=!0,o=e(!0,r),n(null,U)):void n())},t=>{if(t)return s(t);s(null,a?o:e(!1))})}}var kt=F(function(t,e,r){return xt(t=>t,(t,e)=>e)(K,t,e,r)},3);var Tt=F(function(t,e,r,i){return xt(t=>t,(t,e)=>e)(V(e),t,r,i)},4);var Rt=F(function(t,e,r){return xt(t=>t,(t,e)=>e)(V(1),t,e,r)},3);function At(t){return(e,...r)=>j(e)(...r,(e,...r)=>{"object"==typeof console&&(e?console.error&&console.error(e):console[t]&&r.forEach(e=>console[t](e)))})}var Lt=At("dir");var Ot=F(function(t,e,r){r=H(r);var i,n=j(t),s=j(e);function o(t,...e){if(t)return r(t);!1!==t&&(i=e,s(...e,a))}function a(t,e){return t?r(t):!1!==t?e?void n(o):r(null,...i):void 0}return a(null,!0)},3);function It(t,e,r){const i=j(e);return Ot(t,(...t)=>{const e=t.pop();i(...t,(t,r)=>e(t,!r))},r)}function Pt(t){return(e,r,i)=>t(e,i)}var Dt=F(function(t,e,r){return K(t,Pt(j(e)),r)},3);var Mt=F(function(t,e,r,i){return V(e)(t,Pt(j(r)),i)},4);var Ct=F(function(t,e,r){return Mt(t,1,e,r)},3);function Nt(t){return N(t)?t:function(...e){var r=e.pop(),i=!0;e.push((...t)=>{i?P(()=>r(...t)):r(...t)}),t.apply(this,e),i=!1}}var jt=F(function(t,e,r){return xt(t=>!t,t=>!t)(K,t,e,r)},3);var Ft=F(function(t,e,r,i){return xt(t=>!t,t=>!t)(V(e),t,r,i)},4);var Bt=F(function(t,e,r){return xt(t=>!t,t=>!t)(tt,t,e,r)},3);function zt(t,e,r,i){var n=new Array(e.length);t(e,(t,e,i)=>{r(t,(t,r)=>{n[e]=!!r,i(t)})},t=>{if(t)return i(t);for(var r=[],s=0;s<e.length;s++)n[s]&&r.push(e[s]);i(null,r)})}function Wt(t,e,r,i){var n=[];t(e,(t,e,i)=>{r(t,(r,s)=>{if(r)return i(r);s&&n.push({index:e,value:t}),i(r)})},t=>{if(t)return i(t);i(null,n.sort((t,e)=>t.index-e.index).map(t=>t.value))})}function Ut(t,e,r,i){return(W(e)?zt:Wt)(t,e,j(r),i)}var Gt=F(function(t,e,r){return Ut(K,t,e,r)},3);var qt=F(function(t,e,r,i){return Ut(V(e),t,r,i)},4);var Ht=F(function(t,e,r){return Ut(tt,t,e,r)},3);var $t=F(function(t,e){var r=H(e),i=j(Nt(t));return function t(e){if(e)return r(e);!1!==e&&i(t)}()},2);var Vt=F(function(t,e,r,i){var n=j(r);return _t(t,e,(t,e)=>{n(t,(r,i)=>r?e(r):e(r,{key:i,val:t}))},(t,e)=>{for(var r={},{hasOwnProperty:n}=Object.prototype,s=0;s<e.length;s++)if(e[s]){var{key:o}=e[s],{val:a}=e[s];n.call(r,o)?r[o].push(a):r[o]=[a]}return i(t,r)})},4);function Zt(t,e,r){return Vt(t,1/0,e,r)}function Yt(t,e,r){return Vt(t,1,e,r)}var Qt=At("log");var Kt=F(function(t,e,r,i){i=G(i);var n={},s=j(r);return V(e)(t,(t,e,r)=>{s(t,e,(t,i)=>{if(t)return r(t);n[e]=i,r(t)})},t=>i(t,n))},4);function Xt(t,e,r){return Kt(t,1/0,e,r)}function Jt(t,e,r){return Kt(t,1,e,r)}function te(t,e=t=>t){var r=Object.create(null),i=Object.create(null),n=j(t),s=T((t,s)=>{var o=e(...t);o in r?P(()=>s(null,...r[o])):o in i?i[o].push(s):(i[o]=[s],n(...t,(t,...e)=>{t||(r[o]=e);var n=i[o];delete i[o];for(var s=0,a=n.length;s<a;s++)n[s](t,...e)}))});return s.memo=r,s.unmemoized=t,s}var ee=I(L?process.nextTick:A?setImmediate:O),re=F((t,e,r)=>{var i=W(e)?[]:{};t(e,(t,e,r)=>{j(t)((t,...n)=>{n.length<2&&([n]=n),i[e]=n,r(t)})},t=>r(t,i))},3);function ie(t,e){return re(K,t,e)}function ne(t,e,r){return re(V(e),t,r)}function se(t,e){var r=j(t);return dt((t,e)=>{r(t[0],e)},e,1)}class oe{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(t){let e;for(;t>0&&ue(this.heap[t],this.heap[e=le(t)]);){let r=this.heap[t];this.heap[t]=this.heap[e],this.heap[e]=r,t=e}}percDown(t){let e;for(;(e=ae(t))<this.heap.length&&(e+1<this.heap.length&&ue(this.heap[e+1],this.heap[e])&&(e+=1),!ue(this.heap[t],this.heap[e]));){let r=this.heap[t];this.heap[t]=this.heap[e],this.heap[e]=r,t=e}}push(t){t.pushCount=++this.pushCount,this.heap.push(t),this.percUp(this.heap.length-1)}unshift(t){return this.heap.push(t)}shift(){let[t]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),t}toArray(){return[...this]}*[Symbol.iterator](){for(let t=0;t<this.heap.length;t++)yield this.heap[t].data}remove(t){let e=0;for(let r=0;r<this.heap.length;r++)t(this.heap[r])||(this.heap[e]=this.heap[r],e++);this.heap.splice(e);for(let t=le(this.heap.length-1);t>=0;t--)this.percDown(t);return this}}function ae(t){return 1+(t<<1)}function le(t){return(t+1>>1)-1}function ue(t,e){return t.priority!==e.priority?t.priority<e.priority:t.pushCount<e.pushCount}function he(t,e){var r=se(t,e),{push:i,pushAsync:n}=r;function s(t,e){return Array.isArray(t)?t.map(t=>({data:t,priority:e})):{data:t,priority:e}}return r._tasks=new oe,r._createTaskItem=({data:t,priority:e},r)=>({data:t,priority:e,callback:r}),r.push=function(t,e=0,r){return i(s(t,e),r)},r.pushAsync=function(t,e=0,r){return n(s(t,e),r)},delete r.unshift,delete r.unshiftAsync,r}var ce=F(function(t,e){if(e=G(e),!Array.isArray(t))return e(new TypeError("First argument to race must be an array of functions"));if(!t.length)return e();for(var r=0,i=t.length;r<i;r++)j(t[r])(e)},2);function fe(t,e,r,i){var n=[...t].reverse();return bt(n,e,r,i)}function de(t){var e=j(t);return T(function(t,r){return t.push((t,...e)=>{let i={};if(t&&(i.error=t),e.length>0){var n=e;e.length<=1&&([n]=e),i.value=n}r(null,i)}),e.apply(this,t)})}function pe(t){var e;return Array.isArray(t)?e=t.map(de):(e={},Object.keys(t).forEach(r=>{e[r]=de.call(this,t[r])})),e}function ye(t,e,r,i){const n=j(r);return Ut(t,e,(t,e)=>{n(t,(t,r)=>{e(t,!r)})},i)}var be=F(function(t,e,r){return ye(K,t,e,r)},3);var me=F(function(t,e,r,i){return ye(V(e),t,r,i)},4);var ge=F(function(t,e,r){return ye(tt,t,e,r)},3);function _e(t){return function(){return t}}function we(t,e,r){var i={times:5,intervalFunc:_e(0)};if(arguments.length<3&&"function"==typeof t?(r=e||nt(),e=t):(!function(t,e){if("object"==typeof e)t.times=+e.times||5,t.intervalFunc="function"==typeof e.interval?e.interval:_e(+e.interval||0),t.errorFilter=e.errorFilter;else{if("number"!=typeof e&&"string"!=typeof e)throw new Error("Invalid arguments for async.retry");t.times=+e||5}}(i,t),r=r||nt()),"function"!=typeof e)throw new Error("Invalid arguments for async.retry");var n=j(e),s=1;return function t(){n((e,...n)=>{!1!==e&&(e&&s++<i.times&&("function"!=typeof i.errorFilter||i.errorFilter(e))?setTimeout(t,i.intervalFunc(s-1)):r(e,...n))})}(),r[it]}function ve(t,e){e||(e=t,t=null);let r=t&&t.arity||e.length;N(e)&&(r+=1);var i=j(e);return T((e,n)=>{function s(t){i(...e,t)}return(e.length<r-1||null==n)&&(e.push(n),n=nt()),t?we(t,s,n):we(s,n),n[it]})}function Se(t,e){return re(tt,t,e)}var Ee=F(function(t,e,r){return xt(Boolean,t=>t)(K,t,e,r)},3);var xe=F(function(t,e,r,i){return xt(Boolean,t=>t)(V(e),t,r,i)},4);var ke=F(function(t,e,r){return xt(Boolean,t=>t)(tt,t,e,r)},3);var Te=F(function(t,e,r){var i=j(e);return X(t,(t,e)=>{i(t,(r,i)=>{if(r)return e(r);e(r,{value:t,criteria:i})})},(t,e)=>{if(t)return r(t);r(null,e.sort(n).map(t=>t.value))});function n(t,e){var r=t.criteria,i=e.criteria;return r<i?-1:r>i?1:0}},3);function Re(t,e,r){var i=j(t);return T((n,s)=>{var o,a=!1;n.push((...t)=>{a||(s(...t),clearTimeout(o))}),o=setTimeout(function(){var e=t.name||"anonymous",i=new Error('Callback function "'+e+'" timed out.');i.code="ETIMEDOUT",r&&(i.info=r),a=!0,s(i)},e),i(...n)})}function Ae(t,e,r,i){var n=j(r);return _t(function(t){for(var e=Array(t);t--;)e[t]=t;return e}(t),e,n,i)}function Le(t,e,r){return Ae(t,1/0,e,r)}function Oe(t,e,r){return Ae(t,1,e,r)}function Ie(t,e,r,i){arguments.length<=3&&"function"==typeof e&&(i=r,r=e,e=Array.isArray(t)?[]:{}),i=G(i||nt());var n=j(r);return K(t,(t,r,i)=>{n(e,t,r,i)},t=>i(t,e)),i[it]}var Pe=F(function(t,e){var r,i=null;return Ct(t,(t,e)=>{j(t)((t,...n)=>{if(!1===t)return e(t);n.length<2?[r]=n:r=n,i=t,e(t?null:{})})},()=>e(i,r))});function De(t){return(...e)=>(t.unmemoized||t)(...e)}var Me=F(function(t,e,r){r=H(r);var i=j(e),n=j(t),s=[];function o(t,...e){if(t)return r(t);s=e,!1!==t&&n(a)}function a(t,e){return t?r(t):!1!==t?e?void i(o):r(null,...s):void 0}return n(a)},3);function Ce(t,e,r){const i=j(t);return Me(t=>i((e,r)=>t(e,!r)),e,r)}var Ne,je,Fe=F(function(t,e){if(e=G(e),!Array.isArray(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();var r=0;function i(e){j(t[r++])(...e,H(n))}function n(n,...s){if(!1!==n)return n||r===t.length?e(n,...s):void i(s)}i([])}),Be={apply:k,applyEach:J,applyEachSeries:rt,asyncify:D,auto:st,autoInject:ht,cargo:pt,cargoQueue:yt,compose:gt,concat:vt,concatLimit:wt,concatSeries:St,constant:Et,detect:kt,detectLimit:Tt,detectSeries:Rt,dir:Lt,doUntil:It,doWhilst:Ot,each:Dt,eachLimit:Mt,eachOf:K,eachOfLimit:Z,eachOfSeries:tt,eachSeries:Ct,ensureAsync:Nt,every:jt,everyLimit:Ft,everySeries:Bt,filter:Gt,filterLimit:qt,filterSeries:Ht,forever:$t,groupBy:Zt,groupByLimit:Vt,groupBySeries:Yt,log:Qt,map:X,mapLimit:_t,mapSeries:et,mapValues:Xt,mapValuesLimit:Kt,mapValuesSeries:Jt,memoize:te,nextTick:ee,parallel:ie,parallelLimit:ne,priorityQueue:he,queue:se,race:ce,reduce:bt,reduceRight:fe,reflect:de,reflectAll:pe,reject:be,rejectLimit:me,rejectSeries:ge,retry:we,retryable:ve,seq:mt,series:Se,setImmediate:P,some:Ee,someLimit:xe,someSeries:ke,sortBy:Te,timeout:Re,times:Le,timesLimit:Ae,timesSeries:Oe,transform:Ie,tryEach:Pe,unmemoize:De,until:Ce,waterfall:Fe,whilst:Me,all:jt,allLimit:Ft,allSeries:Bt,any:Ee,anyLimit:xe,anySeries:ke,find:kt,findLimit:Tt,findSeries:Rt,flatMap:vt,flatMapLimit:wt,flatMapSeries:St,forEach:Dt,forEachSeries:Ct,forEachLimit:Mt,forEachOf:K,forEachOfSeries:tt,forEachOfLimit:Z,inject:bt,foldl:bt,foldr:fe,select:Gt,selectLimit:qt,selectSeries:Ht,wrapSync:D,during:Me,doDuring:Ot},ze=Object.freeze({__proto__:null,all:jt,allLimit:Ft,allSeries:Bt,any:Ee,anyLimit:xe,anySeries:ke,apply:k,applyEach:J,applyEachSeries:rt,asyncify:D,auto:st,autoInject:ht,cargo:pt,cargoQueue:yt,compose:gt,concat:vt,concatLimit:wt,concatSeries:St,constant:Et,default:Be,detect:kt,detectLimit:Tt,detectSeries:Rt,dir:Lt,doDuring:Ot,doUntil:It,doWhilst:Ot,during:Me,each:Dt,eachLimit:Mt,eachOf:K,eachOfLimit:Z,eachOfSeries:tt,eachSeries:Ct,ensureAsync:Nt,every:jt,everyLimit:Ft,everySeries:Bt,filter:Gt,filterLimit:qt,filterSeries:Ht,find:kt,findLimit:Tt,findSeries:Rt,flatMap:vt,flatMapLimit:wt,flatMapSeries:St,foldl:bt,foldr:fe,forEach:Dt,forEachLimit:Mt,forEachOf:K,forEachOfLimit:Z,forEachOfSeries:tt,forEachSeries:Ct,forever:$t,groupBy:Zt,groupByLimit:Vt,groupBySeries:Yt,inject:bt,log:Qt,map:X,mapLimit:_t,mapSeries:et,mapValues:Xt,mapValuesLimit:Kt,mapValuesSeries:Jt,memoize:te,nextTick:ee,parallel:ie,parallelLimit:ne,priorityQueue:he,queue:se,race:ce,reduce:bt,reduceRight:fe,reflect:de,reflectAll:pe,reject:be,rejectLimit:me,rejectSeries:ge,retry:we,retryable:ve,select:Gt,selectLimit:qt,selectSeries:Ht,seq:mt,series:Se,setImmediate:P,some:Ee,someLimit:xe,someSeries:ke,sortBy:Te,timeout:Re,times:Le,timesLimit:Ae,timesSeries:Oe,transform:Ie,tryEach:Pe,unmemoize:De,until:Ce,waterfall:Fe,whilst:Me,wrapSync:D}),We=r.getAugmentedNamespace(ze),Ue={exports:{}};var Ge,qe,He={exports:{}};function $e(){return qe?Ge:(qe=1,Ge=u)}var Ve,Ze={exports:{}};function Ye(){return Ve||(Ve=1,function(t,e){var r=c,i=r.Buffer;function n(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(n(r,e),e.Buffer=s),n(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}}(Ze,Ze.exports)),Ze.exports}var Qe,Ke,Xe,Je,tr,er,rr,ir,nr,sr,or,ar,lr,ur,hr,cr,fr,dr,pr,yr,br,mr,gr,_r,wr,vr,Sr,Er,xr,kr,Tr,Rr,Ar,Lr,Or,Ir,Pr,Dr,Mr,Cr,Nr,jr,Fr,Br,zr,Wr,Ur,Gr,qr,Hr,$r,Vr,Zr,Yr,Qr,Kr,Xr,Jr,ti,ei,ri,ii,ni,si,oi,ai,li,ui,hi,ci,fi,di,pi,yi,bi,mi,gi,_i,wi,vi,Si,Ei,xi,ki,Ti,Ri,Ai={exports:{}};function Li(){return Qe||(Qe=1,function(t){var e=Ye().Buffer,r=l;function i(t,e,r){t.copy(e,r)}t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return e.alloc(0);for(var r=e.allocUnsafe(t>>>0),n=this.head,s=0;n;)i(n.data,r,s),s+=n.data.length,n=n.next;return r},t}(),r&&r.inspect&&r.inspect.custom&&(t.exports.prototype[r.inspect.custom]=function(){var t=r.inspect({length:this.length});return this.constructor.name+" "+t})}(Ai)),Ai.exports}function Oi(){if(Xe)return Ke;Xe=1;var t=h.requireProcessNextickArgs();function e(t,e){t.emit("error",e)}return Ke={destroy:function(r,i){var n=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(i?i(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(e,this,r)):t.nextTick(e,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(r){!i&&r?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,t.nextTick(e,n,r)):t.nextTick(e,n,r):i&&i(r)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}function Ii(){if(tr)return Je;tr=1;var t=h.requireProcessNextickArgs();function e(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var i=t.entry;t.entry=null;for(;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}(e,t)}}Je=b;var i,n=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:t.nextTick;b.WritableState=y;var s=Object.create(h.requireUtil());s.inherits=f.requireInherits();var o={deprecate:h.requireNode()},a=$e(),l=Ye().Buffer,u=(void 0!==r.commonjsGlobal?r.commonjsGlobal:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,d=Oi();function p(){}function y(r,s){i=i||Pi(),r=r||{};var o=s instanceof i;this.objectMode=!!r.objectMode,o&&(this.objectMode=this.objectMode||!!r.writableObjectMode);var a=r.highWaterMark,l=r.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:o&&(l||0===l)?l:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===r.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=r.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,r){var i=e._writableState,s=i.sync,o=i.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(i),r)!function(e,r,i,n,s){--r.pendingcb,i?(t.nextTick(s,n),t.nextTick(S,e,r),e._writableState.errorEmitted=!0,e.emit("error",n)):(s(n),e._writableState.errorEmitted=!0,e.emit("error",n),S(e,r))}(e,i,s,r,o);else{var a=w(i);a||i.corked||i.bufferProcessing||!i.bufferedRequest||_(e,i),s?n(g,e,i,a,o):g(e,i,a,o)}}(s,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function b(t){if(i=i||Pi(),!(c.call(b,this)||this instanceof i))return new b(t);this._writableState=new y(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function m(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function g(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),S(t,e)}function _(t,r){r.bufferProcessing=!0;var i=r.bufferedRequest;if(t._writev&&i&&i.next){var n=r.bufferedRequestCount,s=new Array(n),o=r.corkedRequestsFree;o.entry=i;for(var a=0,l=!0;i;)s[a]=i,i.isBuf||(l=!1),i=i.next,a+=1;s.allBuffers=l,m(t,r,!0,r.length,s,"",o.finish),r.pendingcb++,r.lastBufferedRequest=null,o.next?(r.corkedRequestsFree=o.next,o.next=null):r.corkedRequestsFree=new e(r),r.bufferedRequestCount=0}else{for(;i;){var u=i.chunk,h=i.encoding,c=i.callback;if(m(t,r,!1,r.objectMode?1:u.length,u,h,c),i=i.next,r.bufferedRequestCount--,r.writing)break}null===i&&(r.lastBufferedRequest=null)}r.bufferedRequest=i,r.bufferProcessing=!1}function w(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function v(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),S(t,e)})}function S(e,r){var i=w(r);return i&&(!function(e,r){r.prefinished||r.finalCalled||("function"==typeof e._final?(r.pendingcb++,r.finalCalled=!0,t.nextTick(v,e,r)):(r.prefinished=!0,e.emit("prefinish")))}(e,r),0===r.pendingcb&&(r.finished=!0,e.emit("finish"))),i}return s.inherits(b,a),y.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(y.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(t){return!!c.call(this,t)||this===b&&(t&&t._writableState instanceof y)}})):c=function(t){return t instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,r,i){var n,s=this._writableState,o=!1,a=!s.objectMode&&(n=e,l.isBuffer(n)||n instanceof u);return a&&!l.isBuffer(e)&&(e=function(t){return l.from(t)}(e)),"function"==typeof r&&(i=r,r=null),a?r="buffer":r||(r=s.defaultEncoding),"function"!=typeof i&&(i=p),s.ended?function(e,r){var i=new Error("write after end");e.emit("error",i),t.nextTick(r,i)}(this,i):(a||function(e,r,i,n){var s=!0,o=!1;return null===i?o=new TypeError("May not write null values to stream"):"string"==typeof i||void 0===i||r.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),t.nextTick(n,o),s=!1),s}(this,s,e,i))&&(s.pendingcb++,o=function(t,e,r,i,n,s){if(!r){var o=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=l.from(e,r));return e}(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var h=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},h?h.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else m(t,e,!1,a,i,n,s);return u}(this,s,a,e,r,i)),o},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||_(this,t))},b.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,r,i){var n=this._writableState;"function"==typeof e?(i=e,e=null,r=null):"function"==typeof r&&(i=r,r=null),null!=e&&this.write(e,r),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,r,i){r.ending=!0,S(e,r),i&&(r.finished?t.nextTick(i):e.once("finish",i));r.ended=!0,e.writable=!1}(this,n,i)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),b.prototype.destroy=d.destroy,b.prototype._undestroy=d.undestroy,b.prototype._destroy=function(t,e){this.end(),e(t)},Je}function Pi(){if(rr)return er;rr=1;var t=h.requireProcessNextickArgs(),e=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};er=l;var r=Object.create(h.requireUtil());r.inherits=f.requireInherits();var i=Di(),n=Ii();r.inherits(l,i);for(var s=e(n.prototype),o=0;o<s.length;o++){var a=s[o];l.prototype[a]||(l.prototype[a]=n.prototype[a])}function l(t){if(!(this instanceof l))return new l(t);i.call(this,t),n.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",u)}function u(){this.allowHalfOpen||this._writableState.ended||t.nextTick(c,this)}function c(t){t.end()}return Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),l.prototype._destroy=function(e,r){this.push(null),this.end(),t.nextTick(r,e)},er}function Di(){if(nr)return ir;nr=1;var t=h.requireProcessNextickArgs();ir=w;var e,i=h.requireIsarray();w.ReadableState=_,n.EventEmitter;var s=function(t,e){return t.listeners(e).length},o=$e(),a=Ye().Buffer,u=(void 0!==r.commonjsGlobal?r.commonjsGlobal:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c=Object.create(h.requireUtil());c.inherits=f.requireInherits();var d=l,p=void 0;p=d&&d.debuglog?d.debuglog("stream"):function(){};var y,b=Li(),m=Oi();c.inherits(w,o);var g=["error","close","destroy","pause","resume"];function _(t,r){t=t||{};var i=r instanceof(e=e||Pi());this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,s=t.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(s||0===s)?s:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new b,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(y||(y=h.requireString_decoder().StringDecoder),this.decoder=new y(t.encoding),this.encoding=t.encoding)}function w(t){if(e=e||Pi(),!(this instanceof w))return new w(t);this._readableState=new _(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function v(t,e,r,i,n){var s,o=t._readableState;null===e?(o.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,k(t)}(t,o)):(n||(s=function(t,e){var r;i=e,a.isBuffer(i)||i instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var i;return r}(o,e)),s?t.emit("error",s):o.objectMode||e&&e.length>0?("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),i?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):S(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?S(t,o,e,!1):R(t,o)):S(t,o,e,!1))):i||(o.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(o)}function S(t,e,r,i){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&k(t)),R(t,e)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),w.prototype.destroy=m.destroy,w.prototype._undestroy=m.undestroy,w.prototype._destroy=function(t,e){this.push(null),e(t)},w.prototype.push=function(t,e){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof t&&((e=e||i.defaultEncoding)!==i.encoding&&(t=a.from(t,e),e=""),r=!0),v(this,t,e,!1,r)},w.prototype.unshift=function(t){return v(this,t,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(t){return y||(y=h.requireString_decoder().StringDecoder),this._readableState.decoder=new y(t),this._readableState.encoding=t,this};var E=8388608;function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(e){var r=e._readableState;r.needReadable=!1,r.emittedReadable||(p("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?t.nextTick(T,e):T(e))}function T(t){p("emit readable"),t.emit("readable"),I(t)}function R(e,r){r.readingMore||(r.readingMore=!0,t.nextTick(A,e,r))}function A(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(p("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function L(t){p("readable nexttick read 0"),t.read(0)}function O(t,e){e.reading||(p("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),I(t),e.flowing&&!e.reading&&t.read(0)}function I(t){var e=t._readableState;for(p("flow",e.flowing);e.flowing&&null!==t.read(););}function P(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var i;t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):i=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,i=1,n=r.data;t-=n.length;for(;r=r.next;){var s=r.data,o=t>s.length?s.length:t;if(o===s.length?n+=s:n+=s.slice(0,t),0===(t-=o)){o===s.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(o));break}++i}return e.length-=i,n}(t,e):function(t,e){var r=a.allocUnsafe(t),i=e.head,n=1;i.data.copy(r),t-=i.data.length;for(;i=i.next;){var s=i.data,o=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,o),0===(t-=o)){o===s.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=s.slice(o));break}++n}return e.length-=n,r}(t,e);return i}(t,e.buffer,e.decoder),r);var r}function D(e){var r=e._readableState;if(r.length>0)throw new Error('"endReadable()" called on non-empty stream');r.endEmitted||(r.ended=!0,t.nextTick(M,r,e))}function M(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function C(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}return w.prototype.read=function(t){p("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?D(this):k(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&D(this),null;var i,n=e.needReadable;return p("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&p("length less than watermark",n=!0),e.ended||e.reading?p("reading or ended",n=!1):n&&(p("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(r,e))),null===(i=t>0?P(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&D(this)),null!==i&&this.emit("data",i),i},w.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(e,r){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,r);var a=(!r||!1!==r.end)&&e!==process.stdout&&e!==process.stderr?u:g;function l(t,r){p("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),e.removeListener("close",b),e.removeListener("finish",m),e.removeListener("drain",h),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",u),n.removeListener("end",g),n.removeListener("data",d),c=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function u(){p("onend"),e.end()}o.endEmitted?t.nextTick(a):n.once("end",a),e.on("unpipe",l);var h=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,I(t))}}(n);e.on("drain",h);var c=!1;var f=!1;function d(t){p("ondata"),f=!1,!1!==e.write(t)||f||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==C(o.pipes,e))&&!c&&(p("false write response, pause",o.awaitDrain),o.awaitDrain++,f=!0),n.pause())}function y(t){p("onerror",t),g(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",m),g()}function m(){p("onfinish"),e.removeListener("close",b),g()}function g(){p("unpipe"),n.unpipe(e)}return n.on("data",d),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?i(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(e,"error",y),e.once("close",b),e.once("finish",m),e.emit("pipe",n),o.flowing||(p("pipe resume"),n.resume()),e},w.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=C(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},w.prototype.on=function(e,r){var i=o.prototype.on.call(this,e,r);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&k(this):t.nextTick(L,this))}return i},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var e=this._readableState;return e.flowing||(p("resume"),e.flowing=!0,function(e,r){r.resumeScheduled||(r.resumeScheduled=!0,t.nextTick(O,e,r))}(this,e)),this},w.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",function(){if(p("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(n){(p("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause()))}),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var s=0;s<g.length;s++)t.on(g[s],this.emit.bind(this,g[s]));return this._read=function(e){p("wrapped _read",e),i&&(i=!1,t.resume())},this},Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),w._fromList=P,ir}function Mi(){if(or)return sr;or=1,sr=i;var t=Pi(),e=Object.create(h.requireUtil());function r(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function i(e){if(!(this instanceof i))return new i(e);t.call(this,e),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",n)}function n(){var t=this;"function"==typeof this._flush?this._flush(function(e,r){s(t,e,r)}):s(this,null,null)}function s(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}return e.inherits=f.requireInherits(),e.inherits(i,t),i.prototype.push=function(e,r){return this._transformState.needTransform=!1,t.prototype.push.call(this,e,r)},i.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},i.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},i.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},i.prototype._destroy=function(e,r){var i=this;t.prototype._destroy.call(this,e,function(t){r(t),i.emit("close")})},sr}function Ci(){return ur||(ur=1,t=He,e=He.exports,(r=u)?(t.exports=r,(e=t.exports=r.Readable).Readable=r.Readable,e.Writable=r.Writable,e.Duplex=r.Duplex,e.Transform=r.Transform,e.PassThrough=r.PassThrough,e.Stream=r):((e=t.exports=Di()).Stream=r||e,e.Readable=e,e.Writable=Ii(),e.Duplex=Pi(),e.Transform=Mi(),e.PassThrough=function(){if(lr)return ar;lr=1,ar=r;var t=Mi(),e=Object.create(h.requireUtil());function r(e){if(!(this instanceof r))return new r(e);t.call(this,e)}return e.inherits=f.requireInherits(),e.inherits(r,t),r.prototype._transform=function(t,e,r){r(null,t)},ar}())),He.exports;var t,e,r}function Ni(){if(dr)return fr;dr=1;var t=l,e=cr?hr:(cr=1,hr=Ci().PassThrough);function r(t,e,r){t[e]=function(){return delete t[e],r.apply(this,arguments),this[e].apply(this,arguments)}}function i(t,n){if(!(this instanceof i))return new i(t,n);e.call(this,n),r(this,"_read",function(){var e=t.call(this,n),r=this.emit.bind(this,"error");e.on("error",r),e.pipe(this)}),this.emit("readable")}function n(t,i){if(!(this instanceof n))return new n(t,i);e.call(this,i),r(this,"_write",function(){var e=t.call(this,i),r=this.emit.bind(this,"error");e.on("error",r),this.pipe(e)}),this.emit("writable")}return fr={Readable:i,Writable:n},t.inherits(i,e),t.inherits(n,e),fr}
|
|
2
2
|
/*!
|
|
3
3
|
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
|
4
4
|
*
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./add-source-
|
|
1
|
+
"use strict";var e=require("./add-source-BOumGmx7.js"),r=require("./build-project-De7NPBpt.js"),t=require("./create-project-BYc3XMZw.js"),s=require("./export-project-CgFMyE-g.js"),o=require("./init-project-9RKSVG_H.js"),i=require("./run-macro-C1-aJWu5.js"),u=require("./test-project-DXBFZH3o.js"),c=require("./transform-build-graph-DgRrocSn.js"),p=require("./project-BPmPCkUS.js"),a=require("./installer-DPj-zT7L.js"),n=require("./index-CBGUBgfk.js");require("path"),require("./build-target-ooHNsSLD.js"),require("assert"),require("./load-from-project-ClF4qaC0.js"),require("fs"),require("./transform-target-CYhuozxP.js"),require("string_decoder"),require("./get-target-LUoY1UWJ.js"),require("./export-target-C0RYJqUX.js"),require("./_commonjsHelpers-Bjf42z7h.js"),require("node:fs"),require("node:path"),require("node:buffer"),require("querystring"),require("child_process"),require("util"),require("crypto"),require("events"),require("os"),require("constants"),require("stream"),require("http"),require("url"),require("punycode"),require("https"),require("zlib"),exports.addSource=e.addSource,exports.buildProject=r.buildProject,exports.createProject=t.createProject,exports.exportProject=s.exportProject,exports.initProject=o.initProject,exports.runMacro=i.runMacro,exports.testProject=u.testProject,exports.addins=c.addins,exports.fetchDependencies=p.fetchDependencies,exports.fetchDependency=p.fetch,exports.loadConfig=p.loadConfig,exports.loadProject=p.loadProject,exports.loadWorkspace=p.loadWorkspace,exports.resolveDependencies=p.resolve,exports.resolveDependency=p.resolve$1,exports.checkDualInstall=a.checkDualInstall,exports.checksum=a.checksum,exports.env=a.env,exports.run=a.run,exports.parseManifest=n.parseManifest;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";var t=require("./installer-
|
|
1
|
+
"use strict";var t=require("./installer-DPj-zT7L.js"),e=require("./index-CBGUBgfk.js"),r=require("./project-BPmPCkUS.js"),i=require("./transform-build-graph-DgRrocSn.js"),a=require("./build-target-ooHNsSLD.js"),o=require("./export-target-C0RYJqUX.js"),n=require("path");exports.initProject=async function(s){let{name:p,dir:c=t.env.cwd,target:m,from:d,pkg:l,git:w}=s;if(await t.pathExistsExports.pathExists(t.join(c,"vbaproject.toml")))throw new t.CliError(t.ErrorCode.InitAlreadyInitialized,"A vbapm project already exists in this directory.");if(d&&!await t.pathExistsExports.pathExists(d))throw new t.CliError(t.ErrorCode.FromNotFound,`The "from" document was not found at "${d}".`);if(p=p||(d?n.basename(d,n.extname(d)):n.basename(c)),!p)throw new t.CliError(t.ErrorCode.InitNameRequired,t.dedent`
|
|
2
2
|
Unable to determine name from current directory or --from.
|
|
3
3
|
--name NAME is required to initialize this project.
|
|
4
4
|
`);if(!m&&!d&&p.includes(".")){const t=p.split(".");m=t.pop(),p=t.join(".")}if(!l&&!m&&!d)throw new t.CliError(t.ErrorCode.InitTargetRequired,t.dedent`
|
|
5
5
|
--target or --from is required for vbapm projects.
|
|
6
6
|
(e.g. vbapm init --target xlsm)
|
|
7
|
-
`);await t.mkdirsExports.ensureDir(t.join(c,"src")),
|
|
7
|
+
`);await t.mkdirsExports.ensureDir(t.join(c,"src")),w&&!await t.pathExistsExports.pathExists(t.join(c,".git"))&&(await r.init(c),await t.writeFile(t.join(c,".gitignore"),"/build"),await t.writeFile(t.join(c,".gitattributes"),"* text=auto\n*.bas text eol=crlf\n*.cls text eol=crlf"),await t.writeFile(t.join(c,".editorconfig"),t.dedent`
|
|
8
8
|
[*]
|
|
9
9
|
trim_trailing_whitespace = true
|
|
10
10
|
insert_final_newline = true
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
|
|
13
13
|
[*.{bas,cls}]
|
|
14
14
|
end_of_line = crlf
|
|
15
|
-
`));const
|
|
15
|
+
`));const f=await r.initProject(p,c,{type:l?"package":"project"});if(d&&(m=n.extname(d).replace(".","")),m){const r=[];await async function(r,s,p={}){const{project:c}=s;let{from:m,name:d=c.manifest.name,path:l="target"}=p;if(c.manifest.target)throw new t.CliError(t.ErrorCode.TargetAlreadyDefined,"A target is already defined for this project.");const w=t.join(c.paths.staging,"export");await t.mkdirsExports.ensureDir(w),await t.emptyExports.emptyDir(w);try{let p;if(m)m=t.resolve(m),d=n.basename(m,n.extname(m)),p=c.manifest.target={name:d,type:r,path:t.join(c.paths.dir,l),filename:`${t.sanitize(d)}.${r}`},await t.copyExports.copy(m,t.join(c.paths.build,p.filename)),await i.exportTo(c,p,w),await o.exportTarget(p,s,w);else{p=c.manifest.target={name:d,type:r,path:t.join(c.paths.dir,l),filename:`${t.sanitize(d)}.${r}`},await i.createDocument(c,p);const e=await o.extractTarget(c,p,w);await t.removeExports.remove(p.path),await t.copyExports.copy(e,p.path),await a.buildTarget(p,s)}await e.writeManifest(c.manifest,c.paths.dir)}catch(t){throw t}finally{await t.removeExports.remove(w)}}(m,{project:f,dependencies:r},{from:d})}await e.writeManifest(f.manifest,f.paths.dir)};
|