@storybook/preset-create-react-app 0.0.0-pr-23609-sha-f47ef339
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/CHANGELOG.md +89 -0
- package/README.md +130 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +14 -0
- package/package.json +80 -0
- package/src/typings.d.ts +1 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
## 4.1.2
|
|
2
|
+
|
|
3
|
+
- Use overrides from SB rather than defining ourselves [#254](https://github.com/storybookjs/presets/pull/254)
|
|
4
|
+
|
|
5
|
+
## 4.1.1
|
|
6
|
+
|
|
7
|
+
- Update peer dependencies and add a note about versions [#252](https://github.com/storybookjs/presets/pull/252)
|
|
8
|
+
|
|
9
|
+
## 4.1.0
|
|
10
|
+
|
|
11
|
+
- Add support for builder.core options to CRA preset [#240](https://github.com/storybookjs/presets/pull/240)
|
|
12
|
+
|
|
13
|
+
## 4.0.2
|
|
14
|
+
|
|
15
|
+
- Fix bug merging core presets [#238](https://github.com/storybookjs/presets/pull/238) [#239](https://github.com/storybookjs/presets/pull/239)
|
|
16
|
+
|
|
17
|
+
## 4.0.1
|
|
18
|
+
|
|
19
|
+
- Support CJS files using Storybook's config [#229](https://github.com/storybookjs/presets/pull/229)
|
|
20
|
+
|
|
21
|
+
## 4.0.0
|
|
22
|
+
|
|
23
|
+
- CRA: Add compatibility for CRA v5 [#214](https://github.com/storybookjs/presets/pull/214)
|
|
24
|
+
|
|
25
|
+
## 3.2.0
|
|
26
|
+
|
|
27
|
+
- Add disableWebpackDefaults for forward-compatibility with SB core
|
|
28
|
+
|
|
29
|
+
## 3.1.7
|
|
30
|
+
|
|
31
|
+
- CRA: Fix fast refresh config [#193](https://github.com/storybookjs/presets/pull/193)
|
|
32
|
+
|
|
33
|
+
## 3.1.6
|
|
34
|
+
|
|
35
|
+
- Fix monorepos and PnP [#181](https://github.com/storybookjs/presets/pull/181)
|
|
36
|
+
|
|
37
|
+
## 3.1.5
|
|
38
|
+
|
|
39
|
+
- Fix duplicate ReactDocgenTypescriptPlugin [#173](https://github.com/storybookjs/presets/pull/173)
|
|
40
|
+
- Bump react-docgen-typescript-plugin to 0.6.2 [#174](https://github.com/storybookjs/presets/pull/174)
|
|
41
|
+
|
|
42
|
+
## 3.1.4
|
|
43
|
+
|
|
44
|
+
- Upgrade react-docgen-typescript-plugin to 0.5.x [#158](https://github.com/storybookjs/presets/pull/158)
|
|
45
|
+
|
|
46
|
+
## 3.1.3
|
|
47
|
+
|
|
48
|
+
- Move node-logger to peer deps [#156](https://github.com/storybookjs/presets/pull/156)
|
|
49
|
+
|
|
50
|
+
## 3.1.2
|
|
51
|
+
|
|
52
|
+
- Restore node@10 compatibility [#154](https://github.com/storybookjs/presets/pull/154)
|
|
53
|
+
|
|
54
|
+
## 3.1.1
|
|
55
|
+
|
|
56
|
+
- Fix react-docgen-typescript-plugin deps [#151](https://github.com/storybookjs/presets/pull/151)
|
|
57
|
+
|
|
58
|
+
## 3.1.0
|
|
59
|
+
|
|
60
|
+
- Move to react-docgen-typescript-plugin [#149](https://github.com/storybookjs/presets/pull/149)
|
|
61
|
+
|
|
62
|
+
## 3.0.1
|
|
63
|
+
|
|
64
|
+
- Ignore default babel Config from Storybook [#147](https://github.com/storybookjs/presets/pull/147)
|
|
65
|
+
|
|
66
|
+
## 3.0.0
|
|
67
|
+
|
|
68
|
+
Reverse course on typescript docgen handling [#142](https://github.com/storybookjs/presets/pull/142)
|
|
69
|
+
|
|
70
|
+
- Add back `react-docgen-typescript-loader` to the preset
|
|
71
|
+
- Add compatibility with SB6's main.js `typescript` setting
|
|
72
|
+
|
|
73
|
+
## 2.1.2
|
|
74
|
+
|
|
75
|
+
- Make `@storybook/node-logger` dependency less strict [#138](https://github.com/storybookjs/presets/pull/138)
|
|
76
|
+
|
|
77
|
+
## 2.1.1
|
|
78
|
+
|
|
79
|
+
- Set PUBLIC_URL if not set [#104](https://github.com/storybookjs/presets/pull/104)
|
|
80
|
+
|
|
81
|
+
## 2.1.0
|
|
82
|
+
|
|
83
|
+
- Yarn PNP compatibility [#104](https://github.com/storybookjs/presets/pull/104)
|
|
84
|
+
|
|
85
|
+
## 2.0.0
|
|
86
|
+
|
|
87
|
+
- Remove `react-docgen-typescript-loader` from the preset [#103](https://github.com/storybookjs/presets/pull/103)
|
|
88
|
+
|
|
89
|
+
Starting in `v5.x`, `react-docgen` supports typescript natively, so we no longer recommend `react-docgen-typescript-loader` and have removed it from the preset. This is a breaking change and the migration is documented in [Storybook](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#react-prop-tables-with-typescript).
|
package/README.md
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Create React App preset for Storybook
|
|
2
|
+
|
|
3
|
+
One-line [Create React App](https://github.com/facebook/create-react-app) configuration for Storybook.
|
|
4
|
+
|
|
5
|
+
This preset is designed to use alongside [`@storybook/react`](https://github.com/storybookjs/storybook/tree/master/app/react).
|
|
6
|
+
|
|
7
|
+
## Compatibility
|
|
8
|
+
|
|
9
|
+
This version (4.x) of `@storybook/preset-create-react-app` is compatibly with Create React App version 5 and above. Earlier versions are compatible with earlier version of the preset.
|
|
10
|
+
|
|
11
|
+
## Basic usage
|
|
12
|
+
|
|
13
|
+
**Note: you don't need to do this manually** if you used `npx -p @storybook/cli sb init` on a create-react-app, everything should properly setup already ✅.
|
|
14
|
+
|
|
15
|
+
First, install this preset to your project.
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
# Yarn
|
|
19
|
+
yarn add -D @storybook/preset-create-react-app
|
|
20
|
+
|
|
21
|
+
# npm
|
|
22
|
+
npm install -D @storybook/preset-create-react-app
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Once installed, add this preset to the appropriate file:
|
|
26
|
+
|
|
27
|
+
- `./.storybook/main.js` (for Storybook 5.3.0 and newer)
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
module.exports = {
|
|
31
|
+
addons: ['@storybook/preset-create-react-app'],
|
|
32
|
+
};
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- `./.storybook/presets.js` (for all Storybook versions)
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
module.exports = ['@storybook/preset-create-react-app'];
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Advanced usage
|
|
42
|
+
|
|
43
|
+
### Usage with Docs
|
|
44
|
+
|
|
45
|
+
When working with Storybook Docs, simply add the following config to your `main.js` file.
|
|
46
|
+
|
|
47
|
+
```js
|
|
48
|
+
module.exports = {
|
|
49
|
+
addons: [
|
|
50
|
+
'@storybook/preset-create-react-app',
|
|
51
|
+
{
|
|
52
|
+
name: '@storybook/addon-docs',
|
|
53
|
+
options: {
|
|
54
|
+
configureJSX: true,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
};
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### CRA overrides
|
|
62
|
+
|
|
63
|
+
This preset uses CRA's Webpack/Babel configurations, so that Storybook's behavior matches your app's behavior.
|
|
64
|
+
|
|
65
|
+
However, there may be some cases where you'd rather override CRA's default behavior. If that is something you need, you can use the `craOverrides` object.
|
|
66
|
+
|
|
67
|
+
| Option | Default | Behaviour | Type | Description |
|
|
68
|
+
| -------------------- | ---------------- | --------- | ---------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
69
|
+
| `fileLoaderExcludes` | `['ejs', 'mdx']` | Extends | `string[]` | Excludes file types (by extension) from CRA's `file-loader` configuration. The defaults are required by Storybook. |
|
|
70
|
+
|
|
71
|
+
Here's how you might configure this preset to ignore PDF files so they can be processed by another preset or loader:
|
|
72
|
+
|
|
73
|
+
```js
|
|
74
|
+
module.exports = {
|
|
75
|
+
addons: [
|
|
76
|
+
{
|
|
77
|
+
name: '@storybook/preset-create-react-app',
|
|
78
|
+
options: {
|
|
79
|
+
craOverrides: {
|
|
80
|
+
fileLoaderExcludes: ['pdf'],
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
};
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Custom `react-scripts` packages
|
|
89
|
+
|
|
90
|
+
In most cases, this preset will find your `react-scripts` package, even if it's a fork of the offical `react-scripts`.
|
|
91
|
+
|
|
92
|
+
In the event that it doesn't, you can set the package's name with `scriptsPackageName`.
|
|
93
|
+
|
|
94
|
+
```js
|
|
95
|
+
module.exports = {
|
|
96
|
+
addons: [
|
|
97
|
+
{
|
|
98
|
+
name: '@storybook/preset-create-react-app',
|
|
99
|
+
options: {
|
|
100
|
+
scriptsPackageName: '@my/react-scripts',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
};
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Warning for forks of 'react-scripts'
|
|
108
|
+
|
|
109
|
+
One of the tasks that this preset does is inject the storybook config directory (the default is `.storybook`)
|
|
110
|
+
into the `includes` key of the webpack babel-loader config that react-scripts (or your fork) provides. This is
|
|
111
|
+
nice because then any components/code you've defined in your storybook config directory will be run through the
|
|
112
|
+
babel-loader as well.
|
|
113
|
+
|
|
114
|
+
The potential gotcha exists if you have tweaked the Conditions of the webpack babel-loader rule in your fork of
|
|
115
|
+
react-scripts. This preset will make the `include` condition an array (if not already), and inject the storybook
|
|
116
|
+
config directory. If you have changed the conditions to utilize an `exclude`, then BOTH conditions will need to
|
|
117
|
+
be true (which isn't likely going to work as expected).
|
|
118
|
+
|
|
119
|
+
The steps to remedy this would be to follow the steps for customizing the webpack config within the storybook
|
|
120
|
+
side of things. [Details for storybook custom webpack config](https://storybook.js.org/docs/configurations/custom-webpack-config/)
|
|
121
|
+
You'll have access to all of the rules in `config.module.rules`. You'll need to find the offending rule,
|
|
122
|
+
and customize it how you need it to be to be compatible with your fork.
|
|
123
|
+
|
|
124
|
+
See [Webpack Rule Conditions](https://webpack.js.org/configuration/module/#rule-conditions) for more details
|
|
125
|
+
concerning the conditions.
|
|
126
|
+
|
|
127
|
+
## Resources
|
|
128
|
+
|
|
129
|
+
- [Walkthrough to set up Storybook Docs with CRA & typescript](https://gist.github.com/shilman/bc9cbedb2a7efb5ec6710337cbd20c0c)
|
|
130
|
+
- [Example projects (used for testing this preset)](https://github.com/storybookjs/presets/tree/master/examples)
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __commonJS=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports};var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var require_dist=__commonJS({"../../lib/node-logger/dist/index.js"(exports,module2){"use strict";var __create2=Object.create,__defProp2=Object.defineProperty,__getOwnPropDesc2=Object.getOwnPropertyDescriptor,__getOwnPropNames2=Object.getOwnPropertyNames,__getProtoOf2=Object.getPrototypeOf,__hasOwnProp2=Object.prototype.hasOwnProperty,__commonJS2=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames2(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports},__export2=(target,all)=>{for(var name in all)__defProp2(target,name,{get:all[name],enumerable:!0})},__copyProps2=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames2(from))!__hasOwnProp2.call(to,key)&&key!==except&&__defProp2(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc2(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create2(__getProtoOf2(mod)):{},__copyProps2(isNodeMode||!mod||!mod.__esModule?__defProp2(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS2=mod=>__copyProps2(__defProp2({},"__esModule",{value:!0}),mod),require_tracker_base=__commonJS2({"../../node_modules/npmlog/node_modules/are-we-there-yet/lib/tracker-base.js"(exports2,module22){"use strict";var EventEmitter=require("events").EventEmitter,util=require("util"),trackerId=0,TrackerBase=module22.exports=function(name){EventEmitter.call(this),this.id=++trackerId,this.name=name};util.inherits(TrackerBase,EventEmitter)}}),require_tracker=__commonJS2({"../../node_modules/npmlog/node_modules/are-we-there-yet/lib/tracker.js"(exports2,module22){"use strict";var util=require("util"),TrackerBase=require_tracker_base(),Tracker=module22.exports=function(name,todo){TrackerBase.call(this,name),this.workDone=0,this.workTodo=todo||0};util.inherits(Tracker,TrackerBase),Tracker.prototype.completed=function(){return this.workTodo===0?0:this.workDone/this.workTodo},Tracker.prototype.addWork=function(work){this.workTodo+=work,this.emit("change",this.name,this.completed(),this)},Tracker.prototype.completeWork=function(work){this.workDone+=work,this.workDone>this.workTodo&&(this.workDone=this.workTodo),this.emit("change",this.name,this.completed(),this)},Tracker.prototype.finish=function(){this.workTodo=this.workDone=1,this.emit("change",this.name,1,this)}}}),require_stream=__commonJS2({"../../node_modules/readable-stream/lib/internal/streams/stream.js"(exports2,module22){"use strict";module22.exports=require("stream")}}),require_buffer_list=__commonJS2({"../../node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports2,module22){"use strict";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function _defineProperty(obj,key,value){return key=_toPropertyKey(key),key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _classCallCheck(instance2,Constructor){if(!(instance2 instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key=="symbol"?key:String(key)}function _toPrimitive(input,hint){if(typeof input!="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==void 0){var res=prim.call(input,hint||"default");if(typeof res!="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return(hint==="string"?String:Number)(input)}var _require=require("buffer"),Buffer2=_require.Buffer,_require2=require("util"),inspect=_require2.inspect,custom=inspect&&inspect.custom||"inspect";function copyBuffer(src,target,offset){Buffer2.prototype.copy.call(src,target,offset)}module22.exports=function(){function BufferList(){_classCallCheck(this,BufferList),this.head=null,this.tail=null,this.length=0}return _createClass(BufferList,[{key:"push",value:function(v){var entry={data:v,next:null};this.length>0?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length}},{key:"unshift",value:function(v){var entry={data:v,next:this.head};this.length===0&&(this.tail=entry),this.head=entry,++this.length}},{key:"shift",value:function(){if(this.length!==0){var ret=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,ret}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(s){if(this.length===0)return"";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret}},{key:"concat",value:function(n){if(this.length===0)return Buffer2.alloc(0);for(var ret=Buffer2.allocUnsafe(n>>>0),p=this.head,i=0;p;)copyBuffer(p.data,ret,i),i+=p.data.length,p=p.next;return ret}},{key:"consume",value:function(n,hasStrings){var ret;return n<this.head.data.length?(ret=this.head.data.slice(0,n),this.head.data=this.head.data.slice(n)):n===this.head.data.length?ret=this.shift():ret=hasStrings?this._getString(n):this._getBuffer(n),ret}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(n){var p=this.head,c=1,ret=p.data;for(n-=ret.length;p=p.next;){var str=p.data,nb=n>str.length?str.length:n;if(nb===str.length?ret+=str:ret+=str.slice(0,n),n-=nb,n===0){nb===str.length?(++c,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=str.slice(nb));break}++c}return this.length-=c,ret}},{key:"_getBuffer",value:function(n){var ret=Buffer2.allocUnsafe(n),p=this.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),n-=nb,n===0){nb===buf.length?(++c,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=buf.slice(nb));break}++c}return this.length-=c,ret}},{key:custom,value:function(_,options){return inspect(this,_objectSpread(_objectSpread({},options),{},{depth:0,customInspect:!1}))}}]),BufferList}()}}),require_destroy=__commonJS2({"../../node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2,module22){"use strict";function destroy(err,cb){var _this=this,readableDestroyed=this._readableState&&this._readableState.destroyed,writableDestroyed=this._writableState&&this._writableState.destroyed;return readableDestroyed||writableDestroyed?(cb?cb(err):err&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(emitErrorNT,this,err)):process.nextTick(emitErrorNT,this,err)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(err||null,function(err2){!cb&&err2?_this._writableState?_this._writableState.errorEmitted?process.nextTick(emitCloseNT,_this):(_this._writableState.errorEmitted=!0,process.nextTick(emitErrorAndCloseNT,_this,err2)):process.nextTick(emitErrorAndCloseNT,_this,err2):cb?(process.nextTick(emitCloseNT,_this),cb(err2)):process.nextTick(emitCloseNT,_this)}),this)}function emitErrorAndCloseNT(self2,err){emitErrorNT(self2,err),emitCloseNT(self2)}function emitCloseNT(self2){self2._writableState&&!self2._writableState.emitClose||self2._readableState&&!self2._readableState.emitClose||self2.emit("close")}function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function emitErrorNT(self2,err){self2.emit("error",err)}function errorOrDestroy(stream,err){var rState=stream._readableState,wState=stream._writableState;rState&&rState.autoDestroy||wState&&wState.autoDestroy?stream.destroy(err):stream.emit("error",err)}module22.exports={destroy,undestroy,errorOrDestroy}}}),require_errors=__commonJS2({"../../node_modules/readable-stream/errors.js"(exports2,module22){"use strict";var codes={};function createErrorType(code,message,Base){Base||(Base=Error);function getMessage(arg1,arg2,arg3){return typeof message=="string"?message:message(arg1,arg2,arg3)}class NodeError extends Base{constructor(arg1,arg2,arg3){super(getMessage(arg1,arg2,arg3))}}NodeError.prototype.name=Base.name,NodeError.prototype.code=code,codes[code]=NodeError}function oneOf(expected,thing){if(Array.isArray(expected)){let len=expected.length;return expected=expected.map(i=>String(i)),len>2?`one of ${thing} ${expected.slice(0,len-1).join(", ")}, or `+expected[len-1]:len===2?`one of ${thing} ${expected[0]} or ${expected[1]}`:`of ${thing} ${expected[0]}`}else return`of ${thing} ${String(expected)}`}function startsWith(str,search,pos){return str.substr(!pos||pos<0?0:+pos,search.length)===search}function endsWith(str,search,this_len){return(this_len===void 0||this_len>str.length)&&(this_len=str.length),str.substring(this_len-search.length,this_len)===search}function includes(str,search,start){return typeof start!="number"&&(start=0),start+search.length>str.length?!1:str.indexOf(search,start)!==-1}createErrorType("ERR_INVALID_OPT_VALUE",function(name,value){return'The value "'+value+'" is invalid for option "'+name+'"'},TypeError),createErrorType("ERR_INVALID_ARG_TYPE",function(name,expected,actual){let determiner;typeof expected=="string"&&startsWith(expected,"not ")?(determiner="must not be",expected=expected.replace(/^not /,"")):determiner="must be";let msg;if(endsWith(name," argument"))msg=`The ${name} ${determiner} ${oneOf(expected,"type")}`;else{let type=includes(name,".")?"property":"argument";msg=`The "${name}" ${type} ${determiner} ${oneOf(expected,"type")}`}return msg+=`. Received type ${typeof actual}`,msg},TypeError),createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),createErrorType("ERR_METHOD_NOT_IMPLEMENTED",function(name){return"The "+name+" method is not implemented"}),createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close"),createErrorType("ERR_STREAM_DESTROYED",function(name){return"Cannot call "+name+" after a stream was destroyed"}),createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end"),createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),createErrorType("ERR_UNKNOWN_ENCODING",function(arg){return"Unknown encoding: "+arg},TypeError),createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),module22.exports.codes=codes}}),require_state=__commonJS2({"../../node_modules/readable-stream/lib/internal/streams/state.js"(exports2,module22){"use strict";var ERR_INVALID_OPT_VALUE=require_errors().codes.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(options,isDuplex,duplexKey){return options.highWaterMark!=null?options.highWaterMark:isDuplex?options[duplexKey]:null}function getHighWaterMark(state,options,duplexKey,isDuplex){var hwm=highWaterMarkFrom(options,isDuplex,duplexKey);if(hwm!=null){if(!(isFinite(hwm)&&Math.floor(hwm)===hwm)||hwm<0){var name=isDuplex?duplexKey:"highWaterMark";throw new ERR_INVALID_OPT_VALUE(name,hwm)}return Math.floor(hwm)}return state.objectMode?16:16*1024}module22.exports={getHighWaterMark}}}),require_inherits_browser=__commonJS2({"../../node_modules/inherits/inherits_browser.js"(exports2,module22){"use strict";typeof Object.create=="function"?module22.exports=function(ctor,superCtor){superCtor&&(ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}}))}:module22.exports=function(ctor,superCtor){if(superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}}}}),require_inherits=__commonJS2({"../../node_modules/inherits/inherits.js"(exports2,module22){"use strict";try{if(util=require("util"),typeof util.inherits!="function")throw"";module22.exports=util.inherits}catch{module22.exports=require_inherits_browser()}var util}}),require_node=__commonJS2({"../../node_modules/util-deprecate/node.js"(exports2,module22){"use strict";module22.exports=require("util").deprecate}}),require_stream_writable=__commonJS2({"../../node_modules/readable-stream/lib/_stream_writable.js"(exports2,module22){"use strict";module22.exports=Writable;function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(){onCorkedFinish(_this,state)}}var Duplex;Writable.WritableState=WritableState;var internalUtil={deprecate:require_node()},Stream=require_stream(),Buffer2=require("buffer").Buffer,OurUint8Array=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer2.from(chunk)}function _isUint8Array(obj){return Buffer2.isBuffer(obj)||obj instanceof OurUint8Array}var destroyImpl=require_destroy(),_require=require_state(),getHighWaterMark=_require.getHighWaterMark,_require$codes=require_errors().codes,ERR_INVALID_ARG_TYPE=_require$codes.ERR_INVALID_ARG_TYPE,ERR_METHOD_NOT_IMPLEMENTED=_require$codes.ERR_METHOD_NOT_IMPLEMENTED,ERR_MULTIPLE_CALLBACK=_require$codes.ERR_MULTIPLE_CALLBACK,ERR_STREAM_CANNOT_PIPE=_require$codes.ERR_STREAM_CANNOT_PIPE,ERR_STREAM_DESTROYED=_require$codes.ERR_STREAM_DESTROYED,ERR_STREAM_NULL_VALUES=_require$codes.ERR_STREAM_NULL_VALUES,ERR_STREAM_WRITE_AFTER_END=_require$codes.ERR_STREAM_WRITE_AFTER_END,ERR_UNKNOWN_ENCODING=_require$codes.ERR_UNKNOWN_ENCODING,errorOrDestroy=destroyImpl.errorOrDestroy;require_inherits()(Writable,Stream);function nop(){}function WritableState(options,stream,isDuplex){Duplex=Duplex||require_stream_duplex(),options=options||{},typeof isDuplex!="boolean"&&(isDuplex=stream instanceof Duplex),this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode),this.highWaterMark=getHighWaterMark(this,options,"writableHighWaterMark",isDuplex),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream,er)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=options.emitClose!==!1,this.autoDestroy=!!options.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var realHasInstance;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){return realHasInstance.call(this,object)?!0:this!==Writable?!1:object&&object._writableState instanceof WritableState}})):realHasInstance=function(object){return object instanceof this};function Writable(options){Duplex=Duplex||require_stream_duplex();var isDuplex=this instanceof Duplex;if(!isDuplex&&!realHasInstance.call(Writable,this))return new Writable(options);this._writableState=new WritableState(options,this,isDuplex),this.writable=!0,options&&(typeof options.write=="function"&&(this._write=options.write),typeof options.writev=="function"&&(this._writev=options.writev),typeof options.destroy=="function"&&(this._destroy=options.destroy),typeof options.final=="function"&&(this._final=options.final)),Stream.call(this)}Writable.prototype.pipe=function(){errorOrDestroy(this,new ERR_STREAM_CANNOT_PIPE)};function writeAfterEnd(stream,cb){var er=new ERR_STREAM_WRITE_AFTER_END;errorOrDestroy(stream,er),process.nextTick(cb,er)}function validChunk(stream,state,chunk,cb){var er;return chunk===null?er=new ERR_STREAM_NULL_VALUES:typeof chunk!="string"&&!state.objectMode&&(er=new ERR_INVALID_ARG_TYPE("chunk",["string","Buffer"],chunk)),er?(errorOrDestroy(stream,er),process.nextTick(cb,er),!1):!0}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1,isBuf=!state.objectMode&&_isUint8Array(chunk);return isBuf&&!Buffer2.isBuffer(chunk)&&(chunk=_uint8ArrayToBuffer(chunk)),typeof encoding=="function"&&(cb=encoding,encoding=null),isBuf?encoding="buffer":encoding||(encoding=state.defaultEncoding),typeof cb!="function"&&(cb=nop),state.ending?writeAfterEnd(this,cb):(isBuf||validChunk(this,state,chunk,cb))&&(state.pendingcb++,ret=writeOrBuffer(this,state,isBuf,chunk,encoding,cb)),ret},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,!state.writing&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest&&clearBuffer(this,state))},Writable.prototype.setDefaultEncoding=function(encoding){if(typeof encoding=="string"&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new ERR_UNKNOWN_ENCODING(encoding);return this._writableState.defaultEncoding=encoding,this},Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function decodeChunk(state,chunk,encoding){return!state.objectMode&&state.decodeStrings!==!1&&typeof chunk=="string"&&(chunk=Buffer2.from(chunk,encoding)),chunk}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(stream,state,isBuf,chunk,encoding,cb){if(!isBuf){var newChunk=decodeChunk(state,chunk,encoding);chunk!==newChunk&&(isBuf=!0,encoding="buffer",chunk=newChunk)}var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(ret||(state.needDrain=!0),state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest={chunk,encoding,isBuf,callback:cb,next:null},last?last.next=state.lastBufferedRequest:state.bufferedRequest=state.lastBufferedRequest,state.bufferedRequestCount+=1}else doWrite(stream,state,!1,len,chunk,encoding,cb);return ret}function doWrite(stream,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,state.destroyed?state.onwrite(new ERR_STREAM_DESTROYED("write")):writev?stream._writev(chunk,state.onwrite):stream._write(chunk,encoding,state.onwrite),state.sync=!1}function onwriteError(stream,state,sync,er,cb){--state.pendingcb,sync?(process.nextTick(cb,er),process.nextTick(finishMaybe,stream,state),stream._writableState.errorEmitted=!0,errorOrDestroy(stream,er)):(cb(er),stream._writableState.errorEmitted=!0,errorOrDestroy(stream,er),finishMaybe(stream,state))}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0}function onwrite(stream,er){var state=stream._writableState,sync=state.sync,cb=state.writecb;if(typeof cb!="function")throw new ERR_MULTIPLE_CALLBACK;if(onwriteStateUpdate(state),er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(state)||stream.destroyed;!finished&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest&&clearBuffer(stream,state),sync?process.nextTick(afterWrite,stream,state,finished,cb):afterWrite(stream,state,finished,cb)}}function afterWrite(stream,state,finished,cb){finished||onwriteDrain(stream,state),state.pendingcb--,cb(),finishMaybe(stream,state)}function onwriteDrain(stream,state){state.length===0&&state.needDrain&&(state.needDrain=!1,stream.emit("drain"))}function clearBuffer(stream,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=new Array(l),holder=state.corkedRequestsFree;holder.entry=entry;for(var count=0,allBuffers=!0;entry;)buffer[count]=entry,entry.isBuf||(allBuffers=!1),entry=entry.next,count+=1;buffer.allBuffers=allBuffers,doWrite(stream,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,holder.next?(state.corkedRequestsFree=holder.next,holder.next=null):state.corkedRequestsFree=new CorkedRequest(state),state.bufferedRequestCount=0}else{for(;entry;){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream,state,!1,len,chunk,encoding,cb),entry=entry.next,state.bufferedRequestCount--,state.writing)break}entry===null&&(state.lastBufferedRequest=null)}state.bufferedRequest=entry,state.bufferProcessing=!1}Writable.prototype._write=function(chunk,encoding,cb){cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()"))},Writable.prototype._writev=null,Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;return typeof chunk=="function"?(cb=chunk,chunk=null,encoding=null):typeof encoding=="function"&&(cb=encoding,encoding=null),chunk!=null&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||endWritable(this,state,cb),this},Object.defineProperty(Writable.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function needFinish(state){return state.ending&&state.length===0&&state.bufferedRequest===null&&!state.finished&&!state.writing}function callFinal(stream,state){stream._final(function(err){state.pendingcb--,err&&errorOrDestroy(stream,err),state.prefinished=!0,stream.emit("prefinish"),finishMaybe(stream,state)})}function prefinish(stream,state){!state.prefinished&&!state.finalCalled&&(typeof stream._final=="function"&&!state.destroyed?(state.pendingcb++,state.finalCalled=!0,process.nextTick(callFinal,stream,state)):(state.prefinished=!0,stream.emit("prefinish")))}function finishMaybe(stream,state){var need=needFinish(state);if(need&&(prefinish(stream,state),state.pendingcb===0&&(state.finished=!0,stream.emit("finish"),state.autoDestroy))){var rState=stream._readableState;(!rState||rState.autoDestroy&&rState.endEmitted)&&stream.destroy()}return need}function endWritable(stream,state,cb){state.ending=!0,finishMaybe(stream,state),cb&&(state.finished?process.nextTick(cb):stream.once("finish",cb)),state.ended=!0,stream.writable=!1}function onCorkedFinish(corkReq,state,err){var entry=corkReq.entry;for(corkReq.entry=null;entry;){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next}state.corkedRequestsFree.next=corkReq}Object.defineProperty(Writable.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(value){this._writableState&&(this._writableState.destroyed=value)}}),Writable.prototype.destroy=destroyImpl.destroy,Writable.prototype._undestroy=destroyImpl.undestroy,Writable.prototype._destroy=function(err,cb){cb(err)}}}),require_stream_duplex=__commonJS2({"../../node_modules/readable-stream/lib/_stream_duplex.js"(exports2,module22){"use strict";var objectKeys=Object.keys||function(obj){var keys2=[];for(var key in obj)keys2.push(key);return keys2};module22.exports=Duplex;var Readable=require_stream_readable(),Writable=require_stream_writable();for(require_inherits()(Duplex,Readable),keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++)method=keys[v],Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method]);var keys,method,v;function Duplex(options){if(!(this instanceof Duplex))return new Duplex(options);Readable.call(this,options),Writable.call(this,options),this.allowHalfOpen=!0,options&&(options.readable===!1&&(this.readable=!1),options.writable===!1&&(this.writable=!1),options.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",onend)))}Object.defineProperty(Duplex.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(Duplex.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Duplex.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function onend(){this._writableState.ended||process.nextTick(onEndNT,this)}function onEndNT(self2){self2.end()}Object.defineProperty(Duplex.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(value){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=value,this._writableState.destroyed=value)}})}}),require_safe_buffer=__commonJS2({"../../node_modules/safe-buffer/index.js"(exports2,module22){"use strict";var buffer=require("buffer"),Buffer2=buffer.Buffer;function copyProps(src,dst){for(var key in src)dst[key]=src[key]}Buffer2.from&&Buffer2.alloc&&Buffer2.allocUnsafe&&Buffer2.allocUnsafeSlow?module22.exports=buffer:(copyProps(buffer,exports2),exports2.Buffer=SafeBuffer);function SafeBuffer(arg,encodingOrOffset,length){return Buffer2(arg,encodingOrOffset,length)}SafeBuffer.prototype=Object.create(Buffer2.prototype),copyProps(Buffer2,SafeBuffer),SafeBuffer.from=function(arg,encodingOrOffset,length){if(typeof arg=="number")throw new TypeError("Argument must not be a number");return Buffer2(arg,encodingOrOffset,length)},SafeBuffer.alloc=function(size,fill,encoding){if(typeof size!="number")throw new TypeError("Argument must be a number");var buf=Buffer2(size);return fill!==void 0?typeof encoding=="string"?buf.fill(fill,encoding):buf.fill(fill):buf.fill(0),buf},SafeBuffer.allocUnsafe=function(size){if(typeof size!="number")throw new TypeError("Argument must be a number");return Buffer2(size)},SafeBuffer.allocUnsafeSlow=function(size){if(typeof size!="number")throw new TypeError("Argument must be a number");return buffer.SlowBuffer(size)}}}),require_string_decoder=__commonJS2({"../../node_modules/string_decoder/lib/string_decoder.js"(exports2){"use strict";var Buffer2=require_safe_buffer().Buffer,isEncoding=Buffer2.isEncoding||function(encoding){switch(encoding=""+encoding,encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function _normalizeEncoding(enc){if(!enc)return"utf8";for(var retried;;)switch(enc){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return enc;default:if(retried)return;enc=(""+enc).toLowerCase(),retried=!0}}function normalizeEncoding(enc){var nenc=_normalizeEncoding(enc);if(typeof nenc!="string"&&(Buffer2.isEncoding===isEncoding||!isEncoding(enc)))throw new Error("Unknown encoding: "+enc);return nenc||enc}exports2.StringDecoder=StringDecoder;function StringDecoder(encoding){this.encoding=normalizeEncoding(encoding);var nb;switch(this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,nb=4;break;case"utf8":this.fillLast=utf8FillLast,nb=4;break;case"base64":this.text=base64Text,this.end=base64End,nb=3;break;default:this.write=simpleWrite,this.end=simpleEnd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer2.allocUnsafe(nb)}StringDecoder.prototype.write=function(buf){if(buf.length===0)return"";var r,i;if(this.lastNeed){if(r=this.fillLast(buf),r===void 0)return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<buf.length?r?r+this.text(buf,i):this.text(buf,i):r||""},StringDecoder.prototype.end=utf8End,StringDecoder.prototype.text=utf8Text,StringDecoder.prototype.fillLast=function(buf){if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,buf.length),this.lastNeed-=buf.length};function utf8CheckByte(byte){return byte<=127?0:byte>>5===6?2:byte>>4===14?3:byte>>3===30?4:byte>>6===2?-1:-2}function utf8CheckIncomplete(self2,buf,i){var j=buf.length-1;if(j<i)return 0;var nb=utf8CheckByte(buf[j]);return nb>=0?(nb>0&&(self2.lastNeed=nb-1),nb):--j<i||nb===-2?0:(nb=utf8CheckByte(buf[j]),nb>=0?(nb>0&&(self2.lastNeed=nb-2),nb):--j<i||nb===-2?0:(nb=utf8CheckByte(buf[j]),nb>=0?(nb>0&&(nb===2?nb=0:self2.lastNeed=nb-3),nb):0))}function utf8CheckExtraBytes(self2,buf,p){if((buf[0]&192)!==128)return self2.lastNeed=0,"\uFFFD";if(self2.lastNeed>1&&buf.length>1){if((buf[1]&192)!==128)return self2.lastNeed=1,"\uFFFD";if(self2.lastNeed>2&&buf.length>2&&(buf[2]&192)!==128)return self2.lastNeed=2,"\uFFFD"}}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed,r=utf8CheckExtraBytes(this,buf,p);if(r!==void 0)return r;if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,p,0,buf.length),this.lastNeed-=buf.length}function utf8Text(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);return buf.copy(this.lastChar,0,end),buf.toString("utf8",i,end)}function utf8End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+"\uFFFD":r}function utf16Text(buf,i){if((buf.length-i)%2===0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=buf[buf.length-1],buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;return n===0?buf.toString("base64",i):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=buf[buf.length-1]:(this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1]),buf.toString("base64",i,buf.length-n))}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}}}),require_end_of_stream=__commonJS2({"../../node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2,module22){"use strict";var ERR_STREAM_PREMATURE_CLOSE=require_errors().codes.ERR_STREAM_PREMATURE_CLOSE;function once2(callback){var called=!1;return function(){if(!called){called=!0;for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];callback.apply(this,args)}}}function noop(){}function isRequest(stream){return stream.setHeader&&typeof stream.abort=="function"}function eos(stream,opts,callback){if(typeof opts=="function")return eos(stream,null,opts);opts||(opts={}),callback=once2(callback||noop);var readable=opts.readable||opts.readable!==!1&&stream.readable,writable=opts.writable||opts.writable!==!1&&stream.writable,onlegacyfinish=function(){stream.writable||onfinish()},writableEnded=stream._writableState&&stream._writableState.finished,onfinish=function(){writable=!1,writableEnded=!0,readable||callback.call(stream)},readableEnded=stream._readableState&&stream._readableState.endEmitted,onend=function(){readable=!1,readableEnded=!0,writable||callback.call(stream)},onerror=function(err){callback.call(stream,err)},onclose=function(){var err;if(readable&&!readableEnded)return(!stream._readableState||!stream._readableState.ended)&&(err=new ERR_STREAM_PREMATURE_CLOSE),callback.call(stream,err);if(writable&&!writableEnded)return(!stream._writableState||!stream._writableState.ended)&&(err=new ERR_STREAM_PREMATURE_CLOSE),callback.call(stream,err)},onrequest=function(){stream.req.on("finish",onfinish)};return isRequest(stream)?(stream.on("complete",onfinish),stream.on("abort",onclose),stream.req?onrequest():stream.on("request",onrequest)):writable&&!stream._writableState&&(stream.on("end",onlegacyfinish),stream.on("close",onlegacyfinish)),stream.on("end",onend),stream.on("finish",onfinish),opts.error!==!1&&stream.on("error",onerror),stream.on("close",onclose),function(){stream.removeListener("complete",onfinish),stream.removeListener("abort",onclose),stream.removeListener("request",onrequest),stream.req&&stream.req.removeListener("finish",onfinish),stream.removeListener("end",onlegacyfinish),stream.removeListener("close",onlegacyfinish),stream.removeListener("finish",onfinish),stream.removeListener("end",onend),stream.removeListener("error",onerror),stream.removeListener("close",onclose)}}module22.exports=eos}}),require_async_iterator=__commonJS2({"../../node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports2,module22){"use strict";var _Object$setPrototypeO;function _defineProperty(obj,key,value){return key=_toPropertyKey(key),key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key=="symbol"?key:String(key)}function _toPrimitive(input,hint){if(typeof input!="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==void 0){var res=prim.call(input,hint||"default");if(typeof res!="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return(hint==="string"?String:Number)(input)}var finished=require_end_of_stream(),kLastResolve=Symbol("lastResolve"),kLastReject=Symbol("lastReject"),kError=Symbol("error"),kEnded=Symbol("ended"),kLastPromise=Symbol("lastPromise"),kHandlePromise=Symbol("handlePromise"),kStream=Symbol("stream");function createIterResult(value,done){return{value,done}}function readAndResolve(iter){var resolve2=iter[kLastResolve];if(resolve2!==null){var data=iter[kStream].read();data!==null&&(iter[kLastPromise]=null,iter[kLastResolve]=null,iter[kLastReject]=null,resolve2(createIterResult(data,!1)))}}function onReadable(iter){process.nextTick(readAndResolve,iter)}function wrapForNext(lastPromise,iter){return function(resolve2,reject){lastPromise.then(function(){if(iter[kEnded]){resolve2(createIterResult(void 0,!0));return}iter[kHandlePromise](resolve2,reject)},reject)}}var AsyncIteratorPrototype=Object.getPrototypeOf(function(){}),ReadableStreamAsyncIteratorPrototype=Object.setPrototypeOf((_Object$setPrototypeO={get stream(){return this[kStream]},next:function(){var _this=this,error=this[kError];if(error!==null)return Promise.reject(error);if(this[kEnded])return Promise.resolve(createIterResult(void 0,!0));if(this[kStream].destroyed)return new Promise(function(resolve2,reject){process.nextTick(function(){_this[kError]?reject(_this[kError]):resolve2(createIterResult(void 0,!0))})});var lastPromise=this[kLastPromise],promise;if(lastPromise)promise=new Promise(wrapForNext(lastPromise,this));else{var data=this[kStream].read();if(data!==null)return Promise.resolve(createIterResult(data,!1));promise=new Promise(this[kHandlePromise])}return this[kLastPromise]=promise,promise}},_defineProperty(_Object$setPrototypeO,Symbol.asyncIterator,function(){return this}),_defineProperty(_Object$setPrototypeO,"return",function(){var _this2=this;return new Promise(function(resolve2,reject){_this2[kStream].destroy(null,function(err){if(err){reject(err);return}resolve2(createIterResult(void 0,!0))})})}),_Object$setPrototypeO),AsyncIteratorPrototype),createReadableStreamAsyncIterator=function(stream){var _Object$create,iterator=Object.create(ReadableStreamAsyncIteratorPrototype,(_Object$create={},_defineProperty(_Object$create,kStream,{value:stream,writable:!0}),_defineProperty(_Object$create,kLastResolve,{value:null,writable:!0}),_defineProperty(_Object$create,kLastReject,{value:null,writable:!0}),_defineProperty(_Object$create,kError,{value:null,writable:!0}),_defineProperty(_Object$create,kEnded,{value:stream._readableState.endEmitted,writable:!0}),_defineProperty(_Object$create,kHandlePromise,{value:function(resolve2,reject){var data=iterator[kStream].read();data?(iterator[kLastPromise]=null,iterator[kLastResolve]=null,iterator[kLastReject]=null,resolve2(createIterResult(data,!1))):(iterator[kLastResolve]=resolve2,iterator[kLastReject]=reject)},writable:!0}),_Object$create));return iterator[kLastPromise]=null,finished(stream,function(err){if(err&&err.code!=="ERR_STREAM_PREMATURE_CLOSE"){var reject=iterator[kLastReject];reject!==null&&(iterator[kLastPromise]=null,iterator[kLastResolve]=null,iterator[kLastReject]=null,reject(err)),iterator[kError]=err;return}var resolve2=iterator[kLastResolve];resolve2!==null&&(iterator[kLastPromise]=null,iterator[kLastResolve]=null,iterator[kLastReject]=null,resolve2(createIterResult(void 0,!0))),iterator[kEnded]=!0}),stream.on("readable",onReadable.bind(null,iterator)),iterator};module22.exports=createReadableStreamAsyncIterator}}),require_from=__commonJS2({"../../node_modules/readable-stream/lib/internal/streams/from.js"(exports2,module22){"use strict";function asyncGeneratorStep(gen,resolve2,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){reject(error);return}info.done?resolve2(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self2=this,args=arguments;return new Promise(function(resolve2,reject){var gen=fn.apply(self2,args);function _next(value){asyncGeneratorStep(gen,resolve2,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve2,reject,_next,_throw,"throw",err)}_next(void 0)})}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function _defineProperty(obj,key,value){return key=_toPropertyKey(key),key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key=="symbol"?key:String(key)}function _toPrimitive(input,hint){if(typeof input!="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==void 0){var res=prim.call(input,hint||"default");if(typeof res!="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return(hint==="string"?String:Number)(input)}var ERR_INVALID_ARG_TYPE=require_errors().codes.ERR_INVALID_ARG_TYPE;function from(Readable,iterable,opts){var iterator;if(iterable&&typeof iterable.next=="function")iterator=iterable;else if(iterable&&iterable[Symbol.asyncIterator])iterator=iterable[Symbol.asyncIterator]();else if(iterable&&iterable[Symbol.iterator])iterator=iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE("iterable",["Iterable"],iterable);var readable=new Readable(_objectSpread({objectMode:!0},opts)),reading=!1;readable._read=function(){reading||(reading=!0,next())};function next(){return _next2.apply(this,arguments)}function _next2(){return _next2=_asyncToGenerator(function*(){try{var _yield$iterator$next=yield iterator.next(),value=_yield$iterator$next.value,done=_yield$iterator$next.done;done?readable.push(null):readable.push(yield value)?next():reading=!1}catch(err){readable.destroy(err)}}),_next2.apply(this,arguments)}return readable}module22.exports=from}}),require_stream_readable=__commonJS2({"../../node_modules/readable-stream/lib/_stream_readable.js"(exports2,module22){"use strict";module22.exports=Readable;var Duplex;Readable.ReadableState=ReadableState;var EE=require("events").EventEmitter,EElistenerCount=function(emitter,type){return emitter.listeners(type).length},Stream=require_stream(),Buffer2=require("buffer").Buffer,OurUint8Array=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer2.from(chunk)}function _isUint8Array(obj){return Buffer2.isBuffer(obj)||obj instanceof OurUint8Array}var debugUtil=require("util"),debug;debugUtil&&debugUtil.debuglog?debug=debugUtil.debuglog("stream"):debug=function(){};var BufferList=require_buffer_list(),destroyImpl=require_destroy(),_require=require_state(),getHighWaterMark=_require.getHighWaterMark,_require$codes=require_errors().codes,ERR_INVALID_ARG_TYPE=_require$codes.ERR_INVALID_ARG_TYPE,ERR_STREAM_PUSH_AFTER_EOF=_require$codes.ERR_STREAM_PUSH_AFTER_EOF,ERR_METHOD_NOT_IMPLEMENTED=_require$codes.ERR_METHOD_NOT_IMPLEMENTED,ERR_STREAM_UNSHIFT_AFTER_END_EVENT=_require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,StringDecoder,createReadableStreamAsyncIterator,from;require_inherits()(Readable,Stream);var errorOrDestroy=destroyImpl.errorOrDestroy,kProxyEvents=["error","close","destroy","pause","resume"];function prependListener(emitter,event,fn){if(typeof emitter.prependListener=="function")return emitter.prependListener(event,fn);!emitter._events||!emitter._events[event]?emitter.on(event,fn):Array.isArray(emitter._events[event])?emitter._events[event].unshift(fn):emitter._events[event]=[fn,emitter._events[event]]}function ReadableState(options,stream,isDuplex){Duplex=Duplex||require_stream_duplex(),options=options||{},typeof isDuplex!="boolean"&&(isDuplex=stream instanceof Duplex),this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode),this.highWaterMark=getHighWaterMark(this,options,"readableHighWaterMark",isDuplex),this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=options.emitClose!==!1,this.autoDestroy=!!options.autoDestroy,this.destroyed=!1,this.defaultEncoding=options.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=require_string_decoder().StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding)}function Readable(options){if(Duplex=Duplex||require_stream_duplex(),!(this instanceof Readable))return new Readable(options);var isDuplex=this instanceof Duplex;this._readableState=new ReadableState(options,this,isDuplex),this.readable=!0,options&&(typeof options.read=="function"&&(this._read=options.read),typeof options.destroy=="function"&&(this._destroy=options.destroy)),Stream.call(this)}Object.defineProperty(Readable.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(value){this._readableState&&(this._readableState.destroyed=value)}}),Readable.prototype.destroy=destroyImpl.destroy,Readable.prototype._undestroy=destroyImpl.undestroy,Readable.prototype._destroy=function(err,cb){cb(err)},Readable.prototype.push=function(chunk,encoding){var state=this._readableState,skipChunkCheck;return state.objectMode?skipChunkCheck=!0:typeof chunk=="string"&&(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=Buffer2.from(chunk,encoding),encoding=""),skipChunkCheck=!0),readableAddChunk(this,chunk,encoding,!1,skipChunkCheck)},Readable.prototype.unshift=function(chunk){return readableAddChunk(this,chunk,null,!0,!1)};function readableAddChunk(stream,chunk,encoding,addToFront,skipChunkCheck){debug("readableAddChunk",chunk);var state=stream._readableState;if(chunk===null)state.reading=!1,onEofChunk(stream,state);else{var er;if(skipChunkCheck||(er=chunkInvalid(state,chunk)),er)errorOrDestroy(stream,er);else if(state.objectMode||chunk&&chunk.length>0)if(typeof chunk!="string"&&!state.objectMode&&Object.getPrototypeOf(chunk)!==Buffer2.prototype&&(chunk=_uint8ArrayToBuffer(chunk)),addToFront)state.endEmitted?errorOrDestroy(stream,new ERR_STREAM_UNSHIFT_AFTER_END_EVENT):addChunk(stream,state,chunk,!0);else if(state.ended)errorOrDestroy(stream,new ERR_STREAM_PUSH_AFTER_EOF);else{if(state.destroyed)return!1;state.reading=!1,state.decoder&&!encoding?(chunk=state.decoder.write(chunk),state.objectMode||chunk.length!==0?addChunk(stream,state,chunk,!1):maybeReadMore(stream,state)):addChunk(stream,state,chunk,!1)}else addToFront||(state.reading=!1,maybeReadMore(stream,state))}return!state.ended&&(state.length<state.highWaterMark||state.length===0)}function addChunk(stream,state,chunk,addToFront){state.flowing&&state.length===0&&!state.sync?(state.awaitDrain=0,stream.emit("data",chunk)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream)),maybeReadMore(stream,state)}function chunkInvalid(state,chunk){var er;return!_isUint8Array(chunk)&&typeof chunk!="string"&&chunk!==void 0&&!state.objectMode&&(er=new ERR_INVALID_ARG_TYPE("chunk",["string","Buffer","Uint8Array"],chunk)),er}Readable.prototype.isPaused=function(){return this._readableState.flowing===!1},Readable.prototype.setEncoding=function(enc){StringDecoder||(StringDecoder=require_string_decoder().StringDecoder);var decoder=new StringDecoder(enc);this._readableState.decoder=decoder,this._readableState.encoding=this._readableState.decoder.encoding;for(var p=this._readableState.buffer.head,content="";p!==null;)content+=decoder.write(p.data),p=p.next;return this._readableState.buffer.clear(),content!==""&&this._readableState.buffer.push(content),this._readableState.length=content.length,this};var MAX_HWM=1073741824;function computeNewHighWaterMark(n){return n>=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return n<=0||state.length===0&&state.ended?0:state.objectMode?1:n!==n?state.flowing&&state.length?state.buffer.head.data.length:state.length:(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0))}Readable.prototype.read=function(n){debug("read",n),n=parseInt(n,10);var state=this._readableState,nOrig=n;if(n!==0&&(state.emittedReadable=!1),n===0&&state.needReadable&&((state.highWaterMark!==0?state.length>=state.highWaterMark:state.length>0)||state.ended))return debug("read: emitReadable",state.length,state.ended),state.length===0&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),n===0&&state.ended)return state.length===0&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(state.length===0||state.length-n<state.highWaterMark)&&(doRead=!0,debug("length less than watermark",doRead)),state.ended||state.reading?(doRead=!1,debug("reading or ended",doRead)):doRead&&(debug("do read"),state.reading=!0,state.sync=!0,state.length===0&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1,state.reading||(n=howMuchToRead(nOrig,state)));var ret;return n>0?ret=fromList(n,state):ret=null,ret===null?(state.needReadable=state.length<=state.highWaterMark,n=0):(state.length-=n,state.awaitDrain=0),state.length===0&&(state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),ret!==null&&this.emit("data",ret),ret};function onEofChunk(stream,state){if(debug("onEofChunk"),!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,state.sync?emitReadable(stream):(state.needReadable=!1,state.emittedReadable||(state.emittedReadable=!0,emitReadable_(stream)))}}function emitReadable(stream){var state=stream._readableState;debug("emitReadable",state.needReadable,state.emittedReadable),state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,process.nextTick(emitReadable_,stream))}function emitReadable_(stream){var state=stream._readableState;debug("emitReadable_",state.destroyed,state.length,state.ended),!state.destroyed&&(state.length||state.ended)&&(stream.emit("readable"),state.emittedReadable=!1),state.needReadable=!state.flowing&&!state.ended&&state.length<=state.highWaterMark,flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,process.nextTick(maybeReadMore_,stream,state))}function maybeReadMore_(stream,state){for(;!state.reading&&!state.ended&&(state.length<state.highWaterMark||state.flowing&&state.length===0);){var len=state.length;if(debug("maybeReadMore read 0"),stream.read(0),len===state.length)break}state.readingMore=!1}Readable.prototype._read=function(n){errorOrDestroy(this,new ERR_METHOD_NOT_IMPLEMENTED("_read()"))},Readable.prototype.pipe=function(dest,pipeOpts){var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest);break}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:unpipe;state.endEmitted?process.nextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);function onunpipe(readable,unpipeInfo){debug("onunpipe"),readable===src&&unpipeInfo&&unpipeInfo.hasUnpiped===!1&&(unpipeInfo.hasUnpiped=!0,cleanup())}function onend(){debug("onend"),dest.end()}var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1;function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",unpipe),src.removeListener("data",ondata),cleanedUp=!0,state.awaitDrain&&(!dest._writableState||dest._writableState.needDrain)&&ondrain()}src.on("data",ondata);function ondata(chunk){debug("ondata");var ret=dest.write(chunk);debug("dest.write",ret),ret===!1&&((state.pipesCount===1&&state.pipes===dest||state.pipesCount>1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp&&(debug("false write response, pause",state.awaitDrain),state.awaitDrain++),src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),EElistenerCount(dest,"error")===0&&errorOrDestroy(dest,er)}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish),unpipe()}dest.once("close",onclose);function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}dest.once("finish",onfinish);function unpipe(){debug("unpipe"),src.unpipe(dest)}return dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest};function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,state.awaitDrain===0&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src))}}Readable.prototype.unpipe=function(dest){var state=this._readableState,unpipeInfo={hasUnpiped:!1};if(state.pipesCount===0)return this;if(state.pipesCount===1)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this,unpipeInfo),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this,{hasUnpiped:!1});return this}var index=indexOf(state.pipes,dest);return index===-1?this:(state.pipes.splice(index,1),state.pipesCount-=1,state.pipesCount===1&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this,unpipeInfo),this)},Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn),state=this._readableState;return ev==="data"?(state.readableListening=this.listenerCount("readable")>0,state.flowing!==!1&&this.resume()):ev==="readable"&&!state.endEmitted&&!state.readableListening&&(state.readableListening=state.needReadable=!0,state.flowing=!1,state.emittedReadable=!1,debug("on readable",state.length,state.reading),state.length?emitReadable(this):state.reading||process.nextTick(nReadingNextTick,this)),res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.removeListener=function(ev,fn){var res=Stream.prototype.removeListener.call(this,ev,fn);return ev==="readable"&&process.nextTick(updateReadableListening,this),res},Readable.prototype.removeAllListeners=function(ev){var res=Stream.prototype.removeAllListeners.apply(this,arguments);return(ev==="readable"||ev===void 0)&&process.nextTick(updateReadableListening,this),res};function updateReadableListening(self2){var state=self2._readableState;state.readableListening=self2.listenerCount("readable")>0,state.resumeScheduled&&!state.paused?state.flowing=!0:self2.listenerCount("data")>0&&self2.resume()}function nReadingNextTick(self2){debug("readable nexttick read 0"),self2.read(0)}Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!state.readableListening,resume(this,state)),state.paused=!1,this};function resume(stream,state){state.resumeScheduled||(state.resumeScheduled=!0,process.nextTick(resume_,stream,state))}function resume_(stream,state){debug("resume",state.reading),state.reading||stream.read(0),state.resumeScheduled=!1,stream.emit("resume"),flow(stream),state.flowing&&!state.reading&&stream.read(0)}Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function flow(stream){var state=stream._readableState;for(debug("flow",state.flowing);state.flowing&&stream.read()!==null;);}Readable.prototype.wrap=function(stream){var _this=this,state=this._readableState,paused=!1;stream.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&_this.push(chunk)}_this.push(null)}),stream.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),!(state.objectMode&&chunk==null)&&!(!state.objectMode&&(!chunk||!chunk.length))){var ret=_this.push(chunk);ret||(paused=!0,stream.pause())}});for(var i in stream)this[i]===void 0&&typeof stream[i]=="function"&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));for(var n=0;n<kProxyEvents.length;n++)stream.on(kProxyEvents[n],this.emit.bind(this,kProxyEvents[n]));return this._read=function(n2){debug("wrapped _read",n2),paused&&(paused=!1,stream.resume())},this},typeof Symbol=="function"&&(Readable.prototype[Symbol.asyncIterator]=function(){return createReadableStreamAsyncIterator===void 0&&(createReadableStreamAsyncIterator=require_async_iterator()),createReadableStreamAsyncIterator(this)}),Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Readable.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Readable.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(state){this._readableState&&(this._readableState.flowing=state)}}),Readable._fromList=fromList,Object.defineProperty(Readable.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function fromList(n,state){if(state.length===0)return null;var ret;return state.objectMode?ret=state.buffer.shift():!n||n>=state.length?(state.decoder?ret=state.buffer.join(""):state.buffer.length===1?ret=state.buffer.first():ret=state.buffer.concat(state.length),state.buffer.clear()):ret=state.buffer.consume(n,state.decoder),ret}function endReadable(stream){var state=stream._readableState;debug("endReadable",state.endEmitted),state.endEmitted||(state.ended=!0,process.nextTick(endReadableNT,state,stream))}function endReadableNT(state,stream){if(debug("endReadableNT",state.endEmitted,state.length),!state.endEmitted&&state.length===0&&(state.endEmitted=!0,stream.readable=!1,stream.emit("end"),state.autoDestroy)){var wState=stream._writableState;(!wState||wState.autoDestroy&&wState.finished)&&stream.destroy()}}typeof Symbol=="function"&&(Readable.from=function(iterable,opts){return from===void 0&&(from=require_from()),from(Readable,iterable,opts)});function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return-1}}}),require_stream_transform=__commonJS2({"../../node_modules/readable-stream/lib/_stream_transform.js"(exports2,module22){"use strict";module22.exports=Transform;var _require$codes=require_errors().codes,ERR_METHOD_NOT_IMPLEMENTED=_require$codes.ERR_METHOD_NOT_IMPLEMENTED,ERR_MULTIPLE_CALLBACK=_require$codes.ERR_MULTIPLE_CALLBACK,ERR_TRANSFORM_ALREADY_TRANSFORMING=_require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,ERR_TRANSFORM_WITH_LENGTH_0=_require$codes.ERR_TRANSFORM_WITH_LENGTH_0,Duplex=require_stream_duplex();require_inherits()(Transform,Duplex);function afterTransform(er,data){var ts=this._transformState;ts.transforming=!1;var cb=ts.writecb;if(cb===null)return this.emit("error",new ERR_MULTIPLE_CALLBACK);ts.writechunk=null,ts.writecb=null,data!=null&&this.push(data),cb(er);var rs=this._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark)}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,options&&(typeof options.transform=="function"&&(this._transform=options.transform),typeof options.flush=="function"&&(this._flush=options.flush)),this.on("prefinish",prefinish)}function prefinish(){var _this=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(er,data){done(_this,er,data)}):done(this,null,null)}Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,chunk,encoding)},Transform.prototype._transform=function(chunk,encoding,cb){cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()"))},Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark)}},Transform.prototype._read=function(n){var ts=this._transformState;ts.writechunk!==null&&!ts.transforming?(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)):ts.needTransform=!0},Transform.prototype._destroy=function(err,cb){Duplex.prototype._destroy.call(this,err,function(err2){cb(err2)})};function done(stream,er,data){if(er)return stream.emit("error",er);if(data!=null&&stream.push(data),stream._writableState.length)throw new ERR_TRANSFORM_WITH_LENGTH_0;if(stream._transformState.transforming)throw new ERR_TRANSFORM_ALREADY_TRANSFORMING;return stream.push(null)}}}),require_stream_passthrough=__commonJS2({"../../node_modules/readable-stream/lib/_stream_passthrough.js"(exports2,module22){"use strict";module22.exports=PassThrough;var Transform=require_stream_transform();require_inherits()(PassThrough,Transform);function PassThrough(options){if(!(this instanceof PassThrough))return new PassThrough(options);Transform.call(this,options)}PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}}}),require_pipeline=__commonJS2({"../../node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2,module22){"use strict";var eos;function once2(callback){var called=!1;return function(){called||(called=!0,callback.apply(void 0,arguments))}}var _require$codes=require_errors().codes,ERR_MISSING_ARGS=_require$codes.ERR_MISSING_ARGS,ERR_STREAM_DESTROYED=_require$codes.ERR_STREAM_DESTROYED;function noop(err){if(err)throw err}function isRequest(stream){return stream.setHeader&&typeof stream.abort=="function"}function destroyer(stream,reading,writing,callback){callback=once2(callback);var closed=!1;stream.on("close",function(){closed=!0}),eos===void 0&&(eos=require_end_of_stream()),eos(stream,{readable:reading,writable:writing},function(err){if(err)return callback(err);closed=!0,callback()});var destroyed=!1;return function(err){if(!closed&&!destroyed){if(destroyed=!0,isRequest(stream))return stream.abort();if(typeof stream.destroy=="function")return stream.destroy();callback(err||new ERR_STREAM_DESTROYED("pipe"))}}}function call(fn){fn()}function pipe(from,to){return from.pipe(to)}function popCallback(streams){return!streams.length||typeof streams[streams.length-1]!="function"?noop:streams.pop()}function pipeline(){for(var _len=arguments.length,streams=new Array(_len),_key=0;_key<_len;_key++)streams[_key]=arguments[_key];var callback=popCallback(streams);if(Array.isArray(streams[0])&&(streams=streams[0]),streams.length<2)throw new ERR_MISSING_ARGS("streams");var error,destroys=streams.map(function(stream,i){var reading=i<streams.length-1,writing=i>0;return destroyer(stream,reading,writing,function(err){error||(error=err),err&&destroys.forEach(call),!reading&&(destroys.forEach(call),callback(error))})});return streams.reduce(pipe)}module22.exports=pipeline}}),require_readable=__commonJS2({"../../node_modules/readable-stream/readable.js"(exports2,module22){"use strict";var Stream=require("stream");process.env.READABLE_STREAM==="disable"&&Stream?(module22.exports=Stream.Readable,Object.assign(module22.exports,Stream),module22.exports.Stream=Stream):(exports2=module22.exports=require_stream_readable(),exports2.Stream=Stream||exports2,exports2.Readable=exports2,exports2.Writable=require_stream_writable(),exports2.Duplex=require_stream_duplex(),exports2.Transform=require_stream_transform(),exports2.PassThrough=require_stream_passthrough(),exports2.finished=require_end_of_stream(),exports2.pipeline=require_pipeline())}}),require_delegates=__commonJS2({"../../node_modules/delegates/index.js"(exports2,module22){"use strict";module22.exports=Delegator;function Delegator(proto,target){if(!(this instanceof Delegator))return new Delegator(proto,target);this.proto=proto,this.target=target,this.methods=[],this.getters=[],this.setters=[],this.fluents=[]}Delegator.prototype.method=function(name){var proto=this.proto,target=this.target;return this.methods.push(name),proto[name]=function(){return this[target][name].apply(this[target],arguments)},this},Delegator.prototype.access=function(name){return this.getter(name).setter(name)},Delegator.prototype.getter=function(name){var proto=this.proto,target=this.target;return this.getters.push(name),proto.__defineGetter__(name,function(){return this[target][name]}),this},Delegator.prototype.setter=function(name){var proto=this.proto,target=this.target;return this.setters.push(name),proto.__defineSetter__(name,function(val){return this[target][name]=val}),this},Delegator.prototype.fluent=function(name){var proto=this.proto,target=this.target;return this.fluents.push(name),proto[name]=function(val){return typeof val<"u"?(this[target][name]=val,this):this[target][name]},this}}}),require_tracker_stream=__commonJS2({"../../node_modules/npmlog/node_modules/are-we-there-yet/lib/tracker-stream.js"(exports2,module22){"use strict";var util=require("util"),stream=require_readable(),delegate=require_delegates(),Tracker=require_tracker(),TrackerStream=module22.exports=function(name,size,options){stream.Transform.call(this,options),this.tracker=new Tracker(name,size),this.name=name,this.id=this.tracker.id,this.tracker.on("change",delegateChange(this))};util.inherits(TrackerStream,stream.Transform);function delegateChange(trackerStream){return function(name,completion,tracker){trackerStream.emit("change",name,completion,trackerStream)}}TrackerStream.prototype._transform=function(data,encoding,cb){this.tracker.completeWork(data.length?data.length:1),this.push(data),cb()},TrackerStream.prototype._flush=function(cb){this.tracker.finish(),cb()},delegate(TrackerStream.prototype,"tracker").method("completed").method("addWork").method("finish")}}),require_tracker_group=__commonJS2({"../../node_modules/npmlog/node_modules/are-we-there-yet/lib/tracker-group.js"(exports2,module22){"use strict";var util=require("util"),TrackerBase=require_tracker_base(),Tracker=require_tracker(),TrackerStream=require_tracker_stream(),TrackerGroup=module22.exports=function(name){TrackerBase.call(this,name),this.parentGroup=null,this.trackers=[],this.completion={},this.weight={},this.totalWeight=0,this.finished=!1,this.bubbleChange=bubbleChange(this)};util.inherits(TrackerGroup,TrackerBase);function bubbleChange(trackerGroup){return function(name,completed,tracker){trackerGroup.completion[tracker.id]=completed,!trackerGroup.finished&&trackerGroup.emit("change",name||trackerGroup.name,trackerGroup.completed(),trackerGroup)}}TrackerGroup.prototype.nameInTree=function(){for(var names=[],from=this;from;)names.unshift(from.name),from=from.parentGroup;return names.join("/")},TrackerGroup.prototype.addUnit=function(unit,weight){if(unit.addUnit){for(var toTest=this;toTest;){if(unit===toTest)throw new Error("Attempted to add tracker group "+unit.name+" to tree that already includes it "+this.nameInTree(this));toTest=toTest.parentGroup}unit.parentGroup=this}return this.weight[unit.id]=weight||1,this.totalWeight+=this.weight[unit.id],this.trackers.push(unit),this.completion[unit.id]=unit.completed(),unit.on("change",this.bubbleChange),this.finished||this.emit("change",unit.name,this.completion[unit.id],unit),unit},TrackerGroup.prototype.completed=function(){if(this.trackers.length===0)return 0;for(var valPerWeight=1/this.totalWeight,completed=0,ii=0;ii<this.trackers.length;ii++){var trackerId=this.trackers[ii].id;completed+=valPerWeight*this.weight[trackerId]*this.completion[trackerId]}return completed},TrackerGroup.prototype.newGroup=function(name,weight){return this.addUnit(new TrackerGroup(name),weight)},TrackerGroup.prototype.newItem=function(name,todo,weight){return this.addUnit(new Tracker(name,todo),weight)},TrackerGroup.prototype.newStream=function(name,todo,weight){return this.addUnit(new TrackerStream(name,todo),weight)},TrackerGroup.prototype.finish=function(){this.finished=!0,this.trackers.length||this.addUnit(new Tracker,1,!0);for(var ii=0;ii<this.trackers.length;ii++){var tracker=this.trackers[ii];tracker.finish(),tracker.removeListener("change",this.bubbleChange)}this.emit("change",this.name,1,this)};var buffer=" ";TrackerGroup.prototype.debug=function(depth){depth=depth||0;var indent=depth?buffer.substr(0,depth):"",output=indent+(this.name||"top")+": "+this.completed()+`
|
|
2
|
+
`;return this.trackers.forEach(function(tracker){tracker instanceof TrackerGroup?output+=tracker.debug(depth+1):output+=indent+" "+tracker.name+": "+tracker.completed()+`
|
|
3
|
+
`}),output}}}),require_lib=__commonJS2({"../../node_modules/npmlog/node_modules/are-we-there-yet/lib/index.js"(exports2){"use strict";exports2.TrackerGroup=require_tracker_group(),exports2.Tracker=require_tracker(),exports2.TrackerStream=require_tracker_stream()}}),require_console_control_strings=__commonJS2({"../../node_modules/console-control-strings/index.js"(exports2){"use strict";var prefix="\x1B[";exports2.up=function(num){return prefix+(num||"")+"A"},exports2.down=function(num){return prefix+(num||"")+"B"},exports2.forward=function(num){return prefix+(num||"")+"C"},exports2.back=function(num){return prefix+(num||"")+"D"},exports2.nextLine=function(num){return prefix+(num||"")+"E"},exports2.previousLine=function(num){return prefix+(num||"")+"F"},exports2.horizontalAbsolute=function(num){if(num==null)throw new Error("horizontalAboslute requires a column to position to");return prefix+num+"G"},exports2.eraseData=function(){return prefix+"J"},exports2.eraseLine=function(){return prefix+"K"},exports2.goto=function(x,y){return prefix+y+";"+x+"H"},exports2.gotoSOL=function(){return"\r"},exports2.beep=function(){return"\x07"},exports2.hideCursor=function(){return prefix+"?25l"},exports2.showCursor=function(){return prefix+"?25h"};var colors2={reset:0,bold:1,italic:3,underline:4,inverse:7,stopBold:22,stopItalic:23,stopUnderline:24,stopInverse:27,white:37,black:30,blue:34,cyan:36,green:32,magenta:35,red:31,yellow:33,bgWhite:47,bgBlack:40,bgBlue:44,bgCyan:46,bgGreen:42,bgMagenta:45,bgRed:41,bgYellow:43,grey:90,brightBlack:90,brightRed:91,brightGreen:92,brightYellow:93,brightBlue:94,brightMagenta:95,brightCyan:96,brightWhite:97,bgGrey:100,bgBrightBlack:100,bgBrightRed:101,bgBrightGreen:102,bgBrightYellow:103,bgBrightBlue:104,bgBrightMagenta:105,bgBrightCyan:106,bgBrightWhite:107};exports2.color=function(colorWith){return(arguments.length!==1||!Array.isArray(colorWith))&&(colorWith=Array.prototype.slice.call(arguments)),prefix+colorWith.map(colorNameToCode).join(";")+"m"};function colorNameToCode(color){if(colors2[color]!=null)return colors2[color];throw new Error("Unknown color or style name: "+color)}}}),require_ansi_regex=__commonJS2({"../../node_modules/ansi-regex/index.js"(exports2,module22){"use strict";module22.exports=({onlyFirst=!1}={})=>{let pattern=["[\\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(pattern,onlyFirst?void 0:"g")}}}),require_strip_ansi=__commonJS2({"../../node_modules/strip-ansi/index.js"(exports2,module22){"use strict";var ansiRegex=require_ansi_regex();module22.exports=string=>typeof string=="string"?string.replace(ansiRegex(),""):string}}),require_is_fullwidth_code_point=__commonJS2({"../../node_modules/is-fullwidth-code-point/index.js"(exports2,module22){"use strict";var isFullwidthCodePoint=codePoint=>Number.isNaN(codePoint)?!1:codePoint>=4352&&(codePoint<=4447||codePoint===9001||codePoint===9002||11904<=codePoint&&codePoint<=12871&&codePoint!==12351||12880<=codePoint&&codePoint<=19903||19968<=codePoint&&codePoint<=42182||43360<=codePoint&&codePoint<=43388||44032<=codePoint&&codePoint<=55203||63744<=codePoint&&codePoint<=64255||65040<=codePoint&&codePoint<=65049||65072<=codePoint&&codePoint<=65131||65281<=codePoint&&codePoint<=65376||65504<=codePoint&&codePoint<=65510||110592<=codePoint&&codePoint<=110593||127488<=codePoint&&codePoint<=127569||131072<=codePoint&&codePoint<=262141);module22.exports=isFullwidthCodePoint,module22.exports.default=isFullwidthCodePoint}}),require_emoji_regex=__commonJS2({"../../node_modules/string-width/node_modules/emoji-regex/index.js"(exports2,module22){"use strict";module22.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\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\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])|\uD83C[\uDF3E\uDF73\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])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\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])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\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\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*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\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\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\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[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}}}),require_string_width=__commonJS2({"../../node_modules/string-width/index.js"(exports2,module22){"use strict";var stripAnsi=require_strip_ansi(),isFullwidthCodePoint=require_is_fullwidth_code_point(),emojiRegex=require_emoji_regex(),stringWidth=string=>{if(typeof string!="string"||string.length===0||(string=stripAnsi(string),string.length===0))return 0;string=string.replace(emojiRegex()," ");let width=0;for(let i=0;i<string.length;i++){let code=string.codePointAt(i);code<=31||code>=127&&code<=159||code>=768&&code<=879||(code>65535&&i++,width+=isFullwidthCodePoint(code)?2:1)}return width};module22.exports=stringWidth,module22.exports.default=stringWidth}}),require_align=__commonJS2({"../../node_modules/wide-align/align.js"(exports2){"use strict";var stringWidth=require_string_width();exports2.center=alignCenter,exports2.left=alignLeft,exports2.right=alignRight;function createPadding(width){var result="",string=" ",n=width;do n%2&&(result+=string),n=Math.floor(n/2),string+=string;while(n);return result}function alignLeft(str,width){var trimmed=str.trimRight();if(trimmed.length===0&&str.length>=width)return str;var padding="",strWidth=stringWidth(trimmed);return strWidth<width&&(padding=createPadding(width-strWidth)),trimmed+padding}function alignRight(str,width){var trimmed=str.trimLeft();if(trimmed.length===0&&str.length>=width)return str;var padding="",strWidth=stringWidth(trimmed);return strWidth<width&&(padding=createPadding(width-strWidth)),padding+trimmed}function alignCenter(str,width){var trimmed=str.trim();if(trimmed.length===0&&str.length>=width)return str;var padLeft="",padRight="",strWidth=stringWidth(trimmed);if(strWidth<width){var padLeftBy=parseInt((width-strWidth)/2,10);padLeft=createPadding(padLeftBy),padRight=createPadding(width-(strWidth+padLeftBy))}return padLeft+trimmed+padRight}}}),require_aproba=__commonJS2({"../../node_modules/aproba/index.js"(exports2,module22){"use strict";module22.exports=validate;function isArguments(thingy){return thingy!=null&&typeof thingy=="object"&&thingy.hasOwnProperty("callee")}var types={"*":{label:"any",check:()=>!0},A:{label:"array",check:_=>Array.isArray(_)||isArguments(_)},S:{label:"string",check:_=>typeof _=="string"},N:{label:"number",check:_=>typeof _=="number"},F:{label:"function",check:_=>typeof _=="function"},O:{label:"object",check:_=>typeof _=="object"&&_!=null&&!types.A.check(_)&&!types.E.check(_)},B:{label:"boolean",check:_=>typeof _=="boolean"},E:{label:"error",check:_=>_ instanceof Error},Z:{label:"null",check:_=>_==null}};function addSchema(schema,arity){let group=arity[schema.length]=arity[schema.length]||[];group.indexOf(schema)===-1&&group.push(schema)}function validate(rawSchemas,args){if(arguments.length!==2)throw wrongNumberOfArgs(["SA"],arguments.length);if(!rawSchemas)throw missingRequiredArg(0,"rawSchemas");if(!args)throw missingRequiredArg(1,"args");if(!types.S.check(rawSchemas))throw invalidType(0,["string"],rawSchemas);if(!types.A.check(args))throw invalidType(1,["array"],args);let schemas=rawSchemas.split("|"),arity={};schemas.forEach(schema=>{for(let ii=0;ii<schema.length;++ii){let type=schema[ii];if(!types[type])throw unknownType(ii,type)}if(/E.*E/.test(schema))throw moreThanOneError(schema);addSchema(schema,arity),/E/.test(schema)&&(addSchema(schema.replace(/E.*$/,"E"),arity),addSchema(schema.replace(/E/,"Z"),arity),schema.length===1&&addSchema("",arity))});let matching=arity[args.length];if(!matching)throw wrongNumberOfArgs(Object.keys(arity),args.length);for(let ii=0;ii<args.length;++ii){let newMatching=matching.filter(schema=>{let type=schema[ii],typeCheck=types[type].check;return typeCheck(args[ii])});if(!newMatching.length){let labels=matching.map(_=>types[_[ii]].label).filter(_=>_!=null);throw invalidType(ii,labels,args[ii])}matching=newMatching}}function missingRequiredArg(num){return newException("EMISSINGARG","Missing required argument #"+(num+1))}function unknownType(num,type){return newException("EUNKNOWNTYPE","Unknown type "+type+" in argument #"+(num+1))}function invalidType(num,expectedTypes,value){let valueType;return Object.keys(types).forEach(typeCode=>{types[typeCode].check(value)&&(valueType=types[typeCode].label)}),newException("EINVALIDTYPE","Argument #"+(num+1)+": Expected "+englishList(expectedTypes)+" but got "+valueType)}function englishList(list){return list.join(", ").replace(/, ([^,]+)$/," or $1")}function wrongNumberOfArgs(expected,got){let english=englishList(expected),args=expected.every(ex=>ex.length===1)?"argument":"arguments";return newException("EWRONGARGCOUNT","Expected "+english+" "+args+" but got "+got)}function moreThanOneError(schema){return newException("ETOOMANYERRORTYPES",'Only one error type per argument signature is allowed, more than one found in "'+schema+'"')}function newException(code,msg){let err=new Error(msg);return err.code=code,Error.captureStackTrace&&Error.captureStackTrace(err,validate),err}}}),require_wide_truncate=__commonJS2({"../../node_modules/npmlog/node_modules/gauge/wide-truncate.js"(exports2,module22){"use strict";var stringWidth=require_string_width(),stripAnsi=require_strip_ansi();module22.exports=wideTruncate;function wideTruncate(str,target){if(stringWidth(str)===0)return str;if(target<=0)return"";if(stringWidth(str)<=target)return str;for(var noAnsi=stripAnsi(str),ansiSize=str.length+noAnsi.length,truncated=str.slice(0,target+ansiSize);stringWidth(truncated)>target;)truncated=truncated.slice(0,-1);return truncated}}}),require_error=__commonJS2({"../../node_modules/npmlog/node_modules/gauge/error.js"(exports2){"use strict";var util=require("util"),User=exports2.User=function User2(msg){var err=new Error(msg);return Error.captureStackTrace(err,User2),err.code="EGAUGE",err};exports2.MissingTemplateValue=function MissingTemplateValue(item,values){var err=new User(util.format('Missing template value "%s"',item.type));return Error.captureStackTrace(err,MissingTemplateValue),err.template=item,err.values=values,err},exports2.Internal=function Internal(msg){var err=new Error(msg);return Error.captureStackTrace(err,Internal),err.code="EGAUGEINTERNAL",err}}}),require_template_item=__commonJS2({"../../node_modules/npmlog/node_modules/gauge/template-item.js"(exports2,module22){"use strict";var stringWidth=require_string_width();module22.exports=TemplateItem;function isPercent(num){return typeof num!="string"?!1:num.slice(-1)==="%"}function percent(num){return Number(num.slice(0,-1))/100}function TemplateItem(values,outputLength){if(this.overallOutputLength=outputLength,this.finished=!1,this.type=null,this.value=null,this.length=null,this.maxLength=null,this.minLength=null,this.kerning=null,this.align="left",this.padLeft=0,this.padRight=0,this.index=null,this.first=null,this.last=null,typeof values=="string")this.value=values;else for(var prop in values)this[prop]=values[prop];return isPercent(this.length)&&(this.length=Math.round(this.overallOutputLength*percent(this.length))),isPercent(this.minLength)&&(this.minLength=Math.round(this.overallOutputLength*percent(this.minLength))),isPercent(this.maxLength)&&(this.maxLength=Math.round(this.overallOutputLength*percent(this.maxLength))),this}TemplateItem.prototype={},TemplateItem.prototype.getBaseLength=function(){var length=this.length;return length==null&&typeof this.value=="string"&&this.maxLength==null&&this.minLength==null&&(length=stringWidth(this.value)),length},TemplateItem.prototype.getLength=function(){var length=this.getBaseLength();return length==null?null:length+this.padLeft+this.padRight},TemplateItem.prototype.getMaxLength=function(){return this.maxLength==null?null:this.maxLength+this.padLeft+this.padRight},TemplateItem.prototype.getMinLength=function(){return this.minLength==null?null:this.minLength+this.padLeft+this.padRight}}}),require_render_template=__commonJS2({"../../node_modules/npmlog/node_modules/gauge/render-template.js"(exports2,module22){"use strict";var align=require_align(),validate=require_aproba(),wideTruncate=require_wide_truncate(),error=require_error(),TemplateItem=require_template_item();function renderValueWithValues(values){return function(item){return renderValue(item,values)}}var renderTemplate=module22.exports=function(width,template,values){var items=prepareItems(width,template,values),rendered=items.map(renderValueWithValues(values)).join("");return align.left(wideTruncate(rendered,width),width)};function preType(item){var cappedTypeName=item.type[0].toUpperCase()+item.type.slice(1);return"pre"+cappedTypeName}function postType(item){var cappedTypeName=item.type[0].toUpperCase()+item.type.slice(1);return"post"+cappedTypeName}function hasPreOrPost(item,values){if(item.type)return values[preType(item)]||values[postType(item)]}function generatePreAndPost(baseItem,parentValues){var item=Object.assign({},baseItem),values=Object.create(parentValues),template=[],pre=preType(item),post=postType(item);return values[pre]&&(template.push({value:values[pre]}),values[pre]=null),item.minLength=null,item.length=null,item.maxLength=null,template.push(item),values[item.type]=values[item.type],values[post]&&(template.push({value:values[post]}),values[post]=null),function($1,$2,length){return renderTemplate(length,template,values)}}function prepareItems(width,template,values){function cloneAndObjectify(item,index,arr){var cloned=new TemplateItem(item,width),type=cloned.type;if(cloned.value==null)if(type in values)cloned.value=values[type];else{if(cloned.default==null)throw new error.MissingTemplateValue(cloned,values);cloned.value=cloned.default}return cloned.value==null||cloned.value===""?null:(cloned.index=index,cloned.first=index===0,cloned.last=index===arr.length-1,hasPreOrPost(cloned,values)&&(cloned.value=generatePreAndPost(cloned,values)),cloned)}var output=template.map(cloneAndObjectify).filter(function(item){return item!=null}),remainingSpace=width,variableCount=output.length;function consumeSpace(length){length>remainingSpace&&(length=remainingSpace),remainingSpace-=length}function finishSizing(item,length){if(item.finished)throw new error.Internal("Tried to finish template item that was already finished");if(length===1/0)throw new error.Internal("Length of template item cannot be infinity");if(length!=null&&(item.length=length),item.minLength=null,item.maxLength=null,--variableCount,item.finished=!0,item.length==null&&(item.length=item.getBaseLength()),item.length==null)throw new error.Internal("Finished template items must have a length");consumeSpace(item.getLength())}output.forEach(function(item){if(item.kerning){var prevPadRight=item.first?0:output[item.index-1].padRight;!item.first&&prevPadRight<item.kerning&&(item.padLeft=item.kerning-prevPadRight),item.last||(item.padRight=item.kerning)}}),output.forEach(function(item){item.getBaseLength()!=null&&finishSizing(item)});var resized=0,resizing,hunkSize;do resizing=!1,hunkSize=Math.round(remainingSpace/variableCount),output.forEach(function(item){item.finished||item.maxLength&&item.getMaxLength()<hunkSize&&(finishSizing(item,item.maxLength),resizing=!0)});while(resizing&&resized++<output.length);if(resizing)throw new error.Internal("Resize loop iterated too many times while determining maxLength");resized=0;do resizing=!1,hunkSize=Math.round(remainingSpace/variableCount),output.forEach(function(item){item.finished||item.minLength&&item.getMinLength()>=hunkSize&&(finishSizing(item,item.minLength),resizing=!0)});while(resizing&&resized++<output.length);if(resizing)throw new error.Internal("Resize loop iterated too many times while determining minLength");return hunkSize=Math.round(remainingSpace/variableCount),output.forEach(function(item){item.finished||finishSizing(item,hunkSize)}),output}function renderFunction(item,values,length){return validate("OON",arguments),item.type?item.value(values,values[item.type+"Theme"]||{},length):item.value(values,{},length)}function renderValue(item,values){var length=item.getBaseLength(),value=typeof item.value=="function"?renderFunction(item,values,length):item.value;if(value==null||value==="")return"";var alignWith=align[item.align]||align.left,leftPadding=item.padLeft?align.left("",item.padLeft):"",rightPadding=item.padRight?align.right("",item.padRight):"",truncated=wideTruncate(String(value),length),aligned=alignWith(truncated,length);return leftPadding+aligned+rightPadding}}}),require_plumbing=__commonJS2({"../../node_modules/npmlog/node_modules/gauge/plumbing.js"(exports2,module22){"use strict";var consoleControl=require_console_control_strings(),renderTemplate=require_render_template(),validate=require_aproba(),Plumbing=module22.exports=function(theme,template,width){width||(width=80),validate("OAN",[theme,template,width]),this.showing=!1,this.theme=theme,this.width=width,this.template=template};Plumbing.prototype={},Plumbing.prototype.setTheme=function(theme){validate("O",[theme]),this.theme=theme},Plumbing.prototype.setTemplate=function(template){validate("A",[template]),this.template=template},Plumbing.prototype.setWidth=function(width){validate("N",[width]),this.width=width},Plumbing.prototype.hide=function(){return consoleControl.gotoSOL()+consoleControl.eraseLine()},Plumbing.prototype.hideCursor=consoleControl.hideCursor,Plumbing.prototype.showCursor=consoleControl.showCursor,Plumbing.prototype.show=function(status){var values=Object.create(this.theme);for(var key in status)values[key]=status[key];return renderTemplate(this.width,this.template,values).trim()+consoleControl.color("reset")+consoleControl.eraseLine()+consoleControl.gotoSOL()}}}),require_has_unicode=__commonJS2({"../../node_modules/has-unicode/index.js"(exports2,module22){"use strict";var os=require("os"),hasUnicode=module22.exports=function(){if(os.type()=="Windows_NT")return!1;var isUTF8=/UTF-?8$/i,ctype=process.env.LC_ALL||process.env.LC_CTYPE||process.env.LANG;return isUTF8.test(ctype)}}}),require_color_support=__commonJS2({"../../node_modules/color-support/index.js"(exports2,module22){"use strict";module22.exports=colorSupport({alwaysReturn:!0},colorSupport);function hasNone(obj,options){return obj.level=0,obj.hasBasic=!1,obj.has256=!1,obj.has16m=!1,options.alwaysReturn?obj:!1}function hasBasic(obj){return obj.hasBasic=!0,obj.has256=!1,obj.has16m=!1,obj.level=1,obj}function has256(obj){return obj.hasBasic=!0,obj.has256=!0,obj.has16m=!1,obj.level=2,obj}function has16m(obj){return obj.hasBasic=!0,obj.has256=!0,obj.has16m=!0,obj.level=3,obj}function colorSupport(options,obj){if(options=options||{},obj=obj||{},typeof options.level=="number")switch(options.level){case 0:return hasNone(obj,options);case 1:return hasBasic(obj);case 2:return has256(obj);case 3:return has16m(obj)}if(obj.level=0,obj.hasBasic=!1,obj.has256=!1,obj.has16m=!1,typeof process>"u"||!process||!process.stdout||!process.env||!process.platform)return hasNone(obj,options);var env=options.env||process.env,stream=options.stream||process.stdout,term=options.term||env.TERM||"",platform=options.platform||process.platform;if(!options.ignoreTTY&&!stream.isTTY||!options.ignoreDumb&&term==="dumb"&&!env.COLORTERM)return hasNone(obj,options);if(platform==="win32")return hasBasic(obj);if(env.TMUX)return has256(obj);if(!options.ignoreCI&&(env.CI||env.TEAMCITY_VERSION))return env.TRAVIS?has256(obj):hasNone(obj,options);switch(env.TERM_PROGRAM){case"iTerm.app":var ver=env.TERM_PROGRAM_VERSION||"0.";return/^[0-2]\./.test(ver)?has256(obj):has16m(obj);case"HyperTerm":case"Hyper":return has16m(obj);case"MacTerm":return has16m(obj);case"Apple_Terminal":return has256(obj)}return/^xterm-256/.test(term)?has256(obj):/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(term)||env.COLORTERM?hasBasic(obj):hasNone(obj,options)}}}),require_has_color=__commonJS2({"../../node_modules/npmlog/node_modules/gauge/has-color.js"(exports2,module22){"use strict";var colorSupport=require_color_support();module22.exports=colorSupport().hasBasic}}),require_signals=__commonJS2({"../../node_modules/signal-exit/signals.js"(exports2,module22){"use strict";module22.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],process.platform!=="win32"&&module22.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),process.platform==="linux"&&module22.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}}),require_signal_exit=__commonJS2({"../../node_modules/signal-exit/index.js"(exports2,module22){"use strict";var process2=global.process,processOk=function(process3){return process3&&typeof process3=="object"&&typeof process3.removeListener=="function"&&typeof process3.emit=="function"&&typeof process3.reallyExit=="function"&&typeof process3.listeners=="function"&&typeof process3.kill=="function"&&typeof process3.pid=="number"&&typeof process3.on=="function"};processOk(process2)?(assert=require("assert"),signals=require_signals(),isWin=/^win/i.test(process2.platform),EE=require("events"),typeof EE!="function"&&(EE=EE.EventEmitter),process2.__signal_exit_emitter__?emitter=process2.__signal_exit_emitter__:(emitter=process2.__signal_exit_emitter__=new EE,emitter.count=0,emitter.emitted={}),emitter.infinite||(emitter.setMaxListeners(1/0),emitter.infinite=!0),module22.exports=function(cb,opts){if(!processOk(global.process))return function(){};assert.equal(typeof cb,"function","a callback must be provided for exit handler"),loaded===!1&&load();var ev="exit";opts&&opts.alwaysLast&&(ev="afterexit");var remove=function(){emitter.removeListener(ev,cb),emitter.listeners("exit").length===0&&emitter.listeners("afterexit").length===0&&unload()};return emitter.on(ev,cb),remove},unload=function(){!loaded||!processOk(global.process)||(loaded=!1,signals.forEach(function(sig){try{process2.removeListener(sig,sigListeners[sig])}catch{}}),process2.emit=originalProcessEmit,process2.reallyExit=originalProcessReallyExit,emitter.count-=1)},module22.exports.unload=unload,emit=function(event,code,signal){emitter.emitted[event]||(emitter.emitted[event]=!0,emitter.emit(event,code,signal))},sigListeners={},signals.forEach(function(sig){sigListeners[sig]=function(){if(processOk(global.process)){var listeners=process2.listeners(sig);listeners.length===emitter.count&&(unload(),emit("exit",null,sig),emit("afterexit",null,sig),isWin&&sig==="SIGHUP"&&(sig="SIGINT"),process2.kill(process2.pid,sig))}}}),module22.exports.signals=function(){return signals},loaded=!1,load=function(){loaded||!processOk(global.process)||(loaded=!0,emitter.count+=1,signals=signals.filter(function(sig){try{return process2.on(sig,sigListeners[sig]),!0}catch{return!1}}),process2.emit=processEmit,process2.reallyExit=processReallyExit)},module22.exports.load=load,originalProcessReallyExit=process2.reallyExit,processReallyExit=function(code){processOk(global.process)&&(process2.exitCode=code||0,emit("exit",process2.exitCode,null),emit("afterexit",process2.exitCode,null),originalProcessReallyExit.call(process2,process2.exitCode))},originalProcessEmit=process2.emit,processEmit=function(ev,arg){if(ev==="exit"&&processOk(global.process)){arg!==void 0&&(process2.exitCode=arg);var ret=originalProcessEmit.apply(this,arguments);return emit("exit",process2.exitCode,null),emit("afterexit",process2.exitCode,null),ret}else return originalProcessEmit.apply(this,arguments)}):module22.exports=function(){return function(){}};var assert,signals,isWin,EE,emitter,unload,emit,sigListeners,loaded,load,originalProcessReallyExit,processReallyExit,originalProcessEmit,processEmit}}),require_object_assign=__commonJS2({"../../node_modules/object-assign/index.js"(exports2,module22){"use strict";var getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(val){if(val==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(val)}function shouldUseNative(){try{if(!Object.assign)return!1;var test1=new String("abc");if(test1[5]="de",Object.getOwnPropertyNames(test1)[0]==="5")return!1;for(var test2={},i=0;i<10;i++)test2["_"+String.fromCharCode(i)]=i;var order2=Object.getOwnPropertyNames(test2).map(function(n){return test2[n]});if(order2.join("")!=="0123456789")return!1;var test3={};return"abcdefghijklmnopqrst".split("").forEach(function(letter){test3[letter]=letter}),Object.keys(Object.assign({},test3)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}module22.exports=shouldUseNative()?Object.assign:function(target,source){for(var from,to=toObject(target),symbols,s=1;s<arguments.length;s++){from=Object(arguments[s]);for(var key in from)hasOwnProperty.call(from,key)&&(to[key]=from[key]);if(getOwnPropertySymbols){symbols=getOwnPropertySymbols(from);for(var i=0;i<symbols.length;i++)propIsEnumerable.call(from,symbols[i])&&(to[symbols[i]]=from[symbols[i]])}}return to}}}),require_spin=__commonJS2({"../../node_modules/npmlog/node_modules/gauge/spin.js"(exports2,module22){"use strict";module22.exports=function(spinstr,spun){return spinstr[spun%spinstr.length]}}}),require_progress_bar=__commonJS2({"../../node_modules/npmlog/node_modules/gauge/progress-bar.js"(exports2,module22){"use strict";var validate=require_aproba(),renderTemplate=require_render_template(),wideTruncate=require_wide_truncate(),stringWidth=require_string_width();module22.exports=function(theme,width,completed){if(validate("ONN",[theme,width,completed]),completed<0&&(completed=0),completed>1&&(completed=1),width<=0)return"";var sofar=Math.round(width*completed),rest=width-sofar,template=[{type:"complete",value:repeat(theme.complete,sofar),length:sofar},{type:"remaining",value:repeat(theme.remaining,rest),length:rest}];return renderTemplate(width,template,theme)};function repeat(string,width){var result="",n=width;do n%2&&(result+=string),n=Math.floor(n/2),string+=string;while(n&&stringWidth(result)<width);return wideTruncate(result,width)}}}),require_base_theme=__commonJS2({"../../node_modules/npmlog/node_modules/gauge/base-theme.js"(exports2,module22){"use strict";var spin=require_spin(),progressBar=require_progress_bar();module22.exports={activityIndicator:function(values,theme,width){if(values.spun!=null)return spin(theme,values.spun)},progressbar:function(values,theme,width){if(values.completed!=null)return progressBar(theme,width,values.completed)}}}}),require_theme_set=__commonJS2({"../../node_modules/npmlog/node_modules/gauge/theme-set.js"(exports2,module22){"use strict";var objectAssign=require_object_assign();module22.exports=function(){return ThemeSetProto.newThemeSet()};var ThemeSetProto={};ThemeSetProto.baseTheme=require_base_theme(),ThemeSetProto.newTheme=function(parent,theme){return theme||(theme=parent,parent=this.baseTheme),objectAssign({},parent,theme)},ThemeSetProto.getThemeNames=function(){return Object.keys(this.themes)},ThemeSetProto.addTheme=function(name,parent,theme){this.themes[name]=this.newTheme(parent,theme)},ThemeSetProto.addToAllThemes=function(theme){var themes=this.themes;Object.keys(themes).forEach(function(name){objectAssign(themes[name],theme)}),objectAssign(this.baseTheme,theme)},ThemeSetProto.getTheme=function(name){if(!this.themes[name])throw this.newMissingThemeError(name);return this.themes[name]},ThemeSetProto.setDefault=function(opts,name){name==null&&(name=opts,opts={});var platform=opts.platform==null?"fallback":opts.platform,hasUnicode=!!opts.hasUnicode,hasColor=!!opts.hasColor;this.defaults[platform]||(this.defaults[platform]={true:{},false:{}}),this.defaults[platform][hasUnicode][hasColor]=name},ThemeSetProto.getDefault=function(opts){opts||(opts={});var platformName=opts.platform||process.platform,platform=this.defaults[platformName]||this.defaults.fallback,hasUnicode=!!opts.hasUnicode,hasColor=!!opts.hasColor;if(!platform)throw this.newMissingDefaultThemeError(platformName,hasUnicode,hasColor);if(!platform[hasUnicode][hasColor]){if(hasUnicode&&hasColor&&platform[!hasUnicode][hasColor])hasUnicode=!1;else if(hasUnicode&&hasColor&&platform[hasUnicode][!hasColor])hasColor=!1;else if(hasUnicode&&hasColor&&platform[!hasUnicode][!hasColor])hasUnicode=!1,hasColor=!1;else if(hasUnicode&&!hasColor&&platform[!hasUnicode][hasColor])hasUnicode=!1;else if(!hasUnicode&&hasColor&&platform[hasUnicode][!hasColor])hasColor=!1;else if(platform===this.defaults.fallback)throw this.newMissingDefaultThemeError(platformName,hasUnicode,hasColor)}return platform[hasUnicode][hasColor]?this.getTheme(platform[hasUnicode][hasColor]):this.getDefault(objectAssign({},opts,{platform:"fallback"}))},ThemeSetProto.newMissingThemeError=function newMissingThemeError(name){var err=new Error('Could not find a gauge theme named "'+name+'"');return Error.captureStackTrace.call(err,newMissingThemeError),err.theme=name,err.code="EMISSINGTHEME",err},ThemeSetProto.newMissingDefaultThemeError=function newMissingDefaultThemeError(platformName,hasUnicode,hasColor){var err=new Error(`Could not find a gauge theme for your platform/unicode/color use combo:
|
|
4
|
+
platform = `+platformName+`
|
|
5
|
+
hasUnicode = `+hasUnicode+`
|
|
6
|
+
hasColor = `+hasColor);return Error.captureStackTrace.call(err,newMissingDefaultThemeError),err.platform=platformName,err.hasUnicode=hasUnicode,err.hasColor=hasColor,err.code="EMISSINGTHEME",err},ThemeSetProto.newThemeSet=function(){var themeset=function(opts){return themeset.getDefault(opts)};return objectAssign(themeset,ThemeSetProto,{themes:objectAssign({},this.themes),baseTheme:objectAssign({},this.baseTheme),defaults:JSON.parse(JSON.stringify(this.defaults||{}))})}}}),require_themes=__commonJS2({"../../node_modules/npmlog/node_modules/gauge/themes.js"(exports2,module22){"use strict";var color=require_console_control_strings().color,ThemeSet=require_theme_set(),themes=module22.exports=new ThemeSet;themes.addTheme("ASCII",{preProgressbar:"[",postProgressbar:"]",progressbarTheme:{complete:"#",remaining:"."},activityIndicatorTheme:"-\\|/",preSubsection:">"}),themes.addTheme("colorASCII",themes.getTheme("ASCII"),{progressbarTheme:{preComplete:color("bgBrightWhite","brightWhite"),complete:"#",postComplete:color("reset"),preRemaining:color("bgBrightBlack","brightBlack"),remaining:".",postRemaining:color("reset")}}),themes.addTheme("brailleSpinner",{preProgressbar:"\u2E28",postProgressbar:"\u2E29",progressbarTheme:{complete:"#",remaining:"\u2802"},activityIndicatorTheme:"\u280B\u2819\u2839\u2838\u283C\u2834\u2826\u2827\u2807\u280F",preSubsection:">"}),themes.addTheme("colorBrailleSpinner",themes.getTheme("brailleSpinner"),{progressbarTheme:{preComplete:color("bgBrightWhite","brightWhite"),complete:"#",postComplete:color("reset"),preRemaining:color("bgBrightBlack","brightBlack"),remaining:"\u2802",postRemaining:color("reset")}}),themes.setDefault({},"ASCII"),themes.setDefault({hasColor:!0},"colorASCII"),themes.setDefault({platform:"darwin",hasUnicode:!0},"brailleSpinner"),themes.setDefault({platform:"darwin",hasUnicode:!0,hasColor:!0},"colorBrailleSpinner"),themes.setDefault({platform:"linux",hasUnicode:!0},"brailleSpinner"),themes.setDefault({platform:"linux",hasUnicode:!0,hasColor:!0},"colorBrailleSpinner")}}),require_set_interval=__commonJS2({"../../node_modules/npmlog/node_modules/gauge/set-interval.js"(exports2,module22){"use strict";module22.exports=setInterval}}),require_process=__commonJS2({"../../node_modules/npmlog/node_modules/gauge/process.js"(exports2,module22){"use strict";module22.exports=process}}),require_set_immediate=__commonJS2({"../../node_modules/npmlog/node_modules/gauge/set-immediate.js"(exports2,module22){"use strict";var process2=require_process();try{module22.exports=setImmediate}catch{module22.exports=process2.nextTick}}}),require_gauge=__commonJS2({"../../node_modules/npmlog/node_modules/gauge/index.js"(exports2,module22){"use strict";var Plumbing=require_plumbing(),hasUnicode=require_has_unicode(),hasColor=require_has_color(),onExit=require_signal_exit(),defaultThemes=require_themes(),setInterval2=require_set_interval(),process2=require_process(),setImmediate2=require_set_immediate();module22.exports=Gauge;function callWith(obj,method){return function(){return method.call(obj)}}function Gauge(arg1,arg2){var options,writeTo;arg1&&arg1.write?(writeTo=arg1,options=arg2||{}):arg2&&arg2.write?(writeTo=arg2,options=arg1||{}):(writeTo=process2.stderr,options=arg1||arg2||{}),this._status={spun:0,section:"",subsection:""},this._paused=!1,this._disabled=!0,this._showing=!1,this._onScreen=!1,this._needsRedraw=!1,this._hideCursor=options.hideCursor==null?!0:options.hideCursor,this._fixedFramerate=options.fixedFramerate==null?!/^v0\.8\./.test(process2.version):options.fixedFramerate,this._lastUpdateAt=null,this._updateInterval=options.updateInterval==null?50:options.updateInterval,this._themes=options.themes||defaultThemes,this._theme=options.theme;var theme=this._computeTheme(options.theme),template=options.template||[{type:"progressbar",length:20},{type:"activityIndicator",kerning:1,length:1},{type:"section",kerning:1,default:""},{type:"subsection",kerning:1,default:""}];this.setWriteTo(writeTo,options.tty);var PlumbingClass=options.Plumbing||Plumbing;this._gauge=new PlumbingClass(theme,template,this.getWidth()),this._$$doRedraw=callWith(this,this._doRedraw),this._$$handleSizeChange=callWith(this,this._handleSizeChange),this._cleanupOnExit=options.cleanupOnExit==null||options.cleanupOnExit,this._removeOnExit=null,options.enabled||options.enabled==null&&this._tty&&this._tty.isTTY?this.enable():this.disable()}Gauge.prototype={},Gauge.prototype.isEnabled=function(){return!this._disabled},Gauge.prototype.setTemplate=function(template){this._gauge.setTemplate(template),this._showing&&this._requestRedraw()},Gauge.prototype._computeTheme=function(theme){if(theme||(theme={}),typeof theme=="string")theme=this._themes.getTheme(theme);else if(theme&&(Object.keys(theme).length===0||theme.hasUnicode!=null||theme.hasColor!=null)){var useUnicode=theme.hasUnicode==null?hasUnicode():theme.hasUnicode,useColor=theme.hasColor==null?hasColor:theme.hasColor;theme=this._themes.getDefault({hasUnicode:useUnicode,hasColor:useColor,platform:theme.platform})}return theme},Gauge.prototype.setThemeset=function(themes){this._themes=themes,this.setTheme(this._theme)},Gauge.prototype.setTheme=function(theme){this._gauge.setTheme(this._computeTheme(theme)),this._showing&&this._requestRedraw(),this._theme=theme},Gauge.prototype._requestRedraw=function(){this._needsRedraw=!0,this._fixedFramerate||this._doRedraw()},Gauge.prototype.getWidth=function(){return(this._tty&&this._tty.columns||80)-1},Gauge.prototype.setWriteTo=function(writeTo,tty){var enabled=!this._disabled;enabled&&this.disable(),this._writeTo=writeTo,this._tty=tty||writeTo===process2.stderr&&process2.stdout.isTTY&&process2.stdout||writeTo.isTTY&&writeTo||this._tty,this._gauge&&this._gauge.setWidth(this.getWidth()),enabled&&this.enable()},Gauge.prototype.enable=function(){this._disabled&&(this._disabled=!1,this._tty&&this._enableEvents(),this._showing&&this.show())},Gauge.prototype.disable=function(){this._disabled||(this._showing&&(this._lastUpdateAt=null,this._showing=!1,this._doRedraw(),this._showing=!0),this._disabled=!0,this._tty&&this._disableEvents())},Gauge.prototype._enableEvents=function(){this._cleanupOnExit&&(this._removeOnExit=onExit(callWith(this,this.disable))),this._tty.on("resize",this._$$handleSizeChange),this._fixedFramerate&&(this.redrawTracker=setInterval2(this._$$doRedraw,this._updateInterval),this.redrawTracker.unref&&this.redrawTracker.unref())},Gauge.prototype._disableEvents=function(){this._tty.removeListener("resize",this._$$handleSizeChange),this._fixedFramerate&&clearInterval(this.redrawTracker),this._removeOnExit&&this._removeOnExit()},Gauge.prototype.hide=function(cb){if(this._disabled||!this._showing)return cb&&process2.nextTick(cb);this._showing=!1,this._doRedraw(),cb&&setImmediate2(cb)},Gauge.prototype.show=function(section,completed){if(this._showing=!0,typeof section=="string")this._status.section=section;else if(typeof section=="object")for(var sectionKeys=Object.keys(section),ii=0;ii<sectionKeys.length;++ii){var key=sectionKeys[ii];this._status[key]=section[key]}completed!=null&&(this._status.completed=completed),!this._disabled&&this._requestRedraw()},Gauge.prototype.pulse=function(subsection){this._status.subsection=subsection||"",this._status.spun++,!this._disabled&&this._showing&&this._requestRedraw()},Gauge.prototype._handleSizeChange=function(){this._gauge.setWidth(this._tty.columns-1),this._requestRedraw()},Gauge.prototype._doRedraw=function(){if(!(this._disabled||this._paused)){if(!this._fixedFramerate){var now=Date.now();if(this._lastUpdateAt&&now-this._lastUpdateAt<this._updateInterval)return;this._lastUpdateAt=now}if(!this._showing&&this._onScreen){this._onScreen=!1;var result=this._gauge.hide();return this._hideCursor&&(result+=this._gauge.showCursor()),this._writeTo.write(result)}!this._showing&&!this._onScreen||(this._showing&&!this._onScreen&&(this._onScreen=!0,this._needsRedraw=!0,this._hideCursor&&this._writeTo.write(this._gauge.hideCursor())),this._needsRedraw&&(this._writeTo.write(this._gauge.show(this._status))||(this._paused=!0,this._writeTo.on("drain",callWith(this,function(){this._paused=!1,this._doRedraw()})))))}}}}),require_set_blocking=__commonJS2({"../../node_modules/set-blocking/index.js"(exports2,module22){"use strict";module22.exports=function(blocking){[process.stdout,process.stderr].forEach(function(stream){stream._handle&&stream.isTTY&&typeof stream._handle.setBlocking=="function"&&stream._handle.setBlocking(blocking)})}}}),require_log=__commonJS2({"../../node_modules/npmlog/log.js"(exports2,module22){"use strict";var Progress=require_lib(),Gauge=require_gauge(),EE=require("events").EventEmitter,log=exports2=module22.exports=new EE,util=require("util"),setBlocking=require_set_blocking(),consoleControl=require_console_control_strings();setBlocking(!0);var stream=process.stderr;Object.defineProperty(log,"stream",{set:function(newStream){stream=newStream,this.gauge&&this.gauge.setWriteTo(stream,stream)},get:function(){return stream}});var colorEnabled;log.useColor=function(){return colorEnabled??stream.isTTY},log.enableColor=function(){colorEnabled=!0,this.gauge.setTheme({hasColor:colorEnabled,hasUnicode:unicodeEnabled})},log.disableColor=function(){colorEnabled=!1,this.gauge.setTheme({hasColor:colorEnabled,hasUnicode:unicodeEnabled})},log.level="info",log.gauge=new Gauge(stream,{enabled:!1,theme:{hasColor:log.useColor()},template:[{type:"progressbar",length:20},{type:"activityIndicator",kerning:1,length:1},{type:"section",default:""},":",{type:"logline",kerning:1,default:""}]}),log.tracker=new Progress.TrackerGroup,log.progressEnabled=log.gauge.isEnabled();var unicodeEnabled;log.enableUnicode=function(){unicodeEnabled=!0,this.gauge.setTheme({hasColor:this.useColor(),hasUnicode:unicodeEnabled})},log.disableUnicode=function(){unicodeEnabled=!1,this.gauge.setTheme({hasColor:this.useColor(),hasUnicode:unicodeEnabled})},log.setGaugeThemeset=function(themes){this.gauge.setThemeset(themes)},log.setGaugeTemplate=function(template){this.gauge.setTemplate(template)},log.enableProgress=function(){this.progressEnabled||(this.progressEnabled=!0,this.tracker.on("change",this.showProgress),!this._paused&&this.gauge.enable())},log.disableProgress=function(){this.progressEnabled&&(this.progressEnabled=!1,this.tracker.removeListener("change",this.showProgress),this.gauge.disable())};var trackerConstructors=["newGroup","newItem","newStream"],mixinLog=function(tracker){return Object.keys(log).forEach(function(P){if(P[0]!=="_"&&!trackerConstructors.filter(function(C){return C===P}).length&&!tracker[P]&&typeof log[P]=="function"){var func=log[P];tracker[P]=function(){return func.apply(log,arguments)}}}),tracker instanceof Progress.TrackerGroup&&trackerConstructors.forEach(function(C){var func=tracker[C];tracker[C]=function(){return mixinLog(func.apply(tracker,arguments))}}),tracker};trackerConstructors.forEach(function(C){log[C]=function(){return mixinLog(this.tracker[C].apply(this.tracker,arguments))}}),log.clearProgress=function(cb){if(!this.progressEnabled)return cb&&process.nextTick(cb);this.gauge.hide(cb)},log.showProgress=function(name,completed){if(this.progressEnabled){var values={};name&&(values.section=name);var last=log.record[log.record.length-1];if(last){values.subsection=last.prefix;var disp=log.disp[last.level]||last.level,logline=this._format(disp,log.style[last.level]);last.prefix&&(logline+=" "+this._format(last.prefix,this.prefixStyle)),logline+=" "+last.message.split(/\r?\n/)[0],values.logline=logline}values.completed=completed||this.tracker.completed(),this.gauge.show(values)}}.bind(log),log.pause=function(){this._paused=!0,this.progressEnabled&&this.gauge.disable()},log.resume=function(){if(this._paused){this._paused=!1;var b=this._buffer;this._buffer=[],b.forEach(function(m){this.emitLog(m)},this),this.progressEnabled&&this.gauge.enable()}},log._buffer=[];var id=0;log.record=[],log.maxRecordSize=1e4,log.log=function(lvl,prefix,message){var l=this.levels[lvl];if(l===void 0)return this.emit("error",new Error(util.format("Undefined log level: %j",lvl)));for(var a=new Array(arguments.length-2),stack=null,i=2;i<arguments.length;i++){var arg=a[i-2]=arguments[i];typeof arg=="object"&&arg instanceof Error&&arg.stack&&Object.defineProperty(arg,"stack",{value:stack=arg.stack+"",enumerable:!0,writable:!0})}stack&&a.unshift(stack+`
|
|
7
|
+
`),message=util.format.apply(util,a);var m={id:id++,level:lvl,prefix:String(prefix||""),message,messageRaw:a};this.emit("log",m),this.emit("log."+lvl,m),m.prefix&&this.emit(m.prefix,m),this.record.push(m);var mrs=this.maxRecordSize,n=this.record.length-mrs;if(n>mrs/10){var newSize=Math.floor(mrs*.9);this.record=this.record.slice(-1*newSize)}this.emitLog(m)}.bind(log),log.emitLog=function(m){if(this._paused){this._buffer.push(m);return}this.progressEnabled&&this.gauge.pulse(m.prefix);var l=this.levels[m.level];if(l!==void 0&&!(l<this.levels[this.level])&&!(l>0&&!isFinite(l))){var disp=log.disp[m.level]!=null?log.disp[m.level]:m.level;this.clearProgress(),m.message.split(/\r?\n/).forEach(function(line){this.heading&&(this.write(this.heading,this.headingStyle),this.write(" ")),this.write(disp,log.style[m.level]);var p=m.prefix||"";p&&this.write(" "),this.write(p,this.prefixStyle),this.write(" "+line+`
|
|
8
|
+
`)},this),this.showProgress()}},log._format=function(msg,style){if(stream){var output="";if(this.useColor()){style=style||{};var settings=[];style.fg&&settings.push(style.fg),style.bg&&settings.push("bg"+style.bg[0].toUpperCase()+style.bg.slice(1)),style.bold&&settings.push("bold"),style.underline&&settings.push("underline"),style.inverse&&settings.push("inverse"),settings.length&&(output+=consoleControl.color(settings)),style.beep&&(output+=consoleControl.beep())}return output+=msg,this.useColor()&&(output+=consoleControl.color("reset")),output}},log.write=function(msg,style){stream&&stream.write(this._format(msg,style))},log.addLevel=function(lvl,n,style,disp){disp==null&&(disp=lvl),this.levels[lvl]=n,this.style[lvl]=style,this[lvl]||(this[lvl]=function(){var a=new Array(arguments.length+1);a[0]=lvl;for(var i=0;i<arguments.length;i++)a[i+1]=arguments[i];return this.log.apply(this,a)}.bind(this)),this.disp[lvl]=disp},log.prefixStyle={fg:"magenta"},log.headingStyle={fg:"white",bg:"black"},log.style={},log.levels={},log.disp={},log.addLevel("silly",-1/0,{inverse:!0},"sill"),log.addLevel("verbose",1e3,{fg:"blue",bg:"black"},"verb"),log.addLevel("info",2e3,{fg:"green"}),log.addLevel("timing",2500,{fg:"green",bg:"black"}),log.addLevel("http",3e3,{fg:"green",bg:"black"}),log.addLevel("notice",3500,{fg:"blue",bg:"black"}),log.addLevel("warn",4e3,{fg:"black",bg:"yellow"},"WARN"),log.addLevel("error",5e3,{fg:"red",bg:"black"},"ERR!"),log.addLevel("silent",1/0),log.on("error",function(){})}}),require_pretty_hrtime=__commonJS2({"../../node_modules/pretty-hrtime/index.js"(exports2,module22){"use strict";var minimalDesc=["h","min","s","ms","\u03BCs","ns"],verboseDesc=["hour","minute","second","millisecond","microsecond","nanosecond"],convert=[3600,60,1,1e6,1e3,1];module22.exports=function(source,opts){var verbose,precise,i,spot,sourceAtStep,valAtStep,decimals,strAtStep,results,totalSeconds;if(verbose=!1,precise=!1,opts&&(verbose=opts.verbose||!1,precise=opts.precise||!1),!Array.isArray(source)||source.length!==2||typeof source[0]!="number"||typeof source[1]!="number")return"";for(source[1]<0&&(totalSeconds=source[0]+source[1]/1e9,source[0]=parseInt(totalSeconds),source[1]=parseFloat((totalSeconds%1).toPrecision(9))*1e9),results="",i=0;i<6&&(spot=i<3?0:1,sourceAtStep=source[spot],i!==3&&i!==0&&(sourceAtStep=sourceAtStep%convert[i-1]),i===2&&(sourceAtStep+=source[1]/1e9),valAtStep=sourceAtStep/convert[i],!(valAtStep>=1&&(verbose&&(valAtStep=Math.floor(valAtStep)),precise?strAtStep=valAtStep.toString():(decimals=valAtStep>=10?0:2,strAtStep=valAtStep.toFixed(decimals)),strAtStep.indexOf(".")>-1&&strAtStep[strAtStep.length-1]==="0"&&(strAtStep=strAtStep.replace(/\.?0+$/,"")),results&&(results+=" "),results+=strAtStep,verbose?(results+=" "+verboseDesc[i],strAtStep!=="1"&&(results+="s")):results+=" "+minimalDesc[i],!verbose)));i++);return results}}}),require_color_name=__commonJS2({"../../node_modules/color-convert/node_modules/color-name/index.js"(exports2,module22){"use strict";module22.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}}),require_conversions=__commonJS2({"../../node_modules/color-convert/conversions.js"(exports2,module22){"use strict";var cssKeywords=require_color_name(),reverseKeywords={};for(let key of Object.keys(cssKeywords))reverseKeywords[cssKeywords[key]]=key;var convert={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};module22.exports=convert;for(let model of Object.keys(convert)){if(!("channels"in convert[model]))throw new Error("missing channels property: "+model);if(!("labels"in convert[model]))throw new Error("missing channel labels property: "+model);if(convert[model].labels.length!==convert[model].channels)throw new Error("channel and label counts mismatch: "+model);let{channels,labels}=convert[model];delete convert[model].channels,delete convert[model].labels,Object.defineProperty(convert[model],"channels",{value:channels}),Object.defineProperty(convert[model],"labels",{value:labels})}convert.rgb.hsl=function(rgb){let r=rgb[0]/255,g=rgb[1]/255,b=rgb[2]/255,min=Math.min(r,g,b),max=Math.max(r,g,b),delta=max-min,h,s;max===min?h=0:r===max?h=(g-b)/delta:g===max?h=2+(b-r)/delta:b===max&&(h=4+(r-g)/delta),h=Math.min(h*60,360),h<0&&(h+=360);let l=(min+max)/2;return max===min?s=0:l<=.5?s=delta/(max+min):s=delta/(2-max-min),[h,s*100,l*100]},convert.rgb.hsv=function(rgb){let rdif,gdif,bdif,h,s,r=rgb[0]/255,g=rgb[1]/255,b=rgb[2]/255,v=Math.max(r,g,b),diff=v-Math.min(r,g,b),diffc=function(c){return(v-c)/6/diff+1/2};return diff===0?(h=0,s=0):(s=diff/v,rdif=diffc(r),gdif=diffc(g),bdif=diffc(b),r===v?h=bdif-gdif:g===v?h=1/3+rdif-bdif:b===v&&(h=2/3+gdif-rdif),h<0?h+=1:h>1&&(h-=1)),[h*360,s*100,v*100]},convert.rgb.hwb=function(rgb){let r=rgb[0],g=rgb[1],b=rgb[2],h=convert.rgb.hsl(rgb)[0],w=1/255*Math.min(r,Math.min(g,b));return b=1-1/255*Math.max(r,Math.max(g,b)),[h,w*100,b*100]},convert.rgb.cmyk=function(rgb){let r=rgb[0]/255,g=rgb[1]/255,b=rgb[2]/255,k=Math.min(1-r,1-g,1-b),c=(1-r-k)/(1-k)||0,m=(1-g-k)/(1-k)||0,y=(1-b-k)/(1-k)||0;return[c*100,m*100,y*100,k*100]};function comparativeDistance(x,y){return(x[0]-y[0])**2+(x[1]-y[1])**2+(x[2]-y[2])**2}convert.rgb.keyword=function(rgb){let reversed=reverseKeywords[rgb];if(reversed)return reversed;let currentClosestDistance=1/0,currentClosestKeyword;for(let keyword of Object.keys(cssKeywords)){let value=cssKeywords[keyword],distance=comparativeDistance(rgb,value);distance<currentClosestDistance&&(currentClosestDistance=distance,currentClosestKeyword=keyword)}return currentClosestKeyword},convert.keyword.rgb=function(keyword){return cssKeywords[keyword]},convert.rgb.xyz=function(rgb){let r=rgb[0]/255,g=rgb[1]/255,b=rgb[2]/255;r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,g=g>.04045?((g+.055)/1.055)**2.4:g/12.92,b=b>.04045?((b+.055)/1.055)**2.4:b/12.92;let x=r*.4124+g*.3576+b*.1805,y=r*.2126+g*.7152+b*.0722,z=r*.0193+g*.1192+b*.9505;return[x*100,y*100,z*100]},convert.rgb.lab=function(rgb){let xyz=convert.rgb.xyz(rgb),x=xyz[0],y=xyz[1],z=xyz[2];x/=95.047,y/=100,z/=108.883,x=x>.008856?x**(1/3):7.787*x+16/116,y=y>.008856?y**(1/3):7.787*y+16/116,z=z>.008856?z**(1/3):7.787*z+16/116;let l=116*y-16,a=500*(x-y),b=200*(y-z);return[l,a,b]},convert.hsl.rgb=function(hsl){let h=hsl[0]/360,s=hsl[1]/100,l=hsl[2]/100,t2,t3,val;if(s===0)return val=l*255,[val,val,val];l<.5?t2=l*(1+s):t2=l+s-l*s;let t1=2*l-t2,rgb=[0,0,0];for(let i=0;i<3;i++)t3=h+1/3*-(i-1),t3<0&&t3++,t3>1&&t3--,6*t3<1?val=t1+(t2-t1)*6*t3:2*t3<1?val=t2:3*t3<2?val=t1+(t2-t1)*(2/3-t3)*6:val=t1,rgb[i]=val*255;return rgb},convert.hsl.hsv=function(hsl){let h=hsl[0],s=hsl[1]/100,l=hsl[2]/100,smin=s,lmin=Math.max(l,.01);l*=2,s*=l<=1?l:2-l,smin*=lmin<=1?lmin:2-lmin;let v=(l+s)/2,sv=l===0?2*smin/(lmin+smin):2*s/(l+s);return[h,sv*100,v*100]},convert.hsv.rgb=function(hsv){let h=hsv[0]/60,s=hsv[1]/100,v=hsv[2]/100,hi=Math.floor(h)%6,f=h-Math.floor(h),p=255*v*(1-s),q=255*v*(1-s*f),t=255*v*(1-s*(1-f));switch(v*=255,hi){case 0:return[v,t,p];case 1:return[q,v,p];case 2:return[p,v,t];case 3:return[p,q,v];case 4:return[t,p,v];case 5:return[v,p,q]}},convert.hsv.hsl=function(hsv){let h=hsv[0],s=hsv[1]/100,v=hsv[2]/100,vmin=Math.max(v,.01),sl,l;l=(2-s)*v;let lmin=(2-s)*vmin;return sl=s*vmin,sl/=lmin<=1?lmin:2-lmin,sl=sl||0,l/=2,[h,sl*100,l*100]},convert.hwb.rgb=function(hwb){let h=hwb[0]/360,wh=hwb[1]/100,bl=hwb[2]/100,ratio=wh+bl,f;ratio>1&&(wh/=ratio,bl/=ratio);let i=Math.floor(6*h),v=1-bl;f=6*h-i,i&1&&(f=1-f);let n=wh+f*(v-wh),r,g,b;switch(i){default:case 6:case 0:r=v,g=n,b=wh;break;case 1:r=n,g=v,b=wh;break;case 2:r=wh,g=v,b=n;break;case 3:r=wh,g=n,b=v;break;case 4:r=n,g=wh,b=v;break;case 5:r=v,g=wh,b=n;break}return[r*255,g*255,b*255]},convert.cmyk.rgb=function(cmyk){let c=cmyk[0]/100,m=cmyk[1]/100,y=cmyk[2]/100,k=cmyk[3]/100,r=1-Math.min(1,c*(1-k)+k),g=1-Math.min(1,m*(1-k)+k),b=1-Math.min(1,y*(1-k)+k);return[r*255,g*255,b*255]},convert.xyz.rgb=function(xyz){let x=xyz[0]/100,y=xyz[1]/100,z=xyz[2]/100,r,g,b;return r=x*3.2406+y*-1.5372+z*-.4986,g=x*-.9689+y*1.8758+z*.0415,b=x*.0557+y*-.204+z*1.057,r=r>.0031308?1.055*r**(1/2.4)-.055:r*12.92,g=g>.0031308?1.055*g**(1/2.4)-.055:g*12.92,b=b>.0031308?1.055*b**(1/2.4)-.055:b*12.92,r=Math.min(Math.max(0,r),1),g=Math.min(Math.max(0,g),1),b=Math.min(Math.max(0,b),1),[r*255,g*255,b*255]},convert.xyz.lab=function(xyz){let x=xyz[0],y=xyz[1],z=xyz[2];x/=95.047,y/=100,z/=108.883,x=x>.008856?x**(1/3):7.787*x+16/116,y=y>.008856?y**(1/3):7.787*y+16/116,z=z>.008856?z**(1/3):7.787*z+16/116;let l=116*y-16,a=500*(x-y),b=200*(y-z);return[l,a,b]},convert.lab.xyz=function(lab){let l=lab[0],a=lab[1],b=lab[2],x,y,z;y=(l+16)/116,x=a/500+y,z=y-b/200;let y2=y**3,x2=x**3,z2=z**3;return y=y2>.008856?y2:(y-16/116)/7.787,x=x2>.008856?x2:(x-16/116)/7.787,z=z2>.008856?z2:(z-16/116)/7.787,x*=95.047,y*=100,z*=108.883,[x,y,z]},convert.lab.lch=function(lab){let l=lab[0],a=lab[1],b=lab[2],h;h=Math.atan2(b,a)*360/2/Math.PI,h<0&&(h+=360);let c=Math.sqrt(a*a+b*b);return[l,c,h]},convert.lch.lab=function(lch){let l=lch[0],c=lch[1],hr=lch[2]/360*2*Math.PI,a=c*Math.cos(hr),b=c*Math.sin(hr);return[l,a,b]},convert.rgb.ansi16=function(args,saturation=null){let[r,g,b]=args,value=saturation===null?convert.rgb.hsv(args)[2]:saturation;if(value=Math.round(value/50),value===0)return 30;let ansi=30+(Math.round(b/255)<<2|Math.round(g/255)<<1|Math.round(r/255));return value===2&&(ansi+=60),ansi},convert.hsv.ansi16=function(args){return convert.rgb.ansi16(convert.hsv.rgb(args),args[2])},convert.rgb.ansi256=function(args){let r=args[0],g=args[1],b=args[2];return r===g&&g===b?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(g/255*5)+Math.round(b/255*5)},convert.ansi16.rgb=function(args){let color=args%10;if(color===0||color===7)return args>50&&(color+=3.5),color=color/10.5*255,[color,color,color];let mult=(~~(args>50)+1)*.5,r=(color&1)*mult*255,g=(color>>1&1)*mult*255,b=(color>>2&1)*mult*255;return[r,g,b]},convert.ansi256.rgb=function(args){if(args>=232){let c=(args-232)*10+8;return[c,c,c]}args-=16;let rem,r=Math.floor(args/36)/5*255,g=Math.floor((rem=args%36)/6)/5*255,b=rem%6/5*255;return[r,g,b]},convert.rgb.hex=function(args){let string=(((Math.round(args[0])&255)<<16)+((Math.round(args[1])&255)<<8)+(Math.round(args[2])&255)).toString(16).toUpperCase();return"000000".substring(string.length)+string},convert.hex.rgb=function(args){let match=args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!match)return[0,0,0];let colorString=match[0];match[0].length===3&&(colorString=colorString.split("").map(char=>char+char).join(""));let integer=parseInt(colorString,16),r=integer>>16&255,g=integer>>8&255,b=integer&255;return[r,g,b]},convert.rgb.hcg=function(rgb){let r=rgb[0]/255,g=rgb[1]/255,b=rgb[2]/255,max=Math.max(Math.max(r,g),b),min=Math.min(Math.min(r,g),b),chroma=max-min,grayscale,hue;return chroma<1?grayscale=min/(1-chroma):grayscale=0,chroma<=0?hue=0:max===r?hue=(g-b)/chroma%6:max===g?hue=2+(b-r)/chroma:hue=4+(r-g)/chroma,hue/=6,hue%=1,[hue*360,chroma*100,grayscale*100]},convert.hsl.hcg=function(hsl){let s=hsl[1]/100,l=hsl[2]/100,c=l<.5?2*s*l:2*s*(1-l),f=0;return c<1&&(f=(l-.5*c)/(1-c)),[hsl[0],c*100,f*100]},convert.hsv.hcg=function(hsv){let s=hsv[1]/100,v=hsv[2]/100,c=s*v,f=0;return c<1&&(f=(v-c)/(1-c)),[hsv[0],c*100,f*100]},convert.hcg.rgb=function(hcg){let h=hcg[0]/360,c=hcg[1]/100,g=hcg[2]/100;if(c===0)return[g*255,g*255,g*255];let pure=[0,0,0],hi=h%1*6,v=hi%1,w=1-v,mg=0;switch(Math.floor(hi)){case 0:pure[0]=1,pure[1]=v,pure[2]=0;break;case 1:pure[0]=w,pure[1]=1,pure[2]=0;break;case 2:pure[0]=0,pure[1]=1,pure[2]=v;break;case 3:pure[0]=0,pure[1]=w,pure[2]=1;break;case 4:pure[0]=v,pure[1]=0,pure[2]=1;break;default:pure[0]=1,pure[1]=0,pure[2]=w}return mg=(1-c)*g,[(c*pure[0]+mg)*255,(c*pure[1]+mg)*255,(c*pure[2]+mg)*255]},convert.hcg.hsv=function(hcg){let c=hcg[1]/100,g=hcg[2]/100,v=c+g*(1-c),f=0;return v>0&&(f=c/v),[hcg[0],f*100,v*100]},convert.hcg.hsl=function(hcg){let c=hcg[1]/100,l=hcg[2]/100*(1-c)+.5*c,s=0;return l>0&&l<.5?s=c/(2*l):l>=.5&&l<1&&(s=c/(2*(1-l))),[hcg[0],s*100,l*100]},convert.hcg.hwb=function(hcg){let c=hcg[1]/100,g=hcg[2]/100,v=c+g*(1-c);return[hcg[0],(v-c)*100,(1-v)*100]},convert.hwb.hcg=function(hwb){let w=hwb[1]/100,v=1-hwb[2]/100,c=v-w,g=0;return c<1&&(g=(v-c)/(1-c)),[hwb[0],c*100,g*100]},convert.apple.rgb=function(apple){return[apple[0]/65535*255,apple[1]/65535*255,apple[2]/65535*255]},convert.rgb.apple=function(rgb){return[rgb[0]/255*65535,rgb[1]/255*65535,rgb[2]/255*65535]},convert.gray.rgb=function(args){return[args[0]/100*255,args[0]/100*255,args[0]/100*255]},convert.gray.hsl=function(args){return[0,0,args[0]]},convert.gray.hsv=convert.gray.hsl,convert.gray.hwb=function(gray){return[0,100,gray[0]]},convert.gray.cmyk=function(gray){return[0,0,0,gray[0]]},convert.gray.lab=function(gray){return[gray[0],0,0]},convert.gray.hex=function(gray){let val=Math.round(gray[0]/100*255)&255,string=((val<<16)+(val<<8)+val).toString(16).toUpperCase();return"000000".substring(string.length)+string},convert.rgb.gray=function(rgb){return[(rgb[0]+rgb[1]+rgb[2])/3/255*100]}}}),require_route=__commonJS2({"../../node_modules/color-convert/route.js"(exports2,module22){"use strict";var conversions=require_conversions();function buildGraph(){let graph={},models=Object.keys(conversions);for(let len=models.length,i=0;i<len;i++)graph[models[i]]={distance:-1,parent:null};return graph}function deriveBFS(fromModel){let graph=buildGraph(),queue=[fromModel];for(graph[fromModel].distance=0;queue.length;){let current=queue.pop(),adjacents=Object.keys(conversions[current]);for(let len=adjacents.length,i=0;i<len;i++){let adjacent=adjacents[i],node=graph[adjacent];node.distance===-1&&(node.distance=graph[current].distance+1,node.parent=current,queue.unshift(adjacent))}}return graph}function link(from,to){return function(args){return to(from(args))}}function wrapConversion(toModel,graph){let path=[graph[toModel].parent,toModel],fn=conversions[graph[toModel].parent][toModel],cur=graph[toModel].parent;for(;graph[cur].parent;)path.unshift(graph[cur].parent),fn=link(conversions[graph[cur].parent][cur],fn),cur=graph[cur].parent;return fn.conversion=path,fn}module22.exports=function(fromModel){let graph=deriveBFS(fromModel),conversion={},models=Object.keys(graph);for(let len=models.length,i=0;i<len;i++){let toModel=models[i];graph[toModel].parent!==null&&(conversion[toModel]=wrapConversion(toModel,graph))}return conversion}}}),require_color_convert=__commonJS2({"../../node_modules/color-convert/index.js"(exports2,module22){"use strict";var conversions=require_conversions(),route=require_route(),convert={},models=Object.keys(conversions);function wrapRaw(fn){let wrappedFn=function(...args){let arg0=args[0];return arg0==null?arg0:(arg0.length>1&&(args=arg0),fn(args))};return"conversion"in fn&&(wrappedFn.conversion=fn.conversion),wrappedFn}function wrapRounded(fn){let wrappedFn=function(...args){let arg0=args[0];if(arg0==null)return arg0;arg0.length>1&&(args=arg0);let result=fn(args);if(typeof result=="object")for(let len=result.length,i=0;i<len;i++)result[i]=Math.round(result[i]);return result};return"conversion"in fn&&(wrappedFn.conversion=fn.conversion),wrappedFn}models.forEach(fromModel=>{convert[fromModel]={},Object.defineProperty(convert[fromModel],"channels",{value:conversions[fromModel].channels}),Object.defineProperty(convert[fromModel],"labels",{value:conversions[fromModel].labels});let routes=route(fromModel);Object.keys(routes).forEach(toModel=>{let fn=routes[toModel];convert[fromModel][toModel]=wrapRounded(fn),convert[fromModel][toModel].raw=wrapRaw(fn)})}),module22.exports=convert}}),require_ansi_styles=__commonJS2({"../../node_modules/ansi-styles/index.js"(exports2,module22){"use strict";var wrapAnsi16=(fn,offset)=>(...args)=>`\x1B[${fn(...args)+offset}m`,wrapAnsi256=(fn,offset)=>(...args)=>{let code=fn(...args);return`\x1B[${38+offset};5;${code}m`},wrapAnsi16m=(fn,offset)=>(...args)=>{let rgb=fn(...args);return`\x1B[${38+offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`},ansi2ansi=n=>n,rgb2rgb=(r,g,b)=>[r,g,b],setLazyProperty=(object,property,get)=>{Object.defineProperty(object,property,{get:()=>{let value=get();return Object.defineProperty(object,property,{value,enumerable:!0,configurable:!0}),value},enumerable:!0,configurable:!0})},colorConvert,makeDynamicStyles=(wrap,targetSpace,identity,isBackground)=>{colorConvert===void 0&&(colorConvert=require_color_convert());let offset=isBackground?10:0,styles={};for(let[sourceSpace,suite]of Object.entries(colorConvert)){let name=sourceSpace==="ansi16"?"ansi":sourceSpace;sourceSpace===targetSpace?styles[name]=wrap(identity,offset):typeof suite=="object"&&(styles[name]=wrap(suite[targetSpace],offset))}return styles};function assembleStyles(){let codes=new Map,styles={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};styles.color.gray=styles.color.blackBright,styles.bgColor.bgGray=styles.bgColor.bgBlackBright,styles.color.grey=styles.color.blackBright,styles.bgColor.bgGrey=styles.bgColor.bgBlackBright;for(let[groupName,group]of Object.entries(styles)){for(let[styleName,style]of Object.entries(group))styles[styleName]={open:`\x1B[${style[0]}m`,close:`\x1B[${style[1]}m`},group[styleName]=styles[styleName],codes.set(style[0],style[1]);Object.defineProperty(styles,groupName,{value:group,enumerable:!1})}return Object.defineProperty(styles,"codes",{value:codes,enumerable:!1}),styles.color.close="\x1B[39m",styles.bgColor.close="\x1B[49m",setLazyProperty(styles.color,"ansi",()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,!1)),setLazyProperty(styles.color,"ansi256",()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,!1)),setLazyProperty(styles.color,"ansi16m",()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,!1)),setLazyProperty(styles.bgColor,"ansi",()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,!0)),setLazyProperty(styles.bgColor,"ansi256",()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,!0)),setLazyProperty(styles.bgColor,"ansi16m",()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,!0)),styles}Object.defineProperty(module22,"exports",{enumerable:!0,get:assembleStyles})}}),require_has_flag=__commonJS2({"../../node_modules/supports-color/node_modules/has-flag/index.js"(exports2,module22){"use strict";module22.exports=(flag,argv=process.argv)=>{let prefix=flag.startsWith("-")?"":flag.length===1?"-":"--",position=argv.indexOf(prefix+flag),terminatorPosition=argv.indexOf("--");return position!==-1&&(terminatorPosition===-1||position<terminatorPosition)}}}),require_supports_color=__commonJS2({"../../node_modules/supports-color/index.js"(exports2,module22){"use strict";var os=require("os"),tty=require("tty"),hasFlag=require_has_flag(),{env}=process,forceColor;hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")||hasFlag("color=never")?forceColor=0:(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always"))&&(forceColor=1),"FORCE_COLOR"in env&&(env.FORCE_COLOR==="true"?forceColor=1:env.FORCE_COLOR==="false"?forceColor=0:forceColor=env.FORCE_COLOR.length===0?1:Math.min(parseInt(env.FORCE_COLOR,10),3));function translateLevel(level){return level===0?!1:{level,hasBasic:!0,has256:level>=2,has16m:level>=3}}function supportsColor(haveStream,streamIsTTY){if(forceColor===0)return 0;if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor"))return 3;if(hasFlag("color=256"))return 2;if(haveStream&&!streamIsTTY&&forceColor===void 0)return 0;let min=forceColor||0;if(env.TERM==="dumb")return min;if(process.platform==="win32"){let osRelease=os.release().split(".");return Number(osRelease[0])>=10&&Number(osRelease[2])>=10586?Number(osRelease[2])>=14931?3:2:1}if("CI"in env)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(sign=>sign in env)||env.CI_NAME==="codeship"?1:min;if("TEAMCITY_VERSION"in env)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION)?1:0;if(env.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in env){let version=parseInt((env.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(env.TERM_PROGRAM){case"iTerm.app":return version>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(env.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)||"COLORTERM"in env?1:min}function getSupportLevel(stream){let level=supportsColor(stream,stream&&stream.isTTY);return translateLevel(level)}module22.exports={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(!0,tty.isatty(1))),stderr:translateLevel(supportsColor(!0,tty.isatty(2)))}}}),require_util=__commonJS2({"../../node_modules/chalk/source/util.js"(exports2,module22){"use strict";var stringReplaceAll=(string,substring,replacer)=>{let index=string.indexOf(substring);if(index===-1)return string;let substringLength=substring.length,endIndex=0,returnValue="";do returnValue+=string.substr(endIndex,index-endIndex)+substring+replacer,endIndex=index+substringLength,index=string.indexOf(substring,endIndex);while(index!==-1);return returnValue+=string.substr(endIndex),returnValue},stringEncaseCRLFWithFirstIndex=(string,prefix,postfix,index)=>{let endIndex=0,returnValue="";do{let gotCR=string[index-1]==="\r";returnValue+=string.substr(endIndex,(gotCR?index-1:index)-endIndex)+prefix+(gotCR?`\r
|
|
9
|
+
`:`
|
|
10
|
+
`)+postfix,endIndex=index+1,index=string.indexOf(`
|
|
11
|
+
`,endIndex)}while(index!==-1);return returnValue+=string.substr(endIndex),returnValue};module22.exports={stringReplaceAll,stringEncaseCRLFWithFirstIndex}}}),require_templates=__commonJS2({"../../node_modules/chalk/source/templates.js"(exports2,module22){"use strict";var TEMPLATE_REGEX=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,STYLE_REGEX=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,STRING_REGEX=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,ESCAPE_REGEX=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,ESCAPES=new Map([["n",`
|
|
12
|
+
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function unescape(c){let u=c[0]==="u",bracket=c[1]==="{";return u&&!bracket&&c.length===5||c[0]==="x"&&c.length===3?String.fromCharCode(parseInt(c.slice(1),16)):u&&bracket?String.fromCodePoint(parseInt(c.slice(2,-1),16)):ESCAPES.get(c)||c}function parseArguments(name,arguments_){let results=[],chunks=arguments_.trim().split(/\s*,\s*/g),matches;for(let chunk of chunks){let number=Number(chunk);if(!Number.isNaN(number))results.push(number);else if(matches=chunk.match(STRING_REGEX))results.push(matches[2].replace(ESCAPE_REGEX,(m,escape,character)=>escape?unescape(escape):character));else throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`)}return results}function parseStyle(style){STYLE_REGEX.lastIndex=0;let results=[],matches;for(;(matches=STYLE_REGEX.exec(style))!==null;){let name=matches[1];if(matches[2]){let args=parseArguments(name,matches[2]);results.push([name].concat(args))}else results.push([name])}return results}function buildStyle(chalk2,styles){let enabled={};for(let layer of styles)for(let style of layer.styles)enabled[style[0]]=layer.inverse?null:style.slice(1);let current=chalk2;for(let[styleName,styles2]of Object.entries(enabled))if(Array.isArray(styles2)){if(!(styleName in current))throw new Error(`Unknown Chalk style: ${styleName}`);current=styles2.length>0?current[styleName](...styles2):current[styleName]}return current}module22.exports=(chalk2,temporary)=>{let styles=[],chunks=[],chunk=[];if(temporary.replace(TEMPLATE_REGEX,(m,escapeCharacter,inverse,style,close,character)=>{if(escapeCharacter)chunk.push(unescape(escapeCharacter));else if(style){let string=chunk.join("");chunk=[],chunks.push(styles.length===0?string:buildStyle(chalk2,styles)(string)),styles.push({inverse,styles:parseStyle(style)})}else if(close){if(styles.length===0)throw new Error("Found extraneous } in Chalk template literal");chunks.push(buildStyle(chalk2,styles)(chunk.join(""))),chunk=[],styles.pop()}else chunk.push(character)}),chunks.push(chunk.join("")),styles.length>0){let errMessage=`Chalk template literal is missing ${styles.length} closing bracket${styles.length===1?"":"s"} (\`}\`)`;throw new Error(errMessage)}return chunks.join("")}}}),require_source=__commonJS2({"../../node_modules/chalk/source/index.js"(exports2,module22){"use strict";var ansiStyles=require_ansi_styles(),{stdout:stdoutColor,stderr:stderrColor}=require_supports_color(),{stringReplaceAll,stringEncaseCRLFWithFirstIndex}=require_util(),{isArray}=Array,levelMapping=["ansi","ansi","ansi256","ansi16m"],styles=Object.create(null),applyOptions=(object,options={})=>{if(options.level&&!(Number.isInteger(options.level)&&options.level>=0&&options.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let colorLevel=stdoutColor?stdoutColor.level:0;object.level=options.level===void 0?colorLevel:options.level},ChalkClass=class{constructor(options){return chalkFactory(options)}},chalkFactory=options=>{let chalk3={};return applyOptions(chalk3,options),chalk3.template=(...arguments_)=>chalkTag(chalk3.template,...arguments_),Object.setPrototypeOf(chalk3,Chalk.prototype),Object.setPrototypeOf(chalk3.template,chalk3),chalk3.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},chalk3.template.Instance=ChalkClass,chalk3.template};function Chalk(options){return chalkFactory(options)}for(let[styleName,style]of Object.entries(ansiStyles))styles[styleName]={get(){let builder=createBuilder(this,createStyler(style.open,style.close,this._styler),this._isEmpty);return Object.defineProperty(this,styleName,{value:builder}),builder}};styles.visible={get(){let builder=createBuilder(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:builder}),builder}};var usedModels=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let model of usedModels)styles[model]={get(){let{level}=this;return function(...arguments_){let styler=createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_),ansiStyles.color.close,this._styler);return createBuilder(this,styler,this._isEmpty)}}};for(let model of usedModels){let bgModel="bg"+model[0].toUpperCase()+model.slice(1);styles[bgModel]={get(){let{level}=this;return function(...arguments_){let styler=createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_),ansiStyles.bgColor.close,this._styler);return createBuilder(this,styler,this._isEmpty)}}}}var proto=Object.defineProperties(()=>{},{...styles,level:{enumerable:!0,get(){return this._generator.level},set(level){this._generator.level=level}}}),createStyler=(open,close,parent)=>{let openAll,closeAll;return parent===void 0?(openAll=open,closeAll=close):(openAll=parent.openAll+open,closeAll=close+parent.closeAll),{open,close,openAll,closeAll,parent}},createBuilder=(self2,_styler,_isEmpty)=>{let builder=(...arguments_)=>isArray(arguments_[0])&&isArray(arguments_[0].raw)?applyStyle(builder,chalkTag(builder,...arguments_)):applyStyle(builder,arguments_.length===1?""+arguments_[0]:arguments_.join(" "));return Object.setPrototypeOf(builder,proto),builder._generator=self2,builder._styler=_styler,builder._isEmpty=_isEmpty,builder},applyStyle=(self2,string)=>{if(self2.level<=0||!string)return self2._isEmpty?"":string;let styler=self2._styler;if(styler===void 0)return string;let{openAll,closeAll}=styler;if(string.indexOf("\x1B")!==-1)for(;styler!==void 0;)string=stringReplaceAll(string,styler.close,styler.open),styler=styler.parent;let lfIndex=string.indexOf(`
|
|
13
|
+
`);return lfIndex!==-1&&(string=stringEncaseCRLFWithFirstIndex(string,closeAll,openAll,lfIndex)),openAll+string+closeAll},template,chalkTag=(chalk3,...strings)=>{let[firstString]=strings;if(!isArray(firstString)||!isArray(firstString.raw))return strings.join(" ");let arguments_=strings.slice(1),parts=[firstString.raw[0]];for(let i=1;i<firstString.length;i++)parts.push(String(arguments_[i-1]).replace(/[{}\\]/g,"\\$&"),String(firstString.raw[i]));return template===void 0&&(template=require_templates()),template(chalk3,parts.join(""))};Object.defineProperties(Chalk.prototype,styles);var chalk2=Chalk();chalk2.supportsColor=stdoutColor,chalk2.stderr=Chalk({level:stderrColor?stderrColor.level:0}),chalk2.stderr.supportsColor=stderrColor,module22.exports=chalk2}}),src_exports2={};__export2(src_exports2,{colors:()=>colors,deprecate:()=>deprecate,instance:()=>import_npmlog.default,logger:()=>logger3,once:()=>once});module2.exports=__toCommonJS2(src_exports2);var import_npmlog=__toESM2(require_log()),import_pretty_hrtime=__toESM2(require_pretty_hrtime()),import_chalk=__toESM2(require_source());import_npmlog.default.stream=process.stdout;var colors={pink:import_chalk.default.hex("F1618C"),purple:import_chalk.default.hex("B57EE5"),orange:import_chalk.default.hex("F3AD38"),green:import_chalk.default.hex("A2E05E"),blue:import_chalk.default.hex("6DABF5"),red:import_chalk.default.hex("F16161"),gray:import_chalk.default.gray},logger3={verbose:message=>import_npmlog.default.verbose("",message),info:message=>import_npmlog.default.info("",message),plain:message=>console.log(message),line:(count=1)=>console.log(`${Array(count-1).fill(`
|
|
14
|
+
`)}`),warn:message=>import_npmlog.default.warn("",message),error:message=>import_npmlog.default.error("",message),trace:({message,time})=>import_npmlog.default.info("",`${message} (${colors.purple((0,import_pretty_hrtime.default)(time))})`),setLevel:(level="info")=>{import_npmlog.default.level=level}},logged=new Set,once=type=>message=>{if(!logged.has(message))return logged.add(message),logger3[type](message)};once.clear=()=>logged.clear();once.verbose=once("verbose");once.info=once("info");once.warn=once("warn");once.error=once("error");var deprecate=once("warn")}});var src_exports={};__export(src_exports,{babelDefault:()=>exportedBabelDefault,core:()=>exportedCore,webpack:()=>exportedWebpack});module.exports=__toCommonJS(src_exports);var import_path4=require("path"),import_semver2=__toESM(require("semver")),import_node_logger2=__toESM(require_dist()),import_pnp_webpack_plugin=__toESM(require("pnp-webpack-plugin")),import_react_docgen_typescript_plugin=__toESM(require("@storybook/react-docgen-typescript-plugin"));var import_react_refresh_webpack_plugin=__toESM(require("@pmmmwh/react-refresh-webpack-plugin")),mergePlugins=(...args)=>args.reduce((plugins,plugin)=>{if(plugins.some(includedPlugin=>includedPlugin.constructor.name===plugin.constructor.name)||plugin.constructor.name==="WebpackManifestPlugin")return plugins;let updatedPlugin=plugin;return plugin.constructor.name==="ReactRefreshPlugin"&&(updatedPlugin=new import_react_refresh_webpack_plugin.default({overlay:{sockIntegration:"whm"}})),[...plugins,updatedPlugin]},[]);var import_fs=require("fs"),import_path=require("path"),getReactScriptsPath=()=>{let cwd=process.cwd(),scriptsBinPath=(0,import_path.join)(cwd,"/node_modules/.bin/react-scripts");if(process.platform==="win32")try{let packagePathMatch=(0,import_fs.readFileSync)(scriptsBinPath,"utf8").match(/"\$basedir[\\/](\S+?)[\\/]bin[\\/]react-scripts\.js"/i);if(packagePathMatch&&packagePathMatch.length>1)return(0,import_path.join)(cwd,"/node_modules/.bin/",packagePathMatch[1])}catch{}else try{let scriptsBinPathStat=(0,import_fs.lstatSync)(scriptsBinPath);if(scriptsBinPathStat.isSymbolicLink()===!0){let resolvedBinPath=(0,import_fs.realpathSync)(scriptsBinPath);return(0,import_path.join)(resolvedBinPath,"..","..")}if(scriptsBinPathStat.isFile()===!0)return(0,import_path.join)(cwd,"/node_modules/react-scripts")}catch{}try{return(0,import_path.dirname)(require.resolve("react-scripts/package.json"))}catch{}return""};var import_path2=require("path"),import_semver=__toESM(require("semver")),isRegExp=value=>value instanceof RegExp,isString=value=>typeof value=="string",testMatch=(rule,string)=>rule.test?Array.isArray(rule.test)?rule.test.some(test=>isRegExp(test)&&test.test(string)):isRegExp(rule.test)&&rule.test.test(string):!1,processCraConfig=(craWebpackConfig,options)=>{let configDir=(0,import_path2.resolve)(options.configDir),storybookVersion=import_semver.default.coerce(options.packageJson.version)||"",isStorybook530=import_semver.default.gte(storybookVersion,"5.3.0");return craWebpackConfig.module.rules.reduce((rules,rule)=>{let{oneOf,include}=rule;if(testMatch(rule,".jsx")){let newRule={...rule,include:[include,configDir].filter(Boolean)};return[...rules,newRule]}return oneOf?[...rules,{oneOf:oneOf.map(oneOfRule=>{var _a;if(oneOfRule.type==="asset/resource"){if(isStorybook530){let excludes=["ejs","md","mdx","cjs",...((_a=options.craOverrides)==null?void 0:_a.fileLoaderExcludes)||[]],excludeRegex=new RegExp(`\\.(${excludes.join("|")})$`);return{...oneOfRule,exclude:[...oneOfRule.exclude,excludeRegex]}}return{}}if(testMatch(oneOfRule,".css"))return{...oneOfRule,include:isStorybook530?void 0:[configDir],exclude:[oneOfRule.exclude,/@storybook/]};let isBabelLoader=isString(oneOfRule.loader)&&/[/\\]babel-loader[/\\]/.test(oneOfRule.loader);if(isBabelLoader&&isRegExp(oneOfRule.test)&&oneOfRule.test.test(".jsx")){let{include:_include,options:ruleOptions}=oneOfRule,{plugins:rulePlugins,presets:rulePresets,overrides:ruleOverrides}=typeof ruleOptions=="object"?ruleOptions:{},{extends:_extends,plugins,presets,overrides}=options.babelOptions;return{...oneOfRule,include:[_include,configDir].filter(Boolean),options:{...ruleOptions,extends:_extends,plugins:[...plugins??[],...rulePlugins??[]],presets:[...presets??[],...rulePresets??[]],overrides:[...overrides??[],...ruleOverrides??[]]}}}return isBabelLoader&&isRegExp(oneOfRule.test)&&oneOfRule.test.test(".js")?{...oneOfRule,include:[configDir]}:oneOfRule})}]:[...rules,rule]},[])};var import_node_logger=__toESM(require_dist()),incompatiblePresets=["@storybook/preset-scss","@storybook/preset-typescript"],checkPresets=options=>{let{presetsList}=options;presetsList.forEach(preset=>{let presetName=typeof preset=="string"?preset:preset.name;incompatiblePresets.includes(presetName)&&import_node_logger.logger.warn(`\`${presetName}\` may not be compatible with \`@storybook/preset-create-react-app\``)})};var import_fs2=require("fs"),import_path3=require("path"),JSCONFIG="jsconfig.json",TSCONFIG="tsconfig.json",getModulePath=appDirectory=>{let configName="";(0,import_fs2.existsSync)((0,import_path3.join)(appDirectory,TSCONFIG))?configName=TSCONFIG:(0,import_fs2.existsSync)((0,import_path3.join)(appDirectory,JSCONFIG))&&(configName=JSCONFIG);try{let{baseUrl}=require((0,import_path3.join)(appDirectory,configName)).compilerOptions;return baseUrl?[baseUrl]:[]}catch{return[]}};var CWD=process.cwd(),REACT_SCRIPTS_PATH=getReactScriptsPath(),OPTION_SCRIPTS_PACKAGE="scriptsPackageName";process.env.PUBLIC_URL||(process.env.PUBLIC_URL=".");var resolveLoader={modules:["node_modules",(0,import_path4.join)(REACT_SCRIPTS_PATH,"node_modules")],plugins:[import_pnp_webpack_plugin.default.moduleLoader(module)]},core=existing=>({...existing,disableWebpackDefaults:!0}),babelDefault=()=>({presets:[],plugins:[]}),webpack=async(webpackConfig={},options)=>{var _a,_b;let scriptsPath=REACT_SCRIPTS_PATH;checkPresets(options);let scriptsPackageName=options[OPTION_SCRIPTS_PACKAGE];if(typeof scriptsPackageName=="string")try{scriptsPath=(0,import_path4.dirname)(require.resolve(`${scriptsPackageName}/package.json`,{paths:[options.configDir]}))}catch{import_node_logger2.logger.warn(`A \`${OPTION_SCRIPTS_PACKAGE}\` was provided, but couldn't be resolved.`)}if(!scriptsPath)return import_node_logger2.logger.error("Failed to resolve a `react-scripts` package."),webpackConfig;import_node_logger2.logger.info(`=> Loading Webpack configuration from \`${(0,import_path4.relative)(CWD,scriptsPath)}\``),import_node_logger2.logger.info("=> Removing existing JavaScript and TypeScript rules.");let filteredRules=webpackConfig.module&&webpackConfig.module.rules.filter(({test})=>!(test instanceof RegExp&&(test&&test.test(".js")||test.test(".ts")))),craWebpackConfigPath=(0,import_path4.join)(scriptsPath,"config","webpack.config"),craWebpackConfig=require(craWebpackConfigPath)(webpackConfig.mode);import_node_logger2.logger.info("=> Modifying Create React App rules.");let craRules=processCraConfig(craWebpackConfig,options),isStorybook6=import_semver2.default.gte(options.packageJson.version||"","6.0.0"),{typescriptOptions={reactDocgen:"react-docgen-typescript",reactDocgenTypescriptOptions:{}}}=options,tsDocgenPlugin=!isStorybook6&&typescriptOptions.reactDocgen==="react-docgen-typescript"?[new import_react_docgen_typescript_plugin.default(typescriptOptions.reactDocgenTypescriptOptions)]:[],isProd=webpackConfig.mode!=="development",coreOptions=await options.presets.apply("core"),builderOptions=(_a=coreOptions==null?void 0:coreOptions.builder)==null?void 0:_a.options,cacheConfig=builderOptions!=null&&builderOptions.fsCache?{cache:{type:"filesystem"}}:{},lazyCompilationConfig=builderOptions!=null&&builderOptions.lazyCompilation&&!isProd?{experiments:{lazyCompilation:{entries:!1}}}:{};return{...webpackConfig,...cacheConfig,...lazyCompilationConfig,module:{...webpackConfig.module,rules:[...filteredRules||[],...craRules]},plugins:mergePlugins(...webpackConfig.plugins||[],...craWebpackConfig.plugins??[],...tsDocgenPlugin),resolve:{...webpackConfig.resolve,extensions:(_b=craWebpackConfig.resolve)==null?void 0:_b.extensions,modules:[...webpackConfig.resolve&&webpackConfig.resolve.modules||[],(0,import_path4.join)(REACT_SCRIPTS_PATH,"node_modules"),...getModulePath(CWD)],plugins:[import_pnp_webpack_plugin.default]},resolveLoader}},exportedCore=core,exportedWebpack=webpack,exportedBabelDefault=babelDefault;0&&(module.exports={babelDefault,core,webpack});
|
package/package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@storybook/preset-create-react-app",
|
|
3
|
+
"version": "0.0.0-pr-23609-sha-f47ef339",
|
|
4
|
+
"description": "Storybook for Create React App preset",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"storybook"
|
|
7
|
+
],
|
|
8
|
+
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/presets/create-react-app",
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/storybookjs/storybook/issues"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/storybookjs/storybook.git",
|
|
15
|
+
"directory": "code/presets/create-react-app"
|
|
16
|
+
},
|
|
17
|
+
"funding": {
|
|
18
|
+
"type": "opencollective",
|
|
19
|
+
"url": "https://opencollective.com/storybook"
|
|
20
|
+
},
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"node": "./dist/index.js",
|
|
26
|
+
"require": "./dist/index.js",
|
|
27
|
+
"import": "./dist/index.mjs"
|
|
28
|
+
},
|
|
29
|
+
"./preset": {
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"node": "./dist/index.js",
|
|
32
|
+
"require": "./dist/index.js",
|
|
33
|
+
"import": "./dist/index.mjs"
|
|
34
|
+
},
|
|
35
|
+
"./package.json": "./package.json"
|
|
36
|
+
},
|
|
37
|
+
"main": "dist/index.js",
|
|
38
|
+
"module": "dist/index.mjs",
|
|
39
|
+
"types": "dist/index.d.ts",
|
|
40
|
+
"files": [
|
|
41
|
+
"dist/**/*",
|
|
42
|
+
"README.md",
|
|
43
|
+
"*.js",
|
|
44
|
+
"*.d.ts"
|
|
45
|
+
],
|
|
46
|
+
"scripts": {
|
|
47
|
+
"check": "../../../scripts/prepare/check.ts",
|
|
48
|
+
"prep": "../../../scripts/prepare/bundle.ts"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
|
|
52
|
+
"@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.0c3f3b7.0",
|
|
53
|
+
"@storybook/types": "0.0.0-pr-23609-sha-f47ef339",
|
|
54
|
+
"@types/babel__core": "^7.1.7",
|
|
55
|
+
"babel-plugin-react-docgen": "^4.1.0",
|
|
56
|
+
"pnp-webpack-plugin": "^1.7.0",
|
|
57
|
+
"semver": "^7.3.5"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@storybook/node-logger": "0.0.0-pr-23609-sha-f47ef339",
|
|
61
|
+
"@types/node": "^16.0.0",
|
|
62
|
+
"typescript": "~4.9.3"
|
|
63
|
+
},
|
|
64
|
+
"peerDependencies": {
|
|
65
|
+
"@babel/core": "*",
|
|
66
|
+
"react-scripts": ">=5.0.0"
|
|
67
|
+
},
|
|
68
|
+
"publishConfig": {
|
|
69
|
+
"access": "public"
|
|
70
|
+
},
|
|
71
|
+
"bundler": {
|
|
72
|
+
"entries": [
|
|
73
|
+
"./src/index.ts"
|
|
74
|
+
],
|
|
75
|
+
"formats": [
|
|
76
|
+
"cjs"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"gitHead": "e6a7fd8a655c69780bc20b9749c2699e44beae17"
|
|
80
|
+
}
|
package/src/typings.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'pnp-webpack-plugin';
|