tsx 3.8.2 → 3.10.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 +61 -8
- package/dist/cli.cjs +2 -2
- package/dist/cli.js +2 -2
- package/dist/loader.cjs +1 -1
- package/dist/loader.js +1 -1
- package/dist/package-767bbb00.js +1 -0
- package/dist/package-ef86230d.cjs +1 -0
- package/dist/{pkgroll_create-require-d0a57807.js → pkgroll_create-require-2c535d5a.js} +0 -0
- package/dist/{pkgroll_create-require-97fca603.cjs → pkgroll_create-require-881b5fc6.cjs} +0 -0
- package/dist/{pkgroll_create-require-e2fcb1bf.cjs → pkgroll_create-require-9e8c451f.cjs} +0 -0
- package/dist/{pkgroll_create-require-f7a02dc7.js → pkgroll_create-require-cf330718.js} +0 -0
- package/dist/repl.cjs +1 -1
- package/dist/repl.js +1 -1
- package/package.json +39 -71
- package/dist/package-1a10c063.js +0 -1
- package/dist/package-921e5bef.cjs +0 -1
package/README.md
CHANGED
|
@@ -97,6 +97,13 @@ tsx watch ./file.ts
|
|
|
97
97
|
All imported files are watched except from the following directories:
|
|
98
98
|
`node_modules`, `bower_components`, `vendor`, `dist`, and `.*` (hidden directories).
|
|
99
99
|
|
|
100
|
+
#### Ignore files from watch
|
|
101
|
+
|
|
102
|
+
To exclude files from being watched, pass in a path or glob to the `--ignore` flag:
|
|
103
|
+
```sh
|
|
104
|
+
tsx watch --ignore ./ignore-me.js --ignore ./ignore-me-too.js ./file.ts
|
|
105
|
+
```
|
|
106
|
+
|
|
100
107
|
#### Tips
|
|
101
108
|
- Press <kbd>Return</kbd> to manually rerun
|
|
102
109
|
- Pass in `--clear-screen=false` to disable clearing the screen on rerun
|
|
@@ -121,9 +128,9 @@ tsx --no-cache ./file.ts
|
|
|
121
128
|
|
|
122
129
|
`tsx` is a standalone binary designed to be used in place of `node`, but sometimes you'll want to use `node` directly. For example, when adding TypeScript & ESM support to npm-installed binaries.
|
|
123
130
|
|
|
124
|
-
To use `tsx`
|
|
131
|
+
To use `tsx` as a Node.js loader, simply pass it in to the [`--loader`](https://nodejs.org/api/esm.html#loaders) flag.
|
|
125
132
|
|
|
126
|
-
> Note:
|
|
133
|
+
> Note: The loader is limited to adding support for loading TypeScript/ESM files. CLI features such as _watch mode_ or suppressing "experimental feature" warnings will not be available.
|
|
127
134
|
|
|
128
135
|
```sh
|
|
129
136
|
# As a CLI flag
|
|
@@ -135,7 +142,32 @@ NODE_OPTIONS='--loader tsx' node ./file.ts
|
|
|
135
142
|
|
|
136
143
|
> Tip: In rare circumstances, you might be limited to using the [`-r, --require`](https://nodejs.org/api/cli.html#-r---require-module) flag.
|
|
137
144
|
>
|
|
138
|
-
> You can use [`@esbuild-kit/cjs-loader`](https://github.com/esbuild-kit/cjs-loader), but transformations will only be applied to `require()
|
|
145
|
+
> You can use [`@esbuild-kit/cjs-loader`](https://github.com/esbuild-kit/cjs-loader), but transformations will only be applied to `require()` (not `import`).
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
### Hashbang
|
|
149
|
+
|
|
150
|
+
If you prefer to write scripts that doesn't need to be passed into tsx, you can declare it in the [hashbang](https://bash.cyberciti.biz/guide/Shebang).
|
|
151
|
+
|
|
152
|
+
Simply add `#!/usr/bin/env tsx` at the top of your file:
|
|
153
|
+
|
|
154
|
+
_file.ts_
|
|
155
|
+
```ts
|
|
156
|
+
#!/usr/bin/env tsx
|
|
157
|
+
|
|
158
|
+
console.log('argv:', process.argv.slice(2))
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
And make the file executable:
|
|
162
|
+
```sh
|
|
163
|
+
chmod +x ./file.ts
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Now, you can run the file without passing it into tsx:
|
|
167
|
+
```sh
|
|
168
|
+
$ ./file.ts hello
|
|
169
|
+
argv: [ 'hello' ]
|
|
170
|
+
```
|
|
139
171
|
|
|
140
172
|
## Dependencies
|
|
141
173
|
|
|
@@ -161,16 +193,27 @@ It's recommended to run TypeScript separately as a command (`tsc --noEmit`) or v
|
|
|
161
193
|
|
|
162
194
|
### How is `tsx` different from [`ts-node`](https://github.com/TypeStrong/ts-node)?
|
|
163
195
|
|
|
164
|
-
They
|
|
196
|
+
They're both tools to run TypeScript files. But tsx does a lot more to improve the experience of using Node.js.
|
|
197
|
+
|
|
198
|
+
tsx _just works_. It's zero-config and doesn't require `tsconfig.json` to get started, making it easy for users that just want to run TypeScript code and not get caught up in the configuration.
|
|
199
|
+
|
|
200
|
+
It's a single binary with no peer-dependencies (e.g. TypeScript or esbuild), so there is no setup necessary, enabling usage that is elegant and frictionless for first-time users:
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
npx tsx ./script.ts
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
tsx is zero-config because it has smart detections built in. As a runtime, it detects what's imported to make many options in `tsconfig.json` redundant—which was designed for compiling matching files regardless of whether they're imported.
|
|
165
207
|
|
|
166
|
-
|
|
208
|
+
It seamlessly adapts between CommonJS and ESM package types by detecting how modules are loaded (`require()` or `import`) to determine how to compile them. It even adds support for `require()`ing ESM modules from CommonJS so you don't have to worry about your dependencies as the ecosystem migrates to ESM.
|
|
167
209
|
|
|
168
|
-
|
|
210
|
+
[Newer and unsupported syntax](https://esbuild.github.io/content-types/) & features like [importing `node:` prefixes](https://2ality.com/2021/12/node-protocol-imports.html) are downgraded by detecting the Node.js version. For large TypeScript codebases, it has [`tsconfig.json paths`](https://www.typescriptlang.org/tsconfig#paths) aliasing support out of the box.
|
|
169
211
|
|
|
170
|
-
[
|
|
212
|
+
At the core, tsx is powered by esbuild for [blazing fast TypeScript compilation](https://esbuild.github.io/faq/#:~:text=typescript%20benchmark), whereas `ts-node` (by default) uses the TypeScript compiler. Because esbuild doesn't type check, `tsx` is similar to `ts-node --esm --swc` (which uses the [SWC compiler](https://github.com/TypeStrong/ts-node#swc-1)).
|
|
171
213
|
|
|
172
|
-
|
|
214
|
+
As a bonus, tsx also comes with a watcher to speed up your development.
|
|
173
215
|
|
|
216
|
+
[Here's an exhaustive technical comparison](https://github.com/privatenumber/ts-runtime-comparison) between `tsx`, `ts-node`, and other runtimes.
|
|
174
217
|
|
|
175
218
|
### Can it use esbuild plugins?
|
|
176
219
|
|
|
@@ -179,3 +222,13 @@ No. tsx uses esbuild's [Transform API](https://esbuild.github.io/api/#transform-
|
|
|
179
222
|
### Does it have a configuration file?
|
|
180
223
|
|
|
181
224
|
No. tsx's integration with Node.js is designed to be seamless so there is no configuration.
|
|
225
|
+
|
|
226
|
+
### Does it have any limitations?
|
|
227
|
+
|
|
228
|
+
Transformations are handled by esbuild, so it shares the same limitations such as:
|
|
229
|
+
|
|
230
|
+
- Compatibility with code executed via `eval()` is not preserved
|
|
231
|
+
- Only certain `tsconfig.json` properties are supported
|
|
232
|
+
- [`emitDecoratorMetadata`](https://www.typescriptlang.org/tsconfig#emitDecoratorMetadata) is not supported
|
|
233
|
+
|
|
234
|
+
For details, refer to esbuild's [JavaScript caveats](https://esbuild.github.io/content-types/#javascript-caveats) and [TypeScript caveats](https://esbuild.github.io/content-types/#typescript-caveats) documentation.
|
package/dist/cli.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Ie=require("./pkgroll_create-require-97fca603.cjs"),xr=require("tty"),Or=require("./package-921e5bef.cjs"),Au=require("url"),Nr=require("child_process"),Hr=require("path"),Pr=require("fs"),Lr=require("events"),Ir=require("util"),kr=require("stream"),Mr=require("os");require("module");function se(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var Wr=se(xr),Gr=se(Nr),K=se(Hr),De=se(Pr),jr=se(Lr),Ae=se(Ir),Ur=se(kr),yu=se(Mr);const wu=/-(\w)/g,Ru=t=>t.replace(wu,(e,u)=>u.toUpperCase()),bu=/\B([A-Z])/g,Kr=t=>t.replace(bu,"-$1").toLowerCase(),{stringify:ye}=JSON,{hasOwnProperty:Vr}=Object.prototype,ke=(t,e)=>Vr.call(t,e),zr=/^--?/,Yr=/[.:=]/,qr=t=>{let e=t.replace(zr,""),u;const n=e.match(Yr);if(n!=null&&n.index){const r=n.index;u=e.slice(r+1),e=e.slice(0,r)}return{flagName:e,flagValue:u}},Xr=/[\s.:=]/,Qr=(t,e)=>{const u=`Invalid flag name ${ye(e)}:`;if(e.length===0)throw new Error(`${u} flag name cannot be empty}`);if(e.length===1)throw new Error(`${u} single characters are reserved for aliases`);const n=e.match(Xr);if(n)throw new Error(`${u} flag name cannot contain the character ${ye(n==null?void 0:n[0])}`);let r;if(wu.test(e)?r=Ru(e):bu.test(e)&&(r=Kr(e)),r&&ke(t,r))throw new Error(`${u} collides with flag ${ye(r)}`)};function Zr(t){const e=new Map;for(const u in t){if(!ke(t,u))continue;Qr(t,u);const n=t[u];if(n&&typeof n=="object"){const{alias:r}=n;if(typeof r=="string"){if(r.length===0)throw new Error(`Invalid flag alias ${ye(u)}: flag alias cannot be empty`);if(r.length>1)throw new Error(`Invalid flag alias ${ye(u)}: flag aliases can only be a single-character`);if(e.has(r))throw new Error(`Flag collision: Alias "${r}" is already used`);e.set(r,{name:u,schema:n})}}}return e}const Jr=t=>!t||typeof t=="function"?!1:Array.isArray(t)||Array.isArray(t.type),es=t=>{const e={};for(const u in t)ke(t,u)&&(e[u]=Jr(t[u])?[]:void 0);return e},at=(t,e)=>t===Number&&e===""?Number.NaN:t===Boolean?e!=="false":e,ts=(t,e)=>{for(const u in t){if(!ke(t,u))continue;const n=t[u];if(!n)continue;const r=e[u];if(!(r!==void 0&&!(Array.isArray(r)&&r.length===0))&&"default"in n){let s=n.default;typeof s=="function"&&(s=s()),e[u]=s}}},vu=(t,e)=>{if(!e)throw new Error(`Missing type on flag "${t}"`);return typeof e=="function"?e:Array.isArray(e)?e[0]:vu(t,e.type)},us=/^-[\da-z]+/i,ns=/^--[\w-]{2,}/,lt="--";function ct(t,e=process.argv.slice(2),u={}){const n=Zr(t),r={flags:es(t),unknownFlags:{},_:Object.assign([],{[lt]:[]})};let s;const i=(o,a,c)=>{const f=vu(o,a);c=at(f,c),c!==void 0&&!Number.isNaN(c)?Array.isArray(r.flags[o])?r.flags[o].push(f(c)):r.flags[o]=f(c):s=l=>{Array.isArray(r.flags[o])?r.flags[o].push(f(at(f,l||""))):r.flags[o]=f(at(f,l||"")),s=void 0}},D=(o,a)=>{o in r.unknownFlags||(r.unknownFlags[o]=[]),a!==void 0?r.unknownFlags[o].push(a):s=(c=!0)=>{r.unknownFlags[o].push(c),s=void 0}};for(let o=0;o<e.length;o+=1){const a=e[o];if(a===lt){const f=e.slice(o+1);r._[lt]=f,r._.push(...f);break}const c=us.test(a);if(ns.test(a)||c){s&&s();const f=qr(a),{flagValue:l}=f;let{flagName:p}=f;if(c){for(let F=0;F<p.length;F+=1){const y=p[F],b=n.get(y),N=F===p.length-1;b?i(b.name,b.schema,N?l:!0):u!=null&&u.ignoreUnknown?r._.push(a):D(y,N?l:!0)}continue}let C=t[p];if(!C){const F=Ru(p);C=t[F],C&&(p=F)}if(!C){u!=null&&u.ignoreUnknown?r._.push(a):D(p,l);continue}i(p,C,l)}else s?s(a):r._.push(a)}return s&&s(),ts(t,r.flags),r}var rs=Object.create,Me=Object.defineProperty,ss=Object.defineProperties,is=Object.getOwnPropertyDescriptor,Ds=Object.getOwnPropertyDescriptors,os=Object.getOwnPropertyNames,Bu=Object.getOwnPropertySymbols,as=Object.getPrototypeOf,$u=Object.prototype.hasOwnProperty,ls=Object.prototype.propertyIsEnumerable,Su=(t,e,u)=>e in t?Me(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,We=(t,e)=>{for(var u in e||(e={}))$u.call(e,u)&&Su(t,u,e[u]);if(Bu)for(var u of Bu(e))ls.call(e,u)&&Su(t,u,e[u]);return t},ft=(t,e)=>ss(t,Ds(e)),cs=t=>Me(t,"__esModule",{value:!0}),fs=(t,e)=>()=>(t&&(e=t(t=0)),e),hs=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ds=(t,e,u,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of os(e))!$u.call(t,r)&&(u||r!=="default")&&Me(t,r,{get:()=>e[r],enumerable:!(n=is(e,r))||n.enumerable});return t},Es=(t,e)=>ds(cs(Me(t!=null?rs(as(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),U=fs(()=>{}),ps=hs((t,e)=>{U(),e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});U(),U(),U();var Cs=t=>{var e,u,n;let r=(e=process.stdout.columns)!=null?e:Number.POSITIVE_INFINITY;return typeof t=="function"&&(t=t(r)),t||(t={}),Array.isArray(t)?{columns:t,stdoutColumns:r}:{columns:(u=t.columns)!=null?u:[],stdoutColumns:(n=t.stdoutColumns)!=null?n:r}};U(),U(),U(),U(),U();function Fs({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}function Tu(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(Fs(),"")}U();function gs(t){return Number.isInteger(t)?t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141):!1}var _s=Es(ps(),1);function oe(t){if(typeof t!="string"||t.length===0||(t=Tu(t),t.length===0))return 0;t=t.replace((0,_s.default)()," ");let e=0;for(let u=0;u<t.length;u++){let n=t.codePointAt(u);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&u++,e+=gs(n)?2:1)}return e}var xu=t=>Math.max(...t.split(`
|
|
1
|
+
"use strict";var Ie=require("./pkgroll_create-require-9e8c451f.cjs"),xr=require("tty"),Or=require("./package-ef86230d.cjs"),Au=require("url"),Nr=require("child_process"),Hr=require("path"),Pr=require("fs"),Lr=require("events"),Ir=require("util"),kr=require("stream"),Mr=require("os");require("module");function se(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var Wr=se(xr),Gr=se(Nr),K=se(Hr),De=se(Pr),jr=se(Lr),Ae=se(Ir),Ur=se(kr),yu=se(Mr);const wu=/-(\w)/g,Ru=t=>t.replace(wu,(e,u)=>u.toUpperCase()),bu=/\B([A-Z])/g,Kr=t=>t.replace(bu,"-$1").toLowerCase(),{stringify:ye}=JSON,{hasOwnProperty:Vr}=Object.prototype,ke=(t,e)=>Vr.call(t,e),zr=/^--?/,Yr=/[.:=]/,qr=t=>{let e=t.replace(zr,""),u;const n=e.match(Yr);if(n!=null&&n.index){const r=n.index;u=e.slice(r+1),e=e.slice(0,r)}return{flagName:e,flagValue:u}},Xr=/[\s.:=]/,Qr=(t,e)=>{const u=`Invalid flag name ${ye(e)}:`;if(e.length===0)throw new Error(`${u} flag name cannot be empty}`);if(e.length===1)throw new Error(`${u} single characters are reserved for aliases`);const n=e.match(Xr);if(n)throw new Error(`${u} flag name cannot contain the character ${ye(n==null?void 0:n[0])}`);let r;if(wu.test(e)?r=Ru(e):bu.test(e)&&(r=Kr(e)),r&&ke(t,r))throw new Error(`${u} collides with flag ${ye(r)}`)};function Zr(t){const e=new Map;for(const u in t){if(!ke(t,u))continue;Qr(t,u);const n=t[u];if(n&&typeof n=="object"){const{alias:r}=n;if(typeof r=="string"){if(r.length===0)throw new Error(`Invalid flag alias ${ye(u)}: flag alias cannot be empty`);if(r.length>1)throw new Error(`Invalid flag alias ${ye(u)}: flag aliases can only be a single-character`);if(e.has(r))throw new Error(`Flag collision: Alias "${r}" is already used`);e.set(r,{name:u,schema:n})}}}return e}const Jr=t=>!t||typeof t=="function"?!1:Array.isArray(t)||Array.isArray(t.type),es=t=>{const e={};for(const u in t)ke(t,u)&&(e[u]=Jr(t[u])?[]:void 0);return e},at=(t,e)=>t===Number&&e===""?Number.NaN:t===Boolean?e!=="false":e,ts=(t,e)=>{for(const u in t){if(!ke(t,u))continue;const n=t[u];if(!n)continue;const r=e[u];if(!(r!==void 0&&!(Array.isArray(r)&&r.length===0))&&"default"in n){let s=n.default;typeof s=="function"&&(s=s()),e[u]=s}}},vu=(t,e)=>{if(!e)throw new Error(`Missing type on flag "${t}"`);return typeof e=="function"?e:Array.isArray(e)?e[0]:vu(t,e.type)},us=/^-[\da-z]+/i,ns=/^--[\w-]{2,}/,lt="--";function ct(t,e=process.argv.slice(2),u={}){const n=Zr(t),r={flags:es(t),unknownFlags:{},_:Object.assign([],{[lt]:[]})};let s;const i=(o,a,c)=>{const f=vu(o,a);c=at(f,c),c!==void 0&&!Number.isNaN(c)?Array.isArray(r.flags[o])?r.flags[o].push(f(c)):r.flags[o]=f(c):s=l=>{Array.isArray(r.flags[o])?r.flags[o].push(f(at(f,l||""))):r.flags[o]=f(at(f,l||"")),s=void 0}},D=(o,a)=>{o in r.unknownFlags||(r.unknownFlags[o]=[]),a!==void 0?r.unknownFlags[o].push(a):s=(c=!0)=>{r.unknownFlags[o].push(c),s=void 0}};for(let o=0;o<e.length;o+=1){const a=e[o];if(a===lt){const f=e.slice(o+1);r._[lt]=f,r._.push(...f);break}const c=us.test(a);if(ns.test(a)||c){s&&s();const f=qr(a),{flagValue:l}=f;let{flagName:p}=f;if(c){for(let F=0;F<p.length;F+=1){const y=p[F],b=n.get(y),N=F===p.length-1;b?i(b.name,b.schema,N?l:!0):u!=null&&u.ignoreUnknown?r._.push(a):D(y,N?l:!0)}continue}let C=t[p];if(!C){const F=Ru(p);C=t[F],C&&(p=F)}if(!C){u!=null&&u.ignoreUnknown?r._.push(a):D(p,l);continue}i(p,C,l)}else s?s(a):r._.push(a)}return s&&s(),ts(t,r.flags),r}var rs=Object.create,Me=Object.defineProperty,ss=Object.defineProperties,is=Object.getOwnPropertyDescriptor,Ds=Object.getOwnPropertyDescriptors,os=Object.getOwnPropertyNames,Bu=Object.getOwnPropertySymbols,as=Object.getPrototypeOf,$u=Object.prototype.hasOwnProperty,ls=Object.prototype.propertyIsEnumerable,Su=(t,e,u)=>e in t?Me(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,We=(t,e)=>{for(var u in e||(e={}))$u.call(e,u)&&Su(t,u,e[u]);if(Bu)for(var u of Bu(e))ls.call(e,u)&&Su(t,u,e[u]);return t},ft=(t,e)=>ss(t,Ds(e)),cs=t=>Me(t,"__esModule",{value:!0}),fs=(t,e)=>()=>(t&&(e=t(t=0)),e),hs=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ds=(t,e,u,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of os(e))!$u.call(t,r)&&(u||r!=="default")&&Me(t,r,{get:()=>e[r],enumerable:!(n=is(e,r))||n.enumerable});return t},Es=(t,e)=>ds(cs(Me(t!=null?rs(as(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),U=fs(()=>{}),ps=hs((t,e)=>{U(),e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});U(),U(),U();var Cs=t=>{var e,u,n;let r=(e=process.stdout.columns)!=null?e:Number.POSITIVE_INFINITY;return typeof t=="function"&&(t=t(r)),t||(t={}),Array.isArray(t)?{columns:t,stdoutColumns:r}:{columns:(u=t.columns)!=null?u:[],stdoutColumns:(n=t.stdoutColumns)!=null?n:r}};U(),U(),U(),U(),U();function Fs({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}function Tu(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(Fs(),"")}U();function gs(t){return Number.isInteger(t)?t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141):!1}var _s=Es(ps(),1);function oe(t){if(typeof t!="string"||t.length===0||(t=Tu(t),t.length===0))return 0;t=t.replace((0,_s.default)()," ");let e=0;for(let u=0;u<t.length;u++){let n=t.codePointAt(u);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&u++,e+=gs(n)?2:1)}return e}var xu=t=>Math.max(...t.split(`
|
|
2
2
|
`).map(oe)),ms=t=>{let e=[];for(let u of t){let{length:n}=u,r=n-e.length;for(let s=0;s<r;s+=1)e.push(0);for(let s=0;s<n;s+=1){let i=xu(u[s]);i>e[s]&&(e[s]=i)}}return e};U();var Ou=/^\d+%$/,Nu={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},As=(t,e)=>{var u;let n=[];for(let r=0;r<t.length;r+=1){let s=(u=e[r])!=null?u:"auto";if(typeof s=="number"||s==="auto"||s==="content-width"||typeof s=="string"&&Ou.test(s)){n.push(ft(We({},Nu),{width:s,contentWidth:t[r]}));continue}if(s&&typeof s=="object"){let i=ft(We(We({},Nu),s),{contentWidth:t[r]});i.horizontalPadding=i.paddingLeft+i.paddingRight,n.push(i);continue}throw new Error(`Invalid column width: ${JSON.stringify(s)}`)}return n};function ys(t,e){for(let u of t){let{width:n}=u;if(n==="content-width"&&(u.width=u.contentWidth),n==="auto"){let o=Math.min(20,u.contentWidth);u.width=o,u.autoOverflow=u.contentWidth-o}if(typeof n=="string"&&Ou.test(n)){let o=Number.parseFloat(n.slice(0,-1))/100;u.width=Math.floor(e*o)-(u.paddingLeft+u.paddingRight)}let{horizontalPadding:r}=u,s=1,i=s+r;if(i>=e){let o=i-e,a=Math.ceil(u.paddingLeft/r*o),c=o-a;u.paddingLeft-=a,u.paddingRight-=c,u.horizontalPadding=u.paddingLeft+u.paddingRight}u.paddingLeftString=u.paddingLeft?" ".repeat(u.paddingLeft):"",u.paddingRightString=u.paddingRight?" ".repeat(u.paddingRight):"";let D=e-u.horizontalPadding;u.width=Math.max(Math.min(u.width,D),s)}}var Hu=()=>Object.assign([],{columns:0});function ws(t,e){let u=[Hu()],[n]=u;for(let r of t){let s=r.width+r.horizontalPadding;n.columns+s>e&&(n=Hu(),u.push(n)),n.push(r),n.columns+=s}for(let r of u){let s=r.reduce((l,p)=>l+p.width+p.horizontalPadding,0),i=e-s;if(i===0)continue;let D=r.filter(l=>"autoOverflow"in l),o=D.filter(l=>l.autoOverflow>0),a=o.reduce((l,p)=>l+p.autoOverflow,0),c=Math.min(a,i);for(let l of o){let p=Math.floor(l.autoOverflow/a*c);l.width+=p,i-=p}let f=Math.floor(i/D.length);for(let l=0;l<D.length;l+=1){let p=D[l];l===D.length-1?p.width+=i:p.width+=f,i-=f}}return u}function Rs(t,e,u){let n=As(u,e);return ys(n,t),ws(n,t)}U(),U(),U();var ht=10,Pu=(t=0)=>e=>`\x1B[${e+t}m`,Lu=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Iu=(t=0)=>(e,u,n)=>`\x1B[${38+t};2;${e};${u};${n}m`;function bs(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],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]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[u,n]of Object.entries(e)){for(let[r,s]of Object.entries(n))e[r]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},n[r]=e[r],t.set(s[0],s[1]);Object.defineProperty(e,u,{value:n,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=Pu(),e.color.ansi256=Lu(),e.color.ansi16m=Iu(),e.bgColor.ansi=Pu(ht),e.bgColor.ansi256=Lu(ht),e.bgColor.ansi16m=Iu(ht),Object.defineProperties(e,{rgbToAnsi256:{value:(u,n,r)=>u===n&&n===r?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:u=>{let n=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(u.toString(16));if(!n)return[0,0,0];let{colorString:r}=n.groups;r.length===3&&(r=r.split("").map(i=>i+i).join(""));let s=Number.parseInt(r,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:u=>e.rgbToAnsi256(...e.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let n,r,s;if(u>=232)n=((u-232)*10+8)/255,r=n,s=n;else{u-=16;let o=u%36;n=Math.floor(u/36)/5,r=Math.floor(o/6)/5,s=o%6/5}let i=Math.max(n,r,s)*2;if(i===0)return 30;let D=30+(Math.round(s)<<2|Math.round(r)<<1|Math.round(n));return i===2&&(D+=60),D},enumerable:!1},rgbToAnsi:{value:(u,n,r)=>e.ansi256ToAnsi(e.rgbToAnsi256(u,n,r)),enumerable:!1},hexToAnsi:{value:u=>e.ansi256ToAnsi(e.hexToAnsi256(u)),enumerable:!1}}),e}var vs=bs(),Bs=vs,Ge=new Set(["\x1B","\x9B"]),$s=39,dt="\x07",ku="[",Ss="]",Mu="m",Et=`${Ss}8;;`,Wu=t=>`${Ge.values().next().value}${ku}${t}${Mu}`,Gu=t=>`${Ge.values().next().value}${Et}${t}${dt}`,Ts=t=>t.split(" ").map(e=>oe(e)),pt=(t,e,u)=>{let n=[...e],r=!1,s=!1,i=oe(Tu(t[t.length-1]));for(let[D,o]of n.entries()){let a=oe(o);if(i+a<=u?t[t.length-1]+=o:(t.push(o),i=0),Ge.has(o)&&(r=!0,s=n.slice(D+1).join("").startsWith(Et)),r){s?o===dt&&(r=!1,s=!1):o===Mu&&(r=!1);continue}i+=a,i===u&&D<n.length-1&&(t.push(""),i=0)}!i&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},xs=t=>{let e=t.split(" "),u=e.length;for(;u>0&&!(oe(e[u-1])>0);)u--;return u===e.length?t:e.slice(0,u).join(" ")+e.slice(u).join("")},Os=(t,e,u={})=>{if(u.trim!==!1&&t.trim()==="")return"";let n="",r,s,i=Ts(t),D=[""];for(let[a,c]of t.split(" ").entries()){u.trim!==!1&&(D[D.length-1]=D[D.length-1].trimStart());let f=oe(D[D.length-1]);if(a!==0&&(f>=e&&(u.wordWrap===!1||u.trim===!1)&&(D.push(""),f=0),(f>0||u.trim===!1)&&(D[D.length-1]+=" ",f++)),u.hard&&i[a]>e){let l=e-f,p=1+Math.floor((i[a]-l-1)/e);Math.floor((i[a]-1)/e)<p&&D.push(""),pt(D,c,e);continue}if(f+i[a]>e&&f>0&&i[a]>0){if(u.wordWrap===!1&&f<e){pt(D,c,e);continue}D.push("")}if(f+i[a]>e&&u.wordWrap===!1){pt(D,c,e);continue}D[D.length-1]+=c}u.trim!==!1&&(D=D.map(a=>xs(a)));let o=[...D.join(`
|
|
3
3
|
`)];for(let[a,c]of o.entries()){if(n+=c,Ge.has(c)){let{groups:l}=new RegExp(`(?:\\${ku}(?<code>\\d+)m|\\${Et}(?<uri>.*)${dt})`).exec(o.slice(a).join(""))||{groups:{}};if(l.code!==void 0){let p=Number.parseFloat(l.code);r=p===$s?void 0:p}else l.uri!==void 0&&(s=l.uri.length===0?void 0:l.uri)}let f=Bs.codes.get(Number(r));o[a+1]===`
|
|
4
4
|
`?(s&&(n+=Gu("")),r&&f&&(n+=Wu(f))):c===`
|
|
@@ -49,4 +49,4 @@
|
|
|
49
49
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
50
50
|
* Licensed under the MIT License.
|
|
51
51
|
*/const to=Ae.default,jn=eo,Un=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),uo=t=>e=>t===!0?Number(e):String(e),Xt=t=>typeof t=="number"||typeof t=="string"&&t!=="",ve=t=>Number.isInteger(+t),Qt=t=>{let e=`${t}`,u=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++u]==="0";);return u>0},no=(t,e,u)=>typeof t=="string"||typeof e=="string"?!0:u.stringify===!0,ro=(t,e,u)=>{if(e>0){let n=t[0]==="-"?"-":"";n&&(t=t.slice(1)),t=n+t.padStart(n?e-1:e,"0")}return u===!1?String(t):t},Kn=(t,e)=>{let u=t[0]==="-"?"-":"";for(u&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return u?"-"+t:t},so=(t,e)=>{t.negatives.sort((i,D)=>i<D?-1:i>D?1:0),t.positives.sort((i,D)=>i<D?-1:i>D?1:0);let u=e.capture?"":"?:",n="",r="",s;return t.positives.length&&(n=t.positives.join("|")),t.negatives.length&&(r=`-(${u}${t.negatives.join("|")})`),n&&r?s=`${n}|${r}`:s=n||r,e.wrap?`(${u}${s})`:s},Vn=(t,e,u,n)=>{if(u)return jn(t,e,{wrap:!1,...n});let r=String.fromCharCode(t);if(t===e)return r;let s=String.fromCharCode(e);return`[${r}-${s}]`},zn=(t,e,u)=>{if(Array.isArray(t)){let n=u.wrap===!0,r=u.capture?"":"?:";return n?`(${r}${t.join("|")})`:t.join("|")}return jn(t,e,u)},Yn=(...t)=>new RangeError("Invalid range arguments: "+to.inspect(...t)),qn=(t,e,u)=>{if(u.strictRanges===!0)throw Yn([t,e]);return[]},io=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},Do=(t,e,u=1,n={})=>{let r=Number(t),s=Number(e);if(!Number.isInteger(r)||!Number.isInteger(s)){if(n.strictRanges===!0)throw Yn([t,e]);return[]}r===0&&(r=0),s===0&&(s=0);let i=r>s,D=String(t),o=String(e),a=String(u);u=Math.max(Math.abs(u),1);let c=Qt(D)||Qt(o)||Qt(a),f=c?Math.max(D.length,o.length,a.length):0,l=c===!1&&no(t,e,n)===!1,p=n.transform||uo(l);if(n.toRegex&&u===1)return Vn(Kn(t,f),Kn(e,f),!0,n);let C={negatives:[],positives:[]},F=N=>C[N<0?"negatives":"positives"].push(Math.abs(N)),y=[],b=0;for(;i?r>=s:r<=s;)n.toRegex===!0&&u>1?F(r):y.push(ro(p(r,b),f,l)),r=i?r-u:r+u,b++;return n.toRegex===!0?u>1?so(C,n):zn(y,null,{wrap:!1,...n}):y},oo=(t,e,u=1,n={})=>{if(!ve(t)&&t.length>1||!ve(e)&&e.length>1)return qn(t,e,n);let r=n.transform||(l=>String.fromCharCode(l)),s=`${t}`.charCodeAt(0),i=`${e}`.charCodeAt(0),D=s>i,o=Math.min(s,i),a=Math.max(s,i);if(n.toRegex&&u===1)return Vn(o,a,!1,n);let c=[],f=0;for(;D?s>=i:s<=i;)c.push(r(s,f)),s=D?s-u:s+u,f++;return n.toRegex===!0?zn(c,null,{wrap:!1,options:n}):c},Je=(t,e,u,n={})=>{if(e==null&&Xt(t))return[t];if(!Xt(t)||!Xt(e))return qn(t,e,n);if(typeof u=="function")return Je(t,e,1,{transform:u});if(Un(u))return Je(t,e,0,u);let r={...n};return r.capture===!0&&(r.wrap=!0),u=u||r.step||1,ve(u)?ve(t)&&ve(e)?Do(t,e,u,r):oo(t,e,Math.max(Math.abs(u),1),r):u!=null&&!Un(u)?io(u,r):Je(t,e,1,u)};var Xn=Je;const ao=Xn,Qn=Ze,lo=(t,e={})=>{let u=(n,r={})=>{let s=Qn.isInvalidBrace(r),i=n.invalid===!0&&e.escapeInvalid===!0,D=s===!0||i===!0,o=e.escapeInvalid===!0?"\\":"",a="";if(n.isOpen===!0||n.isClose===!0)return o+n.value;if(n.type==="open")return D?o+n.value:"(";if(n.type==="close")return D?o+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":D?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let c=Qn.reduce(n.nodes),f=ao(...c,{...e,wrap:!1,toRegex:!0});if(f.length!==0)return c.length>1&&f.length>1?`(${f})`:f}if(n.nodes)for(let c of n.nodes)a+=u(c,n);return a};return u(t)};var co=lo;const fo=Xn,Zn=Yt,Fe=Ze,le=(t="",e="",u=!1)=>{let n=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return u?Fe.flatten(e).map(r=>`{${r}}`):e;for(let r of t)if(Array.isArray(r))for(let s of r)n.push(le(s,e,u));else for(let s of e)u===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?le(r,s,u):r+s);return Fe.flatten(n)},ho=(t,e={})=>{let u=e.rangeLimit===void 0?1e3:e.rangeLimit,n=(r,s={})=>{r.queue=[];let i=s,D=s.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,D=i.queue;if(r.invalid||r.dollar){D.push(le(D.pop(),Zn(r,e)));return}if(r.type==="brace"&&r.invalid!==!0&&r.nodes.length===2){D.push(le(D.pop(),["{}"]));return}if(r.nodes&&r.ranges>0){let f=Fe.reduce(r.nodes);if(Fe.exceedsLimit(...f,e.step,u))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let l=fo(...f,e);l.length===0&&(l=Zn(r,e)),D.push(le(D.pop(),l)),r.nodes=[];return}let o=Fe.encloseBrace(r),a=r.queue,c=r;for(;c.type!=="brace"&&c.type!=="root"&&c.parent;)c=c.parent,a=c.queue;for(let f=0;f<r.nodes.length;f++){let l=r.nodes[f];if(l.type==="comma"&&r.type==="brace"){f===1&&a.push(""),a.push("");continue}if(l.type==="close"){D.push(le(D.pop(),a,o));continue}if(l.value&&l.type!=="open"){a.push(le(a.pop(),l.value));continue}l.nodes&&n(l,r)}return a};return Fe.flatten(n(t))};var Eo=ho,po={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
52
|
-
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};const Co=Yt,{MAX_LENGTH:Jn,CHAR_BACKSLASH:Zt,CHAR_BACKTICK:Fo,CHAR_COMMA:go,CHAR_DOT:_o,CHAR_LEFT_PARENTHESES:mo,CHAR_RIGHT_PARENTHESES:Ao,CHAR_LEFT_CURLY_BRACE:yo,CHAR_RIGHT_CURLY_BRACE:wo,CHAR_LEFT_SQUARE_BRACKET:er,CHAR_RIGHT_SQUARE_BRACKET:tr,CHAR_DOUBLE_QUOTE:Ro,CHAR_SINGLE_QUOTE:bo,CHAR_NO_BREAK_SPACE:vo,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Bo}=po,$o=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let u=e||{},n=typeof u.maxLength=="number"?Math.min(Jn,u.maxLength):Jn;if(t.length>n)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${n})`);let r={type:"root",input:t,nodes:[]},s=[r],i=r,D=r,o=0,a=t.length,c=0,f=0,l;const p=()=>t[c++],C=F=>{if(F.type==="text"&&D.type==="dot"&&(D.type="text"),D&&D.type==="text"&&F.type==="text"){D.value+=F.value;return}return i.nodes.push(F),F.parent=i,F.prev=D,D=F,F};for(C({type:"bos"});c<a;)if(i=s[s.length-1],l=p(),!(l===Bo||l===vo)){if(l===Zt){C({type:"text",value:(e.keepEscaping?l:"")+p()});continue}if(l===tr){C({type:"text",value:"\\"+l});continue}if(l===er){o++;let F;for(;c<a&&(F=p());){if(l+=F,F===er){o++;continue}if(F===Zt){l+=p();continue}if(F===tr&&(o--,o===0))break}C({type:"text",value:l});continue}if(l===mo){i=C({type:"paren",nodes:[]}),s.push(i),C({type:"text",value:l});continue}if(l===Ao){if(i.type!=="paren"){C({type:"text",value:l});continue}i=s.pop(),C({type:"text",value:l}),i=s[s.length-1];continue}if(l===Ro||l===bo||l===Fo){let F=l,y;for(e.keepQuotes!==!0&&(l="");c<a&&(y=p());){if(y===Zt){l+=y+p();continue}if(y===F){e.keepQuotes===!0&&(l+=y);break}l+=y}C({type:"text",value:l});continue}if(l===yo){f++;let F=D.value&&D.value.slice(-1)==="$"||i.dollar===!0;i=C({type:"brace",open:!0,close:!1,dollar:F,depth:f,commas:0,ranges:0,nodes:[]}),s.push(i),C({type:"open",value:l});continue}if(l===wo){if(i.type!=="brace"){C({type:"text",value:l});continue}let F="close";i=s.pop(),i.close=!0,C({type:F,value:l}),f--,i=s[s.length-1];continue}if(l===go&&f>0){if(i.ranges>0){i.ranges=0;let F=i.nodes.shift();i.nodes=[F,{type:"text",value:Co(i)}]}C({type:"comma",value:l}),i.commas++;continue}if(l===_o&&f>0&&i.commas===0){let F=i.nodes;if(f===0||F.length===0){C({type:"text",value:l});continue}if(D.type==="dot"){if(i.range=[],D.value+=l,D.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,D.type="text";continue}i.ranges++,i.args=[];continue}if(D.type==="range"){F.pop();let y=F[F.length-1];y.value+=D.value+l,D=y,i.ranges--;continue}C({type:"dot",value:l});continue}C({type:"text",value:l})}do if(i=s.pop(),i.type!=="root"){i.nodes.forEach(b=>{b.nodes||(b.type==="open"&&(b.isOpen=!0),b.type==="close"&&(b.isClose=!0),b.nodes||(b.type="text"),b.invalid=!0)});let F=s[s.length-1],y=F.nodes.indexOf(i);F.nodes.splice(y,1,...i.nodes)}while(s.length>0);return C({type:"eos"}),r};var So=$o;const ur=Yt,To=co,xo=Eo,Oo=So,Y=(t,e={})=>{let u=[];if(Array.isArray(t))for(let n of t){let r=Y.create(n,e);Array.isArray(r)?u.push(...r):u.push(r)}else u=[].concat(Y.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(u=[...new Set(u)]),u};Y.parse=(t,e={})=>Oo(t,e),Y.stringify=(t,e={})=>ur(typeof t=="string"?Y.parse(t,e):t,e),Y.compile=(t,e={})=>(typeof t=="string"&&(t=Y.parse(t,e)),To(t,e)),Y.expand=(t,e={})=>{typeof t=="string"&&(t=Y.parse(t,e));let u=xo(t,e);return e.noempty===!0&&(u=u.filter(Boolean)),e.nodupes===!0&&(u=[...new Set(u)]),u},Y.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Y.compile(t,e):Y.expand(t,e);var No=Y,nr={exports:{}},Ho=["3dm","3ds","3g2","3gp","7z","a","aac","adp","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"];(function(t){t.exports=Ho})(nr);const Po=K.default,Lo=nr.exports,Io=new Set(Lo);var ko=t=>Io.has(Po.extname(t).slice(1).toLowerCase()),et={};(function(t){const{sep:e}=K.default,{platform:u}=process,n=yu.default;t.EV_ALL="all",t.EV_READY="ready",t.EV_ADD="add",t.EV_CHANGE="change",t.EV_ADD_DIR="addDir",t.EV_UNLINK="unlink",t.EV_UNLINK_DIR="unlinkDir",t.EV_RAW="raw",t.EV_ERROR="error",t.STR_DATA="data",t.STR_END="end",t.STR_CLOSE="close",t.FSEVENT_CREATED="created",t.FSEVENT_MODIFIED="modified",t.FSEVENT_DELETED="deleted",t.FSEVENT_MOVED="moved",t.FSEVENT_CLONED="cloned",t.FSEVENT_UNKNOWN="unknown",t.FSEVENT_TYPE_FILE="file",t.FSEVENT_TYPE_DIRECTORY="directory",t.FSEVENT_TYPE_SYMLINK="symlink",t.KEY_LISTENERS="listeners",t.KEY_ERR="errHandlers",t.KEY_RAW="rawEmitters",t.HANDLER_KEYS=[t.KEY_LISTENERS,t.KEY_ERR,t.KEY_RAW],t.DOT_SLASH=`.${e}`,t.BACK_SLASH_RE=/\\/g,t.DOUBLE_SLASH_RE=/\/\//,t.SLASH_OR_BACK_SLASH_RE=/[/\\]/,t.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,t.REPLACER_RE=/^\.[/\\]/,t.SLASH="/",t.SLASH_SLASH="//",t.BRACE_START="{",t.BANG="!",t.ONE_DOT=".",t.TWO_DOTS="..",t.STAR="*",t.GLOBSTAR="**",t.ROOT_GLOBSTAR="/**/*",t.SLASH_GLOBSTAR="/**",t.DIR_SUFFIX="Dir",t.ANYMATCH_OPTS={dot:!0},t.STRING_TYPE="string",t.FUNCTION_TYPE="function",t.EMPTY_STR="",t.EMPTY_FN=()=>{},t.IDENTITY_FN=r=>r,t.isWindows=u==="win32",t.isMacos=u==="darwin",t.isLinux=u==="linux",t.isIBMi=n.type()==="OS400"})(et);const ue=De.default,L=K.default,{promisify:Be}=Ae.default,Mo=ko,{isWindows:Wo,isLinux:Go,EMPTY_FN:jo,EMPTY_STR:Uo,KEY_LISTENERS:ge,KEY_ERR:Jt,KEY_RAW:$e,HANDLER_KEYS:Ko,EV_CHANGE:tt,EV_ADD:ut,EV_ADD_DIR:Vo,EV_ERROR:rr,STR_DATA:zo,STR_END:Yo,BRACE_START:qo,STAR:Xo}=et,Qo="watch",Zo=Be(ue.open),sr=Be(ue.stat),Jo=Be(ue.lstat),ea=Be(ue.close),eu=Be(ue.realpath),ta={lstat:Jo,stat:sr},tu=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},Se=(t,e,u)=>{let n=t[e];n instanceof Set||(t[e]=n=new Set([n])),n.add(u)},ua=t=>e=>{const u=t[e];u instanceof Set?u.clear():delete t[e]},Te=(t,e,u)=>{const n=t[e];n instanceof Set?n.delete(u):n===u&&delete t[e]},ir=t=>t instanceof Set?t.size===0:!t,nt=new Map;function Dr(t,e,u,n,r){const s=(i,D)=>{u(t),r(i,D,{watchedPath:t}),D&&t!==D&&rt(L.resolve(t,D),ge,L.join(t,D))};try{return ue.watch(t,e,s)}catch(i){n(i)}}const rt=(t,e,u,n,r)=>{const s=nt.get(t);!s||tu(s[e],i=>{i(u,n,r)})},na=(t,e,u,n)=>{const{listener:r,errHandler:s,rawEmitter:i}=n;let D=nt.get(e),o;if(!u.persistent)return o=Dr(t,u,r,s,i),o.close.bind(o);if(D)Se(D,ge,r),Se(D,Jt,s),Se(D,$e,i);else{if(o=Dr(t,u,rt.bind(null,e,ge),s,rt.bind(null,e,$e)),!o)return;o.on(rr,async a=>{const c=rt.bind(null,e,Jt);if(D.watcherUnusable=!0,Wo&&a.code==="EPERM")try{const f=await Zo(t,"r");await ea(f),c(a)}catch{}else c(a)}),D={listeners:r,errHandlers:s,rawEmitters:i,watcher:o},nt.set(e,D)}return()=>{Te(D,ge,r),Te(D,Jt,s),Te(D,$e,i),ir(D.listeners)&&(D.watcher.close(),nt.delete(e),Ko.forEach(ua(D)),D.watcher=void 0,Object.freeze(D))}},uu=new Map,ra=(t,e,u,n)=>{const{listener:r,rawEmitter:s}=n;let i=uu.get(e);const D=i&&i.options;return D&&(D.persistent<u.persistent||D.interval>u.interval)&&(i.listeners,i.rawEmitters,ue.unwatchFile(e),i=void 0),i?(Se(i,ge,r),Se(i,$e,s)):(i={listeners:r,rawEmitters:s,options:u,watcher:ue.watchFile(e,u,(o,a)=>{tu(i.rawEmitters,f=>{f(tt,e,{curr:o,prev:a})});const c=o.mtimeMs;(o.size!==a.size||c>a.mtimeMs||c===0)&&tu(i.listeners,f=>f(t,o))})},uu.set(e,i)),()=>{Te(i,ge,r),Te(i,$e,s),ir(i.listeners)&&(uu.delete(e),ue.unwatchFile(e),i.options=i.watcher=void 0,Object.freeze(i))}};class sa{constructor(e){this.fsw=e,this._boundHandleError=u=>e._handleError(u)}_watchWithNodeFs(e,u){const n=this.fsw.options,r=L.dirname(e),s=L.basename(e);this.fsw._getWatchedDir(r).add(s);const D=L.resolve(e),o={persistent:n.persistent};u||(u=jo);let a;return n.usePolling?(o.interval=n.enableBinaryInterval&&Mo(s)?n.binaryInterval:n.interval,a=ra(e,D,o,{listener:u,rawEmitter:this.fsw._emitRaw})):a=na(e,D,o,{listener:u,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),a}_handleFile(e,u,n){if(this.fsw.closed)return;const r=L.dirname(e),s=L.basename(e),i=this.fsw._getWatchedDir(r);let D=u;if(i.has(s))return;const o=async(c,f)=>{if(!!this.fsw._throttle(Qo,e,5)){if(!f||f.mtimeMs===0)try{const l=await sr(e);if(this.fsw.closed)return;const p=l.atimeMs,C=l.mtimeMs;(!p||p<=C||C!==D.mtimeMs)&&this.fsw._emit(tt,e,l),Go&&D.ino!==l.ino?(this.fsw._closeFile(c),D=l,this.fsw._addPathCloser(c,this._watchWithNodeFs(e,o))):D=l}catch{this.fsw._remove(r,s)}else if(i.has(s)){const l=f.atimeMs,p=f.mtimeMs;(!l||l<=p||p!==D.mtimeMs)&&this.fsw._emit(tt,e,f),D=f}}},a=this._watchWithNodeFs(e,o);if(!(n&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(ut,e,0))return;this.fsw._emit(ut,e,u)}return a}async _handleSymlink(e,u,n,r){if(this.fsw.closed)return;const s=e.fullPath,i=this.fsw._getWatchedDir(u);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let D;try{D=await eu(n)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(i.has(r)?this.fsw._symlinkPaths.get(s)!==D&&(this.fsw._symlinkPaths.set(s,D),this.fsw._emit(tt,n,e.stats)):(i.add(r),this.fsw._symlinkPaths.set(s,D),this.fsw._emit(ut,n,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(s))return!0;this.fsw._symlinkPaths.set(s,!0)}_handleRead(e,u,n,r,s,i,D){if(e=L.join(e,Uo),!n.hasGlob&&(D=this.fsw._throttle("readdir",e,1e3),!D))return;const o=this.fsw._getWatchedDir(n.path),a=new Set;let c=this.fsw._readdirp(e,{fileFilter:f=>n.filterPath(f),directoryFilter:f=>n.filterDir(f),depth:0}).on(zo,async f=>{if(this.fsw.closed){c=void 0;return}const l=f.path;let p=L.join(e,l);if(a.add(l),!(f.stats.isSymbolicLink()&&await this._handleSymlink(f,e,p,l))){if(this.fsw.closed){c=void 0;return}(l===r||!r&&!o.has(l))&&(this.fsw._incrReadyCount(),p=L.join(s,L.relative(s,p)),this._addToNodeFs(p,u,n,i+1))}}).on(rr,this._boundHandleError);return new Promise(f=>c.once(Yo,()=>{if(this.fsw.closed){c=void 0;return}const l=D?D.clear():!1;f(),o.getChildren().filter(p=>p!==e&&!a.has(p)&&(!n.hasGlob||n.filterPath({fullPath:L.resolve(e,p)}))).forEach(p=>{this.fsw._remove(e,p)}),c=void 0,l&&this._handleRead(e,!1,n,r,s,i,D)}))}async _handleDir(e,u,n,r,s,i,D){const o=this.fsw._getWatchedDir(L.dirname(e)),a=o.has(L.basename(e));!(n&&this.fsw.options.ignoreInitial)&&!s&&!a&&(!i.hasGlob||i.globFilter(e))&&this.fsw._emit(Vo,e,u),o.add(L.basename(e)),this.fsw._getWatchedDir(e);let c,f;const l=this.fsw.options.depth;if((l==null||r<=l)&&!this.fsw._symlinkPaths.has(D)){if(!s&&(await this._handleRead(e,n,i,s,e,r,c),this.fsw.closed))return;f=this._watchWithNodeFs(e,(p,C)=>{C&&C.mtimeMs===0||this._handleRead(p,!1,i,s,e,r,c)})}return f}async _addToNodeFs(e,u,n,r,s){const i=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return i(),!1;const D=this.fsw._getWatchHelpers(e,r);!D.hasGlob&&n&&(D.hasGlob=n.hasGlob,D.globFilter=n.globFilter,D.filterPath=o=>n.filterPath(o),D.filterDir=o=>n.filterDir(o));try{const o=await ta[D.statMethod](D.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(D.watchPath,o))return i(),!1;const a=this.fsw.options.followSymlinks&&!e.includes(Xo)&&!e.includes(qo);let c;if(o.isDirectory()){const f=L.resolve(e),l=a?await eu(e):e;if(this.fsw.closed||(c=await this._handleDir(D.watchPath,o,u,r,s,D,l),this.fsw.closed))return;f!==l&&l!==void 0&&this.fsw._symlinkPaths.set(f,l)}else if(o.isSymbolicLink()){const f=a?await eu(e):e;if(this.fsw.closed)return;const l=L.dirname(D.watchPath);if(this.fsw._getWatchedDir(l).add(D.watchPath),this.fsw._emit(ut,D.watchPath,o),c=await this._handleDir(l,o,u,r,e,D,f),this.fsw.closed)return;f!==void 0&&this.fsw._symlinkPaths.set(L.resolve(e),f)}else c=this._handleFile(D.watchPath,o,u);return i(),this.fsw._addPathCloser(e,c),!1}catch(o){if(this.fsw._handleError(o))return i(),e}}}var ia=sa,nu={exports:{}};const ru=De.default,I=K.default,{promisify:su}=Ae.default;let _e;try{_e=Ie.require("fsevents")}catch(t){process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR&&console.error(t)}if(_e){const t=process.version.match(/v(\d+)\.(\d+)/);if(t&&t[1]&&t[2]){const e=Number.parseInt(t[1],10),u=Number.parseInt(t[2],10);e===8&&u<16&&(_e=void 0)}}const{EV_ADD:iu,EV_CHANGE:Da,EV_ADD_DIR:or,EV_UNLINK:st,EV_ERROR:oa,STR_DATA:aa,STR_END:la,FSEVENT_CREATED:ca,FSEVENT_MODIFIED:fa,FSEVENT_DELETED:ha,FSEVENT_MOVED:da,FSEVENT_UNKNOWN:Ea,FSEVENT_TYPE_FILE:pa,FSEVENT_TYPE_DIRECTORY:xe,FSEVENT_TYPE_SYMLINK:ar,ROOT_GLOBSTAR:lr,DIR_SUFFIX:Ca,DOT_SLASH:cr,FUNCTION_TYPE:Du,EMPTY_FN:Fa,IDENTITY_FN:ga}=et,_a=t=>isNaN(t)?{}:{depth:t},ou=su(ru.stat),ma=su(ru.lstat),fr=su(ru.realpath),Aa={stat:ou,lstat:ma},ce=new Map,ya=10,wa=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),Ra=(t,e)=>({stop:_e.watch(t,e)});function ba(t,e,u,n){let r=I.extname(e)?I.dirname(e):e;const s=I.dirname(r);let i=ce.get(r);va(s)&&(r=s);const D=I.resolve(t),o=D!==e,a=(f,l,p)=>{o&&(f=f.replace(e,D)),(f===D||!f.indexOf(D+I.sep))&&u(f,l,p)};let c=!1;for(const f of ce.keys())if(e.indexOf(I.resolve(f)+I.sep)===0){r=f,i=ce.get(r),c=!0;break}return i||c?i.listeners.add(a):(i={listeners:new Set([a]),rawEmitter:n,watcher:Ra(r,(f,l)=>{if(!i.listeners.size)return;const p=_e.getInfo(f,l);i.listeners.forEach(C=>{C(f,l,p)}),i.rawEmitter(p.event,f,p)})},ce.set(r,i)),()=>{const f=i.listeners;if(f.delete(a),!f.size&&(ce.delete(r),i.watcher))return i.watcher.stop().then(()=>{i.rawEmitter=i.watcher=void 0,Object.freeze(i)})}}const va=t=>{let e=0;for(const u of ce.keys())if(u.indexOf(t)===0&&(e++,e>=ya))return!0;return!1},Ba=()=>_e&&ce.size<128,au=(t,e)=>{let u=0;for(;!t.indexOf(e)&&(t=I.dirname(t))!==e;)u++;return u},hr=(t,e)=>t.type===xe&&e.isDirectory()||t.type===ar&&e.isSymbolicLink()||t.type===pa&&e.isFile();class $a{constructor(e){this.fsw=e}checkIgnored(e,u){const n=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,u))return n.add(e),u&&u.isDirectory()&&n.add(e+lr),!0;n.delete(e),n.delete(e+lr)}addOrChange(e,u,n,r,s,i,D,o){const a=s.has(i)?Da:iu;this.handleEvent(a,e,u,n,r,s,i,D,o)}async checkExists(e,u,n,r,s,i,D,o){try{const a=await ou(e);if(this.fsw.closed)return;hr(D,a)?this.addOrChange(e,u,n,r,s,i,D,o):this.handleEvent(st,e,u,n,r,s,i,D,o)}catch(a){a.code==="EACCES"?this.addOrChange(e,u,n,r,s,i,D,o):this.handleEvent(st,e,u,n,r,s,i,D,o)}}handleEvent(e,u,n,r,s,i,D,o,a){if(!(this.fsw.closed||this.checkIgnored(u)))if(e===st){const c=o.type===xe;(c||i.has(D))&&this.fsw._remove(s,D,c)}else{if(e===iu){if(o.type===xe&&this.fsw._getWatchedDir(u),o.type===ar&&a.followSymlinks){const f=a.depth===void 0?void 0:au(n,r)+1;return this._addToFsEvents(u,!1,!0,f)}this.fsw._getWatchedDir(s).add(D)}const c=o.type===xe?e+Ca:e;this.fsw._emit(c,u),c===or&&this._addToFsEvents(u,!1,!0)}}_watchWithFsEvents(e,u,n,r){if(this.fsw.closed||this.fsw._isIgnored(e))return;const s=this.fsw.options,D=ba(e,u,async(o,a,c)=>{if(this.fsw.closed||s.depth!==void 0&&au(o,u)>s.depth)return;const f=n(I.join(e,I.relative(e,o)));if(r&&!r(f))return;const l=I.dirname(f),p=I.basename(f),C=this.fsw._getWatchedDir(c.type===xe?f:l);if(wa.has(a)||c.event===Ea)if(typeof s.ignored===Du){let F;try{F=await ou(f)}catch{}if(this.fsw.closed||this.checkIgnored(f,F))return;hr(c,F)?this.addOrChange(f,o,u,l,C,p,c,s):this.handleEvent(st,f,o,u,l,C,p,c,s)}else this.checkExists(f,o,u,l,C,p,c,s);else switch(c.event){case ca:case fa:return this.addOrChange(f,o,u,l,C,p,c,s);case ha:case da:return this.checkExists(f,o,u,l,C,p,c,s)}},this.fsw._emitRaw);return this.fsw._emitReady(),D}async _handleFsEventsSymlink(e,u,n,r){if(!(this.fsw.closed||this.fsw._symlinkPaths.has(u))){this.fsw._symlinkPaths.set(u,!0),this.fsw._incrReadyCount();try{const s=await fr(e);if(this.fsw.closed)return;if(this.fsw._isIgnored(s))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents(s||e,i=>{let D=e;return s&&s!==cr?D=i.replace(s,e):i!==cr&&(D=I.join(e,i)),n(D)},!1,r)}catch(s){if(this.fsw._handleError(s))return this.fsw._emitReady()}}}emitAdd(e,u,n,r,s){const i=n(e),D=u.isDirectory(),o=this.fsw._getWatchedDir(I.dirname(i)),a=I.basename(i);D&&this.fsw._getWatchedDir(i),!o.has(a)&&(o.add(a),(!r.ignoreInitial||s===!0)&&this.fsw._emit(D?or:iu,i,u))}initWatch(e,u,n,r){if(this.fsw.closed)return;const s=this._watchWithFsEvents(n.watchPath,I.resolve(e||n.watchPath),r,n.globFilter);this.fsw._addPathCloser(u,s)}async _addToFsEvents(e,u,n,r){if(this.fsw.closed)return;const s=this.fsw.options,i=typeof u===Du?u:ga,D=this.fsw._getWatchHelpers(e);try{const o=await Aa[D.statMethod](D.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(D.watchPath,o))throw null;if(o.isDirectory()){if(D.globFilter||this.emitAdd(i(e),o,i,s,n),r&&r>s.depth)return;this.fsw._readdirp(D.watchPath,{fileFilter:a=>D.filterPath(a),directoryFilter:a=>D.filterDir(a),..._a(s.depth-(r||0))}).on(aa,a=>{if(this.fsw.closed||a.stats.isDirectory()&&!D.filterPath(a))return;const c=I.join(D.watchPath,a.path),{fullPath:f}=a;if(D.followSymlinks&&a.stats.isSymbolicLink()){const l=s.depth===void 0?void 0:au(c,I.resolve(D.watchPath))+1;this._handleFsEventsSymlink(c,f,i,l)}else this.emitAdd(c,a.stats,i,s,n)}).on(oa,Fa).on(la,()=>{this.fsw._emitReady()})}else this.emitAdd(D.watchPath,o,i,s,n),this.fsw._emitReady()}catch(o){(!o||this.fsw._handleError(o))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(s.persistent&&n!==!0)if(typeof u===Du)this.initWatch(void 0,e,D,i);else{let o;try{o=await fr(D.watchPath)}catch{}this.initWatch(o,e,D,i)}}}nu.exports=$a,nu.exports.canUse=Ba;const{EventEmitter:Sa}=jr.default,lu=De.default,B=K.default,{promisify:dr}=Ae.default,Ta=$D,cu=Kt.exports.default,xa=KD,fu=Nn,Oa=No,Na=$n,Ha=ia,Er=nu.exports,{EV_ALL:hu,EV_READY:Pa,EV_ADD:it,EV_CHANGE:Oe,EV_UNLINK:pr,EV_ADD_DIR:La,EV_UNLINK_DIR:Ia,EV_RAW:ka,EV_ERROR:du,STR_CLOSE:Ma,STR_END:Wa,BACK_SLASH_RE:Ga,DOUBLE_SLASH_RE:Cr,SLASH_OR_BACK_SLASH_RE:ja,DOT_RE:Ua,REPLACER_RE:Ka,SLASH:Eu,SLASH_SLASH:Va,BRACE_START:za,BANG:pu,ONE_DOT:Fr,TWO_DOTS:Ya,GLOBSTAR:qa,SLASH_GLOBSTAR:Cu,ANYMATCH_OPTS:Fu,STRING_TYPE:gu,FUNCTION_TYPE:Xa,EMPTY_STR:_u,EMPTY_FN:Qa,isWindows:Za,isMacos:Ja,isIBMi:el}=et,tl=dr(lu.stat),ul=dr(lu.readdir),mu=(t=[])=>Array.isArray(t)?t:[t],gr=(t,e=[])=>(t.forEach(u=>{Array.isArray(u)?gr(u,e):e.push(u)}),e),_r=t=>{const e=gr(mu(t));if(!e.every(u=>typeof u===gu))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(Ar)},mr=t=>{let e=t.replace(Ga,Eu),u=!1;for(e.startsWith(Va)&&(u=!0);e.match(Cr);)e=e.replace(Cr,Eu);return u&&(e=Eu+e),e},Ar=t=>mr(B.normalize(mr(t))),yr=(t=_u)=>e=>typeof e!==gu?e:Ar(B.isAbsolute(e)?e:B.join(t,e)),nl=(t,e)=>B.isAbsolute(t)?t:t.startsWith(pu)?pu+B.join(e,t.slice(1)):B.join(e,t),q=(t,e)=>t[e]===void 0;class rl{constructor(e,u){this.path=e,this._removeWatcher=u,this.items=new Set}add(e){const{items:u}=this;!u||e!==Fr&&e!==Ya&&u.add(e)}async remove(e){const{items:u}=this;if(!u||(u.delete(e),u.size>0))return;const n=this.path;try{await ul(n)}catch{this._removeWatcher&&this._removeWatcher(B.dirname(n),B.basename(n))}}has(e){const{items:u}=this;if(!!u)return u.has(e)}getChildren(){const{items:e}=this;if(!!e)return[...e.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}}const sl="stat",il="lstat";class Dl{constructor(e,u,n,r){this.fsw=r,this.path=e=e.replace(Ka,_u),this.watchPath=u,this.fullWatchPath=B.resolve(u),this.hasGlob=u!==e,e===_u&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&n?void 0:!1,this.globFilter=this.hasGlob?cu(e,void 0,Fu):!1,this.dirParts=this.getDirParts(e),this.dirParts.forEach(s=>{s.length>1&&s.pop()}),this.followSymlinks=n,this.statMethod=n?sl:il}checkGlobSymlink(e){return this.globSymlink===void 0&&(this.globSymlink=e.fullParentDir===this.fullWatchPath?!1:{realPath:e.fullParentDir,linkPath:this.fullWatchPath}),this.globSymlink?e.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath):e.fullPath}entryPath(e){return B.join(this.watchPath,B.relative(this.watchPath,this.checkGlobSymlink(e)))}filterPath(e){const{stats:u}=e;if(u&&u.isSymbolicLink())return this.filterDir(e);const n=this.entryPath(e);return(this.hasGlob&&typeof this.globFilter===Xa?this.globFilter(n):!0)&&this.fsw._isntIgnored(n,u)&&this.fsw._hasReadPermissions(u)}getDirParts(e){if(!this.hasGlob)return[];const u=[];return(e.includes(za)?Oa.expand(e):[e]).forEach(r=>{u.push(B.relative(this.watchPath,r).split(ja))}),u}filterDir(e){if(this.hasGlob){const u=this.getDirParts(this.checkGlobSymlink(e));let n=!1;this.unmatchedGlob=!this.dirParts.some(r=>r.every((s,i)=>(s===qa&&(n=!0),n||!u[0][i]||cu(s,u[0][i],Fu))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}}class ol extends Sa{constructor(e){super();const u={};e&&Object.assign(u,e),this._watched=new Map,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._symlinkPaths=new Map,this._streams=new Set,this.closed=!1,q(u,"persistent")&&(u.persistent=!0),q(u,"ignoreInitial")&&(u.ignoreInitial=!1),q(u,"ignorePermissionErrors")&&(u.ignorePermissionErrors=!1),q(u,"interval")&&(u.interval=100),q(u,"binaryInterval")&&(u.binaryInterval=300),q(u,"disableGlobbing")&&(u.disableGlobbing=!1),u.enableBinaryInterval=u.binaryInterval!==u.interval,q(u,"useFsEvents")&&(u.useFsEvents=!u.usePolling),Er.canUse()||(u.useFsEvents=!1),q(u,"usePolling")&&!u.useFsEvents&&(u.usePolling=Ja),el&&(u.usePolling=!0);const r=process.env.CHOKIDAR_USEPOLLING;if(r!==void 0){const o=r.toLowerCase();o==="false"||o==="0"?u.usePolling=!1:o==="true"||o==="1"?u.usePolling=!0:u.usePolling=!!o}const s=process.env.CHOKIDAR_INTERVAL;s&&(u.interval=Number.parseInt(s,10)),q(u,"atomic")&&(u.atomic=!u.usePolling&&!u.useFsEvents),u.atomic&&(this._pendingUnlinks=new Map),q(u,"followSymlinks")&&(u.followSymlinks=!0),q(u,"awaitWriteFinish")&&(u.awaitWriteFinish=!1),u.awaitWriteFinish===!0&&(u.awaitWriteFinish={});const i=u.awaitWriteFinish;i&&(i.stabilityThreshold||(i.stabilityThreshold=2e3),i.pollInterval||(i.pollInterval=100),this._pendingWrites=new Map),u.ignored&&(u.ignored=mu(u.ignored));let D=0;this._emitReady=()=>{D++,D>=this._readyCount&&(this._emitReady=Qa,this._readyEmitted=!0,process.nextTick(()=>this.emit(Pa)))},this._emitRaw=(...o)=>this.emit(ka,...o),this._readyEmitted=!1,this.options=u,u.useFsEvents?this._fsEventsHandler=new Er(this):this._nodeFsHandler=new Ha(this),Object.freeze(u)}add(e,u,n){const{cwd:r,disableGlobbing:s}=this.options;this.closed=!1;let i=_r(e);return r&&(i=i.map(D=>{const o=nl(D,r);return s||!fu(D)?o:Na(o)})),i=i.filter(D=>D.startsWith(pu)?(this._ignoredPaths.add(D.slice(1)),!1):(this._ignoredPaths.delete(D),this._ignoredPaths.delete(D+Cu),this._userIgnored=void 0,!0)),this.options.useFsEvents&&this._fsEventsHandler?(this._readyCount||(this._readyCount=i.length),this.options.persistent&&(this._readyCount*=2),i.forEach(D=>this._fsEventsHandler._addToFsEvents(D))):(this._readyCount||(this._readyCount=0),this._readyCount+=i.length,Promise.all(i.map(async D=>{const o=await this._nodeFsHandler._addToNodeFs(D,!n,0,0,u);return o&&this._emitReady(),o})).then(D=>{this.closed||D.filter(o=>o).forEach(o=>{this.add(B.dirname(o),B.basename(u||o))})})),this}unwatch(e){if(this.closed)return this;const u=_r(e),{cwd:n}=this.options;return u.forEach(r=>{!B.isAbsolute(r)&&!this._closers.has(r)&&(n&&(r=B.join(n,r)),r=B.resolve(r)),this._closePath(r),this._ignoredPaths.add(r),this._watched.has(r)&&this._ignoredPaths.add(r+Cu),this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();const e=[];return this._closers.forEach(u=>u.forEach(n=>{const r=n();r instanceof Promise&&e.push(r)})),this._streams.forEach(u=>u.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(u=>u.dispose()),["closers","watched","streams","symlinkPaths","throttled"].forEach(u=>{this[`_${u}`].clear()}),this._closePromise=e.length?Promise.all(e).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){const e={};return this._watched.forEach((u,n)=>{const r=this.options.cwd?B.relative(this.options.cwd,n):n;e[r||Fr]=u.getChildren().sort()}),e}emitWithAll(e,u){this.emit(...u),e!==du&&this.emit(hu,...u)}async _emit(e,u,n,r,s){if(this.closed)return;const i=this.options;Za&&(u=B.normalize(u)),i.cwd&&(u=B.relative(i.cwd,u));const D=[e,u];s!==void 0?D.push(n,r,s):r!==void 0?D.push(n,r):n!==void 0&&D.push(n);const o=i.awaitWriteFinish;let a;if(o&&(a=this._pendingWrites.get(u)))return a.lastChange=new Date,this;if(i.atomic){if(e===pr)return this._pendingUnlinks.set(u,D),setTimeout(()=>{this._pendingUnlinks.forEach((c,f)=>{this.emit(...c),this.emit(hu,...c),this._pendingUnlinks.delete(f)})},typeof i.atomic=="number"?i.atomic:100),this;e===it&&this._pendingUnlinks.has(u)&&(e=D[0]=Oe,this._pendingUnlinks.delete(u))}if(o&&(e===it||e===Oe)&&this._readyEmitted){const c=(f,l)=>{f?(e=D[0]=du,D[1]=f,this.emitWithAll(e,D)):l&&(D.length>2?D[2]=l:D.push(l),this.emitWithAll(e,D))};return this._awaitWriteFinish(u,o.stabilityThreshold,e,c),this}if(e===Oe&&!this._throttle(Oe,u,50))return this;if(i.alwaysStat&&n===void 0&&(e===it||e===La||e===Oe)){const c=i.cwd?B.join(i.cwd,u):u;let f;try{f=await tl(c)}catch{}if(!f||this.closed)return;D.push(f)}return this.emitWithAll(e,D),this}_handleError(e){const u=e&&e.code;return e&&u!=="ENOENT"&&u!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||u!=="EPERM"&&u!=="EACCES")&&this.emit(du,e),e||this.closed}_throttle(e,u,n){this._throttled.has(e)||this._throttled.set(e,new Map);const r=this._throttled.get(e),s=r.get(u);if(s)return s.count++,!1;let i;const D=()=>{const a=r.get(u),c=a?a.count:0;return r.delete(u),clearTimeout(i),a&&clearTimeout(a.timeoutObject),c};i=setTimeout(D,n);const o={timeoutObject:i,clear:D,count:0};return r.set(u,o),o}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,u,n,r){let s,i=e;this.options.cwd&&!B.isAbsolute(e)&&(i=B.join(this.options.cwd,e));const D=new Date,o=a=>{lu.stat(i,(c,f)=>{if(c||!this._pendingWrites.has(e)){c&&c.code!=="ENOENT"&&r(c);return}const l=Number(new Date);a&&f.size!==a.size&&(this._pendingWrites.get(e).lastChange=l);const p=this._pendingWrites.get(e);l-p.lastChange>=u?(this._pendingWrites.delete(e),r(void 0,f)):s=setTimeout(o,this.options.awaitWriteFinish.pollInterval,f)})};this._pendingWrites.has(e)||(this._pendingWrites.set(e,{lastChange:D,cancelWait:()=>(this._pendingWrites.delete(e),clearTimeout(s),n)}),s=setTimeout(o,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,u){if(this.options.atomic&&Ua.test(e))return!0;if(!this._userIgnored){const{cwd:n}=this.options,r=this.options.ignored,s=r&&r.map(yr(n)),i=mu(s).filter(o=>typeof o===gu&&!fu(o)).map(o=>o+Cu),D=this._getGlobIgnored().map(yr(n)).concat(s,i);this._userIgnored=cu(D,void 0,Fu)}return this._userIgnored([e,u])}_isntIgnored(e,u){return!this._isIgnored(e,u)}_getWatchHelpers(e,u){const n=u||this.options.disableGlobbing||!fu(e)?e:xa(e),r=this.options.followSymlinks;return new Dl(e,n,r,this)}_getWatchedDir(e){this._boundRemove||(this._boundRemove=this._remove.bind(this));const u=B.resolve(e);return this._watched.has(u)||this._watched.set(u,new rl(u,this._boundRemove)),this._watched.get(u)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return!0;const n=(e&&Number.parseInt(e.mode,10))&511,r=Number.parseInt(n.toString(8)[0],10);return Boolean(4&r)}_remove(e,u,n){const r=B.join(e,u),s=B.resolve(r);if(n=n!=null?n:this._watched.has(r)||this._watched.has(s),!this._throttle("remove",r,100))return;!n&&!this.options.useFsEvents&&this._watched.size===1&&this.add(e,u,!0),this._getWatchedDir(r).getChildren().forEach(l=>this._remove(r,l));const o=this._getWatchedDir(e),a=o.has(u);o.remove(u),this._symlinkPaths.has(s)&&this._symlinkPaths.delete(s);let c=r;if(this.options.cwd&&(c=B.relative(this.options.cwd,r)),this.options.awaitWriteFinish&&this._pendingWrites.has(c)&&this._pendingWrites.get(c).cancelWait()===it)return;this._watched.delete(r),this._watched.delete(s);const f=n?Ia:pr;a&&!this._isIgnored(r)&&this._emit(f,r),this.options.useFsEvents||this._closePath(r)}_closePath(e){this._closeFile(e);const u=B.dirname(e);this._getWatchedDir(u).remove(B.basename(e))}_closeFile(e){const u=this._closers.get(e);!u||(u.forEach(n=>n()),this._closers.delete(e))}_addPathCloser(e,u){if(!u)return;let n=this._closers.get(e);n||(n=[],this._closers.set(e,n)),n.push(u)}_readdirp(e,u){if(this.closed)return;const n={type:hu,alwaysStat:!0,lstat:!0,...u};let r=Ta(e,n);return this._streams.add(r),r.once(Ma,()=>{r=void 0}),r.once(Wa,()=>{r&&(this._streams.delete(r),r=void 0)}),r}}const al=(t,e)=>{const u=new ol(e);return u.add(t),u};var ll=al;let fe=!0;const me=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let wr=0;if(me.process&&me.process.env&&me.process.stdout){const{FORCE_COLOR:t,NODE_DISABLE_COLORS:e,TERM:u}=me.process.env;e||t==="0"?fe=!1:t==="1"?fe=!0:u==="dumb"?fe=!1:"CI"in me.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(n=>n in me.process.env)?fe=!0:fe=process.stdout.isTTY,fe&&(wr=u&&u.endsWith("-256color")?2:1)}let Rr={enabled:fe,supportLevel:wr};function br(t,e,u=1){const n=`\x1B[${t}m`,r=`\x1B[${e}m`,s=new RegExp(`\\x1b\\[${e}m`,"g");return i=>Rr.enabled&&Rr.supportLevel>=u?n+(""+i).replace(s,n)+r:""+i}const cl=br(90,39),fl=br(96,39),hl=()=>new Date().toLocaleTimeString(),dl=(...t)=>console.log(cl(hl()),fl("[tsx]"),...t),El="\x1Bc";function pl(t,e){let u;return()=>{u&&clearTimeout(u),u=setTimeout(()=>t(),e)}}function Cl(t){return t&&"type"in t&&t.type==="dependency"}const vr={noCache:{type:Boolean,description:"Disable caching",default:!1},tsconfig:{type:String,description:"Custom tsconfig.json path"},clearScreen:{type:Boolean,description:"Clearing the screen on rerun",default:!0}},Fl=ai({name:"watch",parameters:["<script path>"],flags:vr,help:{description:"Run the script and watch for changes"}},t=>{const e=ct(vr,process.argv.slice(3),{ignoreUnknown:!0})._,u={noCache:t.flags.noCache,tsconfigPath:t.flags.tsconfig,clearScreen:t.flags.clearScreen,ipc:!0};let n;const r=pl(()=>{n&&!n.killed&&n.exitCode===null&&n.kill(),n&&dl("rerunning"),u.clearScreen&&process.stdout.write(El),n=cn(e,u),n.on("message",D=>{if(Cl(D)){const o=D.path.startsWith("file:")?Au.fileURLToPath(D.path):D.path;K.default.isAbsolute(o)&&i.add(o)}})},100);r();function s(D){n&&n.kill(),process.exit(D)}process.once("SIGINT",()=>s(130)),process.once("SIGTERM",()=>s(143));const i=ll(t._,{ignoreInitial:!0,ignored:["**/.*/**","**/{node_modules,bower_components,vendor}/**","**/dist/**"],ignorePermissionErrors:!0}).on("all",r);process.stdin.on("data",r)}),Br={noCache:{type:Boolean,description:"Disable caching"},tsconfig:{type:String,description:"Custom tsconfig.json path"}},$r={...Br,version:{type:Boolean,description:"Show version"},help:{type:Boolean,alias:"h",description:"Show help"}};oi({name:"tsx",parameters:["[script path]"],commands:[Fl],flags:$r,help:!1},t=>{const e=t._.length===0;if(e){if(t.flags.version){console.log(Or.version);return}if(t.flags.help){t.showHelp({description:"Node.js runtime enhanced with esbuild for loading TypeScript & ESM"});return}process.argv.push(Ie.require.resolve("./repl"))}const u=ct(e?$r:Br,process.argv.slice(2),{ignoreUnknown:!0})._;cn(u,{noCache:Boolean(t.flags.noCache),tsconfigPath:t.flags.tsconfig}).on("close",n=>process.exit(n))});
|
|
52
|
+
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};const Co=Yt,{MAX_LENGTH:Jn,CHAR_BACKSLASH:Zt,CHAR_BACKTICK:Fo,CHAR_COMMA:go,CHAR_DOT:_o,CHAR_LEFT_PARENTHESES:mo,CHAR_RIGHT_PARENTHESES:Ao,CHAR_LEFT_CURLY_BRACE:yo,CHAR_RIGHT_CURLY_BRACE:wo,CHAR_LEFT_SQUARE_BRACKET:er,CHAR_RIGHT_SQUARE_BRACKET:tr,CHAR_DOUBLE_QUOTE:Ro,CHAR_SINGLE_QUOTE:bo,CHAR_NO_BREAK_SPACE:vo,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Bo}=po,$o=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let u=e||{},n=typeof u.maxLength=="number"?Math.min(Jn,u.maxLength):Jn;if(t.length>n)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${n})`);let r={type:"root",input:t,nodes:[]},s=[r],i=r,D=r,o=0,a=t.length,c=0,f=0,l;const p=()=>t[c++],C=F=>{if(F.type==="text"&&D.type==="dot"&&(D.type="text"),D&&D.type==="text"&&F.type==="text"){D.value+=F.value;return}return i.nodes.push(F),F.parent=i,F.prev=D,D=F,F};for(C({type:"bos"});c<a;)if(i=s[s.length-1],l=p(),!(l===Bo||l===vo)){if(l===Zt){C({type:"text",value:(e.keepEscaping?l:"")+p()});continue}if(l===tr){C({type:"text",value:"\\"+l});continue}if(l===er){o++;let F;for(;c<a&&(F=p());){if(l+=F,F===er){o++;continue}if(F===Zt){l+=p();continue}if(F===tr&&(o--,o===0))break}C({type:"text",value:l});continue}if(l===mo){i=C({type:"paren",nodes:[]}),s.push(i),C({type:"text",value:l});continue}if(l===Ao){if(i.type!=="paren"){C({type:"text",value:l});continue}i=s.pop(),C({type:"text",value:l}),i=s[s.length-1];continue}if(l===Ro||l===bo||l===Fo){let F=l,y;for(e.keepQuotes!==!0&&(l="");c<a&&(y=p());){if(y===Zt){l+=y+p();continue}if(y===F){e.keepQuotes===!0&&(l+=y);break}l+=y}C({type:"text",value:l});continue}if(l===yo){f++;let F=D.value&&D.value.slice(-1)==="$"||i.dollar===!0;i=C({type:"brace",open:!0,close:!1,dollar:F,depth:f,commas:0,ranges:0,nodes:[]}),s.push(i),C({type:"open",value:l});continue}if(l===wo){if(i.type!=="brace"){C({type:"text",value:l});continue}let F="close";i=s.pop(),i.close=!0,C({type:F,value:l}),f--,i=s[s.length-1];continue}if(l===go&&f>0){if(i.ranges>0){i.ranges=0;let F=i.nodes.shift();i.nodes=[F,{type:"text",value:Co(i)}]}C({type:"comma",value:l}),i.commas++;continue}if(l===_o&&f>0&&i.commas===0){let F=i.nodes;if(f===0||F.length===0){C({type:"text",value:l});continue}if(D.type==="dot"){if(i.range=[],D.value+=l,D.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,D.type="text";continue}i.ranges++,i.args=[];continue}if(D.type==="range"){F.pop();let y=F[F.length-1];y.value+=D.value+l,D=y,i.ranges--;continue}C({type:"dot",value:l});continue}C({type:"text",value:l})}do if(i=s.pop(),i.type!=="root"){i.nodes.forEach(b=>{b.nodes||(b.type==="open"&&(b.isOpen=!0),b.type==="close"&&(b.isClose=!0),b.nodes||(b.type="text"),b.invalid=!0)});let F=s[s.length-1],y=F.nodes.indexOf(i);F.nodes.splice(y,1,...i.nodes)}while(s.length>0);return C({type:"eos"}),r};var So=$o;const ur=Yt,To=co,xo=Eo,Oo=So,Y=(t,e={})=>{let u=[];if(Array.isArray(t))for(let n of t){let r=Y.create(n,e);Array.isArray(r)?u.push(...r):u.push(r)}else u=[].concat(Y.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(u=[...new Set(u)]),u};Y.parse=(t,e={})=>Oo(t,e),Y.stringify=(t,e={})=>ur(typeof t=="string"?Y.parse(t,e):t,e),Y.compile=(t,e={})=>(typeof t=="string"&&(t=Y.parse(t,e)),To(t,e)),Y.expand=(t,e={})=>{typeof t=="string"&&(t=Y.parse(t,e));let u=xo(t,e);return e.noempty===!0&&(u=u.filter(Boolean)),e.nodupes===!0&&(u=[...new Set(u)]),u},Y.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Y.compile(t,e):Y.expand(t,e);var No=Y,nr={exports:{}},Ho=["3dm","3ds","3g2","3gp","7z","a","aac","adp","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"];(function(t){t.exports=Ho})(nr);const Po=K.default,Lo=nr.exports,Io=new Set(Lo);var ko=t=>Io.has(Po.extname(t).slice(1).toLowerCase()),et={};(function(t){const{sep:e}=K.default,{platform:u}=process,n=yu.default;t.EV_ALL="all",t.EV_READY="ready",t.EV_ADD="add",t.EV_CHANGE="change",t.EV_ADD_DIR="addDir",t.EV_UNLINK="unlink",t.EV_UNLINK_DIR="unlinkDir",t.EV_RAW="raw",t.EV_ERROR="error",t.STR_DATA="data",t.STR_END="end",t.STR_CLOSE="close",t.FSEVENT_CREATED="created",t.FSEVENT_MODIFIED="modified",t.FSEVENT_DELETED="deleted",t.FSEVENT_MOVED="moved",t.FSEVENT_CLONED="cloned",t.FSEVENT_UNKNOWN="unknown",t.FSEVENT_TYPE_FILE="file",t.FSEVENT_TYPE_DIRECTORY="directory",t.FSEVENT_TYPE_SYMLINK="symlink",t.KEY_LISTENERS="listeners",t.KEY_ERR="errHandlers",t.KEY_RAW="rawEmitters",t.HANDLER_KEYS=[t.KEY_LISTENERS,t.KEY_ERR,t.KEY_RAW],t.DOT_SLASH=`.${e}`,t.BACK_SLASH_RE=/\\/g,t.DOUBLE_SLASH_RE=/\/\//,t.SLASH_OR_BACK_SLASH_RE=/[/\\]/,t.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,t.REPLACER_RE=/^\.[/\\]/,t.SLASH="/",t.SLASH_SLASH="//",t.BRACE_START="{",t.BANG="!",t.ONE_DOT=".",t.TWO_DOTS="..",t.STAR="*",t.GLOBSTAR="**",t.ROOT_GLOBSTAR="/**/*",t.SLASH_GLOBSTAR="/**",t.DIR_SUFFIX="Dir",t.ANYMATCH_OPTS={dot:!0},t.STRING_TYPE="string",t.FUNCTION_TYPE="function",t.EMPTY_STR="",t.EMPTY_FN=()=>{},t.IDENTITY_FN=r=>r,t.isWindows=u==="win32",t.isMacos=u==="darwin",t.isLinux=u==="linux",t.isIBMi=n.type()==="OS400"})(et);const ue=De.default,L=K.default,{promisify:Be}=Ae.default,Mo=ko,{isWindows:Wo,isLinux:Go,EMPTY_FN:jo,EMPTY_STR:Uo,KEY_LISTENERS:ge,KEY_ERR:Jt,KEY_RAW:$e,HANDLER_KEYS:Ko,EV_CHANGE:tt,EV_ADD:ut,EV_ADD_DIR:Vo,EV_ERROR:rr,STR_DATA:zo,STR_END:Yo,BRACE_START:qo,STAR:Xo}=et,Qo="watch",Zo=Be(ue.open),sr=Be(ue.stat),Jo=Be(ue.lstat),ea=Be(ue.close),eu=Be(ue.realpath),ta={lstat:Jo,stat:sr},tu=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},Se=(t,e,u)=>{let n=t[e];n instanceof Set||(t[e]=n=new Set([n])),n.add(u)},ua=t=>e=>{const u=t[e];u instanceof Set?u.clear():delete t[e]},Te=(t,e,u)=>{const n=t[e];n instanceof Set?n.delete(u):n===u&&delete t[e]},ir=t=>t instanceof Set?t.size===0:!t,nt=new Map;function Dr(t,e,u,n,r){const s=(i,D)=>{u(t),r(i,D,{watchedPath:t}),D&&t!==D&&rt(L.resolve(t,D),ge,L.join(t,D))};try{return ue.watch(t,e,s)}catch(i){n(i)}}const rt=(t,e,u,n,r)=>{const s=nt.get(t);!s||tu(s[e],i=>{i(u,n,r)})},na=(t,e,u,n)=>{const{listener:r,errHandler:s,rawEmitter:i}=n;let D=nt.get(e),o;if(!u.persistent)return o=Dr(t,u,r,s,i),o.close.bind(o);if(D)Se(D,ge,r),Se(D,Jt,s),Se(D,$e,i);else{if(o=Dr(t,u,rt.bind(null,e,ge),s,rt.bind(null,e,$e)),!o)return;o.on(rr,async a=>{const c=rt.bind(null,e,Jt);if(D.watcherUnusable=!0,Wo&&a.code==="EPERM")try{const f=await Zo(t,"r");await ea(f),c(a)}catch{}else c(a)}),D={listeners:r,errHandlers:s,rawEmitters:i,watcher:o},nt.set(e,D)}return()=>{Te(D,ge,r),Te(D,Jt,s),Te(D,$e,i),ir(D.listeners)&&(D.watcher.close(),nt.delete(e),Ko.forEach(ua(D)),D.watcher=void 0,Object.freeze(D))}},uu=new Map,ra=(t,e,u,n)=>{const{listener:r,rawEmitter:s}=n;let i=uu.get(e);const D=i&&i.options;return D&&(D.persistent<u.persistent||D.interval>u.interval)&&(i.listeners,i.rawEmitters,ue.unwatchFile(e),i=void 0),i?(Se(i,ge,r),Se(i,$e,s)):(i={listeners:r,rawEmitters:s,options:u,watcher:ue.watchFile(e,u,(o,a)=>{tu(i.rawEmitters,f=>{f(tt,e,{curr:o,prev:a})});const c=o.mtimeMs;(o.size!==a.size||c>a.mtimeMs||c===0)&&tu(i.listeners,f=>f(t,o))})},uu.set(e,i)),()=>{Te(i,ge,r),Te(i,$e,s),ir(i.listeners)&&(uu.delete(e),ue.unwatchFile(e),i.options=i.watcher=void 0,Object.freeze(i))}};class sa{constructor(e){this.fsw=e,this._boundHandleError=u=>e._handleError(u)}_watchWithNodeFs(e,u){const n=this.fsw.options,r=L.dirname(e),s=L.basename(e);this.fsw._getWatchedDir(r).add(s);const D=L.resolve(e),o={persistent:n.persistent};u||(u=jo);let a;return n.usePolling?(o.interval=n.enableBinaryInterval&&Mo(s)?n.binaryInterval:n.interval,a=ra(e,D,o,{listener:u,rawEmitter:this.fsw._emitRaw})):a=na(e,D,o,{listener:u,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),a}_handleFile(e,u,n){if(this.fsw.closed)return;const r=L.dirname(e),s=L.basename(e),i=this.fsw._getWatchedDir(r);let D=u;if(i.has(s))return;const o=async(c,f)=>{if(!!this.fsw._throttle(Qo,e,5)){if(!f||f.mtimeMs===0)try{const l=await sr(e);if(this.fsw.closed)return;const p=l.atimeMs,C=l.mtimeMs;(!p||p<=C||C!==D.mtimeMs)&&this.fsw._emit(tt,e,l),Go&&D.ino!==l.ino?(this.fsw._closeFile(c),D=l,this.fsw._addPathCloser(c,this._watchWithNodeFs(e,o))):D=l}catch{this.fsw._remove(r,s)}else if(i.has(s)){const l=f.atimeMs,p=f.mtimeMs;(!l||l<=p||p!==D.mtimeMs)&&this.fsw._emit(tt,e,f),D=f}}},a=this._watchWithNodeFs(e,o);if(!(n&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(ut,e,0))return;this.fsw._emit(ut,e,u)}return a}async _handleSymlink(e,u,n,r){if(this.fsw.closed)return;const s=e.fullPath,i=this.fsw._getWatchedDir(u);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let D;try{D=await eu(n)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(i.has(r)?this.fsw._symlinkPaths.get(s)!==D&&(this.fsw._symlinkPaths.set(s,D),this.fsw._emit(tt,n,e.stats)):(i.add(r),this.fsw._symlinkPaths.set(s,D),this.fsw._emit(ut,n,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(s))return!0;this.fsw._symlinkPaths.set(s,!0)}_handleRead(e,u,n,r,s,i,D){if(e=L.join(e,Uo),!n.hasGlob&&(D=this.fsw._throttle("readdir",e,1e3),!D))return;const o=this.fsw._getWatchedDir(n.path),a=new Set;let c=this.fsw._readdirp(e,{fileFilter:f=>n.filterPath(f),directoryFilter:f=>n.filterDir(f),depth:0}).on(zo,async f=>{if(this.fsw.closed){c=void 0;return}const l=f.path;let p=L.join(e,l);if(a.add(l),!(f.stats.isSymbolicLink()&&await this._handleSymlink(f,e,p,l))){if(this.fsw.closed){c=void 0;return}(l===r||!r&&!o.has(l))&&(this.fsw._incrReadyCount(),p=L.join(s,L.relative(s,p)),this._addToNodeFs(p,u,n,i+1))}}).on(rr,this._boundHandleError);return new Promise(f=>c.once(Yo,()=>{if(this.fsw.closed){c=void 0;return}const l=D?D.clear():!1;f(),o.getChildren().filter(p=>p!==e&&!a.has(p)&&(!n.hasGlob||n.filterPath({fullPath:L.resolve(e,p)}))).forEach(p=>{this.fsw._remove(e,p)}),c=void 0,l&&this._handleRead(e,!1,n,r,s,i,D)}))}async _handleDir(e,u,n,r,s,i,D){const o=this.fsw._getWatchedDir(L.dirname(e)),a=o.has(L.basename(e));!(n&&this.fsw.options.ignoreInitial)&&!s&&!a&&(!i.hasGlob||i.globFilter(e))&&this.fsw._emit(Vo,e,u),o.add(L.basename(e)),this.fsw._getWatchedDir(e);let c,f;const l=this.fsw.options.depth;if((l==null||r<=l)&&!this.fsw._symlinkPaths.has(D)){if(!s&&(await this._handleRead(e,n,i,s,e,r,c),this.fsw.closed))return;f=this._watchWithNodeFs(e,(p,C)=>{C&&C.mtimeMs===0||this._handleRead(p,!1,i,s,e,r,c)})}return f}async _addToNodeFs(e,u,n,r,s){const i=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return i(),!1;const D=this.fsw._getWatchHelpers(e,r);!D.hasGlob&&n&&(D.hasGlob=n.hasGlob,D.globFilter=n.globFilter,D.filterPath=o=>n.filterPath(o),D.filterDir=o=>n.filterDir(o));try{const o=await ta[D.statMethod](D.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(D.watchPath,o))return i(),!1;const a=this.fsw.options.followSymlinks&&!e.includes(Xo)&&!e.includes(qo);let c;if(o.isDirectory()){const f=L.resolve(e),l=a?await eu(e):e;if(this.fsw.closed||(c=await this._handleDir(D.watchPath,o,u,r,s,D,l),this.fsw.closed))return;f!==l&&l!==void 0&&this.fsw._symlinkPaths.set(f,l)}else if(o.isSymbolicLink()){const f=a?await eu(e):e;if(this.fsw.closed)return;const l=L.dirname(D.watchPath);if(this.fsw._getWatchedDir(l).add(D.watchPath),this.fsw._emit(ut,D.watchPath,o),c=await this._handleDir(l,o,u,r,e,D,f),this.fsw.closed)return;f!==void 0&&this.fsw._symlinkPaths.set(L.resolve(e),f)}else c=this._handleFile(D.watchPath,o,u);return i(),this.fsw._addPathCloser(e,c),!1}catch(o){if(this.fsw._handleError(o))return i(),e}}}var ia=sa,nu={exports:{}};const ru=De.default,I=K.default,{promisify:su}=Ae.default;let _e;try{_e=Ie.require("fsevents")}catch(t){process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR&&console.error(t)}if(_e){const t=process.version.match(/v(\d+)\.(\d+)/);if(t&&t[1]&&t[2]){const e=Number.parseInt(t[1],10),u=Number.parseInt(t[2],10);e===8&&u<16&&(_e=void 0)}}const{EV_ADD:iu,EV_CHANGE:Da,EV_ADD_DIR:or,EV_UNLINK:st,EV_ERROR:oa,STR_DATA:aa,STR_END:la,FSEVENT_CREATED:ca,FSEVENT_MODIFIED:fa,FSEVENT_DELETED:ha,FSEVENT_MOVED:da,FSEVENT_UNKNOWN:Ea,FSEVENT_TYPE_FILE:pa,FSEVENT_TYPE_DIRECTORY:xe,FSEVENT_TYPE_SYMLINK:ar,ROOT_GLOBSTAR:lr,DIR_SUFFIX:Ca,DOT_SLASH:cr,FUNCTION_TYPE:Du,EMPTY_FN:Fa,IDENTITY_FN:ga}=et,_a=t=>isNaN(t)?{}:{depth:t},ou=su(ru.stat),ma=su(ru.lstat),fr=su(ru.realpath),Aa={stat:ou,lstat:ma},ce=new Map,ya=10,wa=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),Ra=(t,e)=>({stop:_e.watch(t,e)});function ba(t,e,u,n){let r=I.extname(e)?I.dirname(e):e;const s=I.dirname(r);let i=ce.get(r);va(s)&&(r=s);const D=I.resolve(t),o=D!==e,a=(f,l,p)=>{o&&(f=f.replace(e,D)),(f===D||!f.indexOf(D+I.sep))&&u(f,l,p)};let c=!1;for(const f of ce.keys())if(e.indexOf(I.resolve(f)+I.sep)===0){r=f,i=ce.get(r),c=!0;break}return i||c?i.listeners.add(a):(i={listeners:new Set([a]),rawEmitter:n,watcher:Ra(r,(f,l)=>{if(!i.listeners.size)return;const p=_e.getInfo(f,l);i.listeners.forEach(C=>{C(f,l,p)}),i.rawEmitter(p.event,f,p)})},ce.set(r,i)),()=>{const f=i.listeners;if(f.delete(a),!f.size&&(ce.delete(r),i.watcher))return i.watcher.stop().then(()=>{i.rawEmitter=i.watcher=void 0,Object.freeze(i)})}}const va=t=>{let e=0;for(const u of ce.keys())if(u.indexOf(t)===0&&(e++,e>=ya))return!0;return!1},Ba=()=>_e&&ce.size<128,au=(t,e)=>{let u=0;for(;!t.indexOf(e)&&(t=I.dirname(t))!==e;)u++;return u},hr=(t,e)=>t.type===xe&&e.isDirectory()||t.type===ar&&e.isSymbolicLink()||t.type===pa&&e.isFile();class $a{constructor(e){this.fsw=e}checkIgnored(e,u){const n=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,u))return n.add(e),u&&u.isDirectory()&&n.add(e+lr),!0;n.delete(e),n.delete(e+lr)}addOrChange(e,u,n,r,s,i,D,o){const a=s.has(i)?Da:iu;this.handleEvent(a,e,u,n,r,s,i,D,o)}async checkExists(e,u,n,r,s,i,D,o){try{const a=await ou(e);if(this.fsw.closed)return;hr(D,a)?this.addOrChange(e,u,n,r,s,i,D,o):this.handleEvent(st,e,u,n,r,s,i,D,o)}catch(a){a.code==="EACCES"?this.addOrChange(e,u,n,r,s,i,D,o):this.handleEvent(st,e,u,n,r,s,i,D,o)}}handleEvent(e,u,n,r,s,i,D,o,a){if(!(this.fsw.closed||this.checkIgnored(u)))if(e===st){const c=o.type===xe;(c||i.has(D))&&this.fsw._remove(s,D,c)}else{if(e===iu){if(o.type===xe&&this.fsw._getWatchedDir(u),o.type===ar&&a.followSymlinks){const f=a.depth===void 0?void 0:au(n,r)+1;return this._addToFsEvents(u,!1,!0,f)}this.fsw._getWatchedDir(s).add(D)}const c=o.type===xe?e+Ca:e;this.fsw._emit(c,u),c===or&&this._addToFsEvents(u,!1,!0)}}_watchWithFsEvents(e,u,n,r){if(this.fsw.closed||this.fsw._isIgnored(e))return;const s=this.fsw.options,D=ba(e,u,async(o,a,c)=>{if(this.fsw.closed||s.depth!==void 0&&au(o,u)>s.depth)return;const f=n(I.join(e,I.relative(e,o)));if(r&&!r(f))return;const l=I.dirname(f),p=I.basename(f),C=this.fsw._getWatchedDir(c.type===xe?f:l);if(wa.has(a)||c.event===Ea)if(typeof s.ignored===Du){let F;try{F=await ou(f)}catch{}if(this.fsw.closed||this.checkIgnored(f,F))return;hr(c,F)?this.addOrChange(f,o,u,l,C,p,c,s):this.handleEvent(st,f,o,u,l,C,p,c,s)}else this.checkExists(f,o,u,l,C,p,c,s);else switch(c.event){case ca:case fa:return this.addOrChange(f,o,u,l,C,p,c,s);case ha:case da:return this.checkExists(f,o,u,l,C,p,c,s)}},this.fsw._emitRaw);return this.fsw._emitReady(),D}async _handleFsEventsSymlink(e,u,n,r){if(!(this.fsw.closed||this.fsw._symlinkPaths.has(u))){this.fsw._symlinkPaths.set(u,!0),this.fsw._incrReadyCount();try{const s=await fr(e);if(this.fsw.closed)return;if(this.fsw._isIgnored(s))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents(s||e,i=>{let D=e;return s&&s!==cr?D=i.replace(s,e):i!==cr&&(D=I.join(e,i)),n(D)},!1,r)}catch(s){if(this.fsw._handleError(s))return this.fsw._emitReady()}}}emitAdd(e,u,n,r,s){const i=n(e),D=u.isDirectory(),o=this.fsw._getWatchedDir(I.dirname(i)),a=I.basename(i);D&&this.fsw._getWatchedDir(i),!o.has(a)&&(o.add(a),(!r.ignoreInitial||s===!0)&&this.fsw._emit(D?or:iu,i,u))}initWatch(e,u,n,r){if(this.fsw.closed)return;const s=this._watchWithFsEvents(n.watchPath,I.resolve(e||n.watchPath),r,n.globFilter);this.fsw._addPathCloser(u,s)}async _addToFsEvents(e,u,n,r){if(this.fsw.closed)return;const s=this.fsw.options,i=typeof u===Du?u:ga,D=this.fsw._getWatchHelpers(e);try{const o=await Aa[D.statMethod](D.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(D.watchPath,o))throw null;if(o.isDirectory()){if(D.globFilter||this.emitAdd(i(e),o,i,s,n),r&&r>s.depth)return;this.fsw._readdirp(D.watchPath,{fileFilter:a=>D.filterPath(a),directoryFilter:a=>D.filterDir(a),..._a(s.depth-(r||0))}).on(aa,a=>{if(this.fsw.closed||a.stats.isDirectory()&&!D.filterPath(a))return;const c=I.join(D.watchPath,a.path),{fullPath:f}=a;if(D.followSymlinks&&a.stats.isSymbolicLink()){const l=s.depth===void 0?void 0:au(c,I.resolve(D.watchPath))+1;this._handleFsEventsSymlink(c,f,i,l)}else this.emitAdd(c,a.stats,i,s,n)}).on(oa,Fa).on(la,()=>{this.fsw._emitReady()})}else this.emitAdd(D.watchPath,o,i,s,n),this.fsw._emitReady()}catch(o){(!o||this.fsw._handleError(o))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(s.persistent&&n!==!0)if(typeof u===Du)this.initWatch(void 0,e,D,i);else{let o;try{o=await fr(D.watchPath)}catch{}this.initWatch(o,e,D,i)}}}nu.exports=$a,nu.exports.canUse=Ba;const{EventEmitter:Sa}=jr.default,lu=De.default,B=K.default,{promisify:dr}=Ae.default,Ta=$D,cu=Kt.exports.default,xa=KD,fu=Nn,Oa=No,Na=$n,Ha=ia,Er=nu.exports,{EV_ALL:hu,EV_READY:Pa,EV_ADD:it,EV_CHANGE:Oe,EV_UNLINK:pr,EV_ADD_DIR:La,EV_UNLINK_DIR:Ia,EV_RAW:ka,EV_ERROR:du,STR_CLOSE:Ma,STR_END:Wa,BACK_SLASH_RE:Ga,DOUBLE_SLASH_RE:Cr,SLASH_OR_BACK_SLASH_RE:ja,DOT_RE:Ua,REPLACER_RE:Ka,SLASH:Eu,SLASH_SLASH:Va,BRACE_START:za,BANG:pu,ONE_DOT:Fr,TWO_DOTS:Ya,GLOBSTAR:qa,SLASH_GLOBSTAR:Cu,ANYMATCH_OPTS:Fu,STRING_TYPE:gu,FUNCTION_TYPE:Xa,EMPTY_STR:_u,EMPTY_FN:Qa,isWindows:Za,isMacos:Ja,isIBMi:el}=et,tl=dr(lu.stat),ul=dr(lu.readdir),mu=(t=[])=>Array.isArray(t)?t:[t],gr=(t,e=[])=>(t.forEach(u=>{Array.isArray(u)?gr(u,e):e.push(u)}),e),_r=t=>{const e=gr(mu(t));if(!e.every(u=>typeof u===gu))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(Ar)},mr=t=>{let e=t.replace(Ga,Eu),u=!1;for(e.startsWith(Va)&&(u=!0);e.match(Cr);)e=e.replace(Cr,Eu);return u&&(e=Eu+e),e},Ar=t=>mr(B.normalize(mr(t))),yr=(t=_u)=>e=>typeof e!==gu?e:Ar(B.isAbsolute(e)?e:B.join(t,e)),nl=(t,e)=>B.isAbsolute(t)?t:t.startsWith(pu)?pu+B.join(e,t.slice(1)):B.join(e,t),q=(t,e)=>t[e]===void 0;class rl{constructor(e,u){this.path=e,this._removeWatcher=u,this.items=new Set}add(e){const{items:u}=this;!u||e!==Fr&&e!==Ya&&u.add(e)}async remove(e){const{items:u}=this;if(!u||(u.delete(e),u.size>0))return;const n=this.path;try{await ul(n)}catch{this._removeWatcher&&this._removeWatcher(B.dirname(n),B.basename(n))}}has(e){const{items:u}=this;if(!!u)return u.has(e)}getChildren(){const{items:e}=this;if(!!e)return[...e.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}}const sl="stat",il="lstat";class Dl{constructor(e,u,n,r){this.fsw=r,this.path=e=e.replace(Ka,_u),this.watchPath=u,this.fullWatchPath=B.resolve(u),this.hasGlob=u!==e,e===_u&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&n?void 0:!1,this.globFilter=this.hasGlob?cu(e,void 0,Fu):!1,this.dirParts=this.getDirParts(e),this.dirParts.forEach(s=>{s.length>1&&s.pop()}),this.followSymlinks=n,this.statMethod=n?sl:il}checkGlobSymlink(e){return this.globSymlink===void 0&&(this.globSymlink=e.fullParentDir===this.fullWatchPath?!1:{realPath:e.fullParentDir,linkPath:this.fullWatchPath}),this.globSymlink?e.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath):e.fullPath}entryPath(e){return B.join(this.watchPath,B.relative(this.watchPath,this.checkGlobSymlink(e)))}filterPath(e){const{stats:u}=e;if(u&&u.isSymbolicLink())return this.filterDir(e);const n=this.entryPath(e);return(this.hasGlob&&typeof this.globFilter===Xa?this.globFilter(n):!0)&&this.fsw._isntIgnored(n,u)&&this.fsw._hasReadPermissions(u)}getDirParts(e){if(!this.hasGlob)return[];const u=[];return(e.includes(za)?Oa.expand(e):[e]).forEach(r=>{u.push(B.relative(this.watchPath,r).split(ja))}),u}filterDir(e){if(this.hasGlob){const u=this.getDirParts(this.checkGlobSymlink(e));let n=!1;this.unmatchedGlob=!this.dirParts.some(r=>r.every((s,i)=>(s===qa&&(n=!0),n||!u[0][i]||cu(s,u[0][i],Fu))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}}class ol extends Sa{constructor(e){super();const u={};e&&Object.assign(u,e),this._watched=new Map,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._symlinkPaths=new Map,this._streams=new Set,this.closed=!1,q(u,"persistent")&&(u.persistent=!0),q(u,"ignoreInitial")&&(u.ignoreInitial=!1),q(u,"ignorePermissionErrors")&&(u.ignorePermissionErrors=!1),q(u,"interval")&&(u.interval=100),q(u,"binaryInterval")&&(u.binaryInterval=300),q(u,"disableGlobbing")&&(u.disableGlobbing=!1),u.enableBinaryInterval=u.binaryInterval!==u.interval,q(u,"useFsEvents")&&(u.useFsEvents=!u.usePolling),Er.canUse()||(u.useFsEvents=!1),q(u,"usePolling")&&!u.useFsEvents&&(u.usePolling=Ja),el&&(u.usePolling=!0);const r=process.env.CHOKIDAR_USEPOLLING;if(r!==void 0){const o=r.toLowerCase();o==="false"||o==="0"?u.usePolling=!1:o==="true"||o==="1"?u.usePolling=!0:u.usePolling=!!o}const s=process.env.CHOKIDAR_INTERVAL;s&&(u.interval=Number.parseInt(s,10)),q(u,"atomic")&&(u.atomic=!u.usePolling&&!u.useFsEvents),u.atomic&&(this._pendingUnlinks=new Map),q(u,"followSymlinks")&&(u.followSymlinks=!0),q(u,"awaitWriteFinish")&&(u.awaitWriteFinish=!1),u.awaitWriteFinish===!0&&(u.awaitWriteFinish={});const i=u.awaitWriteFinish;i&&(i.stabilityThreshold||(i.stabilityThreshold=2e3),i.pollInterval||(i.pollInterval=100),this._pendingWrites=new Map),u.ignored&&(u.ignored=mu(u.ignored));let D=0;this._emitReady=()=>{D++,D>=this._readyCount&&(this._emitReady=Qa,this._readyEmitted=!0,process.nextTick(()=>this.emit(Pa)))},this._emitRaw=(...o)=>this.emit(ka,...o),this._readyEmitted=!1,this.options=u,u.useFsEvents?this._fsEventsHandler=new Er(this):this._nodeFsHandler=new Ha(this),Object.freeze(u)}add(e,u,n){const{cwd:r,disableGlobbing:s}=this.options;this.closed=!1;let i=_r(e);return r&&(i=i.map(D=>{const o=nl(D,r);return s||!fu(D)?o:Na(o)})),i=i.filter(D=>D.startsWith(pu)?(this._ignoredPaths.add(D.slice(1)),!1):(this._ignoredPaths.delete(D),this._ignoredPaths.delete(D+Cu),this._userIgnored=void 0,!0)),this.options.useFsEvents&&this._fsEventsHandler?(this._readyCount||(this._readyCount=i.length),this.options.persistent&&(this._readyCount*=2),i.forEach(D=>this._fsEventsHandler._addToFsEvents(D))):(this._readyCount||(this._readyCount=0),this._readyCount+=i.length,Promise.all(i.map(async D=>{const o=await this._nodeFsHandler._addToNodeFs(D,!n,0,0,u);return o&&this._emitReady(),o})).then(D=>{this.closed||D.filter(o=>o).forEach(o=>{this.add(B.dirname(o),B.basename(u||o))})})),this}unwatch(e){if(this.closed)return this;const u=_r(e),{cwd:n}=this.options;return u.forEach(r=>{!B.isAbsolute(r)&&!this._closers.has(r)&&(n&&(r=B.join(n,r)),r=B.resolve(r)),this._closePath(r),this._ignoredPaths.add(r),this._watched.has(r)&&this._ignoredPaths.add(r+Cu),this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();const e=[];return this._closers.forEach(u=>u.forEach(n=>{const r=n();r instanceof Promise&&e.push(r)})),this._streams.forEach(u=>u.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(u=>u.dispose()),["closers","watched","streams","symlinkPaths","throttled"].forEach(u=>{this[`_${u}`].clear()}),this._closePromise=e.length?Promise.all(e).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){const e={};return this._watched.forEach((u,n)=>{const r=this.options.cwd?B.relative(this.options.cwd,n):n;e[r||Fr]=u.getChildren().sort()}),e}emitWithAll(e,u){this.emit(...u),e!==du&&this.emit(hu,...u)}async _emit(e,u,n,r,s){if(this.closed)return;const i=this.options;Za&&(u=B.normalize(u)),i.cwd&&(u=B.relative(i.cwd,u));const D=[e,u];s!==void 0?D.push(n,r,s):r!==void 0?D.push(n,r):n!==void 0&&D.push(n);const o=i.awaitWriteFinish;let a;if(o&&(a=this._pendingWrites.get(u)))return a.lastChange=new Date,this;if(i.atomic){if(e===pr)return this._pendingUnlinks.set(u,D),setTimeout(()=>{this._pendingUnlinks.forEach((c,f)=>{this.emit(...c),this.emit(hu,...c),this._pendingUnlinks.delete(f)})},typeof i.atomic=="number"?i.atomic:100),this;e===it&&this._pendingUnlinks.has(u)&&(e=D[0]=Oe,this._pendingUnlinks.delete(u))}if(o&&(e===it||e===Oe)&&this._readyEmitted){const c=(f,l)=>{f?(e=D[0]=du,D[1]=f,this.emitWithAll(e,D)):l&&(D.length>2?D[2]=l:D.push(l),this.emitWithAll(e,D))};return this._awaitWriteFinish(u,o.stabilityThreshold,e,c),this}if(e===Oe&&!this._throttle(Oe,u,50))return this;if(i.alwaysStat&&n===void 0&&(e===it||e===La||e===Oe)){const c=i.cwd?B.join(i.cwd,u):u;let f;try{f=await tl(c)}catch{}if(!f||this.closed)return;D.push(f)}return this.emitWithAll(e,D),this}_handleError(e){const u=e&&e.code;return e&&u!=="ENOENT"&&u!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||u!=="EPERM"&&u!=="EACCES")&&this.emit(du,e),e||this.closed}_throttle(e,u,n){this._throttled.has(e)||this._throttled.set(e,new Map);const r=this._throttled.get(e),s=r.get(u);if(s)return s.count++,!1;let i;const D=()=>{const a=r.get(u),c=a?a.count:0;return r.delete(u),clearTimeout(i),a&&clearTimeout(a.timeoutObject),c};i=setTimeout(D,n);const o={timeoutObject:i,clear:D,count:0};return r.set(u,o),o}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,u,n,r){let s,i=e;this.options.cwd&&!B.isAbsolute(e)&&(i=B.join(this.options.cwd,e));const D=new Date,o=a=>{lu.stat(i,(c,f)=>{if(c||!this._pendingWrites.has(e)){c&&c.code!=="ENOENT"&&r(c);return}const l=Number(new Date);a&&f.size!==a.size&&(this._pendingWrites.get(e).lastChange=l);const p=this._pendingWrites.get(e);l-p.lastChange>=u?(this._pendingWrites.delete(e),r(void 0,f)):s=setTimeout(o,this.options.awaitWriteFinish.pollInterval,f)})};this._pendingWrites.has(e)||(this._pendingWrites.set(e,{lastChange:D,cancelWait:()=>(this._pendingWrites.delete(e),clearTimeout(s),n)}),s=setTimeout(o,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,u){if(this.options.atomic&&Ua.test(e))return!0;if(!this._userIgnored){const{cwd:n}=this.options,r=this.options.ignored,s=r&&r.map(yr(n)),i=mu(s).filter(o=>typeof o===gu&&!fu(o)).map(o=>o+Cu),D=this._getGlobIgnored().map(yr(n)).concat(s,i);this._userIgnored=cu(D,void 0,Fu)}return this._userIgnored([e,u])}_isntIgnored(e,u){return!this._isIgnored(e,u)}_getWatchHelpers(e,u){const n=u||this.options.disableGlobbing||!fu(e)?e:xa(e),r=this.options.followSymlinks;return new Dl(e,n,r,this)}_getWatchedDir(e){this._boundRemove||(this._boundRemove=this._remove.bind(this));const u=B.resolve(e);return this._watched.has(u)||this._watched.set(u,new rl(u,this._boundRemove)),this._watched.get(u)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return!0;const n=(e&&Number.parseInt(e.mode,10))&511,r=Number.parseInt(n.toString(8)[0],10);return Boolean(4&r)}_remove(e,u,n){const r=B.join(e,u),s=B.resolve(r);if(n=n!=null?n:this._watched.has(r)||this._watched.has(s),!this._throttle("remove",r,100))return;!n&&!this.options.useFsEvents&&this._watched.size===1&&this.add(e,u,!0),this._getWatchedDir(r).getChildren().forEach(l=>this._remove(r,l));const o=this._getWatchedDir(e),a=o.has(u);o.remove(u),this._symlinkPaths.has(s)&&this._symlinkPaths.delete(s);let c=r;if(this.options.cwd&&(c=B.relative(this.options.cwd,r)),this.options.awaitWriteFinish&&this._pendingWrites.has(c)&&this._pendingWrites.get(c).cancelWait()===it)return;this._watched.delete(r),this._watched.delete(s);const f=n?Ia:pr;a&&!this._isIgnored(r)&&this._emit(f,r),this.options.useFsEvents||this._closePath(r)}_closePath(e){this._closeFile(e);const u=B.dirname(e);this._getWatchedDir(u).remove(B.basename(e))}_closeFile(e){const u=this._closers.get(e);!u||(u.forEach(n=>n()),this._closers.delete(e))}_addPathCloser(e,u){if(!u)return;let n=this._closers.get(e);n||(n=[],this._closers.set(e,n)),n.push(u)}_readdirp(e,u){if(this.closed)return;const n={type:hu,alwaysStat:!0,lstat:!0,...u};let r=Ta(e,n);return this._streams.add(r),r.once(Ma,()=>{r=void 0}),r.once(Wa,()=>{r&&(this._streams.delete(r),r=void 0)}),r}}const al=(t,e)=>{const u=new ol(e);return u.add(t),u};var ll=al;let fe=!0;const me=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let wr=0;if(me.process&&me.process.env&&me.process.stdout){const{FORCE_COLOR:t,NODE_DISABLE_COLORS:e,TERM:u}=me.process.env;e||t==="0"?fe=!1:t==="1"?fe=!0:u==="dumb"?fe=!1:"CI"in me.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(n=>n in me.process.env)?fe=!0:fe=process.stdout.isTTY,fe&&(wr=u&&u.endsWith("-256color")?2:1)}let Rr={enabled:fe,supportLevel:wr};function br(t,e,u=1){const n=`\x1B[${t}m`,r=`\x1B[${e}m`,s=new RegExp(`\\x1b\\[${e}m`,"g");return i=>Rr.enabled&&Rr.supportLevel>=u?n+(""+i).replace(s,n)+r:""+i}const cl=br(90,39),fl=br(96,39),hl=()=>new Date().toLocaleTimeString(),dl=(...t)=>console.log(cl(hl()),fl("[tsx]"),...t),El="\x1Bc";function pl(t,e){let u;return()=>{u&&clearTimeout(u),u=setTimeout(()=>t(),e)}}function Cl(t){return t&&"type"in t&&t.type==="dependency"}const vr={noCache:{type:Boolean,description:"Disable caching",default:!1},tsconfig:{type:String,description:"Custom tsconfig.json path"},clearScreen:{type:Boolean,description:"Clearing the screen on rerun",default:!0},ignore:{type:[String],description:"Paths & globs to exclude from being watched"}},Fl=ai({name:"watch",parameters:["<script path>"],flags:vr,help:{description:"Run the script and watch for changes"}},t=>{const e=ct(vr,process.argv.slice(3),{ignoreUnknown:!0})._,u={noCache:t.flags.noCache,tsconfigPath:t.flags.tsconfig,clearScreen:t.flags.clearScreen,ignore:t.flags.ignore,ipc:!0};let n;const r=pl(()=>{n&&!n.killed&&n.exitCode===null&&n.kill(),n&&dl("rerunning"),u.clearScreen&&process.stdout.write(El),n=cn(e,u),n.on("message",D=>{if(Cl(D)){const o=D.path.startsWith("file:")?Au.fileURLToPath(D.path):D.path;K.default.isAbsolute(o)&&i.add(o)}})},100);r();function s(D){n&&n.kill(),process.exit(D)}process.once("SIGINT",()=>s(130)),process.once("SIGTERM",()=>s(143));const i=ll(t._,{ignoreInitial:!0,ignored:["**/.*/**","**/{node_modules,bower_components,vendor}/**","**/dist/**",...u.ignore],ignorePermissionErrors:!0}).on("all",r);process.stdin.on("data",r)}),Br={noCache:{type:Boolean,description:"Disable caching"},tsconfig:{type:String,description:"Custom tsconfig.json path"}},$r={...Br,version:{type:Boolean,description:"Show version"},help:{type:Boolean,alias:"h",description:"Show help"}};oi({name:"tsx",parameters:["[script path]"],commands:[Fl],flags:$r,help:!1},t=>{const e=t._.length===0;if(e){if(t.flags.version){console.log(Or.version);return}if(t.flags.help){t.showHelp({description:"Node.js runtime enhanced with esbuild for loading TypeScript & ESM"});return}process.argv.push(Ie.require.resolve("./repl"))}const u=ct(e?$r:Br,process.argv.slice(2),{ignoreUnknown:!0})._;cn(u,{noCache:Boolean(t.flags.noCache),tsconfigPath:t.flags.tsconfig}).on("close",n=>process.exit(n))});
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as Ie}from"./pkgroll_create-require-f7a02dc7.js";import $s from"tty";import{v as Ts}from"./package-1a10c063.js";import{pathToFileURL as xs,fileURLToPath as Os}from"url";import Ns from"child_process";import K from"path";import ie from"fs";import Hs from"events";import _e from"util";import Ps from"stream";import _u from"os";import"module";const Au=/-(\w)/g,yu=t=>t.replace(Au,(e,u)=>u.toUpperCase()),wu=/\B([A-Z])/g,Is=t=>t.replace(wu,"-$1").toLowerCase(),{stringify:Ae}=JSON,{hasOwnProperty:Ls}=Object.prototype,Le=(t,e)=>Ls.call(t,e),ks=/^--?/,Ms=/[.:=]/,Ws=t=>{let e=t.replace(ks,""),u;const n=e.match(Ms);if(n!=null&&n.index){const s=n.index;u=e.slice(s+1),e=e.slice(0,s)}return{flagName:e,flagValue:u}},Gs=/[\s.:=]/,js=(t,e)=>{const u=`Invalid flag name ${Ae(e)}:`;if(e.length===0)throw new Error(`${u} flag name cannot be empty}`);if(e.length===1)throw new Error(`${u} single characters are reserved for aliases`);const n=e.match(Gs);if(n)throw new Error(`${u} flag name cannot contain the character ${Ae(n==null?void 0:n[0])}`);let s;if(Au.test(e)?s=yu(e):wu.test(e)&&(s=Is(e)),s&&Le(t,s))throw new Error(`${u} collides with flag ${Ae(s)}`)};function Us(t){const e=new Map;for(const u in t){if(!Le(t,u))continue;js(t,u);const n=t[u];if(n&&typeof n=="object"){const{alias:s}=n;if(typeof s=="string"){if(s.length===0)throw new Error(`Invalid flag alias ${Ae(u)}: flag alias cannot be empty`);if(s.length>1)throw new Error(`Invalid flag alias ${Ae(u)}: flag aliases can only be a single-character`);if(e.has(s))throw new Error(`Flag collision: Alias "${s}" is already used`);e.set(s,{name:u,schema:n})}}}return e}const Ks=t=>!t||typeof t=="function"?!1:Array.isArray(t)||Array.isArray(t.type),Vs=t=>{const e={};for(const u in t)Le(t,u)&&(e[u]=Ks(t[u])?[]:void 0);return e},ot=(t,e)=>t===Number&&e===""?Number.NaN:t===Boolean?e!=="false":e,zs=(t,e)=>{for(const u in t){if(!Le(t,u))continue;const n=t[u];if(!n)continue;const s=e[u];if(!(s!==void 0&&!(Array.isArray(s)&&s.length===0))&&"default"in n){let r=n.default;typeof r=="function"&&(r=r()),e[u]=r}}},Ru=(t,e)=>{if(!e)throw new Error(`Missing type on flag "${t}"`);return typeof e=="function"?e:Array.isArray(e)?e[0]:Ru(t,e.type)},Ys=/^-[\da-z]+/i,qs=/^--[\w-]{2,}/,at="--";function lt(t,e=process.argv.slice(2),u={}){const n=Us(t),s={flags:Vs(t),unknownFlags:{},_:Object.assign([],{[at]:[]})};let r;const i=(o,a,c)=>{const f=Ru(o,a);c=ot(f,c),c!==void 0&&!Number.isNaN(c)?Array.isArray(s.flags[o])?s.flags[o].push(f(c)):s.flags[o]=f(c):r=l=>{Array.isArray(s.flags[o])?s.flags[o].push(f(ot(f,l||""))):s.flags[o]=f(ot(f,l||"")),r=void 0}},D=(o,a)=>{o in s.unknownFlags||(s.unknownFlags[o]=[]),a!==void 0?s.unknownFlags[o].push(a):r=(c=!0)=>{s.unknownFlags[o].push(c),r=void 0}};for(let o=0;o<e.length;o+=1){const a=e[o];if(a===at){const f=e.slice(o+1);s._[at]=f,s._.push(...f);break}const c=Ys.test(a);if(qs.test(a)||c){r&&r();const f=Ws(a),{flagValue:l}=f;let{flagName:p}=f;if(c){for(let F=0;F<p.length;F+=1){const y=p[F],b=n.get(y),N=F===p.length-1;b?i(b.name,b.schema,N?l:!0):u!=null&&u.ignoreUnknown?s._.push(a):D(y,N?l:!0)}continue}let C=t[p];if(!C){const F=yu(p);C=t[F],C&&(p=F)}if(!C){u!=null&&u.ignoreUnknown?s._.push(a):D(p,l);continue}i(p,C,l)}else r?r(a):s._.push(a)}return r&&r(),zs(t,s.flags),s}var Xs=Object.create,ke=Object.defineProperty,Qs=Object.defineProperties,Zs=Object.getOwnPropertyDescriptor,Js=Object.getOwnPropertyDescriptors,er=Object.getOwnPropertyNames,bu=Object.getOwnPropertySymbols,tr=Object.getPrototypeOf,vu=Object.prototype.hasOwnProperty,ur=Object.prototype.propertyIsEnumerable,Bu=(t,e,u)=>e in t?ke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,Me=(t,e)=>{for(var u in e||(e={}))vu.call(e,u)&&Bu(t,u,e[u]);if(bu)for(var u of bu(e))ur.call(e,u)&&Bu(t,u,e[u]);return t},ct=(t,e)=>Qs(t,Js(e)),nr=t=>ke(t,"__esModule",{value:!0}),sr=(t,e)=>()=>(t&&(e=t(t=0)),e),rr=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ir=(t,e,u,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of er(e))!vu.call(t,s)&&(u||s!=="default")&&ke(t,s,{get:()=>e[s],enumerable:!(n=Zs(e,s))||n.enumerable});return t},Dr=(t,e)=>ir(nr(ke(t!=null?Xs(tr(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),U=sr(()=>{}),or=rr((t,e)=>{U(),e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});U(),U(),U();var ar=t=>{var e,u,n;let s=(e=process.stdout.columns)!=null?e:Number.POSITIVE_INFINITY;return typeof t=="function"&&(t=t(s)),t||(t={}),Array.isArray(t)?{columns:t,stdoutColumns:s}:{columns:(u=t.columns)!=null?u:[],stdoutColumns:(n=t.stdoutColumns)!=null?n:s}};U(),U(),U(),U(),U();function lr({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}function Su(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(lr(),"")}U();function cr(t){return Number.isInteger(t)?t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141):!1}var fr=Dr(or(),1);function De(t){if(typeof t!="string"||t.length===0||(t=Su(t),t.length===0))return 0;t=t.replace((0,fr.default)()," ");let e=0;for(let u=0;u<t.length;u++){let n=t.codePointAt(u);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&u++,e+=cr(n)?2:1)}return e}var $u=t=>Math.max(...t.split(`
|
|
2
|
+
import{r as Ie}from"./pkgroll_create-require-cf330718.js";import $s from"tty";import{v as Ts}from"./package-767bbb00.js";import{pathToFileURL as xs,fileURLToPath as Os}from"url";import Ns from"child_process";import K from"path";import ie from"fs";import Hs from"events";import _e from"util";import Ps from"stream";import _u from"os";import"module";const Au=/-(\w)/g,yu=t=>t.replace(Au,(e,u)=>u.toUpperCase()),wu=/\B([A-Z])/g,Is=t=>t.replace(wu,"-$1").toLowerCase(),{stringify:Ae}=JSON,{hasOwnProperty:Ls}=Object.prototype,Le=(t,e)=>Ls.call(t,e),ks=/^--?/,Ms=/[.:=]/,Ws=t=>{let e=t.replace(ks,""),u;const n=e.match(Ms);if(n!=null&&n.index){const s=n.index;u=e.slice(s+1),e=e.slice(0,s)}return{flagName:e,flagValue:u}},Gs=/[\s.:=]/,js=(t,e)=>{const u=`Invalid flag name ${Ae(e)}:`;if(e.length===0)throw new Error(`${u} flag name cannot be empty}`);if(e.length===1)throw new Error(`${u} single characters are reserved for aliases`);const n=e.match(Gs);if(n)throw new Error(`${u} flag name cannot contain the character ${Ae(n==null?void 0:n[0])}`);let s;if(Au.test(e)?s=yu(e):wu.test(e)&&(s=Is(e)),s&&Le(t,s))throw new Error(`${u} collides with flag ${Ae(s)}`)};function Us(t){const e=new Map;for(const u in t){if(!Le(t,u))continue;js(t,u);const n=t[u];if(n&&typeof n=="object"){const{alias:s}=n;if(typeof s=="string"){if(s.length===0)throw new Error(`Invalid flag alias ${Ae(u)}: flag alias cannot be empty`);if(s.length>1)throw new Error(`Invalid flag alias ${Ae(u)}: flag aliases can only be a single-character`);if(e.has(s))throw new Error(`Flag collision: Alias "${s}" is already used`);e.set(s,{name:u,schema:n})}}}return e}const Ks=t=>!t||typeof t=="function"?!1:Array.isArray(t)||Array.isArray(t.type),Vs=t=>{const e={};for(const u in t)Le(t,u)&&(e[u]=Ks(t[u])?[]:void 0);return e},ot=(t,e)=>t===Number&&e===""?Number.NaN:t===Boolean?e!=="false":e,zs=(t,e)=>{for(const u in t){if(!Le(t,u))continue;const n=t[u];if(!n)continue;const s=e[u];if(!(s!==void 0&&!(Array.isArray(s)&&s.length===0))&&"default"in n){let r=n.default;typeof r=="function"&&(r=r()),e[u]=r}}},Ru=(t,e)=>{if(!e)throw new Error(`Missing type on flag "${t}"`);return typeof e=="function"?e:Array.isArray(e)?e[0]:Ru(t,e.type)},Ys=/^-[\da-z]+/i,qs=/^--[\w-]{2,}/,at="--";function lt(t,e=process.argv.slice(2),u={}){const n=Us(t),s={flags:Vs(t),unknownFlags:{},_:Object.assign([],{[at]:[]})};let r;const i=(o,a,c)=>{const f=Ru(o,a);c=ot(f,c),c!==void 0&&!Number.isNaN(c)?Array.isArray(s.flags[o])?s.flags[o].push(f(c)):s.flags[o]=f(c):r=l=>{Array.isArray(s.flags[o])?s.flags[o].push(f(ot(f,l||""))):s.flags[o]=f(ot(f,l||"")),r=void 0}},D=(o,a)=>{o in s.unknownFlags||(s.unknownFlags[o]=[]),a!==void 0?s.unknownFlags[o].push(a):r=(c=!0)=>{s.unknownFlags[o].push(c),r=void 0}};for(let o=0;o<e.length;o+=1){const a=e[o];if(a===at){const f=e.slice(o+1);s._[at]=f,s._.push(...f);break}const c=Ys.test(a);if(qs.test(a)||c){r&&r();const f=Ws(a),{flagValue:l}=f;let{flagName:p}=f;if(c){for(let F=0;F<p.length;F+=1){const y=p[F],b=n.get(y),N=F===p.length-1;b?i(b.name,b.schema,N?l:!0):u!=null&&u.ignoreUnknown?s._.push(a):D(y,N?l:!0)}continue}let C=t[p];if(!C){const F=yu(p);C=t[F],C&&(p=F)}if(!C){u!=null&&u.ignoreUnknown?s._.push(a):D(p,l);continue}i(p,C,l)}else r?r(a):s._.push(a)}return r&&r(),zs(t,s.flags),s}var Xs=Object.create,ke=Object.defineProperty,Qs=Object.defineProperties,Zs=Object.getOwnPropertyDescriptor,Js=Object.getOwnPropertyDescriptors,er=Object.getOwnPropertyNames,bu=Object.getOwnPropertySymbols,tr=Object.getPrototypeOf,vu=Object.prototype.hasOwnProperty,ur=Object.prototype.propertyIsEnumerable,Bu=(t,e,u)=>e in t?ke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,Me=(t,e)=>{for(var u in e||(e={}))vu.call(e,u)&&Bu(t,u,e[u]);if(bu)for(var u of bu(e))ur.call(e,u)&&Bu(t,u,e[u]);return t},ct=(t,e)=>Qs(t,Js(e)),nr=t=>ke(t,"__esModule",{value:!0}),sr=(t,e)=>()=>(t&&(e=t(t=0)),e),rr=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ir=(t,e,u,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of er(e))!vu.call(t,s)&&(u||s!=="default")&&ke(t,s,{get:()=>e[s],enumerable:!(n=Zs(e,s))||n.enumerable});return t},Dr=(t,e)=>ir(nr(ke(t!=null?Xs(tr(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),U=sr(()=>{}),or=rr((t,e)=>{U(),e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});U(),U(),U();var ar=t=>{var e,u,n;let s=(e=process.stdout.columns)!=null?e:Number.POSITIVE_INFINITY;return typeof t=="function"&&(t=t(s)),t||(t={}),Array.isArray(t)?{columns:t,stdoutColumns:s}:{columns:(u=t.columns)!=null?u:[],stdoutColumns:(n=t.stdoutColumns)!=null?n:s}};U(),U(),U(),U(),U();function lr({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}function Su(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(lr(),"")}U();function cr(t){return Number.isInteger(t)?t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141):!1}var fr=Dr(or(),1);function De(t){if(typeof t!="string"||t.length===0||(t=Su(t),t.length===0))return 0;t=t.replace((0,fr.default)()," ");let e=0;for(let u=0;u<t.length;u++){let n=t.codePointAt(u);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&u++,e+=cr(n)?2:1)}return e}var $u=t=>Math.max(...t.split(`
|
|
3
3
|
`).map(De)),hr=t=>{let e=[];for(let u of t){let{length:n}=u,s=n-e.length;for(let r=0;r<s;r+=1)e.push(0);for(let r=0;r<n;r+=1){let i=$u(u[r]);i>e[r]&&(e[r]=i)}}return e};U();var Tu=/^\d+%$/,xu={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},dr=(t,e)=>{var u;let n=[];for(let s=0;s<t.length;s+=1){let r=(u=e[s])!=null?u:"auto";if(typeof r=="number"||r==="auto"||r==="content-width"||typeof r=="string"&&Tu.test(r)){n.push(ct(Me({},xu),{width:r,contentWidth:t[s]}));continue}if(r&&typeof r=="object"){let i=ct(Me(Me({},xu),r),{contentWidth:t[s]});i.horizontalPadding=i.paddingLeft+i.paddingRight,n.push(i);continue}throw new Error(`Invalid column width: ${JSON.stringify(r)}`)}return n};function Er(t,e){for(let u of t){let{width:n}=u;if(n==="content-width"&&(u.width=u.contentWidth),n==="auto"){let o=Math.min(20,u.contentWidth);u.width=o,u.autoOverflow=u.contentWidth-o}if(typeof n=="string"&&Tu.test(n)){let o=Number.parseFloat(n.slice(0,-1))/100;u.width=Math.floor(e*o)-(u.paddingLeft+u.paddingRight)}let{horizontalPadding:s}=u,r=1,i=r+s;if(i>=e){let o=i-e,a=Math.ceil(u.paddingLeft/s*o),c=o-a;u.paddingLeft-=a,u.paddingRight-=c,u.horizontalPadding=u.paddingLeft+u.paddingRight}u.paddingLeftString=u.paddingLeft?" ".repeat(u.paddingLeft):"",u.paddingRightString=u.paddingRight?" ".repeat(u.paddingRight):"";let D=e-u.horizontalPadding;u.width=Math.max(Math.min(u.width,D),r)}}var Ou=()=>Object.assign([],{columns:0});function pr(t,e){let u=[Ou()],[n]=u;for(let s of t){let r=s.width+s.horizontalPadding;n.columns+r>e&&(n=Ou(),u.push(n)),n.push(s),n.columns+=r}for(let s of u){let r=s.reduce((l,p)=>l+p.width+p.horizontalPadding,0),i=e-r;if(i===0)continue;let D=s.filter(l=>"autoOverflow"in l),o=D.filter(l=>l.autoOverflow>0),a=o.reduce((l,p)=>l+p.autoOverflow,0),c=Math.min(a,i);for(let l of o){let p=Math.floor(l.autoOverflow/a*c);l.width+=p,i-=p}let f=Math.floor(i/D.length);for(let l=0;l<D.length;l+=1){let p=D[l];l===D.length-1?p.width+=i:p.width+=f,i-=f}}return u}function Cr(t,e,u){let n=dr(u,e);return Er(n,t),pr(n,t)}U(),U(),U();var ft=10,Nu=(t=0)=>e=>`\x1B[${e+t}m`,Hu=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Pu=(t=0)=>(e,u,n)=>`\x1B[${38+t};2;${e};${u};${n}m`;function Fr(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],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]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[u,n]of Object.entries(e)){for(let[s,r]of Object.entries(n))e[s]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[s]=e[s],t.set(r[0],r[1]);Object.defineProperty(e,u,{value:n,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=Nu(),e.color.ansi256=Hu(),e.color.ansi16m=Pu(),e.bgColor.ansi=Nu(ft),e.bgColor.ansi256=Hu(ft),e.bgColor.ansi16m=Pu(ft),Object.defineProperties(e,{rgbToAnsi256:{value:(u,n,s)=>u===n&&n===s?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(n/255*5)+Math.round(s/255*5),enumerable:!1},hexToRgb:{value:u=>{let n=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(u.toString(16));if(!n)return[0,0,0];let{colorString:s}=n.groups;s.length===3&&(s=s.split("").map(i=>i+i).join(""));let r=Number.parseInt(s,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:u=>e.rgbToAnsi256(...e.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let n,s,r;if(u>=232)n=((u-232)*10+8)/255,s=n,r=n;else{u-=16;let o=u%36;n=Math.floor(u/36)/5,s=Math.floor(o/6)/5,r=o%6/5}let i=Math.max(n,s,r)*2;if(i===0)return 30;let D=30+(Math.round(r)<<2|Math.round(s)<<1|Math.round(n));return i===2&&(D+=60),D},enumerable:!1},rgbToAnsi:{value:(u,n,s)=>e.ansi256ToAnsi(e.rgbToAnsi256(u,n,s)),enumerable:!1},hexToAnsi:{value:u=>e.ansi256ToAnsi(e.hexToAnsi256(u)),enumerable:!1}}),e}var gr=Fr(),mr=gr,We=new Set(["\x1B","\x9B"]),_r=39,ht="\x07",Iu="[",Ar="]",Lu="m",dt=`${Ar}8;;`,ku=t=>`${We.values().next().value}${Iu}${t}${Lu}`,Mu=t=>`${We.values().next().value}${dt}${t}${ht}`,yr=t=>t.split(" ").map(e=>De(e)),Et=(t,e,u)=>{let n=[...e],s=!1,r=!1,i=De(Su(t[t.length-1]));for(let[D,o]of n.entries()){let a=De(o);if(i+a<=u?t[t.length-1]+=o:(t.push(o),i=0),We.has(o)&&(s=!0,r=n.slice(D+1).join("").startsWith(dt)),s){r?o===ht&&(s=!1,r=!1):o===Lu&&(s=!1);continue}i+=a,i===u&&D<n.length-1&&(t.push(""),i=0)}!i&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},wr=t=>{let e=t.split(" "),u=e.length;for(;u>0&&!(De(e[u-1])>0);)u--;return u===e.length?t:e.slice(0,u).join(" ")+e.slice(u).join("")},Rr=(t,e,u={})=>{if(u.trim!==!1&&t.trim()==="")return"";let n="",s,r,i=yr(t),D=[""];for(let[a,c]of t.split(" ").entries()){u.trim!==!1&&(D[D.length-1]=D[D.length-1].trimStart());let f=De(D[D.length-1]);if(a!==0&&(f>=e&&(u.wordWrap===!1||u.trim===!1)&&(D.push(""),f=0),(f>0||u.trim===!1)&&(D[D.length-1]+=" ",f++)),u.hard&&i[a]>e){let l=e-f,p=1+Math.floor((i[a]-l-1)/e);Math.floor((i[a]-1)/e)<p&&D.push(""),Et(D,c,e);continue}if(f+i[a]>e&&f>0&&i[a]>0){if(u.wordWrap===!1&&f<e){Et(D,c,e);continue}D.push("")}if(f+i[a]>e&&u.wordWrap===!1){Et(D,c,e);continue}D[D.length-1]+=c}u.trim!==!1&&(D=D.map(a=>wr(a)));let o=[...D.join(`
|
|
4
4
|
`)];for(let[a,c]of o.entries()){if(n+=c,We.has(c)){let{groups:l}=new RegExp(`(?:\\${Iu}(?<code>\\d+)m|\\${dt}(?<uri>.*)${ht})`).exec(o.slice(a).join(""))||{groups:{}};if(l.code!==void 0){let p=Number.parseFloat(l.code);s=p===_r?void 0:p}else l.uri!==void 0&&(r=l.uri.length===0?void 0:l.uri)}let f=mr.codes.get(Number(s));o[a+1]===`
|
|
5
5
|
`?(r&&(n+=Mu("")),s&&f&&(n+=ku(f))):c===`
|
|
@@ -50,4 +50,4 @@ import{r as Ie}from"./pkgroll_create-require-f7a02dc7.js";import $s from"tty";im
|
|
|
50
50
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
51
51
|
* Licensed under the MIT License.
|
|
52
52
|
*/const zD=_e,Wn=VD,Gn=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),YD=t=>e=>t===!0?Number(e):String(e),qt=t=>typeof t=="number"||typeof t=="string"&&t!=="",be=t=>Number.isInteger(+t),Xt=t=>{let e=`${t}`,u=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++u]==="0";);return u>0},qD=(t,e,u)=>typeof t=="string"||typeof e=="string"?!0:u.stringify===!0,XD=(t,e,u)=>{if(e>0){let n=t[0]==="-"?"-":"";n&&(t=t.slice(1)),t=n+t.padStart(n?e-1:e,"0")}return u===!1?String(t):t},jn=(t,e)=>{let u=t[0]==="-"?"-":"";for(u&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return u?"-"+t:t},QD=(t,e)=>{t.negatives.sort((i,D)=>i<D?-1:i>D?1:0),t.positives.sort((i,D)=>i<D?-1:i>D?1:0);let u=e.capture?"":"?:",n="",s="",r;return t.positives.length&&(n=t.positives.join("|")),t.negatives.length&&(s=`-(${u}${t.negatives.join("|")})`),n&&s?r=`${n}|${s}`:r=n||s,e.wrap?`(${u}${r})`:r},Un=(t,e,u,n)=>{if(u)return Wn(t,e,{wrap:!1,...n});let s=String.fromCharCode(t);if(t===e)return s;let r=String.fromCharCode(e);return`[${s}-${r}]`},Kn=(t,e,u)=>{if(Array.isArray(t)){let n=u.wrap===!0,s=u.capture?"":"?:";return n?`(${s}${t.join("|")})`:t.join("|")}return Wn(t,e,u)},Vn=(...t)=>new RangeError("Invalid range arguments: "+zD.inspect(...t)),zn=(t,e,u)=>{if(u.strictRanges===!0)throw Vn([t,e]);return[]},ZD=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},JD=(t,e,u=1,n={})=>{let s=Number(t),r=Number(e);if(!Number.isInteger(s)||!Number.isInteger(r)){if(n.strictRanges===!0)throw Vn([t,e]);return[]}s===0&&(s=0),r===0&&(r=0);let i=s>r,D=String(t),o=String(e),a=String(u);u=Math.max(Math.abs(u),1);let c=Xt(D)||Xt(o)||Xt(a),f=c?Math.max(D.length,o.length,a.length):0,l=c===!1&&qD(t,e,n)===!1,p=n.transform||YD(l);if(n.toRegex&&u===1)return Un(jn(t,f),jn(e,f),!0,n);let C={negatives:[],positives:[]},F=N=>C[N<0?"negatives":"positives"].push(Math.abs(N)),y=[],b=0;for(;i?s>=r:s<=r;)n.toRegex===!0&&u>1?F(s):y.push(XD(p(s,b),f,l)),s=i?s-u:s+u,b++;return n.toRegex===!0?u>1?QD(C,n):Kn(y,null,{wrap:!1,...n}):y},eo=(t,e,u=1,n={})=>{if(!be(t)&&t.length>1||!be(e)&&e.length>1)return zn(t,e,n);let s=n.transform||(l=>String.fromCharCode(l)),r=`${t}`.charCodeAt(0),i=`${e}`.charCodeAt(0),D=r>i,o=Math.min(r,i),a=Math.max(r,i);if(n.toRegex&&u===1)return Un(o,a,!1,n);let c=[],f=0;for(;D?r>=i:r<=i;)c.push(s(r,f)),r=D?r-u:r+u,f++;return n.toRegex===!0?Kn(c,null,{wrap:!1,options:n}):c},Ze=(t,e,u,n={})=>{if(e==null&&qt(t))return[t];if(!qt(t)||!qt(e))return zn(t,e,n);if(typeof u=="function")return Ze(t,e,1,{transform:u});if(Gn(u))return Ze(t,e,0,u);let s={...n};return s.capture===!0&&(s.wrap=!0),u=u||s.step||1,be(u)?be(t)&&be(e)?JD(t,e,u,s):eo(t,e,Math.max(Math.abs(u),1),s):u!=null&&!Gn(u)?ZD(u,s):Ze(t,e,1,u)};var Yn=Ze;const to=Yn,qn=Qe,uo=(t,e={})=>{let u=(n,s={})=>{let r=qn.isInvalidBrace(s),i=n.invalid===!0&&e.escapeInvalid===!0,D=r===!0||i===!0,o=e.escapeInvalid===!0?"\\":"",a="";if(n.isOpen===!0||n.isClose===!0)return o+n.value;if(n.type==="open")return D?o+n.value:"(";if(n.type==="close")return D?o+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":D?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let c=qn.reduce(n.nodes),f=to(...c,{...e,wrap:!1,toRegex:!0});if(f.length!==0)return c.length>1&&f.length>1?`(${f})`:f}if(n.nodes)for(let c of n.nodes)a+=u(c,n);return a};return u(t)};var no=uo;const so=Yn,Xn=zt,Ce=Qe,ae=(t="",e="",u=!1)=>{let n=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return u?Ce.flatten(e).map(s=>`{${s}}`):e;for(let s of t)if(Array.isArray(s))for(let r of s)n.push(ae(r,e,u));else for(let r of e)u===!0&&typeof r=="string"&&(r=`{${r}}`),n.push(Array.isArray(r)?ae(s,r,u):s+r);return Ce.flatten(n)},ro=(t,e={})=>{let u=e.rangeLimit===void 0?1e3:e.rangeLimit,n=(s,r={})=>{s.queue=[];let i=r,D=r.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,D=i.queue;if(s.invalid||s.dollar){D.push(ae(D.pop(),Xn(s,e)));return}if(s.type==="brace"&&s.invalid!==!0&&s.nodes.length===2){D.push(ae(D.pop(),["{}"]));return}if(s.nodes&&s.ranges>0){let f=Ce.reduce(s.nodes);if(Ce.exceedsLimit(...f,e.step,u))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let l=so(...f,e);l.length===0&&(l=Xn(s,e)),D.push(ae(D.pop(),l)),s.nodes=[];return}let o=Ce.encloseBrace(s),a=s.queue,c=s;for(;c.type!=="brace"&&c.type!=="root"&&c.parent;)c=c.parent,a=c.queue;for(let f=0;f<s.nodes.length;f++){let l=s.nodes[f];if(l.type==="comma"&&s.type==="brace"){f===1&&a.push(""),a.push("");continue}if(l.type==="close"){D.push(ae(D.pop(),a,o));continue}if(l.value&&l.type!=="open"){a.push(ae(a.pop(),l.value));continue}l.nodes&&n(l,s)}return a};return Ce.flatten(n(t))};var io=ro,Do={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
53
|
-
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};const oo=zt,{MAX_LENGTH:Qn,CHAR_BACKSLASH:Qt,CHAR_BACKTICK:ao,CHAR_COMMA:lo,CHAR_DOT:co,CHAR_LEFT_PARENTHESES:fo,CHAR_RIGHT_PARENTHESES:ho,CHAR_LEFT_CURLY_BRACE:Eo,CHAR_RIGHT_CURLY_BRACE:po,CHAR_LEFT_SQUARE_BRACKET:Zn,CHAR_RIGHT_SQUARE_BRACKET:Jn,CHAR_DOUBLE_QUOTE:Co,CHAR_SINGLE_QUOTE:Fo,CHAR_NO_BREAK_SPACE:go,CHAR_ZERO_WIDTH_NOBREAK_SPACE:mo}=Do,_o=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let u=e||{},n=typeof u.maxLength=="number"?Math.min(Qn,u.maxLength):Qn;if(t.length>n)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${n})`);let s={type:"root",input:t,nodes:[]},r=[s],i=s,D=s,o=0,a=t.length,c=0,f=0,l;const p=()=>t[c++],C=F=>{if(F.type==="text"&&D.type==="dot"&&(D.type="text"),D&&D.type==="text"&&F.type==="text"){D.value+=F.value;return}return i.nodes.push(F),F.parent=i,F.prev=D,D=F,F};for(C({type:"bos"});c<a;)if(i=r[r.length-1],l=p(),!(l===mo||l===go)){if(l===Qt){C({type:"text",value:(e.keepEscaping?l:"")+p()});continue}if(l===Jn){C({type:"text",value:"\\"+l});continue}if(l===Zn){o++;let F;for(;c<a&&(F=p());){if(l+=F,F===Zn){o++;continue}if(F===Qt){l+=p();continue}if(F===Jn&&(o--,o===0))break}C({type:"text",value:l});continue}if(l===fo){i=C({type:"paren",nodes:[]}),r.push(i),C({type:"text",value:l});continue}if(l===ho){if(i.type!=="paren"){C({type:"text",value:l});continue}i=r.pop(),C({type:"text",value:l}),i=r[r.length-1];continue}if(l===Co||l===Fo||l===ao){let F=l,y;for(e.keepQuotes!==!0&&(l="");c<a&&(y=p());){if(y===Qt){l+=y+p();continue}if(y===F){e.keepQuotes===!0&&(l+=y);break}l+=y}C({type:"text",value:l});continue}if(l===Eo){f++;let F=D.value&&D.value.slice(-1)==="$"||i.dollar===!0;i=C({type:"brace",open:!0,close:!1,dollar:F,depth:f,commas:0,ranges:0,nodes:[]}),r.push(i),C({type:"open",value:l});continue}if(l===po){if(i.type!=="brace"){C({type:"text",value:l});continue}let F="close";i=r.pop(),i.close=!0,C({type:F,value:l}),f--,i=r[r.length-1];continue}if(l===lo&&f>0){if(i.ranges>0){i.ranges=0;let F=i.nodes.shift();i.nodes=[F,{type:"text",value:oo(i)}]}C({type:"comma",value:l}),i.commas++;continue}if(l===co&&f>0&&i.commas===0){let F=i.nodes;if(f===0||F.length===0){C({type:"text",value:l});continue}if(D.type==="dot"){if(i.range=[],D.value+=l,D.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,D.type="text";continue}i.ranges++,i.args=[];continue}if(D.type==="range"){F.pop();let y=F[F.length-1];y.value+=D.value+l,D=y,i.ranges--;continue}C({type:"dot",value:l});continue}C({type:"text",value:l})}do if(i=r.pop(),i.type!=="root"){i.nodes.forEach(b=>{b.nodes||(b.type==="open"&&(b.isOpen=!0),b.type==="close"&&(b.isClose=!0),b.nodes||(b.type="text"),b.invalid=!0)});let F=r[r.length-1],y=F.nodes.indexOf(i);F.nodes.splice(y,1,...i.nodes)}while(r.length>0);return C({type:"eos"}),s};var Ao=_o;const es=zt,yo=no,wo=io,Ro=Ao,Y=(t,e={})=>{let u=[];if(Array.isArray(t))for(let n of t){let s=Y.create(n,e);Array.isArray(s)?u.push(...s):u.push(s)}else u=[].concat(Y.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(u=[...new Set(u)]),u};Y.parse=(t,e={})=>Ro(t,e),Y.stringify=(t,e={})=>es(typeof t=="string"?Y.parse(t,e):t,e),Y.compile=(t,e={})=>(typeof t=="string"&&(t=Y.parse(t,e)),yo(t,e)),Y.expand=(t,e={})=>{typeof t=="string"&&(t=Y.parse(t,e));let u=wo(t,e);return e.noempty===!0&&(u=u.filter(Boolean)),e.nodupes===!0&&(u=[...new Set(u)]),u},Y.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Y.compile(t,e):Y.expand(t,e);var bo=Y,ts={exports:{}},vo=["3dm","3ds","3g2","3gp","7z","a","aac","adp","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"];(function(t){t.exports=vo})(ts);const Bo=K,So=ts.exports,$o=new Set(So);var To=t=>$o.has(Bo.extname(t).slice(1).toLowerCase()),Je={};(function(t){const{sep:e}=K,{platform:u}=process,n=_u;t.EV_ALL="all",t.EV_READY="ready",t.EV_ADD="add",t.EV_CHANGE="change",t.EV_ADD_DIR="addDir",t.EV_UNLINK="unlink",t.EV_UNLINK_DIR="unlinkDir",t.EV_RAW="raw",t.EV_ERROR="error",t.STR_DATA="data",t.STR_END="end",t.STR_CLOSE="close",t.FSEVENT_CREATED="created",t.FSEVENT_MODIFIED="modified",t.FSEVENT_DELETED="deleted",t.FSEVENT_MOVED="moved",t.FSEVENT_CLONED="cloned",t.FSEVENT_UNKNOWN="unknown",t.FSEVENT_TYPE_FILE="file",t.FSEVENT_TYPE_DIRECTORY="directory",t.FSEVENT_TYPE_SYMLINK="symlink",t.KEY_LISTENERS="listeners",t.KEY_ERR="errHandlers",t.KEY_RAW="rawEmitters",t.HANDLER_KEYS=[t.KEY_LISTENERS,t.KEY_ERR,t.KEY_RAW],t.DOT_SLASH=`.${e}`,t.BACK_SLASH_RE=/\\/g,t.DOUBLE_SLASH_RE=/\/\//,t.SLASH_OR_BACK_SLASH_RE=/[/\\]/,t.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,t.REPLACER_RE=/^\.[/\\]/,t.SLASH="/",t.SLASH_SLASH="//",t.BRACE_START="{",t.BANG="!",t.ONE_DOT=".",t.TWO_DOTS="..",t.STAR="*",t.GLOBSTAR="**",t.ROOT_GLOBSTAR="/**/*",t.SLASH_GLOBSTAR="/**",t.DIR_SUFFIX="Dir",t.ANYMATCH_OPTS={dot:!0},t.STRING_TYPE="string",t.FUNCTION_TYPE="function",t.EMPTY_STR="",t.EMPTY_FN=()=>{},t.IDENTITY_FN=s=>s,t.isWindows=u==="win32",t.isMacos=u==="darwin",t.isLinux=u==="linux",t.isIBMi=n.type()==="OS400"})(Je);const ue=ie,I=K,{promisify:ve}=_e,xo=To,{isWindows:Oo,isLinux:No,EMPTY_FN:Ho,EMPTY_STR:Po,KEY_LISTENERS:Fe,KEY_ERR:Zt,KEY_RAW:Be,HANDLER_KEYS:Io,EV_CHANGE:et,EV_ADD:tt,EV_ADD_DIR:Lo,EV_ERROR:us,STR_DATA:ko,STR_END:Mo,BRACE_START:Wo,STAR:Go}=Je,jo="watch",Uo=ve(ue.open),ns=ve(ue.stat),Ko=ve(ue.lstat),Vo=ve(ue.close),Jt=ve(ue.realpath),zo={lstat:Ko,stat:ns},eu=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},Se=(t,e,u)=>{let n=t[e];n instanceof Set||(t[e]=n=new Set([n])),n.add(u)},Yo=t=>e=>{const u=t[e];u instanceof Set?u.clear():delete t[e]},$e=(t,e,u)=>{const n=t[e];n instanceof Set?n.delete(u):n===u&&delete t[e]},ss=t=>t instanceof Set?t.size===0:!t,ut=new Map;function rs(t,e,u,n,s){const r=(i,D)=>{u(t),s(i,D,{watchedPath:t}),D&&t!==D&&nt(I.resolve(t,D),Fe,I.join(t,D))};try{return ue.watch(t,e,r)}catch(i){n(i)}}const nt=(t,e,u,n,s)=>{const r=ut.get(t);!r||eu(r[e],i=>{i(u,n,s)})},qo=(t,e,u,n)=>{const{listener:s,errHandler:r,rawEmitter:i}=n;let D=ut.get(e),o;if(!u.persistent)return o=rs(t,u,s,r,i),o.close.bind(o);if(D)Se(D,Fe,s),Se(D,Zt,r),Se(D,Be,i);else{if(o=rs(t,u,nt.bind(null,e,Fe),r,nt.bind(null,e,Be)),!o)return;o.on(us,async a=>{const c=nt.bind(null,e,Zt);if(D.watcherUnusable=!0,Oo&&a.code==="EPERM")try{const f=await Uo(t,"r");await Vo(f),c(a)}catch{}else c(a)}),D={listeners:s,errHandlers:r,rawEmitters:i,watcher:o},ut.set(e,D)}return()=>{$e(D,Fe,s),$e(D,Zt,r),$e(D,Be,i),ss(D.listeners)&&(D.watcher.close(),ut.delete(e),Io.forEach(Yo(D)),D.watcher=void 0,Object.freeze(D))}},tu=new Map,Xo=(t,e,u,n)=>{const{listener:s,rawEmitter:r}=n;let i=tu.get(e);const D=i&&i.options;return D&&(D.persistent<u.persistent||D.interval>u.interval)&&(i.listeners,i.rawEmitters,ue.unwatchFile(e),i=void 0),i?(Se(i,Fe,s),Se(i,Be,r)):(i={listeners:s,rawEmitters:r,options:u,watcher:ue.watchFile(e,u,(o,a)=>{eu(i.rawEmitters,f=>{f(et,e,{curr:o,prev:a})});const c=o.mtimeMs;(o.size!==a.size||c>a.mtimeMs||c===0)&&eu(i.listeners,f=>f(t,o))})},tu.set(e,i)),()=>{$e(i,Fe,s),$e(i,Be,r),ss(i.listeners)&&(tu.delete(e),ue.unwatchFile(e),i.options=i.watcher=void 0,Object.freeze(i))}};class Qo{constructor(e){this.fsw=e,this._boundHandleError=u=>e._handleError(u)}_watchWithNodeFs(e,u){const n=this.fsw.options,s=I.dirname(e),r=I.basename(e);this.fsw._getWatchedDir(s).add(r);const D=I.resolve(e),o={persistent:n.persistent};u||(u=Ho);let a;return n.usePolling?(o.interval=n.enableBinaryInterval&&xo(r)?n.binaryInterval:n.interval,a=Xo(e,D,o,{listener:u,rawEmitter:this.fsw._emitRaw})):a=qo(e,D,o,{listener:u,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),a}_handleFile(e,u,n){if(this.fsw.closed)return;const s=I.dirname(e),r=I.basename(e),i=this.fsw._getWatchedDir(s);let D=u;if(i.has(r))return;const o=async(c,f)=>{if(!!this.fsw._throttle(jo,e,5)){if(!f||f.mtimeMs===0)try{const l=await ns(e);if(this.fsw.closed)return;const p=l.atimeMs,C=l.mtimeMs;(!p||p<=C||C!==D.mtimeMs)&&this.fsw._emit(et,e,l),No&&D.ino!==l.ino?(this.fsw._closeFile(c),D=l,this.fsw._addPathCloser(c,this._watchWithNodeFs(e,o))):D=l}catch{this.fsw._remove(s,r)}else if(i.has(r)){const l=f.atimeMs,p=f.mtimeMs;(!l||l<=p||p!==D.mtimeMs)&&this.fsw._emit(et,e,f),D=f}}},a=this._watchWithNodeFs(e,o);if(!(n&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(tt,e,0))return;this.fsw._emit(tt,e,u)}return a}async _handleSymlink(e,u,n,s){if(this.fsw.closed)return;const r=e.fullPath,i=this.fsw._getWatchedDir(u);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let D;try{D=await Jt(n)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(i.has(s)?this.fsw._symlinkPaths.get(r)!==D&&(this.fsw._symlinkPaths.set(r,D),this.fsw._emit(et,n,e.stats)):(i.add(s),this.fsw._symlinkPaths.set(r,D),this.fsw._emit(tt,n,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(r))return!0;this.fsw._symlinkPaths.set(r,!0)}_handleRead(e,u,n,s,r,i,D){if(e=I.join(e,Po),!n.hasGlob&&(D=this.fsw._throttle("readdir",e,1e3),!D))return;const o=this.fsw._getWatchedDir(n.path),a=new Set;let c=this.fsw._readdirp(e,{fileFilter:f=>n.filterPath(f),directoryFilter:f=>n.filterDir(f),depth:0}).on(ko,async f=>{if(this.fsw.closed){c=void 0;return}const l=f.path;let p=I.join(e,l);if(a.add(l),!(f.stats.isSymbolicLink()&&await this._handleSymlink(f,e,p,l))){if(this.fsw.closed){c=void 0;return}(l===s||!s&&!o.has(l))&&(this.fsw._incrReadyCount(),p=I.join(r,I.relative(r,p)),this._addToNodeFs(p,u,n,i+1))}}).on(us,this._boundHandleError);return new Promise(f=>c.once(Mo,()=>{if(this.fsw.closed){c=void 0;return}const l=D?D.clear():!1;f(),o.getChildren().filter(p=>p!==e&&!a.has(p)&&(!n.hasGlob||n.filterPath({fullPath:I.resolve(e,p)}))).forEach(p=>{this.fsw._remove(e,p)}),c=void 0,l&&this._handleRead(e,!1,n,s,r,i,D)}))}async _handleDir(e,u,n,s,r,i,D){const o=this.fsw._getWatchedDir(I.dirname(e)),a=o.has(I.basename(e));!(n&&this.fsw.options.ignoreInitial)&&!r&&!a&&(!i.hasGlob||i.globFilter(e))&&this.fsw._emit(Lo,e,u),o.add(I.basename(e)),this.fsw._getWatchedDir(e);let c,f;const l=this.fsw.options.depth;if((l==null||s<=l)&&!this.fsw._symlinkPaths.has(D)){if(!r&&(await this._handleRead(e,n,i,r,e,s,c),this.fsw.closed))return;f=this._watchWithNodeFs(e,(p,C)=>{C&&C.mtimeMs===0||this._handleRead(p,!1,i,r,e,s,c)})}return f}async _addToNodeFs(e,u,n,s,r){const i=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return i(),!1;const D=this.fsw._getWatchHelpers(e,s);!D.hasGlob&&n&&(D.hasGlob=n.hasGlob,D.globFilter=n.globFilter,D.filterPath=o=>n.filterPath(o),D.filterDir=o=>n.filterDir(o));try{const o=await zo[D.statMethod](D.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(D.watchPath,o))return i(),!1;const a=this.fsw.options.followSymlinks&&!e.includes(Go)&&!e.includes(Wo);let c;if(o.isDirectory()){const f=I.resolve(e),l=a?await Jt(e):e;if(this.fsw.closed||(c=await this._handleDir(D.watchPath,o,u,s,r,D,l),this.fsw.closed))return;f!==l&&l!==void 0&&this.fsw._symlinkPaths.set(f,l)}else if(o.isSymbolicLink()){const f=a?await Jt(e):e;if(this.fsw.closed)return;const l=I.dirname(D.watchPath);if(this.fsw._getWatchedDir(l).add(D.watchPath),this.fsw._emit(tt,D.watchPath,o),c=await this._handleDir(l,o,u,s,e,D,f),this.fsw.closed)return;f!==void 0&&this.fsw._symlinkPaths.set(I.resolve(e),f)}else c=this._handleFile(D.watchPath,o,u);return i(),this.fsw._addPathCloser(e,c),!1}catch(o){if(this.fsw._handleError(o))return i(),e}}}var Zo=Qo,uu={exports:{}};const nu=ie,L=K,{promisify:su}=_e;let ge;try{ge=Ie("fsevents")}catch(t){process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR&&console.error(t)}if(ge){const t=process.version.match(/v(\d+)\.(\d+)/);if(t&&t[1]&&t[2]){const e=Number.parseInt(t[1],10),u=Number.parseInt(t[2],10);e===8&&u<16&&(ge=void 0)}}const{EV_ADD:ru,EV_CHANGE:Jo,EV_ADD_DIR:is,EV_UNLINK:st,EV_ERROR:ea,STR_DATA:ta,STR_END:ua,FSEVENT_CREATED:na,FSEVENT_MODIFIED:sa,FSEVENT_DELETED:ra,FSEVENT_MOVED:ia,FSEVENT_UNKNOWN:Da,FSEVENT_TYPE_FILE:oa,FSEVENT_TYPE_DIRECTORY:Te,FSEVENT_TYPE_SYMLINK:Ds,ROOT_GLOBSTAR:os,DIR_SUFFIX:aa,DOT_SLASH:as,FUNCTION_TYPE:iu,EMPTY_FN:la,IDENTITY_FN:ca}=Je,fa=t=>isNaN(t)?{}:{depth:t},Du=su(nu.stat),ha=su(nu.lstat),ls=su(nu.realpath),da={stat:Du,lstat:ha},le=new Map,Ea=10,pa=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),Ca=(t,e)=>({stop:ge.watch(t,e)});function Fa(t,e,u,n){let s=L.extname(e)?L.dirname(e):e;const r=L.dirname(s);let i=le.get(s);ga(r)&&(s=r);const D=L.resolve(t),o=D!==e,a=(f,l,p)=>{o&&(f=f.replace(e,D)),(f===D||!f.indexOf(D+L.sep))&&u(f,l,p)};let c=!1;for(const f of le.keys())if(e.indexOf(L.resolve(f)+L.sep)===0){s=f,i=le.get(s),c=!0;break}return i||c?i.listeners.add(a):(i={listeners:new Set([a]),rawEmitter:n,watcher:Ca(s,(f,l)=>{if(!i.listeners.size)return;const p=ge.getInfo(f,l);i.listeners.forEach(C=>{C(f,l,p)}),i.rawEmitter(p.event,f,p)})},le.set(s,i)),()=>{const f=i.listeners;if(f.delete(a),!f.size&&(le.delete(s),i.watcher))return i.watcher.stop().then(()=>{i.rawEmitter=i.watcher=void 0,Object.freeze(i)})}}const ga=t=>{let e=0;for(const u of le.keys())if(u.indexOf(t)===0&&(e++,e>=Ea))return!0;return!1},ma=()=>ge&&le.size<128,ou=(t,e)=>{let u=0;for(;!t.indexOf(e)&&(t=L.dirname(t))!==e;)u++;return u},cs=(t,e)=>t.type===Te&&e.isDirectory()||t.type===Ds&&e.isSymbolicLink()||t.type===oa&&e.isFile();class _a{constructor(e){this.fsw=e}checkIgnored(e,u){const n=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,u))return n.add(e),u&&u.isDirectory()&&n.add(e+os),!0;n.delete(e),n.delete(e+os)}addOrChange(e,u,n,s,r,i,D,o){const a=r.has(i)?Jo:ru;this.handleEvent(a,e,u,n,s,r,i,D,o)}async checkExists(e,u,n,s,r,i,D,o){try{const a=await Du(e);if(this.fsw.closed)return;cs(D,a)?this.addOrChange(e,u,n,s,r,i,D,o):this.handleEvent(st,e,u,n,s,r,i,D,o)}catch(a){a.code==="EACCES"?this.addOrChange(e,u,n,s,r,i,D,o):this.handleEvent(st,e,u,n,s,r,i,D,o)}}handleEvent(e,u,n,s,r,i,D,o,a){if(!(this.fsw.closed||this.checkIgnored(u)))if(e===st){const c=o.type===Te;(c||i.has(D))&&this.fsw._remove(r,D,c)}else{if(e===ru){if(o.type===Te&&this.fsw._getWatchedDir(u),o.type===Ds&&a.followSymlinks){const f=a.depth===void 0?void 0:ou(n,s)+1;return this._addToFsEvents(u,!1,!0,f)}this.fsw._getWatchedDir(r).add(D)}const c=o.type===Te?e+aa:e;this.fsw._emit(c,u),c===is&&this._addToFsEvents(u,!1,!0)}}_watchWithFsEvents(e,u,n,s){if(this.fsw.closed||this.fsw._isIgnored(e))return;const r=this.fsw.options,D=Fa(e,u,async(o,a,c)=>{if(this.fsw.closed||r.depth!==void 0&&ou(o,u)>r.depth)return;const f=n(L.join(e,L.relative(e,o)));if(s&&!s(f))return;const l=L.dirname(f),p=L.basename(f),C=this.fsw._getWatchedDir(c.type===Te?f:l);if(pa.has(a)||c.event===Da)if(typeof r.ignored===iu){let F;try{F=await Du(f)}catch{}if(this.fsw.closed||this.checkIgnored(f,F))return;cs(c,F)?this.addOrChange(f,o,u,l,C,p,c,r):this.handleEvent(st,f,o,u,l,C,p,c,r)}else this.checkExists(f,o,u,l,C,p,c,r);else switch(c.event){case na:case sa:return this.addOrChange(f,o,u,l,C,p,c,r);case ra:case ia:return this.checkExists(f,o,u,l,C,p,c,r)}},this.fsw._emitRaw);return this.fsw._emitReady(),D}async _handleFsEventsSymlink(e,u,n,s){if(!(this.fsw.closed||this.fsw._symlinkPaths.has(u))){this.fsw._symlinkPaths.set(u,!0),this.fsw._incrReadyCount();try{const r=await ls(e);if(this.fsw.closed)return;if(this.fsw._isIgnored(r))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents(r||e,i=>{let D=e;return r&&r!==as?D=i.replace(r,e):i!==as&&(D=L.join(e,i)),n(D)},!1,s)}catch(r){if(this.fsw._handleError(r))return this.fsw._emitReady()}}}emitAdd(e,u,n,s,r){const i=n(e),D=u.isDirectory(),o=this.fsw._getWatchedDir(L.dirname(i)),a=L.basename(i);D&&this.fsw._getWatchedDir(i),!o.has(a)&&(o.add(a),(!s.ignoreInitial||r===!0)&&this.fsw._emit(D?is:ru,i,u))}initWatch(e,u,n,s){if(this.fsw.closed)return;const r=this._watchWithFsEvents(n.watchPath,L.resolve(e||n.watchPath),s,n.globFilter);this.fsw._addPathCloser(u,r)}async _addToFsEvents(e,u,n,s){if(this.fsw.closed)return;const r=this.fsw.options,i=typeof u===iu?u:ca,D=this.fsw._getWatchHelpers(e);try{const o=await da[D.statMethod](D.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(D.watchPath,o))throw null;if(o.isDirectory()){if(D.globFilter||this.emitAdd(i(e),o,i,r,n),s&&s>r.depth)return;this.fsw._readdirp(D.watchPath,{fileFilter:a=>D.filterPath(a),directoryFilter:a=>D.filterDir(a),...fa(r.depth-(s||0))}).on(ta,a=>{if(this.fsw.closed||a.stats.isDirectory()&&!D.filterPath(a))return;const c=L.join(D.watchPath,a.path),{fullPath:f}=a;if(D.followSymlinks&&a.stats.isSymbolicLink()){const l=r.depth===void 0?void 0:ou(c,L.resolve(D.watchPath))+1;this._handleFsEventsSymlink(c,f,i,l)}else this.emitAdd(c,a.stats,i,r,n)}).on(ea,la).on(ua,()=>{this.fsw._emitReady()})}else this.emitAdd(D.watchPath,o,i,r,n),this.fsw._emitReady()}catch(o){(!o||this.fsw._handleError(o))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(r.persistent&&n!==!0)if(typeof u===iu)this.initWatch(void 0,e,D,i);else{let o;try{o=await ls(D.watchPath)}catch{}this.initWatch(o,e,D,i)}}}uu.exports=_a,uu.exports.canUse=ma;const{EventEmitter:Aa}=Hs,au=ie,B=K,{promisify:fs}=_e,ya=_D,lu=Ut.exports.default,wa=ID,cu=xn,Ra=bo,ba=vn,va=Zo,hs=uu.exports,{EV_ALL:fu,EV_READY:Ba,EV_ADD:rt,EV_CHANGE:xe,EV_UNLINK:ds,EV_ADD_DIR:Sa,EV_UNLINK_DIR:$a,EV_RAW:Ta,EV_ERROR:hu,STR_CLOSE:xa,STR_END:Oa,BACK_SLASH_RE:Na,DOUBLE_SLASH_RE:Es,SLASH_OR_BACK_SLASH_RE:Ha,DOT_RE:Pa,REPLACER_RE:Ia,SLASH:du,SLASH_SLASH:La,BRACE_START:ka,BANG:Eu,ONE_DOT:ps,TWO_DOTS:Ma,GLOBSTAR:Wa,SLASH_GLOBSTAR:pu,ANYMATCH_OPTS:Cu,STRING_TYPE:Fu,FUNCTION_TYPE:Ga,EMPTY_STR:gu,EMPTY_FN:ja,isWindows:Ua,isMacos:Ka,isIBMi:Va}=Je,za=fs(au.stat),Ya=fs(au.readdir),mu=(t=[])=>Array.isArray(t)?t:[t],Cs=(t,e=[])=>(t.forEach(u=>{Array.isArray(u)?Cs(u,e):e.push(u)}),e),Fs=t=>{const e=Cs(mu(t));if(!e.every(u=>typeof u===Fu))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(ms)},gs=t=>{let e=t.replace(Na,du),u=!1;for(e.startsWith(La)&&(u=!0);e.match(Es);)e=e.replace(Es,du);return u&&(e=du+e),e},ms=t=>gs(B.normalize(gs(t))),_s=(t=gu)=>e=>typeof e!==Fu?e:ms(B.isAbsolute(e)?e:B.join(t,e)),qa=(t,e)=>B.isAbsolute(t)?t:t.startsWith(Eu)?Eu+B.join(e,t.slice(1)):B.join(e,t),q=(t,e)=>t[e]===void 0;class Xa{constructor(e,u){this.path=e,this._removeWatcher=u,this.items=new Set}add(e){const{items:u}=this;!u||e!==ps&&e!==Ma&&u.add(e)}async remove(e){const{items:u}=this;if(!u||(u.delete(e),u.size>0))return;const n=this.path;try{await Ya(n)}catch{this._removeWatcher&&this._removeWatcher(B.dirname(n),B.basename(n))}}has(e){const{items:u}=this;if(!!u)return u.has(e)}getChildren(){const{items:e}=this;if(!!e)return[...e.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}}const Qa="stat",Za="lstat";class Ja{constructor(e,u,n,s){this.fsw=s,this.path=e=e.replace(Ia,gu),this.watchPath=u,this.fullWatchPath=B.resolve(u),this.hasGlob=u!==e,e===gu&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&n?void 0:!1,this.globFilter=this.hasGlob?lu(e,void 0,Cu):!1,this.dirParts=this.getDirParts(e),this.dirParts.forEach(r=>{r.length>1&&r.pop()}),this.followSymlinks=n,this.statMethod=n?Qa:Za}checkGlobSymlink(e){return this.globSymlink===void 0&&(this.globSymlink=e.fullParentDir===this.fullWatchPath?!1:{realPath:e.fullParentDir,linkPath:this.fullWatchPath}),this.globSymlink?e.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath):e.fullPath}entryPath(e){return B.join(this.watchPath,B.relative(this.watchPath,this.checkGlobSymlink(e)))}filterPath(e){const{stats:u}=e;if(u&&u.isSymbolicLink())return this.filterDir(e);const n=this.entryPath(e);return(this.hasGlob&&typeof this.globFilter===Ga?this.globFilter(n):!0)&&this.fsw._isntIgnored(n,u)&&this.fsw._hasReadPermissions(u)}getDirParts(e){if(!this.hasGlob)return[];const u=[];return(e.includes(ka)?Ra.expand(e):[e]).forEach(s=>{u.push(B.relative(this.watchPath,s).split(Ha))}),u}filterDir(e){if(this.hasGlob){const u=this.getDirParts(this.checkGlobSymlink(e));let n=!1;this.unmatchedGlob=!this.dirParts.some(s=>s.every((r,i)=>(r===Wa&&(n=!0),n||!u[0][i]||lu(r,u[0][i],Cu))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}}class el extends Aa{constructor(e){super();const u={};e&&Object.assign(u,e),this._watched=new Map,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._symlinkPaths=new Map,this._streams=new Set,this.closed=!1,q(u,"persistent")&&(u.persistent=!0),q(u,"ignoreInitial")&&(u.ignoreInitial=!1),q(u,"ignorePermissionErrors")&&(u.ignorePermissionErrors=!1),q(u,"interval")&&(u.interval=100),q(u,"binaryInterval")&&(u.binaryInterval=300),q(u,"disableGlobbing")&&(u.disableGlobbing=!1),u.enableBinaryInterval=u.binaryInterval!==u.interval,q(u,"useFsEvents")&&(u.useFsEvents=!u.usePolling),hs.canUse()||(u.useFsEvents=!1),q(u,"usePolling")&&!u.useFsEvents&&(u.usePolling=Ka),Va&&(u.usePolling=!0);const s=process.env.CHOKIDAR_USEPOLLING;if(s!==void 0){const o=s.toLowerCase();o==="false"||o==="0"?u.usePolling=!1:o==="true"||o==="1"?u.usePolling=!0:u.usePolling=!!o}const r=process.env.CHOKIDAR_INTERVAL;r&&(u.interval=Number.parseInt(r,10)),q(u,"atomic")&&(u.atomic=!u.usePolling&&!u.useFsEvents),u.atomic&&(this._pendingUnlinks=new Map),q(u,"followSymlinks")&&(u.followSymlinks=!0),q(u,"awaitWriteFinish")&&(u.awaitWriteFinish=!1),u.awaitWriteFinish===!0&&(u.awaitWriteFinish={});const i=u.awaitWriteFinish;i&&(i.stabilityThreshold||(i.stabilityThreshold=2e3),i.pollInterval||(i.pollInterval=100),this._pendingWrites=new Map),u.ignored&&(u.ignored=mu(u.ignored));let D=0;this._emitReady=()=>{D++,D>=this._readyCount&&(this._emitReady=ja,this._readyEmitted=!0,process.nextTick(()=>this.emit(Ba)))},this._emitRaw=(...o)=>this.emit(Ta,...o),this._readyEmitted=!1,this.options=u,u.useFsEvents?this._fsEventsHandler=new hs(this):this._nodeFsHandler=new va(this),Object.freeze(u)}add(e,u,n){const{cwd:s,disableGlobbing:r}=this.options;this.closed=!1;let i=Fs(e);return s&&(i=i.map(D=>{const o=qa(D,s);return r||!cu(D)?o:ba(o)})),i=i.filter(D=>D.startsWith(Eu)?(this._ignoredPaths.add(D.slice(1)),!1):(this._ignoredPaths.delete(D),this._ignoredPaths.delete(D+pu),this._userIgnored=void 0,!0)),this.options.useFsEvents&&this._fsEventsHandler?(this._readyCount||(this._readyCount=i.length),this.options.persistent&&(this._readyCount*=2),i.forEach(D=>this._fsEventsHandler._addToFsEvents(D))):(this._readyCount||(this._readyCount=0),this._readyCount+=i.length,Promise.all(i.map(async D=>{const o=await this._nodeFsHandler._addToNodeFs(D,!n,0,0,u);return o&&this._emitReady(),o})).then(D=>{this.closed||D.filter(o=>o).forEach(o=>{this.add(B.dirname(o),B.basename(u||o))})})),this}unwatch(e){if(this.closed)return this;const u=Fs(e),{cwd:n}=this.options;return u.forEach(s=>{!B.isAbsolute(s)&&!this._closers.has(s)&&(n&&(s=B.join(n,s)),s=B.resolve(s)),this._closePath(s),this._ignoredPaths.add(s),this._watched.has(s)&&this._ignoredPaths.add(s+pu),this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();const e=[];return this._closers.forEach(u=>u.forEach(n=>{const s=n();s instanceof Promise&&e.push(s)})),this._streams.forEach(u=>u.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(u=>u.dispose()),["closers","watched","streams","symlinkPaths","throttled"].forEach(u=>{this[`_${u}`].clear()}),this._closePromise=e.length?Promise.all(e).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){const e={};return this._watched.forEach((u,n)=>{const s=this.options.cwd?B.relative(this.options.cwd,n):n;e[s||ps]=u.getChildren().sort()}),e}emitWithAll(e,u){this.emit(...u),e!==hu&&this.emit(fu,...u)}async _emit(e,u,n,s,r){if(this.closed)return;const i=this.options;Ua&&(u=B.normalize(u)),i.cwd&&(u=B.relative(i.cwd,u));const D=[e,u];r!==void 0?D.push(n,s,r):s!==void 0?D.push(n,s):n!==void 0&&D.push(n);const o=i.awaitWriteFinish;let a;if(o&&(a=this._pendingWrites.get(u)))return a.lastChange=new Date,this;if(i.atomic){if(e===ds)return this._pendingUnlinks.set(u,D),setTimeout(()=>{this._pendingUnlinks.forEach((c,f)=>{this.emit(...c),this.emit(fu,...c),this._pendingUnlinks.delete(f)})},typeof i.atomic=="number"?i.atomic:100),this;e===rt&&this._pendingUnlinks.has(u)&&(e=D[0]=xe,this._pendingUnlinks.delete(u))}if(o&&(e===rt||e===xe)&&this._readyEmitted){const c=(f,l)=>{f?(e=D[0]=hu,D[1]=f,this.emitWithAll(e,D)):l&&(D.length>2?D[2]=l:D.push(l),this.emitWithAll(e,D))};return this._awaitWriteFinish(u,o.stabilityThreshold,e,c),this}if(e===xe&&!this._throttle(xe,u,50))return this;if(i.alwaysStat&&n===void 0&&(e===rt||e===Sa||e===xe)){const c=i.cwd?B.join(i.cwd,u):u;let f;try{f=await za(c)}catch{}if(!f||this.closed)return;D.push(f)}return this.emitWithAll(e,D),this}_handleError(e){const u=e&&e.code;return e&&u!=="ENOENT"&&u!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||u!=="EPERM"&&u!=="EACCES")&&this.emit(hu,e),e||this.closed}_throttle(e,u,n){this._throttled.has(e)||this._throttled.set(e,new Map);const s=this._throttled.get(e),r=s.get(u);if(r)return r.count++,!1;let i;const D=()=>{const a=s.get(u),c=a?a.count:0;return s.delete(u),clearTimeout(i),a&&clearTimeout(a.timeoutObject),c};i=setTimeout(D,n);const o={timeoutObject:i,clear:D,count:0};return s.set(u,o),o}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,u,n,s){let r,i=e;this.options.cwd&&!B.isAbsolute(e)&&(i=B.join(this.options.cwd,e));const D=new Date,o=a=>{au.stat(i,(c,f)=>{if(c||!this._pendingWrites.has(e)){c&&c.code!=="ENOENT"&&s(c);return}const l=Number(new Date);a&&f.size!==a.size&&(this._pendingWrites.get(e).lastChange=l);const p=this._pendingWrites.get(e);l-p.lastChange>=u?(this._pendingWrites.delete(e),s(void 0,f)):r=setTimeout(o,this.options.awaitWriteFinish.pollInterval,f)})};this._pendingWrites.has(e)||(this._pendingWrites.set(e,{lastChange:D,cancelWait:()=>(this._pendingWrites.delete(e),clearTimeout(r),n)}),r=setTimeout(o,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,u){if(this.options.atomic&&Pa.test(e))return!0;if(!this._userIgnored){const{cwd:n}=this.options,s=this.options.ignored,r=s&&s.map(_s(n)),i=mu(r).filter(o=>typeof o===Fu&&!cu(o)).map(o=>o+pu),D=this._getGlobIgnored().map(_s(n)).concat(r,i);this._userIgnored=lu(D,void 0,Cu)}return this._userIgnored([e,u])}_isntIgnored(e,u){return!this._isIgnored(e,u)}_getWatchHelpers(e,u){const n=u||this.options.disableGlobbing||!cu(e)?e:wa(e),s=this.options.followSymlinks;return new Ja(e,n,s,this)}_getWatchedDir(e){this._boundRemove||(this._boundRemove=this._remove.bind(this));const u=B.resolve(e);return this._watched.has(u)||this._watched.set(u,new Xa(u,this._boundRemove)),this._watched.get(u)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return!0;const n=(e&&Number.parseInt(e.mode,10))&511,s=Number.parseInt(n.toString(8)[0],10);return Boolean(4&s)}_remove(e,u,n){const s=B.join(e,u),r=B.resolve(s);if(n=n!=null?n:this._watched.has(s)||this._watched.has(r),!this._throttle("remove",s,100))return;!n&&!this.options.useFsEvents&&this._watched.size===1&&this.add(e,u,!0),this._getWatchedDir(s).getChildren().forEach(l=>this._remove(s,l));const o=this._getWatchedDir(e),a=o.has(u);o.remove(u),this._symlinkPaths.has(r)&&this._symlinkPaths.delete(r);let c=s;if(this.options.cwd&&(c=B.relative(this.options.cwd,s)),this.options.awaitWriteFinish&&this._pendingWrites.has(c)&&this._pendingWrites.get(c).cancelWait()===rt)return;this._watched.delete(s),this._watched.delete(r);const f=n?$a:ds;a&&!this._isIgnored(s)&&this._emit(f,s),this.options.useFsEvents||this._closePath(s)}_closePath(e){this._closeFile(e);const u=B.dirname(e);this._getWatchedDir(u).remove(B.basename(e))}_closeFile(e){const u=this._closers.get(e);!u||(u.forEach(n=>n()),this._closers.delete(e))}_addPathCloser(e,u){if(!u)return;let n=this._closers.get(e);n||(n=[],this._closers.set(e,n)),n.push(u)}_readdirp(e,u){if(this.closed)return;const n={type:fu,alwaysStat:!0,lstat:!0,...u};let s=ya(e,n);return this._streams.add(s),s.once(xa,()=>{s=void 0}),s.once(Oa,()=>{s&&(this._streams.delete(s),s=void 0)}),s}}const tl=(t,e)=>{const u=new el(e);return u.add(t),u};var ul=tl;let ce=!0;const me=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let As=0;if(me.process&&me.process.env&&me.process.stdout){const{FORCE_COLOR:t,NODE_DISABLE_COLORS:e,TERM:u}=me.process.env;e||t==="0"?ce=!1:t==="1"?ce=!0:u==="dumb"?ce=!1:"CI"in me.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(n=>n in me.process.env)?ce=!0:ce=process.stdout.isTTY,ce&&(As=u&&u.endsWith("-256color")?2:1)}let ys={enabled:ce,supportLevel:As};function ws(t,e,u=1){const n=`\x1B[${t}m`,s=`\x1B[${e}m`,r=new RegExp(`\\x1b\\[${e}m`,"g");return i=>ys.enabled&&ys.supportLevel>=u?n+(""+i).replace(r,n)+s:""+i}const nl=ws(90,39),sl=ws(96,39),rl=()=>new Date().toLocaleTimeString(),il=(...t)=>console.log(nl(rl()),sl("[tsx]"),...t),Dl="\x1Bc";function ol(t,e){let u;return()=>{u&&clearTimeout(u),u=setTimeout(()=>t(),e)}}function al(t){return t&&"type"in t&&t.type==="dependency"}const Rs={noCache:{type:Boolean,description:"Disable caching",default:!1},tsconfig:{type:String,description:"Custom tsconfig.json path"},clearScreen:{type:Boolean,description:"Clearing the screen on rerun",default:!0}},ll=ti({name:"watch",parameters:["<script path>"],flags:Rs,help:{description:"Run the script and watch for changes"}},t=>{const e=lt(Rs,process.argv.slice(3),{ignoreUnknown:!0})._,u={noCache:t.flags.noCache,tsconfigPath:t.flags.tsconfig,clearScreen:t.flags.clearScreen,ipc:!0};let n;const s=ol(()=>{n&&!n.killed&&n.exitCode===null&&n.kill(),n&&il("rerunning"),u.clearScreen&&process.stdout.write(Dl),n=an(e,u),n.on("message",D=>{if(al(D)){const o=D.path.startsWith("file:")?Os(D.path):D.path;K.isAbsolute(o)&&i.add(o)}})},100);s();function r(D){n&&n.kill(),process.exit(D)}process.once("SIGINT",()=>r(130)),process.once("SIGTERM",()=>r(143));const i=ul(t._,{ignoreInitial:!0,ignored:["**/.*/**","**/{node_modules,bower_components,vendor}/**","**/dist/**"],ignorePermissionErrors:!0}).on("all",s);process.stdin.on("data",s)}),bs={noCache:{type:Boolean,description:"Disable caching"},tsconfig:{type:String,description:"Custom tsconfig.json path"}},vs={...bs,version:{type:Boolean,description:"Show version"},help:{type:Boolean,alias:"h",description:"Show help"}};ei({name:"tsx",parameters:["[script path]"],commands:[ll],flags:vs,help:!1},t=>{const e=t._.length===0;if(e){if(t.flags.version){console.log(Ts);return}if(t.flags.help){t.showHelp({description:"Node.js runtime enhanced with esbuild for loading TypeScript & ESM"});return}process.argv.push(Ie.resolve("./repl"))}const u=lt(e?vs:bs,process.argv.slice(2),{ignoreUnknown:!0})._;an(u,{noCache:Boolean(t.flags.noCache),tsconfigPath:t.flags.tsconfig}).on("close",n=>process.exit(n))});
|
|
53
|
+
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};const oo=zt,{MAX_LENGTH:Qn,CHAR_BACKSLASH:Qt,CHAR_BACKTICK:ao,CHAR_COMMA:lo,CHAR_DOT:co,CHAR_LEFT_PARENTHESES:fo,CHAR_RIGHT_PARENTHESES:ho,CHAR_LEFT_CURLY_BRACE:Eo,CHAR_RIGHT_CURLY_BRACE:po,CHAR_LEFT_SQUARE_BRACKET:Zn,CHAR_RIGHT_SQUARE_BRACKET:Jn,CHAR_DOUBLE_QUOTE:Co,CHAR_SINGLE_QUOTE:Fo,CHAR_NO_BREAK_SPACE:go,CHAR_ZERO_WIDTH_NOBREAK_SPACE:mo}=Do,_o=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let u=e||{},n=typeof u.maxLength=="number"?Math.min(Qn,u.maxLength):Qn;if(t.length>n)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${n})`);let s={type:"root",input:t,nodes:[]},r=[s],i=s,D=s,o=0,a=t.length,c=0,f=0,l;const p=()=>t[c++],C=F=>{if(F.type==="text"&&D.type==="dot"&&(D.type="text"),D&&D.type==="text"&&F.type==="text"){D.value+=F.value;return}return i.nodes.push(F),F.parent=i,F.prev=D,D=F,F};for(C({type:"bos"});c<a;)if(i=r[r.length-1],l=p(),!(l===mo||l===go)){if(l===Qt){C({type:"text",value:(e.keepEscaping?l:"")+p()});continue}if(l===Jn){C({type:"text",value:"\\"+l});continue}if(l===Zn){o++;let F;for(;c<a&&(F=p());){if(l+=F,F===Zn){o++;continue}if(F===Qt){l+=p();continue}if(F===Jn&&(o--,o===0))break}C({type:"text",value:l});continue}if(l===fo){i=C({type:"paren",nodes:[]}),r.push(i),C({type:"text",value:l});continue}if(l===ho){if(i.type!=="paren"){C({type:"text",value:l});continue}i=r.pop(),C({type:"text",value:l}),i=r[r.length-1];continue}if(l===Co||l===Fo||l===ao){let F=l,y;for(e.keepQuotes!==!0&&(l="");c<a&&(y=p());){if(y===Qt){l+=y+p();continue}if(y===F){e.keepQuotes===!0&&(l+=y);break}l+=y}C({type:"text",value:l});continue}if(l===Eo){f++;let F=D.value&&D.value.slice(-1)==="$"||i.dollar===!0;i=C({type:"brace",open:!0,close:!1,dollar:F,depth:f,commas:0,ranges:0,nodes:[]}),r.push(i),C({type:"open",value:l});continue}if(l===po){if(i.type!=="brace"){C({type:"text",value:l});continue}let F="close";i=r.pop(),i.close=!0,C({type:F,value:l}),f--,i=r[r.length-1];continue}if(l===lo&&f>0){if(i.ranges>0){i.ranges=0;let F=i.nodes.shift();i.nodes=[F,{type:"text",value:oo(i)}]}C({type:"comma",value:l}),i.commas++;continue}if(l===co&&f>0&&i.commas===0){let F=i.nodes;if(f===0||F.length===0){C({type:"text",value:l});continue}if(D.type==="dot"){if(i.range=[],D.value+=l,D.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,D.type="text";continue}i.ranges++,i.args=[];continue}if(D.type==="range"){F.pop();let y=F[F.length-1];y.value+=D.value+l,D=y,i.ranges--;continue}C({type:"dot",value:l});continue}C({type:"text",value:l})}do if(i=r.pop(),i.type!=="root"){i.nodes.forEach(b=>{b.nodes||(b.type==="open"&&(b.isOpen=!0),b.type==="close"&&(b.isClose=!0),b.nodes||(b.type="text"),b.invalid=!0)});let F=r[r.length-1],y=F.nodes.indexOf(i);F.nodes.splice(y,1,...i.nodes)}while(r.length>0);return C({type:"eos"}),s};var Ao=_o;const es=zt,yo=no,wo=io,Ro=Ao,Y=(t,e={})=>{let u=[];if(Array.isArray(t))for(let n of t){let s=Y.create(n,e);Array.isArray(s)?u.push(...s):u.push(s)}else u=[].concat(Y.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(u=[...new Set(u)]),u};Y.parse=(t,e={})=>Ro(t,e),Y.stringify=(t,e={})=>es(typeof t=="string"?Y.parse(t,e):t,e),Y.compile=(t,e={})=>(typeof t=="string"&&(t=Y.parse(t,e)),yo(t,e)),Y.expand=(t,e={})=>{typeof t=="string"&&(t=Y.parse(t,e));let u=wo(t,e);return e.noempty===!0&&(u=u.filter(Boolean)),e.nodupes===!0&&(u=[...new Set(u)]),u},Y.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Y.compile(t,e):Y.expand(t,e);var bo=Y,ts={exports:{}},vo=["3dm","3ds","3g2","3gp","7z","a","aac","adp","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"];(function(t){t.exports=vo})(ts);const Bo=K,So=ts.exports,$o=new Set(So);var To=t=>$o.has(Bo.extname(t).slice(1).toLowerCase()),Je={};(function(t){const{sep:e}=K,{platform:u}=process,n=_u;t.EV_ALL="all",t.EV_READY="ready",t.EV_ADD="add",t.EV_CHANGE="change",t.EV_ADD_DIR="addDir",t.EV_UNLINK="unlink",t.EV_UNLINK_DIR="unlinkDir",t.EV_RAW="raw",t.EV_ERROR="error",t.STR_DATA="data",t.STR_END="end",t.STR_CLOSE="close",t.FSEVENT_CREATED="created",t.FSEVENT_MODIFIED="modified",t.FSEVENT_DELETED="deleted",t.FSEVENT_MOVED="moved",t.FSEVENT_CLONED="cloned",t.FSEVENT_UNKNOWN="unknown",t.FSEVENT_TYPE_FILE="file",t.FSEVENT_TYPE_DIRECTORY="directory",t.FSEVENT_TYPE_SYMLINK="symlink",t.KEY_LISTENERS="listeners",t.KEY_ERR="errHandlers",t.KEY_RAW="rawEmitters",t.HANDLER_KEYS=[t.KEY_LISTENERS,t.KEY_ERR,t.KEY_RAW],t.DOT_SLASH=`.${e}`,t.BACK_SLASH_RE=/\\/g,t.DOUBLE_SLASH_RE=/\/\//,t.SLASH_OR_BACK_SLASH_RE=/[/\\]/,t.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,t.REPLACER_RE=/^\.[/\\]/,t.SLASH="/",t.SLASH_SLASH="//",t.BRACE_START="{",t.BANG="!",t.ONE_DOT=".",t.TWO_DOTS="..",t.STAR="*",t.GLOBSTAR="**",t.ROOT_GLOBSTAR="/**/*",t.SLASH_GLOBSTAR="/**",t.DIR_SUFFIX="Dir",t.ANYMATCH_OPTS={dot:!0},t.STRING_TYPE="string",t.FUNCTION_TYPE="function",t.EMPTY_STR="",t.EMPTY_FN=()=>{},t.IDENTITY_FN=s=>s,t.isWindows=u==="win32",t.isMacos=u==="darwin",t.isLinux=u==="linux",t.isIBMi=n.type()==="OS400"})(Je);const ue=ie,I=K,{promisify:ve}=_e,xo=To,{isWindows:Oo,isLinux:No,EMPTY_FN:Ho,EMPTY_STR:Po,KEY_LISTENERS:Fe,KEY_ERR:Zt,KEY_RAW:Be,HANDLER_KEYS:Io,EV_CHANGE:et,EV_ADD:tt,EV_ADD_DIR:Lo,EV_ERROR:us,STR_DATA:ko,STR_END:Mo,BRACE_START:Wo,STAR:Go}=Je,jo="watch",Uo=ve(ue.open),ns=ve(ue.stat),Ko=ve(ue.lstat),Vo=ve(ue.close),Jt=ve(ue.realpath),zo={lstat:Ko,stat:ns},eu=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},Se=(t,e,u)=>{let n=t[e];n instanceof Set||(t[e]=n=new Set([n])),n.add(u)},Yo=t=>e=>{const u=t[e];u instanceof Set?u.clear():delete t[e]},$e=(t,e,u)=>{const n=t[e];n instanceof Set?n.delete(u):n===u&&delete t[e]},ss=t=>t instanceof Set?t.size===0:!t,ut=new Map;function rs(t,e,u,n,s){const r=(i,D)=>{u(t),s(i,D,{watchedPath:t}),D&&t!==D&&nt(I.resolve(t,D),Fe,I.join(t,D))};try{return ue.watch(t,e,r)}catch(i){n(i)}}const nt=(t,e,u,n,s)=>{const r=ut.get(t);!r||eu(r[e],i=>{i(u,n,s)})},qo=(t,e,u,n)=>{const{listener:s,errHandler:r,rawEmitter:i}=n;let D=ut.get(e),o;if(!u.persistent)return o=rs(t,u,s,r,i),o.close.bind(o);if(D)Se(D,Fe,s),Se(D,Zt,r),Se(D,Be,i);else{if(o=rs(t,u,nt.bind(null,e,Fe),r,nt.bind(null,e,Be)),!o)return;o.on(us,async a=>{const c=nt.bind(null,e,Zt);if(D.watcherUnusable=!0,Oo&&a.code==="EPERM")try{const f=await Uo(t,"r");await Vo(f),c(a)}catch{}else c(a)}),D={listeners:s,errHandlers:r,rawEmitters:i,watcher:o},ut.set(e,D)}return()=>{$e(D,Fe,s),$e(D,Zt,r),$e(D,Be,i),ss(D.listeners)&&(D.watcher.close(),ut.delete(e),Io.forEach(Yo(D)),D.watcher=void 0,Object.freeze(D))}},tu=new Map,Xo=(t,e,u,n)=>{const{listener:s,rawEmitter:r}=n;let i=tu.get(e);const D=i&&i.options;return D&&(D.persistent<u.persistent||D.interval>u.interval)&&(i.listeners,i.rawEmitters,ue.unwatchFile(e),i=void 0),i?(Se(i,Fe,s),Se(i,Be,r)):(i={listeners:s,rawEmitters:r,options:u,watcher:ue.watchFile(e,u,(o,a)=>{eu(i.rawEmitters,f=>{f(et,e,{curr:o,prev:a})});const c=o.mtimeMs;(o.size!==a.size||c>a.mtimeMs||c===0)&&eu(i.listeners,f=>f(t,o))})},tu.set(e,i)),()=>{$e(i,Fe,s),$e(i,Be,r),ss(i.listeners)&&(tu.delete(e),ue.unwatchFile(e),i.options=i.watcher=void 0,Object.freeze(i))}};class Qo{constructor(e){this.fsw=e,this._boundHandleError=u=>e._handleError(u)}_watchWithNodeFs(e,u){const n=this.fsw.options,s=I.dirname(e),r=I.basename(e);this.fsw._getWatchedDir(s).add(r);const D=I.resolve(e),o={persistent:n.persistent};u||(u=Ho);let a;return n.usePolling?(o.interval=n.enableBinaryInterval&&xo(r)?n.binaryInterval:n.interval,a=Xo(e,D,o,{listener:u,rawEmitter:this.fsw._emitRaw})):a=qo(e,D,o,{listener:u,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),a}_handleFile(e,u,n){if(this.fsw.closed)return;const s=I.dirname(e),r=I.basename(e),i=this.fsw._getWatchedDir(s);let D=u;if(i.has(r))return;const o=async(c,f)=>{if(!!this.fsw._throttle(jo,e,5)){if(!f||f.mtimeMs===0)try{const l=await ns(e);if(this.fsw.closed)return;const p=l.atimeMs,C=l.mtimeMs;(!p||p<=C||C!==D.mtimeMs)&&this.fsw._emit(et,e,l),No&&D.ino!==l.ino?(this.fsw._closeFile(c),D=l,this.fsw._addPathCloser(c,this._watchWithNodeFs(e,o))):D=l}catch{this.fsw._remove(s,r)}else if(i.has(r)){const l=f.atimeMs,p=f.mtimeMs;(!l||l<=p||p!==D.mtimeMs)&&this.fsw._emit(et,e,f),D=f}}},a=this._watchWithNodeFs(e,o);if(!(n&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(tt,e,0))return;this.fsw._emit(tt,e,u)}return a}async _handleSymlink(e,u,n,s){if(this.fsw.closed)return;const r=e.fullPath,i=this.fsw._getWatchedDir(u);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let D;try{D=await Jt(n)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(i.has(s)?this.fsw._symlinkPaths.get(r)!==D&&(this.fsw._symlinkPaths.set(r,D),this.fsw._emit(et,n,e.stats)):(i.add(s),this.fsw._symlinkPaths.set(r,D),this.fsw._emit(tt,n,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(r))return!0;this.fsw._symlinkPaths.set(r,!0)}_handleRead(e,u,n,s,r,i,D){if(e=I.join(e,Po),!n.hasGlob&&(D=this.fsw._throttle("readdir",e,1e3),!D))return;const o=this.fsw._getWatchedDir(n.path),a=new Set;let c=this.fsw._readdirp(e,{fileFilter:f=>n.filterPath(f),directoryFilter:f=>n.filterDir(f),depth:0}).on(ko,async f=>{if(this.fsw.closed){c=void 0;return}const l=f.path;let p=I.join(e,l);if(a.add(l),!(f.stats.isSymbolicLink()&&await this._handleSymlink(f,e,p,l))){if(this.fsw.closed){c=void 0;return}(l===s||!s&&!o.has(l))&&(this.fsw._incrReadyCount(),p=I.join(r,I.relative(r,p)),this._addToNodeFs(p,u,n,i+1))}}).on(us,this._boundHandleError);return new Promise(f=>c.once(Mo,()=>{if(this.fsw.closed){c=void 0;return}const l=D?D.clear():!1;f(),o.getChildren().filter(p=>p!==e&&!a.has(p)&&(!n.hasGlob||n.filterPath({fullPath:I.resolve(e,p)}))).forEach(p=>{this.fsw._remove(e,p)}),c=void 0,l&&this._handleRead(e,!1,n,s,r,i,D)}))}async _handleDir(e,u,n,s,r,i,D){const o=this.fsw._getWatchedDir(I.dirname(e)),a=o.has(I.basename(e));!(n&&this.fsw.options.ignoreInitial)&&!r&&!a&&(!i.hasGlob||i.globFilter(e))&&this.fsw._emit(Lo,e,u),o.add(I.basename(e)),this.fsw._getWatchedDir(e);let c,f;const l=this.fsw.options.depth;if((l==null||s<=l)&&!this.fsw._symlinkPaths.has(D)){if(!r&&(await this._handleRead(e,n,i,r,e,s,c),this.fsw.closed))return;f=this._watchWithNodeFs(e,(p,C)=>{C&&C.mtimeMs===0||this._handleRead(p,!1,i,r,e,s,c)})}return f}async _addToNodeFs(e,u,n,s,r){const i=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return i(),!1;const D=this.fsw._getWatchHelpers(e,s);!D.hasGlob&&n&&(D.hasGlob=n.hasGlob,D.globFilter=n.globFilter,D.filterPath=o=>n.filterPath(o),D.filterDir=o=>n.filterDir(o));try{const o=await zo[D.statMethod](D.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(D.watchPath,o))return i(),!1;const a=this.fsw.options.followSymlinks&&!e.includes(Go)&&!e.includes(Wo);let c;if(o.isDirectory()){const f=I.resolve(e),l=a?await Jt(e):e;if(this.fsw.closed||(c=await this._handleDir(D.watchPath,o,u,s,r,D,l),this.fsw.closed))return;f!==l&&l!==void 0&&this.fsw._symlinkPaths.set(f,l)}else if(o.isSymbolicLink()){const f=a?await Jt(e):e;if(this.fsw.closed)return;const l=I.dirname(D.watchPath);if(this.fsw._getWatchedDir(l).add(D.watchPath),this.fsw._emit(tt,D.watchPath,o),c=await this._handleDir(l,o,u,s,e,D,f),this.fsw.closed)return;f!==void 0&&this.fsw._symlinkPaths.set(I.resolve(e),f)}else c=this._handleFile(D.watchPath,o,u);return i(),this.fsw._addPathCloser(e,c),!1}catch(o){if(this.fsw._handleError(o))return i(),e}}}var Zo=Qo,uu={exports:{}};const nu=ie,L=K,{promisify:su}=_e;let ge;try{ge=Ie("fsevents")}catch(t){process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR&&console.error(t)}if(ge){const t=process.version.match(/v(\d+)\.(\d+)/);if(t&&t[1]&&t[2]){const e=Number.parseInt(t[1],10),u=Number.parseInt(t[2],10);e===8&&u<16&&(ge=void 0)}}const{EV_ADD:ru,EV_CHANGE:Jo,EV_ADD_DIR:is,EV_UNLINK:st,EV_ERROR:ea,STR_DATA:ta,STR_END:ua,FSEVENT_CREATED:na,FSEVENT_MODIFIED:sa,FSEVENT_DELETED:ra,FSEVENT_MOVED:ia,FSEVENT_UNKNOWN:Da,FSEVENT_TYPE_FILE:oa,FSEVENT_TYPE_DIRECTORY:Te,FSEVENT_TYPE_SYMLINK:Ds,ROOT_GLOBSTAR:os,DIR_SUFFIX:aa,DOT_SLASH:as,FUNCTION_TYPE:iu,EMPTY_FN:la,IDENTITY_FN:ca}=Je,fa=t=>isNaN(t)?{}:{depth:t},Du=su(nu.stat),ha=su(nu.lstat),ls=su(nu.realpath),da={stat:Du,lstat:ha},le=new Map,Ea=10,pa=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),Ca=(t,e)=>({stop:ge.watch(t,e)});function Fa(t,e,u,n){let s=L.extname(e)?L.dirname(e):e;const r=L.dirname(s);let i=le.get(s);ga(r)&&(s=r);const D=L.resolve(t),o=D!==e,a=(f,l,p)=>{o&&(f=f.replace(e,D)),(f===D||!f.indexOf(D+L.sep))&&u(f,l,p)};let c=!1;for(const f of le.keys())if(e.indexOf(L.resolve(f)+L.sep)===0){s=f,i=le.get(s),c=!0;break}return i||c?i.listeners.add(a):(i={listeners:new Set([a]),rawEmitter:n,watcher:Ca(s,(f,l)=>{if(!i.listeners.size)return;const p=ge.getInfo(f,l);i.listeners.forEach(C=>{C(f,l,p)}),i.rawEmitter(p.event,f,p)})},le.set(s,i)),()=>{const f=i.listeners;if(f.delete(a),!f.size&&(le.delete(s),i.watcher))return i.watcher.stop().then(()=>{i.rawEmitter=i.watcher=void 0,Object.freeze(i)})}}const ga=t=>{let e=0;for(const u of le.keys())if(u.indexOf(t)===0&&(e++,e>=Ea))return!0;return!1},ma=()=>ge&&le.size<128,ou=(t,e)=>{let u=0;for(;!t.indexOf(e)&&(t=L.dirname(t))!==e;)u++;return u},cs=(t,e)=>t.type===Te&&e.isDirectory()||t.type===Ds&&e.isSymbolicLink()||t.type===oa&&e.isFile();class _a{constructor(e){this.fsw=e}checkIgnored(e,u){const n=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,u))return n.add(e),u&&u.isDirectory()&&n.add(e+os),!0;n.delete(e),n.delete(e+os)}addOrChange(e,u,n,s,r,i,D,o){const a=r.has(i)?Jo:ru;this.handleEvent(a,e,u,n,s,r,i,D,o)}async checkExists(e,u,n,s,r,i,D,o){try{const a=await Du(e);if(this.fsw.closed)return;cs(D,a)?this.addOrChange(e,u,n,s,r,i,D,o):this.handleEvent(st,e,u,n,s,r,i,D,o)}catch(a){a.code==="EACCES"?this.addOrChange(e,u,n,s,r,i,D,o):this.handleEvent(st,e,u,n,s,r,i,D,o)}}handleEvent(e,u,n,s,r,i,D,o,a){if(!(this.fsw.closed||this.checkIgnored(u)))if(e===st){const c=o.type===Te;(c||i.has(D))&&this.fsw._remove(r,D,c)}else{if(e===ru){if(o.type===Te&&this.fsw._getWatchedDir(u),o.type===Ds&&a.followSymlinks){const f=a.depth===void 0?void 0:ou(n,s)+1;return this._addToFsEvents(u,!1,!0,f)}this.fsw._getWatchedDir(r).add(D)}const c=o.type===Te?e+aa:e;this.fsw._emit(c,u),c===is&&this._addToFsEvents(u,!1,!0)}}_watchWithFsEvents(e,u,n,s){if(this.fsw.closed||this.fsw._isIgnored(e))return;const r=this.fsw.options,D=Fa(e,u,async(o,a,c)=>{if(this.fsw.closed||r.depth!==void 0&&ou(o,u)>r.depth)return;const f=n(L.join(e,L.relative(e,o)));if(s&&!s(f))return;const l=L.dirname(f),p=L.basename(f),C=this.fsw._getWatchedDir(c.type===Te?f:l);if(pa.has(a)||c.event===Da)if(typeof r.ignored===iu){let F;try{F=await Du(f)}catch{}if(this.fsw.closed||this.checkIgnored(f,F))return;cs(c,F)?this.addOrChange(f,o,u,l,C,p,c,r):this.handleEvent(st,f,o,u,l,C,p,c,r)}else this.checkExists(f,o,u,l,C,p,c,r);else switch(c.event){case na:case sa:return this.addOrChange(f,o,u,l,C,p,c,r);case ra:case ia:return this.checkExists(f,o,u,l,C,p,c,r)}},this.fsw._emitRaw);return this.fsw._emitReady(),D}async _handleFsEventsSymlink(e,u,n,s){if(!(this.fsw.closed||this.fsw._symlinkPaths.has(u))){this.fsw._symlinkPaths.set(u,!0),this.fsw._incrReadyCount();try{const r=await ls(e);if(this.fsw.closed)return;if(this.fsw._isIgnored(r))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents(r||e,i=>{let D=e;return r&&r!==as?D=i.replace(r,e):i!==as&&(D=L.join(e,i)),n(D)},!1,s)}catch(r){if(this.fsw._handleError(r))return this.fsw._emitReady()}}}emitAdd(e,u,n,s,r){const i=n(e),D=u.isDirectory(),o=this.fsw._getWatchedDir(L.dirname(i)),a=L.basename(i);D&&this.fsw._getWatchedDir(i),!o.has(a)&&(o.add(a),(!s.ignoreInitial||r===!0)&&this.fsw._emit(D?is:ru,i,u))}initWatch(e,u,n,s){if(this.fsw.closed)return;const r=this._watchWithFsEvents(n.watchPath,L.resolve(e||n.watchPath),s,n.globFilter);this.fsw._addPathCloser(u,r)}async _addToFsEvents(e,u,n,s){if(this.fsw.closed)return;const r=this.fsw.options,i=typeof u===iu?u:ca,D=this.fsw._getWatchHelpers(e);try{const o=await da[D.statMethod](D.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(D.watchPath,o))throw null;if(o.isDirectory()){if(D.globFilter||this.emitAdd(i(e),o,i,r,n),s&&s>r.depth)return;this.fsw._readdirp(D.watchPath,{fileFilter:a=>D.filterPath(a),directoryFilter:a=>D.filterDir(a),...fa(r.depth-(s||0))}).on(ta,a=>{if(this.fsw.closed||a.stats.isDirectory()&&!D.filterPath(a))return;const c=L.join(D.watchPath,a.path),{fullPath:f}=a;if(D.followSymlinks&&a.stats.isSymbolicLink()){const l=r.depth===void 0?void 0:ou(c,L.resolve(D.watchPath))+1;this._handleFsEventsSymlink(c,f,i,l)}else this.emitAdd(c,a.stats,i,r,n)}).on(ea,la).on(ua,()=>{this.fsw._emitReady()})}else this.emitAdd(D.watchPath,o,i,r,n),this.fsw._emitReady()}catch(o){(!o||this.fsw._handleError(o))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(r.persistent&&n!==!0)if(typeof u===iu)this.initWatch(void 0,e,D,i);else{let o;try{o=await ls(D.watchPath)}catch{}this.initWatch(o,e,D,i)}}}uu.exports=_a,uu.exports.canUse=ma;const{EventEmitter:Aa}=Hs,au=ie,B=K,{promisify:fs}=_e,ya=_D,lu=Ut.exports.default,wa=ID,cu=xn,Ra=bo,ba=vn,va=Zo,hs=uu.exports,{EV_ALL:fu,EV_READY:Ba,EV_ADD:rt,EV_CHANGE:xe,EV_UNLINK:ds,EV_ADD_DIR:Sa,EV_UNLINK_DIR:$a,EV_RAW:Ta,EV_ERROR:hu,STR_CLOSE:xa,STR_END:Oa,BACK_SLASH_RE:Na,DOUBLE_SLASH_RE:Es,SLASH_OR_BACK_SLASH_RE:Ha,DOT_RE:Pa,REPLACER_RE:Ia,SLASH:du,SLASH_SLASH:La,BRACE_START:ka,BANG:Eu,ONE_DOT:ps,TWO_DOTS:Ma,GLOBSTAR:Wa,SLASH_GLOBSTAR:pu,ANYMATCH_OPTS:Cu,STRING_TYPE:Fu,FUNCTION_TYPE:Ga,EMPTY_STR:gu,EMPTY_FN:ja,isWindows:Ua,isMacos:Ka,isIBMi:Va}=Je,za=fs(au.stat),Ya=fs(au.readdir),mu=(t=[])=>Array.isArray(t)?t:[t],Cs=(t,e=[])=>(t.forEach(u=>{Array.isArray(u)?Cs(u,e):e.push(u)}),e),Fs=t=>{const e=Cs(mu(t));if(!e.every(u=>typeof u===Fu))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(ms)},gs=t=>{let e=t.replace(Na,du),u=!1;for(e.startsWith(La)&&(u=!0);e.match(Es);)e=e.replace(Es,du);return u&&(e=du+e),e},ms=t=>gs(B.normalize(gs(t))),_s=(t=gu)=>e=>typeof e!==Fu?e:ms(B.isAbsolute(e)?e:B.join(t,e)),qa=(t,e)=>B.isAbsolute(t)?t:t.startsWith(Eu)?Eu+B.join(e,t.slice(1)):B.join(e,t),q=(t,e)=>t[e]===void 0;class Xa{constructor(e,u){this.path=e,this._removeWatcher=u,this.items=new Set}add(e){const{items:u}=this;!u||e!==ps&&e!==Ma&&u.add(e)}async remove(e){const{items:u}=this;if(!u||(u.delete(e),u.size>0))return;const n=this.path;try{await Ya(n)}catch{this._removeWatcher&&this._removeWatcher(B.dirname(n),B.basename(n))}}has(e){const{items:u}=this;if(!!u)return u.has(e)}getChildren(){const{items:e}=this;if(!!e)return[...e.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}}const Qa="stat",Za="lstat";class Ja{constructor(e,u,n,s){this.fsw=s,this.path=e=e.replace(Ia,gu),this.watchPath=u,this.fullWatchPath=B.resolve(u),this.hasGlob=u!==e,e===gu&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&n?void 0:!1,this.globFilter=this.hasGlob?lu(e,void 0,Cu):!1,this.dirParts=this.getDirParts(e),this.dirParts.forEach(r=>{r.length>1&&r.pop()}),this.followSymlinks=n,this.statMethod=n?Qa:Za}checkGlobSymlink(e){return this.globSymlink===void 0&&(this.globSymlink=e.fullParentDir===this.fullWatchPath?!1:{realPath:e.fullParentDir,linkPath:this.fullWatchPath}),this.globSymlink?e.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath):e.fullPath}entryPath(e){return B.join(this.watchPath,B.relative(this.watchPath,this.checkGlobSymlink(e)))}filterPath(e){const{stats:u}=e;if(u&&u.isSymbolicLink())return this.filterDir(e);const n=this.entryPath(e);return(this.hasGlob&&typeof this.globFilter===Ga?this.globFilter(n):!0)&&this.fsw._isntIgnored(n,u)&&this.fsw._hasReadPermissions(u)}getDirParts(e){if(!this.hasGlob)return[];const u=[];return(e.includes(ka)?Ra.expand(e):[e]).forEach(s=>{u.push(B.relative(this.watchPath,s).split(Ha))}),u}filterDir(e){if(this.hasGlob){const u=this.getDirParts(this.checkGlobSymlink(e));let n=!1;this.unmatchedGlob=!this.dirParts.some(s=>s.every((r,i)=>(r===Wa&&(n=!0),n||!u[0][i]||lu(r,u[0][i],Cu))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}}class el extends Aa{constructor(e){super();const u={};e&&Object.assign(u,e),this._watched=new Map,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._symlinkPaths=new Map,this._streams=new Set,this.closed=!1,q(u,"persistent")&&(u.persistent=!0),q(u,"ignoreInitial")&&(u.ignoreInitial=!1),q(u,"ignorePermissionErrors")&&(u.ignorePermissionErrors=!1),q(u,"interval")&&(u.interval=100),q(u,"binaryInterval")&&(u.binaryInterval=300),q(u,"disableGlobbing")&&(u.disableGlobbing=!1),u.enableBinaryInterval=u.binaryInterval!==u.interval,q(u,"useFsEvents")&&(u.useFsEvents=!u.usePolling),hs.canUse()||(u.useFsEvents=!1),q(u,"usePolling")&&!u.useFsEvents&&(u.usePolling=Ka),Va&&(u.usePolling=!0);const s=process.env.CHOKIDAR_USEPOLLING;if(s!==void 0){const o=s.toLowerCase();o==="false"||o==="0"?u.usePolling=!1:o==="true"||o==="1"?u.usePolling=!0:u.usePolling=!!o}const r=process.env.CHOKIDAR_INTERVAL;r&&(u.interval=Number.parseInt(r,10)),q(u,"atomic")&&(u.atomic=!u.usePolling&&!u.useFsEvents),u.atomic&&(this._pendingUnlinks=new Map),q(u,"followSymlinks")&&(u.followSymlinks=!0),q(u,"awaitWriteFinish")&&(u.awaitWriteFinish=!1),u.awaitWriteFinish===!0&&(u.awaitWriteFinish={});const i=u.awaitWriteFinish;i&&(i.stabilityThreshold||(i.stabilityThreshold=2e3),i.pollInterval||(i.pollInterval=100),this._pendingWrites=new Map),u.ignored&&(u.ignored=mu(u.ignored));let D=0;this._emitReady=()=>{D++,D>=this._readyCount&&(this._emitReady=ja,this._readyEmitted=!0,process.nextTick(()=>this.emit(Ba)))},this._emitRaw=(...o)=>this.emit(Ta,...o),this._readyEmitted=!1,this.options=u,u.useFsEvents?this._fsEventsHandler=new hs(this):this._nodeFsHandler=new va(this),Object.freeze(u)}add(e,u,n){const{cwd:s,disableGlobbing:r}=this.options;this.closed=!1;let i=Fs(e);return s&&(i=i.map(D=>{const o=qa(D,s);return r||!cu(D)?o:ba(o)})),i=i.filter(D=>D.startsWith(Eu)?(this._ignoredPaths.add(D.slice(1)),!1):(this._ignoredPaths.delete(D),this._ignoredPaths.delete(D+pu),this._userIgnored=void 0,!0)),this.options.useFsEvents&&this._fsEventsHandler?(this._readyCount||(this._readyCount=i.length),this.options.persistent&&(this._readyCount*=2),i.forEach(D=>this._fsEventsHandler._addToFsEvents(D))):(this._readyCount||(this._readyCount=0),this._readyCount+=i.length,Promise.all(i.map(async D=>{const o=await this._nodeFsHandler._addToNodeFs(D,!n,0,0,u);return o&&this._emitReady(),o})).then(D=>{this.closed||D.filter(o=>o).forEach(o=>{this.add(B.dirname(o),B.basename(u||o))})})),this}unwatch(e){if(this.closed)return this;const u=Fs(e),{cwd:n}=this.options;return u.forEach(s=>{!B.isAbsolute(s)&&!this._closers.has(s)&&(n&&(s=B.join(n,s)),s=B.resolve(s)),this._closePath(s),this._ignoredPaths.add(s),this._watched.has(s)&&this._ignoredPaths.add(s+pu),this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();const e=[];return this._closers.forEach(u=>u.forEach(n=>{const s=n();s instanceof Promise&&e.push(s)})),this._streams.forEach(u=>u.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(u=>u.dispose()),["closers","watched","streams","symlinkPaths","throttled"].forEach(u=>{this[`_${u}`].clear()}),this._closePromise=e.length?Promise.all(e).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){const e={};return this._watched.forEach((u,n)=>{const s=this.options.cwd?B.relative(this.options.cwd,n):n;e[s||ps]=u.getChildren().sort()}),e}emitWithAll(e,u){this.emit(...u),e!==hu&&this.emit(fu,...u)}async _emit(e,u,n,s,r){if(this.closed)return;const i=this.options;Ua&&(u=B.normalize(u)),i.cwd&&(u=B.relative(i.cwd,u));const D=[e,u];r!==void 0?D.push(n,s,r):s!==void 0?D.push(n,s):n!==void 0&&D.push(n);const o=i.awaitWriteFinish;let a;if(o&&(a=this._pendingWrites.get(u)))return a.lastChange=new Date,this;if(i.atomic){if(e===ds)return this._pendingUnlinks.set(u,D),setTimeout(()=>{this._pendingUnlinks.forEach((c,f)=>{this.emit(...c),this.emit(fu,...c),this._pendingUnlinks.delete(f)})},typeof i.atomic=="number"?i.atomic:100),this;e===rt&&this._pendingUnlinks.has(u)&&(e=D[0]=xe,this._pendingUnlinks.delete(u))}if(o&&(e===rt||e===xe)&&this._readyEmitted){const c=(f,l)=>{f?(e=D[0]=hu,D[1]=f,this.emitWithAll(e,D)):l&&(D.length>2?D[2]=l:D.push(l),this.emitWithAll(e,D))};return this._awaitWriteFinish(u,o.stabilityThreshold,e,c),this}if(e===xe&&!this._throttle(xe,u,50))return this;if(i.alwaysStat&&n===void 0&&(e===rt||e===Sa||e===xe)){const c=i.cwd?B.join(i.cwd,u):u;let f;try{f=await za(c)}catch{}if(!f||this.closed)return;D.push(f)}return this.emitWithAll(e,D),this}_handleError(e){const u=e&&e.code;return e&&u!=="ENOENT"&&u!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||u!=="EPERM"&&u!=="EACCES")&&this.emit(hu,e),e||this.closed}_throttle(e,u,n){this._throttled.has(e)||this._throttled.set(e,new Map);const s=this._throttled.get(e),r=s.get(u);if(r)return r.count++,!1;let i;const D=()=>{const a=s.get(u),c=a?a.count:0;return s.delete(u),clearTimeout(i),a&&clearTimeout(a.timeoutObject),c};i=setTimeout(D,n);const o={timeoutObject:i,clear:D,count:0};return s.set(u,o),o}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,u,n,s){let r,i=e;this.options.cwd&&!B.isAbsolute(e)&&(i=B.join(this.options.cwd,e));const D=new Date,o=a=>{au.stat(i,(c,f)=>{if(c||!this._pendingWrites.has(e)){c&&c.code!=="ENOENT"&&s(c);return}const l=Number(new Date);a&&f.size!==a.size&&(this._pendingWrites.get(e).lastChange=l);const p=this._pendingWrites.get(e);l-p.lastChange>=u?(this._pendingWrites.delete(e),s(void 0,f)):r=setTimeout(o,this.options.awaitWriteFinish.pollInterval,f)})};this._pendingWrites.has(e)||(this._pendingWrites.set(e,{lastChange:D,cancelWait:()=>(this._pendingWrites.delete(e),clearTimeout(r),n)}),r=setTimeout(o,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,u){if(this.options.atomic&&Pa.test(e))return!0;if(!this._userIgnored){const{cwd:n}=this.options,s=this.options.ignored,r=s&&s.map(_s(n)),i=mu(r).filter(o=>typeof o===Fu&&!cu(o)).map(o=>o+pu),D=this._getGlobIgnored().map(_s(n)).concat(r,i);this._userIgnored=lu(D,void 0,Cu)}return this._userIgnored([e,u])}_isntIgnored(e,u){return!this._isIgnored(e,u)}_getWatchHelpers(e,u){const n=u||this.options.disableGlobbing||!cu(e)?e:wa(e),s=this.options.followSymlinks;return new Ja(e,n,s,this)}_getWatchedDir(e){this._boundRemove||(this._boundRemove=this._remove.bind(this));const u=B.resolve(e);return this._watched.has(u)||this._watched.set(u,new Xa(u,this._boundRemove)),this._watched.get(u)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return!0;const n=(e&&Number.parseInt(e.mode,10))&511,s=Number.parseInt(n.toString(8)[0],10);return Boolean(4&s)}_remove(e,u,n){const s=B.join(e,u),r=B.resolve(s);if(n=n!=null?n:this._watched.has(s)||this._watched.has(r),!this._throttle("remove",s,100))return;!n&&!this.options.useFsEvents&&this._watched.size===1&&this.add(e,u,!0),this._getWatchedDir(s).getChildren().forEach(l=>this._remove(s,l));const o=this._getWatchedDir(e),a=o.has(u);o.remove(u),this._symlinkPaths.has(r)&&this._symlinkPaths.delete(r);let c=s;if(this.options.cwd&&(c=B.relative(this.options.cwd,s)),this.options.awaitWriteFinish&&this._pendingWrites.has(c)&&this._pendingWrites.get(c).cancelWait()===rt)return;this._watched.delete(s),this._watched.delete(r);const f=n?$a:ds;a&&!this._isIgnored(s)&&this._emit(f,s),this.options.useFsEvents||this._closePath(s)}_closePath(e){this._closeFile(e);const u=B.dirname(e);this._getWatchedDir(u).remove(B.basename(e))}_closeFile(e){const u=this._closers.get(e);!u||(u.forEach(n=>n()),this._closers.delete(e))}_addPathCloser(e,u){if(!u)return;let n=this._closers.get(e);n||(n=[],this._closers.set(e,n)),n.push(u)}_readdirp(e,u){if(this.closed)return;const n={type:fu,alwaysStat:!0,lstat:!0,...u};let s=ya(e,n);return this._streams.add(s),s.once(xa,()=>{s=void 0}),s.once(Oa,()=>{s&&(this._streams.delete(s),s=void 0)}),s}}const tl=(t,e)=>{const u=new el(e);return u.add(t),u};var ul=tl;let ce=!0;const me=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let As=0;if(me.process&&me.process.env&&me.process.stdout){const{FORCE_COLOR:t,NODE_DISABLE_COLORS:e,TERM:u}=me.process.env;e||t==="0"?ce=!1:t==="1"?ce=!0:u==="dumb"?ce=!1:"CI"in me.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(n=>n in me.process.env)?ce=!0:ce=process.stdout.isTTY,ce&&(As=u&&u.endsWith("-256color")?2:1)}let ys={enabled:ce,supportLevel:As};function ws(t,e,u=1){const n=`\x1B[${t}m`,s=`\x1B[${e}m`,r=new RegExp(`\\x1b\\[${e}m`,"g");return i=>ys.enabled&&ys.supportLevel>=u?n+(""+i).replace(r,n)+s:""+i}const nl=ws(90,39),sl=ws(96,39),rl=()=>new Date().toLocaleTimeString(),il=(...t)=>console.log(nl(rl()),sl("[tsx]"),...t),Dl="\x1Bc";function ol(t,e){let u;return()=>{u&&clearTimeout(u),u=setTimeout(()=>t(),e)}}function al(t){return t&&"type"in t&&t.type==="dependency"}const Rs={noCache:{type:Boolean,description:"Disable caching",default:!1},tsconfig:{type:String,description:"Custom tsconfig.json path"},clearScreen:{type:Boolean,description:"Clearing the screen on rerun",default:!0},ignore:{type:[String],description:"Paths & globs to exclude from being watched"}},ll=ti({name:"watch",parameters:["<script path>"],flags:Rs,help:{description:"Run the script and watch for changes"}},t=>{const e=lt(Rs,process.argv.slice(3),{ignoreUnknown:!0})._,u={noCache:t.flags.noCache,tsconfigPath:t.flags.tsconfig,clearScreen:t.flags.clearScreen,ignore:t.flags.ignore,ipc:!0};let n;const s=ol(()=>{n&&!n.killed&&n.exitCode===null&&n.kill(),n&&il("rerunning"),u.clearScreen&&process.stdout.write(Dl),n=an(e,u),n.on("message",D=>{if(al(D)){const o=D.path.startsWith("file:")?Os(D.path):D.path;K.isAbsolute(o)&&i.add(o)}})},100);s();function r(D){n&&n.kill(),process.exit(D)}process.once("SIGINT",()=>r(130)),process.once("SIGTERM",()=>r(143));const i=ul(t._,{ignoreInitial:!0,ignored:["**/.*/**","**/{node_modules,bower_components,vendor}/**","**/dist/**",...u.ignore],ignorePermissionErrors:!0}).on("all",s);process.stdin.on("data",s)}),bs={noCache:{type:Boolean,description:"Disable caching"},tsconfig:{type:String,description:"Custom tsconfig.json path"}},vs={...bs,version:{type:Boolean,description:"Show version"},help:{type:Boolean,alias:"h",description:"Show help"}};ei({name:"tsx",parameters:["[script path]"],commands:[ll],flags:vs,help:!1},t=>{const e=t._.length===0;if(e){if(t.flags.version){console.log(Ts);return}if(t.flags.help){t.showHelp({description:"Node.js runtime enhanced with esbuild for loading TypeScript & ESM"});return}process.argv.push(Ie.resolve("./repl"))}const u=lt(e?vs:bs,process.argv.slice(2),{ignoreUnknown:!0})._;an(u,{noCache:Boolean(t.flags.noCache),tsconfigPath:t.flags.tsconfig}).on("close",n=>process.exit(n))});
|
package/dist/loader.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./pkgroll_create-require-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./pkgroll_create-require-9e8c451f.cjs"),r=require("@esbuild-kit/esm-loader");require("module"),t.require("@esbuild-kit/cjs-loader"),Object.keys(r).forEach(function(e){e!=="default"&&!exports.hasOwnProperty(e)&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return r[e]}})});
|
package/dist/loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r}from"./pkgroll_create-require-
|
|
1
|
+
import{r}from"./pkgroll_create-require-cf330718.js";export*from"@esbuild-kit/esm-loader";import"module";r("@esbuild-kit/cjs-loader");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="3.10.0";export{r as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var r="3.10.0";exports.version=r;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/repl.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var c=require("repl"),n=require("@esbuild-kit/core-utils"),i=require("./package-
|
|
1
|
+
"use strict";var c=require("repl"),n=require("@esbuild-kit/core-utils"),i=require("./package-ef86230d.cjs");function u(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var p=u(c);console.log(`Welcome to tsx v${i.version} (Node.js ${process.version}).
|
|
2
2
|
Type ".help" for more information.`);const o=p.default.start(),{eval:f}=o,d=async function(e,t,r,a){const s=await n.transform(e,r,{loader:"ts",tsconfigRaw:{compilerOptions:{preserveValueImports:!0}},define:{require:"global.require"}}).catch(l=>(console.log(l.message),{code:`
|
|
3
3
|
`}));return f.call(this,s.code,t,r,a)};o.eval=d;
|
package/dist/repl.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import l from"repl";import{transform as c}from"@esbuild-kit/core-utils";import{v as i}from"./package-
|
|
1
|
+
import l from"repl";import{transform as c}from"@esbuild-kit/core-utils";import{v as i}from"./package-767bbb00.js";console.log(`Welcome to tsx v${i} (Node.js ${process.version}).
|
|
2
2
|
Type ".help" for more information.`);const e=l.start(),{eval:m}=e,p=async function(r,t,o,s){const n=await c(r,o,{loader:"ts",tsconfigRaw:{compilerOptions:{preserveValueImports:!0}},define:{require:"global.require"}}).catch(a=>(console.log(a.message),{code:`
|
|
3
3
|
`}));return m.call(this,n.code,t,o,s)};e.eval=p;
|
package/package.json
CHANGED
|
@@ -1,72 +1,40 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"@esbuild-kit/core-utils": "^2.1.0",
|
|
42
|
-
"@esbuild-kit/esm-loader": "^2.4.2"
|
|
43
|
-
},
|
|
44
|
-
"optionalDependencies": {
|
|
45
|
-
"fsevents": "~2.3.2"
|
|
46
|
-
},
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"@pvtnbr/eslint-config": "^0.27.0",
|
|
49
|
-
"@types/cross-spawn": "^6.0.2",
|
|
50
|
-
"@types/node": "^18.6.4",
|
|
51
|
-
"@types/semver": "^7.3.10",
|
|
52
|
-
"chokidar": "^3.5.3",
|
|
53
|
-
"cleye": "^1.2.1",
|
|
54
|
-
"cross-spawn": "^7.0.3",
|
|
55
|
-
"eslint": "^8.21.0",
|
|
56
|
-
"execa": "^6.1.0",
|
|
57
|
-
"fs-fixture": "^1.1.0",
|
|
58
|
-
"get-node": "^13.1.0",
|
|
59
|
-
"kolorist": "^1.5.1",
|
|
60
|
-
"manten": "^0.2.1",
|
|
61
|
-
"pkgroll": "^1.4.0",
|
|
62
|
-
"semver": "^7.3.7",
|
|
63
|
-
"type-flag": "^2.2.0",
|
|
64
|
-
"typescript": "^4.7.4"
|
|
65
|
-
},
|
|
66
|
-
"eslintConfig": {
|
|
67
|
-
"extends": "@pvtnbr",
|
|
68
|
-
"ignorePatterns": [
|
|
69
|
-
"tests/fixtures"
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
}
|
|
2
|
+
"name": "tsx",
|
|
3
|
+
"version": "3.10.0",
|
|
4
|
+
"description": "TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM files",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"esbuild",
|
|
7
|
+
"runtime",
|
|
8
|
+
"node",
|
|
9
|
+
"cjs",
|
|
10
|
+
"commonjs",
|
|
11
|
+
"esm",
|
|
12
|
+
"typescript"
|
|
13
|
+
],
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"repository": "esbuild-kit/tsx",
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "Hiroki Osame",
|
|
18
|
+
"email": "hiroki.osame@gmail.com"
|
|
19
|
+
},
|
|
20
|
+
"type": "module",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"exports": {
|
|
25
|
+
"./package.json": "./package.json",
|
|
26
|
+
".": "./dist/loader.js",
|
|
27
|
+
"./cli": "./dist/cli.js",
|
|
28
|
+
"./suppress-warnings": "./dist/suppress-warnings.cjs",
|
|
29
|
+
"./repl": "./dist/repl.js"
|
|
30
|
+
},
|
|
31
|
+
"bin": "./dist/cli.js",
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@esbuild-kit/cjs-loader": "^2.4.0",
|
|
34
|
+
"@esbuild-kit/core-utils": "^3.0.0",
|
|
35
|
+
"@esbuild-kit/esm-loader": "^2.5.0"
|
|
36
|
+
},
|
|
37
|
+
"optionalDependencies": {
|
|
38
|
+
"fsevents": "~2.3.2"
|
|
39
|
+
}
|
|
40
|
+
}
|
package/dist/package-1a10c063.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r="3.8.2";export{r as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var r="3.8.2";exports.version=r;
|