create-zudoku 0.69.2 → 0.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +16 -16
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
- (()=>{var t={5254:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.createFileSystemAdapter=r.FILE_SYSTEM_ADAPTER=void 0;const o=i(7515);r.FILE_SYSTEM_ADAPTER={lstat:o.lstat,stat:o.stat,lstatSync:o.lstatSync,statSync:o.statSync,readdir:o.readdir,readdirSync:o.readdirSync};function createFileSystemAdapter(t){if(t===undefined){return r.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},r.FILE_SYSTEM_ADAPTER),t)}r.createFileSystemAdapter=createFileSystemAdapter},1121:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const i=process.versions.node.split(".");if(i[0]===undefined||i[1]===undefined){throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`)}const o=Number.parseInt(i[0],10);const a=Number.parseInt(i[1],10);const c=10;const l=10;const u=o>c;const h=o===c&&a>=l;r.IS_SUPPORT_READDIR_WITH_FILE_TYPES=u||h},1484:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.Settings=r.scandirSync=r.scandir=void 0;const o=i(9977);const a=i(5554);const c=i(595);r.Settings=c.default;function scandir(t,r,i){if(typeof r==="function"){o.read(t,getSettings(),r);return}o.read(t,getSettings(r),i)}r.scandir=scandir;function scandirSync(t,r){const i=getSettings(r);return a.read(t,i)}r.scandirSync=scandirSync;function getSettings(t={}){if(t instanceof c.default){return t}return new c.default(t)}},9977:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.readdir=r.readdirWithFileTypes=r.read=void 0;const o=i(1309);const a=i(7906);const c=i(1121);const l=i(2046);const u=i(9392);function read(t,r,i){if(!r.stats&&c.IS_SUPPORT_READDIR_WITH_FILE_TYPES){readdirWithFileTypes(t,r,i);return}readdir(t,r,i)}r.read=read;function readdirWithFileTypes(t,r,i){r.fs.readdir(t,{withFileTypes:true},((o,c)=>{if(o!==null){callFailureCallback(i,o);return}const l=c.map((i=>({dirent:i,name:i.name,path:u.joinPathSegments(t,i.name,r.pathSegmentSeparator)})));if(!r.followSymbolicLinks){callSuccessCallback(i,l);return}const h=l.map((t=>makeRplTaskEntry(t,r)));a(h,((t,r)=>{if(t!==null){callFailureCallback(i,t);return}callSuccessCallback(i,r)}))}))}r.readdirWithFileTypes=readdirWithFileTypes;function makeRplTaskEntry(t,r){return i=>{if(!t.dirent.isSymbolicLink()){i(null,t);return}r.fs.stat(t.path,((o,a)=>{if(o!==null){if(r.throwErrorOnBrokenSymbolicLink){i(o);return}i(null,t);return}t.dirent=l.fs.createDirentFromStats(t.name,a);i(null,t)}))}}function readdir(t,r,i){r.fs.readdir(t,((c,h)=>{if(c!==null){callFailureCallback(i,c);return}const d=h.map((i=>{const a=u.joinPathSegments(t,i,r.pathSegmentSeparator);return t=>{o.stat(a,r.fsStatSettings,((o,c)=>{if(o!==null){t(o);return}const u={name:i,path:a,dirent:l.fs.createDirentFromStats(i,c)};if(r.stats){u.stats=c}t(null,u)}))}}));a(d,((t,r)=>{if(t!==null){callFailureCallback(i,t);return}callSuccessCallback(i,r)}))}))}r.readdir=readdir;function callFailureCallback(t,r){t(r)}function callSuccessCallback(t,r){t(null,r)}},9392:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.joinPathSegments=void 0;function joinPathSegments(t,r,i){if(t.endsWith(i)){return t+r}return t+i+r}r.joinPathSegments=joinPathSegments},5554:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.readdir=r.readdirWithFileTypes=r.read=void 0;const o=i(1309);const a=i(1121);const c=i(2046);const l=i(9392);function read(t,r){if(!r.stats&&a.IS_SUPPORT_READDIR_WITH_FILE_TYPES){return readdirWithFileTypes(t,r)}return readdir(t,r)}r.read=read;function readdirWithFileTypes(t,r){const i=r.fs.readdirSync(t,{withFileTypes:true});return i.map((i=>{const o={dirent:i,name:i.name,path:l.joinPathSegments(t,i.name,r.pathSegmentSeparator)};if(o.dirent.isSymbolicLink()&&r.followSymbolicLinks){try{const t=r.fs.statSync(o.path);o.dirent=c.fs.createDirentFromStats(o.name,t)}catch(t){if(r.throwErrorOnBrokenSymbolicLink){throw t}}}return o}))}r.readdirWithFileTypes=readdirWithFileTypes;function readdir(t,r){const i=r.fs.readdirSync(t);return i.map((i=>{const a=l.joinPathSegments(t,i,r.pathSegmentSeparator);const u=o.statSync(a,r.fsStatSettings);const h={name:i,path:a,dirent:c.fs.createDirentFromStats(i,u)};if(r.stats){h.stats=u}return h}))}r.readdir=readdir},595:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(6928);const a=i(1309);const c=i(5254);class Settings{constructor(t={}){this._options=t;this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,false);this.fs=c.createFileSystemAdapter(this._options.fs);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,o.sep);this.stats=this._getValue(this._options.stats,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true);this.fsStatSettings=new a.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t!==null&&t!==void 0?t:r}}r["default"]=Settings},2535:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.createDirentFromStats=void 0;class DirentFromStats{constructor(t,r){this.name=t;this.isBlockDevice=r.isBlockDevice.bind(r);this.isCharacterDevice=r.isCharacterDevice.bind(r);this.isDirectory=r.isDirectory.bind(r);this.isFIFO=r.isFIFO.bind(r);this.isFile=r.isFile.bind(r);this.isSocket=r.isSocket.bind(r);this.isSymbolicLink=r.isSymbolicLink.bind(r)}}function createDirentFromStats(t,r){return new DirentFromStats(t,r)}r.createDirentFromStats=createDirentFromStats},2046:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.fs=void 0;const o=i(2535);r.fs=o},5375:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.createFileSystemAdapter=r.FILE_SYSTEM_ADAPTER=void 0;const o=i(7515);r.FILE_SYSTEM_ADAPTER={lstat:o.lstat,stat:o.stat,lstatSync:o.lstatSync,statSync:o.statSync};function createFileSystemAdapter(t){if(t===undefined){return r.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},r.FILE_SYSTEM_ADAPTER),t)}r.createFileSystemAdapter=createFileSystemAdapter},1309:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.statSync=r.stat=r.Settings=void 0;const o=i(9100);const a=i(4421);const c=i(8448);r.Settings=c.default;function stat(t,r,i){if(typeof r==="function"){o.read(t,getSettings(),r);return}o.read(t,getSettings(r),i)}r.stat=stat;function statSync(t,r){const i=getSettings(r);return a.read(t,i)}r.statSync=statSync;function getSettings(t={}){if(t instanceof c.default){return t}return new c.default(t)}},9100:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.read=void 0;function read(t,r,i){r.fs.lstat(t,((o,a)=>{if(o!==null){callFailureCallback(i,o);return}if(!a.isSymbolicLink()||!r.followSymbolicLink){callSuccessCallback(i,a);return}r.fs.stat(t,((t,o)=>{if(t!==null){if(r.throwErrorOnBrokenSymbolicLink){callFailureCallback(i,t);return}callSuccessCallback(i,a);return}if(r.markSymbolicLink){o.isSymbolicLink=()=>true}callSuccessCallback(i,o)}))}))}r.read=read;function callFailureCallback(t,r){t(r)}function callSuccessCallback(t,r){t(null,r)}},4421:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.read=void 0;function read(t,r){const i=r.fs.lstatSync(t);if(!i.isSymbolicLink()||!r.followSymbolicLink){return i}try{const i=r.fs.statSync(t);if(r.markSymbolicLink){i.isSymbolicLink=()=>true}return i}catch(t){if(!r.throwErrorOnBrokenSymbolicLink){return i}throw t}}r.read=read},8448:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(5375);class Settings{constructor(t={}){this._options=t;this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,true);this.fs=o.createFileSystemAdapter(this._options.fs);this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true)}_getValue(t,r){return t!==null&&t!==void 0?t:r}}r["default"]=Settings},2705:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.Settings=r.walkStream=r.walkSync=r.walk=void 0;const o=i(6200);const a=i(2);const c=i(6345);const l=i(4668);r.Settings=l.default;function walk(t,r,i){if(typeof r==="function"){new o.default(t,getSettings()).read(r);return}new o.default(t,getSettings(r)).read(i)}r.walk=walk;function walkSync(t,r){const i=getSettings(r);const o=new c.default(t,i);return o.read()}r.walkSync=walkSync;function walkStream(t,r){const i=getSettings(r);const o=new a.default(t,i);return o.read()}r.walkStream=walkStream;function getSettings(t={}){if(t instanceof l.default){return t}return new l.default(t)}},6200:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(826);class AsyncProvider{constructor(t,r){this._root=t;this._settings=r;this._reader=new o.default(this._root,this._settings);this._storage=[]}read(t){this._reader.onError((r=>{callFailureCallback(t,r)}));this._reader.onEntry((t=>{this._storage.push(t)}));this._reader.onEnd((()=>{callSuccessCallback(t,this._storage)}));this._reader.read()}}r["default"]=AsyncProvider;function callFailureCallback(t,r){t(r)}function callSuccessCallback(t,r){t(null,r)}},2:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(2203);const a=i(826);class StreamProvider{constructor(t,r){this._root=t;this._settings=r;this._reader=new a.default(this._root,this._settings);this._stream=new o.Readable({objectMode:true,read:()=>{},destroy:()=>{if(!this._reader.isDestroyed){this._reader.destroy()}}})}read(){this._reader.onError((t=>{this._stream.emit("error",t)}));this._reader.onEntry((t=>{this._stream.push(t)}));this._reader.onEnd((()=>{this._stream.push(null)}));this._reader.read();return this._stream}}r["default"]=StreamProvider},6345:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(127);class SyncProvider{constructor(t,r){this._root=t;this._settings=r;this._reader=new o.default(this._root,this._settings)}read(){return this._reader.read()}}r["default"]=SyncProvider},826:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4434);const a=i(1484);const c=i(4506);const l=i(5305);const u=i(2983);class AsyncReader extends u.default{constructor(t,r){super(t,r);this._settings=r;this._scandir=a.scandir;this._emitter=new o.EventEmitter;this._queue=c(this._worker.bind(this),this._settings.concurrency);this._isFatalError=false;this._isDestroyed=false;this._queue.drain=()=>{if(!this._isFatalError){this._emitter.emit("end")}}}read(){this._isFatalError=false;this._isDestroyed=false;setImmediate((()=>{this._pushToQueue(this._root,this._settings.basePath)}));return this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed){throw new Error("The reader is already destroyed")}this._isDestroyed=true;this._queue.killAndDrain()}onEntry(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,r){const i={directory:t,base:r};this._queue.push(i,(t=>{if(t!==null){this._handleError(t)}}))}_worker(t,r){this._scandir(t.directory,this._settings.fsScandirSettings,((i,o)=>{if(i!==null){r(i,undefined);return}for(const r of o){this._handleEntry(r,t.base)}r(null,undefined)}))}_handleError(t){if(this._isDestroyed||!l.isFatalError(this._settings,t)){return}this._isFatalError=true;this._isDestroyed=true;this._emitter.emit("error",t)}_handleEntry(t,r){if(this._isDestroyed||this._isFatalError){return}const i=t.path;if(r!==undefined){t.path=l.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)}if(l.isAppliedFilter(this._settings.entryFilter,t)){this._emitEntry(t)}if(t.dirent.isDirectory()&&l.isAppliedFilter(this._settings.deepFilter,t)){this._pushToQueue(i,r===undefined?undefined:t.path)}}_emitEntry(t){this._emitter.emit("entry",t)}}r["default"]=AsyncReader},5305:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.joinPathSegments=r.replacePathSegmentSeparator=r.isAppliedFilter=r.isFatalError=void 0;function isFatalError(t,r){if(t.errorFilter===null){return true}return!t.errorFilter(r)}r.isFatalError=isFatalError;function isAppliedFilter(t,r){return t===null||t(r)}r.isAppliedFilter=isAppliedFilter;function replacePathSegmentSeparator(t,r){return t.split(/[/\\]/).join(r)}r.replacePathSegmentSeparator=replacePathSegmentSeparator;function joinPathSegments(t,r,i){if(t===""){return r}if(t.endsWith(i)){return t+r}return t+i+r}r.joinPathSegments=joinPathSegments},2983:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(5305);class Reader{constructor(t,r){this._root=t;this._settings=r;this._root=o.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}}r["default"]=Reader},127:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(1484);const a=i(5305);const c=i(2983);class SyncReader extends c.default{constructor(){super(...arguments);this._scandir=o.scandirSync;this._storage=[];this._queue=new Set}read(){this._pushToQueue(this._root,this._settings.basePath);this._handleQueue();return this._storage}_pushToQueue(t,r){this._queue.add({directory:t,base:r})}_handleQueue(){for(const t of this._queue.values()){this._handleDirectory(t.directory,t.base)}}_handleDirectory(t,r){try{const i=this._scandir(t,this._settings.fsScandirSettings);for(const t of i){this._handleEntry(t,r)}}catch(t){this._handleError(t)}}_handleError(t){if(!a.isFatalError(this._settings,t)){return}throw t}_handleEntry(t,r){const i=t.path;if(r!==undefined){t.path=a.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)}if(a.isAppliedFilter(this._settings.entryFilter,t)){this._pushToStorage(t)}if(t.dirent.isDirectory()&&a.isAppliedFilter(this._settings.deepFilter,t)){this._pushToQueue(i,r===undefined?undefined:t.path)}}_pushToStorage(t){this._storage.push(t)}}r["default"]=SyncReader},4668:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(6928);const a=i(1484);class Settings{constructor(t={}){this._options=t;this.basePath=this._getValue(this._options.basePath,undefined);this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY);this.deepFilter=this._getValue(this._options.deepFilter,null);this.entryFilter=this._getValue(this._options.entryFilter,null);this.errorFilter=this._getValue(this._options.errorFilter,null);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,o.sep);this.fsScandirSettings=new a.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t!==null&&t!==void 0?t:r}}r["default"]=Settings},691:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.formatNames=r.fastFormats=r.fullFormats=void 0;function fmtDef(t,r){return{validate:t,compare:r}}r.fullFormats={date:fmtDef(date,compareDate),time:fmtDef(getTime(true),compareTime),"date-time":fmtDef(getDateTime(true),compareDateTime),"iso-time":fmtDef(getTime(),compareIsoTime),"iso-date-time":fmtDef(getDateTime(),compareIsoDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:uri,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:regex,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:byte,int32:{type:"number",validate:validateInt32},int64:{type:"number",validate:validateInt64},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:true,binary:true};r.fastFormats={...r.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),"iso-time":fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoTime),"iso-date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};r.formatNames=Object.keys(r.fullFormats);function isLeapYear(t){return t%4===0&&(t%100!==0||t%400===0)}const i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;const o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(t){const r=i.exec(t);if(!r)return false;const a=+r[1];const c=+r[2];const l=+r[3];return c>=1&&c<=12&&l>=1&&l<=(c===2&&isLeapYear(a)?29:o[c])}function compareDate(t,r){if(!(t&&r))return undefined;if(t>r)return 1;if(t<r)return-1;return 0}const a=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function getTime(t){return function time(r){const i=a.exec(r);if(!i)return false;const o=+i[1];const c=+i[2];const l=+i[3];const u=i[4];const h=i[5]==="-"?-1:1;const d=+(i[6]||0);const p=+(i[7]||0);if(d>23||p>59||t&&!u)return false;if(o<=23&&c<=59&&l<60)return true;const m=c-p*h;const g=o-d*h-(m<0?1:0);return(g===23||g===-1)&&(m===59||m===-1)&&l<61}}function compareTime(t,r){if(!(t&&r))return undefined;const i=new Date("2020-01-01T"+t).valueOf();const o=new Date("2020-01-01T"+r).valueOf();if(!(i&&o))return undefined;return i-o}function compareIsoTime(t,r){if(!(t&&r))return undefined;const i=a.exec(t);const o=a.exec(r);if(!(i&&o))return undefined;t=i[1]+i[2]+i[3];r=o[1]+o[2]+o[3];if(t>r)return 1;if(t<r)return-1;return 0}const c=/t|\s/i;function getDateTime(t){const r=getTime(t);return function date_time(t){const i=t.split(c);return i.length===2&&date(i[0])&&r(i[1])}}function compareDateTime(t,r){if(!(t&&r))return undefined;const i=new Date(t).valueOf();const o=new Date(r).valueOf();if(!(i&&o))return undefined;return i-o}function compareIsoDateTime(t,r){if(!(t&&r))return undefined;const[i,o]=t.split(c);const[a,l]=r.split(c);const u=compareDate(i,a);if(u===undefined)return undefined;return u||compareTime(o,l)}const l=/\/|:/;const u=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function uri(t){return l.test(t)&&u.test(t)}const h=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function byte(t){h.lastIndex=0;return h.test(t)}const d=-(2**31);const p=2**31-1;function validateInt32(t){return Number.isInteger(t)&&t<=p&&t>=d}function validateInt64(t){return Number.isInteger(t)}function validateNumber(){return true}const m=/[^\\]\\Z/;function regex(t){if(m.test(t))return false;try{new RegExp(t);return true}catch(t){return false}}},8631:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(691);const a=i(2604);const c=i(4809);const l=new c.Name("fullFormats");const u=new c.Name("fastFormats");const formatsPlugin=(t,r={keywords:true})=>{if(Array.isArray(r)){addFormats(t,r,o.fullFormats,l);return t}const[i,c]=r.mode==="fast"?[o.fastFormats,u]:[o.fullFormats,l];const h=r.formats||o.formatNames;addFormats(t,h,i,c);if(r.keywords)(0,a.default)(t);return t};formatsPlugin.get=(t,r="full")=>{const i=r==="fast"?o.fastFormats:o.fullFormats;const a=i[t];if(!a)throw new Error(`Unknown format "${t}"`);return a};function addFormats(t,r,i,o){var a;var l;(a=(l=t.opts.code).formats)!==null&&a!==void 0?a:l.formats=(0,c._)`require("ajv-formats/dist/formats").${o}`;for(const o of r)t.addFormat(o,i[o])}t.exports=r=formatsPlugin;Object.defineProperty(r,"__esModule",{value:true});r["default"]=formatsPlugin},2604:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.formatLimitDefinition=void 0;const o=i(7382);const a=i(4809);const c=a.operators;const l={formatMaximum:{okStr:"<=",ok:c.LTE,fail:c.GT},formatMinimum:{okStr:">=",ok:c.GTE,fail:c.LT},formatExclusiveMaximum:{okStr:"<",ok:c.LT,fail:c.GTE},formatExclusiveMinimum:{okStr:">",ok:c.GT,fail:c.LTE}};const u={message:({keyword:t,schemaCode:r})=>(0,a.str)`should be ${l[t].okStr} ${r}`,params:({keyword:t,schemaCode:r})=>(0,a._)`{comparison: ${l[t].okStr}, limit: ${r}}`};r.formatLimitDefinition={keyword:Object.keys(l),type:"string",schemaType:"string",$data:true,error:u,code(t){const{gen:r,data:i,schemaCode:c,keyword:u,it:h}=t;const{opts:d,self:p}=h;if(!d.validateFormats)return;const m=new o.KeywordCxt(h,p.RULES.all.format.definition,"format");if(m.$data)validate$DataFormat();else validateFormat();function validate$DataFormat(){const i=r.scopeValue("formats",{ref:p.formats,code:d.code.formats});const o=r.const("fmt",(0,a._)`${i}[${m.schemaCode}]`);t.fail$data((0,a.or)((0,a._)`typeof ${o} != "object"`,(0,a._)`${o} instanceof RegExp`,(0,a._)`typeof ${o}.compare != "function"`,compareCode(o)))}function validateFormat(){const i=m.schema;const o=p.formats[i];if(!o||o===true)return;if(typeof o!="object"||o instanceof RegExp||typeof o.compare!="function"){throw new Error(`"${u}": format "${i}" does not define "compare" function`)}const c=r.scopeValue("formats",{key:i,ref:o,code:d.code.formats?(0,a._)`${d.code.formats}${(0,a.getProperty)(i)}`:undefined});t.fail$data(compareCode(c))}function compareCode(t){return(0,a._)`${t}.compare(${i}, ${c}) ${l[u].fail} 0`}},dependencies:["format"]};const formatLimitPlugin=t=>{t.addKeyword(r.formatLimitDefinition);return t};r["default"]=formatLimitPlugin},8861:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.MissingRefError=r.ValidationError=r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=r.Ajv2020=void 0;const o=i(7326);const a=i(6117);const c=i(4665);const l=i(440);const u="https://json-schema.org/draft/2020-12/schema";class Ajv2020 extends o.default{constructor(t={}){super({...t,dynamicRef:true,next:true,unevaluated:true})}_addVocabularies(){super._addVocabularies();a.default.forEach((t=>this.addVocabulary(t)));if(this.opts.discriminator)this.addKeyword(c.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:t,meta:r}=this.opts;if(!r)return;l.default.call(this,t);this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:undefined)}}r.Ajv2020=Ajv2020;t.exports=r=Ajv2020;t.exports.Ajv2020=Ajv2020;Object.defineProperty(r,"__esModule",{value:true});r["default"]=Ajv2020;var h=i(9278);Object.defineProperty(r,"KeywordCxt",{enumerable:true,get:function(){return h.KeywordCxt}});var d=i(4809);Object.defineProperty(r,"_",{enumerable:true,get:function(){return d._}});Object.defineProperty(r,"str",{enumerable:true,get:function(){return d.str}});Object.defineProperty(r,"stringify",{enumerable:true,get:function(){return d.stringify}});Object.defineProperty(r,"nil",{enumerable:true,get:function(){return d.nil}});Object.defineProperty(r,"Name",{enumerable:true,get:function(){return d.Name}});Object.defineProperty(r,"CodeGen",{enumerable:true,get:function(){return d.CodeGen}});var p=i(4242);Object.defineProperty(r,"ValidationError",{enumerable:true,get:function(){return p.default}});var m=i(8547);Object.defineProperty(r,"MissingRefError",{enumerable:true,get:function(){return m.default}})},7382:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.MissingRefError=r.ValidationError=r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=r.Ajv=void 0;const o=i(7326);const a=i(540);const c=i(4665);const l=i(7578);const u=["/properties"];const h="http://json-schema.org/draft-07/schema";class Ajv extends o.default{_addVocabularies(){super._addVocabularies();a.default.forEach((t=>this.addVocabulary(t)));if(this.opts.discriminator)this.addKeyword(c.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();if(!this.opts.meta)return;const t=this.opts.$data?this.$dataMetaSchema(l,u):l;this.addMetaSchema(t,h,false);this.refs["http://json-schema.org/schema"]=h}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(h)?h:undefined)}}r.Ajv=Ajv;t.exports=r=Ajv;t.exports.Ajv=Ajv;Object.defineProperty(r,"__esModule",{value:true});r["default"]=Ajv;var d=i(9278);Object.defineProperty(r,"KeywordCxt",{enumerable:true,get:function(){return d.KeywordCxt}});var p=i(4809);Object.defineProperty(r,"_",{enumerable:true,get:function(){return p._}});Object.defineProperty(r,"str",{enumerable:true,get:function(){return p.str}});Object.defineProperty(r,"stringify",{enumerable:true,get:function(){return p.stringify}});Object.defineProperty(r,"nil",{enumerable:true,get:function(){return p.nil}});Object.defineProperty(r,"Name",{enumerable:true,get:function(){return p.Name}});Object.defineProperty(r,"CodeGen",{enumerable:true,get:function(){return p.CodeGen}});var m=i(4242);Object.defineProperty(r,"ValidationError",{enumerable:true,get:function(){return m.default}});var g=i(8547);Object.defineProperty(r,"MissingRefError",{enumerable:true,get:function(){return g.default}})},9356:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.regexpCode=r.getEsmExportName=r.getProperty=r.safeStringify=r.stringify=r.strConcat=r.addCodeArg=r.str=r._=r.nil=r._Code=r.Name=r.IDENTIFIER=r._CodeOrName=void 0;class _CodeOrName{}r._CodeOrName=_CodeOrName;r.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Name extends _CodeOrName{constructor(t){super();if(!r.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return false}get names(){return{[this.str]:1}}}r.Name=Name;class _Code extends _CodeOrName{constructor(t){super();this._items=typeof t==="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return false;const t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce(((t,r)=>`${t}${r}`),"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce(((t,r)=>{if(r instanceof Name)t[r.str]=(t[r.str]||0)+1;return t}),{})}}r._Code=_Code;r.nil=new _Code("");function _(t,...r){const i=[t[0]];let o=0;while(o<r.length){addCodeArg(i,r[o]);i.push(t[++o])}return new _Code(i)}r._=_;const i=new _Code("+");function str(t,...r){const o=[safeStringify(t[0])];let a=0;while(a<r.length){o.push(i);addCodeArg(o,r[a]);o.push(i,safeStringify(t[++a]))}optimize(o);return new _Code(o)}r.str=str;function addCodeArg(t,r){if(r instanceof _Code)t.push(...r._items);else if(r instanceof Name)t.push(r);else t.push(interpolate(r))}r.addCodeArg=addCodeArg;function optimize(t){let r=1;while(r<t.length-1){if(t[r]===i){const i=mergeExprItems(t[r-1],t[r+1]);if(i!==undefined){t.splice(r-1,3,i);continue}t[r++]="+"}r++}}function mergeExprItems(t,r){if(r==='""')return t;if(t==='""')return r;if(typeof t=="string"){if(r instanceof Name||t[t.length-1]!=='"')return;if(typeof r!="string")return`${t.slice(0,-1)}${r}"`;if(r[0]==='"')return t.slice(0,-1)+r.slice(1);return}if(typeof r=="string"&&r[0]==='"'&&!(t instanceof Name))return`"${t}${r.slice(1)}`;return}function strConcat(t,r){return r.emptyStr()?t:t.emptyStr()?r:str`${t}${r}`}r.strConcat=strConcat;function interpolate(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:safeStringify(Array.isArray(t)?t.join(","):t)}function stringify(t){return new _Code(safeStringify(t))}r.stringify=stringify;function safeStringify(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}r.safeStringify=safeStringify;function getProperty(t){return typeof t=="string"&&r.IDENTIFIER.test(t)?new _Code(`.${t}`):_`[${t}]`}r.getProperty=getProperty;function getEsmExportName(t){if(typeof t=="string"&&r.IDENTIFIER.test(t)){return new _Code(`${t}`)}throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}r.getEsmExportName=getEsmExportName;function regexpCode(t){return new _Code(t.toString())}r.regexpCode=regexpCode},4809:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.or=r.and=r.not=r.CodeGen=r.operators=r.varKinds=r.ValueScopeName=r.ValueScope=r.Scope=r.Name=r.regexpCode=r.stringify=r.getProperty=r.nil=r.strConcat=r.str=r._=void 0;const o=i(9356);const a=i(6785);var c=i(9356);Object.defineProperty(r,"_",{enumerable:true,get:function(){return c._}});Object.defineProperty(r,"str",{enumerable:true,get:function(){return c.str}});Object.defineProperty(r,"strConcat",{enumerable:true,get:function(){return c.strConcat}});Object.defineProperty(r,"nil",{enumerable:true,get:function(){return c.nil}});Object.defineProperty(r,"getProperty",{enumerable:true,get:function(){return c.getProperty}});Object.defineProperty(r,"stringify",{enumerable:true,get:function(){return c.stringify}});Object.defineProperty(r,"regexpCode",{enumerable:true,get:function(){return c.regexpCode}});Object.defineProperty(r,"Name",{enumerable:true,get:function(){return c.Name}});var l=i(6785);Object.defineProperty(r,"Scope",{enumerable:true,get:function(){return l.Scope}});Object.defineProperty(r,"ValueScope",{enumerable:true,get:function(){return l.ValueScope}});Object.defineProperty(r,"ValueScopeName",{enumerable:true,get:function(){return l.ValueScopeName}});Object.defineProperty(r,"varKinds",{enumerable:true,get:function(){return l.varKinds}});r.operators={GT:new o._Code(">"),GTE:new o._Code(">="),LT:new o._Code("<"),LTE:new o._Code("<="),EQ:new o._Code("==="),NEQ:new o._Code("!=="),NOT:new o._Code("!"),OR:new o._Code("||"),AND:new o._Code("&&"),ADD:new o._Code("+")};class Node{optimizeNodes(){return this}optimizeNames(t,r){return this}}class Def extends Node{constructor(t,r,i){super();this.varKind=t;this.name=r;this.rhs=i}render({es5:t,_n:r}){const i=t?a.varKinds.var:this.varKind;const o=this.rhs===undefined?"":` = ${this.rhs}`;return`${i} ${this.name}${o};`+r}optimizeNames(t,r){if(!t[this.name.str])return;if(this.rhs)this.rhs=optimizeExpr(this.rhs,t,r);return this}get names(){return this.rhs instanceof o._CodeOrName?this.rhs.names:{}}}class Assign extends Node{constructor(t,r,i){super();this.lhs=t;this.rhs=r;this.sideEffects=i}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(this.lhs instanceof o.Name&&!t[this.lhs.str]&&!this.sideEffects)return;this.rhs=optimizeExpr(this.rhs,t,r);return this}get names(){const t=this.lhs instanceof o.Name?{}:{...this.lhs.names};return addExprNames(t,this.rhs)}}class AssignOp extends Assign{constructor(t,r,i,o){super(t,i,o);this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}}class Label extends Node{constructor(t){super();this.label=t;this.names={}}render({_n:t}){return`${this.label}:`+t}}class Break extends Node{constructor(t){super();this.label=t;this.names={}}render({_n:t}){const r=this.label?` ${this.label}`:"";return`break${r};`+t}}class Throw extends Node{constructor(t){super();this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}}class AnyCode extends Node{constructor(t){super();this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:undefined}optimizeNames(t,r){this.code=optimizeExpr(this.code,t,r);return this}get names(){return this.code instanceof o._CodeOrName?this.code.names:{}}}class ParentNode extends Node{constructor(t=[]){super();this.nodes=t}render(t){return this.nodes.reduce(((r,i)=>r+i.render(t)),"")}optimizeNodes(){const{nodes:t}=this;let r=t.length;while(r--){const i=t[r].optimizeNodes();if(Array.isArray(i))t.splice(r,1,...i);else if(i)t[r]=i;else t.splice(r,1)}return t.length>0?this:undefined}optimizeNames(t,r){const{nodes:i}=this;let o=i.length;while(o--){const a=i[o];if(a.optimizeNames(t,r))continue;subtractNames(t,a.names);i.splice(o,1)}return i.length>0?this:undefined}get names(){return this.nodes.reduce(((t,r)=>addNames(t,r.names)),{})}}class BlockNode extends ParentNode{render(t){return"{"+t._n+super.render(t)+"}"+t._n}}class Root extends ParentNode{}class Else extends BlockNode{}Else.kind="else";class If extends BlockNode{constructor(t,r){super(r);this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);if(this.else)r+="else "+this.else.render(t);return r}optimizeNodes(){super.optimizeNodes();const t=this.condition;if(t===true)return this.nodes;let r=this.else;if(r){const t=r.optimizeNodes();r=this.else=Array.isArray(t)?new Else(t):t}if(r){if(t===false)return r instanceof If?r:r.nodes;if(this.nodes.length)return this;return new If(not(t),r instanceof If?[r]:r.nodes)}if(t===false||!this.nodes.length)return undefined;return this}optimizeNames(t,r){var i;this.else=(i=this.else)===null||i===void 0?void 0:i.optimizeNames(t,r);if(!(super.optimizeNames(t,r)||this.else))return;this.condition=optimizeExpr(this.condition,t,r);return this}get names(){const t=super.names;addExprNames(t,this.condition);if(this.else)addNames(t,this.else.names);return t}}If.kind="if";class For extends BlockNode{}For.kind="for";class ForLoop extends For{constructor(t){super();this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(!super.optimizeNames(t,r))return;this.iteration=optimizeExpr(this.iteration,t,r);return this}get names(){return addNames(super.names,this.iteration.names)}}class ForRange extends For{constructor(t,r,i,o){super();this.varKind=t;this.name=r;this.from=i;this.to=o}render(t){const r=t.es5?a.varKinds.var:this.varKind;const{name:i,from:o,to:c}=this;return`for(${r} ${i}=${o}; ${i}<${c}; ${i}++)`+super.render(t)}get names(){const t=addExprNames(super.names,this.from);return addExprNames(t,this.to)}}class ForIter extends For{constructor(t,r,i,o){super();this.loop=t;this.varKind=r;this.name=i;this.iterable=o}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(!super.optimizeNames(t,r))return;this.iterable=optimizeExpr(this.iterable,t,r);return this}get names(){return addNames(super.names,this.iterable.names)}}class Func extends BlockNode{constructor(t,r,i){super();this.name=t;this.args=r;this.async=i}render(t){const r=this.async?"async ":"";return`${r}function ${this.name}(${this.args})`+super.render(t)}}Func.kind="func";class Return extends ParentNode{render(t){return"return "+super.render(t)}}Return.kind="return";class Try extends BlockNode{render(t){let r="try"+super.render(t);if(this.catch)r+=this.catch.render(t);if(this.finally)r+=this.finally.render(t);return r}optimizeNodes(){var t,r;super.optimizeNodes();(t=this.catch)===null||t===void 0?void 0:t.optimizeNodes();(r=this.finally)===null||r===void 0?void 0:r.optimizeNodes();return this}optimizeNames(t,r){var i,o;super.optimizeNames(t,r);(i=this.catch)===null||i===void 0?void 0:i.optimizeNames(t,r);(o=this.finally)===null||o===void 0?void 0:o.optimizeNames(t,r);return this}get names(){const t=super.names;if(this.catch)addNames(t,this.catch.names);if(this.finally)addNames(t,this.finally.names);return t}}class Catch extends BlockNode{constructor(t){super();this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}Catch.kind="catch";class Finally extends BlockNode{render(t){return"finally"+super.render(t)}}Finally.kind="finally";class CodeGen{constructor(t,r={}){this._values={};this._blockStarts=[];this._constants={};this.opts={...r,_n:r.lines?"\n":""};this._extScope=t;this._scope=new a.Scope({parent:t});this._nodes=[new Root]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){const i=this._extScope.value(t,r);const o=this._values[i.prefix]||(this._values[i.prefix]=new Set);o.add(i);return i}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,i,o){const a=this._scope.toName(r);if(i!==undefined&&o)this._constants[a.str]=i;this._leafNode(new Def(t,a,i));return a}const(t,r,i){return this._def(a.varKinds.const,t,r,i)}let(t,r,i){return this._def(a.varKinds.let,t,r,i)}var(t,r,i){return this._def(a.varKinds.var,t,r,i)}assign(t,r,i){return this._leafNode(new Assign(t,r,i))}add(t,i){return this._leafNode(new AssignOp(t,r.operators.ADD,i))}code(t){if(typeof t=="function")t();else if(t!==o.nil)this._leafNode(new AnyCode(t));return this}object(...t){const r=["{"];for(const[i,a]of t){if(r.length>1)r.push(",");r.push(i);if(i!==a||this.opts.es5){r.push(":");(0,o.addCodeArg)(r,a)}}r.push("}");return new o._Code(r)}if(t,r,i){this._blockNode(new If(t));if(r&&i){this.code(r).else().code(i).endIf()}else if(r){this.code(r).endIf()}else if(i){throw new Error('CodeGen: "else" body without "then" body')}return this}elseIf(t){return this._elseNode(new If(t))}else(){return this._elseNode(new Else)}endIf(){return this._endBlockNode(If,Else)}_for(t,r){this._blockNode(t);if(r)this.code(r).endFor();return this}for(t,r){return this._for(new ForLoop(t),r)}forRange(t,r,i,o,c=(this.opts.es5?a.varKinds.var:a.varKinds.let)){const l=this._scope.toName(t);return this._for(new ForRange(c,l,r,i),(()=>o(l)))}forOf(t,r,i,c=a.varKinds.const){const l=this._scope.toName(t);if(this.opts.es5){const t=r instanceof o.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,o._)`${t}.length`,(r=>{this.var(l,(0,o._)`${t}[${r}]`);i(l)}))}return this._for(new ForIter("of",c,l,r),(()=>i(l)))}forIn(t,r,i,c=(this.opts.es5?a.varKinds.var:a.varKinds.const)){if(this.opts.ownProperties){return this.forOf(t,(0,o._)`Object.keys(${r})`,i)}const l=this._scope.toName(t);return this._for(new ForIter("in",c,l,r),(()=>i(l)))}endFor(){return this._endBlockNode(For)}label(t){return this._leafNode(new Label(t))}break(t){return this._leafNode(new Break(t))}return(t){const r=new Return;this._blockNode(r);this.code(t);if(r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Return)}try(t,r,i){if(!r&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');const o=new Try;this._blockNode(o);this.code(t);if(r){const t=this.name("e");this._currNode=o.catch=new Catch(t);r(t)}if(i){this._currNode=o.finally=new Finally;this.code(i)}return this._endBlockNode(Catch,Finally)}throw(t){return this._leafNode(new Throw(t))}block(t,r){this._blockStarts.push(this._nodes.length);if(t)this.code(t).endBlock(r);return this}endBlock(t){const r=this._blockStarts.pop();if(r===undefined)throw new Error("CodeGen: not in self-balancing block");const i=this._nodes.length-r;if(i<0||t!==undefined&&i!==t){throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${t} expected`)}this._nodes.length=r;return this}func(t,r=o.nil,i,a){this._blockNode(new Func(t,r,i));if(a)this.code(a).endFunc();return this}endFunc(){return this._endBlockNode(Func)}optimize(t=1){while(t-- >0){this._root.optimizeNodes();this._root.optimizeNames(this._root.names,this._constants)}}_leafNode(t){this._currNode.nodes.push(t);return this}_blockNode(t){this._currNode.nodes.push(t);this._nodes.push(t)}_endBlockNode(t,r){const i=this._currNode;if(i instanceof t||r&&i instanceof r){this._nodes.pop();return this}throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){const r=this._currNode;if(!(r instanceof If)){throw new Error('CodeGen: "else" without "if"')}this._currNode=r.else=t;return this}get _root(){return this._nodes[0]}get _currNode(){const t=this._nodes;return t[t.length-1]}set _currNode(t){const r=this._nodes;r[r.length-1]=t}}r.CodeGen=CodeGen;function addNames(t,r){for(const i in r)t[i]=(t[i]||0)+(r[i]||0);return t}function addExprNames(t,r){return r instanceof o._CodeOrName?addNames(t,r.names):t}function optimizeExpr(t,r,i){if(t instanceof o.Name)return replaceName(t);if(!canOptimize(t))return t;return new o._Code(t._items.reduce(((t,r)=>{if(r instanceof o.Name)r=replaceName(r);if(r instanceof o._Code)t.push(...r._items);else t.push(r);return t}),[]));function replaceName(t){const o=i[t.str];if(o===undefined||r[t.str]!==1)return t;delete r[t.str];return o}function canOptimize(t){return t instanceof o._Code&&t._items.some((t=>t instanceof o.Name&&r[t.str]===1&&i[t.str]!==undefined))}}function subtractNames(t,r){for(const i in r)t[i]=(t[i]||0)-(r[i]||0)}function not(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,o._)`!${par(t)}`}r.not=not;const u=mappend(r.operators.AND);function and(...t){return t.reduce(u)}r.and=and;const h=mappend(r.operators.OR);function or(...t){return t.reduce(h)}r.or=or;function mappend(t){return(r,i)=>r===o.nil?i:i===o.nil?r:(0,o._)`${par(r)} ${t} ${par(i)}`}function par(t){return t instanceof o.Name?t:(0,o._)`(${t})`}},6785:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.ValueScope=r.ValueScopeName=r.Scope=r.varKinds=r.UsedValueState=void 0;const o=i(9356);class ValueError extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`);this.value=t.value}}var a;(function(t){t[t["Started"]=0]="Started";t[t["Completed"]=1]="Completed"})(a||(r.UsedValueState=a={}));r.varKinds={const:new o.Name("const"),let:new o.Name("let"),var:new o.Name("var")};class Scope{constructor({prefixes:t,parent:r}={}){this._names={};this._prefixes=t;this._parent=r}toName(t){return t instanceof o.Name?t:this.name(t)}name(t){return new o.Name(this._newName(t))}_newName(t){const r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,i;if(((i=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||i===void 0?void 0:i.has(t))||this._prefixes&&!this._prefixes.has(t)){throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`)}return this._names[t]={prefix:t,index:0}}}r.Scope=Scope;class ValueScopeName extends o.Name{constructor(t,r){super(r);this.prefix=t}setValue(t,{property:r,itemIndex:i}){this.value=t;this.scopePath=(0,o._)`.${new o.Name(r)}[${i}]`}}r.ValueScopeName=ValueScopeName;const c=(0,o._)`\n`;class ValueScope extends Scope{constructor(t){super(t);this._values={};this._scope=t.scope;this.opts={...t,_n:t.lines?c:o.nil}}get(){return this._scope}name(t){return new ValueScopeName(t,this._newName(t))}value(t,r){var i;if(r.ref===undefined)throw new Error("CodeGen: ref must be passed in value");const o=this.toName(t);const{prefix:a}=o;const c=(i=r.key)!==null&&i!==void 0?i:r.ref;let l=this._values[a];if(l){const t=l.get(c);if(t)return t}else{l=this._values[a]=new Map}l.set(c,o);const u=this._scope[a]||(this._scope[a]=[]);const h=u.length;u[h]=r.ref;o.setValue(r,{property:a,itemIndex:h});return o}getValue(t,r){const i=this._values[t];if(!i)return;return i.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,(r=>{if(r.scopePath===undefined)throw new Error(`CodeGen: name "${r}" has no value`);return(0,o._)`${t}${r.scopePath}`}))}scopeCode(t=this._values,r,i){return this._reduceValues(t,(t=>{if(t.value===undefined)throw new Error(`CodeGen: name "${t}" has no value`);return t.value.code}),r,i)}_reduceValues(t,i,c={},l){let u=o.nil;for(const h in t){const d=t[h];if(!d)continue;const p=c[h]=c[h]||new Map;d.forEach((t=>{if(p.has(t))return;p.set(t,a.Started);let c=i(t);if(c){const i=this.opts.es5?r.varKinds.var:r.varKinds.const;u=(0,o._)`${u}${i} ${t} = ${c};${this.opts._n}`}else if(c=l===null||l===void 0?void 0:l(t)){u=(0,o._)`${u}${c}${this.opts._n}`}else{throw new ValueError(t)}p.set(t,a.Completed)}))}return u}}r.ValueScope=ValueScope},5456:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.extendErrors=r.resetErrorsCount=r.reportExtraError=r.reportError=r.keyword$DataError=r.keywordError=void 0;const o=i(4809);const a=i(4359);const c=i(1267);r.keywordError={message:({keyword:t})=>(0,o.str)`must pass "${t}" keyword validation`};r.keyword$DataError={message:({keyword:t,schemaType:r})=>r?(0,o.str)`"${t}" keyword must be ${r} ($data)`:(0,o.str)`"${t}" keyword is invalid ($data)`};function reportError(t,i=r.keywordError,a,c){const{it:l}=t;const{gen:u,compositeRule:h,allErrors:d}=l;const p=errorObjectCode(t,i,a);if(c!==null&&c!==void 0?c:h||d){addError(u,p)}else{returnErrors(l,(0,o._)`[${p}]`)}}r.reportError=reportError;function reportExtraError(t,i=r.keywordError,o){const{it:a}=t;const{gen:l,compositeRule:u,allErrors:h}=a;const d=errorObjectCode(t,i,o);addError(l,d);if(!(u||h)){returnErrors(a,c.default.vErrors)}}r.reportExtraError=reportExtraError;function resetErrorsCount(t,r){t.assign(c.default.errors,r);t.if((0,o._)`${c.default.vErrors} !== null`,(()=>t.if(r,(()=>t.assign((0,o._)`${c.default.vErrors}.length`,r)),(()=>t.assign(c.default.vErrors,null)))))}r.resetErrorsCount=resetErrorsCount;function extendErrors({gen:t,keyword:r,schemaValue:i,data:a,errsCount:l,it:u}){if(l===undefined)throw new Error("ajv implementation error");const h=t.name("err");t.forRange("i",l,c.default.errors,(l=>{t.const(h,(0,o._)`${c.default.vErrors}[${l}]`);t.if((0,o._)`${h}.instancePath === undefined`,(()=>t.assign((0,o._)`${h}.instancePath`,(0,o.strConcat)(c.default.instancePath,u.errorPath))));t.assign((0,o._)`${h}.schemaPath`,(0,o.str)`${u.errSchemaPath}/${r}`);if(u.opts.verbose){t.assign((0,o._)`${h}.schema`,i);t.assign((0,o._)`${h}.data`,a)}}))}r.extendErrors=extendErrors;function addError(t,r){const i=t.const("err",r);t.if((0,o._)`${c.default.vErrors} === null`,(()=>t.assign(c.default.vErrors,(0,o._)`[${i}]`)),(0,o._)`${c.default.vErrors}.push(${i})`);t.code((0,o._)`${c.default.errors}++`)}function returnErrors(t,r){const{gen:i,validateName:a,schemaEnv:c}=t;if(c.$async){i.throw((0,o._)`new ${t.ValidationError}(${r})`)}else{i.assign((0,o._)`${a}.errors`,r);i.return(false)}}const l={keyword:new o.Name("keyword"),schemaPath:new o.Name("schemaPath"),params:new o.Name("params"),propertyName:new o.Name("propertyName"),message:new o.Name("message"),schema:new o.Name("schema"),parentSchema:new o.Name("parentSchema")};function errorObjectCode(t,r,i){const{createErrors:a}=t.it;if(a===false)return(0,o._)`{}`;return errorObject(t,r,i)}function errorObject(t,r,i={}){const{gen:o,it:a}=t;const c=[errorInstancePath(a,i),errorSchemaPath(t,i)];extraErrorProps(t,r,c);return o.object(...c)}function errorInstancePath({errorPath:t},{instancePath:r}){const i=r?(0,o.str)`${t}${(0,a.getErrorPath)(r,a.Type.Str)}`:t;return[c.default.instancePath,(0,o.strConcat)(c.default.instancePath,i)]}function errorSchemaPath({keyword:t,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:c}){let u=c?r:(0,o.str)`${r}/${t}`;if(i){u=(0,o.str)`${u}${(0,a.getErrorPath)(i,a.Type.Str)}`}return[l.schemaPath,u]}function extraErrorProps(t,{params:r,message:i},a){const{keyword:u,data:h,schemaValue:d,it:p}=t;const{opts:m,propertyName:g,topSchemaRef:y,schemaPath:v}=p;a.push([l.keyword,u],[l.params,typeof r=="function"?r(t):r||(0,o._)`{}`]);if(m.messages){a.push([l.message,typeof i=="function"?i(t):i])}if(m.verbose){a.push([l.schema,d],[l.parentSchema,(0,o._)`${y}${v}`],[c.default.data,h])}if(g)a.push([l.propertyName,g])}},2407:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.resolveSchema=r.getCompilingSchema=r.resolveRef=r.compileSchema=r.SchemaEnv=void 0;const o=i(4809);const a=i(4242);const c=i(1267);const l=i(5351);const u=i(4359);const h=i(9278);class SchemaEnv{constructor(t){var r;this.refs={};this.dynamicAnchors={};let i;if(typeof t.schema=="object")i=t.schema;this.schema=t.schema;this.schemaId=t.schemaId;this.root=t.root||this;this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,l.normalizeId)(i===null||i===void 0?void 0:i[t.schemaId||"$id"]);this.schemaPath=t.schemaPath;this.localRefs=t.localRefs;this.meta=t.meta;this.$async=i===null||i===void 0?void 0:i.$async;this.refs={}}}r.SchemaEnv=SchemaEnv;function compileSchema(t){const r=getCompilingSchema.call(this,t);if(r)return r;const i=(0,l.getFullPath)(this.opts.uriResolver,t.root.baseId);const{es5:u,lines:d}=this.opts.code;const{ownProperties:p}=this.opts;const m=new o.CodeGen(this.scope,{es5:u,lines:d,ownProperties:p});let g;if(t.$async){g=m.scopeValue("Error",{ref:a.default,code:(0,o._)`require("ajv/dist/runtime/validation_error").default`})}const y=m.scopeName("validate");t.validateName=y;const v={gen:m,allErrors:this.opts.allErrors,data:c.default.data,parentData:c.default.parentData,parentDataProperty:c.default.parentDataProperty,dataNames:[c.default.data],dataPathArr:[o.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:m.scopeValue("schema",this.opts.code.source===true?{ref:t.schema,code:(0,o.stringify)(t.schema)}:{ref:t.schema}),validateName:y,ValidationError:g,schema:t.schema,schemaEnv:t,rootId:i,baseId:t.baseId||i,schemaPath:o.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,o._)`""`,opts:this.opts,self:this};let b;try{this._compilations.add(t);(0,h.validateFunctionCode)(v);m.optimize(this.opts.code.optimize);const r=m.toString();b=`${m.scopeRefs(c.default.scope)}return ${r}`;if(this.opts.code.process)b=this.opts.code.process(b,t);const i=new Function(`${c.default.self}`,`${c.default.scope}`,b);const a=i(this,this.scope.get());this.scope.value(y,{ref:a});a.errors=null;a.schema=t.schema;a.schemaEnv=t;if(t.$async)a.$async=true;if(this.opts.code.source===true){a.source={validateName:y,validateCode:r,scopeValues:m._values}}if(this.opts.unevaluated){const{props:t,items:r}=v;a.evaluated={props:t instanceof o.Name?undefined:t,items:r instanceof o.Name?undefined:r,dynamicProps:t instanceof o.Name,dynamicItems:r instanceof o.Name};if(a.source)a.source.evaluated=(0,o.stringify)(a.evaluated)}t.validate=a;return t}catch(r){delete t.validate;delete t.validateName;if(b)this.logger.error("Error compiling schema, function code:",b);throw r}finally{this._compilations.delete(t)}}r.compileSchema=compileSchema;function resolveRef(t,r,i){var o;i=(0,l.resolveUrl)(this.opts.uriResolver,r,i);const a=t.refs[i];if(a)return a;let c=resolve.call(this,t,i);if(c===undefined){const a=(o=t.localRefs)===null||o===void 0?void 0:o[i];const{schemaId:l}=this.opts;if(a)c=new SchemaEnv({schema:a,schemaId:l,root:t,baseId:r})}if(c===undefined)return;return t.refs[i]=inlineOrCompile.call(this,c)}r.resolveRef=resolveRef;function inlineOrCompile(t){if((0,l.inlineRef)(t.schema,this.opts.inlineRefs))return t.schema;return t.validate?t:compileSchema.call(this,t)}function getCompilingSchema(t){for(const r of this._compilations){if(sameSchemaEnv(r,t))return r}}r.getCompilingSchema=getCompilingSchema;function sameSchemaEnv(t,r){return t.schema===r.schema&&t.root===r.root&&t.baseId===r.baseId}function resolve(t,r){let i;while(typeof(i=this.refs[r])=="string")r=i;return i||this.schemas[r]||resolveSchema.call(this,t,r)}function resolveSchema(t,r){const i=this.opts.uriResolver.parse(r);const o=(0,l._getFullPath)(this.opts.uriResolver,i);let a=(0,l.getFullPath)(this.opts.uriResolver,t.baseId,undefined);if(Object.keys(t.schema).length>0&&o===a){return getJsonPointer.call(this,i,t)}const c=(0,l.normalizeId)(o);const u=this.refs[c]||this.schemas[c];if(typeof u=="string"){const r=resolveSchema.call(this,t,u);if(typeof(r===null||r===void 0?void 0:r.schema)!=="object")return;return getJsonPointer.call(this,i,r)}if(typeof(u===null||u===void 0?void 0:u.schema)!=="object")return;if(!u.validate)compileSchema.call(this,u);if(c===(0,l.normalizeId)(r)){const{schema:r}=u;const{schemaId:i}=this.opts;const o=r[i];if(o)a=(0,l.resolveUrl)(this.opts.uriResolver,a,o);return new SchemaEnv({schema:r,schemaId:i,root:t,baseId:a})}return getJsonPointer.call(this,i,u)}r.resolveSchema=resolveSchema;const d=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(t,{baseId:r,schema:i,root:o}){var a;if(((a=t.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(const o of t.fragment.slice(1).split("/")){if(typeof i==="boolean")return;const t=i[(0,u.unescapeFragment)(o)];if(t===undefined)return;i=t;const a=typeof i==="object"&&i[this.opts.schemaId];if(!d.has(o)&&a){r=(0,l.resolveUrl)(this.opts.uriResolver,r,a)}}let c;if(typeof i!="boolean"&&i.$ref&&!(0,u.schemaHasRulesButRef)(i,this.RULES)){const t=(0,l.resolveUrl)(this.opts.uriResolver,r,i.$ref);c=resolveSchema.call(this,o,t)}const{schemaId:h}=this.opts;c=c||new SchemaEnv({schema:i,schemaId:h,root:o,baseId:r});if(c.schema!==c.root.schema)return c;return undefined}},1267:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4809);const a={data:new o.Name("data"),valCxt:new o.Name("valCxt"),instancePath:new o.Name("instancePath"),parentData:new o.Name("parentData"),parentDataProperty:new o.Name("parentDataProperty"),rootData:new o.Name("rootData"),dynamicAnchors:new o.Name("dynamicAnchors"),vErrors:new o.Name("vErrors"),errors:new o.Name("errors"),this:new o.Name("this"),self:new o.Name("self"),scope:new o.Name("scope"),json:new o.Name("json"),jsonPos:new o.Name("jsonPos"),jsonLen:new o.Name("jsonLen"),jsonPart:new o.Name("jsonPart")};r["default"]=a},8547:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(5351);class MissingRefError extends Error{constructor(t,r,i,a){super(a||`can't resolve reference ${i} from id ${r}`);this.missingRef=(0,o.resolveUrl)(t,r,i);this.missingSchema=(0,o.normalizeId)((0,o.getFullPath)(t,this.missingRef))}}r["default"]=MissingRefError},5351:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.getSchemaRefs=r.resolveUrl=r.normalizeId=r._getFullPath=r.getFullPath=r.inlineRef=void 0;const o=i(4359);const a=i(3222);const c=i(3456);const l=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function inlineRef(t,r=true){if(typeof t=="boolean")return true;if(r===true)return!hasRef(t);if(!r)return false;return countKeys(t)<=r}r.inlineRef=inlineRef;const u=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hasRef(t){for(const r in t){if(u.has(r))return true;const i=t[r];if(Array.isArray(i)&&i.some(hasRef))return true;if(typeof i=="object"&&hasRef(i))return true}return false}function countKeys(t){let r=0;for(const i in t){if(i==="$ref")return Infinity;r++;if(l.has(i))continue;if(typeof t[i]=="object"){(0,o.eachItem)(t[i],(t=>r+=countKeys(t)))}if(r===Infinity)return Infinity}return r}function getFullPath(t,r="",i){if(i!==false)r=normalizeId(r);const o=t.parse(r);return _getFullPath(t,o)}r.getFullPath=getFullPath;function _getFullPath(t,r){const i=t.serialize(r);return i.split("#")[0]+"#"}r._getFullPath=_getFullPath;const h=/#\/?$/;function normalizeId(t){return t?t.replace(h,""):""}r.normalizeId=normalizeId;function resolveUrl(t,r,i){i=normalizeId(i);return t.resolve(r,i)}r.resolveUrl=resolveUrl;const d=/^[a-z_][-a-z0-9._]*$/i;function getSchemaRefs(t,r){if(typeof t=="boolean")return{};const{schemaId:i,uriResolver:o}=this.opts;const l=normalizeId(t[i]||r);const u={"":l};const h=getFullPath(o,l,false);const p={};const m=new Set;c(t,{allKeys:true},((t,r,o,a)=>{if(a===undefined)return;const c=h+r;let l=u[a];if(typeof t[i]=="string")l=addRef.call(this,t[i]);addAnchor.call(this,t.$anchor);addAnchor.call(this,t.$dynamicAnchor);u[r]=l;function addRef(r){const i=this.opts.uriResolver.resolve;r=normalizeId(l?i(l,r):r);if(m.has(r))throw ambiguos(r);m.add(r);let o=this.refs[r];if(typeof o=="string")o=this.refs[o];if(typeof o=="object"){checkAmbiguosRef(t,o.schema,r)}else if(r!==normalizeId(c)){if(r[0]==="#"){checkAmbiguosRef(t,p[r],r);p[r]=t}else{this.refs[r]=c}}return r}function addAnchor(t){if(typeof t=="string"){if(!d.test(t))throw new Error(`invalid anchor "${t}"`);addRef.call(this,`#${t}`)}}}));return p;function checkAmbiguosRef(t,r,i){if(r!==undefined&&!a(t,r))throw ambiguos(i)}function ambiguos(t){return new Error(`reference "${t}" resolves to more than one schema`)}}r.getSchemaRefs=getSchemaRefs},8888:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.getRules=r.isJSONType=void 0;const i=["string","number","integer","boolean","null","object","array"];const o=new Set(i);function isJSONType(t){return typeof t=="string"&&o.has(t)}r.isJSONType=isJSONType;function getRules(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:true,boolean:true,null:true},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}r.getRules=getRules},4359:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.checkStrictMode=r.getErrorPath=r.Type=r.useFunc=r.setEvaluated=r.evaluatedPropsToName=r.mergeEvaluated=r.eachItem=r.unescapeJsonPointer=r.escapeJsonPointer=r.escapeFragment=r.unescapeFragment=r.schemaRefOrVal=r.schemaHasRulesButRef=r.schemaHasRules=r.checkUnknownRules=r.alwaysValidSchema=r.toHash=void 0;const o=i(4809);const a=i(9356);function toHash(t){const r={};for(const i of t)r[i]=true;return r}r.toHash=toHash;function alwaysValidSchema(t,r){if(typeof r=="boolean")return r;if(Object.keys(r).length===0)return true;checkUnknownRules(t,r);return!schemaHasRules(r,t.self.RULES.all)}r.alwaysValidSchema=alwaysValidSchema;function checkUnknownRules(t,r=t.schema){const{opts:i,self:o}=t;if(!i.strictSchema)return;if(typeof r==="boolean")return;const a=o.RULES.keywords;for(const i in r){if(!a[i])checkStrictMode(t,`unknown keyword: "${i}"`)}}r.checkUnknownRules=checkUnknownRules;function schemaHasRules(t,r){if(typeof t=="boolean")return!t;for(const i in t)if(r[i])return true;return false}r.schemaHasRules=schemaHasRules;function schemaHasRulesButRef(t,r){if(typeof t=="boolean")return!t;for(const i in t)if(i!=="$ref"&&r.all[i])return true;return false}r.schemaHasRulesButRef=schemaHasRulesButRef;function schemaRefOrVal({topSchemaRef:t,schemaPath:r},i,a,c){if(!c){if(typeof i=="number"||typeof i=="boolean")return i;if(typeof i=="string")return(0,o._)`${i}`}return(0,o._)`${t}${r}${(0,o.getProperty)(a)}`}r.schemaRefOrVal=schemaRefOrVal;function unescapeFragment(t){return unescapeJsonPointer(decodeURIComponent(t))}r.unescapeFragment=unescapeFragment;function escapeFragment(t){return encodeURIComponent(escapeJsonPointer(t))}r.escapeFragment=escapeFragment;function escapeJsonPointer(t){if(typeof t=="number")return`${t}`;return t.replace(/~/g,"~0").replace(/\//g,"~1")}r.escapeJsonPointer=escapeJsonPointer;function unescapeJsonPointer(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}r.unescapeJsonPointer=unescapeJsonPointer;function eachItem(t,r){if(Array.isArray(t)){for(const i of t)r(i)}else{r(t)}}r.eachItem=eachItem;function makeMergeEvaluated({mergeNames:t,mergeToName:r,mergeValues:i,resultToName:a}){return(c,l,u,h)=>{const d=u===undefined?l:u instanceof o.Name?(l instanceof o.Name?t(c,l,u):r(c,l,u),u):l instanceof o.Name?(r(c,u,l),l):i(l,u);return h===o.Name&&!(d instanceof o.Name)?a(c,d):d}}r.mergeEvaluated={props:makeMergeEvaluated({mergeNames:(t,r,i)=>t.if((0,o._)`${i} !== true && ${r} !== undefined`,(()=>{t.if((0,o._)`${r} === true`,(()=>t.assign(i,true)),(()=>t.assign(i,(0,o._)`${i} || {}`).code((0,o._)`Object.assign(${i}, ${r})`)))})),mergeToName:(t,r,i)=>t.if((0,o._)`${i} !== true`,(()=>{if(r===true){t.assign(i,true)}else{t.assign(i,(0,o._)`${i} || {}`);setEvaluated(t,i,r)}})),mergeValues:(t,r)=>t===true?true:{...t,...r},resultToName:evaluatedPropsToName}),items:makeMergeEvaluated({mergeNames:(t,r,i)=>t.if((0,o._)`${i} !== true && ${r} !== undefined`,(()=>t.assign(i,(0,o._)`${r} === true ? true : ${i} > ${r} ? ${i} : ${r}`))),mergeToName:(t,r,i)=>t.if((0,o._)`${i} !== true`,(()=>t.assign(i,r===true?true:(0,o._)`${i} > ${r} ? ${i} : ${r}`))),mergeValues:(t,r)=>t===true?true:Math.max(t,r),resultToName:(t,r)=>t.var("items",r)})};function evaluatedPropsToName(t,r){if(r===true)return t.var("props",true);const i=t.var("props",(0,o._)`{}`);if(r!==undefined)setEvaluated(t,i,r);return i}r.evaluatedPropsToName=evaluatedPropsToName;function setEvaluated(t,r,i){Object.keys(i).forEach((i=>t.assign((0,o._)`${r}${(0,o.getProperty)(i)}`,true)))}r.setEvaluated=setEvaluated;const c={};function useFunc(t,r){return t.scopeValue("func",{ref:r,code:c[r.code]||(c[r.code]=new a._Code(r.code))})}r.useFunc=useFunc;var l;(function(t){t[t["Num"]=0]="Num";t[t["Str"]=1]="Str"})(l||(r.Type=l={}));function getErrorPath(t,r,i){if(t instanceof o.Name){const a=r===l.Num;return i?a?(0,o._)`"[" + ${t} + "]"`:(0,o._)`"['" + ${t} + "']"`:a?(0,o._)`"/" + ${t}`:(0,o._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return i?(0,o.getProperty)(t).toString():"/"+escapeJsonPointer(t)}r.getErrorPath=getErrorPath;function checkStrictMode(t,r,i=t.opts.strictSchema){if(!i)return;r=`strict mode: ${r}`;if(i===true)throw new Error(r);t.self.logger.warn(r)}r.checkStrictMode=checkStrictMode},2867:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.shouldUseRule=r.shouldUseGroup=r.schemaHasRulesForType=void 0;function schemaHasRulesForType({schema:t,self:r},i){const o=r.RULES.types[i];return o&&o!==true&&shouldUseGroup(t,o)}r.schemaHasRulesForType=schemaHasRulesForType;function shouldUseGroup(t,r){return r.rules.some((r=>shouldUseRule(t,r)))}r.shouldUseGroup=shouldUseGroup;function shouldUseRule(t,r){var i;return t[r.keyword]!==undefined||((i=r.definition.implements)===null||i===void 0?void 0:i.some((r=>t[r]!==undefined)))}r.shouldUseRule=shouldUseRule},6499:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.boolOrEmptySchema=r.topBoolOrEmptySchema=void 0;const o=i(5456);const a=i(4809);const c=i(1267);const l={message:"boolean schema is false"};function topBoolOrEmptySchema(t){const{gen:r,schema:i,validateName:o}=t;if(i===false){falseSchemaError(t,false)}else if(typeof i=="object"&&i.$async===true){r.return(c.default.data)}else{r.assign((0,a._)`${o}.errors`,null);r.return(true)}}r.topBoolOrEmptySchema=topBoolOrEmptySchema;function boolOrEmptySchema(t,r){const{gen:i,schema:o}=t;if(o===false){i.var(r,false);falseSchemaError(t)}else{i.var(r,true)}}r.boolOrEmptySchema=boolOrEmptySchema;function falseSchemaError(t,r){const{gen:i,data:a}=t;const c={gen:i,keyword:"false schema",data:a,schema:false,schemaCode:false,schemaValue:false,params:{},it:t};(0,o.reportError)(c,l,undefined,r)}},5044:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.reportTypeError=r.checkDataTypes=r.checkDataType=r.coerceAndCheckDataType=r.getJSONTypes=r.getSchemaTypes=r.DataType=void 0;const o=i(8888);const a=i(2867);const c=i(5456);const l=i(4809);const u=i(4359);var h;(function(t){t[t["Correct"]=0]="Correct";t[t["Wrong"]=1]="Wrong"})(h||(r.DataType=h={}));function getSchemaTypes(t){const r=getJSONTypes(t.type);const i=r.includes("null");if(i){if(t.nullable===false)throw new Error("type: null contradicts nullable: false")}else{if(!r.length&&t.nullable!==undefined){throw new Error('"nullable" cannot be used without "type"')}if(t.nullable===true)r.push("null")}return r}r.getSchemaTypes=getSchemaTypes;function getJSONTypes(t){const r=Array.isArray(t)?t:t?[t]:[];if(r.every(o.isJSONType))return r;throw new Error("type must be JSONType or JSONType[]: "+r.join(","))}r.getJSONTypes=getJSONTypes;function coerceAndCheckDataType(t,r){const{gen:i,data:o,opts:c}=t;const l=coerceToTypes(r,c.coerceTypes);const u=r.length>0&&!(l.length===0&&r.length===1&&(0,a.schemaHasRulesForType)(t,r[0]));if(u){const a=checkDataTypes(r,o,c.strictNumbers,h.Wrong);i.if(a,(()=>{if(l.length)coerceData(t,r,l);else reportTypeError(t)}))}return u}r.coerceAndCheckDataType=coerceAndCheckDataType;const d=new Set(["string","number","integer","boolean","null"]);function coerceToTypes(t,r){return r?t.filter((t=>d.has(t)||r==="array"&&t==="array")):[]}function coerceData(t,r,i){const{gen:o,data:a,opts:c}=t;const u=o.let("dataType",(0,l._)`typeof ${a}`);const h=o.let("coerced",(0,l._)`undefined`);if(c.coerceTypes==="array"){o.if((0,l._)`${u} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,(()=>o.assign(a,(0,l._)`${a}[0]`).assign(u,(0,l._)`typeof ${a}`).if(checkDataTypes(r,a,c.strictNumbers),(()=>o.assign(h,a)))))}o.if((0,l._)`${h} !== undefined`);for(const t of i){if(d.has(t)||t==="array"&&c.coerceTypes==="array"){coerceSpecificType(t)}}o.else();reportTypeError(t);o.endIf();o.if((0,l._)`${h} !== undefined`,(()=>{o.assign(a,h);assignParentData(t,h)}));function coerceSpecificType(t){switch(t){case"string":o.elseIf((0,l._)`${u} == "number" || ${u} == "boolean"`).assign(h,(0,l._)`"" + ${a}`).elseIf((0,l._)`${a} === null`).assign(h,(0,l._)`""`);return;case"number":o.elseIf((0,l._)`${u} == "boolean" || ${a} === null
3
- || (${u} == "string" && ${a} && ${a} == +${a})`).assign(h,(0,l._)`+${a}`);return;case"integer":o.elseIf((0,l._)`${u} === "boolean" || ${a} === null
4
- || (${u} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(h,(0,l._)`+${a}`);return;case"boolean":o.elseIf((0,l._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(h,false).elseIf((0,l._)`${a} === "true" || ${a} === 1`).assign(h,true);return;case"null":o.elseIf((0,l._)`${a} === "" || ${a} === 0 || ${a} === false`);o.assign(h,null);return;case"array":o.elseIf((0,l._)`${u} === "string" || ${u} === "number"
5
- || ${u} === "boolean" || ${a} === null`).assign(h,(0,l._)`[${a}]`)}}}function assignParentData({gen:t,parentData:r,parentDataProperty:i},o){t.if((0,l._)`${r} !== undefined`,(()=>t.assign((0,l._)`${r}[${i}]`,o)))}function checkDataType(t,r,i,o=h.Correct){const a=o===h.Correct?l.operators.EQ:l.operators.NEQ;let c;switch(t){case"null":return(0,l._)`${r} ${a} null`;case"array":c=(0,l._)`Array.isArray(${r})`;break;case"object":c=(0,l._)`${r} && typeof ${r} == "object" && !Array.isArray(${r})`;break;case"integer":c=numCond((0,l._)`!(${r} % 1) && !isNaN(${r})`);break;case"number":c=numCond();break;default:return(0,l._)`typeof ${r} ${a} ${t}`}return o===h.Correct?c:(0,l.not)(c);function numCond(t=l.nil){return(0,l.and)((0,l._)`typeof ${r} == "number"`,t,i?(0,l._)`isFinite(${r})`:l.nil)}}r.checkDataType=checkDataType;function checkDataTypes(t,r,i,o){if(t.length===1){return checkDataType(t[0],r,i,o)}let a;const c=(0,u.toHash)(t);if(c.array&&c.object){const t=(0,l._)`typeof ${r} != "object"`;a=c.null?t:(0,l._)`!${r} || ${t}`;delete c.null;delete c.array;delete c.object}else{a=l.nil}if(c.number)delete c.integer;for(const t in c)a=(0,l.and)(a,checkDataType(t,r,i,o));return a}r.checkDataTypes=checkDataTypes;const p={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:r})=>typeof t=="string"?(0,l._)`{type: ${t}}`:(0,l._)`{type: ${r}}`};function reportTypeError(t){const r=getTypeErrorContext(t);(0,c.reportError)(r,p)}r.reportTypeError=reportTypeError;function getTypeErrorContext(t){const{gen:r,data:i,schema:o}=t;const a=(0,u.schemaRefOrVal)(t,o,"type");return{gen:r,keyword:"type",data:i,schema:o.type,schemaCode:a,schemaValue:a,parentSchema:o,params:{},it:t}}},5762:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.assignDefaults=void 0;const o=i(4809);const a=i(4359);function assignDefaults(t,r){const{properties:i,items:o}=t.schema;if(r==="object"&&i){for(const r in i){assignDefault(t,r,i[r].default)}}else if(r==="array"&&Array.isArray(o)){o.forEach(((r,i)=>assignDefault(t,i,r.default)))}}r.assignDefaults=assignDefaults;function assignDefault(t,r,i){const{gen:c,compositeRule:l,data:u,opts:h}=t;if(i===undefined)return;const d=(0,o._)`${u}${(0,o.getProperty)(r)}`;if(l){(0,a.checkStrictMode)(t,`default is ignored for: ${d}`);return}let p=(0,o._)`${d} === undefined`;if(h.useDefaults==="empty"){p=(0,o._)`${p} || ${d} === null || ${d} === ""`}c.if(p,(0,o._)`${d} = ${(0,o.stringify)(i)}`)}},9278:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.getData=r.KeywordCxt=r.validateFunctionCode=void 0;const o=i(6499);const a=i(5044);const c=i(2867);const l=i(5044);const u=i(5762);const h=i(3237);const d=i(5155);const p=i(4809);const m=i(1267);const g=i(5351);const y=i(4359);const v=i(5456);function validateFunctionCode(t){if(isSchemaObj(t)){checkKeywords(t);if(schemaCxtHasRules(t)){topSchemaObjCode(t);return}}validateFunction(t,(()=>(0,o.topBoolOrEmptySchema)(t)))}r.validateFunctionCode=validateFunctionCode;function validateFunction({gen:t,validateName:r,schema:i,schemaEnv:o,opts:a},c){if(a.code.es5){t.func(r,(0,p._)`${m.default.data}, ${m.default.valCxt}`,o.$async,(()=>{t.code((0,p._)`"use strict"; ${funcSourceUrl(i,a)}`);destructureValCxtES5(t,a);t.code(c)}))}else{t.func(r,(0,p._)`${m.default.data}, ${destructureValCxt(a)}`,o.$async,(()=>t.code(funcSourceUrl(i,a)).code(c)))}}function destructureValCxt(t){return(0,p._)`{${m.default.instancePath}="", ${m.default.parentData}, ${m.default.parentDataProperty}, ${m.default.rootData}=${m.default.data}${t.dynamicRef?(0,p._)`, ${m.default.dynamicAnchors}={}`:p.nil}}={}`}function destructureValCxtES5(t,r){t.if(m.default.valCxt,(()=>{t.var(m.default.instancePath,(0,p._)`${m.default.valCxt}.${m.default.instancePath}`);t.var(m.default.parentData,(0,p._)`${m.default.valCxt}.${m.default.parentData}`);t.var(m.default.parentDataProperty,(0,p._)`${m.default.valCxt}.${m.default.parentDataProperty}`);t.var(m.default.rootData,(0,p._)`${m.default.valCxt}.${m.default.rootData}`);if(r.dynamicRef)t.var(m.default.dynamicAnchors,(0,p._)`${m.default.valCxt}.${m.default.dynamicAnchors}`)}),(()=>{t.var(m.default.instancePath,(0,p._)`""`);t.var(m.default.parentData,(0,p._)`undefined`);t.var(m.default.parentDataProperty,(0,p._)`undefined`);t.var(m.default.rootData,m.default.data);if(r.dynamicRef)t.var(m.default.dynamicAnchors,(0,p._)`{}`)}))}function topSchemaObjCode(t){const{schema:r,opts:i,gen:o}=t;validateFunction(t,(()=>{if(i.$comment&&r.$comment)commentKeyword(t);checkNoDefault(t);o.let(m.default.vErrors,null);o.let(m.default.errors,0);if(i.unevaluated)resetEvaluated(t);typeAndKeywords(t);returnResults(t)}));return}function resetEvaluated(t){const{gen:r,validateName:i}=t;t.evaluated=r.const("evaluated",(0,p._)`${i}.evaluated`);r.if((0,p._)`${t.evaluated}.dynamicProps`,(()=>r.assign((0,p._)`${t.evaluated}.props`,(0,p._)`undefined`)));r.if((0,p._)`${t.evaluated}.dynamicItems`,(()=>r.assign((0,p._)`${t.evaluated}.items`,(0,p._)`undefined`)))}function funcSourceUrl(t,r){const i=typeof t=="object"&&t[r.schemaId];return i&&(r.code.source||r.code.process)?(0,p._)`/*# sourceURL=${i} */`:p.nil}function subschemaCode(t,r){if(isSchemaObj(t)){checkKeywords(t);if(schemaCxtHasRules(t)){subSchemaObjCode(t,r);return}}(0,o.boolOrEmptySchema)(t,r)}function schemaCxtHasRules({schema:t,self:r}){if(typeof t=="boolean")return!t;for(const i in t)if(r.RULES.all[i])return true;return false}function isSchemaObj(t){return typeof t.schema!="boolean"}function subSchemaObjCode(t,r){const{schema:i,gen:o,opts:a}=t;if(a.$comment&&i.$comment)commentKeyword(t);updateContext(t);checkAsyncSchema(t);const c=o.const("_errs",m.default.errors);typeAndKeywords(t,c);o.var(r,(0,p._)`${c} === ${m.default.errors}`)}function checkKeywords(t){(0,y.checkUnknownRules)(t);checkRefsAndKeywords(t)}function typeAndKeywords(t,r){if(t.opts.jtd)return schemaKeywords(t,[],false,r);const i=(0,a.getSchemaTypes)(t.schema);const o=(0,a.coerceAndCheckDataType)(t,i);schemaKeywords(t,i,!o,r)}function checkRefsAndKeywords(t){const{schema:r,errSchemaPath:i,opts:o,self:a}=t;if(r.$ref&&o.ignoreKeywordsWithRef&&(0,y.schemaHasRulesButRef)(r,a.RULES)){a.logger.warn(`$ref: keywords ignored in schema at path "${i}"`)}}function checkNoDefault(t){const{schema:r,opts:i}=t;if(r.default!==undefined&&i.useDefaults&&i.strictSchema){(0,y.checkStrictMode)(t,"default is ignored in the schema root")}}function updateContext(t){const r=t.schema[t.opts.schemaId];if(r)t.baseId=(0,g.resolveUrl)(t.opts.uriResolver,t.baseId,r)}function checkAsyncSchema(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function commentKeyword({gen:t,schemaEnv:r,schema:i,errSchemaPath:o,opts:a}){const c=i.$comment;if(a.$comment===true){t.code((0,p._)`${m.default.self}.logger.log(${c})`)}else if(typeof a.$comment=="function"){const i=(0,p.str)`${o}/$comment`;const a=t.scopeValue("root",{ref:r.root});t.code((0,p._)`${m.default.self}.opts.$comment(${c}, ${i}, ${a}.schema)`)}}function returnResults(t){const{gen:r,schemaEnv:i,validateName:o,ValidationError:a,opts:c}=t;if(i.$async){r.if((0,p._)`${m.default.errors} === 0`,(()=>r.return(m.default.data)),(()=>r.throw((0,p._)`new ${a}(${m.default.vErrors})`)))}else{r.assign((0,p._)`${o}.errors`,m.default.vErrors);if(c.unevaluated)assignEvaluated(t);r.return((0,p._)`${m.default.errors} === 0`)}}function assignEvaluated({gen:t,evaluated:r,props:i,items:o}){if(i instanceof p.Name)t.assign((0,p._)`${r}.props`,i);if(o instanceof p.Name)t.assign((0,p._)`${r}.items`,o)}function schemaKeywords(t,r,i,o){const{gen:a,schema:u,data:h,allErrors:d,opts:g,self:v}=t;const{RULES:b}=v;if(u.$ref&&(g.ignoreKeywordsWithRef||!(0,y.schemaHasRulesButRef)(u,b))){a.block((()=>keywordCode(t,"$ref",b.all.$ref.definition)));return}if(!g.jtd)checkStrictTypes(t,r);a.block((()=>{for(const t of b.rules)groupKeywords(t);groupKeywords(b.post)}));function groupKeywords(y){if(!(0,c.shouldUseGroup)(u,y))return;if(y.type){a.if((0,l.checkDataType)(y.type,h,g.strictNumbers));iterateKeywords(t,y);if(r.length===1&&r[0]===y.type&&i){a.else();(0,l.reportTypeError)(t)}a.endIf()}else{iterateKeywords(t,y)}if(!d)a.if((0,p._)`${m.default.errors} === ${o||0}`)}}function iterateKeywords(t,r){const{gen:i,schema:o,opts:{useDefaults:a}}=t;if(a)(0,u.assignDefaults)(t,r.type);i.block((()=>{for(const i of r.rules){if((0,c.shouldUseRule)(o,i)){keywordCode(t,i.keyword,i.definition,r.type)}}}))}function checkStrictTypes(t,r){if(t.schemaEnv.meta||!t.opts.strictTypes)return;checkContextTypes(t,r);if(!t.opts.allowUnionTypes)checkMultipleTypes(t,r);checkKeywordTypes(t,t.dataTypes)}function checkContextTypes(t,r){if(!r.length)return;if(!t.dataTypes.length){t.dataTypes=r;return}r.forEach((r=>{if(!includesType(t.dataTypes,r)){strictTypesError(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}}));narrowSchemaTypes(t,r)}function checkMultipleTypes(t,r){if(r.length>1&&!(r.length===2&&r.includes("null"))){strictTypesError(t,"use allowUnionTypes to allow union type keyword")}}function checkKeywordTypes(t,r){const i=t.self.RULES.all;for(const o in i){const a=i[o];if(typeof a=="object"&&(0,c.shouldUseRule)(t.schema,a)){const{type:i}=a.definition;if(i.length&&!i.some((t=>hasApplicableType(r,t)))){strictTypesError(t,`missing type "${i.join(",")}" for keyword "${o}"`)}}}}function hasApplicableType(t,r){return t.includes(r)||r==="number"&&t.includes("integer")}function includesType(t,r){return t.includes(r)||r==="integer"&&t.includes("number")}function narrowSchemaTypes(t,r){const i=[];for(const o of t.dataTypes){if(includesType(r,o))i.push(o);else if(r.includes("integer")&&o==="number")i.push("integer")}t.dataTypes=i}function strictTypesError(t,r){const i=t.schemaEnv.baseId+t.errSchemaPath;r+=` at "${i}" (strictTypes)`;(0,y.checkStrictMode)(t,r,t.opts.strictTypes)}class KeywordCxt{constructor(t,r,i){(0,h.validateKeywordUsage)(t,r,i);this.gen=t.gen;this.allErrors=t.allErrors;this.keyword=i;this.data=t.data;this.schema=t.schema[i];this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data;this.schemaValue=(0,y.schemaRefOrVal)(t,this.schema,i,this.$data);this.schemaType=r.schemaType;this.parentSchema=t.schema;this.params={};this.it=t;this.def=r;if(this.$data){this.schemaCode=t.gen.const("vSchema",getData(this.$data,t))}else{this.schemaCode=this.schemaValue;if(!(0,h.validSchemaType)(this.schema,r.schemaType,r.allowUndefined)){throw new Error(`${i} value must be ${JSON.stringify(r.schemaType)}`)}}if("code"in r?r.trackErrors:r.errors!==false){this.errsCount=t.gen.const("_errs",m.default.errors)}}result(t,r,i){this.failResult((0,p.not)(t),r,i)}failResult(t,r,i){this.gen.if(t);if(i)i();else this.error();if(r){this.gen.else();r();if(this.allErrors)this.gen.endIf()}else{if(this.allErrors)this.gen.endIf();else this.gen.else()}}pass(t,r){this.failResult((0,p.not)(t),undefined,r)}fail(t){if(t===undefined){this.error();if(!this.allErrors)this.gen.if(false);return}this.gen.if(t);this.error();if(this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail((0,p._)`${r} !== undefined && (${(0,p.or)(this.invalid$data(),t)})`)}error(t,r,i){if(r){this.setParams(r);this._error(t,i);this.setParams({});return}this._error(t,i)}_error(t,r){(t?v.reportExtraError:v.reportError)(this,this.def.error,r)}$dataError(){(0,v.reportError)(this,this.def.$dataError||v.keyword$DataError)}reset(){if(this.errsCount===undefined)throw new Error('add "trackErrors" to keyword definition');(0,v.resetErrorsCount)(this.gen,this.errsCount)}ok(t){if(!this.allErrors)this.gen.if(t)}setParams(t,r){if(r)Object.assign(this.params,t);else this.params=t}block$data(t,r,i=p.nil){this.gen.block((()=>{this.check$data(t,i);r()}))}check$data(t=p.nil,r=p.nil){if(!this.$data)return;const{gen:i,schemaCode:o,schemaType:a,def:c}=this;i.if((0,p.or)((0,p._)`${o} === undefined`,r));if(t!==p.nil)i.assign(t,true);if(a.length||c.validateSchema){i.elseIf(this.invalid$data());this.$dataError();if(t!==p.nil)i.assign(t,false)}i.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:i,def:o,it:a}=this;return(0,p.or)(wrong$DataType(),invalid$DataSchema());function wrong$DataType(){if(i.length){if(!(r instanceof p.Name))throw new Error("ajv implementation error");const t=Array.isArray(i)?i:[i];return(0,p._)`${(0,l.checkDataTypes)(t,r,a.opts.strictNumbers,l.DataType.Wrong)}`}return p.nil}function invalid$DataSchema(){if(o.validateSchema){const i=t.scopeValue("validate$data",{ref:o.validateSchema});return(0,p._)`!${i}(${r})`}return p.nil}}subschema(t,r){const i=(0,d.getSubschema)(this.it,t);(0,d.extendSubschemaData)(i,this.it,t);(0,d.extendSubschemaMode)(i,t);const o={...this.it,...i,items:undefined,props:undefined};subschemaCode(o,r);return o}mergeEvaluated(t,r){const{it:i,gen:o}=this;if(!i.opts.unevaluated)return;if(i.props!==true&&t.props!==undefined){i.props=y.mergeEvaluated.props(o,t.props,i.props,r)}if(i.items!==true&&t.items!==undefined){i.items=y.mergeEvaluated.items(o,t.items,i.items,r)}}mergeValidEvaluated(t,r){const{it:i,gen:o}=this;if(i.opts.unevaluated&&(i.props!==true||i.items!==true)){o.if(r,(()=>this.mergeEvaluated(t,p.Name)));return true}}}r.KeywordCxt=KeywordCxt;function keywordCode(t,r,i,o){const a=new KeywordCxt(t,i,r);if("code"in i){i.code(a,o)}else if(a.$data&&i.validate){(0,h.funcKeywordCode)(a,i)}else if("macro"in i){(0,h.macroKeywordCode)(a,i)}else if(i.compile||i.validate){(0,h.funcKeywordCode)(a,i)}}const b=/^\/(?:[^~]|~0|~1)*$/;const w=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData(t,{dataLevel:r,dataNames:i,dataPathArr:o}){let a;let c;if(t==="")return m.default.rootData;if(t[0]==="/"){if(!b.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);a=t;c=m.default.rootData}else{const l=w.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);const u=+l[1];a=l[2];if(a==="#"){if(u>=r)throw new Error(errorMsg("property/index",u));return o[r-u]}if(u>r)throw new Error(errorMsg("data",u));c=i[r-u];if(!a)return c}let l=c;const u=a.split("/");for(const t of u){if(t){c=(0,p._)`${c}${(0,p.getProperty)((0,y.unescapeJsonPointer)(t))}`;l=(0,p._)`${l} && ${c}`}}return l;function errorMsg(t,i){return`Cannot access ${t} ${i} levels up, current level is ${r}`}}r.getData=getData},3237:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.validateKeywordUsage=r.validSchemaType=r.funcKeywordCode=r.macroKeywordCode=void 0;const o=i(4809);const a=i(1267);const c=i(9689);const l=i(5456);function macroKeywordCode(t,r){const{gen:i,keyword:a,schema:c,parentSchema:l,it:u}=t;const h=r.macro.call(u.self,c,l,u);const d=useKeyword(i,a,h);if(u.opts.validateSchema!==false)u.self.validateSchema(h,true);const p=i.name("valid");t.subschema({schema:h,schemaPath:o.nil,errSchemaPath:`${u.errSchemaPath}/${a}`,topSchemaRef:d,compositeRule:true},p);t.pass(p,(()=>t.error(true)))}r.macroKeywordCode=macroKeywordCode;function funcKeywordCode(t,r){var i;const{gen:l,keyword:u,schema:h,parentSchema:d,$data:p,it:m}=t;checkAsyncKeyword(m,r);const g=!p&&r.compile?r.compile.call(m.self,h,d,m):r.validate;const y=useKeyword(l,u,g);const v=l.let("valid");t.block$data(v,validateKeyword);t.ok((i=r.valid)!==null&&i!==void 0?i:v);function validateKeyword(){if(r.errors===false){assignValid();if(r.modifying)modifyData(t);reportErrs((()=>t.error()))}else{const i=r.async?validateAsync():validateSync();if(r.modifying)modifyData(t);reportErrs((()=>addErrs(t,i)))}}function validateAsync(){const t=l.let("ruleErrs",null);l.try((()=>assignValid((0,o._)`await `)),(r=>l.assign(v,false).if((0,o._)`${r} instanceof ${m.ValidationError}`,(()=>l.assign(t,(0,o._)`${r}.errors`)),(()=>l.throw(r)))));return t}function validateSync(){const t=(0,o._)`${y}.errors`;l.assign(t,null);assignValid(o.nil);return t}function assignValid(i=(r.async?(0,o._)`await `:o.nil)){const u=m.opts.passContext?a.default.this:a.default.self;const h=!("compile"in r&&!p||r.schema===false);l.assign(v,(0,o._)`${i}${(0,c.callValidateCode)(t,y,u,h)}`,r.modifying)}function reportErrs(t){var i;l.if((0,o.not)((i=r.valid)!==null&&i!==void 0?i:v),t)}}r.funcKeywordCode=funcKeywordCode;function modifyData(t){const{gen:r,data:i,it:a}=t;r.if(a.parentData,(()=>r.assign(i,(0,o._)`${a.parentData}[${a.parentDataProperty}]`)))}function addErrs(t,r){const{gen:i}=t;i.if((0,o._)`Array.isArray(${r})`,(()=>{i.assign(a.default.vErrors,(0,o._)`${a.default.vErrors} === null ? ${r} : ${a.default.vErrors}.concat(${r})`).assign(a.default.errors,(0,o._)`${a.default.vErrors}.length`);(0,l.extendErrors)(t)}),(()=>t.error()))}function checkAsyncKeyword({schemaEnv:t},r){if(r.async&&!t.$async)throw new Error("async keyword in sync schema")}function useKeyword(t,r,i){if(i===undefined)throw new Error(`keyword "${r}" failed to compile`);return t.scopeValue("keyword",typeof i=="function"?{ref:i}:{ref:i,code:(0,o.stringify)(i)})}function validSchemaType(t,r,i=false){return!r.length||r.some((r=>r==="array"?Array.isArray(t):r==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==r||i&&typeof t=="undefined"))}r.validSchemaType=validSchemaType;function validateKeywordUsage({schema:t,opts:r,self:i,errSchemaPath:o},a,c){if(Array.isArray(a.keyword)?!a.keyword.includes(c):a.keyword!==c){throw new Error("ajv implementation error")}const l=a.dependencies;if(l===null||l===void 0?void 0:l.some((r=>!Object.prototype.hasOwnProperty.call(t,r)))){throw new Error(`parent schema must have dependencies of ${c}: ${l.join(",")}`)}if(a.validateSchema){const l=a.validateSchema(t[c]);if(!l){const t=`keyword "${c}" value is invalid at path "${o}": `+i.errorsText(a.validateSchema.errors);if(r.validateSchema==="log")i.logger.error(t);else throw new Error(t)}}}r.validateKeywordUsage=validateKeywordUsage},5155:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.extendSubschemaMode=r.extendSubschemaData=r.getSubschema=void 0;const o=i(4809);const a=i(4359);function getSubschema(t,{keyword:r,schemaProp:i,schema:c,schemaPath:l,errSchemaPath:u,topSchemaRef:h}){if(r!==undefined&&c!==undefined){throw new Error('both "keyword" and "schema" passed, only one allowed')}if(r!==undefined){const c=t.schema[r];return i===undefined?{schema:c,schemaPath:(0,o._)`${t.schemaPath}${(0,o.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${r}`}:{schema:c[i],schemaPath:(0,o._)`${t.schemaPath}${(0,o.getProperty)(r)}${(0,o.getProperty)(i)}`,errSchemaPath:`${t.errSchemaPath}/${r}/${(0,a.escapeFragment)(i)}`}}if(c!==undefined){if(l===undefined||u===undefined||h===undefined){throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"')}return{schema:c,schemaPath:l,topSchemaRef:h,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}r.getSubschema=getSubschema;function extendSubschemaData(t,r,{dataProp:i,dataPropType:c,data:l,dataTypes:u,propertyName:h}){if(l!==undefined&&i!==undefined){throw new Error('both "data" and "dataProp" passed, only one allowed')}const{gen:d}=r;if(i!==undefined){const{errorPath:l,dataPathArr:u,opts:h}=r;const p=d.let("data",(0,o._)`${r.data}${(0,o.getProperty)(i)}`,true);dataContextProps(p);t.errorPath=(0,o.str)`${l}${(0,a.getErrorPath)(i,c,h.jsPropertySyntax)}`;t.parentDataProperty=(0,o._)`${i}`;t.dataPathArr=[...u,t.parentDataProperty]}if(l!==undefined){const r=l instanceof o.Name?l:d.let("data",l,true);dataContextProps(r);if(h!==undefined)t.propertyName=h}if(u)t.dataTypes=u;function dataContextProps(i){t.data=i;t.dataLevel=r.dataLevel+1;t.dataTypes=[];r.definedProperties=new Set;t.parentData=r.data;t.dataNames=[...r.dataNames,i]}}r.extendSubschemaData=extendSubschemaData;function extendSubschemaMode(t,{jtdDiscriminator:r,jtdMetadata:i,compositeRule:o,createErrors:a,allErrors:c}){if(o!==undefined)t.compositeRule=o;if(a!==undefined)t.createErrors=a;if(c!==undefined)t.allErrors=c;t.jtdDiscriminator=r;t.jtdMetadata=i}r.extendSubschemaMode=extendSubschemaMode},7326:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=void 0;var o=i(9278);Object.defineProperty(r,"KeywordCxt",{enumerable:true,get:function(){return o.KeywordCxt}});var a=i(4809);Object.defineProperty(r,"_",{enumerable:true,get:function(){return a._}});Object.defineProperty(r,"str",{enumerable:true,get:function(){return a.str}});Object.defineProperty(r,"stringify",{enumerable:true,get:function(){return a.stringify}});Object.defineProperty(r,"nil",{enumerable:true,get:function(){return a.nil}});Object.defineProperty(r,"Name",{enumerable:true,get:function(){return a.Name}});Object.defineProperty(r,"CodeGen",{enumerable:true,get:function(){return a.CodeGen}});const c=i(4242);const l=i(8547);const u=i(8888);const h=i(2407);const d=i(4809);const p=i(5351);const m=i(5044);const g=i(4359);const y=i(2200);const v=i(5836);const defaultRegExp=(t,r)=>new RegExp(t,r);defaultRegExp.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"];const w=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]);const E={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."};const S={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};const $=200;function requiredOptions(t){var r,i,o,a,c,l,u,h,d,p,m,g,y,b,w,E,S,O,R,P,A,x,T,C,k;const I=t.strict;const N=(r=t.code)===null||r===void 0?void 0:r.optimize;const D=N===true||N===undefined?1:N||0;const L=(o=(i=t.code)===null||i===void 0?void 0:i.regExp)!==null&&o!==void 0?o:defaultRegExp;const M=(a=t.uriResolver)!==null&&a!==void 0?a:v.default;return{strictSchema:(l=(c=t.strictSchema)!==null&&c!==void 0?c:I)!==null&&l!==void 0?l:true,strictNumbers:(h=(u=t.strictNumbers)!==null&&u!==void 0?u:I)!==null&&h!==void 0?h:true,strictTypes:(p=(d=t.strictTypes)!==null&&d!==void 0?d:I)!==null&&p!==void 0?p:"log",strictTuples:(g=(m=t.strictTuples)!==null&&m!==void 0?m:I)!==null&&g!==void 0?g:"log",strictRequired:(b=(y=t.strictRequired)!==null&&y!==void 0?y:I)!==null&&b!==void 0?b:false,code:t.code?{...t.code,optimize:D,regExp:L}:{optimize:D,regExp:L},loopRequired:(w=t.loopRequired)!==null&&w!==void 0?w:$,loopEnum:(E=t.loopEnum)!==null&&E!==void 0?E:$,meta:(S=t.meta)!==null&&S!==void 0?S:true,messages:(O=t.messages)!==null&&O!==void 0?O:true,inlineRefs:(R=t.inlineRefs)!==null&&R!==void 0?R:true,schemaId:(P=t.schemaId)!==null&&P!==void 0?P:"$id",addUsedSchema:(A=t.addUsedSchema)!==null&&A!==void 0?A:true,validateSchema:(x=t.validateSchema)!==null&&x!==void 0?x:true,validateFormats:(T=t.validateFormats)!==null&&T!==void 0?T:true,unicodeRegExp:(C=t.unicodeRegExp)!==null&&C!==void 0?C:true,int32range:(k=t.int32range)!==null&&k!==void 0?k:true,uriResolver:M}}class Ajv{constructor(t={}){this.schemas={};this.refs={};this.formats={};this._compilations=new Set;this._loading={};this._cache=new Map;t=this.opts={...t,...requiredOptions(t)};const{es5:r,lines:i}=this.opts.code;this.scope=new d.ValueScope({scope:{},prefixes:w,es5:r,lines:i});this.logger=getLogger(t.logger);const o=t.validateFormats;t.validateFormats=false;this.RULES=(0,u.getRules)();checkOptions.call(this,E,t,"NOT SUPPORTED");checkOptions.call(this,S,t,"DEPRECATED","warn");this._metaOpts=getMetaSchemaOptions.call(this);if(t.formats)addInitialFormats.call(this);this._addVocabularies();this._addDefaultMetaSchema();if(t.keywords)addInitialKeywords.call(this,t.keywords);if(typeof t.meta=="object")this.addMetaSchema(t.meta);addInitialSchemas.call(this);t.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:t,meta:r,schemaId:i}=this.opts;let o=y;if(i==="id"){o={...y};o.id=o.$id;delete o.$id}if(r&&t)this.addMetaSchema(o,o[i],false)}defaultMeta(){const{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:undefined}validate(t,r){let i;if(typeof t=="string"){i=this.getSchema(t);if(!i)throw new Error(`no schema with key or ref "${t}"`)}else{i=this.compile(t)}const o=i(r);if(!("$async"in i))this.errors=i.errors;return o}compile(t,r){const i=this._addSchema(t,r);return i.validate||this._compileSchemaEnv(i)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function"){throw new Error("options.loadSchema should be a function")}const{loadSchema:i}=this.opts;return runCompileAsync.call(this,t,r);async function runCompileAsync(t,r){await loadMetaSchema.call(this,t.$schema);const i=this._addSchema(t,r);return i.validate||_compileAsync.call(this,i)}async function loadMetaSchema(t){if(t&&!this.getSchema(t)){await runCompileAsync.call(this,{$ref:t},true)}}async function _compileAsync(t){try{return this._compileSchemaEnv(t)}catch(r){if(!(r instanceof l.default))throw r;checkLoaded.call(this,r);await loadMissingSchema.call(this,r.missingSchema);return _compileAsync.call(this,t)}}function checkLoaded({missingSchema:t,missingRef:r}){if(this.refs[t]){throw new Error(`AnySchema ${t} is loaded but ${r} cannot be resolved`)}}async function loadMissingSchema(t){const i=await _loadSchema.call(this,t);if(!this.refs[t])await loadMetaSchema.call(this,i.$schema);if(!this.refs[t])this.addSchema(i,t,r)}async function _loadSchema(t){const r=this._loading[t];if(r)return r;try{return await(this._loading[t]=i(t))}finally{delete this._loading[t]}}}addSchema(t,r,i,o=this.opts.validateSchema){if(Array.isArray(t)){for(const r of t)this.addSchema(r,undefined,i,o);return this}let a;if(typeof t==="object"){const{schemaId:r}=this.opts;a=t[r];if(a!==undefined&&typeof a!="string"){throw new Error(`schema ${r} must be string`)}}r=(0,p.normalizeId)(r||a);this._checkUnique(r);this.schemas[r]=this._addSchema(t,i,r,o,true);return this}addMetaSchema(t,r,i=this.opts.validateSchema){this.addSchema(t,r,true,i);return this}validateSchema(t,r){if(typeof t=="boolean")return true;let i;i=t.$schema;if(i!==undefined&&typeof i!="string"){throw new Error("$schema must be a string")}i=i||this.opts.defaultMeta||this.defaultMeta();if(!i){this.logger.warn("meta-schema not available");this.errors=null;return true}const o=this.validate(i,t);if(!o&&r){const t="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(t);else throw new Error(t)}return o}getSchema(t){let r;while(typeof(r=getSchEnv.call(this,t))=="string")t=r;if(r===undefined){const{schemaId:i}=this.opts;const o=new h.SchemaEnv({schema:{},schemaId:i});r=h.resolveSchema.call(this,o,t);if(!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp){this._removeAllSchemas(this.schemas,t);this._removeAllSchemas(this.refs,t);return this}switch(typeof t){case"undefined":this._removeAllSchemas(this.schemas);this._removeAllSchemas(this.refs);this._cache.clear();return this;case"string":{const r=getSchEnv.call(this,t);if(typeof r=="object")this._cache.delete(r.schema);delete this.schemas[t];delete this.refs[t];return this}case"object":{const r=t;this._cache.delete(r);let i=t[this.opts.schemaId];if(i){i=(0,p.normalizeId)(i);delete this.schemas[i];delete this.refs[i]}return this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(const r of t)this.addKeyword(r);return this}addKeyword(t,r){let i;if(typeof t=="string"){i=t;if(typeof r=="object"){this.logger.warn("these parameters are deprecated, see docs for addKeyword");r.keyword=i}}else if(typeof t=="object"&&r===undefined){r=t;i=r.keyword;if(Array.isArray(i)&&!i.length){throw new Error("addKeywords: keyword must be string or non-empty array")}}else{throw new Error("invalid addKeywords parameters")}checkKeyword.call(this,i,r);if(!r){(0,g.eachItem)(i,(t=>addRule.call(this,t)));return this}keywordMetaschema.call(this,r);const o={...r,type:(0,m.getJSONTypes)(r.type),schemaType:(0,m.getJSONTypes)(r.schemaType)};(0,g.eachItem)(i,o.type.length===0?t=>addRule.call(this,t,o):t=>o.type.forEach((r=>addRule.call(this,t,o,r))));return this}getKeyword(t){const r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){const{RULES:r}=this;delete r.keywords[t];delete r.all[t];for(const i of r.rules){const r=i.rules.findIndex((r=>r.keyword===t));if(r>=0)i.rules.splice(r,1)}return this}addFormat(t,r){if(typeof r=="string")r=new RegExp(r);this.formats[t]=r;return this}errorsText(t=this.errors,{separator:r=", ",dataVar:i="data"}={}){if(!t||t.length===0)return"No errors";return t.map((t=>`${i}${t.instancePath} ${t.message}`)).reduce(((t,i)=>t+r+i))}$dataMetaSchema(t,r){const i=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(const o of r){const r=o.split("/").slice(1);let a=t;for(const t of r)a=a[t];for(const t in i){const r=i[t];if(typeof r!="object")continue;const{$data:o}=r.definition;const c=a[t];if(o&&c)a[t]=schemaOrData(c)}}return t}_removeAllSchemas(t,r){for(const i in t){const o=t[i];if(!r||r.test(i)){if(typeof o=="string"){delete t[i]}else if(o&&!o.meta){this._cache.delete(o.schema);delete t[i]}}}}_addSchema(t,r,i,o=this.opts.validateSchema,a=this.opts.addUsedSchema){let c;const{schemaId:l}=this.opts;if(typeof t=="object"){c=t[l]}else{if(this.opts.jtd)throw new Error("schema must be object");else if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(t);if(u!==undefined)return u;i=(0,p.normalizeId)(c||i);const d=p.getSchemaRefs.call(this,t,i);u=new h.SchemaEnv({schema:t,schemaId:l,meta:r,baseId:i,localRefs:d});this._cache.set(u.schema,u);if(a&&!i.startsWith("#")){if(i)this._checkUnique(i);this.refs[i]=u}if(o)this.validateSchema(t,true);return u}_checkUnique(t){if(this.schemas[t]||this.refs[t]){throw new Error(`schema with key or id "${t}" already exists`)}}_compileSchemaEnv(t){if(t.meta)this._compileMetaSchema(t);else h.compileSchema.call(this,t);if(!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){const r=this.opts;this.opts=this._metaOpts;try{h.compileSchema.call(this,t)}finally{this.opts=r}}}Ajv.ValidationError=c.default;Ajv.MissingRefError=l.default;r["default"]=Ajv;function checkOptions(t,r,i,o="error"){for(const a in t){const c=a;if(c in r)this.logger[o](`${i}: option ${a}. ${t[c]}`)}}function getSchEnv(t){t=(0,p.normalizeId)(t);return this.schemas[t]||this.refs[t]}function addInitialSchemas(){const t=this.opts.schemas;if(!t)return;if(Array.isArray(t))this.addSchema(t);else for(const r in t)this.addSchema(t[r],r)}function addInitialFormats(){for(const t in this.opts.formats){const r=this.opts.formats[t];if(r)this.addFormat(t,r)}}function addInitialKeywords(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const r in t){const i=t[r];if(!i.keyword)i.keyword=r;this.addKeyword(i)}}function getMetaSchemaOptions(){const t={...this.opts};for(const r of b)delete t[r];return t}const O={log(){},warn(){},error(){}};function getLogger(t){if(t===false)return O;if(t===undefined)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}const R=/^[a-z_$][a-z0-9_$:-]*$/i;function checkKeyword(t,r){const{RULES:i}=this;(0,g.eachItem)(t,(t=>{if(i.keywords[t])throw new Error(`Keyword ${t} is already defined`);if(!R.test(t))throw new Error(`Keyword ${t} has invalid name`)}));if(!r)return;if(r.$data&&!("code"in r||"validate"in r)){throw new Error('$data keyword must have "code" or "validate" function')}}function addRule(t,r,i){var o;const a=r===null||r===void 0?void 0:r.post;if(i&&a)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:c}=this;let l=a?c.post:c.rules.find((({type:t})=>t===i));if(!l){l={type:i,rules:[]};c.rules.push(l)}c.keywords[t]=true;if(!r)return;const u={keyword:t,definition:{...r,type:(0,m.getJSONTypes)(r.type),schemaType:(0,m.getJSONTypes)(r.schemaType)}};if(r.before)addBeforeRule.call(this,l,u,r.before);else l.rules.push(u);c.all[t]=u;(o=r.implements)===null||o===void 0?void 0:o.forEach((t=>this.addKeyword(t)))}function addBeforeRule(t,r,i){const o=t.rules.findIndex((t=>t.keyword===i));if(o>=0){t.rules.splice(o,0,r)}else{t.rules.push(r);this.logger.warn(`rule ${i} is not defined`)}}function keywordMetaschema(t){let{metaSchema:r}=t;if(r===undefined)return;if(t.$data&&this.opts.$data)r=schemaOrData(r);t.validateSchema=this.compile(r,true)}const P={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function schemaOrData(t){return{anyOf:[t,P]}}},440:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(1115);const a=i(5727);const c=i(8606);const l=i(1447);const u=i(4877);const h=i(9041);const d=i(5118);const p=i(3073);const m=["/properties"];function addMetaSchema2020(t){[o,a,c,l,u,with$data(this,h),d,with$data(this,p)].forEach((t=>this.addMetaSchema(t,undefined,false)));return this;function with$data(r,i){return t?r.$dataMetaSchema(i,m):i}}r["default"]=addMetaSchema2020},9502:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(3222);o.code='require("ajv/dist/runtime/equal").default';r["default"]=o},7169:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});function ucs2length(t){const r=t.length;let i=0;let o=0;let a;while(o<r){i++;a=t.charCodeAt(o++);if(a>=55296&&a<=56319&&o<r){a=t.charCodeAt(o);if((a&64512)===56320)o++}}return i}r["default"]=ucs2length;ucs2length.code='require("ajv/dist/runtime/ucs2length").default'},5836:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(6564);o.code='require("ajv/dist/runtime/uri").default';r["default"]=o},4242:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});class ValidationError extends Error{constructor(t){super("validation failed");this.errors=t;this.ajv=this.validation=true}}r["default"]=ValidationError},8549:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.validateAdditionalItems=void 0;const o=i(4809);const a=i(4359);const c={message:({params:{len:t}})=>(0,o.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,o._)`{limit: ${t}}`};const l={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:c,code(t){const{parentSchema:r,it:i}=t;const{items:o}=r;if(!Array.isArray(o)){(0,a.checkStrictMode)(i,'"additionalItems" is ignored when "items" is not an array of schemas');return}validateAdditionalItems(t,o)}};function validateAdditionalItems(t,r){const{gen:i,schema:c,data:l,keyword:u,it:h}=t;h.items=true;const d=i.const("len",(0,o._)`${l}.length`);if(c===false){t.setParams({len:r.length});t.pass((0,o._)`${d} <= ${r.length}`)}else if(typeof c=="object"&&!(0,a.alwaysValidSchema)(h,c)){const a=i.var("valid",(0,o._)`${d} <= ${r.length}`);i.if((0,o.not)(a),(()=>validateItems(a)));t.ok(a)}function validateItems(c){i.forRange("i",r.length,d,(r=>{t.subschema({keyword:u,dataProp:r,dataPropType:a.Type.Num},c);if(!h.allErrors)i.if((0,o.not)(c),(()=>i.break()))}))}}r.validateAdditionalItems=validateAdditionalItems;r["default"]=l},1800:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(9689);const a=i(4809);const c=i(1267);const l=i(4359);const u={message:"must NOT have additional properties",params:({params:t})=>(0,a._)`{additionalProperty: ${t.additionalProperty}}`};const h={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:true,trackErrors:true,error:u,code(t){const{gen:r,schema:i,parentSchema:u,data:h,errsCount:d,it:p}=t;if(!d)throw new Error("ajv implementation error");const{allErrors:m,opts:g}=p;p.props=true;if(g.removeAdditional!=="all"&&(0,l.alwaysValidSchema)(p,i))return;const y=(0,o.allSchemaProperties)(u.properties);const v=(0,o.allSchemaProperties)(u.patternProperties);checkAdditionalProperties();t.ok((0,a._)`${d} === ${c.default.errors}`);function checkAdditionalProperties(){r.forIn("key",h,(t=>{if(!y.length&&!v.length)additionalPropertyCode(t);else r.if(isAdditional(t),(()=>additionalPropertyCode(t)))}))}function isAdditional(i){let c;if(y.length>8){const t=(0,l.schemaRefOrVal)(p,u.properties,"properties");c=(0,o.isOwnProperty)(r,t,i)}else if(y.length){c=(0,a.or)(...y.map((t=>(0,a._)`${i} === ${t}`)))}else{c=a.nil}if(v.length){c=(0,a.or)(c,...v.map((r=>(0,a._)`${(0,o.usePattern)(t,r)}.test(${i})`)))}return(0,a.not)(c)}function deleteAdditional(t){r.code((0,a._)`delete ${h}[${t}]`)}function additionalPropertyCode(o){if(g.removeAdditional==="all"||g.removeAdditional&&i===false){deleteAdditional(o);return}if(i===false){t.setParams({additionalProperty:o});t.error();if(!m)r.break();return}if(typeof i=="object"&&!(0,l.alwaysValidSchema)(p,i)){const i=r.name("valid");if(g.removeAdditional==="failing"){applyAdditionalSchema(o,i,false);r.if((0,a.not)(i),(()=>{t.reset();deleteAdditional(o)}))}else{applyAdditionalSchema(o,i);if(!m)r.if((0,a.not)(i),(()=>r.break()))}}}function applyAdditionalSchema(r,i,o){const a={keyword:"additionalProperties",dataProp:r,dataPropType:l.Type.Str};if(o===false){Object.assign(a,{compositeRule:true,createErrors:false,allErrors:false})}t.subschema(a,i)}}};r["default"]=h},8768:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4359);const a={keyword:"allOf",schemaType:"array",code(t){const{gen:r,schema:i,it:a}=t;if(!Array.isArray(i))throw new Error("ajv implementation error");const c=r.name("valid");i.forEach(((r,i)=>{if((0,o.alwaysValidSchema)(a,r))return;const l=t.subschema({keyword:"allOf",schemaProp:i},c);t.ok(c);t.mergeEvaluated(l)}))}};r["default"]=a},8829:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(9689);const a={keyword:"anyOf",schemaType:"array",trackErrors:true,code:o.validateUnion,error:{message:"must match a schema in anyOf"}};r["default"]=a},5705:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4809);const a=i(4359);const c={message:({params:{min:t,max:r}})=>r===undefined?(0,o.str)`must contain at least ${t} valid item(s)`:(0,o.str)`must contain at least ${t} and no more than ${r} valid item(s)`,params:({params:{min:t,max:r}})=>r===undefined?(0,o._)`{minContains: ${t}}`:(0,o._)`{minContains: ${t}, maxContains: ${r}}`};const l={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:true,error:c,code(t){const{gen:r,schema:i,parentSchema:c,data:l,it:u}=t;let h;let d;const{minContains:p,maxContains:m}=c;if(u.opts.next){h=p===undefined?1:p;d=m}else{h=1}const g=r.const("len",(0,o._)`${l}.length`);t.setParams({min:h,max:d});if(d===undefined&&h===0){(0,a.checkStrictMode)(u,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(d!==undefined&&h>d){(0,a.checkStrictMode)(u,`"minContains" > "maxContains" is always invalid`);t.fail();return}if((0,a.alwaysValidSchema)(u,i)){let r=(0,o._)`${g} >= ${h}`;if(d!==undefined)r=(0,o._)`${r} && ${g} <= ${d}`;t.pass(r);return}u.items=true;const y=r.name("valid");if(d===undefined&&h===1){validateItems(y,(()=>r.if(y,(()=>r.break()))))}else if(h===0){r.let(y,true);if(d!==undefined)r.if((0,o._)`${l}.length > 0`,validateItemsWithCount)}else{r.let(y,false);validateItemsWithCount()}t.result(y,(()=>t.reset()));function validateItemsWithCount(){const t=r.name("_valid");const i=r.let("count",0);validateItems(t,(()=>r.if(t,(()=>checkLimits(i)))))}function validateItems(i,o){r.forRange("i",0,g,(r=>{t.subschema({keyword:"contains",dataProp:r,dataPropType:a.Type.Num,compositeRule:true},i);o()}))}function checkLimits(t){r.code((0,o._)`${t}++`);if(d===undefined){r.if((0,o._)`${t} >= ${h}`,(()=>r.assign(y,true).break()))}else{r.if((0,o._)`${t} > ${d}`,(()=>r.assign(y,false).break()));if(h===1)r.assign(y,true);else r.if((0,o._)`${t} >= ${h}`,(()=>r.assign(y,true)))}}}};r["default"]=l},9989:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.validateSchemaDeps=r.validatePropertyDeps=r.error=void 0;const o=i(4809);const a=i(4359);const c=i(9689);r.error={message:({params:{property:t,depsCount:r,deps:i}})=>{const a=r===1?"property":"properties";return(0,o.str)`must have ${a} ${i} when property ${t} is present`},params:({params:{property:t,depsCount:r,deps:i,missingProperty:a}})=>(0,o._)`{property: ${t},
6
- missingProperty: ${a},
7
- depsCount: ${r},
8
- deps: ${i}}`};const l={keyword:"dependencies",type:"object",schemaType:"object",error:r.error,code(t){const[r,i]=splitDependencies(t);validatePropertyDeps(t,r);validateSchemaDeps(t,i)}};function splitDependencies({schema:t}){const r={};const i={};for(const o in t){if(o==="__proto__")continue;const a=Array.isArray(t[o])?r:i;a[o]=t[o]}return[r,i]}function validatePropertyDeps(t,r=t.schema){const{gen:i,data:a,it:l}=t;if(Object.keys(r).length===0)return;const u=i.let("missing");for(const h in r){const d=r[h];if(d.length===0)continue;const p=(0,c.propertyInData)(i,a,h,l.opts.ownProperties);t.setParams({property:h,depsCount:d.length,deps:d.join(", ")});if(l.allErrors){i.if(p,(()=>{for(const r of d){(0,c.checkReportMissingProp)(t,r)}}))}else{i.if((0,o._)`${p} && (${(0,c.checkMissingProp)(t,d,u)})`);(0,c.reportMissingProp)(t,u);i.else()}}}r.validatePropertyDeps=validatePropertyDeps;function validateSchemaDeps(t,r=t.schema){const{gen:i,data:o,keyword:l,it:u}=t;const h=i.name("valid");for(const d in r){if((0,a.alwaysValidSchema)(u,r[d]))continue;i.if((0,c.propertyInData)(i,o,d,u.opts.ownProperties),(()=>{const r=t.subschema({keyword:l,schemaProp:d},h);t.mergeValidEvaluated(r,h)}),(()=>i.var(h,true)));t.ok(h)}}r.validateSchemaDeps=validateSchemaDeps;r["default"]=l},961:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(9989);const a={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,o.validateSchemaDeps)(t)};r["default"]=a},9043:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4809);const a=i(4359);const c={message:({params:t})=>(0,o.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,o._)`{failingKeyword: ${t.ifClause}}`};const l={keyword:"if",schemaType:["object","boolean"],trackErrors:true,error:c,code(t){const{gen:r,parentSchema:i,it:c}=t;if(i.then===undefined&&i.else===undefined){(0,a.checkStrictMode)(c,'"if" without "then" and "else" is ignored')}const l=hasSchema(c,"then");const u=hasSchema(c,"else");if(!l&&!u)return;const h=r.let("valid",true);const d=r.name("_valid");validateIf();t.reset();if(l&&u){const i=r.let("ifClause");t.setParams({ifClause:i});r.if(d,validateClause("then",i),validateClause("else",i))}else if(l){r.if(d,validateClause("then"))}else{r.if((0,o.not)(d),validateClause("else"))}t.pass(h,(()=>t.error(true)));function validateIf(){const r=t.subschema({keyword:"if",compositeRule:true,createErrors:false,allErrors:false},d);t.mergeEvaluated(r)}function validateClause(i,a){return()=>{const c=t.subschema({keyword:i},d);r.assign(h,d);t.mergeValidEvaluated(c,h);if(a)r.assign(a,(0,o._)`${i}`);else t.setParams({ifClause:i})}}}};function hasSchema(t,r){const i=t.schema[r];return i!==undefined&&!(0,a.alwaysValidSchema)(t,i)}r["default"]=l},8926:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(8549);const a=i(6286);const c=i(386);const l=i(9794);const u=i(5705);const h=i(9989);const d=i(8285);const p=i(1800);const m=i(1257);const g=i(5537);const y=i(9975);const v=i(8829);const b=i(9399);const w=i(8768);const E=i(9043);const S=i(3870);function getApplicator(t=false){const r=[y.default,v.default,b.default,w.default,E.default,S.default,d.default,p.default,h.default,m.default,g.default];if(t)r.push(a.default,l.default);else r.push(o.default,c.default);r.push(u.default);return r}r["default"]=getApplicator},386:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.validateTuple=void 0;const o=i(4809);const a=i(4359);const c=i(9689);const l={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:r,it:i}=t;if(Array.isArray(r))return validateTuple(t,"additionalItems",r);i.items=true;if((0,a.alwaysValidSchema)(i,r))return;t.ok((0,c.validateArray)(t))}};function validateTuple(t,r,i=t.schema){const{gen:c,parentSchema:l,data:u,keyword:h,it:d}=t;checkStrictTuple(l);if(d.opts.unevaluated&&i.length&&d.items!==true){d.items=a.mergeEvaluated.items(c,i.length,d.items)}const p=c.name("valid");const m=c.const("len",(0,o._)`${u}.length`);i.forEach(((r,i)=>{if((0,a.alwaysValidSchema)(d,r))return;c.if((0,o._)`${m} > ${i}`,(()=>t.subschema({keyword:h,schemaProp:i,dataProp:i},p)));t.ok(p)}));function checkStrictTuple(t){const{opts:o,errSchemaPath:c}=d;const l=i.length;const u=l===t.minItems&&(l===t.maxItems||t[r]===false);if(o.strictTuples&&!u){const t=`"${h}" is ${l}-tuple, but minItems or maxItems/${r} are not specified or different at path "${c}"`;(0,a.checkStrictMode)(d,t,o.strictTuples)}}}r.validateTuple=validateTuple;r["default"]=l},9794:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4809);const a=i(4359);const c=i(9689);const l=i(8549);const u={message:({params:{len:t}})=>(0,o.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,o._)`{limit: ${t}}`};const h={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:u,code(t){const{schema:r,parentSchema:i,it:o}=t;const{prefixItems:u}=i;o.items=true;if((0,a.alwaysValidSchema)(o,r))return;if(u)(0,l.validateAdditionalItems)(t,u);else t.ok((0,c.validateArray)(t))}};r["default"]=h},9975:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4359);const a={keyword:"not",schemaType:["object","boolean"],trackErrors:true,code(t){const{gen:r,schema:i,it:a}=t;if((0,o.alwaysValidSchema)(a,i)){t.fail();return}const c=r.name("valid");t.subschema({keyword:"not",compositeRule:true,createErrors:false,allErrors:false},c);t.failResult(c,(()=>t.reset()),(()=>t.error()))},error:{message:"must NOT be valid"}};r["default"]=a},9399:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4809);const a=i(4359);const c={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,o._)`{passingSchemas: ${t.passing}}`};const l={keyword:"oneOf",schemaType:"array",trackErrors:true,error:c,code(t){const{gen:r,schema:i,parentSchema:c,it:l}=t;if(!Array.isArray(i))throw new Error("ajv implementation error");if(l.opts.discriminator&&c.discriminator)return;const u=i;const h=r.let("valid",false);const d=r.let("passing",null);const p=r.name("_valid");t.setParams({passing:d});r.block(validateOneOf);t.result(h,(()=>t.reset()),(()=>t.error(true)));function validateOneOf(){u.forEach(((i,c)=>{let u;if((0,a.alwaysValidSchema)(l,i)){r.var(p,true)}else{u=t.subschema({keyword:"oneOf",schemaProp:c,compositeRule:true},p)}if(c>0){r.if((0,o._)`${p} && ${h}`).assign(h,false).assign(d,(0,o._)`[${d}, ${c}]`).else()}r.if(p,(()=>{r.assign(h,true);r.assign(d,c);if(u)t.mergeEvaluated(u,o.Name)}))}))}}};r["default"]=l},5537:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(9689);const a=i(4809);const c=i(4359);const l=i(4359);const u={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:r,schema:i,data:u,parentSchema:h,it:d}=t;const{opts:p}=d;const m=(0,o.allSchemaProperties)(i);const g=m.filter((t=>(0,c.alwaysValidSchema)(d,i[t])));if(m.length===0||g.length===m.length&&(!d.opts.unevaluated||d.props===true)){return}const y=p.strictSchema&&!p.allowMatchingProperties&&h.properties;const v=r.name("valid");if(d.props!==true&&!(d.props instanceof a.Name)){d.props=(0,l.evaluatedPropsToName)(r,d.props)}const{props:b}=d;validatePatternProperties();function validatePatternProperties(){for(const t of m){if(y)checkMatchingProperties(t);if(d.allErrors){validateProperties(t)}else{r.var(v,true);validateProperties(t);r.if(v)}}}function checkMatchingProperties(t){for(const r in y){if(new RegExp(t).test(r)){(0,c.checkStrictMode)(d,`property ${r} matches pattern ${t} (use allowMatchingProperties)`)}}}function validateProperties(i){r.forIn("key",u,(c=>{r.if((0,a._)`${(0,o.usePattern)(t,i)}.test(${c})`,(()=>{const o=g.includes(i);if(!o){t.subschema({keyword:"patternProperties",schemaProp:i,dataProp:c,dataPropType:l.Type.Str},v)}if(d.opts.unevaluated&&b!==true){r.assign((0,a._)`${b}[${c}]`,true)}else if(!o&&!d.allErrors){r.if((0,a.not)(v),(()=>r.break()))}}))}))}}};r["default"]=u},6286:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(386);const a={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,o.validateTuple)(t,"items")};r["default"]=a},1257:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(9278);const a=i(9689);const c=i(4359);const l=i(1800);const u={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:r,schema:i,parentSchema:u,data:h,it:d}=t;if(d.opts.removeAdditional==="all"&&u.additionalProperties===undefined){l.default.code(new o.KeywordCxt(d,l.default,"additionalProperties"))}const p=(0,a.allSchemaProperties)(i);for(const t of p){d.definedProperties.add(t)}if(d.opts.unevaluated&&p.length&&d.props!==true){d.props=c.mergeEvaluated.props(r,(0,c.toHash)(p),d.props)}const m=p.filter((t=>!(0,c.alwaysValidSchema)(d,i[t])));if(m.length===0)return;const g=r.name("valid");for(const i of m){if(hasDefault(i)){applyPropertySchema(i)}else{r.if((0,a.propertyInData)(r,h,i,d.opts.ownProperties));applyPropertySchema(i);if(!d.allErrors)r.else().var(g,true);r.endIf()}t.it.definedProperties.add(i);t.ok(g)}function hasDefault(t){return d.opts.useDefaults&&!d.compositeRule&&i[t].default!==undefined}function applyPropertySchema(r){t.subschema({keyword:"properties",schemaProp:r,dataProp:r},g)}}};r["default"]=u},8285:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4809);const a=i(4359);const c={message:"property name must be valid",params:({params:t})=>(0,o._)`{propertyName: ${t.propertyName}}`};const l={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:c,code(t){const{gen:r,schema:i,data:c,it:l}=t;if((0,a.alwaysValidSchema)(l,i))return;const u=r.name("valid");r.forIn("key",c,(i=>{t.setParams({propertyName:i});t.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:true},u);r.if((0,o.not)(u),(()=>{t.error(true);if(!l.allErrors)r.break()}))}));t.ok(u)}};r["default"]=l},3870:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4359);const a={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:r,it:i}){if(r.if===undefined)(0,o.checkStrictMode)(i,`"${t}" without "if" is ignored`)}};r["default"]=a},9689:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.validateUnion=r.validateArray=r.usePattern=r.callValidateCode=r.schemaProperties=r.allSchemaProperties=r.noPropertyInData=r.propertyInData=r.isOwnProperty=r.hasPropFunc=r.reportMissingProp=r.checkMissingProp=r.checkReportMissingProp=void 0;const o=i(4809);const a=i(4359);const c=i(1267);const l=i(4359);function checkReportMissingProp(t,r){const{gen:i,data:a,it:c}=t;i.if(noPropertyInData(i,a,r,c.opts.ownProperties),(()=>{t.setParams({missingProperty:(0,o._)`${r}`},true);t.error()}))}r.checkReportMissingProp=checkReportMissingProp;function checkMissingProp({gen:t,data:r,it:{opts:i}},a,c){return(0,o.or)(...a.map((a=>(0,o.and)(noPropertyInData(t,r,a,i.ownProperties),(0,o._)`${c} = ${a}`))))}r.checkMissingProp=checkMissingProp;function reportMissingProp(t,r){t.setParams({missingProperty:r},true);t.error()}r.reportMissingProp=reportMissingProp;function hasPropFunc(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,o._)`Object.prototype.hasOwnProperty`})}r.hasPropFunc=hasPropFunc;function isOwnProperty(t,r,i){return(0,o._)`${hasPropFunc(t)}.call(${r}, ${i})`}r.isOwnProperty=isOwnProperty;function propertyInData(t,r,i,a){const c=(0,o._)`${r}${(0,o.getProperty)(i)} !== undefined`;return a?(0,o._)`${c} && ${isOwnProperty(t,r,i)}`:c}r.propertyInData=propertyInData;function noPropertyInData(t,r,i,a){const c=(0,o._)`${r}${(0,o.getProperty)(i)} === undefined`;return a?(0,o.or)(c,(0,o.not)(isOwnProperty(t,r,i))):c}r.noPropertyInData=noPropertyInData;function allSchemaProperties(t){return t?Object.keys(t).filter((t=>t!=="__proto__")):[]}r.allSchemaProperties=allSchemaProperties;function schemaProperties(t,r){return allSchemaProperties(r).filter((i=>!(0,a.alwaysValidSchema)(t,r[i])))}r.schemaProperties=schemaProperties;function callValidateCode({schemaCode:t,data:r,it:{gen:i,topSchemaRef:a,schemaPath:l,errorPath:u},it:h},d,p,m){const g=m?(0,o._)`${t}, ${r}, ${a}${l}`:r;const y=[[c.default.instancePath,(0,o.strConcat)(c.default.instancePath,u)],[c.default.parentData,h.parentData],[c.default.parentDataProperty,h.parentDataProperty],[c.default.rootData,c.default.rootData]];if(h.opts.dynamicRef)y.push([c.default.dynamicAnchors,c.default.dynamicAnchors]);const v=(0,o._)`${g}, ${i.object(...y)}`;return p!==o.nil?(0,o._)`${d}.call(${p}, ${v})`:(0,o._)`${d}(${v})`}r.callValidateCode=callValidateCode;const u=(0,o._)`new RegExp`;function usePattern({gen:t,it:{opts:r}},i){const a=r.unicodeRegExp?"u":"";const{regExp:c}=r.code;const h=c(i,a);return t.scopeValue("pattern",{key:h.toString(),ref:h,code:(0,o._)`${c.code==="new RegExp"?u:(0,l.useFunc)(t,c)}(${i}, ${a})`})}r.usePattern=usePattern;function validateArray(t){const{gen:r,data:i,keyword:c,it:l}=t;const u=r.name("valid");if(l.allErrors){const t=r.let("valid",true);validateItems((()=>r.assign(t,false)));return t}r.var(u,true);validateItems((()=>r.break()));return u;function validateItems(l){const h=r.const("len",(0,o._)`${i}.length`);r.forRange("i",0,h,(i=>{t.subschema({keyword:c,dataProp:i,dataPropType:a.Type.Num},u);r.if((0,o.not)(u),l)}))}}r.validateArray=validateArray;function validateUnion(t){const{gen:r,schema:i,keyword:c,it:l}=t;if(!Array.isArray(i))throw new Error("ajv implementation error");const u=i.some((t=>(0,a.alwaysValidSchema)(l,t)));if(u&&!l.opts.unevaluated)return;const h=r.let("valid",false);const d=r.name("_valid");r.block((()=>i.forEach(((i,a)=>{const l=t.subschema({keyword:c,schemaProp:a,compositeRule:true},d);r.assign(h,(0,o._)`${h} || ${d}`);const u=t.mergeValidEvaluated(l,d);if(!u)r.if((0,o.not)(h))}))));t.result(h,(()=>t.reset()),(()=>t.error(true)))}r.validateUnion=validateUnion},5115:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const i={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};r["default"]=i},2860:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(5115);const a=i(6001);const c=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",o.default,a.default];r["default"]=c},6001:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.callRef=r.getValidate=void 0;const o=i(8547);const a=i(9689);const c=i(4809);const l=i(1267);const u=i(2407);const h=i(4359);const d={keyword:"$ref",schemaType:"string",code(t){const{gen:r,schema:i,it:a}=t;const{baseId:l,schemaEnv:h,validateName:d,opts:p,self:m}=a;const{root:g}=h;if((i==="#"||i==="#/")&&l===g.baseId)return callRootRef();const y=u.resolveRef.call(m,g,l,i);if(y===undefined)throw new o.default(a.opts.uriResolver,l,i);if(y instanceof u.SchemaEnv)return callValidate(y);return inlineRefSchema(y);function callRootRef(){if(h===g)return callRef(t,d,h,h.$async);const i=r.scopeValue("root",{ref:g});return callRef(t,(0,c._)`${i}.validate`,g,g.$async)}function callValidate(r){const i=getValidate(t,r);callRef(t,i,r,r.$async)}function inlineRefSchema(o){const a=r.scopeValue("schema",p.code.source===true?{ref:o,code:(0,c.stringify)(o)}:{ref:o});const l=r.name("valid");const u=t.subschema({schema:o,dataTypes:[],schemaPath:c.nil,topSchemaRef:a,errSchemaPath:i},l);t.mergeEvaluated(u);t.ok(l)}}};function getValidate(t,r){const{gen:i}=t;return r.validate?i.scopeValue("validate",{ref:r.validate}):(0,c._)`${i.scopeValue("wrapper",{ref:r})}.validate`}r.getValidate=getValidate;function callRef(t,r,i,o){const{gen:u,it:d}=t;const{allErrors:p,schemaEnv:m,opts:g}=d;const y=g.passContext?l.default.this:c.nil;if(o)callAsyncRef();else callSyncRef();function callAsyncRef(){if(!m.$async)throw new Error("async schema referenced by sync schema");const i=u.let("valid");u.try((()=>{u.code((0,c._)`await ${(0,a.callValidateCode)(t,r,y)}`);addEvaluatedFrom(r);if(!p)u.assign(i,true)}),(t=>{u.if((0,c._)`!(${t} instanceof ${d.ValidationError})`,(()=>u.throw(t)));addErrorsFrom(t);if(!p)u.assign(i,false)}));t.ok(i)}function callSyncRef(){t.result((0,a.callValidateCode)(t,r,y),(()=>addEvaluatedFrom(r)),(()=>addErrorsFrom(r)))}function addErrorsFrom(t){const r=(0,c._)`${t}.errors`;u.assign(l.default.vErrors,(0,c._)`${l.default.vErrors} === null ? ${r} : ${l.default.vErrors}.concat(${r})`);u.assign(l.default.errors,(0,c._)`${l.default.vErrors}.length`)}function addEvaluatedFrom(t){var r;if(!d.opts.unevaluated)return;const o=(r=i===null||i===void 0?void 0:i.validate)===null||r===void 0?void 0:r.evaluated;if(d.props!==true){if(o&&!o.dynamicProps){if(o.props!==undefined){d.props=h.mergeEvaluated.props(u,o.props,d.props)}}else{const r=u.var("props",(0,c._)`${t}.evaluated.props`);d.props=h.mergeEvaluated.props(u,r,d.props,c.Name)}}if(d.items!==true){if(o&&!o.dynamicItems){if(o.items!==undefined){d.items=h.mergeEvaluated.items(u,o.items,d.items)}}else{const r=u.var("items",(0,c._)`${t}.evaluated.items`);d.items=h.mergeEvaluated.items(u,r,d.items,c.Name)}}}}r.callRef=callRef;r["default"]=d},4665:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4809);const a=i(5528);const c=i(2407);const l=i(8547);const u=i(4359);const h={message:({params:{discrError:t,tagName:r}})=>t===a.DiscrError.Tag?`tag "${r}" must be string`:`value of tag "${r}" must be in oneOf`,params:({params:{discrError:t,tag:r,tagName:i}})=>(0,o._)`{error: ${t}, tag: ${i}, tagValue: ${r}}`};const d={keyword:"discriminator",type:"object",schemaType:"object",error:h,code(t){const{gen:r,data:i,schema:h,parentSchema:d,it:p}=t;const{oneOf:m}=d;if(!p.opts.discriminator){throw new Error("discriminator: requires discriminator option")}const g=h.propertyName;if(typeof g!="string")throw new Error("discriminator: requires propertyName");if(h.mapping)throw new Error("discriminator: mapping is not supported");if(!m)throw new Error("discriminator: requires oneOf keyword");const y=r.let("valid",false);const v=r.const("tag",(0,o._)`${i}${(0,o.getProperty)(g)}`);r.if((0,o._)`typeof ${v} == "string"`,(()=>validateMapping()),(()=>t.error(false,{discrError:a.DiscrError.Tag,tag:v,tagName:g})));t.ok(y);function validateMapping(){const i=getMapping();r.if(false);for(const t in i){r.elseIf((0,o._)`${v} === ${t}`);r.assign(y,applyTagSchema(i[t]))}r.else();t.error(false,{discrError:a.DiscrError.Mapping,tag:v,tagName:g});r.endIf()}function applyTagSchema(i){const a=r.name("valid");const c=t.subschema({keyword:"oneOf",schemaProp:i},a);t.mergeEvaluated(c,o.Name);return a}function getMapping(){var t;const r={};const i=hasRequired(d);let o=true;for(let r=0;r<m.length;r++){let a=m[r];if((a===null||a===void 0?void 0:a.$ref)&&!(0,u.schemaHasRulesButRef)(a,p.self.RULES)){const t=a.$ref;a=c.resolveRef.call(p.self,p.schemaEnv.root,p.baseId,t);if(a instanceof c.SchemaEnv)a=a.schema;if(a===undefined)throw new l.default(p.opts.uriResolver,p.baseId,t)}const h=(t=a===null||a===void 0?void 0:a.properties)===null||t===void 0?void 0:t[g];if(typeof h!="object"){throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${g}"`)}o=o&&(i||hasRequired(a));addMappings(h,r)}if(!o)throw new Error(`discriminator: "${g}" must be required`);return r;function hasRequired({required:t}){return Array.isArray(t)&&t.includes(g)}function addMappings(t,r){if(t.const){addMapping(t.const,r)}else if(t.enum){for(const i of t.enum){addMapping(i,r)}}else{throw new Error(`discriminator: "properties/${g}" must have "const" or "enum"`)}}function addMapping(t,i){if(typeof t!="string"||t in r){throw new Error(`discriminator: "${g}" values must be unique strings`)}r[t]=i}}}};r["default"]=d},5528:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.DiscrError=void 0;var i;(function(t){t["Tag"]="tag";t["Mapping"]="mapping"})(i||(r.DiscrError=i={}))},6117:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(2860);const a=i(3824);const c=i(8926);const l=i(3500);const u=i(4361);const h=i(8461);const d=i(2392);const p=i(8370);const m=[l.default,o.default,a.default,(0,c.default)(true),d.default,p.metadataVocabulary,p.contentVocabulary,u.default,h.default];r["default"]=m},540:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(2860);const a=i(3824);const c=i(8926);const l=i(2392);const u=i(8370);const h=[o.default,a.default,(0,c.default)(),l.default,u.metadataVocabulary,u.contentVocabulary];r["default"]=h},3448:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.dynamicAnchor=void 0;const o=i(4809);const a=i(1267);const c=i(2407);const l=i(6001);const u={keyword:"$dynamicAnchor",schemaType:"string",code:t=>dynamicAnchor(t,t.schema)};function dynamicAnchor(t,r){const{gen:i,it:c}=t;c.schemaEnv.root.dynamicAnchors[r]=true;const l=(0,o._)`${a.default.dynamicAnchors}${(0,o.getProperty)(r)}`;const u=c.errSchemaPath==="#"?c.validateName:_getValidate(t);i.if((0,o._)`!${l}`,(()=>i.assign(l,u)))}r.dynamicAnchor=dynamicAnchor;function _getValidate(t){const{schemaEnv:r,schema:i,self:o}=t.it;const{root:a,baseId:u,localRefs:h,meta:d}=r.root;const{schemaId:p}=o.opts;const m=new c.SchemaEnv({schema:i,schemaId:p,root:a,baseId:u,localRefs:h,meta:d});c.compileSchema.call(o,m);return(0,l.getValidate)(t,m)}r["default"]=u},520:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.dynamicRef=void 0;const o=i(4809);const a=i(1267);const c=i(6001);const l={keyword:"$dynamicRef",schemaType:"string",code:t=>dynamicRef(t,t.schema)};function dynamicRef(t,r){const{gen:i,keyword:l,it:u}=t;if(r[0]!=="#")throw new Error(`"${l}" only supports hash fragment reference`);const h=r.slice(1);if(u.allErrors){_dynamicRef()}else{const r=i.let("valid",false);_dynamicRef(r);t.ok(r)}function _dynamicRef(t){if(u.schemaEnv.root.dynamicAnchors[h]){const r=i.let("_v",(0,o._)`${a.default.dynamicAnchors}${(0,o.getProperty)(h)}`);i.if(r,_callRef(r,t),_callRef(u.validateName,t))}else{_callRef(u.validateName,t)()}}function _callRef(r,o){return o?()=>i.block((()=>{(0,c.callRef)(t,r);i.let(o,true)})):()=>(0,c.callRef)(t,r)}}r.dynamicRef=dynamicRef;r["default"]=l},3500:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(3448);const a=i(520);const c=i(5989);const l=i(147);const u=[o.default,a.default,c.default,l.default];r["default"]=u},5989:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(3448);const a=i(4359);const c={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){if(t.schema)(0,o.dynamicAnchor)(t,"");else(0,a.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};r["default"]=c},147:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(520);const a={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,o.dynamicRef)(t,t.schema)};r["default"]=a},3501:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4809);const a={message:({schemaCode:t})=>(0,o.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,o._)`{format: ${t}}`};const c={keyword:"format",type:["number","string"],schemaType:"string",$data:true,error:a,code(t,r){const{gen:i,data:a,$data:c,schema:l,schemaCode:u,it:h}=t;const{opts:d,errSchemaPath:p,schemaEnv:m,self:g}=h;if(!d.validateFormats)return;if(c)validate$DataFormat();else validateFormat();function validate$DataFormat(){const c=i.scopeValue("formats",{ref:g.formats,code:d.code.formats});const l=i.const("fDef",(0,o._)`${c}[${u}]`);const h=i.let("fType");const p=i.let("format");i.if((0,o._)`typeof ${l} == "object" && !(${l} instanceof RegExp)`,(()=>i.assign(h,(0,o._)`${l}.type || "string"`).assign(p,(0,o._)`${l}.validate`)),(()=>i.assign(h,(0,o._)`"string"`).assign(p,l)));t.fail$data((0,o.or)(unknownFmt(),invalidFmt()));function unknownFmt(){if(d.strictSchema===false)return o.nil;return(0,o._)`${u} && !${p}`}function invalidFmt(){const t=m.$async?(0,o._)`(${l}.async ? await ${p}(${a}) : ${p}(${a}))`:(0,o._)`${p}(${a})`;const i=(0,o._)`(typeof ${p} == "function" ? ${t} : ${p}.test(${a}))`;return(0,o._)`${p} && ${p} !== true && ${h} === ${r} && !${i}`}}function validateFormat(){const c=g.formats[l];if(!c){unknownFormat();return}if(c===true)return;const[u,h,y]=getFormat(c);if(u===r)t.pass(validCondition());function unknownFormat(){if(d.strictSchema===false){g.logger.warn(unknownMsg());return}throw new Error(unknownMsg());function unknownMsg(){return`unknown format "${l}" ignored in schema at path "${p}"`}}function getFormat(t){const r=t instanceof RegExp?(0,o.regexpCode)(t):d.code.formats?(0,o._)`${d.code.formats}${(0,o.getProperty)(l)}`:undefined;const a=i.scopeValue("formats",{key:l,ref:t,code:r});if(typeof t=="object"&&!(t instanceof RegExp)){return[t.type||"string",t.validate,(0,o._)`${a}.validate`]}return["string",t,a]}function validCondition(){if(typeof c=="object"&&!(c instanceof RegExp)&&c.async){if(!m.$async)throw new Error("async format in sync schema");return(0,o._)`await ${y}(${a})`}return typeof h=="function"?(0,o._)`${y}(${a})`:(0,o._)`${y}.test(${a})`}}}};r["default"]=c},2392:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(3501);const a=[o.default];r["default"]=a},8370:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.contentVocabulary=r.metadataVocabulary=void 0;r.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];r.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},4361:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(9178);const a=i(961);const c=i(2574);const l=[o.default,a.default,c.default];r["default"]=l},8461:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(9172);const a=i(4385);const c=[o.default,a.default];r["default"]=c},4385:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4809);const a=i(4359);const c={message:({params:{len:t}})=>(0,o.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,o._)`{limit: ${t}}`};const l={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:c,code(t){const{gen:r,schema:i,data:c,it:l}=t;const u=l.items||0;if(u===true)return;const h=r.const("len",(0,o._)`${c}.length`);if(i===false){t.setParams({len:u});t.fail((0,o._)`${h} > ${u}`)}else if(typeof i=="object"&&!(0,a.alwaysValidSchema)(l,i)){const i=r.var("valid",(0,o._)`${h} <= ${u}`);r.if((0,o.not)(i),(()=>validateItems(i,u)));t.ok(i)}l.items=true;function validateItems(i,c){r.forRange("i",c,h,(c=>{t.subschema({keyword:"unevaluatedItems",dataProp:c,dataPropType:a.Type.Num},i);if(!l.allErrors)r.if((0,o.not)(i),(()=>r.break()))}))}}};r["default"]=l},9172:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4809);const a=i(4359);const c=i(1267);const l={message:"must NOT have unevaluated properties",params:({params:t})=>(0,o._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`};const u={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:true,error:l,code(t){const{gen:r,schema:i,data:l,errsCount:u,it:h}=t;if(!u)throw new Error("ajv implementation error");const{allErrors:d,props:p}=h;if(p instanceof o.Name){r.if((0,o._)`${p} !== true`,(()=>r.forIn("key",l,(t=>r.if(unevaluatedDynamic(p,t),(()=>unevaluatedPropCode(t)))))))}else if(p!==true){r.forIn("key",l,(t=>p===undefined?unevaluatedPropCode(t):r.if(unevaluatedStatic(p,t),(()=>unevaluatedPropCode(t)))))}h.props=true;t.ok((0,o._)`${u} === ${c.default.errors}`);function unevaluatedPropCode(c){if(i===false){t.setParams({unevaluatedProperty:c});t.error();if(!d)r.break();return}if(!(0,a.alwaysValidSchema)(h,i)){const i=r.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:c,dataPropType:a.Type.Str},i);if(!d)r.if((0,o.not)(i),(()=>r.break()))}}function unevaluatedDynamic(t,r){return(0,o._)`!${t} || !${t}[${r}]`}function unevaluatedStatic(t,r){const i=[];for(const a in t){if(t[a]===true)i.push((0,o._)`${r} !== ${a}`)}return(0,o.and)(...i)}}};r["default"]=u},4235:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4809);const a=i(4359);const c=i(9502);const l={message:"must be equal to constant",params:({schemaCode:t})=>(0,o._)`{allowedValue: ${t}}`};const u={keyword:"const",$data:true,error:l,code(t){const{gen:r,data:i,$data:l,schemaCode:u,schema:h}=t;if(l||h&&typeof h=="object"){t.fail$data((0,o._)`!${(0,a.useFunc)(r,c.default)}(${i}, ${u})`)}else{t.fail((0,o._)`${h} !== ${i}`)}}};r["default"]=u},9178:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(9989);const a={keyword:"dependentRequired",type:"object",schemaType:"object",error:o.error,code:t=>(0,o.validatePropertyDeps)(t)};r["default"]=a},5631:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4809);const a=i(4359);const c=i(9502);const l={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,o._)`{allowedValues: ${t}}`};const u={keyword:"enum",schemaType:"array",$data:true,error:l,code(t){const{gen:r,data:i,$data:l,schema:u,schemaCode:h,it:d}=t;if(!l&&u.length===0)throw new Error("enum must have non-empty array");const p=u.length>=d.opts.loopEnum;let m;const getEql=()=>m!==null&&m!==void 0?m:m=(0,a.useFunc)(r,c.default);let g;if(p||l){g=r.let("valid");t.block$data(g,loopEnum)}else{if(!Array.isArray(u))throw new Error("ajv implementation error");const t=r.const("vSchema",h);g=(0,o.or)(...u.map(((r,i)=>equalCode(t,i))))}t.pass(g);function loopEnum(){r.assign(g,false);r.forOf("v",h,(t=>r.if((0,o._)`${getEql()}(${i}, ${t})`,(()=>r.assign(g,true).break()))))}function equalCode(t,r){const a=u[r];return typeof a==="object"&&a!==null?(0,o._)`${getEql()}(${i}, ${t}[${r}])`:(0,o._)`${i} === ${a}`}}};r["default"]=u},3824:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(7174);const a=i(5515);const c=i(6831);const l=i(7594);const u=i(4290);const h=i(5167);const d=i(2135);const p=i(9525);const m=i(4235);const g=i(5631);const y=[o.default,a.default,c.default,l.default,u.default,h.default,d.default,p.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},m.default,g.default];r["default"]=y},2574:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4359);const a={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:r,it:i}){if(r.contains===undefined){(0,o.checkStrictMode)(i,`"${t}" without "contains" is ignored`)}}};r["default"]=a},2135:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4809);const a={message({keyword:t,schemaCode:r}){const i=t==="maxItems"?"more":"fewer";return(0,o.str)`must NOT have ${i} than ${r} items`},params:({schemaCode:t})=>(0,o._)`{limit: ${t}}`};const c={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:true,error:a,code(t){const{keyword:r,data:i,schemaCode:a}=t;const c=r==="maxItems"?o.operators.GT:o.operators.LT;t.fail$data((0,o._)`${i}.length ${c} ${a}`)}};r["default"]=c},6831:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4809);const a=i(4359);const c=i(7169);const l={message({keyword:t,schemaCode:r}){const i=t==="maxLength"?"more":"fewer";return(0,o.str)`must NOT have ${i} than ${r} characters`},params:({schemaCode:t})=>(0,o._)`{limit: ${t}}`};const u={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:true,error:l,code(t){const{keyword:r,data:i,schemaCode:l,it:u}=t;const h=r==="maxLength"?o.operators.GT:o.operators.LT;const d=u.opts.unicode===false?(0,o._)`${i}.length`:(0,o._)`${(0,a.useFunc)(t.gen,c.default)}(${i})`;t.fail$data((0,o._)`${d} ${h} ${l}`)}};r["default"]=u},7174:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4809);const a=o.operators;const c={maximum:{okStr:"<=",ok:a.LTE,fail:a.GT},minimum:{okStr:">=",ok:a.GTE,fail:a.LT},exclusiveMaximum:{okStr:"<",ok:a.LT,fail:a.GTE},exclusiveMinimum:{okStr:">",ok:a.GT,fail:a.LTE}};const l={message:({keyword:t,schemaCode:r})=>(0,o.str)`must be ${c[t].okStr} ${r}`,params:({keyword:t,schemaCode:r})=>(0,o._)`{comparison: ${c[t].okStr}, limit: ${r}}`};const u={keyword:Object.keys(c),type:"number",schemaType:"number",$data:true,error:l,code(t){const{keyword:r,data:i,schemaCode:a}=t;t.fail$data((0,o._)`${i} ${c[r].fail} ${a} || isNaN(${i})`)}};r["default"]=u},4290:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4809);const a={message({keyword:t,schemaCode:r}){const i=t==="maxProperties"?"more":"fewer";return(0,o.str)`must NOT have ${i} than ${r} properties`},params:({schemaCode:t})=>(0,o._)`{limit: ${t}}`};const c={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:true,error:a,code(t){const{keyword:r,data:i,schemaCode:a}=t;const c=r==="maxProperties"?o.operators.GT:o.operators.LT;t.fail$data((0,o._)`Object.keys(${i}).length ${c} ${a}`)}};r["default"]=c},5515:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4809);const a={message:({schemaCode:t})=>(0,o.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,o._)`{multipleOf: ${t}}`};const c={keyword:"multipleOf",type:"number",schemaType:"number",$data:true,error:a,code(t){const{gen:r,data:i,schemaCode:a,it:c}=t;const l=c.opts.multipleOfPrecision;const u=r.let("res");const h=l?(0,o._)`Math.abs(Math.round(${u}) - ${u}) > 1e-${l}`:(0,o._)`${u} !== parseInt(${u})`;t.fail$data((0,o._)`(${a} === 0 || (${u} = ${i}/${a}, ${h}))`)}};r["default"]=c},7594:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(9689);const a=i(4809);const c={message:({schemaCode:t})=>(0,a.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,a._)`{pattern: ${t}}`};const l={keyword:"pattern",type:"string",schemaType:"string",$data:true,error:c,code(t){const{data:r,$data:i,schema:c,schemaCode:l,it:u}=t;const h=u.opts.unicodeRegExp?"u":"";const d=i?(0,a._)`(new RegExp(${l}, ${h}))`:(0,o.usePattern)(t,c);t.fail$data((0,a._)`!${d}.test(${r})`)}};r["default"]=l},5167:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(9689);const a=i(4809);const c=i(4359);const l={message:({params:{missingProperty:t}})=>(0,a.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,a._)`{missingProperty: ${t}}`};const u={keyword:"required",type:"object",schemaType:"array",$data:true,error:l,code(t){const{gen:r,schema:i,schemaCode:l,data:u,$data:h,it:d}=t;const{opts:p}=d;if(!h&&i.length===0)return;const m=i.length>=p.loopRequired;if(d.allErrors)allErrorsMode();else exitOnErrorMode();if(p.strictRequired){const r=t.parentSchema.properties;const{definedProperties:o}=t.it;for(const t of i){if((r===null||r===void 0?void 0:r[t])===undefined&&!o.has(t)){const r=d.schemaEnv.baseId+d.errSchemaPath;const i=`required property "${t}" is not defined at "${r}" (strictRequired)`;(0,c.checkStrictMode)(d,i,d.opts.strictRequired)}}}function allErrorsMode(){if(m||h){t.block$data(a.nil,loopAllRequired)}else{for(const r of i){(0,o.checkReportMissingProp)(t,r)}}}function exitOnErrorMode(){const a=r.let("missing");if(m||h){const i=r.let("valid",true);t.block$data(i,(()=>loopUntilMissing(a,i)));t.ok(i)}else{r.if((0,o.checkMissingProp)(t,i,a));(0,o.reportMissingProp)(t,a);r.else()}}function loopAllRequired(){r.forOf("prop",l,(i=>{t.setParams({missingProperty:i});r.if((0,o.noPropertyInData)(r,u,i,p.ownProperties),(()=>t.error()))}))}function loopUntilMissing(i,c){t.setParams({missingProperty:i});r.forOf(i,l,(()=>{r.assign(c,(0,o.propertyInData)(r,u,i,p.ownProperties));r.if((0,a.not)(c),(()=>{t.error();r.break()}))}),a.nil)}}};r["default"]=u},9525:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(5044);const a=i(4809);const c=i(4359);const l=i(9502);const u={message:({params:{i:t,j:r}})=>(0,a.str)`must NOT have duplicate items (items ## ${r} and ${t} are identical)`,params:({params:{i:t,j:r}})=>(0,a._)`{i: ${t}, j: ${r}}`};const h={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:true,error:u,code(t){const{gen:r,data:i,$data:u,schema:h,parentSchema:d,schemaCode:p,it:m}=t;if(!u&&!h)return;const g=r.let("valid");const y=d.items?(0,o.getSchemaTypes)(d.items):[];t.block$data(g,validateUniqueItems,(0,a._)`${p} === false`);t.ok(g);function validateUniqueItems(){const o=r.let("i",(0,a._)`${i}.length`);const c=r.let("j");t.setParams({i:o,j:c});r.assign(g,true);r.if((0,a._)`${o} > 1`,(()=>(canOptimize()?loopN:loopN2)(o,c)))}function canOptimize(){return y.length>0&&!y.some((t=>t==="object"||t==="array"))}function loopN(c,l){const u=r.name("item");const h=(0,o.checkDataTypes)(y,u,m.opts.strictNumbers,o.DataType.Wrong);const d=r.const("indices",(0,a._)`{}`);r.for((0,a._)`;${c}--;`,(()=>{r.let(u,(0,a._)`${i}[${c}]`);r.if(h,(0,a._)`continue`);if(y.length>1)r.if((0,a._)`typeof ${u} == "string"`,(0,a._)`${u} += "_"`);r.if((0,a._)`typeof ${d}[${u}] == "number"`,(()=>{r.assign(l,(0,a._)`${d}[${u}]`);t.error();r.assign(g,false).break()})).code((0,a._)`${d}[${u}] = ${c}`)}))}function loopN2(o,u){const h=(0,c.useFunc)(r,l.default);const d=r.name("outer");r.label(d).for((0,a._)`;${o}--;`,(()=>r.for((0,a._)`${u} = ${o}; ${u}--;`,(()=>r.if((0,a._)`${h}(${i}[${o}], ${i}[${u}])`,(()=>{t.error();r.assign(g,false).break(d)}))))))}}};r["default"]=h},9642:(t,r,i)=>{var o=i(1160);function retry(t,r){function run(i,a){var c=r||{};if(!("randomize"in c)){c.randomize=true}var l=o.operation(c);function bail(t){a(t||new Error("Aborted"))}function onError(t,r){if(t.bail){bail(t);return}if(!l.retry(t)){a(l.mainError())}else if(c.onRetry){c.onRetry(t,r)}}function runAttempt(r){var o;try{o=t(bail,r)}catch(t){onError(t,r);return}Promise.resolve(o).then(i).catch((function catchIt(t){onError(t,r)}))}l.attempt(runAttempt)}return new Promise(run)}t.exports=retry},8671:(t,r,i)=>{"use strict";const o=i(3062);const a=i(4898);const c=i(5331);const l=i(168);const braces=(t,r={})=>{let i=[];if(Array.isArray(t)){for(const o of t){const t=braces.create(o,r);if(Array.isArray(t)){i.push(...t)}else{i.push(t)}}}else{i=[].concat(braces.create(t,r))}if(r&&r.expand===true&&r.nodupes===true){i=[...new Set(i)]}return i};braces.parse=(t,r={})=>l(t,r);braces.stringify=(t,r={})=>{if(typeof t==="string"){return o(braces.parse(t,r),r)}return o(t,r)};braces.compile=(t,r={})=>{if(typeof t==="string"){t=braces.parse(t,r)}return a(t,r)};braces.expand=(t,r={})=>{if(typeof t==="string"){t=braces.parse(t,r)}let i=c(t,r);if(r.noempty===true){i=i.filter(Boolean)}if(r.nodupes===true){i=[...new Set(i)]}return i};braces.create=(t,r={})=>{if(t===""||t.length<3){return[t]}return r.expand!==true?braces.compile(t,r):braces.expand(t,r)};t.exports=braces},4898:(t,r,i)=>{"use strict";const o=i(9730);const a=i(2474);const compile=(t,r={})=>{const walk=(t,i={})=>{const c=a.isInvalidBrace(i);const l=t.invalid===true&&r.escapeInvalid===true;const u=c===true||l===true;const h=r.escapeInvalid===true?"\\":"";let d="";if(t.isOpen===true){return h+t.value}if(t.isClose===true){console.log("node.isClose",h,t.value);return h+t.value}if(t.type==="open"){return u?h+t.value:"("}if(t.type==="close"){return u?h+t.value:")"}if(t.type==="comma"){return t.prev.type==="comma"?"":u?t.value:"|"}if(t.value){return t.value}if(t.nodes&&t.ranges>0){const i=a.reduce(t.nodes);const c=o(...i,{...r,wrap:false,toRegex:true,strictZeros:true});if(c.length!==0){return i.length>1&&c.length>1?`(${c})`:c}}if(t.nodes){for(const r of t.nodes){d+=walk(r,t)}}return d};return walk(t)};t.exports=compile},9397:t=>{"use strict";t.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},5331:(t,r,i)=>{"use strict";const o=i(9730);const a=i(3062);const c=i(2474);const append=(t="",r="",i=false)=>{const o=[];t=[].concat(t);r=[].concat(r);if(!r.length)return t;if(!t.length){return i?c.flatten(r).map((t=>`{${t}}`)):r}for(const a of t){if(Array.isArray(a)){for(const t of a){o.push(append(t,r,i))}}else{for(let t of r){if(i===true&&typeof t==="string")t=`{${t}}`;o.push(Array.isArray(t)?append(a,t,i):a+t)}}}return c.flatten(o)};const expand=(t,r={})=>{const i=r.rangeLimit===undefined?1e3:r.rangeLimit;const walk=(t,l={})=>{t.queue=[];let u=l;let h=l.queue;while(u.type!=="brace"&&u.type!=="root"&&u.parent){u=u.parent;h=u.queue}if(t.invalid||t.dollar){h.push(append(h.pop(),a(t,r)));return}if(t.type==="brace"&&t.invalid!==true&&t.nodes.length===2){h.push(append(h.pop(),["{}"]));return}if(t.nodes&&t.ranges>0){const l=c.reduce(t.nodes);if(c.exceedsLimit(...l,r.step,i)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let u=o(...l,r);if(u.length===0){u=a(t,r)}h.push(append(h.pop(),u));t.nodes=[];return}const d=c.encloseBrace(t);let p=t.queue;let m=t;while(m.type!=="brace"&&m.type!=="root"&&m.parent){m=m.parent;p=m.queue}for(let r=0;r<t.nodes.length;r++){const i=t.nodes[r];if(i.type==="comma"&&t.type==="brace"){if(r===1)p.push("");p.push("");continue}if(i.type==="close"){h.push(append(h.pop(),p,d));continue}if(i.value&&i.type!=="open"){p.push(append(p.pop(),i.value));continue}if(i.nodes){walk(i,t)}}return p};return c.flatten(walk(t))};t.exports=expand},168:(t,r,i)=>{"use strict";const o=i(3062);const{MAX_LENGTH:a,CHAR_BACKSLASH:c,CHAR_BACKTICK:l,CHAR_COMMA:u,CHAR_DOT:h,CHAR_LEFT_PARENTHESES:d,CHAR_RIGHT_PARENTHESES:p,CHAR_LEFT_CURLY_BRACE:m,CHAR_RIGHT_CURLY_BRACE:g,CHAR_LEFT_SQUARE_BRACKET:y,CHAR_RIGHT_SQUARE_BRACKET:v,CHAR_DOUBLE_QUOTE:b,CHAR_SINGLE_QUOTE:w,CHAR_NO_BREAK_SPACE:E,CHAR_ZERO_WIDTH_NOBREAK_SPACE:S}=i(9397);const parse=(t,r={})=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}const i=r||{};const $=typeof i.maxLength==="number"?Math.min(a,i.maxLength):a;if(t.length>$){throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${$})`)}const O={type:"root",input:t,nodes:[]};const R=[O];let P=O;let A=O;let x=0;const T=t.length;let C=0;let k=0;let I;const advance=()=>t[C++];const push=t=>{if(t.type==="text"&&A.type==="dot"){A.type="text"}if(A&&A.type==="text"&&t.type==="text"){A.value+=t.value;return}P.nodes.push(t);t.parent=P;t.prev=A;A=t;return t};push({type:"bos"});while(C<T){P=R[R.length-1];I=advance();if(I===S||I===E){continue}if(I===c){push({type:"text",value:(r.keepEscaping?I:"")+advance()});continue}if(I===v){push({type:"text",value:"\\"+I});continue}if(I===y){x++;let t;while(C<T&&(t=advance())){I+=t;if(t===y){x++;continue}if(t===c){I+=advance();continue}if(t===v){x--;if(x===0){break}}}push({type:"text",value:I});continue}if(I===d){P=push({type:"paren",nodes:[]});R.push(P);push({type:"text",value:I});continue}if(I===p){if(P.type!=="paren"){push({type:"text",value:I});continue}P=R.pop();push({type:"text",value:I});P=R[R.length-1];continue}if(I===b||I===w||I===l){const t=I;let i;if(r.keepQuotes!==true){I=""}while(C<T&&(i=advance())){if(i===c){I+=i+advance();continue}if(i===t){if(r.keepQuotes===true)I+=i;break}I+=i}push({type:"text",value:I});continue}if(I===m){k++;const t=A.value&&A.value.slice(-1)==="$"||P.dollar===true;const r={type:"brace",open:true,close:false,dollar:t,depth:k,commas:0,ranges:0,nodes:[]};P=push(r);R.push(P);push({type:"open",value:I});continue}if(I===g){if(P.type!=="brace"){push({type:"text",value:I});continue}const t="close";P=R.pop();P.close=true;push({type:t,value:I});k--;P=R[R.length-1];continue}if(I===u&&k>0){if(P.ranges>0){P.ranges=0;const t=P.nodes.shift();P.nodes=[t,{type:"text",value:o(P)}]}push({type:"comma",value:I});P.commas++;continue}if(I===h&&k>0&&P.commas===0){const t=P.nodes;if(k===0||t.length===0){push({type:"text",value:I});continue}if(A.type==="dot"){P.range=[];A.value+=I;A.type="range";if(P.nodes.length!==3&&P.nodes.length!==5){P.invalid=true;P.ranges=0;A.type="text";continue}P.ranges++;P.args=[];continue}if(A.type==="range"){t.pop();const r=t[t.length-1];r.value+=A.value+I;A=r;P.ranges--;continue}push({type:"dot",value:I});continue}push({type:"text",value:I})}do{P=R.pop();if(P.type!=="root"){P.nodes.forEach((t=>{if(!t.nodes){if(t.type==="open")t.isOpen=true;if(t.type==="close")t.isClose=true;if(!t.nodes)t.type="text";t.invalid=true}}));const t=R[R.length-1];const r=t.nodes.indexOf(P);t.nodes.splice(r,1,...P.nodes)}}while(R.length>0);push({type:"eos"});return O};t.exports=parse},3062:(t,r,i)=>{"use strict";const o=i(2474);t.exports=(t,r={})=>{const stringify=(t,i={})=>{const a=r.escapeInvalid&&o.isInvalidBrace(i);const c=t.invalid===true&&r.escapeInvalid===true;let l="";if(t.value){if((a||c)&&o.isOpenOrClose(t)){return"\\"+t.value}return t.value}if(t.value){return t.value}if(t.nodes){for(const r of t.nodes){l+=stringify(r)}}return l};return stringify(t)}},2474:(t,r)=>{"use strict";r.isInteger=t=>{if(typeof t==="number"){return Number.isInteger(t)}if(typeof t==="string"&&t.trim()!==""){return Number.isInteger(Number(t))}return false};r.find=(t,r)=>t.nodes.find((t=>t.type===r));r.exceedsLimit=(t,i,o=1,a)=>{if(a===false)return false;if(!r.isInteger(t)||!r.isInteger(i))return false;return(Number(i)-Number(t))/Number(o)>=a};r.escapeNode=(t,r=0,i)=>{const o=t.nodes[r];if(!o)return;if(i&&o.type===i||o.type==="open"||o.type==="close"){if(o.escaped!==true){o.value="\\"+o.value;o.escaped=true}}};r.encloseBrace=t=>{if(t.type!=="brace")return false;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}return false};r.isInvalidBrace=t=>{if(t.type!=="brace")return false;if(t.invalid===true||t.dollar)return true;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}if(t.open!==true||t.close!==true){t.invalid=true;return true}return false};r.isOpenOrClose=t=>{if(t.type==="open"||t.type==="close"){return true}return t.open===true||t.close===true};r.reduce=t=>t.reduce(((t,r)=>{if(r.type==="text")t.push(r.value);if(r.type==="range")r.type="text";return t}),[]);r.flatten=(...t)=>{const r=[];const flat=t=>{for(let i=0;i<t.length;i++){const o=t[i];if(Array.isArray(o)){flat(o);continue}if(o!==undefined){r.push(o)}}return r};flat(t);return r}},670:(t,r,i)=>{"use strict";const o=i(5317);const a=i(8401);const c=i(7758);function spawn(t,r,i){const l=a(t,r,i);const u=o.spawn(l.command,l.args,l.options);c.hookChildProcess(u,l);return u}function spawnSync(t,r,i){const l=a(t,r,i);const u=o.spawnSync(l.command,l.args,l.options);u.error=u.error||c.verifyENOENTSync(u.status,l);return u}t.exports=spawn;t.exports.spawn=spawn;t.exports.sync=spawnSync;t.exports._parse=a;t.exports._enoent=c},7758:t=>{"use strict";const r=process.platform==="win32";function notFoundError(t,r){return Object.assign(new Error(`${r} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${r} ${t.command}`,path:t.command,spawnargs:t.args})}function hookChildProcess(t,i){if(!r){return}const o=t.emit;t.emit=function(r,a){if(r==="exit"){const r=verifyENOENT(a,i);if(r){return o.call(t,"error",r)}}return o.apply(t,arguments)}}function verifyENOENT(t,i){if(r&&t===1&&!i.file){return notFoundError(i.original,"spawn")}return null}function verifyENOENTSync(t,i){if(r&&t===1&&!i.file){return notFoundError(i.original,"spawnSync")}return null}t.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},8401:(t,r,i)=>{"use strict";const o=i(6928);const a=i(7430);const c=i(6808);const l=i(9531);const u=process.platform==="win32";const h=/\.(?:com|exe)$/i;const d=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(t){t.file=a(t);const r=t.file&&l(t.file);if(r){t.args.unshift(t.file);t.command=r;return a(t)}return t.file}function parseNonShell(t){if(!u){return t}const r=detectShebang(t);const i=!h.test(r);if(t.options.forceShell||i){const i=d.test(r);t.command=o.normalize(t.command);t.command=c.command(t.command);t.args=t.args.map((t=>c.argument(t,i)));const a=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${a}"`];t.command=process.env.comspec||"cmd.exe";t.options.windowsVerbatimArguments=true}return t}function parse(t,r,i){if(r&&!Array.isArray(r)){i=r;r=null}r=r?r.slice(0):[];i=Object.assign({},i);const o={command:t,args:r,options:i,file:undefined,original:{command:t,args:r}};return i.shell?o:parseNonShell(o)}t.exports=parse},6808:t=>{"use strict";const r=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(t){t=t.replace(r,"^$1");return t}function escapeArgument(t,i){t=`${t}`;t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"');t=t.replace(/(?=(\\+?)?)\1$/,"$1$1");t=`"${t}"`;t=t.replace(r,"^$1");if(i){t=t.replace(r,"^$1")}return t}t.exports.command=escapeCommand;t.exports.argument=escapeArgument},9531:(t,r,i)=>{"use strict";const o=i(7515);const a=i(4881);function readShebang(t){const r=150;const i=Buffer.alloc(r);let c;try{c=o.openSync(t,"r");o.readSync(c,i,0,r,0);o.closeSync(c)}catch(t){}return a(i.toString())}t.exports=readShebang},7430:(t,r,i)=>{"use strict";const o=i(6928);const a=i(1192);const c=i(4662);function resolveCommandAttempt(t,r){const i=t.options.env||process.env;const l=process.cwd();const u=t.options.cwd!=null;const h=u&&process.chdir!==undefined&&!process.chdir.disabled;if(h){try{process.chdir(t.options.cwd)}catch(t){}}let d;try{d=a.sync(t.command,{path:i[c({env:i})],pathExt:r?o.delimiter:undefined})}catch(t){}finally{if(h){process.chdir(l)}}if(d){d=o.resolve(u?t.options.cwd:"",d)}return d}function resolveCommand(t){return resolveCommandAttempt(t)||resolveCommandAttempt(t,true)}t.exports=resolveCommand},7442:t=>{"use strict";
2
+ (()=>{var t={5254:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.createFileSystemAdapter=u.FILE_SYSTEM_ADAPTER=void 0;const m=p(7515);u.FILE_SYSTEM_ADAPTER={lstat:m.lstat,stat:m.stat,lstatSync:m.lstatSync,statSync:m.statSync,readdir:m.readdir,readdirSync:m.readdirSync};function createFileSystemAdapter(t){if(t===undefined){return u.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},u.FILE_SYSTEM_ADAPTER),t)}u.createFileSystemAdapter=createFileSystemAdapter},1121:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const p=process.versions.node.split(".");if(p[0]===undefined||p[1]===undefined){throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`)}const m=Number.parseInt(p[0],10);const g=Number.parseInt(p[1],10);const y=10;const v=10;const b=m>y;const w=m===y&&g>=v;u.IS_SUPPORT_READDIR_WITH_FILE_TYPES=b||w},1484:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.Settings=u.scandirSync=u.scandir=void 0;const m=p(9977);const g=p(5554);const y=p(595);u.Settings=y.default;function scandir(t,u,p){if(typeof u==="function"){m.read(t,getSettings(),u);return}m.read(t,getSettings(u),p)}u.scandir=scandir;function scandirSync(t,u){const p=getSettings(u);return g.read(t,p)}u.scandirSync=scandirSync;function getSettings(t={}){if(t instanceof y.default){return t}return new y.default(t)}},9977:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.readdir=u.readdirWithFileTypes=u.read=void 0;const m=p(1309);const g=p(7906);const y=p(1121);const v=p(2046);const b=p(9392);function read(t,u,p){if(!u.stats&&y.IS_SUPPORT_READDIR_WITH_FILE_TYPES){readdirWithFileTypes(t,u,p);return}readdir(t,u,p)}u.read=read;function readdirWithFileTypes(t,u,p){u.fs.readdir(t,{withFileTypes:true},((m,y)=>{if(m!==null){callFailureCallback(p,m);return}const v=y.map((p=>({dirent:p,name:p.name,path:b.joinPathSegments(t,p.name,u.pathSegmentSeparator)})));if(!u.followSymbolicLinks){callSuccessCallback(p,v);return}const w=v.map((t=>makeRplTaskEntry(t,u)));g(w,((t,u)=>{if(t!==null){callFailureCallback(p,t);return}callSuccessCallback(p,u)}))}))}u.readdirWithFileTypes=readdirWithFileTypes;function makeRplTaskEntry(t,u){return p=>{if(!t.dirent.isSymbolicLink()){p(null,t);return}u.fs.stat(t.path,((m,g)=>{if(m!==null){if(u.throwErrorOnBrokenSymbolicLink){p(m);return}p(null,t);return}t.dirent=v.fs.createDirentFromStats(t.name,g);p(null,t)}))}}function readdir(t,u,p){u.fs.readdir(t,((y,w)=>{if(y!==null){callFailureCallback(p,y);return}const E=w.map((p=>{const g=b.joinPathSegments(t,p,u.pathSegmentSeparator);return t=>{m.stat(g,u.fsStatSettings,((m,y)=>{if(m!==null){t(m);return}const b={name:p,path:g,dirent:v.fs.createDirentFromStats(p,y)};if(u.stats){b.stats=y}t(null,b)}))}}));g(E,((t,u)=>{if(t!==null){callFailureCallback(p,t);return}callSuccessCallback(p,u)}))}))}u.readdir=readdir;function callFailureCallback(t,u){t(u)}function callSuccessCallback(t,u){t(null,u)}},9392:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.joinPathSegments=void 0;function joinPathSegments(t,u,p){if(t.endsWith(p)){return t+u}return t+p+u}u.joinPathSegments=joinPathSegments},5554:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.readdir=u.readdirWithFileTypes=u.read=void 0;const m=p(1309);const g=p(1121);const y=p(2046);const v=p(9392);function read(t,u){if(!u.stats&&g.IS_SUPPORT_READDIR_WITH_FILE_TYPES){return readdirWithFileTypes(t,u)}return readdir(t,u)}u.read=read;function readdirWithFileTypes(t,u){const p=u.fs.readdirSync(t,{withFileTypes:true});return p.map((p=>{const m={dirent:p,name:p.name,path:v.joinPathSegments(t,p.name,u.pathSegmentSeparator)};if(m.dirent.isSymbolicLink()&&u.followSymbolicLinks){try{const t=u.fs.statSync(m.path);m.dirent=y.fs.createDirentFromStats(m.name,t)}catch(t){if(u.throwErrorOnBrokenSymbolicLink){throw t}}}return m}))}u.readdirWithFileTypes=readdirWithFileTypes;function readdir(t,u){const p=u.fs.readdirSync(t);return p.map((p=>{const g=v.joinPathSegments(t,p,u.pathSegmentSeparator);const b=m.statSync(g,u.fsStatSettings);const w={name:p,path:g,dirent:y.fs.createDirentFromStats(p,b)};if(u.stats){w.stats=b}return w}))}u.readdir=readdir},595:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6928);const g=p(1309);const y=p(5254);class Settings{constructor(t={}){this._options=t;this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,false);this.fs=y.createFileSystemAdapter(this._options.fs);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,m.sep);this.stats=this._getValue(this._options.stats,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true);this.fsStatSettings=new g.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,u){return t!==null&&t!==void 0?t:u}}u["default"]=Settings},2535:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.createDirentFromStats=void 0;class DirentFromStats{constructor(t,u){this.name=t;this.isBlockDevice=u.isBlockDevice.bind(u);this.isCharacterDevice=u.isCharacterDevice.bind(u);this.isDirectory=u.isDirectory.bind(u);this.isFIFO=u.isFIFO.bind(u);this.isFile=u.isFile.bind(u);this.isSocket=u.isSocket.bind(u);this.isSymbolicLink=u.isSymbolicLink.bind(u)}}function createDirentFromStats(t,u){return new DirentFromStats(t,u)}u.createDirentFromStats=createDirentFromStats},2046:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.fs=void 0;const m=p(2535);u.fs=m},5375:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.createFileSystemAdapter=u.FILE_SYSTEM_ADAPTER=void 0;const m=p(7515);u.FILE_SYSTEM_ADAPTER={lstat:m.lstat,stat:m.stat,lstatSync:m.lstatSync,statSync:m.statSync};function createFileSystemAdapter(t){if(t===undefined){return u.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},u.FILE_SYSTEM_ADAPTER),t)}u.createFileSystemAdapter=createFileSystemAdapter},1309:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.statSync=u.stat=u.Settings=void 0;const m=p(9100);const g=p(4421);const y=p(8448);u.Settings=y.default;function stat(t,u,p){if(typeof u==="function"){m.read(t,getSettings(),u);return}m.read(t,getSettings(u),p)}u.stat=stat;function statSync(t,u){const p=getSettings(u);return g.read(t,p)}u.statSync=statSync;function getSettings(t={}){if(t instanceof y.default){return t}return new y.default(t)}},9100:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.read=void 0;function read(t,u,p){u.fs.lstat(t,((m,g)=>{if(m!==null){callFailureCallback(p,m);return}if(!g.isSymbolicLink()||!u.followSymbolicLink){callSuccessCallback(p,g);return}u.fs.stat(t,((t,m)=>{if(t!==null){if(u.throwErrorOnBrokenSymbolicLink){callFailureCallback(p,t);return}callSuccessCallback(p,g);return}if(u.markSymbolicLink){m.isSymbolicLink=()=>true}callSuccessCallback(p,m)}))}))}u.read=read;function callFailureCallback(t,u){t(u)}function callSuccessCallback(t,u){t(null,u)}},4421:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.read=void 0;function read(t,u){const p=u.fs.lstatSync(t);if(!p.isSymbolicLink()||!u.followSymbolicLink){return p}try{const p=u.fs.statSync(t);if(u.markSymbolicLink){p.isSymbolicLink=()=>true}return p}catch(t){if(!u.throwErrorOnBrokenSymbolicLink){return p}throw t}}u.read=read},8448:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(5375);class Settings{constructor(t={}){this._options=t;this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,true);this.fs=m.createFileSystemAdapter(this._options.fs);this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true)}_getValue(t,u){return t!==null&&t!==void 0?t:u}}u["default"]=Settings},2705:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.Settings=u.walkStream=u.walkSync=u.walk=void 0;const m=p(6200);const g=p(2);const y=p(6345);const v=p(4668);u.Settings=v.default;function walk(t,u,p){if(typeof u==="function"){new m.default(t,getSettings()).read(u);return}new m.default(t,getSettings(u)).read(p)}u.walk=walk;function walkSync(t,u){const p=getSettings(u);const m=new y.default(t,p);return m.read()}u.walkSync=walkSync;function walkStream(t,u){const p=getSettings(u);const m=new g.default(t,p);return m.read()}u.walkStream=walkStream;function getSettings(t={}){if(t instanceof v.default){return t}return new v.default(t)}},6200:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(826);class AsyncProvider{constructor(t,u){this._root=t;this._settings=u;this._reader=new m.default(this._root,this._settings);this._storage=[]}read(t){this._reader.onError((u=>{callFailureCallback(t,u)}));this._reader.onEntry((t=>{this._storage.push(t)}));this._reader.onEnd((()=>{callSuccessCallback(t,this._storage)}));this._reader.read()}}u["default"]=AsyncProvider;function callFailureCallback(t,u){t(u)}function callSuccessCallback(t,u){t(null,u)}},2:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(2203);const g=p(826);class StreamProvider{constructor(t,u){this._root=t;this._settings=u;this._reader=new g.default(this._root,this._settings);this._stream=new m.Readable({objectMode:true,read:()=>{},destroy:()=>{if(!this._reader.isDestroyed){this._reader.destroy()}}})}read(){this._reader.onError((t=>{this._stream.emit("error",t)}));this._reader.onEntry((t=>{this._stream.push(t)}));this._reader.onEnd((()=>{this._stream.push(null)}));this._reader.read();return this._stream}}u["default"]=StreamProvider},6345:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(127);class SyncProvider{constructor(t,u){this._root=t;this._settings=u;this._reader=new m.default(this._root,this._settings)}read(){return this._reader.read()}}u["default"]=SyncProvider},826:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4434);const g=p(1484);const y=p(4506);const v=p(5305);const b=p(2983);class AsyncReader extends b.default{constructor(t,u){super(t,u);this._settings=u;this._scandir=g.scandir;this._emitter=new m.EventEmitter;this._queue=y(this._worker.bind(this),this._settings.concurrency);this._isFatalError=false;this._isDestroyed=false;this._queue.drain=()=>{if(!this._isFatalError){this._emitter.emit("end")}}}read(){this._isFatalError=false;this._isDestroyed=false;setImmediate((()=>{this._pushToQueue(this._root,this._settings.basePath)}));return this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed){throw new Error("The reader is already destroyed")}this._isDestroyed=true;this._queue.killAndDrain()}onEntry(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,u){const p={directory:t,base:u};this._queue.push(p,(t=>{if(t!==null){this._handleError(t)}}))}_worker(t,u){this._scandir(t.directory,this._settings.fsScandirSettings,((p,m)=>{if(p!==null){u(p,undefined);return}for(const u of m){this._handleEntry(u,t.base)}u(null,undefined)}))}_handleError(t){if(this._isDestroyed||!v.isFatalError(this._settings,t)){return}this._isFatalError=true;this._isDestroyed=true;this._emitter.emit("error",t)}_handleEntry(t,u){if(this._isDestroyed||this._isFatalError){return}const p=t.path;if(u!==undefined){t.path=v.joinPathSegments(u,t.name,this._settings.pathSegmentSeparator)}if(v.isAppliedFilter(this._settings.entryFilter,t)){this._emitEntry(t)}if(t.dirent.isDirectory()&&v.isAppliedFilter(this._settings.deepFilter,t)){this._pushToQueue(p,u===undefined?undefined:t.path)}}_emitEntry(t){this._emitter.emit("entry",t)}}u["default"]=AsyncReader},5305:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.joinPathSegments=u.replacePathSegmentSeparator=u.isAppliedFilter=u.isFatalError=void 0;function isFatalError(t,u){if(t.errorFilter===null){return true}return!t.errorFilter(u)}u.isFatalError=isFatalError;function isAppliedFilter(t,u){return t===null||t(u)}u.isAppliedFilter=isAppliedFilter;function replacePathSegmentSeparator(t,u){return t.split(/[/\\]/).join(u)}u.replacePathSegmentSeparator=replacePathSegmentSeparator;function joinPathSegments(t,u,p){if(t===""){return u}if(t.endsWith(p)){return t+u}return t+p+u}u.joinPathSegments=joinPathSegments},2983:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(5305);class Reader{constructor(t,u){this._root=t;this._settings=u;this._root=m.replacePathSegmentSeparator(t,u.pathSegmentSeparator)}}u["default"]=Reader},127:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(1484);const g=p(5305);const y=p(2983);class SyncReader extends y.default{constructor(){super(...arguments);this._scandir=m.scandirSync;this._storage=[];this._queue=new Set}read(){this._pushToQueue(this._root,this._settings.basePath);this._handleQueue();return this._storage}_pushToQueue(t,u){this._queue.add({directory:t,base:u})}_handleQueue(){for(const t of this._queue.values()){this._handleDirectory(t.directory,t.base)}}_handleDirectory(t,u){try{const p=this._scandir(t,this._settings.fsScandirSettings);for(const t of p){this._handleEntry(t,u)}}catch(t){this._handleError(t)}}_handleError(t){if(!g.isFatalError(this._settings,t)){return}throw t}_handleEntry(t,u){const p=t.path;if(u!==undefined){t.path=g.joinPathSegments(u,t.name,this._settings.pathSegmentSeparator)}if(g.isAppliedFilter(this._settings.entryFilter,t)){this._pushToStorage(t)}if(t.dirent.isDirectory()&&g.isAppliedFilter(this._settings.deepFilter,t)){this._pushToQueue(p,u===undefined?undefined:t.path)}}_pushToStorage(t){this._storage.push(t)}}u["default"]=SyncReader},4668:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6928);const g=p(1484);class Settings{constructor(t={}){this._options=t;this.basePath=this._getValue(this._options.basePath,undefined);this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY);this.deepFilter=this._getValue(this._options.deepFilter,null);this.entryFilter=this._getValue(this._options.entryFilter,null);this.errorFilter=this._getValue(this._options.errorFilter,null);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,m.sep);this.fsScandirSettings=new g.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,u){return t!==null&&t!==void 0?t:u}}u["default"]=Settings},691:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.formatNames=u.fastFormats=u.fullFormats=void 0;function fmtDef(t,u){return{validate:t,compare:u}}u.fullFormats={date:fmtDef(date,compareDate),time:fmtDef(getTime(true),compareTime),"date-time":fmtDef(getDateTime(true),compareDateTime),"iso-time":fmtDef(getTime(),compareIsoTime),"iso-date-time":fmtDef(getDateTime(),compareIsoDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:uri,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:regex,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:byte,int32:{type:"number",validate:validateInt32},int64:{type:"number",validate:validateInt64},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:true,binary:true};u.fastFormats={...u.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),"iso-time":fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoTime),"iso-date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};u.formatNames=Object.keys(u.fullFormats);function isLeapYear(t){return t%4===0&&(t%100!==0||t%400===0)}const p=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;const m=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(t){const u=p.exec(t);if(!u)return false;const g=+u[1];const y=+u[2];const v=+u[3];return y>=1&&y<=12&&v>=1&&v<=(y===2&&isLeapYear(g)?29:m[y])}function compareDate(t,u){if(!(t&&u))return undefined;if(t>u)return 1;if(t<u)return-1;return 0}const g=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function getTime(t){return function time(u){const p=g.exec(u);if(!p)return false;const m=+p[1];const y=+p[2];const v=+p[3];const b=p[4];const w=p[5]==="-"?-1:1;const E=+(p[6]||0);const $=+(p[7]||0);if(E>23||$>59||t&&!b)return false;if(m<=23&&y<=59&&v<60)return true;const O=y-$*w;const R=m-E*w-(O<0?1:0);return(R===23||R===-1)&&(O===59||O===-1)&&v<61}}function compareTime(t,u){if(!(t&&u))return undefined;const p=new Date("2020-01-01T"+t).valueOf();const m=new Date("2020-01-01T"+u).valueOf();if(!(p&&m))return undefined;return p-m}function compareIsoTime(t,u){if(!(t&&u))return undefined;const p=g.exec(t);const m=g.exec(u);if(!(p&&m))return undefined;t=p[1]+p[2]+p[3];u=m[1]+m[2]+m[3];if(t>u)return 1;if(t<u)return-1;return 0}const y=/t|\s/i;function getDateTime(t){const u=getTime(t);return function date_time(t){const p=t.split(y);return p.length===2&&date(p[0])&&u(p[1])}}function compareDateTime(t,u){if(!(t&&u))return undefined;const p=new Date(t).valueOf();const m=new Date(u).valueOf();if(!(p&&m))return undefined;return p-m}function compareIsoDateTime(t,u){if(!(t&&u))return undefined;const[p,m]=t.split(y);const[g,v]=u.split(y);const b=compareDate(p,g);if(b===undefined)return undefined;return b||compareTime(m,v)}const v=/\/|:/;const b=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function uri(t){return v.test(t)&&b.test(t)}const w=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function byte(t){w.lastIndex=0;return w.test(t)}const E=-(2**31);const $=2**31-1;function validateInt32(t){return Number.isInteger(t)&&t<=$&&t>=E}function validateInt64(t){return Number.isInteger(t)}function validateNumber(){return true}const O=/[^\\]\\Z/;function regex(t){if(O.test(t))return false;try{new RegExp(t);return true}catch(t){return false}}},8631:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(691);const g=p(2604);const y=p(4809);const v=new y.Name("fullFormats");const b=new y.Name("fastFormats");const formatsPlugin=(t,u={keywords:true})=>{if(Array.isArray(u)){addFormats(t,u,m.fullFormats,v);return t}const[p,y]=u.mode==="fast"?[m.fastFormats,b]:[m.fullFormats,v];const w=u.formats||m.formatNames;addFormats(t,w,p,y);if(u.keywords)(0,g.default)(t);return t};formatsPlugin.get=(t,u="full")=>{const p=u==="fast"?m.fastFormats:m.fullFormats;const g=p[t];if(!g)throw new Error(`Unknown format "${t}"`);return g};function addFormats(t,u,p,m){var g;var v;(g=(v=t.opts.code).formats)!==null&&g!==void 0?g:v.formats=(0,y._)`require("ajv-formats/dist/formats").${m}`;for(const m of u)t.addFormat(m,p[m])}t.exports=u=formatsPlugin;Object.defineProperty(u,"__esModule",{value:true});u["default"]=formatsPlugin},2604:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.formatLimitDefinition=void 0;const m=p(7382);const g=p(4809);const y=g.operators;const v={formatMaximum:{okStr:"<=",ok:y.LTE,fail:y.GT},formatMinimum:{okStr:">=",ok:y.GTE,fail:y.LT},formatExclusiveMaximum:{okStr:"<",ok:y.LT,fail:y.GTE},formatExclusiveMinimum:{okStr:">",ok:y.GT,fail:y.LTE}};const b={message:({keyword:t,schemaCode:u})=>(0,g.str)`should be ${v[t].okStr} ${u}`,params:({keyword:t,schemaCode:u})=>(0,g._)`{comparison: ${v[t].okStr}, limit: ${u}}`};u.formatLimitDefinition={keyword:Object.keys(v),type:"string",schemaType:"string",$data:true,error:b,code(t){const{gen:u,data:p,schemaCode:y,keyword:b,it:w}=t;const{opts:E,self:$}=w;if(!E.validateFormats)return;const O=new m.KeywordCxt(w,$.RULES.all.format.definition,"format");if(O.$data)validate$DataFormat();else validateFormat();function validate$DataFormat(){const p=u.scopeValue("formats",{ref:$.formats,code:E.code.formats});const m=u.const("fmt",(0,g._)`${p}[${O.schemaCode}]`);t.fail$data((0,g.or)((0,g._)`typeof ${m} != "object"`,(0,g._)`${m} instanceof RegExp`,(0,g._)`typeof ${m}.compare != "function"`,compareCode(m)))}function validateFormat(){const p=O.schema;const m=$.formats[p];if(!m||m===true)return;if(typeof m!="object"||m instanceof RegExp||typeof m.compare!="function"){throw new Error(`"${b}": format "${p}" does not define "compare" function`)}const y=u.scopeValue("formats",{key:p,ref:m,code:E.code.formats?(0,g._)`${E.code.formats}${(0,g.getProperty)(p)}`:undefined});t.fail$data(compareCode(y))}function compareCode(t){return(0,g._)`${t}.compare(${p}, ${y}) ${v[b].fail} 0`}},dependencies:["format"]};const formatLimitPlugin=t=>{t.addKeyword(u.formatLimitDefinition);return t};u["default"]=formatLimitPlugin},8861:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.MissingRefError=u.ValidationError=u.CodeGen=u.Name=u.nil=u.stringify=u.str=u._=u.KeywordCxt=u.Ajv2020=void 0;const m=p(7326);const g=p(6117);const y=p(4665);const v=p(440);const b="https://json-schema.org/draft/2020-12/schema";class Ajv2020 extends m.default{constructor(t={}){super({...t,dynamicRef:true,next:true,unevaluated:true})}_addVocabularies(){super._addVocabularies();g.default.forEach((t=>this.addVocabulary(t)));if(this.opts.discriminator)this.addKeyword(y.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:t,meta:u}=this.opts;if(!u)return;v.default.call(this,t);this.refs["http://json-schema.org/schema"]=b}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(b)?b:undefined)}}u.Ajv2020=Ajv2020;t.exports=u=Ajv2020;t.exports.Ajv2020=Ajv2020;Object.defineProperty(u,"__esModule",{value:true});u["default"]=Ajv2020;var w=p(9278);Object.defineProperty(u,"KeywordCxt",{enumerable:true,get:function(){return w.KeywordCxt}});var E=p(4809);Object.defineProperty(u,"_",{enumerable:true,get:function(){return E._}});Object.defineProperty(u,"str",{enumerable:true,get:function(){return E.str}});Object.defineProperty(u,"stringify",{enumerable:true,get:function(){return E.stringify}});Object.defineProperty(u,"nil",{enumerable:true,get:function(){return E.nil}});Object.defineProperty(u,"Name",{enumerable:true,get:function(){return E.Name}});Object.defineProperty(u,"CodeGen",{enumerable:true,get:function(){return E.CodeGen}});var $=p(4242);Object.defineProperty(u,"ValidationError",{enumerable:true,get:function(){return $.default}});var O=p(8547);Object.defineProperty(u,"MissingRefError",{enumerable:true,get:function(){return O.default}})},7382:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.MissingRefError=u.ValidationError=u.CodeGen=u.Name=u.nil=u.stringify=u.str=u._=u.KeywordCxt=u.Ajv=void 0;const m=p(7326);const g=p(540);const y=p(4665);const v=p(7578);const b=["/properties"];const w="http://json-schema.org/draft-07/schema";class Ajv extends m.default{_addVocabularies(){super._addVocabularies();g.default.forEach((t=>this.addVocabulary(t)));if(this.opts.discriminator)this.addKeyword(y.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();if(!this.opts.meta)return;const t=this.opts.$data?this.$dataMetaSchema(v,b):v;this.addMetaSchema(t,w,false);this.refs["http://json-schema.org/schema"]=w}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(w)?w:undefined)}}u.Ajv=Ajv;t.exports=u=Ajv;t.exports.Ajv=Ajv;Object.defineProperty(u,"__esModule",{value:true});u["default"]=Ajv;var E=p(9278);Object.defineProperty(u,"KeywordCxt",{enumerable:true,get:function(){return E.KeywordCxt}});var $=p(4809);Object.defineProperty(u,"_",{enumerable:true,get:function(){return $._}});Object.defineProperty(u,"str",{enumerable:true,get:function(){return $.str}});Object.defineProperty(u,"stringify",{enumerable:true,get:function(){return $.stringify}});Object.defineProperty(u,"nil",{enumerable:true,get:function(){return $.nil}});Object.defineProperty(u,"Name",{enumerable:true,get:function(){return $.Name}});Object.defineProperty(u,"CodeGen",{enumerable:true,get:function(){return $.CodeGen}});var O=p(4242);Object.defineProperty(u,"ValidationError",{enumerable:true,get:function(){return O.default}});var R=p(8547);Object.defineProperty(u,"MissingRefError",{enumerable:true,get:function(){return R.default}})},9356:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.regexpCode=u.getEsmExportName=u.getProperty=u.safeStringify=u.stringify=u.strConcat=u.addCodeArg=u.str=u._=u.nil=u._Code=u.Name=u.IDENTIFIER=u._CodeOrName=void 0;class _CodeOrName{}u._CodeOrName=_CodeOrName;u.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Name extends _CodeOrName{constructor(t){super();if(!u.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return false}get names(){return{[this.str]:1}}}u.Name=Name;class _Code extends _CodeOrName{constructor(t){super();this._items=typeof t==="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return false;const t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce(((t,u)=>`${t}${u}`),"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce(((t,u)=>{if(u instanceof Name)t[u.str]=(t[u.str]||0)+1;return t}),{})}}u._Code=_Code;u.nil=new _Code("");function _(t,...u){const p=[t[0]];let m=0;while(m<u.length){addCodeArg(p,u[m]);p.push(t[++m])}return new _Code(p)}u._=_;const p=new _Code("+");function str(t,...u){const m=[safeStringify(t[0])];let g=0;while(g<u.length){m.push(p);addCodeArg(m,u[g]);m.push(p,safeStringify(t[++g]))}optimize(m);return new _Code(m)}u.str=str;function addCodeArg(t,u){if(u instanceof _Code)t.push(...u._items);else if(u instanceof Name)t.push(u);else t.push(interpolate(u))}u.addCodeArg=addCodeArg;function optimize(t){let u=1;while(u<t.length-1){if(t[u]===p){const p=mergeExprItems(t[u-1],t[u+1]);if(p!==undefined){t.splice(u-1,3,p);continue}t[u++]="+"}u++}}function mergeExprItems(t,u){if(u==='""')return t;if(t==='""')return u;if(typeof t=="string"){if(u instanceof Name||t[t.length-1]!=='"')return;if(typeof u!="string")return`${t.slice(0,-1)}${u}"`;if(u[0]==='"')return t.slice(0,-1)+u.slice(1);return}if(typeof u=="string"&&u[0]==='"'&&!(t instanceof Name))return`"${t}${u.slice(1)}`;return}function strConcat(t,u){return u.emptyStr()?t:t.emptyStr()?u:str`${t}${u}`}u.strConcat=strConcat;function interpolate(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:safeStringify(Array.isArray(t)?t.join(","):t)}function stringify(t){return new _Code(safeStringify(t))}u.stringify=stringify;function safeStringify(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}u.safeStringify=safeStringify;function getProperty(t){return typeof t=="string"&&u.IDENTIFIER.test(t)?new _Code(`.${t}`):_`[${t}]`}u.getProperty=getProperty;function getEsmExportName(t){if(typeof t=="string"&&u.IDENTIFIER.test(t)){return new _Code(`${t}`)}throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}u.getEsmExportName=getEsmExportName;function regexpCode(t){return new _Code(t.toString())}u.regexpCode=regexpCode},4809:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.or=u.and=u.not=u.CodeGen=u.operators=u.varKinds=u.ValueScopeName=u.ValueScope=u.Scope=u.Name=u.regexpCode=u.stringify=u.getProperty=u.nil=u.strConcat=u.str=u._=void 0;const m=p(9356);const g=p(6785);var y=p(9356);Object.defineProperty(u,"_",{enumerable:true,get:function(){return y._}});Object.defineProperty(u,"str",{enumerable:true,get:function(){return y.str}});Object.defineProperty(u,"strConcat",{enumerable:true,get:function(){return y.strConcat}});Object.defineProperty(u,"nil",{enumerable:true,get:function(){return y.nil}});Object.defineProperty(u,"getProperty",{enumerable:true,get:function(){return y.getProperty}});Object.defineProperty(u,"stringify",{enumerable:true,get:function(){return y.stringify}});Object.defineProperty(u,"regexpCode",{enumerable:true,get:function(){return y.regexpCode}});Object.defineProperty(u,"Name",{enumerable:true,get:function(){return y.Name}});var v=p(6785);Object.defineProperty(u,"Scope",{enumerable:true,get:function(){return v.Scope}});Object.defineProperty(u,"ValueScope",{enumerable:true,get:function(){return v.ValueScope}});Object.defineProperty(u,"ValueScopeName",{enumerable:true,get:function(){return v.ValueScopeName}});Object.defineProperty(u,"varKinds",{enumerable:true,get:function(){return v.varKinds}});u.operators={GT:new m._Code(">"),GTE:new m._Code(">="),LT:new m._Code("<"),LTE:new m._Code("<="),EQ:new m._Code("==="),NEQ:new m._Code("!=="),NOT:new m._Code("!"),OR:new m._Code("||"),AND:new m._Code("&&"),ADD:new m._Code("+")};class Node{optimizeNodes(){return this}optimizeNames(t,u){return this}}class Def extends Node{constructor(t,u,p){super();this.varKind=t;this.name=u;this.rhs=p}render({es5:t,_n:u}){const p=t?g.varKinds.var:this.varKind;const m=this.rhs===undefined?"":` = ${this.rhs}`;return`${p} ${this.name}${m};`+u}optimizeNames(t,u){if(!t[this.name.str])return;if(this.rhs)this.rhs=optimizeExpr(this.rhs,t,u);return this}get names(){return this.rhs instanceof m._CodeOrName?this.rhs.names:{}}}class Assign extends Node{constructor(t,u,p){super();this.lhs=t;this.rhs=u;this.sideEffects=p}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,u){if(this.lhs instanceof m.Name&&!t[this.lhs.str]&&!this.sideEffects)return;this.rhs=optimizeExpr(this.rhs,t,u);return this}get names(){const t=this.lhs instanceof m.Name?{}:{...this.lhs.names};return addExprNames(t,this.rhs)}}class AssignOp extends Assign{constructor(t,u,p,m){super(t,p,m);this.op=u}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}}class Label extends Node{constructor(t){super();this.label=t;this.names={}}render({_n:t}){return`${this.label}:`+t}}class Break extends Node{constructor(t){super();this.label=t;this.names={}}render({_n:t}){const u=this.label?` ${this.label}`:"";return`break${u};`+t}}class Throw extends Node{constructor(t){super();this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}}class AnyCode extends Node{constructor(t){super();this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:undefined}optimizeNames(t,u){this.code=optimizeExpr(this.code,t,u);return this}get names(){return this.code instanceof m._CodeOrName?this.code.names:{}}}class ParentNode extends Node{constructor(t=[]){super();this.nodes=t}render(t){return this.nodes.reduce(((u,p)=>u+p.render(t)),"")}optimizeNodes(){const{nodes:t}=this;let u=t.length;while(u--){const p=t[u].optimizeNodes();if(Array.isArray(p))t.splice(u,1,...p);else if(p)t[u]=p;else t.splice(u,1)}return t.length>0?this:undefined}optimizeNames(t,u){const{nodes:p}=this;let m=p.length;while(m--){const g=p[m];if(g.optimizeNames(t,u))continue;subtractNames(t,g.names);p.splice(m,1)}return p.length>0?this:undefined}get names(){return this.nodes.reduce(((t,u)=>addNames(t,u.names)),{})}}class BlockNode extends ParentNode{render(t){return"{"+t._n+super.render(t)+"}"+t._n}}class Root extends ParentNode{}class Else extends BlockNode{}Else.kind="else";class If extends BlockNode{constructor(t,u){super(u);this.condition=t}render(t){let u=`if(${this.condition})`+super.render(t);if(this.else)u+="else "+this.else.render(t);return u}optimizeNodes(){super.optimizeNodes();const t=this.condition;if(t===true)return this.nodes;let u=this.else;if(u){const t=u.optimizeNodes();u=this.else=Array.isArray(t)?new Else(t):t}if(u){if(t===false)return u instanceof If?u:u.nodes;if(this.nodes.length)return this;return new If(not(t),u instanceof If?[u]:u.nodes)}if(t===false||!this.nodes.length)return undefined;return this}optimizeNames(t,u){var p;this.else=(p=this.else)===null||p===void 0?void 0:p.optimizeNames(t,u);if(!(super.optimizeNames(t,u)||this.else))return;this.condition=optimizeExpr(this.condition,t,u);return this}get names(){const t=super.names;addExprNames(t,this.condition);if(this.else)addNames(t,this.else.names);return t}}If.kind="if";class For extends BlockNode{}For.kind="for";class ForLoop extends For{constructor(t){super();this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,u){if(!super.optimizeNames(t,u))return;this.iteration=optimizeExpr(this.iteration,t,u);return this}get names(){return addNames(super.names,this.iteration.names)}}class ForRange extends For{constructor(t,u,p,m){super();this.varKind=t;this.name=u;this.from=p;this.to=m}render(t){const u=t.es5?g.varKinds.var:this.varKind;const{name:p,from:m,to:y}=this;return`for(${u} ${p}=${m}; ${p}<${y}; ${p}++)`+super.render(t)}get names(){const t=addExprNames(super.names,this.from);return addExprNames(t,this.to)}}class ForIter extends For{constructor(t,u,p,m){super();this.loop=t;this.varKind=u;this.name=p;this.iterable=m}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,u){if(!super.optimizeNames(t,u))return;this.iterable=optimizeExpr(this.iterable,t,u);return this}get names(){return addNames(super.names,this.iterable.names)}}class Func extends BlockNode{constructor(t,u,p){super();this.name=t;this.args=u;this.async=p}render(t){const u=this.async?"async ":"";return`${u}function ${this.name}(${this.args})`+super.render(t)}}Func.kind="func";class Return extends ParentNode{render(t){return"return "+super.render(t)}}Return.kind="return";class Try extends BlockNode{render(t){let u="try"+super.render(t);if(this.catch)u+=this.catch.render(t);if(this.finally)u+=this.finally.render(t);return u}optimizeNodes(){var t,u;super.optimizeNodes();(t=this.catch)===null||t===void 0?void 0:t.optimizeNodes();(u=this.finally)===null||u===void 0?void 0:u.optimizeNodes();return this}optimizeNames(t,u){var p,m;super.optimizeNames(t,u);(p=this.catch)===null||p===void 0?void 0:p.optimizeNames(t,u);(m=this.finally)===null||m===void 0?void 0:m.optimizeNames(t,u);return this}get names(){const t=super.names;if(this.catch)addNames(t,this.catch.names);if(this.finally)addNames(t,this.finally.names);return t}}class Catch extends BlockNode{constructor(t){super();this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}Catch.kind="catch";class Finally extends BlockNode{render(t){return"finally"+super.render(t)}}Finally.kind="finally";class CodeGen{constructor(t,u={}){this._values={};this._blockStarts=[];this._constants={};this.opts={...u,_n:u.lines?"\n":""};this._extScope=t;this._scope=new g.Scope({parent:t});this._nodes=[new Root]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,u){const p=this._extScope.value(t,u);const m=this._values[p.prefix]||(this._values[p.prefix]=new Set);m.add(p);return p}getScopeValue(t,u){return this._extScope.getValue(t,u)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,u,p,m){const g=this._scope.toName(u);if(p!==undefined&&m)this._constants[g.str]=p;this._leafNode(new Def(t,g,p));return g}const(t,u,p){return this._def(g.varKinds.const,t,u,p)}let(t,u,p){return this._def(g.varKinds.let,t,u,p)}var(t,u,p){return this._def(g.varKinds.var,t,u,p)}assign(t,u,p){return this._leafNode(new Assign(t,u,p))}add(t,p){return this._leafNode(new AssignOp(t,u.operators.ADD,p))}code(t){if(typeof t=="function")t();else if(t!==m.nil)this._leafNode(new AnyCode(t));return this}object(...t){const u=["{"];for(const[p,g]of t){if(u.length>1)u.push(",");u.push(p);if(p!==g||this.opts.es5){u.push(":");(0,m.addCodeArg)(u,g)}}u.push("}");return new m._Code(u)}if(t,u,p){this._blockNode(new If(t));if(u&&p){this.code(u).else().code(p).endIf()}else if(u){this.code(u).endIf()}else if(p){throw new Error('CodeGen: "else" body without "then" body')}return this}elseIf(t){return this._elseNode(new If(t))}else(){return this._elseNode(new Else)}endIf(){return this._endBlockNode(If,Else)}_for(t,u){this._blockNode(t);if(u)this.code(u).endFor();return this}for(t,u){return this._for(new ForLoop(t),u)}forRange(t,u,p,m,y=(this.opts.es5?g.varKinds.var:g.varKinds.let)){const v=this._scope.toName(t);return this._for(new ForRange(y,v,u,p),(()=>m(v)))}forOf(t,u,p,y=g.varKinds.const){const v=this._scope.toName(t);if(this.opts.es5){const t=u instanceof m.Name?u:this.var("_arr",u);return this.forRange("_i",0,(0,m._)`${t}.length`,(u=>{this.var(v,(0,m._)`${t}[${u}]`);p(v)}))}return this._for(new ForIter("of",y,v,u),(()=>p(v)))}forIn(t,u,p,y=(this.opts.es5?g.varKinds.var:g.varKinds.const)){if(this.opts.ownProperties){return this.forOf(t,(0,m._)`Object.keys(${u})`,p)}const v=this._scope.toName(t);return this._for(new ForIter("in",y,v,u),(()=>p(v)))}endFor(){return this._endBlockNode(For)}label(t){return this._leafNode(new Label(t))}break(t){return this._leafNode(new Break(t))}return(t){const u=new Return;this._blockNode(u);this.code(t);if(u.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Return)}try(t,u,p){if(!u&&!p)throw new Error('CodeGen: "try" without "catch" and "finally"');const m=new Try;this._blockNode(m);this.code(t);if(u){const t=this.name("e");this._currNode=m.catch=new Catch(t);u(t)}if(p){this._currNode=m.finally=new Finally;this.code(p)}return this._endBlockNode(Catch,Finally)}throw(t){return this._leafNode(new Throw(t))}block(t,u){this._blockStarts.push(this._nodes.length);if(t)this.code(t).endBlock(u);return this}endBlock(t){const u=this._blockStarts.pop();if(u===undefined)throw new Error("CodeGen: not in self-balancing block");const p=this._nodes.length-u;if(p<0||t!==undefined&&p!==t){throw new Error(`CodeGen: wrong number of nodes: ${p} vs ${t} expected`)}this._nodes.length=u;return this}func(t,u=m.nil,p,g){this._blockNode(new Func(t,u,p));if(g)this.code(g).endFunc();return this}endFunc(){return this._endBlockNode(Func)}optimize(t=1){while(t-- >0){this._root.optimizeNodes();this._root.optimizeNames(this._root.names,this._constants)}}_leafNode(t){this._currNode.nodes.push(t);return this}_blockNode(t){this._currNode.nodes.push(t);this._nodes.push(t)}_endBlockNode(t,u){const p=this._currNode;if(p instanceof t||u&&p instanceof u){this._nodes.pop();return this}throw new Error(`CodeGen: not in block "${u?`${t.kind}/${u.kind}`:t.kind}"`)}_elseNode(t){const u=this._currNode;if(!(u instanceof If)){throw new Error('CodeGen: "else" without "if"')}this._currNode=u.else=t;return this}get _root(){return this._nodes[0]}get _currNode(){const t=this._nodes;return t[t.length-1]}set _currNode(t){const u=this._nodes;u[u.length-1]=t}}u.CodeGen=CodeGen;function addNames(t,u){for(const p in u)t[p]=(t[p]||0)+(u[p]||0);return t}function addExprNames(t,u){return u instanceof m._CodeOrName?addNames(t,u.names):t}function optimizeExpr(t,u,p){if(t instanceof m.Name)return replaceName(t);if(!canOptimize(t))return t;return new m._Code(t._items.reduce(((t,u)=>{if(u instanceof m.Name)u=replaceName(u);if(u instanceof m._Code)t.push(...u._items);else t.push(u);return t}),[]));function replaceName(t){const m=p[t.str];if(m===undefined||u[t.str]!==1)return t;delete u[t.str];return m}function canOptimize(t){return t instanceof m._Code&&t._items.some((t=>t instanceof m.Name&&u[t.str]===1&&p[t.str]!==undefined))}}function subtractNames(t,u){for(const p in u)t[p]=(t[p]||0)-(u[p]||0)}function not(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,m._)`!${par(t)}`}u.not=not;const b=mappend(u.operators.AND);function and(...t){return t.reduce(b)}u.and=and;const w=mappend(u.operators.OR);function or(...t){return t.reduce(w)}u.or=or;function mappend(t){return(u,p)=>u===m.nil?p:p===m.nil?u:(0,m._)`${par(u)} ${t} ${par(p)}`}function par(t){return t instanceof m.Name?t:(0,m._)`(${t})`}},6785:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.ValueScope=u.ValueScopeName=u.Scope=u.varKinds=u.UsedValueState=void 0;const m=p(9356);class ValueError extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`);this.value=t.value}}var g;(function(t){t[t["Started"]=0]="Started";t[t["Completed"]=1]="Completed"})(g||(u.UsedValueState=g={}));u.varKinds={const:new m.Name("const"),let:new m.Name("let"),var:new m.Name("var")};class Scope{constructor({prefixes:t,parent:u}={}){this._names={};this._prefixes=t;this._parent=u}toName(t){return t instanceof m.Name?t:this.name(t)}name(t){return new m.Name(this._newName(t))}_newName(t){const u=this._names[t]||this._nameGroup(t);return`${t}${u.index++}`}_nameGroup(t){var u,p;if(((p=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||p===void 0?void 0:p.has(t))||this._prefixes&&!this._prefixes.has(t)){throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`)}return this._names[t]={prefix:t,index:0}}}u.Scope=Scope;class ValueScopeName extends m.Name{constructor(t,u){super(u);this.prefix=t}setValue(t,{property:u,itemIndex:p}){this.value=t;this.scopePath=(0,m._)`.${new m.Name(u)}[${p}]`}}u.ValueScopeName=ValueScopeName;const y=(0,m._)`\n`;class ValueScope extends Scope{constructor(t){super(t);this._values={};this._scope=t.scope;this.opts={...t,_n:t.lines?y:m.nil}}get(){return this._scope}name(t){return new ValueScopeName(t,this._newName(t))}value(t,u){var p;if(u.ref===undefined)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(t);const{prefix:g}=m;const y=(p=u.key)!==null&&p!==void 0?p:u.ref;let v=this._values[g];if(v){const t=v.get(y);if(t)return t}else{v=this._values[g]=new Map}v.set(y,m);const b=this._scope[g]||(this._scope[g]=[]);const w=b.length;b[w]=u.ref;m.setValue(u,{property:g,itemIndex:w});return m}getValue(t,u){const p=this._values[t];if(!p)return;return p.get(u)}scopeRefs(t,u=this._values){return this._reduceValues(u,(u=>{if(u.scopePath===undefined)throw new Error(`CodeGen: name "${u}" has no value`);return(0,m._)`${t}${u.scopePath}`}))}scopeCode(t=this._values,u,p){return this._reduceValues(t,(t=>{if(t.value===undefined)throw new Error(`CodeGen: name "${t}" has no value`);return t.value.code}),u,p)}_reduceValues(t,p,y={},v){let b=m.nil;for(const w in t){const E=t[w];if(!E)continue;const $=y[w]=y[w]||new Map;E.forEach((t=>{if($.has(t))return;$.set(t,g.Started);let y=p(t);if(y){const p=this.opts.es5?u.varKinds.var:u.varKinds.const;b=(0,m._)`${b}${p} ${t} = ${y};${this.opts._n}`}else if(y=v===null||v===void 0?void 0:v(t)){b=(0,m._)`${b}${y}${this.opts._n}`}else{throw new ValueError(t)}$.set(t,g.Completed)}))}return b}}u.ValueScope=ValueScope},5456:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.extendErrors=u.resetErrorsCount=u.reportExtraError=u.reportError=u.keyword$DataError=u.keywordError=void 0;const m=p(4809);const g=p(4359);const y=p(1267);u.keywordError={message:({keyword:t})=>(0,m.str)`must pass "${t}" keyword validation`};u.keyword$DataError={message:({keyword:t,schemaType:u})=>u?(0,m.str)`"${t}" keyword must be ${u} ($data)`:(0,m.str)`"${t}" keyword is invalid ($data)`};function reportError(t,p=u.keywordError,g,y){const{it:v}=t;const{gen:b,compositeRule:w,allErrors:E}=v;const $=errorObjectCode(t,p,g);if(y!==null&&y!==void 0?y:w||E){addError(b,$)}else{returnErrors(v,(0,m._)`[${$}]`)}}u.reportError=reportError;function reportExtraError(t,p=u.keywordError,m){const{it:g}=t;const{gen:v,compositeRule:b,allErrors:w}=g;const E=errorObjectCode(t,p,m);addError(v,E);if(!(b||w)){returnErrors(g,y.default.vErrors)}}u.reportExtraError=reportExtraError;function resetErrorsCount(t,u){t.assign(y.default.errors,u);t.if((0,m._)`${y.default.vErrors} !== null`,(()=>t.if(u,(()=>t.assign((0,m._)`${y.default.vErrors}.length`,u)),(()=>t.assign(y.default.vErrors,null)))))}u.resetErrorsCount=resetErrorsCount;function extendErrors({gen:t,keyword:u,schemaValue:p,data:g,errsCount:v,it:b}){if(v===undefined)throw new Error("ajv implementation error");const w=t.name("err");t.forRange("i",v,y.default.errors,(v=>{t.const(w,(0,m._)`${y.default.vErrors}[${v}]`);t.if((0,m._)`${w}.instancePath === undefined`,(()=>t.assign((0,m._)`${w}.instancePath`,(0,m.strConcat)(y.default.instancePath,b.errorPath))));t.assign((0,m._)`${w}.schemaPath`,(0,m.str)`${b.errSchemaPath}/${u}`);if(b.opts.verbose){t.assign((0,m._)`${w}.schema`,p);t.assign((0,m._)`${w}.data`,g)}}))}u.extendErrors=extendErrors;function addError(t,u){const p=t.const("err",u);t.if((0,m._)`${y.default.vErrors} === null`,(()=>t.assign(y.default.vErrors,(0,m._)`[${p}]`)),(0,m._)`${y.default.vErrors}.push(${p})`);t.code((0,m._)`${y.default.errors}++`)}function returnErrors(t,u){const{gen:p,validateName:g,schemaEnv:y}=t;if(y.$async){p.throw((0,m._)`new ${t.ValidationError}(${u})`)}else{p.assign((0,m._)`${g}.errors`,u);p.return(false)}}const v={keyword:new m.Name("keyword"),schemaPath:new m.Name("schemaPath"),params:new m.Name("params"),propertyName:new m.Name("propertyName"),message:new m.Name("message"),schema:new m.Name("schema"),parentSchema:new m.Name("parentSchema")};function errorObjectCode(t,u,p){const{createErrors:g}=t.it;if(g===false)return(0,m._)`{}`;return errorObject(t,u,p)}function errorObject(t,u,p={}){const{gen:m,it:g}=t;const y=[errorInstancePath(g,p),errorSchemaPath(t,p)];extraErrorProps(t,u,y);return m.object(...y)}function errorInstancePath({errorPath:t},{instancePath:u}){const p=u?(0,m.str)`${t}${(0,g.getErrorPath)(u,g.Type.Str)}`:t;return[y.default.instancePath,(0,m.strConcat)(y.default.instancePath,p)]}function errorSchemaPath({keyword:t,it:{errSchemaPath:u}},{schemaPath:p,parentSchema:y}){let b=y?u:(0,m.str)`${u}/${t}`;if(p){b=(0,m.str)`${b}${(0,g.getErrorPath)(p,g.Type.Str)}`}return[v.schemaPath,b]}function extraErrorProps(t,{params:u,message:p},g){const{keyword:b,data:w,schemaValue:E,it:$}=t;const{opts:O,propertyName:R,topSchemaRef:P,schemaPath:A}=$;g.push([v.keyword,b],[v.params,typeof u=="function"?u(t):u||(0,m._)`{}`]);if(O.messages){g.push([v.message,typeof p=="function"?p(t):p])}if(O.verbose){g.push([v.schema,E],[v.parentSchema,(0,m._)`${P}${A}`],[y.default.data,w])}if(R)g.push([v.propertyName,R])}},2407:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.resolveSchema=u.getCompilingSchema=u.resolveRef=u.compileSchema=u.SchemaEnv=void 0;const m=p(4809);const g=p(4242);const y=p(1267);const v=p(5351);const b=p(4359);const w=p(9278);class SchemaEnv{constructor(t){var u;this.refs={};this.dynamicAnchors={};let p;if(typeof t.schema=="object")p=t.schema;this.schema=t.schema;this.schemaId=t.schemaId;this.root=t.root||this;this.baseId=(u=t.baseId)!==null&&u!==void 0?u:(0,v.normalizeId)(p===null||p===void 0?void 0:p[t.schemaId||"$id"]);this.schemaPath=t.schemaPath;this.localRefs=t.localRefs;this.meta=t.meta;this.$async=p===null||p===void 0?void 0:p.$async;this.refs={}}}u.SchemaEnv=SchemaEnv;function compileSchema(t){const u=getCompilingSchema.call(this,t);if(u)return u;const p=(0,v.getFullPath)(this.opts.uriResolver,t.root.baseId);const{es5:b,lines:E}=this.opts.code;const{ownProperties:$}=this.opts;const O=new m.CodeGen(this.scope,{es5:b,lines:E,ownProperties:$});let R;if(t.$async){R=O.scopeValue("Error",{ref:g.default,code:(0,m._)`require("ajv/dist/runtime/validation_error").default`})}const P=O.scopeName("validate");t.validateName=P;const A={gen:O,allErrors:this.opts.allErrors,data:y.default.data,parentData:y.default.parentData,parentDataProperty:y.default.parentDataProperty,dataNames:[y.default.data],dataPathArr:[m.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:O.scopeValue("schema",this.opts.code.source===true?{ref:t.schema,code:(0,m.stringify)(t.schema)}:{ref:t.schema}),validateName:P,ValidationError:R,schema:t.schema,schemaEnv:t,rootId:p,baseId:t.baseId||p,schemaPath:m.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,m._)`""`,opts:this.opts,self:this};let x;try{this._compilations.add(t);(0,w.validateFunctionCode)(A);O.optimize(this.opts.code.optimize);const u=O.toString();x=`${O.scopeRefs(y.default.scope)}return ${u}`;if(this.opts.code.process)x=this.opts.code.process(x,t);const p=new Function(`${y.default.self}`,`${y.default.scope}`,x);const g=p(this,this.scope.get());this.scope.value(P,{ref:g});g.errors=null;g.schema=t.schema;g.schemaEnv=t;if(t.$async)g.$async=true;if(this.opts.code.source===true){g.source={validateName:P,validateCode:u,scopeValues:O._values}}if(this.opts.unevaluated){const{props:t,items:u}=A;g.evaluated={props:t instanceof m.Name?undefined:t,items:u instanceof m.Name?undefined:u,dynamicProps:t instanceof m.Name,dynamicItems:u instanceof m.Name};if(g.source)g.source.evaluated=(0,m.stringify)(g.evaluated)}t.validate=g;return t}catch(u){delete t.validate;delete t.validateName;if(x)this.logger.error("Error compiling schema, function code:",x);throw u}finally{this._compilations.delete(t)}}u.compileSchema=compileSchema;function resolveRef(t,u,p){var m;p=(0,v.resolveUrl)(this.opts.uriResolver,u,p);const g=t.refs[p];if(g)return g;let y=resolve.call(this,t,p);if(y===undefined){const g=(m=t.localRefs)===null||m===void 0?void 0:m[p];const{schemaId:v}=this.opts;if(g)y=new SchemaEnv({schema:g,schemaId:v,root:t,baseId:u})}if(y===undefined)return;return t.refs[p]=inlineOrCompile.call(this,y)}u.resolveRef=resolveRef;function inlineOrCompile(t){if((0,v.inlineRef)(t.schema,this.opts.inlineRefs))return t.schema;return t.validate?t:compileSchema.call(this,t)}function getCompilingSchema(t){for(const u of this._compilations){if(sameSchemaEnv(u,t))return u}}u.getCompilingSchema=getCompilingSchema;function sameSchemaEnv(t,u){return t.schema===u.schema&&t.root===u.root&&t.baseId===u.baseId}function resolve(t,u){let p;while(typeof(p=this.refs[u])=="string")u=p;return p||this.schemas[u]||resolveSchema.call(this,t,u)}function resolveSchema(t,u){const p=this.opts.uriResolver.parse(u);const m=(0,v._getFullPath)(this.opts.uriResolver,p);let g=(0,v.getFullPath)(this.opts.uriResolver,t.baseId,undefined);if(Object.keys(t.schema).length>0&&m===g){return getJsonPointer.call(this,p,t)}const y=(0,v.normalizeId)(m);const b=this.refs[y]||this.schemas[y];if(typeof b=="string"){const u=resolveSchema.call(this,t,b);if(typeof(u===null||u===void 0?void 0:u.schema)!=="object")return;return getJsonPointer.call(this,p,u)}if(typeof(b===null||b===void 0?void 0:b.schema)!=="object")return;if(!b.validate)compileSchema.call(this,b);if(y===(0,v.normalizeId)(u)){const{schema:u}=b;const{schemaId:p}=this.opts;const m=u[p];if(m)g=(0,v.resolveUrl)(this.opts.uriResolver,g,m);return new SchemaEnv({schema:u,schemaId:p,root:t,baseId:g})}return getJsonPointer.call(this,p,b)}u.resolveSchema=resolveSchema;const E=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(t,{baseId:u,schema:p,root:m}){var g;if(((g=t.fragment)===null||g===void 0?void 0:g[0])!=="/")return;for(const m of t.fragment.slice(1).split("/")){if(typeof p==="boolean")return;const t=p[(0,b.unescapeFragment)(m)];if(t===undefined)return;p=t;const g=typeof p==="object"&&p[this.opts.schemaId];if(!E.has(m)&&g){u=(0,v.resolveUrl)(this.opts.uriResolver,u,g)}}let y;if(typeof p!="boolean"&&p.$ref&&!(0,b.schemaHasRulesButRef)(p,this.RULES)){const t=(0,v.resolveUrl)(this.opts.uriResolver,u,p.$ref);y=resolveSchema.call(this,m,t)}const{schemaId:w}=this.opts;y=y||new SchemaEnv({schema:p,schemaId:w,root:m,baseId:u});if(y.schema!==y.root.schema)return y;return undefined}},1267:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4809);const g={data:new m.Name("data"),valCxt:new m.Name("valCxt"),instancePath:new m.Name("instancePath"),parentData:new m.Name("parentData"),parentDataProperty:new m.Name("parentDataProperty"),rootData:new m.Name("rootData"),dynamicAnchors:new m.Name("dynamicAnchors"),vErrors:new m.Name("vErrors"),errors:new m.Name("errors"),this:new m.Name("this"),self:new m.Name("self"),scope:new m.Name("scope"),json:new m.Name("json"),jsonPos:new m.Name("jsonPos"),jsonLen:new m.Name("jsonLen"),jsonPart:new m.Name("jsonPart")};u["default"]=g},8547:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(5351);class MissingRefError extends Error{constructor(t,u,p,g){super(g||`can't resolve reference ${p} from id ${u}`);this.missingRef=(0,m.resolveUrl)(t,u,p);this.missingSchema=(0,m.normalizeId)((0,m.getFullPath)(t,this.missingRef))}}u["default"]=MissingRefError},5351:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.getSchemaRefs=u.resolveUrl=u.normalizeId=u._getFullPath=u.getFullPath=u.inlineRef=void 0;const m=p(4359);const g=p(3222);const y=p(3456);const v=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function inlineRef(t,u=true){if(typeof t=="boolean")return true;if(u===true)return!hasRef(t);if(!u)return false;return countKeys(t)<=u}u.inlineRef=inlineRef;const b=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hasRef(t){for(const u in t){if(b.has(u))return true;const p=t[u];if(Array.isArray(p)&&p.some(hasRef))return true;if(typeof p=="object"&&hasRef(p))return true}return false}function countKeys(t){let u=0;for(const p in t){if(p==="$ref")return Infinity;u++;if(v.has(p))continue;if(typeof t[p]=="object"){(0,m.eachItem)(t[p],(t=>u+=countKeys(t)))}if(u===Infinity)return Infinity}return u}function getFullPath(t,u="",p){if(p!==false)u=normalizeId(u);const m=t.parse(u);return _getFullPath(t,m)}u.getFullPath=getFullPath;function _getFullPath(t,u){const p=t.serialize(u);return p.split("#")[0]+"#"}u._getFullPath=_getFullPath;const w=/#\/?$/;function normalizeId(t){return t?t.replace(w,""):""}u.normalizeId=normalizeId;function resolveUrl(t,u,p){p=normalizeId(p);return t.resolve(u,p)}u.resolveUrl=resolveUrl;const E=/^[a-z_][-a-z0-9._]*$/i;function getSchemaRefs(t,u){if(typeof t=="boolean")return{};const{schemaId:p,uriResolver:m}=this.opts;const v=normalizeId(t[p]||u);const b={"":v};const w=getFullPath(m,v,false);const $={};const O=new Set;y(t,{allKeys:true},((t,u,m,g)=>{if(g===undefined)return;const y=w+u;let v=b[g];if(typeof t[p]=="string")v=addRef.call(this,t[p]);addAnchor.call(this,t.$anchor);addAnchor.call(this,t.$dynamicAnchor);b[u]=v;function addRef(u){const p=this.opts.uriResolver.resolve;u=normalizeId(v?p(v,u):u);if(O.has(u))throw ambiguos(u);O.add(u);let m=this.refs[u];if(typeof m=="string")m=this.refs[m];if(typeof m=="object"){checkAmbiguosRef(t,m.schema,u)}else if(u!==normalizeId(y)){if(u[0]==="#"){checkAmbiguosRef(t,$[u],u);$[u]=t}else{this.refs[u]=y}}return u}function addAnchor(t){if(typeof t=="string"){if(!E.test(t))throw new Error(`invalid anchor "${t}"`);addRef.call(this,`#${t}`)}}}));return $;function checkAmbiguosRef(t,u,p){if(u!==undefined&&!g(t,u))throw ambiguos(p)}function ambiguos(t){return new Error(`reference "${t}" resolves to more than one schema`)}}u.getSchemaRefs=getSchemaRefs},8888:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.getRules=u.isJSONType=void 0;const p=["string","number","integer","boolean","null","object","array"];const m=new Set(p);function isJSONType(t){return typeof t=="string"&&m.has(t)}u.isJSONType=isJSONType;function getRules(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:true,boolean:true,null:true},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}u.getRules=getRules},4359:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.checkStrictMode=u.getErrorPath=u.Type=u.useFunc=u.setEvaluated=u.evaluatedPropsToName=u.mergeEvaluated=u.eachItem=u.unescapeJsonPointer=u.escapeJsonPointer=u.escapeFragment=u.unescapeFragment=u.schemaRefOrVal=u.schemaHasRulesButRef=u.schemaHasRules=u.checkUnknownRules=u.alwaysValidSchema=u.toHash=void 0;const m=p(4809);const g=p(9356);function toHash(t){const u={};for(const p of t)u[p]=true;return u}u.toHash=toHash;function alwaysValidSchema(t,u){if(typeof u=="boolean")return u;if(Object.keys(u).length===0)return true;checkUnknownRules(t,u);return!schemaHasRules(u,t.self.RULES.all)}u.alwaysValidSchema=alwaysValidSchema;function checkUnknownRules(t,u=t.schema){const{opts:p,self:m}=t;if(!p.strictSchema)return;if(typeof u==="boolean")return;const g=m.RULES.keywords;for(const p in u){if(!g[p])checkStrictMode(t,`unknown keyword: "${p}"`)}}u.checkUnknownRules=checkUnknownRules;function schemaHasRules(t,u){if(typeof t=="boolean")return!t;for(const p in t)if(u[p])return true;return false}u.schemaHasRules=schemaHasRules;function schemaHasRulesButRef(t,u){if(typeof t=="boolean")return!t;for(const p in t)if(p!=="$ref"&&u.all[p])return true;return false}u.schemaHasRulesButRef=schemaHasRulesButRef;function schemaRefOrVal({topSchemaRef:t,schemaPath:u},p,g,y){if(!y){if(typeof p=="number"||typeof p=="boolean")return p;if(typeof p=="string")return(0,m._)`${p}`}return(0,m._)`${t}${u}${(0,m.getProperty)(g)}`}u.schemaRefOrVal=schemaRefOrVal;function unescapeFragment(t){return unescapeJsonPointer(decodeURIComponent(t))}u.unescapeFragment=unescapeFragment;function escapeFragment(t){return encodeURIComponent(escapeJsonPointer(t))}u.escapeFragment=escapeFragment;function escapeJsonPointer(t){if(typeof t=="number")return`${t}`;return t.replace(/~/g,"~0").replace(/\//g,"~1")}u.escapeJsonPointer=escapeJsonPointer;function unescapeJsonPointer(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}u.unescapeJsonPointer=unescapeJsonPointer;function eachItem(t,u){if(Array.isArray(t)){for(const p of t)u(p)}else{u(t)}}u.eachItem=eachItem;function makeMergeEvaluated({mergeNames:t,mergeToName:u,mergeValues:p,resultToName:g}){return(y,v,b,w)=>{const E=b===undefined?v:b instanceof m.Name?(v instanceof m.Name?t(y,v,b):u(y,v,b),b):v instanceof m.Name?(u(y,b,v),v):p(v,b);return w===m.Name&&!(E instanceof m.Name)?g(y,E):E}}u.mergeEvaluated={props:makeMergeEvaluated({mergeNames:(t,u,p)=>t.if((0,m._)`${p} !== true && ${u} !== undefined`,(()=>{t.if((0,m._)`${u} === true`,(()=>t.assign(p,true)),(()=>t.assign(p,(0,m._)`${p} || {}`).code((0,m._)`Object.assign(${p}, ${u})`)))})),mergeToName:(t,u,p)=>t.if((0,m._)`${p} !== true`,(()=>{if(u===true){t.assign(p,true)}else{t.assign(p,(0,m._)`${p} || {}`);setEvaluated(t,p,u)}})),mergeValues:(t,u)=>t===true?true:{...t,...u},resultToName:evaluatedPropsToName}),items:makeMergeEvaluated({mergeNames:(t,u,p)=>t.if((0,m._)`${p} !== true && ${u} !== undefined`,(()=>t.assign(p,(0,m._)`${u} === true ? true : ${p} > ${u} ? ${p} : ${u}`))),mergeToName:(t,u,p)=>t.if((0,m._)`${p} !== true`,(()=>t.assign(p,u===true?true:(0,m._)`${p} > ${u} ? ${p} : ${u}`))),mergeValues:(t,u)=>t===true?true:Math.max(t,u),resultToName:(t,u)=>t.var("items",u)})};function evaluatedPropsToName(t,u){if(u===true)return t.var("props",true);const p=t.var("props",(0,m._)`{}`);if(u!==undefined)setEvaluated(t,p,u);return p}u.evaluatedPropsToName=evaluatedPropsToName;function setEvaluated(t,u,p){Object.keys(p).forEach((p=>t.assign((0,m._)`${u}${(0,m.getProperty)(p)}`,true)))}u.setEvaluated=setEvaluated;const y={};function useFunc(t,u){return t.scopeValue("func",{ref:u,code:y[u.code]||(y[u.code]=new g._Code(u.code))})}u.useFunc=useFunc;var v;(function(t){t[t["Num"]=0]="Num";t[t["Str"]=1]="Str"})(v||(u.Type=v={}));function getErrorPath(t,u,p){if(t instanceof m.Name){const g=u===v.Num;return p?g?(0,m._)`"[" + ${t} + "]"`:(0,m._)`"['" + ${t} + "']"`:g?(0,m._)`"/" + ${t}`:(0,m._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return p?(0,m.getProperty)(t).toString():"/"+escapeJsonPointer(t)}u.getErrorPath=getErrorPath;function checkStrictMode(t,u,p=t.opts.strictSchema){if(!p)return;u=`strict mode: ${u}`;if(p===true)throw new Error(u);t.self.logger.warn(u)}u.checkStrictMode=checkStrictMode},2867:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.shouldUseRule=u.shouldUseGroup=u.schemaHasRulesForType=void 0;function schemaHasRulesForType({schema:t,self:u},p){const m=u.RULES.types[p];return m&&m!==true&&shouldUseGroup(t,m)}u.schemaHasRulesForType=schemaHasRulesForType;function shouldUseGroup(t,u){return u.rules.some((u=>shouldUseRule(t,u)))}u.shouldUseGroup=shouldUseGroup;function shouldUseRule(t,u){var p;return t[u.keyword]!==undefined||((p=u.definition.implements)===null||p===void 0?void 0:p.some((u=>t[u]!==undefined)))}u.shouldUseRule=shouldUseRule},6499:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.boolOrEmptySchema=u.topBoolOrEmptySchema=void 0;const m=p(5456);const g=p(4809);const y=p(1267);const v={message:"boolean schema is false"};function topBoolOrEmptySchema(t){const{gen:u,schema:p,validateName:m}=t;if(p===false){falseSchemaError(t,false)}else if(typeof p=="object"&&p.$async===true){u.return(y.default.data)}else{u.assign((0,g._)`${m}.errors`,null);u.return(true)}}u.topBoolOrEmptySchema=topBoolOrEmptySchema;function boolOrEmptySchema(t,u){const{gen:p,schema:m}=t;if(m===false){p.var(u,false);falseSchemaError(t)}else{p.var(u,true)}}u.boolOrEmptySchema=boolOrEmptySchema;function falseSchemaError(t,u){const{gen:p,data:g}=t;const y={gen:p,keyword:"false schema",data:g,schema:false,schemaCode:false,schemaValue:false,params:{},it:t};(0,m.reportError)(y,v,undefined,u)}},5044:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.reportTypeError=u.checkDataTypes=u.checkDataType=u.coerceAndCheckDataType=u.getJSONTypes=u.getSchemaTypes=u.DataType=void 0;const m=p(8888);const g=p(2867);const y=p(5456);const v=p(4809);const b=p(4359);var w;(function(t){t[t["Correct"]=0]="Correct";t[t["Wrong"]=1]="Wrong"})(w||(u.DataType=w={}));function getSchemaTypes(t){const u=getJSONTypes(t.type);const p=u.includes("null");if(p){if(t.nullable===false)throw new Error("type: null contradicts nullable: false")}else{if(!u.length&&t.nullable!==undefined){throw new Error('"nullable" cannot be used without "type"')}if(t.nullable===true)u.push("null")}return u}u.getSchemaTypes=getSchemaTypes;function getJSONTypes(t){const u=Array.isArray(t)?t:t?[t]:[];if(u.every(m.isJSONType))return u;throw new Error("type must be JSONType or JSONType[]: "+u.join(","))}u.getJSONTypes=getJSONTypes;function coerceAndCheckDataType(t,u){const{gen:p,data:m,opts:y}=t;const v=coerceToTypes(u,y.coerceTypes);const b=u.length>0&&!(v.length===0&&u.length===1&&(0,g.schemaHasRulesForType)(t,u[0]));if(b){const g=checkDataTypes(u,m,y.strictNumbers,w.Wrong);p.if(g,(()=>{if(v.length)coerceData(t,u,v);else reportTypeError(t)}))}return b}u.coerceAndCheckDataType=coerceAndCheckDataType;const E=new Set(["string","number","integer","boolean","null"]);function coerceToTypes(t,u){return u?t.filter((t=>E.has(t)||u==="array"&&t==="array")):[]}function coerceData(t,u,p){const{gen:m,data:g,opts:y}=t;const b=m.let("dataType",(0,v._)`typeof ${g}`);const w=m.let("coerced",(0,v._)`undefined`);if(y.coerceTypes==="array"){m.if((0,v._)`${b} == 'object' && Array.isArray(${g}) && ${g}.length == 1`,(()=>m.assign(g,(0,v._)`${g}[0]`).assign(b,(0,v._)`typeof ${g}`).if(checkDataTypes(u,g,y.strictNumbers),(()=>m.assign(w,g)))))}m.if((0,v._)`${w} !== undefined`);for(const t of p){if(E.has(t)||t==="array"&&y.coerceTypes==="array"){coerceSpecificType(t)}}m.else();reportTypeError(t);m.endIf();m.if((0,v._)`${w} !== undefined`,(()=>{m.assign(g,w);assignParentData(t,w)}));function coerceSpecificType(t){switch(t){case"string":m.elseIf((0,v._)`${b} == "number" || ${b} == "boolean"`).assign(w,(0,v._)`"" + ${g}`).elseIf((0,v._)`${g} === null`).assign(w,(0,v._)`""`);return;case"number":m.elseIf((0,v._)`${b} == "boolean" || ${g} === null
3
+ || (${b} == "string" && ${g} && ${g} == +${g})`).assign(w,(0,v._)`+${g}`);return;case"integer":m.elseIf((0,v._)`${b} === "boolean" || ${g} === null
4
+ || (${b} === "string" && ${g} && ${g} == +${g} && !(${g} % 1))`).assign(w,(0,v._)`+${g}`);return;case"boolean":m.elseIf((0,v._)`${g} === "false" || ${g} === 0 || ${g} === null`).assign(w,false).elseIf((0,v._)`${g} === "true" || ${g} === 1`).assign(w,true);return;case"null":m.elseIf((0,v._)`${g} === "" || ${g} === 0 || ${g} === false`);m.assign(w,null);return;case"array":m.elseIf((0,v._)`${b} === "string" || ${b} === "number"
5
+ || ${b} === "boolean" || ${g} === null`).assign(w,(0,v._)`[${g}]`)}}}function assignParentData({gen:t,parentData:u,parentDataProperty:p},m){t.if((0,v._)`${u} !== undefined`,(()=>t.assign((0,v._)`${u}[${p}]`,m)))}function checkDataType(t,u,p,m=w.Correct){const g=m===w.Correct?v.operators.EQ:v.operators.NEQ;let y;switch(t){case"null":return(0,v._)`${u} ${g} null`;case"array":y=(0,v._)`Array.isArray(${u})`;break;case"object":y=(0,v._)`${u} && typeof ${u} == "object" && !Array.isArray(${u})`;break;case"integer":y=numCond((0,v._)`!(${u} % 1) && !isNaN(${u})`);break;case"number":y=numCond();break;default:return(0,v._)`typeof ${u} ${g} ${t}`}return m===w.Correct?y:(0,v.not)(y);function numCond(t=v.nil){return(0,v.and)((0,v._)`typeof ${u} == "number"`,t,p?(0,v._)`isFinite(${u})`:v.nil)}}u.checkDataType=checkDataType;function checkDataTypes(t,u,p,m){if(t.length===1){return checkDataType(t[0],u,p,m)}let g;const y=(0,b.toHash)(t);if(y.array&&y.object){const t=(0,v._)`typeof ${u} != "object"`;g=y.null?t:(0,v._)`!${u} || ${t}`;delete y.null;delete y.array;delete y.object}else{g=v.nil}if(y.number)delete y.integer;for(const t in y)g=(0,v.and)(g,checkDataType(t,u,p,m));return g}u.checkDataTypes=checkDataTypes;const $={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:u})=>typeof t=="string"?(0,v._)`{type: ${t}}`:(0,v._)`{type: ${u}}`};function reportTypeError(t){const u=getTypeErrorContext(t);(0,y.reportError)(u,$)}u.reportTypeError=reportTypeError;function getTypeErrorContext(t){const{gen:u,data:p,schema:m}=t;const g=(0,b.schemaRefOrVal)(t,m,"type");return{gen:u,keyword:"type",data:p,schema:m.type,schemaCode:g,schemaValue:g,parentSchema:m,params:{},it:t}}},5762:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.assignDefaults=void 0;const m=p(4809);const g=p(4359);function assignDefaults(t,u){const{properties:p,items:m}=t.schema;if(u==="object"&&p){for(const u in p){assignDefault(t,u,p[u].default)}}else if(u==="array"&&Array.isArray(m)){m.forEach(((u,p)=>assignDefault(t,p,u.default)))}}u.assignDefaults=assignDefaults;function assignDefault(t,u,p){const{gen:y,compositeRule:v,data:b,opts:w}=t;if(p===undefined)return;const E=(0,m._)`${b}${(0,m.getProperty)(u)}`;if(v){(0,g.checkStrictMode)(t,`default is ignored for: ${E}`);return}let $=(0,m._)`${E} === undefined`;if(w.useDefaults==="empty"){$=(0,m._)`${$} || ${E} === null || ${E} === ""`}y.if($,(0,m._)`${E} = ${(0,m.stringify)(p)}`)}},9278:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.getData=u.KeywordCxt=u.validateFunctionCode=void 0;const m=p(6499);const g=p(5044);const y=p(2867);const v=p(5044);const b=p(5762);const w=p(3237);const E=p(5155);const $=p(4809);const O=p(1267);const R=p(5351);const P=p(4359);const A=p(5456);function validateFunctionCode(t){if(isSchemaObj(t)){checkKeywords(t);if(schemaCxtHasRules(t)){topSchemaObjCode(t);return}}validateFunction(t,(()=>(0,m.topBoolOrEmptySchema)(t)))}u.validateFunctionCode=validateFunctionCode;function validateFunction({gen:t,validateName:u,schema:p,schemaEnv:m,opts:g},y){if(g.code.es5){t.func(u,(0,$._)`${O.default.data}, ${O.default.valCxt}`,m.$async,(()=>{t.code((0,$._)`"use strict"; ${funcSourceUrl(p,g)}`);destructureValCxtES5(t,g);t.code(y)}))}else{t.func(u,(0,$._)`${O.default.data}, ${destructureValCxt(g)}`,m.$async,(()=>t.code(funcSourceUrl(p,g)).code(y)))}}function destructureValCxt(t){return(0,$._)`{${O.default.instancePath}="", ${O.default.parentData}, ${O.default.parentDataProperty}, ${O.default.rootData}=${O.default.data}${t.dynamicRef?(0,$._)`, ${O.default.dynamicAnchors}={}`:$.nil}}={}`}function destructureValCxtES5(t,u){t.if(O.default.valCxt,(()=>{t.var(O.default.instancePath,(0,$._)`${O.default.valCxt}.${O.default.instancePath}`);t.var(O.default.parentData,(0,$._)`${O.default.valCxt}.${O.default.parentData}`);t.var(O.default.parentDataProperty,(0,$._)`${O.default.valCxt}.${O.default.parentDataProperty}`);t.var(O.default.rootData,(0,$._)`${O.default.valCxt}.${O.default.rootData}`);if(u.dynamicRef)t.var(O.default.dynamicAnchors,(0,$._)`${O.default.valCxt}.${O.default.dynamicAnchors}`)}),(()=>{t.var(O.default.instancePath,(0,$._)`""`);t.var(O.default.parentData,(0,$._)`undefined`);t.var(O.default.parentDataProperty,(0,$._)`undefined`);t.var(O.default.rootData,O.default.data);if(u.dynamicRef)t.var(O.default.dynamicAnchors,(0,$._)`{}`)}))}function topSchemaObjCode(t){const{schema:u,opts:p,gen:m}=t;validateFunction(t,(()=>{if(p.$comment&&u.$comment)commentKeyword(t);checkNoDefault(t);m.let(O.default.vErrors,null);m.let(O.default.errors,0);if(p.unevaluated)resetEvaluated(t);typeAndKeywords(t);returnResults(t)}));return}function resetEvaluated(t){const{gen:u,validateName:p}=t;t.evaluated=u.const("evaluated",(0,$._)`${p}.evaluated`);u.if((0,$._)`${t.evaluated}.dynamicProps`,(()=>u.assign((0,$._)`${t.evaluated}.props`,(0,$._)`undefined`)));u.if((0,$._)`${t.evaluated}.dynamicItems`,(()=>u.assign((0,$._)`${t.evaluated}.items`,(0,$._)`undefined`)))}function funcSourceUrl(t,u){const p=typeof t=="object"&&t[u.schemaId];return p&&(u.code.source||u.code.process)?(0,$._)`/*# sourceURL=${p} */`:$.nil}function subschemaCode(t,u){if(isSchemaObj(t)){checkKeywords(t);if(schemaCxtHasRules(t)){subSchemaObjCode(t,u);return}}(0,m.boolOrEmptySchema)(t,u)}function schemaCxtHasRules({schema:t,self:u}){if(typeof t=="boolean")return!t;for(const p in t)if(u.RULES.all[p])return true;return false}function isSchemaObj(t){return typeof t.schema!="boolean"}function subSchemaObjCode(t,u){const{schema:p,gen:m,opts:g}=t;if(g.$comment&&p.$comment)commentKeyword(t);updateContext(t);checkAsyncSchema(t);const y=m.const("_errs",O.default.errors);typeAndKeywords(t,y);m.var(u,(0,$._)`${y} === ${O.default.errors}`)}function checkKeywords(t){(0,P.checkUnknownRules)(t);checkRefsAndKeywords(t)}function typeAndKeywords(t,u){if(t.opts.jtd)return schemaKeywords(t,[],false,u);const p=(0,g.getSchemaTypes)(t.schema);const m=(0,g.coerceAndCheckDataType)(t,p);schemaKeywords(t,p,!m,u)}function checkRefsAndKeywords(t){const{schema:u,errSchemaPath:p,opts:m,self:g}=t;if(u.$ref&&m.ignoreKeywordsWithRef&&(0,P.schemaHasRulesButRef)(u,g.RULES)){g.logger.warn(`$ref: keywords ignored in schema at path "${p}"`)}}function checkNoDefault(t){const{schema:u,opts:p}=t;if(u.default!==undefined&&p.useDefaults&&p.strictSchema){(0,P.checkStrictMode)(t,"default is ignored in the schema root")}}function updateContext(t){const u=t.schema[t.opts.schemaId];if(u)t.baseId=(0,R.resolveUrl)(t.opts.uriResolver,t.baseId,u)}function checkAsyncSchema(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function commentKeyword({gen:t,schemaEnv:u,schema:p,errSchemaPath:m,opts:g}){const y=p.$comment;if(g.$comment===true){t.code((0,$._)`${O.default.self}.logger.log(${y})`)}else if(typeof g.$comment=="function"){const p=(0,$.str)`${m}/$comment`;const g=t.scopeValue("root",{ref:u.root});t.code((0,$._)`${O.default.self}.opts.$comment(${y}, ${p}, ${g}.schema)`)}}function returnResults(t){const{gen:u,schemaEnv:p,validateName:m,ValidationError:g,opts:y}=t;if(p.$async){u.if((0,$._)`${O.default.errors} === 0`,(()=>u.return(O.default.data)),(()=>u.throw((0,$._)`new ${g}(${O.default.vErrors})`)))}else{u.assign((0,$._)`${m}.errors`,O.default.vErrors);if(y.unevaluated)assignEvaluated(t);u.return((0,$._)`${O.default.errors} === 0`)}}function assignEvaluated({gen:t,evaluated:u,props:p,items:m}){if(p instanceof $.Name)t.assign((0,$._)`${u}.props`,p);if(m instanceof $.Name)t.assign((0,$._)`${u}.items`,m)}function schemaKeywords(t,u,p,m){const{gen:g,schema:b,data:w,allErrors:E,opts:R,self:A}=t;const{RULES:x}=A;if(b.$ref&&(R.ignoreKeywordsWithRef||!(0,P.schemaHasRulesButRef)(b,x))){g.block((()=>keywordCode(t,"$ref",x.all.$ref.definition)));return}if(!R.jtd)checkStrictTypes(t,u);g.block((()=>{for(const t of x.rules)groupKeywords(t);groupKeywords(x.post)}));function groupKeywords(P){if(!(0,y.shouldUseGroup)(b,P))return;if(P.type){g.if((0,v.checkDataType)(P.type,w,R.strictNumbers));iterateKeywords(t,P);if(u.length===1&&u[0]===P.type&&p){g.else();(0,v.reportTypeError)(t)}g.endIf()}else{iterateKeywords(t,P)}if(!E)g.if((0,$._)`${O.default.errors} === ${m||0}`)}}function iterateKeywords(t,u){const{gen:p,schema:m,opts:{useDefaults:g}}=t;if(g)(0,b.assignDefaults)(t,u.type);p.block((()=>{for(const p of u.rules){if((0,y.shouldUseRule)(m,p)){keywordCode(t,p.keyword,p.definition,u.type)}}}))}function checkStrictTypes(t,u){if(t.schemaEnv.meta||!t.opts.strictTypes)return;checkContextTypes(t,u);if(!t.opts.allowUnionTypes)checkMultipleTypes(t,u);checkKeywordTypes(t,t.dataTypes)}function checkContextTypes(t,u){if(!u.length)return;if(!t.dataTypes.length){t.dataTypes=u;return}u.forEach((u=>{if(!includesType(t.dataTypes,u)){strictTypesError(t,`type "${u}" not allowed by context "${t.dataTypes.join(",")}"`)}}));narrowSchemaTypes(t,u)}function checkMultipleTypes(t,u){if(u.length>1&&!(u.length===2&&u.includes("null"))){strictTypesError(t,"use allowUnionTypes to allow union type keyword")}}function checkKeywordTypes(t,u){const p=t.self.RULES.all;for(const m in p){const g=p[m];if(typeof g=="object"&&(0,y.shouldUseRule)(t.schema,g)){const{type:p}=g.definition;if(p.length&&!p.some((t=>hasApplicableType(u,t)))){strictTypesError(t,`missing type "${p.join(",")}" for keyword "${m}"`)}}}}function hasApplicableType(t,u){return t.includes(u)||u==="number"&&t.includes("integer")}function includesType(t,u){return t.includes(u)||u==="integer"&&t.includes("number")}function narrowSchemaTypes(t,u){const p=[];for(const m of t.dataTypes){if(includesType(u,m))p.push(m);else if(u.includes("integer")&&m==="number")p.push("integer")}t.dataTypes=p}function strictTypesError(t,u){const p=t.schemaEnv.baseId+t.errSchemaPath;u+=` at "${p}" (strictTypes)`;(0,P.checkStrictMode)(t,u,t.opts.strictTypes)}class KeywordCxt{constructor(t,u,p){(0,w.validateKeywordUsage)(t,u,p);this.gen=t.gen;this.allErrors=t.allErrors;this.keyword=p;this.data=t.data;this.schema=t.schema[p];this.$data=u.$data&&t.opts.$data&&this.schema&&this.schema.$data;this.schemaValue=(0,P.schemaRefOrVal)(t,this.schema,p,this.$data);this.schemaType=u.schemaType;this.parentSchema=t.schema;this.params={};this.it=t;this.def=u;if(this.$data){this.schemaCode=t.gen.const("vSchema",getData(this.$data,t))}else{this.schemaCode=this.schemaValue;if(!(0,w.validSchemaType)(this.schema,u.schemaType,u.allowUndefined)){throw new Error(`${p} value must be ${JSON.stringify(u.schemaType)}`)}}if("code"in u?u.trackErrors:u.errors!==false){this.errsCount=t.gen.const("_errs",O.default.errors)}}result(t,u,p){this.failResult((0,$.not)(t),u,p)}failResult(t,u,p){this.gen.if(t);if(p)p();else this.error();if(u){this.gen.else();u();if(this.allErrors)this.gen.endIf()}else{if(this.allErrors)this.gen.endIf();else this.gen.else()}}pass(t,u){this.failResult((0,$.not)(t),undefined,u)}fail(t){if(t===undefined){this.error();if(!this.allErrors)this.gen.if(false);return}this.gen.if(t);this.error();if(this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:u}=this;this.fail((0,$._)`${u} !== undefined && (${(0,$.or)(this.invalid$data(),t)})`)}error(t,u,p){if(u){this.setParams(u);this._error(t,p);this.setParams({});return}this._error(t,p)}_error(t,u){(t?A.reportExtraError:A.reportError)(this,this.def.error,u)}$dataError(){(0,A.reportError)(this,this.def.$dataError||A.keyword$DataError)}reset(){if(this.errsCount===undefined)throw new Error('add "trackErrors" to keyword definition');(0,A.resetErrorsCount)(this.gen,this.errsCount)}ok(t){if(!this.allErrors)this.gen.if(t)}setParams(t,u){if(u)Object.assign(this.params,t);else this.params=t}block$data(t,u,p=$.nil){this.gen.block((()=>{this.check$data(t,p);u()}))}check$data(t=$.nil,u=$.nil){if(!this.$data)return;const{gen:p,schemaCode:m,schemaType:g,def:y}=this;p.if((0,$.or)((0,$._)`${m} === undefined`,u));if(t!==$.nil)p.assign(t,true);if(g.length||y.validateSchema){p.elseIf(this.invalid$data());this.$dataError();if(t!==$.nil)p.assign(t,false)}p.else()}invalid$data(){const{gen:t,schemaCode:u,schemaType:p,def:m,it:g}=this;return(0,$.or)(wrong$DataType(),invalid$DataSchema());function wrong$DataType(){if(p.length){if(!(u instanceof $.Name))throw new Error("ajv implementation error");const t=Array.isArray(p)?p:[p];return(0,$._)`${(0,v.checkDataTypes)(t,u,g.opts.strictNumbers,v.DataType.Wrong)}`}return $.nil}function invalid$DataSchema(){if(m.validateSchema){const p=t.scopeValue("validate$data",{ref:m.validateSchema});return(0,$._)`!${p}(${u})`}return $.nil}}subschema(t,u){const p=(0,E.getSubschema)(this.it,t);(0,E.extendSubschemaData)(p,this.it,t);(0,E.extendSubschemaMode)(p,t);const m={...this.it,...p,items:undefined,props:undefined};subschemaCode(m,u);return m}mergeEvaluated(t,u){const{it:p,gen:m}=this;if(!p.opts.unevaluated)return;if(p.props!==true&&t.props!==undefined){p.props=P.mergeEvaluated.props(m,t.props,p.props,u)}if(p.items!==true&&t.items!==undefined){p.items=P.mergeEvaluated.items(m,t.items,p.items,u)}}mergeValidEvaluated(t,u){const{it:p,gen:m}=this;if(p.opts.unevaluated&&(p.props!==true||p.items!==true)){m.if(u,(()=>this.mergeEvaluated(t,$.Name)));return true}}}u.KeywordCxt=KeywordCxt;function keywordCode(t,u,p,m){const g=new KeywordCxt(t,p,u);if("code"in p){p.code(g,m)}else if(g.$data&&p.validate){(0,w.funcKeywordCode)(g,p)}else if("macro"in p){(0,w.macroKeywordCode)(g,p)}else if(p.compile||p.validate){(0,w.funcKeywordCode)(g,p)}}const x=/^\/(?:[^~]|~0|~1)*$/;const T=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData(t,{dataLevel:u,dataNames:p,dataPathArr:m}){let g;let y;if(t==="")return O.default.rootData;if(t[0]==="/"){if(!x.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);g=t;y=O.default.rootData}else{const v=T.exec(t);if(!v)throw new Error(`Invalid JSON-pointer: ${t}`);const b=+v[1];g=v[2];if(g==="#"){if(b>=u)throw new Error(errorMsg("property/index",b));return m[u-b]}if(b>u)throw new Error(errorMsg("data",b));y=p[u-b];if(!g)return y}let v=y;const b=g.split("/");for(const t of b){if(t){y=(0,$._)`${y}${(0,$.getProperty)((0,P.unescapeJsonPointer)(t))}`;v=(0,$._)`${v} && ${y}`}}return v;function errorMsg(t,p){return`Cannot access ${t} ${p} levels up, current level is ${u}`}}u.getData=getData},3237:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.validateKeywordUsage=u.validSchemaType=u.funcKeywordCode=u.macroKeywordCode=void 0;const m=p(4809);const g=p(1267);const y=p(9689);const v=p(5456);function macroKeywordCode(t,u){const{gen:p,keyword:g,schema:y,parentSchema:v,it:b}=t;const w=u.macro.call(b.self,y,v,b);const E=useKeyword(p,g,w);if(b.opts.validateSchema!==false)b.self.validateSchema(w,true);const $=p.name("valid");t.subschema({schema:w,schemaPath:m.nil,errSchemaPath:`${b.errSchemaPath}/${g}`,topSchemaRef:E,compositeRule:true},$);t.pass($,(()=>t.error(true)))}u.macroKeywordCode=macroKeywordCode;function funcKeywordCode(t,u){var p;const{gen:v,keyword:b,schema:w,parentSchema:E,$data:$,it:O}=t;checkAsyncKeyword(O,u);const R=!$&&u.compile?u.compile.call(O.self,w,E,O):u.validate;const P=useKeyword(v,b,R);const A=v.let("valid");t.block$data(A,validateKeyword);t.ok((p=u.valid)!==null&&p!==void 0?p:A);function validateKeyword(){if(u.errors===false){assignValid();if(u.modifying)modifyData(t);reportErrs((()=>t.error()))}else{const p=u.async?validateAsync():validateSync();if(u.modifying)modifyData(t);reportErrs((()=>addErrs(t,p)))}}function validateAsync(){const t=v.let("ruleErrs",null);v.try((()=>assignValid((0,m._)`await `)),(u=>v.assign(A,false).if((0,m._)`${u} instanceof ${O.ValidationError}`,(()=>v.assign(t,(0,m._)`${u}.errors`)),(()=>v.throw(u)))));return t}function validateSync(){const t=(0,m._)`${P}.errors`;v.assign(t,null);assignValid(m.nil);return t}function assignValid(p=(u.async?(0,m._)`await `:m.nil)){const b=O.opts.passContext?g.default.this:g.default.self;const w=!("compile"in u&&!$||u.schema===false);v.assign(A,(0,m._)`${p}${(0,y.callValidateCode)(t,P,b,w)}`,u.modifying)}function reportErrs(t){var p;v.if((0,m.not)((p=u.valid)!==null&&p!==void 0?p:A),t)}}u.funcKeywordCode=funcKeywordCode;function modifyData(t){const{gen:u,data:p,it:g}=t;u.if(g.parentData,(()=>u.assign(p,(0,m._)`${g.parentData}[${g.parentDataProperty}]`)))}function addErrs(t,u){const{gen:p}=t;p.if((0,m._)`Array.isArray(${u})`,(()=>{p.assign(g.default.vErrors,(0,m._)`${g.default.vErrors} === null ? ${u} : ${g.default.vErrors}.concat(${u})`).assign(g.default.errors,(0,m._)`${g.default.vErrors}.length`);(0,v.extendErrors)(t)}),(()=>t.error()))}function checkAsyncKeyword({schemaEnv:t},u){if(u.async&&!t.$async)throw new Error("async keyword in sync schema")}function useKeyword(t,u,p){if(p===undefined)throw new Error(`keyword "${u}" failed to compile`);return t.scopeValue("keyword",typeof p=="function"?{ref:p}:{ref:p,code:(0,m.stringify)(p)})}function validSchemaType(t,u,p=false){return!u.length||u.some((u=>u==="array"?Array.isArray(t):u==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==u||p&&typeof t=="undefined"))}u.validSchemaType=validSchemaType;function validateKeywordUsage({schema:t,opts:u,self:p,errSchemaPath:m},g,y){if(Array.isArray(g.keyword)?!g.keyword.includes(y):g.keyword!==y){throw new Error("ajv implementation error")}const v=g.dependencies;if(v===null||v===void 0?void 0:v.some((u=>!Object.prototype.hasOwnProperty.call(t,u)))){throw new Error(`parent schema must have dependencies of ${y}: ${v.join(",")}`)}if(g.validateSchema){const v=g.validateSchema(t[y]);if(!v){const t=`keyword "${y}" value is invalid at path "${m}": `+p.errorsText(g.validateSchema.errors);if(u.validateSchema==="log")p.logger.error(t);else throw new Error(t)}}}u.validateKeywordUsage=validateKeywordUsage},5155:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.extendSubschemaMode=u.extendSubschemaData=u.getSubschema=void 0;const m=p(4809);const g=p(4359);function getSubschema(t,{keyword:u,schemaProp:p,schema:y,schemaPath:v,errSchemaPath:b,topSchemaRef:w}){if(u!==undefined&&y!==undefined){throw new Error('both "keyword" and "schema" passed, only one allowed')}if(u!==undefined){const y=t.schema[u];return p===undefined?{schema:y,schemaPath:(0,m._)`${t.schemaPath}${(0,m.getProperty)(u)}`,errSchemaPath:`${t.errSchemaPath}/${u}`}:{schema:y[p],schemaPath:(0,m._)`${t.schemaPath}${(0,m.getProperty)(u)}${(0,m.getProperty)(p)}`,errSchemaPath:`${t.errSchemaPath}/${u}/${(0,g.escapeFragment)(p)}`}}if(y!==undefined){if(v===undefined||b===undefined||w===undefined){throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"')}return{schema:y,schemaPath:v,topSchemaRef:w,errSchemaPath:b}}throw new Error('either "keyword" or "schema" must be passed')}u.getSubschema=getSubschema;function extendSubschemaData(t,u,{dataProp:p,dataPropType:y,data:v,dataTypes:b,propertyName:w}){if(v!==undefined&&p!==undefined){throw new Error('both "data" and "dataProp" passed, only one allowed')}const{gen:E}=u;if(p!==undefined){const{errorPath:v,dataPathArr:b,opts:w}=u;const $=E.let("data",(0,m._)`${u.data}${(0,m.getProperty)(p)}`,true);dataContextProps($);t.errorPath=(0,m.str)`${v}${(0,g.getErrorPath)(p,y,w.jsPropertySyntax)}`;t.parentDataProperty=(0,m._)`${p}`;t.dataPathArr=[...b,t.parentDataProperty]}if(v!==undefined){const u=v instanceof m.Name?v:E.let("data",v,true);dataContextProps(u);if(w!==undefined)t.propertyName=w}if(b)t.dataTypes=b;function dataContextProps(p){t.data=p;t.dataLevel=u.dataLevel+1;t.dataTypes=[];u.definedProperties=new Set;t.parentData=u.data;t.dataNames=[...u.dataNames,p]}}u.extendSubschemaData=extendSubschemaData;function extendSubschemaMode(t,{jtdDiscriminator:u,jtdMetadata:p,compositeRule:m,createErrors:g,allErrors:y}){if(m!==undefined)t.compositeRule=m;if(g!==undefined)t.createErrors=g;if(y!==undefined)t.allErrors=y;t.jtdDiscriminator=u;t.jtdMetadata=p}u.extendSubschemaMode=extendSubschemaMode},7326:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.CodeGen=u.Name=u.nil=u.stringify=u.str=u._=u.KeywordCxt=void 0;var m=p(9278);Object.defineProperty(u,"KeywordCxt",{enumerable:true,get:function(){return m.KeywordCxt}});var g=p(4809);Object.defineProperty(u,"_",{enumerable:true,get:function(){return g._}});Object.defineProperty(u,"str",{enumerable:true,get:function(){return g.str}});Object.defineProperty(u,"stringify",{enumerable:true,get:function(){return g.stringify}});Object.defineProperty(u,"nil",{enumerable:true,get:function(){return g.nil}});Object.defineProperty(u,"Name",{enumerable:true,get:function(){return g.Name}});Object.defineProperty(u,"CodeGen",{enumerable:true,get:function(){return g.CodeGen}});const y=p(4242);const v=p(8547);const b=p(8888);const w=p(2407);const E=p(4809);const $=p(5351);const O=p(5044);const R=p(4359);const P=p(2200);const A=p(5836);const defaultRegExp=(t,u)=>new RegExp(t,u);defaultRegExp.code="new RegExp";const x=["removeAdditional","useDefaults","coerceTypes"];const T=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]);const C={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."};const k={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};const I=200;function requiredOptions(t){var u,p,m,g,y,v,b,w,E,$,O,R,P,x,T,C,k,N,D,L,M,j,U,B,H;const V=t.strict;const z=(u=t.code)===null||u===void 0?void 0:u.optimize;const G=z===true||z===undefined?1:z||0;const q=(m=(p=t.code)===null||p===void 0?void 0:p.regExp)!==null&&m!==void 0?m:defaultRegExp;const W=(g=t.uriResolver)!==null&&g!==void 0?g:A.default;return{strictSchema:(v=(y=t.strictSchema)!==null&&y!==void 0?y:V)!==null&&v!==void 0?v:true,strictNumbers:(w=(b=t.strictNumbers)!==null&&b!==void 0?b:V)!==null&&w!==void 0?w:true,strictTypes:($=(E=t.strictTypes)!==null&&E!==void 0?E:V)!==null&&$!==void 0?$:"log",strictTuples:(R=(O=t.strictTuples)!==null&&O!==void 0?O:V)!==null&&R!==void 0?R:"log",strictRequired:(x=(P=t.strictRequired)!==null&&P!==void 0?P:V)!==null&&x!==void 0?x:false,code:t.code?{...t.code,optimize:G,regExp:q}:{optimize:G,regExp:q},loopRequired:(T=t.loopRequired)!==null&&T!==void 0?T:I,loopEnum:(C=t.loopEnum)!==null&&C!==void 0?C:I,meta:(k=t.meta)!==null&&k!==void 0?k:true,messages:(N=t.messages)!==null&&N!==void 0?N:true,inlineRefs:(D=t.inlineRefs)!==null&&D!==void 0?D:true,schemaId:(L=t.schemaId)!==null&&L!==void 0?L:"$id",addUsedSchema:(M=t.addUsedSchema)!==null&&M!==void 0?M:true,validateSchema:(j=t.validateSchema)!==null&&j!==void 0?j:true,validateFormats:(U=t.validateFormats)!==null&&U!==void 0?U:true,unicodeRegExp:(B=t.unicodeRegExp)!==null&&B!==void 0?B:true,int32range:(H=t.int32range)!==null&&H!==void 0?H:true,uriResolver:W}}class Ajv{constructor(t={}){this.schemas={};this.refs={};this.formats={};this._compilations=new Set;this._loading={};this._cache=new Map;t=this.opts={...t,...requiredOptions(t)};const{es5:u,lines:p}=this.opts.code;this.scope=new E.ValueScope({scope:{},prefixes:T,es5:u,lines:p});this.logger=getLogger(t.logger);const m=t.validateFormats;t.validateFormats=false;this.RULES=(0,b.getRules)();checkOptions.call(this,C,t,"NOT SUPPORTED");checkOptions.call(this,k,t,"DEPRECATED","warn");this._metaOpts=getMetaSchemaOptions.call(this);if(t.formats)addInitialFormats.call(this);this._addVocabularies();this._addDefaultMetaSchema();if(t.keywords)addInitialKeywords.call(this,t.keywords);if(typeof t.meta=="object")this.addMetaSchema(t.meta);addInitialSchemas.call(this);t.validateFormats=m}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:t,meta:u,schemaId:p}=this.opts;let m=P;if(p==="id"){m={...P};m.id=m.$id;delete m.$id}if(u&&t)this.addMetaSchema(m,m[p],false)}defaultMeta(){const{meta:t,schemaId:u}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[u]||t:undefined}validate(t,u){let p;if(typeof t=="string"){p=this.getSchema(t);if(!p)throw new Error(`no schema with key or ref "${t}"`)}else{p=this.compile(t)}const m=p(u);if(!("$async"in p))this.errors=p.errors;return m}compile(t,u){const p=this._addSchema(t,u);return p.validate||this._compileSchemaEnv(p)}compileAsync(t,u){if(typeof this.opts.loadSchema!="function"){throw new Error("options.loadSchema should be a function")}const{loadSchema:p}=this.opts;return runCompileAsync.call(this,t,u);async function runCompileAsync(t,u){await loadMetaSchema.call(this,t.$schema);const p=this._addSchema(t,u);return p.validate||_compileAsync.call(this,p)}async function loadMetaSchema(t){if(t&&!this.getSchema(t)){await runCompileAsync.call(this,{$ref:t},true)}}async function _compileAsync(t){try{return this._compileSchemaEnv(t)}catch(u){if(!(u instanceof v.default))throw u;checkLoaded.call(this,u);await loadMissingSchema.call(this,u.missingSchema);return _compileAsync.call(this,t)}}function checkLoaded({missingSchema:t,missingRef:u}){if(this.refs[t]){throw new Error(`AnySchema ${t} is loaded but ${u} cannot be resolved`)}}async function loadMissingSchema(t){const p=await _loadSchema.call(this,t);if(!this.refs[t])await loadMetaSchema.call(this,p.$schema);if(!this.refs[t])this.addSchema(p,t,u)}async function _loadSchema(t){const u=this._loading[t];if(u)return u;try{return await(this._loading[t]=p(t))}finally{delete this._loading[t]}}}addSchema(t,u,p,m=this.opts.validateSchema){if(Array.isArray(t)){for(const u of t)this.addSchema(u,undefined,p,m);return this}let g;if(typeof t==="object"){const{schemaId:u}=this.opts;g=t[u];if(g!==undefined&&typeof g!="string"){throw new Error(`schema ${u} must be string`)}}u=(0,$.normalizeId)(u||g);this._checkUnique(u);this.schemas[u]=this._addSchema(t,p,u,m,true);return this}addMetaSchema(t,u,p=this.opts.validateSchema){this.addSchema(t,u,true,p);return this}validateSchema(t,u){if(typeof t=="boolean")return true;let p;p=t.$schema;if(p!==undefined&&typeof p!="string"){throw new Error("$schema must be a string")}p=p||this.opts.defaultMeta||this.defaultMeta();if(!p){this.logger.warn("meta-schema not available");this.errors=null;return true}const m=this.validate(p,t);if(!m&&u){const t="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(t);else throw new Error(t)}return m}getSchema(t){let u;while(typeof(u=getSchEnv.call(this,t))=="string")t=u;if(u===undefined){const{schemaId:p}=this.opts;const m=new w.SchemaEnv({schema:{},schemaId:p});u=w.resolveSchema.call(this,m,t);if(!u)return;this.refs[t]=u}return u.validate||this._compileSchemaEnv(u)}removeSchema(t){if(t instanceof RegExp){this._removeAllSchemas(this.schemas,t);this._removeAllSchemas(this.refs,t);return this}switch(typeof t){case"undefined":this._removeAllSchemas(this.schemas);this._removeAllSchemas(this.refs);this._cache.clear();return this;case"string":{const u=getSchEnv.call(this,t);if(typeof u=="object")this._cache.delete(u.schema);delete this.schemas[t];delete this.refs[t];return this}case"object":{const u=t;this._cache.delete(u);let p=t[this.opts.schemaId];if(p){p=(0,$.normalizeId)(p);delete this.schemas[p];delete this.refs[p]}return this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(const u of t)this.addKeyword(u);return this}addKeyword(t,u){let p;if(typeof t=="string"){p=t;if(typeof u=="object"){this.logger.warn("these parameters are deprecated, see docs for addKeyword");u.keyword=p}}else if(typeof t=="object"&&u===undefined){u=t;p=u.keyword;if(Array.isArray(p)&&!p.length){throw new Error("addKeywords: keyword must be string or non-empty array")}}else{throw new Error("invalid addKeywords parameters")}checkKeyword.call(this,p,u);if(!u){(0,R.eachItem)(p,(t=>addRule.call(this,t)));return this}keywordMetaschema.call(this,u);const m={...u,type:(0,O.getJSONTypes)(u.type),schemaType:(0,O.getJSONTypes)(u.schemaType)};(0,R.eachItem)(p,m.type.length===0?t=>addRule.call(this,t,m):t=>m.type.forEach((u=>addRule.call(this,t,m,u))));return this}getKeyword(t){const u=this.RULES.all[t];return typeof u=="object"?u.definition:!!u}removeKeyword(t){const{RULES:u}=this;delete u.keywords[t];delete u.all[t];for(const p of u.rules){const u=p.rules.findIndex((u=>u.keyword===t));if(u>=0)p.rules.splice(u,1)}return this}addFormat(t,u){if(typeof u=="string")u=new RegExp(u);this.formats[t]=u;return this}errorsText(t=this.errors,{separator:u=", ",dataVar:p="data"}={}){if(!t||t.length===0)return"No errors";return t.map((t=>`${p}${t.instancePath} ${t.message}`)).reduce(((t,p)=>t+u+p))}$dataMetaSchema(t,u){const p=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(const m of u){const u=m.split("/").slice(1);let g=t;for(const t of u)g=g[t];for(const t in p){const u=p[t];if(typeof u!="object")continue;const{$data:m}=u.definition;const y=g[t];if(m&&y)g[t]=schemaOrData(y)}}return t}_removeAllSchemas(t,u){for(const p in t){const m=t[p];if(!u||u.test(p)){if(typeof m=="string"){delete t[p]}else if(m&&!m.meta){this._cache.delete(m.schema);delete t[p]}}}}_addSchema(t,u,p,m=this.opts.validateSchema,g=this.opts.addUsedSchema){let y;const{schemaId:v}=this.opts;if(typeof t=="object"){y=t[v]}else{if(this.opts.jtd)throw new Error("schema must be object");else if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let b=this._cache.get(t);if(b!==undefined)return b;p=(0,$.normalizeId)(y||p);const E=$.getSchemaRefs.call(this,t,p);b=new w.SchemaEnv({schema:t,schemaId:v,meta:u,baseId:p,localRefs:E});this._cache.set(b.schema,b);if(g&&!p.startsWith("#")){if(p)this._checkUnique(p);this.refs[p]=b}if(m)this.validateSchema(t,true);return b}_checkUnique(t){if(this.schemas[t]||this.refs[t]){throw new Error(`schema with key or id "${t}" already exists`)}}_compileSchemaEnv(t){if(t.meta)this._compileMetaSchema(t);else w.compileSchema.call(this,t);if(!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){const u=this.opts;this.opts=this._metaOpts;try{w.compileSchema.call(this,t)}finally{this.opts=u}}}Ajv.ValidationError=y.default;Ajv.MissingRefError=v.default;u["default"]=Ajv;function checkOptions(t,u,p,m="error"){for(const g in t){const y=g;if(y in u)this.logger[m](`${p}: option ${g}. ${t[y]}`)}}function getSchEnv(t){t=(0,$.normalizeId)(t);return this.schemas[t]||this.refs[t]}function addInitialSchemas(){const t=this.opts.schemas;if(!t)return;if(Array.isArray(t))this.addSchema(t);else for(const u in t)this.addSchema(t[u],u)}function addInitialFormats(){for(const t in this.opts.formats){const u=this.opts.formats[t];if(u)this.addFormat(t,u)}}function addInitialKeywords(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const u in t){const p=t[u];if(!p.keyword)p.keyword=u;this.addKeyword(p)}}function getMetaSchemaOptions(){const t={...this.opts};for(const u of x)delete t[u];return t}const N={log(){},warn(){},error(){}};function getLogger(t){if(t===false)return N;if(t===undefined)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}const D=/^[a-z_$][a-z0-9_$:-]*$/i;function checkKeyword(t,u){const{RULES:p}=this;(0,R.eachItem)(t,(t=>{if(p.keywords[t])throw new Error(`Keyword ${t} is already defined`);if(!D.test(t))throw new Error(`Keyword ${t} has invalid name`)}));if(!u)return;if(u.$data&&!("code"in u||"validate"in u)){throw new Error('$data keyword must have "code" or "validate" function')}}function addRule(t,u,p){var m;const g=u===null||u===void 0?void 0:u.post;if(p&&g)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:y}=this;let v=g?y.post:y.rules.find((({type:t})=>t===p));if(!v){v={type:p,rules:[]};y.rules.push(v)}y.keywords[t]=true;if(!u)return;const b={keyword:t,definition:{...u,type:(0,O.getJSONTypes)(u.type),schemaType:(0,O.getJSONTypes)(u.schemaType)}};if(u.before)addBeforeRule.call(this,v,b,u.before);else v.rules.push(b);y.all[t]=b;(m=u.implements)===null||m===void 0?void 0:m.forEach((t=>this.addKeyword(t)))}function addBeforeRule(t,u,p){const m=t.rules.findIndex((t=>t.keyword===p));if(m>=0){t.rules.splice(m,0,u)}else{t.rules.push(u);this.logger.warn(`rule ${p} is not defined`)}}function keywordMetaschema(t){let{metaSchema:u}=t;if(u===undefined)return;if(t.$data&&this.opts.$data)u=schemaOrData(u);t.validateSchema=this.compile(u,true)}const L={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function schemaOrData(t){return{anyOf:[t,L]}}},440:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(1115);const g=p(5727);const y=p(8606);const v=p(1447);const b=p(4877);const w=p(9041);const E=p(5118);const $=p(3073);const O=["/properties"];function addMetaSchema2020(t){[m,g,y,v,b,with$data(this,w),E,with$data(this,$)].forEach((t=>this.addMetaSchema(t,undefined,false)));return this;function with$data(u,p){return t?u.$dataMetaSchema(p,O):p}}u["default"]=addMetaSchema2020},9502:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(3222);m.code='require("ajv/dist/runtime/equal").default';u["default"]=m},7169:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});function ucs2length(t){const u=t.length;let p=0;let m=0;let g;while(m<u){p++;g=t.charCodeAt(m++);if(g>=55296&&g<=56319&&m<u){g=t.charCodeAt(m);if((g&64512)===56320)m++}}return p}u["default"]=ucs2length;ucs2length.code='require("ajv/dist/runtime/ucs2length").default'},5836:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6564);m.code='require("ajv/dist/runtime/uri").default';u["default"]=m},4242:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});class ValidationError extends Error{constructor(t){super("validation failed");this.errors=t;this.ajv=this.validation=true}}u["default"]=ValidationError},8549:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.validateAdditionalItems=void 0;const m=p(4809);const g=p(4359);const y={message:({params:{len:t}})=>(0,m.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,m._)`{limit: ${t}}`};const v={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:y,code(t){const{parentSchema:u,it:p}=t;const{items:m}=u;if(!Array.isArray(m)){(0,g.checkStrictMode)(p,'"additionalItems" is ignored when "items" is not an array of schemas');return}validateAdditionalItems(t,m)}};function validateAdditionalItems(t,u){const{gen:p,schema:y,data:v,keyword:b,it:w}=t;w.items=true;const E=p.const("len",(0,m._)`${v}.length`);if(y===false){t.setParams({len:u.length});t.pass((0,m._)`${E} <= ${u.length}`)}else if(typeof y=="object"&&!(0,g.alwaysValidSchema)(w,y)){const g=p.var("valid",(0,m._)`${E} <= ${u.length}`);p.if((0,m.not)(g),(()=>validateItems(g)));t.ok(g)}function validateItems(y){p.forRange("i",u.length,E,(u=>{t.subschema({keyword:b,dataProp:u,dataPropType:g.Type.Num},y);if(!w.allErrors)p.if((0,m.not)(y),(()=>p.break()))}))}}u.validateAdditionalItems=validateAdditionalItems;u["default"]=v},1800:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(9689);const g=p(4809);const y=p(1267);const v=p(4359);const b={message:"must NOT have additional properties",params:({params:t})=>(0,g._)`{additionalProperty: ${t.additionalProperty}}`};const w={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:true,trackErrors:true,error:b,code(t){const{gen:u,schema:p,parentSchema:b,data:w,errsCount:E,it:$}=t;if(!E)throw new Error("ajv implementation error");const{allErrors:O,opts:R}=$;$.props=true;if(R.removeAdditional!=="all"&&(0,v.alwaysValidSchema)($,p))return;const P=(0,m.allSchemaProperties)(b.properties);const A=(0,m.allSchemaProperties)(b.patternProperties);checkAdditionalProperties();t.ok((0,g._)`${E} === ${y.default.errors}`);function checkAdditionalProperties(){u.forIn("key",w,(t=>{if(!P.length&&!A.length)additionalPropertyCode(t);else u.if(isAdditional(t),(()=>additionalPropertyCode(t)))}))}function isAdditional(p){let y;if(P.length>8){const t=(0,v.schemaRefOrVal)($,b.properties,"properties");y=(0,m.isOwnProperty)(u,t,p)}else if(P.length){y=(0,g.or)(...P.map((t=>(0,g._)`${p} === ${t}`)))}else{y=g.nil}if(A.length){y=(0,g.or)(y,...A.map((u=>(0,g._)`${(0,m.usePattern)(t,u)}.test(${p})`)))}return(0,g.not)(y)}function deleteAdditional(t){u.code((0,g._)`delete ${w}[${t}]`)}function additionalPropertyCode(m){if(R.removeAdditional==="all"||R.removeAdditional&&p===false){deleteAdditional(m);return}if(p===false){t.setParams({additionalProperty:m});t.error();if(!O)u.break();return}if(typeof p=="object"&&!(0,v.alwaysValidSchema)($,p)){const p=u.name("valid");if(R.removeAdditional==="failing"){applyAdditionalSchema(m,p,false);u.if((0,g.not)(p),(()=>{t.reset();deleteAdditional(m)}))}else{applyAdditionalSchema(m,p);if(!O)u.if((0,g.not)(p),(()=>u.break()))}}}function applyAdditionalSchema(u,p,m){const g={keyword:"additionalProperties",dataProp:u,dataPropType:v.Type.Str};if(m===false){Object.assign(g,{compositeRule:true,createErrors:false,allErrors:false})}t.subschema(g,p)}}};u["default"]=w},8768:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4359);const g={keyword:"allOf",schemaType:"array",code(t){const{gen:u,schema:p,it:g}=t;if(!Array.isArray(p))throw new Error("ajv implementation error");const y=u.name("valid");p.forEach(((u,p)=>{if((0,m.alwaysValidSchema)(g,u))return;const v=t.subschema({keyword:"allOf",schemaProp:p},y);t.ok(y);t.mergeEvaluated(v)}))}};u["default"]=g},8829:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(9689);const g={keyword:"anyOf",schemaType:"array",trackErrors:true,code:m.validateUnion,error:{message:"must match a schema in anyOf"}};u["default"]=g},5705:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4809);const g=p(4359);const y={message:({params:{min:t,max:u}})=>u===undefined?(0,m.str)`must contain at least ${t} valid item(s)`:(0,m.str)`must contain at least ${t} and no more than ${u} valid item(s)`,params:({params:{min:t,max:u}})=>u===undefined?(0,m._)`{minContains: ${t}}`:(0,m._)`{minContains: ${t}, maxContains: ${u}}`};const v={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:true,error:y,code(t){const{gen:u,schema:p,parentSchema:y,data:v,it:b}=t;let w;let E;const{minContains:$,maxContains:O}=y;if(b.opts.next){w=$===undefined?1:$;E=O}else{w=1}const R=u.const("len",(0,m._)`${v}.length`);t.setParams({min:w,max:E});if(E===undefined&&w===0){(0,g.checkStrictMode)(b,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(E!==undefined&&w>E){(0,g.checkStrictMode)(b,`"minContains" > "maxContains" is always invalid`);t.fail();return}if((0,g.alwaysValidSchema)(b,p)){let u=(0,m._)`${R} >= ${w}`;if(E!==undefined)u=(0,m._)`${u} && ${R} <= ${E}`;t.pass(u);return}b.items=true;const P=u.name("valid");if(E===undefined&&w===1){validateItems(P,(()=>u.if(P,(()=>u.break()))))}else if(w===0){u.let(P,true);if(E!==undefined)u.if((0,m._)`${v}.length > 0`,validateItemsWithCount)}else{u.let(P,false);validateItemsWithCount()}t.result(P,(()=>t.reset()));function validateItemsWithCount(){const t=u.name("_valid");const p=u.let("count",0);validateItems(t,(()=>u.if(t,(()=>checkLimits(p)))))}function validateItems(p,m){u.forRange("i",0,R,(u=>{t.subschema({keyword:"contains",dataProp:u,dataPropType:g.Type.Num,compositeRule:true},p);m()}))}function checkLimits(t){u.code((0,m._)`${t}++`);if(E===undefined){u.if((0,m._)`${t} >= ${w}`,(()=>u.assign(P,true).break()))}else{u.if((0,m._)`${t} > ${E}`,(()=>u.assign(P,false).break()));if(w===1)u.assign(P,true);else u.if((0,m._)`${t} >= ${w}`,(()=>u.assign(P,true)))}}}};u["default"]=v},9989:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.validateSchemaDeps=u.validatePropertyDeps=u.error=void 0;const m=p(4809);const g=p(4359);const y=p(9689);u.error={message:({params:{property:t,depsCount:u,deps:p}})=>{const g=u===1?"property":"properties";return(0,m.str)`must have ${g} ${p} when property ${t} is present`},params:({params:{property:t,depsCount:u,deps:p,missingProperty:g}})=>(0,m._)`{property: ${t},
6
+ missingProperty: ${g},
7
+ depsCount: ${u},
8
+ deps: ${p}}`};const v={keyword:"dependencies",type:"object",schemaType:"object",error:u.error,code(t){const[u,p]=splitDependencies(t);validatePropertyDeps(t,u);validateSchemaDeps(t,p)}};function splitDependencies({schema:t}){const u={};const p={};for(const m in t){if(m==="__proto__")continue;const g=Array.isArray(t[m])?u:p;g[m]=t[m]}return[u,p]}function validatePropertyDeps(t,u=t.schema){const{gen:p,data:g,it:v}=t;if(Object.keys(u).length===0)return;const b=p.let("missing");for(const w in u){const E=u[w];if(E.length===0)continue;const $=(0,y.propertyInData)(p,g,w,v.opts.ownProperties);t.setParams({property:w,depsCount:E.length,deps:E.join(", ")});if(v.allErrors){p.if($,(()=>{for(const u of E){(0,y.checkReportMissingProp)(t,u)}}))}else{p.if((0,m._)`${$} && (${(0,y.checkMissingProp)(t,E,b)})`);(0,y.reportMissingProp)(t,b);p.else()}}}u.validatePropertyDeps=validatePropertyDeps;function validateSchemaDeps(t,u=t.schema){const{gen:p,data:m,keyword:v,it:b}=t;const w=p.name("valid");for(const E in u){if((0,g.alwaysValidSchema)(b,u[E]))continue;p.if((0,y.propertyInData)(p,m,E,b.opts.ownProperties),(()=>{const u=t.subschema({keyword:v,schemaProp:E},w);t.mergeValidEvaluated(u,w)}),(()=>p.var(w,true)));t.ok(w)}}u.validateSchemaDeps=validateSchemaDeps;u["default"]=v},961:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(9989);const g={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,m.validateSchemaDeps)(t)};u["default"]=g},9043:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4809);const g=p(4359);const y={message:({params:t})=>(0,m.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,m._)`{failingKeyword: ${t.ifClause}}`};const v={keyword:"if",schemaType:["object","boolean"],trackErrors:true,error:y,code(t){const{gen:u,parentSchema:p,it:y}=t;if(p.then===undefined&&p.else===undefined){(0,g.checkStrictMode)(y,'"if" without "then" and "else" is ignored')}const v=hasSchema(y,"then");const b=hasSchema(y,"else");if(!v&&!b)return;const w=u.let("valid",true);const E=u.name("_valid");validateIf();t.reset();if(v&&b){const p=u.let("ifClause");t.setParams({ifClause:p});u.if(E,validateClause("then",p),validateClause("else",p))}else if(v){u.if(E,validateClause("then"))}else{u.if((0,m.not)(E),validateClause("else"))}t.pass(w,(()=>t.error(true)));function validateIf(){const u=t.subschema({keyword:"if",compositeRule:true,createErrors:false,allErrors:false},E);t.mergeEvaluated(u)}function validateClause(p,g){return()=>{const y=t.subschema({keyword:p},E);u.assign(w,E);t.mergeValidEvaluated(y,w);if(g)u.assign(g,(0,m._)`${p}`);else t.setParams({ifClause:p})}}}};function hasSchema(t,u){const p=t.schema[u];return p!==undefined&&!(0,g.alwaysValidSchema)(t,p)}u["default"]=v},8926:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(8549);const g=p(6286);const y=p(386);const v=p(9794);const b=p(5705);const w=p(9989);const E=p(8285);const $=p(1800);const O=p(1257);const R=p(5537);const P=p(9975);const A=p(8829);const x=p(9399);const T=p(8768);const C=p(9043);const k=p(3870);function getApplicator(t=false){const u=[P.default,A.default,x.default,T.default,C.default,k.default,E.default,$.default,w.default,O.default,R.default];if(t)u.push(g.default,v.default);else u.push(m.default,y.default);u.push(b.default);return u}u["default"]=getApplicator},386:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.validateTuple=void 0;const m=p(4809);const g=p(4359);const y=p(9689);const v={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:u,it:p}=t;if(Array.isArray(u))return validateTuple(t,"additionalItems",u);p.items=true;if((0,g.alwaysValidSchema)(p,u))return;t.ok((0,y.validateArray)(t))}};function validateTuple(t,u,p=t.schema){const{gen:y,parentSchema:v,data:b,keyword:w,it:E}=t;checkStrictTuple(v);if(E.opts.unevaluated&&p.length&&E.items!==true){E.items=g.mergeEvaluated.items(y,p.length,E.items)}const $=y.name("valid");const O=y.const("len",(0,m._)`${b}.length`);p.forEach(((u,p)=>{if((0,g.alwaysValidSchema)(E,u))return;y.if((0,m._)`${O} > ${p}`,(()=>t.subschema({keyword:w,schemaProp:p,dataProp:p},$)));t.ok($)}));function checkStrictTuple(t){const{opts:m,errSchemaPath:y}=E;const v=p.length;const b=v===t.minItems&&(v===t.maxItems||t[u]===false);if(m.strictTuples&&!b){const t=`"${w}" is ${v}-tuple, but minItems or maxItems/${u} are not specified or different at path "${y}"`;(0,g.checkStrictMode)(E,t,m.strictTuples)}}}u.validateTuple=validateTuple;u["default"]=v},9794:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4809);const g=p(4359);const y=p(9689);const v=p(8549);const b={message:({params:{len:t}})=>(0,m.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,m._)`{limit: ${t}}`};const w={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:b,code(t){const{schema:u,parentSchema:p,it:m}=t;const{prefixItems:b}=p;m.items=true;if((0,g.alwaysValidSchema)(m,u))return;if(b)(0,v.validateAdditionalItems)(t,b);else t.ok((0,y.validateArray)(t))}};u["default"]=w},9975:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4359);const g={keyword:"not",schemaType:["object","boolean"],trackErrors:true,code(t){const{gen:u,schema:p,it:g}=t;if((0,m.alwaysValidSchema)(g,p)){t.fail();return}const y=u.name("valid");t.subschema({keyword:"not",compositeRule:true,createErrors:false,allErrors:false},y);t.failResult(y,(()=>t.reset()),(()=>t.error()))},error:{message:"must NOT be valid"}};u["default"]=g},9399:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4809);const g=p(4359);const y={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,m._)`{passingSchemas: ${t.passing}}`};const v={keyword:"oneOf",schemaType:"array",trackErrors:true,error:y,code(t){const{gen:u,schema:p,parentSchema:y,it:v}=t;if(!Array.isArray(p))throw new Error("ajv implementation error");if(v.opts.discriminator&&y.discriminator)return;const b=p;const w=u.let("valid",false);const E=u.let("passing",null);const $=u.name("_valid");t.setParams({passing:E});u.block(validateOneOf);t.result(w,(()=>t.reset()),(()=>t.error(true)));function validateOneOf(){b.forEach(((p,y)=>{let b;if((0,g.alwaysValidSchema)(v,p)){u.var($,true)}else{b=t.subschema({keyword:"oneOf",schemaProp:y,compositeRule:true},$)}if(y>0){u.if((0,m._)`${$} && ${w}`).assign(w,false).assign(E,(0,m._)`[${E}, ${y}]`).else()}u.if($,(()=>{u.assign(w,true);u.assign(E,y);if(b)t.mergeEvaluated(b,m.Name)}))}))}}};u["default"]=v},5537:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(9689);const g=p(4809);const y=p(4359);const v=p(4359);const b={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:u,schema:p,data:b,parentSchema:w,it:E}=t;const{opts:$}=E;const O=(0,m.allSchemaProperties)(p);const R=O.filter((t=>(0,y.alwaysValidSchema)(E,p[t])));if(O.length===0||R.length===O.length&&(!E.opts.unevaluated||E.props===true)){return}const P=$.strictSchema&&!$.allowMatchingProperties&&w.properties;const A=u.name("valid");if(E.props!==true&&!(E.props instanceof g.Name)){E.props=(0,v.evaluatedPropsToName)(u,E.props)}const{props:x}=E;validatePatternProperties();function validatePatternProperties(){for(const t of O){if(P)checkMatchingProperties(t);if(E.allErrors){validateProperties(t)}else{u.var(A,true);validateProperties(t);u.if(A)}}}function checkMatchingProperties(t){for(const u in P){if(new RegExp(t).test(u)){(0,y.checkStrictMode)(E,`property ${u} matches pattern ${t} (use allowMatchingProperties)`)}}}function validateProperties(p){u.forIn("key",b,(y=>{u.if((0,g._)`${(0,m.usePattern)(t,p)}.test(${y})`,(()=>{const m=R.includes(p);if(!m){t.subschema({keyword:"patternProperties",schemaProp:p,dataProp:y,dataPropType:v.Type.Str},A)}if(E.opts.unevaluated&&x!==true){u.assign((0,g._)`${x}[${y}]`,true)}else if(!m&&!E.allErrors){u.if((0,g.not)(A),(()=>u.break()))}}))}))}}};u["default"]=b},6286:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(386);const g={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,m.validateTuple)(t,"items")};u["default"]=g},1257:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(9278);const g=p(9689);const y=p(4359);const v=p(1800);const b={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:u,schema:p,parentSchema:b,data:w,it:E}=t;if(E.opts.removeAdditional==="all"&&b.additionalProperties===undefined){v.default.code(new m.KeywordCxt(E,v.default,"additionalProperties"))}const $=(0,g.allSchemaProperties)(p);for(const t of $){E.definedProperties.add(t)}if(E.opts.unevaluated&&$.length&&E.props!==true){E.props=y.mergeEvaluated.props(u,(0,y.toHash)($),E.props)}const O=$.filter((t=>!(0,y.alwaysValidSchema)(E,p[t])));if(O.length===0)return;const R=u.name("valid");for(const p of O){if(hasDefault(p)){applyPropertySchema(p)}else{u.if((0,g.propertyInData)(u,w,p,E.opts.ownProperties));applyPropertySchema(p);if(!E.allErrors)u.else().var(R,true);u.endIf()}t.it.definedProperties.add(p);t.ok(R)}function hasDefault(t){return E.opts.useDefaults&&!E.compositeRule&&p[t].default!==undefined}function applyPropertySchema(u){t.subschema({keyword:"properties",schemaProp:u,dataProp:u},R)}}};u["default"]=b},8285:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4809);const g=p(4359);const y={message:"property name must be valid",params:({params:t})=>(0,m._)`{propertyName: ${t.propertyName}}`};const v={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:y,code(t){const{gen:u,schema:p,data:y,it:v}=t;if((0,g.alwaysValidSchema)(v,p))return;const b=u.name("valid");u.forIn("key",y,(p=>{t.setParams({propertyName:p});t.subschema({keyword:"propertyNames",data:p,dataTypes:["string"],propertyName:p,compositeRule:true},b);u.if((0,m.not)(b),(()=>{t.error(true);if(!v.allErrors)u.break()}))}));t.ok(b)}};u["default"]=v},3870:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4359);const g={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:u,it:p}){if(u.if===undefined)(0,m.checkStrictMode)(p,`"${t}" without "if" is ignored`)}};u["default"]=g},9689:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.validateUnion=u.validateArray=u.usePattern=u.callValidateCode=u.schemaProperties=u.allSchemaProperties=u.noPropertyInData=u.propertyInData=u.isOwnProperty=u.hasPropFunc=u.reportMissingProp=u.checkMissingProp=u.checkReportMissingProp=void 0;const m=p(4809);const g=p(4359);const y=p(1267);const v=p(4359);function checkReportMissingProp(t,u){const{gen:p,data:g,it:y}=t;p.if(noPropertyInData(p,g,u,y.opts.ownProperties),(()=>{t.setParams({missingProperty:(0,m._)`${u}`},true);t.error()}))}u.checkReportMissingProp=checkReportMissingProp;function checkMissingProp({gen:t,data:u,it:{opts:p}},g,y){return(0,m.or)(...g.map((g=>(0,m.and)(noPropertyInData(t,u,g,p.ownProperties),(0,m._)`${y} = ${g}`))))}u.checkMissingProp=checkMissingProp;function reportMissingProp(t,u){t.setParams({missingProperty:u},true);t.error()}u.reportMissingProp=reportMissingProp;function hasPropFunc(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,m._)`Object.prototype.hasOwnProperty`})}u.hasPropFunc=hasPropFunc;function isOwnProperty(t,u,p){return(0,m._)`${hasPropFunc(t)}.call(${u}, ${p})`}u.isOwnProperty=isOwnProperty;function propertyInData(t,u,p,g){const y=(0,m._)`${u}${(0,m.getProperty)(p)} !== undefined`;return g?(0,m._)`${y} && ${isOwnProperty(t,u,p)}`:y}u.propertyInData=propertyInData;function noPropertyInData(t,u,p,g){const y=(0,m._)`${u}${(0,m.getProperty)(p)} === undefined`;return g?(0,m.or)(y,(0,m.not)(isOwnProperty(t,u,p))):y}u.noPropertyInData=noPropertyInData;function allSchemaProperties(t){return t?Object.keys(t).filter((t=>t!=="__proto__")):[]}u.allSchemaProperties=allSchemaProperties;function schemaProperties(t,u){return allSchemaProperties(u).filter((p=>!(0,g.alwaysValidSchema)(t,u[p])))}u.schemaProperties=schemaProperties;function callValidateCode({schemaCode:t,data:u,it:{gen:p,topSchemaRef:g,schemaPath:v,errorPath:b},it:w},E,$,O){const R=O?(0,m._)`${t}, ${u}, ${g}${v}`:u;const P=[[y.default.instancePath,(0,m.strConcat)(y.default.instancePath,b)],[y.default.parentData,w.parentData],[y.default.parentDataProperty,w.parentDataProperty],[y.default.rootData,y.default.rootData]];if(w.opts.dynamicRef)P.push([y.default.dynamicAnchors,y.default.dynamicAnchors]);const A=(0,m._)`${R}, ${p.object(...P)}`;return $!==m.nil?(0,m._)`${E}.call(${$}, ${A})`:(0,m._)`${E}(${A})`}u.callValidateCode=callValidateCode;const b=(0,m._)`new RegExp`;function usePattern({gen:t,it:{opts:u}},p){const g=u.unicodeRegExp?"u":"";const{regExp:y}=u.code;const w=y(p,g);return t.scopeValue("pattern",{key:w.toString(),ref:w,code:(0,m._)`${y.code==="new RegExp"?b:(0,v.useFunc)(t,y)}(${p}, ${g})`})}u.usePattern=usePattern;function validateArray(t){const{gen:u,data:p,keyword:y,it:v}=t;const b=u.name("valid");if(v.allErrors){const t=u.let("valid",true);validateItems((()=>u.assign(t,false)));return t}u.var(b,true);validateItems((()=>u.break()));return b;function validateItems(v){const w=u.const("len",(0,m._)`${p}.length`);u.forRange("i",0,w,(p=>{t.subschema({keyword:y,dataProp:p,dataPropType:g.Type.Num},b);u.if((0,m.not)(b),v)}))}}u.validateArray=validateArray;function validateUnion(t){const{gen:u,schema:p,keyword:y,it:v}=t;if(!Array.isArray(p))throw new Error("ajv implementation error");const b=p.some((t=>(0,g.alwaysValidSchema)(v,t)));if(b&&!v.opts.unevaluated)return;const w=u.let("valid",false);const E=u.name("_valid");u.block((()=>p.forEach(((p,g)=>{const v=t.subschema({keyword:y,schemaProp:g,compositeRule:true},E);u.assign(w,(0,m._)`${w} || ${E}`);const b=t.mergeValidEvaluated(v,E);if(!b)u.if((0,m.not)(w))}))));t.result(w,(()=>t.reset()),(()=>t.error(true)))}u.validateUnion=validateUnion},5115:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const p={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};u["default"]=p},2860:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(5115);const g=p(6001);const y=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",m.default,g.default];u["default"]=y},6001:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.callRef=u.getValidate=void 0;const m=p(8547);const g=p(9689);const y=p(4809);const v=p(1267);const b=p(2407);const w=p(4359);const E={keyword:"$ref",schemaType:"string",code(t){const{gen:u,schema:p,it:g}=t;const{baseId:v,schemaEnv:w,validateName:E,opts:$,self:O}=g;const{root:R}=w;if((p==="#"||p==="#/")&&v===R.baseId)return callRootRef();const P=b.resolveRef.call(O,R,v,p);if(P===undefined)throw new m.default(g.opts.uriResolver,v,p);if(P instanceof b.SchemaEnv)return callValidate(P);return inlineRefSchema(P);function callRootRef(){if(w===R)return callRef(t,E,w,w.$async);const p=u.scopeValue("root",{ref:R});return callRef(t,(0,y._)`${p}.validate`,R,R.$async)}function callValidate(u){const p=getValidate(t,u);callRef(t,p,u,u.$async)}function inlineRefSchema(m){const g=u.scopeValue("schema",$.code.source===true?{ref:m,code:(0,y.stringify)(m)}:{ref:m});const v=u.name("valid");const b=t.subschema({schema:m,dataTypes:[],schemaPath:y.nil,topSchemaRef:g,errSchemaPath:p},v);t.mergeEvaluated(b);t.ok(v)}}};function getValidate(t,u){const{gen:p}=t;return u.validate?p.scopeValue("validate",{ref:u.validate}):(0,y._)`${p.scopeValue("wrapper",{ref:u})}.validate`}u.getValidate=getValidate;function callRef(t,u,p,m){const{gen:b,it:E}=t;const{allErrors:$,schemaEnv:O,opts:R}=E;const P=R.passContext?v.default.this:y.nil;if(m)callAsyncRef();else callSyncRef();function callAsyncRef(){if(!O.$async)throw new Error("async schema referenced by sync schema");const p=b.let("valid");b.try((()=>{b.code((0,y._)`await ${(0,g.callValidateCode)(t,u,P)}`);addEvaluatedFrom(u);if(!$)b.assign(p,true)}),(t=>{b.if((0,y._)`!(${t} instanceof ${E.ValidationError})`,(()=>b.throw(t)));addErrorsFrom(t);if(!$)b.assign(p,false)}));t.ok(p)}function callSyncRef(){t.result((0,g.callValidateCode)(t,u,P),(()=>addEvaluatedFrom(u)),(()=>addErrorsFrom(u)))}function addErrorsFrom(t){const u=(0,y._)`${t}.errors`;b.assign(v.default.vErrors,(0,y._)`${v.default.vErrors} === null ? ${u} : ${v.default.vErrors}.concat(${u})`);b.assign(v.default.errors,(0,y._)`${v.default.vErrors}.length`)}function addEvaluatedFrom(t){var u;if(!E.opts.unevaluated)return;const m=(u=p===null||p===void 0?void 0:p.validate)===null||u===void 0?void 0:u.evaluated;if(E.props!==true){if(m&&!m.dynamicProps){if(m.props!==undefined){E.props=w.mergeEvaluated.props(b,m.props,E.props)}}else{const u=b.var("props",(0,y._)`${t}.evaluated.props`);E.props=w.mergeEvaluated.props(b,u,E.props,y.Name)}}if(E.items!==true){if(m&&!m.dynamicItems){if(m.items!==undefined){E.items=w.mergeEvaluated.items(b,m.items,E.items)}}else{const u=b.var("items",(0,y._)`${t}.evaluated.items`);E.items=w.mergeEvaluated.items(b,u,E.items,y.Name)}}}}u.callRef=callRef;u["default"]=E},4665:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4809);const g=p(5528);const y=p(2407);const v=p(8547);const b=p(4359);const w={message:({params:{discrError:t,tagName:u}})=>t===g.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:t,tag:u,tagName:p}})=>(0,m._)`{error: ${t}, tag: ${p}, tagValue: ${u}}`};const E={keyword:"discriminator",type:"object",schemaType:"object",error:w,code(t){const{gen:u,data:p,schema:w,parentSchema:E,it:$}=t;const{oneOf:O}=E;if(!$.opts.discriminator){throw new Error("discriminator: requires discriminator option")}const R=w.propertyName;if(typeof R!="string")throw new Error("discriminator: requires propertyName");if(w.mapping)throw new Error("discriminator: mapping is not supported");if(!O)throw new Error("discriminator: requires oneOf keyword");const P=u.let("valid",false);const A=u.const("tag",(0,m._)`${p}${(0,m.getProperty)(R)}`);u.if((0,m._)`typeof ${A} == "string"`,(()=>validateMapping()),(()=>t.error(false,{discrError:g.DiscrError.Tag,tag:A,tagName:R})));t.ok(P);function validateMapping(){const p=getMapping();u.if(false);for(const t in p){u.elseIf((0,m._)`${A} === ${t}`);u.assign(P,applyTagSchema(p[t]))}u.else();t.error(false,{discrError:g.DiscrError.Mapping,tag:A,tagName:R});u.endIf()}function applyTagSchema(p){const g=u.name("valid");const y=t.subschema({keyword:"oneOf",schemaProp:p},g);t.mergeEvaluated(y,m.Name);return g}function getMapping(){var t;const u={};const p=hasRequired(E);let m=true;for(let u=0;u<O.length;u++){let g=O[u];if((g===null||g===void 0?void 0:g.$ref)&&!(0,b.schemaHasRulesButRef)(g,$.self.RULES)){const t=g.$ref;g=y.resolveRef.call($.self,$.schemaEnv.root,$.baseId,t);if(g instanceof y.SchemaEnv)g=g.schema;if(g===undefined)throw new v.default($.opts.uriResolver,$.baseId,t)}const w=(t=g===null||g===void 0?void 0:g.properties)===null||t===void 0?void 0:t[R];if(typeof w!="object"){throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${R}"`)}m=m&&(p||hasRequired(g));addMappings(w,u)}if(!m)throw new Error(`discriminator: "${R}" must be required`);return u;function hasRequired({required:t}){return Array.isArray(t)&&t.includes(R)}function addMappings(t,u){if(t.const){addMapping(t.const,u)}else if(t.enum){for(const p of t.enum){addMapping(p,u)}}else{throw new Error(`discriminator: "properties/${R}" must have "const" or "enum"`)}}function addMapping(t,p){if(typeof t!="string"||t in u){throw new Error(`discriminator: "${R}" values must be unique strings`)}u[t]=p}}}};u["default"]=E},5528:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.DiscrError=void 0;var p;(function(t){t["Tag"]="tag";t["Mapping"]="mapping"})(p||(u.DiscrError=p={}))},6117:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(2860);const g=p(3824);const y=p(8926);const v=p(3500);const b=p(4361);const w=p(8461);const E=p(2392);const $=p(8370);const O=[v.default,m.default,g.default,(0,y.default)(true),E.default,$.metadataVocabulary,$.contentVocabulary,b.default,w.default];u["default"]=O},540:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(2860);const g=p(3824);const y=p(8926);const v=p(2392);const b=p(8370);const w=[m.default,g.default,(0,y.default)(),v.default,b.metadataVocabulary,b.contentVocabulary];u["default"]=w},3448:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.dynamicAnchor=void 0;const m=p(4809);const g=p(1267);const y=p(2407);const v=p(6001);const b={keyword:"$dynamicAnchor",schemaType:"string",code:t=>dynamicAnchor(t,t.schema)};function dynamicAnchor(t,u){const{gen:p,it:y}=t;y.schemaEnv.root.dynamicAnchors[u]=true;const v=(0,m._)`${g.default.dynamicAnchors}${(0,m.getProperty)(u)}`;const b=y.errSchemaPath==="#"?y.validateName:_getValidate(t);p.if((0,m._)`!${v}`,(()=>p.assign(v,b)))}u.dynamicAnchor=dynamicAnchor;function _getValidate(t){const{schemaEnv:u,schema:p,self:m}=t.it;const{root:g,baseId:b,localRefs:w,meta:E}=u.root;const{schemaId:$}=m.opts;const O=new y.SchemaEnv({schema:p,schemaId:$,root:g,baseId:b,localRefs:w,meta:E});y.compileSchema.call(m,O);return(0,v.getValidate)(t,O)}u["default"]=b},520:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.dynamicRef=void 0;const m=p(4809);const g=p(1267);const y=p(6001);const v={keyword:"$dynamicRef",schemaType:"string",code:t=>dynamicRef(t,t.schema)};function dynamicRef(t,u){const{gen:p,keyword:v,it:b}=t;if(u[0]!=="#")throw new Error(`"${v}" only supports hash fragment reference`);const w=u.slice(1);if(b.allErrors){_dynamicRef()}else{const u=p.let("valid",false);_dynamicRef(u);t.ok(u)}function _dynamicRef(t){if(b.schemaEnv.root.dynamicAnchors[w]){const u=p.let("_v",(0,m._)`${g.default.dynamicAnchors}${(0,m.getProperty)(w)}`);p.if(u,_callRef(u,t),_callRef(b.validateName,t))}else{_callRef(b.validateName,t)()}}function _callRef(u,m){return m?()=>p.block((()=>{(0,y.callRef)(t,u);p.let(m,true)})):()=>(0,y.callRef)(t,u)}}u.dynamicRef=dynamicRef;u["default"]=v},3500:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(3448);const g=p(520);const y=p(5989);const v=p(147);const b=[m.default,g.default,y.default,v.default];u["default"]=b},5989:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(3448);const g=p(4359);const y={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){if(t.schema)(0,m.dynamicAnchor)(t,"");else(0,g.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};u["default"]=y},147:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(520);const g={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,m.dynamicRef)(t,t.schema)};u["default"]=g},3501:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4809);const g={message:({schemaCode:t})=>(0,m.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,m._)`{format: ${t}}`};const y={keyword:"format",type:["number","string"],schemaType:"string",$data:true,error:g,code(t,u){const{gen:p,data:g,$data:y,schema:v,schemaCode:b,it:w}=t;const{opts:E,errSchemaPath:$,schemaEnv:O,self:R}=w;if(!E.validateFormats)return;if(y)validate$DataFormat();else validateFormat();function validate$DataFormat(){const y=p.scopeValue("formats",{ref:R.formats,code:E.code.formats});const v=p.const("fDef",(0,m._)`${y}[${b}]`);const w=p.let("fType");const $=p.let("format");p.if((0,m._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,(()=>p.assign(w,(0,m._)`${v}.type || "string"`).assign($,(0,m._)`${v}.validate`)),(()=>p.assign(w,(0,m._)`"string"`).assign($,v)));t.fail$data((0,m.or)(unknownFmt(),invalidFmt()));function unknownFmt(){if(E.strictSchema===false)return m.nil;return(0,m._)`${b} && !${$}`}function invalidFmt(){const t=O.$async?(0,m._)`(${v}.async ? await ${$}(${g}) : ${$}(${g}))`:(0,m._)`${$}(${g})`;const p=(0,m._)`(typeof ${$} == "function" ? ${t} : ${$}.test(${g}))`;return(0,m._)`${$} && ${$} !== true && ${w} === ${u} && !${p}`}}function validateFormat(){const y=R.formats[v];if(!y){unknownFormat();return}if(y===true)return;const[b,w,P]=getFormat(y);if(b===u)t.pass(validCondition());function unknownFormat(){if(E.strictSchema===false){R.logger.warn(unknownMsg());return}throw new Error(unknownMsg());function unknownMsg(){return`unknown format "${v}" ignored in schema at path "${$}"`}}function getFormat(t){const u=t instanceof RegExp?(0,m.regexpCode)(t):E.code.formats?(0,m._)`${E.code.formats}${(0,m.getProperty)(v)}`:undefined;const g=p.scopeValue("formats",{key:v,ref:t,code:u});if(typeof t=="object"&&!(t instanceof RegExp)){return[t.type||"string",t.validate,(0,m._)`${g}.validate`]}return["string",t,g]}function validCondition(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!O.$async)throw new Error("async format in sync schema");return(0,m._)`await ${P}(${g})`}return typeof w=="function"?(0,m._)`${P}(${g})`:(0,m._)`${P}.test(${g})`}}}};u["default"]=y},2392:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(3501);const g=[m.default];u["default"]=g},8370:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.contentVocabulary=u.metadataVocabulary=void 0;u.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];u.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},4361:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(9178);const g=p(961);const y=p(2574);const v=[m.default,g.default,y.default];u["default"]=v},8461:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(9172);const g=p(4385);const y=[m.default,g.default];u["default"]=y},4385:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4809);const g=p(4359);const y={message:({params:{len:t}})=>(0,m.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,m._)`{limit: ${t}}`};const v={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:y,code(t){const{gen:u,schema:p,data:y,it:v}=t;const b=v.items||0;if(b===true)return;const w=u.const("len",(0,m._)`${y}.length`);if(p===false){t.setParams({len:b});t.fail((0,m._)`${w} > ${b}`)}else if(typeof p=="object"&&!(0,g.alwaysValidSchema)(v,p)){const p=u.var("valid",(0,m._)`${w} <= ${b}`);u.if((0,m.not)(p),(()=>validateItems(p,b)));t.ok(p)}v.items=true;function validateItems(p,y){u.forRange("i",y,w,(y=>{t.subschema({keyword:"unevaluatedItems",dataProp:y,dataPropType:g.Type.Num},p);if(!v.allErrors)u.if((0,m.not)(p),(()=>u.break()))}))}}};u["default"]=v},9172:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4809);const g=p(4359);const y=p(1267);const v={message:"must NOT have unevaluated properties",params:({params:t})=>(0,m._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`};const b={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:true,error:v,code(t){const{gen:u,schema:p,data:v,errsCount:b,it:w}=t;if(!b)throw new Error("ajv implementation error");const{allErrors:E,props:$}=w;if($ instanceof m.Name){u.if((0,m._)`${$} !== true`,(()=>u.forIn("key",v,(t=>u.if(unevaluatedDynamic($,t),(()=>unevaluatedPropCode(t)))))))}else if($!==true){u.forIn("key",v,(t=>$===undefined?unevaluatedPropCode(t):u.if(unevaluatedStatic($,t),(()=>unevaluatedPropCode(t)))))}w.props=true;t.ok((0,m._)`${b} === ${y.default.errors}`);function unevaluatedPropCode(y){if(p===false){t.setParams({unevaluatedProperty:y});t.error();if(!E)u.break();return}if(!(0,g.alwaysValidSchema)(w,p)){const p=u.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:y,dataPropType:g.Type.Str},p);if(!E)u.if((0,m.not)(p),(()=>u.break()))}}function unevaluatedDynamic(t,u){return(0,m._)`!${t} || !${t}[${u}]`}function unevaluatedStatic(t,u){const p=[];for(const g in t){if(t[g]===true)p.push((0,m._)`${u} !== ${g}`)}return(0,m.and)(...p)}}};u["default"]=b},4235:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4809);const g=p(4359);const y=p(9502);const v={message:"must be equal to constant",params:({schemaCode:t})=>(0,m._)`{allowedValue: ${t}}`};const b={keyword:"const",$data:true,error:v,code(t){const{gen:u,data:p,$data:v,schemaCode:b,schema:w}=t;if(v||w&&typeof w=="object"){t.fail$data((0,m._)`!${(0,g.useFunc)(u,y.default)}(${p}, ${b})`)}else{t.fail((0,m._)`${w} !== ${p}`)}}};u["default"]=b},9178:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(9989);const g={keyword:"dependentRequired",type:"object",schemaType:"object",error:m.error,code:t=>(0,m.validatePropertyDeps)(t)};u["default"]=g},5631:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4809);const g=p(4359);const y=p(9502);const v={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,m._)`{allowedValues: ${t}}`};const b={keyword:"enum",schemaType:"array",$data:true,error:v,code(t){const{gen:u,data:p,$data:v,schema:b,schemaCode:w,it:E}=t;if(!v&&b.length===0)throw new Error("enum must have non-empty array");const $=b.length>=E.opts.loopEnum;let O;const getEql=()=>O!==null&&O!==void 0?O:O=(0,g.useFunc)(u,y.default);let R;if($||v){R=u.let("valid");t.block$data(R,loopEnum)}else{if(!Array.isArray(b))throw new Error("ajv implementation error");const t=u.const("vSchema",w);R=(0,m.or)(...b.map(((u,p)=>equalCode(t,p))))}t.pass(R);function loopEnum(){u.assign(R,false);u.forOf("v",w,(t=>u.if((0,m._)`${getEql()}(${p}, ${t})`,(()=>u.assign(R,true).break()))))}function equalCode(t,u){const g=b[u];return typeof g==="object"&&g!==null?(0,m._)`${getEql()}(${p}, ${t}[${u}])`:(0,m._)`${p} === ${g}`}}};u["default"]=b},3824:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(7174);const g=p(5515);const y=p(6831);const v=p(7594);const b=p(4290);const w=p(5167);const E=p(2135);const $=p(9525);const O=p(4235);const R=p(5631);const P=[m.default,g.default,y.default,v.default,b.default,w.default,E.default,$.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},O.default,R.default];u["default"]=P},2574:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4359);const g={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:u,it:p}){if(u.contains===undefined){(0,m.checkStrictMode)(p,`"${t}" without "contains" is ignored`)}}};u["default"]=g},2135:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4809);const g={message({keyword:t,schemaCode:u}){const p=t==="maxItems"?"more":"fewer";return(0,m.str)`must NOT have ${p} than ${u} items`},params:({schemaCode:t})=>(0,m._)`{limit: ${t}}`};const y={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:true,error:g,code(t){const{keyword:u,data:p,schemaCode:g}=t;const y=u==="maxItems"?m.operators.GT:m.operators.LT;t.fail$data((0,m._)`${p}.length ${y} ${g}`)}};u["default"]=y},6831:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4809);const g=p(4359);const y=p(7169);const v={message({keyword:t,schemaCode:u}){const p=t==="maxLength"?"more":"fewer";return(0,m.str)`must NOT have ${p} than ${u} characters`},params:({schemaCode:t})=>(0,m._)`{limit: ${t}}`};const b={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:true,error:v,code(t){const{keyword:u,data:p,schemaCode:v,it:b}=t;const w=u==="maxLength"?m.operators.GT:m.operators.LT;const E=b.opts.unicode===false?(0,m._)`${p}.length`:(0,m._)`${(0,g.useFunc)(t.gen,y.default)}(${p})`;t.fail$data((0,m._)`${E} ${w} ${v}`)}};u["default"]=b},7174:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4809);const g=m.operators;const y={maximum:{okStr:"<=",ok:g.LTE,fail:g.GT},minimum:{okStr:">=",ok:g.GTE,fail:g.LT},exclusiveMaximum:{okStr:"<",ok:g.LT,fail:g.GTE},exclusiveMinimum:{okStr:">",ok:g.GT,fail:g.LTE}};const v={message:({keyword:t,schemaCode:u})=>(0,m.str)`must be ${y[t].okStr} ${u}`,params:({keyword:t,schemaCode:u})=>(0,m._)`{comparison: ${y[t].okStr}, limit: ${u}}`};const b={keyword:Object.keys(y),type:"number",schemaType:"number",$data:true,error:v,code(t){const{keyword:u,data:p,schemaCode:g}=t;t.fail$data((0,m._)`${p} ${y[u].fail} ${g} || isNaN(${p})`)}};u["default"]=b},4290:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4809);const g={message({keyword:t,schemaCode:u}){const p=t==="maxProperties"?"more":"fewer";return(0,m.str)`must NOT have ${p} than ${u} properties`},params:({schemaCode:t})=>(0,m._)`{limit: ${t}}`};const y={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:true,error:g,code(t){const{keyword:u,data:p,schemaCode:g}=t;const y=u==="maxProperties"?m.operators.GT:m.operators.LT;t.fail$data((0,m._)`Object.keys(${p}).length ${y} ${g}`)}};u["default"]=y},5515:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(4809);const g={message:({schemaCode:t})=>(0,m.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,m._)`{multipleOf: ${t}}`};const y={keyword:"multipleOf",type:"number",schemaType:"number",$data:true,error:g,code(t){const{gen:u,data:p,schemaCode:g,it:y}=t;const v=y.opts.multipleOfPrecision;const b=u.let("res");const w=v?(0,m._)`Math.abs(Math.round(${b}) - ${b}) > 1e-${v}`:(0,m._)`${b} !== parseInt(${b})`;t.fail$data((0,m._)`(${g} === 0 || (${b} = ${p}/${g}, ${w}))`)}};u["default"]=y},7594:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(9689);const g=p(4809);const y={message:({schemaCode:t})=>(0,g.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,g._)`{pattern: ${t}}`};const v={keyword:"pattern",type:"string",schemaType:"string",$data:true,error:y,code(t){const{data:u,$data:p,schema:y,schemaCode:v,it:b}=t;const w=b.opts.unicodeRegExp?"u":"";const E=p?(0,g._)`(new RegExp(${v}, ${w}))`:(0,m.usePattern)(t,y);t.fail$data((0,g._)`!${E}.test(${u})`)}};u["default"]=v},5167:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(9689);const g=p(4809);const y=p(4359);const v={message:({params:{missingProperty:t}})=>(0,g.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,g._)`{missingProperty: ${t}}`};const b={keyword:"required",type:"object",schemaType:"array",$data:true,error:v,code(t){const{gen:u,schema:p,schemaCode:v,data:b,$data:w,it:E}=t;const{opts:$}=E;if(!w&&p.length===0)return;const O=p.length>=$.loopRequired;if(E.allErrors)allErrorsMode();else exitOnErrorMode();if($.strictRequired){const u=t.parentSchema.properties;const{definedProperties:m}=t.it;for(const t of p){if((u===null||u===void 0?void 0:u[t])===undefined&&!m.has(t)){const u=E.schemaEnv.baseId+E.errSchemaPath;const p=`required property "${t}" is not defined at "${u}" (strictRequired)`;(0,y.checkStrictMode)(E,p,E.opts.strictRequired)}}}function allErrorsMode(){if(O||w){t.block$data(g.nil,loopAllRequired)}else{for(const u of p){(0,m.checkReportMissingProp)(t,u)}}}function exitOnErrorMode(){const g=u.let("missing");if(O||w){const p=u.let("valid",true);t.block$data(p,(()=>loopUntilMissing(g,p)));t.ok(p)}else{u.if((0,m.checkMissingProp)(t,p,g));(0,m.reportMissingProp)(t,g);u.else()}}function loopAllRequired(){u.forOf("prop",v,(p=>{t.setParams({missingProperty:p});u.if((0,m.noPropertyInData)(u,b,p,$.ownProperties),(()=>t.error()))}))}function loopUntilMissing(p,y){t.setParams({missingProperty:p});u.forOf(p,v,(()=>{u.assign(y,(0,m.propertyInData)(u,b,p,$.ownProperties));u.if((0,g.not)(y),(()=>{t.error();u.break()}))}),g.nil)}}};u["default"]=b},9525:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(5044);const g=p(4809);const y=p(4359);const v=p(9502);const b={message:({params:{i:t,j:u}})=>(0,g.str)`must NOT have duplicate items (items ## ${u} and ${t} are identical)`,params:({params:{i:t,j:u}})=>(0,g._)`{i: ${t}, j: ${u}}`};const w={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:true,error:b,code(t){const{gen:u,data:p,$data:b,schema:w,parentSchema:E,schemaCode:$,it:O}=t;if(!b&&!w)return;const R=u.let("valid");const P=E.items?(0,m.getSchemaTypes)(E.items):[];t.block$data(R,validateUniqueItems,(0,g._)`${$} === false`);t.ok(R);function validateUniqueItems(){const m=u.let("i",(0,g._)`${p}.length`);const y=u.let("j");t.setParams({i:m,j:y});u.assign(R,true);u.if((0,g._)`${m} > 1`,(()=>(canOptimize()?loopN:loopN2)(m,y)))}function canOptimize(){return P.length>0&&!P.some((t=>t==="object"||t==="array"))}function loopN(y,v){const b=u.name("item");const w=(0,m.checkDataTypes)(P,b,O.opts.strictNumbers,m.DataType.Wrong);const E=u.const("indices",(0,g._)`{}`);u.for((0,g._)`;${y}--;`,(()=>{u.let(b,(0,g._)`${p}[${y}]`);u.if(w,(0,g._)`continue`);if(P.length>1)u.if((0,g._)`typeof ${b} == "string"`,(0,g._)`${b} += "_"`);u.if((0,g._)`typeof ${E}[${b}] == "number"`,(()=>{u.assign(v,(0,g._)`${E}[${b}]`);t.error();u.assign(R,false).break()})).code((0,g._)`${E}[${b}] = ${y}`)}))}function loopN2(m,b){const w=(0,y.useFunc)(u,v.default);const E=u.name("outer");u.label(E).for((0,g._)`;${m}--;`,(()=>u.for((0,g._)`${b} = ${m}; ${b}--;`,(()=>u.if((0,g._)`${w}(${p}[${m}], ${p}[${b}])`,(()=>{t.error();u.assign(R,false).break(E)}))))))}}};u["default"]=w},9642:(t,u,p)=>{var m=p(1160);function retry(t,u){function run(p,g){var y=u||{};if(!("randomize"in y)){y.randomize=true}var v=m.operation(y);function bail(t){g(t||new Error("Aborted"))}function onError(t,u){if(t.bail){bail(t);return}if(!v.retry(t)){g(v.mainError())}else if(y.onRetry){y.onRetry(t,u)}}function runAttempt(u){var m;try{m=t(bail,u)}catch(t){onError(t,u);return}Promise.resolve(m).then(p).catch((function catchIt(t){onError(t,u)}))}v.attempt(runAttempt)}return new Promise(run)}t.exports=retry},8671:(t,u,p)=>{"use strict";const m=p(3062);const g=p(4898);const y=p(5331);const v=p(168);const braces=(t,u={})=>{let p=[];if(Array.isArray(t)){for(const m of t){const t=braces.create(m,u);if(Array.isArray(t)){p.push(...t)}else{p.push(t)}}}else{p=[].concat(braces.create(t,u))}if(u&&u.expand===true&&u.nodupes===true){p=[...new Set(p)]}return p};braces.parse=(t,u={})=>v(t,u);braces.stringify=(t,u={})=>{if(typeof t==="string"){return m(braces.parse(t,u),u)}return m(t,u)};braces.compile=(t,u={})=>{if(typeof t==="string"){t=braces.parse(t,u)}return g(t,u)};braces.expand=(t,u={})=>{if(typeof t==="string"){t=braces.parse(t,u)}let p=y(t,u);if(u.noempty===true){p=p.filter(Boolean)}if(u.nodupes===true){p=[...new Set(p)]}return p};braces.create=(t,u={})=>{if(t===""||t.length<3){return[t]}return u.expand!==true?braces.compile(t,u):braces.expand(t,u)};t.exports=braces},4898:(t,u,p)=>{"use strict";const m=p(9730);const g=p(2474);const compile=(t,u={})=>{const walk=(t,p={})=>{const y=g.isInvalidBrace(p);const v=t.invalid===true&&u.escapeInvalid===true;const b=y===true||v===true;const w=u.escapeInvalid===true?"\\":"";let E="";if(t.isOpen===true){return w+t.value}if(t.isClose===true){console.log("node.isClose",w,t.value);return w+t.value}if(t.type==="open"){return b?w+t.value:"("}if(t.type==="close"){return b?w+t.value:")"}if(t.type==="comma"){return t.prev.type==="comma"?"":b?t.value:"|"}if(t.value){return t.value}if(t.nodes&&t.ranges>0){const p=g.reduce(t.nodes);const y=m(...p,{...u,wrap:false,toRegex:true,strictZeros:true});if(y.length!==0){return p.length>1&&y.length>1?`(${y})`:y}}if(t.nodes){for(const u of t.nodes){E+=walk(u,t)}}return E};return walk(t)};t.exports=compile},9397:t=>{"use strict";t.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},5331:(t,u,p)=>{"use strict";const m=p(9730);const g=p(3062);const y=p(2474);const append=(t="",u="",p=false)=>{const m=[];t=[].concat(t);u=[].concat(u);if(!u.length)return t;if(!t.length){return p?y.flatten(u).map((t=>`{${t}}`)):u}for(const g of t){if(Array.isArray(g)){for(const t of g){m.push(append(t,u,p))}}else{for(let t of u){if(p===true&&typeof t==="string")t=`{${t}}`;m.push(Array.isArray(t)?append(g,t,p):g+t)}}}return y.flatten(m)};const expand=(t,u={})=>{const p=u.rangeLimit===undefined?1e3:u.rangeLimit;const walk=(t,v={})=>{t.queue=[];let b=v;let w=v.queue;while(b.type!=="brace"&&b.type!=="root"&&b.parent){b=b.parent;w=b.queue}if(t.invalid||t.dollar){w.push(append(w.pop(),g(t,u)));return}if(t.type==="brace"&&t.invalid!==true&&t.nodes.length===2){w.push(append(w.pop(),["{}"]));return}if(t.nodes&&t.ranges>0){const v=y.reduce(t.nodes);if(y.exceedsLimit(...v,u.step,p)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let b=m(...v,u);if(b.length===0){b=g(t,u)}w.push(append(w.pop(),b));t.nodes=[];return}const E=y.encloseBrace(t);let $=t.queue;let O=t;while(O.type!=="brace"&&O.type!=="root"&&O.parent){O=O.parent;$=O.queue}for(let u=0;u<t.nodes.length;u++){const p=t.nodes[u];if(p.type==="comma"&&t.type==="brace"){if(u===1)$.push("");$.push("");continue}if(p.type==="close"){w.push(append(w.pop(),$,E));continue}if(p.value&&p.type!=="open"){$.push(append($.pop(),p.value));continue}if(p.nodes){walk(p,t)}}return $};return y.flatten(walk(t))};t.exports=expand},168:(t,u,p)=>{"use strict";const m=p(3062);const{MAX_LENGTH:g,CHAR_BACKSLASH:y,CHAR_BACKTICK:v,CHAR_COMMA:b,CHAR_DOT:w,CHAR_LEFT_PARENTHESES:E,CHAR_RIGHT_PARENTHESES:$,CHAR_LEFT_CURLY_BRACE:O,CHAR_RIGHT_CURLY_BRACE:R,CHAR_LEFT_SQUARE_BRACKET:P,CHAR_RIGHT_SQUARE_BRACKET:A,CHAR_DOUBLE_QUOTE:x,CHAR_SINGLE_QUOTE:T,CHAR_NO_BREAK_SPACE:C,CHAR_ZERO_WIDTH_NOBREAK_SPACE:k}=p(9397);const parse=(t,u={})=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}const p=u||{};const I=typeof p.maxLength==="number"?Math.min(g,p.maxLength):g;if(t.length>I){throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${I})`)}const N={type:"root",input:t,nodes:[]};const D=[N];let L=N;let M=N;let j=0;const U=t.length;let B=0;let H=0;let V;const advance=()=>t[B++];const push=t=>{if(t.type==="text"&&M.type==="dot"){M.type="text"}if(M&&M.type==="text"&&t.type==="text"){M.value+=t.value;return}L.nodes.push(t);t.parent=L;t.prev=M;M=t;return t};push({type:"bos"});while(B<U){L=D[D.length-1];V=advance();if(V===k||V===C){continue}if(V===y){push({type:"text",value:(u.keepEscaping?V:"")+advance()});continue}if(V===A){push({type:"text",value:"\\"+V});continue}if(V===P){j++;let t;while(B<U&&(t=advance())){V+=t;if(t===P){j++;continue}if(t===y){V+=advance();continue}if(t===A){j--;if(j===0){break}}}push({type:"text",value:V});continue}if(V===E){L=push({type:"paren",nodes:[]});D.push(L);push({type:"text",value:V});continue}if(V===$){if(L.type!=="paren"){push({type:"text",value:V});continue}L=D.pop();push({type:"text",value:V});L=D[D.length-1];continue}if(V===x||V===T||V===v){const t=V;let p;if(u.keepQuotes!==true){V=""}while(B<U&&(p=advance())){if(p===y){V+=p+advance();continue}if(p===t){if(u.keepQuotes===true)V+=p;break}V+=p}push({type:"text",value:V});continue}if(V===O){H++;const t=M.value&&M.value.slice(-1)==="$"||L.dollar===true;const u={type:"brace",open:true,close:false,dollar:t,depth:H,commas:0,ranges:0,nodes:[]};L=push(u);D.push(L);push({type:"open",value:V});continue}if(V===R){if(L.type!=="brace"){push({type:"text",value:V});continue}const t="close";L=D.pop();L.close=true;push({type:t,value:V});H--;L=D[D.length-1];continue}if(V===b&&H>0){if(L.ranges>0){L.ranges=0;const t=L.nodes.shift();L.nodes=[t,{type:"text",value:m(L)}]}push({type:"comma",value:V});L.commas++;continue}if(V===w&&H>0&&L.commas===0){const t=L.nodes;if(H===0||t.length===0){push({type:"text",value:V});continue}if(M.type==="dot"){L.range=[];M.value+=V;M.type="range";if(L.nodes.length!==3&&L.nodes.length!==5){L.invalid=true;L.ranges=0;M.type="text";continue}L.ranges++;L.args=[];continue}if(M.type==="range"){t.pop();const u=t[t.length-1];u.value+=M.value+V;M=u;L.ranges--;continue}push({type:"dot",value:V});continue}push({type:"text",value:V})}do{L=D.pop();if(L.type!=="root"){L.nodes.forEach((t=>{if(!t.nodes){if(t.type==="open")t.isOpen=true;if(t.type==="close")t.isClose=true;if(!t.nodes)t.type="text";t.invalid=true}}));const t=D[D.length-1];const u=t.nodes.indexOf(L);t.nodes.splice(u,1,...L.nodes)}}while(D.length>0);push({type:"eos"});return N};t.exports=parse},3062:(t,u,p)=>{"use strict";const m=p(2474);t.exports=(t,u={})=>{const stringify=(t,p={})=>{const g=u.escapeInvalid&&m.isInvalidBrace(p);const y=t.invalid===true&&u.escapeInvalid===true;let v="";if(t.value){if((g||y)&&m.isOpenOrClose(t)){return"\\"+t.value}return t.value}if(t.value){return t.value}if(t.nodes){for(const u of t.nodes){v+=stringify(u)}}return v};return stringify(t)}},2474:(t,u)=>{"use strict";u.isInteger=t=>{if(typeof t==="number"){return Number.isInteger(t)}if(typeof t==="string"&&t.trim()!==""){return Number.isInteger(Number(t))}return false};u.find=(t,u)=>t.nodes.find((t=>t.type===u));u.exceedsLimit=(t,p,m=1,g)=>{if(g===false)return false;if(!u.isInteger(t)||!u.isInteger(p))return false;return(Number(p)-Number(t))/Number(m)>=g};u.escapeNode=(t,u=0,p)=>{const m=t.nodes[u];if(!m)return;if(p&&m.type===p||m.type==="open"||m.type==="close"){if(m.escaped!==true){m.value="\\"+m.value;m.escaped=true}}};u.encloseBrace=t=>{if(t.type!=="brace")return false;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}return false};u.isInvalidBrace=t=>{if(t.type!=="brace")return false;if(t.invalid===true||t.dollar)return true;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}if(t.open!==true||t.close!==true){t.invalid=true;return true}return false};u.isOpenOrClose=t=>{if(t.type==="open"||t.type==="close"){return true}return t.open===true||t.close===true};u.reduce=t=>t.reduce(((t,u)=>{if(u.type==="text")t.push(u.value);if(u.type==="range")u.type="text";return t}),[]);u.flatten=(...t)=>{const u=[];const flat=t=>{for(let p=0;p<t.length;p++){const m=t[p];if(Array.isArray(m)){flat(m);continue}if(m!==undefined){u.push(m)}}return u};flat(t);return u}},670:(t,u,p)=>{"use strict";const m=p(5317);const g=p(8401);const y=p(7758);function spawn(t,u,p){const v=g(t,u,p);const b=m.spawn(v.command,v.args,v.options);y.hookChildProcess(b,v);return b}function spawnSync(t,u,p){const v=g(t,u,p);const b=m.spawnSync(v.command,v.args,v.options);b.error=b.error||y.verifyENOENTSync(b.status,v);return b}t.exports=spawn;t.exports.spawn=spawn;t.exports.sync=spawnSync;t.exports._parse=g;t.exports._enoent=y},7758:t=>{"use strict";const u=process.platform==="win32";function notFoundError(t,u){return Object.assign(new Error(`${u} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${u} ${t.command}`,path:t.command,spawnargs:t.args})}function hookChildProcess(t,p){if(!u){return}const m=t.emit;t.emit=function(u,g){if(u==="exit"){const u=verifyENOENT(g,p);if(u){return m.call(t,"error",u)}}return m.apply(t,arguments)}}function verifyENOENT(t,p){if(u&&t===1&&!p.file){return notFoundError(p.original,"spawn")}return null}function verifyENOENTSync(t,p){if(u&&t===1&&!p.file){return notFoundError(p.original,"spawnSync")}return null}t.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},8401:(t,u,p)=>{"use strict";const m=p(6928);const g=p(7430);const y=p(6808);const v=p(9531);const b=process.platform==="win32";const w=/\.(?:com|exe)$/i;const E=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(t){t.file=g(t);const u=t.file&&v(t.file);if(u){t.args.unshift(t.file);t.command=u;return g(t)}return t.file}function parseNonShell(t){if(!b){return t}const u=detectShebang(t);const p=!w.test(u);if(t.options.forceShell||p){const p=E.test(u);t.command=m.normalize(t.command);t.command=y.command(t.command);t.args=t.args.map((t=>y.argument(t,p)));const g=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${g}"`];t.command=process.env.comspec||"cmd.exe";t.options.windowsVerbatimArguments=true}return t}function parse(t,u,p){if(u&&!Array.isArray(u)){p=u;u=null}u=u?u.slice(0):[];p=Object.assign({},p);const m={command:t,args:u,options:p,file:undefined,original:{command:t,args:u}};return p.shell?m:parseNonShell(m)}t.exports=parse},6808:t=>{"use strict";const u=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(t){t=t.replace(u,"^$1");return t}function escapeArgument(t,p){t=`${t}`;t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"');t=t.replace(/(?=(\\+?)?)\1$/,"$1$1");t=`"${t}"`;t=t.replace(u,"^$1");if(p){t=t.replace(u,"^$1")}return t}t.exports.command=escapeCommand;t.exports.argument=escapeArgument},9531:(t,u,p)=>{"use strict";const m=p(7515);const g=p(4881);function readShebang(t){const u=150;const p=Buffer.alloc(u);let y;try{y=m.openSync(t,"r");m.readSync(y,p,0,u,0);m.closeSync(y)}catch(t){}return g(p.toString())}t.exports=readShebang},7430:(t,u,p)=>{"use strict";const m=p(6928);const g=p(1192);const y=p(4662);function resolveCommandAttempt(t,u){const p=t.options.env||process.env;const v=process.cwd();const b=t.options.cwd!=null;const w=b&&process.chdir!==undefined&&!process.chdir.disabled;if(w){try{process.chdir(t.options.cwd)}catch(t){}}let E;try{E=g.sync(t.command,{path:p[y({env:p})],pathExt:u?m.delimiter:undefined})}catch(t){}finally{if(w){process.chdir(v)}}if(E){E=m.resolve(b?t.options.cwd:"",E)}return E}function resolveCommand(t){return resolveCommandAttempt(t)||resolveCommandAttempt(t,true)}t.exports=resolveCommand},7442:t=>{"use strict";
9
9
  /*!
10
10
  * @description Recursive object extending
11
11
  * @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
@@ -31,42 +31,42 @@
31
31
  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
32
32
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
33
33
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34
- */function isSpecificValue(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp?true:false}function cloneSpecificValue(t){if(t instanceof Buffer){var r=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);t.copy(r);return r}else if(t instanceof Date){return new Date(t.getTime())}else if(t instanceof RegExp){return new RegExp(t)}else{throw new Error("Unexpected situation")}}function deepCloneArray(t){var i=[];t.forEach((function(t,o){if(typeof t==="object"&&t!==null){if(Array.isArray(t)){i[o]=deepCloneArray(t)}else if(isSpecificValue(t)){i[o]=cloneSpecificValue(t)}else{i[o]=r({},t)}}else{i[o]=t}}));return i}function safeGetProperty(t,r){return r==="__proto__"?undefined:t[r]}var r=t.exports=function(){if(arguments.length<1||typeof arguments[0]!=="object"){return false}if(arguments.length<2){return arguments[0]}var t=arguments[0];var i=Array.prototype.slice.call(arguments,1);var o,a,c;i.forEach((function(i){if(typeof i!=="object"||i===null||Array.isArray(i)){return}Object.keys(i).forEach((function(c){a=safeGetProperty(t,c);o=safeGetProperty(i,c);if(o===t){return}else if(typeof o!=="object"||o===null){t[c]=o;return}else if(Array.isArray(o)){t[c]=deepCloneArray(o);return}else if(isSpecificValue(o)){t[c]=cloneSpecificValue(o);return}else if(typeof a!=="object"||a===null||Array.isArray(a)){t[c]=r({},o);return}else{t[c]=r(a,o);return}}))}));return t}},3222:t=>{"use strict";t.exports=function equal(t,r){if(t===r)return true;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return false;var i,o,a;if(Array.isArray(t)){i=t.length;if(i!=r.length)return false;for(o=i;o--!==0;)if(!equal(t[o],r[o]))return false;return true}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();a=Object.keys(t);i=a.length;if(i!==Object.keys(r).length)return false;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[o]))return false;for(o=i;o--!==0;){var c=a[o];if(!equal(t[c],r[c]))return false}return true}return t!==t&&r!==r}},2457:(t,r,i)=>{"use strict";const o=i(6160);const a=i(3616);const c=i(2410);const l=i(3473);const u=i(948);const h=i(123);async function FastGlob(t,r){assertPatternsInput(t);const i=getWorks(t,a.default,r);const o=await Promise.all(i);return h.array.flatten(o)}(function(t){t.glob=t;t.globSync=sync;t.globStream=stream;t.async=t;function sync(t,r){assertPatternsInput(t);const i=getWorks(t,l.default,r);return h.array.flatten(i)}t.sync=sync;function stream(t,r){assertPatternsInput(t);const i=getWorks(t,c.default,r);return h.stream.merge(i)}t.stream=stream;function generateTasks(t,r){assertPatternsInput(t);const i=[].concat(t);const a=new u.default(r);return o.generate(i,a)}t.generateTasks=generateTasks;function isDynamicPattern(t,r){assertPatternsInput(t);const i=new u.default(r);return h.pattern.isDynamicPattern(t,i)}t.isDynamicPattern=isDynamicPattern;function escapePath(t){assertPatternsInput(t);return h.path.escape(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return h.path.convertPathToPattern(t)}t.convertPathToPattern=convertPathToPattern;let r;(function(t){function escapePath(t){assertPatternsInput(t);return h.path.escapePosixPath(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return h.path.convertPosixPathToPattern(t)}t.convertPathToPattern=convertPathToPattern})(r=t.posix||(t.posix={}));let i;(function(t){function escapePath(t){assertPatternsInput(t);return h.path.escapeWindowsPath(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return h.path.convertWindowsPathToPattern(t)}t.convertPathToPattern=convertPathToPattern})(i=t.win32||(t.win32={}))})(FastGlob||(FastGlob={}));function getWorks(t,r,i){const a=[].concat(t);const c=new u.default(i);const l=o.generate(a,c);const h=new r(c);return l.map(h.read,h)}function assertPatternsInput(t){const r=[].concat(t);const i=r.every((t=>h.string.isString(t)&&!h.string.isEmpty(t)));if(!i){throw new TypeError("Patterns must be a string (non empty) or an array of strings")}}t.exports=FastGlob},6160:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.convertPatternGroupToTask=r.convertPatternGroupsToTasks=r.groupPatternsByBaseDirectory=r.getNegativePatternsAsPositive=r.getPositivePatterns=r.convertPatternsToTasks=r.generate=void 0;const o=i(123);function generate(t,r){const i=processPatterns(t,r);const a=processPatterns(r.ignore,r);const c=getPositivePatterns(i);const l=getNegativePatternsAsPositive(i,a);const u=c.filter((t=>o.pattern.isStaticPattern(t,r)));const h=c.filter((t=>o.pattern.isDynamicPattern(t,r)));const d=convertPatternsToTasks(u,l,false);const p=convertPatternsToTasks(h,l,true);return d.concat(p)}r.generate=generate;function processPatterns(t,r){let i=t;if(r.braceExpansion){i=o.pattern.expandPatternsWithBraceExpansion(i)}if(r.baseNameMatch){i=i.map((t=>t.includes("/")?t:`**/${t}`))}return i.map((t=>o.pattern.removeDuplicateSlashes(t)))}function convertPatternsToTasks(t,r,i){const a=[];const c=o.pattern.getPatternsOutsideCurrentDirectory(t);const l=o.pattern.getPatternsInsideCurrentDirectory(t);const u=groupPatternsByBaseDirectory(c);const h=groupPatternsByBaseDirectory(l);a.push(...convertPatternGroupsToTasks(u,r,i));if("."in h){a.push(convertPatternGroupToTask(".",l,r,i))}else{a.push(...convertPatternGroupsToTasks(h,r,i))}return a}r.convertPatternsToTasks=convertPatternsToTasks;function getPositivePatterns(t){return o.pattern.getPositivePatterns(t)}r.getPositivePatterns=getPositivePatterns;function getNegativePatternsAsPositive(t,r){const i=o.pattern.getNegativePatterns(t).concat(r);const a=i.map(o.pattern.convertToPositivePattern);return a}r.getNegativePatternsAsPositive=getNegativePatternsAsPositive;function groupPatternsByBaseDirectory(t){const r={};return t.reduce(((t,r)=>{const i=o.pattern.getBaseDirectory(r);if(i in t){t[i].push(r)}else{t[i]=[r]}return t}),r)}r.groupPatternsByBaseDirectory=groupPatternsByBaseDirectory;function convertPatternGroupsToTasks(t,r,i){return Object.keys(t).map((o=>convertPatternGroupToTask(o,t[o],r,i)))}r.convertPatternGroupsToTasks=convertPatternGroupsToTasks;function convertPatternGroupToTask(t,r,i,a){return{dynamic:a,positive:r,negative:i,base:t,patterns:[].concat(r,i.map(o.pattern.convertToNegativePattern))}}r.convertPatternGroupToTask=convertPatternGroupToTask},3616:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(6866);const a=i(3815);class ProviderAsync extends a.default{constructor(){super(...arguments);this._reader=new o.default(this._settings)}async read(t){const r=this._getRootDirectory(t);const i=this._getReaderOptions(t);const o=await this.api(r,t,i);return o.map((t=>i.transform(t)))}api(t,r,i){if(r.dynamic){return this._reader.dynamic(t,i)}return this._reader.static(r.patterns,i)}}r["default"]=ProviderAsync},4084:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(123);const a=i(3147);class DeepFilter{constructor(t,r){this._settings=t;this._micromatchOptions=r}getFilter(t,r,i){const o=this._getMatcher(r);const a=this._getNegativePatternsRe(i);return r=>this._filter(t,r,o,a)}_getMatcher(t){return new a.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(o.pattern.isAffectDepthOfReadingPattern);return o.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,i,a){if(this._isSkippedByDeep(t,r.path)){return false}if(this._isSkippedSymbolicLink(r)){return false}const c=o.path.removeLeadingDotSegment(r.path);if(this._isSkippedByPositivePatterns(c,i)){return false}return this._isSkippedByNegativePatterns(c,a)}_isSkippedByDeep(t,r){if(this._settings.deep===Infinity){return false}return this._getEntryLevel(t,r)>=this._settings.deep}_getEntryLevel(t,r){const i=r.split("/").length;if(t===""){return i}const o=t.split("/").length;return i-o}_isSkippedSymbolicLink(t){return!this._settings.followSymbolicLinks&&t.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(t,r){return!this._settings.baseNameMatch&&!r.match(t)}_isSkippedByNegativePatterns(t,r){return!o.pattern.matchAny(t,r)}}r["default"]=DeepFilter},2552:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(123);class EntryFilter{constructor(t,r){this._settings=t;this._micromatchOptions=r;this.index=new Map}getFilter(t,r){const[i,a]=o.pattern.partitionAbsoluteAndRelative(r);const c={positive:{all:o.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:o.pattern.convertPatternsToRe(i,Object.assign(Object.assign({},this._micromatchOptions),{dot:true})),relative:o.pattern.convertPatternsToRe(a,Object.assign(Object.assign({},this._micromatchOptions),{dot:true}))}};return t=>this._filter(t,c)}_filter(t,r){const i=o.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(i)){return false}if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t)){return false}const a=this._isMatchToPatternsSet(i,r,t.dirent.isDirectory());if(this._settings.unique&&a){this._createIndexRecord(i)}return a}_isDuplicateEntry(t){return this.index.has(t)}_createIndexRecord(t){this.index.set(t,undefined)}_onlyFileFilter(t){return this._settings.onlyFiles&&!t.dirent.isFile()}_onlyDirectoryFilter(t){return this._settings.onlyDirectories&&!t.dirent.isDirectory()}_isMatchToPatternsSet(t,r,i){const o=this._isMatchToPatterns(t,r.positive.all,i);if(!o){return false}const a=this._isMatchToPatterns(t,r.negative.relative,i);if(a){return false}const c=this._isMatchToAbsoluteNegative(t,r.negative.absolute,i);if(c){return false}return true}_isMatchToAbsoluteNegative(t,r,i){if(r.length===0){return false}const a=o.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(a,r,i)}_isMatchToPatterns(t,r,i){if(r.length===0){return false}const a=o.pattern.matchAny(t,r);if(!a&&i){return o.pattern.matchAny(t+"/",r)}return a}}r["default"]=EntryFilter},5042:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(123);class ErrorFilter{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return o.errno.isEnoentCodeError(t)||this._settings.suppressErrors}}r["default"]=ErrorFilter},5828:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(123);class Matcher{constructor(t,r,i){this._patterns=t;this._settings=r;this._micromatchOptions=i;this._storage=[];this._fillStorage()}_fillStorage(){for(const t of this._patterns){const r=this._getPatternSegments(t);const i=this._splitSegmentsIntoSections(r);this._storage.push({complete:i.length<=1,pattern:t,segments:r,sections:i})}}_getPatternSegments(t){const r=o.pattern.getPatternParts(t,this._micromatchOptions);return r.map((t=>{const r=o.pattern.isDynamicPattern(t,this._settings);if(!r){return{dynamic:false,pattern:t}}return{dynamic:true,pattern:t,patternRe:o.pattern.makeRe(t,this._micromatchOptions)}}))}_splitSegmentsIntoSections(t){return o.array.splitWhen(t,(t=>t.dynamic&&o.pattern.hasGlobStar(t.pattern)))}}r["default"]=Matcher},3147:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(5828);class PartialMatcher extends o.default{match(t){const r=t.split("/");const i=r.length;const o=this._storage.filter((t=>!t.complete||t.segments.length>i));for(const t of o){const o=t.sections[0];if(!t.complete&&i>o.length){return true}const a=r.every(((r,i)=>{const o=t.segments[i];if(o.dynamic&&o.patternRe.test(r)){return true}if(!o.dynamic&&o.pattern===r){return true}return false}));if(a){return true}}return false}}r["default"]=PartialMatcher},3815:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(6928);const a=i(4084);const c=i(2552);const l=i(5042);const u=i(825);class Provider{constructor(t){this._settings=t;this.errorFilter=new l.default(this._settings);this.entryFilter=new c.default(this._settings,this._getMicromatchOptions());this.deepFilter=new a.default(this._settings,this._getMicromatchOptions());this.entryTransformer=new u.default(this._settings)}_getRootDirectory(t){return o.resolve(this._settings.cwd,t.base)}_getReaderOptions(t){const r=t.base==="."?"":t.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,t.positive,t.negative),entryFilter:this.entryFilter.getFilter(t.positive,t.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:true,strictSlashes:false}}}r["default"]=Provider},2410:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(2203);const a=i(1980);const c=i(3815);class ProviderStream extends c.default{constructor(){super(...arguments);this._reader=new a.default(this._settings)}read(t){const r=this._getRootDirectory(t);const i=this._getReaderOptions(t);const a=this.api(r,t,i);const c=new o.Readable({objectMode:true,read:()=>{}});a.once("error",(t=>c.emit("error",t))).on("data",(t=>c.emit("data",i.transform(t)))).once("end",(()=>c.emit("end")));c.once("close",(()=>a.destroy()));return c}api(t,r,i){if(r.dynamic){return this._reader.dynamic(t,i)}return this._reader.static(r.patterns,i)}}r["default"]=ProviderStream},3473:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(967);const a=i(3815);class ProviderSync extends a.default{constructor(){super(...arguments);this._reader=new o.default(this._settings)}read(t){const r=this._getRootDirectory(t);const i=this._getReaderOptions(t);const o=this.api(r,t,i);return o.map(i.transform)}api(t,r,i){if(r.dynamic){return this._reader.dynamic(t,i)}return this._reader.static(r.patterns,i)}}r["default"]=ProviderSync},825:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(123);class EntryTransformer{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let r=t.path;if(this._settings.absolute){r=o.path.makeAbsolute(this._settings.cwd,r);r=o.path.unixify(r)}if(this._settings.markDirectories&&t.dirent.isDirectory()){r+="/"}if(!this._settings.objectMode){return r}return Object.assign(Object.assign({},t),{path:r})}}r["default"]=EntryTransformer},6866:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(2705);const a=i(6703);const c=i(1980);class ReaderAsync extends a.default{constructor(){super(...arguments);this._walkAsync=o.walk;this._readerStream=new c.default(this._settings)}dynamic(t,r){return new Promise(((i,o)=>{this._walkAsync(t,r,((t,r)=>{if(t===null){i(r)}else{o(t)}}))}))}async static(t,r){const i=[];const o=this._readerStream.static(t,r);return new Promise(((t,r)=>{o.once("error",r);o.on("data",(t=>i.push(t)));o.once("end",(()=>t(i)))}))}}r["default"]=ReaderAsync},6703:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(6928);const a=i(1309);const c=i(123);class Reader{constructor(t){this._settings=t;this._fsStatSettings=new a.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return o.resolve(this._settings.cwd,t)}_makeEntry(t,r){const i={name:r,path:r,dirent:c.fs.createDirentFromStats(r,t)};if(this._settings.stats){i.stats=t}return i}_isFatalError(t){return!c.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}}r["default"]=Reader},1980:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(2203);const a=i(1309);const c=i(2705);const l=i(6703);class ReaderStream extends l.default{constructor(){super(...arguments);this._walkStream=c.walkStream;this._stat=a.stat}dynamic(t,r){return this._walkStream(t,r)}static(t,r){const i=t.map(this._getFullEntryPath,this);const a=new o.PassThrough({objectMode:true});a._write=(o,c,l)=>this._getEntry(i[o],t[o],r).then((t=>{if(t!==null&&r.entryFilter(t)){a.push(t)}if(o===i.length-1){a.end()}l()})).catch(l);for(let t=0;t<i.length;t++){a.write(t)}return a}_getEntry(t,r,i){return this._getStat(t).then((t=>this._makeEntry(t,r))).catch((t=>{if(i.errorFilter(t)){return null}throw t}))}_getStat(t){return new Promise(((r,i)=>{this._stat(t,this._fsStatSettings,((t,o)=>t===null?r(o):i(t)))}))}}r["default"]=ReaderStream},967:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(1309);const a=i(2705);const c=i(6703);class ReaderSync extends c.default{constructor(){super(...arguments);this._walkSync=a.walkSync;this._statSync=o.statSync}dynamic(t,r){return this._walkSync(t,r)}static(t,r){const i=[];for(const o of t){const t=this._getFullEntryPath(o);const a=this._getEntry(t,o,r);if(a===null||!r.entryFilter(a)){continue}i.push(a)}return i}_getEntry(t,r,i){try{const i=this._getStat(t);return this._makeEntry(i,r)}catch(t){if(i.errorFilter(t)){return null}throw t}}_getStat(t){return this._statSync(t,this._fsStatSettings)}}r["default"]=ReaderSync},948:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const o=i(7515);const a=i(857);const c=Math.max(a.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:o.lstat,lstatSync:o.lstatSync,stat:o.stat,statSync:o.statSync,readdir:o.readdir,readdirSync:o.readdirSync};class Settings{constructor(t={}){this._options=t;this.absolute=this._getValue(this._options.absolute,false);this.baseNameMatch=this._getValue(this._options.baseNameMatch,false);this.braceExpansion=this._getValue(this._options.braceExpansion,true);this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,true);this.concurrency=this._getValue(this._options.concurrency,c);this.cwd=this._getValue(this._options.cwd,process.cwd());this.deep=this._getValue(this._options.deep,Infinity);this.dot=this._getValue(this._options.dot,false);this.extglob=this._getValue(this._options.extglob,true);this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,true);this.fs=this._getFileSystemMethods(this._options.fs);this.globstar=this._getValue(this._options.globstar,true);this.ignore=this._getValue(this._options.ignore,[]);this.markDirectories=this._getValue(this._options.markDirectories,false);this.objectMode=this._getValue(this._options.objectMode,false);this.onlyDirectories=this._getValue(this._options.onlyDirectories,false);this.onlyFiles=this._getValue(this._options.onlyFiles,true);this.stats=this._getValue(this._options.stats,false);this.suppressErrors=this._getValue(this._options.suppressErrors,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,false);this.unique=this._getValue(this._options.unique,true);if(this.onlyDirectories){this.onlyFiles=false}if(this.stats){this.objectMode=true}this.ignore=[].concat(this.ignore)}_getValue(t,r){return t===undefined?r:t}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),t)}}r["default"]=Settings},3614:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.splitWhen=r.flatten=void 0;function flatten(t){return t.reduce(((t,r)=>[].concat(t,r)),[])}r.flatten=flatten;function splitWhen(t,r){const i=[[]];let o=0;for(const a of t){if(r(a)){o++;i[o]=[]}else{i[o].push(a)}}return i}r.splitWhen=splitWhen},163:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.isEnoentCodeError=void 0;function isEnoentCodeError(t){return t.code==="ENOENT"}r.isEnoentCodeError=isEnoentCodeError},9416:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.createDirentFromStats=void 0;class DirentFromStats{constructor(t,r){this.name=t;this.isBlockDevice=r.isBlockDevice.bind(r);this.isCharacterDevice=r.isCharacterDevice.bind(r);this.isDirectory=r.isDirectory.bind(r);this.isFIFO=r.isFIFO.bind(r);this.isFile=r.isFile.bind(r);this.isSocket=r.isSocket.bind(r);this.isSymbolicLink=r.isSymbolicLink.bind(r)}}function createDirentFromStats(t,r){return new DirentFromStats(t,r)}r.createDirentFromStats=createDirentFromStats},123:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.string=r.stream=r.pattern=r.path=r.fs=r.errno=r.array=void 0;const o=i(3614);r.array=o;const a=i(163);r.errno=a;const c=i(9416);r.fs=c;const l=i(8692);r.path=l;const u=i(5869);r.pattern=u;const h=i(9103);r.stream=h;const d=i(3682);r.string=d},8692:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.convertPosixPathToPattern=r.convertWindowsPathToPattern=r.convertPathToPattern=r.escapePosixPath=r.escapeWindowsPath=r.escape=r.removeLeadingDotSegment=r.makeAbsolute=r.unixify=void 0;const o=i(857);const a=i(6928);const c=o.platform()==="win32";const l=2;const u=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;const h=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g;const d=/^\\\\([.?])/;const p=/\\(?![!()+@[\]{}])/g;function unixify(t){return t.replace(/\\/g,"/")}r.unixify=unixify;function makeAbsolute(t,r){return a.resolve(t,r)}r.makeAbsolute=makeAbsolute;function removeLeadingDotSegment(t){if(t.charAt(0)==="."){const r=t.charAt(1);if(r==="/"||r==="\\"){return t.slice(l)}}return t}r.removeLeadingDotSegment=removeLeadingDotSegment;r.escape=c?escapeWindowsPath:escapePosixPath;function escapeWindowsPath(t){return t.replace(h,"\\$2")}r.escapeWindowsPath=escapeWindowsPath;function escapePosixPath(t){return t.replace(u,"\\$2")}r.escapePosixPath=escapePosixPath;r.convertPathToPattern=c?convertWindowsPathToPattern:convertPosixPathToPattern;function convertWindowsPathToPattern(t){return escapeWindowsPath(t).replace(d,"//$1").replace(p,"/")}r.convertWindowsPathToPattern=convertWindowsPathToPattern;function convertPosixPathToPattern(t){return escapePosixPath(t)}r.convertPosixPathToPattern=convertPosixPathToPattern},5869:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.isAbsolute=r.partitionAbsoluteAndRelative=r.removeDuplicateSlashes=r.matchAny=r.convertPatternsToRe=r.makeRe=r.getPatternParts=r.expandBraceExpansion=r.expandPatternsWithBraceExpansion=r.isAffectDepthOfReadingPattern=r.endsWithSlashGlobStar=r.hasGlobStar=r.getBaseDirectory=r.isPatternRelatedToParentDirectory=r.getPatternsOutsideCurrentDirectory=r.getPatternsInsideCurrentDirectory=r.getPositivePatterns=r.getNegativePatterns=r.isPositivePattern=r.isNegativePattern=r.convertToNegativePattern=r.convertToPositivePattern=r.isDynamicPattern=r.isStaticPattern=void 0;const o=i(6928);const a=i(2435);const c=i(9555);const l="**";const u="\\";const h=/[*?]|^!/;const d=/\[[^[]*]/;const p=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;const m=/[!*+?@]\([^(]*\)/;const g=/,|\.\./;const y=/(?!^)\/{2,}/g;function isStaticPattern(t,r={}){return!isDynamicPattern(t,r)}r.isStaticPattern=isStaticPattern;function isDynamicPattern(t,r={}){if(t===""){return false}if(r.caseSensitiveMatch===false||t.includes(u)){return true}if(h.test(t)||d.test(t)||p.test(t)){return true}if(r.extglob!==false&&m.test(t)){return true}if(r.braceExpansion!==false&&hasBraceExpansion(t)){return true}return false}r.isDynamicPattern=isDynamicPattern;function hasBraceExpansion(t){const r=t.indexOf("{");if(r===-1){return false}const i=t.indexOf("}",r+1);if(i===-1){return false}const o=t.slice(r,i);return g.test(o)}function convertToPositivePattern(t){return isNegativePattern(t)?t.slice(1):t}r.convertToPositivePattern=convertToPositivePattern;function convertToNegativePattern(t){return"!"+t}r.convertToNegativePattern=convertToNegativePattern;function isNegativePattern(t){return t.startsWith("!")&&t[1]!=="("}r.isNegativePattern=isNegativePattern;function isPositivePattern(t){return!isNegativePattern(t)}r.isPositivePattern=isPositivePattern;function getNegativePatterns(t){return t.filter(isNegativePattern)}r.getNegativePatterns=getNegativePatterns;function getPositivePatterns(t){return t.filter(isPositivePattern)}r.getPositivePatterns=getPositivePatterns;function getPatternsInsideCurrentDirectory(t){return t.filter((t=>!isPatternRelatedToParentDirectory(t)))}r.getPatternsInsideCurrentDirectory=getPatternsInsideCurrentDirectory;function getPatternsOutsideCurrentDirectory(t){return t.filter(isPatternRelatedToParentDirectory)}r.getPatternsOutsideCurrentDirectory=getPatternsOutsideCurrentDirectory;function isPatternRelatedToParentDirectory(t){return t.startsWith("..")||t.startsWith("./..")}r.isPatternRelatedToParentDirectory=isPatternRelatedToParentDirectory;function getBaseDirectory(t){return a(t,{flipBackslashes:false})}r.getBaseDirectory=getBaseDirectory;function hasGlobStar(t){return t.includes(l)}r.hasGlobStar=hasGlobStar;function endsWithSlashGlobStar(t){return t.endsWith("/"+l)}r.endsWithSlashGlobStar=endsWithSlashGlobStar;function isAffectDepthOfReadingPattern(t){const r=o.basename(t);return endsWithSlashGlobStar(t)||isStaticPattern(r)}r.isAffectDepthOfReadingPattern=isAffectDepthOfReadingPattern;function expandPatternsWithBraceExpansion(t){return t.reduce(((t,r)=>t.concat(expandBraceExpansion(r))),[])}r.expandPatternsWithBraceExpansion=expandPatternsWithBraceExpansion;function expandBraceExpansion(t){const r=c.braces(t,{expand:true,nodupes:true,keepEscaping:true});r.sort(((t,r)=>t.length-r.length));return r.filter((t=>t!==""))}r.expandBraceExpansion=expandBraceExpansion;function getPatternParts(t,r){let{parts:i}=c.scan(t,Object.assign(Object.assign({},r),{parts:true}));if(i.length===0){i=[t]}if(i[0].startsWith("/")){i[0]=i[0].slice(1);i.unshift("")}return i}r.getPatternParts=getPatternParts;function makeRe(t,r){return c.makeRe(t,r)}r.makeRe=makeRe;function convertPatternsToRe(t,r){return t.map((t=>makeRe(t,r)))}r.convertPatternsToRe=convertPatternsToRe;function matchAny(t,r){return r.some((r=>r.test(t)))}r.matchAny=matchAny;function removeDuplicateSlashes(t){return t.replace(y,"/")}r.removeDuplicateSlashes=removeDuplicateSlashes;function partitionAbsoluteAndRelative(t){const r=[];const i=[];for(const o of t){if(isAbsolute(o)){r.push(o)}else{i.push(o)}}return[r,i]}r.partitionAbsoluteAndRelative=partitionAbsoluteAndRelative;function isAbsolute(t){return o.isAbsolute(t)}r.isAbsolute=isAbsolute},9103:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.merge=void 0;const o=i(4031);function merge(t){const r=o(t);t.forEach((t=>{t.once("error",(t=>r.emit("error",t)))}));r.once("close",(()=>propagateCloseEventToSources(t)));r.once("end",(()=>propagateCloseEventToSources(t)));return r}r.merge=merge;function propagateCloseEventToSources(t){t.forEach((t=>t.emit("close")))}},3682:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.isEmpty=r.isString=void 0;function isString(t){return typeof t==="string"}r.isString=isString;function isEmpty(t){return t===""}r.isEmpty=isEmpty},4506:(t,r,i)=>{"use strict";var o=i(3728);function fastqueue(t,r,i){if(typeof t==="function"){i=r;r=t;t=null}if(!(i>=1)){throw new Error("fastqueue concurrency must be equal to or greater than 1")}var a=o(Task);var c=null;var l=null;var u=0;var h=null;var d={push:push,drain:noop,saturated:noop,pause:pause,paused:false,get concurrency(){return i},set concurrency(t){if(!(t>=1)){throw new Error("fastqueue concurrency must be equal to or greater than 1")}i=t;if(d.paused)return;for(;c&&u<i;){u++;release()}},running:running,resume:resume,idle:idle,length:length,getQueue:getQueue,unshift:unshift,empty:noop,kill:kill,killAndDrain:killAndDrain,error:error};return d;function running(){return u}function pause(){d.paused=true}function length(){var t=c;var r=0;while(t){t=t.next;r++}return r}function getQueue(){var t=c;var r=[];while(t){r.push(t.value);t=t.next}return r}function resume(){if(!d.paused)return;d.paused=false;if(c===null){u++;release();return}for(;c&&u<i;){u++;release()}}function idle(){return u===0&&d.length()===0}function push(o,p){var m=a.get();m.context=t;m.release=release;m.value=o;m.callback=p||noop;m.errorHandler=h;if(u>=i||d.paused){if(l){l.next=m;l=m}else{c=m;l=m;d.saturated()}}else{u++;r.call(t,m.value,m.worked)}}function unshift(o,p){var m=a.get();m.context=t;m.release=release;m.value=o;m.callback=p||noop;m.errorHandler=h;if(u>=i||d.paused){if(c){m.next=c;c=m}else{c=m;l=m;d.saturated()}}else{u++;r.call(t,m.value,m.worked)}}function release(o){if(o){a.release(o)}var h=c;if(h&&u<=i){if(!d.paused){if(l===c){l=null}c=h.next;h.next=null;r.call(t,h.value,h.worked);if(l===null){d.empty()}}else{u--}}else if(--u===0){d.drain()}}function kill(){c=null;l=null;d.drain=noop}function killAndDrain(){c=null;l=null;d.drain();d.drain=noop}function error(t){h=t}}function noop(){}function Task(){this.value=null;this.callback=noop;this.next=null;this.release=noop;this.context=null;this.errorHandler=null;var t=this;this.worked=function worked(r,i){var o=t.callback;var a=t.errorHandler;var c=t.value;t.value=null;t.callback=noop;if(t.errorHandler){a(r,c)}o.call(t.context,r,i);t.release(t)}}function queueAsPromised(t,r,i){if(typeof t==="function"){i=r;r=t;t=null}function asyncWrapper(t,i){r.call(this,t).then((function(t){i(null,t)}),i)}var o=fastqueue(t,asyncWrapper,i);var a=o.push;var c=o.unshift;o.push=push;o.unshift=unshift;o.drained=drained;return o;function push(t){var r=new Promise((function(r,i){a(t,(function(t,o){if(t){i(t);return}r(o)}))}));r.catch(noop);return r}function unshift(t){var r=new Promise((function(r,i){c(t,(function(t,o){if(t){i(t);return}r(o)}))}));r.catch(noop);return r}function drained(){var t=new Promise((function(t){process.nextTick((function(){if(o.idle()){t()}else{var r=o.drain;o.drain=function(){if(typeof r==="function")r();t();o.drain=r}}}))}));return t}}t.exports=fastqueue;t.exports.promise=queueAsPromised},9730:(t,r,i)=>{"use strict";
34
+ */function isSpecificValue(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp?true:false}function cloneSpecificValue(t){if(t instanceof Buffer){var u=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);t.copy(u);return u}else if(t instanceof Date){return new Date(t.getTime())}else if(t instanceof RegExp){return new RegExp(t)}else{throw new Error("Unexpected situation")}}function deepCloneArray(t){var p=[];t.forEach((function(t,m){if(typeof t==="object"&&t!==null){if(Array.isArray(t)){p[m]=deepCloneArray(t)}else if(isSpecificValue(t)){p[m]=cloneSpecificValue(t)}else{p[m]=u({},t)}}else{p[m]=t}}));return p}function safeGetProperty(t,u){return u==="__proto__"?undefined:t[u]}var u=t.exports=function(){if(arguments.length<1||typeof arguments[0]!=="object"){return false}if(arguments.length<2){return arguments[0]}var t=arguments[0];var p=Array.prototype.slice.call(arguments,1);var m,g,y;p.forEach((function(p){if(typeof p!=="object"||p===null||Array.isArray(p)){return}Object.keys(p).forEach((function(y){g=safeGetProperty(t,y);m=safeGetProperty(p,y);if(m===t){return}else if(typeof m!=="object"||m===null){t[y]=m;return}else if(Array.isArray(m)){t[y]=deepCloneArray(m);return}else if(isSpecificValue(m)){t[y]=cloneSpecificValue(m);return}else if(typeof g!=="object"||g===null||Array.isArray(g)){t[y]=u({},m);return}else{t[y]=u(g,m);return}}))}));return t}},3222:t=>{"use strict";t.exports=function equal(t,u){if(t===u)return true;if(t&&u&&typeof t=="object"&&typeof u=="object"){if(t.constructor!==u.constructor)return false;var p,m,g;if(Array.isArray(t)){p=t.length;if(p!=u.length)return false;for(m=p;m--!==0;)if(!equal(t[m],u[m]))return false;return true}if(t.constructor===RegExp)return t.source===u.source&&t.flags===u.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===u.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===u.toString();g=Object.keys(t);p=g.length;if(p!==Object.keys(u).length)return false;for(m=p;m--!==0;)if(!Object.prototype.hasOwnProperty.call(u,g[m]))return false;for(m=p;m--!==0;){var y=g[m];if(!equal(t[y],u[y]))return false}return true}return t!==t&&u!==u}},2457:(t,u,p)=>{"use strict";const m=p(6160);const g=p(3616);const y=p(2410);const v=p(3473);const b=p(948);const w=p(123);async function FastGlob(t,u){assertPatternsInput(t);const p=getWorks(t,g.default,u);const m=await Promise.all(p);return w.array.flatten(m)}(function(t){t.glob=t;t.globSync=sync;t.globStream=stream;t.async=t;function sync(t,u){assertPatternsInput(t);const p=getWorks(t,v.default,u);return w.array.flatten(p)}t.sync=sync;function stream(t,u){assertPatternsInput(t);const p=getWorks(t,y.default,u);return w.stream.merge(p)}t.stream=stream;function generateTasks(t,u){assertPatternsInput(t);const p=[].concat(t);const g=new b.default(u);return m.generate(p,g)}t.generateTasks=generateTasks;function isDynamicPattern(t,u){assertPatternsInput(t);const p=new b.default(u);return w.pattern.isDynamicPattern(t,p)}t.isDynamicPattern=isDynamicPattern;function escapePath(t){assertPatternsInput(t);return w.path.escape(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return w.path.convertPathToPattern(t)}t.convertPathToPattern=convertPathToPattern;let u;(function(t){function escapePath(t){assertPatternsInput(t);return w.path.escapePosixPath(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return w.path.convertPosixPathToPattern(t)}t.convertPathToPattern=convertPathToPattern})(u=t.posix||(t.posix={}));let p;(function(t){function escapePath(t){assertPatternsInput(t);return w.path.escapeWindowsPath(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return w.path.convertWindowsPathToPattern(t)}t.convertPathToPattern=convertPathToPattern})(p=t.win32||(t.win32={}))})(FastGlob||(FastGlob={}));function getWorks(t,u,p){const g=[].concat(t);const y=new b.default(p);const v=m.generate(g,y);const w=new u(y);return v.map(w.read,w)}function assertPatternsInput(t){const u=[].concat(t);const p=u.every((t=>w.string.isString(t)&&!w.string.isEmpty(t)));if(!p){throw new TypeError("Patterns must be a string (non empty) or an array of strings")}}t.exports=FastGlob},6160:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.convertPatternGroupToTask=u.convertPatternGroupsToTasks=u.groupPatternsByBaseDirectory=u.getNegativePatternsAsPositive=u.getPositivePatterns=u.convertPatternsToTasks=u.generate=void 0;const m=p(123);function generate(t,u){const p=processPatterns(t,u);const g=processPatterns(u.ignore,u);const y=getPositivePatterns(p);const v=getNegativePatternsAsPositive(p,g);const b=y.filter((t=>m.pattern.isStaticPattern(t,u)));const w=y.filter((t=>m.pattern.isDynamicPattern(t,u)));const E=convertPatternsToTasks(b,v,false);const $=convertPatternsToTasks(w,v,true);return E.concat($)}u.generate=generate;function processPatterns(t,u){let p=t;if(u.braceExpansion){p=m.pattern.expandPatternsWithBraceExpansion(p)}if(u.baseNameMatch){p=p.map((t=>t.includes("/")?t:`**/${t}`))}return p.map((t=>m.pattern.removeDuplicateSlashes(t)))}function convertPatternsToTasks(t,u,p){const g=[];const y=m.pattern.getPatternsOutsideCurrentDirectory(t);const v=m.pattern.getPatternsInsideCurrentDirectory(t);const b=groupPatternsByBaseDirectory(y);const w=groupPatternsByBaseDirectory(v);g.push(...convertPatternGroupsToTasks(b,u,p));if("."in w){g.push(convertPatternGroupToTask(".",v,u,p))}else{g.push(...convertPatternGroupsToTasks(w,u,p))}return g}u.convertPatternsToTasks=convertPatternsToTasks;function getPositivePatterns(t){return m.pattern.getPositivePatterns(t)}u.getPositivePatterns=getPositivePatterns;function getNegativePatternsAsPositive(t,u){const p=m.pattern.getNegativePatterns(t).concat(u);const g=p.map(m.pattern.convertToPositivePattern);return g}u.getNegativePatternsAsPositive=getNegativePatternsAsPositive;function groupPatternsByBaseDirectory(t){const u={};return t.reduce(((t,u)=>{const p=m.pattern.getBaseDirectory(u);if(p in t){t[p].push(u)}else{t[p]=[u]}return t}),u)}u.groupPatternsByBaseDirectory=groupPatternsByBaseDirectory;function convertPatternGroupsToTasks(t,u,p){return Object.keys(t).map((m=>convertPatternGroupToTask(m,t[m],u,p)))}u.convertPatternGroupsToTasks=convertPatternGroupsToTasks;function convertPatternGroupToTask(t,u,p,g){return{dynamic:g,positive:u,negative:p,base:t,patterns:[].concat(u,p.map(m.pattern.convertToNegativePattern))}}u.convertPatternGroupToTask=convertPatternGroupToTask},3616:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6866);const g=p(3815);class ProviderAsync extends g.default{constructor(){super(...arguments);this._reader=new m.default(this._settings)}async read(t){const u=this._getRootDirectory(t);const p=this._getReaderOptions(t);const m=await this.api(u,t,p);return m.map((t=>p.transform(t)))}api(t,u,p){if(u.dynamic){return this._reader.dynamic(t,p)}return this._reader.static(u.patterns,p)}}u["default"]=ProviderAsync},4084:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(123);const g=p(3147);class DeepFilter{constructor(t,u){this._settings=t;this._micromatchOptions=u}getFilter(t,u,p){const m=this._getMatcher(u);const g=this._getNegativePatternsRe(p);return u=>this._filter(t,u,m,g)}_getMatcher(t){return new g.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const u=t.filter(m.pattern.isAffectDepthOfReadingPattern);return m.pattern.convertPatternsToRe(u,this._micromatchOptions)}_filter(t,u,p,g){if(this._isSkippedByDeep(t,u.path)){return false}if(this._isSkippedSymbolicLink(u)){return false}const y=m.path.removeLeadingDotSegment(u.path);if(this._isSkippedByPositivePatterns(y,p)){return false}return this._isSkippedByNegativePatterns(y,g)}_isSkippedByDeep(t,u){if(this._settings.deep===Infinity){return false}return this._getEntryLevel(t,u)>=this._settings.deep}_getEntryLevel(t,u){const p=u.split("/").length;if(t===""){return p}const m=t.split("/").length;return p-m}_isSkippedSymbolicLink(t){return!this._settings.followSymbolicLinks&&t.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(t,u){return!this._settings.baseNameMatch&&!u.match(t)}_isSkippedByNegativePatterns(t,u){return!m.pattern.matchAny(t,u)}}u["default"]=DeepFilter},2552:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(123);class EntryFilter{constructor(t,u){this._settings=t;this._micromatchOptions=u;this.index=new Map}getFilter(t,u){const[p,g]=m.pattern.partitionAbsoluteAndRelative(u);const y={positive:{all:m.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:m.pattern.convertPatternsToRe(p,Object.assign(Object.assign({},this._micromatchOptions),{dot:true})),relative:m.pattern.convertPatternsToRe(g,Object.assign(Object.assign({},this._micromatchOptions),{dot:true}))}};return t=>this._filter(t,y)}_filter(t,u){const p=m.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(p)){return false}if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t)){return false}const g=this._isMatchToPatternsSet(p,u,t.dirent.isDirectory());if(this._settings.unique&&g){this._createIndexRecord(p)}return g}_isDuplicateEntry(t){return this.index.has(t)}_createIndexRecord(t){this.index.set(t,undefined)}_onlyFileFilter(t){return this._settings.onlyFiles&&!t.dirent.isFile()}_onlyDirectoryFilter(t){return this._settings.onlyDirectories&&!t.dirent.isDirectory()}_isMatchToPatternsSet(t,u,p){const m=this._isMatchToPatterns(t,u.positive.all,p);if(!m){return false}const g=this._isMatchToPatterns(t,u.negative.relative,p);if(g){return false}const y=this._isMatchToAbsoluteNegative(t,u.negative.absolute,p);if(y){return false}return true}_isMatchToAbsoluteNegative(t,u,p){if(u.length===0){return false}const g=m.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(g,u,p)}_isMatchToPatterns(t,u,p){if(u.length===0){return false}const g=m.pattern.matchAny(t,u);if(!g&&p){return m.pattern.matchAny(t+"/",u)}return g}}u["default"]=EntryFilter},5042:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(123);class ErrorFilter{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return m.errno.isEnoentCodeError(t)||this._settings.suppressErrors}}u["default"]=ErrorFilter},5828:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(123);class Matcher{constructor(t,u,p){this._patterns=t;this._settings=u;this._micromatchOptions=p;this._storage=[];this._fillStorage()}_fillStorage(){for(const t of this._patterns){const u=this._getPatternSegments(t);const p=this._splitSegmentsIntoSections(u);this._storage.push({complete:p.length<=1,pattern:t,segments:u,sections:p})}}_getPatternSegments(t){const u=m.pattern.getPatternParts(t,this._micromatchOptions);return u.map((t=>{const u=m.pattern.isDynamicPattern(t,this._settings);if(!u){return{dynamic:false,pattern:t}}return{dynamic:true,pattern:t,patternRe:m.pattern.makeRe(t,this._micromatchOptions)}}))}_splitSegmentsIntoSections(t){return m.array.splitWhen(t,(t=>t.dynamic&&m.pattern.hasGlobStar(t.pattern)))}}u["default"]=Matcher},3147:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(5828);class PartialMatcher extends m.default{match(t){const u=t.split("/");const p=u.length;const m=this._storage.filter((t=>!t.complete||t.segments.length>p));for(const t of m){const m=t.sections[0];if(!t.complete&&p>m.length){return true}const g=u.every(((u,p)=>{const m=t.segments[p];if(m.dynamic&&m.patternRe.test(u)){return true}if(!m.dynamic&&m.pattern===u){return true}return false}));if(g){return true}}return false}}u["default"]=PartialMatcher},3815:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6928);const g=p(4084);const y=p(2552);const v=p(5042);const b=p(825);class Provider{constructor(t){this._settings=t;this.errorFilter=new v.default(this._settings);this.entryFilter=new y.default(this._settings,this._getMicromatchOptions());this.deepFilter=new g.default(this._settings,this._getMicromatchOptions());this.entryTransformer=new b.default(this._settings)}_getRootDirectory(t){return m.resolve(this._settings.cwd,t.base)}_getReaderOptions(t){const u=t.base==="."?"":t.base;return{basePath:u,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(u,t.positive,t.negative),entryFilter:this.entryFilter.getFilter(t.positive,t.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:true,strictSlashes:false}}}u["default"]=Provider},2410:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(2203);const g=p(1980);const y=p(3815);class ProviderStream extends y.default{constructor(){super(...arguments);this._reader=new g.default(this._settings)}read(t){const u=this._getRootDirectory(t);const p=this._getReaderOptions(t);const g=this.api(u,t,p);const y=new m.Readable({objectMode:true,read:()=>{}});g.once("error",(t=>y.emit("error",t))).on("data",(t=>y.emit("data",p.transform(t)))).once("end",(()=>y.emit("end")));y.once("close",(()=>g.destroy()));return y}api(t,u,p){if(u.dynamic){return this._reader.dynamic(t,p)}return this._reader.static(u.patterns,p)}}u["default"]=ProviderStream},3473:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(967);const g=p(3815);class ProviderSync extends g.default{constructor(){super(...arguments);this._reader=new m.default(this._settings)}read(t){const u=this._getRootDirectory(t);const p=this._getReaderOptions(t);const m=this.api(u,t,p);return m.map(p.transform)}api(t,u,p){if(u.dynamic){return this._reader.dynamic(t,p)}return this._reader.static(u.patterns,p)}}u["default"]=ProviderSync},825:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(123);class EntryTransformer{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let u=t.path;if(this._settings.absolute){u=m.path.makeAbsolute(this._settings.cwd,u);u=m.path.unixify(u)}if(this._settings.markDirectories&&t.dirent.isDirectory()){u+="/"}if(!this._settings.objectMode){return u}return Object.assign(Object.assign({},t),{path:u})}}u["default"]=EntryTransformer},6866:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(2705);const g=p(6703);const y=p(1980);class ReaderAsync extends g.default{constructor(){super(...arguments);this._walkAsync=m.walk;this._readerStream=new y.default(this._settings)}dynamic(t,u){return new Promise(((p,m)=>{this._walkAsync(t,u,((t,u)=>{if(t===null){p(u)}else{m(t)}}))}))}async static(t,u){const p=[];const m=this._readerStream.static(t,u);return new Promise(((t,u)=>{m.once("error",u);m.on("data",(t=>p.push(t)));m.once("end",(()=>t(p)))}))}}u["default"]=ReaderAsync},6703:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(6928);const g=p(1309);const y=p(123);class Reader{constructor(t){this._settings=t;this._fsStatSettings=new g.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return m.resolve(this._settings.cwd,t)}_makeEntry(t,u){const p={name:u,path:u,dirent:y.fs.createDirentFromStats(u,t)};if(this._settings.stats){p.stats=t}return p}_isFatalError(t){return!y.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}}u["default"]=Reader},1980:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(2203);const g=p(1309);const y=p(2705);const v=p(6703);class ReaderStream extends v.default{constructor(){super(...arguments);this._walkStream=y.walkStream;this._stat=g.stat}dynamic(t,u){return this._walkStream(t,u)}static(t,u){const p=t.map(this._getFullEntryPath,this);const g=new m.PassThrough({objectMode:true});g._write=(m,y,v)=>this._getEntry(p[m],t[m],u).then((t=>{if(t!==null&&u.entryFilter(t)){g.push(t)}if(m===p.length-1){g.end()}v()})).catch(v);for(let t=0;t<p.length;t++){g.write(t)}return g}_getEntry(t,u,p){return this._getStat(t).then((t=>this._makeEntry(t,u))).catch((t=>{if(p.errorFilter(t)){return null}throw t}))}_getStat(t){return new Promise(((u,p)=>{this._stat(t,this._fsStatSettings,((t,m)=>t===null?u(m):p(t)))}))}}u["default"]=ReaderStream},967:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});const m=p(1309);const g=p(2705);const y=p(6703);class ReaderSync extends y.default{constructor(){super(...arguments);this._walkSync=g.walkSync;this._statSync=m.statSync}dynamic(t,u){return this._walkSync(t,u)}static(t,u){const p=[];for(const m of t){const t=this._getFullEntryPath(m);const g=this._getEntry(t,m,u);if(g===null||!u.entryFilter(g)){continue}p.push(g)}return p}_getEntry(t,u,p){try{const p=this._getStat(t);return this._makeEntry(p,u)}catch(t){if(p.errorFilter(t)){return null}throw t}}_getStat(t){return this._statSync(t,this._fsStatSettings)}}u["default"]=ReaderSync},948:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const m=p(7515);const g=p(857);const y=Math.max(g.cpus().length,1);u.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:m.lstat,lstatSync:m.lstatSync,stat:m.stat,statSync:m.statSync,readdir:m.readdir,readdirSync:m.readdirSync};class Settings{constructor(t={}){this._options=t;this.absolute=this._getValue(this._options.absolute,false);this.baseNameMatch=this._getValue(this._options.baseNameMatch,false);this.braceExpansion=this._getValue(this._options.braceExpansion,true);this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,true);this.concurrency=this._getValue(this._options.concurrency,y);this.cwd=this._getValue(this._options.cwd,process.cwd());this.deep=this._getValue(this._options.deep,Infinity);this.dot=this._getValue(this._options.dot,false);this.extglob=this._getValue(this._options.extglob,true);this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,true);this.fs=this._getFileSystemMethods(this._options.fs);this.globstar=this._getValue(this._options.globstar,true);this.ignore=this._getValue(this._options.ignore,[]);this.markDirectories=this._getValue(this._options.markDirectories,false);this.objectMode=this._getValue(this._options.objectMode,false);this.onlyDirectories=this._getValue(this._options.onlyDirectories,false);this.onlyFiles=this._getValue(this._options.onlyFiles,true);this.stats=this._getValue(this._options.stats,false);this.suppressErrors=this._getValue(this._options.suppressErrors,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,false);this.unique=this._getValue(this._options.unique,true);if(this.onlyDirectories){this.onlyFiles=false}if(this.stats){this.objectMode=true}this.ignore=[].concat(this.ignore)}_getValue(t,u){return t===undefined?u:t}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},u.DEFAULT_FILE_SYSTEM_ADAPTER),t)}}u["default"]=Settings},3614:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.splitWhen=u.flatten=void 0;function flatten(t){return t.reduce(((t,u)=>[].concat(t,u)),[])}u.flatten=flatten;function splitWhen(t,u){const p=[[]];let m=0;for(const g of t){if(u(g)){m++;p[m]=[]}else{p[m].push(g)}}return p}u.splitWhen=splitWhen},163:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.isEnoentCodeError=void 0;function isEnoentCodeError(t){return t.code==="ENOENT"}u.isEnoentCodeError=isEnoentCodeError},9416:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.createDirentFromStats=void 0;class DirentFromStats{constructor(t,u){this.name=t;this.isBlockDevice=u.isBlockDevice.bind(u);this.isCharacterDevice=u.isCharacterDevice.bind(u);this.isDirectory=u.isDirectory.bind(u);this.isFIFO=u.isFIFO.bind(u);this.isFile=u.isFile.bind(u);this.isSocket=u.isSocket.bind(u);this.isSymbolicLink=u.isSymbolicLink.bind(u)}}function createDirentFromStats(t,u){return new DirentFromStats(t,u)}u.createDirentFromStats=createDirentFromStats},123:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.string=u.stream=u.pattern=u.path=u.fs=u.errno=u.array=void 0;const m=p(3614);u.array=m;const g=p(163);u.errno=g;const y=p(9416);u.fs=y;const v=p(8692);u.path=v;const b=p(5869);u.pattern=b;const w=p(9103);u.stream=w;const E=p(3682);u.string=E},8692:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.convertPosixPathToPattern=u.convertWindowsPathToPattern=u.convertPathToPattern=u.escapePosixPath=u.escapeWindowsPath=u.escape=u.removeLeadingDotSegment=u.makeAbsolute=u.unixify=void 0;const m=p(857);const g=p(6928);const y=m.platform()==="win32";const v=2;const b=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;const w=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g;const E=/^\\\\([.?])/;const $=/\\(?![!()+@[\]{}])/g;function unixify(t){return t.replace(/\\/g,"/")}u.unixify=unixify;function makeAbsolute(t,u){return g.resolve(t,u)}u.makeAbsolute=makeAbsolute;function removeLeadingDotSegment(t){if(t.charAt(0)==="."){const u=t.charAt(1);if(u==="/"||u==="\\"){return t.slice(v)}}return t}u.removeLeadingDotSegment=removeLeadingDotSegment;u.escape=y?escapeWindowsPath:escapePosixPath;function escapeWindowsPath(t){return t.replace(w,"\\$2")}u.escapeWindowsPath=escapeWindowsPath;function escapePosixPath(t){return t.replace(b,"\\$2")}u.escapePosixPath=escapePosixPath;u.convertPathToPattern=y?convertWindowsPathToPattern:convertPosixPathToPattern;function convertWindowsPathToPattern(t){return escapeWindowsPath(t).replace(E,"//$1").replace($,"/")}u.convertWindowsPathToPattern=convertWindowsPathToPattern;function convertPosixPathToPattern(t){return escapePosixPath(t)}u.convertPosixPathToPattern=convertPosixPathToPattern},5869:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.isAbsolute=u.partitionAbsoluteAndRelative=u.removeDuplicateSlashes=u.matchAny=u.convertPatternsToRe=u.makeRe=u.getPatternParts=u.expandBraceExpansion=u.expandPatternsWithBraceExpansion=u.isAffectDepthOfReadingPattern=u.endsWithSlashGlobStar=u.hasGlobStar=u.getBaseDirectory=u.isPatternRelatedToParentDirectory=u.getPatternsOutsideCurrentDirectory=u.getPatternsInsideCurrentDirectory=u.getPositivePatterns=u.getNegativePatterns=u.isPositivePattern=u.isNegativePattern=u.convertToNegativePattern=u.convertToPositivePattern=u.isDynamicPattern=u.isStaticPattern=void 0;const m=p(6928);const g=p(2435);const y=p(9555);const v="**";const b="\\";const w=/[*?]|^!/;const E=/\[[^[]*]/;const $=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;const O=/[!*+?@]\([^(]*\)/;const R=/,|\.\./;const P=/(?!^)\/{2,}/g;function isStaticPattern(t,u={}){return!isDynamicPattern(t,u)}u.isStaticPattern=isStaticPattern;function isDynamicPattern(t,u={}){if(t===""){return false}if(u.caseSensitiveMatch===false||t.includes(b)){return true}if(w.test(t)||E.test(t)||$.test(t)){return true}if(u.extglob!==false&&O.test(t)){return true}if(u.braceExpansion!==false&&hasBraceExpansion(t)){return true}return false}u.isDynamicPattern=isDynamicPattern;function hasBraceExpansion(t){const u=t.indexOf("{");if(u===-1){return false}const p=t.indexOf("}",u+1);if(p===-1){return false}const m=t.slice(u,p);return R.test(m)}function convertToPositivePattern(t){return isNegativePattern(t)?t.slice(1):t}u.convertToPositivePattern=convertToPositivePattern;function convertToNegativePattern(t){return"!"+t}u.convertToNegativePattern=convertToNegativePattern;function isNegativePattern(t){return t.startsWith("!")&&t[1]!=="("}u.isNegativePattern=isNegativePattern;function isPositivePattern(t){return!isNegativePattern(t)}u.isPositivePattern=isPositivePattern;function getNegativePatterns(t){return t.filter(isNegativePattern)}u.getNegativePatterns=getNegativePatterns;function getPositivePatterns(t){return t.filter(isPositivePattern)}u.getPositivePatterns=getPositivePatterns;function getPatternsInsideCurrentDirectory(t){return t.filter((t=>!isPatternRelatedToParentDirectory(t)))}u.getPatternsInsideCurrentDirectory=getPatternsInsideCurrentDirectory;function getPatternsOutsideCurrentDirectory(t){return t.filter(isPatternRelatedToParentDirectory)}u.getPatternsOutsideCurrentDirectory=getPatternsOutsideCurrentDirectory;function isPatternRelatedToParentDirectory(t){return t.startsWith("..")||t.startsWith("./..")}u.isPatternRelatedToParentDirectory=isPatternRelatedToParentDirectory;function getBaseDirectory(t){return g(t,{flipBackslashes:false})}u.getBaseDirectory=getBaseDirectory;function hasGlobStar(t){return t.includes(v)}u.hasGlobStar=hasGlobStar;function endsWithSlashGlobStar(t){return t.endsWith("/"+v)}u.endsWithSlashGlobStar=endsWithSlashGlobStar;function isAffectDepthOfReadingPattern(t){const u=m.basename(t);return endsWithSlashGlobStar(t)||isStaticPattern(u)}u.isAffectDepthOfReadingPattern=isAffectDepthOfReadingPattern;function expandPatternsWithBraceExpansion(t){return t.reduce(((t,u)=>t.concat(expandBraceExpansion(u))),[])}u.expandPatternsWithBraceExpansion=expandPatternsWithBraceExpansion;function expandBraceExpansion(t){const u=y.braces(t,{expand:true,nodupes:true,keepEscaping:true});u.sort(((t,u)=>t.length-u.length));return u.filter((t=>t!==""))}u.expandBraceExpansion=expandBraceExpansion;function getPatternParts(t,u){let{parts:p}=y.scan(t,Object.assign(Object.assign({},u),{parts:true}));if(p.length===0){p=[t]}if(p[0].startsWith("/")){p[0]=p[0].slice(1);p.unshift("")}return p}u.getPatternParts=getPatternParts;function makeRe(t,u){return y.makeRe(t,u)}u.makeRe=makeRe;function convertPatternsToRe(t,u){return t.map((t=>makeRe(t,u)))}u.convertPatternsToRe=convertPatternsToRe;function matchAny(t,u){return u.some((u=>u.test(t)))}u.matchAny=matchAny;function removeDuplicateSlashes(t){return t.replace(P,"/")}u.removeDuplicateSlashes=removeDuplicateSlashes;function partitionAbsoluteAndRelative(t){const u=[];const p=[];for(const m of t){if(isAbsolute(m)){u.push(m)}else{p.push(m)}}return[u,p]}u.partitionAbsoluteAndRelative=partitionAbsoluteAndRelative;function isAbsolute(t){return m.isAbsolute(t)}u.isAbsolute=isAbsolute},9103:(t,u,p)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.merge=void 0;const m=p(4031);function merge(t){const u=m(t);t.forEach((t=>{t.once("error",(t=>u.emit("error",t)))}));u.once("close",(()=>propagateCloseEventToSources(t)));u.once("end",(()=>propagateCloseEventToSources(t)));return u}u.merge=merge;function propagateCloseEventToSources(t){t.forEach((t=>t.emit("close")))}},3682:(t,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:true});u.isEmpty=u.isString=void 0;function isString(t){return typeof t==="string"}u.isString=isString;function isEmpty(t){return t===""}u.isEmpty=isEmpty},4506:(t,u,p)=>{"use strict";var m=p(3728);function fastqueue(t,u,p){if(typeof t==="function"){p=u;u=t;t=null}if(!(p>=1)){throw new Error("fastqueue concurrency must be equal to or greater than 1")}var g=m(Task);var y=null;var v=null;var b=0;var w=null;var E={push:push,drain:noop,saturated:noop,pause:pause,paused:false,get concurrency(){return p},set concurrency(t){if(!(t>=1)){throw new Error("fastqueue concurrency must be equal to or greater than 1")}p=t;if(E.paused)return;for(;y&&b<p;){b++;release()}},running:running,resume:resume,idle:idle,length:length,getQueue:getQueue,unshift:unshift,empty:noop,kill:kill,killAndDrain:killAndDrain,error:error};return E;function running(){return b}function pause(){E.paused=true}function length(){var t=y;var u=0;while(t){t=t.next;u++}return u}function getQueue(){var t=y;var u=[];while(t){u.push(t.value);t=t.next}return u}function resume(){if(!E.paused)return;E.paused=false;if(y===null){b++;release();return}for(;y&&b<p;){b++;release()}}function idle(){return b===0&&E.length()===0}function push(m,$){var O=g.get();O.context=t;O.release=release;O.value=m;O.callback=$||noop;O.errorHandler=w;if(b>=p||E.paused){if(v){v.next=O;v=O}else{y=O;v=O;E.saturated()}}else{b++;u.call(t,O.value,O.worked)}}function unshift(m,$){var O=g.get();O.context=t;O.release=release;O.value=m;O.callback=$||noop;O.errorHandler=w;if(b>=p||E.paused){if(y){O.next=y;y=O}else{y=O;v=O;E.saturated()}}else{b++;u.call(t,O.value,O.worked)}}function release(m){if(m){g.release(m)}var w=y;if(w&&b<=p){if(!E.paused){if(v===y){v=null}y=w.next;w.next=null;u.call(t,w.value,w.worked);if(v===null){E.empty()}}else{b--}}else if(--b===0){E.drain()}}function kill(){y=null;v=null;E.drain=noop}function killAndDrain(){y=null;v=null;E.drain();E.drain=noop}function error(t){w=t}}function noop(){}function Task(){this.value=null;this.callback=noop;this.next=null;this.release=noop;this.context=null;this.errorHandler=null;var t=this;this.worked=function worked(u,p){var m=t.callback;var g=t.errorHandler;var y=t.value;t.value=null;t.callback=noop;if(t.errorHandler){g(u,y)}m.call(t.context,u,p);t.release(t)}}function queueAsPromised(t,u,p){if(typeof t==="function"){p=u;u=t;t=null}function asyncWrapper(t,p){u.call(this,t).then((function(t){p(null,t)}),p)}var m=fastqueue(t,asyncWrapper,p);var g=m.push;var y=m.unshift;m.push=push;m.unshift=unshift;m.drained=drained;return m;function push(t){var u=new Promise((function(u,p){g(t,(function(t,m){if(t){p(t);return}u(m)}))}));u.catch(noop);return u}function unshift(t){var u=new Promise((function(u,p){y(t,(function(t,m){if(t){p(t);return}u(m)}))}));u.catch(noop);return u}function drained(){var t=new Promise((function(t){process.nextTick((function(){if(m.idle()){t()}else{var u=m.drain;m.drain=function(){if(typeof u==="function")u();t();m.drain=u}}}))}));return t}}t.exports=fastqueue;t.exports.promise=queueAsPromised},9730:(t,u,p)=>{"use strict";
35
35
  /*!
36
36
  * fill-range <https://github.com/jonschlinkert/fill-range>
37
37
  *
38
38
  * Copyright (c) 2014-present, Jon Schlinkert.
39
39
  * Licensed under the MIT License.
40
- */const o=i(9023);const a=i(743);const isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);const transform=t=>r=>t===true?Number(r):String(r);const isValidValue=t=>typeof t==="number"||typeof t==="string"&&t!=="";const isNumber=t=>Number.isInteger(+t);const zeros=t=>{let r=`${t}`;let i=-1;if(r[0]==="-")r=r.slice(1);if(r==="0")return false;while(r[++i]==="0");return i>0};const stringify=(t,r,i)=>{if(typeof t==="string"||typeof r==="string"){return true}return i.stringify===true};const pad=(t,r,i)=>{if(r>0){let i=t[0]==="-"?"-":"";if(i)t=t.slice(1);t=i+t.padStart(i?r-1:r,"0")}if(i===false){return String(t)}return t};const toMaxLen=(t,r)=>{let i=t[0]==="-"?"-":"";if(i){t=t.slice(1);r--}while(t.length<r)t="0"+t;return i?"-"+t:t};const toSequence=(t,r,i)=>{t.negatives.sort(((t,r)=>t<r?-1:t>r?1:0));t.positives.sort(((t,r)=>t<r?-1:t>r?1:0));let o=r.capture?"":"?:";let a="";let c="";let l;if(t.positives.length){a=t.positives.map((t=>toMaxLen(String(t),i))).join("|")}if(t.negatives.length){c=`-(${o}${t.negatives.map((t=>toMaxLen(String(t),i))).join("|")})`}if(a&&c){l=`${a}|${c}`}else{l=a||c}if(r.wrap){return`(${o}${l})`}return l};const toRange=(t,r,i,o)=>{if(i){return a(t,r,{wrap:false,...o})}let c=String.fromCharCode(t);if(t===r)return c;let l=String.fromCharCode(r);return`[${c}-${l}]`};const toRegex=(t,r,i)=>{if(Array.isArray(t)){let r=i.wrap===true;let o=i.capture?"":"?:";return r?`(${o}${t.join("|")})`:t.join("|")}return a(t,r,i)};const rangeError=(...t)=>new RangeError("Invalid range arguments: "+o.inspect(...t));const invalidRange=(t,r,i)=>{if(i.strictRanges===true)throw rangeError([t,r]);return[]};const invalidStep=(t,r)=>{if(r.strictRanges===true){throw new TypeError(`Expected step "${t}" to be a number`)}return[]};const fillNumbers=(t,r,i=1,o={})=>{let a=Number(t);let c=Number(r);if(!Number.isInteger(a)||!Number.isInteger(c)){if(o.strictRanges===true)throw rangeError([t,r]);return[]}if(a===0)a=0;if(c===0)c=0;let l=a>c;let u=String(t);let h=String(r);let d=String(i);i=Math.max(Math.abs(i),1);let p=zeros(u)||zeros(h)||zeros(d);let m=p?Math.max(u.length,h.length,d.length):0;let g=p===false&&stringify(t,r,o)===false;let y=o.transform||transform(g);if(o.toRegex&&i===1){return toRange(toMaxLen(t,m),toMaxLen(r,m),true,o)}let v={negatives:[],positives:[]};let push=t=>v[t<0?"negatives":"positives"].push(Math.abs(t));let b=[];let w=0;while(l?a>=c:a<=c){if(o.toRegex===true&&i>1){push(a)}else{b.push(pad(y(a,w),m,g))}a=l?a-i:a+i;w++}if(o.toRegex===true){return i>1?toSequence(v,o,m):toRegex(b,null,{wrap:false,...o})}return b};const fillLetters=(t,r,i=1,o={})=>{if(!isNumber(t)&&t.length>1||!isNumber(r)&&r.length>1){return invalidRange(t,r,o)}let a=o.transform||(t=>String.fromCharCode(t));let c=`${t}`.charCodeAt(0);let l=`${r}`.charCodeAt(0);let u=c>l;let h=Math.min(c,l);let d=Math.max(c,l);if(o.toRegex&&i===1){return toRange(h,d,false,o)}let p=[];let m=0;while(u?c>=l:c<=l){p.push(a(c,m));c=u?c-i:c+i;m++}if(o.toRegex===true){return toRegex(p,null,{wrap:false,options:o})}return p};const fill=(t,r,i,o={})=>{if(r==null&&isValidValue(t)){return[t]}if(!isValidValue(t)||!isValidValue(r)){return invalidRange(t,r,o)}if(typeof i==="function"){return fill(t,r,1,{transform:i})}if(isObject(i)){return fill(t,r,0,i)}let a={...o};if(a.capture===true)a.wrap=true;i=i||a.step||1;if(!isNumber(i)){if(i!=null&&!isObject(i))return invalidStep(i,a);return fill(t,r,1,i)}if(isNumber(t)&&isNumber(r)){return fillNumbers(t,r,i,a)}return fillLetters(t,r,Math.max(Math.abs(i),1),a)};t.exports=fill},2435:(t,r,i)=>{"use strict";var o=i(686);var a=i(6928).posix.dirname;var c=i(857).platform()==="win32";var l="/";var u=/\\/g;var h=/[\{\[].*[\}\]]$/;var d=/(^|[^\\])([\{\[]|\([^\)]+$)/;var p=/\\([\!\*\?\|\[\]\(\)\{\}])/g;t.exports=function globParent(t,r){var i=Object.assign({flipBackslashes:true},r);if(i.flipBackslashes&&c&&t.indexOf(l)<0){t=t.replace(u,l)}if(h.test(t)){t+=l}t+="a";do{t=a(t)}while(o(t)||d.test(t));return t.replace(p,"$1")}},5667:(t,r)=>{r.parse=r.decode=decode;r.stringify=r.encode=encode;r.safe=safe;r.unsafe=unsafe;var i=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";function encode(t,r){var o=[];var a="";if(typeof r==="string"){r={section:r,whitespace:false}}else{r=r||{};r.whitespace=r.whitespace===true}var c=r.whitespace?" = ":"=";Object.keys(t).forEach((function(r,l,u){var h=t[r];if(h&&Array.isArray(h)){h.forEach((function(t){a+=safe(r+"[]")+c+safe(t)+"\n"}))}else if(h&&typeof h==="object")o.push(r);else a+=safe(r)+c+safe(h)+i}));if(r.section&&a.length)a="["+safe(r.section)+"]"+i+a;o.forEach((function(o,c,l){var u=dotSplit(o).join("\\.");var h=(r.section?r.section+".":"")+u;var d=encode(t[o],{section:h,whitespace:r.whitespace});if(a.length&&d.length)a+=i;a+=d}));return a}function dotSplit(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map((function(t){return t.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")}))}function decode(t){var r={};var i=r;var o=null;var a=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;var c=t.split(/[\r\n]+/g);c.forEach((function(t,c,l){if(!t||t.match(/^\s*[;#]/))return;var u=t.match(a);if(!u)return;if(u[1]!==undefined){o=unsafe(u[1]);if(o==="__proto__"){i={};return}i=r[o]=r[o]||{};return}var h=unsafe(u[2]);if(h==="__proto__")return;var d=u[3]?unsafe(u[4]):true;switch(d){case"true":case"false":case"null":d=JSON.parse(d)}if(h.length>2&&h.slice(-2)==="[]"){h=h.substring(0,h.length-2);if(h==="__proto__")return;if(!i[h])i[h]=[];else if(!Array.isArray(i[h]))i[h]=[i[h]]}if(Array.isArray(i[h]))i[h].push(d);else i[h]=d}));Object.keys(r).filter((function(t,i,o){if(!r[t]||typeof r[t]!=="object"||Array.isArray(r[t]))return false;var a=dotSplit(t);var c=r;var l=a.pop();var u=l.replace(/\\\./g,".");a.forEach((function(t,r,i){if(t==="__proto__")return;if(!c[t]||typeof c[t]!=="object")c[t]={};c=c[t]}));if(c===r&&u===l)return false;c[u]=r[t];return true})).forEach((function(t,i,o){delete r[t]}));return r}function isQuoted(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function safe(t){return typeof t!=="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&isQuoted(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function unsafe(t,r){t=(t||"").trim();if(isQuoted(t)){if(t.charAt(0)==="'")t=t.substr(1,t.length-2);try{t=JSON.parse(t)}catch(t){}}else{var i=false;var o="";for(var a=0,c=t.length;a<c;a++){var l=t.charAt(a);if(i){if("\\;#".indexOf(l)!==-1)o+=l;else o+="\\"+l;i=false}else if(";#".indexOf(l)!==-1)break;else if(l==="\\")i=true;else o+=l}if(i)o+="\\";return o.trim()}return t}},9825:t=>{
40
+ */const m=p(9023);const g=p(743);const isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);const transform=t=>u=>t===true?Number(u):String(u);const isValidValue=t=>typeof t==="number"||typeof t==="string"&&t!=="";const isNumber=t=>Number.isInteger(+t);const zeros=t=>{let u=`${t}`;let p=-1;if(u[0]==="-")u=u.slice(1);if(u==="0")return false;while(u[++p]==="0");return p>0};const stringify=(t,u,p)=>{if(typeof t==="string"||typeof u==="string"){return true}return p.stringify===true};const pad=(t,u,p)=>{if(u>0){let p=t[0]==="-"?"-":"";if(p)t=t.slice(1);t=p+t.padStart(p?u-1:u,"0")}if(p===false){return String(t)}return t};const toMaxLen=(t,u)=>{let p=t[0]==="-"?"-":"";if(p){t=t.slice(1);u--}while(t.length<u)t="0"+t;return p?"-"+t:t};const toSequence=(t,u,p)=>{t.negatives.sort(((t,u)=>t<u?-1:t>u?1:0));t.positives.sort(((t,u)=>t<u?-1:t>u?1:0));let m=u.capture?"":"?:";let g="";let y="";let v;if(t.positives.length){g=t.positives.map((t=>toMaxLen(String(t),p))).join("|")}if(t.negatives.length){y=`-(${m}${t.negatives.map((t=>toMaxLen(String(t),p))).join("|")})`}if(g&&y){v=`${g}|${y}`}else{v=g||y}if(u.wrap){return`(${m}${v})`}return v};const toRange=(t,u,p,m)=>{if(p){return g(t,u,{wrap:false,...m})}let y=String.fromCharCode(t);if(t===u)return y;let v=String.fromCharCode(u);return`[${y}-${v}]`};const toRegex=(t,u,p)=>{if(Array.isArray(t)){let u=p.wrap===true;let m=p.capture?"":"?:";return u?`(${m}${t.join("|")})`:t.join("|")}return g(t,u,p)};const rangeError=(...t)=>new RangeError("Invalid range arguments: "+m.inspect(...t));const invalidRange=(t,u,p)=>{if(p.strictRanges===true)throw rangeError([t,u]);return[]};const invalidStep=(t,u)=>{if(u.strictRanges===true){throw new TypeError(`Expected step "${t}" to be a number`)}return[]};const fillNumbers=(t,u,p=1,m={})=>{let g=Number(t);let y=Number(u);if(!Number.isInteger(g)||!Number.isInteger(y)){if(m.strictRanges===true)throw rangeError([t,u]);return[]}if(g===0)g=0;if(y===0)y=0;let v=g>y;let b=String(t);let w=String(u);let E=String(p);p=Math.max(Math.abs(p),1);let $=zeros(b)||zeros(w)||zeros(E);let O=$?Math.max(b.length,w.length,E.length):0;let R=$===false&&stringify(t,u,m)===false;let P=m.transform||transform(R);if(m.toRegex&&p===1){return toRange(toMaxLen(t,O),toMaxLen(u,O),true,m)}let A={negatives:[],positives:[]};let push=t=>A[t<0?"negatives":"positives"].push(Math.abs(t));let x=[];let T=0;while(v?g>=y:g<=y){if(m.toRegex===true&&p>1){push(g)}else{x.push(pad(P(g,T),O,R))}g=v?g-p:g+p;T++}if(m.toRegex===true){return p>1?toSequence(A,m,O):toRegex(x,null,{wrap:false,...m})}return x};const fillLetters=(t,u,p=1,m={})=>{if(!isNumber(t)&&t.length>1||!isNumber(u)&&u.length>1){return invalidRange(t,u,m)}let g=m.transform||(t=>String.fromCharCode(t));let y=`${t}`.charCodeAt(0);let v=`${u}`.charCodeAt(0);let b=y>v;let w=Math.min(y,v);let E=Math.max(y,v);if(m.toRegex&&p===1){return toRange(w,E,false,m)}let $=[];let O=0;while(b?y>=v:y<=v){$.push(g(y,O));y=b?y-p:y+p;O++}if(m.toRegex===true){return toRegex($,null,{wrap:false,options:m})}return $};const fill=(t,u,p,m={})=>{if(u==null&&isValidValue(t)){return[t]}if(!isValidValue(t)||!isValidValue(u)){return invalidRange(t,u,m)}if(typeof p==="function"){return fill(t,u,1,{transform:p})}if(isObject(p)){return fill(t,u,0,p)}let g={...m};if(g.capture===true)g.wrap=true;p=p||g.step||1;if(!isNumber(p)){if(p!=null&&!isObject(p))return invalidStep(p,g);return fill(t,u,1,p)}if(isNumber(t)&&isNumber(u)){return fillNumbers(t,u,p,g)}return fillLetters(t,u,Math.max(Math.abs(p),1),g)};t.exports=fill},2435:(t,u,p)=>{"use strict";var m=p(686);var g=p(6928).posix.dirname;var y=p(857).platform()==="win32";var v="/";var b=/\\/g;var w=/[\{\[].*[\}\]]$/;var E=/(^|[^\\])([\{\[]|\([^\)]+$)/;var $=/\\([\!\*\?\|\[\]\(\)\{\}])/g;t.exports=function globParent(t,u){var p=Object.assign({flipBackslashes:true},u);if(p.flipBackslashes&&y&&t.indexOf(v)<0){t=t.replace(b,v)}if(w.test(t)){t+=v}t+="a";do{t=g(t)}while(m(t)||E.test(t));return t.replace($,"$1")}},5667:(t,u)=>{u.parse=u.decode=decode;u.stringify=u.encode=encode;u.safe=safe;u.unsafe=unsafe;var p=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";function encode(t,u){var m=[];var g="";if(typeof u==="string"){u={section:u,whitespace:false}}else{u=u||{};u.whitespace=u.whitespace===true}var y=u.whitespace?" = ":"=";Object.keys(t).forEach((function(u,v,b){var w=t[u];if(w&&Array.isArray(w)){w.forEach((function(t){g+=safe(u+"[]")+y+safe(t)+"\n"}))}else if(w&&typeof w==="object")m.push(u);else g+=safe(u)+y+safe(w)+p}));if(u.section&&g.length)g="["+safe(u.section)+"]"+p+g;m.forEach((function(m,y,v){var b=dotSplit(m).join("\\.");var w=(u.section?u.section+".":"")+b;var E=encode(t[m],{section:w,whitespace:u.whitespace});if(g.length&&E.length)g+=p;g+=E}));return g}function dotSplit(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map((function(t){return t.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")}))}function decode(t){var u={};var p=u;var m=null;var g=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;var y=t.split(/[\r\n]+/g);y.forEach((function(t,y,v){if(!t||t.match(/^\s*[;#]/))return;var b=t.match(g);if(!b)return;if(b[1]!==undefined){m=unsafe(b[1]);if(m==="__proto__"){p={};return}p=u[m]=u[m]||{};return}var w=unsafe(b[2]);if(w==="__proto__")return;var E=b[3]?unsafe(b[4]):true;switch(E){case"true":case"false":case"null":E=JSON.parse(E)}if(w.length>2&&w.slice(-2)==="[]"){w=w.substring(0,w.length-2);if(w==="__proto__")return;if(!p[w])p[w]=[];else if(!Array.isArray(p[w]))p[w]=[p[w]]}if(Array.isArray(p[w]))p[w].push(E);else p[w]=E}));Object.keys(u).filter((function(t,p,m){if(!u[t]||typeof u[t]!=="object"||Array.isArray(u[t]))return false;var g=dotSplit(t);var y=u;var v=g.pop();var b=v.replace(/\\\./g,".");g.forEach((function(t,u,p){if(t==="__proto__")return;if(!y[t]||typeof y[t]!=="object")y[t]={};y=y[t]}));if(y===u&&b===v)return false;y[b]=u[t];return true})).forEach((function(t,p,m){delete u[t]}));return u}function isQuoted(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function safe(t){return typeof t!=="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&isQuoted(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function unsafe(t,u){t=(t||"").trim();if(isQuoted(t)){if(t.charAt(0)==="'")t=t.substr(1,t.length-2);try{t=JSON.parse(t)}catch(t){}}else{var p=false;var m="";for(var g=0,y=t.length;g<y;g++){var v=t.charAt(g);if(p){if("\\;#".indexOf(v)!==-1)m+=v;else m+="\\"+v;p=false}else if(";#".indexOf(v)!==-1)break;else if(v==="\\")p=true;else m+=v}if(p)m+="\\";return m.trim()}return t}},9825:t=>{
41
41
  /*!
42
42
  * is-extglob <https://github.com/jonschlinkert/is-extglob>
43
43
  *
44
44
  * Copyright (c) 2014-2016, Jon Schlinkert.
45
45
  * Licensed under the MIT License.
46
46
  */
47
- t.exports=function isExtglob(t){if(typeof t!=="string"||t===""){return false}var r;while(r=/(\\).|([@?!+*]\(.*\))/g.exec(t)){if(r[2])return true;t=t.slice(r.index+r[0].length)}return false}},686:(t,r,i)=>{
47
+ t.exports=function isExtglob(t){if(typeof t!=="string"||t===""){return false}var u;while(u=/(\\).|([@?!+*]\(.*\))/g.exec(t)){if(u[2])return true;t=t.slice(u.index+u[0].length)}return false}},686:(t,u,p)=>{
48
48
  /*!
49
49
  * is-glob <https://github.com/jonschlinkert/is-glob>
50
50
  *
51
51
  * Copyright (c) 2014-2017, Jon Schlinkert.
52
52
  * Released under the MIT License.
53
53
  */
54
- var o=i(9825);var a={"{":"}","(":")","[":"]"};var strictCheck=function(t){if(t[0]==="!"){return true}var r=0;var i=-2;var o=-2;var c=-2;var l=-2;var u=-2;while(r<t.length){if(t[r]==="*"){return true}if(t[r+1]==="?"&&/[\].+)]/.test(t[r])){return true}if(o!==-1&&t[r]==="["&&t[r+1]!=="]"){if(o<r){o=t.indexOf("]",r)}if(o>r){if(u===-1||u>o){return true}u=t.indexOf("\\",r);if(u===-1||u>o){return true}}}if(c!==-1&&t[r]==="{"&&t[r+1]!=="}"){c=t.indexOf("}",r);if(c>r){u=t.indexOf("\\",r);if(u===-1||u>c){return true}}}if(l!==-1&&t[r]==="("&&t[r+1]==="?"&&/[:!=]/.test(t[r+2])&&t[r+3]!==")"){l=t.indexOf(")",r);if(l>r){u=t.indexOf("\\",r);if(u===-1||u>l){return true}}}if(i!==-1&&t[r]==="("&&t[r+1]!=="|"){if(i<r){i=t.indexOf("|",r)}if(i!==-1&&t[i+1]!==")"){l=t.indexOf(")",i);if(l>i){u=t.indexOf("\\",i);if(u===-1||u>l){return true}}}}if(t[r]==="\\"){var h=t[r+1];r+=2;var d=a[h];if(d){var p=t.indexOf(d,r);if(p!==-1){r=p+1}}if(t[r]==="!"){return true}}else{r++}}return false};var relaxedCheck=function(t){if(t[0]==="!"){return true}var r=0;while(r<t.length){if(/[*?{}()[\]]/.test(t[r])){return true}if(t[r]==="\\"){var i=t[r+1];r+=2;var o=a[i];if(o){var c=t.indexOf(o,r);if(c!==-1){r=c+1}}if(t[r]==="!"){return true}}else{r++}}return false};t.exports=function isGlob(t,r){if(typeof t!=="string"||t===""){return false}if(o(t)){return true}var i=strictCheck;if(r&&r.strict===false){i=relaxedCheck}return i(t)}},952:t=>{"use strict";
54
+ var m=p(9825);var g={"{":"}","(":")","[":"]"};var strictCheck=function(t){if(t[0]==="!"){return true}var u=0;var p=-2;var m=-2;var y=-2;var v=-2;var b=-2;while(u<t.length){if(t[u]==="*"){return true}if(t[u+1]==="?"&&/[\].+)]/.test(t[u])){return true}if(m!==-1&&t[u]==="["&&t[u+1]!=="]"){if(m<u){m=t.indexOf("]",u)}if(m>u){if(b===-1||b>m){return true}b=t.indexOf("\\",u);if(b===-1||b>m){return true}}}if(y!==-1&&t[u]==="{"&&t[u+1]!=="}"){y=t.indexOf("}",u);if(y>u){b=t.indexOf("\\",u);if(b===-1||b>y){return true}}}if(v!==-1&&t[u]==="("&&t[u+1]==="?"&&/[:!=]/.test(t[u+2])&&t[u+3]!==")"){v=t.indexOf(")",u);if(v>u){b=t.indexOf("\\",u);if(b===-1||b>v){return true}}}if(p!==-1&&t[u]==="("&&t[u+1]!=="|"){if(p<u){p=t.indexOf("|",u)}if(p!==-1&&t[p+1]!==")"){v=t.indexOf(")",p);if(v>p){b=t.indexOf("\\",p);if(b===-1||b>v){return true}}}}if(t[u]==="\\"){var w=t[u+1];u+=2;var E=g[w];if(E){var $=t.indexOf(E,u);if($!==-1){u=$+1}}if(t[u]==="!"){return true}}else{u++}}return false};var relaxedCheck=function(t){if(t[0]==="!"){return true}var u=0;while(u<t.length){if(/[*?{}()[\]]/.test(t[u])){return true}if(t[u]==="\\"){var p=t[u+1];u+=2;var m=g[p];if(m){var y=t.indexOf(m,u);if(y!==-1){u=y+1}}if(t[u]==="!"){return true}}else{u++}}return false};t.exports=function isGlob(t,u){if(typeof t!=="string"||t===""){return false}if(m(t)){return true}var p=strictCheck;if(u&&u.strict===false){p=relaxedCheck}return p(t)}},952:t=>{"use strict";
55
55
  /*!
56
56
  * is-number <https://github.com/jonschlinkert/is-number>
57
57
  *
58
58
  * Copyright (c) 2014-present, Jon Schlinkert.
59
59
  * Released under the MIT License.
60
- */t.exports=function(t){if(typeof t==="number"){return t-t===0}if(typeof t==="string"&&t.trim()!==""){return Number.isFinite?Number.isFinite(+t):isFinite(+t)}return false}},7105:(t,r,i)=>{var o=i(7515);var a;if(process.platform==="win32"||global.TESTING_WINDOWS){a=i(6132)}else{a=i(1778)}t.exports=isexe;isexe.sync=sync;function isexe(t,r,i){if(typeof r==="function"){i=r;r={}}if(!i){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(i,o){isexe(t,r||{},(function(t,r){if(t){o(t)}else{i(r)}}))}))}a(t,r||{},(function(t,o){if(t){if(t.code==="EACCES"||r&&r.ignoreErrors){t=null;o=false}}i(t,o)}))}function sync(t,r){try{return a.sync(t,r||{})}catch(t){if(r&&r.ignoreErrors||t.code==="EACCES"){return false}else{throw t}}}},1778:(t,r,i)=>{t.exports=isexe;isexe.sync=sync;var o=i(7515);function isexe(t,r,i){o.stat(t,(function(t,o){i(t,t?false:checkStat(o,r))}))}function sync(t,r){return checkStat(o.statSync(t),r)}function checkStat(t,r){return t.isFile()&&checkMode(t,r)}function checkMode(t,r){var i=t.mode;var o=t.uid;var a=t.gid;var c=r.uid!==undefined?r.uid:process.getuid&&process.getuid();var l=r.gid!==undefined?r.gid:process.getgid&&process.getgid();var u=parseInt("100",8);var h=parseInt("010",8);var d=parseInt("001",8);var p=u|h;var m=i&d||i&h&&a===l||i&u&&o===c||i&p&&c===0;return m}},6132:(t,r,i)=>{t.exports=isexe;isexe.sync=sync;var o=i(7515);function checkPathExt(t,r){var i=r.pathExt!==undefined?r.pathExt:process.env.PATHEXT;if(!i){return true}i=i.split(";");if(i.indexOf("")!==-1){return true}for(var o=0;o<i.length;o++){var a=i[o].toLowerCase();if(a&&t.substr(-a.length).toLowerCase()===a){return true}}return false}function checkStat(t,r,i){if(!t.isSymbolicLink()&&!t.isFile()){return false}return checkPathExt(r,i)}function isexe(t,r,i){o.stat(t,(function(o,a){i(o,o?false:checkStat(a,t,r))}))}function sync(t,r){return checkStat(o.statSync(t),t,r)}},3456:t=>{"use strict";var r=t.exports=function(t,r,i){if(typeof r=="function"){i=r;r={}}i=r.cb||i;var o=typeof i=="function"?i:i.pre||function(){};var a=i.post||function(){};_traverse(r,o,a,t,"",t)};r.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true,if:true,then:true,else:true};r.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true};r.propsKeywords={$defs:true,definitions:true,properties:true,patternProperties:true,dependencies:true};r.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function _traverse(t,i,o,a,c,l,u,h,d,p){if(a&&typeof a=="object"&&!Array.isArray(a)){i(a,c,l,u,h,d,p);for(var m in a){var g=a[m];if(Array.isArray(g)){if(m in r.arrayKeywords){for(var y=0;y<g.length;y++)_traverse(t,i,o,g[y],c+"/"+m+"/"+y,l,c,m,a,y)}}else if(m in r.propsKeywords){if(g&&typeof g=="object"){for(var v in g)_traverse(t,i,o,g[v],c+"/"+m+"/"+escapeJsonPtr(v),l,c,m,a,v)}}else if(m in r.keywords||t.allKeys&&!(m in r.skipKeywords)){_traverse(t,i,o,g,c+"/"+m,l,c,m,a)}}o(a,c,l,u,h,d,p)}}function escapeJsonPtr(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}},5665:t=>{"use strict";const{FORCE_COLOR:r,NODE_DISABLE_COLORS:i,TERM:o}=process.env;const a={enabled:!i&&o!=="dumb"&&r!=="0",reset:init(0,0),bold:init(1,22),dim:init(2,22),italic:init(3,23),underline:init(4,24),inverse:init(7,27),hidden:init(8,28),strikethrough:init(9,29),black:init(30,39),red:init(31,39),green:init(32,39),yellow:init(33,39),blue:init(34,39),magenta:init(35,39),cyan:init(36,39),white:init(37,39),gray:init(90,39),grey:init(90,39),bgBlack:init(40,49),bgRed:init(41,49),bgGreen:init(42,49),bgYellow:init(43,49),bgBlue:init(44,49),bgMagenta:init(45,49),bgCyan:init(46,49),bgWhite:init(47,49)};function run(t,r){let i=0,o,a="",c="";for(;i<t.length;i++){o=t[i];a+=o.open;c+=o.close;if(r.includes(o.close)){r=r.replace(o.rgx,o.close+o.open)}}return a+r+c}function chain(t,r){let i={has:t,keys:r};i.reset=a.reset.bind(i);i.bold=a.bold.bind(i);i.dim=a.dim.bind(i);i.italic=a.italic.bind(i);i.underline=a.underline.bind(i);i.inverse=a.inverse.bind(i);i.hidden=a.hidden.bind(i);i.strikethrough=a.strikethrough.bind(i);i.black=a.black.bind(i);i.red=a.red.bind(i);i.green=a.green.bind(i);i.yellow=a.yellow.bind(i);i.blue=a.blue.bind(i);i.magenta=a.magenta.bind(i);i.cyan=a.cyan.bind(i);i.white=a.white.bind(i);i.gray=a.gray.bind(i);i.grey=a.grey.bind(i);i.bgBlack=a.bgBlack.bind(i);i.bgRed=a.bgRed.bind(i);i.bgGreen=a.bgGreen.bind(i);i.bgYellow=a.bgYellow.bind(i);i.bgBlue=a.bgBlue.bind(i);i.bgMagenta=a.bgMagenta.bind(i);i.bgCyan=a.bgCyan.bind(i);i.bgWhite=a.bgWhite.bind(i);return i}function init(t,r){let i={open:`[${t}m`,close:`[${r}m`,rgx:new RegExp(`\\x1b\\[${r}m`,"g")};return function(r){if(this!==void 0&&this.has!==void 0){this.has.includes(t)||(this.has.push(t),this.keys.push(i));return r===void 0?this:a.enabled?run(this.keys,r+""):r+""}return r===void 0?chain([t],[i]):a.enabled?run([i],r+""):r+""}}t.exports=a},4031:(t,r,i)=>{"use strict";const o=i(2203);const a=o.PassThrough;const c=Array.prototype.slice;t.exports=merge2;function merge2(){const t=[];const r=c.call(arguments);let i=false;let o=r[r.length-1];if(o&&!Array.isArray(o)&&o.pipe==null){r.pop()}else{o={}}const l=o.end!==false;const u=o.pipeError===true;if(o.objectMode==null){o.objectMode=true}if(o.highWaterMark==null){o.highWaterMark=64*1024}const h=a(o);function addStream(){for(let r=0,i=arguments.length;r<i;r++){t.push(pauseStreams(arguments[r],o))}mergeStream();return this}function mergeStream(){if(i){return}i=true;let r=t.shift();if(!r){process.nextTick(endStream);return}if(!Array.isArray(r)){r=[r]}let o=r.length+1;function next(){if(--o>0){return}i=false;mergeStream()}function pipe(t){function onend(){t.removeListener("merge2UnpipeEnd",onend);t.removeListener("end",onend);if(u){t.removeListener("error",onerror)}next()}function onerror(t){h.emit("error",t)}if(t._readableState.endEmitted){return next()}t.on("merge2UnpipeEnd",onend);t.on("end",onend);if(u){t.on("error",onerror)}t.pipe(h,{end:false});t.resume()}for(let t=0;t<r.length;t++){pipe(r[t])}next()}function endStream(){i=false;h.emit("queueDrain");if(l){h.end()}}h.setMaxListeners(0);h.add=addStream;h.on("unpipe",(function(t){t.emit("merge2UnpipeEnd")}));if(r.length){addStream.apply(null,r)}return h}function pauseStreams(t,r){if(!Array.isArray(t)){if(!t._readableState&&t.pipe){t=t.pipe(a(r))}if(!t._readableState||!t.pause||!t.pipe){throw new Error("Only readable stream can be merged.")}t.pause()}else{for(let i=0,o=t.length;i<o;i++){t[i]=pauseStreams(t[i],r)}}return t}},9555:(t,r,i)=>{"use strict";const o=i(9023);const a=i(8671);const c=i(5675);const l=i(7910);const isEmptyString=t=>t===""||t==="./";const hasBraces=t=>{const r=t.indexOf("{");return r>-1&&t.indexOf("}",r)>-1};const micromatch=(t,r,i)=>{r=[].concat(r);t=[].concat(t);let o=new Set;let a=new Set;let l=new Set;let u=0;let onResult=t=>{l.add(t.output);if(i&&i.onResult){i.onResult(t)}};for(let l=0;l<r.length;l++){let h=c(String(r[l]),{...i,onResult:onResult},true);let d=h.state.negated||h.state.negatedExtglob;if(d)u++;for(let r of t){let t=h(r,true);let i=d?!t.isMatch:t.isMatch;if(!i)continue;if(d){o.add(t.output)}else{o.delete(t.output);a.add(t.output)}}}let h=u===r.length?[...l]:[...a];let d=h.filter((t=>!o.has(t)));if(i&&d.length===0){if(i.failglob===true){throw new Error(`No matches found for "${r.join(", ")}"`)}if(i.nonull===true||i.nullglob===true){return i.unescape?r.map((t=>t.replace(/\\/g,""))):r}}return d};micromatch.match=micromatch;micromatch.matcher=(t,r)=>c(t,r);micromatch.isMatch=(t,r,i)=>c(r,i)(t);micromatch.any=micromatch.isMatch;micromatch.not=(t,r,i={})=>{r=[].concat(r).map(String);let o=new Set;let a=[];let onResult=t=>{if(i.onResult)i.onResult(t);a.push(t.output)};let c=new Set(micromatch(t,r,{...i,onResult:onResult}));for(let t of a){if(!c.has(t)){o.add(t)}}return[...o]};micromatch.contains=(t,r,i)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${o.inspect(t)}"`)}if(Array.isArray(r)){return r.some((r=>micromatch.contains(t,r,i)))}if(typeof r==="string"){if(isEmptyString(t)||isEmptyString(r)){return false}if(t.includes(r)||t.startsWith("./")&&t.slice(2).includes(r)){return true}}return micromatch.isMatch(t,r,{...i,contains:true})};micromatch.matchKeys=(t,r,i)=>{if(!l.isObject(t)){throw new TypeError("Expected the first argument to be an object")}let o=micromatch(Object.keys(t),r,i);let a={};for(let r of o)a[r]=t[r];return a};micromatch.some=(t,r,i)=>{let o=[].concat(t);for(let t of[].concat(r)){let r=c(String(t),i);if(o.some((t=>r(t)))){return true}}return false};micromatch.every=(t,r,i)=>{let o=[].concat(t);for(let t of[].concat(r)){let r=c(String(t),i);if(!o.every((t=>r(t)))){return false}}return true};micromatch.all=(t,r,i)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${o.inspect(t)}"`)}return[].concat(r).every((r=>c(r,i)(t)))};micromatch.capture=(t,r,i)=>{let o=l.isWindows(i);let a=c.makeRe(String(t),{...i,capture:true});let u=a.exec(o?l.toPosixSlashes(r):r);if(u){return u.slice(1).map((t=>t===void 0?"":t))}};micromatch.makeRe=(...t)=>c.makeRe(...t);micromatch.scan=(...t)=>c.scan(...t);micromatch.parse=(t,r)=>{let i=[];for(let o of[].concat(t||[])){for(let t of a(String(o),r)){i.push(c.parse(t,r))}}return i};micromatch.braces=(t,r)=>{if(typeof t!=="string")throw new TypeError("Expected a string");if(r&&r.nobrace===true||!hasBraces(t)){return[t]}return a(t,r)};micromatch.braceExpand=(t,r)=>{if(typeof t!=="string")throw new TypeError("Expected a string");return micromatch.braces(t,{...r,expand:true})};micromatch.hasBraces=hasBraces;t.exports=micromatch},2078:t=>{"use strict";function hasKey(t,r){var i=t;r.slice(0,-1).forEach((function(t){i=i[t]||{}}));var o=r[r.length-1];return o in i}function isNumber(t){if(typeof t==="number"){return true}if(/^0x[0-9a-f]+$/i.test(t)){return true}return/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function isConstructorOrProto(t,r){return r==="constructor"&&typeof t[r]==="function"||r==="__proto__"}t.exports=function(t,r){if(!r){r={}}var i={bools:{},strings:{},unknownFn:null};if(typeof r.unknown==="function"){i.unknownFn=r.unknown}if(typeof r.boolean==="boolean"&&r.boolean){i.allBools=true}else{[].concat(r.boolean).filter(Boolean).forEach((function(t){i.bools[t]=true}))}var o={};function aliasIsBoolean(t){return o[t].some((function(t){return i.bools[t]}))}Object.keys(r.alias||{}).forEach((function(t){o[t]=[].concat(r.alias[t]);o[t].forEach((function(r){o[r]=[t].concat(o[t].filter((function(t){return r!==t})))}))}));[].concat(r.string).filter(Boolean).forEach((function(t){i.strings[t]=true;if(o[t]){[].concat(o[t]).forEach((function(t){i.strings[t]=true}))}}));var a=r.default||{};var c={_:[]};function argDefined(t,r){return i.allBools&&/^--[^=]+$/.test(r)||i.strings[t]||i.bools[t]||o[t]}function setKey(t,r,o){var a=t;for(var c=0;c<r.length-1;c++){var l=r[c];if(isConstructorOrProto(a,l)){return}if(a[l]===undefined){a[l]={}}if(a[l]===Object.prototype||a[l]===Number.prototype||a[l]===String.prototype){a[l]={}}if(a[l]===Array.prototype){a[l]=[]}a=a[l]}var u=r[r.length-1];if(isConstructorOrProto(a,u)){return}if(a===Object.prototype||a===Number.prototype||a===String.prototype){a={}}if(a===Array.prototype){a=[]}if(a[u]===undefined||i.bools[u]||typeof a[u]==="boolean"){a[u]=o}else if(Array.isArray(a[u])){a[u].push(o)}else{a[u]=[a[u],o]}}function setArg(t,r,a){if(a&&i.unknownFn&&!argDefined(t,a)){if(i.unknownFn(a)===false){return}}var l=!i.strings[t]&&isNumber(r)?Number(r):r;setKey(c,t.split("."),l);(o[t]||[]).forEach((function(t){setKey(c,t.split("."),l)}))}Object.keys(i.bools).forEach((function(t){setArg(t,a[t]===undefined?false:a[t])}));var l=[];if(t.indexOf("--")!==-1){l=t.slice(t.indexOf("--")+1);t=t.slice(0,t.indexOf("--"))}for(var u=0;u<t.length;u++){var h=t[u];var d;var p;if(/^--.+=/.test(h)){var m=h.match(/^--([^=]+)=([\s\S]*)$/);d=m[1];var g=m[2];if(i.bools[d]){g=g!=="false"}setArg(d,g,h)}else if(/^--no-.+/.test(h)){d=h.match(/^--no-(.+)/)[1];setArg(d,false,h)}else if(/^--.+/.test(h)){d=h.match(/^--(.+)/)[1];p=t[u+1];if(p!==undefined&&!/^(-|--)[^-]/.test(p)&&!i.bools[d]&&!i.allBools&&(o[d]?!aliasIsBoolean(d):true)){setArg(d,p,h);u+=1}else if(/^(true|false)$/.test(p)){setArg(d,p==="true",h);u+=1}else{setArg(d,i.strings[d]?"":true,h)}}else if(/^-[^-]+/.test(h)){var y=h.slice(1,-1).split("");var v=false;for(var b=0;b<y.length;b++){p=h.slice(b+2);if(p==="-"){setArg(y[b],p,h);continue}if(/[A-Za-z]/.test(y[b])&&p[0]==="="){setArg(y[b],p.slice(1),h);v=true;break}if(/[A-Za-z]/.test(y[b])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(p)){setArg(y[b],p,h);v=true;break}if(y[b+1]&&y[b+1].match(/\W/)){setArg(y[b],h.slice(b+2),h);v=true;break}else{setArg(y[b],i.strings[y[b]]?"":true,h)}}d=h.slice(-1)[0];if(!v&&d!=="-"){if(t[u+1]&&!/^(-|--)[^-]/.test(t[u+1])&&!i.bools[d]&&(o[d]?!aliasIsBoolean(d):true)){setArg(d,t[u+1],h);u+=1}else if(t[u+1]&&/^(true|false)$/.test(t[u+1])){setArg(d,t[u+1]==="true",h);u+=1}else{setArg(d,i.strings[d]?"":true,h)}}}else{if(!i.unknownFn||i.unknownFn(h)!==false){c._.push(i.strings._||!isNumber(h)?h:Number(h))}if(r.stopEarly){c._.push.apply(c._,t.slice(u+1));break}}}Object.keys(a).forEach((function(t){if(!hasKey(c,t.split("."))){setKey(c,t.split("."),a[t]);(o[t]||[]).forEach((function(r){setKey(c,r.split("."),a[t])}))}}));if(r["--"]){c["--"]=l.slice()}else{l.forEach((function(t){c._.push(t)}))}return c}},4662:t=>{"use strict";const pathKey=(t={})=>{const r=t.env||process.env;const i=t.platform||process.platform;if(i!=="win32"){return"PATH"}return Object.keys(r).reverse().find((t=>t.toUpperCase()==="PATH"))||"Path"};t.exports=pathKey;t.exports["default"]=pathKey},9212:t=>{let r=process||{},i=r.argv||[],o=r.env||{};let a=!(!!o.NO_COLOR||i.includes("--no-color"))&&(!!o.FORCE_COLOR||i.includes("--color")||r.platform==="win32"||(r.stdout||{}).isTTY&&o.TERM!=="dumb"||!!o.CI);let formatter=(t,r,i=t)=>o=>{let a=""+o,c=a.indexOf(r,t.length);return~c?t+replaceClose(a,r,i,c)+r:t+a+r};let replaceClose=(t,r,i,o)=>{let a="",c=0;do{a+=t.substring(c,o)+i;c=o+r.length;o=t.indexOf(r,c)}while(~o);return a+t.substring(c)};let createColors=(t=a)=>{let r=t?formatter:()=>String;return{isColorSupported:t,reset:r("",""),bold:r("","",""),dim:r("","",""),italic:r("",""),underline:r("",""),inverse:r("",""),hidden:r("",""),strikethrough:r("",""),black:r("",""),red:r("",""),green:r("",""),yellow:r("",""),blue:r("",""),magenta:r("",""),cyan:r("",""),white:r("",""),gray:r("",""),bgBlack:r("",""),bgRed:r("",""),bgGreen:r("",""),bgYellow:r("",""),bgBlue:r("",""),bgMagenta:r("",""),bgCyan:r("",""),bgWhite:r("",""),blackBright:r("",""),redBright:r("",""),greenBright:r("",""),yellowBright:r("",""),blueBright:r("",""),magentaBright:r("",""),cyanBright:r("",""),whiteBright:r("",""),bgBlackBright:r("",""),bgRedBright:r("",""),bgGreenBright:r("",""),bgYellowBright:r("",""),bgBlueBright:r("",""),bgMagentaBright:r("",""),bgCyanBright:r("",""),bgWhiteBright:r("","")}};t.exports=createColors();t.exports.createColors=createColors},5675:(t,r,i)=>{"use strict";t.exports=i(3193)},7054:(t,r,i)=>{"use strict";const o=i(6928);const a="\\\\/";const c=`[^${a}]`;const l="\\.";const u="\\+";const h="\\?";const d="\\/";const p="(?=.)";const m="[^/]";const g=`(?:${d}|$)`;const y=`(?:^|${d})`;const v=`${l}{1,2}${g}`;const b=`(?!${l})`;const w=`(?!${y}${v})`;const E=`(?!${l}{0,1}${g})`;const S=`(?!${v})`;const $=`[^.${d}]`;const O=`${m}*?`;const R={DOT_LITERAL:l,PLUS_LITERAL:u,QMARK_LITERAL:h,SLASH_LITERAL:d,ONE_CHAR:p,QMARK:m,END_ANCHOR:g,DOTS_SLASH:v,NO_DOT:b,NO_DOTS:w,NO_DOT_SLASH:E,NO_DOTS_SLASH:S,QMARK_NO_DOT:$,STAR:O,START_ANCHOR:y};const P={...R,SLASH_LITERAL:`[${a}]`,QMARK:c,STAR:`${c}*?`,DOTS_SLASH:`${l}{1,2}(?:[${a}]|$)`,NO_DOT:`(?!${l})`,NO_DOTS:`(?!(?:^|[${a}])${l}{1,2}(?:[${a}]|$))`,NO_DOT_SLASH:`(?!${l}{0,1}(?:[${a}]|$))`,NO_DOTS_SLASH:`(?!${l}{1,2}(?:[${a}]|$))`,QMARK_NO_DOT:`[^.${a}]`,START_ANCHOR:`(?:^|[${a}])`,END_ANCHOR:`(?:[${a}]|$)`};const A={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:A,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:o.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===true?P:R}}},4356:(t,r,i)=>{"use strict";const o=i(7054);const a=i(7910);const{MAX_LENGTH:c,POSIX_REGEX_SOURCE:l,REGEX_NON_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_BACKREF:h,REPLACEMENTS:d}=o;const expandRange=(t,r)=>{if(typeof r.expandRange==="function"){return r.expandRange(...t,r)}t.sort();const i=`[${t.join("-")}]`;try{new RegExp(i)}catch(r){return t.map((t=>a.escapeRegex(t))).join("..")}return i};const syntaxError=(t,r)=>`Missing ${t}: "${r}" - use "\\\\${r}" to match literal characters`;const parse=(t,r)=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}t=d[t]||t;const i={...r};const p=typeof i.maxLength==="number"?Math.min(c,i.maxLength):c;let m=t.length;if(m>p){throw new SyntaxError(`Input length: ${m}, exceeds maximum allowed length: ${p}`)}const g={type:"bos",value:"",output:i.prepend||""};const y=[g];const v=i.capture?"":"?:";const b=a.isWindows(r);const w=o.globChars(b);const E=o.extglobChars(w);const{DOT_LITERAL:S,PLUS_LITERAL:$,SLASH_LITERAL:O,ONE_CHAR:R,DOTS_SLASH:P,NO_DOT:A,NO_DOT_SLASH:x,NO_DOTS_SLASH:T,QMARK:C,QMARK_NO_DOT:k,STAR:I,START_ANCHOR:N}=w;const globstar=t=>`(${v}(?:(?!${N}${t.dot?P:S}).)*?)`;const D=i.dot?"":A;const L=i.dot?C:k;let M=i.bash===true?globstar(i):I;if(i.capture){M=`(${M})`}if(typeof i.noext==="boolean"){i.noextglob=i.noext}const j={input:t,index:-1,start:0,dot:i.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:y};t=a.removePrefix(t,j);m=t.length;const U=[];const B=[];const H=[];let V=g;let z;const eos=()=>j.index===m-1;const G=j.peek=(r=1)=>t[j.index+r];const W=j.advance=()=>t[++j.index]||"";const remaining=()=>t.slice(j.index+1);const consume=(t="",r=0)=>{j.consumed+=t;j.index+=r};const append=t=>{j.output+=t.output!=null?t.output:t.value;consume(t.value)};const negate=()=>{let t=1;while(G()==="!"&&(G(2)!=="("||G(3)==="?")){W();j.start++;t++}if(t%2===0){return false}j.negated=true;j.start++;return true};const increment=t=>{j[t]++;H.push(t)};const decrement=t=>{j[t]--;H.pop()};const push=t=>{if(V.type==="globstar"){const r=j.braces>0&&(t.type==="comma"||t.type==="brace");const i=t.extglob===true||U.length&&(t.type==="pipe"||t.type==="paren");if(t.type!=="slash"&&t.type!=="paren"&&!r&&!i){j.output=j.output.slice(0,-V.output.length);V.type="star";V.value="*";V.output=M;j.output+=V.output}}if(U.length&&t.type!=="paren"){U[U.length-1].inner+=t.value}if(t.value||t.output)append(t);if(V&&V.type==="text"&&t.type==="text"){V.value+=t.value;V.output=(V.output||"")+t.value;return}t.prev=V;y.push(t);V=t};const extglobOpen=(t,r)=>{const o={...E[r],conditions:1,inner:""};o.prev=V;o.parens=j.parens;o.output=j.output;const a=(i.capture?"(":"")+o.open;increment("parens");push({type:t,value:r,output:j.output?"":R});push({type:"paren",extglob:true,value:W(),output:a});U.push(o)};const extglobClose=t=>{let o=t.close+(i.capture?")":"");let a;if(t.type==="negate"){let c=M;if(t.inner&&t.inner.length>1&&t.inner.includes("/")){c=globstar(i)}if(c!==M||eos()||/^\)+$/.test(remaining())){o=t.close=`)$))${c}`}if(t.inner.includes("*")&&(a=remaining())&&/^\.[^\\/.]+$/.test(a)){const i=parse(a,{...r,fastpaths:false}).output;o=t.close=`)${i})${c})`}if(t.prev.type==="bos"){j.negatedExtglob=true}}push({type:"paren",extglob:true,value:z,output:o});decrement("parens")};if(i.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let o=false;let c=t.replace(h,((t,r,i,a,c,l)=>{if(a==="\\"){o=true;return t}if(a==="?"){if(r){return r+a+(c?C.repeat(c.length):"")}if(l===0){return L+(c?C.repeat(c.length):"")}return C.repeat(i.length)}if(a==="."){return S.repeat(i.length)}if(a==="*"){if(r){return r+a+(c?M:"")}return M}return r?t:`\\${t}`}));if(o===true){if(i.unescape===true){c=c.replace(/\\/g,"")}else{c=c.replace(/\\+/g,(t=>t.length%2===0?"\\\\":t?"\\":""))}}if(c===t&&i.contains===true){j.output=t;return j}j.output=a.wrapOutput(c,j,r);return j}while(!eos()){z=W();if(z==="\0"){continue}if(z==="\\"){const t=G();if(t==="/"&&i.bash!==true){continue}if(t==="."||t===";"){continue}if(!t){z+="\\";push({type:"text",value:z});continue}const r=/^\\+/.exec(remaining());let o=0;if(r&&r[0].length>2){o=r[0].length;j.index+=o;if(o%2!==0){z+="\\"}}if(i.unescape===true){z=W()}else{z+=W()}if(j.brackets===0){push({type:"text",value:z});continue}}if(j.brackets>0&&(z!=="]"||V.value==="["||V.value==="[^")){if(i.posix!==false&&z===":"){const t=V.value.slice(1);if(t.includes("[")){V.posix=true;if(t.includes(":")){const t=V.value.lastIndexOf("[");const r=V.value.slice(0,t);const i=V.value.slice(t+2);const o=l[i];if(o){V.value=r+o;j.backtrack=true;W();if(!g.output&&y.indexOf(V)===1){g.output=R}continue}}}}if(z==="["&&G()!==":"||z==="-"&&G()==="]"){z=`\\${z}`}if(z==="]"&&(V.value==="["||V.value==="[^")){z=`\\${z}`}if(i.posix===true&&z==="!"&&V.value==="["){z="^"}V.value+=z;append({value:z});continue}if(j.quotes===1&&z!=='"'){z=a.escapeRegex(z);V.value+=z;append({value:z});continue}if(z==='"'){j.quotes=j.quotes===1?0:1;if(i.keepQuotes===true){push({type:"text",value:z})}continue}if(z==="("){increment("parens");push({type:"paren",value:z});continue}if(z===")"){if(j.parens===0&&i.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const t=U[U.length-1];if(t&&j.parens===t.parens+1){extglobClose(U.pop());continue}push({type:"paren",value:z,output:j.parens?")":"\\)"});decrement("parens");continue}if(z==="["){if(i.nobracket===true||!remaining().includes("]")){if(i.nobracket!==true&&i.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}z=`\\${z}`}else{increment("brackets")}push({type:"bracket",value:z});continue}if(z==="]"){if(i.nobracket===true||V&&V.type==="bracket"&&V.value.length===1){push({type:"text",value:z,output:`\\${z}`});continue}if(j.brackets===0){if(i.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:z,output:`\\${z}`});continue}decrement("brackets");const t=V.value.slice(1);if(V.posix!==true&&t[0]==="^"&&!t.includes("/")){z=`/${z}`}V.value+=z;append({value:z});if(i.literalBrackets===false||a.hasRegexChars(t)){continue}const r=a.escapeRegex(V.value);j.output=j.output.slice(0,-V.value.length);if(i.literalBrackets===true){j.output+=r;V.value=r;continue}V.value=`(${v}${r}|${V.value})`;j.output+=V.value;continue}if(z==="{"&&i.nobrace!==true){increment("braces");const t={type:"brace",value:z,output:"(",outputIndex:j.output.length,tokensIndex:j.tokens.length};B.push(t);push(t);continue}if(z==="}"){const t=B[B.length-1];if(i.nobrace===true||!t){push({type:"text",value:z,output:z});continue}let r=")";if(t.dots===true){const t=y.slice();const o=[];for(let r=t.length-1;r>=0;r--){y.pop();if(t[r].type==="brace"){break}if(t[r].type!=="dots"){o.unshift(t[r].value)}}r=expandRange(o,i);j.backtrack=true}if(t.comma!==true&&t.dots!==true){const i=j.output.slice(0,t.outputIndex);const o=j.tokens.slice(t.tokensIndex);t.value=t.output="\\{";z=r="\\}";j.output=i;for(const t of o){j.output+=t.output||t.value}}push({type:"brace",value:z,output:r});decrement("braces");B.pop();continue}if(z==="|"){if(U.length>0){U[U.length-1].conditions++}push({type:"text",value:z});continue}if(z===","){let t=z;const r=B[B.length-1];if(r&&H[H.length-1]==="braces"){r.comma=true;t="|"}push({type:"comma",value:z,output:t});continue}if(z==="/"){if(V.type==="dot"&&j.index===j.start+1){j.start=j.index+1;j.consumed="";j.output="";y.pop();V=g;continue}push({type:"slash",value:z,output:O});continue}if(z==="."){if(j.braces>0&&V.type==="dot"){if(V.value===".")V.output=S;const t=B[B.length-1];V.type="dots";V.output+=z;V.value+=z;t.dots=true;continue}if(j.braces+j.parens===0&&V.type!=="bos"&&V.type!=="slash"){push({type:"text",value:z,output:S});continue}push({type:"dot",value:z,output:S});continue}if(z==="?"){const t=V&&V.value==="(";if(!t&&i.noextglob!==true&&G()==="("&&G(2)!=="?"){extglobOpen("qmark",z);continue}if(V&&V.type==="paren"){const t=G();let r=z;if(t==="<"&&!a.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(V.value==="("&&!/[!=<:]/.test(t)||t==="<"&&!/<([!=]|\w+>)/.test(remaining())){r=`\\${z}`}push({type:"text",value:z,output:r});continue}if(i.dot!==true&&(V.type==="slash"||V.type==="bos")){push({type:"qmark",value:z,output:k});continue}push({type:"qmark",value:z,output:C});continue}if(z==="!"){if(i.noextglob!==true&&G()==="("){if(G(2)!=="?"||!/[!=<:]/.test(G(3))){extglobOpen("negate",z);continue}}if(i.nonegate!==true&&j.index===0){negate();continue}}if(z==="+"){if(i.noextglob!==true&&G()==="("&&G(2)!=="?"){extglobOpen("plus",z);continue}if(V&&V.value==="("||i.regex===false){push({type:"plus",value:z,output:$});continue}if(V&&(V.type==="bracket"||V.type==="paren"||V.type==="brace")||j.parens>0){push({type:"plus",value:z});continue}push({type:"plus",value:$});continue}if(z==="@"){if(i.noextglob!==true&&G()==="("&&G(2)!=="?"){push({type:"at",extglob:true,value:z,output:""});continue}push({type:"text",value:z});continue}if(z!=="*"){if(z==="$"||z==="^"){z=`\\${z}`}const t=u.exec(remaining());if(t){z+=t[0];j.index+=t[0].length}push({type:"text",value:z});continue}if(V&&(V.type==="globstar"||V.star===true)){V.type="star";V.star=true;V.value+=z;V.output=M;j.backtrack=true;j.globstar=true;consume(z);continue}let r=remaining();if(i.noextglob!==true&&/^\([^?]/.test(r)){extglobOpen("star",z);continue}if(V.type==="star"){if(i.noglobstar===true){consume(z);continue}const o=V.prev;const a=o.prev;const c=o.type==="slash"||o.type==="bos";const l=a&&(a.type==="star"||a.type==="globstar");if(i.bash===true&&(!c||r[0]&&r[0]!=="/")){push({type:"star",value:z,output:""});continue}const u=j.braces>0&&(o.type==="comma"||o.type==="brace");const h=U.length&&(o.type==="pipe"||o.type==="paren");if(!c&&o.type!=="paren"&&!u&&!h){push({type:"star",value:z,output:""});continue}while(r.slice(0,3)==="/**"){const i=t[j.index+4];if(i&&i!=="/"){break}r=r.slice(3);consume("/**",3)}if(o.type==="bos"&&eos()){V.type="globstar";V.value+=z;V.output=globstar(i);j.output=V.output;j.globstar=true;consume(z);continue}if(o.type==="slash"&&o.prev.type!=="bos"&&!l&&eos()){j.output=j.output.slice(0,-(o.output+V.output).length);o.output=`(?:${o.output}`;V.type="globstar";V.output=globstar(i)+(i.strictSlashes?")":"|$)");V.value+=z;j.globstar=true;j.output+=o.output+V.output;consume(z);continue}if(o.type==="slash"&&o.prev.type!=="bos"&&r[0]==="/"){const t=r[1]!==void 0?"|$":"";j.output=j.output.slice(0,-(o.output+V.output).length);o.output=`(?:${o.output}`;V.type="globstar";V.output=`${globstar(i)}${O}|${O}${t})`;V.value+=z;j.output+=o.output+V.output;j.globstar=true;consume(z+W());push({type:"slash",value:"/",output:""});continue}if(o.type==="bos"&&r[0]==="/"){V.type="globstar";V.value+=z;V.output=`(?:^|${O}|${globstar(i)}${O})`;j.output=V.output;j.globstar=true;consume(z+W());push({type:"slash",value:"/",output:""});continue}j.output=j.output.slice(0,-V.output.length);V.type="globstar";V.output=globstar(i);V.value+=z;j.output+=V.output;j.globstar=true;consume(z);continue}const o={type:"star",value:z,output:M};if(i.bash===true){o.output=".*?";if(V.type==="bos"||V.type==="slash"){o.output=D+o.output}push(o);continue}if(V&&(V.type==="bracket"||V.type==="paren")&&i.regex===true){o.output=z;push(o);continue}if(j.index===j.start||V.type==="slash"||V.type==="dot"){if(V.type==="dot"){j.output+=x;V.output+=x}else if(i.dot===true){j.output+=T;V.output+=T}else{j.output+=D;V.output+=D}if(G()!=="*"){j.output+=R;V.output+=R}}push(o)}while(j.brackets>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));j.output=a.escapeLast(j.output,"[");decrement("brackets")}while(j.parens>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));j.output=a.escapeLast(j.output,"(");decrement("parens")}while(j.braces>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));j.output=a.escapeLast(j.output,"{");decrement("braces")}if(i.strictSlashes!==true&&(V.type==="star"||V.type==="bracket")){push({type:"maybe_slash",value:"",output:`${O}?`})}if(j.backtrack===true){j.output="";for(const t of j.tokens){j.output+=t.output!=null?t.output:t.value;if(t.suffix){j.output+=t.suffix}}}return j};parse.fastpaths=(t,r)=>{const i={...r};const l=typeof i.maxLength==="number"?Math.min(c,i.maxLength):c;const u=t.length;if(u>l){throw new SyntaxError(`Input length: ${u}, exceeds maximum allowed length: ${l}`)}t=d[t]||t;const h=a.isWindows(r);const{DOT_LITERAL:p,SLASH_LITERAL:m,ONE_CHAR:g,DOTS_SLASH:y,NO_DOT:v,NO_DOTS:b,NO_DOTS_SLASH:w,STAR:E,START_ANCHOR:S}=o.globChars(h);const $=i.dot?b:v;const O=i.dot?w:v;const R=i.capture?"":"?:";const P={negated:false,prefix:""};let A=i.bash===true?".*?":E;if(i.capture){A=`(${A})`}const globstar=t=>{if(t.noglobstar===true)return A;return`(${R}(?:(?!${S}${t.dot?y:p}).)*?)`};const create=t=>{switch(t){case"*":return`${$}${g}${A}`;case".*":return`${p}${g}${A}`;case"*.*":return`${$}${A}${p}${g}${A}`;case"*/*":return`${$}${A}${m}${g}${O}${A}`;case"**":return $+globstar(i);case"**/*":return`(?:${$}${globstar(i)}${m})?${O}${g}${A}`;case"**/*.*":return`(?:${$}${globstar(i)}${m})?${O}${A}${p}${g}${A}`;case"**/.*":return`(?:${$}${globstar(i)}${m})?${p}${g}${A}`;default:{const r=/^(.*?)\.(\w+)$/.exec(t);if(!r)return;const i=create(r[1]);if(!i)return;return i+p+r[2]}}};const x=a.removePrefix(t,P);let T=create(x);if(T&&i.strictSlashes!==true){T+=`${m}?`}return T};t.exports=parse},3193:(t,r,i)=>{"use strict";const o=i(6928);const a=i(5330);const c=i(4356);const l=i(7910);const u=i(7054);const isObject=t=>t&&typeof t==="object"&&!Array.isArray(t);const picomatch=(t,r,i=false)=>{if(Array.isArray(t)){const o=t.map((t=>picomatch(t,r,i)));const arrayMatcher=t=>{for(const r of o){const i=r(t);if(i)return i}return false};return arrayMatcher}const o=isObject(t)&&t.tokens&&t.input;if(t===""||typeof t!=="string"&&!o){throw new TypeError("Expected pattern to be a non-empty string")}const a=r||{};const c=l.isWindows(r);const u=o?picomatch.compileRe(t,r):picomatch.makeRe(t,r,false,true);const h=u.state;delete u.state;let isIgnored=()=>false;if(a.ignore){const t={...r,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(a.ignore,t,i)}const matcher=(i,o=false)=>{const{isMatch:l,match:d,output:p}=picomatch.test(i,u,r,{glob:t,posix:c});const m={glob:t,state:h,regex:u,posix:c,input:i,output:p,match:d,isMatch:l};if(typeof a.onResult==="function"){a.onResult(m)}if(l===false){m.isMatch=false;return o?m:false}if(isIgnored(i)){if(typeof a.onIgnore==="function"){a.onIgnore(m)}m.isMatch=false;return o?m:false}if(typeof a.onMatch==="function"){a.onMatch(m)}return o?m:true};if(i){matcher.state=h}return matcher};picomatch.test=(t,r,i,{glob:o,posix:a}={})=>{if(typeof t!=="string"){throw new TypeError("Expected input to be a string")}if(t===""){return{isMatch:false,output:""}}const c=i||{};const u=c.format||(a?l.toPosixSlashes:null);let h=t===o;let d=h&&u?u(t):t;if(h===false){d=u?u(t):t;h=d===o}if(h===false||c.capture===true){if(c.matchBase===true||c.basename===true){h=picomatch.matchBase(t,r,i,a)}else{h=r.exec(d)}}return{isMatch:Boolean(h),match:h,output:d}};picomatch.matchBase=(t,r,i,a=l.isWindows(i))=>{const c=r instanceof RegExp?r:picomatch.makeRe(r,i);return c.test(o.basename(t))};picomatch.isMatch=(t,r,i)=>picomatch(r,i)(t);picomatch.parse=(t,r)=>{if(Array.isArray(t))return t.map((t=>picomatch.parse(t,r)));return c(t,{...r,fastpaths:false})};picomatch.scan=(t,r)=>a(t,r);picomatch.compileRe=(t,r,i=false,o=false)=>{if(i===true){return t.output}const a=r||{};const c=a.contains?"":"^";const l=a.contains?"":"$";let u=`${c}(?:${t.output})${l}`;if(t&&t.negated===true){u=`^(?!${u}).*$`}const h=picomatch.toRegex(u,r);if(o===true){h.state=t}return h};picomatch.makeRe=(t,r={},i=false,o=false)=>{if(!t||typeof t!=="string"){throw new TypeError("Expected a non-empty string")}let a={negated:false,fastpaths:true};if(r.fastpaths!==false&&(t[0]==="."||t[0]==="*")){a.output=c.fastpaths(t,r)}if(!a.output){a=c(t,r)}return picomatch.compileRe(a,r,i,o)};picomatch.toRegex=(t,r)=>{try{const i=r||{};return new RegExp(t,i.flags||(i.nocase?"i":""))}catch(t){if(r&&r.debug===true)throw t;return/$^/}};picomatch.constants=u;t.exports=picomatch},5330:(t,r,i)=>{"use strict";const o=i(7910);const{CHAR_ASTERISK:a,CHAR_AT:c,CHAR_BACKWARD_SLASH:l,CHAR_COMMA:u,CHAR_DOT:h,CHAR_EXCLAMATION_MARK:d,CHAR_FORWARD_SLASH:p,CHAR_LEFT_CURLY_BRACE:m,CHAR_LEFT_PARENTHESES:g,CHAR_LEFT_SQUARE_BRACKET:y,CHAR_PLUS:v,CHAR_QUESTION_MARK:b,CHAR_RIGHT_CURLY_BRACE:w,CHAR_RIGHT_PARENTHESES:E,CHAR_RIGHT_SQUARE_BRACKET:S}=i(7054);const isPathSeparator=t=>t===p||t===l;const depth=t=>{if(t.isPrefix!==true){t.depth=t.isGlobstar?Infinity:1}};const scan=(t,r)=>{const i=r||{};const $=t.length-1;const O=i.parts===true||i.scanToEnd===true;const R=[];const P=[];const A=[];let x=t;let T=-1;let C=0;let k=0;let I=false;let N=false;let D=false;let L=false;let M=false;let j=false;let U=false;let B=false;let H=false;let V=false;let z=0;let G;let W;let q={value:"",depth:0,isGlob:false};const eos=()=>T>=$;const peek=()=>x.charCodeAt(T+1);const advance=()=>{G=W;return x.charCodeAt(++T)};while(T<$){W=advance();let t;if(W===l){U=q.backslashes=true;W=advance();if(W===m){j=true}continue}if(j===true||W===m){z++;while(eos()!==true&&(W=advance())){if(W===l){U=q.backslashes=true;advance();continue}if(W===m){z++;continue}if(j!==true&&W===h&&(W=advance())===h){I=q.isBrace=true;D=q.isGlob=true;V=true;if(O===true){continue}break}if(j!==true&&W===u){I=q.isBrace=true;D=q.isGlob=true;V=true;if(O===true){continue}break}if(W===w){z--;if(z===0){j=false;I=q.isBrace=true;V=true;break}}}if(O===true){continue}break}if(W===p){R.push(T);P.push(q);q={value:"",depth:0,isGlob:false};if(V===true)continue;if(G===h&&T===C+1){C+=2;continue}k=T+1;continue}if(i.noext!==true){const t=W===v||W===c||W===a||W===b||W===d;if(t===true&&peek()===g){D=q.isGlob=true;L=q.isExtglob=true;V=true;if(W===d&&T===C){H=true}if(O===true){while(eos()!==true&&(W=advance())){if(W===l){U=q.backslashes=true;W=advance();continue}if(W===E){D=q.isGlob=true;V=true;break}}continue}break}}if(W===a){if(G===a)M=q.isGlobstar=true;D=q.isGlob=true;V=true;if(O===true){continue}break}if(W===b){D=q.isGlob=true;V=true;if(O===true){continue}break}if(W===y){while(eos()!==true&&(t=advance())){if(t===l){U=q.backslashes=true;advance();continue}if(t===S){N=q.isBracket=true;D=q.isGlob=true;V=true;break}}if(O===true){continue}break}if(i.nonegate!==true&&W===d&&T===C){B=q.negated=true;C++;continue}if(i.noparen!==true&&W===g){D=q.isGlob=true;if(O===true){while(eos()!==true&&(W=advance())){if(W===g){U=q.backslashes=true;W=advance();continue}if(W===E){V=true;break}}continue}break}if(D===true){V=true;if(O===true){continue}break}}if(i.noext===true){L=false;D=false}let K=x;let Y="";let Z="";if(C>0){Y=x.slice(0,C);x=x.slice(C);k-=C}if(K&&D===true&&k>0){K=x.slice(0,k);Z=x.slice(k)}else if(D===true){K="";Z=x}else{K=x}if(K&&K!==""&&K!=="/"&&K!==x){if(isPathSeparator(K.charCodeAt(K.length-1))){K=K.slice(0,-1)}}if(i.unescape===true){if(Z)Z=o.removeBackslashes(Z);if(K&&U===true){K=o.removeBackslashes(K)}}const X={prefix:Y,input:t,start:C,base:K,glob:Z,isBrace:I,isBracket:N,isGlob:D,isExtglob:L,isGlobstar:M,negated:B,negatedExtglob:H};if(i.tokens===true){X.maxDepth=0;if(!isPathSeparator(W)){P.push(q)}X.tokens=P}if(i.parts===true||i.tokens===true){let r;for(let o=0;o<R.length;o++){const a=r?r+1:C;const c=R[o];const l=t.slice(a,c);if(i.tokens){if(o===0&&C!==0){P[o].isPrefix=true;P[o].value=Y}else{P[o].value=l}depth(P[o]);X.maxDepth+=P[o].depth}if(o!==0||l!==""){A.push(l)}r=c}if(r&&r+1<t.length){const o=t.slice(r+1);A.push(o);if(i.tokens){P[P.length-1].value=o;depth(P[P.length-1]);X.maxDepth+=P[P.length-1].depth}}X.slashes=R;X.parts=A}return X};t.exports=scan},7910:(t,r,i)=>{"use strict";const o=i(6928);const a=process.platform==="win32";const{REGEX_BACKSLASH:c,REGEX_REMOVE_BACKSLASH:l,REGEX_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_GLOBAL:h}=i(7054);r.isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);r.hasRegexChars=t=>u.test(t);r.isRegexChar=t=>t.length===1&&r.hasRegexChars(t);r.escapeRegex=t=>t.replace(h,"\\$1");r.toPosixSlashes=t=>t.replace(c,"/");r.removeBackslashes=t=>t.replace(l,(t=>t==="\\"?"":t));r.supportsLookbehinds=()=>{const t=process.version.slice(1).split(".").map(Number);if(t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10){return true}return false};r.isWindows=t=>{if(t&&typeof t.windows==="boolean"){return t.windows}return a===true||o.sep==="\\"};r.escapeLast=(t,i,o)=>{const a=t.lastIndexOf(i,o);if(a===-1)return t;if(t[a-1]==="\\")return r.escapeLast(t,i,a-1);return`${t.slice(0,a)}\\${t.slice(a)}`};r.removePrefix=(t,r={})=>{let i=t;if(i.startsWith("./")){i=i.slice(2);r.prefix="./"}return i};r.wrapOutput=(t,r={},i={})=>{const o=i.contains?"":"^";const a=i.contains?"":"$";let c=`${o}(?:${t})${a}`;if(r.negated===true){c=`(?:^(?!${c}).*$)`}return c}},3066:t=>{"use strict";class DatePart{constructor({token:t,date:r,parts:i,locales:o}){this.token=t;this.date=r||new Date;this.parts=i||[this];this.locales=o||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((r,i)=>i>t&&r instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const r=t.indexOf(this);return t.find(((t,i)=>i>r&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},4477:(t,r,i)=>{"use strict";const o=i(3066);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends o{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate();let r=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:t}}t.exports=Day},7524:(t,r,i)=>{"use strict";const o=i(3066);class Hours extends o{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();if(/h/.test(this.token))t=t%12||12;return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Hours},8691:(t,r,i)=>{"use strict";t.exports={DatePart:i(3066),Meridiem:i(2513),Day:i(4477),Hours:i(7524),Milliseconds:i(8521),Minutes:i(8042),Month:i(3153),Seconds:i(150),Year:i(3082)}},2513:(t,r,i)=>{"use strict";const o=i(3066);class Meridiem extends o{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}t.exports=Meridiem},8521:(t,r,i)=>{"use strict";const o=i(3066);class Milliseconds extends o{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}t.exports=Milliseconds},8042:(t,r,i)=>{"use strict";const o=i(3066);class Minutes extends o{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Minutes},3153:(t,r,i)=>{"use strict";const o=i(3066);class Month extends o{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1;this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth();let r=this.token.length;return r===2?String(t+1).padStart(2,"0"):r===3?this.locales.monthsShort[t]:r===4?this.locales.months[t]:String(t+1)}}t.exports=Month},150:(t,r,i)=>{"use strict";const o=i(3066);class Seconds extends o{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Seconds},3082:(t,r,i)=>{"use strict";const o=i(3066);class Year extends o{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}t.exports=Year},8700:(t,r,i)=>{"use strict";function asyncGeneratorStep(t,r,i,o,a,c,l){try{var u=t[c](l);var h=u.value}catch(t){i(t);return}if(u.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var c=t.apply(r,i);function _next(t){asyncGeneratorStep(c,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(c,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(5665);const a=i(7930);const c=i(9458),l=c.erase,u=c.cursor;const h=i(5431),d=h.style,p=h.clear,m=h.figures,g=h.wrap,y=h.entriesToDisplay;const getVal=(t,r)=>t[r]&&(t[r].value||t[r].title||t[r]);const getTitle=(t,r)=>t[r]&&(t[r].title||t[r].value||t[r]);const getIndex=(t,r)=>{const i=t.findIndex((t=>t.value===r||t.title===r));return i>-1?i:undefined};class AutocompletePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.suggest=t.suggest;this.choices=t.choices;this.initial=typeof t.initial==="number"?t.initial:getIndex(t.choices,t.initial);this.select=this.initial||t.cursor||0;this.i18n={noMatches:t.noMatches||"no matches found"};this.fallback=t.fallback||this.initial;this.clearFirst=t.clearFirst||false;this.suggestions=[];this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=d.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=p("",this.out.columns);this.complete(this.render);this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;if(typeof this._fb==="number")t=this.choices[this._fb];else if(typeof this._fb==="string")t={title:this._fb};return t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t;if(this.suggestions.length>0)this.value=getVal(this.suggestions,t);else this.value=this.fallback.value;this.fire()}complete(t){var r=this;return _asyncToGenerator((function*(){const i=r.completing=r.suggest(r.input,r.choices);const o=yield i;if(r.completing!==i)return;r.suggestions=o.map(((t,r,i)=>({title:getTitle(i,r),value:getVal(i,r),description:t.description})));r.completing=false;const a=Math.max(o.length-1,0);r.moveSelect(Math.min(a,r.select));t&&t()}))()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}exit(){if(this.clearFirst&&this.input.length>0){this.reset()}else{this.done=this.exited=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}abort(){this.done=this.aborted=true;this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,r){let i=this.input.slice(0,this.cursor);let o=this.input.slice(this.cursor);this.input=`${i}${t}${o}`;this.cursor=i.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1);let r=this.input.slice(this.cursor);this.input=`${t}${r}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor);let r=this.input.slice(this.cursor+1);this.input=`${t}${r}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions.length-1);this.render()}up(){if(this.select===0){this.moveSelect(this.suggestions.length-1)}else{this.moveSelect(this.select-1)}this.render()}down(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else{this.moveSelect(this.select+1)}this.render()}next(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1));this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0));this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}renderOption(t,r,i,a){let c;let l=i?m.arrowUp:a?m.arrowDown:" ";let u=r?o.cyan().underline(t.title):t.title;l=(r?o.cyan(m.pointer)+" ":" ")+l;if(t.description){c=` - ${t.description}`;if(l.length+u.length+c.length>=this.out.columns||t.description.split(/\r?\n/).length>1){c="\n"+g(t.description,{margin:3,width:this.out.columns})}}return l+" "+u+o.gray(c||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);else this.out.write(p(this.outputText,this.out.columns));super.render();let t=y(this.select,this.choices.length,this.limit),r=t.startIndex,i=t.endIndex;this.outputText=[d.symbol(this.done,this.aborted,this.exited),o.bold(this.msg),d.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" ");if(!this.done){const t=this.suggestions.slice(r,i).map(((t,o)=>this.renderOption(t,this.select===o+r,o===0&&r>0,o+r===i-1&&i<this.choices.length))).join("\n");this.outputText+=`\n`+(t||o.gray(this.fallback.title))}this.out.write(l.line+u.to(0)+this.outputText)}}t.exports=AutocompletePrompt},6727:(t,r,i)=>{"use strict";const o=i(5665);const a=i(9458),c=a.cursor;const l=i(4963);const u=i(5431),h=u.clear,d=u.style,p=u.figures;class AutocompleteMultiselectPrompt extends l{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=h("",this.out.columns);this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>{if(this.inputValue){if(typeof t.title==="string"){if(t.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof t.value==="string"){if(t.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const r=this.filteredOptions.findIndex((r=>r===t));this.cursor=r<0?0:r;this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t;this.updateFilteredOptions()}_(t,r){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return`\nInstructions:\n ${p.arrowUp}/${p.arrowDown}: Highlight option\n ${p.arrowLeft}/${p.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`}return""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:o.gray("Enter something to filter")}\n`}renderOption(t,r,i){let a;if(r.disabled)a=t===i?o.gray().underline(r.title):o.strikethrough().gray(r.title);else a=t===i?o.cyan().underline(r.title):r.title;return(r.selected?o.green(p.radioOn):p.radioOff)+" "+a}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[o.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(o.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(c.hide);super.render();let t=[d.symbol(this.done,this.aborted),o.bold(this.msg),d.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=o.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+t);this.clear=h(t,this.out.columns)}}t.exports=AutocompleteMultiselectPrompt},4966:(t,r,i)=>{"use strict";const o=i(5665);const a=i(7930);const c=i(5431),l=c.style,u=c.clear;const h=i(9458),d=h.erase,p=h.cursor;class ConfirmPrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.value=t.initial;this.initialValue=!!t.initial;this.yesMsg=t.yes||"yes";this.yesOption=t.yesOption||"(Y/n)";this.noMsg=t.no||"no";this.noOption=t.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,r){if(t.toLowerCase()==="y"){this.value=true;return this.submit()}if(t.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(p.hide);else this.out.write(u(this.outputText,this.out.columns));super.render();this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:o.gray(this.initialValue?this.yesOption:this.noOption)].join(" ");this.out.write(d.line+p.to(0)+this.outputText)}}t.exports=ConfirmPrompt},2260:(t,r,i)=>{"use strict";function asyncGeneratorStep(t,r,i,o,a,c,l){try{var u=t[c](l);var h=u.value}catch(t){i(t);return}if(u.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var c=t.apply(r,i);function _next(t){asyncGeneratorStep(c,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(c,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(5665);const a=i(7930);const c=i(5431),l=c.style,u=c.clear,h=c.figures;const d=i(9458),p=d.erase,m=d.cursor;const g=i(8691),y=g.DatePart,v=g.Meridiem,b=g.Day,w=g.Hours,E=g.Milliseconds,S=g.Minutes,$=g.Month,O=g.Seconds,R=g.Year;const P=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const A={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new b(t),3:t=>new $(t),4:t=>new R(t),5:t=>new v(t),6:t=>new w(t),7:t=>new S(t),8:t=>new O(t),9:t=>new E(t)};const x={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(x,t.locales);this._date=t.initial||new Date;this.errorMsg=t.error||"Please Enter A Valid Value";this.validator=t.validate||(()=>true);this.mask=t.mask||"YYYY-MM-DD HH:mm:ss";this.clear=u("",this.out.columns);this.render()}get value(){return this.date}get date(){return this._date}set date(t){if(t)this._date.setTime(t.getTime())}set mask(t){let r;this.parts=[];while(r=P.exec(t)){let t=r.shift();let i=r.findIndex((t=>t!=null));this.parts.push(i in A?A[i]({token:r[i]||t,date:this.date,parts:this.parts,locales:this.locales}):r[i]||t)}let i=this.parts.reduce(((t,r)=>{if(typeof r==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=r;else t.push(r);return t}),[]);this.parts.splice(0);this.parts.push(...i);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof y)));this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let r=yield t.validator(t.value);if(typeof r==="string"){t.errorMsg=r;r=false}t.error=!r}))()}submit(){var t=this;return _asyncToGenerator((function*(){yield t.validate();if(t.error){t.color="red";t.fire();t.render();return}t.done=true;t.aborted=false;t.fire();t.render();t.out.write("\n");t.close()}))()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof y)));this.render()}_(t){if(/\d/.test(t)){this.typed+=t;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(m.hide);else this.out.write(u(this.outputText,this.out.columns));super.render();this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(false),this.parts.reduce(((t,r,i)=>t.concat(i===this.cursor&&!this.done?o.cyan().underline(r.toString()):r)),[]).join("")].join(" ");if(this.error){this.outputText+=this.errorMsg.split("\n").reduce(((t,r,i)=>t+`\n${i?` `:h.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(p.line+m.to(0)+this.outputText)}}t.exports=DatePrompt},362:(t,r,i)=>{"use strict";t.exports={TextPrompt:i(2875),SelectPrompt:i(3440),TogglePrompt:i(4796),DatePrompt:i(2260),NumberPrompt:i(6157),MultiselectPrompt:i(4963),AutocompletePrompt:i(8700),AutocompleteMultiselectPrompt:i(6727),ConfirmPrompt:i(4966)}},4963:(t,r,i)=>{"use strict";const o=i(5665);const a=i(9458),c=a.cursor;const l=i(7930);const u=i(5431),h=u.clear,d=u.figures,p=u.style,m=u.wrap,g=u.entriesToDisplay;class MultiselectPrompt extends l{constructor(t={}){super(t);this.msg=t.message;this.cursor=t.cursor||0;this.scrollIndex=t.cursor||0;this.hint=t.hint||"";this.warn=t.warn||"- This option is disabled -";this.minSelected=t.min;this.showMinError=false;this.maxChoices=t.max;this.instructions=t.instructions;this.optionsPerPage=t.optionsPerPage||10;this.value=t.choices.map(((t,r)=>{if(typeof t==="string")t={title:t,value:r};return{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(t.value===undefined?r:t.value),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=h("",this.out.columns);if(!t.overrideRender){this.render()}}reset(){this.value.map((t=>!t.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((t=>t.selected))}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const t=this.value.filter((t=>t.selected));if(this.minSelected&&t.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}toggleAll(){if(this.maxChoices!==undefined||this.value[this.cursor].disabled){return this.bell()}const t=!this.value[this.cursor].selected;this.value.filter((t=>!t.disabled)).forEach((r=>r.selected=t));this.render()}_(t,r){if(t===" "){this.handleSpaceToggle()}else if(t==="a"){this.toggleAll()}else{return this.bell()}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return"\nInstructions:\n"+` ${d.arrowUp}/${d.arrowDown}: Highlight option\n`+` ${d.arrowLeft}/${d.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===undefined?` a: Toggle all\n`:"")+` enter/return: Complete answer`}return""}renderOption(t,r,i,a){const c=(r.selected?o.green(d.radioOn):d.radioOff)+" "+a+" ";let l,u;if(r.disabled){l=t===i?o.gray().underline(r.title):o.strikethrough().gray(r.title)}else{l=t===i?o.cyan().underline(r.title):r.title;if(t===i&&r.description){u=` - ${r.description}`;if(c.length+l.length+u.length>=this.out.columns||r.description.split(/\r?\n/).length>1){u="\n"+m(r.description,{margin:c.length,width:this.out.columns})}}}return c+l+o.gray(u||"")}paginateOptions(t){if(t.length===0){return o.red("No matches for this query.")}let r=g(this.cursor,t.length,this.optionsPerPage),i=r.startIndex,a=r.endIndex;let c,l=[];for(let r=i;r<a;r++){if(r===i&&i>0){c=d.arrowUp}else if(r===a-1&&a<t.length){c=d.arrowDown}else{c=" "}l.push(this.renderOption(this.cursor,t[r],r,c))}return"\n"+l.join("\n")}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[o.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(o.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(c.hide);super.render();let t=[p.symbol(this.done,this.aborted),o.bold(this.msg),p.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=o.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.value);this.out.write(this.clear+t);this.clear=h(t,this.out.columns)}}t.exports=MultiselectPrompt},6157:(t,r,i)=>{"use strict";function asyncGeneratorStep(t,r,i,o,a,c,l){try{var u=t[c](l);var h=u.value}catch(t){i(t);return}if(u.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var c=t.apply(r,i);function _next(t){asyncGeneratorStep(c,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(c,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(5665);const a=i(7930);const c=i(9458),l=c.cursor,u=c.erase;const h=i(5431),d=h.style,p=h.figures,m=h.clear,g=h.lines;const y=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,r)=>{let i=Math.pow(10,r);return Math.round(t*i)/i};class NumberPrompt extends a{constructor(t={}){super(t);this.transform=d.render(t.style);this.msg=t.message;this.initial=isDef(t.initial)?t.initial:"";this.float=!!t.float;this.round=t.round||2;this.inc=t.increment||1;this.min=isDef(t.min)?t.min:-Infinity;this.max=isDef(t.max)?t.max:Infinity;this.errorMsg=t.error||`Please Enter A Valid Value`;this.validator=t.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(t){if(!t&&t!==0){this.placeholder=true;this.rendered=o.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(t,this.round)}`);this._value=round(t,this.round)}this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t===`-`||t===`.`&&this.float||y.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=t!==``?t:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let r=yield t.validator(t.value);if(typeof r===`string`){t.errorMsg=r;r=false}t.error=!r}))()}submit(){var t=this;return _asyncToGenerator((function*(){yield t.validate();if(t.error){t.color=`red`;t.fire();t.render();return}let r=t.value;t.value=r!==``?r:t.initial;t.done=true;t.aborted=false;t.error=false;t.fire();t.render();t.out.write(`\n`);t.close()}))()}up(){this.typed=``;if(this.value===""){this.value=this.min-this.inc}if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value===""){this.value=this.min+this.inc}if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||``;if(this.value!==""&&this.value<this.min){this.value=this.min}this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,r){if(!this.valid(t))return this.bell();const i=Date.now();if(i-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=i;this.color=`cyan`;if(t===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(l.down(g(this.outputError,this.out.columns)-1)+m(this.outputError,this.out.columns));this.out.write(m(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[d.symbol(this.done,this.aborted),o.bold(this.msg),d.delimiter(this.done),!this.done||!this.done&&!this.placeholder?o[this.color]().underline(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,r,i)=>t+`\n${i?` `:p.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(u.line+l.to(0)+this.outputText+l.save+this.outputError+l.restore)}}t.exports=NumberPrompt},7930:(t,r,i)=>{"use strict";const o=i(3785);const a=i(5431),c=a.action;const l=i(4434);const u=i(9458),h=u.beep,d=u.cursor;const p=i(5665);class Prompt extends l{constructor(t={}){super();this.firstRender=true;this.in=t.stdin||process.stdin;this.out=t.stdout||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const r=o.createInterface({input:this.in,escapeCodeTimeout:50});o.emitKeypressEvents(this.in,r);if(this.in.isTTY)this.in.setRawMode(true);const i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1;const keypress=(t,r)=>{let o=c(r,i);if(o===false){this._&&this._(t,r)}else if(typeof this[o]==="function"){this[o](r)}else{this.bell()}};this.close=()=>{this.out.write(d.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);r.close();this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(h)}render(){this.onRender(p);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},3440:(t,r,i)=>{"use strict";const o=i(5665);const a=i(7930);const c=i(5431),l=c.style,u=c.clear,h=c.figures,d=c.wrap,p=c.entriesToDisplay;const m=i(9458),g=m.cursor;class SelectPrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.hint=t.hint||"- Use arrow-keys. Return to submit.";this.warn=t.warn||"- This option is disabled";this.cursor=t.initial||0;this.choices=t.choices.map(((t,r)=>{if(typeof t==="string")t={title:t,value:r};return{title:t&&(t.title||t.value||t),value:t&&(t.value===undefined?r:t.value),description:t&&t.description,selected:t&&t.selected,disabled:t&&t.disabled}}));this.optionsPerPage=t.optionsPerPage||10;this.value=(this.choices[this.cursor]||{}).value;this.clear=u("",this.out.columns);this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0){this.moveCursor(this.choices.length-1)}else{this.moveCursor(this.cursor-1)}this.render()}down(){if(this.cursor===this.choices.length-1){this.moveCursor(0)}else{this.moveCursor(this.cursor+1)}this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,r){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(g.hide);else this.out.write(u(this.outputText,this.out.columns));super.render();let t=p(this.cursor,this.choices.length,this.optionsPerPage),r=t.startIndex,i=t.endIndex;this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(false),this.done?this.selection.title:this.selection.disabled?o.yellow(this.warn):o.gray(this.hint)].join(" ");if(!this.done){this.outputText+="\n";for(let t=r;t<i;t++){let a,c,l="",u=this.choices[t];if(t===r&&r>0){c=h.arrowUp}else if(t===i-1&&i<this.choices.length){c=h.arrowDown}else{c=" "}if(u.disabled){a=this.cursor===t?o.gray().underline(u.title):o.strikethrough().gray(u.title);c=(this.cursor===t?o.bold().gray(h.pointer)+" ":" ")+c}else{a=this.cursor===t?o.cyan().underline(u.title):u.title;c=(this.cursor===t?o.cyan(h.pointer)+" ":" ")+c;if(u.description&&this.cursor===t){l=` - ${u.description}`;if(c.length+a.length+l.length>=this.out.columns||u.description.split(/\r?\n/).length>1){l="\n"+d(u.description,{margin:3,width:this.out.columns})}}}this.outputText+=`${c} ${a}${o.gray(l)}\n`}}this.out.write(this.outputText)}}t.exports=SelectPrompt},2875:(t,r,i)=>{"use strict";function asyncGeneratorStep(t,r,i,o,a,c,l){try{var u=t[c](l);var h=u.value}catch(t){i(t);return}if(u.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var c=t.apply(r,i);function _next(t){asyncGeneratorStep(c,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(c,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(5665);const a=i(7930);const c=i(9458),l=c.erase,u=c.cursor;const h=i(5431),d=h.style,p=h.clear,m=h.lines,g=h.figures;class TextPrompt extends a{constructor(t={}){super(t);this.transform=d.render(t.style);this.scale=this.transform.scale;this.msg=t.message;this.initial=t.initial||``;this.validator=t.validate||(()=>true);this.value=``;this.errorMsg=t.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.clear=p(``,this.out.columns);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=o.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(t)}this._value=t;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.fire();this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let r=yield t.validator(t.value);if(typeof r===`string`){t.errorMsg=r;r=false}t.error=!r}))()}submit(){var t=this;return _asyncToGenerator((function*(){t.value=t.value||t.initial;t.cursorOffset=0;t.cursor=t.rendered.length;yield t.validate();if(t.error){t.red=true;t.fire();t.render();return}t.done=true;t.aborted=false;t.fire();t.render();t.out.write("\n");t.close()}))()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(t){if(this.placeholder)return;this.cursor=this.cursor+t;this.cursorOffset+=t}_(t,r){let i=this.value.slice(0,this.cursor);let o=this.value.slice(this.cursor);this.value=`${i}${t}${o}`;this.red=false;this.cursor=this.placeholder?0:i.length+1;this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1);let r=this.value.slice(this.cursor);this.value=`${t}${r}`;this.red=false;if(this.isCursorAtStart()){this.cursorOffset=0}else{this.cursorOffset++;this.moveCursor(-1)}this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor);let r=this.value.slice(this.cursor+1);this.value=`${t}${r}`;this.red=false;if(this.isCursorAtEnd()){this.cursorOffset=0}else{this.cursorOffset++}this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(u.down(m(this.outputError,this.out.columns)-1)+p(this.outputError,this.out.columns));this.out.write(p(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[d.symbol(this.done,this.aborted),o.bold(this.msg),d.delimiter(this.done),this.red?o.red(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,r,i)=>t+`\n${i?" ":g.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(l.line+u.to(0)+this.outputText+u.save+this.outputError+u.restore+u.move(this.cursorOffset,0))}}t.exports=TextPrompt},4796:(t,r,i)=>{"use strict";const o=i(5665);const a=i(7930);const c=i(5431),l=c.style,u=c.clear;const h=i(9458),d=h.cursor,p=h.erase;class TogglePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.value=!!t.initial;this.active=t.active||"on";this.inactive=t.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(t,r){if(t===" "){this.value=!this.value}else if(t==="1"){this.value=true}else if(t==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(d.hide);else this.out.write(u(this.outputText,this.out.columns));super.render();this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(this.done),this.value?this.inactive:o.cyan().underline(this.inactive),o.gray("/"),this.value?o.cyan().underline(this.active):this.active].join(" ");this.out.write(p.line+d.to(0)+this.outputText)}}t.exports=TogglePrompt},9086:(t,r,i)=>{"use strict";function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);if(r){o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))}i.push.apply(i,o)}return i}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};if(r%2){ownKeys(Object(i),true).forEach((function(r){_defineProperty(t,r,i[r])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(t,Object.getOwnPropertyDescriptors(i))}else{ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}}return t}function _defineProperty(t,r,i){if(r in t){Object.defineProperty(t,r,{value:i,enumerable:true,configurable:true,writable:true})}else{t[r]=i}return t}function _createForOfIteratorHelper(t,r){var i=typeof Symbol!=="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&typeof t.length==="number"){if(i)t=i;var o=0;var a=function F(){};return{s:a,n:function n(){if(o>=t.length)return{done:true};return{done:false,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c=true,l=false,u;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=true;u=t},f:function f(){try{if(!c&&i.return!=null)i.return()}finally{if(l)throw u}}}}function _unsupportedIterableToArray(t,r){if(!t)return;if(typeof t==="string")return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor)i=t.constructor.name;if(i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}function _arrayLikeToArray(t,r){if(r==null||r>t.length)r=t.length;for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function asyncGeneratorStep(t,r,i,o,a,c,l){try{var u=t[c](l);var h=u.value}catch(t){i(t);return}if(u.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var c=t.apply(r,i);function _next(t){asyncGeneratorStep(c,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(c,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(2557);const a=["suggest","format","onState","validate","onRender","type"];const noop=()=>{};function prompt(){return _prompt.apply(this,arguments)}function _prompt(){_prompt=_asyncToGenerator((function*(t=[],{onSubmit:r=noop,onCancel:i=noop}={}){const c={};const l=prompt._override||{};t=[].concat(t);let u,h,d,p,m,g;const y=function(){var t=_asyncToGenerator((function*(t,r,i=false){if(!i&&t.validate&&t.validate(r)!==true){return}return t.format?yield t.format(r,c):r}));return function getFormattedAnswer(r,i){return t.apply(this,arguments)}}();var v=_createForOfIteratorHelper(t),b;try{for(v.s();!(b=v.n()).done;){h=b.value;var w=h;p=w.name;m=w.type;if(typeof m==="function"){m=yield m(u,_objectSpread({},c),h);h["type"]=m}if(!m)continue;for(let t in h){if(a.includes(t))continue;let r=h[t];h[t]=typeof r==="function"?yield r(u,_objectSpread({},c),g):r}g=h;if(typeof h.message!=="string"){throw new Error("prompt message is required")}var E=h;p=E.name;m=E.type;if(o[m]===void 0){throw new Error(`prompt type (${m}) is not defined`)}if(l[h.name]!==undefined){u=yield y(h,l[h.name]);if(u!==undefined){c[p]=u;continue}}try{u=prompt._injected?getInjectedAnswer(prompt._injected,h.initial):yield o[m](h);c[p]=u=yield y(h,u,true);d=yield r(h,u,c)}catch(t){d=!(yield i(h,c))}if(d)return c}}catch(t){v.e(t)}finally{v.f()}return c}));return _prompt.apply(this,arguments)}function getInjectedAnswer(t,r){const i=t.shift();if(i instanceof Error){throw i}return i===undefined?r:i}function inject(t){prompt._injected=(prompt._injected||[]).concat(t)}function override(t){prompt._override=Object.assign({},t)}t.exports=Object.assign(prompt,{prompt:prompt,prompts:o,inject:inject,override:override})},2557:(t,r,i)=>{"use strict";const o=r;const a=i(362);const noop=t=>t;function toPrompt(t,r,i={}){return new Promise(((o,c)=>{const l=new a[t](r);const u=i.onAbort||noop;const h=i.onSubmit||noop;const d=i.onExit||noop;l.on("state",r.onState||noop);l.on("submit",(t=>o(h(t))));l.on("exit",(t=>o(d(t))));l.on("abort",(t=>c(u(t))))}))}o.text=t=>toPrompt("TextPrompt",t);o.password=t=>{t.style="password";return o.text(t)};o.invisible=t=>{t.style="invisible";return o.text(t)};o.number=t=>toPrompt("NumberPrompt",t);o.date=t=>toPrompt("DatePrompt",t);o.confirm=t=>toPrompt("ConfirmPrompt",t);o.list=t=>{const r=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(r).map((t=>t.trim()))})};o.toggle=t=>toPrompt("TogglePrompt",t);o.select=t=>toPrompt("SelectPrompt",t);o.multiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("MultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};o.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("AutocompleteMultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(t,r)=>Promise.resolve(r.filter((r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));o.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},5377:t=>{"use strict";t.exports=(t,r)=>{if(t.meta&&t.name!=="escape")return;if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(r){if(t.name==="j")return"down";if(t.name==="k")return"up"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"exit";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="home")return"home";if(t.name==="end")return"end";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return false}},5202:(t,r,i)=>{"use strict";function _createForOfIteratorHelper(t,r){var i=typeof Symbol!=="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&typeof t.length==="number"){if(i)t=i;var o=0;var a=function F(){};return{s:a,n:function n(){if(o>=t.length)return{done:true};return{done:false,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c=true,l=false,u;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=true;u=t},f:function f(){try{if(!c&&i.return!=null)i.return()}finally{if(l)throw u}}}}function _unsupportedIterableToArray(t,r){if(!t)return;if(typeof t==="string")return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor)i=t.constructor.name;if(i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}function _arrayLikeToArray(t,r){if(r==null||r>t.length)r=t.length;for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}const o=i(4165);const a=i(9458),c=a.erase,l=a.cursor;const width=t=>[...o(t)].length;t.exports=function(t,r){if(!r)return c.line+l.to(0);let i=0;const o=t.split(/\r?\n/);var a=_createForOfIteratorHelper(o),u;try{for(a.s();!(u=a.n()).done;){let t=u.value;i+=1+Math.floor(Math.max(width(t)-1,0)/r)}}catch(t){a.e(t)}finally{a.f()}return c.lines(i)}},9022:t=>{"use strict";t.exports=(t,r,i)=>{i=i||r;let o=Math.min(r-i,t-Math.floor(i/2));if(o<0)o=0;let a=Math.min(o+i,r);return{startIndex:o,endIndex:a}}},1702:t=>{"use strict";const r={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const i={arrowUp:r.arrowUp,arrowDown:r.arrowDown,arrowLeft:r.arrowLeft,arrowRight:r.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const o=process.platform==="win32"?i:r;t.exports=o},5431:(t,r,i)=>{"use strict";t.exports={action:i(5377),clear:i(5202),style:i(1130),strip:i(4165),figures:i(1702),lines:i(1924),wrap:i(7359),entriesToDisplay:i(9022)}},1924:(t,r,i)=>{"use strict";const o=i(4165);t.exports=function(t,r){let i=String(o(t)||"").split(/\r?\n/);if(!r)return i.length;return i.map((t=>Math.ceil(t.length/r))).reduce(((t,r)=>t+r))}},4165:t=>{"use strict";t.exports=t=>{const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const i=new RegExp(r,"g");return typeof t==="string"?t.replace(i,""):t}},1130:(t,r,i)=>{"use strict";const o=i(5665);const a=i(1702);const c=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}});const render=t=>c[t]||c.default;const l=Object.freeze({aborted:o.red(a.cross),done:o.green(a.tick),exited:o.yellow(a.cross),default:o.cyan("?")});const symbol=(t,r,i)=>r?l.aborted:i?l.exited:t?l.done:l.default;const delimiter=t=>o.gray(t?a.ellipsis:a.pointerSmall);const item=(t,r)=>o.gray(t?r?a.pointerSmall:"+":a.line);t.exports={styles:c,render:render,symbols:l,symbol:symbol,delimiter:delimiter,item:item}},7359:t=>{"use strict";t.exports=(t,r={})=>{const i=Number.isSafeInteger(parseInt(r.margin))?new Array(parseInt(r.margin)).fill(" ").join(""):r.margin||"";const o=r.width;return(t||"").split(/\r?\n/g).map((t=>t.split(/\s+/g).reduce(((t,r)=>{if(r.length+i.length>=o||t[t.length-1].length+r.length+1<o)t[t.length-1]+=` ${r}`;else t.push(`${i}${r}`);return t}),[i]).join("\n"))).join("\n")}},6133:(t,r,i)=>{function isNodeLT(t){t=(Array.isArray(t)?t:t.split(".")).map(Number);let r=0,i=process.versions.node.split(".").map(Number);for(;r<t.length;r++){if(i[r]>t[r])return false;if(t[r]>i[r])return true}return false}t.exports=isNodeLT("8.6.0")?i(9086):i(365)},7615:t=>{"use strict";class DatePart{constructor({token:t,date:r,parts:i,locales:o}){this.token=t;this.date=r||new Date;this.parts=i||[this];this.locales=o||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((r,i)=>i>t&&r instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const r=t.indexOf(this);return t.find(((t,i)=>i>r&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},5486:(t,r,i)=>{"use strict";const o=i(7615);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends o{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate();let r=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:t}}t.exports=Day},7411:(t,r,i)=>{"use strict";const o=i(7615);class Hours extends o{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();if(/h/.test(this.token))t=t%12||12;return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Hours},5232:(t,r,i)=>{"use strict";t.exports={DatePart:i(7615),Meridiem:i(7664),Day:i(5486),Hours:i(7411),Milliseconds:i(1067),Minutes:i(1897),Month:i(222),Seconds:i(853),Year:i(3211)}},7664:(t,r,i)=>{"use strict";const o=i(7615);class Meridiem extends o{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}t.exports=Meridiem},1067:(t,r,i)=>{"use strict";const o=i(7615);class Milliseconds extends o{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}t.exports=Milliseconds},1897:(t,r,i)=>{"use strict";const o=i(7615);class Minutes extends o{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Minutes},222:(t,r,i)=>{"use strict";const o=i(7615);class Month extends o{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1;this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth();let r=this.token.length;return r===2?String(t+1).padStart(2,"0"):r===3?this.locales.monthsShort[t]:r===4?this.locales.months[t]:String(t+1)}}t.exports=Month},853:(t,r,i)=>{"use strict";const o=i(7615);class Seconds extends o{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Seconds},3211:(t,r,i)=>{"use strict";const o=i(7615);class Year extends o{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}t.exports=Year},8643:(t,r,i)=>{"use strict";const o=i(5665);const a=i(457);const{erase:c,cursor:l}=i(9458);const{style:u,clear:h,figures:d,wrap:p,entriesToDisplay:m}=i(9398);const getVal=(t,r)=>t[r]&&(t[r].value||t[r].title||t[r]);const getTitle=(t,r)=>t[r]&&(t[r].title||t[r].value||t[r]);const getIndex=(t,r)=>{const i=t.findIndex((t=>t.value===r||t.title===r));return i>-1?i:undefined};class AutocompletePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.suggest=t.suggest;this.choices=t.choices;this.initial=typeof t.initial==="number"?t.initial:getIndex(t.choices,t.initial);this.select=this.initial||t.cursor||0;this.i18n={noMatches:t.noMatches||"no matches found"};this.fallback=t.fallback||this.initial;this.clearFirst=t.clearFirst||false;this.suggestions=[];this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=u.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=h("",this.out.columns);this.complete(this.render);this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;if(typeof this._fb==="number")t=this.choices[this._fb];else if(typeof this._fb==="string")t={title:this._fb};return t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t;if(this.suggestions.length>0)this.value=getVal(this.suggestions,t);else this.value=this.fallback.value;this.fire()}async complete(t){const r=this.completing=this.suggest(this.input,this.choices);const i=await r;if(this.completing!==r)return;this.suggestions=i.map(((t,r,i)=>({title:getTitle(i,r),value:getVal(i,r),description:t.description})));this.completing=false;const o=Math.max(i.length-1,0);this.moveSelect(Math.min(o,this.select));t&&t()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}exit(){if(this.clearFirst&&this.input.length>0){this.reset()}else{this.done=this.exited=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}abort(){this.done=this.aborted=true;this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,r){let i=this.input.slice(0,this.cursor);let o=this.input.slice(this.cursor);this.input=`${i}${t}${o}`;this.cursor=i.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1);let r=this.input.slice(this.cursor);this.input=`${t}${r}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor);let r=this.input.slice(this.cursor+1);this.input=`${t}${r}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions.length-1);this.render()}up(){if(this.select===0){this.moveSelect(this.suggestions.length-1)}else{this.moveSelect(this.select-1)}this.render()}down(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else{this.moveSelect(this.select+1)}this.render()}next(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1));this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0));this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}renderOption(t,r,i,a){let c;let l=i?d.arrowUp:a?d.arrowDown:" ";let u=r?o.cyan().underline(t.title):t.title;l=(r?o.cyan(d.pointer)+" ":" ")+l;if(t.description){c=` - ${t.description}`;if(l.length+u.length+c.length>=this.out.columns||t.description.split(/\r?\n/).length>1){c="\n"+p(t.description,{margin:3,width:this.out.columns})}}return l+" "+u+o.gray(c||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(l.hide);else this.out.write(h(this.outputText,this.out.columns));super.render();let{startIndex:t,endIndex:r}=m(this.select,this.choices.length,this.limit);this.outputText=[u.symbol(this.done,this.aborted,this.exited),o.bold(this.msg),u.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" ");if(!this.done){const i=this.suggestions.slice(t,r).map(((i,o)=>this.renderOption(i,this.select===o+t,o===0&&t>0,o+t===r-1&&r<this.choices.length))).join("\n");this.outputText+=`\n`+(i||o.gray(this.fallback.title))}this.out.write(c.line+l.to(0)+this.outputText)}}t.exports=AutocompletePrompt},8005:(t,r,i)=>{"use strict";const o=i(5665);const{cursor:a}=i(9458);const c=i(1926);const{clear:l,style:u,figures:h}=i(9398);class AutocompleteMultiselectPrompt extends c{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=l("",this.out.columns);this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>{if(this.inputValue){if(typeof t.title==="string"){if(t.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof t.value==="string"){if(t.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const r=this.filteredOptions.findIndex((r=>r===t));this.cursor=r<0?0:r;this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t;this.updateFilteredOptions()}_(t,r){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return`\nInstructions:\n ${h.arrowUp}/${h.arrowDown}: Highlight option\n ${h.arrowLeft}/${h.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`}return""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:o.gray("Enter something to filter")}\n`}renderOption(t,r,i){let a;if(r.disabled)a=t===i?o.gray().underline(r.title):o.strikethrough().gray(r.title);else a=t===i?o.cyan().underline(r.title):r.title;return(r.selected?o.green(h.radioOn):h.radioOff)+" "+a}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[o.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(o.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);super.render();let t=[u.symbol(this.done,this.aborted),o.bold(this.msg),u.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=o.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+t);this.clear=l(t,this.out.columns)}}t.exports=AutocompleteMultiselectPrompt},7812:(t,r,i)=>{const o=i(5665);const a=i(457);const{style:c,clear:l}=i(9398);const{erase:u,cursor:h}=i(9458);class ConfirmPrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.value=t.initial;this.initialValue=!!t.initial;this.yesMsg=t.yes||"yes";this.yesOption=t.yesOption||"(Y/n)";this.noMsg=t.no||"no";this.noOption=t.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,r){if(t.toLowerCase()==="y"){this.value=true;return this.submit()}if(t.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(h.hide);else this.out.write(l(this.outputText,this.out.columns));super.render();this.outputText=[c.symbol(this.done,this.aborted),o.bold(this.msg),c.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:o.gray(this.initialValue?this.yesOption:this.noOption)].join(" ");this.out.write(u.line+h.to(0)+this.outputText)}}t.exports=ConfirmPrompt},9123:(t,r,i)=>{"use strict";const o=i(5665);const a=i(457);const{style:c,clear:l,figures:u}=i(9398);const{erase:h,cursor:d}=i(9458);const{DatePart:p,Meridiem:m,Day:g,Hours:y,Milliseconds:v,Minutes:b,Month:w,Seconds:E,Year:S}=i(5232);const $=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const O={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new g(t),3:t=>new w(t),4:t=>new S(t),5:t=>new m(t),6:t=>new y(t),7:t=>new b(t),8:t=>new E(t),9:t=>new v(t)};const R={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(R,t.locales);this._date=t.initial||new Date;this.errorMsg=t.error||"Please Enter A Valid Value";this.validator=t.validate||(()=>true);this.mask=t.mask||"YYYY-MM-DD HH:mm:ss";this.clear=l("",this.out.columns);this.render()}get value(){return this.date}get date(){return this._date}set date(t){if(t)this._date.setTime(t.getTime())}set mask(t){let r;this.parts=[];while(r=$.exec(t)){let t=r.shift();let i=r.findIndex((t=>t!=null));this.parts.push(i in O?O[i]({token:r[i]||t,date:this.date,parts:this.parts,locales:this.locales}):r[i]||t)}let i=this.parts.reduce(((t,r)=>{if(typeof r==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=r;else t.push(r);return t}),[]);this.parts.splice(0);this.parts.push(...i);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof p)));this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let t=await this.validator(this.value);if(typeof t==="string"){this.errorMsg=t;t=false}this.error=!t}async submit(){await this.validate();if(this.error){this.color="red";this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof p)));this.render()}_(t){if(/\d/.test(t)){this.typed+=t;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(d.hide);else this.out.write(l(this.outputText,this.out.columns));super.render();this.outputText=[c.symbol(this.done,this.aborted),o.bold(this.msg),c.delimiter(false),this.parts.reduce(((t,r,i)=>t.concat(i===this.cursor&&!this.done?o.cyan().underline(r.toString()):r)),[]).join("")].join(" ");if(this.error){this.outputText+=this.errorMsg.split("\n").reduce(((t,r,i)=>t+`\n${i?` `:u.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(h.line+d.to(0)+this.outputText)}}t.exports=DatePrompt},1859:(t,r,i)=>{"use strict";t.exports={TextPrompt:i(6652),SelectPrompt:i(631),TogglePrompt:i(2339),DatePrompt:i(9123),NumberPrompt:i(9130),MultiselectPrompt:i(1926),AutocompletePrompt:i(8643),AutocompleteMultiselectPrompt:i(8005),ConfirmPrompt:i(7812)}},1926:(t,r,i)=>{"use strict";const o=i(5665);const{cursor:a}=i(9458);const c=i(457);const{clear:l,figures:u,style:h,wrap:d,entriesToDisplay:p}=i(9398);class MultiselectPrompt extends c{constructor(t={}){super(t);this.msg=t.message;this.cursor=t.cursor||0;this.scrollIndex=t.cursor||0;this.hint=t.hint||"";this.warn=t.warn||"- This option is disabled -";this.minSelected=t.min;this.showMinError=false;this.maxChoices=t.max;this.instructions=t.instructions;this.optionsPerPage=t.optionsPerPage||10;this.value=t.choices.map(((t,r)=>{if(typeof t==="string")t={title:t,value:r};return{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(t.value===undefined?r:t.value),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=l("",this.out.columns);if(!t.overrideRender){this.render()}}reset(){this.value.map((t=>!t.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((t=>t.selected))}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const t=this.value.filter((t=>t.selected));if(this.minSelected&&t.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}toggleAll(){if(this.maxChoices!==undefined||this.value[this.cursor].disabled){return this.bell()}const t=!this.value[this.cursor].selected;this.value.filter((t=>!t.disabled)).forEach((r=>r.selected=t));this.render()}_(t,r){if(t===" "){this.handleSpaceToggle()}else if(t==="a"){this.toggleAll()}else{return this.bell()}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return"\nInstructions:\n"+` ${u.arrowUp}/${u.arrowDown}: Highlight option\n`+` ${u.arrowLeft}/${u.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===undefined?` a: Toggle all\n`:"")+` enter/return: Complete answer`}return""}renderOption(t,r,i,a){const c=(r.selected?o.green(u.radioOn):u.radioOff)+" "+a+" ";let l,h;if(r.disabled){l=t===i?o.gray().underline(r.title):o.strikethrough().gray(r.title)}else{l=t===i?o.cyan().underline(r.title):r.title;if(t===i&&r.description){h=` - ${r.description}`;if(c.length+l.length+h.length>=this.out.columns||r.description.split(/\r?\n/).length>1){h="\n"+d(r.description,{margin:c.length,width:this.out.columns})}}}return c+l+o.gray(h||"")}paginateOptions(t){if(t.length===0){return o.red("No matches for this query.")}let{startIndex:r,endIndex:i}=p(this.cursor,t.length,this.optionsPerPage);let a,c=[];for(let o=r;o<i;o++){if(o===r&&r>0){a=u.arrowUp}else if(o===i-1&&i<t.length){a=u.arrowDown}else{a=" "}c.push(this.renderOption(this.cursor,t[o],o,a))}return"\n"+c.join("\n")}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[o.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(o.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);super.render();let t=[h.symbol(this.done,this.aborted),o.bold(this.msg),h.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=o.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.value);this.out.write(this.clear+t);this.clear=l(t,this.out.columns)}}t.exports=MultiselectPrompt},9130:(t,r,i)=>{const o=i(5665);const a=i(457);const{cursor:c,erase:l}=i(9458);const{style:u,figures:h,clear:d,lines:p}=i(9398);const m=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,r)=>{let i=Math.pow(10,r);return Math.round(t*i)/i};class NumberPrompt extends a{constructor(t={}){super(t);this.transform=u.render(t.style);this.msg=t.message;this.initial=isDef(t.initial)?t.initial:"";this.float=!!t.float;this.round=t.round||2;this.inc=t.increment||1;this.min=isDef(t.min)?t.min:-Infinity;this.max=isDef(t.max)?t.max:Infinity;this.errorMsg=t.error||`Please Enter A Valid Value`;this.validator=t.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(t){if(!t&&t!==0){this.placeholder=true;this.rendered=o.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(t,this.round)}`);this._value=round(t,this.round)}this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t===`-`||t===`.`&&this.float||m.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=t!==``?t:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}async validate(){let t=await this.validator(this.value);if(typeof t===`string`){this.errorMsg=t;t=false}this.error=!t}async submit(){await this.validate();if(this.error){this.color=`red`;this.fire();this.render();return}let t=this.value;this.value=t!==``?t:this.initial;this.done=true;this.aborted=false;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}up(){this.typed=``;if(this.value===""){this.value=this.min-this.inc}if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value===""){this.value=this.min+this.inc}if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||``;if(this.value!==""&&this.value<this.min){this.value=this.min}this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,r){if(!this.valid(t))return this.bell();const i=Date.now();if(i-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=i;this.color=`cyan`;if(t===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(c.down(p(this.outputError,this.out.columns)-1)+d(this.outputError,this.out.columns));this.out.write(d(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[u.symbol(this.done,this.aborted),o.bold(this.msg),u.delimiter(this.done),!this.done||!this.done&&!this.placeholder?o[this.color]().underline(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,r,i)=>t+`\n${i?` `:h.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(l.line+c.to(0)+this.outputText+c.save+this.outputError+c.restore)}}t.exports=NumberPrompt},457:(t,r,i)=>{"use strict";const o=i(3785);const{action:a}=i(9398);const c=i(4434);const{beep:l,cursor:u}=i(9458);const h=i(5665);class Prompt extends c{constructor(t={}){super();this.firstRender=true;this.in=t.stdin||process.stdin;this.out=t.stdout||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const r=o.createInterface({input:this.in,escapeCodeTimeout:50});o.emitKeypressEvents(this.in,r);if(this.in.isTTY)this.in.setRawMode(true);const i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1;const keypress=(t,r)=>{let o=a(r,i);if(o===false){this._&&this._(t,r)}else if(typeof this[o]==="function"){this[o](r)}else{this.bell()}};this.close=()=>{this.out.write(u.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);r.close();this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(l)}render(){this.onRender(h);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},631:(t,r,i)=>{"use strict";const o=i(5665);const a=i(457);const{style:c,clear:l,figures:u,wrap:h,entriesToDisplay:d}=i(9398);const{cursor:p}=i(9458);class SelectPrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.hint=t.hint||"- Use arrow-keys. Return to submit.";this.warn=t.warn||"- This option is disabled";this.cursor=t.initial||0;this.choices=t.choices.map(((t,r)=>{if(typeof t==="string")t={title:t,value:r};return{title:t&&(t.title||t.value||t),value:t&&(t.value===undefined?r:t.value),description:t&&t.description,selected:t&&t.selected,disabled:t&&t.disabled}}));this.optionsPerPage=t.optionsPerPage||10;this.value=(this.choices[this.cursor]||{}).value;this.clear=l("",this.out.columns);this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0){this.moveCursor(this.choices.length-1)}else{this.moveCursor(this.cursor-1)}this.render()}down(){if(this.cursor===this.choices.length-1){this.moveCursor(0)}else{this.moveCursor(this.cursor+1)}this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,r){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(p.hide);else this.out.write(l(this.outputText,this.out.columns));super.render();let{startIndex:t,endIndex:r}=d(this.cursor,this.choices.length,this.optionsPerPage);this.outputText=[c.symbol(this.done,this.aborted),o.bold(this.msg),c.delimiter(false),this.done?this.selection.title:this.selection.disabled?o.yellow(this.warn):o.gray(this.hint)].join(" ");if(!this.done){this.outputText+="\n";for(let i=t;i<r;i++){let a,c,l="",d=this.choices[i];if(i===t&&t>0){c=u.arrowUp}else if(i===r-1&&r<this.choices.length){c=u.arrowDown}else{c=" "}if(d.disabled){a=this.cursor===i?o.gray().underline(d.title):o.strikethrough().gray(d.title);c=(this.cursor===i?o.bold().gray(u.pointer)+" ":" ")+c}else{a=this.cursor===i?o.cyan().underline(d.title):d.title;c=(this.cursor===i?o.cyan(u.pointer)+" ":" ")+c;if(d.description&&this.cursor===i){l=` - ${d.description}`;if(c.length+a.length+l.length>=this.out.columns||d.description.split(/\r?\n/).length>1){l="\n"+h(d.description,{margin:3,width:this.out.columns})}}}this.outputText+=`${c} ${a}${o.gray(l)}\n`}}this.out.write(this.outputText)}}t.exports=SelectPrompt},6652:(t,r,i)=>{const o=i(5665);const a=i(457);const{erase:c,cursor:l}=i(9458);const{style:u,clear:h,lines:d,figures:p}=i(9398);class TextPrompt extends a{constructor(t={}){super(t);this.transform=u.render(t.style);this.scale=this.transform.scale;this.msg=t.message;this.initial=t.initial||``;this.validator=t.validate||(()=>true);this.value=``;this.errorMsg=t.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.clear=h(``,this.out.columns);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=o.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(t)}this._value=t;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.fire();this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let t=await this.validator(this.value);if(typeof t===`string`){this.errorMsg=t;t=false}this.error=!t}async submit(){this.value=this.value||this.initial;this.cursorOffset=0;this.cursor=this.rendered.length;await this.validate();if(this.error){this.red=true;this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(t){if(this.placeholder)return;this.cursor=this.cursor+t;this.cursorOffset+=t}_(t,r){let i=this.value.slice(0,this.cursor);let o=this.value.slice(this.cursor);this.value=`${i}${t}${o}`;this.red=false;this.cursor=this.placeholder?0:i.length+1;this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1);let r=this.value.slice(this.cursor);this.value=`${t}${r}`;this.red=false;if(this.isCursorAtStart()){this.cursorOffset=0}else{this.cursorOffset++;this.moveCursor(-1)}this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor);let r=this.value.slice(this.cursor+1);this.value=`${t}${r}`;this.red=false;if(this.isCursorAtEnd()){this.cursorOffset=0}else{this.cursorOffset++}this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(l.down(d(this.outputError,this.out.columns)-1)+h(this.outputError,this.out.columns));this.out.write(h(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[u.symbol(this.done,this.aborted),o.bold(this.msg),u.delimiter(this.done),this.red?o.red(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,r,i)=>t+`\n${i?" ":p.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(c.line+l.to(0)+this.outputText+l.save+this.outputError+l.restore+l.move(this.cursorOffset,0))}}t.exports=TextPrompt},2339:(t,r,i)=>{const o=i(5665);const a=i(457);const{style:c,clear:l}=i(9398);const{cursor:u,erase:h}=i(9458);class TogglePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.value=!!t.initial;this.active=t.active||"on";this.inactive=t.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(t,r){if(t===" "){this.value=!this.value}else if(t==="1"){this.value=true}else if(t==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);else this.out.write(l(this.outputText,this.out.columns));super.render();this.outputText=[c.symbol(this.done,this.aborted),o.bold(this.msg),c.delimiter(this.done),this.value?this.inactive:o.cyan().underline(this.inactive),o.gray("/"),this.value?o.cyan().underline(this.active):this.active].join(" ");this.out.write(h.line+u.to(0)+this.outputText)}}t.exports=TogglePrompt},365:(t,r,i)=>{"use strict";const o=i(1438);const a=["suggest","format","onState","validate","onRender","type"];const noop=()=>{};async function prompt(t=[],{onSubmit:r=noop,onCancel:i=noop}={}){const c={};const l=prompt._override||{};t=[].concat(t);let u,h,d,p,m,g;const getFormattedAnswer=async(t,r,i=false)=>{if(!i&&t.validate&&t.validate(r)!==true){return}return t.format?await t.format(r,c):r};for(h of t){({name:p,type:m}=h);if(typeof m==="function"){m=await m(u,{...c},h);h["type"]=m}if(!m)continue;for(let t in h){if(a.includes(t))continue;let r=h[t];h[t]=typeof r==="function"?await r(u,{...c},g):r}g=h;if(typeof h.message!=="string"){throw new Error("prompt message is required")}({name:p,type:m}=h);if(o[m]===void 0){throw new Error(`prompt type (${m}) is not defined`)}if(l[h.name]!==undefined){u=await getFormattedAnswer(h,l[h.name]);if(u!==undefined){c[p]=u;continue}}try{u=prompt._injected?getInjectedAnswer(prompt._injected,h.initial):await o[m](h);c[p]=u=await getFormattedAnswer(h,u,true);d=await r(h,u,c)}catch(t){d=!await i(h,c)}if(d)return c}return c}function getInjectedAnswer(t,r){const i=t.shift();if(i instanceof Error){throw i}return i===undefined?r:i}function inject(t){prompt._injected=(prompt._injected||[]).concat(t)}function override(t){prompt._override=Object.assign({},t)}t.exports=Object.assign(prompt,{prompt:prompt,prompts:o,inject:inject,override:override})},1438:(t,r,i)=>{"use strict";const o=r;const a=i(1859);const noop=t=>t;function toPrompt(t,r,i={}){return new Promise(((o,c)=>{const l=new a[t](r);const u=i.onAbort||noop;const h=i.onSubmit||noop;const d=i.onExit||noop;l.on("state",r.onState||noop);l.on("submit",(t=>o(h(t))));l.on("exit",(t=>o(d(t))));l.on("abort",(t=>c(u(t))))}))}o.text=t=>toPrompt("TextPrompt",t);o.password=t=>{t.style="password";return o.text(t)};o.invisible=t=>{t.style="invisible";return o.text(t)};o.number=t=>toPrompt("NumberPrompt",t);o.date=t=>toPrompt("DatePrompt",t);o.confirm=t=>toPrompt("ConfirmPrompt",t);o.list=t=>{const r=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(r).map((t=>t.trim()))})};o.toggle=t=>toPrompt("TogglePrompt",t);o.select=t=>toPrompt("SelectPrompt",t);o.multiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("MultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};o.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("AutocompleteMultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(t,r)=>Promise.resolve(r.filter((r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));o.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},3598:t=>{"use strict";t.exports=(t,r)=>{if(t.meta&&t.name!=="escape")return;if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(r){if(t.name==="j")return"down";if(t.name==="k")return"up"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"exit";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="home")return"home";if(t.name==="end")return"end";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return false}},6951:(t,r,i)=>{"use strict";const o=i(9092);const{erase:a,cursor:c}=i(9458);const width=t=>[...o(t)].length;t.exports=function(t,r){if(!r)return a.line+c.to(0);let i=0;const o=t.split(/\r?\n/);for(let t of o){i+=1+Math.floor(Math.max(width(t)-1,0)/r)}return a.lines(i)}},1549:t=>{"use strict";t.exports=(t,r,i)=>{i=i||r;let o=Math.min(r-i,t-Math.floor(i/2));if(o<0)o=0;let a=Math.min(o+i,r);return{startIndex:o,endIndex:a}}},2883:t=>{"use strict";const r={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const i={arrowUp:r.arrowUp,arrowDown:r.arrowDown,arrowLeft:r.arrowLeft,arrowRight:r.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const o=process.platform==="win32"?i:r;t.exports=o},9398:(t,r,i)=>{"use strict";t.exports={action:i(3598),clear:i(6951),style:i(9311),strip:i(9092),figures:i(2883),lines:i(429),wrap:i(844),entriesToDisplay:i(1549)}},429:(t,r,i)=>{"use strict";const o=i(9092);t.exports=function(t,r){let i=String(o(t)||"").split(/\r?\n/);if(!r)return i.length;return i.map((t=>Math.ceil(t.length/r))).reduce(((t,r)=>t+r))}},9092:t=>{"use strict";t.exports=t=>{const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const i=new RegExp(r,"g");return typeof t==="string"?t.replace(i,""):t}},9311:(t,r,i)=>{"use strict";const o=i(5665);const a=i(2883);const c=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}});const render=t=>c[t]||c.default;const l=Object.freeze({aborted:o.red(a.cross),done:o.green(a.tick),exited:o.yellow(a.cross),default:o.cyan("?")});const symbol=(t,r,i)=>r?l.aborted:i?l.exited:t?l.done:l.default;const delimiter=t=>o.gray(t?a.ellipsis:a.pointerSmall);const item=(t,r)=>o.gray(t?r?a.pointerSmall:"+":a.line);t.exports={styles:c,render:render,symbols:l,symbol:symbol,delimiter:delimiter,item:item}},844:t=>{"use strict";t.exports=(t,r={})=>{const i=Number.isSafeInteger(parseInt(r.margin))?new Array(parseInt(r.margin)).fill(" ").join(""):r.margin||"";const o=r.width;return(t||"").split(/\r?\n/g).map((t=>t.split(/\s+/g).reduce(((t,r)=>{if(r.length+i.length>=o||t[t.length-1].length+r.length+1<o)t[t.length-1]+=` ${r}`;else t.push(`${i}${r}`);return t}),[i]).join("\n"))).join("\n")}},1989:t=>{
60
+ */t.exports=function(t){if(typeof t==="number"){return t-t===0}if(typeof t==="string"&&t.trim()!==""){return Number.isFinite?Number.isFinite(+t):isFinite(+t)}return false}},7105:(t,u,p)=>{var m=p(7515);var g;if(process.platform==="win32"||global.TESTING_WINDOWS){g=p(6132)}else{g=p(1778)}t.exports=isexe;isexe.sync=sync;function isexe(t,u,p){if(typeof u==="function"){p=u;u={}}if(!p){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(p,m){isexe(t,u||{},(function(t,u){if(t){m(t)}else{p(u)}}))}))}g(t,u||{},(function(t,m){if(t){if(t.code==="EACCES"||u&&u.ignoreErrors){t=null;m=false}}p(t,m)}))}function sync(t,u){try{return g.sync(t,u||{})}catch(t){if(u&&u.ignoreErrors||t.code==="EACCES"){return false}else{throw t}}}},1778:(t,u,p)=>{t.exports=isexe;isexe.sync=sync;var m=p(7515);function isexe(t,u,p){m.stat(t,(function(t,m){p(t,t?false:checkStat(m,u))}))}function sync(t,u){return checkStat(m.statSync(t),u)}function checkStat(t,u){return t.isFile()&&checkMode(t,u)}function checkMode(t,u){var p=t.mode;var m=t.uid;var g=t.gid;var y=u.uid!==undefined?u.uid:process.getuid&&process.getuid();var v=u.gid!==undefined?u.gid:process.getgid&&process.getgid();var b=parseInt("100",8);var w=parseInt("010",8);var E=parseInt("001",8);var $=b|w;var O=p&E||p&w&&g===v||p&b&&m===y||p&$&&y===0;return O}},6132:(t,u,p)=>{t.exports=isexe;isexe.sync=sync;var m=p(7515);function checkPathExt(t,u){var p=u.pathExt!==undefined?u.pathExt:process.env.PATHEXT;if(!p){return true}p=p.split(";");if(p.indexOf("")!==-1){return true}for(var m=0;m<p.length;m++){var g=p[m].toLowerCase();if(g&&t.substr(-g.length).toLowerCase()===g){return true}}return false}function checkStat(t,u,p){if(!t.isSymbolicLink()&&!t.isFile()){return false}return checkPathExt(u,p)}function isexe(t,u,p){m.stat(t,(function(m,g){p(m,m?false:checkStat(g,t,u))}))}function sync(t,u){return checkStat(m.statSync(t),t,u)}},3456:t=>{"use strict";var u=t.exports=function(t,u,p){if(typeof u=="function"){p=u;u={}}p=u.cb||p;var m=typeof p=="function"?p:p.pre||function(){};var g=p.post||function(){};_traverse(u,m,g,t,"",t)};u.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true,if:true,then:true,else:true};u.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true};u.propsKeywords={$defs:true,definitions:true,properties:true,patternProperties:true,dependencies:true};u.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function _traverse(t,p,m,g,y,v,b,w,E,$){if(g&&typeof g=="object"&&!Array.isArray(g)){p(g,y,v,b,w,E,$);for(var O in g){var R=g[O];if(Array.isArray(R)){if(O in u.arrayKeywords){for(var P=0;P<R.length;P++)_traverse(t,p,m,R[P],y+"/"+O+"/"+P,v,y,O,g,P)}}else if(O in u.propsKeywords){if(R&&typeof R=="object"){for(var A in R)_traverse(t,p,m,R[A],y+"/"+O+"/"+escapeJsonPtr(A),v,y,O,g,A)}}else if(O in u.keywords||t.allKeys&&!(O in u.skipKeywords)){_traverse(t,p,m,R,y+"/"+O,v,y,O,g)}}m(g,y,v,b,w,E,$)}}function escapeJsonPtr(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}},5665:t=>{"use strict";const{FORCE_COLOR:u,NODE_DISABLE_COLORS:p,TERM:m}=process.env;const g={enabled:!p&&m!=="dumb"&&u!=="0",reset:init(0,0),bold:init(1,22),dim:init(2,22),italic:init(3,23),underline:init(4,24),inverse:init(7,27),hidden:init(8,28),strikethrough:init(9,29),black:init(30,39),red:init(31,39),green:init(32,39),yellow:init(33,39),blue:init(34,39),magenta:init(35,39),cyan:init(36,39),white:init(37,39),gray:init(90,39),grey:init(90,39),bgBlack:init(40,49),bgRed:init(41,49),bgGreen:init(42,49),bgYellow:init(43,49),bgBlue:init(44,49),bgMagenta:init(45,49),bgCyan:init(46,49),bgWhite:init(47,49)};function run(t,u){let p=0,m,g="",y="";for(;p<t.length;p++){m=t[p];g+=m.open;y+=m.close;if(u.includes(m.close)){u=u.replace(m.rgx,m.close+m.open)}}return g+u+y}function chain(t,u){let p={has:t,keys:u};p.reset=g.reset.bind(p);p.bold=g.bold.bind(p);p.dim=g.dim.bind(p);p.italic=g.italic.bind(p);p.underline=g.underline.bind(p);p.inverse=g.inverse.bind(p);p.hidden=g.hidden.bind(p);p.strikethrough=g.strikethrough.bind(p);p.black=g.black.bind(p);p.red=g.red.bind(p);p.green=g.green.bind(p);p.yellow=g.yellow.bind(p);p.blue=g.blue.bind(p);p.magenta=g.magenta.bind(p);p.cyan=g.cyan.bind(p);p.white=g.white.bind(p);p.gray=g.gray.bind(p);p.grey=g.grey.bind(p);p.bgBlack=g.bgBlack.bind(p);p.bgRed=g.bgRed.bind(p);p.bgGreen=g.bgGreen.bind(p);p.bgYellow=g.bgYellow.bind(p);p.bgBlue=g.bgBlue.bind(p);p.bgMagenta=g.bgMagenta.bind(p);p.bgCyan=g.bgCyan.bind(p);p.bgWhite=g.bgWhite.bind(p);return p}function init(t,u){let p={open:`[${t}m`,close:`[${u}m`,rgx:new RegExp(`\\x1b\\[${u}m`,"g")};return function(u){if(this!==void 0&&this.has!==void 0){this.has.includes(t)||(this.has.push(t),this.keys.push(p));return u===void 0?this:g.enabled?run(this.keys,u+""):u+""}return u===void 0?chain([t],[p]):g.enabled?run([p],u+""):u+""}}t.exports=g},4031:(t,u,p)=>{"use strict";const m=p(2203);const g=m.PassThrough;const y=Array.prototype.slice;t.exports=merge2;function merge2(){const t=[];const u=y.call(arguments);let p=false;let m=u[u.length-1];if(m&&!Array.isArray(m)&&m.pipe==null){u.pop()}else{m={}}const v=m.end!==false;const b=m.pipeError===true;if(m.objectMode==null){m.objectMode=true}if(m.highWaterMark==null){m.highWaterMark=64*1024}const w=g(m);function addStream(){for(let u=0,p=arguments.length;u<p;u++){t.push(pauseStreams(arguments[u],m))}mergeStream();return this}function mergeStream(){if(p){return}p=true;let u=t.shift();if(!u){process.nextTick(endStream);return}if(!Array.isArray(u)){u=[u]}let m=u.length+1;function next(){if(--m>0){return}p=false;mergeStream()}function pipe(t){function onend(){t.removeListener("merge2UnpipeEnd",onend);t.removeListener("end",onend);if(b){t.removeListener("error",onerror)}next()}function onerror(t){w.emit("error",t)}if(t._readableState.endEmitted){return next()}t.on("merge2UnpipeEnd",onend);t.on("end",onend);if(b){t.on("error",onerror)}t.pipe(w,{end:false});t.resume()}for(let t=0;t<u.length;t++){pipe(u[t])}next()}function endStream(){p=false;w.emit("queueDrain");if(v){w.end()}}w.setMaxListeners(0);w.add=addStream;w.on("unpipe",(function(t){t.emit("merge2UnpipeEnd")}));if(u.length){addStream.apply(null,u)}return w}function pauseStreams(t,u){if(!Array.isArray(t)){if(!t._readableState&&t.pipe){t=t.pipe(g(u))}if(!t._readableState||!t.pause||!t.pipe){throw new Error("Only readable stream can be merged.")}t.pause()}else{for(let p=0,m=t.length;p<m;p++){t[p]=pauseStreams(t[p],u)}}return t}},9555:(t,u,p)=>{"use strict";const m=p(9023);const g=p(8671);const y=p(5675);const v=p(7910);const isEmptyString=t=>t===""||t==="./";const hasBraces=t=>{const u=t.indexOf("{");return u>-1&&t.indexOf("}",u)>-1};const micromatch=(t,u,p)=>{u=[].concat(u);t=[].concat(t);let m=new Set;let g=new Set;let v=new Set;let b=0;let onResult=t=>{v.add(t.output);if(p&&p.onResult){p.onResult(t)}};for(let v=0;v<u.length;v++){let w=y(String(u[v]),{...p,onResult:onResult},true);let E=w.state.negated||w.state.negatedExtglob;if(E)b++;for(let u of t){let t=w(u,true);let p=E?!t.isMatch:t.isMatch;if(!p)continue;if(E){m.add(t.output)}else{m.delete(t.output);g.add(t.output)}}}let w=b===u.length?[...v]:[...g];let E=w.filter((t=>!m.has(t)));if(p&&E.length===0){if(p.failglob===true){throw new Error(`No matches found for "${u.join(", ")}"`)}if(p.nonull===true||p.nullglob===true){return p.unescape?u.map((t=>t.replace(/\\/g,""))):u}}return E};micromatch.match=micromatch;micromatch.matcher=(t,u)=>y(t,u);micromatch.isMatch=(t,u,p)=>y(u,p)(t);micromatch.any=micromatch.isMatch;micromatch.not=(t,u,p={})=>{u=[].concat(u).map(String);let m=new Set;let g=[];let onResult=t=>{if(p.onResult)p.onResult(t);g.push(t.output)};let y=new Set(micromatch(t,u,{...p,onResult:onResult}));for(let t of g){if(!y.has(t)){m.add(t)}}return[...m]};micromatch.contains=(t,u,p)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${m.inspect(t)}"`)}if(Array.isArray(u)){return u.some((u=>micromatch.contains(t,u,p)))}if(typeof u==="string"){if(isEmptyString(t)||isEmptyString(u)){return false}if(t.includes(u)||t.startsWith("./")&&t.slice(2).includes(u)){return true}}return micromatch.isMatch(t,u,{...p,contains:true})};micromatch.matchKeys=(t,u,p)=>{if(!v.isObject(t)){throw new TypeError("Expected the first argument to be an object")}let m=micromatch(Object.keys(t),u,p);let g={};for(let u of m)g[u]=t[u];return g};micromatch.some=(t,u,p)=>{let m=[].concat(t);for(let t of[].concat(u)){let u=y(String(t),p);if(m.some((t=>u(t)))){return true}}return false};micromatch.every=(t,u,p)=>{let m=[].concat(t);for(let t of[].concat(u)){let u=y(String(t),p);if(!m.every((t=>u(t)))){return false}}return true};micromatch.all=(t,u,p)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${m.inspect(t)}"`)}return[].concat(u).every((u=>y(u,p)(t)))};micromatch.capture=(t,u,p)=>{let m=v.isWindows(p);let g=y.makeRe(String(t),{...p,capture:true});let b=g.exec(m?v.toPosixSlashes(u):u);if(b){return b.slice(1).map((t=>t===void 0?"":t))}};micromatch.makeRe=(...t)=>y.makeRe(...t);micromatch.scan=(...t)=>y.scan(...t);micromatch.parse=(t,u)=>{let p=[];for(let m of[].concat(t||[])){for(let t of g(String(m),u)){p.push(y.parse(t,u))}}return p};micromatch.braces=(t,u)=>{if(typeof t!=="string")throw new TypeError("Expected a string");if(u&&u.nobrace===true||!hasBraces(t)){return[t]}return g(t,u)};micromatch.braceExpand=(t,u)=>{if(typeof t!=="string")throw new TypeError("Expected a string");return micromatch.braces(t,{...u,expand:true})};micromatch.hasBraces=hasBraces;t.exports=micromatch},2078:t=>{"use strict";function hasKey(t,u){var p=t;u.slice(0,-1).forEach((function(t){p=p[t]||{}}));var m=u[u.length-1];return m in p}function isNumber(t){if(typeof t==="number"){return true}if(/^0x[0-9a-f]+$/i.test(t)){return true}return/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function isConstructorOrProto(t,u){return u==="constructor"&&typeof t[u]==="function"||u==="__proto__"}t.exports=function(t,u){if(!u){u={}}var p={bools:{},strings:{},unknownFn:null};if(typeof u.unknown==="function"){p.unknownFn=u.unknown}if(typeof u.boolean==="boolean"&&u.boolean){p.allBools=true}else{[].concat(u.boolean).filter(Boolean).forEach((function(t){p.bools[t]=true}))}var m={};function aliasIsBoolean(t){return m[t].some((function(t){return p.bools[t]}))}Object.keys(u.alias||{}).forEach((function(t){m[t]=[].concat(u.alias[t]);m[t].forEach((function(u){m[u]=[t].concat(m[t].filter((function(t){return u!==t})))}))}));[].concat(u.string).filter(Boolean).forEach((function(t){p.strings[t]=true;if(m[t]){[].concat(m[t]).forEach((function(t){p.strings[t]=true}))}}));var g=u.default||{};var y={_:[]};function argDefined(t,u){return p.allBools&&/^--[^=]+$/.test(u)||p.strings[t]||p.bools[t]||m[t]}function setKey(t,u,m){var g=t;for(var y=0;y<u.length-1;y++){var v=u[y];if(isConstructorOrProto(g,v)){return}if(g[v]===undefined){g[v]={}}if(g[v]===Object.prototype||g[v]===Number.prototype||g[v]===String.prototype){g[v]={}}if(g[v]===Array.prototype){g[v]=[]}g=g[v]}var b=u[u.length-1];if(isConstructorOrProto(g,b)){return}if(g===Object.prototype||g===Number.prototype||g===String.prototype){g={}}if(g===Array.prototype){g=[]}if(g[b]===undefined||p.bools[b]||typeof g[b]==="boolean"){g[b]=m}else if(Array.isArray(g[b])){g[b].push(m)}else{g[b]=[g[b],m]}}function setArg(t,u,g){if(g&&p.unknownFn&&!argDefined(t,g)){if(p.unknownFn(g)===false){return}}var v=!p.strings[t]&&isNumber(u)?Number(u):u;setKey(y,t.split("."),v);(m[t]||[]).forEach((function(t){setKey(y,t.split("."),v)}))}Object.keys(p.bools).forEach((function(t){setArg(t,g[t]===undefined?false:g[t])}));var v=[];if(t.indexOf("--")!==-1){v=t.slice(t.indexOf("--")+1);t=t.slice(0,t.indexOf("--"))}for(var b=0;b<t.length;b++){var w=t[b];var E;var $;if(/^--.+=/.test(w)){var O=w.match(/^--([^=]+)=([\s\S]*)$/);E=O[1];var R=O[2];if(p.bools[E]){R=R!=="false"}setArg(E,R,w)}else if(/^--no-.+/.test(w)){E=w.match(/^--no-(.+)/)[1];setArg(E,false,w)}else if(/^--.+/.test(w)){E=w.match(/^--(.+)/)[1];$=t[b+1];if($!==undefined&&!/^(-|--)[^-]/.test($)&&!p.bools[E]&&!p.allBools&&(m[E]?!aliasIsBoolean(E):true)){setArg(E,$,w);b+=1}else if(/^(true|false)$/.test($)){setArg(E,$==="true",w);b+=1}else{setArg(E,p.strings[E]?"":true,w)}}else if(/^-[^-]+/.test(w)){var P=w.slice(1,-1).split("");var A=false;for(var x=0;x<P.length;x++){$=w.slice(x+2);if($==="-"){setArg(P[x],$,w);continue}if(/[A-Za-z]/.test(P[x])&&$[0]==="="){setArg(P[x],$.slice(1),w);A=true;break}if(/[A-Za-z]/.test(P[x])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test($)){setArg(P[x],$,w);A=true;break}if(P[x+1]&&P[x+1].match(/\W/)){setArg(P[x],w.slice(x+2),w);A=true;break}else{setArg(P[x],p.strings[P[x]]?"":true,w)}}E=w.slice(-1)[0];if(!A&&E!=="-"){if(t[b+1]&&!/^(-|--)[^-]/.test(t[b+1])&&!p.bools[E]&&(m[E]?!aliasIsBoolean(E):true)){setArg(E,t[b+1],w);b+=1}else if(t[b+1]&&/^(true|false)$/.test(t[b+1])){setArg(E,t[b+1]==="true",w);b+=1}else{setArg(E,p.strings[E]?"":true,w)}}}else{if(!p.unknownFn||p.unknownFn(w)!==false){y._.push(p.strings._||!isNumber(w)?w:Number(w))}if(u.stopEarly){y._.push.apply(y._,t.slice(b+1));break}}}Object.keys(g).forEach((function(t){if(!hasKey(y,t.split("."))){setKey(y,t.split("."),g[t]);(m[t]||[]).forEach((function(u){setKey(y,u.split("."),g[t])}))}}));if(u["--"]){y["--"]=v.slice()}else{v.forEach((function(t){y._.push(t)}))}return y}},4662:t=>{"use strict";const pathKey=(t={})=>{const u=t.env||process.env;const p=t.platform||process.platform;if(p!=="win32"){return"PATH"}return Object.keys(u).reverse().find((t=>t.toUpperCase()==="PATH"))||"Path"};t.exports=pathKey;t.exports["default"]=pathKey},9212:t=>{let u=process||{},p=u.argv||[],m=u.env||{};let g=!(!!m.NO_COLOR||p.includes("--no-color"))&&(!!m.FORCE_COLOR||p.includes("--color")||u.platform==="win32"||(u.stdout||{}).isTTY&&m.TERM!=="dumb"||!!m.CI);let formatter=(t,u,p=t)=>m=>{let g=""+m,y=g.indexOf(u,t.length);return~y?t+replaceClose(g,u,p,y)+u:t+g+u};let replaceClose=(t,u,p,m)=>{let g="",y=0;do{g+=t.substring(y,m)+p;y=m+u.length;m=t.indexOf(u,y)}while(~m);return g+t.substring(y)};let createColors=(t=g)=>{let u=t?formatter:()=>String;return{isColorSupported:t,reset:u("",""),bold:u("","",""),dim:u("","",""),italic:u("",""),underline:u("",""),inverse:u("",""),hidden:u("",""),strikethrough:u("",""),black:u("",""),red:u("",""),green:u("",""),yellow:u("",""),blue:u("",""),magenta:u("",""),cyan:u("",""),white:u("",""),gray:u("",""),bgBlack:u("",""),bgRed:u("",""),bgGreen:u("",""),bgYellow:u("",""),bgBlue:u("",""),bgMagenta:u("",""),bgCyan:u("",""),bgWhite:u("",""),blackBright:u("",""),redBright:u("",""),greenBright:u("",""),yellowBright:u("",""),blueBright:u("",""),magentaBright:u("",""),cyanBright:u("",""),whiteBright:u("",""),bgBlackBright:u("",""),bgRedBright:u("",""),bgGreenBright:u("",""),bgYellowBright:u("",""),bgBlueBright:u("",""),bgMagentaBright:u("",""),bgCyanBright:u("",""),bgWhiteBright:u("","")}};t.exports=createColors();t.exports.createColors=createColors},5675:(t,u,p)=>{"use strict";t.exports=p(3193)},7054:(t,u,p)=>{"use strict";const m=p(6928);const g="\\\\/";const y=`[^${g}]`;const v="\\.";const b="\\+";const w="\\?";const E="\\/";const $="(?=.)";const O="[^/]";const R=`(?:${E}|$)`;const P=`(?:^|${E})`;const A=`${v}{1,2}${R}`;const x=`(?!${v})`;const T=`(?!${P}${A})`;const C=`(?!${v}{0,1}${R})`;const k=`(?!${A})`;const I=`[^.${E}]`;const N=`${O}*?`;const D={DOT_LITERAL:v,PLUS_LITERAL:b,QMARK_LITERAL:w,SLASH_LITERAL:E,ONE_CHAR:$,QMARK:O,END_ANCHOR:R,DOTS_SLASH:A,NO_DOT:x,NO_DOTS:T,NO_DOT_SLASH:C,NO_DOTS_SLASH:k,QMARK_NO_DOT:I,STAR:N,START_ANCHOR:P};const L={...D,SLASH_LITERAL:`[${g}]`,QMARK:y,STAR:`${y}*?`,DOTS_SLASH:`${v}{1,2}(?:[${g}]|$)`,NO_DOT:`(?!${v})`,NO_DOTS:`(?!(?:^|[${g}])${v}{1,2}(?:[${g}]|$))`,NO_DOT_SLASH:`(?!${v}{0,1}(?:[${g}]|$))`,NO_DOTS_SLASH:`(?!${v}{1,2}(?:[${g}]|$))`,QMARK_NO_DOT:`[^.${g}]`,START_ANCHOR:`(?:^|[${g}])`,END_ANCHOR:`(?:[${g}]|$)`};const M={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:M,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:m.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===true?L:D}}},4356:(t,u,p)=>{"use strict";const m=p(7054);const g=p(7910);const{MAX_LENGTH:y,POSIX_REGEX_SOURCE:v,REGEX_NON_SPECIAL_CHARS:b,REGEX_SPECIAL_CHARS_BACKREF:w,REPLACEMENTS:E}=m;const expandRange=(t,u)=>{if(typeof u.expandRange==="function"){return u.expandRange(...t,u)}t.sort();const p=`[${t.join("-")}]`;try{new RegExp(p)}catch(u){return t.map((t=>g.escapeRegex(t))).join("..")}return p};const syntaxError=(t,u)=>`Missing ${t}: "${u}" - use "\\\\${u}" to match literal characters`;const parse=(t,u)=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}t=E[t]||t;const p={...u};const $=typeof p.maxLength==="number"?Math.min(y,p.maxLength):y;let O=t.length;if(O>$){throw new SyntaxError(`Input length: ${O}, exceeds maximum allowed length: ${$}`)}const R={type:"bos",value:"",output:p.prepend||""};const P=[R];const A=p.capture?"":"?:";const x=g.isWindows(u);const T=m.globChars(x);const C=m.extglobChars(T);const{DOT_LITERAL:k,PLUS_LITERAL:I,SLASH_LITERAL:N,ONE_CHAR:D,DOTS_SLASH:L,NO_DOT:M,NO_DOT_SLASH:j,NO_DOTS_SLASH:U,QMARK:B,QMARK_NO_DOT:H,STAR:V,START_ANCHOR:z}=T;const globstar=t=>`(${A}(?:(?!${z}${t.dot?L:k}).)*?)`;const G=p.dot?"":M;const q=p.dot?B:H;let W=p.bash===true?globstar(p):V;if(p.capture){W=`(${W})`}if(typeof p.noext==="boolean"){p.noextglob=p.noext}const Y={input:t,index:-1,start:0,dot:p.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:P};t=g.removePrefix(t,Y);O=t.length;const Z=[];const X=[];const J=[];let Q=R;let ee;const eos=()=>Y.index===O-1;const se=Y.peek=(u=1)=>t[Y.index+u];const ie=Y.advance=()=>t[++Y.index]||"";const remaining=()=>t.slice(Y.index+1);const consume=(t="",u=0)=>{Y.consumed+=t;Y.index+=u};const append=t=>{Y.output+=t.output!=null?t.output:t.value;consume(t.value)};const negate=()=>{let t=1;while(se()==="!"&&(se(2)!=="("||se(3)==="?")){ie();Y.start++;t++}if(t%2===0){return false}Y.negated=true;Y.start++;return true};const increment=t=>{Y[t]++;J.push(t)};const decrement=t=>{Y[t]--;J.pop()};const push=t=>{if(Q.type==="globstar"){const u=Y.braces>0&&(t.type==="comma"||t.type==="brace");const p=t.extglob===true||Z.length&&(t.type==="pipe"||t.type==="paren");if(t.type!=="slash"&&t.type!=="paren"&&!u&&!p){Y.output=Y.output.slice(0,-Q.output.length);Q.type="star";Q.value="*";Q.output=W;Y.output+=Q.output}}if(Z.length&&t.type!=="paren"){Z[Z.length-1].inner+=t.value}if(t.value||t.output)append(t);if(Q&&Q.type==="text"&&t.type==="text"){Q.value+=t.value;Q.output=(Q.output||"")+t.value;return}t.prev=Q;P.push(t);Q=t};const extglobOpen=(t,u)=>{const m={...C[u],conditions:1,inner:""};m.prev=Q;m.parens=Y.parens;m.output=Y.output;const g=(p.capture?"(":"")+m.open;increment("parens");push({type:t,value:u,output:Y.output?"":D});push({type:"paren",extglob:true,value:ie(),output:g});Z.push(m)};const extglobClose=t=>{let m=t.close+(p.capture?")":"");let g;if(t.type==="negate"){let y=W;if(t.inner&&t.inner.length>1&&t.inner.includes("/")){y=globstar(p)}if(y!==W||eos()||/^\)+$/.test(remaining())){m=t.close=`)$))${y}`}if(t.inner.includes("*")&&(g=remaining())&&/^\.[^\\/.]+$/.test(g)){const p=parse(g,{...u,fastpaths:false}).output;m=t.close=`)${p})${y})`}if(t.prev.type==="bos"){Y.negatedExtglob=true}}push({type:"paren",extglob:true,value:ee,output:m});decrement("parens")};if(p.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let m=false;let y=t.replace(w,((t,u,p,g,y,v)=>{if(g==="\\"){m=true;return t}if(g==="?"){if(u){return u+g+(y?B.repeat(y.length):"")}if(v===0){return q+(y?B.repeat(y.length):"")}return B.repeat(p.length)}if(g==="."){return k.repeat(p.length)}if(g==="*"){if(u){return u+g+(y?W:"")}return W}return u?t:`\\${t}`}));if(m===true){if(p.unescape===true){y=y.replace(/\\/g,"")}else{y=y.replace(/\\+/g,(t=>t.length%2===0?"\\\\":t?"\\":""))}}if(y===t&&p.contains===true){Y.output=t;return Y}Y.output=g.wrapOutput(y,Y,u);return Y}while(!eos()){ee=ie();if(ee==="\0"){continue}if(ee==="\\"){const t=se();if(t==="/"&&p.bash!==true){continue}if(t==="."||t===";"){continue}if(!t){ee+="\\";push({type:"text",value:ee});continue}const u=/^\\+/.exec(remaining());let m=0;if(u&&u[0].length>2){m=u[0].length;Y.index+=m;if(m%2!==0){ee+="\\"}}if(p.unescape===true){ee=ie()}else{ee+=ie()}if(Y.brackets===0){push({type:"text",value:ee});continue}}if(Y.brackets>0&&(ee!=="]"||Q.value==="["||Q.value==="[^")){if(p.posix!==false&&ee===":"){const t=Q.value.slice(1);if(t.includes("[")){Q.posix=true;if(t.includes(":")){const t=Q.value.lastIndexOf("[");const u=Q.value.slice(0,t);const p=Q.value.slice(t+2);const m=v[p];if(m){Q.value=u+m;Y.backtrack=true;ie();if(!R.output&&P.indexOf(Q)===1){R.output=D}continue}}}}if(ee==="["&&se()!==":"||ee==="-"&&se()==="]"){ee=`\\${ee}`}if(ee==="]"&&(Q.value==="["||Q.value==="[^")){ee=`\\${ee}`}if(p.posix===true&&ee==="!"&&Q.value==="["){ee="^"}Q.value+=ee;append({value:ee});continue}if(Y.quotes===1&&ee!=='"'){ee=g.escapeRegex(ee);Q.value+=ee;append({value:ee});continue}if(ee==='"'){Y.quotes=Y.quotes===1?0:1;if(p.keepQuotes===true){push({type:"text",value:ee})}continue}if(ee==="("){increment("parens");push({type:"paren",value:ee});continue}if(ee===")"){if(Y.parens===0&&p.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const t=Z[Z.length-1];if(t&&Y.parens===t.parens+1){extglobClose(Z.pop());continue}push({type:"paren",value:ee,output:Y.parens?")":"\\)"});decrement("parens");continue}if(ee==="["){if(p.nobracket===true||!remaining().includes("]")){if(p.nobracket!==true&&p.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}ee=`\\${ee}`}else{increment("brackets")}push({type:"bracket",value:ee});continue}if(ee==="]"){if(p.nobracket===true||Q&&Q.type==="bracket"&&Q.value.length===1){push({type:"text",value:ee,output:`\\${ee}`});continue}if(Y.brackets===0){if(p.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:ee,output:`\\${ee}`});continue}decrement("brackets");const t=Q.value.slice(1);if(Q.posix!==true&&t[0]==="^"&&!t.includes("/")){ee=`/${ee}`}Q.value+=ee;append({value:ee});if(p.literalBrackets===false||g.hasRegexChars(t)){continue}const u=g.escapeRegex(Q.value);Y.output=Y.output.slice(0,-Q.value.length);if(p.literalBrackets===true){Y.output+=u;Q.value=u;continue}Q.value=`(${A}${u}|${Q.value})`;Y.output+=Q.value;continue}if(ee==="{"&&p.nobrace!==true){increment("braces");const t={type:"brace",value:ee,output:"(",outputIndex:Y.output.length,tokensIndex:Y.tokens.length};X.push(t);push(t);continue}if(ee==="}"){const t=X[X.length-1];if(p.nobrace===true||!t){push({type:"text",value:ee,output:ee});continue}let u=")";if(t.dots===true){const t=P.slice();const m=[];for(let u=t.length-1;u>=0;u--){P.pop();if(t[u].type==="brace"){break}if(t[u].type!=="dots"){m.unshift(t[u].value)}}u=expandRange(m,p);Y.backtrack=true}if(t.comma!==true&&t.dots!==true){const p=Y.output.slice(0,t.outputIndex);const m=Y.tokens.slice(t.tokensIndex);t.value=t.output="\\{";ee=u="\\}";Y.output=p;for(const t of m){Y.output+=t.output||t.value}}push({type:"brace",value:ee,output:u});decrement("braces");X.pop();continue}if(ee==="|"){if(Z.length>0){Z[Z.length-1].conditions++}push({type:"text",value:ee});continue}if(ee===","){let t=ee;const u=X[X.length-1];if(u&&J[J.length-1]==="braces"){u.comma=true;t="|"}push({type:"comma",value:ee,output:t});continue}if(ee==="/"){if(Q.type==="dot"&&Y.index===Y.start+1){Y.start=Y.index+1;Y.consumed="";Y.output="";P.pop();Q=R;continue}push({type:"slash",value:ee,output:N});continue}if(ee==="."){if(Y.braces>0&&Q.type==="dot"){if(Q.value===".")Q.output=k;const t=X[X.length-1];Q.type="dots";Q.output+=ee;Q.value+=ee;t.dots=true;continue}if(Y.braces+Y.parens===0&&Q.type!=="bos"&&Q.type!=="slash"){push({type:"text",value:ee,output:k});continue}push({type:"dot",value:ee,output:k});continue}if(ee==="?"){const t=Q&&Q.value==="(";if(!t&&p.noextglob!==true&&se()==="("&&se(2)!=="?"){extglobOpen("qmark",ee);continue}if(Q&&Q.type==="paren"){const t=se();let u=ee;if(t==="<"&&!g.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(Q.value==="("&&!/[!=<:]/.test(t)||t==="<"&&!/<([!=]|\w+>)/.test(remaining())){u=`\\${ee}`}push({type:"text",value:ee,output:u});continue}if(p.dot!==true&&(Q.type==="slash"||Q.type==="bos")){push({type:"qmark",value:ee,output:H});continue}push({type:"qmark",value:ee,output:B});continue}if(ee==="!"){if(p.noextglob!==true&&se()==="("){if(se(2)!=="?"||!/[!=<:]/.test(se(3))){extglobOpen("negate",ee);continue}}if(p.nonegate!==true&&Y.index===0){negate();continue}}if(ee==="+"){if(p.noextglob!==true&&se()==="("&&se(2)!=="?"){extglobOpen("plus",ee);continue}if(Q&&Q.value==="("||p.regex===false){push({type:"plus",value:ee,output:I});continue}if(Q&&(Q.type==="bracket"||Q.type==="paren"||Q.type==="brace")||Y.parens>0){push({type:"plus",value:ee});continue}push({type:"plus",value:I});continue}if(ee==="@"){if(p.noextglob!==true&&se()==="("&&se(2)!=="?"){push({type:"at",extglob:true,value:ee,output:""});continue}push({type:"text",value:ee});continue}if(ee!=="*"){if(ee==="$"||ee==="^"){ee=`\\${ee}`}const t=b.exec(remaining());if(t){ee+=t[0];Y.index+=t[0].length}push({type:"text",value:ee});continue}if(Q&&(Q.type==="globstar"||Q.star===true)){Q.type="star";Q.star=true;Q.value+=ee;Q.output=W;Y.backtrack=true;Y.globstar=true;consume(ee);continue}let u=remaining();if(p.noextglob!==true&&/^\([^?]/.test(u)){extglobOpen("star",ee);continue}if(Q.type==="star"){if(p.noglobstar===true){consume(ee);continue}const m=Q.prev;const g=m.prev;const y=m.type==="slash"||m.type==="bos";const v=g&&(g.type==="star"||g.type==="globstar");if(p.bash===true&&(!y||u[0]&&u[0]!=="/")){push({type:"star",value:ee,output:""});continue}const b=Y.braces>0&&(m.type==="comma"||m.type==="brace");const w=Z.length&&(m.type==="pipe"||m.type==="paren");if(!y&&m.type!=="paren"&&!b&&!w){push({type:"star",value:ee,output:""});continue}while(u.slice(0,3)==="/**"){const p=t[Y.index+4];if(p&&p!=="/"){break}u=u.slice(3);consume("/**",3)}if(m.type==="bos"&&eos()){Q.type="globstar";Q.value+=ee;Q.output=globstar(p);Y.output=Q.output;Y.globstar=true;consume(ee);continue}if(m.type==="slash"&&m.prev.type!=="bos"&&!v&&eos()){Y.output=Y.output.slice(0,-(m.output+Q.output).length);m.output=`(?:${m.output}`;Q.type="globstar";Q.output=globstar(p)+(p.strictSlashes?")":"|$)");Q.value+=ee;Y.globstar=true;Y.output+=m.output+Q.output;consume(ee);continue}if(m.type==="slash"&&m.prev.type!=="bos"&&u[0]==="/"){const t=u[1]!==void 0?"|$":"";Y.output=Y.output.slice(0,-(m.output+Q.output).length);m.output=`(?:${m.output}`;Q.type="globstar";Q.output=`${globstar(p)}${N}|${N}${t})`;Q.value+=ee;Y.output+=m.output+Q.output;Y.globstar=true;consume(ee+ie());push({type:"slash",value:"/",output:""});continue}if(m.type==="bos"&&u[0]==="/"){Q.type="globstar";Q.value+=ee;Q.output=`(?:^|${N}|${globstar(p)}${N})`;Y.output=Q.output;Y.globstar=true;consume(ee+ie());push({type:"slash",value:"/",output:""});continue}Y.output=Y.output.slice(0,-Q.output.length);Q.type="globstar";Q.output=globstar(p);Q.value+=ee;Y.output+=Q.output;Y.globstar=true;consume(ee);continue}const m={type:"star",value:ee,output:W};if(p.bash===true){m.output=".*?";if(Q.type==="bos"||Q.type==="slash"){m.output=G+m.output}push(m);continue}if(Q&&(Q.type==="bracket"||Q.type==="paren")&&p.regex===true){m.output=ee;push(m);continue}if(Y.index===Y.start||Q.type==="slash"||Q.type==="dot"){if(Q.type==="dot"){Y.output+=j;Q.output+=j}else if(p.dot===true){Y.output+=U;Q.output+=U}else{Y.output+=G;Q.output+=G}if(se()!=="*"){Y.output+=D;Q.output+=D}}push(m)}while(Y.brackets>0){if(p.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));Y.output=g.escapeLast(Y.output,"[");decrement("brackets")}while(Y.parens>0){if(p.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));Y.output=g.escapeLast(Y.output,"(");decrement("parens")}while(Y.braces>0){if(p.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));Y.output=g.escapeLast(Y.output,"{");decrement("braces")}if(p.strictSlashes!==true&&(Q.type==="star"||Q.type==="bracket")){push({type:"maybe_slash",value:"",output:`${N}?`})}if(Y.backtrack===true){Y.output="";for(const t of Y.tokens){Y.output+=t.output!=null?t.output:t.value;if(t.suffix){Y.output+=t.suffix}}}return Y};parse.fastpaths=(t,u)=>{const p={...u};const v=typeof p.maxLength==="number"?Math.min(y,p.maxLength):y;const b=t.length;if(b>v){throw new SyntaxError(`Input length: ${b}, exceeds maximum allowed length: ${v}`)}t=E[t]||t;const w=g.isWindows(u);const{DOT_LITERAL:$,SLASH_LITERAL:O,ONE_CHAR:R,DOTS_SLASH:P,NO_DOT:A,NO_DOTS:x,NO_DOTS_SLASH:T,STAR:C,START_ANCHOR:k}=m.globChars(w);const I=p.dot?x:A;const N=p.dot?T:A;const D=p.capture?"":"?:";const L={negated:false,prefix:""};let M=p.bash===true?".*?":C;if(p.capture){M=`(${M})`}const globstar=t=>{if(t.noglobstar===true)return M;return`(${D}(?:(?!${k}${t.dot?P:$}).)*?)`};const create=t=>{switch(t){case"*":return`${I}${R}${M}`;case".*":return`${$}${R}${M}`;case"*.*":return`${I}${M}${$}${R}${M}`;case"*/*":return`${I}${M}${O}${R}${N}${M}`;case"**":return I+globstar(p);case"**/*":return`(?:${I}${globstar(p)}${O})?${N}${R}${M}`;case"**/*.*":return`(?:${I}${globstar(p)}${O})?${N}${M}${$}${R}${M}`;case"**/.*":return`(?:${I}${globstar(p)}${O})?${$}${R}${M}`;default:{const u=/^(.*?)\.(\w+)$/.exec(t);if(!u)return;const p=create(u[1]);if(!p)return;return p+$+u[2]}}};const j=g.removePrefix(t,L);let U=create(j);if(U&&p.strictSlashes!==true){U+=`${O}?`}return U};t.exports=parse},3193:(t,u,p)=>{"use strict";const m=p(6928);const g=p(5330);const y=p(4356);const v=p(7910);const b=p(7054);const isObject=t=>t&&typeof t==="object"&&!Array.isArray(t);const picomatch=(t,u,p=false)=>{if(Array.isArray(t)){const m=t.map((t=>picomatch(t,u,p)));const arrayMatcher=t=>{for(const u of m){const p=u(t);if(p)return p}return false};return arrayMatcher}const m=isObject(t)&&t.tokens&&t.input;if(t===""||typeof t!=="string"&&!m){throw new TypeError("Expected pattern to be a non-empty string")}const g=u||{};const y=v.isWindows(u);const b=m?picomatch.compileRe(t,u):picomatch.makeRe(t,u,false,true);const w=b.state;delete b.state;let isIgnored=()=>false;if(g.ignore){const t={...u,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(g.ignore,t,p)}const matcher=(p,m=false)=>{const{isMatch:v,match:E,output:$}=picomatch.test(p,b,u,{glob:t,posix:y});const O={glob:t,state:w,regex:b,posix:y,input:p,output:$,match:E,isMatch:v};if(typeof g.onResult==="function"){g.onResult(O)}if(v===false){O.isMatch=false;return m?O:false}if(isIgnored(p)){if(typeof g.onIgnore==="function"){g.onIgnore(O)}O.isMatch=false;return m?O:false}if(typeof g.onMatch==="function"){g.onMatch(O)}return m?O:true};if(p){matcher.state=w}return matcher};picomatch.test=(t,u,p,{glob:m,posix:g}={})=>{if(typeof t!=="string"){throw new TypeError("Expected input to be a string")}if(t===""){return{isMatch:false,output:""}}const y=p||{};const b=y.format||(g?v.toPosixSlashes:null);let w=t===m;let E=w&&b?b(t):t;if(w===false){E=b?b(t):t;w=E===m}if(w===false||y.capture===true){if(y.matchBase===true||y.basename===true){w=picomatch.matchBase(t,u,p,g)}else{w=u.exec(E)}}return{isMatch:Boolean(w),match:w,output:E}};picomatch.matchBase=(t,u,p,g=v.isWindows(p))=>{const y=u instanceof RegExp?u:picomatch.makeRe(u,p);return y.test(m.basename(t))};picomatch.isMatch=(t,u,p)=>picomatch(u,p)(t);picomatch.parse=(t,u)=>{if(Array.isArray(t))return t.map((t=>picomatch.parse(t,u)));return y(t,{...u,fastpaths:false})};picomatch.scan=(t,u)=>g(t,u);picomatch.compileRe=(t,u,p=false,m=false)=>{if(p===true){return t.output}const g=u||{};const y=g.contains?"":"^";const v=g.contains?"":"$";let b=`${y}(?:${t.output})${v}`;if(t&&t.negated===true){b=`^(?!${b}).*$`}const w=picomatch.toRegex(b,u);if(m===true){w.state=t}return w};picomatch.makeRe=(t,u={},p=false,m=false)=>{if(!t||typeof t!=="string"){throw new TypeError("Expected a non-empty string")}let g={negated:false,fastpaths:true};if(u.fastpaths!==false&&(t[0]==="."||t[0]==="*")){g.output=y.fastpaths(t,u)}if(!g.output){g=y(t,u)}return picomatch.compileRe(g,u,p,m)};picomatch.toRegex=(t,u)=>{try{const p=u||{};return new RegExp(t,p.flags||(p.nocase?"i":""))}catch(t){if(u&&u.debug===true)throw t;return/$^/}};picomatch.constants=b;t.exports=picomatch},5330:(t,u,p)=>{"use strict";const m=p(7910);const{CHAR_ASTERISK:g,CHAR_AT:y,CHAR_BACKWARD_SLASH:v,CHAR_COMMA:b,CHAR_DOT:w,CHAR_EXCLAMATION_MARK:E,CHAR_FORWARD_SLASH:$,CHAR_LEFT_CURLY_BRACE:O,CHAR_LEFT_PARENTHESES:R,CHAR_LEFT_SQUARE_BRACKET:P,CHAR_PLUS:A,CHAR_QUESTION_MARK:x,CHAR_RIGHT_CURLY_BRACE:T,CHAR_RIGHT_PARENTHESES:C,CHAR_RIGHT_SQUARE_BRACKET:k}=p(7054);const isPathSeparator=t=>t===$||t===v;const depth=t=>{if(t.isPrefix!==true){t.depth=t.isGlobstar?Infinity:1}};const scan=(t,u)=>{const p=u||{};const I=t.length-1;const N=p.parts===true||p.scanToEnd===true;const D=[];const L=[];const M=[];let j=t;let U=-1;let B=0;let H=0;let V=false;let z=false;let G=false;let q=false;let W=false;let Y=false;let Z=false;let X=false;let J=false;let Q=false;let ee=0;let se;let ie;let ne={value:"",depth:0,isGlob:false};const eos=()=>U>=I;const peek=()=>j.charCodeAt(U+1);const advance=()=>{se=ie;return j.charCodeAt(++U)};while(U<I){ie=advance();let t;if(ie===v){Z=ne.backslashes=true;ie=advance();if(ie===O){Y=true}continue}if(Y===true||ie===O){ee++;while(eos()!==true&&(ie=advance())){if(ie===v){Z=ne.backslashes=true;advance();continue}if(ie===O){ee++;continue}if(Y!==true&&ie===w&&(ie=advance())===w){V=ne.isBrace=true;G=ne.isGlob=true;Q=true;if(N===true){continue}break}if(Y!==true&&ie===b){V=ne.isBrace=true;G=ne.isGlob=true;Q=true;if(N===true){continue}break}if(ie===T){ee--;if(ee===0){Y=false;V=ne.isBrace=true;Q=true;break}}}if(N===true){continue}break}if(ie===$){D.push(U);L.push(ne);ne={value:"",depth:0,isGlob:false};if(Q===true)continue;if(se===w&&U===B+1){B+=2;continue}H=U+1;continue}if(p.noext!==true){const t=ie===A||ie===y||ie===g||ie===x||ie===E;if(t===true&&peek()===R){G=ne.isGlob=true;q=ne.isExtglob=true;Q=true;if(ie===E&&U===B){J=true}if(N===true){while(eos()!==true&&(ie=advance())){if(ie===v){Z=ne.backslashes=true;ie=advance();continue}if(ie===C){G=ne.isGlob=true;Q=true;break}}continue}break}}if(ie===g){if(se===g)W=ne.isGlobstar=true;G=ne.isGlob=true;Q=true;if(N===true){continue}break}if(ie===x){G=ne.isGlob=true;Q=true;if(N===true){continue}break}if(ie===P){while(eos()!==true&&(t=advance())){if(t===v){Z=ne.backslashes=true;advance();continue}if(t===k){z=ne.isBracket=true;G=ne.isGlob=true;Q=true;break}}if(N===true){continue}break}if(p.nonegate!==true&&ie===E&&U===B){X=ne.negated=true;B++;continue}if(p.noparen!==true&&ie===R){G=ne.isGlob=true;if(N===true){while(eos()!==true&&(ie=advance())){if(ie===R){Z=ne.backslashes=true;ie=advance();continue}if(ie===C){Q=true;break}}continue}break}if(G===true){Q=true;if(N===true){continue}break}}if(p.noext===true){q=false;G=false}let ae=j;let le="";let ue="";if(B>0){le=j.slice(0,B);j=j.slice(B);H-=B}if(ae&&G===true&&H>0){ae=j.slice(0,H);ue=j.slice(H)}else if(G===true){ae="";ue=j}else{ae=j}if(ae&&ae!==""&&ae!=="/"&&ae!==j){if(isPathSeparator(ae.charCodeAt(ae.length-1))){ae=ae.slice(0,-1)}}if(p.unescape===true){if(ue)ue=m.removeBackslashes(ue);if(ae&&Z===true){ae=m.removeBackslashes(ae)}}const he={prefix:le,input:t,start:B,base:ae,glob:ue,isBrace:V,isBracket:z,isGlob:G,isExtglob:q,isGlobstar:W,negated:X,negatedExtglob:J};if(p.tokens===true){he.maxDepth=0;if(!isPathSeparator(ie)){L.push(ne)}he.tokens=L}if(p.parts===true||p.tokens===true){let u;for(let m=0;m<D.length;m++){const g=u?u+1:B;const y=D[m];const v=t.slice(g,y);if(p.tokens){if(m===0&&B!==0){L[m].isPrefix=true;L[m].value=le}else{L[m].value=v}depth(L[m]);he.maxDepth+=L[m].depth}if(m!==0||v!==""){M.push(v)}u=y}if(u&&u+1<t.length){const m=t.slice(u+1);M.push(m);if(p.tokens){L[L.length-1].value=m;depth(L[L.length-1]);he.maxDepth+=L[L.length-1].depth}}he.slashes=D;he.parts=M}return he};t.exports=scan},7910:(t,u,p)=>{"use strict";const m=p(6928);const g=process.platform==="win32";const{REGEX_BACKSLASH:y,REGEX_REMOVE_BACKSLASH:v,REGEX_SPECIAL_CHARS:b,REGEX_SPECIAL_CHARS_GLOBAL:w}=p(7054);u.isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);u.hasRegexChars=t=>b.test(t);u.isRegexChar=t=>t.length===1&&u.hasRegexChars(t);u.escapeRegex=t=>t.replace(w,"\\$1");u.toPosixSlashes=t=>t.replace(y,"/");u.removeBackslashes=t=>t.replace(v,(t=>t==="\\"?"":t));u.supportsLookbehinds=()=>{const t=process.version.slice(1).split(".").map(Number);if(t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10){return true}return false};u.isWindows=t=>{if(t&&typeof t.windows==="boolean"){return t.windows}return g===true||m.sep==="\\"};u.escapeLast=(t,p,m)=>{const g=t.lastIndexOf(p,m);if(g===-1)return t;if(t[g-1]==="\\")return u.escapeLast(t,p,g-1);return`${t.slice(0,g)}\\${t.slice(g)}`};u.removePrefix=(t,u={})=>{let p=t;if(p.startsWith("./")){p=p.slice(2);u.prefix="./"}return p};u.wrapOutput=(t,u={},p={})=>{const m=p.contains?"":"^";const g=p.contains?"":"$";let y=`${m}(?:${t})${g}`;if(u.negated===true){y=`(?:^(?!${y}).*$)`}return y}},3066:t=>{"use strict";class DatePart{constructor({token:t,date:u,parts:p,locales:m}){this.token=t;this.date=u||new Date;this.parts=p||[this];this.locales=m||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((u,p)=>p>t&&u instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const u=t.indexOf(this);return t.find(((t,p)=>p>u&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},4477:(t,u,p)=>{"use strict";const m=p(3066);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends m{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate();let u=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?u+1:this.token==="ddd"?this.locales.weekdaysShort[u]:this.token==="dddd"?this.locales.weekdays[u]:t}}t.exports=Day},7524:(t,u,p)=>{"use strict";const m=p(3066);class Hours extends m{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();if(/h/.test(this.token))t=t%12||12;return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Hours},8691:(t,u,p)=>{"use strict";t.exports={DatePart:p(3066),Meridiem:p(2513),Day:p(4477),Hours:p(7524),Milliseconds:p(8521),Minutes:p(8042),Month:p(3153),Seconds:p(150),Year:p(3082)}},2513:(t,u,p)=>{"use strict";const m=p(3066);class Meridiem extends m{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}t.exports=Meridiem},8521:(t,u,p)=>{"use strict";const m=p(3066);class Milliseconds extends m{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}t.exports=Milliseconds},8042:(t,u,p)=>{"use strict";const m=p(3066);class Minutes extends m{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Minutes},3153:(t,u,p)=>{"use strict";const m=p(3066);class Month extends m{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1;this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth();let u=this.token.length;return u===2?String(t+1).padStart(2,"0"):u===3?this.locales.monthsShort[t]:u===4?this.locales.months[t]:String(t+1)}}t.exports=Month},150:(t,u,p)=>{"use strict";const m=p(3066);class Seconds extends m{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Seconds},3082:(t,u,p)=>{"use strict";const m=p(3066);class Year extends m{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}t.exports=Year},8700:(t,u,p)=>{"use strict";function asyncGeneratorStep(t,u,p,m,g,y,v){try{var b=t[y](v);var w=b.value}catch(t){p(t);return}if(b.done){u(w)}else{Promise.resolve(w).then(m,g)}}function _asyncToGenerator(t){return function(){var u=this,p=arguments;return new Promise((function(m,g){var y=t.apply(u,p);function _next(t){asyncGeneratorStep(y,m,g,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(y,m,g,_next,_throw,"throw",t)}_next(undefined)}))}}const m=p(5665);const g=p(7930);const y=p(9458),v=y.erase,b=y.cursor;const w=p(5431),E=w.style,$=w.clear,O=w.figures,R=w.wrap,P=w.entriesToDisplay;const getVal=(t,u)=>t[u]&&(t[u].value||t[u].title||t[u]);const getTitle=(t,u)=>t[u]&&(t[u].title||t[u].value||t[u]);const getIndex=(t,u)=>{const p=t.findIndex((t=>t.value===u||t.title===u));return p>-1?p:undefined};class AutocompletePrompt extends g{constructor(t={}){super(t);this.msg=t.message;this.suggest=t.suggest;this.choices=t.choices;this.initial=typeof t.initial==="number"?t.initial:getIndex(t.choices,t.initial);this.select=this.initial||t.cursor||0;this.i18n={noMatches:t.noMatches||"no matches found"};this.fallback=t.fallback||this.initial;this.clearFirst=t.clearFirst||false;this.suggestions=[];this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=E.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=$("",this.out.columns);this.complete(this.render);this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;if(typeof this._fb==="number")t=this.choices[this._fb];else if(typeof this._fb==="string")t={title:this._fb};return t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t;if(this.suggestions.length>0)this.value=getVal(this.suggestions,t);else this.value=this.fallback.value;this.fire()}complete(t){var u=this;return _asyncToGenerator((function*(){const p=u.completing=u.suggest(u.input,u.choices);const m=yield p;if(u.completing!==p)return;u.suggestions=m.map(((t,u,p)=>({title:getTitle(p,u),value:getVal(p,u),description:t.description})));u.completing=false;const g=Math.max(m.length-1,0);u.moveSelect(Math.min(g,u.select));t&&t()}))()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}exit(){if(this.clearFirst&&this.input.length>0){this.reset()}else{this.done=this.exited=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}abort(){this.done=this.aborted=true;this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,u){let p=this.input.slice(0,this.cursor);let m=this.input.slice(this.cursor);this.input=`${p}${t}${m}`;this.cursor=p.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1);let u=this.input.slice(this.cursor);this.input=`${t}${u}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor);let u=this.input.slice(this.cursor+1);this.input=`${t}${u}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions.length-1);this.render()}up(){if(this.select===0){this.moveSelect(this.suggestions.length-1)}else{this.moveSelect(this.select-1)}this.render()}down(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else{this.moveSelect(this.select+1)}this.render()}next(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1));this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0));this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}renderOption(t,u,p,g){let y;let v=p?O.arrowUp:g?O.arrowDown:" ";let b=u?m.cyan().underline(t.title):t.title;v=(u?m.cyan(O.pointer)+" ":" ")+v;if(t.description){y=` - ${t.description}`;if(v.length+b.length+y.length>=this.out.columns||t.description.split(/\r?\n/).length>1){y="\n"+R(t.description,{margin:3,width:this.out.columns})}}return v+" "+b+m.gray(y||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(b.hide);else this.out.write($(this.outputText,this.out.columns));super.render();let t=P(this.select,this.choices.length,this.limit),u=t.startIndex,p=t.endIndex;this.outputText=[E.symbol(this.done,this.aborted,this.exited),m.bold(this.msg),E.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" ");if(!this.done){const t=this.suggestions.slice(u,p).map(((t,m)=>this.renderOption(t,this.select===m+u,m===0&&u>0,m+u===p-1&&p<this.choices.length))).join("\n");this.outputText+=`\n`+(t||m.gray(this.fallback.title))}this.out.write(v.line+b.to(0)+this.outputText)}}t.exports=AutocompletePrompt},6727:(t,u,p)=>{"use strict";const m=p(5665);const g=p(9458),y=g.cursor;const v=p(4963);const b=p(5431),w=b.clear,E=b.style,$=b.figures;class AutocompleteMultiselectPrompt extends v{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=w("",this.out.columns);this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>{if(this.inputValue){if(typeof t.title==="string"){if(t.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof t.value==="string"){if(t.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const u=this.filteredOptions.findIndex((u=>u===t));this.cursor=u<0?0:u;this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t;this.updateFilteredOptions()}_(t,u){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return`\nInstructions:\n ${$.arrowUp}/${$.arrowDown}: Highlight option\n ${$.arrowLeft}/${$.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`}return""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:m.gray("Enter something to filter")}\n`}renderOption(t,u,p){let g;if(u.disabled)g=t===p?m.gray().underline(u.title):m.strikethrough().gray(u.title);else g=t===p?m.cyan().underline(u.title):u.title;return(u.selected?m.green($.radioOn):$.radioOff)+" "+g}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[m.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(m.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(y.hide);super.render();let t=[E.symbol(this.done,this.aborted),m.bold(this.msg),E.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=m.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+t);this.clear=w(t,this.out.columns)}}t.exports=AutocompleteMultiselectPrompt},4966:(t,u,p)=>{"use strict";const m=p(5665);const g=p(7930);const y=p(5431),v=y.style,b=y.clear;const w=p(9458),E=w.erase,$=w.cursor;class ConfirmPrompt extends g{constructor(t={}){super(t);this.msg=t.message;this.value=t.initial;this.initialValue=!!t.initial;this.yesMsg=t.yes||"yes";this.yesOption=t.yesOption||"(Y/n)";this.noMsg=t.no||"no";this.noOption=t.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,u){if(t.toLowerCase()==="y"){this.value=true;return this.submit()}if(t.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write($.hide);else this.out.write(b(this.outputText,this.out.columns));super.render();this.outputText=[v.symbol(this.done,this.aborted),m.bold(this.msg),v.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:m.gray(this.initialValue?this.yesOption:this.noOption)].join(" ");this.out.write(E.line+$.to(0)+this.outputText)}}t.exports=ConfirmPrompt},2260:(t,u,p)=>{"use strict";function asyncGeneratorStep(t,u,p,m,g,y,v){try{var b=t[y](v);var w=b.value}catch(t){p(t);return}if(b.done){u(w)}else{Promise.resolve(w).then(m,g)}}function _asyncToGenerator(t){return function(){var u=this,p=arguments;return new Promise((function(m,g){var y=t.apply(u,p);function _next(t){asyncGeneratorStep(y,m,g,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(y,m,g,_next,_throw,"throw",t)}_next(undefined)}))}}const m=p(5665);const g=p(7930);const y=p(5431),v=y.style,b=y.clear,w=y.figures;const E=p(9458),$=E.erase,O=E.cursor;const R=p(8691),P=R.DatePart,A=R.Meridiem,x=R.Day,T=R.Hours,C=R.Milliseconds,k=R.Minutes,I=R.Month,N=R.Seconds,D=R.Year;const L=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const M={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new x(t),3:t=>new I(t),4:t=>new D(t),5:t=>new A(t),6:t=>new T(t),7:t=>new k(t),8:t=>new N(t),9:t=>new C(t)};const j={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends g{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(j,t.locales);this._date=t.initial||new Date;this.errorMsg=t.error||"Please Enter A Valid Value";this.validator=t.validate||(()=>true);this.mask=t.mask||"YYYY-MM-DD HH:mm:ss";this.clear=b("",this.out.columns);this.render()}get value(){return this.date}get date(){return this._date}set date(t){if(t)this._date.setTime(t.getTime())}set mask(t){let u;this.parts=[];while(u=L.exec(t)){let t=u.shift();let p=u.findIndex((t=>t!=null));this.parts.push(p in M?M[p]({token:u[p]||t,date:this.date,parts:this.parts,locales:this.locales}):u[p]||t)}let p=this.parts.reduce(((t,u)=>{if(typeof u==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=u;else t.push(u);return t}),[]);this.parts.splice(0);this.parts.push(...p);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof P)));this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let u=yield t.validator(t.value);if(typeof u==="string"){t.errorMsg=u;u=false}t.error=!u}))()}submit(){var t=this;return _asyncToGenerator((function*(){yield t.validate();if(t.error){t.color="red";t.fire();t.render();return}t.done=true;t.aborted=false;t.fire();t.render();t.out.write("\n");t.close()}))()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof P)));this.render()}_(t){if(/\d/.test(t)){this.typed+=t;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(O.hide);else this.out.write(b(this.outputText,this.out.columns));super.render();this.outputText=[v.symbol(this.done,this.aborted),m.bold(this.msg),v.delimiter(false),this.parts.reduce(((t,u,p)=>t.concat(p===this.cursor&&!this.done?m.cyan().underline(u.toString()):u)),[]).join("")].join(" ");if(this.error){this.outputText+=this.errorMsg.split("\n").reduce(((t,u,p)=>t+`\n${p?` `:w.pointerSmall} ${m.red().italic(u)}`),``)}this.out.write($.line+O.to(0)+this.outputText)}}t.exports=DatePrompt},362:(t,u,p)=>{"use strict";t.exports={TextPrompt:p(2875),SelectPrompt:p(3440),TogglePrompt:p(4796),DatePrompt:p(2260),NumberPrompt:p(6157),MultiselectPrompt:p(4963),AutocompletePrompt:p(8700),AutocompleteMultiselectPrompt:p(6727),ConfirmPrompt:p(4966)}},4963:(t,u,p)=>{"use strict";const m=p(5665);const g=p(9458),y=g.cursor;const v=p(7930);const b=p(5431),w=b.clear,E=b.figures,$=b.style,O=b.wrap,R=b.entriesToDisplay;class MultiselectPrompt extends v{constructor(t={}){super(t);this.msg=t.message;this.cursor=t.cursor||0;this.scrollIndex=t.cursor||0;this.hint=t.hint||"";this.warn=t.warn||"- This option is disabled -";this.minSelected=t.min;this.showMinError=false;this.maxChoices=t.max;this.instructions=t.instructions;this.optionsPerPage=t.optionsPerPage||10;this.value=t.choices.map(((t,u)=>{if(typeof t==="string")t={title:t,value:u};return{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(t.value===undefined?u:t.value),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=w("",this.out.columns);if(!t.overrideRender){this.render()}}reset(){this.value.map((t=>!t.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((t=>t.selected))}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const t=this.value.filter((t=>t.selected));if(this.minSelected&&t.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}toggleAll(){if(this.maxChoices!==undefined||this.value[this.cursor].disabled){return this.bell()}const t=!this.value[this.cursor].selected;this.value.filter((t=>!t.disabled)).forEach((u=>u.selected=t));this.render()}_(t,u){if(t===" "){this.handleSpaceToggle()}else if(t==="a"){this.toggleAll()}else{return this.bell()}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return"\nInstructions:\n"+` ${E.arrowUp}/${E.arrowDown}: Highlight option\n`+` ${E.arrowLeft}/${E.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===undefined?` a: Toggle all\n`:"")+` enter/return: Complete answer`}return""}renderOption(t,u,p,g){const y=(u.selected?m.green(E.radioOn):E.radioOff)+" "+g+" ";let v,b;if(u.disabled){v=t===p?m.gray().underline(u.title):m.strikethrough().gray(u.title)}else{v=t===p?m.cyan().underline(u.title):u.title;if(t===p&&u.description){b=` - ${u.description}`;if(y.length+v.length+b.length>=this.out.columns||u.description.split(/\r?\n/).length>1){b="\n"+O(u.description,{margin:y.length,width:this.out.columns})}}}return y+v+m.gray(b||"")}paginateOptions(t){if(t.length===0){return m.red("No matches for this query.")}let u=R(this.cursor,t.length,this.optionsPerPage),p=u.startIndex,g=u.endIndex;let y,v=[];for(let u=p;u<g;u++){if(u===p&&p>0){y=E.arrowUp}else if(u===g-1&&g<t.length){y=E.arrowDown}else{y=" "}v.push(this.renderOption(this.cursor,t[u],u,y))}return"\n"+v.join("\n")}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[m.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(m.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(y.hide);super.render();let t=[$.symbol(this.done,this.aborted),m.bold(this.msg),$.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=m.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.value);this.out.write(this.clear+t);this.clear=w(t,this.out.columns)}}t.exports=MultiselectPrompt},6157:(t,u,p)=>{"use strict";function asyncGeneratorStep(t,u,p,m,g,y,v){try{var b=t[y](v);var w=b.value}catch(t){p(t);return}if(b.done){u(w)}else{Promise.resolve(w).then(m,g)}}function _asyncToGenerator(t){return function(){var u=this,p=arguments;return new Promise((function(m,g){var y=t.apply(u,p);function _next(t){asyncGeneratorStep(y,m,g,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(y,m,g,_next,_throw,"throw",t)}_next(undefined)}))}}const m=p(5665);const g=p(7930);const y=p(9458),v=y.cursor,b=y.erase;const w=p(5431),E=w.style,$=w.figures,O=w.clear,R=w.lines;const P=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,u)=>{let p=Math.pow(10,u);return Math.round(t*p)/p};class NumberPrompt extends g{constructor(t={}){super(t);this.transform=E.render(t.style);this.msg=t.message;this.initial=isDef(t.initial)?t.initial:"";this.float=!!t.float;this.round=t.round||2;this.inc=t.increment||1;this.min=isDef(t.min)?t.min:-Infinity;this.max=isDef(t.max)?t.max:Infinity;this.errorMsg=t.error||`Please Enter A Valid Value`;this.validator=t.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(t){if(!t&&t!==0){this.placeholder=true;this.rendered=m.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(t,this.round)}`);this._value=round(t,this.round)}this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t===`-`||t===`.`&&this.float||P.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=t!==``?t:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let u=yield t.validator(t.value);if(typeof u===`string`){t.errorMsg=u;u=false}t.error=!u}))()}submit(){var t=this;return _asyncToGenerator((function*(){yield t.validate();if(t.error){t.color=`red`;t.fire();t.render();return}let u=t.value;t.value=u!==``?u:t.initial;t.done=true;t.aborted=false;t.error=false;t.fire();t.render();t.out.write(`\n`);t.close()}))()}up(){this.typed=``;if(this.value===""){this.value=this.min-this.inc}if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value===""){this.value=this.min+this.inc}if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||``;if(this.value!==""&&this.value<this.min){this.value=this.min}this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,u){if(!this.valid(t))return this.bell();const p=Date.now();if(p-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=p;this.color=`cyan`;if(t===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(v.down(R(this.outputError,this.out.columns)-1)+O(this.outputError,this.out.columns));this.out.write(O(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[E.symbol(this.done,this.aborted),m.bold(this.msg),E.delimiter(this.done),!this.done||!this.done&&!this.placeholder?m[this.color]().underline(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,u,p)=>t+`\n${p?` `:$.pointerSmall} ${m.red().italic(u)}`),``)}this.out.write(b.line+v.to(0)+this.outputText+v.save+this.outputError+v.restore)}}t.exports=NumberPrompt},7930:(t,u,p)=>{"use strict";const m=p(3785);const g=p(5431),y=g.action;const v=p(4434);const b=p(9458),w=b.beep,E=b.cursor;const $=p(5665);class Prompt extends v{constructor(t={}){super();this.firstRender=true;this.in=t.stdin||process.stdin;this.out=t.stdout||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const u=m.createInterface({input:this.in,escapeCodeTimeout:50});m.emitKeypressEvents(this.in,u);if(this.in.isTTY)this.in.setRawMode(true);const p=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1;const keypress=(t,u)=>{let m=y(u,p);if(m===false){this._&&this._(t,u)}else if(typeof this[m]==="function"){this[m](u)}else{this.bell()}};this.close=()=>{this.out.write(E.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);u.close();this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(w)}render(){this.onRender($);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},3440:(t,u,p)=>{"use strict";const m=p(5665);const g=p(7930);const y=p(5431),v=y.style,b=y.clear,w=y.figures,E=y.wrap,$=y.entriesToDisplay;const O=p(9458),R=O.cursor;class SelectPrompt extends g{constructor(t={}){super(t);this.msg=t.message;this.hint=t.hint||"- Use arrow-keys. Return to submit.";this.warn=t.warn||"- This option is disabled";this.cursor=t.initial||0;this.choices=t.choices.map(((t,u)=>{if(typeof t==="string")t={title:t,value:u};return{title:t&&(t.title||t.value||t),value:t&&(t.value===undefined?u:t.value),description:t&&t.description,selected:t&&t.selected,disabled:t&&t.disabled}}));this.optionsPerPage=t.optionsPerPage||10;this.value=(this.choices[this.cursor]||{}).value;this.clear=b("",this.out.columns);this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0){this.moveCursor(this.choices.length-1)}else{this.moveCursor(this.cursor-1)}this.render()}down(){if(this.cursor===this.choices.length-1){this.moveCursor(0)}else{this.moveCursor(this.cursor+1)}this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,u){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(R.hide);else this.out.write(b(this.outputText,this.out.columns));super.render();let t=$(this.cursor,this.choices.length,this.optionsPerPage),u=t.startIndex,p=t.endIndex;this.outputText=[v.symbol(this.done,this.aborted),m.bold(this.msg),v.delimiter(false),this.done?this.selection.title:this.selection.disabled?m.yellow(this.warn):m.gray(this.hint)].join(" ");if(!this.done){this.outputText+="\n";for(let t=u;t<p;t++){let g,y,v="",b=this.choices[t];if(t===u&&u>0){y=w.arrowUp}else if(t===p-1&&p<this.choices.length){y=w.arrowDown}else{y=" "}if(b.disabled){g=this.cursor===t?m.gray().underline(b.title):m.strikethrough().gray(b.title);y=(this.cursor===t?m.bold().gray(w.pointer)+" ":" ")+y}else{g=this.cursor===t?m.cyan().underline(b.title):b.title;y=(this.cursor===t?m.cyan(w.pointer)+" ":" ")+y;if(b.description&&this.cursor===t){v=` - ${b.description}`;if(y.length+g.length+v.length>=this.out.columns||b.description.split(/\r?\n/).length>1){v="\n"+E(b.description,{margin:3,width:this.out.columns})}}}this.outputText+=`${y} ${g}${m.gray(v)}\n`}}this.out.write(this.outputText)}}t.exports=SelectPrompt},2875:(t,u,p)=>{"use strict";function asyncGeneratorStep(t,u,p,m,g,y,v){try{var b=t[y](v);var w=b.value}catch(t){p(t);return}if(b.done){u(w)}else{Promise.resolve(w).then(m,g)}}function _asyncToGenerator(t){return function(){var u=this,p=arguments;return new Promise((function(m,g){var y=t.apply(u,p);function _next(t){asyncGeneratorStep(y,m,g,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(y,m,g,_next,_throw,"throw",t)}_next(undefined)}))}}const m=p(5665);const g=p(7930);const y=p(9458),v=y.erase,b=y.cursor;const w=p(5431),E=w.style,$=w.clear,O=w.lines,R=w.figures;class TextPrompt extends g{constructor(t={}){super(t);this.transform=E.render(t.style);this.scale=this.transform.scale;this.msg=t.message;this.initial=t.initial||``;this.validator=t.validate||(()=>true);this.value=``;this.errorMsg=t.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.clear=$(``,this.out.columns);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=m.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(t)}this._value=t;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.fire();this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let u=yield t.validator(t.value);if(typeof u===`string`){t.errorMsg=u;u=false}t.error=!u}))()}submit(){var t=this;return _asyncToGenerator((function*(){t.value=t.value||t.initial;t.cursorOffset=0;t.cursor=t.rendered.length;yield t.validate();if(t.error){t.red=true;t.fire();t.render();return}t.done=true;t.aborted=false;t.fire();t.render();t.out.write("\n");t.close()}))()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(t){if(this.placeholder)return;this.cursor=this.cursor+t;this.cursorOffset+=t}_(t,u){let p=this.value.slice(0,this.cursor);let m=this.value.slice(this.cursor);this.value=`${p}${t}${m}`;this.red=false;this.cursor=this.placeholder?0:p.length+1;this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1);let u=this.value.slice(this.cursor);this.value=`${t}${u}`;this.red=false;if(this.isCursorAtStart()){this.cursorOffset=0}else{this.cursorOffset++;this.moveCursor(-1)}this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor);let u=this.value.slice(this.cursor+1);this.value=`${t}${u}`;this.red=false;if(this.isCursorAtEnd()){this.cursorOffset=0}else{this.cursorOffset++}this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(b.down(O(this.outputError,this.out.columns)-1)+$(this.outputError,this.out.columns));this.out.write($(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[E.symbol(this.done,this.aborted),m.bold(this.msg),E.delimiter(this.done),this.red?m.red(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,u,p)=>t+`\n${p?" ":R.pointerSmall} ${m.red().italic(u)}`),``)}this.out.write(v.line+b.to(0)+this.outputText+b.save+this.outputError+b.restore+b.move(this.cursorOffset,0))}}t.exports=TextPrompt},4796:(t,u,p)=>{"use strict";const m=p(5665);const g=p(7930);const y=p(5431),v=y.style,b=y.clear;const w=p(9458),E=w.cursor,$=w.erase;class TogglePrompt extends g{constructor(t={}){super(t);this.msg=t.message;this.value=!!t.initial;this.active=t.active||"on";this.inactive=t.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(t,u){if(t===" "){this.value=!this.value}else if(t==="1"){this.value=true}else if(t==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(E.hide);else this.out.write(b(this.outputText,this.out.columns));super.render();this.outputText=[v.symbol(this.done,this.aborted),m.bold(this.msg),v.delimiter(this.done),this.value?this.inactive:m.cyan().underline(this.inactive),m.gray("/"),this.value?m.cyan().underline(this.active):this.active].join(" ");this.out.write($.line+E.to(0)+this.outputText)}}t.exports=TogglePrompt},9086:(t,u,p)=>{"use strict";function ownKeys(t,u){var p=Object.keys(t);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(t);if(u){m=m.filter((function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable}))}p.push.apply(p,m)}return p}function _objectSpread(t){for(var u=1;u<arguments.length;u++){var p=arguments[u]!=null?arguments[u]:{};if(u%2){ownKeys(Object(p),true).forEach((function(u){_defineProperty(t,u,p[u])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(t,Object.getOwnPropertyDescriptors(p))}else{ownKeys(Object(p)).forEach((function(u){Object.defineProperty(t,u,Object.getOwnPropertyDescriptor(p,u))}))}}return t}function _defineProperty(t,u,p){if(u in t){Object.defineProperty(t,u,{value:p,enumerable:true,configurable:true,writable:true})}else{t[u]=p}return t}function _createForOfIteratorHelper(t,u){var p=typeof Symbol!=="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!p){if(Array.isArray(t)||(p=_unsupportedIterableToArray(t))||u&&t&&typeof t.length==="number"){if(p)t=p;var m=0;var g=function F(){};return{s:g,n:function n(){if(m>=t.length)return{done:true};return{done:false,value:t[m++]}},e:function e(t){throw t},f:g}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var y=true,v=false,b;return{s:function s(){p=p.call(t)},n:function n(){var t=p.next();y=t.done;return t},e:function e(t){v=true;b=t},f:function f(){try{if(!y&&p.return!=null)p.return()}finally{if(v)throw b}}}}function _unsupportedIterableToArray(t,u){if(!t)return;if(typeof t==="string")return _arrayLikeToArray(t,u);var p=Object.prototype.toString.call(t).slice(8,-1);if(p==="Object"&&t.constructor)p=t.constructor.name;if(p==="Map"||p==="Set")return Array.from(t);if(p==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p))return _arrayLikeToArray(t,u)}function _arrayLikeToArray(t,u){if(u==null||u>t.length)u=t.length;for(var p=0,m=new Array(u);p<u;p++)m[p]=t[p];return m}function asyncGeneratorStep(t,u,p,m,g,y,v){try{var b=t[y](v);var w=b.value}catch(t){p(t);return}if(b.done){u(w)}else{Promise.resolve(w).then(m,g)}}function _asyncToGenerator(t){return function(){var u=this,p=arguments;return new Promise((function(m,g){var y=t.apply(u,p);function _next(t){asyncGeneratorStep(y,m,g,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(y,m,g,_next,_throw,"throw",t)}_next(undefined)}))}}const m=p(2557);const g=["suggest","format","onState","validate","onRender","type"];const noop=()=>{};function prompt(){return _prompt.apply(this,arguments)}function _prompt(){_prompt=_asyncToGenerator((function*(t=[],{onSubmit:u=noop,onCancel:p=noop}={}){const y={};const v=prompt._override||{};t=[].concat(t);let b,w,E,$,O,R;const P=function(){var t=_asyncToGenerator((function*(t,u,p=false){if(!p&&t.validate&&t.validate(u)!==true){return}return t.format?yield t.format(u,y):u}));return function getFormattedAnswer(u,p){return t.apply(this,arguments)}}();var A=_createForOfIteratorHelper(t),x;try{for(A.s();!(x=A.n()).done;){w=x.value;var T=w;$=T.name;O=T.type;if(typeof O==="function"){O=yield O(b,_objectSpread({},y),w);w["type"]=O}if(!O)continue;for(let t in w){if(g.includes(t))continue;let u=w[t];w[t]=typeof u==="function"?yield u(b,_objectSpread({},y),R):u}R=w;if(typeof w.message!=="string"){throw new Error("prompt message is required")}var C=w;$=C.name;O=C.type;if(m[O]===void 0){throw new Error(`prompt type (${O}) is not defined`)}if(v[w.name]!==undefined){b=yield P(w,v[w.name]);if(b!==undefined){y[$]=b;continue}}try{b=prompt._injected?getInjectedAnswer(prompt._injected,w.initial):yield m[O](w);y[$]=b=yield P(w,b,true);E=yield u(w,b,y)}catch(t){E=!(yield p(w,y))}if(E)return y}}catch(t){A.e(t)}finally{A.f()}return y}));return _prompt.apply(this,arguments)}function getInjectedAnswer(t,u){const p=t.shift();if(p instanceof Error){throw p}return p===undefined?u:p}function inject(t){prompt._injected=(prompt._injected||[]).concat(t)}function override(t){prompt._override=Object.assign({},t)}t.exports=Object.assign(prompt,{prompt:prompt,prompts:m,inject:inject,override:override})},2557:(t,u,p)=>{"use strict";const m=u;const g=p(362);const noop=t=>t;function toPrompt(t,u,p={}){return new Promise(((m,y)=>{const v=new g[t](u);const b=p.onAbort||noop;const w=p.onSubmit||noop;const E=p.onExit||noop;v.on("state",u.onState||noop);v.on("submit",(t=>m(w(t))));v.on("exit",(t=>m(E(t))));v.on("abort",(t=>y(b(t))))}))}m.text=t=>toPrompt("TextPrompt",t);m.password=t=>{t.style="password";return m.text(t)};m.invisible=t=>{t.style="invisible";return m.text(t)};m.number=t=>toPrompt("NumberPrompt",t);m.date=t=>toPrompt("DatePrompt",t);m.confirm=t=>toPrompt("ConfirmPrompt",t);m.list=t=>{const u=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(u).map((t=>t.trim()))})};m.toggle=t=>toPrompt("TogglePrompt",t);m.select=t=>toPrompt("SelectPrompt",t);m.multiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("MultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};m.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("AutocompleteMultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(t,u)=>Promise.resolve(u.filter((u=>u.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));m.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},5377:t=>{"use strict";t.exports=(t,u)=>{if(t.meta&&t.name!=="escape")return;if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(u){if(t.name==="j")return"down";if(t.name==="k")return"up"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"exit";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="home")return"home";if(t.name==="end")return"end";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return false}},5202:(t,u,p)=>{"use strict";function _createForOfIteratorHelper(t,u){var p=typeof Symbol!=="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!p){if(Array.isArray(t)||(p=_unsupportedIterableToArray(t))||u&&t&&typeof t.length==="number"){if(p)t=p;var m=0;var g=function F(){};return{s:g,n:function n(){if(m>=t.length)return{done:true};return{done:false,value:t[m++]}},e:function e(t){throw t},f:g}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var y=true,v=false,b;return{s:function s(){p=p.call(t)},n:function n(){var t=p.next();y=t.done;return t},e:function e(t){v=true;b=t},f:function f(){try{if(!y&&p.return!=null)p.return()}finally{if(v)throw b}}}}function _unsupportedIterableToArray(t,u){if(!t)return;if(typeof t==="string")return _arrayLikeToArray(t,u);var p=Object.prototype.toString.call(t).slice(8,-1);if(p==="Object"&&t.constructor)p=t.constructor.name;if(p==="Map"||p==="Set")return Array.from(t);if(p==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p))return _arrayLikeToArray(t,u)}function _arrayLikeToArray(t,u){if(u==null||u>t.length)u=t.length;for(var p=0,m=new Array(u);p<u;p++)m[p]=t[p];return m}const m=p(4165);const g=p(9458),y=g.erase,v=g.cursor;const width=t=>[...m(t)].length;t.exports=function(t,u){if(!u)return y.line+v.to(0);let p=0;const m=t.split(/\r?\n/);var g=_createForOfIteratorHelper(m),b;try{for(g.s();!(b=g.n()).done;){let t=b.value;p+=1+Math.floor(Math.max(width(t)-1,0)/u)}}catch(t){g.e(t)}finally{g.f()}return y.lines(p)}},9022:t=>{"use strict";t.exports=(t,u,p)=>{p=p||u;let m=Math.min(u-p,t-Math.floor(p/2));if(m<0)m=0;let g=Math.min(m+p,u);return{startIndex:m,endIndex:g}}},1702:t=>{"use strict";const u={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const p={arrowUp:u.arrowUp,arrowDown:u.arrowDown,arrowLeft:u.arrowLeft,arrowRight:u.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const m=process.platform==="win32"?p:u;t.exports=m},5431:(t,u,p)=>{"use strict";t.exports={action:p(5377),clear:p(5202),style:p(1130),strip:p(4165),figures:p(1702),lines:p(1924),wrap:p(7359),entriesToDisplay:p(9022)}},1924:(t,u,p)=>{"use strict";const m=p(4165);t.exports=function(t,u){let p=String(m(t)||"").split(/\r?\n/);if(!u)return p.length;return p.map((t=>Math.ceil(t.length/u))).reduce(((t,u)=>t+u))}},4165:t=>{"use strict";t.exports=t=>{const u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const p=new RegExp(u,"g");return typeof t==="string"?t.replace(p,""):t}},1130:(t,u,p)=>{"use strict";const m=p(5665);const g=p(1702);const y=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}});const render=t=>y[t]||y.default;const v=Object.freeze({aborted:m.red(g.cross),done:m.green(g.tick),exited:m.yellow(g.cross),default:m.cyan("?")});const symbol=(t,u,p)=>u?v.aborted:p?v.exited:t?v.done:v.default;const delimiter=t=>m.gray(t?g.ellipsis:g.pointerSmall);const item=(t,u)=>m.gray(t?u?g.pointerSmall:"+":g.line);t.exports={styles:y,render:render,symbols:v,symbol:symbol,delimiter:delimiter,item:item}},7359:t=>{"use strict";t.exports=(t,u={})=>{const p=Number.isSafeInteger(parseInt(u.margin))?new Array(parseInt(u.margin)).fill(" ").join(""):u.margin||"";const m=u.width;return(t||"").split(/\r?\n/g).map((t=>t.split(/\s+/g).reduce(((t,u)=>{if(u.length+p.length>=m||t[t.length-1].length+u.length+1<m)t[t.length-1]+=` ${u}`;else t.push(`${p}${u}`);return t}),[p]).join("\n"))).join("\n")}},6133:(t,u,p)=>{function isNodeLT(t){t=(Array.isArray(t)?t:t.split(".")).map(Number);let u=0,p=process.versions.node.split(".").map(Number);for(;u<t.length;u++){if(p[u]>t[u])return false;if(t[u]>p[u])return true}return false}t.exports=isNodeLT("8.6.0")?p(9086):p(365)},7615:t=>{"use strict";class DatePart{constructor({token:t,date:u,parts:p,locales:m}){this.token=t;this.date=u||new Date;this.parts=p||[this];this.locales=m||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((u,p)=>p>t&&u instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const u=t.indexOf(this);return t.find(((t,p)=>p>u&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},5486:(t,u,p)=>{"use strict";const m=p(7615);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends m{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate();let u=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?u+1:this.token==="ddd"?this.locales.weekdaysShort[u]:this.token==="dddd"?this.locales.weekdays[u]:t}}t.exports=Day},7411:(t,u,p)=>{"use strict";const m=p(7615);class Hours extends m{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();if(/h/.test(this.token))t=t%12||12;return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Hours},5232:(t,u,p)=>{"use strict";t.exports={DatePart:p(7615),Meridiem:p(7664),Day:p(5486),Hours:p(7411),Milliseconds:p(1067),Minutes:p(1897),Month:p(222),Seconds:p(853),Year:p(3211)}},7664:(t,u,p)=>{"use strict";const m=p(7615);class Meridiem extends m{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}t.exports=Meridiem},1067:(t,u,p)=>{"use strict";const m=p(7615);class Milliseconds extends m{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}t.exports=Milliseconds},1897:(t,u,p)=>{"use strict";const m=p(7615);class Minutes extends m{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Minutes},222:(t,u,p)=>{"use strict";const m=p(7615);class Month extends m{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1;this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth();let u=this.token.length;return u===2?String(t+1).padStart(2,"0"):u===3?this.locales.monthsShort[t]:u===4?this.locales.months[t]:String(t+1)}}t.exports=Month},853:(t,u,p)=>{"use strict";const m=p(7615);class Seconds extends m{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Seconds},3211:(t,u,p)=>{"use strict";const m=p(7615);class Year extends m{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}t.exports=Year},8643:(t,u,p)=>{"use strict";const m=p(5665);const g=p(457);const{erase:y,cursor:v}=p(9458);const{style:b,clear:w,figures:E,wrap:$,entriesToDisplay:O}=p(9398);const getVal=(t,u)=>t[u]&&(t[u].value||t[u].title||t[u]);const getTitle=(t,u)=>t[u]&&(t[u].title||t[u].value||t[u]);const getIndex=(t,u)=>{const p=t.findIndex((t=>t.value===u||t.title===u));return p>-1?p:undefined};class AutocompletePrompt extends g{constructor(t={}){super(t);this.msg=t.message;this.suggest=t.suggest;this.choices=t.choices;this.initial=typeof t.initial==="number"?t.initial:getIndex(t.choices,t.initial);this.select=this.initial||t.cursor||0;this.i18n={noMatches:t.noMatches||"no matches found"};this.fallback=t.fallback||this.initial;this.clearFirst=t.clearFirst||false;this.suggestions=[];this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=b.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=w("",this.out.columns);this.complete(this.render);this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;if(typeof this._fb==="number")t=this.choices[this._fb];else if(typeof this._fb==="string")t={title:this._fb};return t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t;if(this.suggestions.length>0)this.value=getVal(this.suggestions,t);else this.value=this.fallback.value;this.fire()}async complete(t){const u=this.completing=this.suggest(this.input,this.choices);const p=await u;if(this.completing!==u)return;this.suggestions=p.map(((t,u,p)=>({title:getTitle(p,u),value:getVal(p,u),description:t.description})));this.completing=false;const m=Math.max(p.length-1,0);this.moveSelect(Math.min(m,this.select));t&&t()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}exit(){if(this.clearFirst&&this.input.length>0){this.reset()}else{this.done=this.exited=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}abort(){this.done=this.aborted=true;this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,u){let p=this.input.slice(0,this.cursor);let m=this.input.slice(this.cursor);this.input=`${p}${t}${m}`;this.cursor=p.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1);let u=this.input.slice(this.cursor);this.input=`${t}${u}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor);let u=this.input.slice(this.cursor+1);this.input=`${t}${u}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions.length-1);this.render()}up(){if(this.select===0){this.moveSelect(this.suggestions.length-1)}else{this.moveSelect(this.select-1)}this.render()}down(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else{this.moveSelect(this.select+1)}this.render()}next(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1));this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0));this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}renderOption(t,u,p,g){let y;let v=p?E.arrowUp:g?E.arrowDown:" ";let b=u?m.cyan().underline(t.title):t.title;v=(u?m.cyan(E.pointer)+" ":" ")+v;if(t.description){y=` - ${t.description}`;if(v.length+b.length+y.length>=this.out.columns||t.description.split(/\r?\n/).length>1){y="\n"+$(t.description,{margin:3,width:this.out.columns})}}return v+" "+b+m.gray(y||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(v.hide);else this.out.write(w(this.outputText,this.out.columns));super.render();let{startIndex:t,endIndex:u}=O(this.select,this.choices.length,this.limit);this.outputText=[b.symbol(this.done,this.aborted,this.exited),m.bold(this.msg),b.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" ");if(!this.done){const p=this.suggestions.slice(t,u).map(((p,m)=>this.renderOption(p,this.select===m+t,m===0&&t>0,m+t===u-1&&u<this.choices.length))).join("\n");this.outputText+=`\n`+(p||m.gray(this.fallback.title))}this.out.write(y.line+v.to(0)+this.outputText)}}t.exports=AutocompletePrompt},8005:(t,u,p)=>{"use strict";const m=p(5665);const{cursor:g}=p(9458);const y=p(1926);const{clear:v,style:b,figures:w}=p(9398);class AutocompleteMultiselectPrompt extends y{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=v("",this.out.columns);this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>{if(this.inputValue){if(typeof t.title==="string"){if(t.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof t.value==="string"){if(t.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const u=this.filteredOptions.findIndex((u=>u===t));this.cursor=u<0?0:u;this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t;this.updateFilteredOptions()}_(t,u){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return`\nInstructions:\n ${w.arrowUp}/${w.arrowDown}: Highlight option\n ${w.arrowLeft}/${w.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`}return""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:m.gray("Enter something to filter")}\n`}renderOption(t,u,p){let g;if(u.disabled)g=t===p?m.gray().underline(u.title):m.strikethrough().gray(u.title);else g=t===p?m.cyan().underline(u.title):u.title;return(u.selected?m.green(w.radioOn):w.radioOff)+" "+g}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[m.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(m.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(g.hide);super.render();let t=[b.symbol(this.done,this.aborted),m.bold(this.msg),b.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=m.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+t);this.clear=v(t,this.out.columns)}}t.exports=AutocompleteMultiselectPrompt},7812:(t,u,p)=>{const m=p(5665);const g=p(457);const{style:y,clear:v}=p(9398);const{erase:b,cursor:w}=p(9458);class ConfirmPrompt extends g{constructor(t={}){super(t);this.msg=t.message;this.value=t.initial;this.initialValue=!!t.initial;this.yesMsg=t.yes||"yes";this.yesOption=t.yesOption||"(Y/n)";this.noMsg=t.no||"no";this.noOption=t.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,u){if(t.toLowerCase()==="y"){this.value=true;return this.submit()}if(t.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(w.hide);else this.out.write(v(this.outputText,this.out.columns));super.render();this.outputText=[y.symbol(this.done,this.aborted),m.bold(this.msg),y.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:m.gray(this.initialValue?this.yesOption:this.noOption)].join(" ");this.out.write(b.line+w.to(0)+this.outputText)}}t.exports=ConfirmPrompt},9123:(t,u,p)=>{"use strict";const m=p(5665);const g=p(457);const{style:y,clear:v,figures:b}=p(9398);const{erase:w,cursor:E}=p(9458);const{DatePart:$,Meridiem:O,Day:R,Hours:P,Milliseconds:A,Minutes:x,Month:T,Seconds:C,Year:k}=p(5232);const I=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const N={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new R(t),3:t=>new T(t),4:t=>new k(t),5:t=>new O(t),6:t=>new P(t),7:t=>new x(t),8:t=>new C(t),9:t=>new A(t)};const D={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends g{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(D,t.locales);this._date=t.initial||new Date;this.errorMsg=t.error||"Please Enter A Valid Value";this.validator=t.validate||(()=>true);this.mask=t.mask||"YYYY-MM-DD HH:mm:ss";this.clear=v("",this.out.columns);this.render()}get value(){return this.date}get date(){return this._date}set date(t){if(t)this._date.setTime(t.getTime())}set mask(t){let u;this.parts=[];while(u=I.exec(t)){let t=u.shift();let p=u.findIndex((t=>t!=null));this.parts.push(p in N?N[p]({token:u[p]||t,date:this.date,parts:this.parts,locales:this.locales}):u[p]||t)}let p=this.parts.reduce(((t,u)=>{if(typeof u==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=u;else t.push(u);return t}),[]);this.parts.splice(0);this.parts.push(...p);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof $)));this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let t=await this.validator(this.value);if(typeof t==="string"){this.errorMsg=t;t=false}this.error=!t}async submit(){await this.validate();if(this.error){this.color="red";this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof $)));this.render()}_(t){if(/\d/.test(t)){this.typed+=t;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(E.hide);else this.out.write(v(this.outputText,this.out.columns));super.render();this.outputText=[y.symbol(this.done,this.aborted),m.bold(this.msg),y.delimiter(false),this.parts.reduce(((t,u,p)=>t.concat(p===this.cursor&&!this.done?m.cyan().underline(u.toString()):u)),[]).join("")].join(" ");if(this.error){this.outputText+=this.errorMsg.split("\n").reduce(((t,u,p)=>t+`\n${p?` `:b.pointerSmall} ${m.red().italic(u)}`),``)}this.out.write(w.line+E.to(0)+this.outputText)}}t.exports=DatePrompt},1859:(t,u,p)=>{"use strict";t.exports={TextPrompt:p(6652),SelectPrompt:p(631),TogglePrompt:p(2339),DatePrompt:p(9123),NumberPrompt:p(9130),MultiselectPrompt:p(1926),AutocompletePrompt:p(8643),AutocompleteMultiselectPrompt:p(8005),ConfirmPrompt:p(7812)}},1926:(t,u,p)=>{"use strict";const m=p(5665);const{cursor:g}=p(9458);const y=p(457);const{clear:v,figures:b,style:w,wrap:E,entriesToDisplay:$}=p(9398);class MultiselectPrompt extends y{constructor(t={}){super(t);this.msg=t.message;this.cursor=t.cursor||0;this.scrollIndex=t.cursor||0;this.hint=t.hint||"";this.warn=t.warn||"- This option is disabled -";this.minSelected=t.min;this.showMinError=false;this.maxChoices=t.max;this.instructions=t.instructions;this.optionsPerPage=t.optionsPerPage||10;this.value=t.choices.map(((t,u)=>{if(typeof t==="string")t={title:t,value:u};return{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(t.value===undefined?u:t.value),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=v("",this.out.columns);if(!t.overrideRender){this.render()}}reset(){this.value.map((t=>!t.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((t=>t.selected))}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const t=this.value.filter((t=>t.selected));if(this.minSelected&&t.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}toggleAll(){if(this.maxChoices!==undefined||this.value[this.cursor].disabled){return this.bell()}const t=!this.value[this.cursor].selected;this.value.filter((t=>!t.disabled)).forEach((u=>u.selected=t));this.render()}_(t,u){if(t===" "){this.handleSpaceToggle()}else if(t==="a"){this.toggleAll()}else{return this.bell()}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return"\nInstructions:\n"+` ${b.arrowUp}/${b.arrowDown}: Highlight option\n`+` ${b.arrowLeft}/${b.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===undefined?` a: Toggle all\n`:"")+` enter/return: Complete answer`}return""}renderOption(t,u,p,g){const y=(u.selected?m.green(b.radioOn):b.radioOff)+" "+g+" ";let v,w;if(u.disabled){v=t===p?m.gray().underline(u.title):m.strikethrough().gray(u.title)}else{v=t===p?m.cyan().underline(u.title):u.title;if(t===p&&u.description){w=` - ${u.description}`;if(y.length+v.length+w.length>=this.out.columns||u.description.split(/\r?\n/).length>1){w="\n"+E(u.description,{margin:y.length,width:this.out.columns})}}}return y+v+m.gray(w||"")}paginateOptions(t){if(t.length===0){return m.red("No matches for this query.")}let{startIndex:u,endIndex:p}=$(this.cursor,t.length,this.optionsPerPage);let g,y=[];for(let m=u;m<p;m++){if(m===u&&u>0){g=b.arrowUp}else if(m===p-1&&p<t.length){g=b.arrowDown}else{g=" "}y.push(this.renderOption(this.cursor,t[m],m,g))}return"\n"+y.join("\n")}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[m.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(m.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(g.hide);super.render();let t=[w.symbol(this.done,this.aborted),m.bold(this.msg),w.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=m.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.value);this.out.write(this.clear+t);this.clear=v(t,this.out.columns)}}t.exports=MultiselectPrompt},9130:(t,u,p)=>{const m=p(5665);const g=p(457);const{cursor:y,erase:v}=p(9458);const{style:b,figures:w,clear:E,lines:$}=p(9398);const O=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,u)=>{let p=Math.pow(10,u);return Math.round(t*p)/p};class NumberPrompt extends g{constructor(t={}){super(t);this.transform=b.render(t.style);this.msg=t.message;this.initial=isDef(t.initial)?t.initial:"";this.float=!!t.float;this.round=t.round||2;this.inc=t.increment||1;this.min=isDef(t.min)?t.min:-Infinity;this.max=isDef(t.max)?t.max:Infinity;this.errorMsg=t.error||`Please Enter A Valid Value`;this.validator=t.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(t){if(!t&&t!==0){this.placeholder=true;this.rendered=m.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(t,this.round)}`);this._value=round(t,this.round)}this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t===`-`||t===`.`&&this.float||O.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=t!==``?t:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}async validate(){let t=await this.validator(this.value);if(typeof t===`string`){this.errorMsg=t;t=false}this.error=!t}async submit(){await this.validate();if(this.error){this.color=`red`;this.fire();this.render();return}let t=this.value;this.value=t!==``?t:this.initial;this.done=true;this.aborted=false;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}up(){this.typed=``;if(this.value===""){this.value=this.min-this.inc}if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value===""){this.value=this.min+this.inc}if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||``;if(this.value!==""&&this.value<this.min){this.value=this.min}this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,u){if(!this.valid(t))return this.bell();const p=Date.now();if(p-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=p;this.color=`cyan`;if(t===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(y.down($(this.outputError,this.out.columns)-1)+E(this.outputError,this.out.columns));this.out.write(E(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[b.symbol(this.done,this.aborted),m.bold(this.msg),b.delimiter(this.done),!this.done||!this.done&&!this.placeholder?m[this.color]().underline(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,u,p)=>t+`\n${p?` `:w.pointerSmall} ${m.red().italic(u)}`),``)}this.out.write(v.line+y.to(0)+this.outputText+y.save+this.outputError+y.restore)}}t.exports=NumberPrompt},457:(t,u,p)=>{"use strict";const m=p(3785);const{action:g}=p(9398);const y=p(4434);const{beep:v,cursor:b}=p(9458);const w=p(5665);class Prompt extends y{constructor(t={}){super();this.firstRender=true;this.in=t.stdin||process.stdin;this.out=t.stdout||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const u=m.createInterface({input:this.in,escapeCodeTimeout:50});m.emitKeypressEvents(this.in,u);if(this.in.isTTY)this.in.setRawMode(true);const p=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1;const keypress=(t,u)=>{let m=g(u,p);if(m===false){this._&&this._(t,u)}else if(typeof this[m]==="function"){this[m](u)}else{this.bell()}};this.close=()=>{this.out.write(b.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);u.close();this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(v)}render(){this.onRender(w);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},631:(t,u,p)=>{"use strict";const m=p(5665);const g=p(457);const{style:y,clear:v,figures:b,wrap:w,entriesToDisplay:E}=p(9398);const{cursor:$}=p(9458);class SelectPrompt extends g{constructor(t={}){super(t);this.msg=t.message;this.hint=t.hint||"- Use arrow-keys. Return to submit.";this.warn=t.warn||"- This option is disabled";this.cursor=t.initial||0;this.choices=t.choices.map(((t,u)=>{if(typeof t==="string")t={title:t,value:u};return{title:t&&(t.title||t.value||t),value:t&&(t.value===undefined?u:t.value),description:t&&t.description,selected:t&&t.selected,disabled:t&&t.disabled}}));this.optionsPerPage=t.optionsPerPage||10;this.value=(this.choices[this.cursor]||{}).value;this.clear=v("",this.out.columns);this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0){this.moveCursor(this.choices.length-1)}else{this.moveCursor(this.cursor-1)}this.render()}down(){if(this.cursor===this.choices.length-1){this.moveCursor(0)}else{this.moveCursor(this.cursor+1)}this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,u){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write($.hide);else this.out.write(v(this.outputText,this.out.columns));super.render();let{startIndex:t,endIndex:u}=E(this.cursor,this.choices.length,this.optionsPerPage);this.outputText=[y.symbol(this.done,this.aborted),m.bold(this.msg),y.delimiter(false),this.done?this.selection.title:this.selection.disabled?m.yellow(this.warn):m.gray(this.hint)].join(" ");if(!this.done){this.outputText+="\n";for(let p=t;p<u;p++){let g,y,v="",E=this.choices[p];if(p===t&&t>0){y=b.arrowUp}else if(p===u-1&&u<this.choices.length){y=b.arrowDown}else{y=" "}if(E.disabled){g=this.cursor===p?m.gray().underline(E.title):m.strikethrough().gray(E.title);y=(this.cursor===p?m.bold().gray(b.pointer)+" ":" ")+y}else{g=this.cursor===p?m.cyan().underline(E.title):E.title;y=(this.cursor===p?m.cyan(b.pointer)+" ":" ")+y;if(E.description&&this.cursor===p){v=` - ${E.description}`;if(y.length+g.length+v.length>=this.out.columns||E.description.split(/\r?\n/).length>1){v="\n"+w(E.description,{margin:3,width:this.out.columns})}}}this.outputText+=`${y} ${g}${m.gray(v)}\n`}}this.out.write(this.outputText)}}t.exports=SelectPrompt},6652:(t,u,p)=>{const m=p(5665);const g=p(457);const{erase:y,cursor:v}=p(9458);const{style:b,clear:w,lines:E,figures:$}=p(9398);class TextPrompt extends g{constructor(t={}){super(t);this.transform=b.render(t.style);this.scale=this.transform.scale;this.msg=t.message;this.initial=t.initial||``;this.validator=t.validate||(()=>true);this.value=``;this.errorMsg=t.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.clear=w(``,this.out.columns);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=m.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(t)}this._value=t;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.fire();this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let t=await this.validator(this.value);if(typeof t===`string`){this.errorMsg=t;t=false}this.error=!t}async submit(){this.value=this.value||this.initial;this.cursorOffset=0;this.cursor=this.rendered.length;await this.validate();if(this.error){this.red=true;this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(t){if(this.placeholder)return;this.cursor=this.cursor+t;this.cursorOffset+=t}_(t,u){let p=this.value.slice(0,this.cursor);let m=this.value.slice(this.cursor);this.value=`${p}${t}${m}`;this.red=false;this.cursor=this.placeholder?0:p.length+1;this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1);let u=this.value.slice(this.cursor);this.value=`${t}${u}`;this.red=false;if(this.isCursorAtStart()){this.cursorOffset=0}else{this.cursorOffset++;this.moveCursor(-1)}this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor);let u=this.value.slice(this.cursor+1);this.value=`${t}${u}`;this.red=false;if(this.isCursorAtEnd()){this.cursorOffset=0}else{this.cursorOffset++}this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(v.down(E(this.outputError,this.out.columns)-1)+w(this.outputError,this.out.columns));this.out.write(w(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[b.symbol(this.done,this.aborted),m.bold(this.msg),b.delimiter(this.done),this.red?m.red(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,u,p)=>t+`\n${p?" ":$.pointerSmall} ${m.red().italic(u)}`),``)}this.out.write(y.line+v.to(0)+this.outputText+v.save+this.outputError+v.restore+v.move(this.cursorOffset,0))}}t.exports=TextPrompt},2339:(t,u,p)=>{const m=p(5665);const g=p(457);const{style:y,clear:v}=p(9398);const{cursor:b,erase:w}=p(9458);class TogglePrompt extends g{constructor(t={}){super(t);this.msg=t.message;this.value=!!t.initial;this.active=t.active||"on";this.inactive=t.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(t,u){if(t===" "){this.value=!this.value}else if(t==="1"){this.value=true}else if(t==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(b.hide);else this.out.write(v(this.outputText,this.out.columns));super.render();this.outputText=[y.symbol(this.done,this.aborted),m.bold(this.msg),y.delimiter(this.done),this.value?this.inactive:m.cyan().underline(this.inactive),m.gray("/"),this.value?m.cyan().underline(this.active):this.active].join(" ");this.out.write(w.line+b.to(0)+this.outputText)}}t.exports=TogglePrompt},365:(t,u,p)=>{"use strict";const m=p(1438);const g=["suggest","format","onState","validate","onRender","type"];const noop=()=>{};async function prompt(t=[],{onSubmit:u=noop,onCancel:p=noop}={}){const y={};const v=prompt._override||{};t=[].concat(t);let b,w,E,$,O,R;const getFormattedAnswer=async(t,u,p=false)=>{if(!p&&t.validate&&t.validate(u)!==true){return}return t.format?await t.format(u,y):u};for(w of t){({name:$,type:O}=w);if(typeof O==="function"){O=await O(b,{...y},w);w["type"]=O}if(!O)continue;for(let t in w){if(g.includes(t))continue;let u=w[t];w[t]=typeof u==="function"?await u(b,{...y},R):u}R=w;if(typeof w.message!=="string"){throw new Error("prompt message is required")}({name:$,type:O}=w);if(m[O]===void 0){throw new Error(`prompt type (${O}) is not defined`)}if(v[w.name]!==undefined){b=await getFormattedAnswer(w,v[w.name]);if(b!==undefined){y[$]=b;continue}}try{b=prompt._injected?getInjectedAnswer(prompt._injected,w.initial):await m[O](w);y[$]=b=await getFormattedAnswer(w,b,true);E=await u(w,b,y)}catch(t){E=!await p(w,y)}if(E)return y}return y}function getInjectedAnswer(t,u){const p=t.shift();if(p instanceof Error){throw p}return p===undefined?u:p}function inject(t){prompt._injected=(prompt._injected||[]).concat(t)}function override(t){prompt._override=Object.assign({},t)}t.exports=Object.assign(prompt,{prompt:prompt,prompts:m,inject:inject,override:override})},1438:(t,u,p)=>{"use strict";const m=u;const g=p(1859);const noop=t=>t;function toPrompt(t,u,p={}){return new Promise(((m,y)=>{const v=new g[t](u);const b=p.onAbort||noop;const w=p.onSubmit||noop;const E=p.onExit||noop;v.on("state",u.onState||noop);v.on("submit",(t=>m(w(t))));v.on("exit",(t=>m(E(t))));v.on("abort",(t=>y(b(t))))}))}m.text=t=>toPrompt("TextPrompt",t);m.password=t=>{t.style="password";return m.text(t)};m.invisible=t=>{t.style="invisible";return m.text(t)};m.number=t=>toPrompt("NumberPrompt",t);m.date=t=>toPrompt("DatePrompt",t);m.confirm=t=>toPrompt("ConfirmPrompt",t);m.list=t=>{const u=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(u).map((t=>t.trim()))})};m.toggle=t=>toPrompt("TogglePrompt",t);m.select=t=>toPrompt("SelectPrompt",t);m.multiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("MultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};m.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("AutocompleteMultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(t,u)=>Promise.resolve(u.filter((u=>u.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));m.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},3598:t=>{"use strict";t.exports=(t,u)=>{if(t.meta&&t.name!=="escape")return;if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(u){if(t.name==="j")return"down";if(t.name==="k")return"up"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"exit";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="home")return"home";if(t.name==="end")return"end";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return false}},6951:(t,u,p)=>{"use strict";const m=p(9092);const{erase:g,cursor:y}=p(9458);const width=t=>[...m(t)].length;t.exports=function(t,u){if(!u)return g.line+y.to(0);let p=0;const m=t.split(/\r?\n/);for(let t of m){p+=1+Math.floor(Math.max(width(t)-1,0)/u)}return g.lines(p)}},1549:t=>{"use strict";t.exports=(t,u,p)=>{p=p||u;let m=Math.min(u-p,t-Math.floor(p/2));if(m<0)m=0;let g=Math.min(m+p,u);return{startIndex:m,endIndex:g}}},2883:t=>{"use strict";const u={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const p={arrowUp:u.arrowUp,arrowDown:u.arrowDown,arrowLeft:u.arrowLeft,arrowRight:u.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const m=process.platform==="win32"?p:u;t.exports=m},9398:(t,u,p)=>{"use strict";t.exports={action:p(3598),clear:p(6951),style:p(9311),strip:p(9092),figures:p(2883),lines:p(429),wrap:p(844),entriesToDisplay:p(1549)}},429:(t,u,p)=>{"use strict";const m=p(9092);t.exports=function(t,u){let p=String(m(t)||"").split(/\r?\n/);if(!u)return p.length;return p.map((t=>Math.ceil(t.length/u))).reduce(((t,u)=>t+u))}},9092:t=>{"use strict";t.exports=t=>{const u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const p=new RegExp(u,"g");return typeof t==="string"?t.replace(p,""):t}},9311:(t,u,p)=>{"use strict";const m=p(5665);const g=p(2883);const y=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}});const render=t=>y[t]||y.default;const v=Object.freeze({aborted:m.red(g.cross),done:m.green(g.tick),exited:m.yellow(g.cross),default:m.cyan("?")});const symbol=(t,u,p)=>u?v.aborted:p?v.exited:t?v.done:v.default;const delimiter=t=>m.gray(t?g.ellipsis:g.pointerSmall);const item=(t,u)=>m.gray(t?u?g.pointerSmall:"+":g.line);t.exports={styles:y,render:render,symbols:v,symbol:symbol,delimiter:delimiter,item:item}},844:t=>{"use strict";t.exports=(t,u={})=>{const p=Number.isSafeInteger(parseInt(u.margin))?new Array(parseInt(u.margin)).fill(" ").join(""):u.margin||"";const m=u.width;return(t||"").split(/\r?\n/g).map((t=>t.split(/\s+/g).reduce(((t,u)=>{if(u.length+p.length>=m||t[t.length-1].length+u.length+1<m)t[t.length-1]+=` ${u}`;else t.push(`${p}${u}`);return t}),[p]).join("\n"))).join("\n")}},1989:t=>{
61
61
  /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
62
- let r;t.exports=typeof queueMicrotask==="function"?queueMicrotask.bind(typeof window!=="undefined"?window:global):t=>(r||(r=Promise.resolve())).then(t).catch((t=>setTimeout((()=>{throw t}),0)))},9046:(t,r,i)=>{var o=i(715);var a=i(6928).join;var c=i(7442);var l="/etc";var u=process.platform==="win32";var h=u?process.env.USERPROFILE:process.env.HOME;t.exports=function(t,r,d,p){if("string"!==typeof t)throw new Error("rc(name): name *must* be string");if(!d)d=i(2078)(process.argv.slice(2));r=("string"===typeof r?o.json(r):r)||{};p=p||o.parse;var m=o.env(t+"_");var g=[r];var y=[];function addConfigFile(t){if(y.indexOf(t)>=0)return;var r=o.file(t);if(r){g.push(p(r));y.push(t)}}if(!u)[a(l,t,"config"),a(l,t+"rc")].forEach(addConfigFile);if(h)[a(h,".config",t,"config"),a(h,".config",t),a(h,"."+t,"config"),a(h,"."+t+"rc")].forEach(addConfigFile);addConfigFile(o.find("."+t+"rc"));if(m.config)addConfigFile(m.config);if(d.config)addConfigFile(d.config);return c.apply(null,g.concat([m,d,y.length?{configs:y,config:y[y.length-1]}:undefined]))}},715:(t,r,i)=>{"use strict";var o=i(7515);var a=i(5667);var c=i(6928);var l=i(3444);var u=r.parse=function(t){if(/^\s*{/.test(t))return JSON.parse(l(t));return a.parse(t)};var h=r.file=function(){var t=[].slice.call(arguments).filter((function(t){return t!=null}));for(var r in t)if("string"!==typeof t[r])return;var i=c.join.apply(null,t);var a;try{return o.readFileSync(i,"utf-8")}catch(t){return}};var d=r.json=function(){var t=h.apply(null,arguments);return t?u(t):null};var p=r.env=function(t,r){r=r||process.env;var i={};var o=t.length;for(var a in r){if(a.toLowerCase().indexOf(t.toLowerCase())===0){var c=a.substring(o).split("__");var l;while((l=c.indexOf(""))>-1){c.splice(l,1)}var u=i;c.forEach((function _buildSubObj(t,i){if(!t||typeof u!=="object")return;if(i===c.length-1)u[t]=r[a];if(u[t]===undefined)u[t]={};u=u[t]}))}}return i};var m=r.find=function(){var t=c.join.apply(null,[].slice.call(arguments));function find(t,r){var i=c.join(t,r);try{o.statSync(i);return i}catch(i){if(c.dirname(t)!==t)return find(c.dirname(t),r)}}return find(process.cwd(),t)}},2370:(t,r,i)=>{const o=i(5725).Buffer;function decodeBase64(t){return o.from(t,"base64").toString("utf8")}function encodeBase64(t){return o.from(t,"utf8").toString("base64")}t.exports={decodeBase64:decodeBase64,encodeBase64:encodeBase64}},4133:(t,r,i)=>{var o=i(7016);var a=i(2370);var c=a.decodeBase64;var l=a.encodeBase64;var u=":_authToken";var h=":username";var d=":_password";t.exports=function(){var t;var r;if(arguments.length>=2){t=arguments[0];r=arguments[1]}else if(typeof arguments[0]==="string"){t=arguments[0]}else{r=arguments[0]}r=r||{};r.npmrc=r.npmrc||i(9046)("npm",{registry:"https://registry.npmjs.org/"});t=t||r.npmrc.registry;return getRegistryAuthInfo(t,r)||getLegacyAuthInfo(r.npmrc)};function getRegistryAuthInfo(t,r){var i=o.parse(t,false,true);var a;while(a!=="/"&&i.pathname!==a){a=i.pathname||"/";var c="//"+i.host+a.replace(/\/$/,"");var l=getAuthInfoForUrl(c,r.npmrc);if(l){return l}if(!r.recursive){return/\/$/.test(t)?undefined:getRegistryAuthInfo(o.resolve(t,"."),r)}i.pathname=o.resolve(normalizePath(a),"..")||"/"}return undefined}function getLegacyAuthInfo(t){if(t._auth){return{token:t._auth,type:"Basic"}}return undefined}function normalizePath(t){return t[t.length-1]==="/"?t:t+"/"}function getAuthInfoForUrl(t,r){var i=getBearerToken(r[t+u]||r[t+"/"+u]);if(i){return i}var o=r[t+h]||r[t+"/"+h];var a=r[t+d]||r[t+"/"+d];var c=getTokenForUsernameAndPassword(o,a);if(c){return c}return undefined}function getBearerToken(t){if(!t){return undefined}var r=t.replace(/^\$\{?([^}]*)\}?$/,(function(t,r){return process.env[r]}));return{token:r,type:"Bearer"}}function getTokenForUsernameAndPassword(t,r){if(!t||!r){return undefined}var i=c(r.replace(/^\$\{?([^}]*)\}?$/,(function(t,r){return process.env[r]})));var o=l(t+":"+i);return{token:o,type:"Basic",password:i,username:t}}},3805:(t,r,i)=>{"use strict";t.exports=function(t){var r=i(9046)("npm",{registry:"https://registry.npmjs.org/"});var o=r[t+":registry"]||r.registry;return o.slice(-1)==="/"?o:o+"/"}},1160:(t,r,i)=>{t.exports=i(7158)},7158:(t,r,i)=>{var o=i(1496);r.operation=function(t){var i=r.timeouts(t);return new o(i,{forever:t&&t.forever,unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};r.timeouts=function(t){if(t instanceof Array){return[].concat(t)}var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:Infinity,randomize:false};for(var i in t){r[i]=t[i]}if(r.minTimeout>r.maxTimeout){throw new Error("minTimeout is greater than maxTimeout")}var o=[];for(var a=0;a<r.retries;a++){o.push(this.createTimeout(a,r))}if(t&&t.forever&&!o.length){o.push(this.createTimeout(a,r))}o.sort((function(t,r){return t-r}));return o};r.createTimeout=function(t,r){var i=r.randomize?Math.random()+1:1;var o=Math.round(i*r.minTimeout*Math.pow(r.factor,t));o=Math.min(o,r.maxTimeout);return o};r.wrap=function(t,i,o){if(i instanceof Array){o=i;i=null}if(!o){o=[];for(var a in t){if(typeof t[a]==="function"){o.push(a)}}}for(var c=0;c<o.length;c++){var l=o[c];var u=t[l];t[l]=function retryWrapper(o){var a=r.operation(i);var c=Array.prototype.slice.call(arguments,1);var l=c.pop();c.push((function(t){if(a.retry(t)){return}if(t){arguments[0]=a.mainError()}l.apply(this,arguments)}));a.attempt((function(){o.apply(t,c)}))}.bind(t,u);t[l].options=i}}},1496:t=>{function RetryOperation(t,r){if(typeof r==="boolean"){r={forever:r}}this._originalTimeouts=JSON.parse(JSON.stringify(t));this._timeouts=t;this._options=r||{};this._maxRetryTime=r&&r.maxRetryTime||Infinity;this._fn=null;this._errors=[];this._attempts=1;this._operationTimeout=null;this._operationTimeoutCb=null;this._timeout=null;this._operationStart=null;if(this._options.forever){this._cachedTimeouts=this._timeouts.slice(0)}}t.exports=RetryOperation;RetryOperation.prototype.reset=function(){this._attempts=1;this._timeouts=this._originalTimeouts};RetryOperation.prototype.stop=function(){if(this._timeout){clearTimeout(this._timeout)}this._timeouts=[];this._cachedTimeouts=null};RetryOperation.prototype.retry=function(t){if(this._timeout){clearTimeout(this._timeout)}if(!t){return false}var r=(new Date).getTime();if(t&&r-this._operationStart>=this._maxRetryTime){this._errors.unshift(new Error("RetryOperation timeout occurred"));return false}this._errors.push(t);var i=this._timeouts.shift();if(i===undefined){if(this._cachedTimeouts){this._errors.splice(this._errors.length-1,this._errors.length);this._timeouts=this._cachedTimeouts.slice(0);i=this._timeouts.shift()}else{return false}}var o=this;var a=setTimeout((function(){o._attempts++;if(o._operationTimeoutCb){o._timeout=setTimeout((function(){o._operationTimeoutCb(o._attempts)}),o._operationTimeout);if(o._options.unref){o._timeout.unref()}}o._fn(o._attempts)}),i);if(this._options.unref){a.unref()}return true};RetryOperation.prototype.attempt=function(t,r){this._fn=t;if(r){if(r.timeout){this._operationTimeout=r.timeout}if(r.cb){this._operationTimeoutCb=r.cb}}var i=this;if(this._operationTimeoutCb){this._timeout=setTimeout((function(){i._operationTimeoutCb()}),i._operationTimeout)}this._operationStart=(new Date).getTime();this._fn(this._attempts)};RetryOperation.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated");this.attempt(t)};RetryOperation.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated");this.attempt(t)};RetryOperation.prototype.start=RetryOperation.prototype.try;RetryOperation.prototype.errors=function(){return this._errors};RetryOperation.prototype.attempts=function(){return this._attempts};RetryOperation.prototype.mainError=function(){if(this._errors.length===0){return null}var t={};var r=null;var i=0;for(var o=0;o<this._errors.length;o++){var a=this._errors[o];var c=a.message;var l=(t[c]||0)+1;t[c]=l;if(l>=i){r=a;i=l}}return r}},3728:t=>{"use strict";function reusify(t){var r=new t;var i=r;function get(){var o=r;if(o.next){r=o.next}else{r=new t;i=r}o.next=null;return o}function release(t){i.next=t;i=t}return{get:get,release:release}}t.exports=reusify},7906:(t,r,i)=>{
62
+ let u;t.exports=typeof queueMicrotask==="function"?queueMicrotask.bind(typeof window!=="undefined"?window:global):t=>(u||(u=Promise.resolve())).then(t).catch((t=>setTimeout((()=>{throw t}),0)))},9046:(t,u,p)=>{var m=p(715);var g=p(6928).join;var y=p(7442);var v="/etc";var b=process.platform==="win32";var w=b?process.env.USERPROFILE:process.env.HOME;t.exports=function(t,u,E,$){if("string"!==typeof t)throw new Error("rc(name): name *must* be string");if(!E)E=p(2078)(process.argv.slice(2));u=("string"===typeof u?m.json(u):u)||{};$=$||m.parse;var O=m.env(t+"_");var R=[u];var P=[];function addConfigFile(t){if(P.indexOf(t)>=0)return;var u=m.file(t);if(u){R.push($(u));P.push(t)}}if(!b)[g(v,t,"config"),g(v,t+"rc")].forEach(addConfigFile);if(w)[g(w,".config",t,"config"),g(w,".config",t),g(w,"."+t,"config"),g(w,"."+t+"rc")].forEach(addConfigFile);addConfigFile(m.find("."+t+"rc"));if(O.config)addConfigFile(O.config);if(E.config)addConfigFile(E.config);return y.apply(null,R.concat([O,E,P.length?{configs:P,config:P[P.length-1]}:undefined]))}},715:(t,u,p)=>{"use strict";var m=p(7515);var g=p(5667);var y=p(6928);var v=p(3444);var b=u.parse=function(t){if(/^\s*{/.test(t))return JSON.parse(v(t));return g.parse(t)};var w=u.file=function(){var t=[].slice.call(arguments).filter((function(t){return t!=null}));for(var u in t)if("string"!==typeof t[u])return;var p=y.join.apply(null,t);var g;try{return m.readFileSync(p,"utf-8")}catch(t){return}};var E=u.json=function(){var t=w.apply(null,arguments);return t?b(t):null};var $=u.env=function(t,u){u=u||process.env;var p={};var m=t.length;for(var g in u){if(g.toLowerCase().indexOf(t.toLowerCase())===0){var y=g.substring(m).split("__");var v;while((v=y.indexOf(""))>-1){y.splice(v,1)}var b=p;y.forEach((function _buildSubObj(t,p){if(!t||typeof b!=="object")return;if(p===y.length-1)b[t]=u[g];if(b[t]===undefined)b[t]={};b=b[t]}))}}return p};var O=u.find=function(){var t=y.join.apply(null,[].slice.call(arguments));function find(t,u){var p=y.join(t,u);try{m.statSync(p);return p}catch(p){if(y.dirname(t)!==t)return find(y.dirname(t),u)}}return find(process.cwd(),t)}},2370:(t,u,p)=>{const m=p(5725).Buffer;function decodeBase64(t){return m.from(t,"base64").toString("utf8")}function encodeBase64(t){return m.from(t,"utf8").toString("base64")}t.exports={decodeBase64:decodeBase64,encodeBase64:encodeBase64}},4133:(t,u,p)=>{var m=p(7016);var g=p(2370);var y=g.decodeBase64;var v=g.encodeBase64;var b=":_authToken";var w=":username";var E=":_password";t.exports=function(){var t;var u;if(arguments.length>=2){t=arguments[0];u=arguments[1]}else if(typeof arguments[0]==="string"){t=arguments[0]}else{u=arguments[0]}u=u||{};u.npmrc=u.npmrc||p(9046)("npm",{registry:"https://registry.npmjs.org/"});t=t||u.npmrc.registry;return getRegistryAuthInfo(t,u)||getLegacyAuthInfo(u.npmrc)};function getRegistryAuthInfo(t,u){var p=m.parse(t,false,true);var g;while(g!=="/"&&p.pathname!==g){g=p.pathname||"/";var y="//"+p.host+g.replace(/\/$/,"");var v=getAuthInfoForUrl(y,u.npmrc);if(v){return v}if(!u.recursive){return/\/$/.test(t)?undefined:getRegistryAuthInfo(m.resolve(t,"."),u)}p.pathname=m.resolve(normalizePath(g),"..")||"/"}return undefined}function getLegacyAuthInfo(t){if(t._auth){return{token:t._auth,type:"Basic"}}return undefined}function normalizePath(t){return t[t.length-1]==="/"?t:t+"/"}function getAuthInfoForUrl(t,u){var p=getBearerToken(u[t+b]||u[t+"/"+b]);if(p){return p}var m=u[t+w]||u[t+"/"+w];var g=u[t+E]||u[t+"/"+E];var y=getTokenForUsernameAndPassword(m,g);if(y){return y}return undefined}function getBearerToken(t){if(!t){return undefined}var u=t.replace(/^\$\{?([^}]*)\}?$/,(function(t,u){return process.env[u]}));return{token:u,type:"Bearer"}}function getTokenForUsernameAndPassword(t,u){if(!t||!u){return undefined}var p=y(u.replace(/^\$\{?([^}]*)\}?$/,(function(t,u){return process.env[u]})));var m=v(t+":"+p);return{token:m,type:"Basic",password:p,username:t}}},3805:(t,u,p)=>{"use strict";t.exports=function(t){var u=p(9046)("npm",{registry:"https://registry.npmjs.org/"});var m=u[t+":registry"]||u.registry;return m.slice(-1)==="/"?m:m+"/"}},1160:(t,u,p)=>{t.exports=p(7158)},7158:(t,u,p)=>{var m=p(1496);u.operation=function(t){var p=u.timeouts(t);return new m(p,{forever:t&&t.forever,unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};u.timeouts=function(t){if(t instanceof Array){return[].concat(t)}var u={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:Infinity,randomize:false};for(var p in t){u[p]=t[p]}if(u.minTimeout>u.maxTimeout){throw new Error("minTimeout is greater than maxTimeout")}var m=[];for(var g=0;g<u.retries;g++){m.push(this.createTimeout(g,u))}if(t&&t.forever&&!m.length){m.push(this.createTimeout(g,u))}m.sort((function(t,u){return t-u}));return m};u.createTimeout=function(t,u){var p=u.randomize?Math.random()+1:1;var m=Math.round(p*u.minTimeout*Math.pow(u.factor,t));m=Math.min(m,u.maxTimeout);return m};u.wrap=function(t,p,m){if(p instanceof Array){m=p;p=null}if(!m){m=[];for(var g in t){if(typeof t[g]==="function"){m.push(g)}}}for(var y=0;y<m.length;y++){var v=m[y];var b=t[v];t[v]=function retryWrapper(m){var g=u.operation(p);var y=Array.prototype.slice.call(arguments,1);var v=y.pop();y.push((function(t){if(g.retry(t)){return}if(t){arguments[0]=g.mainError()}v.apply(this,arguments)}));g.attempt((function(){m.apply(t,y)}))}.bind(t,b);t[v].options=p}}},1496:t=>{function RetryOperation(t,u){if(typeof u==="boolean"){u={forever:u}}this._originalTimeouts=JSON.parse(JSON.stringify(t));this._timeouts=t;this._options=u||{};this._maxRetryTime=u&&u.maxRetryTime||Infinity;this._fn=null;this._errors=[];this._attempts=1;this._operationTimeout=null;this._operationTimeoutCb=null;this._timeout=null;this._operationStart=null;if(this._options.forever){this._cachedTimeouts=this._timeouts.slice(0)}}t.exports=RetryOperation;RetryOperation.prototype.reset=function(){this._attempts=1;this._timeouts=this._originalTimeouts};RetryOperation.prototype.stop=function(){if(this._timeout){clearTimeout(this._timeout)}this._timeouts=[];this._cachedTimeouts=null};RetryOperation.prototype.retry=function(t){if(this._timeout){clearTimeout(this._timeout)}if(!t){return false}var u=(new Date).getTime();if(t&&u-this._operationStart>=this._maxRetryTime){this._errors.unshift(new Error("RetryOperation timeout occurred"));return false}this._errors.push(t);var p=this._timeouts.shift();if(p===undefined){if(this._cachedTimeouts){this._errors.splice(this._errors.length-1,this._errors.length);this._timeouts=this._cachedTimeouts.slice(0);p=this._timeouts.shift()}else{return false}}var m=this;var g=setTimeout((function(){m._attempts++;if(m._operationTimeoutCb){m._timeout=setTimeout((function(){m._operationTimeoutCb(m._attempts)}),m._operationTimeout);if(m._options.unref){m._timeout.unref()}}m._fn(m._attempts)}),p);if(this._options.unref){g.unref()}return true};RetryOperation.prototype.attempt=function(t,u){this._fn=t;if(u){if(u.timeout){this._operationTimeout=u.timeout}if(u.cb){this._operationTimeoutCb=u.cb}}var p=this;if(this._operationTimeoutCb){this._timeout=setTimeout((function(){p._operationTimeoutCb()}),p._operationTimeout)}this._operationStart=(new Date).getTime();this._fn(this._attempts)};RetryOperation.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated");this.attempt(t)};RetryOperation.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated");this.attempt(t)};RetryOperation.prototype.start=RetryOperation.prototype.try;RetryOperation.prototype.errors=function(){return this._errors};RetryOperation.prototype.attempts=function(){return this._attempts};RetryOperation.prototype.mainError=function(){if(this._errors.length===0){return null}var t={};var u=null;var p=0;for(var m=0;m<this._errors.length;m++){var g=this._errors[m];var y=g.message;var v=(t[y]||0)+1;t[y]=v;if(v>=p){u=g;p=v}}return u}},3728:t=>{"use strict";function reusify(t){var u=new t;var p=u;function get(){var m=u;if(m.next){u=m.next}else{u=new t;p=u}m.next=null;return m}function release(t){p.next=t;p=t}return{get:get,release:release}}t.exports=reusify},7906:(t,u,p)=>{
63
63
  /*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
64
- t.exports=runParallel;const o=i(1989);function runParallel(t,r){let i,a,c;let l=true;if(Array.isArray(t)){i=[];a=t.length}else{c=Object.keys(t);i={};a=c.length}function done(t){function end(){if(r)r(t,i);r=null}if(l)o(end);else end()}function each(t,r,o){i[t]=o;if(--a===0||r){done(r)}}if(!a){done(null)}else if(c){c.forEach((function(r){t[r]((function(t,i){each(r,t,i)}))}))}else{t.forEach((function(t,r){t((function(t,i){each(r,t,i)}))}))}l=false}},5725:(t,r,i)=>{
64
+ t.exports=runParallel;const m=p(1989);function runParallel(t,u){let p,g,y;let v=true;if(Array.isArray(t)){p=[];g=t.length}else{y=Object.keys(t);p={};g=y.length}function done(t){function end(){if(u)u(t,p);u=null}if(v)m(end);else end()}function each(t,u,m){p[t]=m;if(--g===0||u){done(u)}}if(!g){done(null)}else if(y){y.forEach((function(u){t[u]((function(t,p){each(u,t,p)}))}))}else{t.forEach((function(t,u){t((function(t,p){each(u,t,p)}))}))}v=false}},5725:(t,u,p)=>{
65
65
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
66
- var o=i(181);var a=o.Buffer;function copyProps(t,r){for(var i in t){r[i]=t[i]}}if(a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow){t.exports=o}else{copyProps(o,r);r.Buffer=SafeBuffer}function SafeBuffer(t,r,i){return a(t,r,i)}SafeBuffer.prototype=Object.create(a.prototype);copyProps(a,SafeBuffer);SafeBuffer.from=function(t,r,i){if(typeof t==="number"){throw new TypeError("Argument must not be a number")}return a(t,r,i)};SafeBuffer.alloc=function(t,r,i){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}var o=a(t);if(r!==undefined){if(typeof i==="string"){o.fill(r,i)}else{o.fill(r)}}else{o.fill(0)}return o};SafeBuffer.allocUnsafe=function(t){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}return a(t)};SafeBuffer.allocUnsafeSlow=function(t){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}return o.SlowBuffer(t)}},402:(t,r,i)=>{"use strict";const o=Symbol("SemVer ANY");class Comparator{static get ANY(){return o}constructor(t,r){r=a(r);if(t instanceof Comparator){if(t.loose===!!r.loose){return t}else{t=t.value}}t=t.trim().split(/\s+/).join(" ");h("comparator",t,r);this.options=r;this.loose=!!r.loose;this.parse(t);if(this.semver===o){this.value=""}else{this.value=this.operator+this.semver.version}h("comp",this)}parse(t){const r=this.options.loose?c[l.COMPARATORLOOSE]:c[l.COMPARATOR];const i=t.match(r);if(!i){throw new TypeError(`Invalid comparator: ${t}`)}this.operator=i[1]!==undefined?i[1]:"";if(this.operator==="="){this.operator=""}if(!i[2]){this.semver=o}else{this.semver=new d(i[2],this.options.loose)}}toString(){return this.value}test(t){h("Comparator.test",t,this.options.loose);if(this.semver===o||t===o){return true}if(typeof t==="string"){try{t=new d(t,this.options)}catch(t){return false}}return u(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof Comparator)){throw new TypeError("a Comparator is required")}if(this.operator===""){if(this.value===""){return true}return new p(t.value,r).test(this.value)}else if(t.operator===""){if(t.value===""){return true}return new p(this.value,r).test(t.semver)}r=a(r);if(r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")){return false}if(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))){return false}if(this.operator.startsWith(">")&&t.operator.startsWith(">")){return true}if(this.operator.startsWith("<")&&t.operator.startsWith("<")){return true}if(this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")){return true}if(u(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")){return true}if(u(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")){return true}return false}}t.exports=Comparator;const a=i(4141);const{safeRe:c,t:l}=i(9896);const u=i(5109);const h=i(8626);const d=i(7662);const p=i(6629)},6629:(t,r,i)=>{"use strict";const o=/\s+/g;class Range{constructor(t,r){r=l(r);if(t instanceof Range){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease){return t}else{return new Range(t.raw,r)}}if(t instanceof u){this.raw=t.value;this.set=[[t]];this.formatted=undefined;return this}this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;this.raw=t.trim().replace(o," ");this.set=this.raw.split("||").map((t=>this.parseRange(t.trim()))).filter((t=>t.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${this.raw}`)}if(this.set.length>1){const t=this.set[0];this.set=this.set.filter((t=>!isNullSet(t[0])));if(this.set.length===0){this.set=[t]}else if(this.set.length>1){for(const t of this.set){if(t.length===1&&isAny(t[0])){this.set=[t];break}}}}this.formatted=undefined}get range(){if(this.formatted===undefined){this.formatted="";for(let t=0;t<this.set.length;t++){if(t>0){this.formatted+="||"}const r=this.set[t];for(let t=0;t<r.length;t++){if(t>0){this.formatted+=" "}this.formatted+=r[t].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){const r=(this.options.includePrerelease&&b)|(this.options.loose&&w);const i=r+":"+t;const o=c.get(i);if(o){return o}const a=this.options.loose;const l=a?p[m.HYPHENRANGELOOSE]:p[m.HYPHENRANGE];t=t.replace(l,hyphenReplace(this.options.includePrerelease));h("hyphen replace",t);t=t.replace(p[m.COMPARATORTRIM],g);h("comparator trim",t);t=t.replace(p[m.TILDETRIM],y);h("tilde trim",t);t=t.replace(p[m.CARETTRIM],v);h("caret trim",t);let d=t.split(" ").map((t=>parseComparator(t,this.options))).join(" ").split(/\s+/).map((t=>replaceGTE0(t,this.options)));if(a){d=d.filter((t=>{h("loose invalid filter",t,this.options);return!!t.match(p[m.COMPARATORLOOSE])}))}h("range list",d);const E=new Map;const S=d.map((t=>new u(t,this.options)));for(const t of S){if(isNullSet(t)){return[t]}E.set(t.value,t)}if(E.size>1&&E.has("")){E.delete("")}const $=[...E.values()];c.set(i,$);return $}intersects(t,r){if(!(t instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((i=>isSatisfiable(i,r)&&t.set.some((t=>isSatisfiable(t,r)&&i.every((i=>t.every((t=>i.intersects(t,r)))))))))}test(t){if(!t){return false}if(typeof t==="string"){try{t=new d(t,this.options)}catch(t){return false}}for(let r=0;r<this.set.length;r++){if(testSet(this.set[r],t,this.options)){return true}}return false}}t.exports=Range;const a=i(8412);const c=new a;const l=i(4141);const u=i(402);const h=i(8626);const d=i(7662);const{safeRe:p,t:m,comparatorTrimReplace:g,tildeTrimReplace:y,caretTrimReplace:v}=i(9896);const{FLAG_INCLUDE_PRERELEASE:b,FLAG_LOOSE:w}=i(2532);const isNullSet=t=>t.value==="<0.0.0-0";const isAny=t=>t.value==="";const isSatisfiable=(t,r)=>{let i=true;const o=t.slice();let a=o.pop();while(i&&o.length){i=o.every((t=>a.intersects(t,r)));a=o.pop()}return i};const parseComparator=(t,r)=>{t=t.replace(p[m.BUILD],"");h("comp",t,r);t=replaceCarets(t,r);h("caret",t);t=replaceTildes(t,r);h("tildes",t);t=replaceXRanges(t,r);h("xrange",t);t=replaceStars(t,r);h("stars",t);return t};const isX=t=>!t||t.toLowerCase()==="x"||t==="*";const replaceTildes=(t,r)=>t.trim().split(/\s+/).map((t=>replaceTilde(t,r))).join(" ");const replaceTilde=(t,r)=>{const i=r.loose?p[m.TILDELOOSE]:p[m.TILDE];return t.replace(i,((r,i,o,a,c)=>{h("tilde",t,r,i,o,a,c);let l;if(isX(i)){l=""}else if(isX(o)){l=`>=${i}.0.0 <${+i+1}.0.0-0`}else if(isX(a)){l=`>=${i}.${o}.0 <${i}.${+o+1}.0-0`}else if(c){h("replaceTilde pr",c);l=`>=${i}.${o}.${a}-${c} <${i}.${+o+1}.0-0`}else{l=`>=${i}.${o}.${a} <${i}.${+o+1}.0-0`}h("tilde return",l);return l}))};const replaceCarets=(t,r)=>t.trim().split(/\s+/).map((t=>replaceCaret(t,r))).join(" ");const replaceCaret=(t,r)=>{h("caret",t,r);const i=r.loose?p[m.CARETLOOSE]:p[m.CARET];const o=r.includePrerelease?"-0":"";return t.replace(i,((r,i,a,c,l)=>{h("caret",t,r,i,a,c,l);let u;if(isX(i)){u=""}else if(isX(a)){u=`>=${i}.0.0${o} <${+i+1}.0.0-0`}else if(isX(c)){if(i==="0"){u=`>=${i}.${a}.0${o} <${i}.${+a+1}.0-0`}else{u=`>=${i}.${a}.0${o} <${+i+1}.0.0-0`}}else if(l){h("replaceCaret pr",l);if(i==="0"){if(a==="0"){u=`>=${i}.${a}.${c}-${l} <${i}.${a}.${+c+1}-0`}else{u=`>=${i}.${a}.${c}-${l} <${i}.${+a+1}.0-0`}}else{u=`>=${i}.${a}.${c}-${l} <${+i+1}.0.0-0`}}else{h("no pr");if(i==="0"){if(a==="0"){u=`>=${i}.${a}.${c}${o} <${i}.${a}.${+c+1}-0`}else{u=`>=${i}.${a}.${c}${o} <${i}.${+a+1}.0-0`}}else{u=`>=${i}.${a}.${c} <${+i+1}.0.0-0`}}h("caret return",u);return u}))};const replaceXRanges=(t,r)=>{h("replaceXRanges",t,r);return t.split(/\s+/).map((t=>replaceXRange(t,r))).join(" ")};const replaceXRange=(t,r)=>{t=t.trim();const i=r.loose?p[m.XRANGELOOSE]:p[m.XRANGE];return t.replace(i,((i,o,a,c,l,u)=>{h("xRange",t,i,o,a,c,l,u);const d=isX(a);const p=d||isX(c);const m=p||isX(l);const g=m;if(o==="="&&g){o=""}u=r.includePrerelease?"-0":"";if(d){if(o===">"||o==="<"){i="<0.0.0-0"}else{i="*"}}else if(o&&g){if(p){c=0}l=0;if(o===">"){o=">=";if(p){a=+a+1;c=0;l=0}else{c=+c+1;l=0}}else if(o==="<="){o="<";if(p){a=+a+1}else{c=+c+1}}if(o==="<"){u="-0"}i=`${o+a}.${c}.${l}${u}`}else if(p){i=`>=${a}.0.0${u} <${+a+1}.0.0-0`}else if(m){i=`>=${a}.${c}.0${u} <${a}.${+c+1}.0-0`}h("xRange return",i);return i}))};const replaceStars=(t,r)=>{h("replaceStars",t,r);return t.trim().replace(p[m.STAR],"")};const replaceGTE0=(t,r)=>{h("replaceGTE0",t,r);return t.trim().replace(p[r.includePrerelease?m.GTE0PRE:m.GTE0],"")};const hyphenReplace=t=>(r,i,o,a,c,l,u,h,d,p,m,g)=>{if(isX(o)){i=""}else if(isX(a)){i=`>=${o}.0.0${t?"-0":""}`}else if(isX(c)){i=`>=${o}.${a}.0${t?"-0":""}`}else if(l){i=`>=${i}`}else{i=`>=${i}${t?"-0":""}`}if(isX(d)){h=""}else if(isX(p)){h=`<${+d+1}.0.0-0`}else if(isX(m)){h=`<${d}.${+p+1}.0-0`}else if(g){h=`<=${d}.${p}.${m}-${g}`}else if(t){h=`<${d}.${p}.${+m+1}-0`}else{h=`<=${h}`}return`${i} ${h}`.trim()};const testSet=(t,r,i)=>{for(let i=0;i<t.length;i++){if(!t[i].test(r)){return false}}if(r.prerelease.length&&!i.includePrerelease){for(let i=0;i<t.length;i++){h(t[i].semver);if(t[i].semver===u.ANY){continue}if(t[i].semver.prerelease.length>0){const o=t[i].semver;if(o.major===r.major&&o.minor===r.minor&&o.patch===r.patch){return true}}}return false}return true}},7662:(t,r,i)=>{"use strict";const o=i(8626);const{MAX_LENGTH:a,MAX_SAFE_INTEGER:c}=i(2532);const{safeRe:l,t:u}=i(9896);const h=i(4141);const{compareIdentifiers:d}=i(6237);class SemVer{constructor(t,r){r=h(r);if(t instanceof SemVer){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease){return t}else{t=t.version}}else if(typeof t!=="string"){throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`)}if(t.length>a){throw new TypeError(`version is longer than ${a} characters`)}o("SemVer",t,r);this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;const i=t.trim().match(r.loose?l[u.LOOSE]:l[u.FULL]);if(!i){throw new TypeError(`Invalid Version: ${t}`)}this.raw=t;this.major=+i[1];this.minor=+i[2];this.patch=+i[3];if(this.major>c||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>c||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>c||this.patch<0){throw new TypeError("Invalid patch version")}if(!i[4]){this.prerelease=[]}else{this.prerelease=i[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const r=+t;if(r>=0&&r<c){return r}}return t}))}this.build=i[5]?i[5].split("."):[];this.format()}format(){this.version=`${this.major}.${this.minor}.${this.patch}`;if(this.prerelease.length){this.version+=`-${this.prerelease.join(".")}`}return this.version}toString(){return this.version}compare(t){o("SemVer.compare",this.version,this.options,t);if(!(t instanceof SemVer)){if(typeof t==="string"&&t===this.version){return 0}t=new SemVer(t,this.options)}if(t.version===this.version){return 0}return this.compareMain(t)||this.comparePre(t)}compareMain(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}if(this.major<t.major){return-1}if(this.major>t.major){return 1}if(this.minor<t.minor){return-1}if(this.minor>t.minor){return 1}if(this.patch<t.patch){return-1}if(this.patch>t.patch){return 1}return 0}comparePre(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}if(this.prerelease.length&&!t.prerelease.length){return-1}else if(!this.prerelease.length&&t.prerelease.length){return 1}else if(!this.prerelease.length&&!t.prerelease.length){return 0}let r=0;do{const i=this.prerelease[r];const a=t.prerelease[r];o("prerelease compare",r,i,a);if(i===undefined&&a===undefined){return 0}else if(a===undefined){return 1}else if(i===undefined){return-1}else if(i===a){continue}else{return d(i,a)}}while(++r)}compareBuild(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}let r=0;do{const i=this.build[r];const a=t.build[r];o("build compare",r,i,a);if(i===undefined&&a===undefined){return 0}else if(a===undefined){return 1}else if(i===undefined){return-1}else if(i===a){continue}else{return d(i,a)}}while(++r)}inc(t,r,i){if(t.startsWith("pre")){if(!r&&i===false){throw new Error("invalid increment argument: identifier is empty")}if(r){const t=`-${r}`.match(this.options.loose?l[u.PRERELEASELOOSE]:l[u.PRERELEASE]);if(!t||t[1]!==r){throw new Error(`invalid identifier: ${r}`)}}}switch(t){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",r,i);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",r,i);break;case"prepatch":this.prerelease.length=0;this.inc("patch",r,i);this.inc("pre",r,i);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",r,i)}this.inc("pre",r,i);break;case"release":if(this.prerelease.length===0){throw new Error(`version ${this.raw} is not a prerelease`)}this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":{const t=Number(i)?1:0;if(this.prerelease.length===0){this.prerelease=[t]}else{let o=this.prerelease.length;while(--o>=0){if(typeof this.prerelease[o]==="number"){this.prerelease[o]++;o=-2}}if(o===-1){if(r===this.prerelease.join(".")&&i===false){throw new Error("invalid increment argument: identifier already exists")}this.prerelease.push(t)}}if(r){let o=[r,t];if(i===false){o=[r]}if(d(this.prerelease[0],r)===0){if(isNaN(this.prerelease[1])){this.prerelease=o}}else{this.prerelease=o}}break}default:throw new Error(`invalid increment argument: ${t}`)}this.raw=this.format();if(this.build.length){this.raw+=`+${this.build.join(".")}`}return this}}t.exports=SemVer},9976:(t,r,i)=>{"use strict";const o=i(8866);const clean=(t,r)=>{const i=o(t.trim().replace(/^[=v]+/,""),r);return i?i.version:null};t.exports=clean},5109:(t,r,i)=>{"use strict";const o=i(7823);const a=i(8509);const c=i(8934);const l=i(9503);const u=i(4281);const h=i(4730);const cmp=(t,r,i,d)=>{switch(r){case"===":if(typeof t==="object"){t=t.version}if(typeof i==="object"){i=i.version}return t===i;case"!==":if(typeof t==="object"){t=t.version}if(typeof i==="object"){i=i.version}return t!==i;case"":case"=":case"==":return o(t,i,d);case"!=":return a(t,i,d);case">":return c(t,i,d);case">=":return l(t,i,d);case"<":return u(t,i,d);case"<=":return h(t,i,d);default:throw new TypeError(`Invalid operator: ${r}`)}};t.exports=cmp},5144:(t,r,i)=>{"use strict";const o=i(7662);const a=i(8866);const{safeRe:c,t:l}=i(9896);const coerce=(t,r)=>{if(t instanceof o){return t}if(typeof t==="number"){t=String(t)}if(typeof t!=="string"){return null}r=r||{};let i=null;if(!r.rtl){i=t.match(r.includePrerelease?c[l.COERCEFULL]:c[l.COERCE])}else{const o=r.includePrerelease?c[l.COERCERTLFULL]:c[l.COERCERTL];let a;while((a=o.exec(t))&&(!i||i.index+i[0].length!==t.length)){if(!i||a.index+a[0].length!==i.index+i[0].length){i=a}o.lastIndex=a.index+a[1].length+a[2].length}o.lastIndex=-1}if(i===null){return null}const u=i[2];const h=i[3]||"0";const d=i[4]||"0";const p=r.includePrerelease&&i[5]?`-${i[5]}`:"";const m=r.includePrerelease&&i[6]?`+${i[6]}`:"";return a(`${u}.${h}.${d}${p}${m}`,r)};t.exports=coerce},9967:(t,r,i)=>{"use strict";const o=i(7662);const compareBuild=(t,r,i)=>{const a=new o(t,i);const c=new o(r,i);return a.compare(c)||a.compareBuild(c)};t.exports=compareBuild},565:(t,r,i)=>{"use strict";const o=i(238);const compareLoose=(t,r)=>o(t,r,true);t.exports=compareLoose},238:(t,r,i)=>{"use strict";const o=i(7662);const compare=(t,r,i)=>new o(t,i).compare(new o(r,i));t.exports=compare},1214:(t,r,i)=>{"use strict";const o=i(8866);const diff=(t,r)=>{const i=o(t,null,true);const a=o(r,null,true);const c=i.compare(a);if(c===0){return null}const l=c>0;const u=l?i:a;const h=l?a:i;const d=!!u.prerelease.length;const p=!!h.prerelease.length;if(p&&!d){if(!h.patch&&!h.minor){return"major"}if(h.compareMain(u)===0){if(h.minor&&!h.patch){return"minor"}return"patch"}}const m=d?"pre":"";if(i.major!==a.major){return m+"major"}if(i.minor!==a.minor){return m+"minor"}if(i.patch!==a.patch){return m+"patch"}return"prerelease"};t.exports=diff},7823:(t,r,i)=>{"use strict";const o=i(238);const eq=(t,r,i)=>o(t,r,i)===0;t.exports=eq},8934:(t,r,i)=>{"use strict";const o=i(238);const gt=(t,r,i)=>o(t,r,i)>0;t.exports=gt},9503:(t,r,i)=>{"use strict";const o=i(238);const gte=(t,r,i)=>o(t,r,i)>=0;t.exports=gte},4121:(t,r,i)=>{"use strict";const o=i(7662);const inc=(t,r,i,a,c)=>{if(typeof i==="string"){c=a;a=i;i=undefined}try{return new o(t instanceof o?t.version:t,i).inc(r,a,c).version}catch(t){return null}};t.exports=inc},4281:(t,r,i)=>{"use strict";const o=i(238);const lt=(t,r,i)=>o(t,r,i)<0;t.exports=lt},4730:(t,r,i)=>{"use strict";const o=i(238);const lte=(t,r,i)=>o(t,r,i)<=0;t.exports=lte},4864:(t,r,i)=>{"use strict";const o=i(7662);const major=(t,r)=>new o(t,r).major;t.exports=major},6108:(t,r,i)=>{"use strict";const o=i(7662);const minor=(t,r)=>new o(t,r).minor;t.exports=minor},8509:(t,r,i)=>{"use strict";const o=i(238);const neq=(t,r,i)=>o(t,r,i)!==0;t.exports=neq},8866:(t,r,i)=>{"use strict";const o=i(7662);const parse=(t,r,i=false)=>{if(t instanceof o){return t}try{return new o(t,r)}catch(t){if(!i){return null}throw t}};t.exports=parse},1475:(t,r,i)=>{"use strict";const o=i(7662);const patch=(t,r)=>new o(t,r).patch;t.exports=patch},6979:(t,r,i)=>{"use strict";const o=i(8866);const prerelease=(t,r)=>{const i=o(t,r);return i&&i.prerelease.length?i.prerelease:null};t.exports=prerelease},184:(t,r,i)=>{"use strict";const o=i(238);const rcompare=(t,r,i)=>o(r,t,i);t.exports=rcompare},1903:(t,r,i)=>{"use strict";const o=i(9967);const rsort=(t,r)=>t.sort(((t,i)=>o(i,t,r)));t.exports=rsort},1672:(t,r,i)=>{"use strict";const o=i(6629);const satisfies=(t,r,i)=>{try{r=new o(r,i)}catch(t){return false}return r.test(t)};t.exports=satisfies},2849:(t,r,i)=>{"use strict";const o=i(9967);const sort=(t,r)=>t.sort(((t,i)=>o(t,i,r)));t.exports=sort},1399:(t,r,i)=>{"use strict";const o=i(8866);const valid=(t,r)=>{const i=o(t,r);return i?i.version:null};t.exports=valid},4423:(t,r,i)=>{"use strict";const o=i(9896);const a=i(2532);const c=i(7662);const l=i(6237);const u=i(8866);const h=i(1399);const d=i(9976);const p=i(4121);const m=i(1214);const g=i(4864);const y=i(6108);const v=i(1475);const b=i(6979);const w=i(238);const E=i(184);const S=i(565);const $=i(9967);const O=i(2849);const R=i(1903);const P=i(8934);const A=i(4281);const x=i(7823);const T=i(8509);const C=i(9503);const k=i(4730);const I=i(5109);const N=i(5144);const D=i(402);const L=i(6629);const M=i(1672);const j=i(4549);const U=i(2106);const B=i(4512);const H=i(9995);const V=i(236);const z=i(8153);const G=i(9617);const W=i(7944);const q=i(1858);const K=i(919);const Y=i(5670);t.exports={parse:u,valid:h,clean:d,inc:p,diff:m,major:g,minor:y,patch:v,prerelease:b,compare:w,rcompare:E,compareLoose:S,compareBuild:$,sort:O,rsort:R,gt:P,lt:A,eq:x,neq:T,gte:C,lte:k,cmp:I,coerce:N,Comparator:D,Range:L,satisfies:M,toComparators:j,maxSatisfying:U,minSatisfying:B,minVersion:H,validRange:V,outside:z,gtr:G,ltr:W,intersects:q,simplifyRange:K,subset:Y,SemVer:c,re:o.re,src:o.src,tokens:o.t,SEMVER_SPEC_VERSION:a.SEMVER_SPEC_VERSION,RELEASE_TYPES:a.RELEASE_TYPES,compareIdentifiers:l.compareIdentifiers,rcompareIdentifiers:l.rcompareIdentifiers}},2532:t=>{"use strict";const r="2.0.0";const i=256;const o=Number.MAX_SAFE_INTEGER||9007199254740991;const a=16;const c=i-6;const l=["major","premajor","minor","preminor","patch","prepatch","prerelease"];t.exports={MAX_LENGTH:i,MAX_SAFE_COMPONENT_LENGTH:a,MAX_SAFE_BUILD_LENGTH:c,MAX_SAFE_INTEGER:o,RELEASE_TYPES:l,SEMVER_SPEC_VERSION:r,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},8626:t=>{"use strict";const r=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};t.exports=r},6237:t=>{"use strict";const r=/^[0-9]+$/;const compareIdentifiers=(t,i)=>{if(typeof t==="number"&&typeof i==="number"){return t===i?0:t<i?-1:1}const o=r.test(t);const a=r.test(i);if(o&&a){t=+t;i=+i}return t===i?0:o&&!a?-1:a&&!o?1:t<i?-1:1};const rcompareIdentifiers=(t,r)=>compareIdentifiers(r,t);t.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},8412:t=>{"use strict";class LRUCache{constructor(){this.max=1e3;this.map=new Map}get(t){const r=this.map.get(t);if(r===undefined){return undefined}else{this.map.delete(t);this.map.set(t,r);return r}}delete(t){return this.map.delete(t)}set(t,r){const i=this.delete(t);if(!i&&r!==undefined){if(this.map.size>=this.max){const t=this.map.keys().next().value;this.delete(t)}this.map.set(t,r)}return this}}t.exports=LRUCache},4141:t=>{"use strict";const r=Object.freeze({loose:true});const i=Object.freeze({});const parseOptions=t=>{if(!t){return i}if(typeof t!=="object"){return r}return t};t.exports=parseOptions},9896:(t,r,i)=>{"use strict";const{MAX_SAFE_COMPONENT_LENGTH:o,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:c}=i(2532);const l=i(8626);r=t.exports={};const u=r.re=[];const h=r.safeRe=[];const d=r.src=[];const p=r.safeSrc=[];const m=r.t={};let g=0;const y="[a-zA-Z0-9-]";const v=[["\\s",1],["\\d",c],[y,a]];const makeSafeRegex=t=>{for(const[r,i]of v){t=t.split(`${r}*`).join(`${r}{0,${i}}`).split(`${r}+`).join(`${r}{1,${i}}`)}return t};const createToken=(t,r,i)=>{const o=makeSafeRegex(r);const a=g++;l(t,a,r);m[t]=a;d[a]=r;p[a]=o;u[a]=new RegExp(r,i?"g":undefined);h[a]=new RegExp(o,i?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","\\d+");createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${y}*`);createToken("MAINVERSION",`(${d[m.NUMERICIDENTIFIER]})\\.`+`(${d[m.NUMERICIDENTIFIER]})\\.`+`(${d[m.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${d[m.NUMERICIDENTIFIERLOOSE]})\\.`+`(${d[m.NUMERICIDENTIFIERLOOSE]})\\.`+`(${d[m.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${d[m.NONNUMERICIDENTIFIER]}|${d[m.NUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${d[m.NONNUMERICIDENTIFIER]}|${d[m.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASE",`(?:-(${d[m.PRERELEASEIDENTIFIER]}(?:\\.${d[m.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${d[m.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${d[m.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER",`${y}+`);createToken("BUILD",`(?:\\+(${d[m.BUILDIDENTIFIER]}(?:\\.${d[m.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${d[m.MAINVERSION]}${d[m.PRERELEASE]}?${d[m.BUILD]}?`);createToken("FULL",`^${d[m.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${d[m.MAINVERSIONLOOSE]}${d[m.PRERELEASELOOSE]}?${d[m.BUILD]}?`);createToken("LOOSE",`^${d[m.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${d[m.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${d[m.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${d[m.XRANGEIDENTIFIER]})`+`(?:\\.(${d[m.XRANGEIDENTIFIER]})`+`(?:\\.(${d[m.XRANGEIDENTIFIER]})`+`(?:${d[m.PRERELEASE]})?${d[m.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${d[m.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${d[m.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${d[m.XRANGEIDENTIFIERLOOSE]})`+`(?:${d[m.PRERELEASELOOSE]})?${d[m.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${d[m.GTLT]}\\s*${d[m.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${d[m.GTLT]}\\s*${d[m.XRANGEPLAINLOOSE]}$`);createToken("COERCEPLAIN",`${"(^|[^\\d])"+"(\\d{1,"}${o}})`+`(?:\\.(\\d{1,${o}}))?`+`(?:\\.(\\d{1,${o}}))?`);createToken("COERCE",`${d[m.COERCEPLAIN]}(?:$|[^\\d])`);createToken("COERCEFULL",d[m.COERCEPLAIN]+`(?:${d[m.PRERELEASE]})?`+`(?:${d[m.BUILD]})?`+`(?:$|[^\\d])`);createToken("COERCERTL",d[m.COERCE],true);createToken("COERCERTLFULL",d[m.COERCEFULL],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${d[m.LONETILDE]}\\s+`,true);r.tildeTrimReplace="$1~";createToken("TILDE",`^${d[m.LONETILDE]}${d[m.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${d[m.LONETILDE]}${d[m.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${d[m.LONECARET]}\\s+`,true);r.caretTrimReplace="$1^";createToken("CARET",`^${d[m.LONECARET]}${d[m.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${d[m.LONECARET]}${d[m.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${d[m.GTLT]}\\s*(${d[m.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${d[m.GTLT]}\\s*(${d[m.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${d[m.GTLT]}\\s*(${d[m.LOOSEPLAIN]}|${d[m.XRANGEPLAIN]})`,true);r.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${d[m.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${d[m.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${d[m.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${d[m.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},9617:(t,r,i)=>{"use strict";const o=i(8153);const gtr=(t,r,i)=>o(t,r,">",i);t.exports=gtr},1858:(t,r,i)=>{"use strict";const o=i(6629);const intersects=(t,r,i)=>{t=new o(t,i);r=new o(r,i);return t.intersects(r,i)};t.exports=intersects},7944:(t,r,i)=>{"use strict";const o=i(8153);const ltr=(t,r,i)=>o(t,r,"<",i);t.exports=ltr},2106:(t,r,i)=>{"use strict";const o=i(7662);const a=i(6629);const maxSatisfying=(t,r,i)=>{let c=null;let l=null;let u=null;try{u=new a(r,i)}catch(t){return null}t.forEach((t=>{if(u.test(t)){if(!c||l.compare(t)===-1){c=t;l=new o(c,i)}}}));return c};t.exports=maxSatisfying},4512:(t,r,i)=>{"use strict";const o=i(7662);const a=i(6629);const minSatisfying=(t,r,i)=>{let c=null;let l=null;let u=null;try{u=new a(r,i)}catch(t){return null}t.forEach((t=>{if(u.test(t)){if(!c||l.compare(t)===1){c=t;l=new o(c,i)}}}));return c};t.exports=minSatisfying},9995:(t,r,i)=>{"use strict";const o=i(7662);const a=i(6629);const c=i(8934);const minVersion=(t,r)=>{t=new a(t,r);let i=new o("0.0.0");if(t.test(i)){return i}i=new o("0.0.0-0");if(t.test(i)){return i}i=null;for(let r=0;r<t.set.length;++r){const a=t.set[r];let l=null;a.forEach((t=>{const r=new o(t.semver.version);switch(t.operator){case">":if(r.prerelease.length===0){r.patch++}else{r.prerelease.push(0)}r.raw=r.format();case"":case">=":if(!l||c(r,l)){l=r}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}}));if(l&&(!i||c(i,l))){i=l}}if(i&&t.test(i)){return i}return null};t.exports=minVersion},8153:(t,r,i)=>{"use strict";const o=i(7662);const a=i(402);const{ANY:c}=a;const l=i(6629);const u=i(1672);const h=i(8934);const d=i(4281);const p=i(4730);const m=i(9503);const outside=(t,r,i,g)=>{t=new o(t,g);r=new l(r,g);let y,v,b,w,E;switch(i){case">":y=h;v=p;b=d;w=">";E=">=";break;case"<":y=d;v=m;b=h;w="<";E="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(u(t,r,g)){return false}for(let i=0;i<r.set.length;++i){const o=r.set[i];let l=null;let u=null;o.forEach((t=>{if(t.semver===c){t=new a(">=0.0.0")}l=l||t;u=u||t;if(y(t.semver,l.semver,g)){l=t}else if(b(t.semver,u.semver,g)){u=t}}));if(l.operator===w||l.operator===E){return false}if((!u.operator||u.operator===w)&&v(t,u.semver)){return false}else if(u.operator===E&&b(t,u.semver)){return false}}return true};t.exports=outside},919:(t,r,i)=>{"use strict";const o=i(1672);const a=i(238);t.exports=(t,r,i)=>{const c=[];let l=null;let u=null;const h=t.sort(((t,r)=>a(t,r,i)));for(const t of h){const a=o(t,r,i);if(a){u=t;if(!l){l=t}}else{if(u){c.push([l,u])}u=null;l=null}}if(l){c.push([l,null])}const d=[];for(const[t,r]of c){if(t===r){d.push(t)}else if(!r&&t===h[0]){d.push("*")}else if(!r){d.push(`>=${t}`)}else if(t===h[0]){d.push(`<=${r}`)}else{d.push(`${t} - ${r}`)}}const p=d.join(" || ");const m=typeof r.raw==="string"?r.raw:String(r);return p.length<m.length?p:r}},5670:(t,r,i)=>{"use strict";const o=i(6629);const a=i(402);const{ANY:c}=a;const l=i(1672);const u=i(238);const subset=(t,r,i={})=>{if(t===r){return true}t=new o(t,i);r=new o(r,i);let a=false;e:for(const o of t.set){for(const t of r.set){const r=simpleSubset(o,t,i);a=a||r!==null;if(r){continue e}}if(a){return false}}return true};const h=[new a(">=0.0.0-0")];const d=[new a(">=0.0.0")];const simpleSubset=(t,r,i)=>{if(t===r){return true}if(t.length===1&&t[0].semver===c){if(r.length===1&&r[0].semver===c){return true}else if(i.includePrerelease){t=h}else{t=d}}if(r.length===1&&r[0].semver===c){if(i.includePrerelease){return true}else{r=d}}const o=new Set;let a,p;for(const r of t){if(r.operator===">"||r.operator===">="){a=higherGT(a,r,i)}else if(r.operator==="<"||r.operator==="<="){p=lowerLT(p,r,i)}else{o.add(r.semver)}}if(o.size>1){return null}let m;if(a&&p){m=u(a.semver,p.semver,i);if(m>0){return null}else if(m===0&&(a.operator!==">="||p.operator!=="<=")){return null}}for(const t of o){if(a&&!l(t,String(a),i)){return null}if(p&&!l(t,String(p),i)){return null}for(const o of r){if(!l(t,String(o),i)){return false}}return true}let g,y;let v,b;let w=p&&!i.includePrerelease&&p.semver.prerelease.length?p.semver:false;let E=a&&!i.includePrerelease&&a.semver.prerelease.length?a.semver:false;if(w&&w.prerelease.length===1&&p.operator==="<"&&w.prerelease[0]===0){w=false}for(const t of r){b=b||t.operator===">"||t.operator===">=";v=v||t.operator==="<"||t.operator==="<=";if(a){if(E){if(t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===E.major&&t.semver.minor===E.minor&&t.semver.patch===E.patch){E=false}}if(t.operator===">"||t.operator===">="){g=higherGT(a,t,i);if(g===t&&g!==a){return false}}else if(a.operator===">="&&!l(a.semver,String(t),i)){return false}}if(p){if(w){if(t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===w.major&&t.semver.minor===w.minor&&t.semver.patch===w.patch){w=false}}if(t.operator==="<"||t.operator==="<="){y=lowerLT(p,t,i);if(y===t&&y!==p){return false}}else if(p.operator==="<="&&!l(p.semver,String(t),i)){return false}}if(!t.operator&&(p||a)&&m!==0){return false}}if(a&&v&&!p&&m!==0){return false}if(p&&b&&!a&&m!==0){return false}if(E||w){return false}return true};const higherGT=(t,r,i)=>{if(!t){return r}const o=u(t.semver,r.semver,i);return o>0?t:o<0?r:r.operator===">"&&t.operator===">="?r:t};const lowerLT=(t,r,i)=>{if(!t){return r}const o=u(t.semver,r.semver,i);return o<0?t:o>0?r:r.operator==="<"&&t.operator==="<="?r:t};t.exports=subset},4549:(t,r,i)=>{"use strict";const o=i(6629);const toComparators=(t,r)=>new o(t,r).set.map((t=>t.map((t=>t.value)).join(" ").trim().split(" ")));t.exports=toComparators},236:(t,r,i)=>{"use strict";const o=i(6629);const validRange=(t,r)=>{try{return new o(t,r).range||"*"}catch(t){return null}};t.exports=validRange},4881:(t,r,i)=>{"use strict";const o=i(1940);t.exports=(t="")=>{const r=t.match(o);if(!r){return null}const[i,a]=r[0].replace(/#! ?/,"").split(" ");const c=i.split("/").pop();if(c==="env"){return a}return a?`${c} ${a}`:c}},1940:t=>{"use strict";t.exports=/^#!(.*)/},9458:t=>{"use strict";const r="";const i=`${r}[`;const o="";const a={to(t,r){if(!r)return`${i}${t+1}G`;return`${i}${r+1};${t+1}H`},move(t,r){let o="";if(t<0)o+=`${i}${-t}D`;else if(t>0)o+=`${i}${t}C`;if(r<0)o+=`${i}${-r}A`;else if(r>0)o+=`${i}${r}B`;return o},up:(t=1)=>`${i}${t}A`,down:(t=1)=>`${i}${t}B`,forward:(t=1)=>`${i}${t}C`,backward:(t=1)=>`${i}${t}D`,nextLine:(t=1)=>`${i}E`.repeat(t),prevLine:(t=1)=>`${i}F`.repeat(t),left:`${i}G`,hide:`${i}?25l`,show:`${i}?25h`,save:`${r}7`,restore:`${r}8`};const c={up:(t=1)=>`${i}S`.repeat(t),down:(t=1)=>`${i}T`.repeat(t)};const l={screen:`${i}2J`,up:(t=1)=>`${i}1J`.repeat(t),down:(t=1)=>`${i}J`.repeat(t),line:`${i}2K`,lineEnd:`${i}K`,lineStart:`${i}1K`,lines(t){let r="";for(let i=0;i<t;i++)r+=this.line+(i<t-1?a.up():"");if(t)r+=a.left;return r}};t.exports={cursor:a,scroll:c,erase:l,beep:o}},3444:t=>{"use strict";var r=1;var i=2;function stripWithoutWhitespace(){return""}function stripWithWhitespace(t,r,i){return t.slice(r,i).replace(/\S/g," ")}t.exports=function(t,o){o=o||{};var a;var c;var l=false;var u=false;var h=0;var d="";var p=o.whitespace===false?stripWithoutWhitespace:stripWithWhitespace;for(var m=0;m<t.length;m++){a=t[m];c=t[m+1];if(!u&&a==='"'){var g=t[m-1]==="\\"&&t[m-2]!=="\\";if(!g){l=!l}}if(l){continue}if(!u&&a+c==="//"){d+=t.slice(h,m);h=m;u=r;m++}else if(u===r&&a+c==="\r\n"){m++;u=false;d+=p(t,h,m);h=m;continue}else if(u===r&&a==="\n"){u=false;d+=p(t,h,m);h=m}else if(!u&&a+c==="/*"){d+=t.slice(h,m);h=m;u=i;m++;continue}else if(u===i&&a+c==="*/"){m++;u=false;d+=p(t,h,m+1);h=m+1;continue}}return d+(u?p(t.substr(h)):t.substr(h))}},743:(t,r,i)=>{"use strict";
66
+ var m=p(181);var g=m.Buffer;function copyProps(t,u){for(var p in t){u[p]=t[p]}}if(g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow){t.exports=m}else{copyProps(m,u);u.Buffer=SafeBuffer}function SafeBuffer(t,u,p){return g(t,u,p)}SafeBuffer.prototype=Object.create(g.prototype);copyProps(g,SafeBuffer);SafeBuffer.from=function(t,u,p){if(typeof t==="number"){throw new TypeError("Argument must not be a number")}return g(t,u,p)};SafeBuffer.alloc=function(t,u,p){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}var m=g(t);if(u!==undefined){if(typeof p==="string"){m.fill(u,p)}else{m.fill(u)}}else{m.fill(0)}return m};SafeBuffer.allocUnsafe=function(t){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}return g(t)};SafeBuffer.allocUnsafeSlow=function(t){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}return m.SlowBuffer(t)}},402:(t,u,p)=>{"use strict";const m=Symbol("SemVer ANY");class Comparator{static get ANY(){return m}constructor(t,u){u=g(u);if(t instanceof Comparator){if(t.loose===!!u.loose){return t}else{t=t.value}}t=t.trim().split(/\s+/).join(" ");w("comparator",t,u);this.options=u;this.loose=!!u.loose;this.parse(t);if(this.semver===m){this.value=""}else{this.value=this.operator+this.semver.version}w("comp",this)}parse(t){const u=this.options.loose?y[v.COMPARATORLOOSE]:y[v.COMPARATOR];const p=t.match(u);if(!p){throw new TypeError(`Invalid comparator: ${t}`)}this.operator=p[1]!==undefined?p[1]:"";if(this.operator==="="){this.operator=""}if(!p[2]){this.semver=m}else{this.semver=new E(p[2],this.options.loose)}}toString(){return this.value}test(t){w("Comparator.test",t,this.options.loose);if(this.semver===m||t===m){return true}if(typeof t==="string"){try{t=new E(t,this.options)}catch(t){return false}}return b(t,this.operator,this.semver,this.options)}intersects(t,u){if(!(t instanceof Comparator)){throw new TypeError("a Comparator is required")}if(this.operator===""){if(this.value===""){return true}return new $(t.value,u).test(this.value)}else if(t.operator===""){if(t.value===""){return true}return new $(this.value,u).test(t.semver)}u=g(u);if(u.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")){return false}if(!u.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))){return false}if(this.operator.startsWith(">")&&t.operator.startsWith(">")){return true}if(this.operator.startsWith("<")&&t.operator.startsWith("<")){return true}if(this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")){return true}if(b(this.semver,"<",t.semver,u)&&this.operator.startsWith(">")&&t.operator.startsWith("<")){return true}if(b(this.semver,">",t.semver,u)&&this.operator.startsWith("<")&&t.operator.startsWith(">")){return true}return false}}t.exports=Comparator;const g=p(4141);const{safeRe:y,t:v}=p(9896);const b=p(5109);const w=p(8626);const E=p(7662);const $=p(6629)},6629:(t,u,p)=>{"use strict";const m=/\s+/g;class Range{constructor(t,u){u=v(u);if(t instanceof Range){if(t.loose===!!u.loose&&t.includePrerelease===!!u.includePrerelease){return t}else{return new Range(t.raw,u)}}if(t instanceof b){this.raw=t.value;this.set=[[t]];this.formatted=undefined;return this}this.options=u;this.loose=!!u.loose;this.includePrerelease=!!u.includePrerelease;this.raw=t.trim().replace(m," ");this.set=this.raw.split("||").map((t=>this.parseRange(t.trim()))).filter((t=>t.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${this.raw}`)}if(this.set.length>1){const t=this.set[0];this.set=this.set.filter((t=>!isNullSet(t[0])));if(this.set.length===0){this.set=[t]}else if(this.set.length>1){for(const t of this.set){if(t.length===1&&isAny(t[0])){this.set=[t];break}}}}this.formatted=undefined}get range(){if(this.formatted===undefined){this.formatted="";for(let t=0;t<this.set.length;t++){if(t>0){this.formatted+="||"}const u=this.set[t];for(let t=0;t<u.length;t++){if(t>0){this.formatted+=" "}this.formatted+=u[t].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){const u=(this.options.includePrerelease&&x)|(this.options.loose&&T);const p=u+":"+t;const m=y.get(p);if(m){return m}const g=this.options.loose;const v=g?$[O.HYPHENRANGELOOSE]:$[O.HYPHENRANGE];t=t.replace(v,hyphenReplace(this.options.includePrerelease));w("hyphen replace",t);t=t.replace($[O.COMPARATORTRIM],R);w("comparator trim",t);t=t.replace($[O.TILDETRIM],P);w("tilde trim",t);t=t.replace($[O.CARETTRIM],A);w("caret trim",t);let E=t.split(" ").map((t=>parseComparator(t,this.options))).join(" ").split(/\s+/).map((t=>replaceGTE0(t,this.options)));if(g){E=E.filter((t=>{w("loose invalid filter",t,this.options);return!!t.match($[O.COMPARATORLOOSE])}))}w("range list",E);const C=new Map;const k=E.map((t=>new b(t,this.options)));for(const t of k){if(isNullSet(t)){return[t]}C.set(t.value,t)}if(C.size>1&&C.has("")){C.delete("")}const I=[...C.values()];y.set(p,I);return I}intersects(t,u){if(!(t instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((p=>isSatisfiable(p,u)&&t.set.some((t=>isSatisfiable(t,u)&&p.every((p=>t.every((t=>p.intersects(t,u)))))))))}test(t){if(!t){return false}if(typeof t==="string"){try{t=new E(t,this.options)}catch(t){return false}}for(let u=0;u<this.set.length;u++){if(testSet(this.set[u],t,this.options)){return true}}return false}}t.exports=Range;const g=p(8412);const y=new g;const v=p(4141);const b=p(402);const w=p(8626);const E=p(7662);const{safeRe:$,t:O,comparatorTrimReplace:R,tildeTrimReplace:P,caretTrimReplace:A}=p(9896);const{FLAG_INCLUDE_PRERELEASE:x,FLAG_LOOSE:T}=p(2532);const isNullSet=t=>t.value==="<0.0.0-0";const isAny=t=>t.value==="";const isSatisfiable=(t,u)=>{let p=true;const m=t.slice();let g=m.pop();while(p&&m.length){p=m.every((t=>g.intersects(t,u)));g=m.pop()}return p};const parseComparator=(t,u)=>{t=t.replace($[O.BUILD],"");w("comp",t,u);t=replaceCarets(t,u);w("caret",t);t=replaceTildes(t,u);w("tildes",t);t=replaceXRanges(t,u);w("xrange",t);t=replaceStars(t,u);w("stars",t);return t};const isX=t=>!t||t.toLowerCase()==="x"||t==="*";const replaceTildes=(t,u)=>t.trim().split(/\s+/).map((t=>replaceTilde(t,u))).join(" ");const replaceTilde=(t,u)=>{const p=u.loose?$[O.TILDELOOSE]:$[O.TILDE];return t.replace(p,((u,p,m,g,y)=>{w("tilde",t,u,p,m,g,y);let v;if(isX(p)){v=""}else if(isX(m)){v=`>=${p}.0.0 <${+p+1}.0.0-0`}else if(isX(g)){v=`>=${p}.${m}.0 <${p}.${+m+1}.0-0`}else if(y){w("replaceTilde pr",y);v=`>=${p}.${m}.${g}-${y} <${p}.${+m+1}.0-0`}else{v=`>=${p}.${m}.${g} <${p}.${+m+1}.0-0`}w("tilde return",v);return v}))};const replaceCarets=(t,u)=>t.trim().split(/\s+/).map((t=>replaceCaret(t,u))).join(" ");const replaceCaret=(t,u)=>{w("caret",t,u);const p=u.loose?$[O.CARETLOOSE]:$[O.CARET];const m=u.includePrerelease?"-0":"";return t.replace(p,((u,p,g,y,v)=>{w("caret",t,u,p,g,y,v);let b;if(isX(p)){b=""}else if(isX(g)){b=`>=${p}.0.0${m} <${+p+1}.0.0-0`}else if(isX(y)){if(p==="0"){b=`>=${p}.${g}.0${m} <${p}.${+g+1}.0-0`}else{b=`>=${p}.${g}.0${m} <${+p+1}.0.0-0`}}else if(v){w("replaceCaret pr",v);if(p==="0"){if(g==="0"){b=`>=${p}.${g}.${y}-${v} <${p}.${g}.${+y+1}-0`}else{b=`>=${p}.${g}.${y}-${v} <${p}.${+g+1}.0-0`}}else{b=`>=${p}.${g}.${y}-${v} <${+p+1}.0.0-0`}}else{w("no pr");if(p==="0"){if(g==="0"){b=`>=${p}.${g}.${y}${m} <${p}.${g}.${+y+1}-0`}else{b=`>=${p}.${g}.${y}${m} <${p}.${+g+1}.0-0`}}else{b=`>=${p}.${g}.${y} <${+p+1}.0.0-0`}}w("caret return",b);return b}))};const replaceXRanges=(t,u)=>{w("replaceXRanges",t,u);return t.split(/\s+/).map((t=>replaceXRange(t,u))).join(" ")};const replaceXRange=(t,u)=>{t=t.trim();const p=u.loose?$[O.XRANGELOOSE]:$[O.XRANGE];return t.replace(p,((p,m,g,y,v,b)=>{w("xRange",t,p,m,g,y,v,b);const E=isX(g);const $=E||isX(y);const O=$||isX(v);const R=O;if(m==="="&&R){m=""}b=u.includePrerelease?"-0":"";if(E){if(m===">"||m==="<"){p="<0.0.0-0"}else{p="*"}}else if(m&&R){if($){y=0}v=0;if(m===">"){m=">=";if($){g=+g+1;y=0;v=0}else{y=+y+1;v=0}}else if(m==="<="){m="<";if($){g=+g+1}else{y=+y+1}}if(m==="<"){b="-0"}p=`${m+g}.${y}.${v}${b}`}else if($){p=`>=${g}.0.0${b} <${+g+1}.0.0-0`}else if(O){p=`>=${g}.${y}.0${b} <${g}.${+y+1}.0-0`}w("xRange return",p);return p}))};const replaceStars=(t,u)=>{w("replaceStars",t,u);return t.trim().replace($[O.STAR],"")};const replaceGTE0=(t,u)=>{w("replaceGTE0",t,u);return t.trim().replace($[u.includePrerelease?O.GTE0PRE:O.GTE0],"")};const hyphenReplace=t=>(u,p,m,g,y,v,b,w,E,$,O,R)=>{if(isX(m)){p=""}else if(isX(g)){p=`>=${m}.0.0${t?"-0":""}`}else if(isX(y)){p=`>=${m}.${g}.0${t?"-0":""}`}else if(v){p=`>=${p}`}else{p=`>=${p}${t?"-0":""}`}if(isX(E)){w=""}else if(isX($)){w=`<${+E+1}.0.0-0`}else if(isX(O)){w=`<${E}.${+$+1}.0-0`}else if(R){w=`<=${E}.${$}.${O}-${R}`}else if(t){w=`<${E}.${$}.${+O+1}-0`}else{w=`<=${w}`}return`${p} ${w}`.trim()};const testSet=(t,u,p)=>{for(let p=0;p<t.length;p++){if(!t[p].test(u)){return false}}if(u.prerelease.length&&!p.includePrerelease){for(let p=0;p<t.length;p++){w(t[p].semver);if(t[p].semver===b.ANY){continue}if(t[p].semver.prerelease.length>0){const m=t[p].semver;if(m.major===u.major&&m.minor===u.minor&&m.patch===u.patch){return true}}}return false}return true}},7662:(t,u,p)=>{"use strict";const m=p(8626);const{MAX_LENGTH:g,MAX_SAFE_INTEGER:y}=p(2532);const{safeRe:v,t:b}=p(9896);const w=p(4141);const{compareIdentifiers:E}=p(6237);class SemVer{constructor(t,u){u=w(u);if(t instanceof SemVer){if(t.loose===!!u.loose&&t.includePrerelease===!!u.includePrerelease){return t}else{t=t.version}}else if(typeof t!=="string"){throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`)}if(t.length>g){throw new TypeError(`version is longer than ${g} characters`)}m("SemVer",t,u);this.options=u;this.loose=!!u.loose;this.includePrerelease=!!u.includePrerelease;const p=t.trim().match(u.loose?v[b.LOOSE]:v[b.FULL]);if(!p){throw new TypeError(`Invalid Version: ${t}`)}this.raw=t;this.major=+p[1];this.minor=+p[2];this.patch=+p[3];if(this.major>y||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>y||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>y||this.patch<0){throw new TypeError("Invalid patch version")}if(!p[4]){this.prerelease=[]}else{this.prerelease=p[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const u=+t;if(u>=0&&u<y){return u}}return t}))}this.build=p[5]?p[5].split("."):[];this.format()}format(){this.version=`${this.major}.${this.minor}.${this.patch}`;if(this.prerelease.length){this.version+=`-${this.prerelease.join(".")}`}return this.version}toString(){return this.version}compare(t){m("SemVer.compare",this.version,this.options,t);if(!(t instanceof SemVer)){if(typeof t==="string"&&t===this.version){return 0}t=new SemVer(t,this.options)}if(t.version===this.version){return 0}return this.compareMain(t)||this.comparePre(t)}compareMain(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}if(this.major<t.major){return-1}if(this.major>t.major){return 1}if(this.minor<t.minor){return-1}if(this.minor>t.minor){return 1}if(this.patch<t.patch){return-1}if(this.patch>t.patch){return 1}return 0}comparePre(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}if(this.prerelease.length&&!t.prerelease.length){return-1}else if(!this.prerelease.length&&t.prerelease.length){return 1}else if(!this.prerelease.length&&!t.prerelease.length){return 0}let u=0;do{const p=this.prerelease[u];const g=t.prerelease[u];m("prerelease compare",u,p,g);if(p===undefined&&g===undefined){return 0}else if(g===undefined){return 1}else if(p===undefined){return-1}else if(p===g){continue}else{return E(p,g)}}while(++u)}compareBuild(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}let u=0;do{const p=this.build[u];const g=t.build[u];m("build compare",u,p,g);if(p===undefined&&g===undefined){return 0}else if(g===undefined){return 1}else if(p===undefined){return-1}else if(p===g){continue}else{return E(p,g)}}while(++u)}inc(t,u,p){if(t.startsWith("pre")){if(!u&&p===false){throw new Error("invalid increment argument: identifier is empty")}if(u){const t=`-${u}`.match(this.options.loose?v[b.PRERELEASELOOSE]:v[b.PRERELEASE]);if(!t||t[1]!==u){throw new Error(`invalid identifier: ${u}`)}}}switch(t){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",u,p);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",u,p);break;case"prepatch":this.prerelease.length=0;this.inc("patch",u,p);this.inc("pre",u,p);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",u,p)}this.inc("pre",u,p);break;case"release":if(this.prerelease.length===0){throw new Error(`version ${this.raw} is not a prerelease`)}this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":{const t=Number(p)?1:0;if(this.prerelease.length===0){this.prerelease=[t]}else{let m=this.prerelease.length;while(--m>=0){if(typeof this.prerelease[m]==="number"){this.prerelease[m]++;m=-2}}if(m===-1){if(u===this.prerelease.join(".")&&p===false){throw new Error("invalid increment argument: identifier already exists")}this.prerelease.push(t)}}if(u){let m=[u,t];if(p===false){m=[u]}if(E(this.prerelease[0],u)===0){if(isNaN(this.prerelease[1])){this.prerelease=m}}else{this.prerelease=m}}break}default:throw new Error(`invalid increment argument: ${t}`)}this.raw=this.format();if(this.build.length){this.raw+=`+${this.build.join(".")}`}return this}}t.exports=SemVer},9976:(t,u,p)=>{"use strict";const m=p(8866);const clean=(t,u)=>{const p=m(t.trim().replace(/^[=v]+/,""),u);return p?p.version:null};t.exports=clean},5109:(t,u,p)=>{"use strict";const m=p(7823);const g=p(8509);const y=p(8934);const v=p(9503);const b=p(4281);const w=p(4730);const cmp=(t,u,p,E)=>{switch(u){case"===":if(typeof t==="object"){t=t.version}if(typeof p==="object"){p=p.version}return t===p;case"!==":if(typeof t==="object"){t=t.version}if(typeof p==="object"){p=p.version}return t!==p;case"":case"=":case"==":return m(t,p,E);case"!=":return g(t,p,E);case">":return y(t,p,E);case">=":return v(t,p,E);case"<":return b(t,p,E);case"<=":return w(t,p,E);default:throw new TypeError(`Invalid operator: ${u}`)}};t.exports=cmp},5144:(t,u,p)=>{"use strict";const m=p(7662);const g=p(8866);const{safeRe:y,t:v}=p(9896);const coerce=(t,u)=>{if(t instanceof m){return t}if(typeof t==="number"){t=String(t)}if(typeof t!=="string"){return null}u=u||{};let p=null;if(!u.rtl){p=t.match(u.includePrerelease?y[v.COERCEFULL]:y[v.COERCE])}else{const m=u.includePrerelease?y[v.COERCERTLFULL]:y[v.COERCERTL];let g;while((g=m.exec(t))&&(!p||p.index+p[0].length!==t.length)){if(!p||g.index+g[0].length!==p.index+p[0].length){p=g}m.lastIndex=g.index+g[1].length+g[2].length}m.lastIndex=-1}if(p===null){return null}const b=p[2];const w=p[3]||"0";const E=p[4]||"0";const $=u.includePrerelease&&p[5]?`-${p[5]}`:"";const O=u.includePrerelease&&p[6]?`+${p[6]}`:"";return g(`${b}.${w}.${E}${$}${O}`,u)};t.exports=coerce},9967:(t,u,p)=>{"use strict";const m=p(7662);const compareBuild=(t,u,p)=>{const g=new m(t,p);const y=new m(u,p);return g.compare(y)||g.compareBuild(y)};t.exports=compareBuild},565:(t,u,p)=>{"use strict";const m=p(238);const compareLoose=(t,u)=>m(t,u,true);t.exports=compareLoose},238:(t,u,p)=>{"use strict";const m=p(7662);const compare=(t,u,p)=>new m(t,p).compare(new m(u,p));t.exports=compare},1214:(t,u,p)=>{"use strict";const m=p(8866);const diff=(t,u)=>{const p=m(t,null,true);const g=m(u,null,true);const y=p.compare(g);if(y===0){return null}const v=y>0;const b=v?p:g;const w=v?g:p;const E=!!b.prerelease.length;const $=!!w.prerelease.length;if($&&!E){if(!w.patch&&!w.minor){return"major"}if(w.compareMain(b)===0){if(w.minor&&!w.patch){return"minor"}return"patch"}}const O=E?"pre":"";if(p.major!==g.major){return O+"major"}if(p.minor!==g.minor){return O+"minor"}if(p.patch!==g.patch){return O+"patch"}return"prerelease"};t.exports=diff},7823:(t,u,p)=>{"use strict";const m=p(238);const eq=(t,u,p)=>m(t,u,p)===0;t.exports=eq},8934:(t,u,p)=>{"use strict";const m=p(238);const gt=(t,u,p)=>m(t,u,p)>0;t.exports=gt},9503:(t,u,p)=>{"use strict";const m=p(238);const gte=(t,u,p)=>m(t,u,p)>=0;t.exports=gte},4121:(t,u,p)=>{"use strict";const m=p(7662);const inc=(t,u,p,g,y)=>{if(typeof p==="string"){y=g;g=p;p=undefined}try{return new m(t instanceof m?t.version:t,p).inc(u,g,y).version}catch(t){return null}};t.exports=inc},4281:(t,u,p)=>{"use strict";const m=p(238);const lt=(t,u,p)=>m(t,u,p)<0;t.exports=lt},4730:(t,u,p)=>{"use strict";const m=p(238);const lte=(t,u,p)=>m(t,u,p)<=0;t.exports=lte},4864:(t,u,p)=>{"use strict";const m=p(7662);const major=(t,u)=>new m(t,u).major;t.exports=major},6108:(t,u,p)=>{"use strict";const m=p(7662);const minor=(t,u)=>new m(t,u).minor;t.exports=minor},8509:(t,u,p)=>{"use strict";const m=p(238);const neq=(t,u,p)=>m(t,u,p)!==0;t.exports=neq},8866:(t,u,p)=>{"use strict";const m=p(7662);const parse=(t,u,p=false)=>{if(t instanceof m){return t}try{return new m(t,u)}catch(t){if(!p){return null}throw t}};t.exports=parse},1475:(t,u,p)=>{"use strict";const m=p(7662);const patch=(t,u)=>new m(t,u).patch;t.exports=patch},6979:(t,u,p)=>{"use strict";const m=p(8866);const prerelease=(t,u)=>{const p=m(t,u);return p&&p.prerelease.length?p.prerelease:null};t.exports=prerelease},184:(t,u,p)=>{"use strict";const m=p(238);const rcompare=(t,u,p)=>m(u,t,p);t.exports=rcompare},1903:(t,u,p)=>{"use strict";const m=p(9967);const rsort=(t,u)=>t.sort(((t,p)=>m(p,t,u)));t.exports=rsort},1672:(t,u,p)=>{"use strict";const m=p(6629);const satisfies=(t,u,p)=>{try{u=new m(u,p)}catch(t){return false}return u.test(t)};t.exports=satisfies},2849:(t,u,p)=>{"use strict";const m=p(9967);const sort=(t,u)=>t.sort(((t,p)=>m(t,p,u)));t.exports=sort},1399:(t,u,p)=>{"use strict";const m=p(8866);const valid=(t,u)=>{const p=m(t,u);return p?p.version:null};t.exports=valid},4423:(t,u,p)=>{"use strict";const m=p(9896);const g=p(2532);const y=p(7662);const v=p(6237);const b=p(8866);const w=p(1399);const E=p(9976);const $=p(4121);const O=p(1214);const R=p(4864);const P=p(6108);const A=p(1475);const x=p(6979);const T=p(238);const C=p(184);const k=p(565);const I=p(9967);const N=p(2849);const D=p(1903);const L=p(8934);const M=p(4281);const j=p(7823);const U=p(8509);const B=p(9503);const H=p(4730);const V=p(5109);const z=p(5144);const G=p(402);const q=p(6629);const W=p(1672);const Y=p(4549);const Z=p(2106);const X=p(4512);const J=p(9995);const Q=p(236);const ee=p(8153);const se=p(9617);const ie=p(7944);const ne=p(1858);const ae=p(919);const le=p(5670);t.exports={parse:b,valid:w,clean:E,inc:$,diff:O,major:R,minor:P,patch:A,prerelease:x,compare:T,rcompare:C,compareLoose:k,compareBuild:I,sort:N,rsort:D,gt:L,lt:M,eq:j,neq:U,gte:B,lte:H,cmp:V,coerce:z,Comparator:G,Range:q,satisfies:W,toComparators:Y,maxSatisfying:Z,minSatisfying:X,minVersion:J,validRange:Q,outside:ee,gtr:se,ltr:ie,intersects:ne,simplifyRange:ae,subset:le,SemVer:y,re:m.re,src:m.src,tokens:m.t,SEMVER_SPEC_VERSION:g.SEMVER_SPEC_VERSION,RELEASE_TYPES:g.RELEASE_TYPES,compareIdentifiers:v.compareIdentifiers,rcompareIdentifiers:v.rcompareIdentifiers}},2532:t=>{"use strict";const u="2.0.0";const p=256;const m=Number.MAX_SAFE_INTEGER||9007199254740991;const g=16;const y=p-6;const v=["major","premajor","minor","preminor","patch","prepatch","prerelease"];t.exports={MAX_LENGTH:p,MAX_SAFE_COMPONENT_LENGTH:g,MAX_SAFE_BUILD_LENGTH:y,MAX_SAFE_INTEGER:m,RELEASE_TYPES:v,SEMVER_SPEC_VERSION:u,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},8626:t=>{"use strict";const u=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};t.exports=u},6237:t=>{"use strict";const u=/^[0-9]+$/;const compareIdentifiers=(t,p)=>{if(typeof t==="number"&&typeof p==="number"){return t===p?0:t<p?-1:1}const m=u.test(t);const g=u.test(p);if(m&&g){t=+t;p=+p}return t===p?0:m&&!g?-1:g&&!m?1:t<p?-1:1};const rcompareIdentifiers=(t,u)=>compareIdentifiers(u,t);t.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},8412:t=>{"use strict";class LRUCache{constructor(){this.max=1e3;this.map=new Map}get(t){const u=this.map.get(t);if(u===undefined){return undefined}else{this.map.delete(t);this.map.set(t,u);return u}}delete(t){return this.map.delete(t)}set(t,u){const p=this.delete(t);if(!p&&u!==undefined){if(this.map.size>=this.max){const t=this.map.keys().next().value;this.delete(t)}this.map.set(t,u)}return this}}t.exports=LRUCache},4141:t=>{"use strict";const u=Object.freeze({loose:true});const p=Object.freeze({});const parseOptions=t=>{if(!t){return p}if(typeof t!=="object"){return u}return t};t.exports=parseOptions},9896:(t,u,p)=>{"use strict";const{MAX_SAFE_COMPONENT_LENGTH:m,MAX_SAFE_BUILD_LENGTH:g,MAX_LENGTH:y}=p(2532);const v=p(8626);u=t.exports={};const b=u.re=[];const w=u.safeRe=[];const E=u.src=[];const $=u.safeSrc=[];const O=u.t={};let R=0;const P="[a-zA-Z0-9-]";const A=[["\\s",1],["\\d",y],[P,g]];const makeSafeRegex=t=>{for(const[u,p]of A){t=t.split(`${u}*`).join(`${u}{0,${p}}`).split(`${u}+`).join(`${u}{1,${p}}`)}return t};const createToken=(t,u,p)=>{const m=makeSafeRegex(u);const g=R++;v(t,g,u);O[t]=g;E[g]=u;$[g]=m;b[g]=new RegExp(u,p?"g":undefined);w[g]=new RegExp(m,p?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","\\d+");createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${P}*`);createToken("MAINVERSION",`(${E[O.NUMERICIDENTIFIER]})\\.`+`(${E[O.NUMERICIDENTIFIER]})\\.`+`(${E[O.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${E[O.NUMERICIDENTIFIERLOOSE]})\\.`+`(${E[O.NUMERICIDENTIFIERLOOSE]})\\.`+`(${E[O.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${E[O.NONNUMERICIDENTIFIER]}|${E[O.NUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${E[O.NONNUMERICIDENTIFIER]}|${E[O.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASE",`(?:-(${E[O.PRERELEASEIDENTIFIER]}(?:\\.${E[O.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${E[O.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${E[O.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER",`${P}+`);createToken("BUILD",`(?:\\+(${E[O.BUILDIDENTIFIER]}(?:\\.${E[O.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${E[O.MAINVERSION]}${E[O.PRERELEASE]}?${E[O.BUILD]}?`);createToken("FULL",`^${E[O.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${E[O.MAINVERSIONLOOSE]}${E[O.PRERELEASELOOSE]}?${E[O.BUILD]}?`);createToken("LOOSE",`^${E[O.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${E[O.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${E[O.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${E[O.XRANGEIDENTIFIER]})`+`(?:\\.(${E[O.XRANGEIDENTIFIER]})`+`(?:\\.(${E[O.XRANGEIDENTIFIER]})`+`(?:${E[O.PRERELEASE]})?${E[O.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${E[O.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${E[O.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${E[O.XRANGEIDENTIFIERLOOSE]})`+`(?:${E[O.PRERELEASELOOSE]})?${E[O.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${E[O.GTLT]}\\s*${E[O.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${E[O.GTLT]}\\s*${E[O.XRANGEPLAINLOOSE]}$`);createToken("COERCEPLAIN",`${"(^|[^\\d])"+"(\\d{1,"}${m}})`+`(?:\\.(\\d{1,${m}}))?`+`(?:\\.(\\d{1,${m}}))?`);createToken("COERCE",`${E[O.COERCEPLAIN]}(?:$|[^\\d])`);createToken("COERCEFULL",E[O.COERCEPLAIN]+`(?:${E[O.PRERELEASE]})?`+`(?:${E[O.BUILD]})?`+`(?:$|[^\\d])`);createToken("COERCERTL",E[O.COERCE],true);createToken("COERCERTLFULL",E[O.COERCEFULL],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${E[O.LONETILDE]}\\s+`,true);u.tildeTrimReplace="$1~";createToken("TILDE",`^${E[O.LONETILDE]}${E[O.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${E[O.LONETILDE]}${E[O.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${E[O.LONECARET]}\\s+`,true);u.caretTrimReplace="$1^";createToken("CARET",`^${E[O.LONECARET]}${E[O.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${E[O.LONECARET]}${E[O.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${E[O.GTLT]}\\s*(${E[O.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${E[O.GTLT]}\\s*(${E[O.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${E[O.GTLT]}\\s*(${E[O.LOOSEPLAIN]}|${E[O.XRANGEPLAIN]})`,true);u.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${E[O.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${E[O.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${E[O.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${E[O.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},9617:(t,u,p)=>{"use strict";const m=p(8153);const gtr=(t,u,p)=>m(t,u,">",p);t.exports=gtr},1858:(t,u,p)=>{"use strict";const m=p(6629);const intersects=(t,u,p)=>{t=new m(t,p);u=new m(u,p);return t.intersects(u,p)};t.exports=intersects},7944:(t,u,p)=>{"use strict";const m=p(8153);const ltr=(t,u,p)=>m(t,u,"<",p);t.exports=ltr},2106:(t,u,p)=>{"use strict";const m=p(7662);const g=p(6629);const maxSatisfying=(t,u,p)=>{let y=null;let v=null;let b=null;try{b=new g(u,p)}catch(t){return null}t.forEach((t=>{if(b.test(t)){if(!y||v.compare(t)===-1){y=t;v=new m(y,p)}}}));return y};t.exports=maxSatisfying},4512:(t,u,p)=>{"use strict";const m=p(7662);const g=p(6629);const minSatisfying=(t,u,p)=>{let y=null;let v=null;let b=null;try{b=new g(u,p)}catch(t){return null}t.forEach((t=>{if(b.test(t)){if(!y||v.compare(t)===1){y=t;v=new m(y,p)}}}));return y};t.exports=minSatisfying},9995:(t,u,p)=>{"use strict";const m=p(7662);const g=p(6629);const y=p(8934);const minVersion=(t,u)=>{t=new g(t,u);let p=new m("0.0.0");if(t.test(p)){return p}p=new m("0.0.0-0");if(t.test(p)){return p}p=null;for(let u=0;u<t.set.length;++u){const g=t.set[u];let v=null;g.forEach((t=>{const u=new m(t.semver.version);switch(t.operator){case">":if(u.prerelease.length===0){u.patch++}else{u.prerelease.push(0)}u.raw=u.format();case"":case">=":if(!v||y(u,v)){v=u}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}}));if(v&&(!p||y(p,v))){p=v}}if(p&&t.test(p)){return p}return null};t.exports=minVersion},8153:(t,u,p)=>{"use strict";const m=p(7662);const g=p(402);const{ANY:y}=g;const v=p(6629);const b=p(1672);const w=p(8934);const E=p(4281);const $=p(4730);const O=p(9503);const outside=(t,u,p,R)=>{t=new m(t,R);u=new v(u,R);let P,A,x,T,C;switch(p){case">":P=w;A=$;x=E;T=">";C=">=";break;case"<":P=E;A=O;x=w;T="<";C="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(b(t,u,R)){return false}for(let p=0;p<u.set.length;++p){const m=u.set[p];let v=null;let b=null;m.forEach((t=>{if(t.semver===y){t=new g(">=0.0.0")}v=v||t;b=b||t;if(P(t.semver,v.semver,R)){v=t}else if(x(t.semver,b.semver,R)){b=t}}));if(v.operator===T||v.operator===C){return false}if((!b.operator||b.operator===T)&&A(t,b.semver)){return false}else if(b.operator===C&&x(t,b.semver)){return false}}return true};t.exports=outside},919:(t,u,p)=>{"use strict";const m=p(1672);const g=p(238);t.exports=(t,u,p)=>{const y=[];let v=null;let b=null;const w=t.sort(((t,u)=>g(t,u,p)));for(const t of w){const g=m(t,u,p);if(g){b=t;if(!v){v=t}}else{if(b){y.push([v,b])}b=null;v=null}}if(v){y.push([v,null])}const E=[];for(const[t,u]of y){if(t===u){E.push(t)}else if(!u&&t===w[0]){E.push("*")}else if(!u){E.push(`>=${t}`)}else if(t===w[0]){E.push(`<=${u}`)}else{E.push(`${t} - ${u}`)}}const $=E.join(" || ");const O=typeof u.raw==="string"?u.raw:String(u);return $.length<O.length?$:u}},5670:(t,u,p)=>{"use strict";const m=p(6629);const g=p(402);const{ANY:y}=g;const v=p(1672);const b=p(238);const subset=(t,u,p={})=>{if(t===u){return true}t=new m(t,p);u=new m(u,p);let g=false;e:for(const m of t.set){for(const t of u.set){const u=simpleSubset(m,t,p);g=g||u!==null;if(u){continue e}}if(g){return false}}return true};const w=[new g(">=0.0.0-0")];const E=[new g(">=0.0.0")];const simpleSubset=(t,u,p)=>{if(t===u){return true}if(t.length===1&&t[0].semver===y){if(u.length===1&&u[0].semver===y){return true}else if(p.includePrerelease){t=w}else{t=E}}if(u.length===1&&u[0].semver===y){if(p.includePrerelease){return true}else{u=E}}const m=new Set;let g,$;for(const u of t){if(u.operator===">"||u.operator===">="){g=higherGT(g,u,p)}else if(u.operator==="<"||u.operator==="<="){$=lowerLT($,u,p)}else{m.add(u.semver)}}if(m.size>1){return null}let O;if(g&&$){O=b(g.semver,$.semver,p);if(O>0){return null}else if(O===0&&(g.operator!==">="||$.operator!=="<=")){return null}}for(const t of m){if(g&&!v(t,String(g),p)){return null}if($&&!v(t,String($),p)){return null}for(const m of u){if(!v(t,String(m),p)){return false}}return true}let R,P;let A,x;let T=$&&!p.includePrerelease&&$.semver.prerelease.length?$.semver:false;let C=g&&!p.includePrerelease&&g.semver.prerelease.length?g.semver:false;if(T&&T.prerelease.length===1&&$.operator==="<"&&T.prerelease[0]===0){T=false}for(const t of u){x=x||t.operator===">"||t.operator===">=";A=A||t.operator==="<"||t.operator==="<=";if(g){if(C){if(t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===C.major&&t.semver.minor===C.minor&&t.semver.patch===C.patch){C=false}}if(t.operator===">"||t.operator===">="){R=higherGT(g,t,p);if(R===t&&R!==g){return false}}else if(g.operator===">="&&!v(g.semver,String(t),p)){return false}}if($){if(T){if(t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===T.major&&t.semver.minor===T.minor&&t.semver.patch===T.patch){T=false}}if(t.operator==="<"||t.operator==="<="){P=lowerLT($,t,p);if(P===t&&P!==$){return false}}else if($.operator==="<="&&!v($.semver,String(t),p)){return false}}if(!t.operator&&($||g)&&O!==0){return false}}if(g&&A&&!$&&O!==0){return false}if($&&x&&!g&&O!==0){return false}if(C||T){return false}return true};const higherGT=(t,u,p)=>{if(!t){return u}const m=b(t.semver,u.semver,p);return m>0?t:m<0?u:u.operator===">"&&t.operator===">="?u:t};const lowerLT=(t,u,p)=>{if(!t){return u}const m=b(t.semver,u.semver,p);return m<0?t:m>0?u:u.operator==="<"&&t.operator==="<="?u:t};t.exports=subset},4549:(t,u,p)=>{"use strict";const m=p(6629);const toComparators=(t,u)=>new m(t,u).set.map((t=>t.map((t=>t.value)).join(" ").trim().split(" ")));t.exports=toComparators},236:(t,u,p)=>{"use strict";const m=p(6629);const validRange=(t,u)=>{try{return new m(t,u).range||"*"}catch(t){return null}};t.exports=validRange},4881:(t,u,p)=>{"use strict";const m=p(1940);t.exports=(t="")=>{const u=t.match(m);if(!u){return null}const[p,g]=u[0].replace(/#! ?/,"").split(" ");const y=p.split("/").pop();if(y==="env"){return g}return g?`${y} ${g}`:y}},1940:t=>{"use strict";t.exports=/^#!(.*)/},9458:t=>{"use strict";const u="";const p=`${u}[`;const m="";const g={to(t,u){if(!u)return`${p}${t+1}G`;return`${p}${u+1};${t+1}H`},move(t,u){let m="";if(t<0)m+=`${p}${-t}D`;else if(t>0)m+=`${p}${t}C`;if(u<0)m+=`${p}${-u}A`;else if(u>0)m+=`${p}${u}B`;return m},up:(t=1)=>`${p}${t}A`,down:(t=1)=>`${p}${t}B`,forward:(t=1)=>`${p}${t}C`,backward:(t=1)=>`${p}${t}D`,nextLine:(t=1)=>`${p}E`.repeat(t),prevLine:(t=1)=>`${p}F`.repeat(t),left:`${p}G`,hide:`${p}?25l`,show:`${p}?25h`,save:`${u}7`,restore:`${u}8`};const y={up:(t=1)=>`${p}S`.repeat(t),down:(t=1)=>`${p}T`.repeat(t)};const v={screen:`${p}2J`,up:(t=1)=>`${p}1J`.repeat(t),down:(t=1)=>`${p}J`.repeat(t),line:`${p}2K`,lineEnd:`${p}K`,lineStart:`${p}1K`,lines(t){let u="";for(let p=0;p<t;p++)u+=this.line+(p<t-1?g.up():"");if(t)u+=g.left;return u}};t.exports={cursor:g,scroll:y,erase:v,beep:m}},3444:t=>{"use strict";var u=1;var p=2;function stripWithoutWhitespace(){return""}function stripWithWhitespace(t,u,p){return t.slice(u,p).replace(/\S/g," ")}t.exports=function(t,m){m=m||{};var g;var y;var v=false;var b=false;var w=0;var E="";var $=m.whitespace===false?stripWithoutWhitespace:stripWithWhitespace;for(var O=0;O<t.length;O++){g=t[O];y=t[O+1];if(!b&&g==='"'){var R=t[O-1]==="\\"&&t[O-2]!=="\\";if(!R){v=!v}}if(v){continue}if(!b&&g+y==="//"){E+=t.slice(w,O);w=O;b=u;O++}else if(b===u&&g+y==="\r\n"){O++;b=false;E+=$(t,w,O);w=O;continue}else if(b===u&&g==="\n"){b=false;E+=$(t,w,O);w=O}else if(!b&&g+y==="/*"){E+=t.slice(w,O);w=O;b=p;O++;continue}else if(b===p&&g+y==="*/"){O++;b=false;E+=$(t,w,O+1);w=O+1;continue}}return E+(b?$(t.substr(w)):t.substr(w))}},743:(t,u,p)=>{"use strict";
67
67
  /*!
68
68
  * to-regex-range <https://github.com/micromatch/to-regex-range>
69
69
  *
70
70
  * Copyright (c) 2015-present, Jon Schlinkert.
71
71
  * Released under the MIT License.
72
- */const o=i(952);const toRegexRange=(t,r,i)=>{if(o(t)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(r===void 0||t===r){return String(t)}if(o(r)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let a={relaxZeros:true,...i};if(typeof a.strictZeros==="boolean"){a.relaxZeros=a.strictZeros===false}let c=String(a.relaxZeros);let l=String(a.shorthand);let u=String(a.capture);let h=String(a.wrap);let d=t+":"+r+"="+c+l+u+h;if(toRegexRange.cache.hasOwnProperty(d)){return toRegexRange.cache[d].result}let p=Math.min(t,r);let m=Math.max(t,r);if(Math.abs(p-m)===1){let i=t+"|"+r;if(a.capture){return`(${i})`}if(a.wrap===false){return i}return`(?:${i})`}let g=hasPadding(t)||hasPadding(r);let y={min:t,max:r,a:p,b:m};let v=[];let b=[];if(g){y.isPadded=g;y.maxLen=String(y.max).length}if(p<0){let t=m<0?Math.abs(m):1;b=splitToPatterns(t,Math.abs(p),y,a);p=y.a=0}if(m>=0){v=splitToPatterns(p,m,y,a)}y.negatives=b;y.positives=v;y.result=collatePatterns(b,v,a);if(a.capture===true){y.result=`(${y.result})`}else if(a.wrap!==false&&v.length+b.length>1){y.result=`(?:${y.result})`}toRegexRange.cache[d]=y;return y.result};function collatePatterns(t,r,i){let o=filterPatterns(t,r,"-",false,i)||[];let a=filterPatterns(r,t,"",false,i)||[];let c=filterPatterns(t,r,"-?",true,i)||[];let l=o.concat(c).concat(a);return l.join("|")}function splitToRanges(t,r){let i=1;let o=1;let a=countNines(t,i);let c=new Set([r]);while(t<=a&&a<=r){c.add(a);i+=1;a=countNines(t,i)}a=countZeros(r+1,o)-1;while(t<a&&a<=r){c.add(a);o+=1;a=countZeros(r+1,o)-1}c=[...c];c.sort(compare);return c}function rangeToPattern(t,r,i){if(t===r){return{pattern:t,count:[],digits:0}}let o=zip(t,r);let a=o.length;let c="";let l=0;for(let t=0;t<a;t++){let[r,a]=o[t];if(r===a){c+=r}else if(r!=="0"||a!=="9"){c+=toCharacterClass(r,a,i)}else{l++}}if(l){c+=i.shorthand===true?"\\d":"[0-9]"}return{pattern:c,count:[l],digits:a}}function splitToPatterns(t,r,i,o){let a=splitToRanges(t,r);let c=[];let l=t;let u;for(let t=0;t<a.length;t++){let r=a[t];let h=rangeToPattern(String(l),String(r),o);let d="";if(!i.isPadded&&u&&u.pattern===h.pattern){if(u.count.length>1){u.count.pop()}u.count.push(h.count[0]);u.string=u.pattern+toQuantifier(u.count);l=r+1;continue}if(i.isPadded){d=padZeros(r,i,o)}h.string=d+h.pattern+toQuantifier(h.count);c.push(h);l=r+1;u=h}return c}function filterPatterns(t,r,i,o,a){let c=[];for(let a of t){let{string:t}=a;if(!o&&!contains(r,"string",t)){c.push(i+t)}if(o&&contains(r,"string",t)){c.push(i+t)}}return c}function zip(t,r){let i=[];for(let o=0;o<t.length;o++)i.push([t[o],r[o]]);return i}function compare(t,r){return t>r?1:r>t?-1:0}function contains(t,r,i){return t.some((t=>t[r]===i))}function countNines(t,r){return Number(String(t).slice(0,-r)+"9".repeat(r))}function countZeros(t,r){return t-t%Math.pow(10,r)}function toQuantifier(t){let[r=0,i=""]=t;if(i||r>1){return`{${r+(i?","+i:"")}}`}return""}function toCharacterClass(t,r,i){return`[${t}${r-t===1?"":"-"}${r}]`}function hasPadding(t){return/^-?(0+)\d/.test(t)}function padZeros(t,r,i){if(!r.isPadded){return t}let o=Math.abs(r.maxLen-String(t).length);let a=i.relaxZeros!==false;switch(o){case 0:return"";case 1:return a?"0?":"0";case 2:return a?"0{0,2}":"00";default:{return a?`0{0,${o}}`:`0{${o}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};t.exports=toRegexRange},5059:(t,r,i)=>{const{URL:o}=i(7016);const{join:a}=i(6928);const c=i(7515);const{promisify:l}=i(9023);const{tmpdir:u}=i(857);const h=i(3805);const d=l(c.writeFile);const p=l(c.mkdir);const m=l(c.readFile);const compareVersions=(t,r)=>t.localeCompare(r,"en-US",{numeric:true});const encode=t=>encodeURIComponent(t).replace(/^%40/,"@");const getFile=async(t,r)=>{const i=u();const o=a(i,"update-check");if(!c.existsSync(o)){await p(o)}let l=`${t.name}-${r}.json`;if(t.scope){l=`${t.scope}-${l}`}return a(o,l)};const evaluateCache=async(t,r,i)=>{if(c.existsSync(t)){const o=await m(t,"utf8");const{lastUpdate:a,latest:c}=JSON.parse(o);const l=a+i;if(l>r){return{shouldCheck:false,latest:c}}}return{shouldCheck:true,latest:null}};const updateCache=async(t,r,i)=>{const o=JSON.stringify({latest:r,lastUpdate:i});await d(t,o,"utf8")};const loadPackage=(t,r)=>new Promise(((o,a)=>{const c={host:t.hostname,path:t.pathname,port:t.port,headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},timeout:2e3};if(r){c.headers.authorization=`${r.type} ${r.token}`}const{get:l}=i(t.protocol==="https:"?5692:8611);l(c,(t=>{const{statusCode:r}=t;if(r!==200){const i=new Error(`Request failed with code ${r}`);i.code=r;a(i);t.resume();return}let i="";t.setEncoding("utf8");t.on("data",(t=>{i+=t}));t.on("end",(()=>{try{const t=JSON.parse(i);o(t)}catch(t){a(t)}}))})).on("error",a).on("timeout",a)}));const getMostRecent=async({full:t,scope:r},a)=>{const c=h(r);const l=new o(t,c);let u=null;try{u=await loadPackage(l)}catch(t){if(t.code&&String(t.code).startsWith(4)){const t=i(4133);const r=t(c,{recursive:true});u=await loadPackage(l,r)}else{throw t}}const d=u["dist-tags"][a];if(!d){throw new Error(`Distribution tag ${a} is not available`)}return d};const g={interval:36e5,distTag:"latest"};const getDetails=t=>{const r={full:encode(t)};if(t.includes("/")){const i=t.split("/");r.scope=i[0];r.name=i[1]}else{r.scope=null;r.name=t}return r};t.exports=async(t,r)=>{if(typeof t!=="object"){throw new Error("The first parameter should be your package.json file content")}const i=getDetails(t.name);const o=Date.now();const{distTag:a,interval:c}=Object.assign({},g,r);const l=await getFile(i,a);let u=null;let h=true;({shouldCheck:h,latest:u}=await evaluateCache(l,o,c));if(h){u=await getMostRecent(i,a);await updateCache(l,u,o)}const d=compareVersions(t.version,u);if(d===-1){return{latest:u,fromCache:!h}}return null}},8904:(t,r,i)=>{"use strict";const o=i(6737);var a=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");var c=["node_modules","favicon.ico"];function validate(t){var r=[];var i=[];if(t===null){i.push("name cannot be null");return done(r,i)}if(t===undefined){i.push("name cannot be undefined");return done(r,i)}if(typeof t!=="string"){i.push("name must be a string");return done(r,i)}if(!t.length){i.push("name length must be greater than zero")}if(t.startsWith(".")){i.push("name cannot start with a period")}if(t.startsWith("-")){i.push("name cannot start with a hyphen")}if(t.match(/^_/)){i.push("name cannot start with an underscore")}if(t.trim()!==t){i.push("name cannot contain leading or trailing spaces")}c.forEach((function(r){if(t.toLowerCase()===r){i.push(r+" is not a valid package name")}}));if(o.includes(t.toLowerCase())){r.push(t+" is a core module name")}if(t.length>214){r.push("name can no longer contain more than 214 characters")}if(t.toLowerCase()!==t){r.push("name can no longer contain capital letters")}if(/[~'!()*]/.test(t.split("/").slice(-1)[0])){r.push('name can no longer contain special characters ("~\'!()*")')}if(encodeURIComponent(t)!==t){var l=t.match(a);if(l){var u=l[1];var h=l[2];if(h.startsWith(".")){i.push("name cannot start with a period")}if(encodeURIComponent(u)===u&&encodeURIComponent(h)===h){return done(r,i)}}i.push("name can only contain URL-friendly characters")}return done(r,i)}var done=function(t,r){var i={validForNewPackages:r.length===0&&t.length===0,validForOldPackages:r.length===0,warnings:t,errors:r};if(!i.warnings.length){delete i.warnings}if(!i.errors.length){delete i.errors}return i};t.exports=validate},1192:(t,r,i)=>{const o=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const a=i(6928);const c=o?";":":";const l=i(7105);const getNotFoundError=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"});const getPathInfo=(t,r)=>{const i=r.colon||c;const a=t.match(/\//)||o&&t.match(/\\/)?[""]:[...o?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(i)];const l=o?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const u=o?l.split(i):[""];if(o){if(t.indexOf(".")!==-1&&u[0]!=="")u.unshift("")}return{pathEnv:a,pathExt:u,pathExtExe:l}};const which=(t,r,i)=>{if(typeof r==="function"){i=r;r={}}if(!r)r={};const{pathEnv:o,pathExt:c,pathExtExe:u}=getPathInfo(t,r);const h=[];const step=i=>new Promise(((c,l)=>{if(i===o.length)return r.all&&h.length?c(h):l(getNotFoundError(t));const u=o[i];const d=/^".*"$/.test(u)?u.slice(1,-1):u;const p=a.join(d,t);const m=!d&&/^\.[\\\/]/.test(t)?t.slice(0,2)+p:p;c(subStep(m,i,0))}));const subStep=(t,i,o)=>new Promise(((a,d)=>{if(o===c.length)return a(step(i+1));const p=c[o];l(t+p,{pathExt:u},((c,l)=>{if(!c&&l){if(r.all)h.push(t+p);else return a(t+p)}return a(subStep(t,i,o+1))}))}));return i?step(0).then((t=>i(null,t)),i):step(0)};const whichSync=(t,r)=>{r=r||{};const{pathEnv:i,pathExt:o,pathExtExe:c}=getPathInfo(t,r);const u=[];for(let h=0;h<i.length;h++){const d=i[h];const p=/^".*"$/.test(d)?d.slice(1,-1):d;const m=a.join(p,t);const g=!p&&/^\.[\\\/]/.test(t)?t.slice(0,2)+m:m;for(let t=0;t<o.length;t++){const i=g+o[t];try{const t=l.sync(i,{pathExt:c});if(t){if(r.all)u.push(i);else return i}}catch(t){}}}if(r.all&&u.length)return u;if(r.nothrow)return null;throw getNotFoundError(t)};t.exports=which;which.sync=whichSync},181:t=>{"use strict";t.exports=require("buffer")},5317:t=>{"use strict";t.exports=require("child_process")},4434:t=>{"use strict";t.exports=require("events")},7515:t=>{"use strict";t.exports=require("fs")},8611:t=>{"use strict";t.exports=require("http")},5692:t=>{"use strict";t.exports=require("https")},1421:t=>{"use strict";t.exports=require("node:child_process")},8474:t=>{"use strict";t.exports=require("node:events")},3024:t=>{"use strict";t.exports=require("node:fs")},6760:t=>{"use strict";t.exports=require("node:path")},1708:t=>{"use strict";t.exports=require("node:process")},857:t=>{"use strict";t.exports=require("os")},6928:t=>{"use strict";t.exports=require("path")},3785:t=>{"use strict";t.exports=require("readline")},2203:t=>{"use strict";t.exports=require("stream")},7016:t=>{"use strict";t.exports=require("url")},9023:t=>{"use strict";t.exports=require("util")},7867:(t,r,i)=>{"use strict";const o=i(4839);const a=process.env;Object.defineProperty(r,"_vendors",{value:o.map((function(t){return t.constant}))});r.name=null;r.isPR=null;r.id=null;o.forEach((function(t){const i=Array.isArray(t.env)?t.env:[t.env];const o=i.every((function(t){return checkEnv(t)}));r[t.constant]=o;if(!o){return}r.name=t.name;r.isPR=checkPR(t);r.id=t.constant}));r.isCI=!!(a.CI!=="false"&&(a.BUILD_ID||a.BUILD_NUMBER||a.CI||a.CI_APP_ID||a.CI_BUILD_ID||a.CI_BUILD_NUMBER||a.CI_NAME||a.CONTINUOUS_INTEGRATION||a.RUN_ID||r.name||false));function checkEnv(t){if(typeof t==="string")return!!a[t];if("env"in t){return a[t.env]&&a[t.env].includes(t.includes)}if("any"in t){return t.any.some((function(t){return!!a[t]}))}return Object.keys(t).every((function(r){return a[r]===t[r]}))}function checkPR(t){switch(typeof t.pr){case"string":return!!a[t.pr];case"object":if("env"in t.pr){if("any"in t.pr){return t.pr.any.some((function(r){return a[t.pr.env]===r}))}else{return t.pr.env in a&&a[t.pr.env]!==t.pr.ne}}else if("any"in t.pr){return t.pr.any.some((function(t){return!!a[t]}))}else{return checkEnv(t.pr)}default:return null}}},206:(t,r,i)=>{const{Argument:o}=i(1455);const{Command:a}=i(4623);const{CommanderError:c,InvalidArgumentError:l}=i(9400);const{Help:u}=i(2559);const{Option:h}=i(1033);r.DM=new a;r.gu=t=>new a(t);r.Ww=(t,r)=>new h(t,r);r.er=(t,r)=>new o(t,r);r.uB=a;r.c$=h;r.ef=o;r._V=u;r.b7=c;r.Di=l;r.a2=l},1455:(t,r,i)=>{const{InvalidArgumentError:o}=i(9400);class Argument{constructor(t,r){this.description=r||"";this.variadic=false;this.parseArg=undefined;this.defaultValue=undefined;this.defaultValueDescription=undefined;this.argChoices=undefined;switch(t[0]){case"<":this.required=true;this._name=t.slice(1,-1);break;case"[":this.required=false;this._name=t.slice(1,-1);break;default:this.required=true;this._name=t;break}if(this._name.endsWith("...")){this.variadic=true;this._name=this._name.slice(0,-3)}}name(){return this._name}_collectValue(t,r){if(r===this.defaultValue||!Array.isArray(r)){return[t]}r.push(t);return r}default(t,r){this.defaultValue=t;this.defaultValueDescription=r;return this}argParser(t){this.parseArg=t;return this}choices(t){this.argChoices=t.slice();this.parseArg=(t,r)=>{if(!this.argChoices.includes(t)){throw new o(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._collectValue(t,r)}return t};return this}argRequired(){this.required=true;return this}argOptional(){this.required=false;return this}}function humanReadableArgName(t){const r=t.name()+(t.variadic===true?"...":"");return t.required?"<"+r+">":"["+r+"]"}r.Argument=Argument;r.humanReadableArgName=humanReadableArgName},4623:(t,r,i)=>{const o=i(8474).EventEmitter;const a=i(1421);const c=i(6760);const l=i(3024);const u=i(1708);const{Argument:h,humanReadableArgName:d}=i(1455);const{CommanderError:p}=i(9400);const{Help:m,stripColor:g}=i(2559);const{Option:y,DualOptions:v}=i(1033);const{suggestSimilar:b}=i(3683);class Command extends o{constructor(t){super();this.commands=[];this.options=[];this.parent=null;this._allowUnknownOption=false;this._allowExcessArguments=false;this.registeredArguments=[];this._args=this.registeredArguments;this.args=[];this.rawArgs=[];this.processedArgs=[];this._scriptPath=null;this._name=t||"";this._optionValues={};this._optionValueSources={};this._storeOptionsAsProperties=false;this._actionHandler=null;this._executableHandler=false;this._executableFile=null;this._executableDir=null;this._defaultCommandName=null;this._exitCallback=null;this._aliases=[];this._combineFlagAndOptionalValue=true;this._description="";this._summary="";this._argsDescription=undefined;this._enablePositionalOptions=false;this._passThroughOptions=false;this._lifeCycleHooks={};this._showHelpAfterError=false;this._showSuggestionAfterError=true;this._savedState=null;this._outputConfiguration={writeOut:t=>u.stdout.write(t),writeErr:t=>u.stderr.write(t),outputError:(t,r)=>r(t),getOutHelpWidth:()=>u.stdout.isTTY?u.stdout.columns:undefined,getErrHelpWidth:()=>u.stderr.isTTY?u.stderr.columns:undefined,getOutHasColors:()=>useColor()??(u.stdout.isTTY&&u.stdout.hasColors?.()),getErrHasColors:()=>useColor()??(u.stderr.isTTY&&u.stderr.hasColors?.()),stripColor:t=>g(t)};this._hidden=false;this._helpOption=undefined;this._addImplicitHelpCommand=undefined;this._helpCommand=undefined;this._helpConfiguration={};this._helpGroupHeading=undefined;this._defaultCommandGroup=undefined;this._defaultOptionGroup=undefined}copyInheritedSettings(t){this._outputConfiguration=t._outputConfiguration;this._helpOption=t._helpOption;this._helpCommand=t._helpCommand;this._helpConfiguration=t._helpConfiguration;this._exitCallback=t._exitCallback;this._storeOptionsAsProperties=t._storeOptionsAsProperties;this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue;this._allowExcessArguments=t._allowExcessArguments;this._enablePositionalOptions=t._enablePositionalOptions;this._showHelpAfterError=t._showHelpAfterError;this._showSuggestionAfterError=t._showSuggestionAfterError;return this}_getCommandAndAncestors(){const t=[];for(let r=this;r;r=r.parent){t.push(r)}return t}command(t,r,i){let o=r;let a=i;if(typeof o==="object"&&o!==null){a=o;o=null}a=a||{};const[,c,l]=t.match(/([^ ]+) *(.*)/);const u=this.createCommand(c);if(o){u.description(o);u._executableHandler=true}if(a.isDefault)this._defaultCommandName=u._name;u._hidden=!!(a.noHelp||a.hidden);u._executableFile=a.executableFile||null;if(l)u.arguments(l);this._registerCommand(u);u.parent=this;u.copyInheritedSettings(this);if(o)return this;return u}createCommand(t){return new Command(t)}createHelp(){return Object.assign(new m,this.configureHelp())}configureHelp(t){if(t===undefined)return this._helpConfiguration;this._helpConfiguration=t;return this}configureOutput(t){if(t===undefined)return this._outputConfiguration;this._outputConfiguration={...this._outputConfiguration,...t};return this}showHelpAfterError(t=true){if(typeof t!=="string")t=!!t;this._showHelpAfterError=t;return this}showSuggestionAfterError(t=true){this._showSuggestionAfterError=!!t;return this}addCommand(t,r){if(!t._name){throw new Error(`Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()`)}r=r||{};if(r.isDefault)this._defaultCommandName=t._name;if(r.noHelp||r.hidden)t._hidden=true;this._registerCommand(t);t.parent=this;t._checkForBrokenPassThrough();return this}createArgument(t,r){return new h(t,r)}argument(t,r,i,o){const a=this.createArgument(t,r);if(typeof i==="function"){a.default(o).argParser(i)}else{a.default(i)}this.addArgument(a);return this}arguments(t){t.trim().split(/ +/).forEach((t=>{this.argument(t)}));return this}addArgument(t){const r=this.registeredArguments.slice(-1)[0];if(r?.variadic){throw new Error(`only the last argument can be variadic '${r.name()}'`)}if(t.required&&t.defaultValue!==undefined&&t.parseArg===undefined){throw new Error(`a default value for a required argument is never used: '${t.name()}'`)}this.registeredArguments.push(t);return this}helpCommand(t,r){if(typeof t==="boolean"){this._addImplicitHelpCommand=t;if(t&&this._defaultCommandGroup){this._initCommandGroup(this._getHelpCommand())}return this}const i=t??"help [command]";const[,o,a]=i.match(/([^ ]+) *(.*)/);const c=r??"display help for command";const l=this.createCommand(o);l.helpOption(false);if(a)l.arguments(a);if(c)l.description(c);this._addImplicitHelpCommand=true;this._helpCommand=l;if(t||r)this._initCommandGroup(l);return this}addHelpCommand(t,r){if(typeof t!=="object"){this.helpCommand(t,r);return this}this._addImplicitHelpCommand=true;this._helpCommand=t;this._initCommandGroup(t);return this}_getHelpCommand(){const t=this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"));if(t){if(this._helpCommand===undefined){this.helpCommand(undefined,undefined)}return this._helpCommand}return null}hook(t,r){const i=["preSubcommand","preAction","postAction"];if(!i.includes(t)){throw new Error(`Unexpected value for event passed to hook : '${t}'.\nExpecting one of '${i.join("', '")}'`)}if(this._lifeCycleHooks[t]){this._lifeCycleHooks[t].push(r)}else{this._lifeCycleHooks[t]=[r]}return this}exitOverride(t){if(t){this._exitCallback=t}else{this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync"){throw t}else{}}}return this}_exit(t,r,i){if(this._exitCallback){this._exitCallback(new p(t,r,i))}u.exit(t)}action(t){const listener=r=>{const i=this.registeredArguments.length;const o=r.slice(0,i);if(this._storeOptionsAsProperties){o[i]=this}else{o[i]=this.opts()}o.push(this);return t.apply(this,o)};this._actionHandler=listener;return this}createOption(t,r){return new y(t,r)}_callParseArg(t,r,i,o){try{return t.parseArg(r,i)}catch(t){if(t.code==="commander.invalidArgument"){const r=`${o} ${t.message}`;this.error(r,{exitCode:t.exitCode,code:t.code})}throw t}}_registerOption(t){const r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){const i=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${i}'\n- already used by option '${r.flags}'`)}this._initOptionGroup(t);this.options.push(t)}_registerCommand(t){const knownBy=t=>[t.name()].concat(t.aliases());const r=knownBy(t).find((t=>this._findCommand(t)));if(r){const i=knownBy(this._findCommand(r)).join("|");const o=knownBy(t).join("|");throw new Error(`cannot add command '${o}' as already have command '${i}'`)}this._initCommandGroup(t);this.commands.push(t)}addOption(t){this._registerOption(t);const r=t.name();const i=t.attributeName();if(t.negate){const r=t.long.replace(/^--no-/,"--");if(!this._findOption(r)){this.setOptionValueWithSource(i,t.defaultValue===undefined?true:t.defaultValue,"default")}}else if(t.defaultValue!==undefined){this.setOptionValueWithSource(i,t.defaultValue,"default")}const handleOptionValue=(r,o,a)=>{if(r==null&&t.presetArg!==undefined){r=t.presetArg}const c=this.getOptionValue(i);if(r!==null&&t.parseArg){r=this._callParseArg(t,r,c,o)}else if(r!==null&&t.variadic){r=t._collectValue(r,c)}if(r==null){if(t.negate){r=false}else if(t.isBoolean()||t.optional){r=true}else{r=""}}this.setOptionValueWithSource(i,r,a)};this.on("option:"+r,(r=>{const i=`error: option '${t.flags}' argument '${r}' is invalid.`;handleOptionValue(r,i,"cli")}));if(t.envVar){this.on("optionEnv:"+r,(r=>{const i=`error: option '${t.flags}' value '${r}' from env '${t.envVar}' is invalid.`;handleOptionValue(r,i,"env")}))}return this}_optionEx(t,r,i,o,a){if(typeof r==="object"&&r instanceof y){throw new Error("To add an Option object use addOption() instead of option() or requiredOption()")}const c=this.createOption(r,i);c.makeOptionMandatory(!!t.mandatory);if(typeof o==="function"){c.default(a).argParser(o)}else if(o instanceof RegExp){const t=o;o=(r,i)=>{const o=t.exec(r);return o?o[0]:i};c.default(a).argParser(o)}else{c.default(o)}return this.addOption(c)}option(t,r,i,o){return this._optionEx({},t,r,i,o)}requiredOption(t,r,i,o){return this._optionEx({mandatory:true},t,r,i,o)}combineFlagAndOptionalValue(t=true){this._combineFlagAndOptionalValue=!!t;return this}allowUnknownOption(t=true){this._allowUnknownOption=!!t;return this}allowExcessArguments(t=true){this._allowExcessArguments=!!t;return this}enablePositionalOptions(t=true){this._enablePositionalOptions=!!t;return this}passThroughOptions(t=true){this._passThroughOptions=!!t;this._checkForBrokenPassThrough();return this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions){throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}}storeOptionsAsProperties(t=true){if(this.options.length){throw new Error("call .storeOptionsAsProperties() before adding options")}if(Object.keys(this._optionValues).length){throw new Error("call .storeOptionsAsProperties() before setting option values")}this._storeOptionsAsProperties=!!t;return this}getOptionValue(t){if(this._storeOptionsAsProperties){return this[t]}return this._optionValues[t]}setOptionValue(t,r){return this.setOptionValueWithSource(t,r,undefined)}setOptionValueWithSource(t,r,i){if(this._storeOptionsAsProperties){this[t]=r}else{this._optionValues[t]=r}this._optionValueSources[t]=i;return this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;this._getCommandAndAncestors().forEach((i=>{if(i.getOptionValueSource(t)!==undefined){r=i.getOptionValueSource(t)}}));return r}_prepareUserArgs(t,r){if(t!==undefined&&!Array.isArray(t)){throw new Error("first parameter to parse must be array or undefined")}r=r||{};if(t===undefined&&r.from===undefined){if(u.versions?.electron){r.from="electron"}const t=u.execArgv??[];if(t.includes("-e")||t.includes("--eval")||t.includes("-p")||t.includes("--print")){r.from="eval"}}if(t===undefined){t=u.argv}this.rawArgs=t.slice();let i;switch(r.from){case undefined:case"node":this._scriptPath=t[1];i=t.slice(2);break;case"electron":if(u.defaultApp){this._scriptPath=t[1];i=t.slice(2)}else{i=t.slice(1)}break;case"user":i=t.slice(0);break;case"eval":i=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);this._name=this._name||"program";return i}parse(t,r){this._prepareForParse();const i=this._prepareUserArgs(t,r);this._parseCommand([],i);return this}async parseAsync(t,r){this._prepareForParse();const i=this._prepareUserArgs(t,r);await this._parseCommand([],i);return this}_prepareForParse(){if(this._savedState===null){this.saveStateBeforeParse()}else{this.restoreStateBeforeParse()}}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.\n- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name;this._scriptPath=null;this.rawArgs=[];this._optionValues={...this._savedState._optionValues};this._optionValueSources={...this._savedState._optionValueSources};this.args=[];this.processedArgs=[]}_checkForMissingExecutable(t,r,i){if(l.existsSync(t))return;const o=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory";const a=`'${t}' does not exist\n - if '${i}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${o}`;throw new Error(a)}_executeSubCommand(t,r){r=r.slice();let i=false;const o=[".js",".ts",".tsx",".mjs",".cjs"];function findFile(t,r){const i=c.resolve(t,r);if(l.existsSync(i))return i;if(o.includes(c.extname(r)))return undefined;const a=o.find((t=>l.existsSync(`${i}${t}`)));if(a)return`${i}${a}`;return undefined}this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();let h=t._executableFile||`${this._name}-${t._name}`;let d=this._executableDir||"";if(this._scriptPath){let t;try{t=l.realpathSync(this._scriptPath)}catch{t=this._scriptPath}d=c.resolve(c.dirname(t),d)}if(d){let r=findFile(d,h);if(!r&&!t._executableFile&&this._scriptPath){const i=c.basename(this._scriptPath,c.extname(this._scriptPath));if(i!==this._name){r=findFile(d,`${i}-${t._name}`)}}h=r||h}i=o.includes(c.extname(h));let m;if(u.platform!=="win32"){if(i){r.unshift(h);r=incrementNodeInspectorPort(u.execArgv).concat(r);m=a.spawn(u.argv[0],r,{stdio:"inherit"})}else{m=a.spawn(h,r,{stdio:"inherit"})}}else{this._checkForMissingExecutable(h,d,t._name);r.unshift(h);r=incrementNodeInspectorPort(u.execArgv).concat(r);m=a.spawn(u.execPath,r,{stdio:"inherit"})}if(!m.killed){const t=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];t.forEach((t=>{u.on(t,(()=>{if(m.killed===false&&m.exitCode===null){m.kill(t)}}))}))}const g=this._exitCallback;m.on("close",(t=>{t=t??1;if(!g){u.exit(t)}else{g(new p(t,"commander.executeSubCommandAsync","(close)"))}}));m.on("error",(r=>{if(r.code==="ENOENT"){this._checkForMissingExecutable(h,d,t._name)}else if(r.code==="EACCES"){throw new Error(`'${h}' not executable`)}if(!g){u.exit(1)}else{const t=new p(1,"commander.executeSubCommandAsync","(error)");t.nestedError=r;g(t)}}));this.runningCommand=m}_dispatchSubcommand(t,r,i){const o=this._findCommand(t);if(!o)this.help({error:true});o._prepareForParse();let a;a=this._chainOrCallSubCommandHook(a,o,"preSubcommand");a=this._chainOrCall(a,(()=>{if(o._executableHandler){this._executeSubCommand(o,r.concat(i))}else{return o._parseCommand(r,i)}}));return a}_dispatchHelpCommand(t){if(!t){this.help()}const r=this._findCommand(t);if(r&&!r._executableHandler){r.help()}return this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach(((t,r)=>{if(t.required&&this.args[r]==null){this.missingArgument(t.name())}}));if(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic){return}if(this.args.length>this.registeredArguments.length){this._excessArguments(this.args)}}_processArguments(){const myParseArg=(t,r,i)=>{let o=r;if(r!==null&&t.parseArg){const a=`error: command-argument value '${r}' is invalid for argument '${t.name()}'.`;o=this._callParseArg(t,r,i,a)}return o};this._checkNumberOfArguments();const t=[];this.registeredArguments.forEach(((r,i)=>{let o=r.defaultValue;if(r.variadic){if(i<this.args.length){o=this.args.slice(i);if(r.parseArg){o=o.reduce(((t,i)=>myParseArg(r,i,t)),r.defaultValue)}}else if(o===undefined){o=[]}}else if(i<this.args.length){o=this.args[i];if(r.parseArg){o=myParseArg(r,o,r.defaultValue)}}t[i]=o}));this.processedArgs=t}_chainOrCall(t,r){if(t?.then&&typeof t.then==="function"){return t.then((()=>r()))}return r()}_chainOrCallHooks(t,r){let i=t;const o=[];this._getCommandAndAncestors().reverse().filter((t=>t._lifeCycleHooks[r]!==undefined)).forEach((t=>{t._lifeCycleHooks[r].forEach((r=>{o.push({hookedCommand:t,callback:r})}))}));if(r==="postAction"){o.reverse()}o.forEach((t=>{i=this._chainOrCall(i,(()=>t.callback(t.hookedCommand,this)))}));return i}_chainOrCallSubCommandHook(t,r,i){let o=t;if(this._lifeCycleHooks[i]!==undefined){this._lifeCycleHooks[i].forEach((t=>{o=this._chainOrCall(o,(()=>t(this,r)))}))}return o}_parseCommand(t,r){const i=this.parseOptions(r);this._parseOptionsEnv();this._parseOptionsImplied();t=t.concat(i.operands);r=i.unknown;this.args=t.concat(r);if(t&&this._findCommand(t[0])){return this._dispatchSubcommand(t[0],t.slice(1),r)}if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name()){return this._dispatchHelpCommand(t[1])}if(this._defaultCommandName){this._outputHelpIfRequested(r);return this._dispatchSubcommand(this._defaultCommandName,t,r)}if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName){this.help({error:true})}this._outputHelpIfRequested(i.unknown);this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();const checkForUnknownOptions=()=>{if(i.unknown.length>0){this.unknownOption(i.unknown[0])}};const o=`command:${this.name()}`;if(this._actionHandler){checkForUnknownOptions();this._processArguments();let i;i=this._chainOrCallHooks(i,"preAction");i=this._chainOrCall(i,(()=>this._actionHandler(this.processedArgs)));if(this.parent){i=this._chainOrCall(i,(()=>{this.parent.emit(o,t,r)}))}i=this._chainOrCallHooks(i,"postAction");return i}if(this.parent?.listenerCount(o)){checkForUnknownOptions();this._processArguments();this.parent.emit(o,t,r)}else if(t.length){if(this._findCommand("*")){return this._dispatchSubcommand("*",t,r)}if(this.listenerCount("command:*")){this.emit("command:*",t,r)}else if(this.commands.length){this.unknownCommand()}else{checkForUnknownOptions();this._processArguments()}}else if(this.commands.length){checkForUnknownOptions();this.help({error:true})}else{checkForUnknownOptions();this._processArguments()}}_findCommand(t){if(!t)return undefined;return this.commands.find((r=>r._name===t||r._aliases.includes(t)))}_findOption(t){return this.options.find((r=>r.is(t)))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((t=>{t.options.forEach((r=>{if(r.mandatory&&t.getOptionValue(r.attributeName())===undefined){t.missingMandatoryOptionValue(r)}}))}))}_checkForConflictingLocalOptions(){const t=this.options.filter((t=>{const r=t.attributeName();if(this.getOptionValue(r)===undefined){return false}return this.getOptionValueSource(r)!=="default"}));const r=t.filter((t=>t.conflictsWith.length>0));r.forEach((r=>{const i=t.find((t=>r.conflictsWith.includes(t.attributeName())));if(i){this._conflictingOption(r,i)}}))}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((t=>{t._checkForConflictingLocalOptions()}))}parseOptions(t){const r=[];const i=[];let o=r;function maybeOption(t){return t.length>1&&t[0]==="-"}const negativeNumberArg=t=>{if(!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(t))return false;return!this._getCommandAndAncestors().some((t=>t.options.map((t=>t.short)).some((t=>/^-\d$/.test(t)))))};let a=null;let c=null;let l=0;while(l<t.length||c){const u=c??t[l++];c=null;if(u==="--"){if(o===i)o.push(u);o.push(...t.slice(l));break}if(a&&(!maybeOption(u)||negativeNumberArg(u))){this.emit(`option:${a.name()}`,u);continue}a=null;if(maybeOption(u)){const r=this._findOption(u);if(r){if(r.required){const i=t[l++];if(i===undefined)this.optionMissingArgument(r);this.emit(`option:${r.name()}`,i)}else if(r.optional){let i=null;if(l<t.length&&(!maybeOption(t[l])||negativeNumberArg(t[l]))){i=t[l++]}this.emit(`option:${r.name()}`,i)}else{this.emit(`option:${r.name()}`)}a=r.variadic?r:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){const t=this._findOption(`-${u[1]}`);if(t){if(t.required||t.optional&&this._combineFlagAndOptionalValue){this.emit(`option:${t.name()}`,u.slice(2))}else{this.emit(`option:${t.name()}`);c=`-${u.slice(2)}`}continue}}if(/^--[^=]+=/.test(u)){const t=u.indexOf("=");const r=this._findOption(u.slice(0,t));if(r&&(r.required||r.optional)){this.emit(`option:${r.name()}`,u.slice(t+1));continue}}if(o===r&&maybeOption(u)&&!(this.commands.length===0&&negativeNumberArg(u))){o=i}if((this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&i.length===0){if(this._findCommand(u)){r.push(u);i.push(...t.slice(l));break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){r.push(u,...t.slice(l));break}else if(this._defaultCommandName){i.push(u,...t.slice(l));break}}if(this._passThroughOptions){o.push(u,...t.slice(l));break}o.push(u)}return{operands:r,unknown:i}}opts(){if(this._storeOptionsAsProperties){const t={};const r=this.options.length;for(let i=0;i<r;i++){const r=this.options[i].attributeName();t[r]=r===this._versionOptionName?this._version:this[r]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(((t,r)=>Object.assign(t,r.opts())),{})}error(t,r){this._outputConfiguration.outputError(`${t}\n`,this._outputConfiguration.writeErr);if(typeof this._showHelpAfterError==="string"){this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`)}else if(this._showHelpAfterError){this._outputConfiguration.writeErr("\n");this.outputHelp({error:true})}const i=r||{};const o=i.exitCode||1;const a=i.code||"commander.error";this._exit(o,a,t)}_parseOptionsEnv(){this.options.forEach((t=>{if(t.envVar&&t.envVar in u.env){const r=t.attributeName();if(this.getOptionValue(r)===undefined||["default","config","env"].includes(this.getOptionValueSource(r))){if(t.required||t.optional){this.emit(`optionEnv:${t.name()}`,u.env[t.envVar])}else{this.emit(`optionEnv:${t.name()}`)}}}}))}_parseOptionsImplied(){const t=new v(this.options);const hasCustomOptionValue=t=>this.getOptionValue(t)!==undefined&&!["default","implied"].includes(this.getOptionValueSource(t));this.options.filter((r=>r.implied!==undefined&&hasCustomOptionValue(r.attributeName())&&t.valueFromOption(this.getOptionValue(r.attributeName()),r))).forEach((t=>{Object.keys(t.implied).filter((t=>!hasCustomOptionValue(t))).forEach((r=>{this.setOptionValueWithSource(r,t.implied[r],"implied")}))}))}missingArgument(t){const r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){const r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){const r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){const findBestOptionFromValue=t=>{const r=t.attributeName();const i=this.getOptionValue(r);const o=this.options.find((t=>t.negate&&r===t.attributeName()));const a=this.options.find((t=>!t.negate&&r===t.attributeName()));if(o&&(o.presetArg===undefined&&i===false||o.presetArg!==undefined&&i===o.presetArg)){return o}return a||t};const getErrorMessage=t=>{const r=findBestOptionFromValue(t);const i=r.attributeName();const o=this.getOptionValueSource(i);if(o==="env"){return`environment variable '${r.envVar}'`}return`option '${r.flags}'`};const i=`error: ${getErrorMessage(t)} cannot be used with ${getErrorMessage(r)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let i=[];let o=this;do{const t=o.createHelp().visibleOptions(o).filter((t=>t.long)).map((t=>t.long));i=i.concat(t);o=o.parent}while(o&&!o._enablePositionalOptions);r=b(t,i)}const i=`error: unknown option '${t}'${r}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;const r=this.registeredArguments.length;const i=r===1?"":"s";const o=this.parent?` for '${this.name()}'`:"";const a=`error: too many arguments${o}. Expected ${r} argument${i} but got ${t.length}.`;this.error(a,{code:"commander.excessArguments"})}unknownCommand(){const t=this.args[0];let r="";if(this._showSuggestionAfterError){const i=[];this.createHelp().visibleCommands(this).forEach((t=>{i.push(t.name());if(t.alias())i.push(t.alias())}));r=b(t,i)}const i=`error: unknown command '${t}'${r}`;this.error(i,{code:"commander.unknownCommand"})}version(t,r,i){if(t===undefined)return this._version;this._version=t;r=r||"-V, --version";i=i||"output the version number";const o=this.createOption(r,i);this._versionOptionName=o.attributeName();this._registerOption(o);this.on("option:"+o.name(),(()=>{this._outputConfiguration.writeOut(`${t}\n`);this._exit(0,"commander.version",t)}));return this}description(t,r){if(t===undefined&&r===undefined)return this._description;this._description=t;if(r){this._argsDescription=r}return this}summary(t){if(t===undefined)return this._summary;this._summary=t;return this}alias(t){if(t===undefined)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler){r=this.commands[this.commands.length-1]}if(t===r._name)throw new Error("Command alias can't be the same as its name");const i=this.parent?._findCommand(t);if(i){const r=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${r}'`)}r._aliases.push(t);return this}aliases(t){if(t===undefined)return this._aliases;t.forEach((t=>this.alias(t)));return this}usage(t){if(t===undefined){if(this._usage)return this._usage;const t=this.registeredArguments.map((t=>d(t)));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}this._usage=t;return this}name(t){if(t===undefined)return this._name;this._name=t;return this}helpGroup(t){if(t===undefined)return this._helpGroupHeading??"";this._helpGroupHeading=t;return this}commandsGroup(t){if(t===undefined)return this._defaultCommandGroup??"";this._defaultCommandGroup=t;return this}optionsGroup(t){if(t===undefined)return this._defaultOptionGroup??"";this._defaultOptionGroup=t;return this}_initOptionGroup(t){if(this._defaultOptionGroup&&!t.helpGroupHeading)t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){if(this._defaultCommandGroup&&!t.helpGroup())t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){this._name=c.basename(t,c.extname(t));return this}executableDir(t){if(t===undefined)return this._executableDir;this._executableDir=t;return this}helpInformation(t){const r=this.createHelp();const i=this._getOutputContext(t);r.prepareContext({error:i.error,helpWidth:i.helpWidth,outputHasColors:i.hasColors});const o=r.formatHelp(this,r);if(i.hasColors)return o;return this._outputConfiguration.stripColor(o)}_getOutputContext(t){t=t||{};const r=!!t.error;let i;let o;let a;if(r){i=t=>this._outputConfiguration.writeErr(t);o=this._outputConfiguration.getErrHasColors();a=this._outputConfiguration.getErrHelpWidth()}else{i=t=>this._outputConfiguration.writeOut(t);o=this._outputConfiguration.getOutHasColors();a=this._outputConfiguration.getOutHelpWidth()}const write=t=>{if(!o)t=this._outputConfiguration.stripColor(t);return i(t)};return{error:r,write:write,hasColors:o,helpWidth:a}}outputHelp(t){let r;if(typeof t==="function"){r=t;t=undefined}const i=this._getOutputContext(t);const o={error:i.error,write:i.write,command:this};this._getCommandAndAncestors().reverse().forEach((t=>t.emit("beforeAllHelp",o)));this.emit("beforeHelp",o);let a=this.helpInformation({error:i.error});if(r){a=r(a);if(typeof a!=="string"&&!Buffer.isBuffer(a)){throw new Error("outputHelp callback must return a string or a Buffer")}}i.write(a);if(this._getHelpOption()?.long){this.emit(this._getHelpOption().long)}this.emit("afterHelp",o);this._getCommandAndAncestors().forEach((t=>t.emit("afterAllHelp",o)))}helpOption(t,r){if(typeof t==="boolean"){if(t){if(this._helpOption===null)this._helpOption=undefined;if(this._defaultOptionGroup){this._initOptionGroup(this._getHelpOption())}}else{this._helpOption=null}return this}this._helpOption=this.createOption(t??"-h, --help",r??"display help for command");if(t||r)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===undefined){this.helpOption(undefined,undefined)}return this._helpOption}addHelpOption(t){this._helpOption=t;this._initOptionGroup(t);return this}help(t){this.outputHelp(t);let r=Number(u.exitCode??0);if(r===0&&t&&typeof t!=="function"&&t.error){r=1}this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){const i=["beforeAll","before","after","afterAll"];if(!i.includes(t)){throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${i.join("', '")}'`)}const o=`${t}Help`;this.on(o,(t=>{let i;if(typeof r==="function"){i=r({error:t.error,command:t.command})}else{i=r}if(i){t.write(`${i}\n`)}}));return this}_outputHelpIfRequested(t){const r=this._getHelpOption();const i=r&&t.find((t=>r.is(t)));if(i){this.outputHelp();this._exit(0,"commander.helpDisplayed","(outputHelp)")}}}function incrementNodeInspectorPort(t){return t.map((t=>{if(!t.startsWith("--inspect")){return t}let r;let i="127.0.0.1";let o="9229";let a;if((a=t.match(/^(--inspect(-brk)?)$/))!==null){r=a[1]}else if((a=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null){r=a[1];if(/^\d+$/.test(a[3])){o=a[3]}else{i=a[3]}}else if((a=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null){r=a[1];i=a[3];o=a[4]}if(r&&o!=="0"){return`${r}=${i}:${parseInt(o)+1}`}return t}))}function useColor(){if(u.env.NO_COLOR||u.env.FORCE_COLOR==="0"||u.env.FORCE_COLOR==="false")return false;if(u.env.FORCE_COLOR||u.env.CLICOLOR_FORCE!==undefined)return true;return undefined}r.Command=Command;r.useColor=useColor},9400:(t,r)=>{class CommanderError extends Error{constructor(t,r,i){super(i);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name;this.code=r;this.exitCode=t;this.nestedError=undefined}}class InvalidArgumentError extends CommanderError{constructor(t){super(1,"commander.invalidArgument",t);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name}}r.CommanderError=CommanderError;r.InvalidArgumentError=InvalidArgumentError},2559:(t,r,i)=>{const{humanReadableArgName:o}=i(1455);class Help{constructor(){this.helpWidth=undefined;this.minWidthToWrap=40;this.sortSubcommands=false;this.sortOptions=false;this.showGlobalOptions=false}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){const r=t.commands.filter((t=>!t._hidden));const i=t._getHelpCommand();if(i&&!i._hidden){r.push(i)}if(this.sortSubcommands){r.sort(((t,r)=>t.name().localeCompare(r.name())))}return r}compareOptions(t,r){const getSortKey=t=>t.short?t.short.replace(/^-/,""):t.long.replace(/^--/,"");return getSortKey(t).localeCompare(getSortKey(r))}visibleOptions(t){const r=t.options.filter((t=>!t.hidden));const i=t._getHelpOption();if(i&&!i.hidden){const o=i.short&&t._findOption(i.short);const a=i.long&&t._findOption(i.long);if(!o&&!a){r.push(i)}else if(i.long&&!a){r.push(t.createOption(i.long,i.description))}else if(i.short&&!o){r.push(t.createOption(i.short,i.description))}}if(this.sortOptions){r.sort(this.compareOptions)}return r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];const r=[];for(let i=t.parent;i;i=i.parent){const t=i.options.filter((t=>!t.hidden));r.push(...t)}if(this.sortOptions){r.sort(this.compareOptions)}return r}visibleArguments(t){if(t._argsDescription){t.registeredArguments.forEach((r=>{r.description=r.description||t._argsDescription[r.name()]||""}))}if(t.registeredArguments.find((t=>t.description))){return t.registeredArguments}return[]}subcommandTerm(t){const r=t.registeredArguments.map((t=>o(t))).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce(((t,i)=>Math.max(t,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(i))))),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce(((t,i)=>Math.max(t,this.displayWidth(r.styleOptionTerm(r.optionTerm(i))))),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce(((t,i)=>Math.max(t,this.displayWidth(r.styleOptionTerm(r.optionTerm(i))))),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce(((t,i)=>Math.max(t,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(i))))),0)}commandUsage(t){let r=t._name;if(t._aliases[0]){r=r+"|"+t._aliases[0]}let i="";for(let r=t.parent;r;r=r.parent){i=r.name()+" "+i}return i+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){const r=[];if(t.argChoices){r.push(`choices: ${t.argChoices.map((t=>JSON.stringify(t))).join(", ")}`)}if(t.defaultValue!==undefined){const i=t.required||t.optional||t.isBoolean()&&typeof t.defaultValue==="boolean";if(i){r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`)}}if(t.presetArg!==undefined&&t.optional){r.push(`preset: ${JSON.stringify(t.presetArg)}`)}if(t.envVar!==undefined){r.push(`env: ${t.envVar}`)}if(r.length>0){const i=`(${r.join(", ")})`;if(t.description){return`${t.description} ${i}`}return i}return t.description}argumentDescription(t){const r=[];if(t.argChoices){r.push(`choices: ${t.argChoices.map((t=>JSON.stringify(t))).join(", ")}`)}if(t.defaultValue!==undefined){r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`)}if(r.length>0){const i=`(${r.join(", ")})`;if(t.description){return`${t.description} ${i}`}return i}return t.description}formatItemList(t,r,i){if(r.length===0)return[];return[i.styleTitle(t),...r,""]}groupItems(t,r,i){const o=new Map;t.forEach((t=>{const r=i(t);if(!o.has(r))o.set(r,[])}));r.forEach((t=>{const r=i(t);if(!o.has(r)){o.set(r,[])}o.get(r).push(t)}));return o}formatHelp(t,r){const i=r.padWidth(t,r);const o=r.helpWidth??80;function callFormatItem(t,o){return r.formatItem(t,i,o,r)}let a=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""];const c=r.commandDescription(t);if(c.length>0){a=a.concat([r.boxWrap(r.styleCommandDescription(c),o),""])}const l=r.visibleArguments(t).map((t=>callFormatItem(r.styleArgumentTerm(r.argumentTerm(t)),r.styleArgumentDescription(r.argumentDescription(t)))));a=a.concat(this.formatItemList("Arguments:",l,r));const u=this.groupItems(t.options,r.visibleOptions(t),(t=>t.helpGroupHeading??"Options:"));u.forEach(((t,i)=>{const o=t.map((t=>callFormatItem(r.styleOptionTerm(r.optionTerm(t)),r.styleOptionDescription(r.optionDescription(t)))));a=a.concat(this.formatItemList(i,o,r))}));if(r.showGlobalOptions){const i=r.visibleGlobalOptions(t).map((t=>callFormatItem(r.styleOptionTerm(r.optionTerm(t)),r.styleOptionDescription(r.optionDescription(t)))));a=a.concat(this.formatItemList("Global Options:",i,r))}const h=this.groupItems(t.commands,r.visibleCommands(t),(t=>t.helpGroup()||"Commands:"));h.forEach(((t,i)=>{const o=t.map((t=>callFormatItem(r.styleSubcommandTerm(r.subcommandTerm(t)),r.styleSubcommandDescription(r.subcommandDescription(t)))));a=a.concat(this.formatItemList(i,o,r))}));return a.join("\n")}displayWidth(t){return stripColor(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map((t=>{if(t==="[options]")return this.styleOptionText(t);if(t==="[command]")return this.styleSubcommandText(t);if(t[0]==="["||t[0]==="<")return this.styleArgumentText(t);return this.styleCommandText(t)})).join(" ")}styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}styleArgumentDescription(t){return this.styleDescriptionText(t)}styleDescriptionText(t){return t}styleOptionTerm(t){return this.styleOptionText(t)}styleSubcommandTerm(t){return t.split(" ").map((t=>{if(t==="[options]")return this.styleOptionText(t);if(t[0]==="["||t[0]==="<")return this.styleArgumentText(t);return this.styleSubcommandText(t)})).join(" ")}styleArgumentTerm(t){return this.styleArgumentText(t)}styleOptionText(t){return t}styleArgumentText(t){return t}styleSubcommandText(t){return t}styleCommandText(t){return t}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,r,i,o){const a=2;const c=" ".repeat(a);if(!i)return c+t;const l=t.padEnd(r+t.length-o.displayWidth(t));const u=2;const h=this.helpWidth??80;const d=h-r-u-a;let p;if(d<this.minWidthToWrap||o.preformatted(i)){p=i}else{const t=o.boxWrap(i,d);p=t.replace(/\n/g,"\n"+" ".repeat(r+u))}return c+l+" ".repeat(u)+p.replace(/\n/g,`\n${c}`)}boxWrap(t,r){if(r<this.minWidthToWrap)return t;const i=t.split(/\r\n|\n/);const o=/[\s]*[^\s]+/g;const a=[];i.forEach((t=>{const i=t.match(o);if(i===null){a.push("");return}let c=[i.shift()];let l=this.displayWidth(c[0]);i.forEach((t=>{const i=this.displayWidth(t);if(l+i<=r){c.push(t);l+=i;return}a.push(c.join(""));const o=t.trimStart();c=[o];l=this.displayWidth(o)}));a.push(c.join(""))}));return a.join("\n")}}function stripColor(t){const r=/\x1b\[\d*(;\d*)*m/g;return t.replace(r,"")}r.Help=Help;r.stripColor=stripColor},1033:(t,r,i)=>{const{InvalidArgumentError:o}=i(9400);class Option{constructor(t,r){this.flags=t;this.description=r||"";this.required=t.includes("<");this.optional=t.includes("[");this.variadic=/\w\.\.\.[>\]]$/.test(t);this.mandatory=false;const i=splitOptionFlags(t);this.short=i.shortFlag;this.long=i.longFlag;this.negate=false;if(this.long){this.negate=this.long.startsWith("--no-")}this.defaultValue=undefined;this.defaultValueDescription=undefined;this.presetArg=undefined;this.envVar=undefined;this.parseArg=undefined;this.hidden=false;this.argChoices=undefined;this.conflictsWith=[];this.implied=undefined;this.helpGroupHeading=undefined}default(t,r){this.defaultValue=t;this.defaultValueDescription=r;return this}preset(t){this.presetArg=t;return this}conflicts(t){this.conflictsWith=this.conflictsWith.concat(t);return this}implies(t){let r=t;if(typeof t==="string"){r={[t]:true}}this.implied=Object.assign(this.implied||{},r);return this}env(t){this.envVar=t;return this}argParser(t){this.parseArg=t;return this}makeOptionMandatory(t=true){this.mandatory=!!t;return this}hideHelp(t=true){this.hidden=!!t;return this}_collectValue(t,r){if(r===this.defaultValue||!Array.isArray(r)){return[t]}r.push(t);return r}choices(t){this.argChoices=t.slice();this.parseArg=(t,r)=>{if(!this.argChoices.includes(t)){throw new o(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._collectValue(t,r)}return t};return this}name(){if(this.long){return this.long.replace(/^--/,"")}return this.short.replace(/^-/,"")}attributeName(){if(this.negate){return camelcase(this.name().replace(/^no-/,""))}return camelcase(this.name())}helpGroup(t){this.helpGroupHeading=t;return this}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class DualOptions{constructor(t){this.positiveOptions=new Map;this.negativeOptions=new Map;this.dualOptions=new Set;t.forEach((t=>{if(t.negate){this.negativeOptions.set(t.attributeName(),t)}else{this.positiveOptions.set(t.attributeName(),t)}}));this.negativeOptions.forEach(((t,r)=>{if(this.positiveOptions.has(r)){this.dualOptions.add(r)}}))}valueFromOption(t,r){const i=r.attributeName();if(!this.dualOptions.has(i))return true;const o=this.negativeOptions.get(i).presetArg;const a=o!==undefined?o:false;return r.negate===(a===t)}}function camelcase(t){return t.split("-").reduce(((t,r)=>t+r[0].toUpperCase()+r.slice(1)))}function splitOptionFlags(t){let r;let i;const o=/^-[^-]$/;const a=/^--[^-]/;const c=t.split(/[ |,]+/).concat("guard");if(o.test(c[0]))r=c.shift();if(a.test(c[0]))i=c.shift();if(!r&&o.test(c[0]))r=c.shift();if(!r&&a.test(c[0])){r=i;i=c.shift()}if(c[0].startsWith("-")){const r=c[0];const i=`option creation failed due to '${r}' in option flags '${t}'`;if(/^-[^-][^-]/.test(r))throw new Error(`${i}\n- a short flag is a single dash and a single character\n - either use a single dash and a single character (for a short flag)\n - or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(o.test(r))throw new Error(`${i}\n- too many short flags`);if(a.test(r))throw new Error(`${i}\n- too many long flags`);throw new Error(`${i}\n- unrecognised flag format`)}if(r===undefined&&i===undefined)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:r,longFlag:i}}r.Option=Option;r.DualOptions=DualOptions},3683:(t,r)=>{const i=3;function editDistance(t,r){if(Math.abs(t.length-r.length)>i)return Math.max(t.length,r.length);const o=[];for(let r=0;r<=t.length;r++){o[r]=[r]}for(let t=0;t<=r.length;t++){o[0][t]=t}for(let i=1;i<=r.length;i++){for(let a=1;a<=t.length;a++){let c=1;if(t[a-1]===r[i-1]){c=0}else{c=1}o[a][i]=Math.min(o[a-1][i]+1,o[a][i-1]+1,o[a-1][i-1]+c);if(a>1&&i>1&&t[a-1]===r[i-2]&&t[a-2]===r[i-1]){o[a][i]=Math.min(o[a][i],o[a-2][i-2]+1)}}}return o[t.length][r.length]}function suggestSimilar(t,r){if(!r||r.length===0)return"";r=Array.from(new Set(r));const o=t.startsWith("--");if(o){t=t.slice(2);r=r.map((t=>t.slice(2)))}let a=[];let c=i;const l=.4;r.forEach((r=>{if(r.length<=1)return;const i=editDistance(t,r);const o=Math.max(t.length,r.length);const u=(o-i)/o;if(u>l){if(i<c){c=i;a=[r]}else if(i===c){a.push(r)}}}));a.sort(((t,r)=>t.localeCompare(r)));if(o){a=a.map((t=>`--${t}`))}if(a.length>1){return`\n(Did you mean one of ${a.join(", ")}?)`}if(a.length===1){return`\n(Did you mean ${a[0]}?)`}return""}r.suggestSimilar=suggestSimilar},6564:(t,r,i)=>{"use strict";const{normalizeIPv6:o,removeDotSegments:a,recomposeAuthority:c,normalizeComponentEncoding:l,isIPv4:u,nonSimpleDomain:h}=i(1097);const{SCHEMES:d,getSchemeHandler:p}=i(2424);function normalize(t,r){if(typeof t==="string"){t=serialize(parse(t,r),r)}else if(typeof t==="object"){t=parse(serialize(t,r),r)}return t}function resolve(t,r,i){const o=i?Object.assign({scheme:"null"},i):{scheme:"null"};const a=resolveComponent(parse(t,o),parse(r,o),o,true);o.skipEscape=true;return serialize(a,o)}function resolveComponent(t,r,i,o){const c={};if(!o){t=parse(serialize(t,i),i);r=parse(serialize(r,i),i)}i=i||{};if(!i.tolerant&&r.scheme){c.scheme=r.scheme;c.userinfo=r.userinfo;c.host=r.host;c.port=r.port;c.path=a(r.path||"");c.query=r.query}else{if(r.userinfo!==undefined||r.host!==undefined||r.port!==undefined){c.userinfo=r.userinfo;c.host=r.host;c.port=r.port;c.path=a(r.path||"");c.query=r.query}else{if(!r.path){c.path=t.path;if(r.query!==undefined){c.query=r.query}else{c.query=t.query}}else{if(r.path[0]==="/"){c.path=a(r.path)}else{if((t.userinfo!==undefined||t.host!==undefined||t.port!==undefined)&&!t.path){c.path="/"+r.path}else if(!t.path){c.path=r.path}else{c.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+r.path}c.path=a(c.path)}c.query=r.query}c.userinfo=t.userinfo;c.host=t.host;c.port=t.port}c.scheme=t.scheme}c.fragment=r.fragment;return c}function equal(t,r,i){if(typeof t==="string"){t=unescape(t);t=serialize(l(parse(t,i),true),{...i,skipEscape:true})}else if(typeof t==="object"){t=serialize(l(t,true),{...i,skipEscape:true})}if(typeof r==="string"){r=unescape(r);r=serialize(l(parse(r,i),true),{...i,skipEscape:true})}else if(typeof r==="object"){r=serialize(l(r,true),{...i,skipEscape:true})}return t.toLowerCase()===r.toLowerCase()}function serialize(t,r){const i={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""};const o=Object.assign({},r);const l=[];const u=p(o.scheme||i.scheme);if(u&&u.serialize)u.serialize(i,o);if(i.path!==undefined){if(!o.skipEscape){i.path=escape(i.path);if(i.scheme!==undefined){i.path=i.path.split("%3A").join(":")}}else{i.path=unescape(i.path)}}if(o.reference!=="suffix"&&i.scheme){l.push(i.scheme,":")}const h=c(i);if(h!==undefined){if(o.reference!=="suffix"){l.push("//")}l.push(h);if(i.path&&i.path[0]!=="/"){l.push("/")}}if(i.path!==undefined){let t=i.path;if(!o.absolutePath&&(!u||!u.absolutePath)){t=a(t)}if(h===undefined&&t[0]==="/"&&t[1]==="/"){t="/%2F"+t.slice(2)}l.push(t)}if(i.query!==undefined){l.push("?",i.query)}if(i.fragment!==undefined){l.push("#",i.fragment)}return l.join("")}const m=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function parse(t,r){const i=Object.assign({},r);const a={scheme:undefined,userinfo:undefined,host:"",port:undefined,path:"",query:undefined,fragment:undefined};let c=false;if(i.reference==="suffix"){if(i.scheme){t=i.scheme+":"+t}else{t="//"+t}}const l=t.match(m);if(l){a.scheme=l[1];a.userinfo=l[3];a.host=l[4];a.port=parseInt(l[5],10);a.path=l[6]||"";a.query=l[7];a.fragment=l[8];if(isNaN(a.port)){a.port=l[5]}if(a.host){const t=u(a.host);if(t===false){const t=o(a.host);a.host=t.host.toLowerCase();c=t.isIPV6}else{c=true}}if(a.scheme===undefined&&a.userinfo===undefined&&a.host===undefined&&a.port===undefined&&a.query===undefined&&!a.path){a.reference="same-document"}else if(a.scheme===undefined){a.reference="relative"}else if(a.fragment===undefined){a.reference="absolute"}else{a.reference="uri"}if(i.reference&&i.reference!=="suffix"&&i.reference!==a.reference){a.error=a.error||"URI is not a "+i.reference+" reference."}const r=p(i.scheme||a.scheme);if(!i.unicodeSupport&&(!r||!r.unicodeSupport)){if(a.host&&(i.domainHost||r&&r.domainHost)&&c===false&&h(a.host)){try{a.host=URL.domainToASCII(a.host.toLowerCase())}catch(t){a.error=a.error||"Host's domain name can not be converted to ASCII: "+t}}}if(!r||r&&!r.skipNormalize){if(t.indexOf("%")!==-1){if(a.scheme!==undefined){a.scheme=unescape(a.scheme)}if(a.host!==undefined){a.host=unescape(a.host)}}if(a.path){a.path=escape(unescape(a.path))}if(a.fragment){a.fragment=encodeURI(decodeURIComponent(a.fragment))}}if(r&&r.parse){r.parse(a,i)}}else{a.error=a.error||"URI can not be parsed."}return a}const g={SCHEMES:d,normalize:normalize,resolve:resolve,resolveComponent:resolveComponent,equal:equal,serialize:serialize,parse:parse};t.exports=g;t.exports["default"]=g;t.exports.fastUri=g},2424:(t,r,i)=>{"use strict";const{isUUID:o}=i(1097);const a=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;const c=["http","https","ws","wss","urn","urn:uuid"];function isValidSchemeName(t){return c.indexOf(t)!==-1}function wsIsSecure(t){if(t.secure===true){return true}else if(t.secure===false){return false}else if(t.scheme){return t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S")}else{return false}}function httpParse(t){if(!t.host){t.error=t.error||"HTTP URIs must have a host."}return t}function httpSerialize(t){const r=String(t.scheme).toLowerCase()==="https";if(t.port===(r?443:80)||t.port===""){t.port=undefined}if(!t.path){t.path="/"}return t}function wsParse(t){t.secure=wsIsSecure(t);t.resourceName=(t.path||"/")+(t.query?"?"+t.query:"");t.path=undefined;t.query=undefined;return t}function wsSerialize(t){if(t.port===(wsIsSecure(t)?443:80)||t.port===""){t.port=undefined}if(typeof t.secure==="boolean"){t.scheme=t.secure?"wss":"ws";t.secure=undefined}if(t.resourceName){const[r,i]=t.resourceName.split("?");t.path=r&&r!=="/"?r:undefined;t.query=i;t.resourceName=undefined}t.fragment=undefined;return t}function urnParse(t,r){if(!t.path){t.error="URN can not be parsed";return t}const i=t.path.match(a);if(i){const o=r.scheme||t.scheme||"urn";t.nid=i[1].toLowerCase();t.nss=i[2];const a=`${o}:${r.nid||t.nid}`;const c=getSchemeHandler(a);t.path=undefined;if(c){t=c.parse(t,r)}}else{t.error=t.error||"URN can not be parsed."}return t}function urnSerialize(t,r){if(t.nid===undefined){throw new Error("URN without nid cannot be serialized")}const i=r.scheme||t.scheme||"urn";const o=t.nid.toLowerCase();const a=`${i}:${r.nid||o}`;const c=getSchemeHandler(a);if(c){t=c.serialize(t,r)}const l=t;const u=t.nss;l.path=`${o||r.nid}:${u}`;r.skipEscape=true;return l}function urnuuidParse(t,r){const i=t;i.uuid=i.nss;i.nss=undefined;if(!r.tolerant&&(!i.uuid||!o(i.uuid))){i.error=i.error||"UUID is not valid."}return i}function urnuuidSerialize(t){const r=t;r.nss=(t.uuid||"").toLowerCase();return r}const l={scheme:"http",domainHost:true,parse:httpParse,serialize:httpSerialize};const u={scheme:"https",domainHost:l.domainHost,parse:httpParse,serialize:httpSerialize};const h={scheme:"ws",domainHost:true,parse:wsParse,serialize:wsSerialize};const d={scheme:"wss",domainHost:h.domainHost,parse:h.parse,serialize:h.serialize};const p={scheme:"urn",parse:urnParse,serialize:urnSerialize,skipNormalize:true};const m={scheme:"urn:uuid",parse:urnuuidParse,serialize:urnuuidSerialize,skipNormalize:true};const g={http:l,https:u,ws:h,wss:d,urn:p,"urn:uuid":m};Object.setPrototypeOf(g,null);function getSchemeHandler(t){return t&&(g[t]||g[t.toLowerCase()])||undefined}t.exports={wsIsSecure:wsIsSecure,SCHEMES:g,isValidSchemeName:isValidSchemeName,getSchemeHandler:getSchemeHandler}},1097:t=>{"use strict";const r=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);const i=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function stringArrayToHexStripped(t){let r="";let i=0;let o=0;for(o=0;o<t.length;o++){i=t[o].charCodeAt(0);if(i===48){continue}if(!(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102)){return""}r+=t[o];break}for(o+=1;o<t.length;o++){i=t[o].charCodeAt(0);if(!(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102)){return""}r+=t[o]}return r}const o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function consumeIsZone(t){t.length=0;return true}function consumeHextets(t,r,i){if(t.length){const o=stringArrayToHexStripped(t);if(o!==""){r.push(o)}else{i.error=true;return false}t.length=0}return true}function getIPV6(t){let r=0;const i={error:false,address:"",zone:""};const o=[];const a=[];let c=false;let l=false;let u=consumeHextets;for(let h=0;h<t.length;h++){const d=t[h];if(d==="["||d==="]"){continue}if(d===":"){if(c===true){l=true}if(!u(a,o,i)){break}if(++r>7){i.error=true;break}if(h>0&&t[h-1]===":"){c=true}o.push(":");continue}else if(d==="%"){if(!u(a,o,i)){break}u=consumeIsZone}else{a.push(d);continue}}if(a.length){if(u===consumeIsZone){i.zone=a.join("")}else if(l){o.push(a.join(""))}else{o.push(stringArrayToHexStripped(a))}}i.address=o.join("");return i}function normalizeIPv6(t){if(findToken(t,":")<2){return{host:t,isIPV6:false}}const r=getIPV6(t);if(!r.error){let t=r.address;let i=r.address;if(r.zone){t+="%"+r.zone;i+="%25"+r.zone}return{host:t,isIPV6:true,escapedHost:i}}else{return{host:t,isIPV6:false}}}function findToken(t,r){let i=0;for(let o=0;o<t.length;o++){if(t[o]===r)i++}return i}function removeDotSegments(t){let r=t;const i=[];let o=-1;let a=0;while(a=r.length){if(a===1){if(r==="."){break}else if(r==="/"){i.push("/");break}else{i.push(r);break}}else if(a===2){if(r[0]==="."){if(r[1]==="."){break}else if(r[1]==="/"){r=r.slice(2);continue}}else if(r[0]==="/"){if(r[1]==="."||r[1]==="/"){i.push("/");break}}}else if(a===3){if(r==="/.."){if(i.length!==0){i.pop()}i.push("/");break}}if(r[0]==="."){if(r[1]==="."){if(r[2]==="/"){r=r.slice(3);continue}}else if(r[1]==="/"){r=r.slice(2);continue}}else if(r[0]==="/"){if(r[1]==="."){if(r[2]==="/"){r=r.slice(2);continue}else if(r[2]==="."){if(r[3]==="/"){r=r.slice(3);if(i.length!==0){i.pop()}continue}}}}if((o=r.indexOf("/",1))===-1){i.push(r);break}else{i.push(r.slice(0,o));r=r.slice(o)}}return i.join("")}function normalizeComponentEncoding(t,r){const i=r!==true?escape:unescape;if(t.scheme!==undefined){t.scheme=i(t.scheme)}if(t.userinfo!==undefined){t.userinfo=i(t.userinfo)}if(t.host!==undefined){t.host=i(t.host)}if(t.path!==undefined){t.path=i(t.path)}if(t.query!==undefined){t.query=i(t.query)}if(t.fragment!==undefined){t.fragment=i(t.fragment)}return t}function recomposeAuthority(t){const r=[];if(t.userinfo!==undefined){r.push(t.userinfo);r.push("@")}if(t.host!==undefined){let o=unescape(t.host);if(!i(o)){const r=normalizeIPv6(o);if(r.isIPV6===true){o=`[${r.escapedHost}]`}else{o=t.host}}r.push(o)}if(typeof t.port==="number"||typeof t.port==="string"){r.push(":");r.push(String(t.port))}return r.length?r.join(""):undefined}t.exports={nonSimpleDomain:o,recomposeAuthority:recomposeAuthority,normalizeComponentEncoding:normalizeComponentEncoding,removeDotSegments:removeDotSegments,isIPv4:i,isUUID:r,normalizeIPv6:normalizeIPv6,stringArrayToHexStripped:stringArrayToHexStripped}},2200:t=>{"use strict";t.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},5727:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/applicator","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/applicator":true},"$dynamicAnchor":"meta","title":"Applicator vocabulary meta-schema","type":["object","boolean"],"properties":{"prefixItems":{"$ref":"#/$defs/schemaArray"},"items":{"$dynamicRef":"#meta"},"contains":{"$dynamicRef":"#meta"},"additionalProperties":{"$dynamicRef":"#meta"},"properties":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"},"propertyNames":{"format":"regex"},"default":{}},"dependentSchemas":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"},"default":{}},"propertyNames":{"$dynamicRef":"#meta"},"if":{"$dynamicRef":"#meta"},"then":{"$dynamicRef":"#meta"},"else":{"$dynamicRef":"#meta"},"allOf":{"$ref":"#/$defs/schemaArray"},"anyOf":{"$ref":"#/$defs/schemaArray"},"oneOf":{"$ref":"#/$defs/schemaArray"},"not":{"$dynamicRef":"#meta"}},"$defs":{"schemaArray":{"type":"array","minItems":1,"items":{"$dynamicRef":"#meta"}}}}')},1447:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/content","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/content":true},"$dynamicAnchor":"meta","title":"Content vocabulary meta-schema","type":["object","boolean"],"properties":{"contentEncoding":{"type":"string"},"contentMediaType":{"type":"string"},"contentSchema":{"$dynamicRef":"#meta"}}}')},4877:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/core","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/core":true},"$dynamicAnchor":"meta","title":"Core vocabulary meta-schema","type":["object","boolean"],"properties":{"$id":{"$ref":"#/$defs/uriReferenceString","$comment":"Non-empty fragments not allowed.","pattern":"^[^#]*#?$"},"$schema":{"$ref":"#/$defs/uriString"},"$ref":{"$ref":"#/$defs/uriReferenceString"},"$anchor":{"$ref":"#/$defs/anchorString"},"$dynamicRef":{"$ref":"#/$defs/uriReferenceString"},"$dynamicAnchor":{"$ref":"#/$defs/anchorString"},"$vocabulary":{"type":"object","propertyNames":{"$ref":"#/$defs/uriString"},"additionalProperties":{"type":"boolean"}},"$comment":{"type":"string"},"$defs":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"}}},"$defs":{"anchorString":{"type":"string","pattern":"^[A-Za-z_][-A-Za-z0-9._]*$"},"uriString":{"type":"string","format":"uri"},"uriReferenceString":{"type":"string","format":"uri-reference"}}}')},9041:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/format-annotation","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/format-annotation":true},"$dynamicAnchor":"meta","title":"Format vocabulary meta-schema for annotation results","type":["object","boolean"],"properties":{"format":{"type":"string"}}}')},5118:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/meta-data","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/meta-data":true},"$dynamicAnchor":"meta","title":"Meta-data vocabulary meta-schema","type":["object","boolean"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"default":true,"deprecated":{"type":"boolean","default":false},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true}}}')},8606:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/unevaluated","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/unevaluated":true},"$dynamicAnchor":"meta","title":"Unevaluated applicator vocabulary meta-schema","type":["object","boolean"],"properties":{"unevaluatedItems":{"$dynamicRef":"#meta"},"unevaluatedProperties":{"$dynamicRef":"#meta"}}}')},3073:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/validation","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/validation":true},"$dynamicAnchor":"meta","title":"Validation vocabulary meta-schema","type":["object","boolean"],"properties":{"type":{"anyOf":[{"$ref":"#/$defs/simpleTypes"},{"type":"array","items":{"$ref":"#/$defs/simpleTypes"},"minItems":1,"uniqueItems":true}]},"const":true,"enum":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/$defs/nonNegativeInteger"},"minLength":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"maxItems":{"$ref":"#/$defs/nonNegativeInteger"},"minItems":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxContains":{"$ref":"#/$defs/nonNegativeInteger"},"minContains":{"$ref":"#/$defs/nonNegativeInteger","default":1},"maxProperties":{"$ref":"#/$defs/nonNegativeInteger"},"minProperties":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"required":{"$ref":"#/$defs/stringArray"},"dependentRequired":{"type":"object","additionalProperties":{"$ref":"#/$defs/stringArray"}}},"$defs":{"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"$ref":"#/$defs/nonNegativeInteger","default":0},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}}}')},1115:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/schema","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/core":true,"https://json-schema.org/draft/2020-12/vocab/applicator":true,"https://json-schema.org/draft/2020-12/vocab/unevaluated":true,"https://json-schema.org/draft/2020-12/vocab/validation":true,"https://json-schema.org/draft/2020-12/vocab/meta-data":true,"https://json-schema.org/draft/2020-12/vocab/format-annotation":true,"https://json-schema.org/draft/2020-12/vocab/content":true},"$dynamicAnchor":"meta","title":"Core and Validation specifications meta-schema","allOf":[{"$ref":"meta/core"},{"$ref":"meta/applicator"},{"$ref":"meta/unevaluated"},{"$ref":"meta/validation"},{"$ref":"meta/meta-data"},{"$ref":"meta/format-annotation"},{"$ref":"meta/content"}],"type":["object","boolean"],"$comment":"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.","properties":{"definitions":{"$comment":"\\"definitions\\" has been replaced by \\"$defs\\".","type":"object","additionalProperties":{"$dynamicRef":"#meta"},"deprecated":true,"default":{}},"dependencies":{"$comment":"\\"dependencies\\" has been split and replaced by \\"dependentSchemas\\" and \\"dependentRequired\\" in order to serve their differing semantics.","type":"object","additionalProperties":{"anyOf":[{"$dynamicRef":"#meta"},{"$ref":"meta/validation#/$defs/stringArray"}]},"deprecated":true,"default":{}},"$recursiveAnchor":{"$comment":"\\"$recursiveAnchor\\" has been replaced by \\"$dynamicAnchor\\".","$ref":"meta/core#/$defs/anchorString","deprecated":true},"$recursiveRef":{"$comment":"\\"$recursiveRef\\" has been replaced by \\"$dynamicRef\\".","$ref":"meta/core#/$defs/uriReferenceString","deprecated":true}}}')},7578:t=>{"use strict";t.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},4839:t=>{"use strict";t.exports=JSON.parse('[{"name":"Agola CI","constant":"AGOLA","env":"AGOLA_GIT_REF","pr":"AGOLA_PULL_REQUEST_ID"},{"name":"Appcircle","constant":"APPCIRCLE","env":"AC_APPCIRCLE","pr":{"env":"AC_GIT_PR","ne":"false"}},{"name":"AppVeyor","constant":"APPVEYOR","env":"APPVEYOR","pr":"APPVEYOR_PULL_REQUEST_NUMBER"},{"name":"AWS CodeBuild","constant":"CODEBUILD","env":"CODEBUILD_BUILD_ARN","pr":{"env":"CODEBUILD_WEBHOOK_EVENT","any":["PULL_REQUEST_CREATED","PULL_REQUEST_UPDATED","PULL_REQUEST_REOPENED"]}},{"name":"Azure Pipelines","constant":"AZURE_PIPELINES","env":"TF_BUILD","pr":{"BUILD_REASON":"PullRequest"}},{"name":"Bamboo","constant":"BAMBOO","env":"bamboo_planKey"},{"name":"Bitbucket Pipelines","constant":"BITBUCKET","env":"BITBUCKET_COMMIT","pr":"BITBUCKET_PR_ID"},{"name":"Bitrise","constant":"BITRISE","env":"BITRISE_IO","pr":"BITRISE_PULL_REQUEST"},{"name":"Buddy","constant":"BUDDY","env":"BUDDY_WORKSPACE_ID","pr":"BUDDY_EXECUTION_PULL_REQUEST_ID"},{"name":"Buildkite","constant":"BUILDKITE","env":"BUILDKITE","pr":{"env":"BUILDKITE_PULL_REQUEST","ne":"false"}},{"name":"CircleCI","constant":"CIRCLE","env":"CIRCLECI","pr":"CIRCLE_PULL_REQUEST"},{"name":"Cirrus CI","constant":"CIRRUS","env":"CIRRUS_CI","pr":"CIRRUS_PR"},{"name":"Cloudflare Pages","constant":"CLOUDFLARE_PAGES","env":"CF_PAGES"},{"name":"Cloudflare Workers","constant":"CLOUDFLARE_WORKERS","env":"WORKERS_CI"},{"name":"Codefresh","constant":"CODEFRESH","env":"CF_BUILD_ID","pr":{"any":["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{"name":"Codemagic","constant":"CODEMAGIC","env":"CM_BUILD_ID","pr":"CM_PULL_REQUEST"},{"name":"Codeship","constant":"CODESHIP","env":{"CI_NAME":"codeship"}},{"name":"Drone","constant":"DRONE","env":"DRONE","pr":{"DRONE_BUILD_EVENT":"pull_request"}},{"name":"dsari","constant":"DSARI","env":"DSARI"},{"name":"Earthly","constant":"EARTHLY","env":"EARTHLY_CI"},{"name":"Expo Application Services","constant":"EAS","env":"EAS_BUILD"},{"name":"Gerrit","constant":"GERRIT","env":"GERRIT_PROJECT"},{"name":"Gitea Actions","constant":"GITEA_ACTIONS","env":"GITEA_ACTIONS"},{"name":"GitHub Actions","constant":"GITHUB_ACTIONS","env":"GITHUB_ACTIONS","pr":{"GITHUB_EVENT_NAME":"pull_request"}},{"name":"GitLab CI","constant":"GITLAB","env":"GITLAB_CI","pr":"CI_MERGE_REQUEST_ID"},{"name":"GoCD","constant":"GOCD","env":"GO_PIPELINE_LABEL"},{"name":"Google Cloud Build","constant":"GOOGLE_CLOUD_BUILD","env":"BUILDER_OUTPUT"},{"name":"Harness CI","constant":"HARNESS","env":"HARNESS_BUILD_ID"},{"name":"Heroku","constant":"HEROKU","env":{"env":"NODE","includes":"/app/.heroku/node/bin/node"}},{"name":"Hudson","constant":"HUDSON","env":"HUDSON_URL"},{"name":"Jenkins","constant":"JENKINS","env":["JENKINS_URL","BUILD_ID"],"pr":{"any":["ghprbPullId","CHANGE_ID"]}},{"name":"LayerCI","constant":"LAYERCI","env":"LAYERCI","pr":"LAYERCI_PULL_REQUEST"},{"name":"Magnum CI","constant":"MAGNUM","env":"MAGNUM"},{"name":"Netlify CI","constant":"NETLIFY","env":"NETLIFY","pr":{"env":"PULL_REQUEST","ne":"false"}},{"name":"Nevercode","constant":"NEVERCODE","env":"NEVERCODE","pr":{"env":"NEVERCODE_PULL_REQUEST","ne":"false"}},{"name":"Prow","constant":"PROW","env":"PROW_JOB_ID"},{"name":"ReleaseHub","constant":"RELEASEHUB","env":"RELEASE_BUILD_ID"},{"name":"Render","constant":"RENDER","env":"RENDER","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Sail CI","constant":"SAIL","env":"SAILCI","pr":"SAIL_PULL_REQUEST_NUMBER"},{"name":"Screwdriver","constant":"SCREWDRIVER","env":"SCREWDRIVER","pr":{"env":"SD_PULL_REQUEST","ne":"false"}},{"name":"Semaphore","constant":"SEMAPHORE","env":"SEMAPHORE","pr":"PULL_REQUEST_NUMBER"},{"name":"Sourcehut","constant":"SOURCEHUT","env":{"CI_NAME":"sourcehut"}},{"name":"Strider CD","constant":"STRIDER","env":"STRIDER"},{"name":"TaskCluster","constant":"TASKCLUSTER","env":["TASK_ID","RUN_ID"]},{"name":"TeamCity","constant":"TEAMCITY","env":"TEAMCITY_VERSION"},{"name":"Travis CI","constant":"TRAVIS","env":"TRAVIS","pr":{"env":"TRAVIS_PULL_REQUEST","ne":"false"}},{"name":"Vela","constant":"VELA","env":"VELA","pr":{"VELA_PULL_REQUEST":"1"}},{"name":"Vercel","constant":"VERCEL","env":{"any":["NOW_BUILDER","VERCEL"]},"pr":"VERCEL_GIT_PULL_REQUEST_ID"},{"name":"Visual Studio App Center","constant":"APPCENTER","env":"APPCENTER_BUILD_ID"},{"name":"Woodpecker","constant":"WOODPECKER","env":{"CI":"woodpecker"},"pr":{"CI_BUILD_EVENT":"pull_request"}},{"name":"Xcode Cloud","constant":"XCODE_CLOUD","env":"CI_XCODE_PROJECT","pr":"CI_PULL_REQUEST_NUMBER"},{"name":"Xcode Server","constant":"XCODE_SERVER","env":"XCS"}]')},6737:t=>{"use strict";t.exports=JSON.parse('["_http_agent","_http_client","_http_common","_http_incoming","_http_outgoing","_http_server","_stream_duplex","_stream_passthrough","_stream_readable","_stream_transform","_stream_wrap","_stream_writable","_tls_common","_tls_wrap","assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","sys","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib","node:sea","node:sqlite","node:test","node:test/reporters"]')}};var r={};function __nccwpck_require__(i){var o=r[i];if(o!==undefined){return o.exports}var a=r[i]={exports:{}};var c=true;try{t[i](a,a.exports,__nccwpck_require__);c=false}finally{if(c)delete r[i]}return a.exports}(()=>{__nccwpck_require__.n=t=>{var r=t&&t.__esModule?()=>t["default"]:()=>t;__nccwpck_require__.d(r,{a:r});return r}})();(()=>{var t=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__;var r;__nccwpck_require__.t=function(i,o){if(o&1)i=this(i);if(o&8)return i;if(typeof i==="object"&&i){if(o&4&&i.__esModule)return i;if(o&16&&typeof i.then==="function")return i}var a=Object.create(null);__nccwpck_require__.r(a);var c={};r=r||[null,t({}),t([]),t(t)];for(var l=o&2&&i;typeof l=="object"&&!~r.indexOf(l);l=t(l)){Object.getOwnPropertyNames(l).forEach((t=>c[t]=()=>i[t]))}c["default"]=()=>i;__nccwpck_require__.d(a,c);return a}})();(()=>{__nccwpck_require__.d=(t,r)=>{for(var i in r){if(__nccwpck_require__.o(r,i)&&!__nccwpck_require__.o(t,i)){Object.defineProperty(t,i,{enumerable:true,get:r[i]})}}}})();(()=>{__nccwpck_require__.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var i={};(()=>{"use strict";var t=__nccwpck_require__(3024);var r=__nccwpck_require__(6760);var i=__nccwpck_require__.n(r);var o=__nccwpck_require__(7867);var a=__nccwpck_require__.n(o);var c=__nccwpck_require__(206);const{DM:l,gu:u,er:h,Ww:d,b7:p,Di:m,a2:g,uB:y,ef:v,c$:b,_V:w}=c;const E=require("node:util");var S=__nccwpck_require__(1708);const $=require("node:crypto");const O=require("node:assert");const isObject=t=>{const r=typeof t;return t!==null&&(r==="object"||r==="function")};const isEmptyObject=t=>{if(!isObject(t)){return false}for(const r in t){if(Object.hasOwn(t,r)){return false}}return true};const R=new Set(["__proto__","prototype","constructor"]);const P=1e6;const isDigit=t=>t>="0"&&t<="9";function shouldCoerceToNumber(t){if(t==="0"){return true}if(/^[1-9]\d*$/.test(t)){const r=Number.parseInt(t,10);return r<=Number.MAX_SAFE_INTEGER&&r<=P}return false}function processSegment(t,r){if(R.has(t)){return false}if(t&&shouldCoerceToNumber(t)){r.push(Number.parseInt(t,10))}else{r.push(t)}return true}function parsePath(t){if(typeof t!=="string"){throw new TypeError(`Expected a string, got ${typeof t}`)}const r=[];let i="";let o="start";let a=false;let c=0;for(const l of t){c++;if(a){i+=l;a=false;continue}if(l==="\\"){if(o==="index"){throw new Error(`Invalid character '${l}' in an index at position ${c}`)}if(o==="indexEnd"){throw new Error(`Invalid character '${l}' after an index at position ${c}`)}a=true;o=o==="start"?"property":o;continue}switch(l){case".":{if(o==="index"){throw new Error(`Invalid character '${l}' in an index at position ${c}`)}if(o==="indexEnd"){o="property";break}if(!processSegment(i,r)){return[]}i="";o="property";break}case"[":{if(o==="index"){throw new Error(`Invalid character '${l}' in an index at position ${c}`)}if(o==="indexEnd"){o="index";break}if(o==="property"||o==="start"){if((i||o==="property")&&!processSegment(i,r)){return[]}i=""}o="index";break}case"]":{if(o==="index"){if(i===""){const t=r.pop()||"";i=t+"[]";o="property"}else{const t=Number.parseInt(i,10);const a=!Number.isNaN(t)&&Number.isFinite(t)&&t>=0&&t<=Number.MAX_SAFE_INTEGER&&t<=P&&i===String(t);if(a){r.push(t)}else{r.push(i)}i="";o="indexEnd"}break}if(o==="indexEnd"){throw new Error(`Invalid character '${l}' after an index at position ${c}`)}i+=l;break}default:{if(o==="index"&&!isDigit(l)){throw new Error(`Invalid character '${l}' in an index at position ${c}`)}if(o==="indexEnd"){throw new Error(`Invalid character '${l}' after an index at position ${c}`)}if(o==="start"){o="property"}i+=l}}}if(a){i+="\\"}switch(o){case"property":{if(!processSegment(i,r)){return[]}break}case"index":{throw new Error("Index was not closed")}case"start":{r.push("");break}}return r}function normalizePath(t){if(typeof t==="string"){return parsePath(t)}if(Array.isArray(t)){const r=[];for(const[i,o]of t.entries()){if(typeof o!=="string"&&typeof o!=="number"){throw new TypeError(`Expected a string or number for path segment at index ${i}, got ${typeof o}`)}if(typeof o==="number"&&!Number.isFinite(o)){throw new TypeError(`Path segment at index ${i} must be a finite number, got ${o}`)}if(R.has(o)){return[]}if(typeof o==="string"&&shouldCoerceToNumber(o)){r.push(Number.parseInt(o,10))}else{r.push(o)}}return r}return[]}function getProperty(t,r,i){if(!isObject(t)||typeof r!=="string"&&!Array.isArray(r)){return i===undefined?t:i}const o=normalizePath(r);if(o.length===0){return i}for(let r=0;r<o.length;r++){const a=o[r];t=t[a];if(t===undefined||t===null){if(r!==o.length-1){return i}break}}return t===undefined?i:t}function setProperty(t,r,i){if(!isObject(t)||typeof r!=="string"&&!Array.isArray(r)){return t}const o=t;const a=normalizePath(r);if(a.length===0){return t}for(let r=0;r<a.length;r++){const o=a[r];if(r===a.length-1){t[o]=i}else if(!isObject(t[o])){const i=a[r+1];const c=typeof i==="number";t[o]=c?[]:{}}t=t[o]}return o}function deleteProperty(t,r){if(!isObject(t)||typeof r!=="string"&&!Array.isArray(r)){return false}const i=normalizePath(r);if(i.length===0){return false}for(let r=0;r<i.length;r++){const o=i[r];if(r===i.length-1){const r=Object.hasOwn(t,o);if(!r){return false}delete t[o];return true}t=t[o];if(!isObject(t)){return false}}}function hasProperty(t,r){if(!isObject(t)||typeof r!=="string"&&!Array.isArray(r)){return false}const i=normalizePath(r);if(i.length===0){return false}for(const r of i){if(!isObject(t)||!(r in t)){return false}t=t[r]}return true}function escapePath(t){if(typeof t!=="string"){throw new TypeError(`Expected a string, got ${typeof t}`)}return t.replaceAll(/[\\.[]/g,String.raw`\$&`)}function normalizeEntries(t){const r=Object.entries(t);if(Array.isArray(t)){return r.map((([t,r])=>{const i=shouldCoerceToNumber(t)?Number.parseInt(t,10):t;return[i,r]}))}return r}function stringifyPath(t,r={}){if(!Array.isArray(t)){throw new TypeError(`Expected an array, got ${typeof t}`)}const{preferDotForIndices:i=false}=r;const o=[];for(const[r,a]of t.entries()){if(typeof a!=="string"&&typeof a!=="number"){throw new TypeError(`Expected a string or number for path segment at index ${r}, got ${typeof a}`)}if(typeof a==="number"){if(!Number.isInteger(a)||a<0){const t=escapePath(String(a));o.push(r===0?t:`.${t}`)}else if(i&&r>0){o.push(`.${a}`)}else{o.push(`[${a}]`)}}else if(typeof a==="string"){if(a===""){if(r===0){}else{o.push(".")}}else if(shouldCoerceToNumber(a)){const t=Number.parseInt(a,10);if(i&&r>0){o.push(`.${t}`)}else{o.push(`[${t}]`)}}else{const t=escapePath(a);o.push(r===0?t:`.${t}`)}}}return o.join("")}function*deepKeysIterator(t,r=[],i=new Set){if(!isObject(t)||isEmptyObject(t)){if(r.length>0){yield stringifyPath(r)}return}if(i.has(t)){return}i.add(t);for(const[o,a]of normalizeEntries(t)){r.push(o);yield*deepKeysIterator(a,r,i);r.pop()}i.delete(t)}function deepKeys(t){return[...deepKeysIterator(t)]}function unflatten(t){const r={};if(!isObject(t)){return r}for(const[i,o]of Object.entries(t)){setProperty(r,i,o)}return r}const A=require("node:os");var x=__nccwpck_require__.n(A);const T=A.homedir();const C=A.tmpdir();const{env:k}=S;const macos=t=>{const i=r.join(T,"Library");return{data:r.join(i,"Application Support",t),config:r.join(i,"Preferences",t),cache:r.join(i,"Caches",t),log:r.join(i,"Logs",t),temp:r.join(C,t)}};const windows=t=>{const i=k.APPDATA||r.join(T,"AppData","Roaming");const o=k.LOCALAPPDATA||r.join(T,"AppData","Local");return{data:r.join(o,t,"Data"),config:r.join(i,t,"Config"),cache:r.join(o,t,"Cache"),log:r.join(o,t,"Log"),temp:r.join(C,t)}};const linux=t=>{const i=r.basename(T);return{data:r.join(k.XDG_DATA_HOME||r.join(T,".local","share"),t),config:r.join(k.XDG_CONFIG_HOME||r.join(T,".config"),t),cache:r.join(k.XDG_CACHE_HOME||r.join(T,".cache"),t),log:r.join(k.XDG_STATE_HOME||r.join(T,".local","state"),t),temp:r.join(C,i,t)}};function envPaths(t,{suffix:r="nodejs"}={}){if(typeof t!=="string"){throw new TypeError(`Expected a string, got ${typeof t}`)}if(r){t+=`-${r}`}if(S.platform==="darwin"){return macos(t)}if(S.platform==="win32"){return windows(t)}return linux(t)}var I=__nccwpck_require__(8474);const N=require("node:stream");const attemptifyAsync=(t,r)=>{const{onError:i}=r;return function attemptified(...r){return t.apply(undefined,r).catch(i)}};const D=attemptifyAsync;const attemptifySync=(t,r)=>{const{onError:i}=r;return function attemptified(...r){try{return t.apply(undefined,r)}catch(t){return i(t)}}};const L=attemptifySync;const M=250;const retryifyAsync=(t,r)=>{const{isRetriable:i}=r;return function retryified(r){const{timeout:o}=r;const a=r.interval??M;const c=Date.now()+o;return function attempt(...r){return t.apply(undefined,r).catch((t=>{if(!i(t))throw t;if(Date.now()>=c)throw t;const o=Math.round(a*Math.random());if(o>0){const t=new Promise((t=>setTimeout(t,o)));return t.then((()=>attempt.apply(undefined,r)))}else{return attempt.apply(undefined,r)}}))}}};const j=retryifyAsync;const retryifySync=(t,r)=>{const{isRetriable:i}=r;return function retryified(r){const{timeout:o}=r;const a=Date.now()+o;return function attempt(...r){while(true){try{return t.apply(undefined,r)}catch(t){if(!i(t))throw t;if(Date.now()>=a)throw t;continue}}}}};const U=retryifySync;const B={isChangeErrorOk:t=>{if(!B.isNodeError(t))return false;const{code:r}=t;if(r==="ENOSYS")return true;if(!G&&(r==="EINVAL"||r==="EPERM"))return true;return false},isNodeError:t=>t instanceof Error,isRetriableError:t=>{if(!B.isNodeError(t))return false;const{code:r}=t;if(r==="EMFILE"||r==="ENFILE"||r==="EAGAIN"||r==="EBUSY"||r==="EACCESS"||r==="EACCES"||r==="EACCS"||r==="EPERM")return true;return false},onChangeError:t=>{if(!B.isNodeError(t))throw t;if(B.isChangeErrorOk(t))return;throw t}};const H=B;const V={onError:H.onChangeError};const z={onError:()=>undefined};const G=S.getuid?!S.getuid():false;const W={isRetriable:H.isRetriableError};const q={attempt:{chmod:D((0,E.promisify)(t.chmod),V),chown:D((0,E.promisify)(t.chown),V),close:D((0,E.promisify)(t.close),z),fsync:D((0,E.promisify)(t.fsync),z),mkdir:D((0,E.promisify)(t.mkdir),z),realpath:D((0,E.promisify)(t.realpath),z),stat:D((0,E.promisify)(t.stat),z),unlink:D((0,E.promisify)(t.unlink),z),chmodSync:L(t.chmodSync,V),chownSync:L(t.chownSync,V),closeSync:L(t.closeSync,z),existsSync:L(t.existsSync,z),fsyncSync:L(t.fsync,z),mkdirSync:L(t.mkdirSync,z),realpathSync:L(t.realpathSync,z),statSync:L(t.statSync,z),unlinkSync:L(t.unlinkSync,z)},retry:{close:j((0,E.promisify)(t.close),W),fsync:j((0,E.promisify)(t.fsync),W),open:j((0,E.promisify)(t.open),W),readFile:j((0,E.promisify)(t.readFile),W),rename:j((0,E.promisify)(t.rename),W),stat:j((0,E.promisify)(t.stat),W),write:j((0,E.promisify)(t.write),W),writeFile:j((0,E.promisify)(t.writeFile),W),closeSync:U(t.closeSync,W),fsyncSync:U(t.fsyncSync,W),openSync:U(t.openSync,W),readFileSync:U(t.readFileSync,W),renameSync:U(t.renameSync,W),statSync:U(t.statSync,W),writeSync:U(t.writeSync,W),writeFileSync:U(t.writeFileSync,W)}};const K=q;const Y="utf8";const Z=438;const X=511;const J={};const Q={};const ee=S.geteuid?S.geteuid():-1;const te=S.getegid?S.getegid():-1;const re=200;const se=7500;const ie=1e3;const ne=!!S.getuid;const oe=S.getuid?!S.getuid():false;const ae=128;const NOOP=()=>{};const lang_isException=t=>t instanceof Error&&"code"in t;const lang_isFunction=t=>typeof t==="function";const lang_isString=t=>typeof t==="string";const lang_isUndefined=t=>t===undefined;const ce={};const le={next:t=>{const r=ce[t];if(!r)return;r.shift();const i=r[0];if(i){i((()=>le.next(t)))}else{delete ce[t]}},schedule:t=>new Promise((r=>{let i=ce[t];if(!i)i=ce[t]=[];i.push(r);if(i.length>1)return;r((()=>le.next(t)))}))};const ue=null&&le;const he=S.platform==="linux";const fe=S.platform==="win32";const de=["SIGHUP","SIGINT","SIGTERM"];if(!fe){de.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(he){de.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")}const pe=de;class Interceptor{constructor(){this.callbacks=new Set;this.exited=false;this.exit=t=>{if(this.exited)return;this.exited=true;for(const t of this.callbacks){t()}if(t){if(fe&&(t!=="SIGINT"&&t!=="SIGTERM"&&t!=="SIGKILL")){S.kill(S.pid,"SIGTERM")}else{S.kill(S.pid,t)}}};this.hook=()=>{S.once("exit",(()=>this.exit()));for(const t of pe){try{S.once(t,(()=>this.exit(t)))}catch{}}};this.register=t=>{this.callbacks.add(t);return()=>{this.callbacks.delete(t)}};this.hook()}}const me=new Interceptor;const ge=me.register;const ye=ge;const _e={store:{},create:t=>{const r=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6);const i=Date.now().toString().slice(-10);const o="tmp-";const a=`.${o}${i}${r}`;const c=`${t}${a}`;return c},get:(t,r,i=true)=>{const o=_e.truncate(r(t));if(o in _e.store)return _e.get(t,r,i);_e.store[o]=i;const disposer=()=>delete _e.store[o];return[o,disposer]},purge:t=>{if(!_e.store[t])return;delete _e.store[t];K.attempt.unlink(t)},purgeSync:t=>{if(!_e.store[t])return;delete _e.store[t];K.attempt.unlinkSync(t)},purgeSyncAll:()=>{for(const t in _e.store){_e.purgeSync(t)}},truncate:t=>{const i=r.basename(t);if(i.length<=ae)return t;const o=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(i);if(!o)return t;const a=i.length-ae;return`${t.slice(0,-i.length)}${o[1]}${o[2].slice(0,-a)}${o[3]}`}};ye(_e.purgeSyncAll);const ve=_e;function readFile(t,r=DEFAULT_READ_OPTIONS){if(isString(r))return readFile(t,{encoding:r});const i=r.timeout??DEFAULT_TIMEOUT_ASYNC;const o={timeout:i,interval:DEFAULT_INTERVAL_ASYNC};return fs.retry.readFile(o)(t,r)}function readFileSync(t,r=DEFAULT_READ_OPTIONS){if(isString(r))return readFileSync(t,{encoding:r});const i=r.timeout??DEFAULT_TIMEOUT_SYNC;const o={timeout:i};return fs.retry.readFileSync(o)(t,r)}function writeFile(t,r,i,o){if(isFunction(i))return writeFile(t,r,DEFAULT_WRITE_OPTIONS,i);const a=writeFileAsync(t,r,i);if(o)a.then(o,o);return a}async function writeFileAsync(t,r,i=DEFAULT_WRITE_OPTIONS){if(isString(i))return writeFileAsync(t,r,{encoding:i});const o=i.timeout??DEFAULT_TIMEOUT_ASYNC;const a={timeout:o,interval:DEFAULT_INTERVAL_ASYNC};let c=null;let l=null;let u=null;let h=null;let d=null;try{if(i.schedule)c=await i.schedule(t);l=await Scheduler.schedule(t);const o=await fs.attempt.realpath(t);const p=!!o;t=o||t;[h,u]=Temp.get(t,i.tmpCreate||Temp.create,!(i.tmpPurge===false));const m=IS_POSIX&&isUndefined(i.chown);const g=isUndefined(i.mode);if(p&&(m||g)){const r=await fs.attempt.stat(t);if(r){i={...i};if(m){i.chown={uid:r.uid,gid:r.gid}}if(g){i.mode=r.mode}}}if(!p){const r=path.dirname(t);await fs.attempt.mkdir(r,{mode:DEFAULT_FOLDER_MODE,recursive:true})}d=await fs.retry.open(a)(h,"w",i.mode||DEFAULT_FILE_MODE);if(i.tmpCreated){i.tmpCreated(h)}if(isString(r)){await fs.retry.write(a)(d,r,0,i.encoding||DEFAULT_ENCODING)}else if(r instanceof Readable){const t=createWriteStream(h,{fd:d,autoClose:false});const i=once(t,"finish");r.pipe(t);await i}else if(!isUndefined(r)){await fs.retry.write(a)(d,r,0,r.length,0)}if(i.fsync!==false){if(i.fsyncWait!==false){await fs.retry.fsync(a)(d)}else{fs.attempt.fsync(d)}}await fs.retry.close(a)(d);d=null;if(i.chown&&(i.chown.uid!==DEFAULT_USER_UID||i.chown.gid!==DEFAULT_USER_GID)){await fs.attempt.chown(h,i.chown.uid,i.chown.gid)}if(i.mode&&i.mode!==DEFAULT_FILE_MODE){await fs.attempt.chmod(h,i.mode)}try{await fs.retry.rename(a)(h,t)}catch(r){if(!isException(r))throw r;if(r.code!=="ENAMETOOLONG")throw r;await fs.retry.rename(a)(h,Temp.truncate(t))}u();h=null}finally{if(d)await fs.attempt.close(d);if(h)Temp.purge(h);if(c)c();if(l)l()}}function writeFileSync(t,i,o=Q){if(lang_isString(o))return writeFileSync(t,i,{encoding:o});const a=o.timeout??ie;const c={timeout:a};let l=null;let u=null;let h=null;try{const a=K.attempt.realpathSync(t);const d=!!a;t=a||t;[u,l]=ve.get(t,o.tmpCreate||ve.create,!(o.tmpPurge===false));const p=ne&&lang_isUndefined(o.chown);const m=lang_isUndefined(o.mode);if(d&&(p||m)){const r=K.attempt.statSync(t);if(r){o={...o};if(p){o.chown={uid:r.uid,gid:r.gid}}if(m){o.mode=r.mode}}}if(!d){const i=r.dirname(t);K.attempt.mkdirSync(i,{mode:X,recursive:true})}h=K.retry.openSync(c)(u,"w",o.mode||Z);if(o.tmpCreated){o.tmpCreated(u)}if(lang_isString(i)){K.retry.writeSync(c)(h,i,0,o.encoding||Y)}else if(!lang_isUndefined(i)){K.retry.writeSync(c)(h,i,0,i.length,0)}if(o.fsync!==false){if(o.fsyncWait!==false){K.retry.fsyncSync(c)(h)}else{K.attempt.fsync(h)}}K.retry.closeSync(c)(h);h=null;if(o.chown&&(o.chown.uid!==ee||o.chown.gid!==te)){K.attempt.chownSync(u,o.chown.uid,o.chown.gid)}if(o.mode&&o.mode!==Z){K.attempt.chmodSync(u,o.mode)}try{K.retry.renameSync(c)(u,t)}catch(r){if(!lang_isException(r))throw r;if(r.code!=="ENAMETOOLONG")throw r;K.retry.renameSync(c)(u,ve.truncate(t))}l();u=null}finally{if(h)K.attempt.closeSync(h);if(u)ve.purge(u)}}var be=__nccwpck_require__(8861);var we=__nccwpck_require__(8631);const copyProperty=(t,r,i,o)=>{if(i==="length"||i==="prototype"){return}if(i==="arguments"||i==="caller"){return}const a=Object.getOwnPropertyDescriptor(t,i);const c=Object.getOwnPropertyDescriptor(r,i);if(!canCopyProperty(a,c)&&o){return}Object.defineProperty(t,i,c)};const canCopyProperty=function(t,r){return t===undefined||t.configurable||t.writable===r.writable&&t.enumerable===r.enumerable&&t.configurable===r.configurable&&(t.writable||t.value===r.value)};const changePrototype=(t,r)=>{const i=Object.getPrototypeOf(r);if(i===Object.getPrototypeOf(t)){return}Object.setPrototypeOf(t,i)};const wrappedToString=(t,r)=>`/* Wrapped ${t}*/\n${r}`;const Ee=Object.getOwnPropertyDescriptor(Function.prototype,"toString");const Se=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");const changeToString=(t,r,i)=>{const o=i===""?"":`with ${i.trim()}() `;const a=wrappedToString.bind(null,o,r.toString());Object.defineProperty(a,"name",Se);const{writable:c,enumerable:l,configurable:u}=Ee;Object.defineProperty(t,"toString",{value:a,writable:c,enumerable:l,configurable:u})};function mimicFunction(t,r,{ignoreNonConfigurable:i=false}={}){const{name:o}=t;for(const o of Reflect.ownKeys(r)){copyProperty(t,r,o,i)}changePrototype(t,r);changeToString(t,r,o);return t}const debounceFunction=(t,r={})=>{if(typeof t!=="function"){throw new TypeError(`Expected the first argument to be a function, got \`${typeof t}\``)}const{wait:i=0,maxWait:o=Number.POSITIVE_INFINITY,before:a=false,after:c=true}=r;if(i<0||o<0){throw new RangeError("`wait` and `maxWait` must not be negative.")}if(!a&&!c){throw new Error("Both `before` and `after` are false, function wouldn't be called.")}let l;let u;let h;const debouncedFunction=function(...r){const d=this;const later=()=>{l=undefined;if(u){clearTimeout(u);u=undefined}if(c){h=t.apply(d,r)}};const maxLater=()=>{u=undefined;if(l){clearTimeout(l);l=undefined}if(c){h=t.apply(d,r)}};const p=a&&!l;clearTimeout(l);l=setTimeout(later,i);if(o>0&&o!==Number.POSITIVE_INFINITY&&!u){u=setTimeout(maxLater,o)}if(p){h=t.apply(d,r)}return h};mimicFunction(debouncedFunction,t);debouncedFunction.cancel=()=>{if(l){clearTimeout(l);l=undefined}if(u){clearTimeout(u);u=undefined}};return debouncedFunction};const $e=debounceFunction;var Oe=__nccwpck_require__(4423);const Re=Object.prototype.toString;const Pe="[object Uint8Array]";const Ae="[object ArrayBuffer]";function isType(t,r,i){if(!t){return false}if(t.constructor===r){return true}return Re.call(t)===i}function isUint8Array(t){return isType(t,Uint8Array,Pe)}function isArrayBuffer(t){return isType(t,ArrayBuffer,Ae)}function isUint8ArrayOrArrayBuffer(t){return isUint8Array(t)||isArrayBuffer(t)}function assertUint8Array(t){if(!isUint8Array(t)){throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof t}\``)}}function assertUint8ArrayOrArrayBuffer(t){if(!isUint8ArrayOrArrayBuffer(t)){throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``)}}function toUint8Array(t){if(t instanceof ArrayBuffer){return new Uint8Array(t)}if(ArrayBuffer.isView(t)){return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}throw new TypeError(`Unsupported value, got \`${typeof t}\`.`)}function concatUint8Arrays(t,r){if(t.length===0){return new Uint8Array(0)}r??=t.reduce(((t,r)=>t+r.length),0);const i=new Uint8Array(r);let o=0;for(const r of t){assertUint8Array(r);i.set(r,o);o+=r.length}return i}function areUint8ArraysEqual(t,r){assertUint8Array(t);assertUint8Array(r);if(t===r){return true}if(t.length!==r.length){return false}for(let i=0;i<t.length;i++){if(t[i]!==r[i]){return false}}return true}function compareUint8Arrays(t,r){assertUint8Array(t);assertUint8Array(r);const i=Math.min(t.length,r.length);for(let o=0;o<i;o++){const i=t[o]-r[o];if(i!==0){return Math.sign(i)}}return Math.sign(t.length-r.length)}const xe={utf8:new globalThis.TextDecoder("utf8")};function uint8ArrayToString(t,r="utf8"){assertUint8ArrayOrArrayBuffer(t);xe[r]??=new globalThis.TextDecoder(r);return xe[r].decode(t)}function assertString(t){if(typeof t!=="string"){throw new TypeError(`Expected \`string\`, got \`${typeof t}\``)}}const Te=new globalThis.TextEncoder;function stringToUint8Array(t){assertString(t);return Te.encode(t)}function base64ToBase64Url(t){return t.replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}function base64UrlToBase64(t){const r=t.replaceAll("-","+").replaceAll("_","/");const i=(4-r.length%4)%4;return r+"=".repeat(i)}const Ce=65535;function uint8ArrayToBase64(t,{urlSafe:r=false}={}){assertUint8Array(t);let i="";for(let r=0;r<t.length;r+=Ce){const o=t.subarray(r,r+Ce);i+=globalThis.btoa(String.fromCodePoint.apply(undefined,o))}return r?base64ToBase64Url(i):i}function base64ToUint8Array(t){assertString(t);return Uint8Array.from(globalThis.atob(base64UrlToBase64(t)),(t=>t.codePointAt(0)))}function stringToBase64(t,{urlSafe:r=false}={}){assertString(t);return uint8ArrayToBase64(stringToUint8Array(t),{urlSafe:r})}function base64ToString(t){assertString(t);return uint8ArrayToString(base64ToUint8Array(t))}const ke=Array.from({length:256},((t,r)=>r.toString(16).padStart(2,"0")));function uint8ArrayToHex(t){assertUint8Array(t);let r="";for(let i=0;i<t.length;i++){r+=ke[t[i]]}return r}const Ie={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,b:11,c:12,d:13,e:14,f:15,A:10,B:11,C:12,D:13,E:14,F:15};function hexToUint8Array(t){assertString(t);if(t.length%2!==0){throw new Error("Invalid Hex string length.")}const r=t.length/2;const i=new Uint8Array(r);for(let o=0;o<r;o++){const r=Ie[t[o*2]];const a=Ie[t[o*2+1]];if(r===undefined||a===undefined){throw new Error(`Invalid Hex character encountered at position ${o*2}`)}i[o]=r<<4|a}return i}function getUintBE(t){const{byteLength:r}=t;if(r===6){return t.getUint16(0)*2**32+t.getUint32(2)}if(r===5){return t.getUint8(0)*2**32+t.getUint32(1)}if(r===4){return t.getUint32(0)}if(r===3){return t.getUint8(0)*2**16+t.getUint16(1)}if(r===2){return t.getUint16(0)}if(r===1){return t.getUint8(0)}}function indexOf(t,r){const i=t.length;const o=r.length;if(o===0){return-1}if(o>i){return-1}const a=i-o;for(let i=0;i<=a;i++){let a=true;for(let c=0;c<o;c++){if(t[i+c]!==r[c]){a=false;break}}if(a){return i}}return-1}function includes(t,r){return indexOf(t,r)!==-1}const Ne="aes-256-cbc";const De=new Set(["aes-256-cbc","aes-256-gcm","aes-256-ctr"]);const isSupportedEncryptionAlgorithm=t=>typeof t==="string"&&De.has(t);const createPlainObject=()=>Object.create(null);const isExist=t=>t!==undefined;const checkValueType=(t,r)=>{const i=new Set(["undefined","symbol","function"]);const o=typeof r;if(i.has(o)){throw new TypeError(`Setting a value of type \`${o}\` for key \`${t}\` is not allowed as it's not supported by JSON`)}};const Le="__internal__";const Me=`${Le}.migrations.version`;class Conf{path;events;#e;#t;#r;#s;#i={};#n=false;#o;#a;#c;constructor(t={}){const r=this.#l(t);this.#s=r;this.#u(r);this.#h(r);this.#f(r);this.events=new EventTarget;this.#t=r.encryptionKey;this.#r=r.encryptionAlgorithm??Ne;this.path=this.#d(r);this.#p(r);if(r.watch){this._watch()}}get(t,r){if(this.#s.accessPropertiesByDotNotation){return this._get(t,r)}const{store:i}=this;return t in i?i[t]:r}set(t,r){if(typeof t!=="string"&&typeof t!=="object"){throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof t}`)}if(typeof t!=="object"&&r===undefined){throw new TypeError("Use `delete()` to clear values")}if(this._containsReservedKey(t)){throw new TypeError(`Please don't use the ${Le} key, as it's used to manage this module internal operations.`)}const{store:i}=this;const set=(t,r)=>{checkValueType(t,r);if(this.#s.accessPropertiesByDotNotation){setProperty(i,t,r)}else{if(t==="__proto__"||t==="constructor"||t==="prototype"){return}i[t]=r}};if(typeof t==="object"){const r=t;for(const[t,i]of Object.entries(r)){set(t,i)}}else{set(t,r)}this.store=i}has(t){if(this.#s.accessPropertiesByDotNotation){return hasProperty(this.store,t)}return t in this.store}appendToArray(t,r){checkValueType(t,r);const i=this.#s.accessPropertiesByDotNotation?this._get(t,[]):t in this.store?this.store[t]:[];if(!Array.isArray(i)){throw new TypeError(`The key \`${t}\` is already set to a non-array value`)}this.set(t,[...i,r])}reset(...t){for(const r of t){if(isExist(this.#i[r])){this.set(r,this.#i[r])}}}delete(t){const{store:r}=this;if(this.#s.accessPropertiesByDotNotation){deleteProperty(r,t)}else{delete r[t]}this.store=r}clear(){const t=createPlainObject();for(const r of Object.keys(this.#i)){if(isExist(this.#i[r])){checkValueType(r,this.#i[r]);if(this.#s.accessPropertiesByDotNotation){setProperty(t,r,this.#i[r])}else{t[r]=this.#i[r]}}}this.store=t}onDidChange(t,r){if(typeof t!=="string"){throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof t}`)}if(typeof r!=="function"){throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof r}`)}return this._handleValueChange((()=>this.get(t)),r)}onDidAnyChange(t){if(typeof t!=="function"){throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof t}`)}return this._handleStoreChange(t)}get size(){const t=Object.keys(this.store);return t.filter((t=>!this._isReservedKeyPath(t))).length}get store(){try{const r=t.readFileSync(this.path,this.#t?null:"utf8");const i=this._decryptData(r);const parseStore=t=>{const r=this._deserialize(t);if(!this.#n){this._validate(r)}return Object.assign(createPlainObject(),r)};return parseStore(i)}catch(t){if(t?.code==="ENOENT"){this._ensureDirectory();return createPlainObject()}if(this.#s.clearInvalidConfig){const r=t;if(r.name==="SyntaxError"){return createPlainObject()}if(r.message?.startsWith("Config schema violation:")){return createPlainObject()}if(r.message==="Failed to decrypt config data."){return createPlainObject()}}throw t}}set store(r){this._ensureDirectory();if(!hasProperty(r,Le)){try{const i=t.readFileSync(this.path,this.#t?null:"utf8");const o=this._decryptData(i);const a=this._deserialize(o);if(hasProperty(a,Le)){setProperty(r,Le,getProperty(a,Le))}}catch{}}if(!this.#n){this._validate(r)}this._write(r);this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(const[t,r]of Object.entries(this.store)){if(!this._isReservedKeyPath(t)){yield[t,r]}}}_closeWatcher(){if(this.#o){this.#o.close();this.#o=undefined}if(this.#a){t.unwatchFile(this.path);this.#a=false}this.#c=undefined}_decryptData(t){const r=this.#t;if(!r){return typeof t==="string"?t:uint8ArrayToString(t)}const i=this.#r;const o=i==="aes-256-gcm"?16:0;const a=":".codePointAt(0);const c=typeof t==="string"?t.codePointAt(16):t[16];const l=a!==undefined&&c===a;if(!l){if(i==="aes-256-cbc"){return typeof t==="string"?t:uint8ArrayToString(t)}throw new Error("Failed to decrypt config data.")}const getEncryptedPayload=t=>{if(o===0){return{ciphertext:t}}const r=t.length-o;if(r<0){throw new Error("Invalid authentication tag length.")}return{ciphertext:t.slice(0,r),authenticationTag:t.slice(r)}};const u=t.slice(0,16);const h=t.slice(17);const d=typeof h==="string"?stringToUint8Array(h):h;const decrypt=t=>{const{ciphertext:o,authenticationTag:a}=getEncryptedPayload(d);const c=$.pbkdf2Sync(r,t,1e4,32,"sha512");const l=$.createDecipheriv(i,c,u);if(a){l.setAuthTag(a)}return uint8ArrayToString(concatUint8Arrays([l.update(o),l.final()]))};try{return decrypt(u)}catch{try{return decrypt(u.toString())}catch{}}if(i==="aes-256-cbc"){return typeof t==="string"?t:uint8ArrayToString(t)}throw new Error("Failed to decrypt config data.")}_handleStoreChange(t){let r=this.store;const onChange=()=>{const i=r;const o=this.store;if((0,E.isDeepStrictEqual)(o,i)){return}r=o;t.call(this,o,i)};this.events.addEventListener("change",onChange);return()=>{this.events.removeEventListener("change",onChange)}}_handleValueChange(t,r){let i=t();const onChange=()=>{const o=i;const a=t();if((0,E.isDeepStrictEqual)(a,o)){return}i=a;r.call(this,a,o)};this.events.addEventListener("change",onChange);return()=>{this.events.removeEventListener("change",onChange)}}_deserialize=t=>JSON.parse(t);_serialize=t=>JSON.stringify(t,undefined,"\t");_validate(t){if(!this.#e){return}const r=this.#e(t);if(r||!this.#e.errors){return}const i=this.#e.errors.map((({instancePath:t,message:r=""})=>`\`${t.slice(1)}\` ${r}`));throw new Error("Config schema violation: "+i.join("; "))}_ensureDirectory(){t.mkdirSync(r.dirname(this.path),{recursive:true})}_write(r){let i=this._serialize(r);const o=this.#t;if(o){const t=$.randomBytes(16);const r=$.pbkdf2Sync(o,t,1e4,32,"sha512");const a=$.createCipheriv(this.#r,r,t);const c=concatUint8Arrays([a.update(stringToUint8Array(i)),a.final()]);const l=[t,stringToUint8Array(":"),c];if(this.#r==="aes-256-gcm"){l.push(a.getAuthTag())}i=concatUint8Arrays(l)}if(S.env.SNAP){t.writeFileSync(this.path,i,{mode:this.#s.configFileMode})}else{try{writeFileSync(this.path,i,{mode:this.#s.configFileMode})}catch(r){if(r?.code==="EXDEV"){t.writeFileSync(this.path,i,{mode:this.#s.configFileMode});return}throw r}}}_watch(){this._ensureDirectory();if(!t.existsSync(this.path)){this._write(createPlainObject())}if(S.platform==="win32"||S.platform==="darwin"){this.#c??=$e((()=>{this.events.dispatchEvent(new Event("change"))}),{wait:100});const i=r.dirname(this.path);const o=r.basename(this.path);this.#o=t.watch(i,{persistent:false,encoding:"utf8"},((t,r)=>{if(r&&r!==o){return}if(typeof this.#c==="function"){this.#c()}}))}else{this.#c??=$e((()=>{this.events.dispatchEvent(new Event("change"))}),{wait:1e3});t.watchFile(this.path,{persistent:false},((t,r)=>{if(typeof this.#c==="function"){this.#c()}}));this.#a=true}}_migrate(t,r,i){let o=this._get(Me,"0.0.0");const a=Object.keys(t).filter((t=>this._shouldPerformMigration(t,o,r)));let c=structuredClone(this.store);for(const l of a){try{if(i){i(this,{fromVersion:o,toVersion:l,finalVersion:r,versions:a})}const u=t[l];u?.(this);this._set(Me,l);o=l;c=structuredClone(this.store)}catch(t){this.store=c;const r=t instanceof Error?t.message:String(t);throw new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${r}`)}}if(this._isVersionInRangeFormat(o)||!Oe.eq(o,r)){this._set(Me,r)}}_containsReservedKey(t){if(typeof t==="string"){return this._isReservedKeyPath(t)}if(!t||typeof t!=="object"){return false}return this._objectContainsReservedKey(t)}_objectContainsReservedKey(t){if(!t||typeof t!=="object"){return false}for(const[r,i]of Object.entries(t)){if(this._isReservedKeyPath(r)){return true}if(this._objectContainsReservedKey(i)){return true}}return false}_isReservedKeyPath(t){return t===Le||t.startsWith(`${Le}.`)}_isVersionInRangeFormat(t){return Oe.clean(t)===null}_shouldPerformMigration(t,r,i){if(this._isVersionInRangeFormat(t)){if(r!=="0.0.0"&&Oe.satisfies(r,t)){return false}return Oe.satisfies(i,t)}if(Oe.lte(t,r)){return false}if(Oe.gt(t,i)){return false}return true}_get(t,r){return getProperty(this.store,t,r)}_set(t,r){const{store:i}=this;setProperty(i,t,r);this.store=i}#l(t){const r={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:false,accessPropertiesByDotNotation:true,configFileMode:438,...t};r.encryptionAlgorithm??=Ne;if(!isSupportedEncryptionAlgorithm(r.encryptionAlgorithm)){throw new TypeError(`The \`encryptionAlgorithm\` option must be one of: ${[...De].join(", ")}`)}if(!r.cwd){if(!r.projectName){throw new Error("Please specify the `projectName` option.")}r.cwd=envPaths(r.projectName,{suffix:r.projectSuffix}).config}if(typeof r.fileExtension==="string"){r.fileExtension=r.fileExtension.replace(/^\.+/,"")}return r}#u(t){if(!(t.schema??t.ajvOptions??t.rootSchema)){return}if(t.schema&&typeof t.schema!=="object"){throw new TypeError("The `schema` option must be an object.")}const r=we["default"];const i=new be.Ajv2020({allErrors:true,useDefaults:true,...t.ajvOptions});r(i);const o={...t.rootSchema,type:"object",properties:t.schema};this.#e=i.compile(o);this.#m(t.schema)}#m(t){const r=Object.entries(t??{});for(const[t,i]of r){if(!i||typeof i!=="object"){continue}if(!Object.hasOwn(i,"default")){continue}const{default:r}=i;if(r===undefined){continue}this.#i[t]=r}}#h(t){if(t.defaults){Object.assign(this.#i,t.defaults)}}#f(t){if(t.serialize){this._serialize=t.serialize}if(t.deserialize){this._deserialize=t.deserialize}}#d(t){const i=typeof t.fileExtension==="string"?t.fileExtension:undefined;const o=i?`.${i}`:"";return r.resolve(t.cwd,`${t.configName??"config"}${o}`)}#p(t){if(t.migrations){this.#g(t);this._validate(this.store);return}const r=this.store;const i=Object.assign(createPlainObject(),t.defaults??{},r);this._validate(i);try{O.deepEqual(r,i)}catch{this.store=i}}#g(t){const{migrations:r,projectVersion:i}=t;if(!r){return}if(!i){throw new Error("Please specify the `projectVersion` option.")}this.#n=true;try{const o=this.store;const a=Object.assign(createPlainObject(),t.defaults??{},o);try{O.deepEqual(o,a)}catch{this._write(a)}this._migrate(r,i,t.beforeEachMigration)}finally{this.#n=false}}}var je=__nccwpck_require__(9212);var Fe=__nccwpck_require__(6133);var Ue=__nccwpck_require__.n(Fe);var Be=__nccwpck_require__(5059);var He=__nccwpck_require__.n(Be);var Ve=__nccwpck_require__(9642);var ze=__nccwpck_require__.n(Ve);const Ge=require("node:stream/promises");var We=__nccwpck_require__(4434);var qe=__nccwpck_require__(7515);const Ke=require("node:string_decoder");const Ye=typeof process==="object"&&process?process:{stdout:null,stderr:null};const isStream=t=>!!t&&typeof t==="object"&&(t instanceof Minipass||t instanceof N||isReadable(t)||isWritable(t));const isReadable=t=>!!t&&typeof t==="object"&&t instanceof I.EventEmitter&&typeof t.pipe==="function"&&t.pipe!==N.Writable.prototype.pipe;const isWritable=t=>!!t&&typeof t==="object"&&t instanceof I.EventEmitter&&typeof t.write==="function"&&typeof t.end==="function";const Ze=Symbol("EOF");const Xe=Symbol("maybeEmitEnd");const Je=Symbol("emittedEnd");const Qe=Symbol("emittingEnd");const et=Symbol("emittedError");const tt=Symbol("closed");const rt=Symbol("read");const st=Symbol("flush");const it=Symbol("flushChunk");const nt=Symbol("encoding");const ot=Symbol("decoder");const at=Symbol("flowing");const ct=Symbol("paused");const ut=Symbol("resume");const ht=Symbol("buffer");const ft=Symbol("pipes");const dt=Symbol("bufferLength");const pt=Symbol("bufferPush");const mt=Symbol("bufferShift");const yt=Symbol("objectMode");const _t=Symbol("destroyed");const vt=Symbol("error");const bt=Symbol("emitData");const wt=Symbol("emitEnd");const Et=Symbol("emitEnd2");const St=Symbol("async");const $t=Symbol("abort");const Ot=Symbol("aborted");const Rt=Symbol("signal");const Pt=Symbol("dataListeners");const At=Symbol("discarded");const defer=t=>Promise.resolve().then(t);const nodefer=t=>t();const isEndish=t=>t==="end"||t==="finish"||t==="prefinish";const isArrayBufferLike=t=>t instanceof ArrayBuffer||!!t&&typeof t==="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0;const isArrayBufferView=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t);class Pipe{src;dest;opts;ondrain;constructor(t,r,i){this.src=t;this.dest=r;this.opts=i;this.ondrain=()=>t[ut]();this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe();if(this.opts.end)this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors);super.unpipe()}constructor(t,r,i){super(t,r,i);this.proxyErrors=t=>r.emit("error",t);t.on("error",this.proxyErrors)}}const isObjectModeOptions=t=>!!t.objectMode;const isEncodingOptions=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer";class Minipass extends I.EventEmitter{[at]=false;[ct]=false;[ft]=[];[ht]=[];[yt];[nt];[St];[ot];[Ze]=false;[Je]=false;[Qe]=false;[tt]=false;[et]=null;[dt]=0;[_t]=false;[Rt];[Ot]=false;[Pt]=0;[At]=false;writable=true;readable=true;constructor(...t){const r=t[0]||{};super();if(r.objectMode&&typeof r.encoding==="string"){throw new TypeError("Encoding and objectMode may not be used together")}if(isObjectModeOptions(r)){this[yt]=true;this[nt]=null}else if(isEncodingOptions(r)){this[nt]=r.encoding;this[yt]=false}else{this[yt]=false;this[nt]=null}this[St]=!!r.async;this[ot]=this[nt]?new Ke.StringDecoder(this[nt]):null;if(r&&r.debugExposeBuffer===true){Object.defineProperty(this,"buffer",{get:()=>this[ht]})}if(r&&r.debugExposePipes===true){Object.defineProperty(this,"pipes",{get:()=>this[ft]})}const{signal:i}=r;if(i){this[Rt]=i;if(i.aborted){this[$t]()}else{i.addEventListener("abort",(()=>this[$t]()))}}}get bufferLength(){return this[dt]}get encoding(){return this[nt]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[yt]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[St]}set["async"](t){this[St]=this[St]||!!t}[$t](){this[Ot]=true;this.emit("abort",this[Rt]?.reason);this.destroy(this[Rt]?.reason)}get aborted(){return this[Ot]}set aborted(t){}write(t,r,i){if(this[Ot])return false;if(this[Ze])throw new Error("write after end");if(this[_t]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof r==="function"){i=r;r="utf8"}if(!r)r="utf8";const o=this[St]?defer:nodefer;if(!this[yt]&&!Buffer.isBuffer(t)){if(isArrayBufferView(t)){t=Buffer.from(t.buffer,t.byteOffset,t.byteLength)}else if(isArrayBufferLike(t)){t=Buffer.from(t)}else if(typeof t!=="string"){throw new Error("Non-contiguous data written to non-objectMode stream")}}if(this[yt]){if(this[at]&&this[dt]!==0)this[st](true);if(this[at])this.emit("data",t);else this[pt](t);if(this[dt]!==0)this.emit("readable");if(i)o(i);return this[at]}if(!t.length){if(this[dt]!==0)this.emit("readable");if(i)o(i);return this[at]}if(typeof t==="string"&&!(r===this[nt]&&!this[ot]?.lastNeed)){t=Buffer.from(t,r)}if(Buffer.isBuffer(t)&&this[nt]){t=this[ot].write(t)}if(this[at]&&this[dt]!==0)this[st](true);if(this[at])this.emit("data",t);else this[pt](t);if(this[dt]!==0)this.emit("readable");if(i)o(i);return this[at]}read(t){if(this[_t])return null;this[At]=false;if(this[dt]===0||t===0||t&&t>this[dt]){this[Xe]();return null}if(this[yt])t=null;if(this[ht].length>1&&!this[yt]){this[ht]=[this[nt]?this[ht].join(""):Buffer.concat(this[ht],this[dt])]}const r=this[rt](t||null,this[ht][0]);this[Xe]();return r}[rt](t,r){if(this[yt])this[mt]();else{const i=r;if(t===i.length||t===null)this[mt]();else if(typeof i==="string"){this[ht][0]=i.slice(t);r=i.slice(0,t);this[dt]-=t}else{this[ht][0]=i.subarray(t);r=i.subarray(0,t);this[dt]-=t}}this.emit("data",r);if(!this[ht].length&&!this[Ze])this.emit("drain");return r}end(t,r,i){if(typeof t==="function"){i=t;t=undefined}if(typeof r==="function"){i=r;r="utf8"}if(t!==undefined)this.write(t,r);if(i)this.once("end",i);this[Ze]=true;this.writable=false;if(this[at]||!this[ct])this[Xe]();return this}[ut](){if(this[_t])return;if(!this[Pt]&&!this[ft].length){this[At]=true}this[ct]=false;this[at]=true;this.emit("resume");if(this[ht].length)this[st]();else if(this[Ze])this[Xe]();else this.emit("drain")}resume(){return this[ut]()}pause(){this[at]=false;this[ct]=true;this[At]=false}get destroyed(){return this[_t]}get flowing(){return this[at]}get paused(){return this[ct]}[pt](t){if(this[yt])this[dt]+=1;else this[dt]+=t.length;this[ht].push(t)}[mt](){if(this[yt])this[dt]-=1;else this[dt]-=this[ht][0].length;return this[ht].shift()}[st](t=false){do{}while(this[it](this[mt]())&&this[ht].length);if(!t&&!this[ht].length&&!this[Ze])this.emit("drain")}[it](t){this.emit("data",t);return this[at]}pipe(t,r){if(this[_t])return t;this[At]=false;const i=this[Je];r=r||{};if(t===Ye.stdout||t===Ye.stderr)r.end=false;else r.end=r.end!==false;r.proxyErrors=!!r.proxyErrors;if(i){if(r.end)t.end()}else{this[ft].push(!r.proxyErrors?new Pipe(this,t,r):new PipeProxyErrors(this,t,r));if(this[St])defer((()=>this[ut]()));else this[ut]()}return t}unpipe(t){const r=this[ft].find((r=>r.dest===t));if(r){if(this[ft].length===1){if(this[at]&&this[Pt]===0){this[at]=false}this[ft]=[]}else this[ft].splice(this[ft].indexOf(r),1);r.unpipe()}}addListener(t,r){return this.on(t,r)}on(t,r){const i=super.on(t,r);if(t==="data"){this[At]=false;this[Pt]++;if(!this[ft].length&&!this[at]){this[ut]()}}else if(t==="readable"&&this[dt]!==0){super.emit("readable")}else if(isEndish(t)&&this[Je]){super.emit(t);this.removeAllListeners(t)}else if(t==="error"&&this[et]){const t=r;if(this[St])defer((()=>t.call(this,this[et])));else t.call(this,this[et])}return i}removeListener(t,r){return this.off(t,r)}off(t,r){const i=super.off(t,r);if(t==="data"){this[Pt]=this.listeners("data").length;if(this[Pt]===0&&!this[At]&&!this[ft].length){this[at]=false}}return i}removeAllListeners(t){const r=super.removeAllListeners(t);if(t==="data"||t===undefined){this[Pt]=0;if(!this[At]&&!this[ft].length){this[at]=false}}return r}get emittedEnd(){return this[Je]}[Xe](){if(!this[Qe]&&!this[Je]&&!this[_t]&&this[ht].length===0&&this[Ze]){this[Qe]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[tt])this.emit("close");this[Qe]=false}}emit(t,...r){const i=r[0];if(t!=="error"&&t!=="close"&&t!==_t&&this[_t]){return false}else if(t==="data"){return!this[yt]&&!i?false:this[St]?(defer((()=>this[bt](i))),true):this[bt](i)}else if(t==="end"){return this[wt]()}else if(t==="close"){this[tt]=true;if(!this[Je]&&!this[_t])return false;const t=super.emit("close");this.removeAllListeners("close");return t}else if(t==="error"){this[et]=i;super.emit(vt,i);const t=!this[Rt]||this.listeners("error").length?super.emit("error",i):false;this[Xe]();return t}else if(t==="resume"){const t=super.emit("resume");this[Xe]();return t}else if(t==="finish"||t==="prefinish"){const r=super.emit(t);this.removeAllListeners(t);return r}const o=super.emit(t,...r);this[Xe]();return o}[bt](t){for(const r of this[ft]){if(r.dest.write(t)===false)this.pause()}const r=this[At]?false:super.emit("data",t);this[Xe]();return r}[wt](){if(this[Je])return false;this[Je]=true;this.readable=false;return this[St]?(defer((()=>this[Et]())),true):this[Et]()}[Et](){if(this[ot]){const t=this[ot].end();if(t){for(const r of this[ft]){r.dest.write(t)}if(!this[At])super.emit("data",t)}}for(const t of this[ft]){t.end()}const t=super.emit("end");this.removeAllListeners("end");return t}async collect(){const t=Object.assign([],{dataLength:0});if(!this[yt])t.dataLength=0;const r=this.promise();this.on("data",(r=>{t.push(r);if(!this[yt])t.dataLength+=r.length}));await r;return t}async concat(){if(this[yt]){throw new Error("cannot concat in objectMode")}const t=await this.collect();return this[nt]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise(((t,r)=>{this.on(_t,(()=>r(new Error("stream destroyed"))));this.on("error",(t=>r(t)));this.on("end",(()=>t()))}))}[Symbol.asyncIterator](){this[At]=false;let t=false;const stop=async()=>{this.pause();t=true;return{value:undefined,done:true}};const next=()=>{if(t)return stop();const r=this.read();if(r!==null)return Promise.resolve({done:false,value:r});if(this[Ze])return stop();let i;let o;const onerr=t=>{this.off("data",ondata);this.off("end",onend);this.off(_t,ondestroy);stop();o(t)};const ondata=t=>{this.off("error",onerr);this.off("end",onend);this.off(_t,ondestroy);this.pause();i({value:t,done:!!this[Ze]})};const onend=()=>{this.off("error",onerr);this.off("data",ondata);this.off(_t,ondestroy);stop();i({done:true,value:undefined})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((t,r)=>{o=r;i=t;this.once(_t,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next,throw:stop,return:stop,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[At]=false;let t=false;const stop=()=>{this.pause();this.off(vt,stop);this.off(_t,stop);this.off("end",stop);t=true;return{done:true,value:undefined}};const next=()=>{if(t)return stop();const r=this.read();return r===null?stop():{done:false,value:r}};this.once("end",stop);this.once(vt,stop);this.once(_t,stop);return{next:next,throw:stop,return:stop,[Symbol.iterator](){return this}}}destroy(t){if(this[_t]){if(t)this.emit("error",t);else this.emit(_t);return this}this[_t]=true;this[At]=true;this[ht].length=0;this[dt]=0;const r=this;if(typeof r.close==="function"&&!this[tt])r.close();if(t)this.emit("error",t);else this.emit(_t);return this}static get isStream(){return isStream}}const xt=qe.writev;const Tt=Symbol("_autoClose");const Ct=Symbol("_close");const kt=Symbol("_ended");const It=Symbol("_fd");const Nt=Symbol("_finished");const Dt=Symbol("_flags");const Lt=Symbol("_flush");const Mt=Symbol("_handleChunk");const jt=Symbol("_makeBuf");const Ft=Symbol("_mode");const Ut=Symbol("_needDrain");const Bt=Symbol("_onerror");const Ht=Symbol("_onopen");const Vt=Symbol("_onread");const zt=Symbol("_onwrite");const Gt=Symbol("_open");const Wt=Symbol("_path");const qt=Symbol("_pos");const Kt=Symbol("_queue");const Yt=Symbol("_read");const Zt=Symbol("_readSize");const Xt=Symbol("_reading");const Jt=Symbol("_remain");const Qt=Symbol("_size");const er=Symbol("_write");const tr=Symbol("_writing");const rr=Symbol("_defaultFlag");const sr=Symbol("_errored");class ReadStream extends Minipass{[sr]=false;[It];[Wt];[Zt];[Xt]=false;[Qt];[Jt];[Tt];constructor(t,r){r=r||{};super(r);this.readable=true;this.writable=false;if(typeof t!=="string"){throw new TypeError("path must be a string")}this[sr]=false;this[It]=typeof r.fd==="number"?r.fd:undefined;this[Wt]=t;this[Zt]=r.readSize||16*1024*1024;this[Xt]=false;this[Qt]=typeof r.size==="number"?r.size:Infinity;this[Jt]=this[Qt];this[Tt]=typeof r.autoClose==="boolean"?r.autoClose:true;if(typeof this[It]==="number"){this[Yt]()}else{this[Gt]()}}get fd(){return this[It]}get path(){return this[Wt]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[Gt](){qe.open(this[Wt],"r",((t,r)=>this[Ht](t,r)))}[Ht](t,r){if(t){this[Bt](t)}else{this[It]=r;this.emit("open",r);this[Yt]()}}[jt](){return Buffer.allocUnsafe(Math.min(this[Zt],this[Jt]))}[Yt](){if(!this[Xt]){this[Xt]=true;const t=this[jt]();if(t.length===0){return process.nextTick((()=>this[Vt](null,0,t)))}qe.read(this[It],t,0,t.length,null,((t,r,i)=>this[Vt](t,r,i)))}}[Vt](t,r,i){this[Xt]=false;if(t){this[Bt](t)}else if(this[Mt](r,i)){this[Yt]()}}[Ct](){if(this[Tt]&&typeof this[It]==="number"){const t=this[It];this[It]=undefined;qe.close(t,(t=>t?this.emit("error",t):this.emit("close")))}}[Bt](t){this[Xt]=true;this[Ct]();this.emit("error",t)}[Mt](t,r){let i=false;this[Jt]-=t;if(t>0){i=super.write(t<r.length?r.subarray(0,t):r)}if(t===0||this[Jt]<=0){i=false;this[Ct]();super.end()}return i}emit(t,...r){switch(t){case"prefinish":case"finish":return false;case"drain":if(typeof this[It]==="number"){this[Yt]()}return false;case"error":if(this[sr]){return false}this[sr]=true;return super.emit(t,...r);default:return super.emit(t,...r)}}}class ReadStreamSync extends ReadStream{[Gt](){let t=true;try{this[Ht](null,qe.openSync(this[Wt],"r"));t=false}finally{if(t){this[Ct]()}}}[Yt](){let t=true;try{if(!this[Xt]){this[Xt]=true;do{const t=this[jt]();const r=t.length===0?0:qe.readSync(this[It],t,0,t.length,null);if(!this[Mt](r,t)){break}}while(true);this[Xt]=false}t=false}finally{if(t){this[Ct]()}}}[Ct](){if(this[Tt]&&typeof this[It]==="number"){const t=this[It];this[It]=undefined;qe.closeSync(t);this.emit("close")}}}class WriteStream extends We{readable=false;writable=true;[sr]=false;[tr]=false;[kt]=false;[Kt]=[];[Ut]=false;[Wt];[Ft];[Tt];[It];[rr];[Dt];[Nt]=false;[qt];constructor(t,r){r=r||{};super(r);this[Wt]=t;this[It]=typeof r.fd==="number"?r.fd:undefined;this[Ft]=r.mode===undefined?438:r.mode;this[qt]=typeof r.start==="number"?r.start:undefined;this[Tt]=typeof r.autoClose==="boolean"?r.autoClose:true;const i=this[qt]!==undefined?"r+":"w";this[rr]=r.flags===undefined;this[Dt]=r.flags===undefined?i:r.flags;if(this[It]===undefined){this[Gt]()}}emit(t,...r){if(t==="error"){if(this[sr]){return false}this[sr]=true}return super.emit(t,...r)}get fd(){return this[It]}get path(){return this[Wt]}[Bt](t){this[Ct]();this[tr]=true;this.emit("error",t)}[Gt](){qe.open(this[Wt],this[Dt],this[Ft],((t,r)=>this[Ht](t,r)))}[Ht](t,r){if(this[rr]&&this[Dt]==="r+"&&t&&t.code==="ENOENT"){this[Dt]="w";this[Gt]()}else if(t){this[Bt](t)}else{this[It]=r;this.emit("open",r);if(!this[tr]){this[Lt]()}}}end(t,r){if(t){this.write(t,r)}this[kt]=true;if(!this[tr]&&!this[Kt].length&&typeof this[It]==="number"){this[zt](null,0)}return this}write(t,r){if(typeof t==="string"){t=Buffer.from(t,r)}if(this[kt]){this.emit("error",new Error("write() after end()"));return false}if(this[It]===undefined||this[tr]||this[Kt].length){this[Kt].push(t);this[Ut]=true;return false}this[tr]=true;this[er](t);return true}[er](t){qe.write(this[It],t,0,t.length,this[qt],((t,r)=>this[zt](t,r)))}[zt](t,r){if(t){this[Bt](t)}else{if(this[qt]!==undefined&&typeof r==="number"){this[qt]+=r}if(this[Kt].length){this[Lt]()}else{this[tr]=false;if(this[kt]&&!this[Nt]){this[Nt]=true;this[Ct]();this.emit("finish")}else if(this[Ut]){this[Ut]=false;this.emit("drain")}}}}[Lt](){if(this[Kt].length===0){if(this[kt]){this[zt](null,0)}}else if(this[Kt].length===1){this[er](this[Kt].pop())}else{const t=this[Kt];this[Kt]=[];xt(this[It],t,this[qt],((t,r)=>this[zt](t,r)))}}[Ct](){if(this[Tt]&&typeof this[It]==="number"){const t=this[It];this[It]=undefined;qe.close(t,(t=>t?this.emit("error",t):this.emit("close")))}}}class WriteStreamSync extends WriteStream{[Gt](){let t;if(this[rr]&&this[Dt]==="r+"){try{t=qe.openSync(this[Wt],this[Dt],this[Ft])}catch(t){if(t?.code==="ENOENT"){this[Dt]="w";return this[Gt]()}else{throw t}}}else{t=qe.openSync(this[Wt],this[Dt],this[Ft])}this[Ht](null,t)}[Ct](){if(this[Tt]&&typeof this[It]==="number"){const t=this[It];this[It]=undefined;qe.closeSync(t);this.emit("close")}}[er](t){let r=true;try{this[zt](null,qe.writeSync(this[It],t,0,t.length,this[qt]));r=false}finally{if(r){try{this[Ct]()}catch{}}}}}var ir=__nccwpck_require__(6928);const nr=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"],["onentry","onReadEntry"]]);const isSyncFile=t=>!!t.sync&&!!t.file;const isAsyncFile=t=>!t.sync&&!!t.file;const isSyncNoFile=t=>!!t.sync&&!t.file;const isAsyncNoFile=t=>!t.sync&&!t.file;const isSync=t=>!!t.sync;const isAsync=t=>!t.sync;const isFile=t=>!!t.file;const isNoFile=t=>!t.file;const dealiasKey=t=>{const r=nr.get(t);if(r)return r;return t};const dealias=(t={})=>{if(!t)return{};const r={};for(const[i,o]of Object.entries(t)){const t=dealiasKey(i);r[t]=o}if(r.chmod===undefined&&r.noChmod===false){r.chmod=true}delete r.noChmod;return r};const makeCommand=(t,r,i,o,a)=>Object.assign(((c=[],l,u)=>{if(Array.isArray(c)){l=c;c={}}if(typeof l==="function"){u=l;l=undefined}if(!l){l=[]}else{l=Array.from(l)}const h=dealias(c);a?.(h,l);if(isSyncFile(h)){if(typeof u==="function"){throw new TypeError("callback not supported for sync tar functions")}return t(h,l)}else if(isAsyncFile(h)){const t=r(h,l);const i=u?u:undefined;return i?t.then((()=>i()),i):t}else if(isSyncNoFile(h)){if(typeof u==="function"){throw new TypeError("callback not supported for sync tar functions")}return i(h,l)}else if(isAsyncNoFile(h)){if(typeof u==="function"){throw new TypeError("callback only supported with file option")}return o(h,l)}else{throw new Error("impossible options??")}}),{syncFile:t,asyncFile:r,syncNoFile:i,asyncNoFile:o,validate:a});const ar=require("assert");var cr=__nccwpck_require__(181);const lr=require("zlib");var ur=__nccwpck_require__.t(lr,2);const hr=lr.constants||{ZLIB_VERNUM:4736};const fr=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:Infinity,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},hr));const dr=cr.Buffer.concat;const pr=Object.getOwnPropertyDescriptor(cr.Buffer,"concat");const noop=t=>t;const mr=pr?.writable===true||pr?.set!==undefined?t=>{cr.Buffer.concat=t?noop:dr}:t=>{};const gr=Symbol("_superWrite");class ZlibError extends Error{code;errno;constructor(t,r){super("zlib: "+t.message,{cause:t});this.code=t.code;this.errno=t.errno;if(!this.code)this.code="ZLIB_ERROR";this.message="zlib: "+t.message;Error.captureStackTrace(this,r??this.constructor)}get name(){return"ZlibError"}}const yr=Symbol("flushFlag");class ZlibBase extends Minipass{#y=false;#_=false;#v;#b;#w;#E;#S;get sawError(){return this.#y}get handle(){return this.#E}get flushFlag(){return this.#v}constructor(t,r){if(!t||typeof t!=="object")throw new TypeError("invalid options for ZlibBase constructor");super(t);this.#v=t.flush??0;this.#b=t.finishFlush??0;this.#w=t.fullFlushFlag??0;if(typeof ur[r]!=="function"){throw new TypeError("Compression method not supported: "+r)}try{this.#E=new ur[r](t)}catch(t){throw new ZlibError(t,this.constructor)}this.#S=t=>{if(this.#y)return;this.#y=true;this.close();this.emit("error",t)};this.#E?.on("error",(t=>this.#S(new ZlibError(t))));this.once("end",(()=>this.close))}close(){if(this.#E){this.#E.close();this.#E=undefined;this.emit("close")}}reset(){if(!this.#y){ar(this.#E,"zlib binding closed");return this.#E.reset?.()}}flush(t){if(this.ended)return;if(typeof t!=="number")t=this.#w;this.write(Object.assign(cr.Buffer.alloc(0),{[yr]:t}))}end(t,r,i){if(typeof t==="function"){i=t;r=undefined;t=undefined}if(typeof r==="function"){i=r;r=undefined}if(t){if(r)this.write(t,r);else this.write(t)}this.flush(this.#b);this.#_=true;return super.end(i)}get ended(){return this.#_}[gr](t){return super.write(t)}write(t,r,i){if(typeof r==="function")i=r,r="utf8";if(typeof t==="string")t=cr.Buffer.from(t,r);if(this.#y)return;ar(this.#E,"zlib binding closed");const o=this.#E._handle;const a=o.close;o.close=()=>{};const c=this.#E.close;this.#E.close=()=>{};mr(true);let l=undefined;try{const r=typeof t[yr]==="number"?t[yr]:this.#v;l=this.#E._processChunk(t,r);mr(false)}catch(t){mr(false);this.#S(new ZlibError(t,this.write))}finally{if(this.#E){this.#E._handle=o;o.close=a;this.#E.close=c;this.#E.removeAllListeners("error")}}if(this.#E)this.#E.on("error",(t=>this.#S(new ZlibError(t,this.write))));let u;if(l){if(Array.isArray(l)&&l.length>0){const t=l[0];u=this[gr](cr.Buffer.from(t));for(let t=1;t<l.length;t++){u=this[gr](l[t])}}else{u=this[gr](cr.Buffer.from(l))}}if(i)i();return u}}class Zlib extends ZlibBase{#$;#O;constructor(t,r){t=t||{};t.flush=t.flush||fr.Z_NO_FLUSH;t.finishFlush=t.finishFlush||fr.Z_FINISH;t.fullFlushFlag=fr.Z_FULL_FLUSH;super(t,r);this.#$=t.level;this.#O=t.strategy}params(t,r){if(this.sawError)return;if(!this.handle)throw new Error("cannot switch params when binding is closed");if(!this.handle.params)throw new Error("not supported in this implementation");if(this.#$!==t||this.#O!==r){this.flush(fr.Z_SYNC_FLUSH);ar(this.handle,"zlib binding closed");const i=this.handle.flush;this.handle.flush=(t,r)=>{if(typeof t==="function"){r=t;t=this.flushFlag}this.flush(t);r?.()};try{this.handle.params(t,r)}finally{this.handle.flush=i}if(this.handle){this.#$=t;this.#O=r}}}}class Deflate extends Zlib{constructor(t){super(t,"Deflate")}}class Inflate extends Zlib{constructor(t){super(t,"Inflate")}}class Gzip extends Zlib{#R;constructor(t){super(t,"Gzip");this.#R=t&&!!t.portable}[gr](t){if(!this.#R)return super[gr](t);this.#R=false;t[9]=255;return super[gr](t)}}class Gunzip extends Zlib{constructor(t){super(t,"Gunzip")}}class DeflateRaw extends Zlib{constructor(t){super(t,"DeflateRaw")}}class InflateRaw extends Zlib{constructor(t){super(t,"InflateRaw")}}class Unzip extends Zlib{constructor(t){super(t,"Unzip")}}class Brotli extends ZlibBase{constructor(t,r){t=t||{};t.flush=t.flush||fr.BROTLI_OPERATION_PROCESS;t.finishFlush=t.finishFlush||fr.BROTLI_OPERATION_FINISH;t.fullFlushFlag=fr.BROTLI_OPERATION_FLUSH;super(t,r)}}class BrotliCompress extends Brotli{constructor(t){super(t,"BrotliCompress")}}class BrotliDecompress extends Brotli{constructor(t){super(t,"BrotliDecompress")}}class Zstd extends ZlibBase{constructor(t,r){t=t||{};t.flush=t.flush||fr.ZSTD_e_continue;t.finishFlush=t.finishFlush||fr.ZSTD_e_end;t.fullFlushFlag=fr.ZSTD_e_flush;super(t,r)}}class ZstdCompress extends Zstd{constructor(t){super(t,"ZstdCompress")}}class ZstdDecompress extends Zstd{constructor(t){super(t,"ZstdDecompress")}}const encode=(t,r)=>{if(!Number.isSafeInteger(t)){throw Error("cannot encode number outside of javascript safe integer range")}else if(t<0){encodeNegative(t,r)}else{encodePositive(t,r)}return r};const encodePositive=(t,r)=>{r[0]=128;for(var i=r.length;i>1;i--){r[i-1]=t&255;t=Math.floor(t/256)}};const encodeNegative=(t,r)=>{r[0]=255;var i=false;t=t*-1;for(var o=r.length;o>1;o--){var a=t&255;t=Math.floor(t/256);if(i){r[o-1]=onesComp(a)}else if(a===0){r[o-1]=0}else{i=true;r[o-1]=twosComp(a)}}};const parse=t=>{const r=t[0];const i=r===128?pos(t.subarray(1,t.length)):r===255?twos(t):null;if(i===null){throw Error("invalid base256 encoding")}if(!Number.isSafeInteger(i)){throw Error("parsed number outside of javascript safe integer range")}return i};const twos=t=>{var r=t.length;var i=0;var o=false;for(var a=r-1;a>-1;a--){var c=Number(t[a]);var l;if(o){l=onesComp(c)}else if(c===0){l=c}else{o=true;l=twosComp(c)}if(l!==0){i-=l*Math.pow(256,r-a-1)}}return i};const pos=t=>{var r=t.length;var i=0;for(var o=r-1;o>-1;o--){var a=Number(t[o]);if(a!==0){i+=a*Math.pow(256,r-o-1)}}return i};const onesComp=t=>(255^t)&255;const twosComp=t=>(255^t)+1&255;const isCode=t=>_r.has(t);const isName=t=>vr.has(t);const _r=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);const vr=new Map(Array.from(_r).map((t=>[t[1],t[0]])));class Header{cksumValid=false;needPax=false;nullBlock=false;block;path;mode;uid;gid;size;cksum;#P="Unsupported";linkpath;uname;gname;devmaj=0;devmin=0;atime;ctime;mtime;charset;comment;constructor(t,r=0,i,o){if(Buffer.isBuffer(t)){this.decode(t,r||0,i,o)}else if(t){this.#A(t)}}decode(t,r,i,o){if(!r){r=0}if(!t||!(t.length>=r+512)){throw new Error("need 512 bytes for header")}this.path=i?.path??decString(t,r,100);this.mode=i?.mode??o?.mode??decNumber(t,r+100,8);this.uid=i?.uid??o?.uid??decNumber(t,r+108,8);this.gid=i?.gid??o?.gid??decNumber(t,r+116,8);this.size=i?.size??o?.size??decNumber(t,r+124,12);this.mtime=i?.mtime??o?.mtime??decDate(t,r+136,12);this.cksum=decNumber(t,r+148,12);if(o)this.#A(o,true);if(i)this.#A(i);const a=decString(t,r+156,1);if(isCode(a)){this.#P=a||"0"}if(this.#P==="0"&&this.path.slice(-1)==="/"){this.#P="5"}if(this.#P==="5"){this.size=0}this.linkpath=decString(t,r+157,100);if(t.subarray(r+257,r+265).toString()==="ustar\x0000"){this.uname=i?.uname??o?.uname??decString(t,r+265,32);this.gname=i?.gname??o?.gname??decString(t,r+297,32);this.devmaj=i?.devmaj??o?.devmaj??decNumber(t,r+329,8)??0;this.devmin=i?.devmin??o?.devmin??decNumber(t,r+337,8)??0;if(t[r+475]!==0){const i=decString(t,r+345,155);this.path=i+"/"+this.path}else{const a=decString(t,r+345,130);if(a){this.path=a+"/"+this.path}this.atime=i?.atime??o?.atime??decDate(t,r+476,12);this.ctime=i?.ctime??o?.ctime??decDate(t,r+488,12)}}let c=8*32;for(let i=r;i<r+148;i++){c+=t[i]}for(let i=r+156;i<r+512;i++){c+=t[i]}this.cksumValid=c===this.cksum;if(this.cksum===undefined&&c===8*32){this.nullBlock=true}}#A(t,r=false){Object.assign(this,Object.fromEntries(Object.entries(t).filter((([t,i])=>!(i===null||i===undefined||t==="path"&&r||t==="linkpath"&&r||t==="global")))))}encode(t,r=0){if(!t){t=this.block=Buffer.alloc(512)}if(this.#P==="Unsupported"){this.#P="0"}if(!(t.length>=r+512)){throw new Error("need 512 bytes for header")}const i=this.ctime||this.atime?130:155;const o=splitPrefix(this.path||"",i);const a=o[0];const c=o[1];this.needPax=!!o[2];this.needPax=encString(t,r,100,a)||this.needPax;this.needPax=encNumber(t,r+100,8,this.mode)||this.needPax;this.needPax=encNumber(t,r+108,8,this.uid)||this.needPax;this.needPax=encNumber(t,r+116,8,this.gid)||this.needPax;this.needPax=encNumber(t,r+124,12,this.size)||this.needPax;this.needPax=encDate(t,r+136,12,this.mtime)||this.needPax;t[r+156]=this.#P.charCodeAt(0);this.needPax=encString(t,r+157,100,this.linkpath)||this.needPax;t.write("ustar\x0000",r+257,8);this.needPax=encString(t,r+265,32,this.uname)||this.needPax;this.needPax=encString(t,r+297,32,this.gname)||this.needPax;this.needPax=encNumber(t,r+329,8,this.devmaj)||this.needPax;this.needPax=encNumber(t,r+337,8,this.devmin)||this.needPax;this.needPax=encString(t,r+345,i,c)||this.needPax;if(t[r+475]!==0){this.needPax=encString(t,r+345,155,c)||this.needPax}else{this.needPax=encString(t,r+345,130,c)||this.needPax;this.needPax=encDate(t,r+476,12,this.atime)||this.needPax;this.needPax=encDate(t,r+488,12,this.ctime)||this.needPax}let l=8*32;for(let i=r;i<r+148;i++){l+=t[i]}for(let i=r+156;i<r+512;i++){l+=t[i]}this.cksum=l;encNumber(t,r+148,8,this.cksum);this.cksumValid=true;return this.needPax}get type(){return this.#P==="Unsupported"?this.#P:_r.get(this.#P)}get typeKey(){return this.#P}set type(t){const r=String(vr.get(t));if(isCode(r)||r==="Unsupported"){this.#P=r}else if(isCode(t)){this.#P=t}else{throw new TypeError("invalid entry type: "+t)}}}const splitPrefix=(t,i)=>{const o=100;let a=t;let c="";let l=undefined;const u=r.posix.parse(t).root||".";if(Buffer.byteLength(a)<o){l=[a,c,false]}else{c=r.posix.dirname(a);a=r.posix.basename(a);do{if(Buffer.byteLength(a)<=o&&Buffer.byteLength(c)<=i){l=[a,c,false]}else if(Buffer.byteLength(a)>o&&Buffer.byteLength(c)<=i){l=[a.slice(0,o-1),c,true]}else{a=r.posix.join(r.posix.basename(c),a);c=r.posix.dirname(c)}}while(c!==u&&l===undefined);if(!l){l=[t.slice(0,o-1),"",true]}}return l};const decString=(t,r,i)=>t.subarray(r,r+i).toString("utf8").replace(/\0.*/,"");const decDate=(t,r,i)=>numToDate(decNumber(t,r,i));const numToDate=t=>t===undefined?undefined:new Date(t*1e3);const decNumber=(t,r,i)=>Number(t[r])&128?parse(t.subarray(r,r+i)):decSmallNumber(t,r,i);const nanUndef=t=>isNaN(t)?undefined:t;const decSmallNumber=(t,r,i)=>nanUndef(parseInt(t.subarray(r,r+i).toString("utf8").replace(/\0.*$/,"").trim(),8));const br={12:8589934591,8:2097151};const encNumber=(t,r,i,o)=>o===undefined?false:o>br[i]||o<0?(encode(o,t.subarray(r,r+i)),true):(encSmallNumber(t,r,i,o),false);const encSmallNumber=(t,r,i,o)=>t.write(octalString(o,i),r,i,"ascii");const octalString=(t,r)=>padOctal(Math.floor(t).toString(8),r);const padOctal=(t,r)=>(t.length===r-1?t:new Array(r-t.length-1).join("0")+t+" ")+"\0";const encDate=(t,r,i,o)=>o===undefined?false:encNumber(t,r,i,o.getTime()/1e3);const wr=new Array(156).join("\0");const encString=(t,r,i,o)=>o===undefined?false:(t.write(o+wr,r,i,"utf8"),o.length!==Buffer.byteLength(o)||o.length>i);class Pax{atime;mtime;ctime;charset;comment;gid;uid;gname;uname;linkpath;dev;ino;nlink;path;size;mode;global;constructor(t,r=false){this.atime=t.atime;this.charset=t.charset;this.comment=t.comment;this.ctime=t.ctime;this.dev=t.dev;this.gid=t.gid;this.global=r;this.gname=t.gname;this.ino=t.ino;this.linkpath=t.linkpath;this.mtime=t.mtime;this.nlink=t.nlink;this.path=t.path;this.size=t.size;this.uid=t.uid;this.uname=t.uname}encode(){const t=this.encodeBody();if(t===""){return Buffer.allocUnsafe(0)}const i=Buffer.byteLength(t);const o=512*Math.ceil(1+i/512);const a=Buffer.allocUnsafe(o);for(let t=0;t<512;t++){a[t]=0}new Header({path:("PaxHeader/"+(0,r.basename)(this.path??"")).slice(0,99),mode:this.mode||420,uid:this.uid,gid:this.gid,size:i,mtime:this.mtime,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime,ctime:this.ctime}).encode(a);a.write(t,512,i,"utf8");for(let t=i+512;t<a.length;t++){a[t]=0}return a}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(t){if(this[t]===undefined){return""}const r=this[t];const i=r instanceof Date?r.getTime()/1e3:r;const o=" "+(t==="dev"||t==="ino"||t==="nlink"?"SCHILY.":"")+t+"="+i+"\n";const a=Buffer.byteLength(o);let c=Math.floor(Math.log(a)/Math.log(10))+1;if(a+c>=Math.pow(10,c)){c+=1}const l=c+a;return l+o}static parse(t,r,i=false){return new Pax(merge(parseKV(t),r),i)}}const merge=(t,r)=>r?Object.assign({},r,t):t;const parseKV=t=>t.replace(/\n$/,"").split("\n").reduce(parseKVLine,Object.create(null));const parseKVLine=(t,r)=>{const i=parseInt(r,10);if(i!==Buffer.byteLength(r)+1){return t}r=r.slice((i+" ").length);const o=r.split("=");const a=o.shift();if(!a){return t}const c=a.replace(/^SCHILY\.(dev|ino|nlink)/,"$1");const l=o.join("=");t[c]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(c)?new Date(Number(l)*1e3):/^[0-9]+$/.test(l)?+l:l;return t};const Er=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;const Sr=Er!=="win32"?t=>t:t=>t&&t.replace(/\\/g,"/");class ReadEntry extends Minipass{extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=false;ignore=false;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=false;absolute;unsupported=false;constructor(t,r,i){super({});this.pause();this.extended=r;this.globalExtended=i;this.header=t;this.remain=t.size??0;this.startBlockSize=512*Math.ceil(this.remain/512);this.blockRemain=this.startBlockSize;this.type=t.type;switch(this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=true;break;default:this.ignore=true}if(!t.path){throw new Error("no path provided for tar.ReadEntry")}this.path=Sr(t.path);this.mode=t.mode;if(this.mode){this.mode=this.mode&4095}this.uid=t.uid;this.gid=t.gid;this.uname=t.uname;this.gname=t.gname;this.size=this.remain;this.mtime=t.mtime;this.atime=t.atime;this.ctime=t.ctime;this.linkpath=t.linkpath?Sr(t.linkpath):undefined;this.uname=t.uname;this.gname=t.gname;if(r){this.#A(r)}if(i){this.#A(i,true)}}write(t){const r=t.length;if(r>this.blockRemain){throw new Error("writing more to entry than is appropriate")}const i=this.remain;const o=this.blockRemain;this.remain=Math.max(0,i-r);this.blockRemain=Math.max(0,o-r);if(this.ignore){return true}if(i>=r){return super.write(t)}return super.write(t.subarray(0,i))}#A(t,r=false){if(t.path)t.path=Sr(t.path);if(t.linkpath)t.linkpath=Sr(t.linkpath);Object.assign(this,Object.fromEntries(Object.entries(t).filter((([t,i])=>!(i===null||i===undefined||t==="path"&&r)))))}}const warnMethod=(t,r,i,o={})=>{if(t.file){o.file=t.file}if(t.cwd){o.cwd=t.cwd}o.code=i instanceof Error&&i.code||r;o.tarCode=r;if(!t.strict&&o.recoverable!==false){if(i instanceof Error){o=Object.assign(i,o);i=i.message}t.emit("warn",r,i,o)}else if(i instanceof Error){t.emit("error",Object.assign(i,o))}else{t.emit("error",Object.assign(new Error(`${r}: ${i}`),o))}};const $r=1024*1024;const Or=Buffer.from([31,139]);const Rr=Buffer.from([40,181,47,253]);const Pr=Math.max(Or.length,Rr.length);const Ar=Symbol("state");const xr=Symbol("writeEntry");const Tr=Symbol("readEntry");const Cr=Symbol("nextEntry");const kr=Symbol("processEntry");const Ir=Symbol("extendedHeader");const Nr=Symbol("globalExtendedHeader");const Dr=Symbol("meta");const Lr=Symbol("emitMeta");const Mr=Symbol("buffer");const jr=Symbol("queue");const Fr=Symbol("ended");const Ur=Symbol("emittedEnd");const Br=Symbol("emit");const Hr=Symbol("unzip");const Vr=Symbol("consumeChunk");const zr=Symbol("consumeChunkSub");const Gr=Symbol("consumeBody");const Wr=Symbol("consumeMeta");const qr=Symbol("consumeHeader");const Kr=Symbol("consuming");const Yr=Symbol("bufferConcat");const Zr=Symbol("maybeEnd");const Xr=Symbol("writing");const Jr=Symbol("aborted");const Qr=Symbol("onDone");const es=Symbol("sawValidEntry");const ts=Symbol("sawNullBlock");const rs=Symbol("sawEOF");const ss=Symbol("closeStream");const parse_noop=()=>true;class Parser extends We.EventEmitter{file;strict;maxMetaEntrySize;filter;brotli;zstd;writable=true;readable=false;[jr]=[];[Mr];[Tr];[xr];[Ar]="begin";[Dr]="";[Ir];[Nr];[Fr]=false;[Hr];[Jr]=false;[es];[ts]=false;[rs]=false;[Xr]=false;[Kr]=false;[Ur]=false;constructor(t={}){super();this.file=t.file||"";this.on(Qr,(()=>{if(this[Ar]==="begin"||this[es]===false){this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}}));if(t.ondone){this.on(Qr,t.ondone)}else{this.on(Qr,(()=>{this.emit("prefinish");this.emit("finish");this.emit("end")}))}this.strict=!!t.strict;this.maxMetaEntrySize=t.maxMetaEntrySize||$r;this.filter=typeof t.filter==="function"?t.filter:parse_noop;const r=t.file&&(t.file.endsWith(".tar.br")||t.file.endsWith(".tbr"));this.brotli=!(t.gzip||t.zstd)&&t.brotli!==undefined?t.brotli:r?undefined:false;const i=t.file&&(t.file.endsWith(".tar.zst")||t.file.endsWith(".tzst"));this.zstd=!(t.gzip||t.brotli)&&t.zstd!==undefined?t.zstd:i?true:undefined;this.on("end",(()=>this[ss]()));if(typeof t.onwarn==="function"){this.on("warn",t.onwarn)}if(typeof t.onReadEntry==="function"){this.on("entry",t.onReadEntry)}}warn(t,r,i={}){warnMethod(this,t,r,i)}[qr](t,r){if(this[es]===undefined){this[es]=false}let i;try{i=new Header(t,r,this[Ir],this[Nr])}catch(t){return this.warn("TAR_ENTRY_INVALID",t)}if(i.nullBlock){if(this[ts]){this[rs]=true;if(this[Ar]==="begin"){this[Ar]="header"}this[Br]("eof")}else{this[ts]=true;this[Br]("nullBlock")}}else{this[ts]=false;if(!i.cksumValid){this.warn("TAR_ENTRY_INVALID","checksum failure",{header:i})}else if(!i.path){this.warn("TAR_ENTRY_INVALID","path is required",{header:i})}else{const t=i.type;if(/^(Symbolic)?Link$/.test(t)&&!i.linkpath){this.warn("TAR_ENTRY_INVALID","linkpath required",{header:i})}else if(!/^(Symbolic)?Link$/.test(t)&&!/^(Global)?ExtendedHeader$/.test(t)&&i.linkpath){this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:i})}else{const t=this[xr]=new ReadEntry(i,this[Ir],this[Nr]);if(!this[es]){if(t.remain){const onend=()=>{if(!t.invalid){this[es]=true}};t.on("end",onend)}else{this[es]=true}}if(t.meta){if(t.size>this.maxMetaEntrySize){t.ignore=true;this[Br]("ignoredEntry",t);this[Ar]="ignore";t.resume()}else if(t.size>0){this[Dr]="";t.on("data",(t=>this[Dr]+=t));this[Ar]="meta"}}else{this[Ir]=undefined;t.ignore=t.ignore||!this.filter(t.path,t);if(t.ignore){this[Br]("ignoredEntry",t);this[Ar]=t.remain?"ignore":"header";t.resume()}else{if(t.remain){this[Ar]="body"}else{this[Ar]="header";t.end()}if(!this[Tr]){this[jr].push(t);this[Cr]()}else{this[jr].push(t)}}}}}}}[ss](){queueMicrotask((()=>this.emit("close")))}[kr](t){let r=true;if(!t){this[Tr]=undefined;r=false}else if(Array.isArray(t)){const[r,...i]=t;this.emit(r,...i)}else{this[Tr]=t;this.emit("entry",t);if(!t.emittedEnd){t.on("end",(()=>this[Cr]()));r=false}}return r}[Cr](){do{}while(this[kr](this[jr].shift()));if(!this[jr].length){const t=this[Tr];const r=!t||t.flowing||t.size===t.remain;if(r){if(!this[Xr]){this.emit("drain")}}else{t.once("drain",(()=>this.emit("drain")))}}}[Gr](t,r){const i=this[xr];if(!i){throw new Error("attempt to consume body without entry??")}const o=i.blockRemain??0;const a=o>=t.length&&r===0?t:t.subarray(r,r+o);i.write(a);if(!i.blockRemain){this[Ar]="header";this[xr]=undefined;i.end()}return a.length}[Wr](t,r){const i=this[xr];const o=this[Gr](t,r);if(!this[xr]&&i){this[Lr](i)}return o}[Br](t,r,i){if(!this[jr].length&&!this[Tr]){this.emit(t,r,i)}else{this[jr].push([t,r,i])}}[Lr](t){this[Br]("meta",this[Dr]);switch(t.type){case"ExtendedHeader":case"OldExtendedHeader":this[Ir]=Pax.parse(this[Dr],this[Ir],false);break;case"GlobalExtendedHeader":this[Nr]=Pax.parse(this[Dr],this[Nr],true);break;case"NextFileHasLongPath":case"OldGnuLongPath":{const t=this[Ir]??Object.create(null);this[Ir]=t;t.path=this[Dr].replace(/\0.*/,"");break}case"NextFileHasLongLinkpath":{const t=this[Ir]||Object.create(null);this[Ir]=t;t.linkpath=this[Dr].replace(/\0.*/,"");break}default:throw new Error("unknown meta: "+t.type)}}abort(t){this[Jr]=true;this.emit("abort",t);this.warn("TAR_ABORT",t,{recoverable:false})}write(t,r,i){if(typeof r==="function"){i=r;r=undefined}if(typeof t==="string"){t=Buffer.from(t,typeof r==="string"?r:"utf8")}if(this[Jr]){i?.();return false}const o=this[Hr]===undefined||this.brotli===undefined&&this[Hr]===false;if(o&&t){if(this[Mr]){t=Buffer.concat([this[Mr],t]);this[Mr]=undefined}if(t.length<Pr){this[Mr]=t;i?.();return true}for(let r=0;this[Hr]===undefined&&r<Or.length;r++){if(t[r]!==Or[r]){this[Hr]=false}}let r=false;if(this[Hr]===false&&this.zstd!==false){r=true;for(let i=0;i<Rr.length;i++){if(t[i]!==Rr[i]){r=false;break}}}const o=this.brotli===undefined&&!r;if(this[Hr]===false&&o){if(t.length<512){if(this[Fr]){this.brotli=true}else{this[Mr]=t;i?.();return true}}else{try{new Header(t.subarray(0,512));this.brotli=false}catch(t){this.brotli=true}}}if(this[Hr]===undefined||this[Hr]===false&&(this.brotli||r)){const o=this[Fr];this[Fr]=false;this[Hr]=this[Hr]===undefined?new Unzip({}):r?new ZstdDecompress({}):new BrotliDecompress({});this[Hr].on("data",(t=>this[Vr](t)));this[Hr].on("error",(t=>this.abort(t)));this[Hr].on("end",(()=>{this[Fr]=true;this[Vr]()}));this[Xr]=true;const a=!!this[Hr][o?"end":"write"](t);this[Xr]=false;i?.();return a}}this[Xr]=true;if(this[Hr]){this[Hr].write(t)}else{this[Vr](t)}this[Xr]=false;const a=this[jr].length?false:this[Tr]?this[Tr].flowing:true;if(!a&&!this[jr].length){this[Tr]?.once("drain",(()=>this.emit("drain")))}i?.();return a}[Yr](t){if(t&&!this[Jr]){this[Mr]=this[Mr]?Buffer.concat([this[Mr],t]):t}}[Zr](){if(this[Fr]&&!this[Ur]&&!this[Jr]&&!this[Kr]){this[Ur]=true;const t=this[xr];if(t&&t.blockRemain){const r=this[Mr]?this[Mr].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${t.blockRemain} more bytes, only ${r} available)`,{entry:t});if(this[Mr]){t.write(this[Mr])}t.end()}this[Br](Qr)}}[Vr](t){if(this[Kr]&&t){this[Yr](t)}else if(!t&&!this[Mr]){this[Zr]()}else if(t){this[Kr]=true;if(this[Mr]){this[Yr](t);const r=this[Mr];this[Mr]=undefined;this[zr](r)}else{this[zr](t)}while(this[Mr]&&this[Mr]?.length>=512&&!this[Jr]&&!this[rs]){const t=this[Mr];this[Mr]=undefined;this[zr](t)}this[Kr]=false}if(!this[Mr]||this[Fr]){this[Zr]()}}[zr](t){let r=0;const i=t.length;while(r+512<=i&&!this[Jr]&&!this[rs]){switch(this[Ar]){case"begin":case"header":this[qr](t,r);r+=512;break;case"ignore":case"body":r+=this[Gr](t,r);break;case"meta":r+=this[Wr](t,r);break;default:throw new Error("invalid state: "+this[Ar])}}if(r<i){if(this[Mr]){this[Mr]=Buffer.concat([t.subarray(r),this[Mr]])}else{this[Mr]=t.subarray(r)}}}end(t,r,i){if(typeof t==="function"){i=t;r=undefined;t=undefined}if(typeof r==="function"){i=r;r=undefined}if(typeof t==="string"){t=Buffer.from(t,r)}if(i)this.once("finish",i);if(!this[Jr]){if(this[Hr]){if(t)this[Hr].write(t);this[Hr].end()}else{this[Fr]=true;if(this.brotli===undefined||this.zstd===undefined)t=t||Buffer.alloc(0);if(t)this.write(t);this[Zr]()}}return this}}const stripTrailingSlashes=t=>{let r=t.length-1;let i=-1;while(r>-1&&t.charAt(r)==="/"){i=r;r--}return i===-1?t:t.slice(0,i)};const onReadEntryFunction=t=>{const r=t.onReadEntry;t.onReadEntry=r?t=>{r(t);t.resume()}:t=>t.resume()};const filesFilter=(t,r)=>{const i=new Map(r.map((t=>[stripTrailingSlashes(t),true])));const o=t.filter;const mapHas=(t,r="")=>{const o=r||(0,ir.parse)(t).root||".";let a;if(t===o)a=false;else{const r=i.get(t);if(r!==undefined){a=r}else{a=mapHas((0,ir.dirname)(t),o)}}i.set(t,a);return a};t.filter=o?(t,r)=>o(t,r)&&mapHas(stripTrailingSlashes(t)):t=>mapHas(stripTrailingSlashes(t))};const listFileSync=r=>{const i=new Parser(r);const o=r.file;let a;try{a=t.openSync(o,"r");const c=t.fstatSync(a);const l=r.maxReadSize||16*1024*1024;if(c.size<l){const r=Buffer.allocUnsafe(c.size);const o=t.readSync(a,r,0,c.size,0);i.end(o===r.byteLength?r:r.subarray(0,o))}else{let r=0;const o=Buffer.allocUnsafe(l);while(r<c.size){const c=t.readSync(a,o,0,l,r);if(c===0)break;r+=c;i.write(o.subarray(0,c))}i.end()}}finally{if(typeof a==="number"){try{t.closeSync(a)}catch(t){}}}};const listFile=(r,i)=>{const o=new Parser(r);const a=r.maxReadSize||16*1024*1024;const c=r.file;const l=new Promise(((r,i)=>{o.on("error",i);o.on("end",r);t.stat(c,((t,r)=>{if(t){i(t)}else{const t=new ReadStream(c,{readSize:a,size:r.size});t.on("error",i);t.pipe(o)}}))}));return l};const is=makeCommand(listFileSync,listFile,(t=>new Parser(t)),(t=>new Parser(t)),((t,r)=>{if(r?.length)filesFilter(t,r);if(!t.noResume)onReadEntryFunction(t)}));const modeFix=(t,r,i)=>{t&=4095;if(i){t=(t|384)&~18}if(r){if(t&256){t|=64}if(t&32){t|=8}if(t&4){t|=1}}return t};const{isAbsolute:ns,parse:os}=r.win32;const stripAbsolutePath=t=>{let r="";let i=os(t);while(ns(t)||i.root){const o=t.charAt(0)==="/"&&t.slice(0,4)!=="//?/"?"/":i.root;t=t.slice(o.length);r+=o;i=os(t)}return[r,t]};const as=["|","<",">","?",":"];const cs=as.map((t=>String.fromCharCode(61440+t.charCodeAt(0))));const ls=new Map(as.map(((t,r)=>[t,cs[r]])));const us=new Map(cs.map(((t,r)=>[t,as[r]])));const winchars_encode=t=>as.reduce(((t,r)=>t.split(r).join(ls.get(r))),t);const decode=t=>cs.reduce(((t,r)=>t.split(r).join(us.get(r))),t);const prefixPath=(t,r)=>{if(!r){return Sr(t)}t=Sr(t).replace(/^\.(\/|$)/,"");return stripTrailingSlashes(r)+"/"+t};const hs=16*1024*1024;const ds=Symbol("process");const ps=Symbol("file");const ms=Symbol("directory");const gs=Symbol("symlink");const ys=Symbol("hardlink");const _s=Symbol("header");const vs=Symbol("read");const bs=Symbol("lstat");const ws=Symbol("onlstat");const Es=Symbol("onread");const Ss=Symbol("onreadlink");const $s=Symbol("openfile");const Os=Symbol("onopenfile");const Rs=Symbol("close");const Ps=Symbol("mode");const As=Symbol("awaitDrain");const xs=Symbol("ondrain");const Ts=Symbol("prefix");class WriteEntry extends Minipass{path;portable;myuid=process.getuid&&process.getuid()||0;myuser=process.env.USER||"";maxReadSize;linkCache;statCache;preservePaths;cwd;strict;mtime;noPax;noMtime;prefix;fd;blockLen=0;blockRemain=0;buf;pos=0;remain=0;length=0;offset=0;win32;absolute;header;type;linkpath;stat;onWriteEntry;#x=false;constructor(t,r={}){const i=dealias(r);super();this.path=Sr(t);this.portable=!!i.portable;this.maxReadSize=i.maxReadSize||hs;this.linkCache=i.linkCache||new Map;this.statCache=i.statCache||new Map;this.preservePaths=!!i.preservePaths;this.cwd=Sr(i.cwd||process.cwd());this.strict=!!i.strict;this.noPax=!!i.noPax;this.noMtime=!!i.noMtime;this.mtime=i.mtime;this.prefix=i.prefix?Sr(i.prefix):undefined;this.onWriteEntry=i.onWriteEntry;if(typeof i.onwarn==="function"){this.on("warn",i.onwarn)}let o=false;if(!this.preservePaths){const[t,r]=stripAbsolutePath(this.path);if(t&&typeof r==="string"){this.path=r;o=t}}this.win32=!!i.win32||process.platform==="win32";if(this.win32){this.path=decode(this.path.replace(/\\/g,"/"));t=t.replace(/\\/g,"/")}this.absolute=Sr(i.absolute||ir.resolve(this.cwd,t));if(this.path===""){this.path="./"}if(o){this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute path`,{entry:this,path:o+this.path})}const a=this.statCache.get(this.absolute);if(a){this[ws](a)}else{this[bs]()}}warn(t,r,i={}){return warnMethod(this,t,r,i)}emit(t,...r){if(t==="error"){this.#x=true}return super.emit(t,...r)}[bs](){qe.lstat(this.absolute,((t,r)=>{if(t){return this.emit("error",t)}this[ws](r)}))}[ws](t){this.statCache.set(this.absolute,t);this.stat=t;if(!t.isFile()){t.size=0}this.type=getType(t);this.emit("stat",t);this[ds]()}[ds](){switch(this.type){case"File":return this[ps]();case"Directory":return this[ms]();case"SymbolicLink":return this[gs]();default:return this.end()}}[Ps](t){return modeFix(t,this.type==="Directory",this.portable)}[Ts](t){return prefixPath(t,this.prefix)}[_s](){if(!this.stat){throw new Error("cannot write header before stat")}if(this.type==="Directory"&&this.portable){this.noMtime=true}this.onWriteEntry?.(this);this.header=new Header({path:this[Ts](this.path),linkpath:this.type==="Link"&&this.linkpath!==undefined?this[Ts](this.linkpath):this.linkpath,mode:this[Ps](this.stat.mode),uid:this.portable?undefined:this.stat.uid,gid:this.portable?undefined:this.stat.gid,size:this.stat.size,mtime:this.noMtime?undefined:this.mtime||this.stat.mtime,type:this.type==="Unsupported"?undefined:this.type,uname:this.portable?undefined:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?undefined:this.stat.atime,ctime:this.portable?undefined:this.stat.ctime});if(this.header.encode()&&!this.noPax){super.write(new Pax({atime:this.portable?undefined:this.header.atime,ctime:this.portable?undefined:this.header.ctime,gid:this.portable?undefined:this.header.gid,mtime:this.noMtime?undefined:this.mtime||this.header.mtime,path:this[Ts](this.path),linkpath:this.type==="Link"&&this.linkpath!==undefined?this[Ts](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?undefined:this.header.uid,uname:this.portable?undefined:this.header.uname,dev:this.portable?undefined:this.stat.dev,ino:this.portable?undefined:this.stat.ino,nlink:this.portable?undefined:this.stat.nlink}).encode())}const t=this.header?.block;if(!t){throw new Error("failed to encode header")}super.write(t)}[ms](){if(!this.stat){throw new Error("cannot create directory entry without stat")}if(this.path.slice(-1)!=="/"){this.path+="/"}this.stat.size=0;this[_s]();this.end()}[gs](){qe.readlink(this.absolute,((t,r)=>{if(t){return this.emit("error",t)}this[Ss](r)}))}[Ss](t){this.linkpath=Sr(t);this[_s]();this.end()}[ys](t){if(!this.stat){throw new Error("cannot create link entry without stat")}this.type="Link";this.linkpath=Sr(ir.relative(this.cwd,t));this.stat.size=0;this[_s]();this.end()}[ps](){if(!this.stat){throw new Error("cannot create file entry without stat")}if(this.stat.nlink>1){const t=`${this.stat.dev}:${this.stat.ino}`;const r=this.linkCache.get(t);if(r?.indexOf(this.cwd)===0){return this[ys](r)}this.linkCache.set(t,this.absolute)}this[_s]();if(this.stat.size===0){return this.end()}this[$s]()}[$s](){qe.open(this.absolute,"r",((t,r)=>{if(t){return this.emit("error",t)}this[Os](r)}))}[Os](t){this.fd=t;if(this.#x){return this[Rs]()}if(!this.stat){throw new Error("should stat before calling onopenfile")}this.blockLen=512*Math.ceil(this.stat.size/512);this.blockRemain=this.blockLen;const r=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(r);this.offset=0;this.pos=0;this.remain=this.stat.size;this.length=this.buf.length;this[vs]()}[vs](){const{fd:t,buf:r,offset:i,length:o,pos:a}=this;if(t===undefined||r===undefined){throw new Error("cannot read file without first opening")}qe.read(t,r,i,o,a,((t,r)=>{if(t){return this[Rs]((()=>this.emit("error",t)))}this[Es](r)}))}[Rs](t=()=>{}){if(this.fd!==undefined)qe.close(this.fd,t)}[Es](t){if(t<=0&&this.remain>0){const t=Object.assign(new Error("encountered unexpected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[Rs]((()=>this.emit("error",t)))}if(t>this.remain){const t=Object.assign(new Error("did not encounter expected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[Rs]((()=>this.emit("error",t)))}if(!this.buf){throw new Error("should have created buffer prior to reading")}if(t===this.remain){for(let r=t;r<this.length&&t<this.blockRemain;r++){this.buf[r+this.offset]=0;t++;this.remain++}}const r=this.offset===0&&t===this.buf.length?this.buf:this.buf.subarray(this.offset,this.offset+t);const i=this.write(r);if(!i){this[As]((()=>this[xs]()))}else{this[xs]()}}[As](t){this.once("drain",t)}write(t,r,i){if(typeof r==="function"){i=r;r=undefined}if(typeof t==="string"){t=Buffer.from(t,typeof r==="string"?r:"utf8")}if(this.blockRemain<t.length){const t=Object.assign(new Error("writing more data than expected"),{path:this.absolute});return this.emit("error",t)}this.remain-=t.length;this.blockRemain-=t.length;this.pos+=t.length;this.offset+=t.length;return super.write(t,null,i)}[xs](){if(!this.remain){if(this.blockRemain){super.write(Buffer.alloc(this.blockRemain))}return this[Rs]((t=>t?this.emit("error",t):this.end()))}if(!this.buf){throw new Error("buffer lost somehow in ONDRAIN")}if(this.offset>=this.length){this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length));this.offset=0}this.length=this.buf.length-this.offset;this[vs]()}}class WriteEntrySync extends WriteEntry{sync=true;[bs](){this[ws](qe.lstatSync(this.absolute))}[gs](){this[Ss](qe.readlinkSync(this.absolute))}[$s](){this[Os](qe.openSync(this.absolute,"r"))}[vs](){let t=true;try{const{fd:r,buf:i,offset:o,length:a,pos:c}=this;if(r===undefined||i===undefined){throw new Error("fd and buf must be set in READ method")}const l=qe.readSync(r,i,o,a,c);this[Es](l);t=false}finally{if(t){try{this[Rs]((()=>{}))}catch(t){}}}}[As](t){t()}[Rs](t=()=>{}){if(this.fd!==undefined)qe.closeSync(this.fd);t()}}class WriteEntryTar extends Minipass{blockLen=0;blockRemain=0;buf=0;pos=0;remain=0;length=0;preservePaths;portable;strict;noPax;noMtime;readEntry;type;prefix;path;mode;uid;gid;uname;gname;header;mtime;atime;ctime;linkpath;size;onWriteEntry;warn(t,r,i={}){return warnMethod(this,t,r,i)}constructor(t,r={}){const i=dealias(r);super();this.preservePaths=!!i.preservePaths;this.portable=!!i.portable;this.strict=!!i.strict;this.noPax=!!i.noPax;this.noMtime=!!i.noMtime;this.onWriteEntry=i.onWriteEntry;this.readEntry=t;const{type:o}=t;if(o==="Unsupported"){throw new Error("writing entry that should be ignored")}this.type=o;if(this.type==="Directory"&&this.portable){this.noMtime=true}this.prefix=i.prefix;this.path=Sr(t.path);this.mode=t.mode!==undefined?this[Ps](t.mode):undefined;this.uid=this.portable?undefined:t.uid;this.gid=this.portable?undefined:t.gid;this.uname=this.portable?undefined:t.uname;this.gname=this.portable?undefined:t.gname;this.size=t.size;this.mtime=this.noMtime?undefined:i.mtime||t.mtime;this.atime=this.portable?undefined:t.atime;this.ctime=this.portable?undefined:t.ctime;this.linkpath=t.linkpath!==undefined?Sr(t.linkpath):undefined;if(typeof i.onwarn==="function"){this.on("warn",i.onwarn)}let a=false;if(!this.preservePaths){const[t,r]=stripAbsolutePath(this.path);if(t&&typeof r==="string"){this.path=r;a=t}}this.remain=t.size;this.blockRemain=t.startBlockSize;this.onWriteEntry?.(this);this.header=new Header({path:this[Ts](this.path),linkpath:this.type==="Link"&&this.linkpath!==undefined?this[Ts](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?undefined:this.uid,gid:this.portable?undefined:this.gid,size:this.size,mtime:this.noMtime?undefined:this.mtime,type:this.type,uname:this.portable?undefined:this.uname,atime:this.portable?undefined:this.atime,ctime:this.portable?undefined:this.ctime});if(a){this.warn("TAR_ENTRY_INFO",`stripping ${a} from absolute path`,{entry:this,path:a+this.path})}if(this.header.encode()&&!this.noPax){super.write(new Pax({atime:this.portable?undefined:this.atime,ctime:this.portable?undefined:this.ctime,gid:this.portable?undefined:this.gid,mtime:this.noMtime?undefined:this.mtime,path:this[Ts](this.path),linkpath:this.type==="Link"&&this.linkpath!==undefined?this[Ts](this.linkpath):this.linkpath,size:this.size,uid:this.portable?undefined:this.uid,uname:this.portable?undefined:this.uname,dev:this.portable?undefined:this.readEntry.dev,ino:this.portable?undefined:this.readEntry.ino,nlink:this.portable?undefined:this.readEntry.nlink}).encode())}const c=this.header?.block;if(!c)throw new Error("failed to encode header");super.write(c);t.pipe(this)}[Ts](t){return prefixPath(t,this.prefix)}[Ps](t){return modeFix(t,this.type==="Directory",this.portable)}write(t,r,i){if(typeof r==="function"){i=r;r=undefined}if(typeof t==="string"){t=Buffer.from(t,typeof r==="string"?r:"utf8")}const o=t.length;if(o>this.blockRemain){throw new Error("writing more to entry than is appropriate")}this.blockRemain-=o;return super.write(t,i)}end(t,r,i){if(this.blockRemain){super.write(Buffer.alloc(this.blockRemain))}if(typeof t==="function"){i=t;r=undefined;t=undefined}if(typeof r==="function"){i=r;r=undefined}if(typeof t==="string"){t=Buffer.from(t,r??"utf8")}if(i)this.once("finish",i);t?super.end(t,i):super.end(i);return this}}const getType=t=>t.isFile()?"File":t.isDirectory()?"Directory":t.isSymbolicLink()?"SymbolicLink":"Unsupported";class Yallist{tail;head;length=0;static create(t=[]){return new Yallist(t)}constructor(t=[]){for(const r of t){this.push(r)}}*[Symbol.iterator](){for(let t=this.head;t;t=t.next){yield t.value}}removeNode(t){if(t.list!==this){throw new Error("removing node which does not belong to this list")}const r=t.next;const i=t.prev;if(r){r.prev=i}if(i){i.next=r}if(t===this.head){this.head=r}if(t===this.tail){this.tail=i}this.length--;t.next=undefined;t.prev=undefined;t.list=undefined;return r}unshiftNode(t){if(t===this.head){return}if(t.list){t.list.removeNode(t)}const r=this.head;t.list=this;t.next=r;if(r){r.prev=t}this.head=t;if(!this.tail){this.tail=t}this.length++}pushNode(t){if(t===this.tail){return}if(t.list){t.list.removeNode(t)}const r=this.tail;t.list=this;t.prev=r;if(r){r.next=t}this.tail=t;if(!this.head){this.head=t}this.length++}push(...t){for(let r=0,i=t.length;r<i;r++){push(this,t[r])}return this.length}unshift(...t){for(var r=0,i=t.length;r<i;r++){unshift(this,t[r])}return this.length}pop(){if(!this.tail){return undefined}const t=this.tail.value;const r=this.tail;this.tail=this.tail.prev;if(this.tail){this.tail.next=undefined}else{this.head=undefined}r.list=undefined;this.length--;return t}shift(){if(!this.head){return undefined}const t=this.head.value;const r=this.head;this.head=this.head.next;if(this.head){this.head.prev=undefined}else{this.tail=undefined}r.list=undefined;this.length--;return t}forEach(t,r){r=r||this;for(let i=this.head,o=0;!!i;o++){t.call(r,i.value,o,this);i=i.next}}forEachReverse(t,r){r=r||this;for(let i=this.tail,o=this.length-1;!!i;o--){t.call(r,i.value,o,this);i=i.prev}}get(t){let r=0;let i=this.head;for(;!!i&&r<t;r++){i=i.next}if(r===t&&!!i){return i.value}}getReverse(t){let r=0;let i=this.tail;for(;!!i&&r<t;r++){i=i.prev}if(r===t&&!!i){return i.value}}map(t,r){r=r||this;const i=new Yallist;for(let o=this.head;!!o;){i.push(t.call(r,o.value,this));o=o.next}return i}mapReverse(t,r){r=r||this;var i=new Yallist;for(let o=this.tail;!!o;){i.push(t.call(r,o.value,this));o=o.prev}return i}reduce(t,r){let i;let o=this.head;if(arguments.length>1){i=r}else if(this.head){o=this.head.next;i=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var a=0;!!o;a++){i=t(i,o.value,a);o=o.next}return i}reduceReverse(t,r){let i;let o=this.tail;if(arguments.length>1){i=r}else if(this.tail){o=this.tail.prev;i=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(let r=this.length-1;!!o;r--){i=t(i,o.value,r);o=o.prev}return i}toArray(){const t=new Array(this.length);for(let r=0,i=this.head;!!i;r++){t[r]=i.value;i=i.next}return t}toArrayReverse(){const t=new Array(this.length);for(let r=0,i=this.tail;!!i;r++){t[r]=i.value;i=i.prev}return t}slice(t=0,r=this.length){if(r<0){r+=this.length}if(t<0){t+=this.length}const i=new Yallist;if(r<t||r<0){return i}if(t<0){t=0}if(r>this.length){r=this.length}let o=this.head;let a=0;for(a=0;!!o&&a<t;a++){o=o.next}for(;!!o&&a<r;a++,o=o.next){i.push(o.value)}return i}sliceReverse(t=0,r=this.length){if(r<0){r+=this.length}if(t<0){t+=this.length}const i=new Yallist;if(r<t||r<0){return i}if(t<0){t=0}if(r>this.length){r=this.length}let o=this.length;let a=this.tail;for(;!!a&&o>r;o--){a=a.prev}for(;!!a&&o>t;o--,a=a.prev){i.push(a.value)}return i}splice(t,r=0,...i){if(t>this.length){t=this.length-1}if(t<0){t=this.length+t}let o=this.head;for(let r=0;!!o&&r<t;r++){o=o.next}const a=[];for(let t=0;!!o&&t<r;t++){a.push(o.value);o=this.removeNode(o)}if(!o){o=this.tail}else if(o!==this.tail){o=o.prev}for(const t of i){o=insertAfter(this,o,t)}return a}reverse(){const t=this.head;const r=this.tail;for(let r=t;!!r;r=r.prev){const t=r.prev;r.prev=r.next;r.next=t}this.head=r;this.tail=t;return this}}function insertAfter(t,r,i){const o=r;const a=r?r.next:t.head;const c=new Node(i,o,a,t);if(c.next===undefined){t.tail=c}if(c.prev===undefined){t.head=c}t.length++;return c}function push(t,r){t.tail=new Node(r,t.tail,undefined,t);if(!t.head){t.head=t.tail}t.length++}function unshift(t,r){t.head=new Node(r,undefined,t.head,t);if(!t.tail){t.tail=t.head}t.length++}class Node{list;next;prev;value;constructor(t,r,i,o){this.list=o;this.value=t;if(r){r.next=this;this.prev=r}else{this.prev=undefined}if(i){i.prev=this;this.next=i}else{this.next=undefined}}}class PackJob{path;absolute;entry;stat;readdir;pending=false;ignore=false;piped=false;constructor(t,r){this.path=t||"./";this.absolute=r}}const Cs=Buffer.alloc(1024);const ks=Symbol("onStat");const Is=Symbol("ended");const Ns=Symbol("queue");const Ds=Symbol("current");const Ls=Symbol("process");const Ms=Symbol("processing");const js=Symbol("processJob");const Fs=Symbol("jobs");const Us=Symbol("jobDone");const Bs=Symbol("addFSEntry");const Hs=Symbol("addTarEntry");const Vs=Symbol("stat");const zs=Symbol("readdir");const Gs=Symbol("onreaddir");const Ws=Symbol("pipe");const qs=Symbol("entry");const Ks=Symbol("entryOpt");const Ys=Symbol("writeEntryClass");const Zs=Symbol("write");const Xs=Symbol("ondrain");class Pack extends Minipass{sync=false;opt;cwd;maxReadSize;preservePaths;strict;noPax;prefix;linkCache;statCache;file;portable;zip;readdirCache;noDirRecurse;follow;noMtime;mtime;filter;jobs;[Ys];onWriteEntry;[Ns];[Fs]=0;[Ms]=false;[Is]=false;constructor(t={}){super();this.opt=t;this.file=t.file||"";this.cwd=t.cwd||process.cwd();this.maxReadSize=t.maxReadSize;this.preservePaths=!!t.preservePaths;this.strict=!!t.strict;this.noPax=!!t.noPax;this.prefix=Sr(t.prefix||"");this.linkCache=t.linkCache||new Map;this.statCache=t.statCache||new Map;this.readdirCache=t.readdirCache||new Map;this.onWriteEntry=t.onWriteEntry;this[Ys]=WriteEntry;if(typeof t.onwarn==="function"){this.on("warn",t.onwarn)}this.portable=!!t.portable;if(t.gzip||t.brotli||t.zstd){if((t.gzip?1:0)+(t.brotli?1:0)+(t.zstd?1:0)>1){throw new TypeError("gzip, brotli, zstd are mutually exclusive")}if(t.gzip){if(typeof t.gzip!=="object"){t.gzip={}}if(this.portable){t.gzip.portable=true}this.zip=new Gzip(t.gzip)}if(t.brotli){if(typeof t.brotli!=="object"){t.brotli={}}this.zip=new BrotliCompress(t.brotli)}if(t.zstd){if(typeof t.zstd!=="object"){t.zstd={}}this.zip=new ZstdCompress(t.zstd)}if(!this.zip)throw new Error("impossible");const r=this.zip;r.on("data",(t=>super.write(t)));r.on("end",(()=>super.end()));r.on("drain",(()=>this[Xs]()));this.on("resume",(()=>r.resume()))}else{this.on("drain",this[Xs])}this.noDirRecurse=!!t.noDirRecurse;this.follow=!!t.follow;this.noMtime=!!t.noMtime;if(t.mtime)this.mtime=t.mtime;this.filter=typeof t.filter==="function"?t.filter:()=>true;this[Ns]=new Yallist;this[Fs]=0;this.jobs=Number(t.jobs)||4;this[Ms]=false;this[Is]=false}[Zs](t){return super.write(t)}add(t){this.write(t);return this}end(t,r,i){if(typeof t==="function"){i=t;t=undefined}if(typeof r==="function"){i=r;r=undefined}if(t){this.add(t)}this[Is]=true;this[Ls]();if(i)i();return this}write(t){if(this[Is]){throw new Error("write after end")}if(t instanceof ReadEntry){this[Hs](t)}else{this[Bs](t)}return this.flowing}[Hs](t){const r=Sr(ir.resolve(this.cwd,t.path));if(!this.filter(t.path,t)){t.resume()}else{const i=new PackJob(t.path,r);i.entry=new WriteEntryTar(t,this[Ks](i));i.entry.on("end",(()=>this[Us](i)));this[Fs]+=1;this[Ns].push(i)}this[Ls]()}[Bs](t){const r=Sr(ir.resolve(this.cwd,t));this[Ns].push(new PackJob(t,r));this[Ls]()}[Vs](t){t.pending=true;this[Fs]+=1;const r=this.follow?"stat":"lstat";qe[r](t.absolute,((r,i)=>{t.pending=false;this[Fs]-=1;if(r){this.emit("error",r)}else{this[ks](t,i)}}))}[ks](t,r){this.statCache.set(t.absolute,r);t.stat=r;if(!this.filter(t.path,r)){t.ignore=true}else if(r.isFile()&&r.nlink>1&&t===this[Ds]&&!this.linkCache.get(`${r.dev}:${r.ino}`)&&!this.sync){this[js](t)}this[Ls]()}[zs](t){t.pending=true;this[Fs]+=1;qe.readdir(t.absolute,((r,i)=>{t.pending=false;this[Fs]-=1;if(r){return this.emit("error",r)}this[Gs](t,i)}))}[Gs](t,r){this.readdirCache.set(t.absolute,r);t.readdir=r;this[Ls]()}[Ls](){if(this[Ms]){return}this[Ms]=true;for(let t=this[Ns].head;!!t&&this[Fs]<this.jobs;t=t.next){this[js](t.value);if(t.value.ignore){const r=t.next;this[Ns].removeNode(t);t.next=r}}this[Ms]=false;if(this[Is]&&!this[Ns].length&&this[Fs]===0){if(this.zip){this.zip.end(Cs)}else{super.write(Cs);super.end()}}}get[Ds](){return this[Ns]&&this[Ns].head&&this[Ns].head.value}[Us](t){this[Ns].shift();this[Fs]-=1;this[Ls]()}[js](t){if(t.pending){return}if(t.entry){if(t===this[Ds]&&!t.piped){this[Ws](t)}return}if(!t.stat){const r=this.statCache.get(t.absolute);if(r){this[ks](t,r)}else{this[Vs](t)}}if(!t.stat){return}if(t.ignore){return}if(!this.noDirRecurse&&t.stat.isDirectory()&&!t.readdir){const r=this.readdirCache.get(t.absolute);if(r){this[Gs](t,r)}else{this[zs](t)}if(!t.readdir){return}}t.entry=this[qs](t);if(!t.entry){t.ignore=true;return}if(t===this[Ds]&&!t.piped){this[Ws](t)}}[Ks](t){return{onwarn:(t,r,i)=>this.warn(t,r,i),noPax:this.noPax,cwd:this.cwd,absolute:t.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix,onWriteEntry:this.onWriteEntry}}[qs](t){this[Fs]+=1;try{const r=new this[Ys](t.path,this[Ks](t));return r.on("end",(()=>this[Us](t))).on("error",(t=>this.emit("error",t)))}catch(t){this.emit("error",t)}}[Xs](){if(this[Ds]&&this[Ds].entry){this[Ds].entry.resume()}}[Ws](t){t.piped=true;if(t.readdir){t.readdir.forEach((r=>{const i=t.path;const o=i==="./"?"":i.replace(/\/*$/,"/");this[Bs](o+r)}))}const r=t.entry;const i=this.zip;if(!r)throw new Error("cannot pipe without source");if(i){r.on("data",(t=>{if(!i.write(t)){r.pause()}}))}else{r.on("data",(t=>{if(!super.write(t)){r.pause()}}))}}pause(){if(this.zip){this.zip.pause()}return super.pause()}warn(t,r,i={}){warnMethod(this,t,r,i)}}class PackSync extends Pack{sync=true;constructor(t){super(t);this[Ys]=WriteEntrySync}pause(){}resume(){}[Vs](t){const r=this.follow?"statSync":"lstatSync";this[ks](t,qe[r](t.absolute))}[zs](t){this[Gs](t,qe.readdirSync(t.absolute))}[Ws](t){const r=t.entry;const i=this.zip;if(t.readdir){t.readdir.forEach((r=>{const i=t.path;const o=i==="./"?"":i.replace(/\/*$/,"/");this[Bs](o+r)}))}if(!r)throw new Error("Cannot pipe without source");if(i){r.on("data",(t=>{i.write(t)}))}else{r.on("data",(t=>{super[Zs](t)}))}}}const createFileSync=(t,r)=>{const i=new PackSync(t);const o=new WriteStreamSync(t.file,{mode:t.mode||438});i.pipe(o);addFilesSync(i,r)};const createFile=(t,r)=>{const i=new Pack(t);const o=new WriteStream(t.file,{mode:t.mode||438});i.pipe(o);const a=new Promise(((t,r)=>{o.on("error",r);o.on("close",t);i.on("error",r)}));addFilesAsync(i,r);return a};const addFilesSync=(t,i)=>{i.forEach((i=>{if(i.charAt(0)==="@"){is({file:r.resolve(t.cwd,i.slice(1)),sync:true,noResume:true,onReadEntry:r=>t.add(r)})}else{t.add(i)}}));t.end()};const addFilesAsync=async(t,i)=>{for(let o=0;o<i.length;o++){const a=String(i[o]);if(a.charAt(0)==="@"){await is({file:r.resolve(String(t.cwd),a.slice(1)),noResume:true,onReadEntry:r=>{t.add(r)}})}else{t.add(a)}}t.end()};const createSync=(t,r)=>{const i=new PackSync(t);addFilesSync(i,r);return i};const createAsync=(t,r)=>{const i=new Pack(t);addFilesAsync(i,r);return i};const Js=makeCommand(createFileSync,createFile,createSync,createAsync,((t,r)=>{if(!r?.length){throw new TypeError("no paths specified to add to archive")}}));const Qs=process.env.__FAKE_PLATFORM__||process.platform;const ei=Qs==="win32";const{O_CREAT:ti,O_TRUNC:ri,O_WRONLY:si}=qe.constants;const ii=Number(process.env.__FAKE_FS_O_FILENAME__)||qe.constants.UV_FS_O_FILEMAP||0;const ni=ei&&!!ii;const oi=512*1024;const ai=ii|ri|ti|si;const ci=!ni?()=>"w":t=>t<oi?ai:"w";const lchownSync=(r,i,o)=>{try{return t.lchownSync(r,i,o)}catch(t){if(t?.code!=="ENOENT")throw t}};const chown=(r,i,o,a)=>{t.lchown(r,i,o,(t=>{a(t&&t?.code!=="ENOENT"?t:null)}))};const chownrKid=(t,i,o,a,c)=>{if(i.isDirectory()){chownr(r.resolve(t,i.name),o,a,(l=>{if(l)return c(l);const u=r.resolve(t,i.name);chown(u,o,a,c)}))}else{const l=r.resolve(t,i.name);chown(l,o,a,c)}};const chownr=(r,i,o,a)=>{t.readdir(r,{withFileTypes:true},((t,c)=>{if(t){if(t.code==="ENOENT")return a();else if(t.code!=="ENOTDIR"&&t.code!=="ENOTSUP")return a(t)}if(t||!c.length)return chown(r,i,o,a);let l=c.length;let u=null;const then=t=>{if(u)return;if(t)return a(u=t);if(--l===0)return chown(r,i,o,a)};for(const t of c){chownrKid(r,t,i,o,then)}}))};const chownrKidSync=(t,i,o,a)=>{if(i.isDirectory())chownrSync(r.resolve(t,i.name),o,a);lchownSync(r.resolve(t,i.name),o,a)};const chownrSync=(r,i,o)=>{let a;try{a=t.readdirSync(r,{withFileTypes:true})}catch(t){const a=t;if(a?.code==="ENOENT")return;else if(a?.code==="ENOTDIR"||a?.code==="ENOTSUP")return lchownSync(r,i,o);else throw a}for(const t of a){chownrKidSync(r,t,i,o)}return lchownSync(r,i,o)};const li=require("node:fs/promises");var ui=__nccwpck_require__.n(li);class CwdError extends Error{path;code;syscall="chdir";constructor(t,r){super(`${r}: Cannot cd into '${t}'`);this.path=t;this.code=r}get name(){return"CwdError"}}class SymlinkError extends Error{path;symlink;syscall="symlink";code="TAR_SYMLINK_ERROR";constructor(t,r){super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link");this.symlink=t;this.path=r}get name(){return"SymlinkError"}}const checkCwd=(r,i)=>{t.stat(r,((t,o)=>{if(t||!o.isDirectory()){t=new CwdError(r,t?.code||"ENOTDIR")}i(t)}))};const mkdir=(i,o,a)=>{i=Sr(i);const c=o.umask??18;const l=o.mode|448;const u=(l&c)!==0;const h=o.uid;const d=o.gid;const p=typeof h==="number"&&typeof d==="number"&&(h!==o.processUid||d!==o.processGid);const m=o.preserve;const g=o.unlink;const y=Sr(o.cwd);const done=(r,o)=>{if(r){a(r)}else{if(o&&p){chownr(o,h,d,(t=>done(t)))}else if(u){t.chmod(i,l,a)}else{a()}}};if(i===y){return checkCwd(i,done)}if(m){return li.mkdir(i,{mode:l,recursive:true}).then((t=>done(null,t??undefined)),done)}const v=Sr(r.relative(y,i));const b=v.split("/");mkdir_(y,b,l,g,y,undefined,done)};const mkdir_=(i,o,a,c,l,u,h)=>{if(!o.length){return h(null,u)}const d=o.shift();const p=Sr(r.resolve(i+"/"+d));t.mkdir(p,a,onmkdir(p,o,a,c,l,u,h))};const onmkdir=(r,i,o,a,c,l,u)=>h=>{if(h){t.lstat(r,((d,p)=>{if(d){d.path=d.path&&Sr(d.path);u(d)}else if(p.isDirectory()){mkdir_(r,i,o,a,c,l,u)}else if(a){t.unlink(r,(h=>{if(h){return u(h)}t.mkdir(r,o,onmkdir(r,i,o,a,c,l,u))}))}else if(p.isSymbolicLink()){return u(new SymlinkError(r,r+"/"+i.join("/")))}else{u(h)}}))}else{l=l||r;mkdir_(r,i,o,a,c,l,u)}};const checkCwdSync=r=>{let i=false;let o=undefined;try{i=t.statSync(r).isDirectory()}catch(t){o=t?.code}finally{if(!i){throw new CwdError(r,o??"ENOTDIR")}}};const mkdirSync=(i,o)=>{i=Sr(i);const a=o.umask??18;const c=o.mode|448;const l=(c&a)!==0;const u=o.uid;const h=o.gid;const d=typeof u==="number"&&typeof h==="number"&&(u!==o.processUid||h!==o.processGid);const p=o.preserve;const m=o.unlink;const g=Sr(o.cwd);const done=r=>{if(r&&d){chownrSync(r,u,h)}if(l){t.chmodSync(i,c)}};if(i===g){checkCwdSync(g);return done()}if(p){return done(t.mkdirSync(i,{mode:c,recursive:true})??undefined)}const y=Sr(r.relative(g,i));const v=y.split("/");let b=undefined;for(let i=v.shift(),o=g;i&&(o+="/"+i);i=v.shift()){o=Sr(r.resolve(o));try{t.mkdirSync(o,c);b=b||o}catch(r){const i=t.lstatSync(o);if(i.isDirectory()){continue}else if(m){t.unlinkSync(o);t.mkdirSync(o,c);b=b||o;continue}else if(i.isSymbolicLink()){return new SymlinkError(o,o+"/"+v.join("/"))}}}return done(b)};const hi=Object.create(null);const fi=1e4;const di=new Set;const normalizeUnicode=t=>{if(!di.has(t)){hi[t]=t.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en")}else{di.delete(t)}di.add(t);const r=hi[t];let i=di.size-fi;if(i>fi/10){for(const t of di){di.delete(t);delete hi[t];if(--i<=0)break}}return r};const pi=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;const mi=pi==="win32";const getDirs=t=>{const i=t.split("/").slice(0,-1).reduce(((t,i)=>{const o=t[t.length-1];if(o!==undefined){i=(0,r.join)(o,i)}t.push(i||"/");return t}),[]);return i};class PathReservations{#T=new Map;#C=new Map;#k=new Set;reserve(t,i){t=mi?["win32 parallelization disabled"]:t.map((t=>stripTrailingSlashes((0,r.join)(normalizeUnicode(t)))));const o=new Set(t.map((t=>getDirs(t))).reduce(((t,r)=>t.concat(r))));this.#C.set(i,{dirs:o,paths:t});for(const r of t){const t=this.#T.get(r);if(!t){this.#T.set(r,[i])}else{t.push(i)}}for(const t of o){const r=this.#T.get(t);if(!r){this.#T.set(t,[new Set([i])])}else{const t=r[r.length-1];if(t instanceof Set){t.add(i)}else{r.push(new Set([i]))}}}return this.#I(i)}#N(t){const r=this.#C.get(t);if(!r){throw new Error("function does not have any path reservations")}return{paths:r.paths.map((t=>this.#T.get(t))),dirs:[...r.dirs].map((t=>this.#T.get(t)))}}check(t){const{paths:r,dirs:i}=this.#N(t);return r.every((r=>r&&r[0]===t))&&i.every((r=>r&&r[0]instanceof Set&&r[0].has(t)))}#I(t){if(this.#k.has(t)||!this.check(t)){return false}this.#k.add(t);t((()=>this.#D(t)));return true}#D(t){if(!this.#k.has(t)){return false}const r=this.#C.get(t);if(!r){throw new Error("invalid reservation")}const{paths:i,dirs:o}=r;const a=new Set;for(const r of i){const i=this.#T.get(r);if(!i||i?.[0]!==t){continue}const o=i[1];if(!o){this.#T.delete(r);continue}i.shift();if(typeof o==="function"){a.add(o)}else{for(const t of o){a.add(t)}}}for(const r of o){const i=this.#T.get(r);const o=i?.[0];if(!i||!(o instanceof Set))continue;if(o.size===1&&i.length===1){this.#T.delete(r);continue}else if(o.size===1){i.shift();const t=i[0];if(typeof t==="function"){a.add(t)}}else{o.delete(t)}}this.#k.delete(t);a.forEach((t=>this.#I(t)));return true}}const umask=()=>process.umask();const gi=Symbol("onEntry");const yi=Symbol("checkFs");const _i=Symbol("checkFs2");const vi=Symbol("isReusable");const bi=Symbol("makeFs");const wi=Symbol("file");const Ei=Symbol("directory");const Si=Symbol("link");const $i=Symbol("symlink");const Oi=Symbol("hardlink");const Ri=Symbol("ensureNoSymlink");const Pi=Symbol("unsupported");const Ai=Symbol("checkPath");const xi=Symbol("stripAbsolutePath");const Ti=Symbol("mkdir");const Ci=Symbol("onError");const ki=Symbol("pending");const Ii=Symbol("pend");const Ni=Symbol("unpend");const Di=Symbol("ended");const Li=Symbol("maybeClose");const Mi=Symbol("skip");const ji=Symbol("doChown");const Fi=Symbol("uid");const Ui=Symbol("gid");const Bi=Symbol("checkedCwd");const Hi=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;const Vi=Hi==="win32";const zi=1024;const unlinkFile=(r,i)=>{if(!Vi){return t.unlink(r,i)}const o=r+".DELETE."+(0,$.randomBytes)(16).toString("hex");t.rename(r,o,(r=>{if(r){return i(r)}t.unlink(o,i)}))};const unlinkFileSync=r=>{if(!Vi){return t.unlinkSync(r)}const i=r+".DELETE."+(0,$.randomBytes)(16).toString("hex");t.renameSync(r,i);t.unlinkSync(i)};const uint32=(t,r,i)=>t!==undefined&&t===t>>>0?t:r!==undefined&&r===r>>>0?r:i;class Unpack extends Parser{[Di]=false;[Bi]=false;[ki]=0;reservations=new PathReservations;transform;writable=true;readable=false;uid;gid;setOwner;preserveOwner;processGid;processUid;maxDepth;forceChown;win32;newer;keep;noMtime;preservePaths;unlink;cwd;strip;processUmask;umask;dmode;fmode;chmod;constructor(t={}){t.ondone=()=>{this[Di]=true;this[Li]()};super(t);this.transform=t.transform;this.chmod=!!t.chmod;if(typeof t.uid==="number"||typeof t.gid==="number"){if(typeof t.uid!=="number"||typeof t.gid!=="number"){throw new TypeError("cannot set owner without number uid and gid")}if(t.preserveOwner){throw new TypeError("cannot preserve owner in archive and also set owner explicitly")}this.uid=t.uid;this.gid=t.gid;this.setOwner=true}else{this.uid=undefined;this.gid=undefined;this.setOwner=false}if(t.preserveOwner===undefined&&typeof t.uid!=="number"){this.preserveOwner=!!(process.getuid&&process.getuid()===0)}else{this.preserveOwner=!!t.preserveOwner}this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():undefined;this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():undefined;this.maxDepth=typeof t.maxDepth==="number"?t.maxDepth:zi;this.forceChown=t.forceChown===true;this.win32=!!t.win32||Vi;this.newer=!!t.newer;this.keep=!!t.keep;this.noMtime=!!t.noMtime;this.preservePaths=!!t.preservePaths;this.unlink=!!t.unlink;this.cwd=Sr(r.resolve(t.cwd||process.cwd()));this.strip=Number(t.strip)||0;this.processUmask=!this.chmod?0:typeof t.processUmask==="number"?t.processUmask:umask();this.umask=typeof t.umask==="number"?t.umask:this.processUmask;this.dmode=t.dmode||511&~this.umask;this.fmode=t.fmode||438&~this.umask;this.on("entry",(t=>this[gi](t)))}warn(t,r,i={}){if(t==="TAR_BAD_ARCHIVE"||t==="TAR_ABORT"){i.recoverable=false}return super.warn(t,r,i)}[Li](){if(this[Di]&&this[ki]===0){this.emit("prefinish");this.emit("finish");this.emit("end")}}[xi](t,i){const o=t[i];const{type:a}=t;if(!o||this.preservePaths)return true;const c=o.split("/");if(c.includes("..")||Vi&&/^[a-z]:\.\.$/i.test(c[0]??"")){if(i==="path"||a==="Link"){this.warn("TAR_ENTRY_ERROR",`${i} contains '..'`,{entry:t,[i]:o});return false}else{const a=r.posix.dirname(t.path);const c=r.posix.normalize(r.posix.join(a,o));if(c.startsWith("../")||c===".."){this.warn("TAR_ENTRY_ERROR",`${i} escapes extraction directory`,{entry:t,[i]:o});return false}}}const[l,u]=stripAbsolutePath(o);if(l){t[i]=String(u);this.warn("TAR_ENTRY_INFO",`stripping ${l} from absolute ${i}`,{entry:t,[i]:o})}return true}[Ai](t){const i=Sr(t.path);const o=i.split("/");if(this.strip){if(o.length<this.strip){return false}if(t.type==="Link"){const r=Sr(String(t.linkpath)).split("/");if(r.length>=this.strip){t.linkpath=r.slice(this.strip).join("/")}else{return false}}o.splice(0,this.strip);t.path=o.join("/")}if(isFinite(this.maxDepth)&&o.length>this.maxDepth){this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:t,path:i,depth:o.length,maxDepth:this.maxDepth});return false}if(!this[xi](t,"path")||!this[xi](t,"linkpath")){return false}if(r.isAbsolute(t.path)){t.absolute=Sr(r.resolve(t.path))}else{t.absolute=Sr(r.resolve(this.cwd,t.path))}if(!this.preservePaths&&typeof t.absolute==="string"&&t.absolute.indexOf(this.cwd+"/")!==0&&t.absolute!==this.cwd){this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:t,path:Sr(t.path),resolvedPath:t.absolute,cwd:this.cwd});return false}if(t.absolute===this.cwd&&t.type!=="Directory"&&t.type!=="GNUDumpDir"){return false}if(this.win32){const{root:i}=r.win32.parse(String(t.absolute));t.absolute=i+winchars_encode(String(t.absolute).slice(i.length));const{root:o}=r.win32.parse(t.path);t.path=o+winchars_encode(t.path.slice(o.length))}return true}[gi](t){if(!this[Ai](t)){return t.resume()}O.equal(typeof t.absolute,"string");switch(t.type){case"Directory":case"GNUDumpDir":if(t.mode){t.mode=t.mode|448}case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[yi](t);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[Pi](t)}}[Ci](t,r){if(t.name==="CwdError"){this.emit("error",t)}else{this.warn("TAR_ENTRY_ERROR",t,{entry:r});this[Ni]();r.resume()}}[Ti](t,r,i){mkdir(Sr(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:r},i)}[ji](t){return this.forceChown||this.preserveOwner&&(typeof t.uid==="number"&&t.uid!==this.processUid||typeof t.gid==="number"&&t.gid!==this.processGid)||typeof this.uid==="number"&&this.uid!==this.processUid||typeof this.gid==="number"&&this.gid!==this.processGid}[Fi](t){return uint32(this.uid,t.uid,this.processUid)}[Ui](t){return uint32(this.gid,t.gid,this.processGid)}[wi](r,i){const o=typeof r.mode==="number"?r.mode&4095:this.fmode;const a=new WriteStream(String(r.absolute),{flags:ci(r.size),mode:o,autoClose:false});a.on("error",(o=>{if(a.fd){t.close(a.fd,(()=>{}))}a.write=()=>true;this[Ci](o,r);i()}));let c=1;const done=o=>{if(o){if(a.fd){t.close(a.fd,(()=>{}))}this[Ci](o,r);i();return}if(--c===0){if(a.fd!==undefined){t.close(a.fd,(t=>{if(t){this[Ci](t,r)}else{this[Ni]()}i()}))}}};a.on("finish",(()=>{const i=String(r.absolute);const o=a.fd;if(typeof o==="number"&&r.mtime&&!this.noMtime){c++;const a=r.atime||new Date;const l=r.mtime;t.futimes(o,a,l,(r=>r?t.utimes(i,a,l,(t=>done(t&&r))):done()))}if(typeof o==="number"&&this[ji](r)){c++;const a=this[Fi](r);const l=this[Ui](r);if(typeof a==="number"&&typeof l==="number"){t.fchown(o,a,l,(r=>r?t.chown(i,a,l,(t=>done(t&&r))):done()))}}done()}));const l=this.transform?this.transform(r)||r:r;if(l!==r){l.on("error",(t=>{this[Ci](t,r);i()}));r.pipe(l)}l.pipe(a)}[Ei](r,i){const o=typeof r.mode==="number"?r.mode&4095:this.dmode;this[Ti](String(r.absolute),o,(o=>{if(o){this[Ci](o,r);i();return}let a=1;const done=()=>{if(--a===0){i();this[Ni]();r.resume()}};if(r.mtime&&!this.noMtime){a++;t.utimes(String(r.absolute),r.atime||new Date,r.mtime,done)}if(this[ji](r)){a++;t.chown(String(r.absolute),Number(this[Fi](r)),Number(this[Ui](r)),done)}done()}))}[Pi](t){t.unsupported=true;this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${t.type}`,{entry:t});t.resume()}[$i](t,i){const o=Sr(r.relative(this.cwd,r.resolve(r.dirname(String(t.absolute)),String(t.linkpath)))).split("/");this[Ri](t,this.cwd,o,(()=>this[Si](t,String(t.linkpath),"symlink",i)),(r=>{this[Ci](r,t);i()}))}[Oi](t,i){const o=Sr(r.resolve(this.cwd,String(t.linkpath)));const a=Sr(String(t.linkpath)).split("/");this[Ri](t,this.cwd,a,(()=>this[Si](t,o,"link",i)),(r=>{this[Ci](r,t);i()}))}[Ri](i,o,a,c,l){const u=a.shift();if(this.preservePaths||u===undefined)return c();const h=r.resolve(o,u);t.lstat(h,((t,o)=>{if(t)return c();if(o?.isSymbolicLink()){return l(new SymlinkError(h,r.resolve(h,a.join("/"))))}this[Ri](i,h,a,c,l)}))}[Ii](){this[ki]++}[Ni](){this[ki]--;this[Li]()}[Mi](t){this[Ni]();t.resume()}[vi](t,r){return t.type==="File"&&!this.unlink&&r.isFile()&&r.nlink<=1&&!Vi}[yi](t){this[Ii]();const r=[t.path];if(t.linkpath){r.push(t.linkpath)}this.reservations.reserve(r,(r=>this[_i](t,r)))}[_i](i,o){const done=t=>{o(t)};const checkCwd=()=>{this[Ti](this.cwd,this.dmode,(t=>{if(t){this[Ci](t,i);done();return}this[Bi]=true;start()}))};const start=()=>{if(i.absolute!==this.cwd){const t=Sr(r.dirname(String(i.absolute)));if(t!==this.cwd){return this[Ti](t,this.dmode,(t=>{if(t){this[Ci](t,i);done();return}afterMakeParent()}))}}afterMakeParent()};const afterMakeParent=()=>{t.lstat(String(i.absolute),((r,o)=>{if(o&&(this.keep||this.newer&&o.mtime>(i.mtime??o.mtime))){this[Mi](i);done();return}if(r||this[vi](i,o)){return this[bi](null,i,done)}if(o.isDirectory()){if(i.type==="Directory"){const r=this.chmod&&i.mode&&(o.mode&4095)!==i.mode;const afterChmod=t=>this[bi](t??null,i,done);if(!r){return afterChmod()}return t.chmod(String(i.absolute),Number(i.mode),afterChmod)}if(i.absolute!==this.cwd){return t.rmdir(String(i.absolute),(t=>this[bi](t??null,i,done)))}}if(i.absolute===this.cwd){return this[bi](null,i,done)}unlinkFile(String(i.absolute),(t=>this[bi](t??null,i,done)))}))};if(this[Bi]){start()}else{checkCwd()}}[bi](t,r,i){if(t){this[Ci](t,r);i();return}switch(r.type){case"File":case"OldFile":case"ContiguousFile":return this[wi](r,i);case"Link":return this[Oi](r,i);case"SymbolicLink":return this[$i](r,i);case"Directory":case"GNUDumpDir":return this[Ei](r,i)}}[Si](r,i,o,a){t[o](i,String(r.absolute),(t=>{if(t){this[Ci](t,r)}else{this[Ni]();r.resume()}a()}))}}const callSync=t=>{try{return[null,t()]}catch(t){return[t,null]}};class UnpackSync extends Unpack{sync=true;[bi](t,r){return super[bi](t,r,(()=>{}))}[yi](i){if(!this[Bi]){const t=this[Ti](this.cwd,this.dmode);if(t){return this[Ci](t,i)}this[Bi]=true}if(i.absolute!==this.cwd){const t=Sr(r.dirname(String(i.absolute)));if(t!==this.cwd){const r=this[Ti](t,this.dmode);if(r){return this[Ci](r,i)}}}const[o,a]=callSync((()=>t.lstatSync(String(i.absolute))));if(a&&(this.keep||this.newer&&a.mtime>(i.mtime??a.mtime))){return this[Mi](i)}if(o||this[vi](i,a)){return this[bi](null,i)}if(a.isDirectory()){if(i.type==="Directory"){const r=this.chmod&&i.mode&&(a.mode&4095)!==i.mode;const[o]=r?callSync((()=>{t.chmodSync(String(i.absolute),Number(i.mode))})):[];return this[bi](o,i)}const[r]=callSync((()=>t.rmdirSync(String(i.absolute))));this[bi](r,i)}const[c]=i.absolute===this.cwd?[]:callSync((()=>unlinkFileSync(String(i.absolute))));this[bi](c,i)}[wi](r,i){const o=typeof r.mode==="number"?r.mode&4095:this.fmode;const oner=o=>{let c;try{t.closeSync(a)}catch(t){c=t}if(o||c){this[Ci](o||c,r)}i()};let a;try{a=t.openSync(String(r.absolute),ci(r.size),o)}catch(t){return oner(t)}const c=this.transform?this.transform(r)||r:r;if(c!==r){c.on("error",(t=>this[Ci](t,r)));r.pipe(c)}c.on("data",(r=>{try{t.writeSync(a,r,0,r.length)}catch(t){oner(t)}}));c.on("end",(()=>{let i=null;if(r.mtime&&!this.noMtime){const o=r.atime||new Date;const c=r.mtime;try{t.futimesSync(a,o,c)}catch(a){try{t.utimesSync(String(r.absolute),o,c)}catch(t){i=a}}}if(this[ji](r)){const o=this[Fi](r);const c=this[Ui](r);try{t.fchownSync(a,Number(o),Number(c))}catch(a){try{t.chownSync(String(r.absolute),Number(o),Number(c))}catch(t){i=i||a}}}oner(i)}))}[Ei](r,i){const o=typeof r.mode==="number"?r.mode&4095:this.dmode;const a=this[Ti](String(r.absolute),o);if(a){this[Ci](a,r);i();return}if(r.mtime&&!this.noMtime){try{t.utimesSync(String(r.absolute),r.atime||new Date,r.mtime)}catch(a){}}if(this[ji](r)){try{t.chownSync(String(r.absolute),Number(this[Fi](r)),Number(this[Ui](r)))}catch(a){}}i();r.resume()}[Ti](t,r){try{return mkdirSync(Sr(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:r})}catch(t){return t}}[Ri](i,o,a,c,l){if(this.preservePaths||!a.length)return c();let u=o;for(const i of a){u=r.resolve(u,i);const[h,d]=callSync((()=>t.lstatSync(u)));if(h)return c();if(d.isSymbolicLink()){return l(new SymlinkError(u,r.resolve(o,a.join("/"))))}}c()}[Si](r,i,o,a){const c=`${o}Sync`;try{t[c](i,String(r.absolute));a();r.resume()}catch(t){return this[Ci](t,r)}}}const extractFileSync=r=>{const i=new UnpackSync(r);const o=r.file;const a=t.statSync(o);const c=r.maxReadSize||16*1024*1024;const l=new ReadStreamSync(o,{readSize:c,size:a.size});l.pipe(i)};const extractFile=(r,i)=>{const o=new Unpack(r);const a=r.maxReadSize||16*1024*1024;const c=r.file;const l=new Promise(((r,i)=>{o.on("error",i);o.on("close",r);t.stat(c,((t,r)=>{if(t){i(t)}else{const t=new ReadStream(c,{readSize:a,size:r.size});t.on("error",i);t.pipe(o)}}))}));return l};const Gi=makeCommand(extractFileSync,extractFile,(t=>new UnpackSync(t)),(t=>new Unpack(t)),((t,r)=>{if(r?.length)filesFilter(t,r)}));const replaceSync=(r,i)=>{const o=new PackSync(r);let a=true;let c;let l;try{try{c=t.openSync(r.file,"r+")}catch(i){if(i?.code==="ENOENT"){c=t.openSync(r.file,"w+")}else{throw i}}const u=t.fstatSync(c);const h=Buffer.alloc(512);e:for(l=0;l<u.size;l+=512){for(let r=0,i=0;r<512;r+=i){i=t.readSync(c,h,r,h.length-r,l+r);if(l===0&&h[0]===31&&h[1]===139){throw new Error("cannot append to compressed archives")}if(!i){break e}}const i=new Header(h);if(!i.cksumValid){break}const o=512*Math.ceil((i.size||0)/512);if(l+o+512>u.size){break}l+=o;if(r.mtimeCache&&i.mtime){r.mtimeCache.set(String(i.path),i.mtime)}}a=false;streamSync(r,o,l,c,i)}finally{if(a){try{t.closeSync(c)}catch(t){}}}};const streamSync=(t,r,i,o,a)=>{const c=new WriteStreamSync(t.file,{fd:o,start:i});r.pipe(c);replace_addFilesSync(r,a)};const replaceAsync=(r,i)=>{i=Array.from(i);const o=new Pack(r);const getPos=(i,o,a)=>{const cb=(r,o)=>{if(r){t.close(i,(t=>a(r)))}else{a(null,o)}};let c=0;if(o===0){return cb(null,0)}let l=0;const u=Buffer.alloc(512);const onread=(a,h)=>{if(a||typeof h==="undefined"){return cb(a)}l+=h;if(l<512&&h){return t.read(i,u,l,u.length-l,c+l,onread)}if(c===0&&u[0]===31&&u[1]===139){return cb(new Error("cannot append to compressed archives"))}if(l<512){return cb(null,c)}const d=new Header(u);if(!d.cksumValid){return cb(null,c)}const p=512*Math.ceil((d.size??0)/512);if(c+p+512>o){return cb(null,c)}c+=p+512;if(c>=o){return cb(null,c)}if(r.mtimeCache&&d.mtime){r.mtimeCache.set(String(d.path),d.mtime)}l=0;t.read(i,u,0,512,c,onread)};t.read(i,u,0,512,c,onread)};const a=new Promise(((a,c)=>{o.on("error",c);let l="r+";const onopen=(u,h)=>{if(u&&u.code==="ENOENT"&&l==="r+"){l="w+";return t.open(r.file,l,onopen)}if(u||!h){return c(u)}t.fstat(h,((l,u)=>{if(l){return t.close(h,(()=>c(l)))}getPos(h,u.size,((t,l)=>{if(t){return c(t)}const u=new WriteStream(r.file,{fd:h,start:l});o.pipe(u);u.on("error",c);u.on("close",a);replace_addFilesAsync(o,i)}))}))};t.open(r.file,l,onopen)}));return a};const replace_addFilesSync=(t,i)=>{i.forEach((i=>{if(i.charAt(0)==="@"){is({file:r.resolve(t.cwd,i.slice(1)),sync:true,noResume:true,onReadEntry:r=>t.add(r)})}else{t.add(i)}}));t.end()};const replace_addFilesAsync=async(t,i)=>{for(let o=0;o<i.length;o++){const a=String(i[o]);if(a.charAt(0)==="@"){await is({file:r.resolve(String(t.cwd),a.slice(1)),noResume:true,onReadEntry:r=>t.add(r)})}else{t.add(a)}}t.end()};const Wi=makeCommand(replaceSync,replaceAsync,(()=>{throw new TypeError("file is required")}),(()=>{throw new TypeError("file is required")}),((t,r)=>{if(!isFile(t)){throw new TypeError("file is required")}if(t.gzip||t.brotli||t.zstd||t.file.endsWith(".br")||t.file.endsWith(".tbr")){throw new TypeError("cannot append to compressed archives")}if(!r?.length){throw new TypeError("no paths specified to add/replace")}}));const qi=makeCommand(Wi.syncFile,Wi.asyncFile,Wi.syncNoFile,Wi.asyncNoFile,((t,r=[])=>{Wi.validate?.(t,r);mtimeFilter(t)}));const mtimeFilter=t=>{const r=t.filter;if(!t.mtimeCache){t.mtimeCache=new Map}t.filter=r?(i,o)=>r(i,o)&&!((t.mtimeCache?.get(i)??o.mtime??0)>(o.mtime??0)):(r,i)=>!((t.mtimeCache?.get(r)??i.mtime??0)>(i.mtime??0))};async function isUrlOk(t){try{const r=await fetch(t,{method:"HEAD"});return r.status===200}catch{return false}}async function getRepoInfo(t,r){const[,i,o,a,c,...l]=t.pathname.split("/");const u=r?r.replace(/^\//,""):l.join("/");if(a===undefined||a===""&&c===undefined){try{const t=await fetch(`https://api.github.com/repos/${i}/${o}`);if(t.status!==200){return}const r=await t.json();return{username:i,name:o,branch:r.default_branch,filePath:u}}catch{return}}const h=r?`${c}/${l.join("/")}`.replace(new RegExp(`/${u}|/$`),""):c;if(i&&o&&h&&a==="tree"){return{username:i,name:o,branch:h,filePath:u}}}function hasRepo({username:t,name:r,branch:i,filePath:o}){const a=`https://api.github.com/repos/${t}/${r}/contents`;const c=`${o?`/${o}`:""}/package.json`;return isUrlOk(`${a}${c}?ref=${i}`)}function existsInRepo(t){try{const r=new URL(t);return isUrlOk(r.href)}catch{return isUrlOk(`https://api.github.com/repos/zuplo/zudoku/contents/examples/${encodeURIComponent(t)}`)}}async function downloadTarStream(t){const r=await fetch(t);if(!r.body){throw new Error(`Failed to download: ${t}`)}return N.Readable.fromWeb(r.body)}async function downloadAndExtractRepo(t,{username:i,name:o,branch:a,filePath:c}){let l=null;await(0,Ge.pipeline)(await downloadTarStream(`https://codeload.github.com/${i}/${o}/tar.gz/${a}`),Gi({cwd:t,strip:c?c.split("/").length+1:1,filter:t=>{if(l===null){const i=t.split(r.sep);l=i.length?i[0]:null}return t.startsWith(`${l}${c?`/${c}/`:"/"}`)}}))}async function downloadAndExtractExample(t,r){if(r==="__internal-testing-retry"){throw new Error("This is an internal example for testing the CLI.")}await(0,Ge.pipeline)(await downloadTarStream("https://codeload.github.com/zuplo/zudoku/tar.gz/canary"),Gi({cwd:t,strip:2+r.split("/").length,filter:t=>t.includes(`zudoku-canary/examples/${r}/`)}))}var Ki=__nccwpck_require__(1421);function isInGitRepository(){try{(0,Ki.execSync)("git rev-parse --is-inside-work-tree",{stdio:"ignore"});return true}catch{}return false}function isInMercurialRepository(){try{(0,Ki.execSync)("hg --cwd . root",{stdio:"ignore"});return true}catch{}return false}function isDefaultBranchSet(){try{(0,Ki.execSync)("git config init.defaultBranch",{stdio:"ignore"});return true}catch{}return false}function tryGitInit(i){let o=false;try{(0,Ki.execSync)("git --version",{stdio:"ignore"});if(isInGitRepository()||isInMercurialRepository()){return false}(0,Ki.execSync)("git init",{stdio:"ignore"});o=true;if(!isDefaultBranchSet()){(0,Ki.execSync)("git checkout -b main",{stdio:"ignore"})}(0,Ki.execSync)("git add -A",{stdio:"ignore"});(0,Ki.execSync)('git commit -m "Initial commit from Create Next App"',{stdio:"ignore"});return true}catch{if(o){try{(0,t.rmSync)((0,r.join)(i,".git"),{recursive:true,force:true})}catch{}}return false}}var Yi=__nccwpck_require__(670);var Zi=__nccwpck_require__.n(Yi);async function install(t,r){const i=["install"];if(!r){console.log((0,je.yellow)("You appear to be offline.\nFalling back to the local cache."));i.push("--offline")}return new Promise(((r,o)=>{const a=Zi()(t,i,{stdio:"inherit",env:{...process.env,ADBLOCK:"1",NODE_ENV:"development",DISABLE_OPENCOLLECTIVE:"1"}});a.on("close",(a=>{if(a!==0){o({command:`${t} ${i.join(" ")}`});return}r()}))}))}function isFolderEmpty(i,o){const a=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log","yarnrc.yml",".yarn"];const c=(0,t.readdirSync)(i).filter((t=>!a.includes(t)&&!/\.iml$/.test(t)));if(c.length>0){console.log(`The directory ${(0,je.green)(o)} contains files that could conflict:`);console.log();for(const o of c){try{const a=(0,t.lstatSync)((0,r.join)(i,o));if(a.isDirectory()){console.log(` ${(0,je.blue)(o)}/`)}else{console.log(` ${o}`)}}catch{console.log(` ${o}`)}}console.log();console.log("Either try using a new directory name, or remove the files listed above.");console.log();return false}return true}const Xi=require("node:dns/promises");const Ji=require("node:url");var Qi=__nccwpck_require__.n(Ji);function getProxy(){if(process.env.https_proxy){return process.env.https_proxy}try{const t=(0,Ki.execSync)("npm config get https-proxy").toString().trim();return t!=="null"?t:undefined}catch{return}}async function getOnline(){try{await(0,Xi.lookup)("registry.yarnpkg.com");return true}catch{const t=getProxy();if(!t){return false}const{hostname:r}=Qi().parse(t);if(!r){return false}try{await(0,Xi.lookup)(r);return true}catch{return false}}}const en=require("node:constants");async function isWriteable(t){try{await(0,li.access)(t,en.W_OK);return true}catch{return false}}var tn=__nccwpck_require__(2457);const identity=t=>t;const copy=async(t,i,{cwd:o,rename:a=identity,parents:c=true}={})=>{const l=typeof t==="string"?[t]:t;if(l.length===0||!i){throw new TypeError("`src` and `dest` are required")}const u=await(0,tn.async)(l,{cwd:o,dot:true,absolute:false,stats:false});const h=o?(0,r.resolve)(o,i):i;return Promise.all(u.map((async t=>{const i=(0,r.dirname)(t);const l=a((0,r.basename)(t));const u=o?(0,r.resolve)(o,t):t;const d=c?(0,r.join)(h,i,l):(0,r.join)(h,l);await(0,li.mkdir)((0,r.dirname)(d),{recursive:true});return(0,li.copyFile)(u,d)})))};const rn=__dirname.endsWith("dist")?i().join(__dirname,"templates"):__dirname;const getTemplateFile=({template:t,mode:r,file:o})=>i().join(rn,t,r,o);const installTemplate=async({appName:t,root:r,packageManager:o,isOnline:a,template:c,mode:l,eslint:u,skipInstall:h,zudokuVersion:d})=>{var p;console.log((0,je.bold)(`Using ${o}.`));console.log("\nInitializing project with template:",c,"\n");const m=i().join(rn,c,l);const g=["**"];if(!u)g.push("!eslintrc.json");await copy(g,r,{parents:true,cwd:m,rename(t){switch(t){case"gitignore":case"eslintrc.json":{return`.${t}`}case"README-template.md":{return"README.md"}default:{return t}}}});const y=(p=process.env.ZUDOKU_PRIVATE_TEST_VERSION)!==null&&p!==void 0?p:d;const v={name:t,version:"0.1.0",type:"module",private:true,scripts:{dev:"zudoku dev",build:"zudoku build",preview:"zudoku preview",lint:"eslint"},dependencies:{react:">=19.0.0","react-dom":">=19.0.0",zudoku:y},devDependencies:{}};if(l==="ts"){v.devDependencies={...v.devDependencies,"@types/node":"^22","@types/react":"^19","@types/react-dom":"^19",typescript:"^5"}}if(u){v.devDependencies={...v.devDependencies,eslint:"^8"}}if(u&&l==="ts"){v.devDependencies={...v.devDependencies,"@typescript-eslint/eslint-plugin":"^8","@typescript-eslint/parser":"^8"}}const b=Object.keys(v.devDependencies).length;if(!b)delete v.devDependencies;await ui().writeFile(i().join(r,"package.json"),JSON.stringify(v,null,2)+x().EOL);if(h)return;console.log("\nInstalling dependencies:");for(const t in v.dependencies)console.log(`- ${(0,je.cyan)(t)}`);if(b){console.log("\nInstalling devDependencies:");for(const t in v.devDependencies)console.log(`- ${(0,je.cyan)(t)}`)}console.log();await install(o,a)};class DownloadError extends Error{}async function createApp({appPath:i,packageManager:o,example:a,examplePath:c,typescript:l,eslint:u,skipInstall:h,zudokuVersion:d}){let p;const m=l?"ts":"js";const g=`default`;if(a){let R;try{R=new URL(a)}catch(P){const A=P;if(A.code!=="ERR_INVALID_URL"){console.error(P);process.exit(1)}}if(R){if(R.origin!=="https://github.com"){console.error(`Invalid URL: ${(0,je.red)(`"${a}"`)}. Only GitHub repositories are supported. Please use a GitHub URL and try again.`);process.exit(1)}p=await getRepoInfo(R,c);if(!p){console.error(`Found invalid GitHub URL: ${(0,je.red)(`"${a}"`)}. Please fix the URL and try again.`);process.exit(1)}const x=await hasRepo(p);if(!x){console.error(`Could not locate the repository for ${(0,je.red)(`"${a}"`)}. Please check that the repository exists and try again.`);process.exit(1)}}else if(a!=="__internal-testing-retry"){const T=await existsInRepo(a);if(!T){console.error(`Could not locate an example named ${(0,je.red)(`"${a}"`)}. It could be due to the following:\n`,`1. Your spelling of example ${(0,je.red)(`"${a}"`)} might be incorrect.\n`,`2. You might not be connected to the internet or you are behind a proxy.`);process.exit(1)}}}const y=(0,r.resolve)(i);if(!await isWriteable((0,r.dirname)(y))){console.error("The application path is not writable, please check folder permissions and try again.");console.error("It is likely you do not have write permissions for this folder.");process.exit(1)}const v=(0,r.basename)(y);(0,t.mkdirSync)(y,{recursive:true});if(!isFolderEmpty(y,v)){process.exit(1)}const b=o==="yarn";const w=!b||await getOnline();const E=process.cwd();console.log(`Creating a new Zudoku app in ${(0,je.green)(y)}.`);console.log();process.chdir(y);const S=(0,r.join)(y,"package.json");let $=false;if(a){try{if(p){const k=p;console.log(`Downloading files from repo ${(0,je.cyan)(a)}. This might take a moment.`);console.log();await ze()((()=>downloadAndExtractRepo(y,k)),{retries:3})}else{console.log(`Downloading files for example ${(0,je.cyan)(a)}. This might take a moment.`);console.log();await ze()((()=>downloadAndExtractExample(y,a)),{retries:3})}}catch(I){function isErrorLike(t){return typeof t==="object"&&t!==null&&typeof t.message==="string"}throw new DownloadError(isErrorLike(I)?I.message:String(I))}const C=(0,r.join)(y,".gitignore");if(!(0,t.existsSync)(C)){(0,t.copyFileSync)(getTemplateFile({template:g,mode:m,file:"gitignore"}),C)}$=(0,t.existsSync)(S);if(!h&&$){console.log("Installing packages. This might take a couple of minutes.");console.log();await install(o,w);console.log()}}else{await installTemplate({appName:v,root:y,template:g,mode:m,packageManager:o,isOnline:w,eslint:u,skipInstall:h,zudokuVersion:d})}if(tryGitInit(y)){console.log("Initialized a git repository.");console.log()}let O;if((0,r.join)(E,v)===i){O=v}else{O=i}console.log(`${(0,je.green)("Success!")} Created ${v} at ${i}`);if($){console.log("Inside that directory, you can run several commands:");console.log();console.log((0,je.cyan)(` ${o} ${b?"":"run "}dev`));console.log(" Starts the development server.");console.log();console.log((0,je.cyan)(` ${o} ${b?"":"run "}build`));console.log(" Builds the app for production.");console.log();console.log((0,je.cyan)(` ${o} start`));console.log(" Runs the built app in production mode.");console.log();console.log("We suggest that you begin by typing:");console.log();console.log((0,je.cyan)(" cd"),O);console.log(` ${(0,je.cyan)(`${o} ${b?"":"run "}dev`)}`)}console.log()}function getPkgManager(){var t;const r=(t=process.env.npm_config_user_agent)!==null&&t!==void 0?t:"";if(r.startsWith("yarn")){return"yarn"}if(r.startsWith("pnpm")){return"pnpm"}if(r.startsWith("bun")){return"bun"}return"npm"}var sn=__nccwpck_require__(8904);var nn=__nccwpck_require__.n(sn);function validateNpmName(t){const r=nn()(t);if(r.validForNewPackages){return{valid:true}}return{valid:false,problems:[...r.errors||[],...r.warnings||[]]}}let on="";const handleSigTerm=()=>process.exit(0);process.on("SIGINT",handleSigTerm);process.on("SIGTERM",handleSigTerm);const onPromptState=t=>{if(t.aborted){process.stdout.write("[?25h");process.stdout.write("\n");process.exit(1)}};const an=JSON.parse((0,t.readFileSync)(i().resolve(__dirname,"../package.json"),"utf-8"));const cn=new y(an.name).version(an.version,"-v, --version","Output the current version of create-zudoku.").argument("[directory]").usage("[directory] [options]").helpOption("-h, --help","Display this help message.").option("--ts, --typescript","Initialize as a TypeScript project. (default)").option("--js, --javascript","Initialize as a JavaScript project.").option("--eslint","Initialize with ESLint config.").option("--import-alias <prefix/*>",'Specify import alias to use (default "@/*").').option("--use-npm","Explicitly tell the CLI to bootstrap the application using npm.").option("--use-pnpm","Explicitly tell the CLI to bootstrap the application using pnpm.").option("--use-yarn","Explicitly tell the CLI to bootstrap the application using Yarn.").option("--use-bun","Explicitly tell the CLI to bootstrap the application using Bun.").option("--reset, --reset-preferences","Reset the preferences saved for create-zudoku.").option("--skip-install","Explicitly tell the CLI to skip installing packages.").option("--yes","Use saved preferences or defaults for unprovided options.").option("-e, --example <example-name|github-url>",`\n\n An example to bootstrap the app with. You can use an example name\n from the official Zudoku repo or a public GitHub URL. The URL can use\n any branch and/or subdirectory.\n`).option("--example-path <path-to-example>",`\n\n In a rare case, your GitHub URL might contain a branch name with\n a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar).\n In this case, you must specify the path to the example separately:\n --example-path foo/bar\n`).action((t=>{if(t&&!t.startsWith("--no-")){on=t}})).allowUnknownOption().parse(process.argv);const ln=cn.opts();const{args:un}=cn;const hn=ln.useNpm?"npm":ln.usePnpm?"pnpm":ln.useYarn?"yarn":ln.useBun?"bun":getPkgManager();async function run(){const i=new Conf({projectName:"create-zudoku"});if(ln.resetPreferences){const{resetPreferences:t}=await Ue()({onState:onPromptState,type:"toggle",name:"resetPreferences",message:"Would you like to reset the saved preferences?",initial:false,active:"Yes",inactive:"No"});if(t){i.clear();console.log("The preferences have been reset successfully!")}process.exit(0)}if(typeof on==="string"){on=on.trim()}if(!on){const t=await Ue()({onState:onPromptState,type:"text",name:"path",message:"What is your project named?",initial:"my-app",validate:t=>{const i=validateNpmName((0,r.basename)((0,r.resolve)(t)));if(i.valid){return true}return`Invalid project name: ${i.problems[0]}`}});if(typeof t.path==="string"){on=t.path.trim()}}if(!on){console.log("\nPlease specify the project directory:\n"+` ${(0,je.cyan)(ln.name())} ${(0,je.green)("<project-directory>")}\n`+"For example:\n"+` ${(0,je.cyan)(ln.name())} ${(0,je.green)("my-zudoku-app")}\n\n`+`Run ${(0,je.cyan)(`${ln.name()} --help`)} to see all options.`);process.exit(1)}const o=(0,r.resolve)(on);const c=(0,r.basename)(o);const l=validateNpmName(c);if(!l.valid){console.error(`Could not create a project called ${(0,je.red)(`"${c}"`)} because of npm naming restrictions:`);l.problems.forEach((t=>console.error(` ${(0,je.red)((0,je.bold)("*"))} ${t}`)));process.exit(1)}if(ln.example===true){console.error("Please provide an example name or url, otherwise remove the example option.");process.exit(1)}if((0,t.existsSync)(o)&&!isFolderEmpty(o,c)){process.exit(1)}const u=typeof ln.example==="string"&&ln.example.trim();const h=i.get("preferences")||{};const d=a().isCI||ln.yes;if(!u){const t={typescript:true,eslint:true,empty:false};const getPrefOrDefault=r=>{var i;return(i=h[r])!==null&&i!==void 0?i:t[r]};if(!ln.typescript&&!ln.javascript){if(d){ln.typescript=getPrefOrDefault("typescript")}else{const t=(0,je.blue)("TypeScript");const{typescript:r}=await Ue()({type:"toggle",name:"typescript",message:`Would you like to use ${t}?`,initial:getPrefOrDefault("typescript"),active:"Yes",inactive:"No"},{onCancel:()=>{console.error("Exiting.");process.exit(1)}});ln.typescript=Boolean(r);ln.javascript=!r;h.typescript=Boolean(r)}}if(!ln.eslint&&!un.includes("--no-eslint")){if(d){ln.eslint=getPrefOrDefault("eslint")}else{const t=(0,je.blue)("ESLint");const{eslint:r}=await Ue()({onState:onPromptState,type:"toggle",name:"eslint",message:`Would you like to use ${t}?`,initial:getPrefOrDefault("eslint"),active:"Yes",inactive:"No"});ln.eslint=Boolean(r);h.eslint=Boolean(r)}}}try{await createApp({appPath:o,packageManager:hn,example:u&&u!=="default"?u:undefined,examplePath:ln.examplePath,typescript:ln.typescript,eslint:ln.eslint,skipInstall:ln.skipInstall,zudokuVersion:an.version})}catch(t){if(!(t instanceof DownloadError)){throw t}const r=await Ue()({onState:onPromptState,type:"confirm",name:"builtin",message:`Could not download "${u}" because of a connectivity issue between your machine and GitHub.\n`+`Do you want to use the default template instead?`,initial:true});if(!r.builtin){throw t}await createApp({appPath:o,packageManager:hn,typescript:ln.typescript,eslint:ln.eslint,skipInstall:ln.skipInstall,zudokuVersion:an.version})}i.set("preferences",h)}const fn=He()(an).catch((()=>null));async function notifyUpdate(){var t;try{if((t=await fn)===null||t===void 0?void 0:t.latest){const t={npm:"npm i -g",yarn:"yarn global add",pnpm:"pnpm add -g",bun:"bun add -g"};const r=`${t[hn]} create-zudoku`;console.log((0,je.yellow)((0,je.bold)("A new version of `create-zudoku` is available!"))+"\n"+"You can update by running: "+(0,je.cyan)(r)+"\n")}process.exit(0)}catch{}}async function exit(t){console.log();console.log("Aborting installation.");if(t.command){console.log(` ${(0,je.cyan)(t.command)} has failed.`)}else{console.log(`${(0,je.red)("Unexpected error. Please report it as a bug:")}\n`,t)}console.log();await notifyUpdate();process.exit(1)}run().then(notifyUpdate).catch(exit)})();module.exports=i})();
72
+ */const m=p(952);const toRegexRange=(t,u,p)=>{if(m(t)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(u===void 0||t===u){return String(t)}if(m(u)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let g={relaxZeros:true,...p};if(typeof g.strictZeros==="boolean"){g.relaxZeros=g.strictZeros===false}let y=String(g.relaxZeros);let v=String(g.shorthand);let b=String(g.capture);let w=String(g.wrap);let E=t+":"+u+"="+y+v+b+w;if(toRegexRange.cache.hasOwnProperty(E)){return toRegexRange.cache[E].result}let $=Math.min(t,u);let O=Math.max(t,u);if(Math.abs($-O)===1){let p=t+"|"+u;if(g.capture){return`(${p})`}if(g.wrap===false){return p}return`(?:${p})`}let R=hasPadding(t)||hasPadding(u);let P={min:t,max:u,a:$,b:O};let A=[];let x=[];if(R){P.isPadded=R;P.maxLen=String(P.max).length}if($<0){let t=O<0?Math.abs(O):1;x=splitToPatterns(t,Math.abs($),P,g);$=P.a=0}if(O>=0){A=splitToPatterns($,O,P,g)}P.negatives=x;P.positives=A;P.result=collatePatterns(x,A,g);if(g.capture===true){P.result=`(${P.result})`}else if(g.wrap!==false&&A.length+x.length>1){P.result=`(?:${P.result})`}toRegexRange.cache[E]=P;return P.result};function collatePatterns(t,u,p){let m=filterPatterns(t,u,"-",false,p)||[];let g=filterPatterns(u,t,"",false,p)||[];let y=filterPatterns(t,u,"-?",true,p)||[];let v=m.concat(y).concat(g);return v.join("|")}function splitToRanges(t,u){let p=1;let m=1;let g=countNines(t,p);let y=new Set([u]);while(t<=g&&g<=u){y.add(g);p+=1;g=countNines(t,p)}g=countZeros(u+1,m)-1;while(t<g&&g<=u){y.add(g);m+=1;g=countZeros(u+1,m)-1}y=[...y];y.sort(compare);return y}function rangeToPattern(t,u,p){if(t===u){return{pattern:t,count:[],digits:0}}let m=zip(t,u);let g=m.length;let y="";let v=0;for(let t=0;t<g;t++){let[u,g]=m[t];if(u===g){y+=u}else if(u!=="0"||g!=="9"){y+=toCharacterClass(u,g,p)}else{v++}}if(v){y+=p.shorthand===true?"\\d":"[0-9]"}return{pattern:y,count:[v],digits:g}}function splitToPatterns(t,u,p,m){let g=splitToRanges(t,u);let y=[];let v=t;let b;for(let t=0;t<g.length;t++){let u=g[t];let w=rangeToPattern(String(v),String(u),m);let E="";if(!p.isPadded&&b&&b.pattern===w.pattern){if(b.count.length>1){b.count.pop()}b.count.push(w.count[0]);b.string=b.pattern+toQuantifier(b.count);v=u+1;continue}if(p.isPadded){E=padZeros(u,p,m)}w.string=E+w.pattern+toQuantifier(w.count);y.push(w);v=u+1;b=w}return y}function filterPatterns(t,u,p,m,g){let y=[];for(let g of t){let{string:t}=g;if(!m&&!contains(u,"string",t)){y.push(p+t)}if(m&&contains(u,"string",t)){y.push(p+t)}}return y}function zip(t,u){let p=[];for(let m=0;m<t.length;m++)p.push([t[m],u[m]]);return p}function compare(t,u){return t>u?1:u>t?-1:0}function contains(t,u,p){return t.some((t=>t[u]===p))}function countNines(t,u){return Number(String(t).slice(0,-u)+"9".repeat(u))}function countZeros(t,u){return t-t%Math.pow(10,u)}function toQuantifier(t){let[u=0,p=""]=t;if(p||u>1){return`{${u+(p?","+p:"")}}`}return""}function toCharacterClass(t,u,p){return`[${t}${u-t===1?"":"-"}${u}]`}function hasPadding(t){return/^-?(0+)\d/.test(t)}function padZeros(t,u,p){if(!u.isPadded){return t}let m=Math.abs(u.maxLen-String(t).length);let g=p.relaxZeros!==false;switch(m){case 0:return"";case 1:return g?"0?":"0";case 2:return g?"0{0,2}":"00";default:{return g?`0{0,${m}}`:`0{${m}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};t.exports=toRegexRange},5059:(t,u,p)=>{const{URL:m}=p(7016);const{join:g}=p(6928);const y=p(7515);const{promisify:v}=p(9023);const{tmpdir:b}=p(857);const w=p(3805);const E=v(y.writeFile);const $=v(y.mkdir);const O=v(y.readFile);const compareVersions=(t,u)=>t.localeCompare(u,"en-US",{numeric:true});const encode=t=>encodeURIComponent(t).replace(/^%40/,"@");const getFile=async(t,u)=>{const p=b();const m=g(p,"update-check");if(!y.existsSync(m)){await $(m)}let v=`${t.name}-${u}.json`;if(t.scope){v=`${t.scope}-${v}`}return g(m,v)};const evaluateCache=async(t,u,p)=>{if(y.existsSync(t)){const m=await O(t,"utf8");const{lastUpdate:g,latest:y}=JSON.parse(m);const v=g+p;if(v>u){return{shouldCheck:false,latest:y}}}return{shouldCheck:true,latest:null}};const updateCache=async(t,u,p)=>{const m=JSON.stringify({latest:u,lastUpdate:p});await E(t,m,"utf8")};const loadPackage=(t,u)=>new Promise(((m,g)=>{const y={host:t.hostname,path:t.pathname,port:t.port,headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},timeout:2e3};if(u){y.headers.authorization=`${u.type} ${u.token}`}const{get:v}=p(t.protocol==="https:"?5692:8611);v(y,(t=>{const{statusCode:u}=t;if(u!==200){const p=new Error(`Request failed with code ${u}`);p.code=u;g(p);t.resume();return}let p="";t.setEncoding("utf8");t.on("data",(t=>{p+=t}));t.on("end",(()=>{try{const t=JSON.parse(p);m(t)}catch(t){g(t)}}))})).on("error",g).on("timeout",g)}));const getMostRecent=async({full:t,scope:u},g)=>{const y=w(u);const v=new m(t,y);let b=null;try{b=await loadPackage(v)}catch(t){if(t.code&&String(t.code).startsWith(4)){const t=p(4133);const u=t(y,{recursive:true});b=await loadPackage(v,u)}else{throw t}}const E=b["dist-tags"][g];if(!E){throw new Error(`Distribution tag ${g} is not available`)}return E};const R={interval:36e5,distTag:"latest"};const getDetails=t=>{const u={full:encode(t)};if(t.includes("/")){const p=t.split("/");u.scope=p[0];u.name=p[1]}else{u.scope=null;u.name=t}return u};t.exports=async(t,u)=>{if(typeof t!=="object"){throw new Error("The first parameter should be your package.json file content")}const p=getDetails(t.name);const m=Date.now();const{distTag:g,interval:y}=Object.assign({},R,u);const v=await getFile(p,g);let b=null;let w=true;({shouldCheck:w,latest:b}=await evaluateCache(v,m,y));if(w){b=await getMostRecent(p,g);await updateCache(v,b,m)}const E=compareVersions(t.version,b);if(E===-1){return{latest:b,fromCache:!w}}return null}},8904:(t,u,p)=>{"use strict";const m=p(6737);var g=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");var y=["node_modules","favicon.ico"];function validate(t){var u=[];var p=[];if(t===null){p.push("name cannot be null");return done(u,p)}if(t===undefined){p.push("name cannot be undefined");return done(u,p)}if(typeof t!=="string"){p.push("name must be a string");return done(u,p)}if(!t.length){p.push("name length must be greater than zero")}if(t.startsWith(".")){p.push("name cannot start with a period")}if(t.startsWith("-")){p.push("name cannot start with a hyphen")}if(t.match(/^_/)){p.push("name cannot start with an underscore")}if(t.trim()!==t){p.push("name cannot contain leading or trailing spaces")}y.forEach((function(u){if(t.toLowerCase()===u){p.push(u+" is not a valid package name")}}));if(m.includes(t.toLowerCase())){u.push(t+" is a core module name")}if(t.length>214){u.push("name can no longer contain more than 214 characters")}if(t.toLowerCase()!==t){u.push("name can no longer contain capital letters")}if(/[~'!()*]/.test(t.split("/").slice(-1)[0])){u.push('name can no longer contain special characters ("~\'!()*")')}if(encodeURIComponent(t)!==t){var v=t.match(g);if(v){var b=v[1];var w=v[2];if(w.startsWith(".")){p.push("name cannot start with a period")}if(encodeURIComponent(b)===b&&encodeURIComponent(w)===w){return done(u,p)}}p.push("name can only contain URL-friendly characters")}return done(u,p)}var done=function(t,u){var p={validForNewPackages:u.length===0&&t.length===0,validForOldPackages:u.length===0,warnings:t,errors:u};if(!p.warnings.length){delete p.warnings}if(!p.errors.length){delete p.errors}return p};t.exports=validate},1192:(t,u,p)=>{const m=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const g=p(6928);const y=m?";":":";const v=p(7105);const getNotFoundError=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"});const getPathInfo=(t,u)=>{const p=u.colon||y;const g=t.match(/\//)||m&&t.match(/\\/)?[""]:[...m?[process.cwd()]:[],...(u.path||process.env.PATH||"").split(p)];const v=m?u.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const b=m?v.split(p):[""];if(m){if(t.indexOf(".")!==-1&&b[0]!=="")b.unshift("")}return{pathEnv:g,pathExt:b,pathExtExe:v}};const which=(t,u,p)=>{if(typeof u==="function"){p=u;u={}}if(!u)u={};const{pathEnv:m,pathExt:y,pathExtExe:b}=getPathInfo(t,u);const w=[];const step=p=>new Promise(((y,v)=>{if(p===m.length)return u.all&&w.length?y(w):v(getNotFoundError(t));const b=m[p];const E=/^".*"$/.test(b)?b.slice(1,-1):b;const $=g.join(E,t);const O=!E&&/^\.[\\\/]/.test(t)?t.slice(0,2)+$:$;y(subStep(O,p,0))}));const subStep=(t,p,m)=>new Promise(((g,E)=>{if(m===y.length)return g(step(p+1));const $=y[m];v(t+$,{pathExt:b},((y,v)=>{if(!y&&v){if(u.all)w.push(t+$);else return g(t+$)}return g(subStep(t,p,m+1))}))}));return p?step(0).then((t=>p(null,t)),p):step(0)};const whichSync=(t,u)=>{u=u||{};const{pathEnv:p,pathExt:m,pathExtExe:y}=getPathInfo(t,u);const b=[];for(let w=0;w<p.length;w++){const E=p[w];const $=/^".*"$/.test(E)?E.slice(1,-1):E;const O=g.join($,t);const R=!$&&/^\.[\\\/]/.test(t)?t.slice(0,2)+O:O;for(let t=0;t<m.length;t++){const p=R+m[t];try{const t=v.sync(p,{pathExt:y});if(t){if(u.all)b.push(p);else return p}}catch(t){}}}if(u.all&&b.length)return b;if(u.nothrow)return null;throw getNotFoundError(t)};t.exports=which;which.sync=whichSync},181:t=>{"use strict";t.exports=require("buffer")},5317:t=>{"use strict";t.exports=require("child_process")},4434:t=>{"use strict";t.exports=require("events")},7515:t=>{"use strict";t.exports=require("fs")},8611:t=>{"use strict";t.exports=require("http")},5692:t=>{"use strict";t.exports=require("https")},1421:t=>{"use strict";t.exports=require("node:child_process")},8474:t=>{"use strict";t.exports=require("node:events")},3024:t=>{"use strict";t.exports=require("node:fs")},6760:t=>{"use strict";t.exports=require("node:path")},1708:t=>{"use strict";t.exports=require("node:process")},857:t=>{"use strict";t.exports=require("os")},6928:t=>{"use strict";t.exports=require("path")},3785:t=>{"use strict";t.exports=require("readline")},2203:t=>{"use strict";t.exports=require("stream")},7016:t=>{"use strict";t.exports=require("url")},9023:t=>{"use strict";t.exports=require("util")},4732:(t,u,p)=>{"use strict";const m=p(7028);const g=process.env;Object.defineProperty(u,"_vendors",{value:m.map((function(t){return t.constant}))});u.name=null;u.isPR=null;u.id=null;if(g.CI!=="false"){m.forEach((function(t){const p=Array.isArray(t.env)?t.env:[t.env];const m=p.every((function(t){return checkEnv(t)}));u[t.constant]=m;if(!m){return}u.name=t.name;u.isPR=checkPR(t);u.id=t.constant}))}u.isCI=!!(g.CI!=="false"&&(g.BUILD_ID||g.BUILD_NUMBER||g.CI||g.CI_APP_ID||g.CI_BUILD_ID||g.CI_BUILD_NUMBER||g.CI_NAME||g.CONTINUOUS_INTEGRATION||g.RUN_ID||u.name||false));function checkEnv(t){if(typeof t==="string")return!!g[t];if("env"in t){return g[t.env]&&g[t.env].includes(t.includes)}if("any"in t){return t.any.some((function(t){return!!g[t]}))}return Object.keys(t).every((function(u){return g[u]===t[u]}))}function checkPR(t){switch(typeof t.pr){case"string":return!!g[t.pr];case"object":if("env"in t.pr){if("any"in t.pr){return t.pr.any.some((function(u){return g[t.pr.env]===u}))}else{return t.pr.env in g&&g[t.pr.env]!==t.pr.ne}}else if("any"in t.pr){return t.pr.any.some((function(t){return!!g[t]}))}else{return checkEnv(t.pr)}default:return null}}},206:(t,u,p)=>{const{Argument:m}=p(1455);const{Command:g}=p(4623);const{CommanderError:y,InvalidArgumentError:v}=p(9400);const{Help:b}=p(2559);const{Option:w}=p(1033);u.DM=new g;u.gu=t=>new g(t);u.Ww=(t,u)=>new w(t,u);u.er=(t,u)=>new m(t,u);u.uB=g;u.c$=w;u.ef=m;u._V=b;u.b7=y;u.Di=v;u.a2=v},1455:(t,u,p)=>{const{InvalidArgumentError:m}=p(9400);class Argument{constructor(t,u){this.description=u||"";this.variadic=false;this.parseArg=undefined;this.defaultValue=undefined;this.defaultValueDescription=undefined;this.argChoices=undefined;switch(t[0]){case"<":this.required=true;this._name=t.slice(1,-1);break;case"[":this.required=false;this._name=t.slice(1,-1);break;default:this.required=true;this._name=t;break}if(this._name.endsWith("...")){this.variadic=true;this._name=this._name.slice(0,-3)}}name(){return this._name}_collectValue(t,u){if(u===this.defaultValue||!Array.isArray(u)){return[t]}u.push(t);return u}default(t,u){this.defaultValue=t;this.defaultValueDescription=u;return this}argParser(t){this.parseArg=t;return this}choices(t){this.argChoices=t.slice();this.parseArg=(t,u)=>{if(!this.argChoices.includes(t)){throw new m(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._collectValue(t,u)}return t};return this}argRequired(){this.required=true;return this}argOptional(){this.required=false;return this}}function humanReadableArgName(t){const u=t.name()+(t.variadic===true?"...":"");return t.required?"<"+u+">":"["+u+"]"}u.Argument=Argument;u.humanReadableArgName=humanReadableArgName},4623:(t,u,p)=>{const m=p(8474).EventEmitter;const g=p(1421);const y=p(6760);const v=p(3024);const b=p(1708);const{Argument:w,humanReadableArgName:E}=p(1455);const{CommanderError:$}=p(9400);const{Help:O,stripColor:R}=p(2559);const{Option:P,DualOptions:A}=p(1033);const{suggestSimilar:x}=p(3683);class Command extends m{constructor(t){super();this.commands=[];this.options=[];this.parent=null;this._allowUnknownOption=false;this._allowExcessArguments=false;this.registeredArguments=[];this._args=this.registeredArguments;this.args=[];this.rawArgs=[];this.processedArgs=[];this._scriptPath=null;this._name=t||"";this._optionValues={};this._optionValueSources={};this._storeOptionsAsProperties=false;this._actionHandler=null;this._executableHandler=false;this._executableFile=null;this._executableDir=null;this._defaultCommandName=null;this._exitCallback=null;this._aliases=[];this._combineFlagAndOptionalValue=true;this._description="";this._summary="";this._argsDescription=undefined;this._enablePositionalOptions=false;this._passThroughOptions=false;this._lifeCycleHooks={};this._showHelpAfterError=false;this._showSuggestionAfterError=true;this._savedState=null;this._outputConfiguration={writeOut:t=>b.stdout.write(t),writeErr:t=>b.stderr.write(t),outputError:(t,u)=>u(t),getOutHelpWidth:()=>b.stdout.isTTY?b.stdout.columns:undefined,getErrHelpWidth:()=>b.stderr.isTTY?b.stderr.columns:undefined,getOutHasColors:()=>useColor()??(b.stdout.isTTY&&b.stdout.hasColors?.()),getErrHasColors:()=>useColor()??(b.stderr.isTTY&&b.stderr.hasColors?.()),stripColor:t=>R(t)};this._hidden=false;this._helpOption=undefined;this._addImplicitHelpCommand=undefined;this._helpCommand=undefined;this._helpConfiguration={};this._helpGroupHeading=undefined;this._defaultCommandGroup=undefined;this._defaultOptionGroup=undefined}copyInheritedSettings(t){this._outputConfiguration=t._outputConfiguration;this._helpOption=t._helpOption;this._helpCommand=t._helpCommand;this._helpConfiguration=t._helpConfiguration;this._exitCallback=t._exitCallback;this._storeOptionsAsProperties=t._storeOptionsAsProperties;this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue;this._allowExcessArguments=t._allowExcessArguments;this._enablePositionalOptions=t._enablePositionalOptions;this._showHelpAfterError=t._showHelpAfterError;this._showSuggestionAfterError=t._showSuggestionAfterError;return this}_getCommandAndAncestors(){const t=[];for(let u=this;u;u=u.parent){t.push(u)}return t}command(t,u,p){let m=u;let g=p;if(typeof m==="object"&&m!==null){g=m;m=null}g=g||{};const[,y,v]=t.match(/([^ ]+) *(.*)/);const b=this.createCommand(y);if(m){b.description(m);b._executableHandler=true}if(g.isDefault)this._defaultCommandName=b._name;b._hidden=!!(g.noHelp||g.hidden);b._executableFile=g.executableFile||null;if(v)b.arguments(v);this._registerCommand(b);b.parent=this;b.copyInheritedSettings(this);if(m)return this;return b}createCommand(t){return new Command(t)}createHelp(){return Object.assign(new O,this.configureHelp())}configureHelp(t){if(t===undefined)return this._helpConfiguration;this._helpConfiguration=t;return this}configureOutput(t){if(t===undefined)return this._outputConfiguration;this._outputConfiguration={...this._outputConfiguration,...t};return this}showHelpAfterError(t=true){if(typeof t!=="string")t=!!t;this._showHelpAfterError=t;return this}showSuggestionAfterError(t=true){this._showSuggestionAfterError=!!t;return this}addCommand(t,u){if(!t._name){throw new Error(`Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()`)}u=u||{};if(u.isDefault)this._defaultCommandName=t._name;if(u.noHelp||u.hidden)t._hidden=true;this._registerCommand(t);t.parent=this;t._checkForBrokenPassThrough();return this}createArgument(t,u){return new w(t,u)}argument(t,u,p,m){const g=this.createArgument(t,u);if(typeof p==="function"){g.default(m).argParser(p)}else{g.default(p)}this.addArgument(g);return this}arguments(t){t.trim().split(/ +/).forEach((t=>{this.argument(t)}));return this}addArgument(t){const u=this.registeredArguments.slice(-1)[0];if(u?.variadic){throw new Error(`only the last argument can be variadic '${u.name()}'`)}if(t.required&&t.defaultValue!==undefined&&t.parseArg===undefined){throw new Error(`a default value for a required argument is never used: '${t.name()}'`)}this.registeredArguments.push(t);return this}helpCommand(t,u){if(typeof t==="boolean"){this._addImplicitHelpCommand=t;if(t&&this._defaultCommandGroup){this._initCommandGroup(this._getHelpCommand())}return this}const p=t??"help [command]";const[,m,g]=p.match(/([^ ]+) *(.*)/);const y=u??"display help for command";const v=this.createCommand(m);v.helpOption(false);if(g)v.arguments(g);if(y)v.description(y);this._addImplicitHelpCommand=true;this._helpCommand=v;if(t||u)this._initCommandGroup(v);return this}addHelpCommand(t,u){if(typeof t!=="object"){this.helpCommand(t,u);return this}this._addImplicitHelpCommand=true;this._helpCommand=t;this._initCommandGroup(t);return this}_getHelpCommand(){const t=this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"));if(t){if(this._helpCommand===undefined){this.helpCommand(undefined,undefined)}return this._helpCommand}return null}hook(t,u){const p=["preSubcommand","preAction","postAction"];if(!p.includes(t)){throw new Error(`Unexpected value for event passed to hook : '${t}'.\nExpecting one of '${p.join("', '")}'`)}if(this._lifeCycleHooks[t]){this._lifeCycleHooks[t].push(u)}else{this._lifeCycleHooks[t]=[u]}return this}exitOverride(t){if(t){this._exitCallback=t}else{this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync"){throw t}else{}}}return this}_exit(t,u,p){if(this._exitCallback){this._exitCallback(new $(t,u,p))}b.exit(t)}action(t){const listener=u=>{const p=this.registeredArguments.length;const m=u.slice(0,p);if(this._storeOptionsAsProperties){m[p]=this}else{m[p]=this.opts()}m.push(this);return t.apply(this,m)};this._actionHandler=listener;return this}createOption(t,u){return new P(t,u)}_callParseArg(t,u,p,m){try{return t.parseArg(u,p)}catch(t){if(t.code==="commander.invalidArgument"){const u=`${m} ${t.message}`;this.error(u,{exitCode:t.exitCode,code:t.code})}throw t}}_registerOption(t){const u=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(u){const p=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${p}'\n- already used by option '${u.flags}'`)}this._initOptionGroup(t);this.options.push(t)}_registerCommand(t){const knownBy=t=>[t.name()].concat(t.aliases());const u=knownBy(t).find((t=>this._findCommand(t)));if(u){const p=knownBy(this._findCommand(u)).join("|");const m=knownBy(t).join("|");throw new Error(`cannot add command '${m}' as already have command '${p}'`)}this._initCommandGroup(t);this.commands.push(t)}addOption(t){this._registerOption(t);const u=t.name();const p=t.attributeName();if(t.negate){const u=t.long.replace(/^--no-/,"--");if(!this._findOption(u)){this.setOptionValueWithSource(p,t.defaultValue===undefined?true:t.defaultValue,"default")}}else if(t.defaultValue!==undefined){this.setOptionValueWithSource(p,t.defaultValue,"default")}const handleOptionValue=(u,m,g)=>{if(u==null&&t.presetArg!==undefined){u=t.presetArg}const y=this.getOptionValue(p);if(u!==null&&t.parseArg){u=this._callParseArg(t,u,y,m)}else if(u!==null&&t.variadic){u=t._collectValue(u,y)}if(u==null){if(t.negate){u=false}else if(t.isBoolean()||t.optional){u=true}else{u=""}}this.setOptionValueWithSource(p,u,g)};this.on("option:"+u,(u=>{const p=`error: option '${t.flags}' argument '${u}' is invalid.`;handleOptionValue(u,p,"cli")}));if(t.envVar){this.on("optionEnv:"+u,(u=>{const p=`error: option '${t.flags}' value '${u}' from env '${t.envVar}' is invalid.`;handleOptionValue(u,p,"env")}))}return this}_optionEx(t,u,p,m,g){if(typeof u==="object"&&u instanceof P){throw new Error("To add an Option object use addOption() instead of option() or requiredOption()")}const y=this.createOption(u,p);y.makeOptionMandatory(!!t.mandatory);if(typeof m==="function"){y.default(g).argParser(m)}else if(m instanceof RegExp){const t=m;m=(u,p)=>{const m=t.exec(u);return m?m[0]:p};y.default(g).argParser(m)}else{y.default(m)}return this.addOption(y)}option(t,u,p,m){return this._optionEx({},t,u,p,m)}requiredOption(t,u,p,m){return this._optionEx({mandatory:true},t,u,p,m)}combineFlagAndOptionalValue(t=true){this._combineFlagAndOptionalValue=!!t;return this}allowUnknownOption(t=true){this._allowUnknownOption=!!t;return this}allowExcessArguments(t=true){this._allowExcessArguments=!!t;return this}enablePositionalOptions(t=true){this._enablePositionalOptions=!!t;return this}passThroughOptions(t=true){this._passThroughOptions=!!t;this._checkForBrokenPassThrough();return this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions){throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}}storeOptionsAsProperties(t=true){if(this.options.length){throw new Error("call .storeOptionsAsProperties() before adding options")}if(Object.keys(this._optionValues).length){throw new Error("call .storeOptionsAsProperties() before setting option values")}this._storeOptionsAsProperties=!!t;return this}getOptionValue(t){if(this._storeOptionsAsProperties){return this[t]}return this._optionValues[t]}setOptionValue(t,u){return this.setOptionValueWithSource(t,u,undefined)}setOptionValueWithSource(t,u,p){if(this._storeOptionsAsProperties){this[t]=u}else{this._optionValues[t]=u}this._optionValueSources[t]=p;return this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let u;this._getCommandAndAncestors().forEach((p=>{if(p.getOptionValueSource(t)!==undefined){u=p.getOptionValueSource(t)}}));return u}_prepareUserArgs(t,u){if(t!==undefined&&!Array.isArray(t)){throw new Error("first parameter to parse must be array or undefined")}u=u||{};if(t===undefined&&u.from===undefined){if(b.versions?.electron){u.from="electron"}const t=b.execArgv??[];if(t.includes("-e")||t.includes("--eval")||t.includes("-p")||t.includes("--print")){u.from="eval"}}if(t===undefined){t=b.argv}this.rawArgs=t.slice();let p;switch(u.from){case undefined:case"node":this._scriptPath=t[1];p=t.slice(2);break;case"electron":if(b.defaultApp){this._scriptPath=t[1];p=t.slice(2)}else{p=t.slice(1)}break;case"user":p=t.slice(0);break;case"eval":p=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${u.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);this._name=this._name||"program";return p}parse(t,u){this._prepareForParse();const p=this._prepareUserArgs(t,u);this._parseCommand([],p);return this}async parseAsync(t,u){this._prepareForParse();const p=this._prepareUserArgs(t,u);await this._parseCommand([],p);return this}_prepareForParse(){if(this._savedState===null){this.saveStateBeforeParse()}else{this.restoreStateBeforeParse()}}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.\n- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name;this._scriptPath=null;this.rawArgs=[];this._optionValues={...this._savedState._optionValues};this._optionValueSources={...this._savedState._optionValueSources};this.args=[];this.processedArgs=[]}_checkForMissingExecutable(t,u,p){if(v.existsSync(t))return;const m=u?`searched for local subcommand relative to directory '${u}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory";const g=`'${t}' does not exist\n - if '${p}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${m}`;throw new Error(g)}_executeSubCommand(t,u){u=u.slice();let p=false;const m=[".js",".ts",".tsx",".mjs",".cjs"];function findFile(t,u){const p=y.resolve(t,u);if(v.existsSync(p))return p;if(m.includes(y.extname(u)))return undefined;const g=m.find((t=>v.existsSync(`${p}${t}`)));if(g)return`${p}${g}`;return undefined}this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();let w=t._executableFile||`${this._name}-${t._name}`;let E=this._executableDir||"";if(this._scriptPath){let t;try{t=v.realpathSync(this._scriptPath)}catch{t=this._scriptPath}E=y.resolve(y.dirname(t),E)}if(E){let u=findFile(E,w);if(!u&&!t._executableFile&&this._scriptPath){const p=y.basename(this._scriptPath,y.extname(this._scriptPath));if(p!==this._name){u=findFile(E,`${p}-${t._name}`)}}w=u||w}p=m.includes(y.extname(w));let O;if(b.platform!=="win32"){if(p){u.unshift(w);u=incrementNodeInspectorPort(b.execArgv).concat(u);O=g.spawn(b.argv[0],u,{stdio:"inherit"})}else{O=g.spawn(w,u,{stdio:"inherit"})}}else{this._checkForMissingExecutable(w,E,t._name);u.unshift(w);u=incrementNodeInspectorPort(b.execArgv).concat(u);O=g.spawn(b.execPath,u,{stdio:"inherit"})}if(!O.killed){const t=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];t.forEach((t=>{b.on(t,(()=>{if(O.killed===false&&O.exitCode===null){O.kill(t)}}))}))}const R=this._exitCallback;O.on("close",(t=>{t=t??1;if(!R){b.exit(t)}else{R(new $(t,"commander.executeSubCommandAsync","(close)"))}}));O.on("error",(u=>{if(u.code==="ENOENT"){this._checkForMissingExecutable(w,E,t._name)}else if(u.code==="EACCES"){throw new Error(`'${w}' not executable`)}if(!R){b.exit(1)}else{const t=new $(1,"commander.executeSubCommandAsync","(error)");t.nestedError=u;R(t)}}));this.runningCommand=O}_dispatchSubcommand(t,u,p){const m=this._findCommand(t);if(!m)this.help({error:true});m._prepareForParse();let g;g=this._chainOrCallSubCommandHook(g,m,"preSubcommand");g=this._chainOrCall(g,(()=>{if(m._executableHandler){this._executeSubCommand(m,u.concat(p))}else{return m._parseCommand(u,p)}}));return g}_dispatchHelpCommand(t){if(!t){this.help()}const u=this._findCommand(t);if(u&&!u._executableHandler){u.help()}return this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach(((t,u)=>{if(t.required&&this.args[u]==null){this.missingArgument(t.name())}}));if(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic){return}if(this.args.length>this.registeredArguments.length){this._excessArguments(this.args)}}_processArguments(){const myParseArg=(t,u,p)=>{let m=u;if(u!==null&&t.parseArg){const g=`error: command-argument value '${u}' is invalid for argument '${t.name()}'.`;m=this._callParseArg(t,u,p,g)}return m};this._checkNumberOfArguments();const t=[];this.registeredArguments.forEach(((u,p)=>{let m=u.defaultValue;if(u.variadic){if(p<this.args.length){m=this.args.slice(p);if(u.parseArg){m=m.reduce(((t,p)=>myParseArg(u,p,t)),u.defaultValue)}}else if(m===undefined){m=[]}}else if(p<this.args.length){m=this.args[p];if(u.parseArg){m=myParseArg(u,m,u.defaultValue)}}t[p]=m}));this.processedArgs=t}_chainOrCall(t,u){if(t?.then&&typeof t.then==="function"){return t.then((()=>u()))}return u()}_chainOrCallHooks(t,u){let p=t;const m=[];this._getCommandAndAncestors().reverse().filter((t=>t._lifeCycleHooks[u]!==undefined)).forEach((t=>{t._lifeCycleHooks[u].forEach((u=>{m.push({hookedCommand:t,callback:u})}))}));if(u==="postAction"){m.reverse()}m.forEach((t=>{p=this._chainOrCall(p,(()=>t.callback(t.hookedCommand,this)))}));return p}_chainOrCallSubCommandHook(t,u,p){let m=t;if(this._lifeCycleHooks[p]!==undefined){this._lifeCycleHooks[p].forEach((t=>{m=this._chainOrCall(m,(()=>t(this,u)))}))}return m}_parseCommand(t,u){const p=this.parseOptions(u);this._parseOptionsEnv();this._parseOptionsImplied();t=t.concat(p.operands);u=p.unknown;this.args=t.concat(u);if(t&&this._findCommand(t[0])){return this._dispatchSubcommand(t[0],t.slice(1),u)}if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name()){return this._dispatchHelpCommand(t[1])}if(this._defaultCommandName){this._outputHelpIfRequested(u);return this._dispatchSubcommand(this._defaultCommandName,t,u)}if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName){this.help({error:true})}this._outputHelpIfRequested(p.unknown);this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();const checkForUnknownOptions=()=>{if(p.unknown.length>0){this.unknownOption(p.unknown[0])}};const m=`command:${this.name()}`;if(this._actionHandler){checkForUnknownOptions();this._processArguments();let p;p=this._chainOrCallHooks(p,"preAction");p=this._chainOrCall(p,(()=>this._actionHandler(this.processedArgs)));if(this.parent){p=this._chainOrCall(p,(()=>{this.parent.emit(m,t,u)}))}p=this._chainOrCallHooks(p,"postAction");return p}if(this.parent?.listenerCount(m)){checkForUnknownOptions();this._processArguments();this.parent.emit(m,t,u)}else if(t.length){if(this._findCommand("*")){return this._dispatchSubcommand("*",t,u)}if(this.listenerCount("command:*")){this.emit("command:*",t,u)}else if(this.commands.length){this.unknownCommand()}else{checkForUnknownOptions();this._processArguments()}}else if(this.commands.length){checkForUnknownOptions();this.help({error:true})}else{checkForUnknownOptions();this._processArguments()}}_findCommand(t){if(!t)return undefined;return this.commands.find((u=>u._name===t||u._aliases.includes(t)))}_findOption(t){return this.options.find((u=>u.is(t)))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((t=>{t.options.forEach((u=>{if(u.mandatory&&t.getOptionValue(u.attributeName())===undefined){t.missingMandatoryOptionValue(u)}}))}))}_checkForConflictingLocalOptions(){const t=this.options.filter((t=>{const u=t.attributeName();if(this.getOptionValue(u)===undefined){return false}return this.getOptionValueSource(u)!=="default"}));const u=t.filter((t=>t.conflictsWith.length>0));u.forEach((u=>{const p=t.find((t=>u.conflictsWith.includes(t.attributeName())));if(p){this._conflictingOption(u,p)}}))}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((t=>{t._checkForConflictingLocalOptions()}))}parseOptions(t){const u=[];const p=[];let m=u;function maybeOption(t){return t.length>1&&t[0]==="-"}const negativeNumberArg=t=>{if(!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(t))return false;return!this._getCommandAndAncestors().some((t=>t.options.map((t=>t.short)).some((t=>/^-\d$/.test(t)))))};let g=null;let y=null;let v=0;while(v<t.length||y){const b=y??t[v++];y=null;if(b==="--"){if(m===p)m.push(b);m.push(...t.slice(v));break}if(g&&(!maybeOption(b)||negativeNumberArg(b))){this.emit(`option:${g.name()}`,b);continue}g=null;if(maybeOption(b)){const u=this._findOption(b);if(u){if(u.required){const p=t[v++];if(p===undefined)this.optionMissingArgument(u);this.emit(`option:${u.name()}`,p)}else if(u.optional){let p=null;if(v<t.length&&(!maybeOption(t[v])||negativeNumberArg(t[v]))){p=t[v++]}this.emit(`option:${u.name()}`,p)}else{this.emit(`option:${u.name()}`)}g=u.variadic?u:null;continue}}if(b.length>2&&b[0]==="-"&&b[1]!=="-"){const t=this._findOption(`-${b[1]}`);if(t){if(t.required||t.optional&&this._combineFlagAndOptionalValue){this.emit(`option:${t.name()}`,b.slice(2))}else{this.emit(`option:${t.name()}`);y=`-${b.slice(2)}`}continue}}if(/^--[^=]+=/.test(b)){const t=b.indexOf("=");const u=this._findOption(b.slice(0,t));if(u&&(u.required||u.optional)){this.emit(`option:${u.name()}`,b.slice(t+1));continue}}if(m===u&&maybeOption(b)&&!(this.commands.length===0&&negativeNumberArg(b))){m=p}if((this._enablePositionalOptions||this._passThroughOptions)&&u.length===0&&p.length===0){if(this._findCommand(b)){u.push(b);p.push(...t.slice(v));break}else if(this._getHelpCommand()&&b===this._getHelpCommand().name()){u.push(b,...t.slice(v));break}else if(this._defaultCommandName){p.push(b,...t.slice(v));break}}if(this._passThroughOptions){m.push(b,...t.slice(v));break}m.push(b)}return{operands:u,unknown:p}}opts(){if(this._storeOptionsAsProperties){const t={};const u=this.options.length;for(let p=0;p<u;p++){const u=this.options[p].attributeName();t[u]=u===this._versionOptionName?this._version:this[u]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(((t,u)=>Object.assign(t,u.opts())),{})}error(t,u){this._outputConfiguration.outputError(`${t}\n`,this._outputConfiguration.writeErr);if(typeof this._showHelpAfterError==="string"){this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`)}else if(this._showHelpAfterError){this._outputConfiguration.writeErr("\n");this.outputHelp({error:true})}const p=u||{};const m=p.exitCode||1;const g=p.code||"commander.error";this._exit(m,g,t)}_parseOptionsEnv(){this.options.forEach((t=>{if(t.envVar&&t.envVar in b.env){const u=t.attributeName();if(this.getOptionValue(u)===undefined||["default","config","env"].includes(this.getOptionValueSource(u))){if(t.required||t.optional){this.emit(`optionEnv:${t.name()}`,b.env[t.envVar])}else{this.emit(`optionEnv:${t.name()}`)}}}}))}_parseOptionsImplied(){const t=new A(this.options);const hasCustomOptionValue=t=>this.getOptionValue(t)!==undefined&&!["default","implied"].includes(this.getOptionValueSource(t));this.options.filter((u=>u.implied!==undefined&&hasCustomOptionValue(u.attributeName())&&t.valueFromOption(this.getOptionValue(u.attributeName()),u))).forEach((t=>{Object.keys(t.implied).filter((t=>!hasCustomOptionValue(t))).forEach((u=>{this.setOptionValueWithSource(u,t.implied[u],"implied")}))}))}missingArgument(t){const u=`error: missing required argument '${t}'`;this.error(u,{code:"commander.missingArgument"})}optionMissingArgument(t){const u=`error: option '${t.flags}' argument missing`;this.error(u,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){const u=`error: required option '${t.flags}' not specified`;this.error(u,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,u){const findBestOptionFromValue=t=>{const u=t.attributeName();const p=this.getOptionValue(u);const m=this.options.find((t=>t.negate&&u===t.attributeName()));const g=this.options.find((t=>!t.negate&&u===t.attributeName()));if(m&&(m.presetArg===undefined&&p===false||m.presetArg!==undefined&&p===m.presetArg)){return m}return g||t};const getErrorMessage=t=>{const u=findBestOptionFromValue(t);const p=u.attributeName();const m=this.getOptionValueSource(p);if(m==="env"){return`environment variable '${u.envVar}'`}return`option '${u.flags}'`};const p=`error: ${getErrorMessage(t)} cannot be used with ${getErrorMessage(u)}`;this.error(p,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let u="";if(t.startsWith("--")&&this._showSuggestionAfterError){let p=[];let m=this;do{const t=m.createHelp().visibleOptions(m).filter((t=>t.long)).map((t=>t.long));p=p.concat(t);m=m.parent}while(m&&!m._enablePositionalOptions);u=x(t,p)}const p=`error: unknown option '${t}'${u}`;this.error(p,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;const u=this.registeredArguments.length;const p=u===1?"":"s";const m=this.parent?` for '${this.name()}'`:"";const g=`error: too many arguments${m}. Expected ${u} argument${p} but got ${t.length}.`;this.error(g,{code:"commander.excessArguments"})}unknownCommand(){const t=this.args[0];let u="";if(this._showSuggestionAfterError){const p=[];this.createHelp().visibleCommands(this).forEach((t=>{p.push(t.name());if(t.alias())p.push(t.alias())}));u=x(t,p)}const p=`error: unknown command '${t}'${u}`;this.error(p,{code:"commander.unknownCommand"})}version(t,u,p){if(t===undefined)return this._version;this._version=t;u=u||"-V, --version";p=p||"output the version number";const m=this.createOption(u,p);this._versionOptionName=m.attributeName();this._registerOption(m);this.on("option:"+m.name(),(()=>{this._outputConfiguration.writeOut(`${t}\n`);this._exit(0,"commander.version",t)}));return this}description(t,u){if(t===undefined&&u===undefined)return this._description;this._description=t;if(u){this._argsDescription=u}return this}summary(t){if(t===undefined)return this._summary;this._summary=t;return this}alias(t){if(t===undefined)return this._aliases[0];let u=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler){u=this.commands[this.commands.length-1]}if(t===u._name)throw new Error("Command alias can't be the same as its name");const p=this.parent?._findCommand(t);if(p){const u=[p.name()].concat(p.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${u}'`)}u._aliases.push(t);return this}aliases(t){if(t===undefined)return this._aliases;t.forEach((t=>this.alias(t)));return this}usage(t){if(t===undefined){if(this._usage)return this._usage;const t=this.registeredArguments.map((t=>E(t)));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}this._usage=t;return this}name(t){if(t===undefined)return this._name;this._name=t;return this}helpGroup(t){if(t===undefined)return this._helpGroupHeading??"";this._helpGroupHeading=t;return this}commandsGroup(t){if(t===undefined)return this._defaultCommandGroup??"";this._defaultCommandGroup=t;return this}optionsGroup(t){if(t===undefined)return this._defaultOptionGroup??"";this._defaultOptionGroup=t;return this}_initOptionGroup(t){if(this._defaultOptionGroup&&!t.helpGroupHeading)t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){if(this._defaultCommandGroup&&!t.helpGroup())t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){this._name=y.basename(t,y.extname(t));return this}executableDir(t){if(t===undefined)return this._executableDir;this._executableDir=t;return this}helpInformation(t){const u=this.createHelp();const p=this._getOutputContext(t);u.prepareContext({error:p.error,helpWidth:p.helpWidth,outputHasColors:p.hasColors});const m=u.formatHelp(this,u);if(p.hasColors)return m;return this._outputConfiguration.stripColor(m)}_getOutputContext(t){t=t||{};const u=!!t.error;let p;let m;let g;if(u){p=t=>this._outputConfiguration.writeErr(t);m=this._outputConfiguration.getErrHasColors();g=this._outputConfiguration.getErrHelpWidth()}else{p=t=>this._outputConfiguration.writeOut(t);m=this._outputConfiguration.getOutHasColors();g=this._outputConfiguration.getOutHelpWidth()}const write=t=>{if(!m)t=this._outputConfiguration.stripColor(t);return p(t)};return{error:u,write:write,hasColors:m,helpWidth:g}}outputHelp(t){let u;if(typeof t==="function"){u=t;t=undefined}const p=this._getOutputContext(t);const m={error:p.error,write:p.write,command:this};this._getCommandAndAncestors().reverse().forEach((t=>t.emit("beforeAllHelp",m)));this.emit("beforeHelp",m);let g=this.helpInformation({error:p.error});if(u){g=u(g);if(typeof g!=="string"&&!Buffer.isBuffer(g)){throw new Error("outputHelp callback must return a string or a Buffer")}}p.write(g);if(this._getHelpOption()?.long){this.emit(this._getHelpOption().long)}this.emit("afterHelp",m);this._getCommandAndAncestors().forEach((t=>t.emit("afterAllHelp",m)))}helpOption(t,u){if(typeof t==="boolean"){if(t){if(this._helpOption===null)this._helpOption=undefined;if(this._defaultOptionGroup){this._initOptionGroup(this._getHelpOption())}}else{this._helpOption=null}return this}this._helpOption=this.createOption(t??"-h, --help",u??"display help for command");if(t||u)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===undefined){this.helpOption(undefined,undefined)}return this._helpOption}addHelpOption(t){this._helpOption=t;this._initOptionGroup(t);return this}help(t){this.outputHelp(t);let u=Number(b.exitCode??0);if(u===0&&t&&typeof t!=="function"&&t.error){u=1}this._exit(u,"commander.help","(outputHelp)")}addHelpText(t,u){const p=["beforeAll","before","after","afterAll"];if(!p.includes(t)){throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${p.join("', '")}'`)}const m=`${t}Help`;this.on(m,(t=>{let p;if(typeof u==="function"){p=u({error:t.error,command:t.command})}else{p=u}if(p){t.write(`${p}\n`)}}));return this}_outputHelpIfRequested(t){const u=this._getHelpOption();const p=u&&t.find((t=>u.is(t)));if(p){this.outputHelp();this._exit(0,"commander.helpDisplayed","(outputHelp)")}}}function incrementNodeInspectorPort(t){return t.map((t=>{if(!t.startsWith("--inspect")){return t}let u;let p="127.0.0.1";let m="9229";let g;if((g=t.match(/^(--inspect(-brk)?)$/))!==null){u=g[1]}else if((g=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null){u=g[1];if(/^\d+$/.test(g[3])){m=g[3]}else{p=g[3]}}else if((g=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null){u=g[1];p=g[3];m=g[4]}if(u&&m!=="0"){return`${u}=${p}:${parseInt(m)+1}`}return t}))}function useColor(){if(b.env.NO_COLOR||b.env.FORCE_COLOR==="0"||b.env.FORCE_COLOR==="false")return false;if(b.env.FORCE_COLOR||b.env.CLICOLOR_FORCE!==undefined)return true;return undefined}u.Command=Command;u.useColor=useColor},9400:(t,u)=>{class CommanderError extends Error{constructor(t,u,p){super(p);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name;this.code=u;this.exitCode=t;this.nestedError=undefined}}class InvalidArgumentError extends CommanderError{constructor(t){super(1,"commander.invalidArgument",t);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name}}u.CommanderError=CommanderError;u.InvalidArgumentError=InvalidArgumentError},2559:(t,u,p)=>{const{humanReadableArgName:m}=p(1455);class Help{constructor(){this.helpWidth=undefined;this.minWidthToWrap=40;this.sortSubcommands=false;this.sortOptions=false;this.showGlobalOptions=false}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){const u=t.commands.filter((t=>!t._hidden));const p=t._getHelpCommand();if(p&&!p._hidden){u.push(p)}if(this.sortSubcommands){u.sort(((t,u)=>t.name().localeCompare(u.name())))}return u}compareOptions(t,u){const getSortKey=t=>t.short?t.short.replace(/^-/,""):t.long.replace(/^--/,"");return getSortKey(t).localeCompare(getSortKey(u))}visibleOptions(t){const u=t.options.filter((t=>!t.hidden));const p=t._getHelpOption();if(p&&!p.hidden){const m=p.short&&t._findOption(p.short);const g=p.long&&t._findOption(p.long);if(!m&&!g){u.push(p)}else if(p.long&&!g){u.push(t.createOption(p.long,p.description))}else if(p.short&&!m){u.push(t.createOption(p.short,p.description))}}if(this.sortOptions){u.sort(this.compareOptions)}return u}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];const u=[];for(let p=t.parent;p;p=p.parent){const t=p.options.filter((t=>!t.hidden));u.push(...t)}if(this.sortOptions){u.sort(this.compareOptions)}return u}visibleArguments(t){if(t._argsDescription){t.registeredArguments.forEach((u=>{u.description=u.description||t._argsDescription[u.name()]||""}))}if(t.registeredArguments.find((t=>t.description))){return t.registeredArguments}return[]}subcommandTerm(t){const u=t.registeredArguments.map((t=>m(t))).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(u?" "+u:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,u){return u.visibleCommands(t).reduce(((t,p)=>Math.max(t,this.displayWidth(u.styleSubcommandTerm(u.subcommandTerm(p))))),0)}longestOptionTermLength(t,u){return u.visibleOptions(t).reduce(((t,p)=>Math.max(t,this.displayWidth(u.styleOptionTerm(u.optionTerm(p))))),0)}longestGlobalOptionTermLength(t,u){return u.visibleGlobalOptions(t).reduce(((t,p)=>Math.max(t,this.displayWidth(u.styleOptionTerm(u.optionTerm(p))))),0)}longestArgumentTermLength(t,u){return u.visibleArguments(t).reduce(((t,p)=>Math.max(t,this.displayWidth(u.styleArgumentTerm(u.argumentTerm(p))))),0)}commandUsage(t){let u=t._name;if(t._aliases[0]){u=u+"|"+t._aliases[0]}let p="";for(let u=t.parent;u;u=u.parent){p=u.name()+" "+p}return p+u+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){const u=[];if(t.argChoices){u.push(`choices: ${t.argChoices.map((t=>JSON.stringify(t))).join(", ")}`)}if(t.defaultValue!==undefined){const p=t.required||t.optional||t.isBoolean()&&typeof t.defaultValue==="boolean";if(p){u.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`)}}if(t.presetArg!==undefined&&t.optional){u.push(`preset: ${JSON.stringify(t.presetArg)}`)}if(t.envVar!==undefined){u.push(`env: ${t.envVar}`)}if(u.length>0){const p=`(${u.join(", ")})`;if(t.description){return`${t.description} ${p}`}return p}return t.description}argumentDescription(t){const u=[];if(t.argChoices){u.push(`choices: ${t.argChoices.map((t=>JSON.stringify(t))).join(", ")}`)}if(t.defaultValue!==undefined){u.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`)}if(u.length>0){const p=`(${u.join(", ")})`;if(t.description){return`${t.description} ${p}`}return p}return t.description}formatItemList(t,u,p){if(u.length===0)return[];return[p.styleTitle(t),...u,""]}groupItems(t,u,p){const m=new Map;t.forEach((t=>{const u=p(t);if(!m.has(u))m.set(u,[])}));u.forEach((t=>{const u=p(t);if(!m.has(u)){m.set(u,[])}m.get(u).push(t)}));return m}formatHelp(t,u){const p=u.padWidth(t,u);const m=u.helpWidth??80;function callFormatItem(t,m){return u.formatItem(t,p,m,u)}let g=[`${u.styleTitle("Usage:")} ${u.styleUsage(u.commandUsage(t))}`,""];const y=u.commandDescription(t);if(y.length>0){g=g.concat([u.boxWrap(u.styleCommandDescription(y),m),""])}const v=u.visibleArguments(t).map((t=>callFormatItem(u.styleArgumentTerm(u.argumentTerm(t)),u.styleArgumentDescription(u.argumentDescription(t)))));g=g.concat(this.formatItemList("Arguments:",v,u));const b=this.groupItems(t.options,u.visibleOptions(t),(t=>t.helpGroupHeading??"Options:"));b.forEach(((t,p)=>{const m=t.map((t=>callFormatItem(u.styleOptionTerm(u.optionTerm(t)),u.styleOptionDescription(u.optionDescription(t)))));g=g.concat(this.formatItemList(p,m,u))}));if(u.showGlobalOptions){const p=u.visibleGlobalOptions(t).map((t=>callFormatItem(u.styleOptionTerm(u.optionTerm(t)),u.styleOptionDescription(u.optionDescription(t)))));g=g.concat(this.formatItemList("Global Options:",p,u))}const w=this.groupItems(t.commands,u.visibleCommands(t),(t=>t.helpGroup()||"Commands:"));w.forEach(((t,p)=>{const m=t.map((t=>callFormatItem(u.styleSubcommandTerm(u.subcommandTerm(t)),u.styleSubcommandDescription(u.subcommandDescription(t)))));g=g.concat(this.formatItemList(p,m,u))}));return g.join("\n")}displayWidth(t){return stripColor(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map((t=>{if(t==="[options]")return this.styleOptionText(t);if(t==="[command]")return this.styleSubcommandText(t);if(t[0]==="["||t[0]==="<")return this.styleArgumentText(t);return this.styleCommandText(t)})).join(" ")}styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}styleArgumentDescription(t){return this.styleDescriptionText(t)}styleDescriptionText(t){return t}styleOptionTerm(t){return this.styleOptionText(t)}styleSubcommandTerm(t){return t.split(" ").map((t=>{if(t==="[options]")return this.styleOptionText(t);if(t[0]==="["||t[0]==="<")return this.styleArgumentText(t);return this.styleSubcommandText(t)})).join(" ")}styleArgumentTerm(t){return this.styleArgumentText(t)}styleOptionText(t){return t}styleArgumentText(t){return t}styleSubcommandText(t){return t}styleCommandText(t){return t}padWidth(t,u){return Math.max(u.longestOptionTermLength(t,u),u.longestGlobalOptionTermLength(t,u),u.longestSubcommandTermLength(t,u),u.longestArgumentTermLength(t,u))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,u,p,m){const g=2;const y=" ".repeat(g);if(!p)return y+t;const v=t.padEnd(u+t.length-m.displayWidth(t));const b=2;const w=this.helpWidth??80;const E=w-u-b-g;let $;if(E<this.minWidthToWrap||m.preformatted(p)){$=p}else{const t=m.boxWrap(p,E);$=t.replace(/\n/g,"\n"+" ".repeat(u+b))}return y+v+" ".repeat(b)+$.replace(/\n/g,`\n${y}`)}boxWrap(t,u){if(u<this.minWidthToWrap)return t;const p=t.split(/\r\n|\n/);const m=/[\s]*[^\s]+/g;const g=[];p.forEach((t=>{const p=t.match(m);if(p===null){g.push("");return}let y=[p.shift()];let v=this.displayWidth(y[0]);p.forEach((t=>{const p=this.displayWidth(t);if(v+p<=u){y.push(t);v+=p;return}g.push(y.join(""));const m=t.trimStart();y=[m];v=this.displayWidth(m)}));g.push(y.join(""))}));return g.join("\n")}}function stripColor(t){const u=/\x1b\[\d*(;\d*)*m/g;return t.replace(u,"")}u.Help=Help;u.stripColor=stripColor},1033:(t,u,p)=>{const{InvalidArgumentError:m}=p(9400);class Option{constructor(t,u){this.flags=t;this.description=u||"";this.required=t.includes("<");this.optional=t.includes("[");this.variadic=/\w\.\.\.[>\]]$/.test(t);this.mandatory=false;const p=splitOptionFlags(t);this.short=p.shortFlag;this.long=p.longFlag;this.negate=false;if(this.long){this.negate=this.long.startsWith("--no-")}this.defaultValue=undefined;this.defaultValueDescription=undefined;this.presetArg=undefined;this.envVar=undefined;this.parseArg=undefined;this.hidden=false;this.argChoices=undefined;this.conflictsWith=[];this.implied=undefined;this.helpGroupHeading=undefined}default(t,u){this.defaultValue=t;this.defaultValueDescription=u;return this}preset(t){this.presetArg=t;return this}conflicts(t){this.conflictsWith=this.conflictsWith.concat(t);return this}implies(t){let u=t;if(typeof t==="string"){u={[t]:true}}this.implied=Object.assign(this.implied||{},u);return this}env(t){this.envVar=t;return this}argParser(t){this.parseArg=t;return this}makeOptionMandatory(t=true){this.mandatory=!!t;return this}hideHelp(t=true){this.hidden=!!t;return this}_collectValue(t,u){if(u===this.defaultValue||!Array.isArray(u)){return[t]}u.push(t);return u}choices(t){this.argChoices=t.slice();this.parseArg=(t,u)=>{if(!this.argChoices.includes(t)){throw new m(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._collectValue(t,u)}return t};return this}name(){if(this.long){return this.long.replace(/^--/,"")}return this.short.replace(/^-/,"")}attributeName(){if(this.negate){return camelcase(this.name().replace(/^no-/,""))}return camelcase(this.name())}helpGroup(t){this.helpGroupHeading=t;return this}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class DualOptions{constructor(t){this.positiveOptions=new Map;this.negativeOptions=new Map;this.dualOptions=new Set;t.forEach((t=>{if(t.negate){this.negativeOptions.set(t.attributeName(),t)}else{this.positiveOptions.set(t.attributeName(),t)}}));this.negativeOptions.forEach(((t,u)=>{if(this.positiveOptions.has(u)){this.dualOptions.add(u)}}))}valueFromOption(t,u){const p=u.attributeName();if(!this.dualOptions.has(p))return true;const m=this.negativeOptions.get(p).presetArg;const g=m!==undefined?m:false;return u.negate===(g===t)}}function camelcase(t){return t.split("-").reduce(((t,u)=>t+u[0].toUpperCase()+u.slice(1)))}function splitOptionFlags(t){let u;let p;const m=/^-[^-]$/;const g=/^--[^-]/;const y=t.split(/[ |,]+/).concat("guard");if(m.test(y[0]))u=y.shift();if(g.test(y[0]))p=y.shift();if(!u&&m.test(y[0]))u=y.shift();if(!u&&g.test(y[0])){u=p;p=y.shift()}if(y[0].startsWith("-")){const u=y[0];const p=`option creation failed due to '${u}' in option flags '${t}'`;if(/^-[^-][^-]/.test(u))throw new Error(`${p}\n- a short flag is a single dash and a single character\n - either use a single dash and a single character (for a short flag)\n - or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(m.test(u))throw new Error(`${p}\n- too many short flags`);if(g.test(u))throw new Error(`${p}\n- too many long flags`);throw new Error(`${p}\n- unrecognised flag format`)}if(u===undefined&&p===undefined)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:u,longFlag:p}}u.Option=Option;u.DualOptions=DualOptions},3683:(t,u)=>{const p=3;function editDistance(t,u){if(Math.abs(t.length-u.length)>p)return Math.max(t.length,u.length);const m=[];for(let u=0;u<=t.length;u++){m[u]=[u]}for(let t=0;t<=u.length;t++){m[0][t]=t}for(let p=1;p<=u.length;p++){for(let g=1;g<=t.length;g++){let y=1;if(t[g-1]===u[p-1]){y=0}else{y=1}m[g][p]=Math.min(m[g-1][p]+1,m[g][p-1]+1,m[g-1][p-1]+y);if(g>1&&p>1&&t[g-1]===u[p-2]&&t[g-2]===u[p-1]){m[g][p]=Math.min(m[g][p],m[g-2][p-2]+1)}}}return m[t.length][u.length]}function suggestSimilar(t,u){if(!u||u.length===0)return"";u=Array.from(new Set(u));const m=t.startsWith("--");if(m){t=t.slice(2);u=u.map((t=>t.slice(2)))}let g=[];let y=p;const v=.4;u.forEach((u=>{if(u.length<=1)return;const p=editDistance(t,u);const m=Math.max(t.length,u.length);const b=(m-p)/m;if(b>v){if(p<y){y=p;g=[u]}else if(p===y){g.push(u)}}}));g.sort(((t,u)=>t.localeCompare(u)));if(m){g=g.map((t=>`--${t}`))}if(g.length>1){return`\n(Did you mean one of ${g.join(", ")}?)`}if(g.length===1){return`\n(Did you mean ${g[0]}?)`}return""}u.suggestSimilar=suggestSimilar},6564:(t,u,p)=>{"use strict";const{normalizeIPv6:m,removeDotSegments:g,recomposeAuthority:y,normalizeComponentEncoding:v,isIPv4:b,nonSimpleDomain:w}=p(1097);const{SCHEMES:E,getSchemeHandler:$}=p(2424);function normalize(t,u){if(typeof t==="string"){t=serialize(parse(t,u),u)}else if(typeof t==="object"){t=parse(serialize(t,u),u)}return t}function resolve(t,u,p){const m=p?Object.assign({scheme:"null"},p):{scheme:"null"};const g=resolveComponent(parse(t,m),parse(u,m),m,true);m.skipEscape=true;return serialize(g,m)}function resolveComponent(t,u,p,m){const y={};if(!m){t=parse(serialize(t,p),p);u=parse(serialize(u,p),p)}p=p||{};if(!p.tolerant&&u.scheme){y.scheme=u.scheme;y.userinfo=u.userinfo;y.host=u.host;y.port=u.port;y.path=g(u.path||"");y.query=u.query}else{if(u.userinfo!==undefined||u.host!==undefined||u.port!==undefined){y.userinfo=u.userinfo;y.host=u.host;y.port=u.port;y.path=g(u.path||"");y.query=u.query}else{if(!u.path){y.path=t.path;if(u.query!==undefined){y.query=u.query}else{y.query=t.query}}else{if(u.path[0]==="/"){y.path=g(u.path)}else{if((t.userinfo!==undefined||t.host!==undefined||t.port!==undefined)&&!t.path){y.path="/"+u.path}else if(!t.path){y.path=u.path}else{y.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+u.path}y.path=g(y.path)}y.query=u.query}y.userinfo=t.userinfo;y.host=t.host;y.port=t.port}y.scheme=t.scheme}y.fragment=u.fragment;return y}function equal(t,u,p){if(typeof t==="string"){t=unescape(t);t=serialize(v(parse(t,p),true),{...p,skipEscape:true})}else if(typeof t==="object"){t=serialize(v(t,true),{...p,skipEscape:true})}if(typeof u==="string"){u=unescape(u);u=serialize(v(parse(u,p),true),{...p,skipEscape:true})}else if(typeof u==="object"){u=serialize(v(u,true),{...p,skipEscape:true})}return t.toLowerCase()===u.toLowerCase()}function serialize(t,u){const p={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""};const m=Object.assign({},u);const v=[];const b=$(m.scheme||p.scheme);if(b&&b.serialize)b.serialize(p,m);if(p.path!==undefined){if(!m.skipEscape){p.path=escape(p.path);if(p.scheme!==undefined){p.path=p.path.split("%3A").join(":")}}else{p.path=unescape(p.path)}}if(m.reference!=="suffix"&&p.scheme){v.push(p.scheme,":")}const w=y(p);if(w!==undefined){if(m.reference!=="suffix"){v.push("//")}v.push(w);if(p.path&&p.path[0]!=="/"){v.push("/")}}if(p.path!==undefined){let t=p.path;if(!m.absolutePath&&(!b||!b.absolutePath)){t=g(t)}if(w===undefined&&t[0]==="/"&&t[1]==="/"){t="/%2F"+t.slice(2)}v.push(t)}if(p.query!==undefined){v.push("?",p.query)}if(p.fragment!==undefined){v.push("#",p.fragment)}return v.join("")}const O=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function parse(t,u){const p=Object.assign({},u);const g={scheme:undefined,userinfo:undefined,host:"",port:undefined,path:"",query:undefined,fragment:undefined};let y=false;if(p.reference==="suffix"){if(p.scheme){t=p.scheme+":"+t}else{t="//"+t}}const v=t.match(O);if(v){g.scheme=v[1];g.userinfo=v[3];g.host=v[4];g.port=parseInt(v[5],10);g.path=v[6]||"";g.query=v[7];g.fragment=v[8];if(isNaN(g.port)){g.port=v[5]}if(g.host){const t=b(g.host);if(t===false){const t=m(g.host);g.host=t.host.toLowerCase();y=t.isIPV6}else{y=true}}if(g.scheme===undefined&&g.userinfo===undefined&&g.host===undefined&&g.port===undefined&&g.query===undefined&&!g.path){g.reference="same-document"}else if(g.scheme===undefined){g.reference="relative"}else if(g.fragment===undefined){g.reference="absolute"}else{g.reference="uri"}if(p.reference&&p.reference!=="suffix"&&p.reference!==g.reference){g.error=g.error||"URI is not a "+p.reference+" reference."}const u=$(p.scheme||g.scheme);if(!p.unicodeSupport&&(!u||!u.unicodeSupport)){if(g.host&&(p.domainHost||u&&u.domainHost)&&y===false&&w(g.host)){try{g.host=URL.domainToASCII(g.host.toLowerCase())}catch(t){g.error=g.error||"Host's domain name can not be converted to ASCII: "+t}}}if(!u||u&&!u.skipNormalize){if(t.indexOf("%")!==-1){if(g.scheme!==undefined){g.scheme=unescape(g.scheme)}if(g.host!==undefined){g.host=unescape(g.host)}}if(g.path){g.path=escape(unescape(g.path))}if(g.fragment){g.fragment=encodeURI(decodeURIComponent(g.fragment))}}if(u&&u.parse){u.parse(g,p)}}else{g.error=g.error||"URI can not be parsed."}return g}const R={SCHEMES:E,normalize:normalize,resolve:resolve,resolveComponent:resolveComponent,equal:equal,serialize:serialize,parse:parse};t.exports=R;t.exports["default"]=R;t.exports.fastUri=R},2424:(t,u,p)=>{"use strict";const{isUUID:m}=p(1097);const g=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;const y=["http","https","ws","wss","urn","urn:uuid"];function isValidSchemeName(t){return y.indexOf(t)!==-1}function wsIsSecure(t){if(t.secure===true){return true}else if(t.secure===false){return false}else if(t.scheme){return t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S")}else{return false}}function httpParse(t){if(!t.host){t.error=t.error||"HTTP URIs must have a host."}return t}function httpSerialize(t){const u=String(t.scheme).toLowerCase()==="https";if(t.port===(u?443:80)||t.port===""){t.port=undefined}if(!t.path){t.path="/"}return t}function wsParse(t){t.secure=wsIsSecure(t);t.resourceName=(t.path||"/")+(t.query?"?"+t.query:"");t.path=undefined;t.query=undefined;return t}function wsSerialize(t){if(t.port===(wsIsSecure(t)?443:80)||t.port===""){t.port=undefined}if(typeof t.secure==="boolean"){t.scheme=t.secure?"wss":"ws";t.secure=undefined}if(t.resourceName){const[u,p]=t.resourceName.split("?");t.path=u&&u!=="/"?u:undefined;t.query=p;t.resourceName=undefined}t.fragment=undefined;return t}function urnParse(t,u){if(!t.path){t.error="URN can not be parsed";return t}const p=t.path.match(g);if(p){const m=u.scheme||t.scheme||"urn";t.nid=p[1].toLowerCase();t.nss=p[2];const g=`${m}:${u.nid||t.nid}`;const y=getSchemeHandler(g);t.path=undefined;if(y){t=y.parse(t,u)}}else{t.error=t.error||"URN can not be parsed."}return t}function urnSerialize(t,u){if(t.nid===undefined){throw new Error("URN without nid cannot be serialized")}const p=u.scheme||t.scheme||"urn";const m=t.nid.toLowerCase();const g=`${p}:${u.nid||m}`;const y=getSchemeHandler(g);if(y){t=y.serialize(t,u)}const v=t;const b=t.nss;v.path=`${m||u.nid}:${b}`;u.skipEscape=true;return v}function urnuuidParse(t,u){const p=t;p.uuid=p.nss;p.nss=undefined;if(!u.tolerant&&(!p.uuid||!m(p.uuid))){p.error=p.error||"UUID is not valid."}return p}function urnuuidSerialize(t){const u=t;u.nss=(t.uuid||"").toLowerCase();return u}const v={scheme:"http",domainHost:true,parse:httpParse,serialize:httpSerialize};const b={scheme:"https",domainHost:v.domainHost,parse:httpParse,serialize:httpSerialize};const w={scheme:"ws",domainHost:true,parse:wsParse,serialize:wsSerialize};const E={scheme:"wss",domainHost:w.domainHost,parse:w.parse,serialize:w.serialize};const $={scheme:"urn",parse:urnParse,serialize:urnSerialize,skipNormalize:true};const O={scheme:"urn:uuid",parse:urnuuidParse,serialize:urnuuidSerialize,skipNormalize:true};const R={http:v,https:b,ws:w,wss:E,urn:$,"urn:uuid":O};Object.setPrototypeOf(R,null);function getSchemeHandler(t){return t&&(R[t]||R[t.toLowerCase()])||undefined}t.exports={wsIsSecure:wsIsSecure,SCHEMES:R,isValidSchemeName:isValidSchemeName,getSchemeHandler:getSchemeHandler}},1097:t=>{"use strict";const u=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);const p=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function stringArrayToHexStripped(t){let u="";let p=0;let m=0;for(m=0;m<t.length;m++){p=t[m].charCodeAt(0);if(p===48){continue}if(!(p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102)){return""}u+=t[m];break}for(m+=1;m<t.length;m++){p=t[m].charCodeAt(0);if(!(p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102)){return""}u+=t[m]}return u}const m=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function consumeIsZone(t){t.length=0;return true}function consumeHextets(t,u,p){if(t.length){const m=stringArrayToHexStripped(t);if(m!==""){u.push(m)}else{p.error=true;return false}t.length=0}return true}function getIPV6(t){let u=0;const p={error:false,address:"",zone:""};const m=[];const g=[];let y=false;let v=false;let b=consumeHextets;for(let w=0;w<t.length;w++){const E=t[w];if(E==="["||E==="]"){continue}if(E===":"){if(y===true){v=true}if(!b(g,m,p)){break}if(++u>7){p.error=true;break}if(w>0&&t[w-1]===":"){y=true}m.push(":");continue}else if(E==="%"){if(!b(g,m,p)){break}b=consumeIsZone}else{g.push(E);continue}}if(g.length){if(b===consumeIsZone){p.zone=g.join("")}else if(v){m.push(g.join(""))}else{m.push(stringArrayToHexStripped(g))}}p.address=m.join("");return p}function normalizeIPv6(t){if(findToken(t,":")<2){return{host:t,isIPV6:false}}const u=getIPV6(t);if(!u.error){let t=u.address;let p=u.address;if(u.zone){t+="%"+u.zone;p+="%25"+u.zone}return{host:t,isIPV6:true,escapedHost:p}}else{return{host:t,isIPV6:false}}}function findToken(t,u){let p=0;for(let m=0;m<t.length;m++){if(t[m]===u)p++}return p}function removeDotSegments(t){let u=t;const p=[];let m=-1;let g=0;while(g=u.length){if(g===1){if(u==="."){break}else if(u==="/"){p.push("/");break}else{p.push(u);break}}else if(g===2){if(u[0]==="."){if(u[1]==="."){break}else if(u[1]==="/"){u=u.slice(2);continue}}else if(u[0]==="/"){if(u[1]==="."||u[1]==="/"){p.push("/");break}}}else if(g===3){if(u==="/.."){if(p.length!==0){p.pop()}p.push("/");break}}if(u[0]==="."){if(u[1]==="."){if(u[2]==="/"){u=u.slice(3);continue}}else if(u[1]==="/"){u=u.slice(2);continue}}else if(u[0]==="/"){if(u[1]==="."){if(u[2]==="/"){u=u.slice(2);continue}else if(u[2]==="."){if(u[3]==="/"){u=u.slice(3);if(p.length!==0){p.pop()}continue}}}}if((m=u.indexOf("/",1))===-1){p.push(u);break}else{p.push(u.slice(0,m));u=u.slice(m)}}return p.join("")}function normalizeComponentEncoding(t,u){const p=u!==true?escape:unescape;if(t.scheme!==undefined){t.scheme=p(t.scheme)}if(t.userinfo!==undefined){t.userinfo=p(t.userinfo)}if(t.host!==undefined){t.host=p(t.host)}if(t.path!==undefined){t.path=p(t.path)}if(t.query!==undefined){t.query=p(t.query)}if(t.fragment!==undefined){t.fragment=p(t.fragment)}return t}function recomposeAuthority(t){const u=[];if(t.userinfo!==undefined){u.push(t.userinfo);u.push("@")}if(t.host!==undefined){let m=unescape(t.host);if(!p(m)){const u=normalizeIPv6(m);if(u.isIPV6===true){m=`[${u.escapedHost}]`}else{m=t.host}}u.push(m)}if(typeof t.port==="number"||typeof t.port==="string"){u.push(":");u.push(String(t.port))}return u.length?u.join(""):undefined}t.exports={nonSimpleDomain:m,recomposeAuthority:recomposeAuthority,normalizeComponentEncoding:normalizeComponentEncoding,removeDotSegments:removeDotSegments,isIPv4:p,isUUID:u,normalizeIPv6:normalizeIPv6,stringArrayToHexStripped:stringArrayToHexStripped}},2200:t=>{"use strict";t.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},5727:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/applicator","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/applicator":true},"$dynamicAnchor":"meta","title":"Applicator vocabulary meta-schema","type":["object","boolean"],"properties":{"prefixItems":{"$ref":"#/$defs/schemaArray"},"items":{"$dynamicRef":"#meta"},"contains":{"$dynamicRef":"#meta"},"additionalProperties":{"$dynamicRef":"#meta"},"properties":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"},"propertyNames":{"format":"regex"},"default":{}},"dependentSchemas":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"},"default":{}},"propertyNames":{"$dynamicRef":"#meta"},"if":{"$dynamicRef":"#meta"},"then":{"$dynamicRef":"#meta"},"else":{"$dynamicRef":"#meta"},"allOf":{"$ref":"#/$defs/schemaArray"},"anyOf":{"$ref":"#/$defs/schemaArray"},"oneOf":{"$ref":"#/$defs/schemaArray"},"not":{"$dynamicRef":"#meta"}},"$defs":{"schemaArray":{"type":"array","minItems":1,"items":{"$dynamicRef":"#meta"}}}}')},1447:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/content","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/content":true},"$dynamicAnchor":"meta","title":"Content vocabulary meta-schema","type":["object","boolean"],"properties":{"contentEncoding":{"type":"string"},"contentMediaType":{"type":"string"},"contentSchema":{"$dynamicRef":"#meta"}}}')},4877:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/core","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/core":true},"$dynamicAnchor":"meta","title":"Core vocabulary meta-schema","type":["object","boolean"],"properties":{"$id":{"$ref":"#/$defs/uriReferenceString","$comment":"Non-empty fragments not allowed.","pattern":"^[^#]*#?$"},"$schema":{"$ref":"#/$defs/uriString"},"$ref":{"$ref":"#/$defs/uriReferenceString"},"$anchor":{"$ref":"#/$defs/anchorString"},"$dynamicRef":{"$ref":"#/$defs/uriReferenceString"},"$dynamicAnchor":{"$ref":"#/$defs/anchorString"},"$vocabulary":{"type":"object","propertyNames":{"$ref":"#/$defs/uriString"},"additionalProperties":{"type":"boolean"}},"$comment":{"type":"string"},"$defs":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"}}},"$defs":{"anchorString":{"type":"string","pattern":"^[A-Za-z_][-A-Za-z0-9._]*$"},"uriString":{"type":"string","format":"uri"},"uriReferenceString":{"type":"string","format":"uri-reference"}}}')},9041:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/format-annotation","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/format-annotation":true},"$dynamicAnchor":"meta","title":"Format vocabulary meta-schema for annotation results","type":["object","boolean"],"properties":{"format":{"type":"string"}}}')},5118:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/meta-data","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/meta-data":true},"$dynamicAnchor":"meta","title":"Meta-data vocabulary meta-schema","type":["object","boolean"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"default":true,"deprecated":{"type":"boolean","default":false},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true}}}')},8606:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/unevaluated","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/unevaluated":true},"$dynamicAnchor":"meta","title":"Unevaluated applicator vocabulary meta-schema","type":["object","boolean"],"properties":{"unevaluatedItems":{"$dynamicRef":"#meta"},"unevaluatedProperties":{"$dynamicRef":"#meta"}}}')},3073:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/validation","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/validation":true},"$dynamicAnchor":"meta","title":"Validation vocabulary meta-schema","type":["object","boolean"],"properties":{"type":{"anyOf":[{"$ref":"#/$defs/simpleTypes"},{"type":"array","items":{"$ref":"#/$defs/simpleTypes"},"minItems":1,"uniqueItems":true}]},"const":true,"enum":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/$defs/nonNegativeInteger"},"minLength":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"maxItems":{"$ref":"#/$defs/nonNegativeInteger"},"minItems":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxContains":{"$ref":"#/$defs/nonNegativeInteger"},"minContains":{"$ref":"#/$defs/nonNegativeInteger","default":1},"maxProperties":{"$ref":"#/$defs/nonNegativeInteger"},"minProperties":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"required":{"$ref":"#/$defs/stringArray"},"dependentRequired":{"type":"object","additionalProperties":{"$ref":"#/$defs/stringArray"}}},"$defs":{"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"$ref":"#/$defs/nonNegativeInteger","default":0},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}}}')},1115:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/schema","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/core":true,"https://json-schema.org/draft/2020-12/vocab/applicator":true,"https://json-schema.org/draft/2020-12/vocab/unevaluated":true,"https://json-schema.org/draft/2020-12/vocab/validation":true,"https://json-schema.org/draft/2020-12/vocab/meta-data":true,"https://json-schema.org/draft/2020-12/vocab/format-annotation":true,"https://json-schema.org/draft/2020-12/vocab/content":true},"$dynamicAnchor":"meta","title":"Core and Validation specifications meta-schema","allOf":[{"$ref":"meta/core"},{"$ref":"meta/applicator"},{"$ref":"meta/unevaluated"},{"$ref":"meta/validation"},{"$ref":"meta/meta-data"},{"$ref":"meta/format-annotation"},{"$ref":"meta/content"}],"type":["object","boolean"],"$comment":"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.","properties":{"definitions":{"$comment":"\\"definitions\\" has been replaced by \\"$defs\\".","type":"object","additionalProperties":{"$dynamicRef":"#meta"},"deprecated":true,"default":{}},"dependencies":{"$comment":"\\"dependencies\\" has been split and replaced by \\"dependentSchemas\\" and \\"dependentRequired\\" in order to serve their differing semantics.","type":"object","additionalProperties":{"anyOf":[{"$dynamicRef":"#meta"},{"$ref":"meta/validation#/$defs/stringArray"}]},"deprecated":true,"default":{}},"$recursiveAnchor":{"$comment":"\\"$recursiveAnchor\\" has been replaced by \\"$dynamicAnchor\\".","$ref":"meta/core#/$defs/anchorString","deprecated":true},"$recursiveRef":{"$comment":"\\"$recursiveRef\\" has been replaced by \\"$dynamicRef\\".","$ref":"meta/core#/$defs/uriReferenceString","deprecated":true}}}')},7578:t=>{"use strict";t.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},7028:t=>{"use strict";t.exports=JSON.parse('[{"name":"Agola CI","constant":"AGOLA","env":"AGOLA_GIT_REF","pr":"AGOLA_PULL_REQUEST_ID"},{"name":"Alpic","constant":"ALPIC","env":"ALPIC_HOST"},{"name":"Appcircle","constant":"APPCIRCLE","env":"AC_APPCIRCLE","pr":{"env":"AC_GIT_PR","ne":"false"}},{"name":"AppVeyor","constant":"APPVEYOR","env":"APPVEYOR","pr":"APPVEYOR_PULL_REQUEST_NUMBER"},{"name":"AWS CodeBuild","constant":"CODEBUILD","env":"CODEBUILD_BUILD_ARN","pr":{"env":"CODEBUILD_WEBHOOK_EVENT","any":["PULL_REQUEST_CREATED","PULL_REQUEST_UPDATED","PULL_REQUEST_REOPENED"]}},{"name":"Azure Pipelines","constant":"AZURE_PIPELINES","env":"TF_BUILD","pr":{"BUILD_REASON":"PullRequest"}},{"name":"Bamboo","constant":"BAMBOO","env":"bamboo_planKey"},{"name":"Bitbucket Pipelines","constant":"BITBUCKET","env":"BITBUCKET_COMMIT","pr":"BITBUCKET_PR_ID"},{"name":"Bitrise","constant":"BITRISE","env":"BITRISE_IO","pr":"BITRISE_PULL_REQUEST"},{"name":"Buddy","constant":"BUDDY","env":"BUDDY_WORKSPACE_ID","pr":"BUDDY_EXECUTION_PULL_REQUEST_ID"},{"name":"Buildkite","constant":"BUILDKITE","env":"BUILDKITE","pr":{"env":"BUILDKITE_PULL_REQUEST","ne":"false"}},{"name":"CircleCI","constant":"CIRCLE","env":"CIRCLECI","pr":"CIRCLE_PULL_REQUEST"},{"name":"Cirrus CI","constant":"CIRRUS","env":"CIRRUS_CI","pr":"CIRRUS_PR"},{"name":"Cloudflare Pages","constant":"CLOUDFLARE_PAGES","env":"CF_PAGES"},{"name":"Cloudflare Workers","constant":"CLOUDFLARE_WORKERS","env":"WORKERS_CI"},{"name":"Codefresh","constant":"CODEFRESH","env":"CF_BUILD_ID","pr":{"any":["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{"name":"Codemagic","constant":"CODEMAGIC","env":"CM_BUILD_ID","pr":"CM_PULL_REQUEST"},{"name":"Codeship","constant":"CODESHIP","env":{"CI_NAME":"codeship"}},{"name":"Drone","constant":"DRONE","env":"DRONE","pr":{"DRONE_BUILD_EVENT":"pull_request"}},{"name":"dsari","constant":"DSARI","env":"DSARI"},{"name":"Earthly","constant":"EARTHLY","env":"EARTHLY_CI"},{"name":"Expo Application Services","constant":"EAS","env":"EAS_BUILD"},{"name":"Gerrit","constant":"GERRIT","env":"GERRIT_PROJECT"},{"name":"Gitea Actions","constant":"GITEA_ACTIONS","env":"GITEA_ACTIONS"},{"name":"GitHub Actions","constant":"GITHUB_ACTIONS","env":"GITHUB_ACTIONS","pr":{"GITHUB_EVENT_NAME":"pull_request"}},{"name":"GitLab CI","constant":"GITLAB","env":"GITLAB_CI","pr":"CI_MERGE_REQUEST_ID"},{"name":"GoCD","constant":"GOCD","env":"GO_PIPELINE_LABEL"},{"name":"Google Cloud Build","constant":"GOOGLE_CLOUD_BUILD","env":"BUILDER_OUTPUT"},{"name":"Harness CI","constant":"HARNESS","env":"HARNESS_BUILD_ID"},{"name":"Heroku","constant":"HEROKU","env":{"env":"NODE","includes":"/app/.heroku/node/bin/node"}},{"name":"Hudson","constant":"HUDSON","env":"HUDSON_URL"},{"name":"Jenkins","constant":"JENKINS","env":["JENKINS_URL","BUILD_ID"],"pr":{"any":["ghprbPullId","CHANGE_ID"]}},{"name":"LayerCI","constant":"LAYERCI","env":"LAYERCI","pr":"LAYERCI_PULL_REQUEST"},{"name":"Magnum CI","constant":"MAGNUM","env":"MAGNUM"},{"name":"Netlify CI","constant":"NETLIFY","env":"NETLIFY","pr":{"env":"PULL_REQUEST","ne":"false"}},{"name":"Nevercode","constant":"NEVERCODE","env":"NEVERCODE","pr":{"env":"NEVERCODE_PULL_REQUEST","ne":"false"}},{"name":"Prow","constant":"PROW","env":"PROW_JOB_ID"},{"name":"ReleaseHub","constant":"RELEASEHUB","env":"RELEASE_BUILD_ID"},{"name":"Render","constant":"RENDER","env":"RENDER","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Sail CI","constant":"SAIL","env":"SAILCI","pr":"SAIL_PULL_REQUEST_NUMBER"},{"name":"Screwdriver","constant":"SCREWDRIVER","env":"SCREWDRIVER","pr":{"env":"SD_PULL_REQUEST","ne":"false"}},{"name":"Semaphore","constant":"SEMAPHORE","env":"SEMAPHORE","pr":"PULL_REQUEST_NUMBER"},{"name":"Sourcehut","constant":"SOURCEHUT","env":{"CI_NAME":"sourcehut"}},{"name":"Strider CD","constant":"STRIDER","env":"STRIDER"},{"name":"TaskCluster","constant":"TASKCLUSTER","env":["TASK_ID","RUN_ID"]},{"name":"TeamCity","constant":"TEAMCITY","env":"TEAMCITY_VERSION"},{"name":"Travis CI","constant":"TRAVIS","env":"TRAVIS","pr":{"env":"TRAVIS_PULL_REQUEST","ne":"false"}},{"name":"Vela","constant":"VELA","env":"VELA","pr":{"VELA_PULL_REQUEST":"1"}},{"name":"Vercel","constant":"VERCEL","env":{"any":["NOW_BUILDER","VERCEL"]},"pr":"VERCEL_GIT_PULL_REQUEST_ID"},{"name":"Visual Studio App Center","constant":"APPCENTER","env":"APPCENTER_BUILD_ID"},{"name":"Woodpecker","constant":"WOODPECKER","env":{"CI":"woodpecker"},"pr":{"CI_BUILD_EVENT":"pull_request"}},{"name":"Xcode Cloud","constant":"XCODE_CLOUD","env":"CI_XCODE_PROJECT","pr":"CI_PULL_REQUEST_NUMBER"},{"name":"Xcode Server","constant":"XCODE_SERVER","env":"XCS"}]')},6737:t=>{"use strict";t.exports=JSON.parse('["_http_agent","_http_client","_http_common","_http_incoming","_http_outgoing","_http_server","_stream_duplex","_stream_passthrough","_stream_readable","_stream_transform","_stream_wrap","_stream_writable","_tls_common","_tls_wrap","assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","sys","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib","node:sea","node:sqlite","node:test","node:test/reporters"]')}};var u={};function __nccwpck_require__(p){var m=u[p];if(m!==undefined){return m.exports}var g=u[p]={exports:{}};var y=true;try{t[p](g,g.exports,__nccwpck_require__);y=false}finally{if(y)delete u[p]}return g.exports}(()=>{__nccwpck_require__.n=t=>{var u=t&&t.__esModule?()=>t["default"]:()=>t;__nccwpck_require__.d(u,{a:u});return u}})();(()=>{var t=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__;var u;__nccwpck_require__.t=function(p,m){if(m&1)p=this(p);if(m&8)return p;if(typeof p==="object"&&p){if(m&4&&p.__esModule)return p;if(m&16&&typeof p.then==="function")return p}var g=Object.create(null);__nccwpck_require__.r(g);var y={};u=u||[null,t({}),t([]),t(t)];for(var v=m&2&&p;typeof v=="object"&&!~u.indexOf(v);v=t(v)){Object.getOwnPropertyNames(v).forEach((t=>y[t]=()=>p[t]))}y["default"]=()=>p;__nccwpck_require__.d(g,y);return g}})();(()=>{__nccwpck_require__.d=(t,u)=>{for(var p in u){if(__nccwpck_require__.o(u,p)&&!__nccwpck_require__.o(t,p)){Object.defineProperty(t,p,{enumerable:true,get:u[p]})}}}})();(()=>{__nccwpck_require__.o=(t,u)=>Object.prototype.hasOwnProperty.call(t,u)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var p={};(()=>{"use strict";var t=__nccwpck_require__(3024);var u=__nccwpck_require__(6760);var p=__nccwpck_require__.n(u);var m=__nccwpck_require__(4732);var g=__nccwpck_require__.n(m);var y=__nccwpck_require__(206);const{DM:v,gu:b,er:w,Ww:E,b7:$,Di:O,a2:R,uB:P,ef:A,c$:x,_V:T}=y;const C=require("node:util");var k=__nccwpck_require__(1708);const I=require("node:crypto");const N=require("node:assert");const isObject=t=>{const u=typeof t;return t!==null&&(u==="object"||u==="function")};const isEmptyObject=t=>{if(!isObject(t)){return false}for(const u in t){if(Object.hasOwn(t,u)){return false}}return true};const D=new Set(["__proto__","prototype","constructor"]);const L=1e6;const isDigit=t=>t>="0"&&t<="9";function shouldCoerceToNumber(t){if(t==="0"){return true}if(/^[1-9]\d*$/.test(t)){const u=Number.parseInt(t,10);return u<=Number.MAX_SAFE_INTEGER&&u<=L}return false}function processSegment(t,u){if(D.has(t)){return false}if(t&&shouldCoerceToNumber(t)){u.push(Number.parseInt(t,10))}else{u.push(t)}return true}function parsePath(t){if(typeof t!=="string"){throw new TypeError(`Expected a string, got ${typeof t}`)}const u=[];let p="";let m="start";let g=false;let y=0;for(const v of t){y++;if(g){p+=v;g=false;continue}if(v==="\\"){if(m==="index"){throw new Error(`Invalid character '${v}' in an index at position ${y}`)}if(m==="indexEnd"){throw new Error(`Invalid character '${v}' after an index at position ${y}`)}g=true;m=m==="start"?"property":m;continue}switch(v){case".":{if(m==="index"){throw new Error(`Invalid character '${v}' in an index at position ${y}`)}if(m==="indexEnd"){m="property";break}if(!processSegment(p,u)){return[]}p="";m="property";break}case"[":{if(m==="index"){throw new Error(`Invalid character '${v}' in an index at position ${y}`)}if(m==="indexEnd"){m="index";break}if(m==="property"||m==="start"){if((p||m==="property")&&!processSegment(p,u)){return[]}p=""}m="index";break}case"]":{if(m==="index"){if(p===""){const t=u.pop()||"";p=t+"[]";m="property"}else{const t=Number.parseInt(p,10);const g=!Number.isNaN(t)&&Number.isFinite(t)&&t>=0&&t<=Number.MAX_SAFE_INTEGER&&t<=L&&p===String(t);if(g){u.push(t)}else{u.push(p)}p="";m="indexEnd"}break}if(m==="indexEnd"){throw new Error(`Invalid character '${v}' after an index at position ${y}`)}p+=v;break}default:{if(m==="index"&&!isDigit(v)){throw new Error(`Invalid character '${v}' in an index at position ${y}`)}if(m==="indexEnd"){throw new Error(`Invalid character '${v}' after an index at position ${y}`)}if(m==="start"){m="property"}p+=v}}}if(g){p+="\\"}switch(m){case"property":{if(!processSegment(p,u)){return[]}break}case"index":{throw new Error("Index was not closed")}case"start":{u.push("");break}}return u}function normalizePath(t){if(typeof t==="string"){return parsePath(t)}if(Array.isArray(t)){const u=[];for(const[p,m]of t.entries()){if(typeof m!=="string"&&typeof m!=="number"){throw new TypeError(`Expected a string or number for path segment at index ${p}, got ${typeof m}`)}if(typeof m==="number"&&!Number.isFinite(m)){throw new TypeError(`Path segment at index ${p} must be a finite number, got ${m}`)}if(D.has(m)){return[]}if(typeof m==="string"&&shouldCoerceToNumber(m)){u.push(Number.parseInt(m,10))}else{u.push(m)}}return u}return[]}function getProperty(t,u,p){if(!isObject(t)||typeof u!=="string"&&!Array.isArray(u)){return p===undefined?t:p}const m=normalizePath(u);if(m.length===0){return p}for(let u=0;u<m.length;u++){const g=m[u];t=t[g];if(t===undefined||t===null){if(u!==m.length-1){return p}break}}return t===undefined?p:t}function setProperty(t,u,p){if(!isObject(t)||typeof u!=="string"&&!Array.isArray(u)){return t}const m=t;const g=normalizePath(u);if(g.length===0){return t}for(let u=0;u<g.length;u++){const m=g[u];if(u===g.length-1){t[m]=p}else if(!isObject(t[m])){const p=g[u+1];const y=typeof p==="number";t[m]=y?[]:{}}t=t[m]}return m}function deleteProperty(t,u){if(!isObject(t)||typeof u!=="string"&&!Array.isArray(u)){return false}const p=normalizePath(u);if(p.length===0){return false}for(let u=0;u<p.length;u++){const m=p[u];if(u===p.length-1){const u=Object.hasOwn(t,m);if(!u){return false}delete t[m];return true}t=t[m];if(!isObject(t)){return false}}}function hasProperty(t,u){if(!isObject(t)||typeof u!=="string"&&!Array.isArray(u)){return false}const p=normalizePath(u);if(p.length===0){return false}for(const u of p){if(!isObject(t)||!(u in t)){return false}t=t[u]}return true}function escapePath(t){if(typeof t!=="string"){throw new TypeError(`Expected a string, got ${typeof t}`)}return t.replaceAll(/[\\.[]/g,String.raw`\$&`)}function normalizeEntries(t){const u=Object.entries(t);if(Array.isArray(t)){return u.map((([t,u])=>{const p=shouldCoerceToNumber(t)?Number.parseInt(t,10):t;return[p,u]}))}return u}function stringifyPath(t,u={}){if(!Array.isArray(t)){throw new TypeError(`Expected an array, got ${typeof t}`)}const{preferDotForIndices:p=false}=u;const m=[];for(const[u,g]of t.entries()){if(typeof g!=="string"&&typeof g!=="number"){throw new TypeError(`Expected a string or number for path segment at index ${u}, got ${typeof g}`)}if(typeof g==="number"){if(!Number.isInteger(g)||g<0){const t=escapePath(String(g));m.push(u===0?t:`.${t}`)}else if(p&&u>0){m.push(`.${g}`)}else{m.push(`[${g}]`)}}else if(typeof g==="string"){if(g===""){if(u===0){}else{m.push(".")}}else if(shouldCoerceToNumber(g)){const t=Number.parseInt(g,10);if(p&&u>0){m.push(`.${t}`)}else{m.push(`[${t}]`)}}else{const t=escapePath(g);m.push(u===0?t:`.${t}`)}}}return m.join("")}function*deepKeysIterator(t,u=[],p=new Set){if(!isObject(t)||isEmptyObject(t)){if(u.length>0){yield stringifyPath(u)}return}if(p.has(t)){return}p.add(t);for(const[m,g]of normalizeEntries(t)){u.push(m);yield*deepKeysIterator(g,u,p);u.pop()}p.delete(t)}function deepKeys(t){return[...deepKeysIterator(t)]}function unflatten(t){const u={};if(!isObject(t)){return u}for(const[p,m]of Object.entries(t)){setProperty(u,p,m)}return u}const M=require("node:os");var j=__nccwpck_require__.n(M);const U=M.homedir();const B=M.tmpdir();const{env:H}=k;const macos=t=>{const p=u.join(U,"Library");return{data:u.join(p,"Application Support",t),config:u.join(p,"Preferences",t),cache:u.join(p,"Caches",t),log:u.join(p,"Logs",t),temp:u.join(B,t)}};const windows=t=>{const p=H.APPDATA||u.join(U,"AppData","Roaming");const m=H.LOCALAPPDATA||u.join(U,"AppData","Local");return{data:u.join(m,t,"Data"),config:u.join(p,t,"Config"),cache:u.join(m,t,"Cache"),log:u.join(m,t,"Log"),temp:u.join(B,t)}};const linux=t=>{const p=u.basename(U);return{data:u.join(H.XDG_DATA_HOME||u.join(U,".local","share"),t),config:u.join(H.XDG_CONFIG_HOME||u.join(U,".config"),t),cache:u.join(H.XDG_CACHE_HOME||u.join(U,".cache"),t),log:u.join(H.XDG_STATE_HOME||u.join(U,".local","state"),t),temp:u.join(B,p,t)}};function envPaths(t,{suffix:u="nodejs"}={}){if(typeof t!=="string"){throw new TypeError(`Expected a string, got ${typeof t}`)}if(u){t+=`-${u}`}if(k.platform==="darwin"){return macos(t)}if(k.platform==="win32"){return windows(t)}return linux(t)}var V=__nccwpck_require__(8474);const z=require("node:stream");const attemptifyAsync=(t,u)=>{const{onError:p}=u;return function attemptified(...u){return t.apply(undefined,u).catch(p)}};const G=attemptifyAsync;const attemptifySync=(t,u)=>{const{onError:p}=u;return function attemptified(...u){try{return t.apply(undefined,u)}catch(t){return p(t)}}};const q=attemptifySync;const W=250;const retryifyAsync=(t,u)=>{const{isRetriable:p}=u;return function retryified(u){const{timeout:m}=u;const g=u.interval??W;const y=Date.now()+m;return function attempt(...u){return t.apply(undefined,u).catch((t=>{if(!p(t))throw t;if(Date.now()>=y)throw t;const m=Math.round(g*Math.random());if(m>0){const t=new Promise((t=>setTimeout(t,m)));return t.then((()=>attempt.apply(undefined,u)))}else{return attempt.apply(undefined,u)}}))}}};const Y=retryifyAsync;const retryifySync=(t,u)=>{const{isRetriable:p}=u;return function retryified(u){const{timeout:m}=u;const g=Date.now()+m;return function attempt(...u){while(true){try{return t.apply(undefined,u)}catch(t){if(!p(t))throw t;if(Date.now()>=g)throw t;continue}}}}};const Z=retryifySync;const X={isChangeErrorOk:t=>{if(!X.isNodeError(t))return false;const{code:u}=t;if(u==="ENOSYS")return true;if(!se&&(u==="EINVAL"||u==="EPERM"))return true;return false},isNodeError:t=>t instanceof Error,isRetriableError:t=>{if(!X.isNodeError(t))return false;const{code:u}=t;if(u==="EMFILE"||u==="ENFILE"||u==="EAGAIN"||u==="EBUSY"||u==="EACCESS"||u==="EACCES"||u==="EACCS"||u==="EPERM")return true;return false},onChangeError:t=>{if(!X.isNodeError(t))throw t;if(X.isChangeErrorOk(t))return;throw t}};const J=X;const Q={onError:J.onChangeError};const ee={onError:()=>undefined};const se=k.getuid?!k.getuid():false;const ie={isRetriable:J.isRetriableError};const ne={attempt:{chmod:G((0,C.promisify)(t.chmod),Q),chown:G((0,C.promisify)(t.chown),Q),close:G((0,C.promisify)(t.close),ee),fsync:G((0,C.promisify)(t.fsync),ee),mkdir:G((0,C.promisify)(t.mkdir),ee),realpath:G((0,C.promisify)(t.realpath),ee),stat:G((0,C.promisify)(t.stat),ee),unlink:G((0,C.promisify)(t.unlink),ee),chmodSync:q(t.chmodSync,Q),chownSync:q(t.chownSync,Q),closeSync:q(t.closeSync,ee),existsSync:q(t.existsSync,ee),fsyncSync:q(t.fsync,ee),mkdirSync:q(t.mkdirSync,ee),realpathSync:q(t.realpathSync,ee),statSync:q(t.statSync,ee),unlinkSync:q(t.unlinkSync,ee)},retry:{close:Y((0,C.promisify)(t.close),ie),fsync:Y((0,C.promisify)(t.fsync),ie),open:Y((0,C.promisify)(t.open),ie),readFile:Y((0,C.promisify)(t.readFile),ie),rename:Y((0,C.promisify)(t.rename),ie),stat:Y((0,C.promisify)(t.stat),ie),write:Y((0,C.promisify)(t.write),ie),writeFile:Y((0,C.promisify)(t.writeFile),ie),closeSync:Z(t.closeSync,ie),fsyncSync:Z(t.fsyncSync,ie),openSync:Z(t.openSync,ie),readFileSync:Z(t.readFileSync,ie),renameSync:Z(t.renameSync,ie),statSync:Z(t.statSync,ie),writeSync:Z(t.writeSync,ie),writeFileSync:Z(t.writeFileSync,ie)}};const ae=ne;const le="utf8";const ue=438;const he=511;const de={};const fe={};const pe=k.geteuid?k.geteuid():-1;const me=k.getegid?k.getegid():-1;const ge=200;const ye=7500;const ve=1e3;const _e=!!k.getuid;const be=k.getuid?!k.getuid():false;const we=128;const NOOP=()=>{};const lang_isException=t=>t instanceof Error&&"code"in t;const lang_isFunction=t=>typeof t==="function";const lang_isString=t=>typeof t==="string";const lang_isUndefined=t=>t===undefined;const Ee={};const $e={next:t=>{const u=Ee[t];if(!u)return;u.shift();const p=u[0];if(p){p((()=>$e.next(t)))}else{delete Ee[t]}},schedule:t=>new Promise((u=>{let p=Ee[t];if(!p)p=Ee[t]=[];p.push(u);if(p.length>1)return;u((()=>$e.next(t)))}))};const Oe=null&&$e;const Re=k.platform==="linux";const Pe=k.platform==="win32";const Ae=["SIGHUP","SIGINT","SIGTERM"];if(!Pe){Ae.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(Re){Ae.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")}const xe=Ae;class Interceptor{constructor(){this.callbacks=new Set;this.exited=false;this.exit=t=>{if(this.exited)return;this.exited=true;for(const t of this.callbacks){t()}if(t){if(Pe&&(t!=="SIGINT"&&t!=="SIGTERM"&&t!=="SIGKILL")){k.kill(k.pid,"SIGTERM")}else{k.kill(k.pid,t)}}};this.hook=()=>{k.once("exit",(()=>this.exit()));for(const t of xe){try{k.once(t,(()=>this.exit(t)))}catch{}}};this.register=t=>{this.callbacks.add(t);return()=>{this.callbacks.delete(t)}};this.hook()}}const Te=new Interceptor;const Ce=Te.register;const ke=Ce;const Ie={store:{},create:t=>{const u=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6);const p=Date.now().toString().slice(-10);const m="tmp-";const g=`.${m}${p}${u}`;const y=`${t}${g}`;return y},get:(t,u,p=true)=>{const m=Ie.truncate(u(t));if(m in Ie.store)return Ie.get(t,u,p);Ie.store[m]=p;const disposer=()=>delete Ie.store[m];return[m,disposer]},purge:t=>{if(!Ie.store[t])return;delete Ie.store[t];ae.attempt.unlink(t)},purgeSync:t=>{if(!Ie.store[t])return;delete Ie.store[t];ae.attempt.unlinkSync(t)},purgeSyncAll:()=>{for(const t in Ie.store){Ie.purgeSync(t)}},truncate:t=>{const p=u.basename(t);if(p.length<=we)return t;const m=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(p);if(!m)return t;const g=p.length-we;return`${t.slice(0,-p.length)}${m[1]}${m[2].slice(0,-g)}${m[3]}`}};ke(Ie.purgeSyncAll);const Ne=Ie;function readFile(t,u=DEFAULT_READ_OPTIONS){if(isString(u))return readFile(t,{encoding:u});const p=u.timeout??DEFAULT_TIMEOUT_ASYNC;const m={timeout:p,interval:DEFAULT_INTERVAL_ASYNC};return fs.retry.readFile(m)(t,u)}function readFileSync(t,u=DEFAULT_READ_OPTIONS){if(isString(u))return readFileSync(t,{encoding:u});const p=u.timeout??DEFAULT_TIMEOUT_SYNC;const m={timeout:p};return fs.retry.readFileSync(m)(t,u)}function writeFile(t,u,p,m){if(isFunction(p))return writeFile(t,u,DEFAULT_WRITE_OPTIONS,p);const g=writeFileAsync(t,u,p);if(m)g.then(m,m);return g}async function writeFileAsync(t,u,p=DEFAULT_WRITE_OPTIONS){if(isString(p))return writeFileAsync(t,u,{encoding:p});const m=p.timeout??DEFAULT_TIMEOUT_ASYNC;const g={timeout:m,interval:DEFAULT_INTERVAL_ASYNC};let y=null;let v=null;let b=null;let w=null;let E=null;try{if(p.schedule)y=await p.schedule(t);v=await Scheduler.schedule(t);const m=await fs.attempt.realpath(t);const $=!!m;t=m||t;[w,b]=Temp.get(t,p.tmpCreate||Temp.create,!(p.tmpPurge===false));const O=IS_POSIX&&isUndefined(p.chown);const R=isUndefined(p.mode);if($&&(O||R)){const u=await fs.attempt.stat(t);if(u){p={...p};if(O){p.chown={uid:u.uid,gid:u.gid}}if(R){p.mode=u.mode}}}if(!$){const u=path.dirname(t);await fs.attempt.mkdir(u,{mode:DEFAULT_FOLDER_MODE,recursive:true})}E=await fs.retry.open(g)(w,"w",p.mode||DEFAULT_FILE_MODE);if(p.tmpCreated){p.tmpCreated(w)}if(isString(u)){await fs.retry.write(g)(E,u,0,p.encoding||DEFAULT_ENCODING)}else if(u instanceof Readable){const t=createWriteStream(w,{fd:E,autoClose:false});const p=once(t,"finish");u.pipe(t);await p}else if(!isUndefined(u)){await fs.retry.write(g)(E,u,0,u.length,0)}if(p.fsync!==false){if(p.fsyncWait!==false){await fs.retry.fsync(g)(E)}else{fs.attempt.fsync(E)}}await fs.retry.close(g)(E);E=null;if(p.chown&&(p.chown.uid!==DEFAULT_USER_UID||p.chown.gid!==DEFAULT_USER_GID)){await fs.attempt.chown(w,p.chown.uid,p.chown.gid)}if(p.mode&&p.mode!==DEFAULT_FILE_MODE){await fs.attempt.chmod(w,p.mode)}try{await fs.retry.rename(g)(w,t)}catch(u){if(!isException(u))throw u;if(u.code!=="ENAMETOOLONG")throw u;await fs.retry.rename(g)(w,Temp.truncate(t))}b();w=null}finally{if(E)await fs.attempt.close(E);if(w)Temp.purge(w);if(y)y();if(v)v()}}function writeFileSync(t,p,m=fe){if(lang_isString(m))return writeFileSync(t,p,{encoding:m});const g=m.timeout??ve;const y={timeout:g};let v=null;let b=null;let w=null;try{const g=ae.attempt.realpathSync(t);const E=!!g;t=g||t;[b,v]=Ne.get(t,m.tmpCreate||Ne.create,!(m.tmpPurge===false));const $=_e&&lang_isUndefined(m.chown);const O=lang_isUndefined(m.mode);if(E&&($||O)){const u=ae.attempt.statSync(t);if(u){m={...m};if($){m.chown={uid:u.uid,gid:u.gid}}if(O){m.mode=u.mode}}}if(!E){const p=u.dirname(t);ae.attempt.mkdirSync(p,{mode:he,recursive:true})}w=ae.retry.openSync(y)(b,"w",m.mode||ue);if(m.tmpCreated){m.tmpCreated(b)}if(lang_isString(p)){ae.retry.writeSync(y)(w,p,0,m.encoding||le)}else if(!lang_isUndefined(p)){ae.retry.writeSync(y)(w,p,0,p.length,0)}if(m.fsync!==false){if(m.fsyncWait!==false){ae.retry.fsyncSync(y)(w)}else{ae.attempt.fsync(w)}}ae.retry.closeSync(y)(w);w=null;if(m.chown&&(m.chown.uid!==pe||m.chown.gid!==me)){ae.attempt.chownSync(b,m.chown.uid,m.chown.gid)}if(m.mode&&m.mode!==ue){ae.attempt.chmodSync(b,m.mode)}try{ae.retry.renameSync(y)(b,t)}catch(u){if(!lang_isException(u))throw u;if(u.code!=="ENAMETOOLONG")throw u;ae.retry.renameSync(y)(b,Ne.truncate(t))}v();b=null}finally{if(w)ae.attempt.closeSync(w);if(b)Ne.purge(b)}}var De=__nccwpck_require__(8861);var Le=__nccwpck_require__(8631);const copyProperty=(t,u,p,m)=>{if(p==="length"||p==="prototype"){return}if(p==="arguments"||p==="caller"){return}const g=Object.getOwnPropertyDescriptor(t,p);const y=Object.getOwnPropertyDescriptor(u,p);if(!canCopyProperty(g,y)&&m){return}Object.defineProperty(t,p,y)};const canCopyProperty=function(t,u){return t===undefined||t.configurable||t.writable===u.writable&&t.enumerable===u.enumerable&&t.configurable===u.configurable&&(t.writable||t.value===u.value)};const changePrototype=(t,u)=>{const p=Object.getPrototypeOf(u);if(p===Object.getPrototypeOf(t)){return}Object.setPrototypeOf(t,p)};const wrappedToString=(t,u)=>`/* Wrapped ${t}*/\n${u}`;const Me=Object.getOwnPropertyDescriptor(Function.prototype,"toString");const je=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");const changeToString=(t,u,p)=>{const m=p===""?"":`with ${p.trim()}() `;const g=wrappedToString.bind(null,m,u.toString());Object.defineProperty(g,"name",je);const{writable:y,enumerable:v,configurable:b}=Me;Object.defineProperty(t,"toString",{value:g,writable:y,enumerable:v,configurable:b})};function mimicFunction(t,u,{ignoreNonConfigurable:p=false}={}){const{name:m}=t;for(const m of Reflect.ownKeys(u)){copyProperty(t,u,m,p)}changePrototype(t,u);changeToString(t,u,m);return t}const debounceFunction=(t,u={})=>{if(typeof t!=="function"){throw new TypeError(`Expected the first argument to be a function, got \`${typeof t}\``)}const{wait:p=0,maxWait:m=Number.POSITIVE_INFINITY,before:g=false,after:y=true}=u;if(p<0||m<0){throw new RangeError("`wait` and `maxWait` must not be negative.")}if(!g&&!y){throw new Error("Both `before` and `after` are false, function wouldn't be called.")}let v;let b;let w;const debouncedFunction=function(...u){const E=this;const later=()=>{v=undefined;if(b){clearTimeout(b);b=undefined}if(y){w=t.apply(E,u)}};const maxLater=()=>{b=undefined;if(v){clearTimeout(v);v=undefined}if(y){w=t.apply(E,u)}};const $=g&&!v;clearTimeout(v);v=setTimeout(later,p);if(m>0&&m!==Number.POSITIVE_INFINITY&&!b){b=setTimeout(maxLater,m)}if($){w=t.apply(E,u)}return w};mimicFunction(debouncedFunction,t);debouncedFunction.cancel=()=>{if(v){clearTimeout(v);v=undefined}if(b){clearTimeout(b);b=undefined}};return debouncedFunction};const Fe=debounceFunction;var Ue=__nccwpck_require__(4423);const Be=Object.prototype.toString;const He="[object Uint8Array]";const Ve="[object ArrayBuffer]";function isType(t,u,p){if(!t){return false}if(t.constructor===u){return true}return Be.call(t)===p}function isUint8Array(t){return isType(t,Uint8Array,He)}function isArrayBuffer(t){return isType(t,ArrayBuffer,Ve)}function isUint8ArrayOrArrayBuffer(t){return isUint8Array(t)||isArrayBuffer(t)}function assertUint8Array(t){if(!isUint8Array(t)){throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof t}\``)}}function assertUint8ArrayOrArrayBuffer(t){if(!isUint8ArrayOrArrayBuffer(t)){throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``)}}function toUint8Array(t){if(t instanceof ArrayBuffer){return new Uint8Array(t)}if(ArrayBuffer.isView(t)){return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}throw new TypeError(`Unsupported value, got \`${typeof t}\`.`)}function concatUint8Arrays(t,u){if(t.length===0){return new Uint8Array(0)}u??=t.reduce(((t,u)=>t+u.length),0);const p=new Uint8Array(u);let m=0;for(const u of t){assertUint8Array(u);p.set(u,m);m+=u.length}return p}function areUint8ArraysEqual(t,u){assertUint8Array(t);assertUint8Array(u);if(t===u){return true}if(t.length!==u.length){return false}for(let p=0;p<t.length;p++){if(t[p]!==u[p]){return false}}return true}function compareUint8Arrays(t,u){assertUint8Array(t);assertUint8Array(u);const p=Math.min(t.length,u.length);for(let m=0;m<p;m++){const p=t[m]-u[m];if(p!==0){return Math.sign(p)}}return Math.sign(t.length-u.length)}const ze={utf8:new globalThis.TextDecoder("utf8")};function uint8ArrayToString(t,u="utf8"){assertUint8ArrayOrArrayBuffer(t);ze[u]??=new globalThis.TextDecoder(u);return ze[u].decode(t)}function assertString(t){if(typeof t!=="string"){throw new TypeError(`Expected \`string\`, got \`${typeof t}\``)}}const Ge=new globalThis.TextEncoder;function stringToUint8Array(t){assertString(t);return Ge.encode(t)}function base64ToBase64Url(t){return t.replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}function base64UrlToBase64(t){const u=t.replaceAll("-","+").replaceAll("_","/");const p=(4-u.length%4)%4;return u+"=".repeat(p)}const qe=65535;function uint8ArrayToBase64(t,{urlSafe:u=false}={}){assertUint8Array(t);let p="";for(let u=0;u<t.length;u+=qe){const m=t.subarray(u,u+qe);p+=globalThis.btoa(String.fromCodePoint.apply(undefined,m))}return u?base64ToBase64Url(p):p}function base64ToUint8Array(t){assertString(t);return Uint8Array.from(globalThis.atob(base64UrlToBase64(t)),(t=>t.codePointAt(0)))}function stringToBase64(t,{urlSafe:u=false}={}){assertString(t);return uint8ArrayToBase64(stringToUint8Array(t),{urlSafe:u})}function base64ToString(t){assertString(t);return uint8ArrayToString(base64ToUint8Array(t))}const We=Array.from({length:256},((t,u)=>u.toString(16).padStart(2,"0")));function uint8ArrayToHex(t){assertUint8Array(t);let u="";for(let p=0;p<t.length;p++){u+=We[t[p]]}return u}const Ke={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,b:11,c:12,d:13,e:14,f:15,A:10,B:11,C:12,D:13,E:14,F:15};function hexToUint8Array(t){assertString(t);if(t.length%2!==0){throw new Error("Invalid Hex string length.")}const u=t.length/2;const p=new Uint8Array(u);for(let m=0;m<u;m++){const u=Ke[t[m*2]];const g=Ke[t[m*2+1]];if(u===undefined||g===undefined){throw new Error(`Invalid Hex character encountered at position ${m*2}`)}p[m]=u<<4|g}return p}function getUintBE(t){const{byteLength:u}=t;if(u===6){return t.getUint16(0)*2**32+t.getUint32(2)}if(u===5){return t.getUint8(0)*2**32+t.getUint32(1)}if(u===4){return t.getUint32(0)}if(u===3){return t.getUint8(0)*2**16+t.getUint16(1)}if(u===2){return t.getUint16(0)}if(u===1){return t.getUint8(0)}}function indexOf(t,u){const p=t.length;const m=u.length;if(m===0){return-1}if(m>p){return-1}const g=p-m;for(let p=0;p<=g;p++){let g=true;for(let y=0;y<m;y++){if(t[p+y]!==u[y]){g=false;break}}if(g){return p}}return-1}function includes(t,u){return indexOf(t,u)!==-1}const Ye="aes-256-cbc";const Ze=new Set(["aes-256-cbc","aes-256-gcm","aes-256-ctr"]);const isSupportedEncryptionAlgorithm=t=>typeof t==="string"&&Ze.has(t);const createPlainObject=()=>Object.create(null);const isExist=t=>t!==undefined;const checkValueType=(t,u)=>{const p=new Set(["undefined","symbol","function"]);const m=typeof u;if(p.has(m)){throw new TypeError(`Setting a value of type \`${m}\` for key \`${t}\` is not allowed as it's not supported by JSON`)}};const Xe="__internal__";const Je=`${Xe}.migrations.version`;class Conf{path;events;#e;#t;#r;#s;#i={};#n=false;#o;#a;#c;constructor(t={}){const u=this.#l(t);this.#s=u;this.#u(u);this.#h(u);this.#d(u);this.events=new EventTarget;this.#t=u.encryptionKey;this.#r=u.encryptionAlgorithm??Ye;this.path=this.#f(u);this.#p(u);if(u.watch){this._watch()}}get(t,u){if(this.#s.accessPropertiesByDotNotation){return this._get(t,u)}const{store:p}=this;return t in p?p[t]:u}set(t,u){if(typeof t!=="string"&&typeof t!=="object"){throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof t}`)}if(typeof t!=="object"&&u===undefined){throw new TypeError("Use `delete()` to clear values")}if(this._containsReservedKey(t)){throw new TypeError(`Please don't use the ${Xe} key, as it's used to manage this module internal operations.`)}const{store:p}=this;const set=(t,u)=>{checkValueType(t,u);if(this.#s.accessPropertiesByDotNotation){setProperty(p,t,u)}else{if(t==="__proto__"||t==="constructor"||t==="prototype"){return}p[t]=u}};if(typeof t==="object"){const u=t;for(const[t,p]of Object.entries(u)){set(t,p)}}else{set(t,u)}this.store=p}has(t){if(this.#s.accessPropertiesByDotNotation){return hasProperty(this.store,t)}return t in this.store}appendToArray(t,u){checkValueType(t,u);const p=this.#s.accessPropertiesByDotNotation?this._get(t,[]):t in this.store?this.store[t]:[];if(!Array.isArray(p)){throw new TypeError(`The key \`${t}\` is already set to a non-array value`)}this.set(t,[...p,u])}reset(...t){for(const u of t){if(isExist(this.#i[u])){this.set(u,this.#i[u])}}}delete(t){const{store:u}=this;if(this.#s.accessPropertiesByDotNotation){deleteProperty(u,t)}else{delete u[t]}this.store=u}clear(){const t=createPlainObject();for(const u of Object.keys(this.#i)){if(isExist(this.#i[u])){checkValueType(u,this.#i[u]);if(this.#s.accessPropertiesByDotNotation){setProperty(t,u,this.#i[u])}else{t[u]=this.#i[u]}}}this.store=t}onDidChange(t,u){if(typeof t!=="string"){throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof t}`)}if(typeof u!=="function"){throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof u}`)}return this._handleValueChange((()=>this.get(t)),u)}onDidAnyChange(t){if(typeof t!=="function"){throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof t}`)}return this._handleStoreChange(t)}get size(){const t=Object.keys(this.store);return t.filter((t=>!this._isReservedKeyPath(t))).length}get store(){try{const u=t.readFileSync(this.path,this.#t?null:"utf8");const p=this._decryptData(u);const parseStore=t=>{const u=this._deserialize(t);if(!this.#n){this._validate(u)}return Object.assign(createPlainObject(),u)};return parseStore(p)}catch(t){if(t?.code==="ENOENT"){this._ensureDirectory();return createPlainObject()}if(this.#s.clearInvalidConfig){const u=t;if(u.name==="SyntaxError"){return createPlainObject()}if(u.message?.startsWith("Config schema violation:")){return createPlainObject()}if(u.message==="Failed to decrypt config data."){return createPlainObject()}}throw t}}set store(u){this._ensureDirectory();if(!hasProperty(u,Xe)){try{const p=t.readFileSync(this.path,this.#t?null:"utf8");const m=this._decryptData(p);const g=this._deserialize(m);if(hasProperty(g,Xe)){setProperty(u,Xe,getProperty(g,Xe))}}catch{}}if(!this.#n){this._validate(u)}this._write(u);this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(const[t,u]of Object.entries(this.store)){if(!this._isReservedKeyPath(t)){yield[t,u]}}}_closeWatcher(){if(this.#o){this.#o.close();this.#o=undefined}if(this.#a){t.unwatchFile(this.path);this.#a=false}this.#c=undefined}_decryptData(t){const u=this.#t;if(!u){return typeof t==="string"?t:uint8ArrayToString(t)}const p=this.#r;const m=p==="aes-256-gcm"?16:0;const g=":".codePointAt(0);const y=typeof t==="string"?t.codePointAt(16):t[16];const v=g!==undefined&&y===g;if(!v){if(p==="aes-256-cbc"){return typeof t==="string"?t:uint8ArrayToString(t)}throw new Error("Failed to decrypt config data.")}const getEncryptedPayload=t=>{if(m===0){return{ciphertext:t}}const u=t.length-m;if(u<0){throw new Error("Invalid authentication tag length.")}return{ciphertext:t.slice(0,u),authenticationTag:t.slice(u)}};const b=t.slice(0,16);const w=t.slice(17);const E=typeof w==="string"?stringToUint8Array(w):w;const decrypt=t=>{const{ciphertext:m,authenticationTag:g}=getEncryptedPayload(E);const y=I.pbkdf2Sync(u,t,1e4,32,"sha512");const v=I.createDecipheriv(p,y,b);if(g){v.setAuthTag(g)}return uint8ArrayToString(concatUint8Arrays([v.update(m),v.final()]))};try{return decrypt(b)}catch{try{return decrypt(b.toString())}catch{}}if(p==="aes-256-cbc"){return typeof t==="string"?t:uint8ArrayToString(t)}throw new Error("Failed to decrypt config data.")}_handleStoreChange(t){let u=this.store;const onChange=()=>{const p=u;const m=this.store;if((0,C.isDeepStrictEqual)(m,p)){return}u=m;t.call(this,m,p)};this.events.addEventListener("change",onChange);return()=>{this.events.removeEventListener("change",onChange)}}_handleValueChange(t,u){let p=t();const onChange=()=>{const m=p;const g=t();if((0,C.isDeepStrictEqual)(g,m)){return}p=g;u.call(this,g,m)};this.events.addEventListener("change",onChange);return()=>{this.events.removeEventListener("change",onChange)}}_deserialize=t=>JSON.parse(t);_serialize=t=>JSON.stringify(t,undefined,"\t");_validate(t){if(!this.#e){return}const u=this.#e(t);if(u||!this.#e.errors){return}const p=this.#e.errors.map((({instancePath:t,message:u=""})=>`\`${t.slice(1)}\` ${u}`));throw new Error("Config schema violation: "+p.join("; "))}_ensureDirectory(){t.mkdirSync(u.dirname(this.path),{recursive:true})}_write(u){let p=this._serialize(u);const m=this.#t;if(m){const t=I.randomBytes(16);const u=I.pbkdf2Sync(m,t,1e4,32,"sha512");const g=I.createCipheriv(this.#r,u,t);const y=concatUint8Arrays([g.update(stringToUint8Array(p)),g.final()]);const v=[t,stringToUint8Array(":"),y];if(this.#r==="aes-256-gcm"){v.push(g.getAuthTag())}p=concatUint8Arrays(v)}if(k.env.SNAP){t.writeFileSync(this.path,p,{mode:this.#s.configFileMode})}else{try{writeFileSync(this.path,p,{mode:this.#s.configFileMode})}catch(u){if(u?.code==="EXDEV"){t.writeFileSync(this.path,p,{mode:this.#s.configFileMode});return}throw u}}}_watch(){this._ensureDirectory();if(!t.existsSync(this.path)){this._write(createPlainObject())}if(k.platform==="win32"||k.platform==="darwin"){this.#c??=Fe((()=>{this.events.dispatchEvent(new Event("change"))}),{wait:100});const p=u.dirname(this.path);const m=u.basename(this.path);this.#o=t.watch(p,{persistent:false,encoding:"utf8"},((t,u)=>{if(u&&u!==m){return}if(typeof this.#c==="function"){this.#c()}}))}else{this.#c??=Fe((()=>{this.events.dispatchEvent(new Event("change"))}),{wait:1e3});t.watchFile(this.path,{persistent:false},((t,u)=>{if(typeof this.#c==="function"){this.#c()}}));this.#a=true}}_migrate(t,u,p){let m=this._get(Je,"0.0.0");const g=Object.keys(t).filter((t=>this._shouldPerformMigration(t,m,u)));let y=structuredClone(this.store);for(const v of g){try{if(p){p(this,{fromVersion:m,toVersion:v,finalVersion:u,versions:g})}const b=t[v];b?.(this);this._set(Je,v);m=v;y=structuredClone(this.store)}catch(t){this.store=y;const u=t instanceof Error?t.message:String(t);throw new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${u}`)}}if(this._isVersionInRangeFormat(m)||!Ue.eq(m,u)){this._set(Je,u)}}_containsReservedKey(t){if(typeof t==="string"){return this._isReservedKeyPath(t)}if(!t||typeof t!=="object"){return false}return this._objectContainsReservedKey(t)}_objectContainsReservedKey(t){if(!t||typeof t!=="object"){return false}for(const[u,p]of Object.entries(t)){if(this._isReservedKeyPath(u)){return true}if(this._objectContainsReservedKey(p)){return true}}return false}_isReservedKeyPath(t){return t===Xe||t.startsWith(`${Xe}.`)}_isVersionInRangeFormat(t){return Ue.clean(t)===null}_shouldPerformMigration(t,u,p){if(this._isVersionInRangeFormat(t)){if(u!=="0.0.0"&&Ue.satisfies(u,t)){return false}return Ue.satisfies(p,t)}if(Ue.lte(t,u)){return false}if(Ue.gt(t,p)){return false}return true}_get(t,u){return getProperty(this.store,t,u)}_set(t,u){const{store:p}=this;setProperty(p,t,u);this.store=p}#l(t){const u={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:false,accessPropertiesByDotNotation:true,configFileMode:438,...t};u.encryptionAlgorithm??=Ye;if(!isSupportedEncryptionAlgorithm(u.encryptionAlgorithm)){throw new TypeError(`The \`encryptionAlgorithm\` option must be one of: ${[...Ze].join(", ")}`)}if(!u.cwd){if(!u.projectName){throw new Error("Please specify the `projectName` option.")}u.cwd=envPaths(u.projectName,{suffix:u.projectSuffix}).config}if(typeof u.fileExtension==="string"){u.fileExtension=u.fileExtension.replace(/^\.+/,"")}return u}#u(t){if(!(t.schema??t.ajvOptions??t.rootSchema)){return}if(t.schema&&typeof t.schema!=="object"){throw new TypeError("The `schema` option must be an object.")}const u=Le["default"];const p=new De.Ajv2020({allErrors:true,useDefaults:true,...t.ajvOptions});u(p);const m={...t.rootSchema,type:"object",properties:t.schema};this.#e=p.compile(m);this.#m(t.schema)}#m(t){const u=Object.entries(t??{});for(const[t,p]of u){if(!p||typeof p!=="object"){continue}if(!Object.hasOwn(p,"default")){continue}const{default:u}=p;if(u===undefined){continue}this.#i[t]=u}}#h(t){if(t.defaults){Object.assign(this.#i,t.defaults)}}#d(t){if(t.serialize){this._serialize=t.serialize}if(t.deserialize){this._deserialize=t.deserialize}}#f(t){const p=typeof t.fileExtension==="string"?t.fileExtension:undefined;const m=p?`.${p}`:"";return u.resolve(t.cwd,`${t.configName??"config"}${m}`)}#p(t){if(t.migrations){this.#g(t);this._validate(this.store);return}const u=this.store;const p=Object.assign(createPlainObject(),t.defaults??{},u);this._validate(p);try{N.deepEqual(u,p)}catch{this.store=p}}#g(t){const{migrations:u,projectVersion:p}=t;if(!u){return}if(!p){throw new Error("Please specify the `projectVersion` option.")}this.#n=true;try{const m=this.store;const g=Object.assign(createPlainObject(),t.defaults??{},m);try{N.deepEqual(m,g)}catch{this._write(g)}this._migrate(u,p,t.beforeEachMigration)}finally{this.#n=false}}}var Qe=__nccwpck_require__(9212);var et=__nccwpck_require__(6133);var tt=__nccwpck_require__.n(et);var rt=__nccwpck_require__(5059);var st=__nccwpck_require__.n(rt);var it=__nccwpck_require__(9642);var nt=__nccwpck_require__.n(it);const ot=require("node:stream/promises");var ct=__nccwpck_require__(4434);var ut=__nccwpck_require__(7515);const ht=require("node:string_decoder");var dt=__nccwpck_require__(6928);const ft=require("assert");var pt=__nccwpck_require__(181);const yt=require("zlib");var vt=__nccwpck_require__.t(yt,2);const _t=require("node:fs/promises");var bt=__nccwpck_require__.n(_t);var wt=Object.defineProperty;var Ar=(t,u)=>{for(var p in u)wt(t,p,{get:u[p],enumerable:!0})};var Et=typeof process=="object"&&process?process:{stdout:null,stderr:null},Cr=t=>!!t&&typeof t=="object"&&(t instanceof cr||t instanceof z||Fr(t)||kr(t)),Fr=t=>!!t&&typeof t=="object"&&t instanceof V.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==z.Writable.prototype.pipe,kr=t=>!!t&&typeof t=="object"&&t instanceof V.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function",St=Symbol("EOF"),$t=Symbol("maybeEmitEnd"),Ot=Symbol("emittedEnd"),Rt=Symbol("emittingEnd"),Pt=Symbol("emittedError"),At=Symbol("closed"),Ct=Symbol("read"),kt=Symbol("flush"),It=Symbol("flushChunk"),Nt=Symbol("encoding"),Dt=Symbol("decoder"),Mt=Symbol("flowing"),jt=Symbol("paused"),Ft=Symbol("resume"),Ut=Symbol("buffer"),Bt=Symbol("pipes"),Ht=Symbol("bufferLength"),Vt=Symbol("bufferPush"),zt=Symbol("bufferShift"),Gt=Symbol("objectMode"),qt=Symbol("destroyed"),Wt=Symbol("error"),Kt=Symbol("emitData"),Yt=Symbol("emitEnd"),Zt=Symbol("emitEnd2"),Xt=Symbol("async"),Jt=Symbol("abort"),Qt=Symbol("aborted"),er=Symbol("signal"),rr=Symbol("dataListeners"),sr=Symbol("discarded"),te=t=>Promise.resolve().then(t),vr=t=>t(),Mr=t=>t==="end"||t==="finish"||t==="prefinish",Br=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,Pr=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),ir=class{src;dest;opts;ondrain;constructor(t,u,p){this.src=t,this.dest=u,this.opts=p,this.ondrain=()=>t[Ft](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},nr=class extends ir{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,u,p){super(t,u,p),this.proxyErrors=t=>u.emit("error",t),t.on("error",this.proxyErrors)}},zr=t=>!!t.objectMode,Ur=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",cr=class extends V.EventEmitter{[Mt]=!1;[jt]=!1;[Bt]=[];[Ut]=[];[Gt];[Nt];[Xt];[Dt];[St]=!1;[Ot]=!1;[Rt]=!1;[At]=!1;[Pt]=null;[Ht]=0;[qt]=!1;[er];[Qt]=!1;[rr]=0;[sr]=!1;writable=!0;readable=!0;constructor(...t){let u=t[0]||{};if(super(),u.objectMode&&typeof u.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");zr(u)?(this[Gt]=!0,this[Nt]=null):Ur(u)?(this[Nt]=u.encoding,this[Gt]=!1):(this[Gt]=!1,this[Nt]=null),this[Xt]=!!u.async,this[Dt]=this[Nt]?new ht.StringDecoder(this[Nt]):null,u&&u.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[Ut]}),u&&u.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Bt]});let{signal:p}=u;p&&(this[er]=p,p.aborted?this[Jt]():p.addEventListener("abort",(()=>this[Jt]())))}get bufferLength(){return this[Ht]}get encoding(){return this[Nt]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Gt]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Xt]}set async(t){this[Xt]=this[Xt]||!!t}[Jt](){this[Qt]=!0,this.emit("abort",this[er]?.reason),this.destroy(this[er]?.reason)}get aborted(){return this[Qt]}set aborted(t){}write(t,u,p){if(this[Qt])return!1;if(this[St])throw new Error("write after end");if(this[qt])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof u=="function"&&(p=u,u="utf8"),u||(u="utf8");let m=this[Xt]?te:vr;if(!this[Gt]&&!Buffer.isBuffer(t)){if(Pr(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(Br(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[Gt]?(this[Mt]&&this[Ht]!==0&&this[kt](!0),this[Mt]?this.emit("data",t):this[Vt](t),this[Ht]!==0&&this.emit("readable"),p&&m(p),this[Mt]):t.length?(typeof t=="string"&&!(u===this[Nt]&&!this[Dt]?.lastNeed)&&(t=Buffer.from(t,u)),Buffer.isBuffer(t)&&this[Nt]&&(t=this[Dt].write(t)),this[Mt]&&this[Ht]!==0&&this[kt](!0),this[Mt]?this.emit("data",t):this[Vt](t),this[Ht]!==0&&this.emit("readable"),p&&m(p),this[Mt]):(this[Ht]!==0&&this.emit("readable"),p&&m(p),this[Mt])}read(t){if(this[qt])return null;if(this[sr]=!1,this[Ht]===0||t===0||t&&t>this[Ht])return this[$t](),null;this[Gt]&&(t=null),this[Ut].length>1&&!this[Gt]&&(this[Ut]=[this[Nt]?this[Ut].join(""):Buffer.concat(this[Ut],this[Ht])]);let u=this[Ct](t||null,this[Ut][0]);return this[$t](),u}[Ct](t,u){if(this[Gt])this[zt]();else{let p=u;t===p.length||t===null?this[zt]():typeof p=="string"?(this[Ut][0]=p.slice(t),u=p.slice(0,t),this[Ht]-=t):(this[Ut][0]=p.subarray(t),u=p.subarray(0,t),this[Ht]-=t)}return this.emit("data",u),!this[Ut].length&&!this[St]&&this.emit("drain"),u}end(t,u,p){return typeof t=="function"&&(p=t,t=void 0),typeof u=="function"&&(p=u,u="utf8"),t!==void 0&&this.write(t,u),p&&this.once("end",p),this[St]=!0,this.writable=!1,(this[Mt]||!this[jt])&&this[$t](),this}[Ft](){this[qt]||(!this[rr]&&!this[Bt].length&&(this[sr]=!0),this[jt]=!1,this[Mt]=!0,this.emit("resume"),this[Ut].length?this[kt]():this[St]?this[$t]():this.emit("drain"))}resume(){return this[Ft]()}pause(){this[Mt]=!1,this[jt]=!0,this[sr]=!1}get destroyed(){return this[qt]}get flowing(){return this[Mt]}get paused(){return this[jt]}[Vt](t){this[Gt]?this[Ht]+=1:this[Ht]+=t.length,this[Ut].push(t)}[zt](){return this[Gt]?this[Ht]-=1:this[Ht]-=this[Ut][0].length,this[Ut].shift()}[kt](t=!1){do{}while(this[It](this[zt]())&&this[Ut].length);!t&&!this[Ut].length&&!this[St]&&this.emit("drain")}[It](t){return this.emit("data",t),this[Mt]}pipe(t,u){if(this[qt])return t;this[sr]=!1;let p=this[Ot];return u=u||{},t===Et.stdout||t===Et.stderr?u.end=!1:u.end=u.end!==!1,u.proxyErrors=!!u.proxyErrors,p?u.end&&t.end():(this[Bt].push(u.proxyErrors?new nr(this,t,u):new ir(this,t,u)),this[Xt]?te((()=>this[Ft]())):this[Ft]()),t}unpipe(t){let u=this[Bt].find((u=>u.dest===t));u&&(this[Bt].length===1?(this[Mt]&&this[rr]===0&&(this[Mt]=!1),this[Bt]=[]):this[Bt].splice(this[Bt].indexOf(u),1),u.unpipe())}addListener(t,u){return this.on(t,u)}on(t,u){let p=super.on(t,u);if(t==="data")this[sr]=!1,this[rr]++,!this[Bt].length&&!this[Mt]&&this[Ft]();else if(t==="readable"&&this[Ht]!==0)super.emit("readable");else if(Mr(t)&&this[Ot])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[Pt]){let t=u;this[Xt]?te((()=>t.call(this,this[Pt]))):t.call(this,this[Pt])}return p}removeListener(t,u){return this.off(t,u)}off(t,u){let p=super.off(t,u);return t==="data"&&(this[rr]=this.listeners("data").length,this[rr]===0&&!this[sr]&&!this[Bt].length&&(this[Mt]=!1)),p}removeAllListeners(t){let u=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[rr]=0,!this[sr]&&!this[Bt].length&&(this[Mt]=!1)),u}get emittedEnd(){return this[Ot]}[$t](){!this[Rt]&&!this[Ot]&&!this[qt]&&this[Ut].length===0&&this[St]&&(this[Rt]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[At]&&this.emit("close"),this[Rt]=!1)}emit(t,...u){let p=u[0];if(t!=="error"&&t!=="close"&&t!==qt&&this[qt])return!1;if(t==="data")return!this[Gt]&&!p?!1:this[Xt]?(te((()=>this[Kt](p))),!0):this[Kt](p);if(t==="end")return this[Yt]();if(t==="close"){if(this[At]=!0,!this[Ot]&&!this[qt])return!1;let t=super.emit("close");return this.removeAllListeners("close"),t}else if(t==="error"){this[Pt]=p,super.emit(Wt,p);let t=!this[er]||this.listeners("error").length?super.emit("error",p):!1;return this[$t](),t}else if(t==="resume"){let t=super.emit("resume");return this[$t](),t}else if(t==="finish"||t==="prefinish"){let u=super.emit(t);return this.removeAllListeners(t),u}let m=super.emit(t,...u);return this[$t](),m}[Kt](t){for(let u of this[Bt])u.dest.write(t)===!1&&this.pause();let u=this[sr]?!1:super.emit("data",t);return this[$t](),u}[Yt](){return this[Ot]?!1:(this[Ot]=!0,this.readable=!1,this[Xt]?(te((()=>this[Zt]())),!0):this[Zt]())}[Zt](){if(this[Dt]){let t=this[Dt].end();if(t){for(let u of this[Bt])u.dest.write(t);this[sr]||super.emit("data",t)}}for(let t of this[Bt])t.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[Gt]||(t.dataLength=0);let u=this.promise();return this.on("data",(u=>{t.push(u),this[Gt]||(t.dataLength+=u.length)})),await u,t}async concat(){if(this[Gt])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[Nt]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise(((t,u)=>{this.on(qt,(()=>u(new Error("stream destroyed")))),this.on("error",(t=>u(t))),this.on("end",(()=>t()))}))}[Symbol.asyncIterator](){this[sr]=!1;let t=!1,e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();let u=this.read();if(u!==null)return Promise.resolve({done:!1,value:u});if(this[St])return e();let p,m,h=t=>{this.off("data",a),this.off("end",l),this.off(qt,c),e(),m(t)},a=t=>{this.off("error",h),this.off("end",l),this.off(qt,c),this.pause(),p({value:t,done:!!this[St]})},l=()=>{this.off("error",h),this.off("data",a),this.off(qt,c),e(),p({done:!0,value:void 0})},c=()=>h(new Error("stream destroyed"));return new Promise(((t,u)=>{m=u,p=t,this.once(qt,c),this.once("error",h),this.once("end",l),this.once("data",a)}))},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[sr]=!1;let t=!1,e=()=>(this.pause(),this.off(Wt,e),this.off(qt,e),this.off("end",e),t=!0,{done:!0,value:void 0}),i=()=>{if(t)return e();let u=this.read();return u===null?e():{done:!1,value:u}};return this.once("end",e),this.once(Wt,e),this.once(qt,e),{next:i,throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[qt])return t?this.emit("error",t):this.emit(qt),this;this[qt]=!0,this[sr]=!0,this[Ut].length=0,this[Ht]=0;let u=this;return typeof u.close=="function"&&!this[At]&&u.close(),t?this.emit("error",t):this.emit(qt),this}static get isStream(){return Cr}};var lr=ut.writev,mr=Symbol("_autoClose"),gr=Symbol("_close"),yr=Symbol("_ended"),_r=Symbol("_fd"),br=Symbol("_finished"),Er=Symbol("_flags"),Sr=Symbol("_flush"),Or=Symbol("_handleChunk"),Rr=Symbol("_makeBuf"),xr=Symbol("_mode"),Ir=Symbol("_needDrain"),Nr=Symbol("_onerror"),Dr=Symbol("_onopen"),Lr=Symbol("_onread"),Hr=Symbol("_onwrite"),Vr=Symbol("_open"),Gr=Symbol("_path"),Wr=Symbol("_pos"),Kr=Symbol("_queue"),Yr=Symbol("_read"),Xr=Symbol("_readSize"),es=Symbol("_reading"),ts=Symbol("_remain"),rs=Symbol("_size"),ss=Symbol("_write"),is=Symbol("_writing"),ns=Symbol("_defaultFlag"),os=Symbol("_errored"),as=class extends cr{[os]=!1;[_r];[Gr];[Xr];[es]=!1;[rs];[ts];[mr];constructor(t,u){if(u=u||{},super(u),this.readable=!0,this.writable=!1,typeof t!="string")throw new TypeError("path must be a string");this[os]=!1,this[_r]=typeof u.fd=="number"?u.fd:void 0,this[Gr]=t,this[Xr]=u.readSize||16*1024*1024,this[es]=!1,this[rs]=typeof u.size=="number"?u.size:1/0,this[ts]=this[rs],this[mr]=typeof u.autoClose=="boolean"?u.autoClose:!0,typeof this[_r]=="number"?this[Yr]():this[Vr]()}get fd(){return this[_r]}get path(){return this[Gr]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[Vr](){ut.open(this[Gr],"r",((t,u)=>this[Dr](t,u)))}[Dr](t,u){t?this[Nr](t):(this[_r]=u,this.emit("open",u),this[Yr]())}[Rr](){return Buffer.allocUnsafe(Math.min(this[Xr],this[ts]))}[Yr](){if(!this[es]){this[es]=!0;let t=this[Rr]();if(t.length===0)return process.nextTick((()=>this[Lr](null,0,t)));ut.read(this[_r],t,0,t.length,null,((t,u,p)=>this[Lr](t,u,p)))}}[Lr](t,u,p){this[es]=!1,t?this[Nr](t):this[Or](u,p)&&this[Yr]()}[gr](){if(this[mr]&&typeof this[_r]=="number"){let t=this[_r];this[_r]=void 0,ut.close(t,(t=>t?this.emit("error",t):this.emit("close")))}}[Nr](t){this[es]=!0,this[gr](),this.emit("error",t)}[Or](t,u){let p=!1;return this[ts]-=t,t>0&&(p=super.write(t<u.length?u.subarray(0,t):u)),(t===0||this[ts]<=0)&&(p=!1,this[gr](),super.end()),p}emit(t,...u){switch(t){case"prefinish":case"finish":return!1;case"drain":return typeof this[_r]=="number"&&this[Yr](),!1;case"error":return this[os]?!1:(this[os]=!0,super.emit(t,...u));default:return super.emit(t,...u)}}},ls=class extends as{[Vr](){let t=!0;try{this[Dr](null,ut.openSync(this[Gr],"r")),t=!1}finally{t&&this[gr]()}}[Yr](){let t=!0;try{if(!this[es]){this[es]=!0;do{let t=this[Rr](),u=t.length===0?0:ut.readSync(this[_r],t,0,t.length,null);if(!this[Or](u,t))break}while(!0);this[es]=!1}t=!1}finally{t&&this[gr]()}}[gr](){if(this[mr]&&typeof this[_r]=="number"){let t=this[_r];this[_r]=void 0,ut.closeSync(t),this.emit("close")}}},hs=class extends ct{readable=!1;writable=!0;[os]=!1;[is]=!1;[yr]=!1;[Kr]=[];[Ir]=!1;[Gr];[xr];[mr];[_r];[ns];[Er];[br]=!1;[Wr];constructor(t,u){u=u||{},super(u),this[Gr]=t,this[_r]=typeof u.fd=="number"?u.fd:void 0,this[xr]=u.mode===void 0?438:u.mode,this[Wr]=typeof u.start=="number"?u.start:void 0,this[mr]=typeof u.autoClose=="boolean"?u.autoClose:!0;let p=this[Wr]!==void 0?"r+":"w";this[ns]=u.flags===void 0,this[Er]=u.flags===void 0?p:u.flags,this[_r]===void 0&&this[Vr]()}emit(t,...u){if(t==="error"){if(this[os])return!1;this[os]=!0}return super.emit(t,...u)}get fd(){return this[_r]}get path(){return this[Gr]}[Nr](t){this[gr](),this[is]=!0,this.emit("error",t)}[Vr](){ut.open(this[Gr],this[Er],this[xr],((t,u)=>this[Dr](t,u)))}[Dr](t,u){this[ns]&&this[Er]==="r+"&&t&&t.code==="ENOENT"?(this[Er]="w",this[Vr]()):t?this[Nr](t):(this[_r]=u,this.emit("open",u),this[is]||this[Sr]())}end(t,u){return t&&this.write(t,u),this[yr]=!0,!this[is]&&!this[Kr].length&&typeof this[_r]=="number"&&this[Hr](null,0),this}write(t,u){return typeof t=="string"&&(t=Buffer.from(t,u)),this[yr]?(this.emit("error",new Error("write() after end()")),!1):this[_r]===void 0||this[is]||this[Kr].length?(this[Kr].push(t),this[Ir]=!0,!1):(this[is]=!0,this[ss](t),!0)}[ss](t){ut.write(this[_r],t,0,t.length,this[Wr],((t,u)=>this[Hr](t,u)))}[Hr](t,u){t?this[Nr](t):(this[Wr]!==void 0&&typeof u=="number"&&(this[Wr]+=u),this[Kr].length?this[Sr]():(this[is]=!1,this[yr]&&!this[br]?(this[br]=!0,this[gr](),this.emit("finish")):this[Ir]&&(this[Ir]=!1,this.emit("drain"))))}[Sr](){if(this[Kr].length===0)this[yr]&&this[Hr](null,0);else if(this[Kr].length===1)this[ss](this[Kr].pop());else{let t=this[Kr];this[Kr]=[],lr(this[_r],t,this[Wr],((t,u)=>this[Hr](t,u)))}}[gr](){if(this[mr]&&typeof this[_r]=="number"){let t=this[_r];this[_r]=void 0,ut.close(t,(t=>t?this.emit("error",t):this.emit("close")))}}},ps=class extends hs{[Vr](){let t;if(this[ns]&&this[Er]==="r+")try{t=ut.openSync(this[Gr],this[Er],this[xr])}catch(t){if(t?.code==="ENOENT")return this[Er]="w",this[Vr]();throw t}else t=ut.openSync(this[Gr],this[Er],this[xr]);this[Dr](null,t)}[gr](){if(this[mr]&&typeof this[_r]=="number"){let t=this[_r];this[_r]=void 0,ut.closeSync(t),this.emit("close")}}[ss](t){let u=!0;try{this[Hr](null,ut.writeSync(this[_r],t,0,t.length,this[Wr])),u=!1}finally{if(u)try{this[gr]()}catch{}}}};var ms=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"],["onentry","onReadEntry"]]),As=t=>!!t.sync&&!!t.file,Is=t=>!t.sync&&!!t.file,Cs=t=>!!t.sync&&!t.file,Fs=t=>!t.sync&&!t.file;var ks=t=>!!t.file;var Zr=t=>{let u=ms.get(t);return u||t},re=(t={})=>{if(!t)return{};let u={};for(let[p,m]of Object.entries(t)){let t=Zr(p);u[t]=m}return u.chmod===void 0&&u.noChmod===!1&&(u.chmod=!0),delete u.noChmod,u};var K=(t,u,p,m,g)=>Object.assign(((y=[],v,b)=>{Array.isArray(y)&&(v=y,y={}),typeof v=="function"&&(b=v,v=void 0),v?v=Array.from(v):v=[];let w=re(y);if(g?.(w,v),As(w)){if(typeof b=="function")throw new TypeError("callback not supported for sync tar functions");return t(w,v)}else if(Is(w)){let t=u(w,v),p=b||void 0;return p?t.then((()=>p()),p):t}else if(Cs(w)){if(typeof b=="function")throw new TypeError("callback not supported for sync tar functions");return p(w,v)}else if(Fs(w)){if(typeof b=="function")throw new TypeError("callback only supported with file option");return m(w,v)}else throw new Error("impossible options??")}),{syncFile:t,asyncFile:u,syncNoFile:p,asyncNoFile:m,validate:g});var gs=yt.constants||{ZLIB_VERNUM:4736},ys=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},gs));var vs=pt.Buffer.concat,_s=Object.getOwnPropertyDescriptor(pt.Buffer,"concat"),$r=t=>t,bs=_s?.writable===!0||_s?.set!==void 0?t=>{pt.Buffer.concat=t?$r:vs}:t=>{},ws=Symbol("_superWrite"),Es=class extends Error{code;errno;constructor(t,u){super("zlib: "+t.message,{cause:t}),this.code=t.code,this.errno=t.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+t.message,Error.captureStackTrace(this,u??this.constructor)}get name(){return"ZlibError"}},Ss=Symbol("flushFlag"),$s=class extends cr{#y=!1;#v=!1;#_;#b;#w;#E;#S;get sawError(){return this.#y}get handle(){return this.#E}get flushFlag(){return this.#_}constructor(t,u){if(!t||typeof t!="object")throw new TypeError("invalid options for ZlibBase constructor");if(super(t),this.#_=t.flush??0,this.#b=t.finishFlush??0,this.#w=t.fullFlushFlag??0,typeof vt[u]!="function")throw new TypeError("Compression method not supported: "+u);try{this.#E=new vt[u](t)}catch(t){throw new Es(t,this.constructor)}this.#S=t=>{this.#y||(this.#y=!0,this.close(),this.emit("error",t))},this.#E?.on("error",(t=>this.#S(new Es(t)))),this.once("end",(()=>this.close))}close(){this.#E&&(this.#E.close(),this.#E=void 0,this.emit("close"))}reset(){if(!this.#y)return ft(this.#E,"zlib binding closed"),this.#E.reset?.()}flush(t){this.ended||(typeof t!="number"&&(t=this.#w),this.write(Object.assign(pt.Buffer.alloc(0),{[Ss]:t})))}end(t,u,p){return typeof t=="function"&&(p=t,u=void 0,t=void 0),typeof u=="function"&&(p=u,u=void 0),t&&(u?this.write(t,u):this.write(t)),this.flush(this.#b),this.#v=!0,super.end(p)}get ended(){return this.#v}[ws](t){return super.write(t)}write(t,u,p){if(typeof u=="function"&&(p=u,u="utf8"),typeof t=="string"&&(t=pt.Buffer.from(t,u)),this.#y)return;ft(this.#E,"zlib binding closed");let m=this.#E._handle,g=m.close;m.close=()=>{};let y=this.#E.close;this.#E.close=()=>{},bs(!0);let v;try{let u=typeof t[Ss]=="number"?t[Ss]:this.#_;v=this.#E._processChunk(t,u),bs(!1)}catch(t){bs(!1),this.#S(new Es(t,this.write))}finally{this.#E&&(this.#E._handle=m,m.close=g,this.#E.close=y,this.#E.removeAllListeners("error"))}this.#E&&this.#E.on("error",(t=>this.#S(new Es(t,this.write))));let b;if(v)if(Array.isArray(v)&&v.length>0){let t=v[0];b=this[ws](pt.Buffer.from(t));for(let t=1;t<v.length;t++)b=this[ws](v[t])}else b=this[ws](pt.Buffer.from(v));return p&&p(),b}},Os=class extends $s{#y;#v;constructor(t,u){t=t||{},t.flush=t.flush||ys.Z_NO_FLUSH,t.finishFlush=t.finishFlush||ys.Z_FINISH,t.fullFlushFlag=ys.Z_FULL_FLUSH,super(t,u),this.#y=t.level,this.#v=t.strategy}params(t,u){if(!this.sawError){if(!this.handle)throw new Error("cannot switch params when binding is closed");if(!this.handle.params)throw new Error("not supported in this implementation");if(this.#y!==t||this.#v!==u){this.flush(ys.Z_SYNC_FLUSH),ft(this.handle,"zlib binding closed");let p=this.handle.flush;this.handle.flush=(t,u)=>{typeof t=="function"&&(u=t,t=this.flushFlag),this.flush(t),u?.()};try{this.handle.params(t,u)}finally{this.handle.flush=p}this.handle&&(this.#y=t,this.#v=u)}}}};var Rs=class extends Os{#y;constructor(t){super(t,"Gzip"),this.#y=t&&!!t.portable}[ws](t){return this.#y?(this.#y=!1,t[9]=255,super[ws](t)):super[ws](t)}};var xs=class extends Os{constructor(t){super(t,"Unzip")}},Ts=class extends $s{constructor(t,u){t=t||{},t.flush=t.flush||ys.BROTLI_OPERATION_PROCESS,t.finishFlush=t.finishFlush||ys.BROTLI_OPERATION_FINISH,t.fullFlushFlag=ys.BROTLI_OPERATION_FLUSH,super(t,u)}},Ns=class extends Ts{constructor(t){super(t,"BrotliCompress")}},Ds=class extends Ts{constructor(t){super(t,"BrotliDecompress")}},Ls=class extends $s{constructor(t,u){t=t||{},t.flush=t.flush||ys.ZSTD_e_continue,t.finishFlush=t.finishFlush||ys.ZSTD_e_end,t.fullFlushFlag=ys.ZSTD_e_flush,super(t,u)}},Ms=class extends Ls{constructor(t){super(t,"ZstdCompress")}},js=class extends Ls{constructor(t){super(t,"ZstdDecompress")}};var Bs=(t,u)=>{if(Number.isSafeInteger(t))t<0?jr(t,u):qr(t,u);else throw Error("cannot encode number outside of javascript safe integer range");return u},qr=(t,u)=>{u[0]=128;for(var p=u.length;p>1;p--)u[p-1]=t&255,t=Math.floor(t/256)},jr=(t,u)=>{u[0]=255;var p=!1;t=t*-1;for(var m=u.length;m>1;m--){var g=t&255;t=Math.floor(t/256),p?u[m-1]=zs(g):g===0?u[m-1]=0:(p=!0,u[m-1]=Us(g))}},Ps=t=>{let u=t[0],p=u===128?Jr(t.subarray(1,t.length)):u===255?Qr(t):null;if(p===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(p))throw Error("parsed number outside of javascript safe integer range");return p},Qr=t=>{for(var u=t.length,p=0,m=!1,g=u-1;g>-1;g--){var y=Number(t[g]),v;m?v=zs(y):y===0?v=y:(m=!0,v=Us(y)),v!==0&&(p-=v*Math.pow(256,u-g-1))}return p},Jr=t=>{for(var u=t.length,p=0,m=u-1;m>-1;m--){var g=Number(t[m]);g!==0&&(p+=g*Math.pow(256,u-m-1))}return p},zs=t=>(255^t)&255,Us=t=>(255^t)+1&255;var Hs={};Ar(Hs,{code:()=>qs,isCode:()=>oe,isName:()=>en,name:()=>Gs});var oe=t=>Gs.has(t),en=t=>qs.has(t),Gs=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),qs=new Map(Array.from(Gs).map((t=>[t[1],t[0]])));var Ws=class{cksumValid=!1;needPax=!1;nullBlock=!1;block;path;mode;uid;gid;size;cksum;#y="Unsupported";linkpath;uname;gname;devmaj=0;devmin=0;atime;ctime;mtime;charset;comment;constructor(t,u=0,p,m){Buffer.isBuffer(t)?this.decode(t,u||0,p,m):t&&this.#v(t)}decode(t,u,p,m){if(u||(u=0),!t||!(t.length>=u+512))throw new Error("need 512 bytes for header");this.path=p?.path??Tt(t,u,100),this.mode=p?.mode??m?.mode??at(t,u+100,8),this.uid=p?.uid??m?.uid??at(t,u+108,8),this.gid=p?.gid??m?.gid??at(t,u+116,8),this.size=p?.size??m?.size??at(t,u+124,12),this.mtime=p?.mtime??m?.mtime??Bi(t,u+136,12),this.cksum=at(t,u+148,12),m&&this.#v(m,!0),p&&this.#v(p);let g=Tt(t,u+156,1);if(oe(g)&&(this.#y=g||"0"),this.#y==="0"&&this.path.slice(-1)==="/"&&(this.#y="5"),this.#y==="5"&&(this.size=0),this.linkpath=Tt(t,u+157,100),t.subarray(u+257,u+265).toString()==="ustar\x0000")if(this.uname=p?.uname??m?.uname??Tt(t,u+265,32),this.gname=p?.gname??m?.gname??Tt(t,u+297,32),this.devmaj=p?.devmaj??m?.devmaj??at(t,u+329,8)??0,this.devmin=p?.devmin??m?.devmin??at(t,u+337,8)??0,t[u+475]!==0){let p=Tt(t,u+345,155);this.path=p+"/"+this.path}else{let g=Tt(t,u+345,130);g&&(this.path=g+"/"+this.path),this.atime=p?.atime??m?.atime??Bi(t,u+476,12),this.ctime=p?.ctime??m?.ctime??Bi(t,u+488,12)}let y=256;for(let p=u;p<u+148;p++)y+=t[p];for(let p=u+156;p<u+512;p++)y+=t[p];this.cksumValid=y===this.cksum,this.cksum===void 0&&y===256&&(this.nullBlock=!0)}#v(t,u=!1){Object.assign(this,Object.fromEntries(Object.entries(t).filter((([t,p])=>!(p==null||t==="path"&&u||t==="linkpath"&&u||t==="global")))))}encode(t,u=0){if(t||(t=this.block=Buffer.alloc(512)),this.#y==="Unsupported"&&(this.#y="0"),!(t.length>=u+512))throw new Error("need 512 bytes for header");let p=this.ctime||this.atime?130:155,m=sn(this.path||"",p),g=m[0],y=m[1];this.needPax=!!m[2],this.needPax=xt(t,u,100,g)||this.needPax,this.needPax=lt(t,u+100,8,this.mode)||this.needPax,this.needPax=lt(t,u+108,8,this.uid)||this.needPax,this.needPax=lt(t,u+116,8,this.gid)||this.needPax,this.needPax=lt(t,u+124,12,this.size)||this.needPax,this.needPax=Pi(t,u+136,12,this.mtime)||this.needPax,t[u+156]=this.#y.charCodeAt(0),this.needPax=xt(t,u+157,100,this.linkpath)||this.needPax,t.write("ustar\x0000",u+257,8),this.needPax=xt(t,u+265,32,this.uname)||this.needPax,this.needPax=xt(t,u+297,32,this.gname)||this.needPax,this.needPax=lt(t,u+329,8,this.devmaj)||this.needPax,this.needPax=lt(t,u+337,8,this.devmin)||this.needPax,this.needPax=xt(t,u+345,p,y)||this.needPax,t[u+475]!==0?this.needPax=xt(t,u+345,155,y)||this.needPax:(this.needPax=xt(t,u+345,130,y)||this.needPax,this.needPax=Pi(t,u+476,12,this.atime)||this.needPax,this.needPax=Pi(t,u+488,12,this.ctime)||this.needPax);let v=256;for(let p=u;p<u+148;p++)v+=t[p];for(let p=u+156;p<u+512;p++)v+=t[p];return this.cksum=v,lt(t,u+148,8,this.cksum),this.cksumValid=!0,this.needPax}get type(){return this.#y==="Unsupported"?this.#y:Gs.get(this.#y)}get typeKey(){return this.#y}set type(t){let u=String(qs.get(t));if(oe(u)||u==="Unsupported")this.#y=u;else if(oe(t))this.#y=t;else throw new TypeError("invalid entry type: "+t)}},sn=(t,p)=>{let m=t,g="",y,v=u.posix.parse(t).root||".";if(Buffer.byteLength(m)<100)y=[m,g,!1];else{g=u.posix.dirname(m),m=u.posix.basename(m);do{Buffer.byteLength(m)<=100&&Buffer.byteLength(g)<=p?y=[m,g,!1]:Buffer.byteLength(m)>100&&Buffer.byteLength(g)<=p?y=[m.slice(0,99),g,!0]:(m=u.posix.join(u.posix.basename(g),m),g=u.posix.dirname(g))}while(g!==v&&y===void 0);y||(y=[t.slice(0,99),"",!0])}return y},Tt=(t,u,p)=>t.subarray(u,u+p).toString("utf8").replace(/\0.*/,""),Bi=(t,u,p)=>rn(at(t,u,p)),rn=t=>t===void 0?void 0:new Date(t*1e3),at=(t,u,p)=>Number(t[u])&128?Ps(t.subarray(u,u+p)):on(t,u,p),nn=t=>isNaN(t)?void 0:t,on=(t,u,p)=>nn(parseInt(t.subarray(u,u+p).toString("utf8").replace(/\0.*$/,"").trim(),8)),Ks={12:8589934591,8:2097151},lt=(t,u,p,m)=>m===void 0?!1:m>Ks[p]||m<0?(Bs(m,t.subarray(u,u+p)),!0):(an(t,u,p,m),!1),an=(t,u,p,m)=>t.write(ln(m,p),u,p,"ascii"),ln=(t,u)=>cn(Math.floor(t).toString(8),u),cn=(t,u)=>(t.length===u-1?t:new Array(u-t.length-1).join("0")+t+" ")+"\0",Pi=(t,u,p,m)=>m===void 0?!1:lt(t,u,p,m.getTime()/1e3),Ys=new Array(156).join("\0"),xt=(t,u,p,m)=>m===void 0?!1:(t.write(m+Ys,u,p,"utf8"),m.length!==Buffer.byteLength(m)||m.length>p);var Zs=class s{atime;mtime;ctime;charset;comment;gid;uid;gname;uname;linkpath;dev;ino;nlink;path;size;mode;global;constructor(t,u=!1){this.atime=t.atime,this.charset=t.charset,this.comment=t.comment,this.ctime=t.ctime,this.dev=t.dev,this.gid=t.gid,this.global=u,this.gname=t.gname,this.ino=t.ino,this.linkpath=t.linkpath,this.mtime=t.mtime,this.nlink=t.nlink,this.path=t.path,this.size=t.size,this.uid=t.uid,this.uname=t.uname}encode(){let t=this.encodeBody();if(t==="")return Buffer.allocUnsafe(0);let p=Buffer.byteLength(t),m=512*Math.ceil(1+p/512),g=Buffer.allocUnsafe(m);for(let t=0;t<512;t++)g[t]=0;new Ws({path:("PaxHeader/"+(0,u.basename)(this.path??"")).slice(0,99),mode:this.mode||420,uid:this.uid,gid:this.gid,size:p,mtime:this.mtime,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime,ctime:this.ctime}).encode(g),g.write(t,512,p,"utf8");for(let t=p+512;t<g.length;t++)g[t]=0;return g}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(t){if(this[t]===void 0)return"";let u=this[t],p=u instanceof Date?u.getTime()/1e3:u,m=" "+(t==="dev"||t==="ino"||t==="nlink"?"SCHILY.":"")+t+"="+p+`\n`,g=Buffer.byteLength(m),y=Math.floor(Math.log(g)/Math.log(10))+1;return g+y>=Math.pow(10,y)&&(y+=1),y+g+m}static parse(t,u,p=!1){return new s(un(mn(t),u),p)}},un=(t,u)=>u?Object.assign({},u,t):t,mn=t=>t.replace(/\n$/,"").split(`\n`).reduce(pn,Object.create(null)),pn=(t,u)=>{let p=parseInt(u,10);if(p!==Buffer.byteLength(u)+1)return t;u=u.slice((p+" ").length);let m=u.split("="),g=m.shift();if(!g)return t;let y=g.replace(/^SCHILY\.(dev|ino|nlink)/,"$1"),v=m.join("=");return t[y]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(y)?new Date(Number(v)*1e3):/^[0-9]+$/.test(v)?+v:v,t};var Xs=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Js=Xs!=="win32"?t=>t:t=>t&&t.replace(/\\/g,"/");var Qs=class extends cr{extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=!1;ignore=!1;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=!1;absolute;unsupported=!1;constructor(t,u,p){switch(super({}),this.pause(),this.extended=u,this.globalExtended=p,this.header=t,this.remain=t.size??0,this.startBlockSize=512*Math.ceil(this.remain/512),this.blockRemain=this.startBlockSize,this.type=t.type,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}if(!t.path)throw new Error("no path provided for tar.ReadEntry");this.path=Js(t.path),this.mode=t.mode,this.mode&&(this.mode=this.mode&4095),this.uid=t.uid,this.gid=t.gid,this.uname=t.uname,this.gname=t.gname,this.size=this.remain,this.mtime=t.mtime,this.atime=t.atime,this.ctime=t.ctime,this.linkpath=t.linkpath?Js(t.linkpath):void 0,this.uname=t.uname,this.gname=t.gname,u&&this.#y(u),p&&this.#y(p,!0)}write(t){let u=t.length;if(u>this.blockRemain)throw new Error("writing more to entry than is appropriate");let p=this.remain,m=this.blockRemain;return this.remain=Math.max(0,p-u),this.blockRemain=Math.max(0,m-u),this.ignore?!0:p>=u?super.write(t):super.write(t.subarray(0,p))}#y(t,u=!1){t.path&&(t.path=Js(t.path)),t.linkpath&&(t.linkpath=Js(t.linkpath)),Object.assign(this,Object.fromEntries(Object.entries(t).filter((([t,p])=>!(p==null||t==="path"&&u)))))}};var Lt=(t,u,p,m={})=>{t.file&&(m.file=t.file),t.cwd&&(m.cwd=t.cwd),m.code=p instanceof Error&&p.code||u,m.tarCode=u,!t.strict&&m.recoverable!==!1?(p instanceof Error&&(m=Object.assign(p,m),p=p.message),t.emit("warn",u,p,m)):p instanceof Error?t.emit("error",Object.assign(p,m)):t.emit("error",Object.assign(new Error(`${u}: ${p}`),m))};var ei=1024*1024,ti=Buffer.from([31,139]),ri=Buffer.from([40,181,47,253]),si=Math.max(ti.length,ri.length),ii=Symbol("state"),ni=Symbol("writeEntry"),oi=Symbol("readEntry"),ai=Symbol("nextEntry"),ci=Symbol("processEntry"),li=Symbol("extendedHeader"),ui=Symbol("globalExtendedHeader"),hi=Symbol("meta"),fi=Symbol("emitMeta"),pi=Symbol("buffer"),mi=Symbol("queue"),gi=Symbol("ended"),yi=Symbol("emittedEnd"),vi=Symbol("emit"),_i=Symbol("unzip"),bi=Symbol("consumeChunk"),wi=Symbol("consumeChunkSub"),Ei=Symbol("consumeBody"),Si=Symbol("consumeMeta"),Oi=Symbol("consumeHeader"),Ri=Symbol("consuming"),Ai=Symbol("bufferConcat"),xi=Symbol("maybeEnd"),Ti=Symbol("writing"),Ci=Symbol("aborted"),ki=Symbol("onDone"),Ii=Symbol("sawValidEntry"),Ni=Symbol("sawNullBlock"),Di=Symbol("sawEOF"),Li=Symbol("closeStream"),Rn=()=>!0,Mi=class extends ct.EventEmitter{file;strict;maxMetaEntrySize;filter;brotli;zstd;writable=!0;readable=!1;[mi]=[];[pi];[oi];[ni];[ii]="begin";[hi]="";[li];[ui];[gi]=!1;[_i];[Ci]=!1;[Ii];[Ni]=!1;[Di]=!1;[Ti]=!1;[Ri]=!1;[yi]=!1;constructor(t={}){super(),this.file=t.file||"",this.on(ki,(()=>{(this[ii]==="begin"||this[Ii]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")})),t.ondone?this.on(ki,t.ondone):this.on(ki,(()=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")})),this.strict=!!t.strict,this.maxMetaEntrySize=t.maxMetaEntrySize||ei,this.filter=typeof t.filter=="function"?t.filter:Rn;let u=t.file&&(t.file.endsWith(".tar.br")||t.file.endsWith(".tbr"));this.brotli=!(t.gzip||t.zstd)&&t.brotli!==void 0?t.brotli:u?void 0:!1;let p=t.file&&(t.file.endsWith(".tar.zst")||t.file.endsWith(".tzst"));this.zstd=!(t.gzip||t.brotli)&&t.zstd!==void 0?t.zstd:p?!0:void 0,this.on("end",(()=>this[Li]())),typeof t.onwarn=="function"&&this.on("warn",t.onwarn),typeof t.onReadEntry=="function"&&this.on("entry",t.onReadEntry)}warn(t,u,p={}){Lt(this,t,u,p)}[Oi](t,u){this[Ii]===void 0&&(this[Ii]=!1);let p;try{p=new Ws(t,u,this[li],this[ui])}catch(t){return this.warn("TAR_ENTRY_INVALID",t)}if(p.nullBlock)this[Ni]?(this[Di]=!0,this[ii]==="begin"&&(this[ii]="header"),this[vi]("eof")):(this[Ni]=!0,this[vi]("nullBlock"));else if(this[Ni]=!1,!p.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:p});else if(!p.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:p});else{let t=p.type;if(/^(Symbolic)?Link$/.test(t)&&!p.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:p});else if(!/^(Symbolic)?Link$/.test(t)&&!/^(Global)?ExtendedHeader$/.test(t)&&p.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:p});else{let t=this[ni]=new Qs(p,this[li],this[ui]);if(!this[Ii])if(t.remain){let o=()=>{t.invalid||(this[Ii]=!0)};t.on("end",o)}else this[Ii]=!0;t.meta?t.size>this.maxMetaEntrySize?(t.ignore=!0,this[vi]("ignoredEntry",t),this[ii]="ignore",t.resume()):t.size>0&&(this[hi]="",t.on("data",(t=>this[hi]+=t)),this[ii]="meta"):(this[li]=void 0,t.ignore=t.ignore||!this.filter(t.path,t),t.ignore?(this[vi]("ignoredEntry",t),this[ii]=t.remain?"ignore":"header",t.resume()):(t.remain?this[ii]="body":(this[ii]="header",t.end()),this[oi]?this[mi].push(t):(this[mi].push(t),this[ai]())))}}}[Li](){queueMicrotask((()=>this.emit("close")))}[ci](t){let u=!0;if(!t)this[oi]=void 0,u=!1;else if(Array.isArray(t)){let[u,...p]=t;this.emit(u,...p)}else this[oi]=t,this.emit("entry",t),t.emittedEnd||(t.on("end",(()=>this[ai]())),u=!1);return u}[ai](){do{}while(this[ci](this[mi].shift()));if(!this[mi].length){let t=this[oi];!t||t.flowing||t.size===t.remain?this[Ti]||this.emit("drain"):t.once("drain",(()=>this.emit("drain")))}}[Ei](t,u){let p=this[ni];if(!p)throw new Error("attempt to consume body without entry??");let m=p.blockRemain??0,g=m>=t.length&&u===0?t:t.subarray(u,u+m);return p.write(g),p.blockRemain||(this[ii]="header",this[ni]=void 0,p.end()),g.length}[Si](t,u){let p=this[ni],m=this[Ei](t,u);return!this[ni]&&p&&this[fi](p),m}[vi](t,u,p){!this[mi].length&&!this[oi]?this.emit(t,u,p):this[mi].push([t,u,p])}[fi](t){switch(this[vi]("meta",this[hi]),t.type){case"ExtendedHeader":case"OldExtendedHeader":this[li]=Zs.parse(this[hi],this[li],!1);break;case"GlobalExtendedHeader":this[ui]=Zs.parse(this[hi],this[ui],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":{let t=this[li]??Object.create(null);this[li]=t,t.path=this[hi].replace(/\0.*/,"");break}case"NextFileHasLongLinkpath":{let t=this[li]||Object.create(null);this[li]=t,t.linkpath=this[hi].replace(/\0.*/,"");break}default:throw new Error("unknown meta: "+t.type)}}abort(t){this[Ci]=!0,this.emit("abort",t),this.warn("TAR_ABORT",t,{recoverable:!1})}write(t,u,p){if(typeof u=="function"&&(p=u,u=void 0),typeof t=="string"&&(t=Buffer.from(t,typeof u=="string"?u:"utf8")),this[Ci])return p?.(),!1;if((this[_i]===void 0||this.brotli===void 0&&this[_i]===!1)&&t){if(this[pi]&&(t=Buffer.concat([this[pi],t]),this[pi]=void 0),t.length<si)return this[pi]=t,p?.(),!0;for(let u=0;this[_i]===void 0&&u<ti.length;u++)t[u]!==ti[u]&&(this[_i]=!1);let u=!1;if(this[_i]===!1&&this.zstd!==!1){u=!0;for(let p=0;p<ri.length;p++)if(t[p]!==ri[p]){u=!1;break}}let m=this.brotli===void 0&&!u;if(this[_i]===!1&&m)if(t.length<512)if(this[gi])this.brotli=!0;else return this[pi]=t,p?.(),!0;else try{new Ws(t.subarray(0,512)),this.brotli=!1}catch{this.brotli=!0}if(this[_i]===void 0||this[_i]===!1&&(this.brotli||u)){let m=this[gi];this[gi]=!1,this[_i]=this[_i]===void 0?new xs({}):u?new js({}):new Ds({}),this[_i].on("data",(t=>this[bi](t))),this[_i].on("error",(t=>this.abort(t))),this[_i].on("end",(()=>{this[gi]=!0,this[bi]()})),this[Ti]=!0;let g=!!this[_i][m?"end":"write"](t);return this[Ti]=!1,p?.(),g}}this[Ti]=!0,this[_i]?this[_i].write(t):this[bi](t),this[Ti]=!1;let m=this[mi].length?!1:this[oi]?this[oi].flowing:!0;return!m&&!this[mi].length&&this[oi]?.once("drain",(()=>this.emit("drain"))),p?.(),m}[Ai](t){t&&!this[Ci]&&(this[pi]=this[pi]?Buffer.concat([this[pi],t]):t)}[xi](){if(this[gi]&&!this[yi]&&!this[Ci]&&!this[Ri]){this[yi]=!0;let t=this[ni];if(t&&t.blockRemain){let u=this[pi]?this[pi].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${t.blockRemain} more bytes, only ${u} available)`,{entry:t}),this[pi]&&t.write(this[pi]),t.end()}this[vi](ki)}}[bi](t){if(this[Ri]&&t)this[Ai](t);else if(!t&&!this[pi])this[xi]();else if(t){if(this[Ri]=!0,this[pi]){this[Ai](t);let u=this[pi];this[pi]=void 0,this[wi](u)}else this[wi](t);for(;this[pi]&&this[pi]?.length>=512&&!this[Ci]&&!this[Di];){let t=this[pi];this[pi]=void 0,this[wi](t)}this[Ri]=!1}(!this[pi]||this[gi])&&this[xi]()}[wi](t){let u=0,p=t.length;for(;u+512<=p&&!this[Ci]&&!this[Di];)switch(this[ii]){case"begin":case"header":this[Oi](t,u),u+=512;break;case"ignore":case"body":u+=this[Ei](t,u);break;case"meta":u+=this[Si](t,u);break;default:throw new Error("invalid state: "+this[ii])}u<p&&(this[pi]?this[pi]=Buffer.concat([t.subarray(u),this[pi]]):this[pi]=t.subarray(u))}end(t,u,p){return typeof t=="function"&&(p=t,u=void 0,t=void 0),typeof u=="function"&&(p=u,u=void 0),typeof t=="string"&&(t=Buffer.from(t,u)),p&&this.once("finish",p),this[Ci]||(this[_i]?(t&&this[_i].write(t),this[_i].end()):(this[gi]=!0,(this.brotli===void 0||this.zstd===void 0)&&(t=t||Buffer.alloc(0)),t&&this.write(t),this[xi]())),this}};var mt=t=>{let u=t.length-1,p=-1;for(;u>-1&&t.charAt(u)==="/";)p=u,u--;return p===-1?t:t.slice(0,p)};var _n=t=>{let u=t.onReadEntry;t.onReadEntry=u?t=>{u(t),t.resume()}:t=>t.resume()},Yi=(t,u)=>{let p=new Map(u.map((t=>[mt(t),!0]))),m=t.filter,r=(t,u="")=>{let m=u||(0,dt.parse)(t).root||".",g;if(t===m)g=!1;else{let u=p.get(t);u!==void 0?g=u:g=r((0,dt.dirname)(t),m)}return p.set(t,g),g};t.filter=m?(t,u)=>m(t,u)&&r(mt(t)):t=>r(mt(t))},On=u=>{let p=new Mi(u),m=u.file,g;try{g=t.openSync(m,"r");let y=t.fstatSync(g),v=u.maxReadSize||16*1024*1024;if(y.size<v){let u=Buffer.allocUnsafe(y.size),m=t.readSync(g,u,0,y.size,0);p.end(m===u.byteLength?u:u.subarray(0,m))}else{let u=0,m=Buffer.allocUnsafe(v);for(;u<y.size;){let y=t.readSync(g,m,0,v,u);if(y===0)break;u+=y,p.write(m.subarray(0,y))}p.end()}}finally{if(typeof g=="number")try{t.closeSync(g)}catch{}}},Tn=(u,p)=>{let m=new Mi(u),g=u.maxReadSize||16*1024*1024,y=u.file;return new Promise(((u,p)=>{m.on("error",p),m.on("end",u),t.stat(y,((t,u)=>{if(t)p(t);else{let t=new as(y,{readSize:g,size:u.size});t.on("error",p),t.pipe(m)}}))}))},ji=K(On,Tn,(t=>new Mi(t)),(t=>new Mi(t)),((t,u)=>{u?.length&&Yi(t,u),t.noResume||_n(t)}));var Ki=(t,u,p)=>(t&=4095,p&&(t=(t|384)&-19),u&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t);var{isAbsolute:Fi,parse:Ui}=u.win32,ce=t=>{let u="",p=Ui(t);for(;Fi(t)||p.root;){let m=t.charAt(0)==="/"&&t.slice(0,4)!=="//?/"?"/":p.root;t=t.slice(m.length),u+=m,p=Ui(t)}return[u,t]};var Hi=["|","<",">","?",":"],Vi=Hi.map((t=>String.fromCharCode(61440+t.charCodeAt(0)))),zi=new Map(Hi.map(((t,u)=>[t,Vi[u]]))),Gi=new Map(Vi.map(((t,u)=>[t,Hi[u]]))),$i=t=>Hi.reduce(((t,u)=>t.split(u).join(zi.get(u))),t),Vs=t=>Vi.reduce(((t,u)=>t.split(u).join(Gi.get(u))),t);var tr=(t,u)=>u?(t=Js(t).replace(/^\.(\/|$)/,""),mt(u)+"/"+t):Js(t),qi=16*1024*1024,Wi=Symbol("process"),Zi=Symbol("file"),Xi=Symbol("directory"),Ji=Symbol("symlink"),Qi=Symbol("hardlink"),tn=Symbol("header"),hn=Symbol("read"),dn=Symbol("lstat"),fn=Symbol("onlstat"),gn=Symbol("onread"),yn=Symbol("onreadlink"),bn=Symbol("openfile"),wn=Symbol("onopenfile"),En=Symbol("close"),Sn=Symbol("mode"),An=Symbol("awaitDrain"),xn=Symbol("ondrain"),Nn=Symbol("prefix"),Dn=class extends cr{path;portable;myuid=process.getuid&&process.getuid()||0;myuser=process.env.USER||"";maxReadSize;linkCache;statCache;preservePaths;cwd;strict;mtime;noPax;noMtime;prefix;fd;blockLen=0;blockRemain=0;buf;pos=0;remain=0;length=0;offset=0;win32;absolute;header;type;linkpath;stat;onWriteEntry;#y=!1;constructor(t,u={}){let p=re(u);super(),this.path=Js(t),this.portable=!!p.portable,this.maxReadSize=p.maxReadSize||qi,this.linkCache=p.linkCache||new Map,this.statCache=p.statCache||new Map,this.preservePaths=!!p.preservePaths,this.cwd=Js(p.cwd||process.cwd()),this.strict=!!p.strict,this.noPax=!!p.noPax,this.noMtime=!!p.noMtime,this.mtime=p.mtime,this.prefix=p.prefix?Js(p.prefix):void 0,this.onWriteEntry=p.onWriteEntry,typeof p.onwarn=="function"&&this.on("warn",p.onwarn);let m=!1;if(!this.preservePaths){let[t,u]=ce(this.path);t&&typeof u=="string"&&(this.path=u,m=t)}this.win32=!!p.win32||process.platform==="win32",this.win32&&(this.path=Vs(this.path.replace(/\\/g,"/")),t=t.replace(/\\/g,"/")),this.absolute=Js(p.absolute||dt.resolve(this.cwd,t)),this.path===""&&(this.path="./"),m&&this.warn("TAR_ENTRY_INFO",`stripping ${m} from absolute path`,{entry:this,path:m+this.path});let g=this.statCache.get(this.absolute);g?this[fn](g):this[dn]()}warn(t,u,p={}){return Lt(this,t,u,p)}emit(t,...u){return t==="error"&&(this.#y=!0),super.emit(t,...u)}[dn](){ut.lstat(this.absolute,((t,u)=>{if(t)return this.emit("error",t);this[fn](u)}))}[fn](t){this.statCache.set(this.absolute,t),this.stat=t,t.isFile()||(t.size=0),this.type=In(t),this.emit("stat",t),this[Wi]()}[Wi](){switch(this.type){case"File":return this[Zi]();case"Directory":return this[Xi]();case"SymbolicLink":return this[Ji]();default:return this.end()}}[Sn](t){return Ki(t,this.type==="Directory",this.portable)}[Nn](t){return tr(t,this.prefix)}[tn](){if(!this.stat)throw new Error("cannot write header before stat");this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.onWriteEntry?.(this),this.header=new Ws({path:this[Nn](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[Nn](this.linkpath):this.linkpath,mode:this[Sn](this.stat.mode),uid:this.portable?void 0:this.stat.uid,gid:this.portable?void 0:this.stat.gid,size:this.stat.size,mtime:this.noMtime?void 0:this.mtime||this.stat.mtime,type:this.type==="Unsupported"?void 0:this.type,uname:this.portable?void 0:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?void 0:this.stat.atime,ctime:this.portable?void 0:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new Zs({atime:this.portable?void 0:this.header.atime,ctime:this.portable?void 0:this.header.ctime,gid:this.portable?void 0:this.header.gid,mtime:this.noMtime?void 0:this.mtime||this.header.mtime,path:this[Nn](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[Nn](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?void 0:this.header.uid,uname:this.portable?void 0:this.header.uname,dev:this.portable?void 0:this.stat.dev,ino:this.portable?void 0:this.stat.ino,nlink:this.portable?void 0:this.stat.nlink}).encode());let t=this.header?.block;if(!t)throw new Error("failed to encode header");super.write(t)}[Xi](){if(!this.stat)throw new Error("cannot create directory entry without stat");this.path.slice(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[tn](),this.end()}[Ji](){ut.readlink(this.absolute,((t,u)=>{if(t)return this.emit("error",t);this[yn](u)}))}[yn](t){this.linkpath=Js(t),this[tn](),this.end()}[Qi](t){if(!this.stat)throw new Error("cannot create link entry without stat");this.type="Link",this.linkpath=Js(dt.relative(this.cwd,t)),this.stat.size=0,this[tn](),this.end()}[Zi](){if(!this.stat)throw new Error("cannot create file entry without stat");if(this.stat.nlink>1){let t=`${this.stat.dev}:${this.stat.ino}`,u=this.linkCache.get(t);if(u?.indexOf(this.cwd)===0)return this[Qi](u);this.linkCache.set(t,this.absolute)}if(this[tn](),this.stat.size===0)return this.end();this[bn]()}[bn](){ut.open(this.absolute,"r",((t,u)=>{if(t)return this.emit("error",t);this[wn](u)}))}[wn](t){if(this.fd=t,this.#y)return this[En]();if(!this.stat)throw new Error("should stat before calling onopenfile");this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let u=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(u),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[hn]()}[hn](){let{fd:t,buf:u,offset:p,length:m,pos:g}=this;if(t===void 0||u===void 0)throw new Error("cannot read file without first opening");ut.read(t,u,p,m,g,((t,u)=>{if(t)return this[En]((()=>this.emit("error",t)));this[gn](u)}))}[En](t=()=>{}){this.fd!==void 0&&ut.close(this.fd,t)}[gn](t){if(t<=0&&this.remain>0){let t=Object.assign(new Error("encountered unexpected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[En]((()=>this.emit("error",t)))}if(t>this.remain){let t=Object.assign(new Error("did not encounter expected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[En]((()=>this.emit("error",t)))}if(!this.buf)throw new Error("should have created buffer prior to reading");if(t===this.remain)for(let u=t;u<this.length&&t<this.blockRemain;u++)this.buf[u+this.offset]=0,t++,this.remain++;let u=this.offset===0&&t===this.buf.length?this.buf:this.buf.subarray(this.offset,this.offset+t);this.write(u)?this[xn]():this[An]((()=>this[xn]()))}[An](t){this.once("drain",t)}write(t,u,p){if(typeof u=="function"&&(p=u,u=void 0),typeof t=="string"&&(t=Buffer.from(t,typeof u=="string"?u:"utf8")),this.blockRemain<t.length){let t=Object.assign(new Error("writing more data than expected"),{path:this.absolute});return this.emit("error",t)}return this.remain-=t.length,this.blockRemain-=t.length,this.pos+=t.length,this.offset+=t.length,super.write(t,null,p)}[xn](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[En]((t=>t?this.emit("error",t):this.end()));if(!this.buf)throw new Error("buffer lost somehow in ONDRAIN");this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[hn]()}},Ln=class extends Dn{sync=!0;[dn](){this[fn](ut.lstatSync(this.absolute))}[Ji](){this[yn](ut.readlinkSync(this.absolute))}[bn](){this[wn](ut.openSync(this.absolute,"r"))}[hn](){let t=!0;try{let{fd:u,buf:p,offset:m,length:g,pos:y}=this;if(u===void 0||p===void 0)throw new Error("fd and buf must be set in READ method");let v=ut.readSync(u,p,m,g,y);this[gn](v),t=!1}finally{if(t)try{this[En]((()=>{}))}catch{}}}[An](t){t()}[En](t=()=>{}){this.fd!==void 0&&ut.closeSync(this.fd),t()}},Un=class extends cr{blockLen=0;blockRemain=0;buf=0;pos=0;remain=0;length=0;preservePaths;portable;strict;noPax;noMtime;readEntry;type;prefix;path;mode;uid;gid;uname;gname;header;mtime;atime;ctime;linkpath;size;onWriteEntry;warn(t,u,p={}){return Lt(this,t,u,p)}constructor(t,u={}){let p=re(u);super(),this.preservePaths=!!p.preservePaths,this.portable=!!p.portable,this.strict=!!p.strict,this.noPax=!!p.noPax,this.noMtime=!!p.noMtime,this.onWriteEntry=p.onWriteEntry,this.readEntry=t;let{type:m}=t;if(m==="Unsupported")throw new Error("writing entry that should be ignored");this.type=m,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=p.prefix,this.path=Js(t.path),this.mode=t.mode!==void 0?this[Sn](t.mode):void 0,this.uid=this.portable?void 0:t.uid,this.gid=this.portable?void 0:t.gid,this.uname=this.portable?void 0:t.uname,this.gname=this.portable?void 0:t.gname,this.size=t.size,this.mtime=this.noMtime?void 0:p.mtime||t.mtime,this.atime=this.portable?void 0:t.atime,this.ctime=this.portable?void 0:t.ctime,this.linkpath=t.linkpath!==void 0?Js(t.linkpath):void 0,typeof p.onwarn=="function"&&this.on("warn",p.onwarn);let g=!1;if(!this.preservePaths){let[t,u]=ce(this.path);t&&typeof u=="string"&&(this.path=u,g=t)}this.remain=t.size,this.blockRemain=t.startBlockSize,this.onWriteEntry?.(this),this.header=new Ws({path:this[Nn](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[Nn](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?void 0:this.uid,gid:this.portable?void 0:this.gid,size:this.size,mtime:this.noMtime?void 0:this.mtime,type:this.type,uname:this.portable?void 0:this.uname,atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime}),g&&this.warn("TAR_ENTRY_INFO",`stripping ${g} from absolute path`,{entry:this,path:g+this.path}),this.header.encode()&&!this.noPax&&super.write(new Zs({atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime,gid:this.portable?void 0:this.gid,mtime:this.noMtime?void 0:this.mtime,path:this[Nn](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[Nn](this.linkpath):this.linkpath,size:this.size,uid:this.portable?void 0:this.uid,uname:this.portable?void 0:this.uname,dev:this.portable?void 0:this.readEntry.dev,ino:this.portable?void 0:this.readEntry.ino,nlink:this.portable?void 0:this.readEntry.nlink}).encode());let y=this.header?.block;if(!y)throw new Error("failed to encode header");super.write(y),t.pipe(this)}[Nn](t){return tr(t,this.prefix)}[Sn](t){return Ki(t,this.type==="Directory",this.portable)}write(t,u,p){typeof u=="function"&&(p=u,u=void 0),typeof t=="string"&&(t=Buffer.from(t,typeof u=="string"?u:"utf8"));let m=t.length;if(m>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=m,super.write(t,p)}end(t,u,p){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),typeof t=="function"&&(p=t,u=void 0,t=void 0),typeof u=="function"&&(p=u,u=void 0),typeof t=="string"&&(t=Buffer.from(t,u??"utf8")),p&&this.once("finish",p),t?super.end(t,p):super.end(p),this}},In=t=>t.isFile()?"File":t.isDirectory()?"Directory":t.isSymbolicLink()?"SymbolicLink":"Unsupported";var Hn=class s{tail;head;length=0;static create(t=[]){return new s(t)}constructor(t=[]){for(let u of t)this.push(u)}*[Symbol.iterator](){for(let t=this.head;t;t=t.next)yield t.value}removeNode(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");let u=t.next,p=t.prev;return u&&(u.prev=p),p&&(p.next=u),t===this.head&&(this.head=u),t===this.tail&&(this.tail=p),this.length--,t.next=void 0,t.prev=void 0,t.list=void 0,u}unshiftNode(t){if(t===this.head)return;t.list&&t.list.removeNode(t);let u=this.head;t.list=this,t.next=u,u&&(u.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}pushNode(t){if(t===this.tail)return;t.list&&t.list.removeNode(t);let u=this.tail;t.list=this,t.prev=u,u&&(u.next=t),this.tail=t,this.head||(this.head=t),this.length++}push(...t){for(let u=0,p=t.length;u<p;u++)Fn(this,t[u]);return this.length}unshift(...t){for(var u=0,p=t.length;u<p;u++)kn(this,t[u]);return this.length}pop(){if(!this.tail)return;let t=this.tail.value,u=this.tail;return this.tail=this.tail.prev,this.tail?this.tail.next=void 0:this.head=void 0,u.list=void 0,this.length--,t}shift(){if(!this.head)return;let t=this.head.value,u=this.head;return this.head=this.head.next,this.head?this.head.prev=void 0:this.tail=void 0,u.list=void 0,this.length--,t}forEach(t,u){u=u||this;for(let p=this.head,m=0;p;m++)t.call(u,p.value,m,this),p=p.next}forEachReverse(t,u){u=u||this;for(let p=this.tail,m=this.length-1;p;m--)t.call(u,p.value,m,this),p=p.prev}get(t){let u=0,p=this.head;for(;p&&u<t;u++)p=p.next;if(u===t&&p)return p.value}getReverse(t){let u=0,p=this.tail;for(;p&&u<t;u++)p=p.prev;if(u===t&&p)return p.value}map(t,u){u=u||this;let p=new s;for(let m=this.head;m;)p.push(t.call(u,m.value,this)),m=m.next;return p}mapReverse(t,u){u=u||this;var p=new s;for(let m=this.tail;m;)p.push(t.call(u,m.value,this)),m=m.prev;return p}reduce(t,u){let p,m=this.head;if(arguments.length>1)p=u;else if(this.head)m=this.head.next,p=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var g=0;m;g++)p=t(p,m.value,g),m=m.next;return p}reduceReverse(t,u){let p,m=this.tail;if(arguments.length>1)p=u;else if(this.tail)m=this.tail.prev,p=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(let u=this.length-1;m;u--)p=t(p,m.value,u),m=m.prev;return p}toArray(){let t=new Array(this.length);for(let u=0,p=this.head;p;u++)t[u]=p.value,p=p.next;return t}toArrayReverse(){let t=new Array(this.length);for(let u=0,p=this.tail;p;u++)t[u]=p.value,p=p.prev;return t}slice(t=0,u=this.length){u<0&&(u+=this.length),t<0&&(t+=this.length);let p=new s;if(u<t||u<0)return p;t<0&&(t=0),u>this.length&&(u=this.length);let m=this.head,g=0;for(g=0;m&&g<t;g++)m=m.next;for(;m&&g<u;g++,m=m.next)p.push(m.value);return p}sliceReverse(t=0,u=this.length){u<0&&(u+=this.length),t<0&&(t+=this.length);let p=new s;if(u<t||u<0)return p;t<0&&(t=0),u>this.length&&(u=this.length);let m=this.length,g=this.tail;for(;g&&m>u;m--)g=g.prev;for(;g&&m>t;m--,g=g.prev)p.push(g.value);return p}splice(t,u=0,...p){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);let m=this.head;for(let u=0;m&&u<t;u++)m=m.next;let g=[];for(let t=0;m&&t<u;t++)g.push(m.value),m=this.removeNode(m);m?m!==this.tail&&(m=m.prev):m=this.tail;for(let t of p)m=Cn(this,m,t);return g}reverse(){let t=this.head,u=this.tail;for(let u=t;u;u=u.prev){let t=u.prev;u.prev=u.next,u.next=t}return this.head=u,this.tail=t,this}};function Cn(t,u,p){let m=u,g=u?u.next:t.head,y=new Vn(p,m,g,t);return y.next===void 0&&(t.tail=y),y.prev===void 0&&(t.head=y),t.length++,y}function Fn(t,u){t.tail=new Vn(u,t.tail,void 0,t),t.head||(t.head=t.tail),t.length++}function kn(t,u){t.head=new Vn(u,void 0,t.head,t),t.tail||(t.tail=t.head),t.length++}var Vn=class{list;next;prev;value;constructor(t,u,p,m){this.list=m,this.value=t,u?(u.next=this,this.prev=u):this.prev=void 0,p?(p.prev=this,this.next=p):this.next=void 0}};var zn=class{path;absolute;entry;stat;readdir;pending=!1;ignore=!1;piped=!1;constructor(t,u){this.path=t||"./",this.absolute=u}},Gn=Buffer.alloc(1024),qn=Symbol("onStat"),Wn=Symbol("ended"),Kn=Symbol("queue"),Yn=Symbol("current"),Zn=Symbol("process"),Jn=Symbol("processing"),to=Symbol("processJob"),ro=Symbol("jobs"),so=Symbol("jobDone"),io=Symbol("addFSEntry"),lo=Symbol("addTarEntry"),go=Symbol("stat"),yo=Symbol("readdir"),vo=Symbol("onreaddir"),_o=Symbol("pipe"),bo=Symbol("entry"),Eo=Symbol("entryOpt"),So=Symbol("writeEntryClass"),$o=Symbol("write"),Oo=Symbol("ondrain"),Ro=class extends cr{sync=!1;opt;cwd;maxReadSize;preservePaths;strict;noPax;prefix;linkCache;statCache;file;portable;zip;readdirCache;noDirRecurse;follow;noMtime;mtime;filter;jobs;[So];onWriteEntry;[Kn];[ro]=0;[Jn]=!1;[Wn]=!1;constructor(t={}){if(super(),this.opt=t,this.file=t.file||"",this.cwd=t.cwd||process.cwd(),this.maxReadSize=t.maxReadSize,this.preservePaths=!!t.preservePaths,this.strict=!!t.strict,this.noPax=!!t.noPax,this.prefix=Js(t.prefix||""),this.linkCache=t.linkCache||new Map,this.statCache=t.statCache||new Map,this.readdirCache=t.readdirCache||new Map,this.onWriteEntry=t.onWriteEntry,this[So]=Dn,typeof t.onwarn=="function"&&this.on("warn",t.onwarn),this.portable=!!t.portable,t.gzip||t.brotli||t.zstd){if((t.gzip?1:0)+(t.brotli?1:0)+(t.zstd?1:0)>1)throw new TypeError("gzip, brotli, zstd are mutually exclusive");if(t.gzip&&(typeof t.gzip!="object"&&(t.gzip={}),this.portable&&(t.gzip.portable=!0),this.zip=new Rs(t.gzip)),t.brotli&&(typeof t.brotli!="object"&&(t.brotli={}),this.zip=new Ns(t.brotli)),t.zstd&&(typeof t.zstd!="object"&&(t.zstd={}),this.zip=new Ms(t.zstd)),!this.zip)throw new Error("impossible");let u=this.zip;u.on("data",(t=>super.write(t))),u.on("end",(()=>super.end())),u.on("drain",(()=>this[Oo]())),this.on("resume",(()=>u.resume()))}else this.on("drain",this[Oo]);this.noDirRecurse=!!t.noDirRecurse,this.follow=!!t.follow,this.noMtime=!!t.noMtime,t.mtime&&(this.mtime=t.mtime),this.filter=typeof t.filter=="function"?t.filter:()=>!0,this[Kn]=new Hn,this[ro]=0,this.jobs=Number(t.jobs)||4,this[Jn]=!1,this[Wn]=!1}[$o](t){return super.write(t)}add(t){return this.write(t),this}end(t,u,p){return typeof t=="function"&&(p=t,t=void 0),typeof u=="function"&&(p=u,u=void 0),t&&this.add(t),this[Wn]=!0,this[Zn](),p&&p(),this}write(t){if(this[Wn])throw new Error("write after end");return t instanceof Qs?this[lo](t):this[io](t),this.flowing}[lo](t){let u=Js(dt.resolve(this.cwd,t.path));if(!this.filter(t.path,t))t.resume();else{let p=new zn(t.path,u);p.entry=new Un(t,this[Eo](p)),p.entry.on("end",(()=>this[so](p))),this[ro]+=1,this[Kn].push(p)}this[Zn]()}[io](t){let u=Js(dt.resolve(this.cwd,t));this[Kn].push(new zn(t,u)),this[Zn]()}[go](t){t.pending=!0,this[ro]+=1;let u=this.follow?"stat":"lstat";ut[u](t.absolute,((u,p)=>{t.pending=!1,this[ro]-=1,u?this.emit("error",u):this[qn](t,p)}))}[qn](t,u){this.statCache.set(t.absolute,u),t.stat=u,this.filter(t.path,u)?u.isFile()&&u.nlink>1&&t===this[Yn]&&!this.linkCache.get(`${u.dev}:${u.ino}`)&&!this.sync&&this[to](t):t.ignore=!0,this[Zn]()}[yo](t){t.pending=!0,this[ro]+=1,ut.readdir(t.absolute,((u,p)=>{if(t.pending=!1,this[ro]-=1,u)return this.emit("error",u);this[vo](t,p)}))}[vo](t,u){this.readdirCache.set(t.absolute,u),t.readdir=u,this[Zn]()}[Zn](){if(!this[Jn]){this[Jn]=!0;for(let t=this[Kn].head;t&&this[ro]<this.jobs;t=t.next)if(this[to](t.value),t.value.ignore){let u=t.next;this[Kn].removeNode(t),t.next=u}this[Jn]=!1,this[Wn]&&!this[Kn].length&&this[ro]===0&&(this.zip?this.zip.end(Gn):(super.write(Gn),super.end()))}}get[Yn](){return this[Kn]&&this[Kn].head&&this[Kn].head.value}[so](t){this[Kn].shift(),this[ro]-=1,this[Zn]()}[to](t){if(!t.pending){if(t.entry){t===this[Yn]&&!t.piped&&this[_o](t);return}if(!t.stat){let u=this.statCache.get(t.absolute);u?this[qn](t,u):this[go](t)}if(t.stat&&!t.ignore){if(!this.noDirRecurse&&t.stat.isDirectory()&&!t.readdir){let u=this.readdirCache.get(t.absolute);if(u?this[vo](t,u):this[yo](t),!t.readdir)return}if(t.entry=this[bo](t),!t.entry){t.ignore=!0;return}t===this[Yn]&&!t.piped&&this[_o](t)}}}[Eo](t){return{onwarn:(t,u,p)=>this.warn(t,u,p),noPax:this.noPax,cwd:this.cwd,absolute:t.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix,onWriteEntry:this.onWriteEntry}}[bo](t){this[ro]+=1;try{return new this[So](t.path,this[Eo](t)).on("end",(()=>this[so](t))).on("error",(t=>this.emit("error",t)))}catch(t){this.emit("error",t)}}[Oo](){this[Yn]&&this[Yn].entry&&this[Yn].entry.resume()}[_o](t){t.piped=!0,t.readdir&&t.readdir.forEach((u=>{let p=t.path,m=p==="./"?"":p.replace(/\/*$/,"/");this[io](m+u)}));let u=t.entry,p=this.zip;if(!u)throw new Error("cannot pipe without source");p?u.on("data",(t=>{p.write(t)||u.pause()})):u.on("data",(t=>{super.write(t)||u.pause()}))}pause(){return this.zip&&this.zip.pause(),super.pause()}warn(t,u,p={}){Lt(this,t,u,p)}},Po=class extends Ro{sync=!0;constructor(t){super(t),this[So]=Ln}pause(){}resume(){}[go](t){let u=this.follow?"statSync":"lstatSync";this[qn](t,ut[u](t.absolute))}[yo](t){this[vo](t,ut.readdirSync(t.absolute))}[_o](t){let u=t.entry,p=this.zip;if(t.readdir&&t.readdir.forEach((u=>{let p=t.path,m=p==="./"?"":p.replace(/\/*$/,"/");this[io](m+u)})),!u)throw new Error("Cannot pipe without source");p?u.on("data",(t=>{p.write(t)})):u.on("data",(t=>{super[$o](t)}))}};var vn=(t,u)=>{let p=new Po(t),m=new ps(t.file,{mode:t.mode||438});p.pipe(m),hr(p,u)},Mn=(t,u)=>{let p=new Ro(t),m=new hs(t.file,{mode:t.mode||438});p.pipe(m);let g=new Promise(((t,u)=>{m.on("error",u),m.on("close",t),p.on("error",u)}));return ar(p,u),g},hr=(t,p)=>{p.forEach((p=>{p.charAt(0)==="@"?ji({file:u.resolve(t.cwd,p.slice(1)),sync:!0,noResume:!0,onReadEntry:u=>t.add(u)}):t.add(p)})),t.end()},ar=async(t,p)=>{for(let m=0;m<p.length;m++){let g=String(p[m]);g.charAt(0)==="@"?await ji({file:u.resolve(String(t.cwd),g.slice(1)),noResume:!0,onReadEntry:u=>{t.add(u)}}):t.add(g)}t.end()},Bn=(t,u)=>{let p=new Po(t);return hr(p,u),p},Pn=(t,u)=>{let p=new Ro(t);return ar(p,u),p},Ao=K(vn,Mn,Bn,Pn,((t,u)=>{if(!u?.length)throw new TypeError("no paths specified to add to archive")}));var xo=process.env.__FAKE_PLATFORM__||process.platform,To=xo==="win32",{O_CREAT:Co,O_TRUNC:ko,O_WRONLY:Io}=ut.constants,No=Number(process.env.__FAKE_FS_O_FILENAME__)||ut.constants.UV_FS_O_FILEMAP||0,Do=To&&!!No,Lo=512*1024,Mo=No|ko|Co|Io,jo=Do?t=>t<Lo?Mo:"w":()=>"w";var cs=(u,p,m)=>{try{return t.lchownSync(u,p,m)}catch(t){if(t?.code!=="ENOENT")throw t}},di=(u,p,m,g)=>{t.lchown(u,p,m,(t=>{g(t&&t?.code!=="ENOENT"?t:null)}))},$n=(t,p,m,g,y)=>{if(p.isDirectory())index_min_fs(u.resolve(t,p.name),m,g,(v=>{if(v)return y(v);let b=u.resolve(t,p.name);di(b,m,g,y)}));else{let v=u.resolve(t,p.name);di(v,m,g,y)}},index_min_fs=(u,p,m,g)=>{t.readdir(u,{withFileTypes:!0},((t,y)=>{if(t){if(t.code==="ENOENT")return g();if(t.code!=="ENOTDIR"&&t.code!=="ENOTSUP")return g(t)}if(t||!y.length)return di(u,p,m,g);let v=y.length,b=null,a=t=>{if(!b){if(t)return g(b=t);if(--v===0)return di(u,p,m,g)}};for(let t of y)$n(u,t,p,m,a)}))},Xn=(t,p,m,g)=>{p.isDirectory()&&ds(u.resolve(t,p.name),m,g),cs(u.resolve(t,p.name),m,g)},ds=(u,p,m)=>{let g;try{g=t.readdirSync(u,{withFileTypes:!0})}catch(t){let g=t;if(g?.code==="ENOENT")return;if(g?.code==="ENOTDIR"||g?.code==="ENOTSUP")return cs(u,p,m);throw g}for(let t of g)Xn(u,t,p,m);return cs(u,p,m)};var Fo=class extends Error{path;code;syscall="chdir";constructor(t,u){super(`${u}: Cannot cd into '${t}'`),this.path=t,this.code=u}get name(){return"CwdError"}};var Uo=class extends Error{path;symlink;syscall="symlink";code="TAR_SYMLINK_ERROR";constructor(t,u){super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link"),this.symlink=t,this.path=u}get name(){return"SymlinkError"}};var jn=(u,p)=>{t.stat(u,((t,m)=>{(t||!m.isDirectory())&&(t=new Fo(u,t?.code||"ENOTDIR")),p(t)}))},fr=(p,m,g)=>{p=Js(p);let y=m.umask??18,v=m.mode|448,b=(v&y)!==0,w=m.uid,E=m.gid,$=typeof w=="number"&&typeof E=="number"&&(w!==m.processUid||E!==m.processGid),O=m.preserve,R=m.unlink,P=Js(m.cwd),S=(u,m)=>{u?g(u):m&&$?index_min_fs(m,w,E,(t=>S(t))):b?t.chmod(p,v,g):g()};if(p===P)return jn(p,S);if(O)return _t.mkdir(p,{mode:v,recursive:!0}).then((t=>S(null,t??void 0)),S);let A=Js(u.relative(P,p)).split("/");us(P,A,v,R,P,void 0,S)},us=(p,m,g,y,v,b,w)=>{if(!m.length)return w(null,b);let E=m.shift(),$=Js(u.resolve(p+"/"+E));t.mkdir($,g,dr($,m,g,y,v,b,w))},dr=(u,p,m,g,y,v,b)=>w=>{w?t.lstat(u,((E,$)=>{if(E)E.path=E.path&&Js(E.path),b(E);else if($.isDirectory())us(u,p,m,g,y,v,b);else if(g)t.unlink(u,(w=>{if(w)return b(w);t.mkdir(u,m,dr(u,p,m,g,y,v,b))}));else{if($.isSymbolicLink())return b(new Uo(u,u+"/"+p.join("/")));b(w)}})):(v=v||u,us(u,p,m,g,y,v,b))},Qn=u=>{let p=!1,m;try{p=t.statSync(u).isDirectory()}catch(t){m=t?.code}finally{if(!p)throw new Fo(u,m??"ENOTDIR")}},ur=(p,m)=>{p=Js(p);let g=m.umask??18,y=m.mode|448,v=(y&g)!==0,b=m.uid,w=m.gid,E=typeof b=="number"&&typeof w=="number"&&(b!==m.processUid||w!==m.processGid),$=m.preserve,O=m.unlink,R=Js(m.cwd),d=u=>{u&&E&&ds(u,b,w),v&&t.chmodSync(p,y)};if(p===R)return Qn(R),d();if($)return d(t.mkdirSync(p,{mode:y,recursive:!0})??void 0);let P=Js(u.relative(R,p)).split("/"),A;for(let p=P.shift(),m=R;p&&(m+="/"+p);p=P.shift()){m=Js(u.resolve(m));try{t.mkdirSync(m,y),A=A||m}catch{let u=t.lstatSync(m);if(u.isDirectory())continue;if(O){t.unlinkSync(m),t.mkdirSync(m,y),A=A||m;continue}else if(u.isSymbolicLink())return new Uo(m,m+"/"+P.join("/"))}}return d(A)};var Bo=Object.create(null),Ho=1e4,Vo=new Set,pr=t=>{Vo.has(t)?Vo.delete(t):Bo[t]=t.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"),Vo.add(t);let u=Bo[t],p=Vo.size-Ho;if(p>Ho/10){for(let t of Vo)if(Vo.delete(t),delete Bo[t],--p<=0)break}return u};var zo=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Go=zo==="win32",eo=t=>t.split("/").slice(0,-1).reduce(((t,p)=>{let m=t[t.length-1];return m!==void 0&&(p=(0,u.join)(m,p)),t.push(p||"/"),t}),[]),qo=class{#y=new Map;#v=new Map;#_=new Set;reserve(t,p){t=Go?["win32 parallelization disabled"]:t.map((t=>mt((0,u.join)(pr(t)))));let m=new Set(t.map((t=>eo(t))).reduce(((t,u)=>t.concat(u))));this.#v.set(p,{dirs:m,paths:t});for(let u of t){let t=this.#y.get(u);t?t.push(p):this.#y.set(u,[p])}for(let t of m){let u=this.#y.get(t);if(!u)this.#y.set(t,[new Set([p])]);else{let t=u[u.length-1];t instanceof Set?t.add(p):u.push(new Set([p]))}}return this.#w(p)}#b(t){let u=this.#v.get(t);if(!u)throw new Error("function does not have any path reservations");return{paths:u.paths.map((t=>this.#y.get(t))),dirs:[...u.dirs].map((t=>this.#y.get(t)))}}check(t){let{paths:u,dirs:p}=this.#b(t);return u.every((u=>u&&u[0]===t))&&p.every((u=>u&&u[0]instanceof Set&&u[0].has(t)))}#w(t){return this.#_.has(t)||!this.check(t)?!1:(this.#_.add(t),t((()=>this.#E(t))),!0)}#E(t){if(!this.#_.has(t))return!1;let u=this.#v.get(t);if(!u)throw new Error("invalid reservation");let{paths:p,dirs:m}=u,g=new Set;for(let u of p){let p=this.#y.get(u);if(!p||p?.[0]!==t)continue;let m=p[1];if(!m){this.#y.delete(u);continue}if(p.shift(),typeof m=="function")g.add(m);else for(let t of m)g.add(t)}for(let u of m){let p=this.#y.get(u),m=p?.[0];if(!(!p||!(m instanceof Set)))if(m.size===1&&p.length===1){this.#y.delete(u);continue}else if(m.size===1){p.shift();let t=p[0];typeof t=="function"&&g.add(t)}else m.delete(t)}return this.#_.delete(t),g.forEach((t=>this.#w(t))),!0}};var wr=()=>process.umask();var Wo=Symbol("onEntry"),Ko=Symbol("checkFs"),Yo=Symbol("checkFs2"),Zo=Symbol("isReusable"),Xo=Symbol("makeFs"),Jo=Symbol("file"),Qo=Symbol("directory"),ea=Symbol("link"),ta=Symbol("symlink"),ra=Symbol("hardlink"),sa=Symbol("ensureNoSymlink"),ia=Symbol("unsupported"),na=Symbol("checkPath"),oa=Symbol("stripAbsolutePath"),aa=Symbol("mkdir"),ca=Symbol("onError"),la=Symbol("pending"),ua=Symbol("pend"),ha=Symbol("unpend"),da=Symbol("ended"),fa=Symbol("maybeClose"),pa=Symbol("skip"),ma=Symbol("doChown"),ga=Symbol("uid"),ya=Symbol("gid"),va=Symbol("checkedCwd"),_a=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,ba=_a==="win32",wa=1024,no=(u,p)=>{if(!ba)return t.unlink(u,p);let m=u+".DELETE."+(0,I.randomBytes)(16).toString("hex");t.rename(u,m,(u=>{if(u)return p(u);t.unlink(m,p)}))},oo=u=>{if(!ba)return t.unlinkSync(u);let p=u+".DELETE."+(0,I.randomBytes)(16).toString("hex");t.renameSync(u,p),t.unlinkSync(p)},Tr=(t,u,p)=>t!==void 0&&t===t>>>0?t:u!==void 0&&u===u>>>0?u:p,Ea=class extends Mi{[da]=!1;[va]=!1;[la]=0;reservations=new qo;transform;writable=!0;readable=!1;uid;gid;setOwner;preserveOwner;processGid;processUid;maxDepth;forceChown;win32;newer;keep;noMtime;preservePaths;unlink;cwd;strip;processUmask;umask;dmode;fmode;chmod;constructor(t={}){if(t.ondone=()=>{this[da]=!0,this[fa]()},super(t),this.transform=t.transform,this.chmod=!!t.chmod,typeof t.uid=="number"||typeof t.gid=="number"){if(typeof t.uid!="number"||typeof t.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(t.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=t.uid,this.gid=t.gid,this.setOwner=!0}else this.uid=void 0,this.gid=void 0,this.setOwner=!1;t.preserveOwner===void 0&&typeof t.uid!="number"?this.preserveOwner=!!(process.getuid&&process.getuid()===0):this.preserveOwner=!!t.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():void 0,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():void 0,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:wa,this.forceChown=t.forceChown===!0,this.win32=!!t.win32||ba,this.newer=!!t.newer,this.keep=!!t.keep,this.noMtime=!!t.noMtime,this.preservePaths=!!t.preservePaths,this.unlink=!!t.unlink,this.cwd=Js(u.resolve(t.cwd||process.cwd())),this.strip=Number(t.strip)||0,this.processUmask=this.chmod?typeof t.processUmask=="number"?t.processUmask:wr():0,this.umask=typeof t.umask=="number"?t.umask:this.processUmask,this.dmode=t.dmode||511&~this.umask,this.fmode=t.fmode||438&~this.umask,this.on("entry",(t=>this[Wo](t)))}warn(t,u,p={}){return(t==="TAR_BAD_ARCHIVE"||t==="TAR_ABORT")&&(p.recoverable=!1),super.warn(t,u,p)}[fa](){this[da]&&this[la]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[oa](t,p){let m=t[p],{type:g}=t;if(!m||this.preservePaths)return!0;let y=m.split("/");if(y.includes("..")||ba&&/^[a-z]:\.\.$/i.test(y[0]??"")){if(p==="path"||g==="Link")return this.warn("TAR_ENTRY_ERROR",`${p} contains '..'`,{entry:t,[p]:m}),!1;{let g=u.posix.dirname(t.path),y=u.posix.normalize(u.posix.join(g,m));if(y.startsWith("../")||y==="..")return this.warn("TAR_ENTRY_ERROR",`${p} escapes extraction directory`,{entry:t,[p]:m}),!1}}let[v,b]=ce(m);return v&&(t[p]=String(b),this.warn("TAR_ENTRY_INFO",`stripping ${v} from absolute ${p}`,{entry:t,[p]:m})),!0}[na](t){let p=Js(t.path),m=p.split("/");if(this.strip){if(m.length<this.strip)return!1;if(t.type==="Link"){let u=Js(String(t.linkpath)).split("/");if(u.length>=this.strip)t.linkpath=u.slice(this.strip).join("/");else return!1}m.splice(0,this.strip),t.path=m.join("/")}if(isFinite(this.maxDepth)&&m.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:t,path:p,depth:m.length,maxDepth:this.maxDepth}),!1;if(!this[oa](t,"path")||!this[oa](t,"linkpath"))return!1;if(u.isAbsolute(t.path)?t.absolute=Js(u.resolve(t.path)):t.absolute=Js(u.resolve(this.cwd,t.path)),!this.preservePaths&&typeof t.absolute=="string"&&t.absolute.indexOf(this.cwd+"/")!==0&&t.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:t,path:Js(t.path),resolvedPath:t.absolute,cwd:this.cwd}),!1;if(t.absolute===this.cwd&&t.type!=="Directory"&&t.type!=="GNUDumpDir")return!1;if(this.win32){let{root:p}=u.win32.parse(String(t.absolute));t.absolute=p+$i(String(t.absolute).slice(p.length));let{root:m}=u.win32.parse(t.path);t.path=m+$i(t.path.slice(m.length))}return!0}[Wo](t){if(!this[na](t))return t.resume();switch(N.equal(typeof t.absolute,"string"),t.type){case"Directory":case"GNUDumpDir":t.mode&&(t.mode=t.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[Ko](t);default:return this[ia](t)}}[ca](t,u){t.name==="CwdError"?this.emit("error",t):(this.warn("TAR_ENTRY_ERROR",t,{entry:u}),this[ha](),u.resume())}[aa](t,u,p){fr(Js(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:u},p)}[ma](t){return this.forceChown||this.preserveOwner&&(typeof t.uid=="number"&&t.uid!==this.processUid||typeof t.gid=="number"&&t.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[ga](t){return Tr(this.uid,t.uid,this.processUid)}[ya](t){return Tr(this.gid,t.gid,this.processGid)}[Jo](u,p){let m=typeof u.mode=="number"?u.mode&4095:this.fmode,g=new hs(String(u.absolute),{flags:jo(u.size),mode:m,autoClose:!1});g.on("error",(m=>{g.fd&&t.close(g.fd,(()=>{})),g.write=()=>!0,this[ca](m,u),p()}));let y=1,o=m=>{if(m){g.fd&&t.close(g.fd,(()=>{})),this[ca](m,u),p();return}--y===0&&g.fd!==void 0&&t.close(g.fd,(t=>{t?this[ca](t,u):this[ha](),p()}))};g.on("finish",(()=>{let p=String(u.absolute),m=g.fd;if(typeof m=="number"&&u.mtime&&!this.noMtime){y++;let g=u.atime||new Date,v=u.mtime;t.futimes(m,g,v,(u=>u?t.utimes(p,g,v,(t=>o(t&&u))):o()))}if(typeof m=="number"&&this[ma](u)){y++;let g=this[ga](u),v=this[ya](u);typeof g=="number"&&typeof v=="number"&&t.fchown(m,g,v,(u=>u?t.chown(p,g,v,(t=>o(t&&u))):o()))}o()}));let v=this.transform&&this.transform(u)||u;v!==u&&(v.on("error",(t=>{this[ca](t,u),p()})),u.pipe(v)),v.pipe(g)}[Qo](u,p){let m=typeof u.mode=="number"?u.mode&4095:this.dmode;this[aa](String(u.absolute),m,(m=>{if(m){this[ca](m,u),p();return}let g=1,o=()=>{--g===0&&(p(),this[ha](),u.resume())};u.mtime&&!this.noMtime&&(g++,t.utimes(String(u.absolute),u.atime||new Date,u.mtime,o)),this[ma](u)&&(g++,t.chown(String(u.absolute),Number(this[ga](u)),Number(this[ya](u)),o)),o()}))}[ia](t){t.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${t.type}`,{entry:t}),t.resume()}[ta](t,p){let m=Js(u.relative(this.cwd,u.resolve(u.dirname(String(t.absolute)),String(t.linkpath)))).split("/");this[sa](t,this.cwd,m,(()=>this[ea](t,String(t.linkpath),"symlink",p)),(u=>{this[ca](u,t),p()}))}[ra](t,p){let m=Js(u.resolve(this.cwd,String(t.linkpath))),g=Js(String(t.linkpath)).split("/");this[sa](t,this.cwd,g,(()=>this[ea](t,m,"link",p)),(u=>{this[ca](u,t),p()}))}[sa](p,m,g,y,v){let b=g.shift();if(this.preservePaths||b===void 0)return y();let w=u.resolve(m,b);t.lstat(w,((t,m)=>{if(t)return y();if(m?.isSymbolicLink())return v(new Uo(w,u.resolve(w,g.join("/"))));this[sa](p,w,g,y,v)}))}[ua](){this[la]++}[ha](){this[la]--,this[fa]()}[pa](t){this[ha](),t.resume()}[Zo](t,u){return t.type==="File"&&!this.unlink&&u.isFile()&&u.nlink<=1&&!ba}[Ko](t){this[ua]();let u=[t.path];t.linkpath&&u.push(t.linkpath),this.reservations.reserve(u,(u=>this[Yo](t,u)))}[Yo](p,m){let i=t=>{m(t)},r=()=>{this[aa](this.cwd,this.dmode,(t=>{if(t){this[ca](t,p),i();return}this[va]=!0,n()}))},n=()=>{if(p.absolute!==this.cwd){let t=Js(u.dirname(String(p.absolute)));if(t!==this.cwd)return this[aa](t,this.dmode,(t=>{if(t){this[ca](t,p),i();return}o()}))}o()},o=()=>{t.lstat(String(p.absolute),((u,m)=>{if(m&&(this.keep||this.newer&&m.mtime>(p.mtime??m.mtime))){this[pa](p),i();return}if(u||this[Zo](p,m))return this[Xo](null,p,i);if(m.isDirectory()){if(p.type==="Directory"){let u=this.chmod&&p.mode&&(m.mode&4095)!==p.mode,c=t=>this[Xo](t??null,p,i);return u?t.chmod(String(p.absolute),Number(p.mode),c):c()}if(p.absolute!==this.cwd)return t.rmdir(String(p.absolute),(t=>this[Xo](t??null,p,i)))}if(p.absolute===this.cwd)return this[Xo](null,p,i);no(String(p.absolute),(t=>this[Xo](t??null,p,i)))}))};this[va]?n():r()}[Xo](t,u,p){if(t){this[ca](t,u),p();return}switch(u.type){case"File":case"OldFile":case"ContiguousFile":return this[Jo](u,p);case"Link":return this[ra](u,p);case"SymbolicLink":return this[ta](u,p);case"Directory":case"GNUDumpDir":return this[Qo](u,p)}}[ea](u,p,m,g){t[m](p,String(u.absolute),(t=>{t?this[ca](t,u):(this[ha](),u.resume()),g()}))}},Se=t=>{try{return[null,t()]}catch(t){return[t,null]}},Sa=class extends Ea{sync=!0;[Xo](t,u){return super[Xo](t,u,(()=>{}))}[Ko](p){if(!this[va]){let t=this[aa](this.cwd,this.dmode);if(t)return this[ca](t,p);this[va]=!0}if(p.absolute!==this.cwd){let t=Js(u.dirname(String(p.absolute)));if(t!==this.cwd){let u=this[aa](t,this.dmode);if(u)return this[ca](u,p)}}let[m,g]=Se((()=>t.lstatSync(String(p.absolute))));if(g&&(this.keep||this.newer&&g.mtime>(p.mtime??g.mtime)))return this[pa](p);if(m||this[Zo](p,g))return this[Xo](null,p);if(g.isDirectory()){if(p.type==="Directory"){let u=this.chmod&&p.mode&&(g.mode&4095)!==p.mode,[m]=u?Se((()=>{t.chmodSync(String(p.absolute),Number(p.mode))})):[];return this[Xo](m,p)}let[u]=Se((()=>t.rmdirSync(String(p.absolute))));this[Xo](u,p)}let[y]=p.absolute===this.cwd?[]:Se((()=>oo(String(p.absolute))));this[Xo](y,p)}[Jo](u,p){let m=typeof u.mode=="number"?u.mode&4095:this.fmode,r=m=>{let y;try{t.closeSync(g)}catch(t){y=t}(m||y)&&this[ca](m||y,u),p()},g;try{g=t.openSync(String(u.absolute),jo(u.size),m)}catch(t){return r(t)}let y=this.transform&&this.transform(u)||u;y!==u&&(y.on("error",(t=>this[ca](t,u))),u.pipe(y)),y.on("data",(u=>{try{t.writeSync(g,u,0,u.length)}catch(t){r(t)}})),y.on("end",(()=>{let p=null;if(u.mtime&&!this.noMtime){let m=u.atime||new Date,y=u.mtime;try{t.futimesSync(g,m,y)}catch(g){try{t.utimesSync(String(u.absolute),m,y)}catch{p=g}}}if(this[ma](u)){let m=this[ga](u),y=this[ya](u);try{t.fchownSync(g,Number(m),Number(y))}catch(g){try{t.chownSync(String(u.absolute),Number(m),Number(y))}catch{p=p||g}}}r(p)}))}[Qo](u,p){let m=typeof u.mode=="number"?u.mode&4095:this.dmode,g=this[aa](String(u.absolute),m);if(g){this[ca](g,u),p();return}if(u.mtime&&!this.noMtime)try{t.utimesSync(String(u.absolute),u.atime||new Date,u.mtime)}catch{}if(this[ma](u))try{t.chownSync(String(u.absolute),Number(this[ga](u)),Number(this[ya](u)))}catch{}p(),u.resume()}[aa](t,u){try{return ur(Js(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:u})}catch(t){return t}}[sa](p,m,g,y,v){if(this.preservePaths||!g.length)return y();let b=m;for(let p of g){b=u.resolve(b,p);let[w,E]=Se((()=>t.lstatSync(b)));if(w)return y();if(E.isSymbolicLink())return v(new Uo(b,u.resolve(m,g.join("/"))))}y()}[ea](u,p,m,g){let y=`${m}Sync`;try{t[y](p,String(u.absolute)),g(),u.resume()}catch(t){return this[ca](t,u)}}};var ho=u=>{let p=new Sa(u),m=u.file,g=t.statSync(m),y=u.maxReadSize||16*1024*1024;new ls(m,{readSize:y,size:g.size}).pipe(p)},ao=(u,p)=>{let m=new Ea(u),g=u.maxReadSize||16*1024*1024,y=u.file;return new Promise(((u,p)=>{m.on("error",p),m.on("close",u),t.stat(y,((t,u)=>{if(t)p(t);else{let t=new as(y,{readSize:g,size:u.size});t.on("error",p),t.pipe(m)}}))}))},$a=K(ho,ao,(t=>new Sa(t)),(t=>new Ea(t)),((t,u)=>{u?.length&&Yi(t,u)}));var co=(u,p)=>{let m=new Po(u),g=!0,y,v;try{try{y=t.openSync(u.file,"r+")}catch(p){if(p?.code==="ENOENT")y=t.openSync(u.file,"w+");else throw p}let b=t.fstatSync(y),w=Buffer.alloc(512);e:for(v=0;v<b.size;v+=512){for(let u=0,p=0;u<512;u+=p){if(p=t.readSync(y,w,u,w.length-u,v+u),v===0&&w[0]===31&&w[1]===139)throw new Error("cannot append to compressed archives");if(!p)break e}let p=new Ws(w);if(!p.cksumValid)break;let m=512*Math.ceil((p.size||0)/512);if(v+m+512>b.size)break;v+=m,u.mtimeCache&&p.mtime&&u.mtimeCache.set(String(p.path),p.mtime)}g=!1,fo(u,m,v,y,p)}finally{if(g)try{t.closeSync(y)}catch{}}},fo=(t,u,p,m,g)=>{let y=new ps(t.file,{fd:m,start:p});u.pipe(y),mo(u,g)},uo=(u,p)=>{p=Array.from(p);let m=new Ro(u),i=(p,m,g)=>{let a=(u,m)=>{u?t.close(p,(t=>g(u))):g(null,m)},y=0;if(m===0)return a(null,0);let v=0,b=Buffer.alloc(512),S=(g,w)=>{if(g||typeof w>"u")return a(g);if(v+=w,v<512&&w)return t.read(p,b,v,b.length-v,y+v,S);if(y===0&&b[0]===31&&b[1]===139)return a(new Error("cannot append to compressed archives"));if(v<512)return a(null,y);let E=new Ws(b);if(!E.cksumValid)return a(null,y);let $=512*Math.ceil((E.size??0)/512);if(y+$+512>m||(y+=$+512,y>=m))return a(null,y);u.mtimeCache&&E.mtime&&u.mtimeCache.set(String(E.path),E.mtime),v=0,t.read(p,b,0,512,y,S)};t.read(p,b,0,512,y,S)};return new Promise(((g,y)=>{m.on("error",y);let v="r+",a=(b,w)=>{if(b&&b.code==="ENOENT"&&v==="r+")return v="w+",t.open(u.file,v,a);if(b||!w)return y(b);t.fstat(w,((v,b)=>{if(v)return t.close(w,(()=>y(v)));i(w,b.size,((t,v)=>{if(t)return y(t);let b=new hs(u.file,{fd:w,start:v});m.pipe(b),b.on("error",y),b.on("close",g),po(m,p)}))}))};t.open(u.file,v,a)}))},mo=(t,p)=>{p.forEach((p=>{p.charAt(0)==="@"?ji({file:u.resolve(t.cwd,p.slice(1)),sync:!0,noResume:!0,onReadEntry:u=>t.add(u)}):t.add(p)})),t.end()},po=async(t,p)=>{for(let m=0;m<p.length;m++){let g=String(p[m]);g.charAt(0)==="@"?await ji({file:u.resolve(String(t.cwd),g.slice(1)),noResume:!0,onReadEntry:u=>t.add(u)}):t.add(g)}t.end()},Oa=K(co,uo,(()=>{throw new TypeError("file is required")}),(()=>{throw new TypeError("file is required")}),((t,u)=>{if(!ks(t))throw new TypeError("file is required");if(t.gzip||t.brotli||t.zstd||t.file.endsWith(".br")||t.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!u?.length)throw new TypeError("no paths specified to add/replace")}));var Ra=K(Oa.syncFile,Oa.asyncFile,Oa.syncNoFile,Oa.asyncNoFile,((t,u=[])=>{Oa.validate?.(t,u),wo(t)})),wo=t=>{let u=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=u?(p,m)=>u(p,m)&&!((t.mtimeCache?.get(p)??m.mtime??0)>(m.mtime??0)):(u,p)=>!((t.mtimeCache?.get(u)??p.mtime??0)>(p.mtime??0))};async function isUrlOk(t){try{const u=await fetch(t,{method:"HEAD"});return u.status===200}catch{return false}}async function getRepoInfo(t,u){const[,p,m,g,y,...v]=t.pathname.split("/");const b=u?u.replace(/^\//,""):v.join("/");if(g===undefined||g===""&&y===undefined){try{const t=await fetch(`https://api.github.com/repos/${p}/${m}`);if(t.status!==200){return}const u=await t.json();return{username:p,name:m,branch:u.default_branch,filePath:b}}catch{return}}const w=u?`${y}/${v.join("/")}`.replace(new RegExp(`/${b}|/$`),""):y;if(p&&m&&w&&g==="tree"){return{username:p,name:m,branch:w,filePath:b}}}function hasRepo({username:t,name:u,branch:p,filePath:m}){const g=`https://api.github.com/repos/${t}/${u}/contents`;const y=`${m?`/${m}`:""}/package.json`;return isUrlOk(`${g}${y}?ref=${p}`)}function existsInRepo(t){try{const u=new URL(t);return isUrlOk(u.href)}catch{return isUrlOk(`https://api.github.com/repos/zuplo/zudoku/contents/examples/${encodeURIComponent(t)}`)}}async function downloadTarStream(t){const u=await fetch(t);if(!u.body){throw new Error(`Failed to download: ${t}`)}return z.Readable.fromWeb(u.body)}async function downloadAndExtractRepo(t,{username:p,name:m,branch:g,filePath:y}){let v=null;await(0,ot.pipeline)(await downloadTarStream(`https://codeload.github.com/${p}/${m}/tar.gz/${g}`),$a({cwd:t,strip:y?y.split("/").length+1:1,filter:t=>{if(v===null){const p=t.split(u.sep);v=p.length?p[0]:null}return t.startsWith(`${v}${y?`/${y}/`:"/"}`)}}))}async function downloadAndExtractExample(t,u){if(u==="__internal-testing-retry"){throw new Error("This is an internal example for testing the CLI.")}await(0,ot.pipeline)(await downloadTarStream("https://codeload.github.com/zuplo/zudoku/tar.gz/canary"),$a({cwd:t,strip:2+u.split("/").length,filter:t=>t.includes(`zudoku-canary/examples/${u}/`)}))}var Pa=__nccwpck_require__(1421);function isInGitRepository(){try{(0,Pa.execSync)("git rev-parse --is-inside-work-tree",{stdio:"ignore"});return true}catch{}return false}function isInMercurialRepository(){try{(0,Pa.execSync)("hg --cwd . root",{stdio:"ignore"});return true}catch{}return false}function isDefaultBranchSet(){try{(0,Pa.execSync)("git config init.defaultBranch",{stdio:"ignore"});return true}catch{}return false}function tryGitInit(p){let m=false;try{(0,Pa.execSync)("git --version",{stdio:"ignore"});if(isInGitRepository()||isInMercurialRepository()){return false}(0,Pa.execSync)("git init",{stdio:"ignore"});m=true;if(!isDefaultBranchSet()){(0,Pa.execSync)("git checkout -b main",{stdio:"ignore"})}(0,Pa.execSync)("git add -A",{stdio:"ignore"});(0,Pa.execSync)('git commit -m "Initial commit from Create Next App"',{stdio:"ignore"});return true}catch{if(m){try{(0,t.rmSync)((0,u.join)(p,".git"),{recursive:true,force:true})}catch{}}return false}}var Aa=__nccwpck_require__(670);var xa=__nccwpck_require__.n(Aa);async function install(t,u){const p=["install"];if(!u){console.log((0,Qe.yellow)("You appear to be offline.\nFalling back to the local cache."));p.push("--offline")}return new Promise(((u,m)=>{const g=xa()(t,p,{stdio:"inherit",env:{...process.env,ADBLOCK:"1",NODE_ENV:"development",DISABLE_OPENCOLLECTIVE:"1"}});g.on("close",(g=>{if(g!==0){m({command:`${t} ${p.join(" ")}`});return}u()}))}))}function isFolderEmpty(p,m){const g=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log","yarnrc.yml",".yarn"];const y=(0,t.readdirSync)(p).filter((t=>!g.includes(t)&&!/\.iml$/.test(t)));if(y.length>0){console.log(`The directory ${(0,Qe.green)(m)} contains files that could conflict:`);console.log();for(const m of y){try{const g=(0,t.lstatSync)((0,u.join)(p,m));if(g.isDirectory()){console.log(` ${(0,Qe.blue)(m)}/`)}else{console.log(` ${m}`)}}catch{console.log(` ${m}`)}}console.log();console.log("Either try using a new directory name, or remove the files listed above.");console.log();return false}return true}const Ta=require("node:dns/promises");const Ca=require("node:url");var ka=__nccwpck_require__.n(Ca);function getProxy(){if(process.env.https_proxy){return process.env.https_proxy}try{const t=(0,Pa.execSync)("npm config get https-proxy").toString().trim();return t!=="null"?t:undefined}catch{return}}async function getOnline(){try{await(0,Ta.lookup)("registry.yarnpkg.com");return true}catch{const t=getProxy();if(!t){return false}const{hostname:u}=ka().parse(t);if(!u){return false}try{await(0,Ta.lookup)(u);return true}catch{return false}}}const Ia=require("node:constants");async function isWriteable(t){try{await(0,_t.access)(t,Ia.W_OK);return true}catch{return false}}var Na=__nccwpck_require__(2457);const identity=t=>t;const copy=async(t,p,{cwd:m,rename:g=identity,parents:y=true}={})=>{const v=typeof t==="string"?[t]:t;if(v.length===0||!p){throw new TypeError("`src` and `dest` are required")}const b=await(0,Na.async)(v,{cwd:m,dot:true,absolute:false,stats:false});const w=m?(0,u.resolve)(m,p):p;return Promise.all(b.map((async t=>{const p=(0,u.dirname)(t);const v=g((0,u.basename)(t));const b=m?(0,u.resolve)(m,t):t;const E=y?(0,u.join)(w,p,v):(0,u.join)(w,v);await(0,_t.mkdir)((0,u.dirname)(E),{recursive:true});return(0,_t.copyFile)(b,E)})))};const Da=__dirname.endsWith("dist")?p().join(__dirname,"templates"):__dirname;const getTemplateFile=({template:t,mode:u,file:m})=>p().join(Da,t,u,m);const installTemplate=async({appName:t,root:u,packageManager:m,isOnline:g,template:y,mode:v,eslint:b,skipInstall:w,zudokuVersion:E})=>{var $;console.log((0,Qe.bold)(`Using ${m}.`));console.log("\nInitializing project with template:",y,"\n");const O=p().join(Da,y,v);const R=["**"];if(!b)R.push("!eslintrc.json");await copy(R,u,{parents:true,cwd:O,rename(t){switch(t){case"gitignore":case"eslintrc.json":{return`.${t}`}case"README-template.md":{return"README.md"}default:{return t}}}});const P=($=process.env.ZUDOKU_PRIVATE_TEST_VERSION)!==null&&$!==void 0?$:E;const A={name:t,version:"0.1.0",type:"module",private:true,scripts:{dev:"zudoku dev",build:"zudoku build",preview:"zudoku preview",lint:"eslint"},dependencies:{react:">=19.0.0","react-dom":">=19.0.0",zudoku:P},devDependencies:{}};if(v==="ts"){A.devDependencies={...A.devDependencies,"@types/node":"^22","@types/react":"^19","@types/react-dom":"^19",typescript:"^5"}}if(b){A.devDependencies={...A.devDependencies,eslint:"^8"}}if(b&&v==="ts"){A.devDependencies={...A.devDependencies,"@typescript-eslint/eslint-plugin":"^8","@typescript-eslint/parser":"^8"}}const x=Object.keys(A.devDependencies).length;if(!x)delete A.devDependencies;await bt().writeFile(p().join(u,"package.json"),JSON.stringify(A,null,2)+j().EOL);if(w)return;console.log("\nInstalling dependencies:");for(const t in A.dependencies)console.log(`- ${(0,Qe.cyan)(t)}`);if(x){console.log("\nInstalling devDependencies:");for(const t in A.devDependencies)console.log(`- ${(0,Qe.cyan)(t)}`)}console.log();await install(m,g)};class DownloadError extends Error{}async function createApp({appPath:p,packageManager:m,example:g,examplePath:y,typescript:v,eslint:b,skipInstall:w,zudokuVersion:E}){let $;const O=v?"ts":"js";const R=`default`;if(g){let D;try{D=new URL(g)}catch(L){const M=L;if(M.code!=="ERR_INVALID_URL"){console.error(L);process.exit(1)}}if(D){if(D.origin!=="https://github.com"){console.error(`Invalid URL: ${(0,Qe.red)(`"${g}"`)}. Only GitHub repositories are supported. Please use a GitHub URL and try again.`);process.exit(1)}$=await getRepoInfo(D,y);if(!$){console.error(`Found invalid GitHub URL: ${(0,Qe.red)(`"${g}"`)}. Please fix the URL and try again.`);process.exit(1)}const j=await hasRepo($);if(!j){console.error(`Could not locate the repository for ${(0,Qe.red)(`"${g}"`)}. Please check that the repository exists and try again.`);process.exit(1)}}else if(g!=="__internal-testing-retry"){const U=await existsInRepo(g);if(!U){console.error(`Could not locate an example named ${(0,Qe.red)(`"${g}"`)}. It could be due to the following:\n`,`1. Your spelling of example ${(0,Qe.red)(`"${g}"`)} might be incorrect.\n`,`2. You might not be connected to the internet or you are behind a proxy.`);process.exit(1)}}}const P=(0,u.resolve)(p);if(!await isWriteable((0,u.dirname)(P))){console.error("The application path is not writable, please check folder permissions and try again.");console.error("It is likely you do not have write permissions for this folder.");process.exit(1)}const A=(0,u.basename)(P);(0,t.mkdirSync)(P,{recursive:true});if(!isFolderEmpty(P,A)){process.exit(1)}const x=m==="yarn";const T=!x||await getOnline();const C=process.cwd();console.log(`Creating a new Zudoku app in ${(0,Qe.green)(P)}.`);console.log();process.chdir(P);const k=(0,u.join)(P,"package.json");let I=false;if(g){try{if($){const H=$;console.log(`Downloading files from repo ${(0,Qe.cyan)(g)}. This might take a moment.`);console.log();await nt()((()=>downloadAndExtractRepo(P,H)),{retries:3})}else{console.log(`Downloading files for example ${(0,Qe.cyan)(g)}. This might take a moment.`);console.log();await nt()((()=>downloadAndExtractExample(P,g)),{retries:3})}}catch(V){function isErrorLike(t){return typeof t==="object"&&t!==null&&typeof t.message==="string"}throw new DownloadError(isErrorLike(V)?V.message:String(V))}const B=(0,u.join)(P,".gitignore");if(!(0,t.existsSync)(B)){(0,t.copyFileSync)(getTemplateFile({template:R,mode:O,file:"gitignore"}),B)}I=(0,t.existsSync)(k);if(!w&&I){console.log("Installing packages. This might take a couple of minutes.");console.log();await install(m,T);console.log()}}else{await installTemplate({appName:A,root:P,template:R,mode:O,packageManager:m,isOnline:T,eslint:b,skipInstall:w,zudokuVersion:E})}if(tryGitInit(P)){console.log("Initialized a git repository.");console.log()}let N;if((0,u.join)(C,A)===p){N=A}else{N=p}console.log(`${(0,Qe.green)("Success!")} Created ${A} at ${p}`);if(I){console.log("Inside that directory, you can run several commands:");console.log();console.log((0,Qe.cyan)(` ${m} ${x?"":"run "}dev`));console.log(" Starts the development server.");console.log();console.log((0,Qe.cyan)(` ${m} ${x?"":"run "}build`));console.log(" Builds the app for production.");console.log();console.log((0,Qe.cyan)(` ${m} start`));console.log(" Runs the built app in production mode.");console.log();console.log("We suggest that you begin by typing:");console.log();console.log((0,Qe.cyan)(" cd"),N);console.log(` ${(0,Qe.cyan)(`${m} ${x?"":"run "}dev`)}`)}console.log()}function getPkgManager(){var t;const u=(t=process.env.npm_config_user_agent)!==null&&t!==void 0?t:"";if(u.startsWith("yarn")){return"yarn"}if(u.startsWith("pnpm")){return"pnpm"}if(u.startsWith("bun")){return"bun"}return"npm"}var La=__nccwpck_require__(8904);var Ma=__nccwpck_require__.n(La);function validateNpmName(t){const u=Ma()(t);if(u.validForNewPackages){return{valid:true}}return{valid:false,problems:[...u.errors||[],...u.warnings||[]]}}let ja="";const handleSigTerm=()=>process.exit(0);process.on("SIGINT",handleSigTerm);process.on("SIGTERM",handleSigTerm);const onPromptState=t=>{if(t.aborted){process.stdout.write("[?25h");process.stdout.write("\n");process.exit(1)}};const Fa=JSON.parse((0,t.readFileSync)(p().resolve(__dirname,"../package.json"),"utf-8"));const Ua=new P(Fa.name).version(Fa.version,"-v, --version","Output the current version of create-zudoku.").argument("[directory]").usage("[directory] [options]").helpOption("-h, --help","Display this help message.").option("--ts, --typescript","Initialize as a TypeScript project. (default)").option("--js, --javascript","Initialize as a JavaScript project.").option("--eslint","Initialize with ESLint config.").option("--import-alias <prefix/*>",'Specify import alias to use (default "@/*").').option("--use-npm","Explicitly tell the CLI to bootstrap the application using npm.").option("--use-pnpm","Explicitly tell the CLI to bootstrap the application using pnpm.").option("--use-yarn","Explicitly tell the CLI to bootstrap the application using Yarn.").option("--use-bun","Explicitly tell the CLI to bootstrap the application using Bun.").option("--reset, --reset-preferences","Reset the preferences saved for create-zudoku.").option("--skip-install","Explicitly tell the CLI to skip installing packages.").option("--yes","Use saved preferences or defaults for unprovided options.").option("-e, --example <example-name|github-url>",`\n\n An example to bootstrap the app with. You can use an example name\n from the official Zudoku repo or a public GitHub URL. The URL can use\n any branch and/or subdirectory.\n`).option("--example-path <path-to-example>",`\n\n In a rare case, your GitHub URL might contain a branch name with\n a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar).\n In this case, you must specify the path to the example separately:\n --example-path foo/bar\n`).action((t=>{if(t&&!t.startsWith("--no-")){ja=t}})).allowUnknownOption().parse(process.argv);const Ba=Ua.opts();const{args:Ha}=Ua;const Va=Ba.useNpm?"npm":Ba.usePnpm?"pnpm":Ba.useYarn?"yarn":Ba.useBun?"bun":getPkgManager();async function run(){const p=new Conf({projectName:"create-zudoku"});if(Ba.resetPreferences){const{resetPreferences:t}=await tt()({onState:onPromptState,type:"toggle",name:"resetPreferences",message:"Would you like to reset the saved preferences?",initial:false,active:"Yes",inactive:"No"});if(t){p.clear();console.log("The preferences have been reset successfully!")}process.exit(0)}if(typeof ja==="string"){ja=ja.trim()}if(!ja){const t=await tt()({onState:onPromptState,type:"text",name:"path",message:"What is your project named?",initial:"my-app",validate:t=>{const p=validateNpmName((0,u.basename)((0,u.resolve)(t)));if(p.valid){return true}return`Invalid project name: ${p.problems[0]}`}});if(typeof t.path==="string"){ja=t.path.trim()}}if(!ja){console.log("\nPlease specify the project directory:\n"+` ${(0,Qe.cyan)(Ba.name())} ${(0,Qe.green)("<project-directory>")}\n`+"For example:\n"+` ${(0,Qe.cyan)(Ba.name())} ${(0,Qe.green)("my-zudoku-app")}\n\n`+`Run ${(0,Qe.cyan)(`${Ba.name()} --help`)} to see all options.`);process.exit(1)}const m=(0,u.resolve)(ja);const y=(0,u.basename)(m);const v=validateNpmName(y);if(!v.valid){console.error(`Could not create a project called ${(0,Qe.red)(`"${y}"`)} because of npm naming restrictions:`);v.problems.forEach((t=>console.error(` ${(0,Qe.red)((0,Qe.bold)("*"))} ${t}`)));process.exit(1)}if(Ba.example===true){console.error("Please provide an example name or url, otherwise remove the example option.");process.exit(1)}if((0,t.existsSync)(m)&&!isFolderEmpty(m,y)){process.exit(1)}const b=typeof Ba.example==="string"&&Ba.example.trim();const w=p.get("preferences")||{};const E=g().isCI||Ba.yes;if(!b){const t={typescript:true,eslint:true,empty:false};const getPrefOrDefault=u=>{var p;return(p=w[u])!==null&&p!==void 0?p:t[u]};if(!Ba.typescript&&!Ba.javascript){if(E){Ba.typescript=getPrefOrDefault("typescript")}else{const t=(0,Qe.blue)("TypeScript");const{typescript:u}=await tt()({type:"toggle",name:"typescript",message:`Would you like to use ${t}?`,initial:getPrefOrDefault("typescript"),active:"Yes",inactive:"No"},{onCancel:()=>{console.error("Exiting.");process.exit(1)}});Ba.typescript=Boolean(u);Ba.javascript=!u;w.typescript=Boolean(u)}}if(!Ba.eslint&&!Ha.includes("--no-eslint")){if(E){Ba.eslint=getPrefOrDefault("eslint")}else{const t=(0,Qe.blue)("ESLint");const{eslint:u}=await tt()({onState:onPromptState,type:"toggle",name:"eslint",message:`Would you like to use ${t}?`,initial:getPrefOrDefault("eslint"),active:"Yes",inactive:"No"});Ba.eslint=Boolean(u);w.eslint=Boolean(u)}}}try{await createApp({appPath:m,packageManager:Va,example:b&&b!=="default"?b:undefined,examplePath:Ba.examplePath,typescript:Ba.typescript,eslint:Ba.eslint,skipInstall:Ba.skipInstall,zudokuVersion:Fa.version})}catch(t){if(!(t instanceof DownloadError)){throw t}const u=await tt()({onState:onPromptState,type:"confirm",name:"builtin",message:`Could not download "${b}" because of a connectivity issue between your machine and GitHub.\n`+`Do you want to use the default template instead?`,initial:true});if(!u.builtin){throw t}await createApp({appPath:m,packageManager:Va,typescript:Ba.typescript,eslint:Ba.eslint,skipInstall:Ba.skipInstall,zudokuVersion:Fa.version})}p.set("preferences",w)}const za=st()(Fa).catch((()=>null));async function notifyUpdate(){var t;try{if((t=await za)===null||t===void 0?void 0:t.latest){const t={npm:"npm i -g",yarn:"yarn global add",pnpm:"pnpm add -g",bun:"bun add -g"};const u=`${t[Va]} create-zudoku`;console.log((0,Qe.yellow)((0,Qe.bold)("A new version of `create-zudoku` is available!"))+"\n"+"You can update by running: "+(0,Qe.cyan)(u)+"\n")}process.exit(0)}catch{}}async function exit(t){console.log();console.log("Aborting installation.");if(t.command){console.log(` ${(0,Qe.cyan)(t.command)} has failed.`)}else{console.log(`${(0,Qe.red)("Unexpected error. Please report it as a bug:")}\n`,t)}console.log();await notifyUpdate();process.exit(1)}run().then(notifyUpdate).catch(exit)})();module.exports=p})();