create-rubyonly 1.0.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 +105 -0
- package/dist/chunk-BM2MA6iF.mjs +2 -0
- package/dist/dist-CXwjh78A.mjs +24 -0
- package/dist/index.mjs +78 -0
- package/index.js +3 -0
- package/package.json +41 -0
- package/templates/uniapp-template/.env.development +17 -0
- package/templates/uniapp-template/.env.production +17 -0
- package/templates/uniapp-template/.husky/commit-msg +3 -0
- package/templates/uniapp-template/.husky/pre-commit +3 -0
- package/templates/uniapp-template/.lintstagedrc.json +4 -0
- package/templates/uniapp-template/.prettierignore +18 -0
- package/templates/uniapp-template/.prettierrc +23 -0
- package/templates/uniapp-template/README.md +1 -0
- package/templates/uniapp-template/commitlint.config.js +23 -0
- package/templates/uniapp-template/eslint.config.mjs +49 -0
- package/templates/uniapp-template/index.html +18 -0
- package/templates/uniapp-template/package.json +54 -0
- package/templates/uniapp-template/shims-uni.d.ts +10 -0
- package/templates/uniapp-template/src/App.vue +9 -0
- package/templates/uniapp-template/src/api/common.ts +1 -0
- package/templates/uniapp-template/src/config/index.ts +1 -0
- package/templates/uniapp-template/src/constants/index.ts +1 -0
- package/templates/uniapp-template/src/env.d.ts +8 -0
- package/templates/uniapp-template/src/main.ts +20 -0
- package/templates/uniapp-template/src/manifest.json +72 -0
- package/templates/uniapp-template/src/pages/home/index.vue +7 -0
- package/templates/uniapp-template/src/pages.json +22 -0
- package/templates/uniapp-template/src/services/index.ts +1 -0
- package/templates/uniapp-template/src/shime-uni.d.ts +6 -0
- package/templates/uniapp-template/src/static/logo.png +0 -0
- package/templates/uniapp-template/src/store/index.ts +5 -0
- package/templates/uniapp-template/src/styles/index.scss +18 -0
- package/templates/uniapp-template/src/styles/tailwindcss.scss +3 -0
- package/templates/uniapp-template/src/uni.scss +76 -0
- package/templates/uniapp-template/src/utils/request.ts +85 -0
- package/templates/uniapp-template/src/utils/routeIntercept.ts +29 -0
- package/templates/uniapp-template/tailwind.config.js +12 -0
- package/templates/uniapp-template/tsconfig.json +13 -0
- package/templates/uniapp-template/uniconfig-readme.md +1 -0
- package/templates/uniapp-template/vite.config.ts +48 -0
- package/templates/vue-template/.env.development +17 -0
- package/templates/vue-template/.env.production +17 -0
- package/templates/vue-template/.husky/commit-msg +3 -0
- package/templates/vue-template/.husky/pre-commit +3 -0
- package/templates/vue-template/.lintstagedrc.json +4 -0
- package/templates/vue-template/.prettierignore +13 -0
- package/templates/vue-template/.prettierrc +23 -0
- package/templates/vue-template/.vscode/extensions.json +3 -0
- package/templates/vue-template/README.md +5 -0
- package/templates/vue-template/commitlint.config.js +23 -0
- package/templates/vue-template/eslint.config.js +31 -0
- package/templates/vue-template/index.html +13 -0
- package/templates/vue-template/package.json +48 -0
- package/templates/vue-template/public/vite.svg +1 -0
- package/templates/vue-template/src/App.vue +10 -0
- package/templates/vue-template/src/components/index.ts +1 -0
- package/templates/vue-template/src/layout/index.vue +7 -0
- package/templates/vue-template/src/main.ts +20 -0
- package/templates/vue-template/src/router/index.ts +12 -0
- package/templates/vue-template/src/store/index.ts +7 -0
- package/templates/vue-template/src/styles/index.scss +5 -0
- package/templates/vue-template/src/styles/tailwindcss.css +1 -0
- package/templates/vue-template/src/styles/variable.scss +5 -0
- package/templates/vue-template/tsconfig.app.json +20 -0
- package/templates/vue-template/tsconfig.json +7 -0
- package/templates/vue-template/tsconfig.node.json +26 -0
- package/templates/vue-template/vite.config.ts +63 -0
package/README.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# create-rubyonly
|
|
2
|
+
|
|
3
|
+
基于 Rubyonly 预设模板的快速项目脚手架工具。
|
|
4
|
+
|
|
5
|
+
## 使用方法
|
|
6
|
+
|
|
7
|
+
### 交互式创建
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm create rubyonly@latest
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
然后按照提示操作:
|
|
14
|
+
|
|
15
|
+
1. 输入项目名称
|
|
16
|
+
2. 选择项目模板类型
|
|
17
|
+
3. 等待项目创建
|
|
18
|
+
4. 创建完成
|
|
19
|
+
5. cd到目标项目目录
|
|
20
|
+
6. 执行npm install && npm run dev
|
|
21
|
+
|
|
22
|
+
### 指定项目名称
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm create rubyonly@latest my-app
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 使用指定模板
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# 使用 React 模板
|
|
32
|
+
npm create rubyonly@latest my-app --template react
|
|
33
|
+
|
|
34
|
+
# 使用 Vue3 模板
|
|
35
|
+
npm create rubyonly@latest my-app --template vue
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## 可用模板
|
|
39
|
+
|
|
40
|
+
- **react**: React + TypeScript + Vite
|
|
41
|
+
- **vue**: Vue3 + TypeScript + Vite
|
|
42
|
+
|
|
43
|
+
## 命令行参数
|
|
44
|
+
|
|
45
|
+
- `-t, --template <name>` - 使用指定模板
|
|
46
|
+
- `-h, --help` - 显示帮助信息
|
|
47
|
+
- `--overwrite` - 强制覆盖已存在的目录
|
|
48
|
+
|
|
49
|
+
## 开发
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# 构建(打包成单文件)
|
|
53
|
+
pnpm build
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## 发布
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
cd packages/create-app
|
|
60
|
+
|
|
61
|
+
# 构建并准备发布(会自动复制模板)
|
|
62
|
+
npm run prepublishOnly
|
|
63
|
+
|
|
64
|
+
# 或者直接发布(prepublishOnly 会自动执行)
|
|
65
|
+
npm publish
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**注意**: `prepublishOnly` 钩子会自动:
|
|
69
|
+
|
|
70
|
+
1. 使用 tsdown 打包代码到 `index.js`
|
|
71
|
+
2. 运行 `scripts/copy-templates.js` 从根目录复制 `templates/` 到当前目录
|
|
72
|
+
|
|
73
|
+
**手动复制模板** (用于测试):
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npm run copy-templates
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## 技术架构
|
|
80
|
+
|
|
81
|
+
- **构建工具**: tsdown(和 create-vite 一致)
|
|
82
|
+
- **打包方式**: 将所有依赖打包成单个 `index.js` 文件
|
|
83
|
+
- **优势**:
|
|
84
|
+
- 启动速度快(单文件加载)
|
|
85
|
+
- 包体积小(无需 node_modules)
|
|
86
|
+
- 所有依赖在 devDependencies
|
|
87
|
+
|
|
88
|
+
## 注意事项
|
|
89
|
+
|
|
90
|
+
1. 模板文件存放在 `templates/` 目录下
|
|
91
|
+
2. 发布时会将 `templates/` 目录和打包后的 `index.js` 一起发布
|
|
92
|
+
3. 需要 Node.js >= 18.0.0
|
|
93
|
+
4. 使用 tsdown 将所有运行时依赖打包进单个文件
|
|
94
|
+
|
|
95
|
+
## 扩展安装功能(可选)
|
|
96
|
+
|
|
97
|
+
如果需要启用"安装依赖"功能,请:
|
|
98
|
+
|
|
99
|
+
1. 打开 `src/index.ts` 文件
|
|
100
|
+
2. 找到第 151-180 行左右的注释代码块(搜索 "步骤 5")
|
|
101
|
+
3. 取消注释该代码块
|
|
102
|
+
4. 取消文件顶部 `spawn` 导入的注释(第 8 行)
|
|
103
|
+
5. 重新构建项目
|
|
104
|
+
|
|
105
|
+
启用后会询问用户是否立即安装依赖,选择 yes 会使用 npm 自动安装。
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire as e}from"node:module";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},l=(e,r,i)=>(i=e==null?{}:t(a(e)),c(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e)),u=e=>t=>l(t.default,e),d=e(import.meta.url);export{l as i,d as n,u as r,s as t};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{n as e,t}from"./chunk-BM2MA6iF.mjs";var n=t((t=>{var n=e(`fs`),r=e(`path`),i=e(`events`),a=e(`stream`),o=e(`string_decoder`),s=e(`assert`),c=e(`buffer`),l=e(`zlib`),u=e(`util`),d=e(`crypto`),f=e(`os`),p=e(`tty`),m=e(`constants`),h=e(`https`),g=e(`child_process`),_=e(`url`),v=e(`net`),y=e(`tls`);function b(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var x=b(n),S=b(r),C=b(i),ee=b(a),te=b(o),w=b(s),ne=b(c),re=b(l),T=b(u),ie=b(d),ae=b(f),oe=b(p),se=b(m),ce=b(h),le=b(g),ue=b(_),de=b(v),fe=b(y),E=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function D(e){var t={exports:{}};return e(t,t.exports),t.exports}let pe=new Map([[`C`,`cwd`],[`f`,`file`],[`z`,`gzip`],[`P`,`preservePaths`],[`U`,`unlink`],[`strip-components`,`strip`],[`stripComponents`,`strip`],[`keep-newer`,`newer`],[`keepNewer`,`newer`],[`keep-newer-files`,`newer`],[`keepNewerFiles`,`newer`],[`k`,`keep`],[`keep-existing`,`keep`],[`keepExisting`,`keep`],[`m`,`noMtime`],[`no-mtime`,`noMtime`],[`p`,`preserveOwner`],[`L`,`follow`],[`h`,`follow`]]);var me=e=>e?Object.keys(e).map(t=>[pe.has(t)?pe.get(t):t,e[t]]).reduce((e,t)=>(e[t[0]]=t[1],e),Object.create(null)):{},he=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}},ge=O;O.Node=be,O.create=O;function O(e){var t=this;if(t instanceof O||(t=new O),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach==`function`)e.forEach(function(e){t.push(e)});else if(arguments.length>0)for(var n=0,r=arguments.length;n<r;n++)t.push(arguments[n]);return t}O.prototype.removeNode=function(e){if(e.list!==this)throw Error(`removing node which does not belong to this list`);var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},O.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||=e,this.length++}},O.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||=e,this.length++}},O.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)ve(this,arguments[e]);return this.length},O.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)ye(this,arguments[e]);return this.length},O.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},O.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},O.prototype.forEach=function(e,t){t||=this;for(var n=this.head,r=0;n!==null;r++)e.call(t,n.value,r,this),n=n.next},O.prototype.forEachReverse=function(e,t){t||=this;for(var n=this.tail,r=this.length-1;n!==null;r--)e.call(t,n.value,r,this),n=n.prev},O.prototype.get=function(e){for(var t=0,n=this.head;n!==null&&t<e;t++)n=n.next;if(t===e&&n!==null)return n.value},O.prototype.getReverse=function(e){for(var t=0,n=this.tail;n!==null&&t<e;t++)n=n.prev;if(t===e&&n!==null)return n.value},O.prototype.map=function(e,t){t||=this;for(var n=new O,r=this.head;r!==null;)n.push(e.call(t,r.value,this)),r=r.next;return n},O.prototype.mapReverse=function(e,t){t||=this;for(var n=new O,r=this.tail;r!==null;)n.push(e.call(t,r.value,this)),r=r.prev;return n},O.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else if(this.head)r=this.head.next,n=this.head.value;else throw TypeError(`Reduce of empty list with no initial value`);for(var i=0;r!==null;i++)n=e(n,r.value,i),r=r.next;return n},O.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else if(this.tail)r=this.tail.prev,n=this.tail.value;else throw TypeError(`Reduce of empty list with no initial value`);for(var i=this.length-1;r!==null;i--)n=e(n,r.value,i),r=r.prev;return n},O.prototype.toArray=function(){for(var e=Array(this.length),t=0,n=this.head;n!==null;t++)e[t]=n.value,n=n.next;return e},O.prototype.toArrayReverse=function(){for(var e=Array(this.length),t=0,n=this.tail;n!==null;t++)e[t]=n.value,n=n.prev;return e},O.prototype.slice=function(e,t){t||=this.length,t<0&&(t+=this.length),e||=0,e<0&&(e+=this.length);var n=new O;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=0,i=this.head;i!==null&&r<e;r++)i=i.next;for(;i!==null&&r<t;r++,i=i.next)n.push(i.value);return n},O.prototype.sliceReverse=function(e,t){t||=this.length,t<0&&(t+=this.length),e||=0,e<0&&(e+=this.length);var n=new O;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=this.length,i=this.tail;i!==null&&r>t;r--)i=i.prev;for(;i!==null&&r>e;r--,i=i.prev)n.push(i.value);return n},O.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,i=this.head;i!==null&&r<e;r++)i=i.next;for(var a=[],r=0;i&&r<t;r++)a.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var r=0;r<n.length;r++)i=_e(this,i,n[r]);return a},O.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;n!==null;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};function _e(e,t,n){var r=t===e.head?new be(n,null,t,e):new be(n,t,t.next,e);return r.next===null&&(e.tail=r),r.prev===null&&(e.head=r),e.length++,r}function ve(e,t){e.tail=new be(t,e.tail,null,e),e.head||=e.tail,e.length++}function ye(e,t){e.head=new be(t,null,e.head,e),e.tail||=e.head,e.length++}function be(e,t,n,r){if(!(this instanceof be))return new be(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}try{he(O)}catch{}let xe=te.default.StringDecoder,Se=Symbol(`EOF`),Ce=Symbol(`maybeEmitEnd`),we=Symbol(`emittedEnd`),Te=Symbol(`emittingEnd`),Ee=Symbol(`closed`),De=Symbol(`read`),Oe=Symbol(`flush`),ke=Symbol(`flushChunk`),k=Symbol(`encoding`),Ae=Symbol(`decoder`),je=Symbol(`flowing`),Me=Symbol(`paused`),Ne=Symbol(`resume`),A=Symbol(`bufferLength`),Pe=Symbol(`bufferPush`),Fe=Symbol(`bufferShift`),j=Symbol(`objectMode`),M=Symbol(`destroyed`),Ie=E._MP_NO_ITERATOR_SYMBOLS_!==`1`,Le=Ie&&Symbol.asyncIterator||Symbol(`asyncIterator not implemented`),Re=Ie&&Symbol.iterator||Symbol(`iterator not implemented`),ze=e=>e===`end`||e===`finish`||e===`prefinish`,Be=e=>e instanceof ArrayBuffer||typeof e==`object`&&e.constructor&&e.constructor.name===`ArrayBuffer`&&e.byteLength>=0,Ve=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);var He=class e extends ee.default{constructor(e){super(),this[je]=!1,this[Me]=!1,this.pipes=new ge,this.buffer=new ge,this[j]=e&&e.objectMode||!1,this[j]?this[k]=null:this[k]=e&&e.encoding||null,this[k]===`buffer`&&(this[k]=null),this[Ae]=this[k]?new xe(this[k]):null,this[Se]=!1,this[we]=!1,this[Te]=!1,this[Ee]=!1,this.writable=!0,this.readable=!0,this[A]=0,this[M]=!1}get bufferLength(){return this[A]}get encoding(){return this[k]}set encoding(e){if(this[j])throw Error(`cannot set encoding in objectMode`);if(this[k]&&e!==this[k]&&(this[Ae]&&this[Ae].lastNeed||this[A]))throw Error(`cannot change encoding`);this[k]!==e&&(this[Ae]=e?new xe(e):null,this.buffer.length&&(this.buffer=this.buffer.map(e=>this[Ae].write(e)))),this[k]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[j]}set objectMode(e){this[j]=this[j]||!!e}write(e,t,n){if(this[Se])throw Error(`write after end`);return this[M]?(this.emit(`error`,Object.assign(Error(`Cannot call write after a stream was destroyed`),{code:`ERR_STREAM_DESTROYED`})),!0):(typeof t==`function`&&(n=t,t=`utf8`),t||=`utf8`,!this[j]&&!Buffer.isBuffer(e)&&(Ve(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):Be(e)?e=Buffer.from(e):typeof e!=`string`&&(this.objectMode=!0)),!this.objectMode&&!e.length?(this[A]!==0&&this.emit(`readable`),n&&n(),this.flowing):(typeof e==`string`&&!this[j]&&!(t===this[k]&&!this[Ae].lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[k]&&(e=this[Ae].write(e)),this.flowing?(this[A]!==0&&this[Oe](!0),this.emit(`data`,e)):this[Pe](e),this[A]!==0&&this.emit(`readable`),n&&n(),this.flowing))}read(e){if(this[M])return null;try{return this[A]===0||e===0||e>this[A]?null:(this[j]&&(e=null),this.buffer.length>1&&!this[j]&&(this.encoding?this.buffer=new ge([Array.from(this.buffer).join(``)]):this.buffer=new ge([Buffer.concat(Array.from(this.buffer),this[A])])),this[De](e||null,this.buffer.head.value))}finally{this[Ce]()}}[De](e,t){return e===t.length||e===null?this[Fe]():(this.buffer.head.value=t.slice(e),t=t.slice(0,e),this[A]-=e),this.emit(`data`,t),!this.buffer.length&&!this[Se]&&this.emit(`drain`),t}end(e,t,n){return typeof e==`function`&&(n=e,e=null),typeof t==`function`&&(n=t,t=`utf8`),e&&this.write(e,t),n&&this.once(`end`,n),this[Se]=!0,this.writable=!1,(this.flowing||!this[Me])&&this[Ce](),this}[Ne](){this[M]||(this[Me]=!1,this[je]=!0,this.emit(`resume`),this.buffer.length?this[Oe]():this[Se]?this[Ce]():this.emit(`drain`))}resume(){return this[Ne]()}pause(){this[je]=!1,this[Me]=!0}get destroyed(){return this[M]}get flowing(){return this[je]}get paused(){return this[Me]}[Pe](e){return this[j]?this[A]+=1:this[A]+=e.length,this.buffer.push(e)}[Fe](){return this.buffer.length&&(this[j]?--this[A]:this[A]-=this.buffer.head.value.length),this.buffer.shift()}[Oe](e){do;while(this[ke](this[Fe]()));!e&&!this.buffer.length&&!this[Se]&&this.emit(`drain`)}[ke](e){return e?(this.emit(`data`,e),this.flowing):!1}pipe(e,t){if(this[M])return;let n=this[we];t||={},e===process.stdout||e===process.stderr?t.end=!1:t.end=t.end!==!1;let r={dest:e,opts:t,ondrain:e=>this[Ne]()};return this.pipes.push(r),e.on(`drain`,r.ondrain),this[Ne](),n&&r.opts.end&&r.dest.end(),e}addListener(e,t){return this.on(e,t)}on(e,t){try{return super.on(e,t)}finally{e===`data`&&!this.pipes.length&&!this.flowing?this[Ne]():ze(e)&&this[we]&&(super.emit(e),this.removeAllListeners(e))}}get emittedEnd(){return this[we]}[Ce](){!this[Te]&&!this[we]&&!this[M]&&this.buffer.length===0&&this[Se]&&(this[Te]=!0,this.emit(`end`),this.emit(`prefinish`),this.emit(`finish`),this[Ee]&&this.emit(`close`),this[Te]=!1)}emit(e,t){if(e!==`error`&&e!==`close`&&e!==M&&this[M])return;if(e===`data`){if(!t)return;this.pipes.length&&this.pipes.forEach(e=>e.dest.write(t)===!1&&this.pause())}else if(e===`end`){if(this[we]===!0)return;this[we]=!0,this.readable=!1,this[Ae]&&(t=this[Ae].end(),t&&(this.pipes.forEach(e=>e.dest.write(t)),super.emit(`data`,t))),this.pipes.forEach(e=>{e.dest.removeListener(`drain`,e.ondrain),e.opts.end&&e.dest.end()})}else if(e===`close`&&(this[Ee]=!0,!this[we]&&!this[M]))return;let n=Array(arguments.length);if(n[0]=e,n[1]=t,arguments.length>2)for(let e=2;e<arguments.length;e++)n[e]=arguments[e];try{return super.emit.apply(this,n)}finally{ze(e)?this.removeAllListeners(e):this[Ce]()}}collect(){let e=[];this[j]||(e.dataLength=0);let t=this.promise();return this.on(`data`,t=>{e.push(t),this[j]||(e.dataLength+=t.length)}),t.then(()=>e)}concat(){return this[j]?Promise.reject(Error(`cannot concat in objectMode`)):this.collect().then(e=>this[j]?Promise.reject(Error(`cannot concat in objectMode`)):this[k]?e.join(``):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,t)=>{this.on(M,()=>t(Error(`stream destroyed`))),this.on(`end`,()=>e()),this.on(`error`,e=>t(e))})}[Le](){return{next:()=>{let e=this.read();if(e!==null)return Promise.resolve({done:!1,value:e});if(this[Se])return Promise.resolve({done:!0});let t=null,n=null,r=e=>{this.removeListener(`data`,i),this.removeListener(`end`,a),n(e)},i=e=>{this.removeListener(`error`,r),this.removeListener(`end`,a),this.pause(),t({value:e,done:!!this[Se]})},a=()=>{this.removeListener(`error`,r),this.removeListener(`data`,i),t({done:!0})},o=()=>r(Error(`stream destroyed`));return new Promise((e,s)=>{n=s,t=e,this.once(M,o),this.once(`error`,r),this.once(`end`,a),this.once(`data`,i)})}}}[Re](){return{next:()=>{let e=this.read();return{value:e,done:e===null}}}}destroy(e){return this[M]?(e?this.emit(`error`,e):this.emit(M),this):(this[M]=!0,this.buffer=new ge,this[A]=0,typeof this.close==`function`&&!this[Ee]&&this.close(),e?this.emit(`error`,e):this.emit(M),this)}static isStream(t){return!!t&&(t instanceof e||t instanceof ee.default||t instanceof C.default&&(typeof t.pipe==`function`||typeof t.write==`function`&&typeof t.end==`function`))}};let Ue=re.default.constants||{ZLIB_VERNUM:4736};var We=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},Ue)),Ge=D(function(e,t){let n=ne.default.Buffer,r=t.constants=We,i=n.concat,a=Symbol(`_superWrite`);class o extends Error{constructor(e){super(`zlib: `+e.message),this.code=e.code,this.errno=e.errno,this.code||=`ZLIB_ERROR`,this.message=`zlib: `+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return`ZlibError`}}let s=Symbol(`opts`),c=Symbol(`flushFlag`),l=Symbol(`finishFlushFlag`),u=Symbol(`fullFlushFlag`),d=Symbol(`handle`),f=Symbol(`onError`),p=Symbol(`sawError`),m=Symbol(`level`),h=Symbol(`strategy`),g=Symbol(`ended`);class _ extends He{constructor(e,t){if(!e||typeof e!=`object`)throw TypeError(`invalid options for ZlibBase constructor`);super(e),this[p]=!1,this[g]=!1,this[s]=e,this[c]=e.flush,this[l]=e.finishFlush;try{this[d]=new re.default[t](e)}catch(e){throw new o(e)}this[f]=e=>{this[p]||(this[p]=!0,this.close(),this.emit(`error`,e))},this[d].on(`error`,e=>this[f](new o(e))),this.once(`end`,()=>this.close)}close(){this[d]&&(this[d].close(),this[d]=null,this.emit(`close`))}reset(){if(!this[p])return w.default(this[d],`zlib binding closed`),this[d].reset()}flush(e){this.ended||(typeof e!=`number`&&(e=this[u]),this.write(Object.assign(n.alloc(0),{[c]:e})))}end(e,t,n){return e&&this.write(e,t),this.flush(this[l]),this[g]=!0,super.end(null,null,n)}get ended(){return this[g]}write(e,t,r){if(typeof t==`function`&&(r=t,t=`utf8`),typeof e==`string`&&(e=n.from(e,t)),this[p])return;w.default(this[d],`zlib binding closed`);let s=this[d]._handle,l=s.close;s.close=()=>{};let u=this[d].close;this[d].close=()=>{},n.concat=e=>e;let m;try{let t=typeof e[c]==`number`?e[c]:this[c];m=this[d]._processChunk(e,t),n.concat=i}catch(e){n.concat=i,this[f](new o(e))}finally{this[d]&&(this[d]._handle=s,s.close=l,this[d].close=u,this[d].removeAllListeners(`error`))}this[d]&&this[d].on(`error`,e=>this[f](new o(e)));let h;if(m)if(Array.isArray(m)&&m.length>0){h=this[a](n.from(m[0]));for(let e=1;e<m.length;e++)h=this[a](m[e])}else h=this[a](n.from(m));return r&&r(),h}[a](e){return super.write(e)}}class v extends _{constructor(e,t){e||={},e.flush=e.flush||r.Z_NO_FLUSH,e.finishFlush=e.finishFlush||r.Z_FINISH,super(e,t),this[u]=r.Z_FULL_FLUSH,this[m]=e.level,this[h]=e.strategy}params(e,t){if(!this[p]){if(!this[d])throw Error(`cannot switch params when binding is closed`);if(!this[d].params)throw Error(`not supported in this implementation`);if(this[m]!==e||this[h]!==t){this.flush(r.Z_SYNC_FLUSH),w.default(this[d],`zlib binding closed`);let n=this[d].flush;this[d].flush=(e,t)=>{this.flush(e),t()};try{this[d].params(e,t)}finally{this[d].flush=n}this[d]&&(this[m]=e,this[h]=t)}}}}class y extends v{constructor(e){super(e,`Deflate`)}}class b extends v{constructor(e){super(e,`Inflate`)}}let x=Symbol(`_portable`);class S extends v{constructor(e){super(e,`Gzip`),this[x]=e&&!!e.portable}[a](e){return this[x]?(this[x]=!1,e[9]=255,super[a](e)):super[a](e)}}class C extends v{constructor(e){super(e,`Gunzip`)}}class ee extends v{constructor(e){super(e,`DeflateRaw`)}}class te extends v{constructor(e){super(e,`InflateRaw`)}}class T extends v{constructor(e){super(e,`Unzip`)}}class ie extends _{constructor(e,t){e||={},e.flush=e.flush||r.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||r.BROTLI_OPERATION_FINISH,super(e,t),this[u]=r.BROTLI_OPERATION_FLUSH}}class ae extends ie{constructor(e){super(e,`BrotliCompress`)}}class oe extends ie{constructor(e){super(e,`BrotliDecompress`)}}t.Deflate=y,t.Inflate=b,t.Gzip=S,t.Gunzip=C,t.DeflateRaw=ee,t.InflateRaw=te,t.Unzip=T,typeof re.default.BrotliCompress==`function`?(t.BrotliCompress=ae,t.BrotliDecompress=oe):t.BrotliCompress=t.BrotliDecompress=class{constructor(){throw Error(`Brotli is not supported in this version of Node.js`)}}});let Ke=Symbol(`slurp`);var qe=class extends He{constructor(e,t,n){switch(super(),this.pause(),this.extended=t,this.globalExtended=n,this.header=e,this.startBlockSize=512*Math.ceil(e.size/512),this.blockRemain=this.startBlockSize,this.remain=e.size,this.type=e.type,this.meta=!1,this.ignore=!1,this.type){case`File`:case`OldFile`:case`Link`:case`SymbolicLink`:case`CharacterDevice`:case`BlockDevice`:case`Directory`:case`FIFO`:case`ContiguousFile`:case`GNUDumpDir`:break;case`NextFileHasLongLinkpath`:case`NextFileHasLongPath`:case`OldGnuLongPath`:case`GlobalExtendedHeader`:case`ExtendedHeader`:case`OldExtendedHeader`:this.meta=!0;break;default:this.ignore=!0}this.path=e.path,this.mode=e.mode,this.mode&&(this.mode&=4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=e.size,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=e.linkpath,this.uname=e.uname,this.gname=e.gname,t&&this[Ke](t),n&&this[Ke](n,!0)}write(e){let t=e.length;if(t>this.blockRemain)throw Error(`writing more to entry than is appropriate`);let n=this.remain,r=this.blockRemain;return this.remain=Math.max(0,n-t),this.blockRemain=Math.max(0,r-t),this.ignore?!0:n>=t?super.write(e):super.write(e.slice(0,n))}[Ke](e,t){for(let n in e)e[n]!==null&&e[n]!==void 0&&!(t&&n===`path`)&&(this[n]=e[n])}},Je=D(function(e,t){t.name=new Map([[`0`,`File`],[``,`OldFile`],[`1`,`Link`],[`2`,`SymbolicLink`],[`3`,`CharacterDevice`],[`4`,`BlockDevice`],[`5`,`Directory`],[`6`,`FIFO`],[`7`,`ContiguousFile`],[`g`,`GlobalExtendedHeader`],[`x`,`ExtendedHeader`],[`A`,`SolarisACL`],[`D`,`GNUDumpDir`],[`I`,`Inode`],[`K`,`NextFileHasLongLinkpath`],[`L`,`NextFileHasLongPath`],[`M`,`ContinuationFile`],[`N`,`OldGnuLongPath`],[`S`,`SparseFile`],[`V`,`TapeVolumeHeader`],[`X`,`OldExtendedHeader`]]),t.code=new Map(Array.from(t.name).map(e=>[e[1],e[0]]))});let Ye=(e,t)=>{if(Number.isSafeInteger(e))e<0?Ze(e,t):Xe(e,t);else throw Error(`cannot encode number outside of javascript safe integer range`);return t},Xe=(e,t)=>{t[0]=128;for(var n=t.length;n>1;n--)t[n-1]=e&255,e=Math.floor(e/256)},Ze=(e,t)=>{t[0]=255;var n=!1;e*=-1;for(var r=t.length;r>1;r--){var i=e&255;e=Math.floor(e/256),n?t[r-1]=tt(i):i===0?t[r-1]=0:(n=!0,t[r-1]=nt(i))}},Qe=e=>{let t=e[0],n=t===128?et(e.slice(1,e.length)):t===255?$e(e):null;if(n===null)throw Error(`invalid base256 encoding`);if(!Number.isSafeInteger(n))throw Error(`parsed number outside of javascript safe integer range`);return n},$e=e=>{for(var t=e.length,n=0,r=!1,i=t-1;i>-1;i--){var a=e[i],o;r?o=tt(a):a===0?o=a:(r=!0,o=nt(a)),o!==0&&(n-=o*256**(t-i-1))}return n},et=e=>{for(var t=e.length,n=0,r=t-1;r>-1;r--){var i=e[r];i!==0&&(n+=i*256**(t-r-1))}return n},tt=e=>(255^e)&255,nt=e=>(255^e)+1&255;var rt={encode:Ye,parse:Qe};let it=S.default.posix,at=Symbol(`slurp`),N=Symbol(`type`);var ot=class{constructor(e,t,n,r){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[N]=`0`,this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(e)?this.decode(e,t||0,n,r):e&&this.set(e)}decode(e,t,n,r){if(t||=0,!e||!(e.length>=t+512))throw Error(`need 512 bytes for header`);if(this.path=ct(e,t,100),this.mode=dt(e,t+100,8),this.uid=dt(e,t+108,8),this.gid=dt(e,t+116,8),this.size=dt(e,t+124,12),this.mtime=lt(e,t+136,12),this.cksum=dt(e,t+148,12),this[at](n),this[at](r,!0),this[N]=ct(e,t+156,1),this[N]===``&&(this[N]=`0`),this[N]===`0`&&this.path.substr(-1)===`/`&&(this[N]=`5`),this[N]===`5`&&(this.size=0),this.linkpath=ct(e,t+157,100),e.slice(t+257,t+265).toString()===`ustar\x0000`)if(this.uname=ct(e,t+265,32),this.gname=ct(e,t+297,32),this.devmaj=dt(e,t+329,8),this.devmin=dt(e,t+337,8),e[t+475]!==0)this.path=ct(e,t+345,155)+`/`+this.path;else{let n=ct(e,t+345,130);n&&(this.path=n+`/`+this.path),this.atime=lt(e,t+476,12),this.ctime=lt(e,t+488,12)}let i=256;for(let n=t;n<t+148;n++)i+=e[n];for(let n=t+156;n<t+512;n++)i+=e[n];this.cksumValid=i===this.cksum,this.cksum===null&&i===256&&(this.nullBlock=!0)}[at](e,t){for(let n in e)e[n]!==null&&e[n]!==void 0&&!(t&&n===`path`)&&(this[n]=e[n])}encode(e,t){if(e||(e=this.block=Buffer.alloc(512),t=0),t||=0,!(e.length>=t+512))throw Error(`need 512 bytes for header`);let n=this.ctime||this.atime?130:155,r=st(this.path||``,n),i=r[0],a=r[1];this.needPax=r[2],this.needPax=xt(e,t,100,i)||this.needPax,this.needPax=ht(e,t+100,8,this.mode)||this.needPax,this.needPax=ht(e,t+108,8,this.uid)||this.needPax,this.needPax=ht(e,t+116,8,this.gid)||this.needPax,this.needPax=ht(e,t+124,12,this.size)||this.needPax,this.needPax=yt(e,t+136,12,this.mtime)||this.needPax,e[t+156]=this[N].charCodeAt(0),this.needPax=xt(e,t+157,100,this.linkpath)||this.needPax,e.write(`ustar\x0000`,t+257,8),this.needPax=xt(e,t+265,32,this.uname)||this.needPax,this.needPax=xt(e,t+297,32,this.gname)||this.needPax,this.needPax=ht(e,t+329,8,this.devmaj)||this.needPax,this.needPax=ht(e,t+337,8,this.devmin)||this.needPax,this.needPax=xt(e,t+345,n,a)||this.needPax,e[t+475]===0?(this.needPax=xt(e,t+345,130,a)||this.needPax,this.needPax=yt(e,t+476,12,this.atime)||this.needPax,this.needPax=yt(e,t+488,12,this.ctime)||this.needPax):this.needPax=xt(e,t+345,155,a)||this.needPax;let o=256;for(let n=t;n<t+148;n++)o+=e[n];for(let n=t+156;n<t+512;n++)o+=e[n];return this.cksum=o,ht(e,t+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(e){for(let t in e)e[t]!==null&&e[t]!==void 0&&(this[t]=e[t])}get type(){return Je.name.get(this[N])||this[N]}get typeKey(){return this[N]}set type(e){Je.code.has(e)?this[N]=Je.code.get(e):this[N]=e}};let st=(e,t)=>{let n=e,r=``,i,a=it.parse(e).root||`.`;if(Buffer.byteLength(n)<100)i=[n,r,!1];else{r=it.dirname(n),n=it.basename(n);do Buffer.byteLength(n)<=100&&Buffer.byteLength(r)<=t?i=[n,r,!1]:Buffer.byteLength(n)>100&&Buffer.byteLength(r)<=t?i=[n.substr(0,99),r,!0]:(n=it.join(it.basename(r),n),r=it.dirname(r));while(r!==a&&!i);i||=[e.substr(0,99),``,!0]}return i},ct=(e,t,n)=>e.slice(t,t+n).toString(`utf8`).replace(/\0.*/,``),lt=(e,t,n)=>ut(dt(e,t,n)),ut=e=>e===null?null:new Date(e*1e3),dt=(e,t,n)=>e[t]&128?rt.parse(e.slice(t,t+n)):pt(e,t,n),ft=e=>isNaN(e)?null:e,pt=(e,t,n)=>ft(parseInt(e.slice(t,t+n).toString(`utf8`).replace(/\0.*$/,``).trim(),8)),mt={12:8589934591,8:2097151},ht=(e,t,n,r)=>r===null?!1:r>mt[n]||r<0?(rt.encode(r,e.slice(t,t+n)),!0):(gt(e,t,n,r),!1),gt=(e,t,n,r)=>e.write(_t(r,n),t,n,`ascii`),_t=(e,t)=>vt(Math.floor(e).toString(8),t),vt=(e,t)=>(e.length===t-1?e:Array(t-e.length-1).join(`0`)+e+` `)+`\0`,yt=(e,t,n,r)=>r===null?!1:ht(e,t,n,r.getTime()/1e3),bt=Array(156).join(`\0`),xt=(e,t,n,r)=>r===null?!1:(e.write(r+bt,t,n,`utf8`),r.length!==Buffer.byteLength(r)||r.length>n);var St=ot,Ct=class{constructor(e,t){this.atime=e.atime||null,this.charset=e.charset||null,this.comment=e.comment||null,this.ctime=e.ctime||null,this.gid=e.gid||null,this.gname=e.gname||null,this.linkpath=e.linkpath||null,this.mtime=e.mtime||null,this.path=e.path||null,this.size=e.size||null,this.uid=e.uid||null,this.uname=e.uname||null,this.dev=e.dev||null,this.ino=e.ino||null,this.nlink=e.nlink||null,this.global=t||!1}encode(){let e=this.encodeBody();if(e===``)return null;let t=Buffer.byteLength(e),n=512*Math.ceil(1+t/512),r=Buffer.allocUnsafe(n);for(let e=0;e<512;e++)r[e]=0;new St({path:(`PaxHeader/`+S.default.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:t,mtime:this.mtime||null,type:this.global?`GlobalExtendedHeader`:`ExtendedHeader`,linkpath:``,uname:this.uname||``,gname:this.gname||``,devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(r),r.write(e,512,t,`utf8`);for(let e=t+512;e<r.length;e++)r[e]=0;return r}encodeBody(){return this.encodeField(`path`)+this.encodeField(`ctime`)+this.encodeField(`atime`)+this.encodeField(`dev`)+this.encodeField(`ino`)+this.encodeField(`nlink`)+this.encodeField(`charset`)+this.encodeField(`comment`)+this.encodeField(`gid`)+this.encodeField(`gname`)+this.encodeField(`linkpath`)+this.encodeField(`mtime`)+this.encodeField(`size`)+this.encodeField(`uid`)+this.encodeField(`uname`)}encodeField(e){if(this[e]===null||this[e]===void 0)return``;let t=this[e]instanceof Date?this[e].getTime()/1e3:this[e],n=` `+(e===`dev`||e===`ino`||e===`nlink`?`SCHILY.`:``)+e+`=`+t+`
|
|
3
|
+
`,r=Buffer.byteLength(n),i=Math.floor(Math.log(r)/Math.log(10))+1;return r+i>=10**i&&(i+=1),i+r+n}};Ct.parse=(e,t,n)=>new Ct(wt(Tt(e),t),n);let wt=(e,t)=>t?Object.keys(e).reduce((t,n)=>(t[n]=e[n],t),t):e,Tt=e=>e.replace(/\n$/,``).split(`
|
|
4
|
+
`).reduce(Et,Object.create(null)),Et=(e,t)=>{let n=parseInt(t,10);if(n!==Buffer.byteLength(t)+1)return e;t=t.substr((n+` `).length);let r=t.split(`=`),i=r.shift().replace(/^SCHILY\.(dev|ino|nlink)/,`$1`);if(!i)return e;let a=r.join(`=`);return e[i]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(i)?new Date(a*1e3):/^[0-9]+$/.test(a)?+a:a,e};var Dt=Ct,Ot=e=>class extends e{warn(e,t,n={}){this.file&&(n.file=this.file),this.cwd&&(n.cwd=this.cwd),n.code=t instanceof Error&&t.code||e,n.tarCode=e,!this.strict&&n.recoverable!==!1?(t instanceof Error&&(n=Object.assign(t,n),t=t.message),this.emit(`warn`,n.tarCode,t,n)):t instanceof Error?this.emit(`error`,Object.assign(t,n)):this.emit(`error`,Object.assign(Error(`${e}: ${t}`),n))}};let kt=[`|`,`<`,`>`,`?`,`:`],At=kt.map(e=>String.fromCharCode(61440+e.charCodeAt(0))),jt=new Map(kt.map((e,t)=>[e,At[t]])),Mt=new Map(At.map((e,t)=>[e,kt[t]]));var Nt={encode:e=>kt.reduce((e,t)=>e.split(t).join(jt.get(t)),e),decode:e=>At.reduce((e,t)=>e.split(t).join(Mt.get(t)),e)},Pt=(e,t,n)=>(e&=4095,n&&(e=(e|384)&-19),t&&(e&256&&(e|=64),e&32&&(e|=8),e&4&&(e|=1)),e);let Ft=Symbol(`process`),It=Symbol(`file`),Lt=Symbol(`directory`),Rt=Symbol(`symlink`),zt=Symbol(`hardlink`),Bt=Symbol(`header`),Vt=Symbol(`read`),Ht=Symbol(`lstat`),Ut=Symbol(`onlstat`),Wt=Symbol(`onread`),Gt=Symbol(`onreadlink`),Kt=Symbol(`openfile`),qt=Symbol(`onopenfile`),Jt=Symbol(`close`),Yt=Symbol(`mode`),Xt=Ot(class extends He{constructor(e,t){if(t||={},super(t),typeof e!=`string`)throw TypeError(`path is required`);this.path=e,this.portable=!!t.portable,this.myuid=process.getuid&&process.getuid(),this.myuser=process.env.USER||``,this.maxReadSize=t.maxReadSize||16777216,this.linkCache=t.linkCache||new Map,this.statCache=t.statCache||new Map,this.preservePaths=!!t.preservePaths,this.cwd=t.cwd||process.cwd(),this.strict=!!t.strict,this.noPax=!!t.noPax,this.noMtime=!!t.noMtime,this.mtime=t.mtime||null,typeof t.onwarn==`function`&&this.on(`warn`,t.onwarn);let n=!1;if(!this.preservePaths&&S.default.win32.isAbsolute(e)){let t=S.default.win32.parse(e);this.path=e.substr(t.root.length),n=t.root}this.win32=!!t.win32||process.platform===`win32`,this.win32&&(this.path=Nt.decode(this.path.replace(/\\/g,`/`)),e=e.replace(/\\/g,`/`)),this.absolute=t.absolute||S.default.resolve(this.cwd,e),this.path===``&&(this.path=`./`),n&&this.warn(`TAR_ENTRY_INFO`,`stripping ${n} from absolute path`,{entry:this,path:n+this.path}),this.statCache.has(this.absolute)?this[Ut](this.statCache.get(this.absolute)):this[Ht]()}[Ht](){x.default.lstat(this.absolute,(e,t)=>{if(e)return this.emit(`error`,e);this[Ut](t)})}[Ut](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=$t(e),this.emit(`stat`,e),this[Ft]()}[Ft](){switch(this.type){case`File`:return this[It]();case`Directory`:return this[Lt]();case`SymbolicLink`:return this[Rt]();default:return this.end()}}[Yt](e){return Pt(e,this.type===`Directory`,this.portable)}[Bt](){this.type===`Directory`&&this.portable&&(this.noMtime=!0),this.header=new St({path:this.path,linkpath:this.linkpath,mode:this[Yt](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:``,atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&this.write(new Dt({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this.path,linkpath:this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),this.write(this.header.block)}[Lt](){this.path.substr(-1)!==`/`&&(this.path+=`/`),this.stat.size=0,this[Bt](),this.end()}[Rt](){x.default.readlink(this.absolute,(e,t)=>{if(e)return this.emit(`error`,e);this[Gt](t)})}[Gt](e){this.linkpath=e.replace(/\\/g,`/`),this[Bt](),this.end()}[zt](e){this.type=`Link`,this.linkpath=S.default.relative(this.cwd,e).replace(/\\/g,`/`),this.stat.size=0,this[Bt](),this.end()}[It](){if(this.stat.nlink>1){let e=this.stat.dev+`:`+this.stat.ino;if(this.linkCache.has(e)){let t=this.linkCache.get(e);if(t.indexOf(this.cwd)===0)return this[zt](t)}this.linkCache.set(e,this.absolute)}if(this[Bt](),this.stat.size===0)return this.end();this[Kt]()}[Kt](){x.default.open(this.absolute,`r`,(e,t)=>{if(e)return this.emit(`error`,e);this[qt](t)})}[qt](e){let t=512*Math.ceil(this.stat.size/512),n=Math.min(t,this.maxReadSize),r=Buffer.allocUnsafe(n);this[Vt](e,r,0,r.length,0,this.stat.size,t)}[Vt](e,t,n,r,i,a,o){x.default.read(e,t,n,r,i,(s,c)=>{if(s)return this[Jt](e,()=>this.emit(`error`,s));this[Wt](e,t,n,r,i,a,o,c)})}[Jt](e,t){x.default.close(e,t)}[Wt](e,t,n,r,i,a,o,s){if(s<=0&&a>0){let t=Error(`encountered unexpected EOF`);return t.path=this.absolute,t.syscall=`read`,t.code=`EOF`,this[Jt](e,()=>this.emit(`error`,t))}if(s>a){let t=Error(`did not encounter expected EOF`);return t.path=this.absolute,t.syscall=`read`,t.code=`EOF`,this[Jt](e,()=>this.emit(`error`,t))}if(s===a)for(let e=s;e<r&&s<o;e++)t[e+n]=0,s++,a++;let c=n===0&&s===t.length?t:t.slice(n,n+s);if(a-=s,o-=s,i+=s,n+=s,this.write(c),!a)return o&&this.write(Buffer.alloc(o)),this[Jt](e,e=>e?this.emit(`error`,e):this.end());n>=r&&(t=Buffer.allocUnsafe(r),n=0),r=t.length-n,this[Vt](e,t,n,r,i,a,o)}});var Zt=class extends Xt{[Ht](){this[Ut](x.default.lstatSync(this.absolute))}[Rt](){this[Gt](x.default.readlinkSync(this.absolute))}[Kt](){this[qt](x.default.openSync(this.absolute,`r`))}[Vt](e,t,n,r,i,a,o){let s=!0;try{let c=x.default.readSync(e,t,n,r,i);this[Wt](e,t,n,r,i,a,o,c),s=!1}finally{if(s)try{this[Jt](e,()=>{})}catch{}}}[Jt](e,t){x.default.closeSync(e),t()}};let Qt=Ot(class extends He{constructor(e,t){t||={},super(t),this.preservePaths=!!t.preservePaths,this.portable=!!t.portable,this.strict=!!t.strict,this.noPax=!!t.noPax,this.noMtime=!!t.noMtime,this.readEntry=e,this.type=e.type,this.type===`Directory`&&this.portable&&(this.noMtime=!0),this.path=e.path,this.mode=this[Yt](e.mode),this.uid=this.portable?null:e.uid,this.gid=this.portable?null:e.gid,this.uname=this.portable?null:e.uname,this.gname=this.portable?null:e.gname,this.size=e.size,this.mtime=this.noMtime?null:t.mtime||e.mtime,this.atime=this.portable?null:e.atime,this.ctime=this.portable?null:e.ctime,this.linkpath=e.linkpath,typeof t.onwarn==`function`&&this.on(`warn`,t.onwarn);let n=!1;if(S.default.isAbsolute(this.path)&&!this.preservePaths){let e=S.default.parse(this.path);n=e.root,this.path=this.path.substr(e.root.length)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new St({path:this.path,linkpath:this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),n&&this.warn(`TAR_ENTRY_INFO`,`stripping ${n} from absolute path`,{entry:this,path:n+this.path}),this.header.encode()&&!this.noPax&&super.write(new Dt({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this.path,linkpath:this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),e.pipe(this)}[Yt](e){return Pt(e,this.type===`Directory`,this.portable)}write(e){let t=e.length;if(t>this.blockRemain)throw Error(`writing more to entry than is appropriate`);return this.blockRemain-=t,super.write(e)}end(){return this.blockRemain&&this.write(Buffer.alloc(this.blockRemain)),super.end()}});Xt.Sync=Zt,Xt.Tar=Qt;let $t=e=>e.isFile()?`File`:e.isDirectory()?`Directory`:e.isSymbolicLink()?`SymbolicLink`:`Unsupported`;var en=Xt,tn=class{constructor(e,t){this.path=e||`./`,this.absolute=t,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}};let nn=en.Sync,rn=en.Tar,an=Buffer.alloc(1024),on=Symbol(`onStat`),sn=Symbol(`ended`),P=Symbol(`queue`),cn=Symbol(`current`),ln=Symbol(`process`),un=Symbol(`processing`),dn=Symbol(`processJob`),F=Symbol(`jobs`),fn=Symbol(`jobDone`),pn=Symbol(`addFSEntry`),mn=Symbol(`addTarEntry`),hn=Symbol(`stat`),gn=Symbol(`readdir`),_n=Symbol(`onreaddir`),vn=Symbol(`pipe`),yn=Symbol(`entry`),bn=Symbol(`entryOpt`),xn=Symbol(`writeEntryClass`),Sn=Symbol(`write`),Cn=Symbol(`ondrain`),wn=Ot(class extends He{constructor(e){super(e),e||=Object.create(null),this.opt=e,this.file=e.file||``,this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=(e.prefix||``).replace(/(\\|\/)+$/,``),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[xn]=en,typeof e.onwarn==`function`&&this.on(`warn`,e.onwarn),this.portable=!!e.portable,this.zip=null,e.gzip?(typeof e.gzip!=`object`&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new Ge.Gzip(e.gzip),this.zip.on(`data`,e=>super.write(e)),this.zip.on(`end`,e=>super.end()),this.zip.on(`drain`,e=>this[Cn]()),this.on(`resume`,e=>this.zip.resume())):this.on(`drain`,this[Cn]),this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,this.mtime=e.mtime||null,this.filter=typeof e.filter==`function`?e.filter:e=>!0,this[P]=new ge,this[F]=0,this.jobs=+e.jobs||4,this[un]=!1,this[sn]=!1}[Sn](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[sn]=!0,this[ln](),this}write(e){if(this[sn])throw Error(`write after end`);return e instanceof qe?this[mn](e):this[pn](e),this.flowing}[mn](e){let t=S.default.resolve(this.cwd,e.path);if(this.prefix&&(e.path=this.prefix+`/`+e.path.replace(/^\.(\/+|$)/,``)),!this.filter(e.path,e))e.resume();else{let n=new tn(e.path,t,!1);n.entry=new rn(e,this[bn](n)),n.entry.on(`end`,e=>this[fn](n)),this[F]+=1,this[P].push(n)}this[ln]()}[pn](e){let t=S.default.resolve(this.cwd,e);this.prefix&&(e=this.prefix+`/`+e.replace(/^\.(\/+|$)/,``)),this[P].push(new tn(e,t)),this[ln]()}[hn](e){e.pending=!0,this[F]+=1;let t=this.follow?`stat`:`lstat`;x.default[t](e.absolute,(t,n)=>{e.pending=!1,--this[F],t?this.emit(`error`,t):this[on](e,n)})}[on](e,t){this.statCache.set(e.absolute,t),e.stat=t,this.filter(e.path,t)||(e.ignore=!0),this[ln]()}[gn](e){e.pending=!0,this[F]+=1,x.default.readdir(e.absolute,(t,n)=>{if(e.pending=!1,--this[F],t)return this.emit(`error`,t);this[_n](e,n)})}[_n](e,t){this.readdirCache.set(e.absolute,t),e.readdir=t,this[ln]()}[ln](){if(!this[un]){this[un]=!0;for(let e=this[P].head;e!==null&&this[F]<this.jobs;e=e.next)if(this[dn](e.value),e.value.ignore){let t=e.next;this[P].removeNode(e),e.next=t}this[un]=!1,this[sn]&&!this[P].length&&this[F]===0&&(this.zip?this.zip.end(an):(super.write(an),super.end()))}}get[cn](){return this[P]&&this[P].head&&this[P].head.value}[fn](e){this[P].shift(),--this[F],this[ln]()}[dn](e){if(!e.pending){if(e.entry){e===this[cn]&&!e.piped&&this[vn](e);return}if(e.stat||(this.statCache.has(e.absolute)?this[on](e,this.statCache.get(e.absolute)):this[hn](e)),e.stat&&!e.ignore&&!(!this.noDirRecurse&&e.stat.isDirectory()&&!e.readdir&&(this.readdirCache.has(e.absolute)?this[_n](e,this.readdirCache.get(e.absolute)):this[gn](e),!e.readdir))){if(e.entry=this[yn](e),!e.entry){e.ignore=!0;return}e===this[cn]&&!e.piped&&this[vn](e)}}}[bn](e){return{onwarn:(e,t,n)=>this.warn(e,t,n),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime}}[yn](e){this[F]+=1;try{return new this[xn](e.path,this[bn](e)).on(`end`,()=>this[fn](e)).on(`error`,e=>this.emit(`error`,e))}catch(e){this.emit(`error`,e)}}[Cn](){this[cn]&&this[cn].entry&&this[cn].entry.resume()}[vn](e){e.piped=!0,e.readdir&&e.readdir.forEach(t=>{let n=this.prefix?e.path.slice(this.prefix.length+1)||`./`:e.path,r=n===`./`?``:n.replace(/\/*$/,`/`);this[pn](r+t)});let t=e.entry,n=this.zip;n?t.on(`data`,e=>{n.write(e)||t.pause()}):t.on(`data`,e=>{super.write(e)||t.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}});wn.Sync=class extends wn{constructor(e){super(e),this[xn]=nn}pause(){}resume(){}[hn](e){let t=this.follow?`statSync`:`lstatSync`;this[on](e,x.default[t](e.absolute))}[gn](e,t){this[_n](e,x.default.readdirSync(e.absolute))}[vn](e){let t=e.entry,n=this.zip;e.readdir&&e.readdir.forEach(t=>{let n=this.prefix?e.path.slice(this.prefix.length+1)||`./`:e.path,r=n===`./`?``:n.replace(/\/*$/,`/`);this[pn](r+t)}),n?t.on(`data`,e=>{n.write(e)}):t.on(`data`,e=>{super[Sn](e)})}};var Tn=wn;let En=C.default.EventEmitter,Dn=x.default.writev;if(!Dn){let e=process.binding(`fs`),t=e.FSReqWrap||e.FSReqCallback;Dn=(n,r,i,a)=>{let o=(e,t)=>a(e,t,r),s=new t;s.oncomplete=o,e.writeBuffers(n,r,i,s)}}let On=Symbol(`_autoClose`),I=Symbol(`_close`),kn=Symbol(`_ended`),L=Symbol(`_fd`),An=Symbol(`_finished`),jn=Symbol(`_flags`),Mn=Symbol(`_flush`),Nn=Symbol(`_handleChunk`),Pn=Symbol(`_makeBuf`),Fn=Symbol(`_mode`),In=Symbol(`_needDrain`),Ln=Symbol(`_onerror`),Rn=Symbol(`_onopen`),zn=Symbol(`_onread`),Bn=Symbol(`_onwrite`),Vn=Symbol(`_open`),Hn=Symbol(`_path`),Un=Symbol(`_pos`),R=Symbol(`_queue`),Wn=Symbol(`_read`),Gn=Symbol(`_readSize`),Kn=Symbol(`_reading`),qn=Symbol(`_remain`),Jn=Symbol(`_size`),Yn=Symbol(`_write`),Xn=Symbol(`_writing`),Zn=Symbol(`_defaultFlag`),Qn=Symbol(`_errored`);var $n=class extends He{constructor(e,t){if(t||={},super(t),this.readable=!0,this.writable=!1,typeof e!=`string`)throw TypeError(`path must be a string`);this[Qn]=!1,this[L]=typeof t.fd==`number`?t.fd:null,this[Hn]=e,this[Gn]=t.readSize||16*1024*1024,this[Kn]=!1,this[Jn]=typeof t.size==`number`?t.size:1/0,this[qn]=this[Jn],this[On]=typeof t.autoClose==`boolean`?t.autoClose:!0,typeof this[L]==`number`?this[Wn]():this[Vn]()}get fd(){return this[L]}get path(){return this[Hn]}write(){throw TypeError(`this is a readable stream`)}end(){throw TypeError(`this is a readable stream`)}[Vn](){x.default.open(this[Hn],`r`,(e,t)=>this[Rn](e,t))}[Rn](e,t){e?this[Ln](e):(this[L]=t,this.emit(`open`,t),this[Wn]())}[Pn](){return Buffer.allocUnsafe(Math.min(this[Gn],this[qn]))}[Wn](){if(!this[Kn]){this[Kn]=!0;let e=this[Pn]();if(e.length===0)return process.nextTick(()=>this[zn](null,0,e));x.default.read(this[L],e,0,e.length,null,(e,t,n)=>this[zn](e,t,n))}}[zn](e,t,n){this[Kn]=!1,e?this[Ln](e):this[Nn](t,n)&&this[Wn]()}[I](){if(this[On]&&typeof this[L]==`number`){let e=this[L];this[L]=null,x.default.close(e,e=>e?this.emit(`error`,e):this.emit(`close`))}}[Ln](e){this[Kn]=!0,this[I](),this.emit(`error`,e)}[Nn](e,t){let n=!1;return this[qn]-=e,e>0&&(n=super.write(e<t.length?t.slice(0,e):t)),(e===0||this[qn]<=0)&&(n=!1,this[I](),super.end()),n}emit(e,t){switch(e){case`prefinish`:case`finish`:break;case`drain`:typeof this[L]==`number`&&this[Wn]();break;case`error`:return this[Qn]?void 0:(this[Qn]=!0,super.emit(e,t));default:return super.emit(e,t)}}},er=class extends $n{[Vn](){let e=!0;try{this[Rn](null,x.default.openSync(this[Hn],`r`)),e=!1}finally{e&&this[I]()}}[Wn](){let e=!0;try{if(!this[Kn]){this[Kn]=!0;do{let e=this[Pn](),t=e.length===0?0:x.default.readSync(this[L],e,0,e.length,null);if(!this[Nn](t,e))break}while(!0);this[Kn]=!1}e=!1}finally{e&&this[I]()}}[I](){if(this[On]&&typeof this[L]==`number`){let e=this[L];this[L]=null,x.default.closeSync(e),this.emit(`close`)}}},tr=class extends En{constructor(e,t){t||={},super(t),this.readable=!1,this.writable=!0,this[Qn]=!1,this[Xn]=!1,this[kn]=!1,this[In]=!1,this[R]=[],this[Hn]=e,this[L]=typeof t.fd==`number`?t.fd:null,this[Fn]=t.mode===void 0?438:t.mode,this[Un]=typeof t.start==`number`?t.start:null,this[On]=typeof t.autoClose==`boolean`?t.autoClose:!0;let n=this[Un]===null?`w`:`r+`;this[Zn]=t.flags===void 0,this[jn]=this[Zn]?n:t.flags,this[L]===null&&this[Vn]()}emit(e,t){if(e===`error`){if(this[Qn])return;this[Qn]=!0}return super.emit(e,t)}get fd(){return this[L]}get path(){return this[Hn]}[Ln](e){this[I](),this[Xn]=!0,this.emit(`error`,e)}[Vn](){x.default.open(this[Hn],this[jn],this[Fn],(e,t)=>this[Rn](e,t))}[Rn](e,t){this[Zn]&&this[jn]===`r+`&&e&&e.code===`ENOENT`?(this[jn]=`w`,this[Vn]()):e?this[Ln](e):(this[L]=t,this.emit(`open`,t),this[Mn]())}end(e,t){return e&&this.write(e,t),this[kn]=!0,!this[Xn]&&!this[R].length&&typeof this[L]==`number`&&this[Bn](null,0),this}write(e,t){return typeof e==`string`&&(e=Buffer.from(e,t)),this[kn]?(this.emit(`error`,Error(`write() after end()`)),!1):this[L]===null||this[Xn]||this[R].length?(this[R].push(e),this[In]=!0,!1):(this[Xn]=!0,this[Yn](e),!0)}[Yn](e){x.default.write(this[L],e,0,e.length,this[Un],(e,t)=>this[Bn](e,t))}[Bn](e,t){e?this[Ln](e):(this[Un]!==null&&(this[Un]+=t),this[R].length?this[Mn]():(this[Xn]=!1,this[kn]&&!this[An]?(this[An]=!0,this[I](),this.emit(`finish`)):this[In]&&(this[In]=!1,this.emit(`drain`))))}[Mn](){if(this[R].length===0)this[kn]&&this[Bn](null,0);else if(this[R].length===1)this[Yn](this[R].pop());else{let e=this[R];this[R]=[],Dn(this[L],e,this[Un],(e,t)=>this[Bn](e,t))}}[I](){if(this[On]&&typeof this[L]==`number`){let e=this[L];this[L]=null,x.default.close(e,e=>e?this.emit(`error`,e):this.emit(`close`))}}},nr={ReadStream:$n,ReadStreamSync:er,WriteStream:tr,WriteStreamSync:class extends tr{[Vn](){let e;if(this[Zn]&&this[jn]===`r+`)try{e=x.default.openSync(this[Hn],this[jn],this[Fn])}catch(e){if(e.code===`ENOENT`)return this[jn]=`w`,this[Vn]();throw e}else e=x.default.openSync(this[Hn],this[jn],this[Fn]);this[Rn](null,e)}[I](){if(this[On]&&typeof this[L]==`number`){let e=this[L];this[L]=null,x.default.closeSync(e),this.emit(`close`)}}[Yn](e){let t=!0;try{this[Bn](null,x.default.writeSync(this[L],e,0,e.length,this[Un])),t=!1}finally{if(t)try{this[I]()}catch{}}}}};let rr=Buffer.from([31,139]),z=Symbol(`state`),ir=Symbol(`writeEntry`),ar=Symbol(`readEntry`),or=Symbol(`nextEntry`),sr=Symbol(`processEntry`),B=Symbol(`extendedHeader`),cr=Symbol(`globalExtendedHeader`),lr=Symbol(`meta`),ur=Symbol(`emitMeta`),V=Symbol(`buffer`),dr=Symbol(`queue`),fr=Symbol(`ended`),pr=Symbol(`emittedEnd`),mr=Symbol(`emit`),H=Symbol(`unzip`),hr=Symbol(`consumeChunk`),gr=Symbol(`consumeChunkSub`),_r=Symbol(`consumeBody`),vr=Symbol(`consumeMeta`),yr=Symbol(`consumeHeader`),br=Symbol(`consuming`),xr=Symbol(`bufferConcat`),Sr=Symbol(`maybeEnd`),Cr=Symbol(`writing`),wr=Symbol(`aborted`),Tr=Symbol(`onDone`),Er=Symbol(`sawValidEntry`),Dr=Symbol(`sawNullBlock`),Or=Symbol(`sawEOF`),kr=e=>!0;var Ar=Ot(class extends C.default{constructor(e){e||={},super(e),this.file=e.file||``,this[Er]=null,this.on(Tr,e=>{(this[z]===`begin`||this[Er]===!1)&&this.warn(`TAR_BAD_ARCHIVE`,`Unrecognized archive format`)}),e.ondone?this.on(Tr,e.ondone):this.on(Tr,e=>{this.emit(`prefinish`),this.emit(`finish`),this.emit(`end`),this.emit(`close`)}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||1048576,this.filter=typeof e.filter==`function`?e.filter:kr,this.writable=!0,this.readable=!1,this[dr]=new ge,this[V]=null,this[ar]=null,this[ir]=null,this[z]=`begin`,this[lr]=``,this[B]=null,this[cr]=null,this[fr]=!1,this[H]=null,this[wr]=!1,this[Dr]=!1,this[Or]=!1,typeof e.onwarn==`function`&&this.on(`warn`,e.onwarn),typeof e.onentry==`function`&&this.on(`entry`,e.onentry)}[yr](e,t){this[Er]===null&&(this[Er]=!1);let n;try{n=new St(e,t,this[B],this[cr])}catch(e){return this.warn(`TAR_ENTRY_INVALID`,e)}if(n.nullBlock)this[Dr]?(this[Or]=!0,this[z]===`begin`&&(this[z]=`header`),this[mr](`eof`)):(this[Dr]=!0,this[mr](`nullBlock`));else if(this[Dr]=!1,!n.cksumValid)this.warn(`TAR_ENTRY_INVALID`,`checksum failure`,{header:n});else if(!n.path)this.warn(`TAR_ENTRY_INVALID`,`path is required`,{header:n});else{let e=n.type;if(/^(Symbolic)?Link$/.test(e)&&!n.linkpath)this.warn(`TAR_ENTRY_INVALID`,`linkpath required`,{header:n});else if(!/^(Symbolic)?Link$/.test(e)&&n.linkpath)this.warn(`TAR_ENTRY_INVALID`,`linkpath forbidden`,{header:n});else{let e=this[ir]=new qe(n,this[B],this[cr]);this[Er]||(e.remain?e.on(`end`,()=>{e.invalid||(this[Er]=!0)}):this[Er]=!0),e.meta?e.size>this.maxMetaEntrySize?(e.ignore=!0,this[mr](`ignoredEntry`,e),this[z]=`ignore`,e.resume()):e.size>0&&(this[lr]=``,e.on(`data`,e=>this[lr]+=e),this[z]=`meta`):(this[B]=null,e.ignore=e.ignore||!this.filter(e.path,e),e.ignore?(this[mr](`ignoredEntry`,e),this[z]=e.remain?`ignore`:`header`,e.resume()):(e.remain?this[z]=`body`:(this[z]=`header`,e.end()),this[ar]?this[dr].push(e):(this[dr].push(e),this[or]())))}}}[sr](e){let t=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[ar]=e,this.emit(`entry`,e),e.emittedEnd||(e.on(`end`,e=>this[or]()),t=!1)):(this[ar]=null,t=!1),t}[or](){do;while(this[sr](this[dr].shift()));if(!this[dr].length){let e=this[ar];!e||e.flowing||e.size===e.remain?this[Cr]||this.emit(`drain`):e.once(`drain`,e=>this.emit(`drain`))}}[_r](e,t){let n=this[ir],r=n.blockRemain,i=r>=e.length&&t===0?e:e.slice(t,t+r);return n.write(i),n.blockRemain||(this[z]=`header`,this[ir]=null,n.end()),i.length}[vr](e,t){let n=this[ir],r=this[_r](e,t);return this[ir]||this[ur](n),r}[mr](e,t,n){!this[dr].length&&!this[ar]?this.emit(e,t,n):this[dr].push([e,t,n])}[ur](e){switch(this[mr](`meta`,this[lr]),e.type){case`ExtendedHeader`:case`OldExtendedHeader`:this[B]=Dt.parse(this[lr],this[B],!1);break;case`GlobalExtendedHeader`:this[cr]=Dt.parse(this[lr],this[cr],!0);break;case`NextFileHasLongPath`:case`OldGnuLongPath`:this[B]=this[B]||Object.create(null),this[B].path=this[lr].replace(/\0.*/,``);break;case`NextFileHasLongLinkpath`:this[B]=this[B]||Object.create(null),this[B].linkpath=this[lr].replace(/\0.*/,``);break;default:throw Error(`unknown meta: `+e.type)}}abort(e){this[wr]=!0,this.emit(`abort`,e),this.warn(`TAR_ABORT`,e,{recoverable:!1})}write(e){if(this[wr])return;if(this[H]===null&&e){if(this[V]&&(e=Buffer.concat([this[V],e]),this[V]=null),e.length<rr.length)return this[V]=e,!0;for(let t=0;this[H]===null&&t<rr.length;t++)e[t]!==rr[t]&&(this[H]=!1);if(this[H]===null){let t=this[fr];this[fr]=!1,this[H]=new Ge.Unzip,this[H].on(`data`,e=>this[hr](e)),this[H].on(`error`,e=>this.abort(e)),this[H].on(`end`,e=>{this[fr]=!0,this[hr]()}),this[Cr]=!0;let n=this[H][t?`end`:`write`](e);return this[Cr]=!1,n}}this[Cr]=!0,this[H]?this[H].write(e):this[hr](e),this[Cr]=!1;let t=this[dr].length?!1:this[ar]?this[ar].flowing:!0;return!t&&!this[dr].length&&this[ar].once(`drain`,e=>this.emit(`drain`)),t}[xr](e){e&&!this[wr]&&(this[V]=this[V]?Buffer.concat([this[V],e]):e)}[Sr](){if(this[fr]&&!this[pr]&&!this[wr]&&!this[br]){this[pr]=!0;let e=this[ir];if(e&&e.blockRemain){let t=this[V]?this[V].length:0;this.warn(`TAR_BAD_ARCHIVE`,`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e}),this[V]&&e.write(this[V]),e.end()}this[mr](Tr)}}[hr](e){if(this[br])this[xr](e);else if(!e&&!this[V])this[Sr]();else{if(this[br]=!0,this[V]){this[xr](e);let t=this[V];this[V]=null,this[gr](t)}else this[gr](e);for(;this[V]&&this[V].length>=512&&!this[wr]&&!this[Or];){let e=this[V];this[V]=null,this[gr](e)}this[br]=!1}(!this[V]||this[fr])&&this[Sr]()}[gr](e){let t=0,n=e.length;for(;t+512<=n&&!this[wr]&&!this[Or];)switch(this[z]){case`begin`:case`header`:this[yr](e,t),t+=512;break;case`ignore`:case`body`:t+=this[_r](e,t);break;case`meta`:t+=this[vr](e,t);break;default:throw Error(`invalid state: `+this[z])}t<n&&(this[V]?this[V]=Buffer.concat([e.slice(t),this[V]]):this[V]=e.slice(t))}end(e){this[wr]||(this[H]?this[H].end(e):(this[fr]=!0,this.write(e)))}}),jr=(e,t,n)=>{typeof e==`function`?(n=e,t=null,e={}):Array.isArray(e)&&(t=e,e={}),typeof t==`function`&&(n=t,t=null),t=t?Array.from(t):[];let r=me(e);if(r.sync&&typeof n==`function`)throw TypeError(`callback not supported for sync tar functions`);if(!r.file&&typeof n==`function`)throw TypeError(`callback only supported with file option`);return t.length&&Nr(r,t),r.noResume||Mr(r),r.file&&r.sync?Pr(r):r.file?Fr(r,n):Ir(r)};let Mr=e=>{let t=e.onentry;e.onentry=t?e=>{t(e),e.resume()}:e=>e.resume()},Nr=(e,t)=>{let n=new Map(t.map(e=>[e.replace(/\/+$/,``),!0])),r=e.filter,i=(e,t)=>{let r=t||S.default.parse(e).root||`.`,a=e===r?!1:n.has(e)?n.get(e):i(S.default.dirname(e),r);return n.set(e,a),a};e.filter=r?(e,t)=>r(e,t)&&i(e.replace(/\/+$/,``)):e=>i(e.replace(/\/+$/,``))},Pr=e=>{let t=Ir(e),n=e.file,r=!0,i;try{let a=x.default.statSync(n),o=e.maxReadSize||16*1024*1024;if(a.size<o)t.end(x.default.readFileSync(n));else{let e=0,r=Buffer.allocUnsafe(o);for(i=x.default.openSync(n,`r`);e<a.size;){let n=x.default.readSync(i,r,0,o,e);e+=n,t.write(r.slice(0,n))}t.end()}r=!1}finally{if(r&&i)try{x.default.closeSync(i)}catch{}}},Fr=(e,t)=>{let n=new Ar(e),r=e.maxReadSize||16*1024*1024,i=e.file,a=new Promise((e,t)=>{n.on(`error`,t),n.on(`end`,e),x.default.stat(i,(e,a)=>{if(e)t(e);else{let e=new nr.ReadStream(i,{readSize:r,size:a.size});e.on(`error`,t),e.pipe(n)}})});return t?a.then(t,t):a},Ir=e=>new Ar(e);var Lr=(e,t,n)=>{if(typeof t==`function`&&(n=t),Array.isArray(e)&&(t=e,e={}),!t||!Array.isArray(t)||!t.length)throw TypeError(`no files or directories specified`);t=Array.from(t);let r=me(e);if(r.sync&&typeof n==`function`)throw TypeError(`callback not supported for sync tar functions`);if(!r.file&&typeof n==`function`)throw TypeError(`callback only supported with file option`);return r.file&&r.sync?Rr(r,t):r.file?zr(r,t,n):r.sync?Hr(r,t):Ur(r,t)};let Rr=(e,t)=>{let n=new Tn.Sync(e),r=new nr.WriteStreamSync(e.file,{mode:e.mode||438});n.pipe(r),Br(n,t)},zr=(e,t,n)=>{let r=new Tn(e),i=new nr.WriteStream(e.file,{mode:e.mode||438});r.pipe(i);let a=new Promise((e,t)=>{i.on(`error`,t),i.on(`close`,e),r.on(`error`,t)});return Vr(r,t),n?a.then(n,n):a},Br=(e,t)=>{t.forEach(t=>{t.charAt(0)===`@`?jr({file:S.default.resolve(e.cwd,t.substr(1)),sync:!0,noResume:!0,onentry:t=>e.add(t)}):e.add(t)}),e.end()},Vr=(e,t)=>{for(;t.length;){let n=t.shift();if(n.charAt(0)===`@`)return jr({file:S.default.resolve(e.cwd,n.substr(1)),noResume:!0,onentry:t=>e.add(t)}).then(n=>Vr(e,t));e.add(n)}e.end()},Hr=(e,t)=>{let n=new Tn.Sync(e);return Br(n,t),n},Ur=(e,t)=>{let n=new Tn(e);return Vr(n,t),n};var Wr=(e,t,n)=>{let r=me(e);if(!r.file)throw TypeError(`file is required`);if(r.gzip)throw TypeError(`cannot append to compressed archives`);if(!t||!Array.isArray(t)||!t.length)throw TypeError(`no files or directories specified`);return t=Array.from(t),r.sync?Gr(r,t):qr(r,t,n)};let Gr=(e,t)=>{let n=new Tn.Sync(e),r=!0,i,a;try{try{i=x.default.openSync(e.file,`r+`)}catch(t){if(t.code===`ENOENT`)i=x.default.openSync(e.file,`w+`);else throw t}let o=x.default.fstatSync(i),s=Buffer.alloc(512);POSITION:for(a=0;a<o.size;a+=512){for(let e=0,t=0;e<512;e+=t){if(t=x.default.readSync(i,s,e,s.length-e,a+e),a===0&&s[0]===31&&s[1]===139)throw Error(`cannot append to compressed archives`);if(!t)break POSITION}let t=new St(s);if(!t.cksumValid)break;let n=512*Math.ceil(t.size/512);if(a+n+512>o.size)break;a+=n,e.mtimeCache&&e.mtimeCache.set(t.path,t.mtime)}r=!1,Kr(e,n,a,i,t)}finally{if(r)try{x.default.closeSync(i)}catch{}}},Kr=(e,t,n,r,i)=>{let a=new nr.WriteStreamSync(e.file,{fd:r,start:n});t.pipe(a),Jr(t,i)},qr=(e,t,n)=>{t=Array.from(t);let r=new Tn(e),i=(t,n,r)=>{let i=(e,n)=>{e?x.default.close(t,t=>r(e)):r(null,n)},a=0;if(n===0)return i(null,0);let o=0,s=Buffer.alloc(512),c=(r,l)=>{if(r)return i(r);if(o+=l,o<512&&l)return x.default.read(t,s,o,s.length-o,a+o,c);if(a===0&&s[0]===31&&s[1]===139)return i(Error(`cannot append to compressed archives`));if(o<512)return i(null,a);let u=new St(s);if(!u.cksumValid)return i(null,a);let d=512*Math.ceil(u.size/512);if(a+d+512>n||(a+=d+512,a>=n))return i(null,a);e.mtimeCache&&e.mtimeCache.set(u.path,u.mtime),o=0,x.default.read(t,s,0,512,a,c)};x.default.read(t,s,0,512,a,c)},a=new Promise((n,a)=>{r.on(`error`,a);let o=`r+`,s=(c,l)=>{if(c&&c.code===`ENOENT`&&o===`r+`)return o=`w+`,x.default.open(e.file,o,s);if(c)return a(c);x.default.fstat(l,(o,s)=>{if(o)return a(o);i(l,s.size,(i,o)=>{if(i)return a(i);let s=new nr.WriteStream(e.file,{fd:l,start:o});r.pipe(s),s.on(`error`,a),s.on(`close`,n),Yr(r,t)})})};x.default.open(e.file,o,s)});return n?a.then(n,n):a},Jr=(e,t)=>{t.forEach(t=>{t.charAt(0)===`@`?jr({file:S.default.resolve(e.cwd,t.substr(1)),sync:!0,noResume:!0,onentry:t=>e.add(t)}):e.add(t)}),e.end()},Yr=(e,t)=>{for(;t.length;){let n=t.shift();if(n.charAt(0)===`@`)return jr({file:S.default.resolve(e.cwd,n.substr(1)),noResume:!0,onentry:t=>e.add(t)}).then(n=>Yr(e,t));e.add(n)}e.end()};var Xr=(e,t,n)=>{let r=me(e);if(!r.file)throw TypeError(`file is required`);if(r.gzip)throw TypeError(`cannot append to compressed archives`);if(!t||!Array.isArray(t)||!t.length)throw TypeError(`no files or directories specified`);return t=Array.from(t),Zr(r),Wr(r,t,n)};let Zr=e=>{let t=e.filter;e.mtimeCache||=new Map,e.filter=t?(n,r)=>t(n,r)&&!(e.mtimeCache.get(n)>r.mtime):(t,n)=>!(e.mtimeCache.get(t)>n.mtime)},{promisify:Qr}=T.default;var $r=e=>{if(!e)e={mode:511,fs:x.default};else if(typeof e==`object`)e={mode:511,fs:x.default,...e};else if(typeof e==`number`)e={mode:e,fs:x.default};else if(typeof e==`string`)e={mode:parseInt(e,8),fs:x.default};else throw TypeError(`invalid options argument`);return e.mkdir=e.mkdir||e.fs.mkdir||x.default.mkdir,e.mkdirAsync=Qr(e.mkdir),e.stat=e.stat||e.fs.stat||x.default.stat,e.statAsync=Qr(e.stat),e.statSync=e.statSync||e.fs.statSync||x.default.statSync,e.mkdirSync=e.mkdirSync||e.fs.mkdirSync||x.default.mkdirSync,e};let ei=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:ti,parse:ni}=S.default;var ri=e=>{if(/\0/.test(e))throw Object.assign(TypeError(`path must be a string without null bytes`),{path:e,code:`ERR_INVALID_ARG_VALUE`});if(e=ti(e),ei===`win32`){let t=/[*|"<>?:]/,{root:n}=ni(e);if(t.test(e.substr(n.length)))throw Object.assign(Error(`Illegal characters in path.`),{path:e,code:`EINVAL`})}return e};let{dirname:ii}=S.default,ai=(e,t,n=void 0)=>n===t?Promise.resolve():e.statAsync(t).then(e=>e.isDirectory()?n:void 0,n=>n.code===`ENOENT`?ai(e,ii(t),t):void 0),oi=(e,t,n=void 0)=>{if(n!==t)try{return e.statSync(t).isDirectory()?n:void 0}catch(n){return n.code===`ENOENT`?oi(e,ii(t),t):void 0}};var si={findMade:ai,findMadeSync:oi};let{dirname:ci}=S.default,li=(e,t,n)=>{t.recursive=!1;let r=ci(e);return r===e?t.mkdirAsync(e,t).catch(e=>{if(e.code!==`EISDIR`)throw e}):t.mkdirAsync(e,t).then(()=>n||e,i=>{if(i.code===`ENOENT`)return li(r,t).then(n=>li(e,t,n));if(i.code!==`EEXIST`&&i.code!==`EROFS`)throw i;return t.statAsync(e).then(e=>{if(e.isDirectory())return n;throw i},()=>{throw i})})},ui=(e,t,n)=>{let r=ci(e);if(t.recursive=!1,r===e)try{return t.mkdirSync(e,t)}catch(e){if(e.code!==`EISDIR`)throw e;return}try{return t.mkdirSync(e,t),n||e}catch(i){if(i.code===`ENOENT`)return ui(e,t,ui(r,t,n));if(i.code!==`EEXIST`&&i.code!==`EROFS`)throw i;try{if(!t.statSync(e).isDirectory())throw i}catch{throw i}}};var di={mkdirpManual:li,mkdirpManualSync:ui};let{dirname:fi}=S.default,{findMade:pi,findMadeSync:mi}=si,{mkdirpManual:hi,mkdirpManualSync:gi}=di;var _i={mkdirpNative:(e,t)=>(t.recursive=!0,fi(e)===e?t.mkdirAsync(e,t):pi(t,e).then(n=>t.mkdirAsync(e,t).then(()=>n).catch(n=>{if(n.code===`ENOENT`)return hi(e,t);throw n}))),mkdirpNativeSync:(e,t)=>{if(t.recursive=!0,fi(e)===e)return t.mkdirSync(e,t);let n=mi(t,e);try{return t.mkdirSync(e,t),n}catch(n){if(n.code===`ENOENT`)return gi(e,t);throw n}}};let vi=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,``).split(`.`),yi=+vi[0]>10||+vi[0]==10&&+vi[1]>=12;var bi={useNative:yi?e=>e.mkdir===x.default.mkdir:()=>!1,useNativeSync:yi?e=>e.mkdirSync===x.default.mkdirSync:()=>!1};let{mkdirpNative:xi,mkdirpNativeSync:Si}=_i,{mkdirpManual:Ci,mkdirpManualSync:wi}=di,{useNative:Ti,useNativeSync:Ei}=bi,Di=(e,t)=>(e=ri(e),t=$r(t),Ti(t)?xi(e,t):Ci(e,t));Di.sync=(e,t)=>(e=ri(e),t=$r(t),Ei(t)?Si(e,t):wi(e,t)),Di.native=(e,t)=>xi(ri(e),$r(t)),Di.manual=(e,t)=>Ci(ri(e),$r(t)),Di.nativeSync=(e,t)=>Si(ri(e),$r(t)),Di.manualSync=(e,t)=>wi(ri(e),$r(t));var Oi=Di;let ki=x.default.lchown?`lchown`:`chown`,Ai=x.default.lchownSync?`lchownSync`:`chownSync`,ji=x.default.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),Mi=(e,t,n)=>{try{return x.default[Ai](e,t,n)}catch(e){if(e.code!==`ENOENT`)throw e}},Ni=(e,t,n)=>{try{return x.default.chownSync(e,t,n)}catch(e){if(e.code!==`ENOENT`)throw e}},Pi=ji?(e,t,n,r)=>i=>{!i||i.code!==`EISDIR`?r(i):x.default.chown(e,t,n,r)}:(e,t,n,r)=>r,Fi=ji?(e,t,n)=>{try{return Mi(e,t,n)}catch(r){if(r.code!==`EISDIR`)throw r;Ni(e,t,n)}}:(e,t,n)=>Mi(e,t,n),Ii=process.version,Li=(e,t,n)=>x.default.readdir(e,t,n),Ri=(e,t)=>x.default.readdirSync(e,t);/^v4\./.test(Ii)&&(Li=(e,t,n)=>x.default.readdir(e,n));let zi=(e,t,n,r)=>{x.default[ki](e,t,n,Pi(e,t,n,e=>{r(e&&e.code!==`ENOENT`?e:null)}))},Bi=(e,t,n,r,i)=>{if(typeof t==`string`)return x.default.lstat(S.default.resolve(e,t),(a,o)=>{if(a)return i(a.code===`ENOENT`?null:a);o.name=t,Bi(e,o,n,r,i)});t.isDirectory()?Vi(S.default.resolve(e,t.name),n,r,a=>{if(a)return i(a);zi(S.default.resolve(e,t.name),n,r,i)}):zi(S.default.resolve(e,t.name),n,r,i)},Vi=(e,t,n,r)=>{Li(e,{withFileTypes:!0},(i,a)=>{if(i){if(i.code===`ENOENT`)return r();if(i.code!==`ENOTDIR`&&i.code!==`ENOTSUP`)return r(i)}if(i||!a.length)return zi(e,t,n,r);let o=a.length,s=null,c=i=>{if(!s){if(i)return r(s=i);if(--o===0)return zi(e,t,n,r)}};a.forEach(r=>Bi(e,r,t,n,c))})},Hi=(e,t,n,r)=>{if(typeof t==`string`)try{let n=x.default.lstatSync(S.default.resolve(e,t));n.name=t,t=n}catch(e){if(e.code===`ENOENT`)return;throw e}t.isDirectory()&&Ui(S.default.resolve(e,t.name),n,r),Fi(S.default.resolve(e,t.name),n,r)},Ui=(e,t,n)=>{let r;try{r=Ri(e,{withFileTypes:!0})}catch(r){if(r.code===`ENOENT`)return;if(r.code===`ENOTDIR`||r.code===`ENOTSUP`)return Fi(e,t,n);throw r}return r&&r.length&&r.forEach(r=>Hi(e,r,t,n)),Fi(e,t,n)};var Wi=Vi;Vi.sync=Ui;var Gi=class extends Error{constructor(e,t){super(`Cannot extract through symbolic link`),this.path=t,this.symlink=e}get name(){return`SylinkError`}},Ki=class extends Error{constructor(e,t){super(t+`: Cannot cd into '`+e+`'`),this.path=e,this.code=t}get name(){return`CwdError`}},qi=(e,t,n)=>{let r=t.umask,i=t.mode|448,a=(i&r)!==0,o=t.uid,s=t.gid,c=typeof o==`number`&&typeof s==`number`&&(o!==t.processUid||s!==t.processGid),l=t.preserve,u=t.unlink,d=t.cache,f=t.cwd,p=(t,r)=>{t?n(t):(d.set(e,!0),r&&c?Wi(r,o,s,e=>p(e)):a?x.default.chmod(e,i,n):n())};if(d&&d.get(e)===!0)return p();if(e===f)return x.default.stat(e,(t,n)=>{(t||!n.isDirectory())&&(t=new Ki(e,t&&t.code||`ENOTDIR`)),p(t)});if(l)return Oi(e,{mode:i}).then(e=>p(null,e),p);Ji(f,S.default.relative(f,e).split(/\/|\\/),i,d,u,f,null,p)};let Ji=(e,t,n,r,i,a,o,s)=>{if(!t.length)return s(null,o);let c=t.shift(),l=e+`/`+c;if(r.get(l))return Ji(l,t,n,r,i,a,o,s);x.default.mkdir(l,n,Yi(l,t,n,r,i,a,o,s))},Yi=(e,t,n,r,i,a,o,s)=>c=>{if(c){if(c.path&&S.default.dirname(c.path)===a&&(c.code===`ENOTDIR`||c.code===`ENOENT`))return s(new Ki(a,c.code));x.default.lstat(e,(l,u)=>{if(l)s(l);else if(u.isDirectory())Ji(e,t,n,r,i,a,o,s);else if(i)x.default.unlink(e,c=>{if(c)return s(c);x.default.mkdir(e,n,Yi(e,t,n,r,i,a,o,s))});else if(u.isSymbolicLink())return s(new Gi(e,e+`/`+t.join(`/`)));else s(c)})}else o||=e,Ji(e,t,n,r,i,a,o,s)};qi.sync=(e,t)=>{let n=t.umask,r=t.mode|448,i=(r&n)!==0,a=t.uid,o=t.gid,s=typeof a==`number`&&typeof o==`number`&&(a!==t.processUid||o!==t.processGid),c=t.preserve,l=t.unlink,u=t.cache,d=t.cwd,f=t=>{u.set(e,!0),t&&s&&Wi.sync(t,a,o),i&&x.default.chmodSync(e,r)};if(u&&u.get(e)===!0)return f();if(e===d){let t=!1,n=`ENOTDIR`;try{t=x.default.statSync(e).isDirectory()}catch(e){n=e.code}finally{if(!t)throw new Ki(e,n)}f();return}if(c)return f(Oi.sync(e,r));let p=S.default.relative(d,e).split(/\/|\\/),m=null;for(let e=p.shift(),t=d;e&&(t+=`/`+e);e=p.shift())if(!u.get(t))try{x.default.mkdirSync(t,r),m||=t,u.set(t,!0)}catch(e){if(e.path&&S.default.dirname(e.path)===d&&(e.code===`ENOTDIR`||e.code===`ENOENT`))return new Ki(d,e.code);let n=x.default.lstatSync(t);if(n.isDirectory()){u.set(t,!0);continue}else if(l){x.default.unlinkSync(t),x.default.mkdirSync(t,r),m||=t,u.set(t,!0);continue}else if(n.isSymbolicLink())return new Gi(t,t+`/`+p.join(`/`))}return f(m)};var Xi=()=>{let e=new Map,t=new Map,{join:n}=S.default,r=e=>n(e).split(/[\\/]/).slice(0,-1).reduce((e,t)=>e.length?e.concat(n(e[e.length-1],t)):[t],[]),i=new Set,a=n=>{let r=t.get(n);if(!r)throw Error(`function does not have any path reservations`);return{paths:r.paths.map(t=>e.get(t)),dirs:[...r.dirs].map(t=>e.get(t))}},o=e=>{let{paths:t,dirs:n}=a(e);return t.every(t=>t[0]===e)&&n.every(t=>t[0]instanceof Set&&t[0].has(e))},s=e=>i.has(e)||!o(e)?!1:(i.add(e),e(()=>c(e)),!0),c=n=>{if(!i.has(n))return!1;let{paths:r,dirs:a}=t.get(n),o=new Set;return r.forEach(t=>{let r=e.get(t);w.default.equal(r[0],n),r.length===1?e.delete(t):(r.shift(),typeof r[0]==`function`?o.add(r[0]):r[0].forEach(e=>o.add(e)))}),a.forEach(t=>{let r=e.get(t);w.default(r[0]instanceof Set),r[0].size===1&&r.length===1?e.delete(t):r[0].size===1?(r.shift(),o.add(r[0])):r[0].delete(n)}),i.delete(n),o.forEach(e=>s(e)),!0};return{check:o,reserve:(n,i)=>{let a=new Set(n.map(e=>r(e)).reduce((e,t)=>e.concat(t)));return t.set(i,{dirs:a,paths:n}),n.forEach(t=>{let n=e.get(t);n?n.push(i):e.set(t,[i])}),a.forEach(t=>{let n=e.get(t);n?n[n.length-1]instanceof Set?n[n.length-1].add(i):n.push(new Set([i])):e.set(t,[new Set([i])])}),s(i)}}};let Zi=(process.env.__FAKE_PLATFORM__||process.platform)===`win32`,{O_CREAT:Qi,O_TRUNC:$i,O_WRONLY:ea,UV_FS_O_FILEMAP:ta=0}=(E.__FAKE_TESTING_FS__||x.default).constants,na=Zi&&!!ta,ra=ta|$i|Qi|ea;var ia=na?e=>e<524288?ra:`w`:()=>`w`;let aa=Symbol(`onEntry`),oa=Symbol(`checkFs`),sa=Symbol(`checkFs2`),ca=Symbol(`isReusable`),la=Symbol(`makeFs`),ua=Symbol(`file`),da=Symbol(`directory`),fa=Symbol(`link`),pa=Symbol(`symlink`),ma=Symbol(`hardlink`),ha=Symbol(`unsupported`),ga=Symbol(`checkPath`),_a=Symbol(`mkdir`),U=Symbol(`onError`),va=Symbol(`pending`),ya=Symbol(`pend`),ba=Symbol(`unpend`),xa=Symbol(`ended`),Sa=Symbol(`maybeClose`),Ca=Symbol(`skip`),wa=Symbol(`doChown`),Ta=Symbol(`uid`),Ea=Symbol(`gid`),Da=()=>{throw Error(`sync function called cb somehow?!?`)},Oa=(e,t)=>{if(process.platform!==`win32`)return x.default.unlink(e,t);let n=e+`.DELETE.`+ie.default.randomBytes(16).toString(`hex`);x.default.rename(e,n,e=>{if(e)return t(e);x.default.unlink(n,t)})},ka=e=>{if(process.platform!==`win32`)return x.default.unlinkSync(e);let t=e+`.DELETE.`+ie.default.randomBytes(16).toString(`hex`);x.default.renameSync(e,t),x.default.unlinkSync(t)},Aa=(e,t,n)=>e===e>>>0?e:t===t>>>0?t:n;var ja=class extends Ar{constructor(e){if(e||={},e.ondone=e=>{this[xa]=!0,this[Sa]()},super(e),this.reservations=Xi(),this.transform=typeof e.transform==`function`?e.transform:null,this.writable=!0,this.readable=!1,this[va]=0,this[xa]=!1,this.dirCache=e.dirCache||new Map,typeof e.uid==`number`||typeof e.gid==`number`){if(typeof e.uid!=`number`||typeof e.gid!=`number`)throw TypeError(`cannot set owner without number uid and gid`);if(e.preserveOwner)throw TypeError(`cannot preserve owner in archive and also set owner explicitly`);this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!=`number`?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||process.platform===`win32`,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=S.default.resolve(e.cwd||process.cwd()),this.strip=+e.strip||0,this.processUmask=e.noChmod?0:process.umask(),this.umask=typeof e.umask==`number`?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on(`entry`,e=>this[aa](e))}warn(e,t,n={}){return(e===`TAR_BAD_ARCHIVE`||e===`TAR_ABORT`)&&(n.recoverable=!1),super.warn(e,t,n)}[Sa](){this[xa]&&this[va]===0&&(this.emit(`prefinish`),this.emit(`finish`),this.emit(`end`),this.emit(`close`))}[ga](e){if(this.strip){let t=e.path.split(/\/|\\/);if(t.length<this.strip)return!1;if(e.path=t.slice(this.strip).join(`/`),e.type===`Link`){let t=e.linkpath.split(/\/|\\/);t.length>=this.strip&&(e.linkpath=t.slice(this.strip).join(`/`))}}if(!this.preservePaths){let t=e.path;if(t.match(/(^|\/|\\)\.\.(\\|\/|$)/))return this.warn(`TAR_ENTRY_ERROR`,`path contains '..'`,{entry:e,path:t}),!1;if(S.default.win32.isAbsolute(t)){let n=S.default.win32.parse(t);e.path=t.substr(n.root.length);let r=n.root;this.warn(`TAR_ENTRY_INFO`,`stripping ${r} from absolute path`,{entry:e,path:t})}}if(this.win32){let t=S.default.win32.parse(e.path);e.path=t.root===``?Nt.encode(e.path):t.root+Nt.encode(e.path.substr(t.root.length))}return S.default.isAbsolute(e.path)?e.absolute=e.path:e.absolute=S.default.resolve(this.cwd,e.path),!0}[aa](e){if(!this[ga](e))return e.resume();switch(w.default.equal(typeof e.absolute,`string`),e.type){case`Directory`:case`GNUDumpDir`:e.mode&&(e.mode|=448);case`File`:case`OldFile`:case`ContiguousFile`:case`Link`:case`SymbolicLink`:return this[oa](e);case`CharacterDevice`:case`BlockDevice`:case`FIFO`:default:return this[ha](e)}}[U](e,t){e.name===`CwdError`?this.emit(`error`,e):(this.warn(`TAR_ENTRY_ERROR`,e,{entry:t}),this[ba](),t.resume())}[_a](e,t,n){qi(e,{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t,noChmod:this.noChmod},n)}[wa](e){return this.forceChown||this.preserveOwner&&(typeof e.uid==`number`&&e.uid!==this.processUid||typeof e.gid==`number`&&e.gid!==this.processGid)||typeof this.uid==`number`&&this.uid!==this.processUid||typeof this.gid==`number`&&this.gid!==this.processGid}[Ta](e){return Aa(this.uid,e.uid,this.processUid)}[Ea](e){return Aa(this.gid,e.gid,this.processGid)}[ua](e,t){let n=e.mode&4095||this.fmode,r=new nr.WriteStream(e.absolute,{flags:ia(e.size),mode:n,autoClose:!1});r.on(`error`,t=>this[U](t,e));let i=1,a=n=>{if(n)return this[U](n,e);--i===0&&x.default.close(r.fd,n=>{t(),n?this[U](n,e):this[ba]()})};r.on(`finish`,t=>{let n=e.absolute,o=r.fd;if(e.mtime&&!this.noMtime){i++;let t=e.atime||new Date,r=e.mtime;x.default.futimes(o,t,r,e=>e?x.default.utimes(n,t,r,t=>a(t&&e)):a())}if(this[wa](e)){i++;let t=this[Ta](e),r=this[Ea](e);x.default.fchown(o,t,r,e=>e?x.default.chown(n,t,r,t=>a(t&&e)):a())}a()});let o=this.transform&&this.transform(e)||e;o!==e&&(o.on(`error`,t=>this[U](t,e)),e.pipe(o)),o.pipe(r)}[da](e,t){let n=e.mode&4095||this.dmode;this[_a](e.absolute,n,n=>{if(n)return t(),this[U](n,e);let r=1,i=n=>{--r===0&&(t(),this[ba](),e.resume())};e.mtime&&!this.noMtime&&(r++,x.default.utimes(e.absolute,e.atime||new Date,e.mtime,i)),this[wa](e)&&(r++,x.default.chown(e.absolute,this[Ta](e),this[Ea](e),i)),i()})}[ha](e){e.unsupported=!0,this.warn(`TAR_ENTRY_UNSUPPORTED`,`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[pa](e,t){this[fa](e,e.linkpath,`symlink`,t)}[ma](e,t){this[fa](e,S.default.resolve(this.cwd,e.linkpath),`link`,t)}[ya](){this[va]++}[ba](){this[va]--,this[Sa]()}[Ca](e){this[ba](),e.resume()}[ca](e,t){return e.type===`File`&&!this.unlink&&t.isFile()&&t.nlink<=1&&process.platform!==`win32`}[oa](e){this[ya]();let t=[e.path];e.linkpath&&t.push(e.linkpath),this.reservations.reserve(t,t=>this[sa](e,t))}[sa](e,t){this[_a](S.default.dirname(e.absolute),this.dmode,n=>{if(n)return t(),this[U](n,e);x.default.lstat(e.absolute,(n,r)=>{r&&(this.keep||this.newer&&r.mtime>e.mtime)?(this[Ca](e),t()):n||this[ca](e,r)?this[la](null,e,t):r.isDirectory()?e.type===`Directory`?!this.noChmod&&(!e.mode||(r.mode&4095)===e.mode)?this[la](null,e,t):x.default.chmod(e.absolute,e.mode,n=>this[la](n,e,t)):x.default.rmdir(e.absolute,n=>this[la](n,e,t)):Oa(e.absolute,n=>this[la](n,e,t))})})}[la](e,t,n){if(e)return this[U](e,t);switch(t.type){case`File`:case`OldFile`:case`ContiguousFile`:return this[ua](t,n);case`Link`:return this[ma](t,n);case`SymbolicLink`:return this[pa](t,n);case`Directory`:case`GNUDumpDir`:return this[da](t,n)}}[fa](e,t,n,r){x.default[n](t,e.absolute,t=>{if(t)return this[U](t,e);r(),this[ba](),e.resume()})}};ja.Sync=class extends ja{[oa](e){let t=this[_a](S.default.dirname(e.absolute),this.dmode,Da);if(t)return this[U](t,e);try{let t=x.default.lstatSync(e.absolute);if(this.keep||this.newer&&t.mtime>e.mtime)return this[Ca](e);if(this[ca](e,t))return this[la](null,e,Da);try{return t.isDirectory()?e.type===`Directory`?!this.noChmod&&e.mode&&(t.mode&4095)!==e.mode&&x.default.chmodSync(e.absolute,e.mode):x.default.rmdirSync(e.absolute):ka(e.absolute),this[la](null,e,Da)}catch(t){return this[U](t,e)}}catch{return this[la](null,e,Da)}}[ua](e,t){let n=e.mode&4095||this.fmode,r=t=>{let n;try{x.default.closeSync(i)}catch(e){n=e}(t||n)&&this[U](t||n,e)},i;try{i=x.default.openSync(e.absolute,ia(e.size),n)}catch(e){return r(e)}let a=this.transform&&this.transform(e)||e;a!==e&&(a.on(`error`,t=>this[U](t,e)),e.pipe(a)),a.on(`data`,e=>{try{x.default.writeSync(i,e,0,e.length)}catch(e){r(e)}}),a.on(`end`,t=>{let n=null;if(e.mtime&&!this.noMtime){let t=e.atime||new Date,r=e.mtime;try{x.default.futimesSync(i,t,r)}catch(i){try{x.default.utimesSync(e.absolute,t,r)}catch{n=i}}}if(this[wa](e)){let t=this[Ta](e),r=this[Ea](e);try{x.default.fchownSync(i,t,r)}catch(i){try{x.default.chownSync(e.absolute,t,r)}catch{n||=i}}}r(n)})}[da](e,t){let n=e.mode&4095||this.dmode,r=this[_a](e.absolute,n);if(r)return this[U](r,e);if(e.mtime&&!this.noMtime)try{x.default.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch{}if(this[wa](e))try{x.default.chownSync(e.absolute,this[Ta](e),this[Ea](e))}catch{}e.resume()}[_a](e,t){try{return qi.sync(e,{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t})}catch(e){return e}}[fa](e,t,n,r){try{x.default[n+`Sync`](t,e.absolute),e.resume()}catch(t){return this[U](t,e)}}};var Ma=ja,Na=(e,t,n)=>{typeof e==`function`?(n=e,t=null,e={}):Array.isArray(e)&&(t=e,e={}),typeof t==`function`&&(n=t,t=null),t=t?Array.from(t):[];let r=me(e);if(r.sync&&typeof n==`function`)throw TypeError(`callback not supported for sync tar functions`);if(!r.file&&typeof n==`function`)throw TypeError(`callback only supported with file option`);return t.length&&Pa(r,t),r.file&&r.sync?Fa(r):r.file?Ia(r,n):r.sync?La(r):Ra(r)};let Pa=(e,t)=>{let n=new Map(t.map(e=>[e.replace(/\/+$/,``),!0])),r=e.filter,i=(e,t)=>{let r=t||S.default.parse(e).root||`.`,a=e===r?!1:n.has(e)?n.get(e):i(S.default.dirname(e),r);return n.set(e,a),a};e.filter=r?(e,t)=>r(e,t)&&i(e.replace(/\/+$/,``)):e=>i(e.replace(/\/+$/,``))},Fa=e=>{let t=new Ma.Sync(e),n=e.file,r=x.default.statSync(n),i=e.maxReadSize||16*1024*1024;new nr.ReadStreamSync(n,{readSize:i,size:r.size}).pipe(t)},Ia=(e,t)=>{let n=new Ma(e),r=e.maxReadSize||16*1024*1024,i=e.file,a=new Promise((e,t)=>{n.on(`error`,t),n.on(`close`,e),x.default.stat(i,(e,a)=>{if(e)t(e);else{let e=new nr.ReadStream(i,{readSize:r,size:a.size});e.on(`error`,t),e.pipe(n)}})});return t?a.then(t,t):a},La=e=>new Ma.Sync(e),Ra=e=>new Ma(e);var za=D(function(e,t){t.c=t.create=Lr,t.r=t.replace=Wr,t.t=t.list=jr,t.u=t.update=Xr,t.x=t.extract=Na,t.Pack=Tn,t.Unpack=Ma,t.Parse=Ar,t.ReadEntry=qe,t.WriteEntry=en,t.Header=St,t.Pax=Dt,t.types=Je}),Ba={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};let Va={};for(let e of Object.keys(Ba))Va[Ba[e]]=e;let W={rgb:{channels:3,labels:`rgb`},hsl:{channels:3,labels:`hsl`},hsv:{channels:3,labels:`hsv`},hwb:{channels:3,labels:`hwb`},cmyk:{channels:4,labels:`cmyk`},xyz:{channels:3,labels:`xyz`},lab:{channels:3,labels:`lab`},lch:{channels:3,labels:`lch`},hex:{channels:1,labels:[`hex`]},keyword:{channels:1,labels:[`keyword`]},ansi16:{channels:1,labels:[`ansi16`]},ansi256:{channels:1,labels:[`ansi256`]},hcg:{channels:3,labels:[`h`,`c`,`g`]},apple:{channels:3,labels:[`r16`,`g16`,`b16`]},gray:{channels:1,labels:[`gray`]}};var Ha=W;for(let e of Object.keys(W)){if(!(`channels`in W[e]))throw Error(`missing channels property: `+e);if(!(`labels`in W[e]))throw Error(`missing channel labels property: `+e);if(W[e].labels.length!==W[e].channels)throw Error(`channel and label counts mismatch: `+e);let{channels:t,labels:n}=W[e];delete W[e].channels,delete W[e].labels,Object.defineProperty(W[e],`channels`,{value:t}),Object.defineProperty(W[e],`labels`,{value:n})}W.rgb.hsl=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s,c;a===i?s=0:t===a?s=(n-r)/o:n===a?s=2+(r-t)/o:r===a&&(s=4+(t-n)/o),s=Math.min(s*60,360),s<0&&(s+=360);let l=(i+a)/2;return c=a===i?0:l<=.5?o/(a+i):o/(2-a-i),[s,c*100,l*100]},W.rgb.hsv=function(e){let t,n,r,i,a,o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),d=function(e){return(l-e)/6/u+1/2};return u===0?(i=0,a=0):(a=u/l,t=d(o),n=d(s),r=d(c),o===l?i=r-n:s===l?i=1/3+t-r:c===l&&(i=2/3+n-t),i<0?i+=1:i>1&&--i),[i*360,a*100,l*100]},W.rgb.hwb=function(e){let t=e[0],n=e[1],r=e[2],i=W.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,a*100,r*100]},W.rgb.cmyk=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),a=(1-t-i)/(1-i)||0,o=(1-n-i)/(1-i)||0,s=(1-r-i)/(1-i)||0;return[a*100,o*100,s*100,i*100]};function Ua(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}W.rgb.keyword=function(e){let t=Va[e];if(t)return t;let n=1/0,r;for(let t of Object.keys(Ba)){let i=Ba[t],a=Ua(e,i);a<n&&(n=a,r=t)}return r},W.keyword.rgb=function(e){return Ba[e]},W.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;let i=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,o=t*.0193+n*.1192+r*.9505;return[i*100,a*100,o*100]},W.rgb.lab=function(e){let t=W.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,[116*r-16,500*(n-r),200*(r-i)]},W.hsl.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i,a,o;if(n===0)return o=r*255,[o,o,o];i=r<.5?r*(1+n):r+n-r*n;let s=2*r-i,c=[0,0,0];for(let e=0;e<3;e++)a=t+1/3*-(e-1),a<0&&a++,a>1&&a--,o=6*a<1?s+(i-s)*6*a:2*a<1?i:3*a<2?s+(i-s)*(2/3-a)*6:s,c[e]=o*255;return c},W.hsl.hsv=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=a<=1?a:2-a;let o=(r+n)/2;return[t,(r===0?2*i/(a+i):2*n/(r+n))*100,o*100]},W.hsv.rgb=function(e){let t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,c,o];case 1:return[s,r,o];case 2:return[o,r,c];case 3:return[o,s,r];case 4:return[c,o,r];case 5:return[r,o,s]}},W.hsv.hsl=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01),a,o;o=(2-n)*r;let s=(2-n)*i;return a=n*i,a/=s<=1?s:2-s,a||=0,o/=2,[t,a*100,o*100]},W.hwb.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i=n+r,a;i>1&&(n/=i,r/=i);let o=Math.floor(6*t),s=1-r;a=6*t-o,o&1&&(a=1-a);let c=n+a*(s-n),l,u,d;switch(o){default:case 6:case 0:l=s,u=c,d=n;break;case 1:l=c,u=s,d=n;break;case 2:l=n,u=s,d=c;break;case 3:l=n,u=c,d=s;break;case 4:l=c,u=n,d=s;break;case 5:l=s,u=n,d=c;break}return[l*255,u*255,d*255]},W.cmyk.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,a=1-Math.min(1,t*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),s=1-Math.min(1,r*(1-i)+i);return[a*255,o*255,s*255]},W.xyz.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i,a,o;return i=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,o=t*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[i*255,a*255,o*255]},W.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];return t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,[116*n-16,500*(t-n),200*(n-r)]},W.lab.xyz=function(e){let t=e[0],n=e[1],r=e[2],i,a,o;a=(t+16)/116,i=n/500+a,o=a-r/200;let s=a**3,c=i**3,l=o**3;return a=s>.008856?s:(a-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,o=l>.008856?l:(o-16/116)/7.787,i*=95.047,a*=100,o*=108.883,[i,a,o]},W.lab.lch=function(e){let t=e[0],n=e[1],r=e[2],i;return i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360),[t,Math.sqrt(n*n+r*r),i]},W.lch.lab=function(e){let t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},W.rgb.ansi16=function(e,t=null){let[n,r,i]=e,a=t===null?W.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(o+=60),o},W.hsv.ansi16=function(e){return W.rgb.ansi16(W.hsv.rgb(e),e[2])},W.rgb.ansi256=function(e){let t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},W.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let n=(~~(e>50)+1)*.5;return[(t&1)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},W.ansi256.rgb=function(e){if(e>=232){let t=(e-232)*10+8;return[t,t,t]}e-=16;let t;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},W.rgb.hex=function(e){let t=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return`000000`.substring(t.length)+t},W.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split(``).map(e=>e+e).join(``));let r=parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},W.rgb.hcg=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),o=i-a,s,c;return s=o<1?a/(1-o):0,c=o<=0?0:i===t?(n-r)/o%6:i===n?2+(r-t)/o:4+(t-n)/o,c/=6,c%=1,[c*360,o*100,s*100]},W.hsl.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]},W.hsv.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]},W.hcg.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];let i=[0,0,0],a=t%1*6,o=a%1,s=1-o,c=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return c=(1-n)*r,[(n*i[0]+c)*255,(n*i[1]+c)*255,(n*i[2]+c)*255]},W.hcg.hsv=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],r*100,n*100]},W.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],r*100,n*100]},W.hcg.hwb=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],(n-t)*100,(1-n)*100]},W.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]},W.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},W.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},W.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},W.gray.hsl=function(e){return[0,0,e[0]]},W.gray.hsv=W.gray.hsl,W.gray.hwb=function(e){return[0,100,e[0]]},W.gray.cmyk=function(e){return[0,0,0,e[0]]},W.gray.lab=function(e){return[e[0],0,0]},W.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return`000000`.substring(n.length)+n},W.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};function Wa(){let e={},t=Object.keys(Ha);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function Ga(e){let t=Wa(),n=[e];for(t[e].distance=0;n.length;){let e=n.pop(),r=Object.keys(Ha[e]);for(let i=r.length,a=0;a<i;a++){let i=r[a],o=t[i];o.distance===-1&&(o.distance=t[e].distance+1,o.parent=e,n.unshift(i))}}return t}function Ka(e,t){return function(n){return t(e(n))}}function qa(e,t){let n=[t[e].parent,e],r=Ha[t[e].parent][e],i=t[e].parent;for(;t[i].parent;)n.unshift(t[i].parent),r=Ka(Ha[t[i].parent][i],r),i=t[i].parent;return r.conversion=n,r}var Ja=function(e){let t=Ga(e),n={},r=Object.keys(t);for(let e=r.length,i=0;i<e;i++){let e=r[i];t[e].parent!==null&&(n[e]=qa(e,t))}return n};let Ya={},Xa=Object.keys(Ha);function Za(e){let t=function(...t){let n=t[0];return n==null?n:(n.length>1&&(t=n),e(t))};return`conversion`in e&&(t.conversion=e.conversion),t}function Qa(e){let t=function(...t){let n=t[0];if(n==null)return n;n.length>1&&(t=n);let r=e(t);if(typeof r==`object`)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return`conversion`in e&&(t.conversion=e.conversion),t}Xa.forEach(e=>{Ya[e]={},Object.defineProperty(Ya[e],`channels`,{value:Ha[e].channels}),Object.defineProperty(Ya[e],`labels`,{value:Ha[e].labels});let t=Ja(e);Object.keys(t).forEach(n=>{let r=t[n];Ya[e][n]=Qa(r),Ya[e][n].raw=Za(r)})});var $a=Ya,eo=D(function(e){let t=(e,t)=>(...n)=>`\u001B[${e(...n)+t}m`,n=(e,t)=>(...n)=>{let r=e(...n);return`\u001B[${38+t};5;${r}m`},r=(e,t)=>(...n)=>{let r=e(...n);return`\u001B[${38+t};2;${r[0]};${r[1]};${r[2]}m`},i=e=>e,a=(e,t,n)=>[e,t,n],o=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{let r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})},s,c=(e,t,n,r)=>{s===void 0&&(s=$a);let i=r?10:0,a={};for(let[r,o]of Object.entries(s)){let s=r===`ansi16`?`ansi`:r;r===t?a[s]=e(n,i):typeof o==`object`&&(a[s]=e(o[t],i))}return a};function l(){let e=new Map,s={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};s.color.gray=s.color.blackBright,s.bgColor.bgGray=s.bgColor.bgBlackBright,s.color.grey=s.color.blackBright,s.bgColor.bgGrey=s.bgColor.bgBlackBright;for(let[t,n]of Object.entries(s)){for(let[t,r]of Object.entries(n))s[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=s[t],e.set(r[0],r[1]);Object.defineProperty(s,t,{value:n,enumerable:!1})}return Object.defineProperty(s,`codes`,{value:e,enumerable:!1}),s.color.close=`\x1B[39m`,s.bgColor.close=`\x1B[49m`,o(s.color,`ansi`,()=>c(t,`ansi16`,i,!1)),o(s.color,`ansi256`,()=>c(n,`ansi256`,i,!1)),o(s.color,`ansi16m`,()=>c(r,`rgb`,a,!1)),o(s.bgColor,`ansi`,()=>c(t,`ansi16`,i,!0)),o(s.bgColor,`ansi256`,()=>c(n,`ansi256`,i,!0)),o(s.bgColor,`ansi16m`,()=>c(r,`rgb`,a,!0)),s}Object.defineProperty(e,`exports`,{enumerable:!0,get:l})}),G=(e,t=process.argv)=>{let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)};let{env:K}=process,to;G(`no-color`)||G(`no-colors`)||G(`color=false`)||G(`color=never`)?to=0:(G(`color`)||G(`colors`)||G(`color=true`)||G(`color=always`))&&(to=1),`FORCE_COLOR`in K&&(to=K.FORCE_COLOR===`true`?1:K.FORCE_COLOR===`false`?0:K.FORCE_COLOR.length===0?1:Math.min(parseInt(K.FORCE_COLOR,10),3));function no(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ro(e,t){if(to===0)return 0;if(G(`color=16m`)||G(`color=full`)||G(`color=truecolor`))return 3;if(G(`color=256`))return 2;if(e&&!t&&to===void 0)return 0;let n=to||0;if(K.TERM===`dumb`)return n;if(process.platform===`win32`){let e=ae.default.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in K)return[`TRAVIS`,`CIRCLECI`,`APPVEYOR`,`GITLAB_CI`,`GITHUB_ACTIONS`,`BUILDKITE`].some(e=>e in K)||K.CI_NAME===`codeship`?1:n;if(`TEAMCITY_VERSION`in K)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(K.TEAMCITY_VERSION)?1:0;if(K.COLORTERM===`truecolor`)return 3;if(`TERM_PROGRAM`in K){let e=parseInt((K.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(K.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(K.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(K.TERM)||`COLORTERM`in K?1:n}function io(e){return no(ro(e,e&&e.isTTY))}var ao={supportsColor:io,stdout:no(ro(!0,oe.default.isatty(1))),stderr:no(ro(!0,oe.default.isatty(2)))},oo={stringReplaceAll:(e,t,n)=>{let r=e.indexOf(t);if(r===-1)return e;let i=t.length,a=0,o=``;do o+=e.substr(a,r-a)+t+n,a=r+i,r=e.indexOf(t,a);while(r!==-1);return o+=e.substr(a),o},stringEncaseCRLFWithFirstIndex:(e,t,n,r)=>{let i=0,a=``;do{let o=e[r-1]===`\r`;a+=e.substr(i,(o?r-1:r)-i)+t+(o?`\r
|
|
5
|
+
`:`
|
|
6
|
+
`)+n,i=r+1,r=e.indexOf(`
|
|
7
|
+
`,i)}while(r!==-1);return a+=e.substr(i),a}};let so=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,co=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,lo=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,uo=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,fo=new Map([[`n`,`
|
|
8
|
+
`],[`r`,`\r`],[`t`,` `],[`b`,`\b`],[`f`,`\f`],[`v`,`\v`],[`0`,`\0`],[`\\`,`\\`],[`e`,`\x1B`],[`a`,`\x07`]]);function po(e){let t=e[0]===`u`,n=e[1]===`{`;return t&&!n&&e.length===5||e[0]===`x`&&e.length===3?String.fromCharCode(parseInt(e.slice(1),16)):t&&n?String.fromCodePoint(parseInt(e.slice(2,-1),16)):fo.get(e)||e}function mo(e,t){let n=[],r=t.trim().split(/\s*,\s*/g),i;for(let t of r){let r=Number(t);if(!Number.isNaN(r))n.push(r);else if(i=t.match(lo))n.push(i[2].replace(uo,(e,t,n)=>t?po(t):n));else throw Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`)}return n}function ho(e){co.lastIndex=0;let t=[],n;for(;(n=co.exec(e))!==null;){let e=n[1];if(n[2]){let r=mo(e,n[2]);t.push([e].concat(r))}else t.push([e])}return t}function go(e,t){let n={};for(let e of t)for(let t of e.styles)n[t[0]]=e.inverse?null:t.slice(1);let r=e;for(let[e,t]of Object.entries(n))if(Array.isArray(t)){if(!(e in r))throw Error(`Unknown Chalk style: ${e}`);r=t.length>0?r[e](...t):r[e]}return r}var _o=(e,t)=>{let n=[],r=[],i=[];if(t.replace(so,(t,a,o,s,c,l)=>{if(a)i.push(po(a));else if(s){let t=i.join(``);i=[],r.push(n.length===0?t:go(e,n)(t)),n.push({inverse:o,styles:ho(s)})}else if(c){if(n.length===0)throw Error(`Found extraneous } in Chalk template literal`);r.push(go(e,n)(i.join(``))),i=[],n.pop()}else i.push(l)}),r.push(i.join(``)),n.length>0){let e=`Chalk template literal is missing ${n.length} closing bracket${n.length===1?``:`s`} (\`}\`)`;throw Error(e)}return r.join(``)};let{stdout:vo,stderr:yo}=ao,{stringReplaceAll:bo,stringEncaseCRLFWithFirstIndex:xo}=oo,{isArray:So}=Array,Co=[`ansi`,`ansi`,`ansi256`,`ansi16m`],wo=Object.create(null),To=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let n=vo?vo.level:0;e.level=t.level===void 0?n:t.level};var Eo=class{constructor(e){return Do(e)}};let Do=e=>{let t={};return To(t,e),t.template=(...e)=>Fo(t.template,...e),Object.setPrototypeOf(t,Oo.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=Eo,t.template};function Oo(e){return Do(e)}for(let[e,t]of Object.entries(eo))wo[e]={get(){let n=Mo(this,jo(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:n}),n}};wo.visible={get(){let e=Mo(this,this._styler,!0);return Object.defineProperty(this,`visible`,{value:e}),e}};let ko=[`rgb`,`hex`,`keyword`,`hsl`,`hsv`,`hwb`,`ansi`,`ansi256`];for(let e of ko)wo[e]={get(){let{level:t}=this;return function(...n){let r=jo(eo.color[Co[t]][e](...n),eo.color.close,this._styler);return Mo(this,r,this._isEmpty)}}};for(let e of ko){let t=`bg`+e[0].toUpperCase()+e.slice(1);wo[t]={get(){let{level:t}=this;return function(...n){let r=jo(eo.bgColor[Co[t]][e](...n),eo.bgColor.close,this._styler);return Mo(this,r,this._isEmpty)}}}}let Ao=Object.defineProperties(()=>{},{...wo,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),jo=(e,t,n)=>{let r,i;return n===void 0?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},Mo=(e,t,n)=>{let r=(...e)=>So(e[0])&&So(e[0].raw)?No(r,Fo(r,...e)):No(r,e.length===1?``+e[0]:e.join(` `));return Object.setPrototypeOf(r,Ao),r._generator=e,r._styler=t,r._isEmpty=n,r},No=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?``:t;let n=e._styler;if(n===void 0)return t;let{openAll:r,closeAll:i}=n;if(t.indexOf(`\x1B`)!==-1)for(;n!==void 0;)t=bo(t,n.close,n.open),n=n.parent;let a=t.indexOf(`
|
|
9
|
+
`);return a!==-1&&(t=xo(t,i,r,a)),r+t+i},Po,Fo=(e,...t)=>{let[n]=t;if(!So(n)||!So(n.raw))return t.join(` `);let r=t.slice(1),i=[n.raw[0]];for(let e=1;e<n.length;e++)i.push(String(r[e-1]).replace(/[{}\\]/g,`\\$&`),String(n.raw[e]));return Po===void 0&&(Po=_o),Po(e,i.join(``))};Object.defineProperties(Oo.prototype,wo);let Io=Oo();Io.supportsColor=vo,Io.stderr=Oo({level:yo?yo.level:0}),Io.stderr.supportsColor=yo;var Lo=Io,Ro=zo(x.default);function zo(e){if(typeof e!=`object`||!e)return e;if(e instanceof Object)var t={__proto__:e.__proto__};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}var Bo=process.cwd,Vo=null,Ho=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Vo||=Bo.call(process),Vo};try{process.cwd()}catch{}var Uo=process.chdir;process.chdir=function(e){Vo=null,Uo.call(process,e)};var Wo=Go;function Go(e){se.default.hasOwnProperty(`O_SYMLINK`)&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&Ko(e),e.lutimes||qo(e),e.chown=Xo(e.chown),e.fchown=Xo(e.fchown),e.lchown=Xo(e.lchown),e.chmod=Jo(e.chmod),e.fchmod=Jo(e.fchmod),e.lchmod=Jo(e.lchmod),e.chownSync=Zo(e.chownSync),e.fchownSync=Zo(e.fchownSync),e.lchownSync=Zo(e.lchownSync),e.chmodSync=Yo(e.chmodSync),e.fchmodSync=Yo(e.fchmodSync),e.lchmodSync=Yo(e.lchmodSync),e.stat=Qo(e.stat),e.fstat=Qo(e.fstat),e.lstat=Qo(e.lstat),e.statSync=$o(e.statSync),e.fstatSync=$o(e.fstatSync),e.lstatSync=$o(e.lstatSync),e.lchmod||(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){}),e.lchown||(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){}),Ho===`win32`&&(e.rename=(function(t){return function(n,r,i){var a=Date.now(),o=0;t(n,r,function s(c){if(c&&(c.code===`EACCES`||c.code===`EPERM`)&&Date.now()-a<6e4){setTimeout(function(){e.stat(r,function(e,a){e&&e.code===`ENOENT`?t(n,r,s):i(c)})},o),o<100&&(o+=10);return}i&&i(c)})}})(e.rename)),e.read=(function(t){return function(n,r,i,a,o,s){var c;if(s&&typeof s==`function`){var l=0;c=function(u,d,f){if(u&&u.code===`EAGAIN`&&l<10)return l++,t.call(e,n,r,i,a,o,c);s.apply(this,arguments)}}return t.call(e,n,r,i,a,o,c)}})(e.read),e.readSync=(function(t){return function(n,r,i,a,o){for(var s=0;;)try{return t.call(e,n,r,i,a,o)}catch(e){if(e.code===`EAGAIN`&&s<10){s++;continue}throw e}}})(e.readSync)}function Ko(e){e.lchmod=function(t,n,r){e.open(t,se.default.O_WRONLY|se.default.O_SYMLINK,n,function(t,i){if(t){r&&r(t);return}e.fchmod(i,n,function(t){e.close(i,function(e){r&&r(t||e)})})})},e.lchmodSync=function(t,n){var r=e.openSync(t,se.default.O_WRONLY|se.default.O_SYMLINK,n),i=!0,a;try{a=e.fchmodSync(r,n),i=!1}finally{if(i)try{e.closeSync(r)}catch{}else e.closeSync(r)}return a}}function qo(e){se.default.hasOwnProperty(`O_SYMLINK`)?(e.lutimes=function(t,n,r,i){e.open(t,se.default.O_SYMLINK,function(t,a){if(t){i&&i(t);return}e.futimes(a,n,r,function(t){e.close(a,function(e){i&&i(t||e)})})})},e.lutimesSync=function(t,n,r){var i=e.openSync(t,se.default.O_SYMLINK),a,o=!0;try{a=e.futimesSync(i,n,r),o=!1}finally{if(o)try{e.closeSync(i)}catch{}else e.closeSync(i)}return a}):(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}function Jo(e){return e&&function(t,n,r){return e.call(Ro,t,n,function(e){es(e)&&(e=null),r&&r.apply(this,arguments)})}}function Yo(e){return e&&function(t,n){try{return e.call(Ro,t,n)}catch(e){if(!es(e))throw e}}}function Xo(e){return e&&function(t,n,r,i){return e.call(Ro,t,n,r,function(e){es(e)&&(e=null),i&&i.apply(this,arguments)})}}function Zo(e){return e&&function(t,n,r){try{return e.call(Ro,t,n,r)}catch(e){if(!es(e))throw e}}}function Qo(e){return e&&function(t,n){return e.call(Ro,t,function(e,t){if(!t)return n.apply(this,arguments);t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296),n&&n.apply(this,arguments)})}}function $o(e){return e&&function(t){var n=e.call(Ro,t);return n.uid<0&&(n.uid+=4294967296),n.gid<0&&(n.gid+=4294967296),n}}function es(e){return!e||e.code===`ENOSYS`||(!process.getuid||process.getuid()!==0)&&(e.code===`EINVAL`||e.code===`EPERM`)}var ts=ee.default.Stream,ns=rs;function rs(e){return{ReadStream:t,WriteStream:n};function t(n,r){if(!(this instanceof t))return new t(n,r);ts.call(this);var i=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags=`r`,this.mode=438,this.bufferSize=64*1024,r||={};for(var a=Object.keys(r),o=0,s=a.length;o<s;o++){var c=a[o];this[c]=r[c]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.end===void 0)this.end=1/0;else if(typeof this.end!=`number`)throw TypeError(`end must be a Number`);if(this.start>this.end)throw Error(`start must be <= end`);this.pos=this.start}if(this.fd!==null){process.nextTick(function(){i._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){i.emit(`error`,e),i.readable=!1;return}i.fd=t,i.emit(`open`,t),i._read()})}function n(t,r){if(!(this instanceof n))return new n(t,r);ts.call(this),this.path=t,this.fd=null,this.writable=!0,this.flags=`w`,this.encoding=`binary`,this.mode=438,this.bytesWritten=0,r||={};for(var i=Object.keys(r),a=0,o=i.length;a<o;a++){var s=i[a];this[s]=r[s]}if(this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.start<0)throw Error(`start must be >= zero`);this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}var q=D(function(e){var t=[];function n(){}var r=n;T.default.debuglog?r=T.default.debuglog(`gfs4`):/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&(r=function(){var e=T.default.format.apply(T.default,arguments);e=`GFS4: `+e.split(/\n/).join(`
|
|
10
|
+
GFS4: `),console.error(e)}),/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&process.on(`exit`,function(){r(t),w.default.equal(t.length,0)}),e.exports=i(Ro),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&(e.exports=i(x.default)),e.exports.close=x.default.close=(function(e){return function(t,n){return e.call(x.default,t,function(e){e||o(),typeof n==`function`&&n.apply(this,arguments)})}})(x.default.close),e.exports.closeSync=x.default.closeSync=(function(e){return function(t){var n=e.apply(x.default,arguments);return o(),n}})(x.default.closeSync);function i(e){Wo(e),e.gracefulify=i,e.FileReadStream=g,e.FileWriteStream=v,e.createReadStream=b,e.createWriteStream=x;var t=e.readFile;e.readFile=n;function n(e,n,r){return typeof n==`function`&&(r=n,n=null),i(e,n,r);function i(e,n,r){return t(e,n,function(t){t&&(t.code===`EMFILE`||t.code===`ENFILE`)?a([i,[e,n,r]]):(typeof r==`function`&&r.apply(this,arguments),o())})}}var r=e.writeFile;e.writeFile=s;function s(e,t,n,i){return typeof n==`function`&&(i=n,n=null),s(e,t,n,i);function s(e,t,n,i){return r(e,t,n,function(r){r&&(r.code===`EMFILE`||r.code===`ENFILE`)?a([s,[e,t,n,i]]):(typeof i==`function`&&i.apply(this,arguments),o())})}}var c=e.appendFile;c&&(e.appendFile=l);function l(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r){return c(e,t,n,function(s){s&&(s.code===`EMFILE`||s.code===`ENFILE`)?a([i,[e,t,n,r]]):(typeof r==`function`&&r.apply(this,arguments),o())})}}var u=e.readdir;e.readdir=d;function d(e,t,n){var r=[e];return typeof t==`function`?n=t:r.push(t),r.push(i),f(r);function i(e,t){t&&t.sort&&t.sort(),e&&(e.code===`EMFILE`||e.code===`ENFILE`)?a([f,[r]]):(typeof n==`function`&&n.apply(this,arguments),o())}}function f(t){return u.apply(e,t)}if(process.version.substr(0,4)===`v0.8`){var p=ns(e);g=p.ReadStream,v=p.WriteStream}var m=e.ReadStream;g.prototype=Object.create(m.prototype),g.prototype.open=_;var h=e.WriteStream;v.prototype=Object.create(h.prototype),v.prototype.open=y,e.ReadStream=g,e.WriteStream=v;function g(e,t){return this instanceof g?(m.apply(this,arguments),this):g.apply(Object.create(g.prototype),arguments)}function _(){var e=this;C(e.path,e.flags,e.mode,function(t,n){t?(e.autoClose&&e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n),e.read())})}function v(e,t){return this instanceof v?(h.apply(this,arguments),this):v.apply(Object.create(v.prototype),arguments)}function y(){var e=this;C(e.path,e.flags,e.mode,function(t,n){t?(e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n))})}function b(e,t){return new g(e,t)}function x(e,t){return new v(e,t)}var S=e.open;e.open=C;function C(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r){return S(e,t,n,function(s,c){s&&(s.code===`EMFILE`||s.code===`ENFILE`)?a([i,[e,t,n,r]]):(typeof r==`function`&&r.apply(this,arguments),o())})}}return e}function a(e){r(`ENQUEUE`,e[0].name,e[1]),t.push(e)}function o(){var e=t.shift();e&&(r(`RETRY`,e[0].name,e[1]),e[0].apply(null,e[1]))}}),is=511,as=os.mkdirp=os.mkdirP=os;function os(e,t,n,r){typeof t==`function`?(n=t,t={}):(!t||typeof t!=`object`)&&(t={mode:t});var i=t.mode,a=t.fs||x.default;i===void 0&&(i=is&~process.umask()),r||=null;var o=n||function(){};e=S.default.resolve(e),a.mkdir(e,i,function(n){if(!n)return r||=e,o(null,r);switch(n.code){case`ENOENT`:os(S.default.dirname(e),t,function(n,r){n?o(n,r):os(e,t,o,r)});break;default:a.stat(e,function(e,t){e||!t.isDirectory()?o(n,r):o(null,r)});break}})}os.sync=function e(t,n,r){(!n||typeof n!=`object`)&&(n={mode:n});var i=n.mode,a=n.fs||x.default;i===void 0&&(i=is&~process.umask()),r||=null,t=S.default.resolve(t);try{a.mkdirSync(t,i),r||=t}catch(i){switch(i.code){case`ENOENT`:r=e(S.default.dirname(t),n,r),e(t,n,r);break;default:var o;try{o=a.statSync(t)}catch{throw i}if(!o.isDirectory())throw i;break}}return r};var ss=process.platform===`win32`,cs=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function ls(){var e;if(cs){var t=Error();e=n}else e=r;return e;function n(e){e&&(t.message=e.message,e=t,r(e))}function r(e){if(e){if(process.throwDeprecation)throw e;if(!process.noDeprecation){var t=`fs: missing callback `+(e.stack||e.message);process.traceDeprecation?console.trace(t):console.error(t)}}}}function us(e){return typeof e==`function`?e:ls()}if(S.default.normalize,ss)var ds=/(.*?)(?:[\/\\]+|$)/g;else var ds=/(.*?)(?:[\/]+|$)/g;if(ss)var fs=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else var fs=/^[\/]*/;var ps={realpathSync:function(e,t){if(e=S.default.resolve(e),t&&Object.prototype.hasOwnProperty.call(t,e))return t[e];var n=e,r={},i={},a,o,s,c;l();function l(){var t=fs.exec(e);a=t[0].length,o=t[0],s=t[0],c=``,ss&&!i[s]&&(x.default.lstatSync(s),i[s]=!0)}for(;a<e.length;){ds.lastIndex=a;var u=ds.exec(e);if(c=o,o+=u[0],s=c+u[1],a=ds.lastIndex,!(i[s]||t&&t[s]===s)){var d;if(t&&Object.prototype.hasOwnProperty.call(t,s))d=t[s];else{var f=x.default.lstatSync(s);if(!f.isSymbolicLink()){i[s]=!0,t&&(t[s]=s);continue}var p=null;if(!ss){var m=f.dev.toString(32)+`:`+f.ino.toString(32);r.hasOwnProperty(m)&&(p=r[m])}p===null&&(x.default.statSync(s),p=x.default.readlinkSync(s)),d=S.default.resolve(c,p),t&&(t[s]=d),ss||(r[m]=p)}e=S.default.resolve(d,e.slice(a)),l()}}return t&&(t[n]=e),e},realpath:function(e,t,n){if(typeof n!=`function`&&(n=us(t),t=null),e=S.default.resolve(e),t&&Object.prototype.hasOwnProperty.call(t,e))return process.nextTick(n.bind(null,null,t[e]));var r=e,i={},a={},o,s,c,l;u();function u(){var t=fs.exec(e);o=t[0].length,s=t[0],c=t[0],l=``,ss&&!a[c]?x.default.lstat(c,function(e){if(e)return n(e);a[c]=!0,d()}):process.nextTick(d)}function d(){if(o>=e.length)return t&&(t[r]=e),n(null,e);ds.lastIndex=o;var i=ds.exec(e);return l=s,s+=i[0],c=l+i[1],o=ds.lastIndex,a[c]||t&&t[c]===c?process.nextTick(d):t&&Object.prototype.hasOwnProperty.call(t,c)?m(t[c]):x.default.lstat(c,f)}function f(e,r){if(e)return n(e);if(!r.isSymbolicLink())return a[c]=!0,t&&(t[c]=c),process.nextTick(d);if(!ss){var o=r.dev.toString(32)+`:`+r.ino.toString(32);if(i.hasOwnProperty(o))return p(null,i[o],c)}x.default.stat(c,function(e){if(e)return n(e);x.default.readlink(c,function(e,t){ss||(i[o]=t),p(e,t)})})}function p(e,r,i){if(e)return n(e);var a=S.default.resolve(l,r);t&&(t[i]=a),m(a)}function m(t){e=S.default.resolve(t,e.slice(o)),u()}}},ms=bs;bs.realpath=bs,bs.sync=xs,bs.realpathSync=xs,bs.monkeypatch=Ss,bs.unmonkeypatch=Cs;var hs=x.default.realpath,gs=x.default.realpathSync,_s=process.version,vs=/^v[0-5]\./.test(_s);function ys(e){return e&&e.syscall===`realpath`&&(e.code===`ELOOP`||e.code===`ENOMEM`||e.code===`ENAMETOOLONG`)}function bs(e,t,n){if(vs)return hs(e,t,n);typeof t==`function`&&(n=t,t=null),hs(e,t,function(r,i){ys(r)?ps.realpath(e,t,n):n(r,i)})}function xs(e,t){if(vs)return gs(e,t);try{return gs(e,t)}catch(n){if(ys(n))return ps.realpathSync(e,t);throw n}}function Ss(){x.default.realpath=bs,x.default.realpathSync=xs}function Cs(){x.default.realpath=hs,x.default.realpathSync=gs}var ws=function(e,t){for(var n=[],r=0;r<e.length;r++){var i=t(e[r],r);Ts(i)?n.push.apply(n,i):n.push(i)}return n},Ts=Array.isArray||function(e){return Object.prototype.toString.call(e)===`[object Array]`},Es=Ds;function Ds(e,t,n){e instanceof RegExp&&(e=Os(e,n)),t instanceof RegExp&&(t=Os(t,n));var r=ks(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function Os(e,t){var n=t.match(e);return n?n[0]:null}Ds.range=ks;function ks(e,t,n){var r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){for(r=[],a=n.length;u>=0&&!s;)u==c?(r.push(u),c=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),l]:(i=r.pop(),i<a&&(a=i,o=l),l=n.indexOf(t,u+1)),u=c<l&&c>=0?c:l;r.length&&(s=[a,o])}return s}var As=Bs,js=`\0SLASH`+Math.random()+`\0`,Ms=`\0OPEN`+Math.random()+`\0`,Ns=`\0CLOSE`+Math.random()+`\0`,Ps=`\0COMMA`+Math.random()+`\0`,Fs=`\0PERIOD`+Math.random()+`\0`;function Is(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function Ls(e){return e.split(`\\\\`).join(js).split(`\\{`).join(Ms).split(`\\}`).join(Ns).split(`\\,`).join(Ps).split(`\\.`).join(Fs)}function Rs(e){return e.split(js).join(`\\`).split(Ms).join(`{`).split(Ns).join(`}`).split(Ps).join(`,`).split(Fs).join(`.`)}function zs(e){if(!e)return[``];var t=[],n=Es(`{`,`}`,e);if(!n)return e.split(`,`);var r=n.pre,i=n.body,a=n.post,o=r.split(`,`);o[o.length-1]+=`{`+i+`}`;var s=zs(a);return a.length&&(o[o.length-1]+=s.shift(),o.push.apply(o,s)),t.push.apply(t,o),t}function Bs(e){return e?(e.substr(0,2)===`{}`&&(e=`\\{\\}`+e.substr(2)),Gs(Ls(e),!0).map(Rs)):[]}function Vs(e){return`{`+e+`}`}function Hs(e){return/^-?0\d/.test(e)}function Us(e,t){return e<=t}function Ws(e,t){return e>=t}function Gs(e,t){var n=[],r=Es(`{`,`}`,e);if(!r||/\$$/.test(r.pre))return[e];var i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),o=i||a,s=r.body.indexOf(`,`)>=0;if(!o&&!s)return r.post.match(/,.*\}/)?(e=r.pre+`{`+r.body+Ns+r.post,Gs(e)):[e];var c;if(o)c=r.body.split(/\.\./);else if(c=zs(r.body),c.length===1&&(c=Gs(c[0],!1).map(Vs),c.length===1)){var l=r.post.length?Gs(r.post,!1):[``];return l.map(function(e){return r.pre+c[0]+e})}var u=r.pre,l=r.post.length?Gs(r.post,!1):[``],d;if(o){var f=Is(c[0]),p=Is(c[1]),m=Math.max(c[0].length,c[1].length),h=c.length==3?Math.abs(Is(c[2])):1,g=Us;p<f&&(h*=-1,g=Ws);var _=c.some(Hs);d=[];for(var v=f;g(v,p);v+=h){var y;if(a)y=String.fromCharCode(v),y===`\\`&&(y=``);else if(y=String(v),_){var b=m-y.length;if(b>0){var x=Array(b+1).join(`0`);y=v<0?`-`+x+y.slice(1):x+y}}d.push(y)}}else d=ws(c,function(e){return Gs(e,!1)});for(var S=0;S<d.length;S++)for(var C=0;C<l.length;C++){var ee=u+d[S]+l[C];(!t||o||ee)&&n.push(ee)}return n}var Ks=J;J.Minimatch=Y;var qs={sep:`/`};try{qs=S.default}catch{}var Js=J.GLOBSTAR=Y.GLOBSTAR={},Ys={"!":{open:`(?:(?!(?:`,close:`))[^/]*?)`},"?":{open:`(?:`,close:`)?`},"+":{open:`(?:`,close:`)+`},"*":{open:`(?:`,close:`)*`},"@":{open:`(?:`,close:`)`}},Xs=`[^/]`,Zs=Xs+`*?`,Qs=`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`,$s=`(?:(?!(?:\\/|^)\\.).)*?`,ec=tc(`().*{}+?[]^$\\!`);function tc(e){return e.split(``).reduce(function(e,t){return e[t]=!0,e},{})}var nc=/\/+/;J.filter=rc;function rc(e,t){return t||={},function(n,r,i){return J(n,e,t)}}function ic(e,t){e||={},t||={};var n={};return Object.keys(t).forEach(function(e){n[e]=t[e]}),Object.keys(e).forEach(function(t){n[t]=e[t]}),n}J.defaults=function(e){if(!e||!Object.keys(e).length)return J;var t=J,n=function(n,r,i){return t.minimatch(n,r,ic(e,i))};return n.Minimatch=function(n,r){return new t.Minimatch(n,ic(e,r))},n},Y.defaults=function(e){return!e||!Object.keys(e).length?Y:J.defaults(e).Minimatch};function J(e,t,n){if(typeof t!=`string`)throw TypeError(`glob pattern string required`);return n||={},!n.nocomment&&t.charAt(0)===`#`?!1:t.trim()===``?e===``:new Y(t,n).match(e)}function Y(e,t){if(!(this instanceof Y))return new Y(e,t);if(typeof e!=`string`)throw TypeError(`glob pattern string required`);t||={},e=e.trim(),qs.sep!==`/`&&(e=e.split(qs.sep).join(`/`)),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}Y.prototype.debug=function(){},Y.prototype.make=ac;function ac(){if(!this._made){var e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error),this.debug(this.pattern,n),n=this.globParts=n.map(function(e){return e.split(nc)}),this.debug(this.pattern,n),n=n.map(function(e,t,n){return e.map(this.parse,this)},this),this.debug(this.pattern,n),n=n.filter(function(e){return e.indexOf(!1)===-1}),this.debug(this.pattern,n),this.set=n}}Y.prototype.parseNegate=oc;function oc(){var e=this.pattern,t=!1,n=this.options,r=0;if(!n.nonegate){for(var i=0,a=e.length;i<a&&e.charAt(i)===`!`;i++)t=!t,r++;r&&(this.pattern=e.substr(r)),this.negate=t}}J.braceExpand=function(e,t){return sc(e,t)},Y.prototype.braceExpand=sc;function sc(e,t){if(t||=this instanceof Y?this.options:{},e=e===void 0?this.pattern:e,e===void 0)throw TypeError(`undefined pattern`);return t.nobrace||!e.match(/\{.*\}/)?[e]:As(e)}Y.prototype.parse=lc;var cc={};function lc(e,t){if(e.length>1024*64)throw TypeError(`pattern is too long`);var n=this.options;if(!n.noglobstar&&e===`**`)return Js;if(e===``)return``;var r=``,i=!!n.nocase,a=!1,o=[],s=[],c,l=!1,u=-1,d=-1,f=e.charAt(0)===`.`?``:n.dot?`(?!(?:^|\\/)\\.{1,2}(?:$|\\/))`:`(?!\\.)`,p=this;function m(){if(c){switch(c){case`*`:r+=Zs,i=!0;break;case`?`:r+=Xs,i=!0;break;default:r+=`\\`+c;break}p.debug(`clearStateChar %j %j`,c,r),c=!1}}for(var h=0,g=e.length,_;h<g&&(_=e.charAt(h));h++){if(this.debug(`%s %s %s %j`,e,h,r,_),a&&ec[_]){r+=`\\`+_,a=!1;continue}switch(_){case`/`:return!1;case`\\`:m(),a=!0;continue;case`?`:case`*`:case`+`:case`@`:case`!`:if(this.debug(`%s %s %s %j <-- stateChar`,e,h,r,_),l){this.debug(` in class`),_===`!`&&h===d+1&&(_=`^`),r+=_;continue}p.debug(`call clearStateChar %j`,c),m(),c=_,n.noext&&m();continue;case`(`:if(l){r+=`(`;continue}if(!c){r+=`\\(`;continue}o.push({type:c,start:h-1,reStart:r.length,open:Ys[c].open,close:Ys[c].close}),r+=c===`!`?`(?:(?!(?:`:`(?:`,this.debug(`plType %j %j`,c,r),c=!1;continue;case`)`:if(l||!o.length){r+=`\\)`;continue}m(),i=!0;var v=o.pop();r+=v.close,v.type===`!`&&s.push(v),v.reEnd=r.length;continue;case`|`:if(l||!o.length||a){r+=`\\|`,a=!1;continue}m(),r+=`|`;continue;case`[`:if(m(),l){r+=`\\`+_;continue}l=!0,d=h,u=r.length,r+=_;continue;case`]`:if(h===d+1||!l){r+=`\\`+_,a=!1;continue}if(l){var y=e.substring(d+1,h);try{RegExp(`[`+y+`]`)}catch{var b=this.parse(y,cc);r=r.substr(0,u)+`\\[`+b[0]+`\\]`,i||=b[1],l=!1;continue}}i=!0,l=!1,r+=_;continue;default:m(),a?a=!1:ec[_]&&!(_===`^`&&l)&&(r+=`\\`),r+=_}}for(l&&(y=e.substr(d+1),b=this.parse(y,cc),r=r.substr(0,u)+`\\[`+b[0],i||=b[1]),v=o.pop();v;v=o.pop()){var x=r.slice(v.reStart+v.open.length);this.debug(`setting tail`,r,v),x=x.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(e,t,n){return n||=`\\`,t+t+n+`|`}),this.debug(`tail=%j
|
|
11
|
+
%s`,x,x,v,r);var S=v.type===`*`?Zs:v.type===`?`?Xs:`\\`+v.type;i=!0,r=r.slice(0,v.reStart)+S+`\\(`+x}m(),a&&(r+=`\\\\`);var C=!1;switch(r.charAt(0)){case`.`:case`[`:case`(`:C=!0}for(var ee=s.length-1;ee>-1;ee--){var te=s[ee],w=r.slice(0,te.reStart),ne=r.slice(te.reStart,te.reEnd-8),re=r.slice(te.reEnd-8,te.reEnd),T=r.slice(te.reEnd);re+=T;var ie=w.split(`(`).length-1,ae=T;for(h=0;h<ie;h++)ae=ae.replace(/\)[+*?]?/,``);T=ae;var oe=``;T===``&&t!==cc&&(oe=`$`),r=w+ne+T+oe+re}if(r!==``&&i&&(r=`(?=.)`+r),C&&(r=f+r),t===cc)return[r,i];if(!i)return fc(e);var se=n.nocase?`i`:``;try{var ce=RegExp(`^`+r+`$`,se)}catch{return RegExp(`$.`)}return ce._glob=e,ce._src=r,ce}J.makeRe=function(e,t){return new Y(e,t||{}).makeRe()},Y.prototype.makeRe=uc;function uc(){if(this.regexp||this.regexp===!1)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,n=t.noglobstar?Zs:t.dot?Qs:$s,r=t.nocase?`i`:``,i=e.map(function(e){return e.map(function(e){return e===Js?n:typeof e==`string`?pc(e):e._src}).join(`\\/`)}).join(`|`);i=`^(?:`+i+`)$`,this.negate&&(i=`^(?!`+i+`).*$`);try{this.regexp=new RegExp(i,r)}catch{this.regexp=!1}return this.regexp}J.match=function(e,t,n){n||={};var r=new Y(t,n);return e=e.filter(function(e){return r.match(e)}),r.options.nonull&&!e.length&&e.push(t),e},Y.prototype.match=dc;function dc(e,t){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;var n=this.options;qs.sep!==`/`&&(e=e.split(qs.sep).join(`/`)),e=e.split(nc),this.debug(this.pattern,`split`,e);var r=this.set;this.debug(this.pattern,`set`,r);var i,a;for(a=e.length-1;a>=0&&(i=e[a],!i);a--);for(a=0;a<r.length;a++){var o=r[a],s=e;if(n.matchBase&&o.length===1&&(s=[i]),this.matchOne(s,o,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}Y.prototype.matchOne=function(e,t,n){var r=this.options;this.debug(`matchOne`,{this:this,file:e,pattern:t}),this.debug(`matchOne`,e.length,t.length);for(var i=0,a=0,o=e.length,s=t.length;i<o&&a<s;i++,a++){this.debug(`matchOne loop`);var c=t[a],l=e[i];if(this.debug(t,c,l),c===!1)return!1;if(c===Js){this.debug(`GLOBSTAR`,[t,c,l]);var u=i,d=a+1;if(d===s){for(this.debug(`** at the end`);i<o;i++)if(e[i]===`.`||e[i]===`..`||!r.dot&&e[i].charAt(0)===`.`)return!1;return!0}for(;u<o;){var f=e[u];if(this.debug(`
|
|
12
|
+
globstar while`,e,u,t,d,f),this.matchOne(e.slice(u),t.slice(d),n))return this.debug(`globstar found match!`,u,o,f),!0;if(f===`.`||f===`..`||!r.dot&&f.charAt(0)===`.`){this.debug(`dot detected!`,e,u,t,d);break}this.debug(`globstar swallow a segment, and continue`),u++}return!!(n&&(this.debug(`
|
|
13
|
+
>>> no match, partial?`,e,u,t,d),u===o))}var p;if(typeof c==`string`?(p=r.nocase?l.toLowerCase()===c.toLowerCase():l===c,this.debug(`string match`,c,l,p)):(p=l.match(c),this.debug(`pattern match`,c,l,p)),!p)return!1}if(i===o&&a===s)return!0;if(i===o)return n;if(a===s)return i===o-1&&e[i]===``;throw Error(`wtf?`)};function fc(e){return e.replace(/\\(.)/g,`$1`)}function pc(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`)}var mc=D(function(e){typeof Object.create==`function`?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),hc=D(function(e){try{var t=T.default;if(typeof t.inherits!=`function`)throw``;e.exports=t.inherits}catch{e.exports=mc}});function gc(e){return e.charAt(0)===`/`}function _c(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(e),n=t[1]||``,r=!!(n&&n.charAt(1)!==`:`);return!!(t[2]||r)}var X=process.platform===`win32`?_c:gc,vc=gc,yc=_c;X.posix=vc,X.win32=yc;var bc=Mc,xc=jc,Sc=Fc,Cc=kc,wc=Rc,Tc=Ic,Ec=Lc,Dc=zc,Oc=Bc;function kc(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Ac=Ks.Minimatch;function jc(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}function Mc(e,t){return e.localeCompare(t)}function Nc(e,t){e.ignore=t.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]),e.ignore.length&&(e.ignore=e.ignore.map(Pc))}function Pc(e){var t=null;return e.slice(-3)===`/**`&&(t=new Ac(e.replace(/(\/\*\*)+$/,``),{dot:!0})),{matcher:new Ac(e,{dot:!0}),gmatcher:t}}function Fc(e,t,n){if(n||={},n.matchBase&&t.indexOf(`/`)===-1){if(n.noglobstar)throw Error(`base matching requires globstar`);t=`**/`+t}e.silent=!!n.silent,e.pattern=t,e.strict=n.strict!==!1,e.realpath=!!n.realpath,e.realpathCache=n.realpathCache||Object.create(null),e.follow=!!n.follow,e.dot=!!n.dot,e.mark=!!n.mark,e.nodir=!!n.nodir,e.nodir&&(e.mark=!0),e.sync=!!n.sync,e.nounique=!!n.nounique,e.nonull=!!n.nonull,e.nosort=!!n.nosort,e.nocase=!!n.nocase,e.stat=!!n.stat,e.noprocess=!!n.noprocess,e.absolute=!!n.absolute,e.maxLength=n.maxLength||1/0,e.cache=n.cache||Object.create(null),e.statCache=n.statCache||Object.create(null),e.symlinks=n.symlinks||Object.create(null),Nc(e,n),e.changedCwd=!1;var r=process.cwd();kc(n,`cwd`)?(e.cwd=S.default.resolve(n.cwd),e.changedCwd=e.cwd!==r):e.cwd=r,e.root=n.root||S.default.resolve(e.cwd,`/`),e.root=S.default.resolve(e.root),process.platform===`win32`&&(e.root=e.root.replace(/\\/g,`/`)),e.cwdAbs=X(e.cwd)?e.cwd:Rc(e,e.cwd),process.platform===`win32`&&(e.cwdAbs=e.cwdAbs.replace(/\\/g,`/`)),e.nomount=!!n.nomount,n.nonegate=!0,n.nocomment=!0,e.minimatch=new Ac(t,n),e.options=e.minimatch.options}function Ic(e){for(var t=e.nounique,n=t?[]:Object.create(null),r=0,i=e.matches.length;r<i;r++){var a=e.matches[r];if(!a||Object.keys(a).length===0){if(e.nonull){var o=e.minimatch.globSet[r];t?n.push(o):n[o]=!0}}else{var s=Object.keys(a);t?n.push.apply(n,s):s.forEach(function(e){n[e]=!0})}}if(t||(n=Object.keys(n)),e.nosort||(n=n.sort(e.nocase?jc:Mc)),e.mark){for(var r=0;r<n.length;r++)n[r]=e._mark(n[r]);e.nodir&&(n=n.filter(function(t){var n=!/\/$/.test(t),r=e.cache[t]||e.cache[Rc(e,t)];return n&&r&&(n=r!==`DIR`&&!Array.isArray(r)),n}))}e.ignore.length&&(n=n.filter(function(t){return!zc(e,t)})),e.found=n}function Lc(e,t){var n=Rc(e,t),r=e.cache[n],i=t;if(r){var a=r===`DIR`||Array.isArray(r),o=t.slice(-1)===`/`;if(a&&!o?i+=`/`:!a&&o&&(i=i.slice(0,-1)),i!==t){var s=Rc(e,i);e.statCache[s]=e.statCache[n],e.cache[s]=e.cache[n]}}return i}function Rc(e,t){var n=t;return n=t.charAt(0)===`/`?S.default.join(e.root,t):X(t)||t===``?t:e.changedCwd?S.default.resolve(e.cwd,t):S.default.resolve(t),process.platform===`win32`&&(n=n.replace(/\\/g,`/`)),n}function zc(e,t){return e.ignore.length?e.ignore.some(function(e){return e.matcher.match(t)||!!(e.gmatcher&&e.gmatcher.match(t))}):!1}function Bc(e,t){return e.ignore.length?e.ignore.some(function(e){return!!(e.gmatcher&&e.gmatcher.match(t))}):!1}var Z={alphasort:bc,alphasorti:xc,setopts:Sc,ownProp:Cc,makeAbs:wc,finish:Tc,mark:Ec,isIgnored:Dc,childrenIgnored:Oc},Vc=Kc;Kc.GlobSync=Q;var Hc=Z.setopts,Uc=Z.ownProp,Wc=Z.childrenIgnored,Gc=Z.isIgnored;function Kc(e,t){if(typeof t==`function`||arguments.length===3)throw TypeError(`callback provided to sync glob
|
|
14
|
+
See: https://github.com/isaacs/node-glob/issues/167`);return new Q(e,t).found}function Q(e,t){if(!e)throw Error(`must provide pattern`);if(typeof t==`function`||arguments.length===3)throw TypeError(`callback provided to sync glob
|
|
15
|
+
See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof Q))return new Q(e,t);if(Hc(this,e,t),this.noprocess)return this;var n=this.minimatch.set.length;this.matches=Array(n);for(var r=0;r<n;r++)this._process(this.minimatch.set[r],r,!1);this._finish()}Q.prototype._finish=function(){if(w.default(this instanceof Q),this.realpath){var e=this;this.matches.forEach(function(t,n){var r=e.matches[n]=Object.create(null);for(var i in t)try{i=e._makeAbs(i);var a=ms.realpathSync(i,e.realpathCache);r[a]=!0}catch(t){if(t.syscall===`stat`)r[e._makeAbs(i)]=!0;else throw t}})}Z.finish(this)},Q.prototype._process=function(e,t,n){w.default(this instanceof Q);for(var r=0;typeof e[r]==`string`;)r++;var i;switch(r){case e.length:this._processSimple(e.join(`/`),t);return;case 0:i=null;break;default:i=e.slice(0,r).join(`/`);break}var a=e.slice(r),o;i===null?o=`.`:((X(i)||X(e.join(`/`)))&&(!i||!X(i))&&(i=`/`+i),o=i);var s=this._makeAbs(o);Wc(this,o)||(a[0]===Ks.GLOBSTAR?this._processGlobStar(i,o,s,a,t,n):this._processReaddir(i,o,s,a,t,n))},Q.prototype._processReaddir=function(e,t,n,r,i,a){var o=this._readdir(n,a);if(o){for(var s=r[0],c=!!this.minimatch.negate,l=s._glob,u=this.dot||l.charAt(0)===`.`,d=[],f=0;f<o.length;f++){var p=o[f];(p.charAt(0)!==`.`||u)&&(c&&!e?!p.match(s):p.match(s))&&d.push(p)}var m=d.length;if(m!==0){if(r.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var f=0;f<m;f++){var p=d[f];e&&(p=e.slice(-1)===`/`?e+p:e+`/`+p),p.charAt(0)===`/`&&!this.nomount&&(p=S.default.join(this.root,p)),this._emitMatch(i,p)}return}r.shift();for(var f=0;f<m;f++){var p=d[f],h=e?[e,p]:[p];this._process(h.concat(r),i,a)}}}},Q.prototype._emitMatch=function(e,t){if(!Gc(this,t)){var n=this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=n),!this.matches[e][t]){if(this.nodir){var r=this.cache[n];if(r===`DIR`||Array.isArray(r))return}this.matches[e][t]=!0,this.stat&&this._stat(t)}}},Q.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,!1);var t,n;try{n=x.default.lstatSync(e)}catch(e){if(e.code===`ENOENT`)return null}var r=n&&n.isSymbolicLink();return this.symlinks[e]=r,!r&&n&&!n.isDirectory()?this.cache[e]=`FILE`:t=this._readdir(e,!1),t},Q.prototype._readdir=function(e,t){if(t&&!Uc(this.symlinks,e))return this._readdirInGlobStar(e);if(Uc(this.cache,e)){var n=this.cache[e];if(!n||n===`FILE`)return null;if(Array.isArray(n))return n}try{return this._readdirEntries(e,x.default.readdirSync(e))}catch(t){return this._readdirError(e,t),null}},Q.prototype._readdirEntries=function(e,t){if(!this.mark&&!this.stat)for(var n=0;n<t.length;n++){var r=t[n];r=e===`/`?e+r:e+`/`+r,this.cache[r]=!0}return this.cache[e]=t,t},Q.prototype._readdirError=function(e,t){switch(t.code){case`ENOTSUP`:case`ENOTDIR`:var n=this._makeAbs(e);if(this.cache[n]=`FILE`,n===this.cwdAbs){var r=Error(t.code+` invalid cwd `+this.cwd);throw r.path=this.cwd,r.code=t.code,r}break;case`ENOENT`:case`ELOOP`:case`ENAMETOOLONG`:case`UNKNOWN`:this.cache[this._makeAbs(e)]=!1;break;default:if(this.cache[this._makeAbs(e)]=!1,this.strict)throw t;this.silent||console.error(`glob error`,t);break}},Q.prototype._processGlobStar=function(e,t,n,r,i,a){var o=this._readdir(n,a);if(o){var s=r.slice(1),c=e?[e]:[],l=c.concat(s);this._process(l,i,!1);var u=o.length;if(!(this.symlinks[n]&&a)){for(var d=0;d<u;d++)if(!(o[d].charAt(0)===`.`&&!this.dot)){var f=c.concat(o[d],s);this._process(f,i,!0);var p=c.concat(o[d],r);this._process(p,i,!0)}}}},Q.prototype._processSimple=function(e,t){var n=this._stat(e);if(this.matches[t]||(this.matches[t]=Object.create(null)),n){if(e&&X(e)&&!this.nomount){var r=/[\/\\]$/.test(e);e.charAt(0)===`/`?e=S.default.join(this.root,e):(e=S.default.resolve(this.root,e),r&&(e+=`/`))}process.platform===`win32`&&(e=e.replace(/\\/g,`/`)),this._emitMatch(t,e)}},Q.prototype._stat=function(e){var t=this._makeAbs(e),n=e.slice(-1)===`/`;if(e.length>this.maxLength)return!1;if(!this.stat&&Uc(this.cache,t)){var r=this.cache[t];if(Array.isArray(r)&&(r=`DIR`),!n||r===`DIR`)return r;if(n&&r===`FILE`)return!1}var i=this.statCache[t];if(!i){var a;try{a=x.default.lstatSync(t)}catch(e){if(e&&(e.code===`ENOENT`||e.code===`ENOTDIR`))return this.statCache[t]=!1,!1}if(a&&a.isSymbolicLink())try{i=x.default.statSync(t)}catch{i=a}else i=a}this.statCache[t]=i;var r=!0;return i&&(r=i.isDirectory()?`DIR`:`FILE`),this.cache[t]=this.cache[t]||r,n&&r===`FILE`?!1:r},Q.prototype._mark=function(e){return Z.mark(this,e)},Q.prototype._makeAbs=function(e){return Z.makeAbs(this,e)};var qc=Jc;function Jc(e,t){if(e&&t)return Jc(e)(t);if(typeof e!=`function`)throw TypeError(`need wrapper function`);return Object.keys(e).forEach(function(t){n[t]=e[t]}),n;function n(){for(var t=Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];var r=e.apply(this,t),i=t[t.length-1];return typeof r==`function`&&r!==i&&Object.keys(i).forEach(function(e){r[e]=i[e]}),r}}var Yc=qc(Zc),Xc=qc(Qc);Zc.proto=Zc(function(){Object.defineProperty(Function.prototype,`once`,{value:function(){return Zc(this)},configurable:!0}),Object.defineProperty(Function.prototype,`onceStrict`,{value:function(){return Qc(this)},configurable:!0})});function Zc(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function Qc(e){var t=function(){if(t.called)throw Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)};return t.onceError=(e.name||"Function wrapped with `once`")+` shouldn't be called more than once`,t.called=!1,t}Yc.strict=Xc;var $c=Object.create(null),el=qc(tl);function tl(e,t){return $c[e]?($c[e].push(t),null):($c[e]=[t],nl(e))}function nl(e){return Yc(function t(){var n=$c[e],r=n.length,i=rl(arguments);try{for(var a=0;a<r;a++)n[a].apply(null,i)}finally{n.length>r?(n.splice(0,r),process.nextTick(function(){t.apply(null,i)})):delete $c[e]}})}function rl(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r]=e[r];return n}var il=ul,al=C.default.EventEmitter,ol=Z.setopts,sl=Z.ownProp,cl=Z.childrenIgnored,ll=Z.isIgnored;function ul(e,t,n){if(typeof t==`function`&&(n=t,t={}),t||={},t.sync){if(n)throw TypeError(`callback provided to sync glob`);return Vc(e,t)}return new $(e,t,n)}ul.sync=Vc;var dl=ul.GlobSync=Vc.GlobSync;ul.glob=ul;function fl(e,t){if(typeof t!=`object`||!t)return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}ul.hasMagic=function(e,t){var n=fl({},t);n.noprocess=!0;var r=new $(e,n).minimatch.set;if(!e)return!1;if(r.length>1)return!0;for(var i=0;i<r[0].length;i++)if(typeof r[0][i]!=`string`)return!0;return!1},ul.Glob=$,hc($,al);function $(e,t,n){if(typeof t==`function`&&(n=t,t=null),t&&t.sync){if(n)throw TypeError(`callback provided to sync glob`);return new dl(e,t)}if(!(this instanceof $))return new $(e,t,n);ol(this,e,t),this._didRealPath=!1;var r=this.minimatch.set.length;this.matches=Array(r),typeof n==`function`&&(n=Yc(n),this.on(`error`,n),this.on(`end`,function(e){n(null,e)}));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(r===0)return s();for(var a=!0,o=0;o<r;o++)this._process(this.minimatch.set[o],o,!1,s);a=!1;function s(){--i._processing,i._processing<=0&&(a?process.nextTick(function(){i._finish()}):i._finish())}}$.prototype._finish=function(){if(w.default(this instanceof $),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();Z.finish(this),this.emit(`end`,this.found)}},$.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var e=this.matches.length;if(e===0)return this._finish();for(var t=this,n=0;n<this.matches.length;n++)this._realpathSet(n,r);function r(){--e===0&&t._finish()}},$.prototype._realpathSet=function(e,t){var n=this.matches[e];if(!n)return t();var r=Object.keys(n),i=this,a=r.length;if(a===0)return t();var o=this.matches[e]=Object.create(null);r.forEach(function(n,r){n=i._makeAbs(n),ms.realpath(n,i.realpathCache,function(r,s){r?r.syscall===`stat`?o[n]=!0:i.emit(`error`,r):o[s]=!0,--a===0&&(i.matches[e]=o,t())})})},$.prototype._mark=function(e){return Z.mark(this,e)},$.prototype._makeAbs=function(e){return Z.makeAbs(this,e)},$.prototype.abort=function(){this.aborted=!0,this.emit(`abort`)},$.prototype.pause=function(){this.paused||(this.paused=!0,this.emit(`pause`))},$.prototype.resume=function(){if(this.paused){if(this.emit(`resume`),this.paused=!1,this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var t=0;t<e.length;t++){var n=e[t];this._emitMatch(n[0],n[1])}}if(this._processQueue.length){var r=this._processQueue.slice(0);this._processQueue.length=0;for(var t=0;t<r.length;t++){var i=r[t];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}},$.prototype._process=function(e,t,n,r){if(w.default(this instanceof $),w.default(typeof r==`function`),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([e,t,n,r]);return}for(var i=0;typeof e[i]==`string`;)i++;var a;switch(i){case e.length:this._processSimple(e.join(`/`),t,r);return;case 0:a=null;break;default:a=e.slice(0,i).join(`/`);break}var o=e.slice(i),s;a===null?s=`.`:((X(a)||X(e.join(`/`)))&&(!a||!X(a))&&(a=`/`+a),s=a);var c=this._makeAbs(s);if(cl(this,s))return r();o[0]===Ks.GLOBSTAR?this._processGlobStar(a,s,c,o,t,n,r):this._processReaddir(a,s,c,o,t,n,r)}},$.prototype._processReaddir=function(e,t,n,r,i,a,o){var s=this;this._readdir(n,a,function(c,l){return s._processReaddir2(e,t,n,r,i,a,l,o)})},$.prototype._processReaddir2=function(e,t,n,r,i,a,o,s){if(!o)return s();for(var c=r[0],l=!!this.minimatch.negate,u=c._glob,d=this.dot||u.charAt(0)===`.`,f=[],p=0;p<o.length;p++){var m=o[p];(m.charAt(0)!==`.`||d)&&(l&&!e?!m.match(c):m.match(c))&&f.push(m)}var h=f.length;if(h===0)return s();if(r.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var p=0;p<h;p++){var m=f[p];e&&(m=e===`/`?e+m:e+`/`+m),m.charAt(0)===`/`&&!this.nomount&&(m=S.default.join(this.root,m)),this._emitMatch(i,m)}return s()}r.shift();for(var p=0;p<h;p++){var m=f[p];e&&(m=e===`/`?e+m:e+`/`+m),this._process([m].concat(r),i,a,s)}s()},$.prototype._emitMatch=function(e,t){if(!this.aborted&&!ll(this,t)){if(this.paused){this._emitQueue.push([e,t]);return}var n=X(t)?t:this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=n),!this.matches[e][t]){if(this.nodir){var r=this.cache[n];if(r===`DIR`||Array.isArray(r))return}this.matches[e][t]=!0;var i=this.statCache[n];i&&this.emit(`stat`,t,i),this.emit(`match`,t)}}},$.prototype._readdirInGlobStar=function(e,t){if(this.aborted)return;if(this.follow)return this._readdir(e,!1,t);var n=`lstat\0`+e,r=this,i=el(n,a);i&&x.default.lstat(e,i);function a(n,i){if(n&&n.code===`ENOENT`)return t();var a=i&&i.isSymbolicLink();r.symlinks[e]=a,!a&&i&&!i.isDirectory()?(r.cache[e]=`FILE`,t()):r._readdir(e,!1,t)}},$.prototype._readdir=function(e,t,n){if(!this.aborted&&(n=el(`readdir\0`+e+`\0`+t,n),n)){if(t&&!sl(this.symlinks,e))return this._readdirInGlobStar(e,n);if(sl(this.cache,e)){var r=this.cache[e];if(!r||r===`FILE`)return n();if(Array.isArray(r))return n(null,r)}x.default.readdir(e,pl(this,e,n))}};function pl(e,t,n){return function(r,i){r?e._readdirError(t,r,n):e._readdirEntries(t,i,n)}}$.prototype._readdirEntries=function(e,t,n){if(!this.aborted){if(!this.mark&&!this.stat)for(var r=0;r<t.length;r++){var i=t[r];i=e===`/`?e+i:e+`/`+i,this.cache[i]=!0}return this.cache[e]=t,n(null,t)}},$.prototype._readdirError=function(e,t,n){if(!this.aborted){switch(t.code){case`ENOTSUP`:case`ENOTDIR`:var r=this._makeAbs(e);if(this.cache[r]=`FILE`,r===this.cwdAbs){var i=Error(t.code+` invalid cwd `+this.cwd);i.path=this.cwd,i.code=t.code,this.emit(`error`,i),this.abort()}break;case`ENOENT`:case`ELOOP`:case`ENAMETOOLONG`:case`UNKNOWN`:this.cache[this._makeAbs(e)]=!1;break;default:this.cache[this._makeAbs(e)]=!1,this.strict&&(this.emit(`error`,t),this.abort()),this.silent||console.error(`glob error`,t);break}return n()}},$.prototype._processGlobStar=function(e,t,n,r,i,a,o){var s=this;this._readdir(n,a,function(c,l){s._processGlobStar2(e,t,n,r,i,a,l,o)})},$.prototype._processGlobStar2=function(e,t,n,r,i,a,o,s){if(!o)return s();var c=r.slice(1),l=e?[e]:[],u=l.concat(c);this._process(u,i,!1,s);var d=this.symlinks[n],f=o.length;if(d&&a)return s();for(var p=0;p<f;p++)if(!(o[p].charAt(0)===`.`&&!this.dot)){var m=l.concat(o[p],c);this._process(m,i,!0,s);var h=l.concat(o[p],r);this._process(h,i,!0,s)}s()},$.prototype._processSimple=function(e,t,n){var r=this;this._stat(e,function(i,a){r._processSimple2(e,t,i,a,n)})},$.prototype._processSimple2=function(e,t,n,r,i){if(this.matches[t]||(this.matches[t]=Object.create(null)),!r)return i();if(e&&X(e)&&!this.nomount){var a=/[\/\\]$/.test(e);e.charAt(0)===`/`?e=S.default.join(this.root,e):(e=S.default.resolve(this.root,e),a&&(e+=`/`))}process.platform===`win32`&&(e=e.replace(/\\/g,`/`)),this._emitMatch(t,e),i()},$.prototype._stat=function(e,t){var n=this._makeAbs(e),r=e.slice(-1)===`/`;if(e.length>this.maxLength)return t();if(!this.stat&&sl(this.cache,n)){var i=this.cache[n];if(Array.isArray(i)&&(i=`DIR`),!r||i===`DIR`)return t(null,i);if(r&&i===`FILE`)return t()}var a=this.statCache[n];if(a!==void 0){if(a===!1)return t(null,a);var o=a.isDirectory()?`DIR`:`FILE`;return r&&o===`FILE`?t():t(null,o,a)}var s=this,c=el(`stat\0`+n,l);c&&x.default.lstat(n,c);function l(r,i){if(i&&i.isSymbolicLink())return x.default.stat(n,function(r,a){r?s._stat2(e,n,null,i,t):s._stat2(e,n,r,a,t)});s._stat2(e,n,r,i,t)}},$.prototype._stat2=function(e,t,n,r,i){if(n&&(n.code===`ENOENT`||n.code===`ENOTDIR`))return this.statCache[t]=!1,i();var a=e.slice(-1)===`/`;if(this.statCache[t]=r,t.slice(-1)===`/`&&r&&!r.isDirectory())return i(null,!1,r);var o=!0;return r&&(o=r.isDirectory()?`DIR`:`FILE`),this.cache[t]=this.cache[t]||o,a&&o===`FILE`?i():i(null,o,r)};var ml=xl;xl.sync=Dl;var hl=void 0;try{hl=il}catch{}var gl=438,_l={nosort:!0,silent:!0},vl=0,yl=process.platform===`win32`;function bl(e){if([`unlink`,`chmod`,`stat`,`lstat`,`rmdir`,`readdir`].forEach(function(t){e[t]=e[t]||x.default[t],t+=`Sync`,e[t]=e[t]||x.default[t]}),e.maxBusyTries=e.maxBusyTries||3,e.emfileWait=e.emfileWait||1e3,e.glob===!1&&(e.disableGlob=!0),e.disableGlob!==!0&&hl===void 0)throw Error("glob dependency not found, set `options.disableGlob = true` if intentional");e.disableGlob=e.disableGlob||!1,e.glob=e.glob||_l}function xl(e,t,n){typeof t==`function`&&(n=t,t={}),w.default(e,`rimraf: missing path`),w.default.equal(typeof e,`string`,`rimraf: path should be a string`),w.default.equal(typeof n,`function`,`rimraf: callback function required`),w.default(t,`rimraf: invalid options argument provided`),w.default.equal(typeof t,`object`,`rimraf: options should be object`),bl(t);var r=0,i=null,a=0;if(t.disableGlob||!hl.hasMagic(e))return s(null,[e]);t.lstat(e,function(n,r){if(!n)return s(null,[e]);hl(e,t.glob,s)});function o(e){i||=e,--a===0&&n(i)}function s(e,i){if(e)return n(e);if(a=i.length,a===0)return n();i.forEach(function(e){Sl(e,t,function n(i){if(i){if((i.code===`EBUSY`||i.code===`ENOTEMPTY`||i.code===`EPERM`)&&r<t.maxBusyTries){r++;var a=r*100;return setTimeout(function(){Sl(e,t,n)},a)}if(i.code===`EMFILE`&&vl<t.emfileWait)return setTimeout(function(){Sl(e,t,n)},vl++);i.code===`ENOENT`&&(i=null)}vl=0,o(i)})})}}function Sl(e,t,n){w.default(e),w.default(t),w.default(typeof n==`function`),t.lstat(e,function(r,i){if(r&&r.code===`ENOENT`)return n(null);if(r&&r.code===`EPERM`&&yl&&Cl(e,t,r,n),i&&i.isDirectory())return Tl(e,t,r,n);t.unlink(e,function(r){if(r){if(r.code===`ENOENT`)return n(null);if(r.code===`EPERM`)return yl?Cl(e,t,r,n):Tl(e,t,r,n);if(r.code===`EISDIR`)return Tl(e,t,r,n)}return n(r)})})}function Cl(e,t,n,r){w.default(e),w.default(t),w.default(typeof r==`function`),n&&w.default(n instanceof Error),t.chmod(e,gl,function(i){i?r(i.code===`ENOENT`?null:n):t.stat(e,function(i,a){i?r(i.code===`ENOENT`?null:n):a.isDirectory()?Tl(e,t,n,r):t.unlink(e,r)})})}function wl(e,t,n){w.default(e),w.default(t),n&&w.default(n instanceof Error);try{t.chmodSync(e,gl)}catch(e){if(e.code===`ENOENT`)return;throw n}try{var r=t.statSync(e)}catch(e){if(e.code===`ENOENT`)return;throw n}r.isDirectory()?Ol(e,t,n):t.unlinkSync(e)}function Tl(e,t,n,r){w.default(e),w.default(t),n&&w.default(n instanceof Error),w.default(typeof r==`function`),t.rmdir(e,function(i){i&&(i.code===`ENOTEMPTY`||i.code===`EEXIST`||i.code===`EPERM`)?El(e,t,r):i&&i.code===`ENOTDIR`?r(n):r(i)})}function El(e,t,n){w.default(e),w.default(t),w.default(typeof n==`function`),t.readdir(e,function(r,i){if(r)return n(r);var a=i.length;if(a===0)return t.rmdir(e,n);var o;i.forEach(function(r){xl(S.default.join(e,r),t,function(r){if(!o){if(r)return n(o=r);--a===0&&t.rmdir(e,n)}})})})}function Dl(e,t){t||={},bl(t),w.default(e,`rimraf: missing path`),w.default.equal(typeof e,`string`,`rimraf: path should be a string`),w.default(t,`rimraf: missing options`),w.default.equal(typeof t,`object`,`rimraf: options should be object`);var n;if(t.disableGlob||!hl.hasMagic(e))n=[e];else try{t.lstatSync(e),n=[e]}catch{n=hl.sync(e,t.glob)}if(n.length)for(var r=0;r<n.length;r++){var e=n[r];try{var i=t.lstatSync(e)}catch(n){if(n.code===`ENOENT`)return;n.code===`EPERM`&&yl&&wl(e,t,n)}try{i&&i.isDirectory()?Ol(e,t,null):t.unlinkSync(e)}catch(n){if(n.code===`ENOENT`)return;if(n.code===`EPERM`)return yl?wl(e,t,n):Ol(e,t,n);if(n.code!==`EISDIR`)throw n;Ol(e,t,n)}}}function Ol(e,t,n){w.default(e),w.default(t),n&&w.default(n instanceof Error);try{t.rmdirSync(e)}catch(r){if(r.code===`ENOENT`)return;if(r.code===`ENOTDIR`)throw n;(r.code===`ENOTEMPTY`||r.code===`EEXIST`||r.code===`EPERM`)&&kl(e,t)}}function kl(e,t){w.default(e),w.default(t),t.readdirSync(e).forEach(function(n){Dl(S.default.join(e,n),t)});var n=yl?100:1,r=0;do{var i=!0;try{var a=t.rmdirSync(e,t);return i=!1,a}finally{if(++r<n&&i)continue}}while(!0)}function Al(e){return e&&typeof e==`object`&&`default`in e?e.default:e}var jl=Al(as),Ml=Al(ml);function Nl(e){return S.default.resolve.apply(null,e)}function Pl(e){var t,n;if(typeof e[e.length-1]==`object`){t=e[e.length-1];var r=e.length-1;for(n=Array(r);r--;)n[r]=e[r]}else t={},n=e;var i=S.default.resolve.apply(null,n);return{options:t,resolvedPath:i}}function Fl(){var e=Pl(arguments),t=e.resolvedPath,n=e.options;return{to:function(){var e=Pl(arguments),r=e.resolvedPath,i=e.options;function a(e,t){jl.sync(t),q.readdirSync(e).forEach(function(r){var o=e+S.default.sep+r,s=t+S.default.sep+r;if(q.statSync(o).isDirectory())return a(o,s);var c=q.readFileSync(o,n);q.writeFileSync(s,c,i)})}a(t,r)}}}function Il(){Ml.sync(Nl(arguments))}process.platform,q.closeSync,q.fchmodSync,q.fchownSync,q.fstatSync,q.fsyncSync,q.ftruncateSync,q.futimesSync,q.readSync;var Ll=Fl,Rl=Il,zl=ae.default.homedir()||ae.default.tmpdir(),Bl=1e3,Vl=Bl*60,Hl=Vl*60,Ul=Hl*24,Wl=Ul*7,Gl=Ul*365.25,Kl=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return ql(e);if(n===`number`&&isFinite(e))return t.long?Yl(e):Jl(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function ql(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return n*Gl;case`weeks`:case`week`:case`w`:return n*Wl;case`days`:case`day`:case`d`:return n*Ul;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return n*Hl;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return n*Vl;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return n*Bl;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return n;default:return}}}}function Jl(e){var t=Math.abs(e);return t>=Ul?Math.round(e/Ul)+`d`:t>=Hl?Math.round(e/Hl)+`h`:t>=Vl?Math.round(e/Vl)+`m`:t>=Bl?Math.round(e/Bl)+`s`:e+`ms`}function Yl(e){var t=Math.abs(e);return t>=Ul?Xl(e,t,Ul,`day`):t>=Hl?Xl(e,t,Hl,`hour`):t>=Vl?Xl(e,t,Vl,`minute`):t>=Bl?Xl(e,t,Bl,`second`):e+` ms`}function Xl(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+` `+r+(i?`s`:``)}function Zl(e){n.debug=n,n.default=n,n.coerce=c,n.disable=a,n.enable=i,n.enabled=o,n.humanize=Kl,n.destroy=l,Object.keys(e).forEach(t=>{n[t]=e[t]}),n.names=[],n.skips=[],n.formatters={};function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]}n.selectColor=t;function n(e){let t,i=null;function a(...e){if(!a.enabled)return;let r=a,i=Number(new Date);r.diff=i-(t||i),r.prev=t,r.curr=i,t=i,e[0]=n.coerce(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if(t===`%%`)return`%`;o++;let a=n.formatters[i];if(typeof a==`function`){let n=e[o];t=a.call(r,n),e.splice(o,1),o--}return t}),n.formatArgs.call(r,e),(r.log||n.log).apply(r,e)}return a.namespace=e,a.useColors=n.useColors(),a.color=n.selectColor(e),a.extend=r,a.destroy=n.destroy,Object.defineProperty(a,`enabled`,{enumerable:!0,configurable:!1,get:()=>i===null?n.enabled(e):i,set:e=>{i=e}}),typeof n.init==`function`&&n.init(a),a}function r(e,t){let r=n(this.namespace+(t===void 0?`:`:t)+e);return r.log=this.log,r}function i(e){n.save(e),n.names=[],n.skips=[];let t,r=(typeof e==`string`?e:``).split(/[\s,]+/),i=r.length;for(t=0;t<i;t++)r[t]&&(e=r[t].replace(/\*/g,`.*?`),e[0]===`-`?n.skips.push(RegExp(`^`+e.substr(1)+`$`)):n.names.push(RegExp(`^`+e+`$`)))}function a(){let e=[...n.names.map(s),...n.skips.map(s).map(e=>`-`+e)].join(`,`);return n.enable(``),e}function o(e){if(e[e.length-1]===`*`)return!0;let t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return!0;return!1}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,`*`)}function c(e){return e instanceof Error?e.stack||e.message:e}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}var Ql=Zl,$l=D(function(e,t){t.formatArgs=r,t.save=i,t.load=a,t.useColors=n,t.storage=o(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function n(){return typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs)?!0:typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(t){if(t[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+t[0]+(this.useColors?`%c `:` `)+`+`+e.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;t.splice(1,0,n,`color: inherit`);let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),t.splice(i,0,n)}t.log=console.debug||console.log||(()=>{});function i(e){try{e?t.storage.setItem(`debug`,e):t.storage.removeItem(`debug`)}catch{}}function a(){let e;try{e=t.storage.getItem(`debug`)}catch{}return!e&&typeof process<`u`&&`env`in process&&(e=process.env.DEBUG),e}function o(){try{return localStorage}catch{}}e.exports=Ql(t);let{formatters:s}=e.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}}}),eu=D(function(e,t){t.init=c,t.log=a,t.formatArgs=r,t.save=o,t.load=s,t.useColors=n,t.destroy=T.default.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{let e=ao;e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}t.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t];return r=/^(yes|on|true|enabled)$/i.test(r)?!0:/^(no|off|false|disabled)$/i.test(r)?!1:r===`null`?null:Number(r),e[n]=r,e},{});function n(){return`colors`in t.inspectOpts?!!t.inspectOpts.colors:oe.default.isatty(process.stderr.fd)}function r(t){let{namespace:n,useColors:r}=this;if(r){let r=this.color,i=`\x1B[3`+(r<8?r:`8;5;`+r),a=` ${i};1m${n} \u001B[0m`;t[0]=a+t[0].split(`
|
|
16
|
+
`).join(`
|
|
17
|
+
`+a),t.push(i+`m+`+e.exports.humanize(this.diff)+`\x1B[0m`)}else t[0]=i()+n+` `+t[0]}function i(){return t.inspectOpts.hideDate?``:new Date().toISOString()+` `}function a(...e){return process.stderr.write(T.default.format(...e)+`
|
|
18
|
+
`)}function o(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function s(){return process.env.DEBUG}function c(e){e.inspectOpts={};let n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]}e.exports=Ql(t);let{formatters:l}=e.exports;l.o=function(e){return this.inspectOpts.colors=this.useColors,T.default.inspect(e,this.inspectOpts).split(`
|
|
19
|
+
`).map(e=>e.trim()).join(` `)},l.O=function(e){return this.inspectOpts.colors=this.useColors,T.default.inspect(e,this.inspectOpts)}}),tu=D(function(e){typeof process>`u`||process.type===`renderer`||process.browser===!0||process.__nwjs?e.exports=$l:e.exports=eu});function nu(e){return function(t,n){return new Promise((r,i)=>{e.call(this,t,n,(e,t)=>{e?i(e):r(t)})})}}var ru=nu,iu=Object.defineProperty({default:ru},`__esModule`,{value:!0}),au=E&&E.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};let ou=au(tu),su=au(iu),cu=ou.default(`agent-base`);function lu(e){return!!e&&typeof e.addRequest==`function`}function uu(){let{stack:e}=Error();return typeof e==`string`?e.split(`
|
|
20
|
+
`).some(e=>e.indexOf(`(https.js:`)!==-1||e.indexOf(`node:https:`)!==-1):!1}function du(e,t){return new du.Agent(e,t)}(function(e){class t extends C.default.EventEmitter{constructor(e,t){super();let n=t;typeof e==`function`?this.callback=e:e&&(n=e),this.timeout=null,n&&typeof n.timeout==`number`&&(this.timeout=n.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort==`number`?this.explicitDefaultPort:uu()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return typeof this.explicitProtocol==`string`?this.explicitProtocol:uu()?`https:`:`http:`}set protocol(e){this.explicitProtocol=e}callback(e,t,n){throw Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){let n=Object.assign({},t);typeof n.secureEndpoint!=`boolean`&&(n.secureEndpoint=uu()),n.host??=`localhost`,n.port??=n.secureEndpoint?443:80,n.protocol??=n.secureEndpoint?`https:`:`http:`,n.host&&n.path&&delete n.path,delete n.agent,delete n.hostname,delete n._defaultAgent,delete n.defaultPort,delete n.createConnection,e._last=!0,e.shouldKeepAlive=!1;let r=!1,i=null,a=n.timeout||this.timeout,o=t=>{e._hadError||=(e.emit(`error`,t),!0)},s=()=>{i=null,r=!0;let e=Error(`A "socket" was not created for HTTP request before ${a}ms`);e.code=`ETIMEOUT`,o(e)},c=e=>{r||(i!==null&&(clearTimeout(i),i=null),o(e))},l=t=>{if(!r){if(i!=null&&(clearTimeout(i),i=null),lu(t)){cu(`Callback returned another Agent instance %o`,t.constructor.name),t.addRequest(e,n);return}if(t){t.once(`free`,()=>{this.freeSocket(t,n)}),e.onSocket(t);return}o(Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``))}};if(typeof this.callback!=`function`){o(Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(cu(`Converting legacy callback function to promise`),this.promisifiedCallback=su.default(this.callback)):this.promisifiedCallback=this.callback),typeof a==`number`&&a>0&&(i=setTimeout(s,a)),`port`in n&&typeof n.port!=`number`&&(n.port=Number(n.port));try{cu(`Resolving socket for %o request: %o`,n.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,n)).then(l,c)}catch(e){Promise.reject(e).catch(c)}}freeSocket(e,t){cu(`Freeing socket %o %o`,e.constructor.name,t),e.destroy()}destroy(){cu(`Destroying agent %o`,this.constructor.name)}}e.Agent=t,e.prototype=e.Agent.prototype})(du||={});var fu=du;let pu=(E&&E.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(tu).default(`https-proxy-agent:parse-proxy-response`);function mu(e){return new Promise((t,n)=>{let r=0,i=[];function a(){let t=e.read();t?u(t):e.once(`readable`,a)}function o(){e.removeListener(`end`,c),e.removeListener(`error`,l),e.removeListener(`close`,s),e.removeListener(`readable`,a)}function s(e){pu(`onclose had error %o`,e)}function c(){pu(`onend`)}function l(e){o(),pu(`onerror %o`,e),n(e)}function u(e){i.push(e),r+=e.length;let n=Buffer.concat(i,r);if(n.indexOf(`\r
|
|
21
|
+
\r
|
|
22
|
+
`)===-1){pu(`have not received end of HTTP headers yet...`),a();return}let o=n.toString(`ascii`,0,n.indexOf(`\r
|
|
23
|
+
`)),s=+o.split(` `)[1];pu(`got proxy server response: %o`,o),t({statusCode:s,buffered:n})}e.on(`error`,l),e.on(`close`,s),e.on(`end`,c),a()})}var hu=mu,gu=Object.defineProperty({default:hu},`__esModule`,{value:!0}),_u=E&&E.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},vu=E&&E.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};let yu=vu(de.default),bu=vu(fe.default),xu=vu(ue.default),Su=vu(w.default),Cu=vu(tu),wu=vu(gu),Tu=Cu.default(`https-proxy-agent:agent`);var Eu=class extends fu.Agent{constructor(e){let t;if(t=typeof e==`string`?xu.default.parse(e):e,!t)throw Error("an HTTP(S) proxy server `host` and `port` must be specified!");Tu(`creating new HttpsProxyAgent instance: %o`,t),super(t);let n=Object.assign({},t);this.secureProxy=t.secureProxy||ku(n.protocol),n.host=n.hostname||n.host,typeof n.port==`string`&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),this.secureProxy&&!(`ALPNProtocols`in n)&&(n.ALPNProtocols=[`http 1.1`]),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,t){return _u(this,void 0,void 0,function*(){let{proxy:n,secureProxy:r}=this,i;r?(Tu("Creating `tls.Socket`: %o",n),i=bu.default.connect(n)):(Tu("Creating `net.Socket`: %o",n),i=yu.default.connect(n));let a=Object.assign({},n.headers),o=`CONNECT ${`${t.host}:${t.port}`} HTTP/1.1\r\n`;n.auth&&(a[`Proxy-Authorization`]=`Basic ${Buffer.from(n.auth).toString(`base64`)}`);let{host:s,port:c,secureEndpoint:l}=t;Ou(c,l)||(s+=`:${c}`),a.Host=s,a.Connection=`close`;for(let e of Object.keys(a))o+=`${e}: ${a[e]}\r\n`;let u=wu.default(i);i.write(`${o}\r\n`);let{statusCode:d,buffered:f}=yield u;if(d===200){if(e.once(`socket`,Du),t.secureEndpoint){let e=t.servername||t.host;if(!e)throw Error(`Could not determine "servername"`);return Tu(`Upgrading socket connection to TLS`),bu.default.connect(Object.assign(Object.assign({},Au(t,`host`,`hostname`,`path`,`port`)),{socket:i,servername:e}))}return i}i.destroy();let p=new yu.default.Socket;return p.readable=!0,e.once(`socket`,e=>{Tu(`replaying proxy buffer for failed request`),Su.default(e.listenerCount(`data`)>0),e.push(f),e.push(null)}),p})}};function Du(e){e.resume()}function Ou(e,t){return!!(!t&&e===80||t&&e===443)}function ku(e){return typeof e==`string`?/^https:?$/i.test(e):!1}function Au(e,...t){let n={},r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}var ju=Object.defineProperty({default:Eu},`__esModule`,{value:!0});let Mu=(E&&E.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(ju);function Nu(e){return new Mu.default(e)}(function(e){e.HttpsProxyAgent=Mu.default,e.prototype=Mu.default.prototype})(Nu||={});var Pu=Nu,Fu=class extends Error{constructor(e,t){super(e),Object.assign(this,t)}};function Iu(t,n){try{return n&&n.clearCache===!0&&delete e.cache[e.resolve(t)],e(t)}catch{return null}}function Lu(e){return new Promise((t,n)=>{le.default.exec(e,(e,r,i)=>{if(e){n(e);return}t({stdout:r,stderr:i})})})}function Ru(e){let t=S.default.dirname(e);if(t!==e){Ru(t);try{x.default.mkdirSync(e)}catch(e){if(e.code!==`EEXIST`)throw e}}}function zu(e,t,n){return new Promise((r,i)=>{let a=e;if(n){let t=ue.default.parse(e);a={hostname:t.host,path:t.path,agent:new Pu(n)}}ce.default.get(a,e=>{let a=e.statusCode;a>=400?i({code:a,message:e.statusMessage}):a>=300?zu(e.headers.location,t,n).then(r,i):e.pipe(x.default.createWriteStream(t)).on(`finish`,()=>r()).on(`error`,i)}).on(`error`,i)})}function Bu(e,t){let n=S.default.join(e,`tmp`);Rl(n),Ru(n),x.default.readdirSync(t).forEach(e=>{let r=S.default.join(t,e),i=S.default.join(n,e);x.default.lstatSync(r).isDirectory()?(Ll(r).to(i),Rl(r)):(x.default.copyFileSync(r,i),x.default.unlinkSync(r))})}function Vu(e,t){let n=S.default.join(e,`tmp`);x.default.readdirSync(n).forEach(e=>{let r=S.default.join(n,e),i=S.default.join(t,e);x.default.lstatSync(r).isDirectory()?(Ll(r).to(i),Rl(r)):(e!==`degit.json`&&x.default.copyFileSync(r,i),x.default.unlinkSync(r))}),Rl(n)}let Hu=S.default.join(zl,`.degit`),Uu=new Set([`tar`,`git`]);function Wu(e,t){return new Gu(e,t)}var Gu=class extends C.default{constructor(e,t={}){if(super(),this.src=e,this.cache=t.cache,this.force=t.force,this.verbose=t.verbose,this.proxy=process.env.https_proxy,this.repo=qu(e),this.mode=t.mode||this.repo.mode,!Uu.has(this.mode))throw Error(`Valid modes are ${Array.from(Uu).join(`, `)}`);this._hasStashed=!1,this.directiveActions={clone:async(e,t,n)=>{this._hasStashed===!1&&(Bu(e,t),this._hasStashed=!0);let r=Object.assign({force:!0},{cache:n.cache,verbose:n.verbose}),i=Wu(n.src,r);i.on(`info`,e=>{console.error(Lo.cyan(`> ${e.message.replace(`options.`,`--`)}`))}),i.on(`warn`,e=>{console.error(Lo.magenta(`! ${e.message.replace(`options.`,`--`)}`))}),await i.clone(t).catch(e=>{console.error(Lo.red(`! ${e.message}`)),process.exit(1)})},remove:this.remove.bind(this)}}_getDirectives(e){let t=S.default.resolve(e,`degit.json`),n=Iu(t,{clearCache:!0})||!1;return n&&x.default.unlinkSync(t),n}async clone(e){this._checkDirIsEmpty(e);let{repo:t}=this,n=S.default.join(Hu,t.site,t.user,t.name);this.mode===`tar`?await this._cloneWithTar(n,e):await this._cloneWithGit(n,e),this._info({code:`SUCCESS`,message:`cloned ${Lo.bold(t.user+`/`+t.name)}#${Lo.bold(t.ref)}${e===`.`?``:` to ${e}`}`,repo:t,dest:e});let r=this._getDirectives(e);if(r){for(let t of r)await this.directiveActions[t.action](n,e,t);this._hasStashed===!0&&Vu(n,e)}}remove(e,t,n){let r=n.files;Array.isArray(r)||(r=[r]);let i=r.map(e=>{let n=S.default.resolve(t,e);return x.default.existsSync(n)?x.default.lstatSync(n).isDirectory()?(Rl(n),e+`/`):(x.default.unlinkSync(n),e):(this._warn({code:`FILE_DOES_NOT_EXIST`,message:`action wants to remove ${Lo.bold(e)} but it does not exist`}),null)}).filter(e=>e);i.length>0&&this._info({code:`REMOVED`,message:`removed: ${Lo.bold(i.map(e=>Lo.bold(e)).join(`, `))}`})}_checkDirIsEmpty(e){try{if(x.default.readdirSync(e).length>0)if(this.force)this._info({code:`DEST_NOT_EMPTY`,message:`destination directory is not empty. Using options.force, continuing`});else throw new Fu(`destination directory is not empty, aborting. Use options.force to override`,{code:`DEST_NOT_EMPTY`});else this._verbose({code:`DEST_IS_EMPTY`,message:`destination directory is empty`})}catch(e){if(e.code!==`ENOENT`)throw e}}_info(e){this.emit(`info`,e)}_warn(e){this.emit(`warn`,e)}_verbose(e){this.verbose&&this._info(e)}async _getHash(e,t){try{let t=await Yu(e);return e.ref===`HEAD`?t.find(e=>e.type===`HEAD`).hash:this._selectRef(t,e.ref)}catch(n){return this._warn(n),this._verbose(n.original),this._getHashFromCache(e,t)}}_getHashFromCache(e,t){if(e.ref in t){let n=t[e.ref];return this._info({code:`USING_CACHE`,message:`using cached commit hash ${n}`}),n}}_selectRef(e,t){for(let n of e)if(n.name===t)return this._verbose({code:`FOUND_MATCH`,message:`found matching commit hash: ${n.hash}`}),n.hash;if(t.length<8)return null;for(let n of e)if(n.hash.startsWith(t))return n.hash}async _cloneWithTar(e,t){let{repo:n}=this,r=Iu(S.default.join(e,`map.json`))||{},i=this.cache?this._getHashFromCache(n,r):await this._getHash(n,r),a=n.subdir?`${n.name}-${i}${n.subdir}`:null;if(!i)throw new Fu(`could not find commit hash for ${n.ref}`,{code:`MISSING_REF`,ref:n.ref});let o=`${e}/${i}.tar.gz`,s=n.site===`gitlab`?`${n.url}/repository/archive.tar.gz?ref=${i}`:n.site===`bitbucket`?`${n.url}/get/${i}.tar.gz`:`${n.url}/archive/${i}.tar.gz`;try{if(!this.cache)try{x.default.statSync(o),this._verbose({code:`FILE_EXISTS`,message:`${o} already exists locally`})}catch{Ru(S.default.dirname(o)),this.proxy&&this._verbose({code:`PROXY`,message:`using proxy ${this.proxy}`}),this._verbose({code:`DOWNLOADING`,message:`downloading ${s} to ${o}`}),await zu(s,o,this.proxy)}}catch(e){throw new Fu(`could not download ${s}`,{code:`COULD_NOT_DOWNLOAD`,url:s,original:e})}Xu(e,n,i,r),this._verbose({code:`EXTRACTING`,message:`extracting ${a?n.subdir+` from `:``}${o} to ${t}`}),Ru(t),await Ju(o,t,a)}async _cloneWithGit(e,t){await Lu(`git clone ${this.repo.ssh} ${t}`),await Lu(`rm -rf ${S.default.resolve(t,`.git`)}`)}};let Ku=new Set([`github`,`gitlab`,`bitbucket`,`git.sr.ht`]);function qu(e){let t=/^(?:(?:https:\/\/)?([^:/]+\.[^:/]+)\/|git@([^:/]+)[:/]|([^/]+):)?([^/\s]+)\/([^/\s#]+)(?:((?:\/[^/\s#]+)+))?(?:\/)?(?:#(.+))?/.exec(e);if(!t)throw new Fu(`could not parse ${e}`,{code:`BAD_SRC`});let n=(t[1]||t[2]||t[3]||`github`).replace(/\.(com|org)$/,``);if(!Ku.has(n))throw new Fu(`degit supports GitHub, GitLab, Sourcehut and BitBucket`,{code:`UNSUPPORTED_HOST`});let r=t[4],i=t[5].replace(/\.git$/,``),a=t[6],o=t[7]||`HEAD`,s=`${n}.${n===`bitbucket`?`org`:n===`git.sr.ht`?``:`com`}`;return{site:n,user:r,name:i,ref:o,url:`https://${s}/${r}/${i}`,ssh:`git@${s}:${r}/${i}`,subdir:a,mode:Ku.has(n)?`tar`:`git`}}async function Ju(e,t,n=null){return za.extract({file:e,strip:n?n.split(`/`).length:1,C:t},n?[n]:[])}async function Yu(e){try{let{stdout:t}=await Lu(`git ls-remote ${e.url}`);return t.split(`
|
|
24
|
+
`).filter(Boolean).map(e=>{let[t,n]=e.split(` `);if(n===`HEAD`)return{type:`HEAD`,hash:t};let r=/refs\/(\w+)\/(.+)/.exec(n);if(!r)throw new Fu(`could not parse ${n}`,{code:`BAD_REF`});return{type:r[1]===`heads`?`branch`:r[1]===`refs`?`ref`:r[1],name:r[2],hash:t}})}catch(t){throw new Fu(`could not fetch remote ${e.url}`,{code:`COULD_NOT_FETCH`,url:e.url,original:t})}}function Xu(e,t,n,r){let i=Iu(S.default.join(e,`access.json`))||{};if(i[t.ref]=new Date().toISOString(),x.default.writeFileSync(S.default.join(e,`access.json`),JSON.stringify(i,null,` `)),r[t.ref]===n)return;let a=r[t.ref];if(a){let t=!1;for(let e in r)if(r[e]===n){t=!0;break}if(!t)try{x.default.unlinkSync(S.default.join(e,`${a}.tar.gz`))}catch{}}r[t.ref]=n,x.default.writeFileSync(S.default.join(e,`map.json`),JSON.stringify(r,null,` `))}t.base=Hu,t.createCommonjsModule=D,t.degit=Wu,t.source=Lo,t.tryRequire=Iu})),r=t(((t,r)=>{e(`fs`),e(`path`);var i=n();e(`events`),e(`stream`),e(`string_decoder`),e(`assert`),e(`buffer`),e(`zlib`),e(`util`),e(`crypto`),e(`os`),e(`tty`),e(`constants`),e(`https`),e(`child_process`),e(`url`),e(`net`),e(`tls`),r.exports=i.degit}));export default r();export{};
|