brsh 1.3.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/busybox-compat.yml +166 -0
- package/.github/workflows/release.yml +40 -0
- package/.releaserc.json +18 -0
- package/CHANGELOG.md +355 -0
- package/bin/brsh-cmd.js +78 -0
- package/bin/exportFileSystem.js +81 -156
- package/busybox-testsuite/cat.tests +49 -0
- package/busybox-testsuite/cp.tests +206 -0
- package/busybox-testsuite/grep.tests +237 -0
- package/busybox-testsuite/testing.sh +180 -0
- package/dist/brsh.css +2 -0
- package/dist/shell.es.js +5667 -0
- package/dist/shell.es.js.map +1 -0
- package/dist/shell.min.js +14 -219
- package/dist/shell.min.js.map +1 -147
- package/dist/terminal.es.js +6228 -0
- package/dist/terminal.es.js.map +1 -0
- package/dist/terminal.min.js +113 -18
- package/dist/terminal.min.js.map +1 -21
- package/index.js +231 -56
- package/lib/Command.js +12 -1
- package/lib/Context.js +12 -4
- package/lib/FileSystem.js +99 -6
- package/lib/NodeFileSystem.js +238 -0
- package/lib/Result.js +6 -0
- package/lib/ScriptCommand.js +193 -15
- package/lib/Terminal.js +192 -11
- package/lib/WasmCommand.js +252 -0
- package/lib/buildFilesystemStructure.js +58 -0
- package/lib/builtins/cat.js +67 -9
- package/lib/builtins/echo.js +36 -5
- package/lib/builtins/false.js +13 -0
- package/lib/builtins/grep.js +267 -0
- package/lib/builtins/index.js +9 -2
- package/lib/builtins/ls.js +86 -18
- package/lib/builtins/test.js +105 -0
- package/lib/builtins/true.js +10 -0
- package/lib/local/chmod.js +72 -0
- package/lib/local/cp.js +156 -0
- package/lib/local/index.js +9 -1
- package/lib/local/jsfunction.js +58 -0
- package/lib/local/mkdir.js +44 -0
- package/lib/local/mv.js +96 -0
- package/lib/local/pwd.js +13 -0
- package/lib/local/read.js +107 -0
- package/lib/local/rm.js +71 -0
- package/lib/local/which.js +2 -2
- package/package.json +31 -34
- package/test/builtins.test.js +505 -0
- package/test/exportFileSystem.test.js +226 -0
- package/test/helpers.js +35 -0
- package/test/local-commands.test.js +593 -0
- package/test/node-filesystem.test.js +133 -0
- package/test/scripts.test.js +277 -0
- package/test/shell.test.js +245 -0
- package/test/streaming.test.js +113 -0
- package/vite.config.shell.js +21 -0
- package/vite.config.terminal.js +27 -0
- package/vitest.config.js +15 -0
package/dist/shell.min.js
CHANGED
|
@@ -1,219 +1,14 @@
|
|
|
1
|
-
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Shell = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
|
2
|
-
(
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},{
|
|
11
|
-
|
|
12
|
-
"use strict";const LocalCommand=require(12);class ScriptCommand extends LocalCommand{constructor(t,s,e,o=!1){super(s,e),this.script=t,this.source=o}run(){this.sandbox=new global.shell({cwd:this.context.cwd,filesystem:this.context.fs.getRaw()}),this.sandbox.context.source(this.context),this.sandbox.on("stdOut",t=>this.stdOut=t),this.sandbox.on("stdErr",t=>this.stdErr=t);const t=this.script.split(/\r?\n/);return t[0].startsWith("#!")?t.reduce((t,s)=>t.then(this.sandbox.onCommand(s).then(()=>{if(0!==this.sandbox.lastCode)return this.exitCode=this.sandbox.lastCode,Promise.reject()})),Promise.resolve()).then(()=>{this.source&&this.context.source(this.sandbox.context)}):Promise.reject("no interpreter set")}}module.exports=ScriptCommand;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},{"12":12}],12:[function(require,module,exports){
|
|
17
|
-
"use strict";const Command=require(2);class LocalCommand extends Command{constructor(o,m){super(o),this.context=m}}module.exports=LocalCommand;
|
|
18
|
-
|
|
19
|
-
},{"2":2}],3:[function(require,module,exports){
|
|
20
|
-
"use strict";const FileSystem=require(4);class Context{constructor(s){this.options=s;const{cwd:t="/",clearFn:e,destroyFn:i}=this.options;this.vars={},this.aliases={},this.fs=new FileSystem(t),this._clearFn=e,this._destroyFn=i}setVar(s,t){t?this.vars[s]=t:delete this.vars[s]}unsetVar(s){this.setVar(s)}getVar(s){return this.vars[s]||""}setAlias(s,t){t?this.aliases[s]=t:delete this.aliases[s]}unsetAlias(s){this.setAlias(s)}getAlias(s){return this.aliases[s]||null}setCommand(s){const t=`${this.getVar("PATH")}/${s.name.toLowerCase()}`;this.fs.addFiles({[t]:s})}getCommand(s){const t=`${this.getVar("PATH")}/${s}`;return this.fs.getFileByPath(t)||null}setFilesystem(s){const t=this.fs.getFileByPath(this.getVar("PATH"))||{};this.fs=new FileSystem(this.fs.cwd,s),this.fs.addFiles(t)}setCwd(s){this.fs.setCwd(s)}source(s){this.vars=Object.assign({},this.vars,s.vars),this.aliases=Object.assign({},this.aliases,s.aliases)}clear(){"function"==typeof this._clearFn&&this._clearFn()}destroy(s=0){"function"==typeof this._destroyFn&&this._destroyFn(s)}}module.exports=Context;
|
|
21
|
-
|
|
22
|
-
},{"4":4}],2:[function(require,module,exports){
|
|
23
|
-
"use strict";const Result=require(5);class Command{constructor(t){this.arguments=t,this.result=new Result}get name(){return"unnamed"}run(){return Promise.reject("Command not implemented...")}runCommand(){return this.run().then(t=>(t&&t.split(/\r?\n/).forEach(t=>this.stdOut=t),this.result)).catch(t=>(t&&(this.stdErr=t.message||t),this.exitCode=127,this.result))}set exitCode(t){this.result.exitCode=t}set stdOut(t){this.result.addStdOutLine(t)}set stdErr(t){this.result.addStdErrLine(t)}}module.exports=Command;
|
|
24
|
-
|
|
25
|
-
},{"5":5}],18:[function(require,module,exports){
|
|
26
|
-
"use strict";module.exports=[require(13),require(17),require(14),require(20),require(19),require(15),require(16)];
|
|
27
|
-
|
|
28
|
-
},{"13":13,"14":14,"15":15,"16":16,"17":17,"19":19,"20":20}],10:[function(require,module,exports){
|
|
29
|
-
"use strict";module.exports=[require(8),require(11),require(9)];
|
|
30
|
-
|
|
31
|
-
},{"11":11,"8":8,"9":9}],64:[function(require,module,exports){
|
|
32
|
-
"use strict";var bind=require(44),define=require(23),implementation=require(63),getPolyfill=require(65),shim=require(67),boundMatchAll=bind.call(Function.call,implementation);define(boundMatchAll,{getPolyfill:getPolyfill,implementation:implementation,shim:shim}),module.exports=boundMatchAll;
|
|
33
|
-
|
|
34
|
-
},{"23":23,"44":44,"63":63,"65":65,"67":67}],5:[function(require,module,exports){
|
|
35
|
-
"use strict";const StdLine=require(7);class Result{constructor(t=[],e=0){if("number"!=typeof e)throw new Error("Command Result ExitCode must be a number");if(!Array.isArray(t))throw new Error("Command Result be array");this.std=t,this.exitCode=e}addStdOutLine(t){this.std.push(new StdLine("out",t))}addStdErrLine(t){this.std.push(new StdLine("err",t))}getStdOutput(){return this.std}getExitCode(){return this.exitCode}}module.exports=Result;
|
|
36
|
-
|
|
37
|
-
},{"7":7}],4:[function(require,module,exports){
|
|
38
|
-
"use strict";class FileSystem{constructor(t="/",e={}){this.fileSystem=e,this.cwd=t}getFileByPath(t){return this._getFileByAbsolutePath(this._pathToAbsolute(t))}_pathToAbsolute(t){return t.startsWith("./")&&(t=t.substring(2)),t.startsWith("/")||(t=this.cwd+t),this._traverseComplexAbsolutePath(t)}_traverseComplexAbsolutePath(t){const e=t.split("/");for(;e.includes("..");){const t=e.indexOf("..")-1;e.splice(t,2)}return e.join("/")}setFileByPath(t,e,s=!1){const i=this._pathToAbsolute(t);this._setFileByAbsolutePath(i,e,s)}_setFileByAbsolutePath(t,e,s=!0){const i=t.split("/");i.shift();const l=i.pop();i.reduce((t,e)=>{if(!t[e]){if(!s)throw new Error(`${e}: No such file or directory`);t[e]={}}return t[e]},this.fileSystem)[l]=e}_getFileByAbsolutePath(t){const e=t.split("/");return e.shift(),e[e.length-1].length<1&&e.pop(),e.reduce((t,e)=>t&&t[e]?t[e]:null,this.fileSystem)}setCwd(t){this.cwd=this._pathToAbsolute(t.endsWith("/")?t:t+"/")}getRaw(){return this.fileSystem}addFiles(t){Object.entries(t).forEach(([t,e])=>{this.setFileByPath(t,e,!0)})}autoComplete(t,e){const s=this._pathToAbsolute(t).split("/"),i=s.pop(),l=this.getFileByPath(s.length>1?s.join("/"):"/"),h=this.getFileByPath(e);if(l.constructor===Object){let e=Object.keys(l).filter(t=>t.startsWith(i));i.length<1&&(e=e.filter(t=>!t.startsWith(".")));const s=t.split("/");if(s.pop(),e.length<1&&s.length<1&&(e=Object.keys(h).filter(t=>t.startsWith(i))),e.length)return{path:s.length?s.join("/"):null,options:e.map(t=>l[t].constructor===Object?t.concat("/"):t)}}return null}}module.exports=FileSystem;
|
|
39
|
-
|
|
40
|
-
},{}],7:[function(require,module,exports){
|
|
41
|
-
"use strict";const allowedType=["out","err"];class StdLine{constructor(t,e){if(!allowedType.includes(t))throw new Error("incorrect std output type");this.type=t,this.string=e}}module.exports=StdLine;
|
|
42
|
-
|
|
43
|
-
},{}],8:[function(require,module,exports){
|
|
44
|
-
"use strict";const Command=require(2);class Cat extends Command{get requiresFilesystem(){return!0}run(){if(1!==this.arguments.length)return Promise.reject("cat command requires a single argument");const e=this.fs.getFileByPath(this.arguments[0]);return e?e.constructor===Object?Promise.reject(`${this.arguments[0]}: Is a directory`):Promise.resolve(e):Promise.reject(`${this.arguments[0]}: No such file or directory`)}}module.exports=Cat;
|
|
45
|
-
|
|
46
|
-
},{"2":2}],9:[function(require,module,exports){
|
|
47
|
-
"use strict";const Command=require(2),Result=require(5);class Echo extends Command{run(){return 1!==this.arguments.length&&Promise.reject("echo command requires a single argument"),Promise.resolve(this.arguments[0])}}module.exports=Echo;
|
|
48
|
-
|
|
49
|
-
},{"2":2,"5":5}],11:[function(require,module,exports){
|
|
50
|
-
"use strict";const Command=require(2),commandLineArgs=require(22);class Ls extends Command{get requiresFilesystem(){return!0}run(){let t;try{t=this.parseArgs()}catch(t){return this.printHelp(t),Promise.reject()}if(t.help)return this.printHelp(),Promise.resolve();const e=this.fs.getFileByPath(t.path);if(!e)return Promise.reject(`${t.path}: No such file or directory`);if(e.constructor===Object){let r=e;return t.all||(r=Object.entries(r).reduce((t,[e,r])=>(e.startsWith(".")||(t[e]=r),t),{})),t.long?this.printLong(r):this.printSimple(Object.keys(r)),Promise.resolve()}return Promise.resolve(t.path)}printHelp(t){t&&(this.stdOut=t.message),this.stdOut="usage: ls [-alh] [file ...]"}printSimple(t){this.stdOut=t.reduce((t,e)=>t+this.padString(e),"")}printLong(t){Object.entries(t).forEach(([t,e])=>e.constructor===Object?this.stdOut=`drwxr-xr-x root users ${this.padString(JSON.stringify(e).length,10)} ${t}`:e.constructor===String&&e.startsWith("#!")?this.stdOut=`-rwxr-xr-x root users ${this.padString(e.length,10)} ${t}`:this.stdOut=`-rw-r--r-- root users ${this.padString(e.toString().length,10)} ${t}`)}padString(t,e=16){const r=e-t.toString().length;let s="";for(let t=0;t<r;t++)s+=" ";return t.toString()+s}parseArgs(){return commandLineArgs([{name:"path",defaultOption:!0,defaultValue:"./",type:String},{name:"all",alias:"a",type:Boolean},{name:"long",alias:"l",type:Boolean},{name:"help",alias:"h",type:Boolean}],{argv:this.arguments})}}module.exports=Ls;
|
|
51
|
-
|
|
52
|
-
},{"2":2,"22":22}],22:[function(require,module,exports){
|
|
53
|
-
(function (process){(function (){
|
|
54
|
-
"use strict";function _interopDefault(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var camelCase=_interopDefault(require(52));function isObject(t){return"object"==typeof t&&null!==t}function isArrayLike(t){return isObject(t)&&"number"==typeof t.length}function arrayify(t){return Array.isArray(t)?t:void 0===t?[]:isArrayLike(t)?Array.prototype.slice.call(t):[t]}function isObject$1(t){return"object"==typeof t&&null!==t}function isArrayLike$1(t){return isObject$1(t)&&"number"==typeof t.length}function arrayify$1(t){return Array.isArray(t)?t:void 0===t?[]:isArrayLike$1(t)?Array.prototype.slice.call(t):[t]}function findReplace(t,e){const n=[],i=arrayify$1(arguments);return i.splice(0,2),arrayify$1(t).forEach((t,o)=>{let s=[];i.forEach(e=>{"function"==typeof e?s=s.concat(e(t)):s.push(e)}),e(t)&&n.push({index:o,replaceWithValue:s})}),n.reverse().forEach(e=>{const n=[e.index,1].concat(e.replaceWithValue);t.splice.apply(t,n)}),t}const re={short:/^-([^\d-])$/,long:/^--(\S+)/,combinedShort:/^-[^\d-]{2,}$/,optEquals:/^(--\S+?)=(.*)/};class ArgvArray extends Array{load(t){if(this.clear(),t&&t!==process.argv)t=arrayify(t);else{t=process.argv.slice(0);const e=process.execArgv.some(isExecArg)?1:2;t.splice(0,e)}t.forEach(t=>this.push(String(t)))}clear(){this.length=0}expandOptionEqualsNotation(){if(this.some(t=>re.optEquals.test(t))){const t=[];this.forEach(e=>{const n=e.match(re.optEquals);n?t.push(n[1],n[2]):t.push(e)}),this.clear(),this.load(t)}}expandGetoptNotation(){this.hasCombinedShortOptions()&&findReplace(this,re.combinedShort,expandCombinedShortArg)}hasCombinedShortOptions(){return this.some(t=>re.combinedShort.test(t))}static from(t){const e=new this;return e.load(t),e}}function expandCombinedShortArg(t){return(t=t.slice(1)).split("").map(t=>"-"+t)}function isOptionEqualsNotation(t){return re.optEquals.test(t)}function isOption(t){return(re.short.test(t)||re.long.test(t))&&!re.optEquals.test(t)}function isLongOption(t){return re.long.test(t)&&!isOptionEqualsNotation(t)}function getOptionName(t){return re.short.test(t)?t.match(re.short)[1]:isLongOption(t)?t.match(re.long)[1]:isOptionEqualsNotation(t)?t.match(re.optEquals)[1].replace(/^--/,""):null}function isValue(t){return!(isOption(t)||re.combinedShort.test(t)||re.optEquals.test(t))}function isExecArg(t){return["--eval","-e"].indexOf(t)>-1||t.startsWith("--eval=")}function isNumber(t){return!isNaN(parseFloat(t))&&isFinite(t)}function isPlainObject(t){return null!==t&&"object"==typeof t&&t.constructor===Object}function isArrayLike$2(t){return isObject$2(t)&&"number"==typeof t.length}function isObject$2(t){return"object"==typeof t&&null!==t}function isDefined(t){return void 0!==t}function isString(t){return"string"==typeof t}function isBoolean(t){return"boolean"==typeof t}function isFunction(t){return"function"==typeof t}function isClass(t){return!!isFunction(t)&&/^class /.test(Function.prototype.toString.call(t))}function isPrimitive(t){if(null===t)return!0;switch(typeof t){case"string":case"number":case"symbol":case"undefined":case"boolean":return!0;default:return!1}}function isPromise(t){if(t){const e=isDefined(Promise)&&t instanceof Promise,n=t.then&&"function"==typeof t.then;return!(!e&&!n)}return!1}function isIterable(t){return!(null===t||!isDefined(t))&&("function"==typeof t[Symbol.iterator]||"function"==typeof t[Symbol.asyncIterator])}var t={isNumber:isNumber,isString:isString,isBoolean:isBoolean,isPlainObject:isPlainObject,isArrayLike:isArrayLike$2,isObject:isObject$2,isDefined:isDefined,isFunction:isFunction,isClass:isClass,isPrimitive:isPrimitive,isPromise:isPromise,isIterable:isIterable};class OptionDefinition{constructor(t){this.name=t.name,this.type=t.type||String,this.alias=t.alias,this.multiple=t.multiple,this.lazyMultiple=t.lazyMultiple,this.defaultOption=t.defaultOption,this.defaultValue=t.defaultValue,this.group=t.group;for(let e in t)this[e]||(this[e]=t[e])}isBoolean(){return this.type===Boolean||t.isFunction(this.type)&&"Boolean"===this.type.name}isMultiple(){return this.multiple||this.lazyMultiple}static create(t){return new this(t)}}class Definitions extends Array{validate(){let e;this.some(t=>!t.name)&&halt("INVALID_DEFINITIONS","Invalid option definitions: the `name` property is required on each definition"),this.some(t=>t.type&&"function"!=typeof t.type)&&halt("INVALID_DEFINITIONS","Invalid option definitions: the `type` property must be a setter fuction (default: `Boolean`)"),this.some(n=>(e=n,t.isDefined(n.alias)&&t.isNumber(n.alias)))&&halt("INVALID_DEFINITIONS","Invalid option definition: to avoid ambiguity an alias cannot be numeric [--"+e.name+" alias is -"+e.alias+"]"),this.some(n=>(e=n,t.isDefined(n.alias)&&1!==n.alias.length))&&halt("INVALID_DEFINITIONS","Invalid option definition: an alias must be a single character"),this.some(t=>(e=t,"-"===t.alias))&&halt("INVALID_DEFINITIONS",'Invalid option definition: an alias cannot be "-"'),hasDuplicates(this.map(t=>t.name))&&halt("INVALID_DEFINITIONS","Two or more option definitions have the same name"),hasDuplicates(this.map(t=>t.alias))&&halt("INVALID_DEFINITIONS","Two or more option definitions have the same alias"),hasDuplicates(this.map(t=>t.defaultOption))&&halt("INVALID_DEFINITIONS","Only one option definition can be the defaultOption"),this.some(t=>(e=t,t.isBoolean()&&t.defaultOption))&&halt("INVALID_DEFINITIONS",`A boolean option ["${e.name}"] can not also be the defaultOption.`)}get(t){return isOption(t)?re.short.test(t)?this.find(e=>e.alias===getOptionName(t)):this.find(e=>e.name===getOptionName(t)):this.find(e=>e.name===t)}getDefault(){return this.find(t=>!0===t.defaultOption)}isGrouped(){return this.some(t=>t.group)}whereGrouped(){return this.filter(containsValidGroup)}whereNotGrouped(){return this.filter(t=>!containsValidGroup(t))}whereDefaultValueSet(){return this.filter(e=>t.isDefined(e.defaultValue))}static from(t){if(t instanceof this)return t;const e=super.from(arrayify(t),t=>OptionDefinition.create(t));return e.validate(),e}}function halt(t,e){const n=new Error(e);throw n.name=t,n}function containsValidGroup(t){return arrayify(t.group).some(t=>t)}function hasDuplicates(e){const n={};for(let i=0;i<e.length;i++){const o=e[i];if(n[o])return!0;t.isDefined(o)&&(n[o]=!0)}}class ArgvParser{constructor(t,e){this.options=Object.assign({},e),this.definitions=Definitions.from(t),this.argv=ArgvArray.from(this.options.argv),this.argv.hasCombinedShortOptions()&&findReplace(this.argv,re.combinedShort.test.bind(re.combinedShort),t=>(t=t.slice(1)).split("").map(e=>({origArg:`-${t}`,arg:"-"+e})))}*[Symbol.iterator](){const e=this.definitions;let n,i,o,s,a,r=!1,l=!1;for(let u of this.argv){if(t.isPlainObject(u)&&(a=u.origArg,u=u.arg),l&&this.options.stopAtFirstUnknown){yield{event:"unknown_value",arg:u,name:"_unknown",value:void 0};continue}if(isOption(u))i=void 0,(n=e.get(u))?(i=!!n.isBoolean()||null,s="set"):s="unknown_option";else if(isOptionEqualsNotation(u)){const t=u.match(re.optEquals);(n=e.get(t[1]))?n.isBoolean()?(yield{event:"unknown_value",arg:u,name:"_unknown",value:i,def:n},s="set",i=!0):(s="set",i=t[2]):s="unknown_option"}else isValue(u)&&(n?(i=u,s="set"):(n=this.definitions.getDefault())&&!r?(i=u,s="set"):(s="unknown_value",n=void 0));const c={event:s,arg:u,name:o=n?n.name:"_unknown",value:i,def:n};a&&(c.subArg=u,c.arg=a),yield c,"_unknown"===o&&(l=!0),n&&n.defaultOption&&!n.isMultiple()&&"set"===s&&(r=!0),n&&n.isBoolean()&&(n=void 0),n&&!n.multiple&&t.isDefined(i)&&null!==i&&(n=void 0),i=void 0,s=void 0,o=void 0,a=void 0}}}const _value=new WeakMap;class Option{constructor(t){this.definition=new OptionDefinition(t),this.state=null,this.resetToDefault()}get(){return _value.get(this)}set(t){this._set(t,"set")}_set(t,e){const n=this.definition;if(n.isMultiple()){if(null!=t){const i=this.get();"default"===this.state&&(i.length=0),i.push(n.type(t)),this.state=e}}else{if(!n.isMultiple()&&"set"===this.state){const e=new Error(`Singular option already set [${this.definition.name}=${this.get()}]`);throw e.name="ALREADY_SET",e.value=t,e.optionName=n.name,e}null==t?_value.set(this,t):(_value.set(this,n.type(t)),this.state=e)}}resetToDefault(){t.isDefined(this.definition.defaultValue)?this.definition.isMultiple()?_value.set(this,arrayify(this.definition.defaultValue).slice()):_value.set(this,this.definition.defaultValue):this.definition.isMultiple()?_value.set(this,[]):_value.set(this,null),this.state="default"}static create(t){return(t=new OptionDefinition(t)).isBoolean()?FlagOption.create(t):new this(t)}}class FlagOption extends Option{set(t){super.set(!0)}static create(t){return new this(t)}}class Output extends Map{constructor(t){super(),this.definitions=Definitions.from(t),this.set("_unknown",Option.create({name:"_unknown",multiple:!0}));for(const t of this.definitions.whereDefaultValueSet())this.set(t.name,Option.create(t))}toObject(t){t=t||{};const e={};for(const n of this){const i=t.camelCase&&"_unknown"!==n[0]?camelCase(n[0]):n[0],o=n[1];("_unknown"!==i||o.get().length)&&(e[i]=o.get())}return t.skipUnknown&&delete e._unknown,e}}class GroupedOutput extends Output{toObject(e){const n=super.toObject({skipUnknown:e.skipUnknown}),i=super.toObject(e),o=i._unknown;delete i._unknown;const s={_all:i};return o&&o.length&&(s._unknown=o),this.definitions.whereGrouped().forEach(i=>{const o=e.camelCase?camelCase(i.name):i.name,a=n[i.name];for(const e of arrayify(i.group))s[e]=s[e]||{},t.isDefined(a)&&(s[e][o]=a)}),this.definitions.whereNotGrouped().forEach(i=>{const o=e.camelCase?camelCase(i.name):i.name,a=n[i.name];t.isDefined(a)&&(s._none||(s._none={}),s._none[o]=a)}),s}}function commandLineArgs(t,e){(e=e||{}).stopAtFirstUnknown&&(e.partial=!0),t=Definitions.from(t);const n=new ArgvParser(t,{argv:e.argv,stopAtFirstUnknown:e.stopAtFirstUnknown}),i=new(t.isGrouped()?GroupedOutput:Output)(t);for(const t of n){const n=t.subArg||t.arg;if(!e.partial){if("unknown_value"===t.event){const t=new Error(`Unknown value: ${n}`);throw t.name="UNKNOWN_VALUE",t.value=n,t}if("unknown_option"===t.event){const t=new Error(`Unknown option: ${n}`);throw t.name="UNKNOWN_OPTION",t.optionName=n,t}}let o;i.has(t.name)?o=i.get(t.name):(o=Option.create(t.def),i.set(t.name,o)),"_unknown"===t.name?o.set(n):o.set(t.value)}return i.toObject({skipUnknown:!e.partial,camelCase:e.camelCase})}module.exports=commandLineArgs;
|
|
55
|
-
|
|
56
|
-
}).call(this)}).call(this,require(56))
|
|
57
|
-
|
|
58
|
-
},{"52":52,"56":56}],13:[function(require,module,exports){
|
|
59
|
-
"use strict";const LocalCommand=require(12);class Alias extends LocalCommand{run(){if(1!==this.arguments.length)return Promise.reject("alias requires a single argument");const e=this.arguments[0].split("=");return 2!==e.length?Promise.reject("alias requires a key and value delimited by '=' ie: key=value"):(this.context.setAlias(e[0],e[1]),Promise.resolve())}}module.exports=Alias;
|
|
60
|
-
|
|
61
|
-
},{"12":12}],14:[function(require,module,exports){
|
|
62
|
-
"use strict";const LocalCommand=require(12);class CD extends LocalCommand{run(){if(1!==this.arguments.length)return Promise.reject("cd requires a single argument");const e=this.context.fs.getFileByPath(this.arguments[0]);return e?e.constructor===Object?(this.context.setCwd(this.arguments[0]),Promise.resolve()):Promise.reject(`${this.arguments[0]}: Not a directory`):Promise.reject("file or directory not found")}}module.exports=CD;
|
|
63
|
-
|
|
64
|
-
},{"12":12}],15:[function(require,module,exports){
|
|
65
|
-
"use strict";const LocalCommand=require(12);class Clear extends LocalCommand{run(){return this.arguments.length>0?Promise.reject("clear does not require arguments"):(this.context.clear(),Promise.resolve())}}module.exports=Clear;
|
|
66
|
-
|
|
67
|
-
},{"12":12}],16:[function(require,module,exports){
|
|
68
|
-
"use strict";const LocalCommand=require(12);class Exit extends LocalCommand{run(){const t=parseInt(this.arguments[0])||0;return this.exitCode=t,this.context.destroy(t),Promise.resolve()}}module.exports=Exit;
|
|
69
|
-
|
|
70
|
-
},{"12":12}],17:[function(require,module,exports){
|
|
71
|
-
"use strict";const LocalCommand=require(12);class Export extends LocalCommand{run(){if(1!==this.arguments.length)return Promise.reject("export requires a single argument");const e=this.arguments[0].split("=");return 2!==e.length&&Promise.reject("export requires a key and value delimited by '=' ie: key=value"),this.context.setVar(e[0],e[1]),Promise.resolve()}}module.exports=Export;
|
|
72
|
-
|
|
73
|
-
},{"12":12}],19:[function(require,module,exports){
|
|
74
|
-
"use strict";const ScriptCommand=require(6),LocalCommand=require(12),Shell=require(1);class Source extends LocalCommand{constructor(t,r){if(super(t,r),1!==this.arguments.length)return Promise.reject("source requires a single argument");const e=this.arguments[0];if(e.startsWith("./")||e.startsWith("/")){const s=this.context.fs.getFileByPath(e);if(s&&s.constructor===String&&s.startsWith("#!"))return new ScriptCommand(s,t,r,!0)}}run(){const t=this.arguments[0];if(t.startsWith("./")||t.startsWith("/")){const r=this.context.fs.getFileByPath(t);if(!r)return Promise.reject(`${t}: No such file or directory`);if(r.constructor===Object)return Promise.reject(`${t}: is a directory`);if(r.prototype&&r.prototype instanceof Command)return Promise.reject(`${t}: command not found`);if(r.constructor===String&&r.startsWith("#!"))return Promise.reject("FATAL: should not get here")}return Promise.reject(`${t}: permission denied`)}}module.exports=Source;
|
|
75
|
-
|
|
76
|
-
},{"1":1,"12":12,"6":6}],20:[function(require,module,exports){
|
|
77
|
-
"use strict";const LocalCommand=require(12);class Which extends LocalCommand{run(){if(1!==this.arguments.length)return Promise.reject("which requires a single argument");const t=this.context.fs.getFileByPath(`${this.context.getVar("PATH")}/${this.arguments[0]}}`);return t&&t.constructor!==Object&&t.constructor!==String?Promise.resolve(path):Promise.reject()}}module.exports=Which;
|
|
78
|
-
|
|
79
|
-
},{"12":12}],56:[function(require,module,exports){
|
|
80
|
-
var cachedSetTimeout,cachedClearTimeout,process=module.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex<t;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,t=queue.length}currentQueue=null,draining=!1,runClearTimeout(e)}}function Item(e,t){this.fun=e,this.array=t}function noop(){}process.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];queue.push(new Item(e,t)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.prependListener=noop,process.prependOnceListener=noop,process.listeners=function(e){return[]},process.binding=function(e){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(e){throw new Error("process.chdir is not supported")},process.umask=function(){return 0};
|
|
81
|
-
|
|
82
|
-
},{}],52:[function(require,module,exports){
|
|
83
|
-
(function (global){(function (){
|
|
84
|
-
var INFINITY=1/0,symbolTag="[object Symbol]",reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f\\ufe20-\\ufe23",rsComboSymbolsRange="\\u20d0-\\u20f0",rsDingbatRange="\\u2700-\\u27bf",rsLowerRange="a-z\\xdf-\\xf6\\xf8-\\xff",rsMathOpRange="\\xac\\xb1\\xd7\\xf7",rsNonCharRange="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rsPunctuationRange="\\u2000-\\u206f",rsSpaceRange=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rsUpperRange="A-Z\\xc0-\\xd6\\xd8-\\xde",rsVarRange="\\ufe0e\\ufe0f",rsBreakRange=rsMathOpRange+rsNonCharRange+rsPunctuationRange+rsSpaceRange,rsApos="['’]",rsAstral="["+rsAstralRange+"]",rsBreak="["+rsBreakRange+"]",rsCombo="["+rsComboMarksRange+rsComboSymbolsRange+"]",rsDigits="\\d+",rsDingbat="["+rsDingbatRange+"]",rsLower="["+rsLowerRange+"]",rsMisc="[^"+rsAstralRange+rsBreakRange+rsDigits+rsDingbatRange+rsLowerRange+rsUpperRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper="["+rsUpperRange+"]",rsZWJ="\\u200d",rsLowerMisc="(?:"+rsLower+"|"+rsMisc+")",rsUpperMisc="(?:"+rsUpper+"|"+rsMisc+")",rsOptLowerContr="(?:"+rsApos+"(?:d|ll|m|re|s|t|ve))?",rsOptUpperContr="(?:"+rsApos+"(?:D|LL|M|RE|S|T|VE))?",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsEmoji="(?:"+[rsDingbat,rsRegional,rsSurrPair].join("|")+")"+rsSeq,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")",reApos=RegExp(rsApos,"g"),reComboMark=RegExp(rsCombo,"g"),reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g"),reUnicodeWord=RegExp([rsUpper+"?"+rsLower+"+"+rsOptLowerContr+"(?="+[rsBreak,rsUpper,"$"].join("|")+")",rsUpperMisc+"+"+rsOptUpperContr+"(?="+[rsBreak,rsUpper+rsLowerMisc,"$"].join("|")+")",rsUpper+"?"+rsLowerMisc+"+"+rsOptLowerContr,rsUpper+"+"+rsOptUpperContr,rsDigits,rsEmoji].join("|"),"g"),reHasUnicode=RegExp("["+rsZWJ+rsAstralRange+rsComboMarksRange+rsComboSymbolsRange+rsVarRange+"]"),reHasUnicodeWord=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,deburredLetters={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},freeGlobal="object"==typeof global&&global&&global.Object===Object&&global,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")();function arrayReduce(r,e,o,s){var t=-1,n=r?r.length:0;for(s&&n&&(o=r[++t]);++t<n;)o=e(o,r[t],t,r);return o}function asciiToArray(r){return r.split("")}function asciiWords(r){return r.match(reAsciiWord)||[]}function basePropertyOf(r){return function(e){return null==r?void 0:r[e]}}var deburrLetter=basePropertyOf(deburredLetters);function hasUnicode(r){return reHasUnicode.test(r)}function hasUnicodeWord(r){return reHasUnicodeWord.test(r)}function stringToArray(r){return hasUnicode(r)?unicodeToArray(r):asciiToArray(r)}function unicodeToArray(r){return r.match(reUnicode)||[]}function unicodeWords(r){return r.match(reUnicodeWord)||[]}var objectProto=Object.prototype,objectToString=objectProto.toString,Symbol=root.Symbol,symbolProto=Symbol?Symbol.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseSlice(r,e,o){var s=-1,t=r.length;e<0&&(e=-e>t?0:t+e),(o=o>t?t:o)<0&&(o+=t),t=e>o?0:o-e>>>0,e>>>=0;for(var n=Array(t);++s<t;)n[s]=r[s+e];return n}function baseToString(r){if("string"==typeof r)return r;if(isSymbol(r))return symbolToString?symbolToString.call(r):"";var e=r+"";return"0"==e&&1/r==-INFINITY?"-0":e}function castSlice(r,e,o){var s=r.length;return o=void 0===o?s:o,!e&&o>=s?r:baseSlice(r,e,o)}function createCaseFirst(r){return function(e){var o=hasUnicode(e=toString(e))?stringToArray(e):void 0,s=o?o[0]:e.charAt(0),t=o?castSlice(o,1).join(""):e.slice(1);return s[r]()+t}}function createCompounder(r){return function(e){return arrayReduce(words(deburr(e).replace(reApos,"")),r,"")}}function isObjectLike(r){return!!r&&"object"==typeof r}function isSymbol(r){return"symbol"==typeof r||isObjectLike(r)&&objectToString.call(r)==symbolTag}function toString(r){return null==r?"":baseToString(r)}var camelCase=createCompounder(function(r,e,o){return e=e.toLowerCase(),r+(o?capitalize(e):e)});function capitalize(r){return upperFirst(toString(r).toLowerCase())}function deburr(r){return(r=toString(r))&&r.replace(reLatin,deburrLetter).replace(reComboMark,"")}var upperFirst=createCaseFirst("toUpperCase");function words(r,e,o){return r=toString(r),void 0===(e=o?void 0:e)?hasUnicodeWord(r)?unicodeWords(r):asciiWords(r):r.match(e)||[]}module.exports=camelCase;
|
|
85
|
-
|
|
86
|
-
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
87
|
-
|
|
88
|
-
},{}],23:[function(require,module,exports){
|
|
89
|
-
"use strict";var keys=require(54),hasSymbols="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),toStr=Object.prototype.toString,concat=Array.prototype.concat,origDefineProperty=Object.defineProperty,isFunction=function(e){return"function"==typeof e&&"[object Function]"===toStr.call(e)},arePropertyDescriptorsSupported=function(){var e={};try{for(var r in origDefineProperty(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}},supportsDescriptors=origDefineProperty&&arePropertyDescriptorsSupported(),defineProperty=function(e,r,t,o){(!(r in e)||isFunction(o)&&o())&&(supportsDescriptors?origDefineProperty(e,r,{configurable:!0,enumerable:!1,value:t,writable:!0}):e[r]=t)},defineProperties=function(e,r){var t=arguments.length>2?arguments[2]:{},o=keys(r);hasSymbols&&(o=concat.call(o,Object.getOwnPropertySymbols(r)));for(var n=0;n<o.length;n+=1)defineProperty(e,o[n],r[o[n]],t[o[n]])};defineProperties.supportsDescriptors=!!supportsDescriptors,module.exports=defineProperties;
|
|
90
|
-
|
|
91
|
-
},{"54":54}],54:[function(require,module,exports){
|
|
92
|
-
"use strict";var slice=Array.prototype.slice,isArgs=require(55),origKeys=Object.keys,keysShim=origKeys?function(e){return origKeys(e)}:require(53),originalKeys=Object.keys;keysShim.shim=function(){Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return isArgs(e)?originalKeys(slice.call(e)):originalKeys(e)}):Object.keys=keysShim;return Object.keys||keysShim},module.exports=keysShim;
|
|
93
|
-
|
|
94
|
-
},{"53":53,"55":55}],24:[function(require,module,exports){
|
|
95
|
-
"use strict";var undefined,generator,asyncFn,asyncGen,ThrowTypeError=Object.getOwnPropertyDescriptor?function(){return Object.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new TypeError},hasSymbols="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,getProto=Object.getPrototypeOf||function(e){return e.__proto__},generatorFunction=generator?getProto(generator):undefined,asyncFunction=asyncFn?asyncFn.constructor:undefined,asyncGenFunction=asyncGen?getProto(asyncGen):undefined,asyncGenIterator=asyncGen?asyncGen():undefined,TypedArray="undefined"==typeof Uint8Array?undefined:getProto(Uint8Array),INTRINSICS={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?undefined:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?undefined:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":hasSymbols?getProto([][Symbol.iterator]()):undefined,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":undefined,"$ %AsyncFunction%":asyncFunction,"$ %AsyncFunctionPrototype%":asyncFunction?asyncFunction.prototype:undefined,"$ %AsyncGenerator%":asyncGen?getProto(asyncGenIterator):undefined,"$ %AsyncGeneratorFunction%":asyncGenFunction,"$ %AsyncGeneratorPrototype%":asyncGenFunction?asyncGenFunction.prototype:undefined,"$ %AsyncIteratorPrototype%":asyncGenIterator&&hasSymbols&&Symbol.asyncIterator?asyncGenIterator[Symbol.asyncIterator]():undefined,"$ %Atomics%":"undefined"==typeof Atomics?undefined:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?undefined:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?undefined:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":Error,"$ %ErrorPrototype%":Error.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?undefined:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?undefined:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?undefined:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?undefined:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":generator?getProto(generator()):undefined,"$ %GeneratorFunction%":generatorFunction,"$ %GeneratorPrototype%":generatorFunction?generatorFunction.prototype:undefined,"$ %Int8Array%":"undefined"==typeof Int8Array?undefined:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?undefined:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?undefined:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?undefined:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?undefined:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?undefined:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":isNaN,"$ %IteratorPrototype%":hasSymbols?getProto(getProto([][Symbol.iterator]())):undefined,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?undefined:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&hasSymbols?getProto((new Map)[Symbol.iterator]()):undefined,"$ %MapPrototype%":"undefined"==typeof Map?undefined:Map.prototype,"$ %Math%":Math,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":Object,"$ %ObjectPrototype%":Object.prototype,"$ %ObjProto_toString%":Object.prototype.toString,"$ %ObjProto_valueOf%":Object.prototype.valueOf,"$ %parseFloat%":parseFloat,"$ %parseInt%":parseInt,"$ %Promise%":"undefined"==typeof Promise?undefined:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?undefined:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?undefined:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?undefined:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?undefined:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?undefined:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?undefined:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?undefined:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?undefined:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&hasSymbols?getProto((new Set)[Symbol.iterator]()):undefined,"$ %SetPrototype%":"undefined"==typeof Set?undefined:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?undefined:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?undefined:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":hasSymbols?getProto(""[Symbol.iterator]()):undefined,"$ %StringPrototype%":String.prototype,"$ %Symbol%":hasSymbols?Symbol:undefined,"$ %SymbolPrototype%":hasSymbols?Symbol.prototype:undefined,"$ %SyntaxError%":SyntaxError,"$ %SyntaxErrorPrototype%":SyntaxError.prototype,"$ %ThrowTypeError%":ThrowTypeError,"$ %TypedArray%":TypedArray,"$ %TypedArrayPrototype%":TypedArray?TypedArray.prototype:undefined,"$ %TypeError%":TypeError,"$ %TypeErrorPrototype%":TypeError.prototype,"$ %Uint8Array%":"undefined"==typeof Uint8Array?undefined:Uint8Array,"$ %Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?undefined:Uint8Array.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?undefined:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?undefined:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?undefined:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?undefined:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?undefined:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?undefined:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?undefined:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?undefined:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?undefined:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?undefined:WeakSet.prototype};module.exports=function(e,r){if(arguments.length>1&&"boolean"!=typeof r)throw new TypeError('"allowMissing" argument must be a boolean');var t="$ "+e;if(!(t in INTRINSICS))throw new SyntaxError("intrinsic "+e+" does not exist!");if(void 0===INTRINSICS[t]&&!r)throw new TypeError("intrinsic "+e+" exists, but is not available. Please file an issue!");return INTRINSICS[t]};
|
|
96
|
-
|
|
97
|
-
},{}],25:[function(require,module,exports){
|
|
98
|
-
"use strict";var has=require(47),toPrimitive=require(41),keys=require(54),GetIntrinsic=require(24),$TypeError=GetIntrinsic("%TypeError%"),$SyntaxError=GetIntrinsic("%SyntaxError%"),$Array=GetIntrinsic("%Array%"),$String=GetIntrinsic("%String%"),$Object=GetIntrinsic("%Object%"),$Number=GetIntrinsic("%Number%"),$Symbol=GetIntrinsic("%Symbol%",!0),$RegExp=GetIntrinsic("%RegExp%"),hasSymbols=!!$Symbol,assertRecord=require(30),$isNaN=require(34),$isFinite=require(33),MAX_SAFE_INTEGER=$Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,assign=require(31),sign=require(37),mod=require(36),isPrimitive=require(35),parseInteger=parseInt,bind=require(44),arraySlice=bind.call(Function.call,$Array.prototype.slice),strSlice=bind.call(Function.call,$String.prototype.slice),isBinary=bind.call(Function.call,$RegExp.prototype.test,/^0b[01]+$/i),isOctal=bind.call(Function.call,$RegExp.prototype.test,/^0o[0-7]+$/i),regexExec=bind.call(Function.call,$RegExp.prototype.exec),nonWS=["
","",""].join(""),nonWSregex=new $RegExp("["+nonWS+"]","g"),hasNonWS=bind.call(Function.call,$RegExp.prototype.test,nonWSregex),invalidHexLiteral=/^[-+]0x[0-9a-f]+$/i,isInvalidHexLiteral=bind.call(Function.call,$RegExp.prototype.test,invalidHexLiteral),$charCodeAt=bind.call(Function.call,$String.prototype.charCodeAt),toStr=bind.call(Function.call,Object.prototype.toString),$NumberValueOf=bind.call(Function.call,GetIntrinsic("%NumberPrototype%").valueOf),$BooleanValueOf=bind.call(Function.call,GetIntrinsic("%BooleanPrototype%").valueOf),$StringValueOf=bind.call(Function.call,GetIntrinsic("%StringPrototype%").valueOf),$DateValueOf=bind.call(Function.call,GetIntrinsic("%DatePrototype%").valueOf),$floor=Math.floor,$abs=Math.abs,$ObjectCreate=Object.create,$gOPD=$Object.getOwnPropertyDescriptor,$isExtensible=$Object.isExtensible,$defineProperty=$Object.defineProperty,ws=["\t\n\v\f\r "," \u2028","\u2029\ufeff"].join(""),trimRegex=new RegExp("(^["+ws+"]+)|(["+ws+"]+$)","g"),replace=bind.call(Function.call,$String.prototype.replace),trim=function(e){return replace(e,trimRegex,"")},ES5=require(29),hasRegExpMatcher=require(50),ES6=assign(assign({},ES5),{Call:function(e,r){var t=arguments.length>2?arguments[2]:[];if(!this.IsCallable(e))throw new $TypeError(e+" is not a function");return e.apply(r,t)},ToPrimitive:toPrimitive,ToNumber:function(e){var r=isPrimitive(e)?e:toPrimitive(e,$Number);if("symbol"==typeof r)throw new $TypeError("Cannot convert a Symbol value to a number");if("string"==typeof r){if(isBinary(r))return this.ToNumber(parseInteger(strSlice(r,2),2));if(isOctal(r))return this.ToNumber(parseInteger(strSlice(r,2),8));if(hasNonWS(r)||isInvalidHexLiteral(r))return NaN;var t=trim(r);if(t!==r)return this.ToNumber(t)}return $Number(r)},ToInt16:function(e){var r=this.ToUint16(e);return r>=32768?r-65536:r},ToInt8:function(e){var r=this.ToUint8(e);return r>=128?r-256:r},ToUint8:function(e){var r=this.ToNumber(e);if($isNaN(r)||0===r||!$isFinite(r))return 0;var t=sign(r)*$floor($abs(r));return mod(t,256)},ToUint8Clamp:function(e){var r=this.ToNumber(e);if($isNaN(r)||r<=0)return 0;if(r>=255)return 255;var t=$floor(e);return t+.5<r?t+1:r<t+.5?t:t%2!=0?t+1:t},ToString:function(e){if("symbol"==typeof e)throw new $TypeError("Cannot convert a Symbol value to a string");return $String(e)},ToObject:function(e){return this.RequireObjectCoercible(e),$Object(e)},ToPropertyKey:function(e){var r=this.ToPrimitive(e,$String);return"symbol"==typeof r?r:this.ToString(r)},ToLength:function(e){var r=this.ToInteger(e);return r<=0?0:r>MAX_SAFE_INTEGER?MAX_SAFE_INTEGER:r},CanonicalNumericIndexString:function(e){if("[object String]"!==toStr(e))throw new $TypeError("must be a string");if("-0"===e)return-0;var r=this.ToNumber(e);return this.SameValue(this.ToString(r),e)?r:void 0},RequireObjectCoercible:ES5.CheckObjectCoercible,IsArray:$Array.isArray||function(e){return"[object Array]"===toStr(e)},IsConstructor:function(e){return"function"==typeof e&&!!e.prototype},IsExtensible:Object.preventExtensions?function(e){return!isPrimitive(e)&&$isExtensible(e)}:function(e){return!0},IsInteger:function(e){if("number"!=typeof e||$isNaN(e)||!$isFinite(e))return!1;var r=$abs(e);return $floor(r)===r},IsPropertyKey:function(e){return"string"==typeof e||"symbol"==typeof e},IsRegExp:function(e){if(!e||"object"!=typeof e)return!1;if(hasSymbols){var r=e[$Symbol.match];if(void 0!==r)return ES5.ToBoolean(r)}return hasRegExpMatcher(e)},SameValueZero:function(e,r){return e===r||$isNaN(e)&&$isNaN(r)},GetV:function(e,r){if(!this.IsPropertyKey(r))throw new $TypeError("Assertion failed: IsPropertyKey(P) is not true");return this.ToObject(e)[r]},GetMethod:function(e,r){if(!this.IsPropertyKey(r))throw new $TypeError("Assertion failed: IsPropertyKey(P) is not true");var t=this.GetV(e,r);if(null!=t){if(!this.IsCallable(t))throw new $TypeError(r+"is not a function");return t}},Get:function(e,r){if("Object"!==this.Type(e))throw new $TypeError("Assertion failed: Type(O) is not Object");if(!this.IsPropertyKey(r))throw new $TypeError("Assertion failed: IsPropertyKey(P) is not true");return e[r]},Type:function(e){return"symbol"==typeof e?"Symbol":ES5.Type(e)},SpeciesConstructor:function(e,r){if("Object"!==this.Type(e))throw new $TypeError("Assertion failed: Type(O) is not Object");var t=e.constructor;if(void 0===t)return r;if("Object"!==this.Type(t))throw new $TypeError("O.constructor is not an Object");var i=hasSymbols&&$Symbol.species?t[$Symbol.species]:void 0;if(null==i)return r;if(this.IsConstructor(i))return i;throw new $TypeError("no constructor found")},CompletePropertyDescriptor:function(e){return assertRecord(this,"Property Descriptor","Desc",e),this.IsGenericDescriptor(e)||this.IsDataDescriptor(e)?(has(e,"[[Value]]")||(e["[[Value]]"]=void 0),has(e,"[[Writable]]")||(e["[[Writable]]"]=!1)):(has(e,"[[Get]]")||(e["[[Get]]"]=void 0),has(e,"[[Set]]")||(e["[[Set]]"]=void 0)),has(e,"[[Enumerable]]")||(e["[[Enumerable]]"]=!1),has(e,"[[Configurable]]")||(e["[[Configurable]]"]=!1),e},Set:function(e,r,t,i){if("Object"!==this.Type(e))throw new $TypeError("O must be an Object");if(!this.IsPropertyKey(r))throw new $TypeError("P must be a Property Key");if("Boolean"!==this.Type(i))throw new $TypeError("Throw must be a Boolean");if(i)return e[r]=t,!0;try{e[r]=t}catch(e){return!1}},HasOwnProperty:function(e,r){if("Object"!==this.Type(e))throw new $TypeError("O must be an Object");if(!this.IsPropertyKey(r))throw new $TypeError("P must be a Property Key");return has(e,r)},HasProperty:function(e,r){if("Object"!==this.Type(e))throw new $TypeError("O must be an Object");if(!this.IsPropertyKey(r))throw new $TypeError("P must be a Property Key");return r in e},IsConcatSpreadable:function(e){if("Object"!==this.Type(e))return!1;if(hasSymbols&&"symbol"==typeof $Symbol.isConcatSpreadable){var r=this.Get(e,Symbol.isConcatSpreadable);if(void 0!==r)return this.ToBoolean(r)}return this.IsArray(e)},Invoke:function(e,r){if(!this.IsPropertyKey(r))throw new $TypeError("P must be a Property Key");var t=arraySlice(arguments,2),i=this.GetV(e,r);return this.Call(i,e,t)},GetIterator:function(e,r){if(!hasSymbols)throw new SyntaxError("ES.GetIterator depends on native iterator support.");var t=r;arguments.length<2&&(t=this.GetMethod(e,$Symbol.iterator));var i=this.Call(t,e);if("Object"!==this.Type(i))throw new $TypeError("iterator must return an object");return i},IteratorNext:function(e,r){var t=this.Invoke(e,"next",arguments.length<2?[]:[r]);if("Object"!==this.Type(t))throw new $TypeError("iterator next must return an object");return t},IteratorComplete:function(e){if("Object"!==this.Type(e))throw new $TypeError("Assertion failed: Type(iterResult) is not Object");return this.ToBoolean(this.Get(e,"done"))},IteratorValue:function(e){if("Object"!==this.Type(e))throw new $TypeError("Assertion failed: Type(iterResult) is not Object");return this.Get(e,"value")},IteratorStep:function(e){var r=this.IteratorNext(e);return!0!==this.IteratorComplete(r)&&r},IteratorClose:function(e,r){if("Object"!==this.Type(e))throw new $TypeError("Assertion failed: Type(iterator) is not Object");if(!this.IsCallable(r))throw new $TypeError("Assertion failed: completion is not a thunk for a Completion Record");var t,i=r,n=this.GetMethod(e,"return");if(void 0===n)return i();try{var o=this.Call(n,e,[])}catch(e){throw t=i(),i=null,e}if(t=i(),i=null,"Object"!==this.Type(o))throw new $TypeError("iterator .return must return an object");return t},CreateIterResultObject:function(e,r){if("Boolean"!==this.Type(r))throw new $TypeError("Assertion failed: Type(done) is not Boolean");return{value:e,done:r}},RegExpExec:function(e,r){if("Object"!==this.Type(e))throw new $TypeError("R must be an Object");if("String"!==this.Type(r))throw new $TypeError("S must be a String");var t=this.Get(e,"exec");if(this.IsCallable(t)){var i=this.Call(t,e,[r]);if(null===i||"Object"===this.Type(i))return i;throw new $TypeError('"exec" method must return `null` or an Object')}return regexExec(e,r)},ArraySpeciesCreate:function(e,r){if(!this.IsInteger(r)||r<0)throw new $TypeError("Assertion failed: length must be an integer >= 0");var t,i=0===r?0:r;if(this.IsArray(e)&&(t=this.Get(e,"constructor"),"Object"===this.Type(t)&&hasSymbols&&$Symbol.species&&null===(t=this.Get(t,$Symbol.species))&&(t=void 0)),void 0===t)return $Array(i);if(!this.IsConstructor(t))throw new $TypeError("C must be a constructor");return new t(i)},CreateDataProperty:function(e,r,t){if("Object"!==this.Type(e))throw new $TypeError("Assertion failed: Type(O) is not Object");if(!this.IsPropertyKey(r))throw new $TypeError("Assertion failed: IsPropertyKey(P) is not true");var i=$gOPD(e,r),n=i||"function"!=typeof $isExtensible||$isExtensible(e);return!(!(!i||i.writable&&i.configurable)||!n)&&($defineProperty(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}),!0)},CreateDataPropertyOrThrow:function(e,r,t){if("Object"!==this.Type(e))throw new $TypeError("Assertion failed: Type(O) is not Object");if(!this.IsPropertyKey(r))throw new $TypeError("Assertion failed: IsPropertyKey(P) is not true");var i=this.CreateDataProperty(e,r,t);if(!i)throw new $TypeError("unable to create data property");return i},ObjectCreate:function(e,r){if(null!==e&&"Object"!==this.Type(e))throw new $TypeError("Assertion failed: proto must be null or an object");if((arguments.length<2?[]:r).length>0)throw new $SyntaxError("es-abstract does not yet support internal slots");if(null===e&&!$ObjectCreate)throw new $SyntaxError("native Object.create support is required to create null objects");return $ObjectCreate(e)},AdvanceStringIndex:function(e,r,t){if("String"!==this.Type(e))throw new $TypeError("S must be a String");if(!this.IsInteger(r)||r<0||r>MAX_SAFE_INTEGER)throw new $TypeError("Assertion failed: length must be an integer >= 0 and <= 2**53");if("Boolean"!==this.Type(t))throw new $TypeError("Assertion failed: unicode must be a Boolean");if(!t)return r+1;if(r+1>=e.length)return r+1;var i=$charCodeAt(e,r);if(i<55296||i>56319)return r+1;var n=$charCodeAt(e,r+1);return n<56320||n>57343?r+1:r+2},CreateMethodProperty:function(e,r,t){if("Object"!==this.Type(e))throw new $TypeError("Assertion failed: Type(O) is not Object");if(!this.IsPropertyKey(r))throw new $TypeError("Assertion failed: IsPropertyKey(P) is not true");return!!$defineProperty(e,r,{configurable:!0,enumerable:!1,value:t,writable:!0})},DefinePropertyOrThrow:function(e,r,t){if("Object"!==this.Type(e))throw new $TypeError("Assertion failed: Type(O) is not Object");if(!this.IsPropertyKey(r))throw new $TypeError("Assertion failed: IsPropertyKey(P) is not true");return!!$defineProperty(e,r,t)},DeletePropertyOrThrow:function(e,r){if("Object"!==this.Type(e))throw new $TypeError("Assertion failed: Type(O) is not Object");if(!this.IsPropertyKey(r))throw new $TypeError("Assertion failed: IsPropertyKey(P) is not true");var t=delete e[r];if(!t)throw new TypeError("Attempt to delete property failed.");return t},EnumerableOwnNames:function(e){if("Object"!==this.Type(e))throw new $TypeError("Assertion failed: Type(O) is not Object");return keys(e)},thisNumberValue:function(e){return"Number"===this.Type(e)?e:$NumberValueOf(e)},thisBooleanValue:function(e){return"Boolean"===this.Type(e)?e:$BooleanValueOf(e)},thisStringValue:function(e){return"String"===this.Type(e)?e:$StringValueOf(e)},thisTimeValue:function(e){return $DateValueOf(e)}});delete ES6.CheckObjectCoercible,module.exports=ES6;
|
|
99
|
-
|
|
100
|
-
},{"24":24,"29":29,"30":30,"31":31,"33":33,"34":34,"35":35,"36":36,"37":37,"41":41,"44":44,"47":47,"50":50,"54":54}],29:[function(require,module,exports){
|
|
101
|
-
"use strict";var GetIntrinsic=require(24),$Object=GetIntrinsic("%Object%"),$TypeError=GetIntrinsic("%TypeError%"),$String=GetIntrinsic("%String%"),assertRecord=require(30),$isNaN=require(34),$isFinite=require(33),sign=require(37),mod=require(36),IsCallable=require(48),toPrimitive=require(40),has=require(47),ES5={ToPrimitive:toPrimitive,ToBoolean:function(e){return!!e},ToNumber:function(e){return+e},ToInteger:function(e){var r=this.ToNumber(e);return $isNaN(r)?0:0!==r&&$isFinite(r)?sign(r)*Math.floor(Math.abs(r)):r},ToInt32:function(e){return this.ToNumber(e)>>0},ToUint32:function(e){return this.ToNumber(e)>>>0},ToUint16:function(e){var r=this.ToNumber(e);if($isNaN(r)||0===r||!$isFinite(r))return 0;var t=sign(r)*Math.floor(Math.abs(r));return mod(t,65536)},ToString:function(e){return $String(e)},ToObject:function(e){return this.CheckObjectCoercible(e),$Object(e)},CheckObjectCoercible:function(e,r){if(null==e)throw new $TypeError(r||"Cannot call method on "+e);return e},IsCallable:IsCallable,SameValue:function(e,r){return e===r?0!==e||1/e==1/r:$isNaN(e)&&$isNaN(r)},Type:function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0},IsPropertyDescriptor:function(e){if("Object"!==this.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var t in e)if(has(e,t)&&!r[t])return!1;var i=has(e,"[[Value]]"),o=has(e,"[[Get]]")||has(e,"[[Set]]");if(i&&o)throw new $TypeError("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(e){return void 0!==e&&(assertRecord(this,"Property Descriptor","Desc",e),!(!has(e,"[[Get]]")&&!has(e,"[[Set]]")))},IsDataDescriptor:function(e){return void 0!==e&&(assertRecord(this,"Property Descriptor","Desc",e),!(!has(e,"[[Value]]")&&!has(e,"[[Writable]]")))},IsGenericDescriptor:function(e){return void 0!==e&&(assertRecord(this,"Property Descriptor","Desc",e),!this.IsAccessorDescriptor(e)&&!this.IsDataDescriptor(e))},FromPropertyDescriptor:function(e){if(void 0===e)return e;if(assertRecord(this,"Property Descriptor","Desc",e),this.IsDataDescriptor(e))return{value:e["[[Value]]"],writable:!!e["[[Writable]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};if(this.IsAccessorDescriptor(e))return{get:e["[[Get]]"],set:e["[[Set]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};throw new $TypeError("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(e){if("Object"!==this.Type(e))throw new $TypeError("ToPropertyDescriptor requires an object");var r={};if(has(e,"enumerable")&&(r["[[Enumerable]]"]=this.ToBoolean(e.enumerable)),has(e,"configurable")&&(r["[[Configurable]]"]=this.ToBoolean(e.configurable)),has(e,"value")&&(r["[[Value]]"]=e.value),has(e,"writable")&&(r["[[Writable]]"]=this.ToBoolean(e.writable)),has(e,"get")){var t=e.get;if(void 0!==t&&!this.IsCallable(t))throw new TypeError("getter must be a function");r["[[Get]]"]=t}if(has(e,"set")){var i=e.set;if(void 0!==i&&!this.IsCallable(i))throw new $TypeError("setter must be a function");r["[[Set]]"]=i}if((has(r,"[[Get]]")||has(r,"[[Set]]"))&&(has(r,"[[Value]]")||has(r,"[[Writable]]")))throw new $TypeError("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return r}};module.exports=ES5;
|
|
102
|
-
|
|
103
|
-
},{"24":24,"30":30,"33":33,"34":34,"36":36,"37":37,"40":40,"47":47,"48":48}],31:[function(require,module,exports){
|
|
104
|
-
var bind=require(44),has=bind.call(Function.call,Object.prototype.hasOwnProperty),$assign=Object.assign;module.exports=function(n,i){if($assign)return $assign(n,i);for(var r in i)has(i,r)&&(n[r]=i[r]);return n};
|
|
105
|
-
|
|
106
|
-
},{"44":44}],34:[function(require,module,exports){
|
|
107
|
-
module.exports=Number.isNaN||function(e){return e!=e};
|
|
108
|
-
|
|
109
|
-
},{}],37:[function(require,module,exports){
|
|
110
|
-
module.exports=function(e){return e>=0?1:-1};
|
|
111
|
-
|
|
112
|
-
},{}],33:[function(require,module,exports){
|
|
113
|
-
var $isNaN=Number.isNaN||function(e){return e!=e};module.exports=Number.isFinite||function(e){return"number"==typeof e&&!$isNaN(e)&&e!==1/0&&e!==-1/0};
|
|
114
|
-
|
|
115
|
-
},{}],36:[function(require,module,exports){
|
|
116
|
-
module.exports=function(o,r){var t=o%r;return Math.floor(t>=0?t:t+r)};
|
|
117
|
-
|
|
118
|
-
},{}],35:[function(require,module,exports){
|
|
119
|
-
module.exports=function(o){return null===o||"function"!=typeof o&&"object"!=typeof o};
|
|
120
|
-
|
|
121
|
-
},{}],44:[function(require,module,exports){
|
|
122
|
-
"use strict";var implementation=require(43);module.exports=Function.prototype.bind||implementation;
|
|
123
|
-
|
|
124
|
-
},{"43":43}],50:[function(require,module,exports){
|
|
125
|
-
"use strict";var has=require(47),regexExec=RegExp.prototype.exec,gOPD=Object.getOwnPropertyDescriptor,tryRegexExecCall=function(e){try{var t=e.lastIndex;return e.lastIndex=0,regexExec.call(e),!0}catch(e){return!1}finally{e.lastIndex=t}},toStr=Object.prototype.toString,regexClass="[object RegExp]",hasToStringTag="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;module.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!hasToStringTag)return toStr.call(e)===regexClass;var t=gOPD(e,"lastIndex");return!(!t||!has(t,"value"))&&tryRegexExecCall(e)};
|
|
126
|
-
|
|
127
|
-
},{"47":47}],30:[function(require,module,exports){
|
|
128
|
-
"use strict";var GetIntrinsic=require(24),$TypeError=GetIntrinsic("%TypeError%"),$SyntaxError=GetIntrinsic("%SyntaxError%"),has=require(47),predicates={"Property Descriptor":function(r,e){if("Object"!==r.Type(e))return!1;var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(has(e,n)&&!t[n])return!1;var o=has(e,"[[Value]]"),a=has(e,"[[Get]]")||has(e,"[[Set]]");if(o&&a)throw new $TypeError("Property Descriptors may not be both accessor and data descriptors");return!0}};module.exports=function(r,e,t,n){var o=predicates[e];if("function"!=typeof o)throw new $SyntaxError("unknown record type: "+e);if(!o(r,n))throw new $TypeError(t+" must be a "+e);console.log(o(r,n),n)};
|
|
129
|
-
|
|
130
|
-
},{"24":24,"47":47}],47:[function(require,module,exports){
|
|
131
|
-
"use strict";var bind=require(44);module.exports=bind.call(Function.call,Object.prototype.hasOwnProperty);
|
|
132
|
-
|
|
133
|
-
},{"44":44}],41:[function(require,module,exports){
|
|
134
|
-
"use strict";module.exports=require(39);
|
|
135
|
-
|
|
136
|
-
},{"39":39}],26:[function(require,module,exports){
|
|
137
|
-
"use strict";var ES2015=require(25),assign=require(31),ES2016=assign(assign({},ES2015),{SameValueNonNumber:function(e,r){if("number"==typeof e||typeof e!=typeof r)throw new TypeError("SameValueNonNumber requires two non-number values of the same type.");return this.SameValue(e,r)}});module.exports=ES2016;
|
|
138
|
-
|
|
139
|
-
},{"25":25,"31":31}],27:[function(require,module,exports){
|
|
140
|
-
"use strict";var bind=require(44),ES2016=require(26),assign=require(31),forEach=require(32),GetIntrinsic=require(24),$TypeError=GetIntrinsic("%TypeError%"),$isEnumerable=bind.call(Function.call,GetIntrinsic("%ObjectPrototype%").propertyIsEnumerable),$pushApply=bind.call(Function.apply,GetIntrinsic("%ArrayPrototype%").push),ES2017=assign(assign({},ES2016),{ToIndex:function(e){if(void 0===e)return 0;var r=this.ToInteger(e);if(r<0)throw new RangeError("index must be >= 0");var n=this.ToLength(r);if(!this.SameValueZero(r,n))throw new RangeError("index must be >= 0 and < 2 ** 53 - 1");return n},EnumerableOwnProperties:function(e,r){var n=ES2016.EnumerableOwnNames(e);if("key"===r)return n;if("value"===r||"key+value"===r){var i=[];return forEach(n,function(n){$isEnumerable(e,n)&&$pushApply(i,["value"===r?e[n]:[n,e[n]]])}),i}throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": '+r)}});delete ES2017.EnumerableOwnNames,module.exports=ES2017;
|
|
141
|
-
|
|
142
|
-
},{"24":24,"26":26,"31":31,"32":32,"44":44}],32:[function(require,module,exports){
|
|
143
|
-
"use strict";module.exports=function(t,e){for(var o=0;o<t.length;o+=1)e(t[o],o,t)};
|
|
144
|
-
|
|
145
|
-
},{}],28:[function(require,module,exports){
|
|
146
|
-
"use strict";var bind=require(44),keys=require(54),ES2017=require(27),assign=require(31),forEach=require(32),GetIntrinsic=require(24),$String=GetIntrinsic("%String%"),$Object=GetIntrinsic("%Object%"),$SymbolProto=GetIntrinsic("%SymbolPrototype%",!0),$SymbolValueOf=$SymbolProto?bind.call(Function.call,$SymbolProto.valueOf):null,$StringProto=GetIntrinsic("%StringPrototype%"),$charAt=bind.call(Function.call,$StringProto.charAt),$PromiseResolveOrig=GetIntrinsic("%Promise_resolve%",!0),$PromiseResolve=$PromiseResolveOrig?bind.call(Function.call,$PromiseResolveOrig):null,$isEnumerable=bind.call(Function.call,GetIntrinsic("%ObjectPrototype%").propertyIsEnumerable),$pushApply=bind.call(Function.apply,GetIntrinsic("%ArrayPrototype%").push),$gOPS=$SymbolValueOf?$Object.getOwnPropertySymbols:null,OwnPropertyKeys=function(e,r){var t=keys(r);return $gOPS&&$pushApply(t,$gOPS(r)),t},ES2018=assign(assign({},ES2017),{EnumerableOwnPropertyNames:ES2017.EnumerableOwnProperties,thisSymbolValue:function(e){if(!$SymbolValueOf)throw new SyntaxError("Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object");return"Symbol"===this.Type(e)?e:$SymbolValueOf(e)},IsStringPrefix:function(e,r){if("String"!==this.Type(e))throw new TypeError('Assertion failed: "p" must be a String');if("String"!==this.Type(r))throw new TypeError('Assertion failed: "q" must be a String');if(e===r||""===e)return!0;var t=e.length;if(t>=r.length)return!1;for(var o=0;o<t;o+=1)if($charAt(e,o)!==$charAt(r,o))return!1;return!0},NumberToString:function(e){if("Number"!==this.Type(e))throw new TypeError('Assertion failed: "m" must be a String');return $String(e)},CopyDataProperties:function(e,r,t){if("Object"!==this.Type(e))throw new TypeError('Assertion failed: "target" must be an Object');if(!this.IsArray(t))throw new TypeError('Assertion failed: "excludedItems" must be a List of Property Keys');for(var o=0;o<t.length;o+=1)if(!this.IsPropertyKey(t[o]))throw new TypeError('Assertion failed: "excludedItems" must be a List of Property Keys');if(null==r)return e;var i=this,n=i.ToObject(r),s=OwnPropertyKeys(i,n);return forEach(s,function(o){var s=!1;forEach(t,function(e){!0===i.SameValue(e,o)&&(s=!0)});var l=$isEnumerable(n,o)||"string"==typeof r&&o>=0&&i.IsInteger(i.ToNumber(o));if(!1===s&&l){var a=i.Get(n,o);i.CreateDataProperty(e,o,a)}}),e},PromiseResolve:function(e,r){if(!$PromiseResolve)throw new SyntaxError("This environment does not support Promises.");return $PromiseResolve(e,r)}});delete ES2018.EnumerableOwnProperties,delete ES2018.IsPropertyDescriptor,module.exports=ES2018;
|
|
147
|
-
|
|
148
|
-
},{"24":24,"27":27,"31":31,"32":32,"44":44,"54":54}],48:[function(require,module,exports){
|
|
149
|
-
"use strict";var fnToStr=Function.prototype.toString,constructorRegex=/^\s*class\b/,isES6ClassFn=function(t){try{var n=fnToStr.call(t);return constructorRegex.test(n)}catch(t){return!1}},tryFunctionObject=function(t){try{return!isES6ClassFn(t)&&(fnToStr.call(t),!0)}catch(t){return!1}},toStr=Object.prototype.toString,fnClass="[object Function]",genClass="[object GeneratorFunction]",hasToStringTag="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;module.exports=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(hasToStringTag)return tryFunctionObject(t);if(isES6ClassFn(t))return!1;var n=toStr.call(t);return n===fnClass||n===genClass};
|
|
150
|
-
|
|
151
|
-
},{}],40:[function(require,module,exports){
|
|
152
|
-
"use strict";var toStr=Object.prototype.toString,isPrimitive=require(42),isCallable=require(48),ES5internalSlots={"[[DefaultValue]]":function(e){var t;if((t=arguments.length>1?arguments[1]:"[object Date]"===toStr.call(e)?String:Number)===String||t===Number){var r,i,l=t===String?["toString","valueOf"]:["valueOf","toString"];for(i=0;i<l.length;++i)if(isCallable(e[l[i]])&&(r=e[l[i]](),isPrimitive(r)))return r;throw new TypeError("No default value")}throw new TypeError("invalid [[DefaultValue]] hint supplied")}};module.exports=function(e){return isPrimitive(e)?e:arguments.length>1?ES5internalSlots["[[DefaultValue]]"](e,arguments[1]):ES5internalSlots["[[DefaultValue]]"](e)};
|
|
153
|
-
|
|
154
|
-
},{"42":42,"48":48}],38:[function(require,module,exports){
|
|
155
|
-
"use strict";var assign=require(31),ES5=require(29),ES2015=require(25),ES2016=require(26),ES2017=require(27),ES2018=require(28),ES={ES5:ES5,ES6:ES2015,ES2015:ES2015,ES7:ES2016,ES2016:ES2016,ES2017:ES2017,ES2018:ES2018};assign(ES,ES5),delete ES.CheckObjectCoercible,assign(ES,ES2015),module.exports=ES;
|
|
156
|
-
|
|
157
|
-
},{"25":25,"26":26,"27":27,"28":28,"29":29,"31":31}],39:[function(require,module,exports){
|
|
158
|
-
"use strict";var hasSymbols="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,isPrimitive=require(42),isCallable=require(48),isDate=require(49),isSymbol=require(51),ordinaryToPrimitive=function(r,e){if(null==r)throw new TypeError("Cannot call method on "+r);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var i,t,o,l="string"===e?["toString","valueOf"]:["valueOf","toString"];for(o=0;o<l.length;++o)if(i=r[l[o]],isCallable(i)&&(t=i.call(r),isPrimitive(t)))return t;throw new TypeError("No default value")},GetMethod=function(r,e){var i=r[e];if(null!=i){if(!isCallable(i))throw new TypeError(i+" returned for property "+e+" of object "+r+" is not a function");return i}};module.exports=function(r){if(isPrimitive(r))return r;var e,i="default";if(arguments.length>1&&(arguments[1]===String?i="string":arguments[1]===Number&&(i="number")),hasSymbols&&(Symbol.toPrimitive?e=GetMethod(r,Symbol.toPrimitive):isSymbol(r)&&(e=Symbol.prototype.valueOf)),void 0!==e){var t=e.call(r,i);if(isPrimitive(t))return t;throw new TypeError("unable to convert exotic object to primitive")}return"default"===i&&(isDate(r)||isSymbol(r))&&(i="string"),ordinaryToPrimitive(r,"default"===i?"number":i)};
|
|
159
|
-
|
|
160
|
-
},{"42":42,"48":48,"49":49,"51":51}],42:[function(require,module,exports){
|
|
161
|
-
module.exports=function(o){return null===o||"function"!=typeof o&&"object"!=typeof o};
|
|
162
|
-
|
|
163
|
-
},{}],49:[function(require,module,exports){
|
|
164
|
-
"use strict";var getDay=Date.prototype.getDay,tryDateObject=function(t){try{return getDay.call(t),!0}catch(t){return!1}},toStr=Object.prototype.toString,dateClass="[object Date]",hasToStringTag="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;module.exports=function(t){return"object"==typeof t&&null!==t&&(hasToStringTag?tryDateObject(t):toStr.call(t)===dateClass)};
|
|
165
|
-
|
|
166
|
-
},{}],51:[function(require,module,exports){
|
|
167
|
-
"use strict";var toStr=Object.prototype.toString,hasSymbols=require(45)();if(hasSymbols){var symToStr=Symbol.prototype.toString,symStringRegex=/^Symbol\(.*\)$/,isSymbolObject=function(t){return"symbol"==typeof t.valueOf()&&symStringRegex.test(symToStr.call(t))};module.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==toStr.call(t))return!1;try{return isSymbolObject(t)}catch(t){return!1}}}else module.exports=function(t){return!1};
|
|
168
|
-
|
|
169
|
-
},{"45":45}],43:[function(require,module,exports){
|
|
170
|
-
"use strict";var ERROR_MESSAGE="Function.prototype.bind called on incompatible ",slice=Array.prototype.slice,toStr=Object.prototype.toString,funcType="[object Function]";module.exports=function(t){var n=this;if("function"!=typeof n||toStr.call(n)!==funcType)throw new TypeError(ERROR_MESSAGE+n);for(var o,e=slice.call(arguments,1),r=Math.max(0,n.length-e.length),c=[],i=0;i<r;i++)c.push("$"+i);if(o=Function("binder","return function ("+c.join(",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof o){var r=n.apply(this,e.concat(slice.call(arguments)));return Object(r)===r?r:this}return n.apply(t,e.concat(slice.call(arguments)))}),n.prototype){var p=function(){};p.prototype=n.prototype,o.prototype=new p,p.prototype=null}return o};
|
|
171
|
-
|
|
172
|
-
},{}],45:[function(require,module,exports){
|
|
173
|
-
(function (global){(function (){
|
|
174
|
-
"use strict";var origSymbol=global.Symbol,hasSymbolSham=require(46);module.exports=function(){return"function"==typeof origSymbol&&("function"==typeof Symbol&&("symbol"==typeof origSymbol("foo")&&("symbol"==typeof Symbol("bar")&&hasSymbolSham())))};
|
|
175
|
-
|
|
176
|
-
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
177
|
-
|
|
178
|
-
},{"46":46}],46:[function(require,module,exports){
|
|
179
|
-
"use strict";module.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(t,e);if(42!==n.value||!0!==n.enumerable)return!1}return!0};
|
|
180
|
-
|
|
181
|
-
},{}],53:[function(require,module,exports){
|
|
182
|
-
"use strict";var keysShim;if(!Object.keys){var has=Object.prototype.hasOwnProperty,toStr=Object.prototype.toString,isArgs=require(55),isEnumerable=Object.prototype.propertyIsEnumerable,hasDontEnumBug=!isEnumerable.call({toString:null},"toString"),hasProtoEnumBug=isEnumerable.call(function(){},"prototype"),dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],equalsConstructorPrototype=function(t){var o=t.constructor;return o&&o.prototype===t},excludedKeys={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},hasAutomationEqualityBug=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!excludedKeys["$"+t]&&has.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{equalsConstructorPrototype(window[t])}catch(t){return!0}}catch(t){return!0}return!1}(),equalsConstructorPrototypeIfNotBuggy=function(t){if("undefined"==typeof window||!hasAutomationEqualityBug)return equalsConstructorPrototype(t);try{return equalsConstructorPrototype(t)}catch(t){return!1}};keysShim=function(t){var o=null!==t&&"object"==typeof t,r="[object Function]"===toStr.call(t),e=isArgs(t),n=o&&"[object String]"===toStr.call(t),u=[];if(!o&&!r&&!e)throw new TypeError("Object.keys called on a non-object");var s=hasProtoEnumBug&&r;if(n&&t.length>0&&!has.call(t,0))for(var a=0;a<t.length;++a)u.push(String(a));if(e&&t.length>0)for(var l=0;l<t.length;++l)u.push(String(l));else for(var i in t)s&&"prototype"===i||!has.call(t,i)||u.push(String(i));if(hasDontEnumBug)for(var c=equalsConstructorPrototypeIfNotBuggy(t),p=0;p<dontEnums.length;++p)c&&"constructor"===dontEnums[p]||!has.call(t,dontEnums[p])||u.push(dontEnums[p]);return u}}module.exports=keysShim;
|
|
183
|
-
|
|
184
|
-
},{"55":55}],55:[function(require,module,exports){
|
|
185
|
-
"use strict";var toStr=Object.prototype.toString;module.exports=function(t){var e=toStr.call(t),o="[object Arguments]"===e;return o||(o="[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===toStr.call(t.callee)),o};
|
|
186
|
-
|
|
187
|
-
},{}],57:[function(require,module,exports){
|
|
188
|
-
"use strict";var toObject=Object,TypeErr=TypeError;module.exports=function(){if(null!=this&&this!==toObject(this))throw new TypeErr("RegExp.prototype.flags getter called on non-object");var t="";return this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.sticky&&(t+="y"),t};
|
|
189
|
-
|
|
190
|
-
},{}],58:[function(require,module,exports){
|
|
191
|
-
"use strict";var define=require(23),implementation=require(57),getPolyfill=require(59),shim=require(60),flagsBound=Function.call.bind(implementation);define(flagsBound,{getPolyfill:getPolyfill,implementation:implementation,shim:shim}),module.exports=flagsBound;
|
|
192
|
-
|
|
193
|
-
},{"23":23,"57":57,"59":59,"60":60}],60:[function(require,module,exports){
|
|
194
|
-
"use strict";var supportsDescriptors=require(23).supportsDescriptors,getPolyfill=require(59),gOPD=Object.getOwnPropertyDescriptor,defineProperty=Object.defineProperty,TypeErr=TypeError,getProto=Object.getPrototypeOf,regex=/a/;module.exports=function(){if(!supportsDescriptors||!getProto)throw new TypeErr("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=getPolyfill(),r=getProto(regex),t=gOPD(r,"flags");return t&&t.get===e||defineProperty(r,"flags",{configurable:!0,enumerable:!1,get:e}),e};
|
|
195
|
-
|
|
196
|
-
},{"23":23,"59":59}],59:[function(require,module,exports){
|
|
197
|
-
"use strict";var implementation=require(57),supportsDescriptors=require(23).supportsDescriptors,gOPD=Object.getOwnPropertyDescriptor,TypeErr=TypeError;module.exports=function(){if(!supportsDescriptors)throw new TypeErr("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=gOPD(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return implementation};
|
|
198
|
-
|
|
199
|
-
},{"23":23,"57":57}],61:[function(require,module,exports){
|
|
200
|
-
"use strict";var undefined,define=require(23),ES=require(38),GetIntrinsic=require(24),hasSymbols=require(45)(),hidden=require(62)(),RegExpStringIterator=function(e,t,r,n){if("String"!==ES.Type(t))throw new TypeError("S must be a string");if("Boolean"!==ES.Type(r))throw new TypeError("global must be a boolean");if("Boolean"!==ES.Type(n))throw new TypeError("fullUnicode must be a boolean");hidden.set(this,"[[IteratingRegExp]]",e),hidden.set(this,"[[IteratedString]]",t),hidden.set(this,"[[Global]]",r),hidden.set(this,"[[Unicode]]",n),hidden.set(this,"[[Done]]",!1)},IteratorPrototype=GetIntrinsic("%IteratorPrototype%",!0);if(IteratorPrototype&&(RegExpStringIterator.prototype=ES.ObjectCreate(IteratorPrototype)),define(RegExpStringIterator.prototype,{next:function(){var e=this;if("Object"!==ES.Type(e))throw new TypeError("receiver must be an object");if(!(e instanceof RegExpStringIterator&&hidden.has(e,"[[IteratingRegExp]]")&&hidden.has(e,"[[IteratedString]]")&&hidden.has(e,"[[Global]]")&&hidden.has(e,"[[Unicode]]")&&hidden.has(e,"[[Done]]")))throw new TypeError('"this" value must be a RegExpStringIterator instance');if(hidden.get(e,"[[Done]]"))return ES.CreateIterResultObject(undefined,!0);var t=hidden.get(e,"[[IteratingRegExp]]"),r=hidden.get(e,"[[IteratedString]]"),n=hidden.get(e,"[[Global]]"),i=hidden.get(e,"[[Unicode]]"),o=ES.RegExpExec(t,r);if(null===o)return hidden.set(e,"[[Done]]",!0),ES.CreateIterResultObject(undefined,!0);if(n){if(""===ES.ToString(ES.Get(o,"0"))){var a=ES.ToLength(ES.Get(t,"lastIndex")),d=ES.AdvanceStringIndex(r,a,i);ES.Set(t,"lastIndex",d,!0)}return ES.CreateIterResultObject(o,!1)}return hidden.set(e,"[[Done]]",!0),ES.CreateIterResultObject(o,!1)}}),hasSymbols){var defineP=Object.defineProperty;if(Symbol.toStringTag&&(defineP?defineP(RegExpStringIterator.prototype,Symbol.toStringTag,{configurable:!0,enumerable:!1,value:"RegExp String Iterator",writable:!1}):RegExpStringIterator.prototype[Symbol.toStringTag]="RegExp String Iterator"),!IteratorPrototype&&Symbol.iterator){var func={};func[Symbol.iterator]=RegExpStringIterator.prototype[Symbol.iterator]||function(){return this};var predicate={};predicate[Symbol.iterator]=function(){return RegExpStringIterator.prototype[Symbol.iterator]!==func[Symbol.iterator]},define(RegExpStringIterator.prototype,func,predicate)}}module.exports=RegExpStringIterator;
|
|
201
|
-
|
|
202
|
-
},{"23":23,"24":24,"38":38,"45":45,"62":62}],62:[function(require,module,exports){
|
|
203
|
-
"use strict";var define=require(23);module.exports=function(){var e={},r=function(r){return e["$"+r]?e["$"+r]:"function"==typeof Symbol?(e["$"+r]=Symbol(r),e["$"+r]):"___ "+r+" ___"};return{get:function(e,n){return e[r(n)]},has:function(e,n){return r(n)in e},set:function(e,n,t){var i=r(n);define.supportsDescriptors?Object.defineProperty(e,i,{configurable:!1,enumerable:!1,value:t,writable:!0}):e[i]=t}}};
|
|
204
|
-
|
|
205
|
-
},{"23":23}],63:[function(require,module,exports){
|
|
206
|
-
"use strict";var ES=require(38),hasSymbols=require(45)(),regexMatchAll=require(66);module.exports=function(l){var e,r=ES.RequireObjectCoercible(this);if(null!=l&&(hasSymbols&&"symbol"==typeof Symbol.matchAll?e=ES.GetMethod(l,Symbol.matchAll):ES.IsRegExp(l)&&(e=regexMatchAll),void 0!==e))return ES.Call(e,l,[r]);var t=ES.ToString(r),a=new RegExp(l,"g");return hasSymbols&&"symbol"==typeof Symbol.matchAll?ES.Invoke(a,Symbol.matchAll,[t]):ES.Call(regexMatchAll,a,[t])};
|
|
207
|
-
|
|
208
|
-
},{"38":38,"45":45,"66":66}],66:[function(require,module,exports){
|
|
209
|
-
"use strict";var ES=require(38),flagsGetter=require(58),RegExpStringIterator=require(61),OrigRegExp=RegExp,CreateRegExpStringIterator=function(e,r,t,a){if("String"!==ES.Type(r))throw new TypeError('"S" value must be a String');if("Boolean"!==ES.Type(t))throw new TypeError('"global" value must be a Boolean');if("Boolean"!==ES.Type(a))throw new TypeError('"fullUnicode" value must be a Boolean');return new RegExpStringIterator(e,r,t,a)},constructRegexWithFlags=function(e,r){var t,a=ES.Get(r,"flags");return"string"==typeof a?t=new e(r,a):e===OrigRegExp?(a=flagsGetter(r),t=new e(r.source,a)):t=new e(r,a=flagsGetter(r)),{flags:a,matcher:t}},regexMatchAll=function(e){var r=this;if("Object"!==ES.Type(r))throw new TypeError('"this" value must be an Object');var t=ES.ToString(e),a=ES.SpeciesConstructor(r,OrigRegExp),n=constructRegexWithFlags(a,r),g=n.flags,o=n.matcher,i=ES.ToLength(ES.Get(r,"lastIndex"));ES.Set(o,"lastIndex",i,!0);var l=g.indexOf("g")>-1,s=g.indexOf("u")>-1;return CreateRegExpStringIterator(o,t,l,s)},defineP=Object.defineProperty,gOPD=Object.getOwnPropertyDescriptor;if(defineP&&gOPD){var desc=gOPD(regexMatchAll,"name");desc&&desc.configurable&&defineP(regexMatchAll,"name",{value:"[Symbol.matchAll]"})}module.exports=regexMatchAll;
|
|
210
|
-
|
|
211
|
-
},{"38":38,"58":58,"61":61}],65:[function(require,module,exports){
|
|
212
|
-
"use strict";var implementation=require(63);module.exports=function(){return String.prototype.matchAll||implementation};
|
|
213
|
-
|
|
214
|
-
},{"63":63}],67:[function(require,module,exports){
|
|
215
|
-
"use strict";var define=require(23),hasSymbols=require(45)(),getPolyfill=require(65),regexMatchAll=require(66),defineP=Object.defineProperty,gOPD=Object.getOwnPropertyDescriptor;module.exports=function(){var e=getPolyfill();if(define(String.prototype,{matchAll:e},{matchAll:function(){return String.prototype.matchAll!==e}}),hasSymbols){var l=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(define(Symbol,{matchAll:l},{matchAll:function(){return Symbol.matchAll!==l}}),defineP&&gOPD){var r=gOPD(Symbol,l);r&&!r.configurable||defineP(Symbol,l,{configurable:!1,enumerable:!1,value:l,writable:!1})}var t={};t[l]=RegExp.prototype[l]||regexMatchAll;var o={};o[l]=function(){return RegExp.prototype[l]!==regexMatchAll},define(RegExp.prototype,t,o)}return e};
|
|
216
|
-
|
|
217
|
-
},{"23":23,"45":45,"65":65,"66":66}]},{},[1])(1)
|
|
218
|
-
});
|
|
219
|
-
//# sourceMappingURL=shell.min.js.map
|
|
1
|
+
"use strict";var Shell=(function(){var e=(e,t)=>()=>(e&&(t=e(e=0)),t),t=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),n,r=e((()=>{n=globalThis||self})),i=t(((e,t)=>{var n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},i=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function a(e){console&&console.warn&&console.warn(e)}var o=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}t.exports=s,t.exports.once=y,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(s,`defaultMaxListeners`,{enumerable:!0,get:function(){return c},set:function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);c=e}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function u(e){return e._maxListeners===void 0?s.defaultMaxListeners:e._maxListeners}s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else for(var l=c.length,u=g(c,l),n=0;n<l;++n)r(u[n],this,t);return!0};function d(e,t,n,r){var i,o,s;if(l(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),o=e._events),s=o[t]),s===void 0)s=o[t]=n,++e._eventsCount;else if(typeof s==`function`?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),i=u(e),i>0&&s.length>i&&!s.warned){s.warned=!0;var c=Error(`Possible EventEmitter memory leak detected. `+s.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);c.name=`MaxListenersExceededWarning`,c.emitter=e,c.type=t,c.count=s.length,a(c)}return e}s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}s.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():_(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),a;for(r=0;r<i.length;++r)a=i[r],a!==`removeListener`&&this.removeAllListeners(a);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function m(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?v(i):g(i,i.length)}s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h;function h(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function g(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function _(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function v(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function y(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}x(e,t,a,{once:!0}),t!==`error`&&b(e,i,{once:!0})})}function b(e,t,n){typeof e.on==`function`&&x(e,`error`,t,n)}function x(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener==`function`)e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e)}})),a=t(((e,t)=>{t.exports=class{constructor(e=`/`,t={},n={},r=null){this.fileSystem=t,this.permissions=Object.assign({},n),this.cwd=e,this._onChange=r,this._changeScheduled=!1}getFileByPath(e){return this._getFileByAbsolutePath(this._pathToAbsolute(e))}_pathToAbsolute(e){return e.startsWith(`./`)&&(e=e.substring(2)),e.startsWith(`/`)||(e=this.cwd+e),this._traverseComplexAbsolutePath(e)}_traverseComplexAbsolutePath(e){let t=e.split(`/`);for(;t.includes(`..`);){let e=t.indexOf(`..`)-1;t.splice(e,2)}return t.join(`/`)}absolutePath(e){return this._pathToAbsolute(e)}setFileByPath(e,t,n=!1){let r=this._pathToAbsolute(e);this._setFileByAbsolutePath(r,t,n),this._triggerChange()}_setFileByAbsolutePath(e,t,n=!0){let r=e.split(`/`);r.shift();let i=r.pop(),a=r.reduce((e,t)=>{if(!e[t]){if(!n)throw Error(`${t}: No such file or directory`);e[t]={}}return e[t]},this.fileSystem);a[i]=t}_getFileByAbsolutePath(e){let t=e.split(`/`);return t.shift(),t[t.length-1].length<1&&t.pop(),t.reduce((e,t)=>e&&e[t]?e[t]:null,this.fileSystem)}deleteFileByPath(e){let t=this._pathToAbsolute(e);this._deleteByAbsolutePath(t);let n=t+`/`;Object.keys(this.permissions).forEach(e=>{(e===t||e.startsWith(n))&&delete this.permissions[e]}),this._triggerChange()}_deleteByAbsolutePath(e){let t=e.split(`/`);t.shift(),t[t.length-1]===``&&t.pop();let n=t.pop();if(!n)return;let r=t.reduce((e,t)=>e&&e[t]?e[t]:null,this.fileSystem);r&&n in r&&delete r[n]}getMode(e){let t=this._pathToAbsolute(e);if(this.permissions[t]!==void 0)return this.permissions[t];let n=this._getFileByAbsolutePath(t);return n==null?null:n.constructor===Object||typeof n==`function`?493:420}setMode(e,t){let n=this._pathToAbsolute(e);this.permissions[n]=t,this._triggerChange()}isExecutable(e){let t=this.getMode(e);return t===null?!1:(t&64)!=0}getSize(e){let t=this._pathToAbsolute(e),n=this._getFileByAbsolutePath(t);return n==null?0:n.constructor===Object?JSON.stringify(n).length:n.toString().length}getRawPermissions(){return Object.assign({},this.permissions)}setCwd(e){this.cwd=this._pathToAbsolute(e.endsWith(`/`)?e:e+`/`)}getRaw(){return this.fileSystem}getRawPermissions(){return Object.assign({},this.permissions)}addFiles(e){Object.entries(e).forEach(([e,t])=>{this.setFileByPath(e,t,!0)})}autoComplete(e,t){let n=this._pathToAbsolute(e).split(`/`),r=n.pop(),i=this.getFileByPath(n.length>1?n.join(`/`):`/`),a=this.getFileByPath(t);if(i&&i.constructor===Object){let t=Object.keys(i).filter(e=>e.startsWith(r));r.length<1&&(t=t.filter(e=>!e.startsWith(`.`)));let n=e.split(`/`);n.pop();let o=i;if(t.length<1&&n.length<1&&a&&(t=Object.keys(a).filter(e=>e.startsWith(r)),o=a),t.length)return{path:n.length?n.join(`/`):null,options:t.map(e=>o[e]&&o[e].constructor===Object?e.concat(`/`):e)}}return null}_triggerChange(){!this._onChange||this._changeScheduled||(this._changeScheduled=!0,Promise.resolve().then(()=>{this._changeScheduled=!1,typeof this._onChange==`function`&&this._onChange(this.getRaw(),this.getRawPermissions())}))}}}));function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function s(){throw Error(`setTimeout has not been defined`)}function c(){throw Error(`clearTimeout has not been defined`)}function l(e){if(_===setTimeout)return setTimeout(e,0);if((_===s||!_)&&setTimeout)return _=setTimeout,setTimeout(e,0);try{return _(e,0)}catch{try{return _.call(null,e,0)}catch{return _.call(this,e,0)}}}function u(e){if(v===clearTimeout)return clearTimeout(e);if((v===c||!v)&&clearTimeout)return v=clearTimeout,clearTimeout(e);try{return v(e)}catch{try{return v.call(null,e)}catch{return v.call(this,e)}}}function d(){!b||!x||(b=!1,x.length?y=x.concat(y):S=-1,y.length&&f())}function f(){if(!b){var e=l(d);b=!0;for(var t=y.length;t;){for(x=y,y=[];++S<t;)x&&x[S].run();S=-1,t=y.length}x=null,b=!1,u(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}var h,g,_,v,y,b,x,S,C,w,T=e((()=>{h={exports:{}},g=h.exports={},(function(){try{_=typeof setTimeout==`function`?setTimeout:s}catch{_=s}try{v=typeof clearTimeout==`function`?clearTimeout:c}catch{v=c}})(),y=[],b=!1,S=-1,g.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];y.push(new p(e,t)),y.length===1&&!b&&l(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},g.title=`browser`,g.browser=!0,g.env={},g.argv=[],g.version=``,g.versions={},g.on=m,g.addListener=m,g.once=m,g.off=m,g.removeListener=m,g.removeAllListeners=m,g.emit=m,g.prependListener=m,g.prependOnceListener=m,g.listeners=function(e){return[]},g.binding=function(e){throw Error(`process.binding is not supported`)},g.cwd=function(){return`/`},g.chdir=function(e){throw Error(`process.chdir is not supported`)},g.umask=function(){return 0},C=h.exports,w=o(C)})),E=t(((e,t)=>{t.exports=null})),D=t(((e,t)=>{T();function n(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function r(e,t){for(var n=``,r=0,i=-1,a=0,o,s=0;s<=e.length;++s){if(s<e.length)o=e.charCodeAt(s);else if(o===47)break;else o=47;if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var c=n.lastIndexOf(`/`);if(c!==n.length-1){c===-1?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}}else if(n.length===2||n.length===1){n=``,r=0,i=s,a=0;continue}}t&&(n.length>0?n+=`/..`:n=`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a!==-1?++a:a=-1}return n}function i(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+e+r:r}var a={resolve:function(){for(var e=``,t=!1,i,a=arguments.length-1;a>=-1&&!t;a--){var o;a>=0?o=arguments[a]:(i===void 0&&(i=w.cwd()),o=i),n(o),o.length!==0&&(e=o+`/`+e,t=o.charCodeAt(0)===47)}return e=r(e,!t),t?e.length>0?`/`+e:`/`:e.length>0?e:`.`},normalize:function(e){if(n(e),e.length===0)return`.`;var t=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return e=r(e,!t),e.length===0&&!t&&(e=`.`),e.length>0&&i&&(e+=`/`),t?`/`+e:e},isAbsolute:function(e){return n(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,t=0;t<arguments.length;++t){var r=arguments[t];n(r),r.length>0&&(e===void 0?e=r:e+=`/`+r)}return e===void 0?`.`:a.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t||(e=a.resolve(e),t=a.resolve(t),e===t))return``;for(var r=1;r<e.length&&e.charCodeAt(r)===47;++r);for(var i=e.length,o=i-r,s=1;s<t.length&&t.charCodeAt(s)===47;++s);for(var c=t.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(t.charCodeAt(s+d)===47)return t.slice(s+d+1);if(d===0)return t.slice(s+d)}else o>l&&(e.charCodeAt(r+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(r+d);if(f!==t.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=r+u+1;d<=i;++d)(d===i||e.charCodeAt(d)===47)&&(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+t.slice(s+u):(s+=u,t.charCodeAt(s)===47&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(n(e),e.length===0)return`.`;for(var t=e.charCodeAt(0),r=t===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if(t=e.charCodeAt(o),t===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);n(e);var r=0,i=-1,a=!0,o;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return``;var s=t.length-1,c=-1;for(o=e.length-1;o>=0;--o){var l=e.charCodeAt(o);if(l===47){if(!a){r=o+1;break}}else c===-1&&(a=!1,c=o+1),s>=0&&(l===t.charCodeAt(s)?--s===-1&&(i=o):(s=-1,i=c))}return r===i?i=c:i===-1&&(i=e.length),e.slice(r,i)}else{for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===47){if(!a){r=o+1;break}}else i===-1&&(a=!1,i=o+1);return i===-1?``:e.slice(r,i)}},extname:function(e){n(e);for(var t=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c===47){if(!a){r=s+1;break}continue}i===-1&&(a=!1,i=s+1),c===46?t===-1?t=s:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||i===-1||o===0||o===1&&t===i-1&&t===r+1?``:e.slice(t,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return i(`/`,e)},parse:function(e){n(e);var t={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return t;var r=e.charCodeAt(0),i=r===47,a;i?(t.root=`/`,a=1):a=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=a;--u){if(r=e.charCodeAt(u),r===47){if(!l){s=u+1;break}continue}c===-1&&(l=!1,c=u+1),r===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1)}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(s===0&&i?t.base=t.name=e.slice(1,c):t.base=t.name=e.slice(s,c)):(s===0&&i?(t.name=e.slice(1,o),t.base=e.slice(1,c)):(t.name=e.slice(s,o),t.base=e.slice(s,c)),t.ext=e.slice(o,c)),s>0?t.dir=e.slice(0,s-1):i&&(t.dir=`/`),t},sep:`/`,delimiter:`:`,win32:null,posix:null};a.posix=a,t.exports=a})),O=t(((e,t)=>{T();var n=E(),r=D();t.exports=class{constructor(e,t=null){this._onChange=t,this._changeScheduled=!1,this._virtualFiles={},this.cwd=this._normalizeCwd(e||w.cwd())}get isRealFilesystem(){return!0}_normalizeCwd(e){let t=r.resolve(e);return t===`/`?`/`:t+`/`}absolutePath(e){e.startsWith(`./`)&&(e=e.slice(2));let t=e.startsWith(`/`)?e:r.join(this.cwd,e);return r.normalize(t)}setCwd(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=this.absolutePath(t);this.cwd=n===`/`?`/`:n+`/`}getFileByPath(e){let t=this.absolutePath(e);if(this._virtualFiles[t]!==void 0)return this._virtualFiles[t];let i;try{i=n.statSync(t)}catch{return null}if(i.isDirectory()){let e={};try{for(let i of n.readdirSync(t)){let a=r.join(t,i);if(this._virtualFiles[a]!==void 0)e[i]=this._virtualFiles[a];else try{e[i]=n.statSync(a).isDirectory()?{}:``}catch{}}}catch{}let i=t===`/`?`/`:t+`/`;for(let t of Object.keys(this._virtualFiles))if(t.startsWith(i)&&!t.slice(i.length).includes(`/`)){let n=t.slice(i.length);n in e||(e[n]=this._virtualFiles[t])}return e}try{return n.readFileSync(t,`utf8`)}catch{return null}}setFileByPath(e,t,i=!1){let a=this.absolutePath(e);if(typeof t==`function`){this._virtualFiles[a]=t;return}if(t!=null&&t.constructor===Object){n.mkdirSync(a,{recursive:i}),this._triggerChange();return}i&&n.mkdirSync(r.dirname(a),{recursive:!0}),n.writeFileSync(a,String(t)),this._triggerChange()}deleteFileByPath(e){let t=this.absolutePath(e);delete this._virtualFiles[t];try{n.lstatSync(t).isDirectory()?n.rmdirSync(t):n.unlinkSync(t),this._triggerChange()}catch{}}getMode(e){let t=this.absolutePath(e);if(this._virtualFiles[t]!==void 0)return typeof this._virtualFiles[t]==`function`?493:420;try{return n.statSync(t).mode&511}catch{return null}}setMode(e,t){n.chmodSync(this.absolutePath(e),t),this._triggerChange()}isExecutable(e){let t=this.getMode(e);return t===null?!1:(t&64)!=0}getSize(e){let t=this.absolutePath(e);if(this._virtualFiles[t]!==void 0)return 0;try{return n.statSync(t).size}catch{return 0}}isSymlink(e){let t=this.absolutePath(e);try{return n.lstatSync(t).isSymbolicLink()}catch{return!1}}readSymlink(e){let t=this.absolutePath(e);try{return n.readlinkSync(t)}catch{return null}}createSymlink(e,t){let i=this.absolutePath(t);n.mkdirSync(r.dirname(i),{recursive:!0}),n.symlinkSync(e,i),this._triggerChange()}getRaw(){return null}getRawPermissions(){return{}}addFiles(e){Object.entries(e).forEach(([e,t])=>{this.setFileByPath(e,t,!0)})}autoComplete(e,t){let i=this.absolutePath(e).split(`/`),a=i.pop(),o=i.join(`/`)||`/`,s=[];try{s=n.readdirSync(o)}catch{}let c=o===`/`?`/`:o+`/`;for(let e of Object.keys(this._virtualFiles))if(e.startsWith(c)&&!e.slice(c.length).includes(`/`)){let t=e.slice(c.length);s.includes(t)||s.push(t)}let l=s.filter(e=>e.startsWith(a));if(l.length===0&&!e.includes(`/`)){let n=this.getFileByPath(t);if(n&&n.constructor===Object&&(l=Object.keys(n).filter(t=>t.startsWith(e)),l.length))return{path:null,options:l}}if(!l.length)return null;let u=e.split(`/`);return u.pop(),{path:u.length?u.join(`/`):null,options:l.map(e=>{let t=r.join(o,e);if(this._virtualFiles[t]!==void 0)return e;try{return n.statSync(t).isDirectory()?e+`/`:e}catch{return e}})}}_triggerChange(){!this._onChange||this._changeScheduled||(this._changeScheduled=!0,Promise.resolve().then(()=>{this._changeScheduled=!1,typeof this._onChange==`function`&&this._onChange(null,null)}))}}})),k=t(((e,t)=>{var n=a();t.exports=class{constructor(e){this.options=e;let{cwd:t=`/`,clearFn:r,destroyFn:i,onFsChange:a}=this.options;this.vars={},this.aliases={},this.fs=new n(t,{},{},a||null),this._clearFn=r,this._destroyFn=i}setVar(e,t){t?this.vars[e]=t:delete this.vars[e]}unsetVar(e){this.setVar(e)}getVar(e){return this.vars[e]||``}setAlias(e,t){t?this.aliases[e]=t:delete this.aliases[e]}unsetAlias(e){this.setAlias(e)}getAlias(e){return this.aliases[e]||null}setCommand(e){let t=`${this.getVar(`PATH`)}/${e.name.toLowerCase()}`;this.fs.addFiles({[t]:e})}getCommand(e){let t=`${this.getVar(`PATH`)}/${e}`;return this.fs.getFileByPath(t)||null}setNodeFilesystem(e){let t=O(),n=this.fs._onChange;this.fs=new t(e,n)}setFilesystem(e,t={}){let r=this.fs.getFileByPath(this.getVar(`PATH`))||{},i=this.fs.getRawPermissions(),a=this.fs._onChange;this.fs=new n(this.fs.cwd,e,Object.assign({},i,t),a),this.fs.addFiles(r)}setCwd(e){this.fs.setCwd(e)}source(e){this.vars=Object.assign({},this.vars,e.vars),this.aliases=Object.assign({},this.aliases,e.aliases)}clear(){typeof this._clearFn==`function`&&this._clearFn()}destroy(e=0){typeof this._destroyFn==`function`&&this._destroyFn(e)}}})),A=t(((e,t)=>{var n=[`out`,`err`];t.exports=class{constructor(e,t){if(!n.includes(e))throw Error(`incorrect std output type`);this.type=e,this.string=t}}})),j=t(((e,t)=>{var n=A();t.exports=class{constructor(e=[],t=0){if(typeof t!=`number`)throw Error(`Command Result ExitCode must be a number`);if(!Array.isArray(e))throw Error(`Command Result be array`);this.std=e,this.exitCode=t}addStdOutLine(e){this.std.push(new n(`out`,e))}addStdErrLine(e){this.std.push(new n(`err`,e))}getStdOutput(){return this.std}getExitCode(){return this.exitCode}flush(){let e=this.std;return this.std=[],e}}})),M=t(((e,t)=>{var n=i(),r=j();t.exports=class extends n{constructor(e){super(),this.arguments=e,this.result=new r}get name(){return`unnamed`}run(){return Promise.reject(`Command not implemented...`)}runCommand(){return this.run().then(e=>(e&&e.split(/\r?\n/).forEach(e=>this.stdOut=e),this.result)).catch(e=>(e&&(this.stdErr=e.message||e),this.exitCode=127,this.result))}onInput(e){}set exitCode(e){this.result.exitCode=e}set stdOut(e){this.result.addStdOutLine(e)}set stdErr(e){this.result.addStdErrLine(e)}flush(){console.log(`flush now`),this.emit(`flush`,this.result.flush())}}})),N=t(((e,t)=>{var n=M();t.exports=class extends n{constructor(e,t){super(e),this.context=t}}})),P=t(((e,t)=>{r();var i=N();t.exports=class extends i{constructor(e,t,n,r=!1){super(t,n),this.script=e,this.source=r}run(){let e=this.context.fs.isRealFilesystem?{useRealFilesystem:!0}:{filesystem:this.context.fs.getRaw(),permissions:this.context.fs.getRawPermissions()};this.sandbox=new n.shell({cwd:this.context.fs.cwd,...e}),this.sandbox.context.source(this.context),this.sandbox.on(`stdOut`,e=>this.stdOut=e),this.sandbox.on(`stdErr`,e=>this.stdErr=e);let t=this.script.split(/\r?\n/);if(!t[0].startsWith(`#!`))return Promise.reject(`no interpreter set`);let r=this._parseLines(t.slice(1));return this._executeNodes(r).then(()=>{this.exitCode=this.sandbox.lastCode,this.source&&this.context.source(this.sandbox.context)})}_parseLines(e){let t=[],n=0;for(;n<e.length;){let r=e[n].trim();if(!r||r.startsWith(`#`)){n++;continue}if(r.startsWith(`if `)||r===`if`){let r=this._parseIf(e,n);t.push(r.node),n+=r.consumed;continue}if(r.startsWith(`while `)){let r=this._parseWhile(e,n);t.push(r.node),n+=r.consumed;continue}if(r.startsWith(`for `)){let r=this._parseFor(e,n);t.push(r.node),n+=r.consumed;continue}t.push({type:`command`,line:r}),n++}return t}_parseIf(e,t){let n=e[t].trim().replace(/^if\s+/,``).replace(/\s*;\s*then\s*$/,``).replace(/\s+then\s*$/,``).trim(),r=t+1;r<e.length&&e[r].trim()===`then`&&r++;let i=[],a=[],o=!1,s=!1,c=1;for(;r<e.length;){let t=e[r].trim();if(t.startsWith(`if `)&&c++,t===`fi`&&(c--,c===0)){s&&a.push(`fi`),r++;break}if(c===1&&(t===`else`||t.startsWith(`elif `))){o||=!0,t.startsWith(`elif `)?(s=!0,a.push(t.replace(/^elif/,`if`))):s&&a.push(e[r]),r++;continue}o?a.push(e[r]):i.push(e[r]),r++}return{node:{type:`if`,condition:n,thenLines:i,elseLines:a},consumed:r-t}}_parseWhile(e,t){let n=e[t].trim().replace(/^while\s+/,``).replace(/\s*;\s*do\s*$/,``).replace(/\s+do\s*$/,``).trim(),r=t+1;r<e.length&&e[r].trim()===`do`&&r++;let i=[],a=1;for(;r<e.length;){let t=e[r].trim();if((t.startsWith(`while `)||t.startsWith(`for `))&&a++,t===`done`&&(a--,a===0)){r++;break}i.push(e[r]),r++}return{node:{type:`while`,condition:n,bodyLines:i},consumed:r-t}}_parseFor(e,t){let n=e[t].trim().replace(/\s*;\s*do\s*$/,``).replace(/\s+do\s*$/,``).match(/^for\s+(\w+)\s+in\s+(.+)$/),r=n?n[1]:``,i=n?n[2].trim():``,a=t+1;a<e.length&&e[a].trim()===`do`&&a++;let o=[],s=1;for(;a<e.length;){let t=e[a].trim();if((t.startsWith(`while `)||t.startsWith(`for `))&&s++,t===`done`&&(s--,s===0)){a++;break}o.push(e[a]),a++}return{node:{type:`for`,variable:r,list:i,bodyLines:o},consumed:a-t}}_executeNodes(e){return e.reduce((e,t)=>e.then(()=>this._executeNode(t)),Promise.resolve())}_executeNode(e){return e.type===`command`?this.sandbox.onCommand(e.line,!1):e.type===`if`?this._executeIf(e):e.type===`while`?this._executeWhile(e):e.type===`for`?this._executeFor(e):Promise.resolve()}_executeIf(e){return this.sandbox.onCommand(e.condition,!1).then(()=>{if(this.sandbox.lastCode===0)return this._executeNodes(this._parseLines(e.thenLines));if(e.elseLines.length>0)return this._executeNodes(this._parseLines(e.elseLines))})}_executeWhile(e){let t=()=>this.sandbox.onCommand(e.condition,!1).then(()=>{if(this.sandbox.lastCode===0)return this._executeNodes(this._parseLines(e.bodyLines)).then(t)});return t()}_executeFor(e){return e.list.replace(/\${?([\w\d]+)}?/g,(e,t)=>this.sandbox.context.getVar(t)||``).split(/\s+/).filter(Boolean).reduce((t,n)=>t.then(()=>(this.sandbox.context.setVar(e.variable,n),this._executeNodes(this._parseLines(e.bodyLines)))),Promise.resolve())}}}));function F(e){var t=e.length;if(t%4>0)throw Error(`Invalid string. Length must be a multiple of 4`);var n=e.indexOf(`=`);n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function I(e){var t=F(e),n=t[0],r=t[1];return(n+r)*3/4-r}function L(e,t,n){return(t+n)*3/4-n}function ee(e){var t,n=F(e),r=n[0],i=n[1],a=new te(L(e,r,i)),o=0,s=i>0?r-4:r,c;for(c=0;c<s;c+=4)t=W[e.charCodeAt(c)]<<18|W[e.charCodeAt(c+1)]<<12|W[e.charCodeAt(c+2)]<<6|W[e.charCodeAt(c+3)],a[o++]=t>>16&255,a[o++]=t>>8&255,a[o++]=t&255;return i===2&&(t=W[e.charCodeAt(c)]<<2|W[e.charCodeAt(c+1)]>>4,a[o++]=t&255),i===1&&(t=W[e.charCodeAt(c)]<<10|W[e.charCodeAt(c+1)]<<4|W[e.charCodeAt(c+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function R(e){return U[e>>18&63]+U[e>>12&63]+U[e>>6&63]+U[e&63]}function z(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(R(r));return i.join(``)}function B(e){for(var t,n=e.length,r=n%3,i=[],a=16383,o=0,s=n-r;o<s;o+=a)i.push(z(e,o,o+a>s?s:o+a));return r===1?(t=e[n-1],i.push(U[t>>2]+U[t<<4&63]+`==`)):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(U[t>>10]+U[t>>4&63]+U[t<<2&63]+`=`)),i.join(``)}var V,H,U,W,te,ne,G,re,ie,ae,oe=e((()=>{for(V={},H={},H.byteLength=I,H.toByteArray=ee,H.fromByteArray=B,U=[],W=[],te=typeof Uint8Array<`u`?Uint8Array:Array,ne=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,G=0,re=ne.length;G<re;++G)U[G]=ne[G],W[ne.charCodeAt(G)]=G;W[45]=62,W[95]=63,ie={},ie.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=a*256+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else if(a===c)return o?NaN:(p?-1:1)*(1/0);else o+=2**r,a-=l;return(p?-1:1)*o*2**(a-r)},ie.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<<l)-1,d=u>>1,f=i===23?2**-24-2**-77:0,p=r?0:a-1,m=r?1:-1,h=+(t<0||t===0&&1/t<0);for(t=Math.abs(t),isNaN(t)||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=2**-o)<1&&(o--,c*=2),o+d>=1?t+=f/c:t+=f*2**(1-d),t*c>=2&&(o++,c/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*c-1)*2**i,o+=d):(s=t*2**(d-1)*2**i,o=0));i>=8;e[n+p]=s&255,p+=m,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+p]=o&255,p+=m,o/=256,l-=8);e[n+p-m]|=h*128},(function(e){let t=H,n=ie,r=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`nodejs.util.inspect.custom`):null;e.Buffer=u,e.SlowBuffer=x,e.INSPECT_MAX_BYTES=50;let i=2147483647;e.kMaxLength=i;let{Uint8Array:a,ArrayBuffer:o,SharedArrayBuffer:s}=globalThis;u.TYPED_ARRAY_SUPPORT=c(),!u.TYPED_ARRAY_SUPPORT&&typeof console<`u`&&typeof console.error==`function`&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{let e=new a(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,a.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,`parent`,{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,`offset`,{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function l(e){if(e>i)throw RangeError(`The value "`+e+`" is invalid for option "size"`);let t=new a(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,n){if(typeof e==`number`){if(typeof t==`string`)throw TypeError(`The "string" argument must be of type string. Received type number`);return m(e)}return d(e,t,n)}u.poolSize=8192;function d(e,t,n){if(typeof e==`string`)return h(e,t);if(o.isView(e))return _(e);if(e==null)throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e);if(J(e,o)||e&&J(e.buffer,o)||s!==void 0&&(J(e,s)||e&&J(e.buffer,s)))return v(e,t,n);if(typeof e==`number`)throw TypeError(`The "value" argument must not be of type number. Received type number`);let r=e.valueOf&&e.valueOf();if(r!=null&&r!==e)return u.from(r,t,n);let i=y(e);if(i)return i;if(typeof Symbol<`u`&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==`function`)return u.from(e[Symbol.toPrimitive](`string`),t,n);throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e)}u.from=function(e,t,n){return d(e,t,n)},Object.setPrototypeOf(u.prototype,a.prototype),Object.setPrototypeOf(u,a);function f(e){if(typeof e!=`number`)throw TypeError(`"size" argument must be of type number`);if(e<0)throw RangeError(`The value "`+e+`" is invalid for option "size"`)}function p(e,t,n){return f(e),e<=0||t===void 0?l(e):typeof n==`string`?l(e).fill(t,n):l(e).fill(t)}u.alloc=function(e,t,n){return p(e,t,n)};function m(e){return f(e),l(e<0?0:b(e)|0)}u.allocUnsafe=function(e){return m(e)},u.allocUnsafeSlow=function(e){return m(e)};function h(e,t){if((typeof t!=`string`||t===``)&&(t=`utf8`),!u.isEncoding(t))throw TypeError(`Unknown encoding: `+t);let n=S(e,t)|0,r=l(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function g(e){let t=e.length<0?0:b(e.length)|0,n=l(t);for(let r=0;r<t;r+=1)n[r]=e[r]&255;return n}function _(e){if(J(e,a)){let t=new a(e);return v(t.buffer,t.byteOffset,t.byteLength)}return g(e)}function v(e,t,n){if(t<0||e.byteLength<t)throw RangeError(`"offset" is outside of buffer bounds`);if(e.byteLength<t+(n||0))throw RangeError(`"length" is outside of buffer bounds`);let r;return r=t===void 0&&n===void 0?new a(e):n===void 0?new a(e,t):new a(e,t,n),Object.setPrototypeOf(r,u.prototype),r}function y(e){if(u.isBuffer(e)){let t=b(e.length)|0,n=l(t);return n.length===0||e.copy(n,0,0,t),n}if(e.length!==void 0)return typeof e.length!=`number`||he(e.length)?l(0):g(e);if(e.type===`Buffer`&&Array.isArray(e.data))return g(e.data)}function b(e){if(e>=i)throw RangeError(`Attempt to allocate Buffer larger than maximum size: 0x`+i.toString(16)+` bytes`);return e|0}function x(e){return+e!=e&&(e=0),u.alloc(+e)}u.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==u.prototype},u.compare=function(e,t){if(J(e,a)&&(e=u.from(e,e.offset,e.byteLength)),J(t,a)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw TypeError(`The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array`);if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:+(r<n)},u.isEncoding=function(e){switch(String(e).toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`latin1`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw TypeError(`"list" argument must be an Array of Buffers`);if(e.length===0)return u.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;let r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){let t=e[n];if(J(t,a))i+t.length>r.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(r,i)):a.prototype.set.call(r,t,i);else if(u.isBuffer(t))t.copy(r,i);else throw TypeError(`"list" argument must be an Array of Buffers`);i+=t.length}return r};function S(e,t){if(u.isBuffer(e))return e.length;if(o.isView(e)||J(e,o))return e.byteLength;if(typeof e!=`string`)throw TypeError(`The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type `+typeof e);let n=e.length,r=arguments.length>2&&arguments[2]===!0;if(!r&&n===0)return 0;let i=!1;for(;;)switch(t){case`ascii`:case`latin1`:case`binary`:return n;case`utf8`:case`utf-8`:return ue(e).length;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return n*2;case`hex`:return n>>>1;case`base64`:return pe(e).length;default:if(i)return r?-1:ue(e).length;t=(``+t).toLowerCase(),i=!0}}u.byteLength=S;function C(e,t,n){let r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return``;for(e||=`utf8`;;)switch(e){case`hex`:return ee(this,t,n);case`utf8`:case`utf-8`:return N(this,t,n);case`ascii`:return I(this,t,n);case`latin1`:case`binary`:return L(this,t,n);case`base64`:return M(this,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return R(this,t,n);default:if(r)throw TypeError(`Unknown encoding: `+e);e=(e+``).toLowerCase(),r=!0}}u.prototype._isBuffer=!0;function w(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}u.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError(`Buffer size must be a multiple of 16-bits`);for(let t=0;t<e;t+=2)w(this,t,t+1);return this},u.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError(`Buffer size must be a multiple of 32-bits`);for(let t=0;t<e;t+=4)w(this,t,t+3),w(this,t+1,t+2);return this},u.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError(`Buffer size must be a multiple of 64-bits`);for(let t=0;t<e;t+=8)w(this,t,t+7),w(this,t+1,t+6),w(this,t+2,t+5),w(this,t+3,t+4);return this},u.prototype.toString=function(){let e=this.length;return e===0?``:arguments.length===0?N(this,0,e):C.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw TypeError(`Argument must be a Buffer`);return this===e?!0:u.compare(this,e)===0},u.prototype.inspect=function(){let t=``,n=e.INSPECT_MAX_BYTES;return t=this.toString(`hex`,0,n).replace(/(.{2})/g,`$1 `).trim(),this.length>n&&(t+=` ... `),`<Buffer `+t+`>`},r&&(u.prototype[r]=u.prototype.inspect),u.prototype.compare=function(e,t,n,r,i){if(J(e,a)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw TypeError(`The "target" argument must be one of type Buffer or Uint8Array. Received type `+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),i===void 0&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError(`out of range index`);if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;let o=i-r,s=n-t,c=Math.min(o,s),l=this.slice(r,i),d=e.slice(t,n);for(let e=0;e<c;++e)if(l[e]!==d[e]){o=l[e],s=d[e];break}return o<s?-1:+(s<o)};function T(e,t,n,r,i){if(e.length===0)return-1;if(typeof n==`string`?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,he(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0)if(i)n=0;else return-1;if(typeof t==`string`&&(t=u.from(t,r)),u.isBuffer(t))return t.length===0?-1:E(e,t,n,r,i);if(typeof t==`number`)return t&=255,typeof a.prototype.indexOf==`function`?i?a.prototype.indexOf.call(e,t,n):a.prototype.lastIndexOf.call(e,t,n):E(e,[t],n,r,i);throw TypeError(`val must be string, number or Buffer`)}function E(e,t,n,r,i){let a=1,o=e.length,s=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r===`ucs2`||r===`ucs-2`||r===`utf16le`||r===`utf-16le`)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function c(e,t){return a===1?e[t]:e.readUInt16BE(t*a)}let l;if(i){let r=-1;for(l=n;l<o;l++)if(c(e,l)===c(t,r===-1?0:l-r)){if(r===-1&&(r=l),l-r+1===s)return r*a}else r!==-1&&(l-=l-r),r=-1}else for(n+s>o&&(n=o-s),l=n;l>=0;l--){let n=!0;for(let r=0;r<s;r++)if(c(e,l+r)!==c(t,r)){n=!1;break}if(n)return l}return-1}u.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},u.prototype.indexOf=function(e,t,n){return T(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return T(this,e,t,n,!1)};function D(e,t,n,r){n=Number(n)||0;let i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;let a=t.length;r>a/2&&(r=a/2);let o;for(o=0;o<r;++o){let r=parseInt(t.substr(o*2,2),16);if(he(r))return o;e[n+o]=r}return o}function O(e,t,n,r){return me(ue(t,e.length-n),e,n,r)}function k(e,t,n,r){return me(de(t),e,n,r)}function A(e,t,n,r){return me(pe(t),e,n,r)}function j(e,t,n,r){return me(fe(t,e.length-n),e,n,r)}u.prototype.write=function(e,t,n,r){if(t===void 0)r=`utf8`,n=this.length,t=0;else if(n===void 0&&typeof t==`string`)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,r===void 0&&(r=`utf8`)):(r=n,n=void 0);else throw Error(`Buffer.write(string, encoding, offset[, length]) is no longer supported`);let i=this.length-t;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError(`Attempt to write outside buffer bounds`);r||=`utf8`;let a=!1;for(;;)switch(r){case`hex`:return D(this,e,t,n);case`utf8`:case`utf-8`:return O(this,e,t,n);case`ascii`:case`latin1`:case`binary`:return k(this,e,t,n);case`base64`:return A(this,e,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return j(this,e,t,n);default:if(a)throw TypeError(`Unknown encoding: `+r);r=(``+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:`Buffer`,data:Array.prototype.slice.call(this._arr||this,0)}};function M(e,n,r){return n===0&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function N(e,t,n){n=Math.min(e.length,n);let r=[],i=t;for(;i<n;){let t=e[i],a=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[i+1],(n&192)==128&&(c=(t&31)<<6|n&63,c>127&&(a=c));break;case 3:n=e[i+1],r=e[i+2],(n&192)==128&&(r&192)==128&&(c=(t&15)<<12|(n&63)<<6|r&63,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],(n&192)==128&&(r&192)==128&&(s&192)==128&&(c=(t&15)<<18|(n&63)<<12|(r&63)<<6|s&63,c>65535&&c<1114112&&(a=c))}}a===null?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|a&1023),r.push(a),i+=o}return F(r)}let P=4096;function F(e){let t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);let n=``,r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=P));return n}function I(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]&127);return r}function L(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function ee(e,t,n){let r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i=``;for(let r=t;r<n;++r)i+=ge[e[r]];return i}function R(e,t,n){let r=e.slice(t,n),i=``;for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+r[e+1]*256);return i}u.prototype.slice=function(e,t){let n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);let r=this.subarray(e,t);return Object.setPrototypeOf(r,u.prototype),r};function z(e,t,n){if(e%1!=0||e<0)throw RangeError(`offset is not uint`);if(e+t>n)throw RangeError(`Trying to access beyond buffer length`)}u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||z(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return r},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||z(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||z(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||z(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||z(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||z(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||z(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Y(function(e){e>>>=0,K(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&q(e,this.length-8);let r=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),u.prototype.readBigUInt64BE=Y(function(e){e>>>=0,K(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&q(e,this.length-8);let r=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),u.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||z(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=2**(8*t)),r},u.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||z(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=2**(8*t)),a},u.prototype.readInt8=function(e,t){return e>>>=0,t||z(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||z(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},u.prototype.readInt16BE=function(e,t){e>>>=0,t||z(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||z(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||z(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Y(function(e){e>>>=0,K(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&q(e,this.length-8);let r=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),u.prototype.readBigInt64BE=Y(function(e){e>>>=0,K(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&q(e,this.length-8);let r=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)}),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||z(e,4,this.length),n.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||z(e,4,this.length),n.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||z(e,8,this.length),n.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||z(e,8,this.length),n.read(this,e,!1,52,8)};function B(e,t,n,r,i,a){if(!u.isBuffer(e))throw TypeError(`"buffer" argument must be a Buffer instance`);if(t>i||t<a)throw RangeError(`"value" argument is out of bounds`);if(n+r>e.length)throw RangeError(`Index out of range`)}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;B(this,e,t,n,r,0)}let i=1,a=0;for(this[t]=e&255;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;B(this,e,t,n,r,0)}let i=n-1,a=1;for(this[t+i]=e&255;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,1,255,0),this[t]=e&255,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function V(e,t,n,r,i){se(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function U(e,t,n,r,i){se(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}u.prototype.writeBigUInt64LE=Y(function(e,t=0){return V(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),u.prototype.writeBigUInt64BE=Y(function(e,t=0){return U(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);B(this,e,t,n,r-1,-r)}let i=0,a=1,o=0;for(this[t]=e&255;++i<n&&(a*=256);)e<0&&o===0&&this[t+i-1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);B(this,e,t,n,r-1,-r)}let i=n-1,a=1,o=0;for(this[t+i]=e&255;--i>=0&&(a*=256);)e<0&&o===0&&this[t+i+1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},u.prototype.writeBigInt64LE=Y(function(e,t=0){return V(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))}),u.prototype.writeBigInt64BE=Y(function(e,t=0){return U(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))});function W(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError(`Index out of range`)}function te(e,t,r,i,a){return t=+t,r>>>=0,a||W(e,t,r,4),n.write(e,t,r,i,23,4),r+4}u.prototype.writeFloatLE=function(e,t,n){return te(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return te(this,e,t,!1,n)};function ne(e,t,r,i,a){return t=+t,r>>>=0,a||W(e,t,r,8),n.write(e,t,r,i,52,8),r+8}u.prototype.writeDoubleLE=function(e,t,n){return ne(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return ne(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(!u.isBuffer(e))throw TypeError(`argument should be a Buffer`);if(n||=0,!r&&r!==0&&(r=this.length),t>=e.length&&(t=e.length),t||=0,r>0&&r<n&&(r=n),r===n||e.length===0||this.length===0)return 0;if(t<0)throw RangeError(`targetStart out of bounds`);if(n<0||n>=this.length)throw RangeError(`Index out of range`);if(r<0)throw RangeError(`sourceEnd out of bounds`);r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);let i=r-n;return this===e&&typeof a.prototype.copyWithin==`function`?this.copyWithin(t,n,r):a.prototype.set.call(e,this.subarray(n,r),t),i},u.prototype.fill=function(e,t,n,r){if(typeof e==`string`){if(typeof t==`string`?(r=t,t=0,n=this.length):typeof n==`string`&&(r=n,n=this.length),r!==void 0&&typeof r!=`string`)throw TypeError(`encoding must be a string`);if(typeof r==`string`&&!u.isEncoding(r))throw TypeError(`Unknown encoding: `+r);if(e.length===1){let t=e.charCodeAt(0);(r===`utf8`&&t<128||r===`latin1`)&&(e=t)}}else typeof e==`number`?e&=255:typeof e==`boolean`&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError(`Out of range index`);if(n<=t)return this;t>>>=0,n=n===void 0?this.length:n>>>0,e||=0;let i;if(typeof e==`number`)for(i=t;i<n;++i)this[i]=e;else{let a=u.isBuffer(e)?e:u.from(e,r),o=a.length;if(o===0)throw TypeError(`The value "`+e+`" is invalid for argument "value"`);for(i=0;i<n-t;++i)this[i+t]=a[i%o]}return this};let G={};function re(e,t,n){G[e]=class extends n{constructor(){super(),Object.defineProperty(this,`message`,{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,`code`,{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}re(`ERR_BUFFER_OUT_OF_BOUNDS`,function(e){return e?`${e} is outside of buffer bounds`:`Attempt to access memory outside buffer bounds`},RangeError),re(`ERR_INVALID_ARG_TYPE`,function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),re(`ERR_OUT_OF_RANGE`,function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=ae(String(n)):typeof n==`bigint`&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=ae(i)),i+=`n`),r+=` It must be ${t}. Received ${i}`,r},RangeError);function ae(e){let t=``,n=e.length,r=+(e[0]===`-`);for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function oe(e,t,n){K(t,`offset`),(e[t]===void 0||e[t+n]===void 0)&&q(t,e.length-(n+1))}function se(e,t,n,r,i,a){if(e>n||e<t){let r=typeof t==`bigint`?`n`:``,i;throw i=a>3?t===0||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${(a+1)*8}${r}`:`>= -(2${r} ** ${(a+1)*8-1}${r}) and < 2 ** ${(a+1)*8-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new G.ERR_OUT_OF_RANGE(`value`,i,e)}oe(r,i,a)}function K(e,t){if(typeof e!=`number`)throw new G.ERR_INVALID_ARG_TYPE(t,`number`,e)}function q(e,t,n){throw Math.floor(e)===e?t<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE(n||`offset`,`>= ${+!!n} and <= ${t}`,e):(K(e,n),new G.ERR_OUT_OF_RANGE(n||`offset`,`an integer`,e))}let ce=/[^+/0-9A-Za-z-_]/g;function le(e){if(e=e.split(`=`)[0],e=e.trim().replace(ce,``),e.length<2)return``;for(;e.length%4!=0;)e+=`=`;return e}function ue(e,t){t||=1/0;let n,r=e.length,i=null,a=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}function de(e){let t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function fe(e,t){let n,r,i,a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function pe(e){return t.toByteArray(le(e))}function me(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function J(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function he(e){return e!==e}let ge=(function(){let e=`0123456789abcdef`,t=Array(256);for(let n=0;n<16;++n){let r=n*16;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t})();function Y(e){return typeof BigInt>`u`?_e:e}function _e(){throw Error(`BigInt not supported`)}})(V),ae=V.Buffer,V.Blob,V.BlobOptions,V.Buffer,V.File,V.FileOptions,V.INSPECT_MAX_BYTES,V.SlowBuffer,V.TranscodeEncoding,V.atob,V.btoa,V.constants,V.isAscii,V.isUtf8,V.kMaxLength,V.kStringMaxLength,V.resolveObjectURL,V.transcode})),se=t(((e,t)=>{oe();var n=P();t.exports=class extends n{get name(){return`wasm`}get requiresFilesystem(){return!0}run(){let e=this.script,t=(()=>{try{return E()}catch{return null}})();return this._loadBytes(e,t).then(({bytes:e,isWat:t})=>t?this._runWat(e):this._runWasm(e)).catch(e=>{this.stdErr=e.message||String(e),this.exitCode=1})}_loadBytes(e,t){if(this.context.fs.isRealFilesystem&&t)try{let n=t.readFileSync(this.context.fs.absolutePath(e)),r=new Uint8Array(n);return Promise.resolve({bytes:r,isWat:this._isWat(e,r)})}catch(t){return Promise.reject(Error(`${e}: ${t.message}`))}let n=this.context.fs.getFileByPath(e);if(n==null)return Promise.reject(Error(`${e}: No such file or directory`));let r=this._contentToBytes(n);return Promise.resolve({bytes:r,isWat:this._isWat(e,r)})}_isWat(e,t){return e.endsWith(`.wat`)?!0:t.length>0&&t[0]===40}_contentToBytes(e){if(e instanceof Uint8Array)return e;if(ae!==void 0&&ae.isBuffer(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new Uint8Array(e);let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n)&255;return t}async _runWat(e){let t=new TextDecoder().decode(e),n;try{let e=require(`wabt`),{buffer:r}=(typeof e==`function`?await e():e).parseWat(this.script,t,{mutable_globals:!0}).toBinary({});n=new Uint8Array(r)}catch(e){e.code===`MODULE_NOT_FOUND`?(this.stdErr=`${this.script}: WAT execution requires the 'wabt' package`,this.stdErr=`Install it with: npm install wabt`):this.stdErr=`${this.script}: WAT compilation error: ${e.message}`,this.exitCode=1;return}return this._runWasm(n)}async _runWasm(e){if(typeof WebAssembly>`u`){this.stdErr=`${this.script}: WebAssembly is not available in this environment`,this.exitCode=1;return}let t={1:``,2:``},n=new TextDecoder,r=null,i=(e,n)=>{t[e]=(t[e]||``)+n;let r=t[e].split(`
|
|
2
|
+
`);t[e]=r.pop();for(let t of r)e===1?this.stdOut=t:this.stdErr=t},a=()=>{t[1]&&=(this.stdOut=t[1],``),t[2]&&=(this.stdErr=t[2],``)},o=new TextEncoder().encode(this.stdin||``),s=0,c=new Proxy({fd_write:(e,t,a,o)=>{if(!r)return 8;let s=new DataView(r.buffer),c=0;for(let o=0;o<a;o++){let a=s.getUint32(t+o*8,!0),l=s.getUint32(t+o*8+4,!0);l>0&&i(e,n.decode(new Uint8Array(r.buffer,a,l))),c+=l}return s.setUint32(o,c,!0),0},fd_read:(e,t,n,i)=>{if(e!==0||!r)return 8;let a=new DataView(r.buffer),c=0;for(let e=0;e<n&&s<o.length;e++){let n=a.getUint32(t+e*8,!0),i=a.getUint32(t+e*8+4,!0),l=Math.min(i,o.length-s);new Uint8Array(r.buffer).set(o.slice(s,s+l),n),s+=l,c+=l}return a.setUint32(i,c,!0),0},proc_exit:e=>{throw e!==0&&(this.exitCode=e),{_wasmExit:!0,code:e}},args_sizes_get:(e,t)=>{if(!r)return 28;let n=[this.script,...this.arguments||[]],i=new DataView(r.buffer);return i.setUint32(e,n.length,!0),i.setUint32(t,n.reduce((e,t)=>e+t.length+1,0),!0),0},args_get:(e,t)=>{if(!r)return 28;let n=[this.script,...this.arguments||[]],i=new DataView(r.buffer),a=new TextEncoder,o=t;for(let t=0;t<n.length;t++){i.setUint32(e+t*4,o,!0);let s=a.encode(n[t]+`\0`);new Uint8Array(r.buffer).set(s,o),o+=s.length}return 0},environ_sizes_get:(e,t)=>{if(r){let n=new DataView(r.buffer);n.setUint32(e,0,!0),n.setUint32(t,0,!0)}return 0},environ_get:()=>0,clock_time_get:(e,t,n)=>{if(r){let e=BigInt(Date.now())*1000000n;new DataView(r.buffer).setBigUint64(n,e,!0)}return 0},fd_close:()=>0,fd_seek:()=>70,fd_prestat_get:()=>8,fd_prestat_dir_name:()=>8,path_open:()=>76,random_get:(e,t)=>{if(r){let n=new Uint8Array(r.buffer,e,t);for(let e=0;e<t;e++)n[e]=Math.random()*256|0}return 0}},{get(e,t){return t in e?e[t]:()=>0}}),l={wasi_snapshot_preview1:c,wasi_unstable:c,env:new Proxy({print:(e,t)=>{r&&i(1,n.decode(new Uint8Array(r.buffer,e,t)))},eprint:(e,t)=>{r&&i(2,n.decode(new Uint8Array(r.buffer,e,t)))},abort:()=>{throw this.exitCode=134,{_wasmExit:!0,code:134}}},{get(e,t){return t in e?e[t]:()=>0}})};try{let t=await WebAssembly.compile(e);for(let e of WebAssembly.Module.imports(t))if(e.kind===`memory`){let t=new WebAssembly.Memory({initial:1,maximum:256});r=t,l[e.module]||(l[e.module]={}),l[e.module][e.name]=t}let n=await WebAssembly.instantiate(t,l);n.exports.memory&&(r=n.exports.memory);let i=n.exports._start||n.exports.__wasi_command||n.exports.main||n.exports.run;if(!i)this.stdErr=`${this.script}: no entry point found (export _start, main, or run)`,this.exitCode=1;else try{await i()}catch(e){(!e||!e._wasmExit)&&(this.stdErr=`${this.script}: runtime error: ${e?.message||String(e)}`,this.exitCode=1)}}catch(e){(!e||!e._wasmExit)&&(this.stdErr=`${this.script}: ${e?.message||String(e)}`,this.exitCode=1)}a()}}})),K=t(((e,t)=>{var n=M(),r=class extends n{get name(){return`test`}get requiresFilesystem(){return!0}run(){let e=[...this.arguments];return e[e.length-1]===`]`&&e.pop(),this._evaluate(e)||(this.exitCode=1),Promise.resolve()}_evaluate(e){if(e.length===0)return!1;let t=e.indexOf(`-o`);if(t!==-1)return this._evaluate(e.slice(0,t))||this._evaluate(e.slice(t+1));let n=e.indexOf(`-a`);if(n!==-1)return this._evaluate(e.slice(0,n))&&this._evaluate(e.slice(n+1));if(e[0]===`!`)return!this._evaluate(e.slice(1));if(e.length===1)return e[0].length>0;if(e.length===2){let[t,n]=e;switch(t){case`-n`:return n.length>0;case`-z`:return n.length===0;case`-e`:return this.fs?this.fs.getFileByPath(n)!=null:!1;case`-f`:{if(!this.fs)return!1;let e=this.fs.getFileByPath(n);return e!=null&&e.constructor!==Object}case`-d`:{if(!this.fs)return!1;let e=this.fs.getFileByPath(n);return e!=null&&e.constructor===Object}case`-r`:{if(!this.fs)return!1;let e=this.fs.getMode(n);return e!==null&&(e&292)!=0}case`-w`:{if(!this.fs)return!1;let e=this.fs.getMode(n);return e!==null&&(e&146)!=0}case`-x`:{if(!this.fs)return!1;let e=this.fs.getMode(n);return e!==null&&(e&73)!=0}case`-s`:{if(!this.fs)return!1;let e=this.fs.getFileByPath(n);return e==null||e.constructor===Object?!1:e.toString().length>0}default:return!1}}if(e.length===3){let[t,n,r]=e;switch(n){case`=`:case`==`:return t===r;case`!=`:return t!==r;case`-eq`:return parseInt(t)===parseInt(r);case`-ne`:return parseInt(t)!==parseInt(r);case`-lt`:return parseInt(t)<parseInt(r);case`-le`:return parseInt(t)<=parseInt(r);case`-gt`:return parseInt(t)>parseInt(r);case`-ge`:return parseInt(t)>=parseInt(r);default:return!1}}return!1}},i=class extends r{get name(){return`[`}};Object.defineProperty(i,`name`,{value:`[`}),t.exports={Test:r,TestBracket:i}})),q=t(((e,t)=>{var n=M();t.exports=class extends n{get requiresFilesystem(){return!0}run(){let e=!1,t=!1,n=!1,r=[];for(let i of this.arguments)if(i.startsWith(`-`)&&i.length>1)for(let r of i.slice(1))r===`n`?e=!0:r===`b`?(t=!0,e=!1):r===`s`&&(n=!0);else r.push(i);let i=[];if(r.length===0){let e=this.stdin;if(e==null)return this.stdErr=`cat: no file specified`,this.exitCode=1,Promise.resolve();i.push(e)}else for(let e of r){if(e===`-`){i.push(this.stdin||``);continue}let t=this.fs.getFileByPath(e);if(t==null)return this.stdErr=`${e}: No such file or directory`,this.exitCode=1,Promise.resolve();if(t.constructor===Object)return this.stdErr=`${e}: Is a directory`,this.exitCode=1,Promise.resolve();i.push(t.toString())}let a=i.join(``);a.endsWith(`
|
|
3
|
+
`)&&(a=a.slice(0,-1));let o=a.split(`
|
|
4
|
+
`);if(n&&(o=o.reduce((e,t)=>(t===``&&e.length>0&&e[e.length-1]===``||e.push(t),e),[])),t||e){let e=0;o=o.map(n=>t&&n===``?n:(e++,`${String(e).padStart(6)}\t${n}`))}return o.forEach(e=>this.stdOut=e),Promise.resolve()}}})),ce=t(((e,t)=>{function n(e){return typeof e==`object`&&!!e}function r(e){return n(e)&&typeof e.length==`number`}function i(e){return Array.isArray(e)?e:e===void 0?[]:r(e)||e instanceof Set?Array.from(e):[e]}t.exports=i})),le=t(((e,t)=>{function n(e,t,...n){let r=[];if(!Array.isArray(e))throw Error(`Input must be an array`);for(let[i,a]of e.entries()){let e=[];n.forEach(t=>{typeof t==`function`?e=e.concat(t(a)):e.push(t)}),t(a)&&r.push({index:i,replaceWithValue:e})}for(let t of r.reverse()){let n=[t.index,1].concat(t.replaceWithValue);e.splice.apply(e,n)}return e}t.exports=n})),ue=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e){return!isNaN(parseFloat(e))}function n(e){return!isNaN(parseFloat(e))&&isFinite(e)}function r(e){return typeof e==`object`&&!!e&&e.constructor===Object}function i(e){return a(e)&&typeof e.length==`number`}function a(e){return typeof e==`object`&&!!e}function o(e){return e!==void 0}function s(e){return!o(e)}function c(e){return e===null}function l(e){return o(e)&&!c(e)&&!Number.isNaN(e)}function u(e){return typeof e==`function`?/^class /.test(Function.prototype.toString.call(e)):!1}function d(e){if(e===null)return!0;switch(typeof e){case`string`:case`number`:case`symbol`:case`undefined`:case`boolean`:return!0;default:return!1}}function f(e){if(e){let t=o(Promise)&&e instanceof Promise,n=e.then&&typeof e.then==`function`;return!!(t||n)}else return!1}function p(e){return e===null||!o(e)?!1:typeof e[Symbol.iterator]==`function`||typeof e[Symbol.asyncIterator]==`function`}function m(e){return typeof e==`string`}function h(e){return typeof e==`function`}function g(e){return typeof e==`function`&&e.constructor.name===`AsyncFunction`}e.default={isNumber:t,isFiniteNumber:n,isPlainObject:r,isArrayLike:i,isObject:a,isDefined:o,isUndefined:s,isNull:c,isDefinedValue:l,isClass:u,isPrimitive:d,isPromise:f,isIterable:p,isString:m,isFunction:h,isAsyncFunction:g},e.isArrayLike=i,e.isAsyncFunction=g,e.isClass=u,e.isDefined=o,e.isDefinedValue=l,e.isFiniteNumber=n,e.isFunction=h,e.isIterable=p,e.isNull=c,e.isNumber=t,e.isObject=a,e.isPlainObject=r,e.isPrimitive=d,e.isPromise=f,e.isString=m,e.isUndefined=s})),de=t(((e,t)=>{r();var i=1/0,a=`[object Symbol]`,o=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,s=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,c=`\\ud800-\\udfff`,l=`\\u0300-\\u036f\\ufe20-\\ufe23`,u=`\\u20d0-\\u20f0`,d=`\\u2700-\\u27bf`,f=`a-z\\xdf-\\xf6\\xf8-\\xff`,p=`\\xac\\xb1\\xd7\\xf7`,m=`\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf`,h=`\\u2000-\\u206f`,g=` \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000`,_=`A-Z\\xc0-\\xd6\\xd8-\\xde`,v=`\\ufe0e\\ufe0f`,y=p+m+h+g,b=`['’]`,x=`[`+c+`]`,S=`[`+y+`]`,C=`[`+l+u+`]`,w=`\\d+`,T=`[`+d+`]`,E=`[`+f+`]`,D=`[^`+c+y+w+d+f+_+`]`,O=`\\ud83c[\\udffb-\\udfff]`,k=`(?:`+C+`|`+O+`)`,A=`[^`+c+`]`,j=`(?:\\ud83c[\\udde6-\\uddff]){2}`,M=`[\\ud800-\\udbff][\\udc00-\\udfff]`,N=`[`+_+`]`,P=`\\u200d`,F=`(?:`+E+`|`+D+`)`,I=`(?:`+N+`|`+D+`)`,L=`(?:`+b+`(?:d|ll|m|re|s|t|ve))?`,ee=`(?:`+b+`(?:D|LL|M|RE|S|T|VE))?`,R=k+`?`,z=`[`+v+`]?`,B=`(?:`+P+`(?:`+[A,j,M].join(`|`)+`)`+z+R+`)*`,V=z+R+B,H=`(?:`+[T,j,M].join(`|`)+`)`+V,U=`(?:`+[A+C+`?`,C,j,M,x].join(`|`)+`)`,W=RegExp(b,`g`),te=RegExp(C,`g`),ne=RegExp(O+`(?=`+O+`)|`+U+V,`g`),G=RegExp([N+`?`+E+`+`+L+`(?=`+[S,N,`$`].join(`|`)+`)`,I+`+`+ee+`(?=`+[S,N+F,`$`].join(`|`)+`)`,N+`?`+F+`+`+L,N+`+`+ee,w,H].join(`|`),`g`),re=RegExp(`[`+P+c+l+u+v+`]`),ie=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ae={À:`A`,Á:`A`,Â:`A`,Ã:`A`,Ä:`A`,Å:`A`,à:`a`,á:`a`,â:`a`,ã:`a`,ä:`a`,å:`a`,Ç:`C`,ç:`c`,Ð:`D`,ð:`d`,È:`E`,É:`E`,Ê:`E`,Ë:`E`,è:`e`,é:`e`,ê:`e`,ë:`e`,Ì:`I`,Í:`I`,Î:`I`,Ï:`I`,ì:`i`,í:`i`,î:`i`,ï:`i`,Ñ:`N`,ñ:`n`,Ò:`O`,Ó:`O`,Ô:`O`,Õ:`O`,Ö:`O`,Ø:`O`,ò:`o`,ó:`o`,ô:`o`,õ:`o`,ö:`o`,ø:`o`,Ù:`U`,Ú:`U`,Û:`U`,Ü:`U`,ù:`u`,ú:`u`,û:`u`,ü:`u`,Ý:`Y`,ý:`y`,ÿ:`y`,Æ:`Ae`,æ:`ae`,Þ:`Th`,þ:`th`,ß:`ss`,Ā:`A`,Ă:`A`,Ą:`A`,ā:`a`,ă:`a`,ą:`a`,Ć:`C`,Ĉ:`C`,Ċ:`C`,Č:`C`,ć:`c`,ĉ:`c`,ċ:`c`,č:`c`,Ď:`D`,Đ:`D`,ď:`d`,đ:`d`,Ē:`E`,Ĕ:`E`,Ė:`E`,Ę:`E`,Ě:`E`,ē:`e`,ĕ:`e`,ė:`e`,ę:`e`,ě:`e`,Ĝ:`G`,Ğ:`G`,Ġ:`G`,Ģ:`G`,ĝ:`g`,ğ:`g`,ġ:`g`,ģ:`g`,Ĥ:`H`,Ħ:`H`,ĥ:`h`,ħ:`h`,Ĩ:`I`,Ī:`I`,Ĭ:`I`,Į:`I`,İ:`I`,ĩ:`i`,ī:`i`,ĭ:`i`,į:`i`,ı:`i`,Ĵ:`J`,ĵ:`j`,Ķ:`K`,ķ:`k`,ĸ:`k`,Ĺ:`L`,Ļ:`L`,Ľ:`L`,Ŀ:`L`,Ł:`L`,ĺ:`l`,ļ:`l`,ľ:`l`,ŀ:`l`,ł:`l`,Ń:`N`,Ņ:`N`,Ň:`N`,Ŋ:`N`,ń:`n`,ņ:`n`,ň:`n`,ŋ:`n`,Ō:`O`,Ŏ:`O`,Ő:`O`,ō:`o`,ŏ:`o`,ő:`o`,Ŕ:`R`,Ŗ:`R`,Ř:`R`,ŕ:`r`,ŗ:`r`,ř:`r`,Ś:`S`,Ŝ:`S`,Ş:`S`,Š:`S`,ś:`s`,ŝ:`s`,ş:`s`,š:`s`,Ţ:`T`,Ť:`T`,Ŧ:`T`,ţ:`t`,ť:`t`,ŧ:`t`,Ũ:`U`,Ū:`U`,Ŭ:`U`,Ů:`U`,Ű:`U`,Ų:`U`,ũ:`u`,ū:`u`,ŭ:`u`,ů:`u`,ű:`u`,ų:`u`,Ŵ:`W`,ŵ:`w`,Ŷ:`Y`,ŷ:`y`,Ÿ:`Y`,Ź:`Z`,Ż:`Z`,Ž:`Z`,ź:`z`,ż:`z`,ž:`z`,IJ:`IJ`,ij:`ij`,Œ:`Oe`,œ:`oe`,ʼn:`'n`,ſ:`ss`},oe=typeof n==`object`&&n&&n.Object===Object&&n,se=typeof self==`object`&&self&&self.Object===Object&&self,K=oe||se||Function(`return this`)();function q(e,t,n,r){var i=-1,a=e?e.length:0;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function ce(e){return e.split(``)}function le(e){return e.match(o)||[]}function ue(e){return function(t){return e?.[t]}}var de=ue(ae);function fe(e){return re.test(e)}function pe(e){return ie.test(e)}function me(e){return fe(e)?J(e):ce(e)}function J(e){return e.match(ne)||[]}function he(e){return e.match(G)||[]}var ge=Object.prototype.toString,Y=K.Symbol,_e=Y?Y.prototype:void 0,ve=_e?_e.toString:void 0;function ye(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function be(e){if(typeof e==`string`)return e;if(Te(e))return ve?ve.call(e):``;var t=e+``;return t==`0`&&1/e==-i?`-0`:t}function xe(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:ye(e,t,n)}function Se(e){return function(t){t=Ee(t);var n=fe(t)?me(t):void 0,r=n?n[0]:t.charAt(0),i=n?xe(n,1).join(``):t.slice(1);return r[e]()+i}}function Ce(e){return function(t){return q(je(ke(t).replace(W,``)),e,``)}}function we(e){return!!e&&typeof e==`object`}function Te(e){return typeof e==`symbol`||we(e)&&ge.call(e)==a}function Ee(e){return e==null?``:be(e)}var De=Ce(function(e,t,n){return t=t.toLowerCase(),e+(n?Oe(t):t)});function Oe(e){return Ae(Ee(e).toLowerCase())}function ke(e){return e=Ee(e),e&&e.replace(s,de).replace(te,``)}var Ae=Se(`toUpperCase`);function je(e,t,n){return e=Ee(e),t=n?void 0:t,t===void 0?pe(e)?he(e):le(e):e.match(t)||[]}t.exports=De})),fe=t(((e,t)=>{T();var n=ce(),r=le(),i=ue(),a=de(),o={short:/^-([^\d-])$/,long:/^--(\S+)/,combinedShort:/^-[^\d-]{2,}$/,optEquals:/^(--\S+?)=(.*)/},s=class extends Array{load(e){if(this.clear(),e&&e!==w.argv)e=n(e);else{e=w.argv.slice(0);let t=w.execArgv.some(m)?1:2;e.splice(0,t)}e.forEach(e=>this.push(String(e)))}clear(){this.length=0}expandOptionEqualsNotation(){if(this.some(e=>o.optEquals.test(e))){let e=[];this.forEach(t=>{let n=t.match(o.optEquals);n?e.push(n[1],n[2]):e.push(t)}),this.clear(),this.load(e)}}expandGetoptNotation(){this.hasCombinedShortOptions()&&r(this,o.combinedShort,c)}hasCombinedShortOptions(){return this.some(e=>o.combinedShort.test(e))}static from(e){let t=new this;return t.load(e),t}};function c(e){return e=e.slice(1),e.split(``).map(e=>`-`+e)}function l(e){return o.optEquals.test(e)}function u(e){return(o.short.test(e)||o.long.test(e))&&!o.optEquals.test(e)}function d(e){return o.long.test(e)&&!l(e)}function f(e){return o.short.test(e)?e.match(o.short)[1]:d(e)?e.match(o.long)[1]:l(e)?e.match(o.optEquals)[1].replace(/^--/,``):null}function p(e){return!(u(e)||o.combinedShort.test(e)||o.optEquals.test(e))}function m(e){return[`--eval`,`-e`].indexOf(e)>-1||e.startsWith(`--eval=`)}var h=class{constructor(e){this.name=e.name,this.type=e.type||String,this.alias=e.alias,this.multiple=e.multiple,this.lazyMultiple=e.lazyMultiple,this.defaultOption=e.defaultOption,this.defaultValue=e.defaultValue,this.group=e.group;for(let t in e)this[t]||(this[t]=e[t])}isBoolean(){return this.type===Boolean||i.isFunction(this.type)&&this.type.name===`Boolean`}isMultiple(){return this.multiple||this.lazyMultiple}static create(e){return new this(e)}},g=class extends Array{validate(e){this.some(e=>!e.name)&&_(`INVALID_DEFINITIONS`,"Invalid option definitions: the `name` property is required on each definition"),this.some(e=>e.type&&typeof e.type!=`function`)&&_(`INVALID_DEFINITIONS`,"Invalid option definitions: the `type` property must be a setter fuction (default: `Boolean`)");let t;this.some(e=>(t=e,i.isDefined(e.alias)&&i.isNumber(e.alias)))&&_(`INVALID_DEFINITIONS`,`Invalid option definition: to avoid ambiguity an alias cannot be numeric [--`+t.name+` alias is -`+t.alias+`]`),this.some(e=>(t=e,i.isDefined(e.alias)&&e.alias.length!==1))&&_(`INVALID_DEFINITIONS`,`Invalid option definition: an alias must be a single character`),this.some(e=>(t=e,e.alias===`-`))&&_(`INVALID_DEFINITIONS`,`Invalid option definition: an alias cannot be "-"`),y(this.map(t=>e?t.name.toLowerCase():t.name))&&_(`INVALID_DEFINITIONS`,`Two or more option definitions have the same name`),y(this.map(t=>e&&i.isDefined(t.alias)?t.alias.toLowerCase():t.alias))&&_(`INVALID_DEFINITIONS`,`Two or more option definitions have the same alias`),this.filter(e=>e.defaultOption===!0).length>1&&_(`INVALID_DEFINITIONS`,`Only one option definition can be the defaultOption`),this.some(e=>(t=e,e.isBoolean()&&e.defaultOption))&&_(`INVALID_DEFINITIONS`,`A boolean option ["${t.name}"] can not also be the defaultOption.`)}get(e,t){if(u(e))if(o.short.test(e)){let n=f(e);if(t){let e=n.toLowerCase();return this.find(t=>i.isDefined(t.alias)&&t.alias.toLowerCase()===e)}else return this.find(e=>e.alias===n)}else{let n=f(e);if(t){let e=n.toLowerCase();return this.find(t=>t.name.toLowerCase()===e)}else return this.find(e=>e.name===n)}else return this.find(t=>t.name===e)}getDefault(){return this.find(e=>e.defaultOption===!0)}isGrouped(){return this.some(e=>e.group)}whereGrouped(){return this.filter(v)}whereNotGrouped(){return this.filter(e=>!v(e))}whereDefaultValueSet(){return this.filter(e=>i.isDefined(e.defaultValue))}static from(e,t){if(e instanceof this)return e;let r=super.from(n(e),e=>h.create(e));return r.validate(t),r}};function _(e,t){let n=Error(t);throw n.name=e,n}function v(e){return n(e.group).some(e=>e)}function y(e){let t={};for(let n=0;n<e.length;n++){let r=e[n];if(t[r])return!0;i.isDefined(r)&&(t[r]=!0)}}var b=class{constructor(e,t){this.options=Object.assign({},t),this.definitions=g.from(e,this.options.caseInsensitive),this.argv=s.from(this.options.argv),this.argv.hasCombinedShortOptions()&&r(this.argv,o.combinedShort.test.bind(o.combinedShort),e=>(e=e.slice(1),e.split(``).map(t=>({origArg:`-${e}`,arg:`-`+t}))))}*[Symbol.iterator](){let e=this.definitions,t,n,r,a,s=!1,c=!1,d;for(let f of this.argv){if(i.isPlainObject(f)&&(d=f.origArg,f=f.arg),c&&this.options.stopAtFirstUnknown){yield{event:`unknown_value`,arg:f,name:`_unknown`,value:void 0};continue}if(u(f))t=e.get(f,this.options.caseInsensitive),n=void 0,t?(n=t.isBoolean()?!0:null,a=`set`):a=`unknown_option`;else if(l(f)){let r=f.match(o.optEquals);t=e.get(r[1],this.options.caseInsensitive),t?t.isBoolean()?(yield{event:`unknown_value`,arg:f,name:`_unknown`,value:n,def:t},a=`set`,n=!0):(a=`set`,n=r[2]):a=`unknown_option`}else p(f)&&(t?(n=f,a=`set`):(t=this.definitions.getDefault(),t&&!s?(n=f,a=`set`):(a=`unknown_value`,t=void 0)));r=t?t.name:`_unknown`;let m={event:a,arg:f,name:r,value:n,def:t};d&&(m.subArg=f,m.arg=d),yield m,r===`_unknown`&&(c=!0),t&&t.defaultOption&&!t.isMultiple()&&a===`set`&&(s=!0),t&&t.isBoolean()&&(t=void 0),t&&!t.multiple&&i.isDefined(n)&&n!==null&&(t=void 0),n=void 0,a=void 0,r=void 0,d=void 0}}},x=new WeakMap,S=class{constructor(e){this.definition=new h(e),this.state=null,this.resetToDefault()}get(){return x.get(this)}set(e){this._set(e,`set`)}_set(e,t){let n=this.definition;if(n.isMultiple()){if(e!=null){let r=this.get();this.state===`default`&&(r.length=0),r.push(n.type(e)),this.state=t}}else if(!n.isMultiple()&&this.state===`set`){let t=Error(`Singular option already set [${this.definition.name}=${this.get()}]`);throw t.name=`ALREADY_SET`,t.value=e,t.optionName=n.name,t}else e==null?x.set(this,e):(x.set(this,n.type(e)),this.state=t)}resetToDefault(){i.isDefined(this.definition.defaultValue)?this.definition.isMultiple()?x.set(this,n(this.definition.defaultValue).slice()):x.set(this,this.definition.defaultValue):this.definition.isMultiple()?x.set(this,[]):x.set(this,null),this.state=`default`}static create(e){return e=new h(e),e.isBoolean()?C.create(e):new this(e)}},C=class extends S{set(e){super.set(!0)}static create(e){return new this(e)}},E=class extends Map{constructor(e){super(),this.definitions=g.from(e),this.set(`_unknown`,S.create({name:`_unknown`,multiple:!0}));for(let e of this.definitions.whereDefaultValueSet())this.set(e.name,S.create(e))}toObject(e){e||={};let t={};for(let n of this){let r=e.camelCase&&n[0]!==`_unknown`?a(n[0]):n[0],i=n[1];r===`_unknown`&&!i.get().length||(t[r]=i.get())}return e.skipUnknown&&delete t._unknown,t}},D=class extends E{toObject(e){let t=super.toObject({skipUnknown:e.skipUnknown}),r=super.toObject(e),o=r._unknown;delete r._unknown;let s={_all:r};return o&&o.length&&(s._unknown=o),this.definitions.whereGrouped().forEach(r=>{let o=e.camelCase?a(r.name):r.name,c=t[r.name];for(let e of n(r.group))s[e]=s[e]||{},i.isDefined(c)&&(s[e][o]=c)}),this.definitions.whereNotGrouped().forEach(n=>{let r=e.camelCase?a(n.name):n.name,o=t[n.name];i.isDefined(o)&&(s._none||={},s._none[r]=o)}),s}};function O(e,t){t||={},t.stopAtFirstUnknown&&(t.partial=!0),e=g.from(e,t.caseInsensitive);let n=new b(e,{argv:t.argv,stopAtFirstUnknown:t.stopAtFirstUnknown,caseInsensitive:t.caseInsensitive}),r=new(e.isGrouped()?D:E)(e);for(let e of n){let n=e.subArg||e.arg;if(!t.partial){if(e.event===`unknown_value`){let e=Error(`Unknown value: ${n}`);throw e.name=`UNKNOWN_VALUE`,e.value=n,e}else if(e.event===`unknown_option`){let e=Error(`Unknown option: ${n}`);throw e.name=`UNKNOWN_OPTION`,e.optionName=n,e}}let i;r.has(e.name)?i=r.get(e.name):(i=S.create(e.def),r.set(e.name,i)),e.name===`_unknown`?i.set(n):i.set(e.value)}return r.toObject({skipUnknown:!t.partial,camelCase:t.camelCase})}t.exports=O})),pe=t(((e,t)=>{var n=M(),r=fe();t.exports=class extends n{get requiresFilesystem(){return!0}run(){let e=this.arguments.filter(e=>e!==`-1`),t=e.length!==this.arguments.length,n;try{n=this.parseArgs(e)}catch(e){return this.printHelp(e),Promise.reject()}if(n.one=n.one||t,n.help)return this.printHelp(),Promise.resolve();let r=this.fs.getFileByPath(n.path);if(!r)return Promise.reject(`${n.path}: No such file or directory`);if(r.constructor===Object){let e=r;n.all||(e=Object.entries(e).reduce((e,[t,n])=>(t.startsWith(`.`)||(e[t]=n),e),{}));let t=this.fs.absolutePath(n.path);return n.long?this.printLong(e,t):n.one?Object.entries(e).forEach(([e,t])=>{this.stdOut=this._applyIndicator(e,t,n.classify)}):this.printSimple(e,n.classify),n.recursive&&Object.entries(e).forEach(([e,r])=>{if(r&&r.constructor===Object){let r=t.endsWith(`/`)?t+e:t+`/`+e;this.stdOut=``,this.stdOut=r+`:`,this.run.call(Object.create(this,{arguments:{value:[...this.arguments.filter(e=>e!==n.path&&e!==`./`),r]}}))}}),Promise.resolve()}return Promise.resolve(n.path)}printHelp(e){e&&(this.stdOut=e.message),this.stdOut=`usage: ls [-alRF1h] [file ...]`}printSimple(e,t){this.stdOut=Object.entries(e).reduce((e,[n,r])=>e+this.padString(this._applyIndicator(n,r,t)),``)}printLong(e,t){Object.entries(e).forEach(([e,n])=>{let r=t+`/`+e,i=n!=null&&n.constructor===Object,a=this.fs.getMode(r),o=a===null?i?493:420:a,s=this._modeToString(o,i),c=this.fs.getSize(r);return this.stdOut=`${s} root users ${this.padString(c,10)} ${e}`})}_applyIndicator(e,t,n){return n?t&&t.constructor===Object?e+`/`:typeof t==`function`||this.fs.isExecutable(e)?e+`*`:e:e}_modeToString(e,t){return(t?`d`:`-`)+(e&256?`r`:`-`)+(e&128?`w`:`-`)+(e&64?`x`:`-`)+(e&32?`r`:`-`)+(e&16?`w`:`-`)+(e&8?`x`:`-`)+(e&4?`r`:`-`)+(e&2?`w`:`-`)+(e&1?`x`:`-`)}padString(e,t=16){let n=t-e.toString().length,r=``;for(let e=0;e<n;e++)r+=` `;return e.toString()+r}parseArgs(e=this.arguments){return r([{name:`path`,defaultOption:!0,defaultValue:`./`,type:String},{name:`all`,alias:`a`,type:Boolean},{name:`long`,alias:`l`,type:Boolean},{name:`recursive`,alias:`R`,type:Boolean},{name:`one`,type:Boolean},{name:`classify`,alias:`F`,type:Boolean},{name:`help`,alias:`h`,type:Boolean}],{argv:e})}}})),me=t(((e,t)=>{var n=M();t.exports=class extends n{run(){let e=[...this.arguments],t=!1,n=!1;for(;e.length>0&&/^-[neE]+$/.test(e[0]);){let r=e.shift();r.includes(`n`)&&(t=!0),r.includes(`e`)&&(n=!0),r===`-E`&&(n=!1)}let r=e.join(` `);return n&&(r=r.replace(/\\c.*$/s,()=>(t=!0,``)).replace(/\\0([0-7]{1,3})/g,(e,t)=>String.fromCharCode(parseInt(t,8))).replace(/\\x([0-9a-fA-F]{1,2})/g,(e,t)=>String.fromCharCode(parseInt(t,16))).replace(/\\n/g,`
|
|
5
|
+
`).replace(/\\t/g,` `).replace(/\\r/g,`\r`).replace(/\\a/g,`\x07`).replace(/\\b/g,`\b`).replace(/\\e/g,`\x1B`).replace(/\\f/g,`\f`).replace(/\\v/g,`\v`).replace(/\\\\/g,`\\`)),t?(r.split(/\r?\n/).forEach(e=>this.stdOut=e),Promise.resolve()):Promise.resolve(r)}}})),J=t(((e,t)=>{var n=M();t.exports=class extends n{get requiresFilesystem(){return!0}run(){let e=!1,t=!1,n=!1,r=!1,i=!1,a=!1,o=!1,s=!1,c=!1,l=!1,u=!1,d=!1,f=!1,p=null,m=!1,h=[],g=[],_=[...this.arguments],v=0;for(;v<_.length;){let y=_[v];if(y===`--`){v++;break}if(y.startsWith(`-`)&&y.length>1){let g=y.slice(1),b=!1;for(let y=0;y<g.length&&!b;y++)switch(g[y]){case`i`:e=!0;break;case`v`:t=!0;break;case`n`:n=!0;break;case`c`:r=!0;break;case`l`:i=!0;break;case`L`:a=!0;break;case`q`:o=!0;break;case`r`:case`R`:s=!0;break;case`F`:c=!0;break;case`E`:break;case`o`:l=!0;break;case`w`:u=!0;break;case`x`:d=!0;break;case`s`:f=!0;break;case`a`:break;case`e`:{let e=g.slice(y+1),t=e.length>0?e:_[++v];for(let e of t.split(`
|
|
6
|
+
`))e.length>0&&h.push(e);m=!0,b=!0;break}case`f`:{let e=g.slice(y+1);p=e.length>0?e:_[++v],m=!0,b=!0;break}default:return f||(this.stdErr=`grep: invalid option -- '${g[y]}'`),this.exitCode=2,Promise.resolve()}}else g.push(y);v++}for(;v<_.length;)g.push(_[v++]);if(p!==null){let e=``;if(p===`-`)e=this.stdin||``;else{let t=this.fs.getFileByPath(p);if(t==null)return f||(this.stdErr=`grep: ${p}: No such file or directory`),this.exitCode=2,Promise.resolve();e=t.toString()}for(let t of e.split(`
|
|
7
|
+
`))t.length>0&&h.push(t)}if(h.length===0&&!m){if(g.length===0)return this.stdErr=`grep: no pattern given`,this.exitCode=2,Promise.resolve();let e=g.shift();for(let t of e.split(`
|
|
8
|
+
`))t.length>0&&h.push(t);h.length===0&&h.push(e)}let y=e?`gi`:`g`,b=[];for(let e of h){let t=c?e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`):e;u&&(t=`(?:^|\\W)(?:${t})(?:\\W|$)`),d&&(t=`^(?:${t})$`);try{b.push(new RegExp(t,y))}catch(e){return this.stdErr=`grep: invalid regex: ${e.message}`,this.exitCode=2,Promise.resolve()}}let x=[],S=!1,C=this.stdin||``,w=(e,t=!1)=>{let n=this.fs.getFileByPath(e);if(n==null){f||(this.stdErr=`grep: ${e}: No such file or directory`),S=!0;return}if(n.constructor===Object){if(!s){f||(this.stdErr=`grep: ${e}: Is a directory`),S=!0;return}if(!t&&this.fs.isSymlink&&this.fs.isSymlink(e))return;for(let t of Object.keys(n))w(e.replace(/\/$/,``)+`/`+t,!1);return}x.push({label:e,content:n.toString()})};if(g.length===0)x.push({label:null,content:C});else for(let e of g)e===`-`?x.push({label:`(standard input)`,content:C}):w(e,!0);let T=s||x.length+ +!!S>1,E=!1,D=e=>{if(b.length===0)return!1;for(let t of b)if(t.lastIndex=0,t.test(e))return!0;return!1},O=e=>{let t=[];for(let n of b){n.lastIndex=0;let r;for(;(r=n.exec(e))!==null;){if(r[0].length===0){n.lastIndex++;continue}if(t.push(r[0]),!n.global)break}}return t};for(let{label:e,content:s}of x){let c=s.split(`
|
|
9
|
+
`);c.length>0&&c[c.length-1]===``&&c.pop();let u=0,d=[];for(let e=0;e<c.length;e++){let n=c[e],r,i=[];l&&!t?(i=O(n),r=i.length>0):r=D(n),r!==t&&(u++,d.push({text:n,num:e+1,segments:i}))}if(a){u===0&&(this.stdOut=e||`(standard input)`,E=!0);continue}if(u>0&&(E=!0),!o){if(i){u>0&&(this.stdOut=e||`(standard input)`);continue}if(r){let t=T&&e?`${e}:`:``;this.stdOut=`${t}${u}`;continue}for(let{text:t,num:r,segments:i}of d){let a=T&&e?`${e}:`:``,o=n?`${r}:`:``;if(l)for(let e of i)this.stdOut=`${a}${o}${e}`;else this.stdOut=`${a}${o}${t}`}}}return S&&!(o&&E)?this.exitCode=2:E||(this.exitCode=1),Promise.resolve()}}})),he=t(((e,t)=>{var n=M();t.exports=class extends n{get name(){return`true`}run(){return Promise.resolve()}}})),ge=t(((e,t)=>{var n=M();t.exports=class extends n{get name(){return`false`}run(){return this.exitCode=1,Promise.resolve()}}})),Y=t(((e,t)=>{var{Test:n,TestBracket:r}=K();t.exports=[q(),pe(),me(),J(),he(),ge(),n,r]})),_e=t(((e,t)=>{var n=N();t.exports=class extends n{run(){if(this.arguments.length!==1)return Promise.reject(`alias requires a single argument`);let e=this.arguments[0].split(`=`);return e.length===2?(this.context.setAlias(e[0],e[1]),Promise.resolve()):Promise.reject(`alias requires a key and value delimited by '=' ie: key=value`)}}})),ve=t(((e,t)=>{var n=N();t.exports=class extends n{run(){if(this.arguments.length!==1)return Promise.reject(`export requires a single argument`);let e=this.arguments[0].split(`=`);return e.length!==2&&Promise.reject(`export requires a key and value delimited by '=' ie: key=value`),this.context.setVar(e[0],e[1]),Promise.resolve()}}})),ye=t(((e,t)=>{var n=N();t.exports=class extends n{run(){if(this.arguments.length!==1)return Promise.reject(`cd requires a single argument`);let e=this.context.fs.getFileByPath(this.arguments[0]);return e?e.constructor===Object?(this.context.setCwd(this.arguments[0]),Promise.resolve()):Promise.reject(`${this.arguments[0]}: Not a directory`):Promise.reject(`file or directory not found`)}}})),be=t(((e,t)=>{var n=N();t.exports=class extends n{get name(){return`chmod`}get requiresFilesystem(){return!0}run(){let e=this.arguments;if(e.length<2)return this.stdErr=`chmod: usage: chmod MODE FILE...`,this.exitCode=1,Promise.resolve();let t=e[0],n=e.slice(1);for(let e of n){if(this.fs.getFileByPath(e)==null){this.stdErr=`chmod: cannot access '${e}': No such file or directory`,this.exitCode=1;continue}let n=this.fs.getMode(e),r=this._parseMode(t,n===null?420:n);if(r===null)return this.stdErr=`chmod: invalid mode: '${t}'`,this.exitCode=1,Promise.resolve();this.fs.setMode(e,r)}return Promise.resolve()}_parseMode(e,t){if(/^0?[0-7]{3,4}$/.test(e))return parseInt(e,8);let n=e.match(/^([ugoa]*)([+\-=])([rwx]+)$/);if(!n)return null;let[,r,i,a]=n,o=!r||r===`a`?[`u`,`g`,`o`]:r.split(``),s={u:256,g:32,o:4},c={u:128,g:16,o:2},l={u:64,g:8,o:1},u=0;for(let e of o)a.includes(`r`)&&(u|=s[e]),a.includes(`w`)&&(u|=c[e]),a.includes(`x`)&&(u|=l[e]);if(i===`+`)return t|u;if(i===`-`)return t&~u;if(i===`=`){let e=0;for(let t of o)e|=s[t]|c[t]|l[t];return t&~e|u}return null}}})),xe=t(((e,t)=>{var n=N(),r=E();t.exports=class extends n{get name(){return`cp`}get requiresFilesystem(){return!0}run(){let e=!1,t=null,n=!1,r=!1,i=null,a=[],o=[...this.arguments],s=0;for(;s<o.length;){let c=o[s];if(c===`--`){s++;break}if(c.startsWith(`-`)&&c.length>1)for(let a of c.slice(1))switch(a){case`r`:case`R`:e=!0,n=!0;break;case`a`:e=!0,n=!0,t=`preserve`,i=`preserve`;break;case`d`:case`P`:t=`preserve`,i=`preserve`;break;case`L`:t=`follow`,i=`follow`;break;case`H`:t=`follow_cl`,r=!0;break;case`f`:break}else a.push(c);s++}for(;s<o.length;)a.push(o[s++]);let c=t===null?n?`preserve`:`follow`:t;if(a.length<2)return this.stdErr=`cp: missing destination file operand${a.length?` after '${a[0]}'`:``}`,this.exitCode=1,Promise.resolve();let l=a[a.length-1],u=a.slice(0,-1),d=this.fs.getFileByPath(l),f=d!=null&&d.constructor===Object,p=r||c===`follow_cl`?`follow`:c,m=r||c===`follow_cl`?i===null?`preserve`:i:c;for(let t of u){let n=this.fs.isSymlink?this.fs.isSymlink(t):!1,r=this.fs.getFileByPath(t);if(r==null){this.stdErr=`cp: cannot stat '${t}': No such file or directory`,this.exitCode=1;continue}if(!(n&&p===`preserve`)&&r.constructor===Object&&!e){this.stdErr=`cp: omitting directory '${t}'`,this.exitCode=1;continue}let i=f?l.replace(/\/$/,``)+`/`+t.split(`/`).pop():l,a=this._copy(t,i,p,n,m);a&&(this.stdErr=a,this.exitCode=1)}return Promise.resolve()}_copy(e,t,n,i,a){if(i&&n===`preserve`&&this.fs.readSymlink){let n=this.fs.readSymlink(e);if(n===null)return`cp: cannot read symlink '${e}'`;try{this.fs.createSymlink(n,t)}catch(e){return`cp: cannot create symlink '${t}': ${e.message}`}return null}let o=this.fs.getFileByPath(e);if(o==null)return`cp: cannot stat '${e}': No such file or directory`;if(o.constructor===Object){try{this.fs.setFileByPath(t,{},!0)}catch(e){return`cp: cannot create directory '${t}': ${e.message}`}let n=this.fs.absolutePath(e),i;try{i=r.readdirSync(n)}catch{i=Object.keys(o)}for(let n of i){let r=e.replace(/\/$/,``)+`/`+n,i=t.replace(/\/$/,``)+`/`+n,o=this.fs.isSymlink?this.fs.isSymlink(r):!1,s=this._copy(r,i,a,o,a);s&&(this.stdErr=s,this.exitCode=1)}}else this.fs.setFileByPath(t,o,!0);return null}}})),Se=t(((e,t)=>{var n=N();t.exports=class extends n{get name(){return`mkdir`}get requiresFilesystem(){return!0}run(){let e=!1,t=[];for(let n of this.arguments)n===`-p`||n===`--parents`?e=!0:t.push(n);if(t.length===0)return this.stdErr=`mkdir: missing operand`,this.exitCode=1,Promise.resolve();for(let n of t){if(this.fs.getFileByPath(n)!=null){e||(this.stdErr=`mkdir: cannot create directory '${n}': File exists`,this.exitCode=1);continue}try{this.fs.setFileByPath(n,{},e)}catch(e){this.stdErr=`mkdir: cannot create directory '${n}': ${e.message}`,this.exitCode=1}}return Promise.resolve()}}})),Ce=t(((e,t)=>{var n=N(),r=E();t.exports=class extends n{get name(){return`mv`}get requiresFilesystem(){return!0}run(){let e=null,t=[],n=[...this.arguments],i=0;for(;i<n.length;){let r=n[i];if(r===`--`){i++;break}if(r.startsWith(`-`)&&r.length>1)for(let t=1;t<r.length;t++)switch(r[t]){case`f`:case`i`:case`n`:break;case`t`:{let a=r.slice(t+1);e=a.length>0?a:n[++i],t=r.length;break}}else t.push(r);i++}for(;i<n.length;)t.push(n[i++]);let a=e===null?t[t.length-1]:e,o=e===null?t.slice(0,-1):t;if(!a||o.length===0)return this.stdErr=`mv: missing destination file operand${o.length?` after '${o[0]}'`:``}`,this.exitCode=1,Promise.resolve();let s=this.fs.getFileByPath(a),c=s!=null&&s.constructor===Object;for(let e of o){let t=c?a.replace(/\/$/,``)+`/`+e.split(`/`).pop():a;if(this.fs.isRealFilesystem){let n=this.fs.absolutePath(e),i=this.fs.absolutePath(t);try{r.lstatSync(n)}catch{this.stdErr=`mv: cannot stat '${e}': No such file or directory`,this.exitCode=1;continue}try{let e=D();r.mkdirSync(e.dirname(i),{recursive:!0}),r.renameSync(n,i)}catch(n){this.stdErr=`mv: cannot move '${e}' to '${t}': ${n.message}`,this.exitCode=1}}else{let n=this.fs.getFileByPath(e);if(n==null){this.stdErr=`mv: cannot stat '${e}': No such file or directory`,this.exitCode=1;continue}this.fs.setFileByPath(t,this._deepCopy(n),!0),this.fs.deleteFileByPath(e)}}return Promise.resolve()}_deepCopy(e){if(e==null||typeof e==`function`||typeof e!=`object`)return e;let t={};for(let[n,r]of Object.entries(e))t[n]=this._deepCopy(r);return t}}})),we=t(((e,t)=>{var n=N();t.exports=class extends n{run(){let e=this.context.fs.cwd;return this.stdOut=e.endsWith(`/`)&&e!==`/`?e.slice(0,-1):e,Promise.resolve()}}})),Te=t(((e,t)=>{var n=N(),r=E();t.exports=class extends n{get name(){return`rm`}get requiresFilesystem(){return!0}run(){let e=!1,t=!1,n=[];for(let r of this.arguments)/^-[rRf]+$/.test(r)?((r.includes(`r`)||r.includes(`R`))&&(e=!0),r.includes(`f`)&&(t=!0)):n.push(r);if(n.length===0)return t||(this.stdErr=`rm: missing operand`,this.exitCode=1),Promise.resolve();for(let r of n)try{this._remove(r,e,t)}catch(e){this.stdErr=e.message,this.exitCode=1}return Promise.resolve()}_remove(e,t,n){if(!(this.fs.isSymlink&&this.fs.isSymlink(e))){let i=this.fs.getFileByPath(e);if(i==null){if(!n)throw Error(`rm: cannot remove '${e}': No such file or directory`);return}if(i.constructor===Object){if(!t)throw Error(`rm: cannot remove '${e}': Is a directory`);let a;if(this.fs.isRealFilesystem)try{a=r.readdirSync(this.fs.absolutePath(e))}catch{a=[]}else a=Object.keys(i);for(let r of a){let i=e.replace(/\/$/,``)+`/`+r;this._remove(i,t,n)}}}this.fs.deleteFileByPath(e)}}})),Ee=t(((e,t)=>{var n=N();t.exports=class extends n{run(){if(this.arguments.length!==1)return Promise.reject(`which requires a single argument`);let e=this.context.fs.getFileByPath(`${this.context.getVar(`PATH`)}/${this.arguments[0]}`);return!e||e.constructor===Object||e.constructor===String?Promise.reject():Promise.resolve(`${this.context.getVar(`PATH`)}/${this.arguments[0]}`)}}})),De=t(((e,t)=>{var n=P(),r=N();Yn(),t.exports=class extends r{constructor(e,t){if(super(e,t),this.arguments.length!==1)return Promise.reject(`source requires a single argument`);let r=this.arguments[0];if(r.startsWith(`./`)||r.startsWith(`/`)){let i=this.context.fs.getFileByPath(r);if(i&&i.constructor===String&&i.startsWith(`#!`))return new n(i,e,t,!0)}}run(){let e=this.arguments[0];if(e.startsWith(`./`)||e.startsWith(`/`)){let t=this.context.fs.getFileByPath(e);if(!t)return Promise.reject(`${e}: No such file or directory`);if(t.constructor===Object)return Promise.reject(`${e}: is a directory`);if(t.prototype&&t.prototype instanceof Command)return Promise.reject(`${e}: command not found`);if(t.constructor===String&&t.startsWith(`#!`))return Promise.reject(`FATAL: should not get here`)}return Promise.reject(`${e}: permission denied`)}}})),Oe=t(((e,t)=>{var n=N();t.exports=class extends n{run(){return this.arguments.length>0?Promise.reject(`clear does not require arguments`):(this.context.clear(),Promise.resolve())}}})),ke=t(((e,t)=>{var n=N();t.exports=class extends n{run(){let e=parseInt(this.arguments[0])||0;return this.exitCode=e,this.context.destroy(e),Promise.resolve()}}})),Ae=t(((e,t)=>{var n=N(),r=fe();t.exports=class extends n{get requiresFilesystem(){return!1}get captureInput(){return!0}run(){let e;try{e=this.parseArgs()}catch(e){return this.printHelp(e),Promise.reject()}return e.help?(this.printHelp(),Promise.resolve()):(this.nchars=e.nchars,this.var=e.name,new Promise(t=>{let n=setTimeout(()=>{t(),this.exitCode=1},e.timeout?e.timeout*1e3:864e5);this.completionCallback=e=>{clearTimeout(n),t(e)},this.stdErr=e.prompt||``,this.flush()}))}onInput(e){if(this.inputBuffer||=``,e.length===1&&(this.inputBuffer+=e),this.inputBuffer.length===this.nchars){if(this.var){this.context.setVar(this.var,this.inputBuffer),this.completionCallback();return}this.completionCallback(this.inputBuffer)}}printHelp(e){e&&(this.stdOut=e.message),this.stdOut=`usage: read [-n nchars] [-p prompt] [-t timeout] [name ...]`}parseArgs(){return r([{name:`prompt`,alias:`p`,type:String},{name:`nchars`,alias:`n`,type:Number},{name:`timeout`,alias:`t`,type:Number},{name:`help`,alias:`h`,type:Boolean},{defaultOption:!0,name:`name`,type:String}],{argv:this.arguments})}}})),je=t(((e,t)=>{var n=N(),r=M();t.exports=class extends n{get name(){return`jsfunction`}run(){let[e,...t]=this.arguments;if(!e||t.length===0)return this.stdErr=`usage: jsfunction <name> <function-body>`,this.exitCode=1,Promise.resolve();let n=t.join(` `),i;try{if(i=Function(`return (`+n+`)`)(),typeof i!=`function`)throw Error(`expression is not a function`)}catch(e){return this.stdErr=`jsfunction: ${e.message}`,this.exitCode=1,Promise.resolve()}class a extends r{run(){let e;try{e=i(this.arguments)}catch(e){return this.stdErr=e.message||String(e),this.exitCode=1,Promise.resolve()}return e&&typeof e.then==`function`?e.then(e=>{e!=null&&(this.stdOut=String(e))}).catch(e=>{this.stdErr=e.message||String(e),this.exitCode=1}):(e!=null&&(this.stdOut=String(e)),Promise.resolve())}}return Object.defineProperty(a,`name`,{value:e,configurable:!0}),this.context.setCommand(a),Promise.resolve()}}})),Me=t(((e,t)=>{t.exports=[_e(),ve(),ye(),be(),xe(),Se(),Ce(),we(),Te(),Ee(),De(),Oe(),ke(),Ae(),je()]})),Ne=t(((e,t)=>{t.exports=Object})),Pe=t(((e,t)=>{t.exports=Error})),Fe=t(((e,t)=>{t.exports=EvalError})),Ie=t(((e,t)=>{t.exports=RangeError})),Le=t(((e,t)=>{t.exports=ReferenceError})),Re=t(((e,t)=>{t.exports=SyntaxError})),X=t(((e,t)=>{t.exports=TypeError})),ze=t(((e,t)=>{t.exports=URIError})),Be=t(((e,t)=>{t.exports=Math.abs})),Ve=t(((e,t)=>{t.exports=Math.floor})),He=t(((e,t)=>{t.exports=Math.max})),Ue=t(((e,t)=>{t.exports=Math.min})),We=t(((e,t)=>{t.exports=Math.pow})),Ge=t(((e,t)=>{t.exports=Math.round})),Ke=t(((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}})),qe=t(((e,t)=>{var n=Ke();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}})),Je=t(((e,t)=>{t.exports=Object.getOwnPropertyDescriptor})),Ye=t(((e,t)=>{var n=Je();if(n)try{n([],`length`)}catch{n=null}t.exports=n})),Xe=t(((e,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n})),Ze=t(((e,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}})),Qe=t(((e,t)=>{var n=typeof Symbol<`u`&&Symbol,r=Ze();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}})),$e=t(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null})),et=t(((e,t)=>{t.exports=Ne().getPrototypeOf||null})),tt=t(((e,t)=>{var n=`Function.prototype.bind called on incompatible `,r=Object.prototype.toString,i=Math.max,a=`[object Function]`,o=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},s=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},c=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||r.apply(t)!==a)throw TypeError(n+t);for(var l=s(arguments,1),u,d=function(){if(this instanceof u){var n=t.apply(this,o(l,arguments));return Object(n)===n?n:this}return t.apply(e,o(l,arguments))},f=i(0,t.length-l.length),p=[],m=0;m<f;m++)p[m]=`$`+m;if(u=Function(`binder`,`return function (`+c(p,`,`)+`){ return binder.apply(this,arguments); }`)(d),t.prototype){var h=function(){};h.prototype=t.prototype,u.prototype=new h,h.prototype=null}return u}})),nt=t(((e,t)=>{var n=tt();t.exports=Function.prototype.bind||n})),rt=t(((e,t)=>{t.exports=Function.prototype.call})),it=t(((e,t)=>{t.exports=Function.prototype.apply})),at=t(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply})),ot=t(((e,t)=>{var n=nt(),r=it(),i=rt();t.exports=at()||n.call(i,r)})),st=t(((e,t)=>{var n=nt(),r=X(),i=rt(),a=ot();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}})),ct=t(((e,t)=>{var n=st(),r=Ye(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`?function(e){return s(e==null?e:o(e))}:!1})),lt=t(((e,t)=>{var n=$e(),r=et(),i=ct();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null})),ut=t(((e,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=nt().call(n,r)})),Z=t(((e,t)=>{var n,r=Ne(),i=Pe(),a=Fe(),o=Ie(),s=Le(),c=Re(),l=X(),u=ze(),d=Be(),f=Ve(),p=He(),m=Ue(),h=We(),g=Ge(),_=qe(),v=Function,y=function(e){try{return v(`"use strict"; return (`+e+`).constructor;`)()}catch{}},b=Ye(),x=Xe(),S=function(){throw new l},C=b?function(){try{return arguments.callee,S}catch{try{return b(arguments,`callee`).get}catch{return S}}}():S,w=Qe()(),T=lt(),E=et(),D=$e(),O=it(),k=rt(),A={},j=typeof Uint8Array>`u`||!T?n:T(Uint8Array),M={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":w&&T?T([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":A,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&T?T(T([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!w||!T?n:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!w||!T?n:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&T?T(``[Symbol.iterator]()):n,"%Symbol%":w?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":C,"%TypedArray%":j,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":E,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":h,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":D};if(T)try{null.error}catch(e){M[`%Error.prototype%`]=T(T(e))}var N=function e(t){var n;if(t===`%AsyncFunction%`)n=y(`async function () {}`);else if(t===`%GeneratorFunction%`)n=y(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=y(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&T&&(n=T(i.prototype))}return M[t]=n,n},P={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},F=nt(),I=ut(),L=F.call(k,Array.prototype.concat),ee=F.call(O,Array.prototype.splice),R=F.call(k,String.prototype.replace),z=F.call(k,String.prototype.slice),B=F.call(k,RegExp.prototype.exec),V=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,U=function(e){var t=z(e,0,1),n=z(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return R(e,V,function(e,t,n,i){r[r.length]=n?R(i,H,`$1`):t||e}),r},W=function(e,t){var n=e,r;if(I(P,n)&&(r=P[n],n=`%`+r[0]+`%`),I(M,n)){var i=M[n];if(i===A&&(i=N(n)),i===void 0&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(B(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=U(e),r=n.length>0?n[0]:``,i=W(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],ee(n,L([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=z(p,0,1),h=z(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new c(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,I(M,a))o=M[a];else if(o!=null){if(!(p in o)){if(!t)throw new l(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(b&&d+1>=n.length){var g=b(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=I(o,p),o=o[p];f&&!s&&(M[a]=o)}}return o}})),dt=t(((e,t)=>{var n=Xe(),r=Re(),i=X(),a=Ye();t.exports=function(e,t,o){if(!e||typeof e!=`object`&&typeof e!=`function`)throw new i("`obj` must be an object or a function`");if(typeof t!=`string`&&typeof t!=`symbol`)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=`boolean`&&arguments[3]!==null)throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=`boolean`&&arguments[4]!==null)throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=`boolean`&&arguments[5]!==null)throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=`boolean`)throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6?arguments[6]:!1,d=!!a&&a(e,t);if(n)n(e,t,{configurable:l===null&&d?d.configurable:!l,enumerable:s===null&&d?d.enumerable:!s,value:o,writable:c===null&&d?d.writable:!c});else if(u||!s&&!c&&!l)e[t]=o;else throw new r(`This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.`)}})),ft=t(((e,t)=>{var n=Xe(),r=function(){return!!n};r.hasArrayLengthDefineBug=function(){if(!n)return null;try{return n([],`length`,{value:1}).length!==1}catch{return!0}},t.exports=r})),pt=t(((e,t)=>{var n=Z(),r=dt(),i=ft()(),a=Ye(),o=X(),s=n(`%Math.floor%`);t.exports=function(e,t){if(typeof e!=`function`)throw new o("`fn` is not a function");if(typeof t!=`number`||t<0||t>4294967295||s(t)!==t)throw new o("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],c=!0,l=!0;if(`length`in e&&a){var u=a(e,`length`);u&&!u.configurable&&(c=!1),u&&!u.writable&&(l=!1)}return(c||l||!n)&&(i?r(e,`length`,t,!0,!0):r(e,`length`,t)),e}})),mt=t(((e,t)=>{var n=nt(),r=it(),i=ot();t.exports=function(){return i(n,r,arguments)}})),ht=t(((e,t)=>{var n=pt(),r=Xe(),i=st(),a=mt();t.exports=function(e){var t=i(arguments),r=e.length-(arguments.length-1);return n(t,1+(r>0?r:0),!0)},r?r(t.exports,`apply`,{value:a}):t.exports.apply=a})),gt=t(((e,t)=>{var n=Object.prototype.toString;t.exports=function(e){var t=n.call(e),r=t===`[object Arguments]`;return r||=t!==`[object Array]`&&typeof e==`object`&&!!e&&typeof e.length==`number`&&e.length>=0&&n.call(e.callee)===`[object Function]`,r}})),_t=t(((e,t)=>{var n;if(!Object.keys){var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=gt(),o=Object.prototype.propertyIsEnumerable,s=!o.call({toString:null},`toString`),c=o.call(function(){},`prototype`),l=[`toString`,`toLocaleString`,`valueOf`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`constructor`],u=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if(typeof window>`u`)return!1;for(var e in window)try{if(!d[`$`+e]&&r.call(window,e)&&window[e]!==null&&typeof window[e]==`object`)try{u(window[e])}catch{return!0}}catch{return!0}return!1}(),p=function(e){if(typeof window>`u`||!f)return u(e);try{return u(e)}catch{return!1}};n=function(e){var t=typeof e==`object`&&!!e,n=i.call(e)===`[object Function]`,o=a(e),u=t&&i.call(e)===`[object String]`,d=[];if(!t&&!n&&!o)throw TypeError(`Object.keys called on a non-object`);var f=c&&n;if(u&&e.length>0&&!r.call(e,0))for(var m=0;m<e.length;++m)d.push(String(m));if(o&&e.length>0)for(var h=0;h<e.length;++h)d.push(String(h));else for(var g in e)!(f&&g===`prototype`)&&r.call(e,g)&&d.push(String(g));if(s)for(var _=p(e),v=0;v<l.length;++v)!(_&&l[v]===`constructor`)&&r.call(e,l[v])&&d.push(l[v]);return d}}t.exports=n})),vt=t(((e,t)=>{var n=Array.prototype.slice,r=gt(),i=Object.keys,a=i?function(e){return i(e)}:_t(),o=Object.keys;a.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return r(e)?o(n.call(e)):o(e)}):Object.keys=a,Object.keys||a},t.exports=a})),yt=t(((e,t)=>{var n=vt(),r=typeof Symbol==`function`&&typeof Symbol(`foo`)==`symbol`,i=Object.prototype.toString,a=Array.prototype.concat,o=dt(),s=function(e){return typeof e==`function`&&i.call(e)===`[object Function]`},c=ft()(),l=function(e,t,n,r){if(t in e){if(r===!0){if(e[t]===n)return}else if(!s(r)||!r())return}c?o(e,t,n,!0):o(e,t,n)},u=function(e,t){var i=arguments.length>2?arguments[2]:{},o=n(t);r&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s<o.length;s+=1)l(e,o[s],t[o[s]],i[o[s]])};u.supportsDescriptors=!!c,t.exports=u})),Q=t(((e,t)=>{var n=Z(),r=st(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}})),bt=t(((e,t)=>{var n=Z()(`%Array%`),r=!n.isArray&&Q()(`Object.prototype.toString`);t.exports=n.isArray||function(e){return r(e)===`[object Array]`}})),xt=t(((e,t)=>{t.exports=bt()})),St=t(((e,t)=>{var n=Z(),r=Q(),i=X(),a=xt(),o=n(`%Reflect.apply%`,!0)||r(`Function.prototype.apply`);t.exports=function(e,t){var n=arguments.length>2?arguments[2]:[];if(!a(n))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return o(e,t,n)}})),Ct=t(((e,t)=>{t.exports={}})),wt=t(((e,t)=>{r();var i=typeof Map==`function`&&Map.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Map.prototype,`size`):null,o=i&&a&&typeof a.get==`function`?a.get:null,s=i&&Map.prototype.forEach,c=typeof Set==`function`&&Set.prototype,l=Object.getOwnPropertyDescriptor&&c?Object.getOwnPropertyDescriptor(Set.prototype,`size`):null,u=c&&l&&typeof l.get==`function`?l.get:null,d=c&&Set.prototype.forEach,f=typeof WeakMap==`function`&&WeakMap.prototype?WeakMap.prototype.has:null,p=typeof WeakSet==`function`&&WeakSet.prototype?WeakSet.prototype.has:null,m=typeof WeakRef==`function`&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,_=Function.prototype.toString,v=String.prototype.match,y=String.prototype.slice,b=String.prototype.replace,x=String.prototype.toUpperCase,S=String.prototype.toLowerCase,C=RegExp.prototype.test,w=Array.prototype.concat,T=Array.prototype.join,E=Array.prototype.slice,D=Math.floor,O=typeof BigInt==`function`?BigInt.prototype.valueOf:null,k=Object.getOwnPropertySymbols,A=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?Symbol.prototype.toString:null,j=typeof Symbol==`function`&&typeof Symbol.iterator==`object`,M=typeof Symbol==`function`&&Symbol.toStringTag?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,P=(typeof Reflect==`function`?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function F(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||C.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e==`number`){var r=e<0?-D(-e):D(e);if(r!==e){var i=String(r),a=y.call(t,i.length+1);return b.call(i,n,`$&_`)+`.`+b.call(b.call(a,/([0-9]{3})/g,`$&_`),/_$/,``)}}return b.call(t,n,`$&_`)}var I=Ct(),L=I.custom,ee=ae(L)?L:null,R={__proto__:null,double:`"`,single:`'`},z={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};t.exports=function e(t,r,i,a){var c=r||{};if(K(c,`quoteStyle`)&&!K(R,c.quoteStyle))throw TypeError(`option "quoteStyle" must be "single" or "double"`);if(K(c,`maxStringLength`)&&(typeof c.maxStringLength==`number`?c.maxStringLength<0&&c.maxStringLength!==1/0:c.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=K(c,`customInspect`)?c.customInspect:!0;if(typeof l!=`boolean`&&l!==`symbol`)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(c,`indent`)&&c.indent!==null&&c.indent!==` `&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(c,`numericSeparator`)&&typeof c.numericSeparator!=`boolean`)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var f=c.numericSeparator;if(t===void 0)return`undefined`;if(t===null)return`null`;if(typeof t==`boolean`)return t?`true`:`false`;if(typeof t==`string`)return he(t,c);if(typeof t==`number`){if(t===0)return 1/0/t>0?`0`:`-0`;var p=String(t);return f?F(t,p):p}if(typeof t==`bigint`){var m=String(t)+`n`;return f?F(t,m):m}var g=c.depth===void 0?5:c.depth;if(i===void 0&&(i=0),i>=g&&g>0&&typeof t==`object`)return U(t)?`[Array]`:`[Object]`;var _=be(c,i);if(a===void 0)a=[];else if(le(a,t)>=0)return`[Circular]`;function v(t,n,r){if(n&&(a=E.call(a),a.push(n)),r){var o={depth:c.depth};return K(c,`quoteStyle`)&&(o.quoteStyle=c.quoteStyle),e(t,o,i+1,a)}return e(t,c,i+1,a)}if(typeof t==`function`&&!te(t)){var x=ce(t),C=Se(t,v);return`[Function`+(x?`: `+x:` (anonymous)`)+`]`+(C.length>0?` { `+T.call(C,`, `)+` }`:``)}if(ae(t)){var D=j?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,`$1`):A.call(t);return typeof t==`object`&&!j?Y(D):D}if(J(t)){for(var k=`<`+S.call(String(t.nodeName)),L=t.attributes||[],z=0;z<L.length;z++)k+=` `+L[z].name+`=`+B(V(L[z].value),`double`,c);return k+=`>`,t.childNodes&&t.childNodes.length&&(k+=`...`),k+=`</`+S.call(String(t.nodeName))+`>`,k}if(U(t)){if(t.length===0)return`[]`;var H=Se(t,v);return _&&!ye(H)?`[`+xe(H,_)+`]`:`[ `+T.call(H,`, `)+` ]`}if(ne(t)){var se=Se(t,v);return!(`cause`in Error.prototype)&&`cause`in t&&!N.call(t,`cause`)?`{ [`+String(t)+`] `+T.call(w.call(`[cause]: `+v(t.cause),se),`, `)+` }`:se.length===0?`[`+String(t)+`]`:`{ [`+String(t)+`] `+T.call(se,`, `)+` }`}if(typeof t==`object`&&l){if(ee&&typeof t[ee]==`function`&&I)return I(t,{depth:g-i});if(l!==`symbol`&&typeof t.inspect==`function`)return t.inspect()}if(ue(t)){var ge=[];return s&&s.call(t,function(e,n){ge.push(v(n,t,!0)+` => `+v(e,t))}),ve(`Map`,o.call(t),ge,_)}if(pe(t)){var Ce=[];return d&&d.call(t,function(e){Ce.push(v(e,t))}),ve(`Set`,u.call(t),Ce,_)}if(de(t))return _e(`WeakMap`);if(me(t))return _e(`WeakSet`);if(fe(t))return _e(`WeakRef`);if(re(t))return Y(v(Number(t)));if(oe(t))return Y(v(O.call(t)));if(ie(t))return Y(h.call(t));if(G(t))return Y(v(String(t)));if(typeof window<`u`&&t===window)return`{ [object Window] }`;if(typeof globalThis<`u`&&t===globalThis||n!==void 0&&t===n)return`{ [object globalThis] }`;if(!W(t)&&!te(t)){var we=Se(t,v),Te=P?P(t)===Object.prototype:t instanceof Object||t.constructor===Object,Ee=t instanceof Object?``:`null prototype`,De=!Te&&M&&Object(t)===t&&M in t?y.call(q(t),8,-1):Ee?`Object`:``,Oe=(Te||typeof t.constructor!=`function`?``:t.constructor.name?t.constructor.name+` `:``)+(De||Ee?`[`+T.call(w.call([],De||[],Ee||[]),`: `)+`] `:``);return we.length===0?Oe+`{}`:_?Oe+`{`+xe(we,_)+`}`:Oe+`{ `+T.call(we,`, `)+` }`}return String(t)};function B(e,t,n){var r=R[n.quoteStyle||t];return r+e+r}function V(e){return b.call(String(e),/"/g,`"`)}function H(e){return!M||!(typeof e==`object`&&(M in e||e[M]!==void 0))}function U(e){return q(e)===`[object Array]`&&H(e)}function W(e){return q(e)===`[object Date]`&&H(e)}function te(e){return q(e)===`[object RegExp]`&&H(e)}function ne(e){return q(e)===`[object Error]`&&H(e)}function G(e){return q(e)===`[object String]`&&H(e)}function re(e){return q(e)===`[object Number]`&&H(e)}function ie(e){return q(e)===`[object Boolean]`&&H(e)}function ae(e){if(j)return e&&typeof e==`object`&&e instanceof Symbol;if(typeof e==`symbol`)return!0;if(!e||typeof e!=`object`||!A)return!1;try{return A.call(e),!0}catch{}return!1}function oe(e){if(!e||typeof e!=`object`||!O)return!1;try{return O.call(e),!0}catch{}return!1}var se=Object.prototype.hasOwnProperty||function(e){return e in this};function K(e,t){return se.call(e,t)}function q(e){return g.call(e)}function ce(e){if(e.name)return e.name;var t=v.call(_.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function le(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function ue(e){if(!o||!e||typeof e!=`object`)return!1;try{o.call(e);try{u.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function de(e){if(!f||!e||typeof e!=`object`)return!1;try{f.call(e,f);try{p.call(e,p)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function fe(e){if(!m||!e||typeof e!=`object`)return!1;try{return m.call(e),!0}catch{}return!1}function pe(e){if(!u||!e||typeof e!=`object`)return!1;try{u.call(e);try{o.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function me(e){if(!p||!e||typeof e!=`object`)return!1;try{p.call(e,p);try{f.call(e,f)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function J(e){return!e||typeof e!=`object`?!1:typeof HTMLElement<`u`&&e instanceof HTMLElement?!0:typeof e.nodeName==`string`&&typeof e.getAttribute==`function`}function he(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r=`... `+n+` more character`+(n>1?`s`:``);return he(y.call(e,0,t.maxStringLength),t)+r}var i=z[t.quoteStyle||`single`];return i.lastIndex=0,B(b.call(b.call(e,i,`\\$1`),/[\x00-\x1f]/g,ge),`single`,t)}function ge(e){var t=e.charCodeAt(0),n={8:`b`,9:`t`,10:`n`,12:`f`,13:`r`}[t];return n?`\\`+n:`\\x`+(t<16?`0`:``)+x.call(t.toString(16))}function Y(e){return`Object(`+e+`)`}function _e(e){return e+` { ? }`}function ve(e,t,n,r){var i=r?xe(n,r):T.call(n,`, `);return e+` (`+t+`) {`+i+`}`}function ye(e){for(var t=0;t<e.length;t++)if(le(e[t],`
|
|
10
|
+
`)>=0)return!1;return!0}function be(e,t){var n;if(e.indent===` `)n=` `;else if(typeof e.indent==`number`&&e.indent>0)n=T.call(Array(e.indent+1),` `);else return null;return{base:n,prev:T.call(Array(t+1),n)}}function xe(e,t){if(e.length===0)return``;var n=`
|
|
11
|
+
`+t.prev+t.base;return n+T.call(e,`,`+n)+`
|
|
12
|
+
`+t.prev}function Se(e,t){var n=U(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=K(e,i)?t(e[i],e):``}var a=typeof k==`function`?k(e):[],o;if(j){o={};for(var s=0;s<a.length;s++)o[`$`+a[s]]=a[s]}for(var c in e)K(e,c)&&(n&&String(Number(c))===c&&c<e.length||j&&o[`$`+c]instanceof Symbol||(C.call(/[^\w$]/,c)?r.push(t(c,e)+`: `+t(e[c],e)):r.push(c+`: `+t(e[c],e))));if(typeof k==`function`)for(var l=0;l<a.length;l++)N.call(e,a[l])&&r.push(`[`+t(a[l])+`]: `+t(e[a[l]],e));return r}})),Tt=t(((e,t)=>{t.exports=function(e){return typeof e==`string`||typeof e==`symbol`}})),$=t(((e,t)=>{t.exports=function(e){return!!e&&(typeof e==`function`||typeof e==`object`)}})),Et=t(((e,t)=>{var n=X(),r=wt(),i=Tt(),a=$();t.exports=function(e,t){if(!a(e))throw new n(`Assertion failed: Type(O) is not Object`);if(!i(t))throw new n(`Assertion failed: P is not a Property Key, got `+r(t));return e[t]}})),Dt=t(((e,t)=>{var n=X(),r=wt(),i=Tt();t.exports=function(e,t){if(!i(t))throw new n(`Assertion failed: P is not a Property Key, got `+r(t));return e[t]}})),Ot=t(((e,t)=>{var n=Function.prototype.toString,r=typeof Reflect==`object`&&Reflect!==null&&Reflect.apply,i,a;if(typeof r==`function`&&typeof Object.defineProperty==`function`)try{i=Object.defineProperty({},`length`,{get:function(){throw a}}),a={},r(function(){throw 42},null,i)}catch(e){e!==a&&(r=null)}else r=null;var o=/^\s*class\b/,s=function(e){try{var t=n.call(e);return o.test(t)}catch{return!1}},c=function(e){try{return s(e)?!1:(n.call(e),!0)}catch{return!1}},l=Object.prototype.toString,u=`[object Object]`,d=`[object Function]`,f=`[object GeneratorFunction]`,p=`[object HTMLAllCollection]`,m=`[object HTML document.all class]`,h=`[object HTMLCollection]`,g=typeof Symbol==`function`&&!!Symbol.toStringTag,_=!(0 in[,]),v=function(){return!1};if(typeof document==`object`){var y=document.all;l.call(y)===l.call(document.all)&&(v=function(e){if((_||!e)&&(e===void 0||typeof e==`object`))try{var t=l.call(e);return(t===p||t===m||t===h||t===u)&&e(``)==null}catch{}return!1})}t.exports=r?function(e){if(v(e))return!0;if(!e||typeof e!=`function`&&typeof e!=`object`)return!1;try{r(e,null,i)}catch(e){if(e!==a)return!1}return!s(e)&&c(e)}:function(e){if(v(e))return!0;if(!e||typeof e!=`function`&&typeof e!=`object`)return!1;if(g)return c(e);if(s(e))return!1;var t=l.call(e);return t!==d&&t!==f&&!/^\[object HTML/.test(t)?!1:c(e)}})),kt=t(((e,t)=>{t.exports=Ot()})),At=t(((e,t)=>{var n=X(),r=Dt(),i=kt(),a=Tt(),o=wt();t.exports=function(e,t){if(!a(t))throw new n(`Assertion failed: P is not a Property Key`);var s=r(e,t);if(s!=null){if(!i(s))throw new n(o(t)+` is not a function: `+o(s));return s}}})),jt=t(((e,t)=>{var n=Ze();t.exports=function(){return n()&&!!Symbol.toStringTag}})),Mt=t(((e,t)=>{var n=Q(),r=jt()(),i=ut(),a=Ye(),o;if(r){var s=n(`RegExp.prototype.exec`),c={},l=function(){throw c},u={toString:l,valueOf:l};typeof Symbol.toPrimitive==`symbol`&&(u[Symbol.toPrimitive]=l),o=function(e){if(!e||typeof e!=`object`)return!1;var t=a(e,`lastIndex`);if(!(t&&i(t,`value`)))return!1;try{s(e,u)}catch(e){return e===c}}}else{var d=n(`Object.prototype.toString`),f=`[object RegExp]`;o=function(e){return!e||typeof e!=`object`&&typeof e!=`function`?!1:d(e)===f}}t.exports=o})),Nt=t(((e,t)=>{t.exports=function(e){return!!e}})),Pt=t(((e,t)=>{var n=Z()(`%Symbol.match%`,!0),r=Mt(),i=$(),a=Nt();t.exports=function(e){if(!i(e))return!1;if(n){var t=e[n];if(t!==void 0)return a(t)}return r(e)}})),Ft=t(((e,t)=>{var n=Z()(`%String%`),r=X();t.exports=function(e){if(typeof e==`symbol`)throw new r(`Cannot convert a Symbol value to a string`);return n(e)}})),It=t(((e,t)=>{var n=X();t.exports=function(e){if(e==null)throw new n(arguments.length>0&&arguments[1]||`Cannot call method on `+e);return e}})),Lt=t(((e,t)=>{var n=function(){return typeof function(){}.name==`string`},r=Object.getOwnPropertyDescriptor;if(r)try{r([],`length`)}catch{r=null}n.functionsHaveConfigurableNames=function(){if(!n()||!r)return!1;var e=r(function(){},`name`);return!!e&&!!e.configurable};var i=Function.prototype.bind;n.boundFunctionsHaveNames=function(){return n()&&typeof i==`function`&&function(){}.bind().name!==``},t.exports=n})),Rt=t(((e,t)=>{var n=dt(),r=ft()(),i=Lt().functionsHaveConfigurableNames(),a=X();t.exports=function(e,t){if(typeof e!=`function`)throw new a("`fn` is not a function");return(!(arguments.length>2&&arguments[2])||i)&&(r?n(e,`name`,t,!0,!0):n(e,`name`,t)),e}})),zt=t(((e,t)=>{var n=Rt(),r=X(),i=Object;t.exports=n(function(){if(this==null||this!==i(this))throw new r(`RegExp.prototype.flags getter called on non-object`);var e=``;return this.hasIndices&&(e+=`d`),this.global&&(e+=`g`),this.ignoreCase&&(e+=`i`),this.multiline&&(e+=`m`),this.dotAll&&(e+=`s`),this.unicode&&(e+=`u`),this.unicodeSets&&(e+=`v`),this.sticky&&(e+=`y`),e},`get flags`,!0)})),Bt=t(((e,t)=>{var n=zt(),r=yt().supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(r&&/a/gim.flags===`gim`){var e=i(RegExp.prototype,`flags`);if(e&&typeof e.get==`function`&&`dotAll`in RegExp.prototype&&`hasIndices`in RegExp.prototype){var t=``,a={};if(Object.defineProperty(a,`hasIndices`,{get:function(){t+=`d`}}),Object.defineProperty(a,`sticky`,{get:function(){t+=`y`}}),e.get.call(a),t===`dy`)return e.get}}return n}})),Vt=t(((e,t)=>{var n=yt().supportsDescriptors,r=Bt(),i=Ye(),a=Object.defineProperty,o=Pe(),s=lt(),c=/a/;t.exports=function(){if(!n||!s)throw new o(`RegExp.prototype.flags requires a true ES5 environment that supports property descriptors`);var e=r(),t=s(c),l=i(t,`flags`);return(!l||l.get!==e)&&a(t,`flags`,{configurable:!0,enumerable:!1,get:e}),e}})),Ht=t(((e,t)=>{var n=yt(),r=ht(),i=zt(),a=Bt(),o=Vt(),s=r(a());n(s,{getPolyfill:a,implementation:i,shim:o}),t.exports=s})),Ut=t(((e,t)=>{t.exports=function(e){return typeof e==`number`&&e>=55296&&e<=56319}})),Wt=t(((e,t)=>{t.exports=function(e){return typeof e==`number`&&e>=56320&&e<=57343}})),Gt=t(((e,t)=>{var n=Z(),r=X(),i=n(`%String.fromCharCode%`),a=Ut(),o=Wt();t.exports=function(e,t){if(!a(e)||!o(t))throw new r("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(e)+i(t)}})),Kt=t(((e,t)=>{var n=X(),r=Q(),i=Ut(),a=Wt(),o=Gt(),s=r(`String.prototype.charAt`),c=r(`String.prototype.charCodeAt`);t.exports=function(e,t){if(typeof e!=`string`)throw new n("Assertion failed: `string` must be a String");var r=e.length;if(t<0||t>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var l=c(e,t),u=s(e,t),d=i(l),f=a(l);if(!d&&!f)return{"[[CodePoint]]":u,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(f||t+1===r)return{"[[CodePoint]]":u,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var p=c(e,t+1);return a(p)?{"[[CodePoint]]":o(l,p),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":u,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}})),qt=t(((e,t)=>{var n=Ke();t.exports=function(e){return(typeof e==`number`||typeof e==`bigint`)&&!n(e)&&e!==1/0&&e!==-1/0}})),Jt=t(((e,t)=>{var n=Be(),r=Ve(),i=Ke(),a=qt();t.exports=function(e){if(typeof e!=`number`||i(e)||!a(e))return!1;var t=n(e);return r(t)===t}})),Yt=t(((e,t)=>{t.exports=2**53-1||9007199254740991})),Xt=t(((e,t)=>{var n=Kt(),r=X(),i=Jt(),a=Yt();t.exports=function(e,t,o){if(typeof e!=`string`)throw new r("Assertion failed: `S` must be a String");if(!i(t)||t<0||t>a)throw new r("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if(typeof o!=`boolean`)throw new r("Assertion failed: `unicode` must be a Boolean");if(!o)return t+1;var s=e.length;return t+1>=s?t+1:t+n(e,t)[`[[CodeUnitCount]]`]}})),Zt=t(((e,t)=>{var n=X();t.exports=function(e,t){if(typeof t!=`boolean`)throw new n(`Assertion failed: Type(done) is not Boolean`);return{value:e,done:t}}})),Qt=t(((e,t)=>{var n=X(),r=ut(),i={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};t.exports=function(e){if(!e||typeof e!=`object`)return!1;for(var t in e)if(r(e,t)&&!i[t])return!1;var a=r(e,`[[Value]]`)||r(e,`[[Writable]]`),o=r(e,`[[Get]]`)||r(e,`[[Set]]`);if(a&&o)throw new n(`Property Descriptors may not be both accessor and data descriptors`);return!0}})),$t=t(((e,t)=>{var n=ft(),r=Xe(),i=n.hasArrayLengthDefineBug(),a=i&&bt(),o=Q()(`Object.prototype.propertyIsEnumerable`);t.exports=function(e,t,n,s,c,l){if(!r){if(!e(l)||!l[`[[Configurable]]`]||!l[`[[Writable]]`]||c in s&&o(s,c)!==!!l[`[[Enumerable]]`])return!1;var u=l[`[[Value]]`];return s[c]=u,t(s[c],u)}return i&&c===`length`&&`[[Value]]`in l&&a(s)&&s.length!==l[`[[Value]]`]?(s.length=l[`[[Value]]`],s.length===l[`[[Value]]`]):(r(s,c,n(l)),!0)}})),en=t(((e,t)=>{t.exports=function(e){if(e===void 0)return e;var t={};return`[[Value]]`in e&&(t.value=e[`[[Value]]`]),`[[Writable]]`in e&&(t.writable=!!e[`[[Writable]]`]),`[[Get]]`in e&&(t.get=e[`[[Get]]`]),`[[Set]]`in e&&(t.set=e[`[[Set]]`]),`[[Enumerable]]`in e&&(t.enumerable=!!e[`[[Enumerable]]`]),`[[Configurable]]`in e&&(t.configurable=!!e[`[[Configurable]]`]),t}})),tn=t(((e,t)=>{var n=X(),r=Qt(),i=en();t.exports=function(e){if(e!==void 0&&!r(e))throw new n("Assertion failed: `Desc` must be a Property Descriptor");return i(e)}})),nn=t(((e,t)=>{var n=X(),r=ut(),i=Qt();t.exports=function(e){if(e===void 0)return!1;if(!i(e))throw new n("Assertion failed: `Desc` must be a Property Descriptor");return!(!r(e,`[[Value]]`)&&!r(e,`[[Writable]]`))}})),rn=t(((e,t)=>{var n=Ke();t.exports=function(e,t){return e===t?e===0?1/e==1/t:!0:n(e)&&n(t)}})),an=t(((e,t)=>{var n=ut(),r=X(),i=$(),a=kt(),o=Nt();t.exports=function(e){if(!i(e))throw new r(`ToPropertyDescriptor requires an object`);var t={};if(n(e,`enumerable`)&&(t[`[[Enumerable]]`]=o(e.enumerable)),n(e,`configurable`)&&(t[`[[Configurable]]`]=o(e.configurable)),n(e,`value`)&&(t[`[[Value]]`]=e.value),n(e,`writable`)&&(t[`[[Writable]]`]=o(e.writable)),n(e,`get`)){var s=e.get;if(s!==void 0&&!a(s))throw new r(`getter must be a function`);t[`[[Get]]`]=s}if(n(e,`set`)){var c=e.set;if(c!==void 0&&!a(c))throw new r(`setter must be a function`);t[`[[Set]]`]=c}if((n(t,`[[Get]]`)||n(t,`[[Set]]`))&&(n(t,`[[Value]]`)||n(t,`[[Writable]]`)))throw new r(`Invalid property descriptor. Cannot both specify accessors and a value or writable attribute`);return t}})),on=t(((e,t)=>{var n=X(),r=$(),i=Qt(),a=$t(),o=tn(),s=nn(),c=Tt(),l=rn(),u=an();t.exports=function(e,t,d){if(!r(e))throw new n(`Assertion failed: Type(O) is not Object`);if(!c(t))throw new n(`Assertion failed: P is not a Property Key`);var f=i(d)?d:u(d);if(!i(f))throw new n(`Assertion failed: Desc is not a valid Property Descriptor`);return a(s,l,o,e,t,f)}})),sn=t(((e,t)=>{t.exports=function(e){return e===null||typeof e!=`function`&&typeof e!=`object`}})),cn=t(((e,t)=>{var n=Z(),r=n(`%Object.preventExtensions%`,!0),i=n(`%Object.isExtensible%`,!0),a=sn();t.exports=r?function(e){return!a(e)&&i(e)}:function(e){return!a(e)}})),ln=t(((e,t)=>{var n=X(),r=$(),i=on(),a=cn(),o=Tt();t.exports=function(e,t,s,c){if(!r(e))throw new n("Assertion failed: `homeObject` is not an Object");if(!o(t))throw new n("Assertion failed: `key` is not a Property Key or a Private Name");if(typeof s!=`function`)throw new n("Assertion failed: `closure` is not a function");if(typeof c!=`boolean`)throw new n("Assertion failed: `enumerable` is not a Boolean");if(!a(e))throw new n("Assertion failed: `homeObject` is not an ordinary, extensible object, with no non-configurable properties");i(e,t,{"[[Value]]":s,"[[Writable]]":!0,"[[Enumerable]]":c,"[[Configurable]]":!0})}})),un=t(((e,t)=>{t.exports=function(e,t){for(var n=0;n<e.length;n+=1)t(e[n],n,e)}})),dn=t(((e,t)=>{var n=wt(),r=X(),i=function(e,t,n){for(var r=e,i;(i=r.next)!=null;r=i)if(i.key===t)return r.next=i.next,n||(i.next=e.next,e.next=i),i},a=function(e,t){if(e){var n=i(e,t);return n&&n.value}},o=function(e,t,n){var r=i(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},s=function(e,t){return e?!!i(e,t):!1},c=function(e,t){if(e)return i(e,t,!0)};t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new r(`Side channel does not contain `+n(e))},delete:function(t){var n=e&&e.next,r=c(e,t);return r&&n&&n===r&&(e=void 0),!!r},get:function(t){return a(e,t)},has:function(t){return s(e,t)},set:function(t,n){e||={next:void 0},o(e,t,n)}};return t}})),fn=t(((e,t)=>{var n=Z(),r=Q(),i=wt(),a=X(),o=n(`%Map%`,!0),s=r(`Map.prototype.get`,!0),c=r(`Map.prototype.set`,!0),l=r(`Map.prototype.has`,!0),u=r(`Map.prototype.delete`,!0),d=r(`Map.prototype.size`,!0);t.exports=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new a(`Side channel does not contain `+i(e))},delete:function(t){if(e){var n=u(e,t);return d(e)===0&&(e=void 0),n}return!1},get:function(t){if(e)return s(e,t)},has:function(t){return e?l(e,t):!1},set:function(t,n){e||=new o,c(e,t,n)}};return t}})),pn=t(((e,t)=>{var n=Z(),r=Q(),i=wt(),a=fn(),o=X(),s=n(`%WeakMap%`,!0),c=r(`WeakMap.prototype.get`,!0),l=r(`WeakMap.prototype.set`,!0),u=r(`WeakMap.prototype.has`,!0),d=r(`WeakMap.prototype.delete`,!0);t.exports=s?function(){var e,t,n={assert:function(e){if(!n.has(e))throw new o(`Side channel does not contain `+i(e))},delete:function(n){if(s&&n&&(typeof n==`object`||typeof n==`function`)){if(e)return d(e,n)}else if(a&&t)return t.delete(n);return!1},get:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?c(e,n):t&&t.get(n)},has:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?u(e,n):!!t&&t.has(n)},set:function(n,r){s&&n&&(typeof n==`object`||typeof n==`function`)?(e||=new s,l(e,n,r)):a&&(t||=a(),t.set(n,r))}};return n}:a})),mn=t(((e,t)=>{var n=X(),r=wt(),i=dn(),a=fn(),o=pn()||a||i;t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n(`Side channel does not contain `+r(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||=o(),e.set(t,n)}};return t}})),hn=t(((e,t)=>{var n=ut(),r=mn()(),i=X(),a={assert:function(e,t){if(!e||typeof e!=`object`&&typeof e!=`function`)throw new i("`O` is not an object");if(typeof t!=`string`)throw new i("`slot` must be a string");if(r.assert(e),!a.has(e,t))throw new i("`"+t+"` is not present on `O`")},get:function(e,t){if(!e||typeof e!=`object`&&typeof e!=`function`)throw new i("`O` is not an object");if(typeof t!=`string`)throw new i("`slot` must be a string");var n=r.get(e);return n&&n[`$`+t]},has:function(e,t){if(!e||typeof e!=`object`&&typeof e!=`function`)throw new i("`O` is not an object");if(typeof t!=`string`)throw new i("`slot` must be a string");var a=r.get(e);return!!a&&n(a,`$`+t)},set:function(e,t,n){if(!e||typeof e!=`object`&&typeof e!=`function`)throw new i("`O` is not an object");if(typeof t!=`string`)throw new i("`slot` must be a string");var a=r.get(e);a||(a={},r.set(e,a)),a[`$`+t]=n}};Object.freeze&&Object.freeze(a),t.exports=a})),gn=t(((e,t)=>{var n={__proto__:null,foo:{}},r={__proto__:n}.foo===n.foo&&!(n instanceof Object);t.exports=function(){return r}})),_n=t(((e,t)=>{var n=Z()(`%Object.create%`,!0),r=X(),i=Re(),a=$(),o=xt(),s=un(),c=hn(),l=gn()();t.exports=function(e){if(e!==null&&!a(e))throw new r("Assertion failed: `proto` must be null or an object");var t=arguments.length<2?[]:arguments[1];if(!o(t))throw new r("Assertion failed: `additionalInternalSlotsList` must be an Array");var u;if(l)u={__proto__:e};else if(n)u=n(e);else{if(e===null)throw new i(`native Object.create support is required to create null objects`);var d=function(){};d.prototype=e,u=new d}return t.length>0&&s(t,function(e){c.set(u,e,void 0)}),u}})),vn=t(((e,t)=>{var n=X(),r=$(),i=Q()(`RegExp.prototype.exec`),a=St(),o=Et(),s=kt();t.exports=function(e,t){if(!r(e))throw new n("Assertion failed: `R` must be an Object");if(typeof t!=`string`)throw new n("Assertion failed: `S` must be a String");var c=o(e,`exec`);if(s(c)){var l=a(c,e,[t]);if(l===null||r(l))return l;throw new n('"exec" method must return `null` or an Object')}return i(e,t)}})),yn=t(((e,t)=>{var n=X(),r=$(),i=Tt(),a=rn(),o=function(){try{return delete 0,!0}catch{return!1}}();t.exports=function(e,t,s,c){if(!r(e))throw new n("Assertion failed: `O` must be an Object");if(!i(t))throw new n("Assertion failed: `P` must be a Property Key");if(typeof c!=`boolean`)throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(e[t]=s,o&&!a(e[t],s))throw new n(`Attempted to assign to readonly property.`);return!0}try{return e[t]=s,o?a(e[t],s):!0}catch{return!1}}})),bn=t(((e,t)=>{t.exports=function(e){return e===null||typeof e!=`function`&&typeof e!=`object`}})),xn=t(((e,t)=>{var n=Q(),r=n(`Date.prototype.getDay`),i=function(e){try{return r(e),!0}catch{return!1}},a=n(`Object.prototype.toString`),o=`[object Date]`,s=jt()();t.exports=function(e){return typeof e!=`object`||!e?!1:s?i(e):a(e)===o}})),Sn=t(((e,t)=>{var n=Q(),r=Mt(),i=n(`RegExp.prototype.exec`),a=X();t.exports=function(e){if(!r(e))throw new a("`regex` must be a RegExp");return function(t){return i(e,t)!==null}}})),Cn=t(((e,t)=>{var n=Q(),r=n(`Object.prototype.toString`),i=Qe()(),a=Sn();if(i){var o=n(`Symbol.prototype.toString`),s=a(/^Symbol\(.*\)$/),c=function(e){return typeof e.valueOf()==`symbol`?s(o(e)):!1};t.exports=function(e){if(typeof e==`symbol`)return!0;if(!e||typeof e!=`object`||r(e)!==`[object Symbol]`)return!1;try{return c(e)}catch{return!1}}}else t.exports=function(e){return!1}})),wn=t(((e,t)=>{var n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`,r=bn(),i=Ot(),a=xn(),o=Cn(),s=function(e,t){if(e==null)throw TypeError(`Cannot call method on `+e);if(typeof t!=`string`||t!==`number`&&t!==`string`)throw TypeError(`hint must be "string" or "number"`);var n=t===`string`?[`toString`,`valueOf`]:[`valueOf`,`toString`],a,o,s;for(s=0;s<n.length;++s)if(a=e[n[s]],i(a)&&(o=a.call(e),r(o)))return o;throw TypeError(`No default value`)},c=function(e,t){var n=e[t];if(n!=null){if(!i(n))throw TypeError(n+` returned for property `+String(t)+` of object `+e+` is not a function`);return n}};t.exports=function(e){if(r(e))return e;var t=`default`;arguments.length>1&&(arguments[1]===String?t=`string`:arguments[1]===Number&&(t=`number`));var i;if(n&&(Symbol.toPrimitive?i=c(e,Symbol.toPrimitive):o(e)&&(i=Symbol.prototype.valueOf)),i!==void 0){var l=i.call(e,t);if(r(l))return l;throw TypeError(`unable to convert exotic object to primitive`)}return t===`default`&&(a(e)||o(e))&&(t=`string`),s(e,t===`default`?`number`:t)}})),Tn=t(((e,t)=>{var n=wn();t.exports=function(e){return arguments.length>1?n(e,arguments[1]):n(e)}})),En=t(((e,t)=>{var n=It(),r=Ft(),i=Q()(`String.prototype.replace`),a=/^\s$/.test(``),o=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,s=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){return i(i(r(n(this)),o,``),s,``)}})),Dn=t(((e,t)=>{var n=En(),r=``,i=``;t.exports=function(){return String.prototype.trim&&r.trim()===r&&i.trim()===i&&(`_`+i).trim()===`_`+i&&(i+`_`).trim()===i+`_`?String.prototype.trim:n}})),On=t(((e,t)=>{var n=ft()(),r=dt(),i=Dn();t.exports=function(){var e=i();return String.prototype.trim!==e&&(n?r(String.prototype,`trim`,e,!0):r(String.prototype,`trim`,e)),e}})),kn=t(((e,t)=>{var n=ht(),r=yt(),i=It(),a=En(),o=Dn(),s=On(),c=n(o()),l=function(e){return i(e),c(e)};r(l,{getPolyfill:o,implementation:a,shim:s}),t.exports=l})),An=t(((e,t)=>{var n=Z(),r=n(`%RegExp%`),i=X(),a=n(`%parseInt%`),o=Q(),s=Sn(),c=o(`String.prototype.slice`),l=s(/^0b[01]+$/i),u=s(/^0o[0-7]+$/i),d=s(/^[-+]0x[0-9a-f]+$/i),f=s(new r(`[`+[`
`,``,``].join(``)+`]`,`g`)),p=kn();t.exports=function e(t){if(typeof t!=`string`)throw new i("Assertion failed: `argument` is not a String");if(l(t))return+a(c(t,2),2);if(u(t))return+a(c(t,2),8);if(f(t)||d(t))return NaN;var n=p(t);return n===t?+t:e(n)}})),jn=t(((e,t)=>{var n=Z(),r=X(),i=n(`%Number%`),a=sn(),o=Tn(),s=An();t.exports=function(e){var t=a(e)?e:o(e,i);if(typeof t==`symbol`)throw new r(`Cannot convert a Symbol value to a number`);if(typeof t==`bigint`)throw new r(`Conversion from 'BigInt' to 'number' is not allowed.`);return typeof t==`string`?s(t):+t}})),Mn=t(((e,t)=>{var n=Ve();t.exports=function(e){return typeof e==`bigint`?e:n(e)}})),Nn=t(((e,t)=>{var n=Mn(),r=X();t.exports=function(e){if(typeof e!=`number`&&typeof e!=`bigint`)throw new r(`argument must be a Number or a BigInt`);var t=e<0?-n(-e):n(e);return t===0?0:t}})),Pn=t(((e,t)=>{var n=jn(),r=Nn(),i=Ke(),a=qt();t.exports=function(e){var t=n(e);return i(t)||t===0?0:a(t)?r(t):t}})),Fn=t(((e,t)=>{var n=Yt(),r=Pn();t.exports=function(e){var t=r(e);return t<=0?0:t>n?n:t}})),In=t(((e,t)=>{var n=Z()(`%Object.defineProperty%`,!0),r=jt()(),i=ut(),a=X(),o=r?Symbol.toStringTag:null;t.exports=function(e,t){var r=arguments.length>2&&!!arguments[2]&&arguments[2].force,s=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(r!==void 0&&typeof r!=`boolean`||s!==void 0&&typeof s!=`boolean`)throw new a("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");o&&(r||!i(e,o))&&(n?n(e,o,{configurable:!s,enumerable:!1,value:t,writable:!1}):e[o]=t)}})),Ln=t(((e,t)=>{var n=Z(),r=Qe()(),i=X(),a=$(),o=n(`%IteratorPrototype%`,!0),s=Xt(),c=Zt(),l=ln(),u=Et(),d=_n(),f=vn(),p=yn(),m=Fn(),h=Ft(),g=hn(),_=In(),v=function(e,t,n,r){if(typeof t!=`string`)throw new i("`S` must be a string");if(typeof n!=`boolean`)throw new i("`global` must be a boolean");if(typeof r!=`boolean`)throw new i("`fullUnicode` must be a boolean");g.set(this,`[[IteratingRegExp]]`,e),g.set(this,`[[IteratedString]]`,t),g.set(this,`[[Global]]`,n),g.set(this,`[[Unicode]]`,r),g.set(this,`[[Done]]`,!1)};o&&(v.prototype=d(o)),l(v.prototype,`next`,function(){var e=this;if(!a(e))throw new i(`receiver must be an object`);if(!(e instanceof v)||!g.has(e,`[[IteratingRegExp]]`)||!g.has(e,`[[IteratedString]]`)||!g.has(e,`[[Global]]`)||!g.has(e,`[[Unicode]]`)||!g.has(e,`[[Done]]`))throw new i(`"this" value must be a RegExpStringIterator instance`);if(g.get(e,`[[Done]]`))return c(void 0,!0);var t=g.get(e,`[[IteratingRegExp]]`),n=g.get(e,`[[IteratedString]]`),r=g.get(e,`[[Global]]`),o=g.get(e,`[[Unicode]]`),l=f(t,n);return l===null?(g.set(e,`[[Done]]`,!0),c(void 0,!0)):r?(h(u(l,`0`))===``&&p(t,`lastIndex`,s(n,m(u(t,`lastIndex`)),o),!0),c(l,!1)):(g.set(e,`[[Done]]`,!0),c(l,!1))},!1),r&&(_(v.prototype,`RegExp String Iterator`),Symbol.iterator&&typeof v.prototype[Symbol.iterator]!=`function`&&l(v.prototype,Symbol.iterator,function(){return this},!1)),t.exports=function(e,t,n,r){return new v(e,t,n,r)}})),Rn=t(((e,t)=>{t.exports=Z()})),zn=t(((e,t)=>{var n=Rn()(`%Reflect.construct%`,!0),r=on();try{r({},``,{"[[Get]]":function(){}})}catch{r=null}if(r&&n){var i={},a={};r(a,`length`,{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(e){try{n(e,a)}catch(e){return e===i}}}else t.exports=function(e){return typeof e==`function`&&!!e.prototype}})),Bn=t(((e,t)=>{var n=Z()(`%Symbol.species%`,!0),r=X(),i=$(),a=zn();t.exports=function(e,t){if(!i(e))throw new r(`Assertion failed: Type(O) is not Object`);var o=e.constructor;if(o===void 0)return t;if(!i(o))throw new r(`O.constructor is not an Object`);var s=n?o[n]:void 0;if(s==null)return t;if(a(s))return s;throw new r(`no constructor found`)}})),Vn=t(((e,t)=>{var n=$();t.exports=function(e){if(e===null)return`Null`;if(e===void 0)return`Undefined`;if(n(e))return`Object`;if(typeof e==`number`)return`Number`;if(typeof e==`boolean`)return`Boolean`;if(typeof e==`string`)return`String`}})),Hn=t(((e,t)=>{var n=Vn();t.exports=function(e){return typeof e==`symbol`?`Symbol`:typeof e==`bigint`?`BigInt`:n(e)}})),Un=t(((e,t)=>{var n=Ln(),r=Et(),i=yn(),a=Bn(),o=Fn(),s=Ft(),c=Hn(),l=Ht(),u=Rt(),d=Q(),f=Z(),p=X(),m=d(`String.prototype.indexOf`),h=f(`%RegExp%`),g=`flags`in h.prototype,_=function(e,t){var n,i=`flags`in t?r(t,`flags`):s(l(t));return n=g&&typeof i==`string`?new e(t,i):e===h?new e(t.source,i):new e(t,i),{flags:i,matcher:n}};t.exports=u(function(e){var t=this;if(c(t)!==`Object`)throw new p(`"this" value must be an Object`);var l=s(e),u=_(a(t,h),t),d=u.flags,f=u.matcher;return i(f,`lastIndex`,o(r(t,`lastIndex`)),!0),n(f,l,m(d,`g`)>-1,m(d,`u`)>-1)},`[Symbol.matchAll]`,!0)})),Wn=t(((e,t)=>{var n=Qe()(),r=Un();t.exports=function(){return!n||typeof Symbol.matchAll!=`symbol`||typeof RegExp.prototype[Symbol.matchAll]!=`function`?r:RegExp.prototype[Symbol.matchAll]}})),Gn=t(((e,t)=>{var n=St(),r=Et(),i=At(),a=Pt(),o=Ft(),s=It(),c=Q(),l=Qe()(),u=Ht(),d=Z(),f=X(),p=d(`%RegExp%`),m=c(`String.prototype.indexOf`),h=Wn(),g=function(e){var t=h();if(l&&typeof Symbol.matchAll==`symbol`){var n=i(e,Symbol.matchAll);return n===p.prototype[Symbol.matchAll]&&n!==t?t:n}if(a(e))return t};t.exports=function(e){var t=s(this);if(e!=null){if(a(e)){var i=`flags`in e?r(e,`flags`):u(e);if(s(i),m(o(i),`g`)<0)throw new f(`matchAll requires a global regular expression`)}var c=g(e);if(c!==void 0)return n(c,e,[t])}var l=o(t),d=new p(e,`g`);return n(g(d),d,[l])}})),Kn=t(((e,t)=>{var n=Gn();t.exports=function(){if(String.prototype.matchAll)try{``.matchAll(RegExp.prototype)}catch{return String.prototype.matchAll}return n}})),qn=t(((e,t)=>{var n=yt(),r=Qe()(),i=Ye(),a=Kn(),o=Wn(),s=Object.defineProperty;t.exports=function(){var e=a();if(n(String.prototype,{matchAll:e},{matchAll:function(){return String.prototype.matchAll!==e}}),r){var t=Symbol.matchAll||(Symbol.for?Symbol.for(`Symbol.matchAll`):Symbol(`Symbol.matchAll`));if(n(Symbol,{matchAll:t},{matchAll:function(){return Symbol.matchAll!==t}}),s&&i){var c=i(Symbol,t);(!c||c.configurable)&&s(Symbol,t,{configurable:!1,enumerable:!1,value:t,writable:!1})}var l=o(),u={};u[t]=l;var d={};d[t]=function(){return RegExp.prototype[t]!==l},n(RegExp.prototype,u,d)}return e}})),Jn=t(((e,t)=>{var n=ht(),r=yt(),i=Gn(),a=Kn(),o=qn(),s=n(i);r(s,{getPolyfill:a,implementation:i,shim:o}),t.exports=s})),Yn=t(((e,t)=>{r();var a=i(),o=k(),s=N(),c=P(),l=se(),u=M(),d=Y(),f=Me(),p=/\${?([\w\d]+)}?/g;String.prototype.regexIndexOf=function(e,t){let n=this.substring(t||0).search(e);return n>=0?n+(t||0):n},Jn().shim();var m=class e extends a{constructor(t){super();let{path:n=`/bin`,profile:r,hostname:i=`browser`,filesystem:a={},permissions:s={},cwd:c=`/`,onFsChange:l,useRealFilesystem:u=!1}=t;this.context=new o(Object.assign({},t,{clearFn:this.clear.bind(this),destroyFn:this.destroy.bind(this),onFsChange:typeof l==`function`?l:null})),this.context.setVar(`PATH`,n),this.context.setVar(`HOST`,i),u?this.context.setNodeFilesystem(c):this.context.setFilesystem(a,s),this.context.setCwd(c),this._loadDefaultCommands(),this._loadBuiltinCommands(),this._lastCode=0,r?this._loadProfile(r):setTimeout(()=>this.emit(`status`,e.STATUS_READY),0)}get path(){return this.context.getVar(`PATH`)}set lastCode(e){this.context.setVar(`?`,e),this._lastCode=e}get lastCode(){return this._lastCode}set stdin(e){this._stdin=e}onInput(e){if(this.runningCommand&&this.runningCommand.onInput&&this.runningCommand.captureInput)return this.runningCommand.onInput(e),!0}_loadDefaultCommands(){f.forEach(e=>{this.context.setCommand(e)})}_loadBuiltinCommands(){d.forEach(e=>{this.context.setCommand(e)})}_loadProfile(e){this.onCommand(`source ${e}`)}onCommand(t,n=!0){let r=this._splitInput(t),i=!0,a=r.reduce((e,{command:t,op:n})=>e.then(()=>{if(!i){n===`&&`?i=this._lastCode===0:n===`||`?i=this._lastCode!==0:n===`;`&&(i=!0);return}return this._runCommand(t).then(()=>{n===`&&`?i=this._lastCode===0:n===`||`?i=this._lastCode!==0:n===`;`&&(i=!0)})}),Promise.resolve());return n?a.then(()=>{this.destroyed||this.emit(`status`,e.STATUS_READY)}).catch(()=>this.emit(`status`,e.STATUS_READY)):a}tabCompletion(e){return this.context.fs.autoComplete(e,this.path)}async _runCommand(t){if(!t||t.length<1)return;this.emit(`status`,e.STATUS_WORKING);let n;try{n=await this._parseCommandLine(t)}catch(e){this.emit(`stdErr`,e.message||String(e)),this.lastCode=1,this.emit(`exitCode`,this.lastCode);return}if(!n.length)return;let r=n.shift(),i=this.context.getAlias(r);if(i)return this.onCommand(i,!1);let a;try{a=this._parseCommand(r.startsWith(`/`)||r.startsWith(`./`)?r:r.toLowerCase())}catch(e){this.emit(`stdErr`,e.message),this.lastCode=1,this.emit(`exitCode`,this.lastCode);return}let o;if(a.prototype instanceof s||new a instanceof c)o=new a(n,this.context);else if(a.prototype instanceof u)o=new a(n);else{this.emit(`stdErr`,`${r}: Command not found`),this.lastCode=1,this.emit(`exitCode`,this.lastCode);return}return o.requiresFilesystem&&(o.fs=this.context.fs),this._stdin!==void 0&&(o.stdin=this._stdin),this.runningCommand=o,this.runningCommand.on&&this.runningCommand.on(`flush`,e=>{this._emitOutput(e)}),o.runCommand().then(e=>{this._emitOutput(e.getStdOutput()),this.lastCode=e.getExitCode(),this.emit(`exitCode`,this.lastCode),delete this.runningCommand})}_emitOutput(e){e.forEach(({type:e,string:t})=>{e===`out`?this.emit(`stdOut`,t):e===`err`&&this.emit(`stdErr`,t)})}getPrompt(){let e=this.context.fs.cwd.split(`/`);return`${this.context.getVar(`HOST`)}:${e[e.length-2]}$`}destroy(t=0){this.destroyed||(this.destroyed=!0,this.emit(`status`,e.STATUS_DESTROYED),this.emit(`exit`,t))}clear(){this.emit(`clear`)}_splitInput(e){let t=e.split(`#`)[0];return this._parseOperators(t)}_parseOperators(e){let t=[],n=``,r=0,i=!1,a=!1;for(;r<e.length;){let o=e[r];if(o===`'`&&!a){i=!i,n+=o,r++;continue}if(o===`"`&&!i){a=!a,n+=o,r++;continue}if(!i&&!a){if(o===`&`&&e[r+1]===`&`){t.push({command:n.trim(),op:`&&`}),n=``,r+=2;continue}if(o===`|`&&e[r+1]===`|`){t.push({command:n.trim(),op:`||`}),n=``,r+=2;continue}if(o===`;`){t.push({command:n.trim(),op:`;`}),n=``,r++;continue}}n+=o,r++}return n.trim()&&t.push({command:n.trim(),op:null}),t}_parseCommand(e){if(e.startsWith(`./`)||e.startsWith(`/`)){let t=this.context.fs.getFileByPath(e);if(!t)throw Error(`${e}: No such file or directory`);if(t.constructor===Object)throw Error(`${e}: is a directory`);if(t.prototype&&t.prototype instanceof u)return t;if(t.constructor===String&&t.startsWith(`#!`)){if(!this.context.fs.isExecutable(e))throw Error(`${e}: permission denied`);return c.bind(this,t)}if(this._isWasmFile(e,t)){if(!this.context.fs.isExecutable(e))throw Error(`${e}: permission denied`);return l.bind(null,e)}throw Error(`${e}: permission denied`)}let t=this.context.getCommand(e);if(!t)throw Error(`${e}: Command not found`);return t}async _parseCommandLine(t){let n=e._splitCommand(t);return(await Promise.all(n.map(({value:e,hasQuote:t})=>this._replaceVariables(e).then(e=>({value:e,hasQuote:t}))))).filter(({value:e,hasQuote:t})=>e.length>0||t).map(({value:e})=>e)}static _sanitiseCommandPart(e){return e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`)?e.substring(1,e.length-1):e}static _sanitiseArray(e){return e.filter(e=>e.length>0)}async _replaceVariables(t){let n=[...t.matchAll(/\$\(\(([^)]+)\)\)/g)];for(let e of n)t=t.replace(e[0],String(this._evalArithmetic(e[1])));let r=[...t.matchAll(/\$\((?!\()([^)]+)\)/g)];for(let e of r){let n=await this._runAndCapture(e[1]);t=t.replace(e[0],n)}let i=t.matchAll(p),a=i.next();for(;!a.done;){let n=this.context.getVar(a.value[1]);t=t.replace(new RegExp(e._escapeRegExp(a.value[0]),`g`),String(n)),a=i.next()}return t}_evalArithmetic(e){let t=e.replace(/\${?([\w\d]+)}?/g,(e,t)=>String(parseInt(this.context.getVar(t))||0));if(!/^[\d\s+\-*/%()]+$/.test(t.trim()))return 0;try{return Function(`return (`+t+`)`)()}catch{return 0}}async _runAndCapture(e){let t=new n.shell({cwd:this.context.fs.cwd,filesystem:this.context.fs.getRaw(),permissions:this.context.fs.getRawPermissions()});t.context.source(this.context);let r=[];return t.on(`stdOut`,e=>r.push(e)),await t.onCommand(e,!1),r.join(`
|
|
13
|
+
`).trimEnd()}static _splitCommand(e){let t=/\s/g,n=!1,r=!1,i=0,a=[],o=!1,s=[];for(let c=0;c<e.length;c++){let l=e[c];if(i>0){a.push(l),l===`(`?i++:l===`)`&&i--;continue}if(l===`'`&&!r){n=!n,o=!0;continue}if(l===`"`&&!n){r=!r,o=!0;continue}if(!n&&!r){if(l===`$`&&c+1<e.length&&e[c+1]===`(`){i=1,a.push(`$`),a.push(`(`),c++;continue}if(l.match(t)){(a.length>0||o)&&(s.push({value:a.join(``),hasQuote:o}),a=[],o=!1);continue}}a.push(l)}if((a.length>0||o)&&s.push({value:a.join(``),hasQuote:o}),n||r)throw Error(`quote expression not closed`);return s}_isWasmFile(e,t){return e.endsWith(`.wasm`)||e.endsWith(`.wat`)?!0:typeof t==`string`?t.charCodeAt(0)===0&&t.slice(1,4)===`asm`?!0:t.trimStart().startsWith(`(module`):!1}static _escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}};m.STATUS_READY=`READY`,m.STATUS_WORKING=`WORKING`,m.STATUS_DESTROYED=`DESTROYED`,m.Command=u,n.shell=m,t.exports=m}));return Yn()})();
|
|
14
|
+
//# sourceMappingURL=shell.min.js.map
|