diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 45c44ba508..0c1253a459 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -152,6 +152,25 @@ jobs: stepName: 'rust-doc-check' secrets: inherit + devlow-bench: + name: Run devlow benchmarks + needs: ['changes', 'build-next', 'build-native'] + if: ${{ needs.changes.outputs.docs-only == 'false' }} + + strategy: + fail-fast: false + matrix: + mode: + - '--turbopack=false' + - '--turbopack=true' + selector: + - '--scenario=heavy-npm-deps --page=homepage' + uses: ./.github/workflows/build_reusable.yml + with: + afterBuild: pnpm install && ./node_modules/.bin/devlow-bench ./scripts/devlow-bench.mjs --datadog=ubuntu-latest-16-core ${{ matrix.mode }} ${{ matrix.selector }} + stepName: 'devlow-bench-${{ matrix.group }}' + secrets: inherit + test-turbopack-dev: name: test turbopack dev needs: ['changes', 'build-next', 'build-native'] diff --git a/bench/heavy-npm-deps/package.json b/bench/heavy-npm-deps/package.json index 8ac685a6a8..cf0a1e154e 100644 --- a/bench/heavy-npm-deps/package.json +++ b/bench/heavy-npm-deps/package.json @@ -3,7 +3,8 @@ "version": "0.1.0", "private": true, "scripts": { - "dev-application": "next dev --turbo", + "dev-turbopack": "next dev --turbo", + "dev-webpack": "next dev", "build-application": "next build", "start-application": "next start" }, diff --git a/package.json b/package.json index 6ce8823941..144da8208f 100644 --- a/package.json +++ b/package.json @@ -114,6 +114,7 @@ "@types/trusted-types": "2.0.3", "@typescript-eslint/eslint-plugin": "6.14.0", "@typescript-eslint/parser": "6.14.0", + "@vercel/devlow-bench": "0.3.1", "@vercel/fetch": "6.1.1", "@vercel/og": "0.6.2", "abort-controller": "3.0.0", diff --git a/packages/next/src/compiled/assert/assert.js b/packages/next/src/compiled/assert/assert.js index 642fd21714..dcee4b17aa 100644 --- a/packages/next/src/compiled/assert/assert.js +++ b/packages/next/src/compiled/assert/assert.js @@ -1,7 +1,7 @@ -(function(){var e={992:function(e){e.exports=function(e,r,n){if(e.filter)return e.filter(r,n);if(void 0===e||null===e)throw new TypeError;if("function"!=typeof r)throw new TypeError;var o=[];for(var i=0;i1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;ne.length){r=e.length}return e.substring(r-t.length,r)===t}function repeat(e,t){t=Math.floor(t);if(e.length==0||t==0)return"";var r=e.length*t;t=Math.floor(Math.log(t)/Math.log(2));while(t){e+=e;t--}e+=e.substring(0,r-e.length);return e}var c="";var u="";var f="";var s="";var l={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};var p=10;function copyError(e){var t=Object.keys(e);var r=Object.create(Object.getPrototypeOf(e));t.forEach((function(t){r[t]=e[t]}));Object.defineProperty(r,"message",{value:e.message});return r}function inspectValue(e){return o(e,{compact:false,customInspect:false,depth:1e3,maxArrayLength:Infinity,showHidden:false,breakLength:Infinity,showProxy:false,sorted:true,getters:true})}function createErrDiff(e,t,r){var n="";var o="";var i=0;var a="";var y=false;var g=inspectValue(e);var v=g.split("\n");var d=inspectValue(t).split("\n");var b=0;var h="";if(r==="strictEqual"&&_typeof(e)==="object"&&_typeof(t)==="object"&&e!==null&&t!==null){r="strictEqualObject"}if(v.length===1&&d.length===1&&v[0]!==d[0]){var m=v[0].length+d[0].length;if(m<=p){if((_typeof(e)!=="object"||e===null)&&(_typeof(t)!=="object"||t===null)&&(e!==0||t!==0)){return"".concat(l[r],"\n\n")+"".concat(v[0]," !== ").concat(d[0],"\n")}}else if(r!=="strictEqualObject"){var S=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(m2){h="\n ".concat(repeat(" ",b),"^");b=0}}}}var A=v[v.length-1];var E=d[d.length-1];while(A===E){if(b++<2){a="\n ".concat(A).concat(a)}else{n=A}v.pop();d.pop();if(v.length===0||d.length===0)break;A=v[v.length-1];E=d[d.length-1]}var O=Math.max(v.length,d.length);if(O===0){var w=g.split("\n");if(w.length>30){w[26]="".concat(c,"...").concat(s);while(w.length>27){w.pop()}}return"".concat(l.notIdentical,"\n\n").concat(w.join("\n"),"\n")}if(b>3){a="\n".concat(c,"...").concat(s).concat(a);y=true}if(n!==""){a="\n ".concat(n).concat(a);n=""}var j=0;var P=l[r]+"\n".concat(u,"+ actual").concat(s," ").concat(f,"- expected").concat(s);var _=" ".concat(c,"...").concat(s," Lines skipped");for(b=0;b1&&b>2){if(x>4){o+="\n".concat(c,"...").concat(s);y=true}else if(x>3){o+="\n ".concat(d[b-2]);j++}o+="\n ".concat(d[b-1]);j++}i=b;n+="\n".concat(f,"-").concat(s," ").concat(d[b]);j++}else if(d.length1&&b>2){if(x>4){o+="\n".concat(c,"...").concat(s);y=true}else if(x>3){o+="\n ".concat(v[b-2]);j++}o+="\n ".concat(v[b-1]);j++}i=b;o+="\n".concat(u,"+").concat(s," ").concat(v[b]);j++}else{var k=d[b];var I=v[b];var F=I!==k&&(!endsWith(I,",")||I.slice(0,-1)!==k);if(F&&endsWith(k,",")&&k.slice(0,-1)===I){F=false;I+=","}if(F){if(x>1&&b>2){if(x>4){o+="\n".concat(c,"...").concat(s);y=true}else if(x>3){o+="\n ".concat(v[b-2]);j++}o+="\n ".concat(v[b-1]);j++}i=b;o+="\n".concat(u,"+").concat(s," ").concat(I);n+="\n".concat(f,"-").concat(s," ").concat(k);j+=2}else{o+=n;n="";if(x===1||b===0){o+="\n ".concat(I);j++}}}if(j>20&&b30){v[26]="".concat(c,"...").concat(s);while(v.length>27){v.pop()}}if(v.length===1){t=_possibleConstructorReturn(this,_getPrototypeOf(AssertionError).call(this,"".concat(g," ").concat(v[0])))}else{t=_possibleConstructorReturn(this,_getPrototypeOf(AssertionError).call(this,"".concat(g,"\n\n").concat(v.join("\n"),"\n")))}}else{var d=inspectValue(i);var b="";var h=l[n];if(n==="notDeepEqual"||n==="notEqual"){d="".concat(l[n],"\n\n").concat(d);if(d.length>1024){d="".concat(d.slice(0,1021),"...")}}else{b="".concat(inspectValue(p));if(d.length>512){d="".concat(d.slice(0,509),"...")}if(b.length>512){b="".concat(b.slice(0,509),"...")}if(n==="deepEqual"||n==="equal"){d="".concat(h,"\n\n").concat(d,"\n\nshould equal\n\n")}else{b=" ".concat(n," ").concat(b)}}t=_possibleConstructorReturn(this,_getPrototypeOf(AssertionError).call(this,"".concat(d).concat(b)))}}Error.stackTraceLimit=y;t.generatedMessage=!r;Object.defineProperty(_assertThisInitialized(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:false,writable:true,configurable:true});t.code="ERR_ASSERTION";t.actual=i;t.expected=p;t.operator=n;if(Error.captureStackTrace){Error.captureStackTrace(_assertThisInitialized(t),o)}t.stack;t.name="AssertionError";return _possibleConstructorReturn(t)}_createClass(AssertionError,[{key:"toString",value:function toString(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:o.custom,value:function value(e,t){return o(this,_objectSpread({},t,{customInspect:false,depth:0}))}}]);return AssertionError}(_wrapNativeSuper(Error));e.exports=y},23:function(e,t,r){"use strict";function _typeof(e){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(e){return typeof e}}else{_typeof=function _typeof(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}return _typeof(e)}function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,t){if(t&&(_typeof(t)==="object"||typeof t==="function")){return t}return _assertThisInitialized(e)}function _assertThisInitialized(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function _getPrototypeOf(e){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)};return _getPrototypeOf(e)}function _inherits(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function")}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:true,configurable:true}});if(t)_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e};return _setPrototypeOf(e,t)}var n={};var o;var i;function createErrorType(e,t,r){if(!r){r=Error}function getMessage(e,r,n){if(typeof t==="string"){return t}else{return t(e,r,n)}}var o=function(t){_inherits(NodeError,t);function NodeError(t,r,n){var o;_classCallCheck(this,NodeError);o=_possibleConstructorReturn(this,_getPrototypeOf(NodeError).call(this,getMessage(t,r,n)));o.code=e;return o}return NodeError}(r);n[e]=o}function oneOf(e,t){if(Array.isArray(e)){var r=e.length;e=e.map((function(e){return String(e)}));if(r>2){return"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]}else if(r===2){return"one of ".concat(t," ").concat(e[0]," or ").concat(e[1])}else{return"of ".concat(t," ").concat(e[0])}}else{return"of ".concat(t," ").concat(String(e))}}function startsWith(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function endsWith(e,t,r){if(r===undefined||r>e.length){r=e.length}return e.substring(r-t.length,r)===t}function includes(e,t,r){if(typeof r!=="number"){r=0}if(r+t.length>e.length){return false}else{return e.indexOf(t,r)!==-1}}createErrorType("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);createErrorType("ERR_INVALID_ARG_TYPE",(function(e,t,n){if(o===undefined)o=r(167);o(typeof e==="string","'name' must be a string");var i;if(typeof t==="string"&&startsWith(t,"not ")){i="must not be";t=t.replace(/^not /,"")}else{i="must be"}var a;if(endsWith(e," argument")){a="The ".concat(e," ").concat(i," ").concat(oneOf(t,"type"))}else{var c=includes(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(c," ").concat(i," ").concat(oneOf(t,"type"))}a+=". Received type ".concat(_typeof(n));return a}),TypeError);createErrorType("ERR_INVALID_ARG_VALUE",(function(e,t){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"is invalid";if(i===undefined)i=r(177);var o=i.inspect(t);if(o.length>128){o="".concat(o.slice(0,128),"...")}return"The argument '".concat(e,"' ").concat(n,". Received ").concat(o)}),TypeError,RangeError);createErrorType("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var n;if(r&&r.constructor&&r.constructor.name){n="instance of ".concat(r.constructor.name)}else{n="type ".concat(_typeof(r))}return"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(n,".")}),TypeError);createErrorType("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),n=0;n0,"At least one arg needs to be specified");var i="The ";var a=t.length;t=t.map((function(e){return'"'.concat(e,'"')}));switch(a){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,a-1).join(", ");i+=", and ".concat(t[a-1]," arguments");break}return"".concat(i," must be specified")}),TypeError);e.exports.codes=n},176:function(e,t,r){"use strict";function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _iterableToArrayLimit(e,t){var r=[];var n=true;var o=false;var i=undefined;try{for(var a=e[Symbol.iterator](),c;!(n=(c=a.next()).done);n=true){r.push(c.value);if(t&&r.length===t)break}}catch(e){o=true;i=e}finally{try{if(!n&&a["return"]!=null)a["return"]()}finally{if(o)throw i}}return r}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _typeof(e){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(e){return typeof e}}else{_typeof=function _typeof(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}return _typeof(e)}var n=/a/g.flags!==undefined;var o=function arrayFromSet(e){var t=[];e.forEach((function(e){return t.push(e)}));return t};var i=function arrayFromMap(e){var t=[];e.forEach((function(e,r){return t.push([r,e])}));return t};var a=Object.is?Object.is:r(208);var c=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]};var u=Number.isNaN?Number.isNaN:r(718);function uncurryThis(e){return e.call.bind(e)}var f=uncurryThis(Object.prototype.hasOwnProperty);var s=uncurryThis(Object.prototype.propertyIsEnumerable);var l=uncurryThis(Object.prototype.toString);var p=r(177).types,y=p.isAnyArrayBuffer,g=p.isArrayBufferView,v=p.isDate,d=p.isMap,b=p.isRegExp,h=p.isSet,m=p.isNativeError,S=p.isBoxedPrimitive,A=p.isNumberObject,E=p.isStringObject,O=p.isBooleanObject,w=p.isBigIntObject,j=p.isSymbolObject,P=p.isFloat32Array,_=p.isFloat64Array;function isNonIndex(e){if(e.length===0||e.length>10)return true;for(var t=0;t57)return true}return e.length===10&&e>=Math.pow(2,32)}function getOwnNonIndexProperties(e){return Object.keys(e).filter(isNonIndex).concat(c(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))} +(function(){var e={992:function(e){e.exports=function(e,r,n){if(e.filter)return e.filter(r,n);if(void 0===e||null===e)throw new TypeError;if("function"!=typeof r)throw new TypeError;var o=[];for(var i=0;i1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;ne.length){r=e.length}return e.substring(r-t.length,r)===t}function repeat(e,t){t=Math.floor(t);if(e.length==0||t==0)return"";var r=e.length*t;t=Math.floor(Math.log(t)/Math.log(2));while(t){e+=e;t--}e+=e.substring(0,r-e.length);return e}var c="";var u="";var f="";var s="";var l={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};var p=10;function copyError(e){var t=Object.keys(e);var r=Object.create(Object.getPrototypeOf(e));t.forEach((function(t){r[t]=e[t]}));Object.defineProperty(r,"message",{value:e.message});return r}function inspectValue(e){return o(e,{compact:false,customInspect:false,depth:1e3,maxArrayLength:Infinity,showHidden:false,breakLength:Infinity,showProxy:false,sorted:true,getters:true})}function createErrDiff(e,t,r){var n="";var o="";var i=0;var a="";var y=false;var g=inspectValue(e);var v=g.split("\n");var d=inspectValue(t).split("\n");var b=0;var h="";if(r==="strictEqual"&&_typeof(e)==="object"&&_typeof(t)==="object"&&e!==null&&t!==null){r="strictEqualObject"}if(v.length===1&&d.length===1&&v[0]!==d[0]){var m=v[0].length+d[0].length;if(m<=p){if((_typeof(e)!=="object"||e===null)&&(_typeof(t)!=="object"||t===null)&&(e!==0||t!==0)){return"".concat(l[r],"\n\n")+"".concat(v[0]," !== ").concat(d[0],"\n")}}else if(r!=="strictEqualObject"){var S=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(m2){h="\n ".concat(repeat(" ",b),"^");b=0}}}}var E=v[v.length-1];var O=d[d.length-1];while(E===O){if(b++<2){a="\n ".concat(E).concat(a)}else{n=E}v.pop();d.pop();if(v.length===0||d.length===0)break;E=v[v.length-1];O=d[d.length-1]}var w=Math.max(v.length,d.length);if(w===0){var A=g.split("\n");if(A.length>30){A[26]="".concat(c,"...").concat(s);while(A.length>27){A.pop()}}return"".concat(l.notIdentical,"\n\n").concat(A.join("\n"),"\n")}if(b>3){a="\n".concat(c,"...").concat(s).concat(a);y=true}if(n!==""){a="\n ".concat(n).concat(a);n=""}var j=0;var _=l[r]+"\n".concat(u,"+ actual").concat(s," ").concat(f,"- expected").concat(s);var P=" ".concat(c,"...").concat(s," Lines skipped");for(b=0;b1&&b>2){if(x>4){o+="\n".concat(c,"...").concat(s);y=true}else if(x>3){o+="\n ".concat(d[b-2]);j++}o+="\n ".concat(d[b-1]);j++}i=b;n+="\n".concat(f,"-").concat(s," ").concat(d[b]);j++}else if(d.length1&&b>2){if(x>4){o+="\n".concat(c,"...").concat(s);y=true}else if(x>3){o+="\n ".concat(v[b-2]);j++}o+="\n ".concat(v[b-1]);j++}i=b;o+="\n".concat(u,"+").concat(s," ").concat(v[b]);j++}else{var k=d[b];var T=v[b];var I=T!==k&&(!endsWith(T,",")||T.slice(0,-1)!==k);if(I&&endsWith(k,",")&&k.slice(0,-1)===T){I=false;T+=","}if(I){if(x>1&&b>2){if(x>4){o+="\n".concat(c,"...").concat(s);y=true}else if(x>3){o+="\n ".concat(v[b-2]);j++}o+="\n ".concat(v[b-1]);j++}i=b;o+="\n".concat(u,"+").concat(s," ").concat(T);n+="\n".concat(f,"-").concat(s," ").concat(k);j+=2}else{o+=n;n="";if(x===1||b===0){o+="\n ".concat(T);j++}}}if(j>20&&b30){v[26]="".concat(c,"...").concat(s);while(v.length>27){v.pop()}}if(v.length===1){t=_possibleConstructorReturn(this,_getPrototypeOf(AssertionError).call(this,"".concat(g," ").concat(v[0])))}else{t=_possibleConstructorReturn(this,_getPrototypeOf(AssertionError).call(this,"".concat(g,"\n\n").concat(v.join("\n"),"\n")))}}else{var d=inspectValue(i);var b="";var h=l[n];if(n==="notDeepEqual"||n==="notEqual"){d="".concat(l[n],"\n\n").concat(d);if(d.length>1024){d="".concat(d.slice(0,1021),"...")}}else{b="".concat(inspectValue(p));if(d.length>512){d="".concat(d.slice(0,509),"...")}if(b.length>512){b="".concat(b.slice(0,509),"...")}if(n==="deepEqual"||n==="equal"){d="".concat(h,"\n\n").concat(d,"\n\nshould equal\n\n")}else{b=" ".concat(n," ").concat(b)}}t=_possibleConstructorReturn(this,_getPrototypeOf(AssertionError).call(this,"".concat(d).concat(b)))}}Error.stackTraceLimit=y;t.generatedMessage=!r;Object.defineProperty(_assertThisInitialized(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:false,writable:true,configurable:true});t.code="ERR_ASSERTION";t.actual=i;t.expected=p;t.operator=n;if(Error.captureStackTrace){Error.captureStackTrace(_assertThisInitialized(t),o)}t.stack;t.name="AssertionError";return _possibleConstructorReturn(t)}_createClass(AssertionError,[{key:"toString",value:function toString(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:o.custom,value:function value(e,t){return o(this,_objectSpread({},t,{customInspect:false,depth:0}))}}]);return AssertionError}(_wrapNativeSuper(Error));e.exports=y},23:function(e,t,r){"use strict";function _typeof(e){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(e){return typeof e}}else{_typeof=function _typeof(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}return _typeof(e)}function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,t){if(t&&(_typeof(t)==="object"||typeof t==="function")){return t}return _assertThisInitialized(e)}function _assertThisInitialized(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function _getPrototypeOf(e){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)};return _getPrototypeOf(e)}function _inherits(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function")}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:true,configurable:true}});if(t)_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e};return _setPrototypeOf(e,t)}var n={};var o;var i;function createErrorType(e,t,r){if(!r){r=Error}function getMessage(e,r,n){if(typeof t==="string"){return t}else{return t(e,r,n)}}var o=function(t){_inherits(NodeError,t);function NodeError(t,r,n){var o;_classCallCheck(this,NodeError);o=_possibleConstructorReturn(this,_getPrototypeOf(NodeError).call(this,getMessage(t,r,n)));o.code=e;return o}return NodeError}(r);n[e]=o}function oneOf(e,t){if(Array.isArray(e)){var r=e.length;e=e.map((function(e){return String(e)}));if(r>2){return"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]}else if(r===2){return"one of ".concat(t," ").concat(e[0]," or ").concat(e[1])}else{return"of ".concat(t," ").concat(e[0])}}else{return"of ".concat(t," ").concat(String(e))}}function startsWith(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function endsWith(e,t,r){if(r===undefined||r>e.length){r=e.length}return e.substring(r-t.length,r)===t}function includes(e,t,r){if(typeof r!=="number"){r=0}if(r+t.length>e.length){return false}else{return e.indexOf(t,r)!==-1}}createErrorType("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);createErrorType("ERR_INVALID_ARG_TYPE",(function(e,t,n){if(o===undefined)o=r(167);o(typeof e==="string","'name' must be a string");var i;if(typeof t==="string"&&startsWith(t,"not ")){i="must not be";t=t.replace(/^not /,"")}else{i="must be"}var a;if(endsWith(e," argument")){a="The ".concat(e," ").concat(i," ").concat(oneOf(t,"type"))}else{var c=includes(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(c," ").concat(i," ").concat(oneOf(t,"type"))}a+=". Received type ".concat(_typeof(n));return a}),TypeError);createErrorType("ERR_INVALID_ARG_VALUE",(function(e,t){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"is invalid";if(i===undefined)i=r(177);var o=i.inspect(t);if(o.length>128){o="".concat(o.slice(0,128),"...")}return"The argument '".concat(e,"' ").concat(n,". Received ").concat(o)}),TypeError,RangeError);createErrorType("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var n;if(r&&r.constructor&&r.constructor.name){n="instance of ".concat(r.constructor.name)}else{n="type ".concat(_typeof(r))}return"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(n,".")}),TypeError);createErrorType("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),n=0;n0,"At least one arg needs to be specified");var i="The ";var a=t.length;t=t.map((function(e){return'"'.concat(e,'"')}));switch(a){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,a-1).join(", ");i+=", and ".concat(t[a-1]," arguments");break}return"".concat(i," must be specified")}),TypeError);e.exports.codes=n},176:function(e,t,r){"use strict";function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _iterableToArrayLimit(e,t){var r=[];var n=true;var o=false;var i=undefined;try{for(var a=e[Symbol.iterator](),c;!(n=(c=a.next()).done);n=true){r.push(c.value);if(t&&r.length===t)break}}catch(e){o=true;i=e}finally{try{if(!n&&a["return"]!=null)a["return"]()}finally{if(o)throw i}}return r}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _typeof(e){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(e){return typeof e}}else{_typeof=function _typeof(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}return _typeof(e)}var n=/a/g.flags!==undefined;var o=function arrayFromSet(e){var t=[];e.forEach((function(e){return t.push(e)}));return t};var i=function arrayFromMap(e){var t=[];e.forEach((function(e,r){return t.push([r,e])}));return t};var a=Object.is?Object.is:r(208);var c=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]};var u=Number.isNaN?Number.isNaN:r(718);function uncurryThis(e){return e.call.bind(e)}var f=uncurryThis(Object.prototype.hasOwnProperty);var s=uncurryThis(Object.prototype.propertyIsEnumerable);var l=uncurryThis(Object.prototype.toString);var p=r(177).types,y=p.isAnyArrayBuffer,g=p.isArrayBufferView,v=p.isDate,d=p.isMap,b=p.isRegExp,h=p.isSet,m=p.isNativeError,S=p.isBoxedPrimitive,E=p.isNumberObject,O=p.isStringObject,w=p.isBooleanObject,A=p.isBigIntObject,j=p.isSymbolObject,_=p.isFloat32Array,P=p.isFloat64Array;function isNonIndex(e){if(e.length===0||e.length>10)return true;for(var t=0;t57)return true}return e.length===10&&e>=Math.pow(2,32)}function getOwnNonIndexProperties(e){return Object.keys(e).filter(isNonIndex).concat(c(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))} /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - */function compare(e,t){if(e===t){return 0}var r=e.length;var n=t.length;for(var o=0,i=Math.min(r,n);o-1){return o(r)}return r}},139:function(e,t,r){"use strict";var n=r(174);var o=r(925);var i=o("%Function.prototype.apply%");var a=o("%Function.prototype.call%");var c=o("%Reflect.apply%",true)||n.call(a,i);var u=o("%Object.getOwnPropertyDescriptor%",true);var f=o("%Object.defineProperty%",true);var s=o("%Math.max%");if(f){try{f({},"a",{value:1})}catch(e){f=null}}e.exports=function callBind(e){var t=c(n,a,arguments);if(u&&f){var r=u(t,"length");if(r.configurable){f(t,"length",{value:1+s(0,e.length-(arguments.length-1))})}}return t};var l=function applyBind(){return c(n,i,arguments)};if(f){f(e.exports,"apply",{value:l})}else{e.exports.apply=l}},69:function(e,t,r){"use strict";var n=r(935);var o=typeof Symbol==="function"&&typeof Symbol("foo")==="symbol";var i=Object.prototype.toString;var a=Array.prototype.concat;var c=Object.defineProperty;var isFunction=function(e){return typeof e==="function"&&i.call(e)==="[object Function]"};var arePropertyDescriptorsSupported=function(){var e={};try{c(e,"x",{enumerable:false,value:e});for(var t in e){return false}return e.x===e}catch(e){return false}};var u=c&&arePropertyDescriptorsSupported();var defineProperty=function(e,t,r,n){if(t in e&&(!isFunction(n)||!n())){return}if(u){c(e,t,{configurable:true,enumerable:false,value:r,writable:true})}else{e[t]=r}};var defineProperties=function(e,t){var r=arguments.length>2?arguments[2]:{};var i=n(t);if(o){i=a.call(i,Object.getOwnPropertySymbols(t))}for(var c=0;c1&&typeof t!=="boolean"){throw new a('"allowMissing" argument must be a boolean')}if(E(/^%?[^%]*%?$/g,e)===null){throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name")}var r=j(e);var i=r.length>0?r[0]:"";var u=P("%"+i+"%",t);var f=u.name;var s=u.value;var l=false;var p=u.alias;if(p){i=p[0];m(r,h([0,1],p))}for(var g=1,v=true;g=r.length){var w=c(s,d);v=!!w;if(v&&"get"in w&&!("originalValue"in w.get)){s=w.get}else{s=s[d]}}else{v=b(s,d);s=s[d]}if(v&&!l){y[f]=s}}}return s}},925:function(e,t,r){"use strict";var n;var o=SyntaxError;var i=Function;var a=TypeError;var getEvalledConstructor=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}};var c=Object.getOwnPropertyDescriptor;if(c){try{c({},"")}catch(e){c=null}}var throwTypeError=function(){throw new a};var u=c?function(){try{arguments.callee;return throwTypeError}catch(e){try{return c(arguments,"callee").get}catch(e){return throwTypeError}}}():throwTypeError;var f=r(115)();var s=r(504)();var l=Object.getPrototypeOf||(s?function(e){return e.__proto__}:null);var p={};var y=typeof Uint8Array==="undefined"||!l?n:l(Uint8Array);var g={"%AggregateError%":typeof AggregateError==="undefined"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?n:ArrayBuffer,"%ArrayIteratorPrototype%":f&&l?l([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":typeof Atomics==="undefined"?n:Atomics,"%BigInt%":typeof BigInt==="undefined"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array==="undefined"?n:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":p,"%Int8Array%":typeof Int8Array==="undefined"?n:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?n:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&l?l(l([][Symbol.iterator]())):n,"%JSON%":typeof JSON==="object"?JSON:n,"%Map%":typeof Map==="undefined"?n:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!f||!l?n:l((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?n:Promise,"%Proxy%":typeof Proxy==="undefined"?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect==="undefined"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?n:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!f||!l?n:l((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&l?l(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":u,"%TypedArray%":y,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array==="undefined"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap==="undefined"?n:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?n:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?n:WeakSet};if(l){try{null.error}catch(e){var v=l(l(e));g["%Error.prototype%"]=v}}var d=function doEval(e){var t;if(e==="%AsyncFunction%"){t=getEvalledConstructor("async function () {}")}else if(e==="%GeneratorFunction%"){t=getEvalledConstructor("function* () {}")}else if(e==="%AsyncGeneratorFunction%"){t=getEvalledConstructor("async function* () {}")}else if(e==="%AsyncGenerator%"){var r=doEval("%AsyncGeneratorFunction%");if(r){t=r.prototype}}else if(e==="%AsyncIteratorPrototype%"){var n=doEval("%AsyncGenerator%");if(n&&l){t=l(n.prototype)}}g[e]=t;return t};var b={"%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"]};var h=r(174);var m=r(101);var S=h.call(Function.call,Array.prototype.concat);var A=h.call(Function.apply,Array.prototype.splice);var E=h.call(Function.call,String.prototype.replace);var O=h.call(Function.call,String.prototype.slice);var w=h.call(Function.call,RegExp.prototype.exec);var j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;var P=/\\(\\)?/g;var _=function stringToPath(e){var t=O(e,0,1);var r=O(e,-1);if(t==="%"&&r!=="%"){throw new o("invalid intrinsic syntax, expected closing `%`")}else if(r==="%"&&t!=="%"){throw new o("invalid intrinsic syntax, expected opening `%`")}var n=[];E(e,j,(function(e,t,r,o){n[n.length]=r?E(o,P,"$1"):t||e}));return n};var x=function getBaseIntrinsic(e,t){var r=e;var n;if(m(b,r)){n=b[r];r="%"+n[0]+"%"}if(m(g,r)){var i=g[r];if(i===p){i=d(r)}if(typeof i==="undefined"&&!t){throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!")}return{alias:n,name:r,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function GetIntrinsic(e,t){if(typeof e!=="string"||e.length===0){throw new a("intrinsic name must be a non-empty string")}if(arguments.length>1&&typeof t!=="boolean"){throw new a('"allowMissing" argument must be a boolean')}if(w(/^%?[^%]*%?$/,e)===null){throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name")}var r=_(e);var i=r.length>0?r[0]:"";var u=x("%"+i+"%",t);var f=u.name;var s=u.value;var l=false;var p=u.alias;if(p){i=p[0];A(r,S([0,1],p))}for(var y=1,v=true;y=r.length){var E=c(s,d);v=!!E;if(v&&"get"in E&&!("originalValue"in E.get)){s=E.get}else{s=s[d]}}else{v=m(s,d);s=s[d]}if(v&&!l){g[f]=s}}}return s}},504:function(e){"use strict";var t={foo:{}};var r=Object;e.exports=function hasProto(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},942:function(e,t,r){"use strict";var n=typeof Symbol!=="undefined"&&Symbol;var o=r(773);e.exports=function hasNativeSymbols(){if(typeof n!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof n("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return o()}},773:function(e){"use strict";e.exports=function hasSymbols(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var e={};var t=Symbol("test");var r=Object(t);if(typeof t==="string"){return false}if(Object.prototype.toString.call(t)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(r)!=="[object Symbol]"){return false}var n=42;e[t]=n;for(t in e){return false}if(typeof Object.keys==="function"&&Object.keys(e).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(e).length!==0){return false}var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t){return false}if(!Object.prototype.propertyIsEnumerable.call(e,t)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var i=Object.getOwnPropertyDescriptor(e,t);if(i.value!==n||i.enumerable!==true){return false}}return true}},115:function(e,t,r){"use strict";var n=typeof Symbol!=="undefined"&&Symbol;var o=r(832);e.exports=function hasNativeSymbols(){if(typeof n!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof n("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return o()}},832:function(e){"use strict";e.exports=function hasSymbols(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var e={};var t=Symbol("test");var r=Object(t);if(typeof t==="string"){return false}if(Object.prototype.toString.call(t)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(r)!=="[object Symbol]"){return false}var n=42;e[t]=n;for(t in e){return false}if(typeof Object.keys==="function"&&Object.keys(e).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(e).length!==0){return false}var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t){return false}if(!Object.prototype.propertyIsEnumerable.call(e,t)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var i=Object.getOwnPropertyDescriptor(e,t);if(i.value!==n||i.enumerable!==true){return false}}return true}},101:function(e,t,r){"use strict";var n=r(174);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},782:function(e){if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype;e.prototype=new TempCtor;e.prototype.constructor=e}}}},157:function(e){"use strict";var t=typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol";var r=Object.prototype.toString;var n=function isArguments(e){if(t&&e&&typeof e==="object"&&Symbol.toStringTag in e){return false}return r.call(e)==="[object Arguments]"};var o=function isArguments(e){if(n(e)){return true}return e!==null&&typeof e==="object"&&typeof e.length==="number"&&e.length>=0&&r.call(e)!=="[object Array]"&&r.call(e.callee)==="[object Function]"};var i=function(){return n(arguments)}();n.isLegacyArguments=o;e.exports=i?n:o},391:function(e){"use strict";var t=Object.prototype.toString;var r=Function.prototype.toString;var n=/^\s*(?:function)?\*/;var o=typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol";var i=Object.getPrototypeOf;var getGeneratorFunc=function(){if(!o){return false}try{return Function("return function*() {}")()}catch(e){}};var a=getGeneratorFunc();var c=a?i(a):{};e.exports=function isGeneratorFunction(e){if(typeof e!=="function"){return false}if(n.test(r.call(e))){return true}if(!o){var a=t.call(e);return a==="[object GeneratorFunction]"}return i(e)===c}},460:function(e){"use strict";e.exports=function isNaN(e){return e!==e}},718:function(e,t,r){"use strict";var n=r(139);var o=r(69);var i=r(460);var a=r(625);var c=r(171);var u=n(a(),Number);o(u,{getPolyfill:a,implementation:i,shim:c});e.exports=u},625:function(e,t,r){"use strict";var n=r(460);e.exports=function getPolyfill(){if(Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")){return Number.isNaN}return n}},171:function(e,t,r){"use strict";var n=r(69);var o=r(625);e.exports=function shimNumberIsNaN(){var e=o();n(Number,{isNaN:e},{isNaN:function testIsNaN(){return Number.isNaN!==e}});return e}},994:function(e,t,r){"use strict";var n=r(144);var o=r(349);var i=r(256);var a=i("Object.prototype.toString");var c=r(942)();var u=c&&typeof Symbol.toStringTag==="symbol";var f=o();var s=i("Array.prototype.indexOf",true)||function indexOf(e,t){for(var r=0;r-1}if(!y){return false}return v(e)}},208:function(e){"use strict";var numberIsNaN=function(e){return e!==e};e.exports=function is(e,t){if(e===0&&t===0){return 1/e===1/t}if(e===t){return true}if(numberIsNaN(e)&&numberIsNaN(t)){return true}return false}},579:function(e,t,r){"use strict";var n;if(!Object.keys){var o=Object.prototype.hasOwnProperty;var i=Object.prototype.toString;var a=r(412);var c=Object.prototype.propertyIsEnumerable;var u=!c.call({toString:null},"toString");var f=c.call((function(){}),"prototype");var s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];var equalsConstructorPrototype=function(e){var t=e.constructor;return t&&t.prototype===e};var l={$applicationCache:true,$console:true,$external:true,$frame:true,$frameElement:true,$frames:true,$innerHeight:true,$innerWidth:true,$onmozfullscreenchange:true,$onmozfullscreenerror:true,$outerHeight:true,$outerWidth:true,$pageXOffset:true,$pageYOffset:true,$parent:true,$scrollLeft:true,$scrollTop:true,$scrollX:true,$scrollY:true,$self:true,$webkitIndexedDB:true,$webkitStorageInfo:true,$window:true};var p=function(){if(typeof window==="undefined"){return false}for(var e in window){try{if(!l["$"+e]&&o.call(window,e)&&window[e]!==null&&typeof window[e]==="object"){try{equalsConstructorPrototype(window[e])}catch(e){return true}}}catch(e){return true}}return false}();var equalsConstructorPrototypeIfNotBuggy=function(e){if(typeof window==="undefined"||!p){return equalsConstructorPrototype(e)}try{return equalsConstructorPrototype(e)}catch(e){return false}};n=function keys(e){var t=e!==null&&typeof e==="object";var r=i.call(e)==="[object Function]";var n=a(e);var c=t&&i.call(e)==="[object String]";var l=[];if(!t&&!r&&!n){throw new TypeError("Object.keys called on a non-object")}var p=f&&r;if(c&&e.length>0&&!o.call(e,0)){for(var y=0;y0){for(var g=0;g=0&&t.call(e.callee)==="[object Function]"}return n}},369:function(e){e.exports=function isBuffer(e){return e instanceof Buffer}},584:function(e,t,r){"use strict";var n=r(157);var o=r(391);var i=r(490);var a=r(994);function uncurryThis(e){return e.call.bind(e)}var c=typeof BigInt!=="undefined";var u=typeof Symbol!=="undefined";var f=uncurryThis(Object.prototype.toString);var s=uncurryThis(Number.prototype.valueOf);var l=uncurryThis(String.prototype.valueOf);var p=uncurryThis(Boolean.prototype.valueOf);if(c){var y=uncurryThis(BigInt.prototype.valueOf)}if(u){var g=uncurryThis(Symbol.prototype.valueOf)}function checkBoxedPrimitive(e,t){if(typeof e!=="object"){return false}try{t(e);return true}catch(e){return false}}t.isArgumentsObject=n;t.isGeneratorFunction=o;t.isTypedArray=a;function isPromise(e){return typeof Promise!=="undefined"&&e instanceof Promise||e!==null&&typeof e==="object"&&typeof e.then==="function"&&typeof e.catch==="function"}t.isPromise=isPromise;function isArrayBufferView(e){if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){return ArrayBuffer.isView(e)}return a(e)||isDataView(e)}t.isArrayBufferView=isArrayBufferView;function isUint8Array(e){return i(e)==="Uint8Array"}t.isUint8Array=isUint8Array;function isUint8ClampedArray(e){return i(e)==="Uint8ClampedArray"}t.isUint8ClampedArray=isUint8ClampedArray;function isUint16Array(e){return i(e)==="Uint16Array"}t.isUint16Array=isUint16Array;function isUint32Array(e){return i(e)==="Uint32Array"}t.isUint32Array=isUint32Array;function isInt8Array(e){return i(e)==="Int8Array"}t.isInt8Array=isInt8Array;function isInt16Array(e){return i(e)==="Int16Array"}t.isInt16Array=isInt16Array;function isInt32Array(e){return i(e)==="Int32Array"}t.isInt32Array=isInt32Array;function isFloat32Array(e){return i(e)==="Float32Array"}t.isFloat32Array=isFloat32Array;function isFloat64Array(e){return i(e)==="Float64Array"}t.isFloat64Array=isFloat64Array;function isBigInt64Array(e){return i(e)==="BigInt64Array"}t.isBigInt64Array=isBigInt64Array;function isBigUint64Array(e){return i(e)==="BigUint64Array"}t.isBigUint64Array=isBigUint64Array;function isMapToString(e){return f(e)==="[object Map]"}isMapToString.working=typeof Map!=="undefined"&&isMapToString(new Map);function isMap(e){if(typeof Map==="undefined"){return false}return isMapToString.working?isMapToString(e):e instanceof Map}t.isMap=isMap;function isSetToString(e){return f(e)==="[object Set]"}isSetToString.working=typeof Set!=="undefined"&&isSetToString(new Set);function isSet(e){if(typeof Set==="undefined"){return false}return isSetToString.working?isSetToString(e):e instanceof Set}t.isSet=isSet;function isWeakMapToString(e){return f(e)==="[object WeakMap]"}isWeakMapToString.working=typeof WeakMap!=="undefined"&&isWeakMapToString(new WeakMap);function isWeakMap(e){if(typeof WeakMap==="undefined"){return false}return isWeakMapToString.working?isWeakMapToString(e):e instanceof WeakMap}t.isWeakMap=isWeakMap;function isWeakSetToString(e){return f(e)==="[object WeakSet]"}isWeakSetToString.working=typeof WeakSet!=="undefined"&&isWeakSetToString(new WeakSet);function isWeakSet(e){return isWeakSetToString(e)}t.isWeakSet=isWeakSet;function isArrayBufferToString(e){return f(e)==="[object ArrayBuffer]"}isArrayBufferToString.working=typeof ArrayBuffer!=="undefined"&&isArrayBufferToString(new ArrayBuffer);function isArrayBuffer(e){if(typeof ArrayBuffer==="undefined"){return false}return isArrayBufferToString.working?isArrayBufferToString(e):e instanceof ArrayBuffer}t.isArrayBuffer=isArrayBuffer;function isDataViewToString(e){return f(e)==="[object DataView]"}isDataViewToString.working=typeof ArrayBuffer!=="undefined"&&typeof DataView!=="undefined"&&isDataViewToString(new DataView(new ArrayBuffer(1),0,1));function isDataView(e){if(typeof DataView==="undefined"){return false}return isDataViewToString.working?isDataViewToString(e):e instanceof DataView}t.isDataView=isDataView;var v=typeof SharedArrayBuffer!=="undefined"?SharedArrayBuffer:undefined;function isSharedArrayBufferToString(e){return f(e)==="[object SharedArrayBuffer]"}function isSharedArrayBuffer(e){if(typeof v==="undefined"){return false}if(typeof isSharedArrayBufferToString.working==="undefined"){isSharedArrayBufferToString.working=isSharedArrayBufferToString(new v)}return isSharedArrayBufferToString.working?isSharedArrayBufferToString(e):e instanceof v}t.isSharedArrayBuffer=isSharedArrayBuffer;function isAsyncFunction(e){return f(e)==="[object AsyncFunction]"}t.isAsyncFunction=isAsyncFunction;function isMapIterator(e){return f(e)==="[object Map Iterator]"}t.isMapIterator=isMapIterator;function isSetIterator(e){return f(e)==="[object Set Iterator]"}t.isSetIterator=isSetIterator;function isGeneratorObject(e){return f(e)==="[object Generator]"}t.isGeneratorObject=isGeneratorObject;function isWebAssemblyCompiledModule(e){return f(e)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=isWebAssemblyCompiledModule;function isNumberObject(e){return checkBoxedPrimitive(e,s)}t.isNumberObject=isNumberObject;function isStringObject(e){return checkBoxedPrimitive(e,l)}t.isStringObject=isStringObject;function isBooleanObject(e){return checkBoxedPrimitive(e,p)}t.isBooleanObject=isBooleanObject;function isBigIntObject(e){return c&&checkBoxedPrimitive(e,y)}t.isBigIntObject=isBigIntObject;function isSymbolObject(e){return u&&checkBoxedPrimitive(e,g)}t.isSymbolObject=isSymbolObject;function isBoxedPrimitive(e){return isNumberObject(e)||isStringObject(e)||isBooleanObject(e)||isBigIntObject(e)||isSymbolObject(e)}t.isBoxedPrimitive=isBoxedPrimitive;function isAnyArrayBuffer(e){return typeof Uint8Array!=="undefined"&&(isArrayBuffer(e)||isSharedArrayBuffer(e))}t.isAnyArrayBuffer=isAnyArrayBuffer;["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:false,value:function(){throw new Error(e+" is not supported in userland")}})}))},177:function(e,t,r){var n=Object.getOwnPropertyDescriptors||function getOwnPropertyDescriptors(e){var t=Object.keys(e);var r={};for(var n=0;n=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}));for(var c=n[r];r=3)n.depth=arguments[2];if(arguments.length>=4)n.colors=arguments[3];if(isBoolean(r)){n.showHidden=r}else if(r){t._extend(n,r)}if(isUndefined(n.showHidden))n.showHidden=false;if(isUndefined(n.depth))n.depth=2;if(isUndefined(n.colors))n.colors=false;if(isUndefined(n.customInspect))n.customInspect=true;if(n.colors)n.stylize=stylizeWithColor;return formatValue(n,e,n.depth)}t.inspect=inspect;inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(e,t){var r=inspect.styles[t];if(r){return"["+inspect.colors[r][0]+"m"+e+"["+inspect.colors[r][1]+"m"}else{return e}}function stylizeNoColor(e,t){return e}function arrayToHash(e){var t={};e.forEach((function(e,r){t[e]=true}));return t}function formatValue(e,r,n){if(e.customInspect&&r&&isFunction(r.inspect)&&r.inspect!==t.inspect&&!(r.constructor&&r.constructor.prototype===r)){var o=r.inspect(n,e);if(!isString(o)){o=formatValue(e,o,n)}return o}var i=formatPrimitive(e,r);if(i){return i}var a=Object.keys(r);var c=arrayToHash(a);if(e.showHidden){a=Object.getOwnPropertyNames(r)}if(isError(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0)){return formatError(r)}if(a.length===0){if(isFunction(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(isRegExp(r)){return e.stylize(RegExp.prototype.toString.call(r),"regexp")}if(isDate(r)){return e.stylize(Date.prototype.toString.call(r),"date")}if(isError(r)){return formatError(r)}}var f="",s=false,l=["{","}"];if(isArray(r)){s=true;l=["[","]"]}if(isFunction(r)){var p=r.name?": "+r.name:"";f=" [Function"+p+"]"}if(isRegExp(r)){f=" "+RegExp.prototype.toString.call(r)}if(isDate(r)){f=" "+Date.prototype.toUTCString.call(r)}if(isError(r)){f=" "+formatError(r)}if(a.length===0&&(!s||r.length==0)){return l[0]+f+l[1]}if(n<0){if(isRegExp(r)){return e.stylize(RegExp.prototype.toString.call(r),"regexp")}else{return e.stylize("[Object]","special")}}e.seen.push(r);var y;if(s){y=formatArray(e,r,n,c,a)}else{y=a.map((function(t){return formatProperty(e,r,n,c,t,s)}))}e.seen.pop();return reduceToSingleString(y,f,l)}function formatPrimitive(e,t){if(isUndefined(t))return e.stylize("undefined","undefined");if(isString(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(isNumber(t))return e.stylize(""+t,"number");if(isBoolean(t))return e.stylize(""+t,"boolean");if(isNull(t))return e.stylize("null","null")}function formatError(e){return"["+Error.prototype.toString.call(e)+"]"}function formatArray(e,t,r,n,o){var i=[];for(var a=0,c=t.length;a-1){if(i){c=c.split("\n").map((function(e){return" "+e})).join("\n").substr(2)}else{c="\n"+c.split("\n").map((function(e){return" "+e})).join("\n")}}}else{c=e.stylize("[Circular]","special")}}if(isUndefined(a)){if(i&&o.match(/^\d+$/)){return c}a=JSON.stringify(""+o);if(a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){a=a.substr(1,a.length-2);a=e.stylize(a,"name")}else{a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");a=e.stylize(a,"string")}}return a+": "+c}function reduceToSingleString(e,t,r){var n=0;var o=e.reduce((function(e,t){n++;if(t.indexOf("\n")>=0)n++;return e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(o>60){return r[0]+(t===""?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]}return r[0]+t+" "+e.join(", ")+" "+r[1]}t.types=r(584);function isArray(e){return Array.isArray(e)}t.isArray=isArray;function isBoolean(e){return typeof e==="boolean"}t.isBoolean=isBoolean;function isNull(e){return e===null}t.isNull=isNull;function isNullOrUndefined(e){return e==null}t.isNullOrUndefined=isNullOrUndefined;function isNumber(e){return typeof e==="number"}t.isNumber=isNumber;function isString(e){return typeof e==="string"}t.isString=isString;function isSymbol(e){return typeof e==="symbol"}t.isSymbol=isSymbol;function isUndefined(e){return e===void 0}t.isUndefined=isUndefined;function isRegExp(e){return isObject(e)&&objectToString(e)==="[object RegExp]"}t.isRegExp=isRegExp;t.types.isRegExp=isRegExp;function isObject(e){return typeof e==="object"&&e!==null}t.isObject=isObject;function isDate(e){return isObject(e)&&objectToString(e)==="[object Date]"}t.isDate=isDate;t.types.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}t.isError=isError;t.types.isNativeError=isError;function isFunction(e){return typeof e==="function"}t.isFunction=isFunction;function isPrimitive(e){return e===null||typeof e==="boolean"||typeof e==="number"||typeof e==="string"||typeof e==="symbol"||typeof e==="undefined"}t.isPrimitive=isPrimitive;t.isBuffer=r(369);function objectToString(e){return Object.prototype.toString.call(e)}function pad(e){return e<10?"0"+e.toString(10):e.toString(10)}var u=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var e=new Date;var t=[pad(e.getHours()),pad(e.getMinutes()),pad(e.getSeconds())].join(":");return[e.getDate(),u[e.getMonth()],t].join(" ")}t.log=function(){console.log("%s - %s",timestamp(),t.format.apply(t,arguments))};t.inherits=r(782);t._extend=function(e,t){if(!t||!isObject(t))return e;var r=Object.keys(t);var n=r.length;while(n--){e[r[n]]=t[r[n]]}return e};function hasOwnProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var f=typeof Symbol!=="undefined"?Symbol("util.promisify.custom"):undefined;t.promisify=function promisify(e){if(typeof e!=="function")throw new TypeError('The "original" argument must be of type Function');if(f&&e[f]){var t=e[f];if(typeof t!=="function"){throw new TypeError('The "util.promisify.custom" argument must be of type Function')}Object.defineProperty(t,f,{value:t,enumerable:false,writable:false,configurable:true});return t}function t(){var t,r;var n=new Promise((function(e,n){t=e;r=n}));var o=[];for(var i=0;i-1){return o(r)}return r}},139:function(e,t,r){"use strict";var n=r(212);var o=r(925);var i=o("%Function.prototype.apply%");var a=o("%Function.prototype.call%");var c=o("%Reflect.apply%",true)||n.call(a,i);var u=o("%Object.getOwnPropertyDescriptor%",true);var f=o("%Object.defineProperty%",true);var s=o("%Math.max%");if(f){try{f({},"a",{value:1})}catch(e){f=null}}e.exports=function callBind(e){var t=c(n,a,arguments);if(u&&f){var r=u(t,"length");if(r.configurable){f(t,"length",{value:1+s(0,e.length-(arguments.length-1))})}}return t};var l=function applyBind(){return c(n,i,arguments)};if(f){f(e.exports,"apply",{value:l})}else{e.exports.apply=l}},69:function(e,t,r){"use strict";var n=r(935);var o=typeof Symbol==="function"&&typeof Symbol("foo")==="symbol";var i=Object.prototype.toString;var a=Array.prototype.concat;var c=Object.defineProperty;var isFunction=function(e){return typeof e==="function"&&i.call(e)==="[object Function]"};var arePropertyDescriptorsSupported=function(){var e={};try{c(e,"x",{enumerable:false,value:e});for(var t in e){return false}return e.x===e}catch(e){return false}};var u=c&&arePropertyDescriptorsSupported();var defineProperty=function(e,t,r,n){if(t in e&&(!isFunction(n)||!n())){return}if(u){c(e,t,{configurable:true,enumerable:false,value:r,writable:true})}else{e[t]=r}};var defineProperties=function(e,t){var r=arguments.length>2?arguments[2]:{};var i=n(t);if(o){i=a.call(i,Object.getOwnPropertySymbols(t))}for(var c=0;c1&&typeof t!=="boolean"){throw new a('"allowMissing" argument must be a boolean')}if(A(/^%?[^%]*%?$/,e)===null){throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name")}var r=P(e);var i=r.length>0?r[0]:"";var u=x("%"+i+"%",t);var f=u.name;var s=u.value;var l=false;var p=u.alias;if(p){i=p[0];E(r,S([0,1],p))}for(var y=1,v=true;y=r.length){var O=c(s,d);v=!!O;if(v&&"get"in O&&!("originalValue"in O.get)){s=O.get}else{s=s[d]}}else{v=m(s,d);s=s[d]}if(v&&!l){g[f]=s}}}return s}},504:function(e){"use strict";var t={foo:{}};var r=Object;e.exports=function hasProto(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},942:function(e,t,r){"use strict";var n=typeof Symbol!=="undefined"&&Symbol;var o=r(773);e.exports=function hasNativeSymbols(){if(typeof n!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof n("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return o()}},773:function(e){"use strict";e.exports=function hasSymbols(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var e={};var t=Symbol("test");var r=Object(t);if(typeof t==="string"){return false}if(Object.prototype.toString.call(t)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(r)!=="[object Symbol]"){return false}var n=42;e[t]=n;for(t in e){return false}if(typeof Object.keys==="function"&&Object.keys(e).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(e).length!==0){return false}var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t){return false}if(!Object.prototype.propertyIsEnumerable.call(e,t)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var i=Object.getOwnPropertyDescriptor(e,t);if(i.value!==n||i.enumerable!==true){return false}}return true}},115:function(e,t,r){"use strict";var n=typeof Symbol!=="undefined"&&Symbol;var o=r(832);e.exports=function hasNativeSymbols(){if(typeof n!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof n("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return o()}},832:function(e){"use strict";e.exports=function hasSymbols(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var e={};var t=Symbol("test");var r=Object(t);if(typeof t==="string"){return false}if(Object.prototype.toString.call(t)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(r)!=="[object Symbol]"){return false}var n=42;e[t]=n;for(t in e){return false}if(typeof Object.keys==="function"&&Object.keys(e).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(e).length!==0){return false}var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t){return false}if(!Object.prototype.propertyIsEnumerable.call(e,t)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var i=Object.getOwnPropertyDescriptor(e,t);if(i.value!==n||i.enumerable!==true){return false}}return true}},101:function(e,t,r){"use strict";var n=r(174);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},782:function(e){if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype;e.prototype=new TempCtor;e.prototype.constructor=e}}}},157:function(e){"use strict";var t=typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol";var r=Object.prototype.toString;var n=function isArguments(e){if(t&&e&&typeof e==="object"&&Symbol.toStringTag in e){return false}return r.call(e)==="[object Arguments]"};var o=function isArguments(e){if(n(e)){return true}return e!==null&&typeof e==="object"&&typeof e.length==="number"&&e.length>=0&&r.call(e)!=="[object Array]"&&r.call(e.callee)==="[object Function]"};var i=function(){return n(arguments)}();n.isLegacyArguments=o;e.exports=i?n:o},391:function(e){"use strict";var t=Object.prototype.toString;var r=Function.prototype.toString;var n=/^\s*(?:function)?\*/;var o=typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol";var i=Object.getPrototypeOf;var getGeneratorFunc=function(){if(!o){return false}try{return Function("return function*() {}")()}catch(e){}};var a=getGeneratorFunc();var c=a?i(a):{};e.exports=function isGeneratorFunction(e){if(typeof e!=="function"){return false}if(n.test(r.call(e))){return true}if(!o){var a=t.call(e);return a==="[object GeneratorFunction]"}return i(e)===c}},460:function(e){"use strict";e.exports=function isNaN(e){return e!==e}},718:function(e,t,r){"use strict";var n=r(139);var o=r(69);var i=r(460);var a=r(625);var c=r(171);var u=n(a(),Number);o(u,{getPolyfill:a,implementation:i,shim:c});e.exports=u},625:function(e,t,r){"use strict";var n=r(460);e.exports=function getPolyfill(){if(Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")){return Number.isNaN}return n}},171:function(e,t,r){"use strict";var n=r(69);var o=r(625);e.exports=function shimNumberIsNaN(){var e=o();n(Number,{isNaN:e},{isNaN:function testIsNaN(){return Number.isNaN!==e}});return e}},994:function(e,t,r){"use strict";var n=r(144);var o=r(349);var i=r(256);var a=i("Object.prototype.toString");var c=r(942)();var u=c&&typeof Symbol.toStringTag==="symbol";var f=o();var s=i("Array.prototype.indexOf",true)||function indexOf(e,t){for(var r=0;r-1}if(!y){return false}return v(e)}},208:function(e){"use strict";var numberIsNaN=function(e){return e!==e};e.exports=function is(e,t){if(e===0&&t===0){return 1/e===1/t}if(e===t){return true}if(numberIsNaN(e)&&numberIsNaN(t)){return true}return false}},579:function(e,t,r){"use strict";var n;if(!Object.keys){var o=Object.prototype.hasOwnProperty;var i=Object.prototype.toString;var a=r(412);var c=Object.prototype.propertyIsEnumerable;var u=!c.call({toString:null},"toString");var f=c.call((function(){}),"prototype");var s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];var equalsConstructorPrototype=function(e){var t=e.constructor;return t&&t.prototype===e};var l={$applicationCache:true,$console:true,$external:true,$frame:true,$frameElement:true,$frames:true,$innerHeight:true,$innerWidth:true,$onmozfullscreenchange:true,$onmozfullscreenerror:true,$outerHeight:true,$outerWidth:true,$pageXOffset:true,$pageYOffset:true,$parent:true,$scrollLeft:true,$scrollTop:true,$scrollX:true,$scrollY:true,$self:true,$webkitIndexedDB:true,$webkitStorageInfo:true,$window:true};var p=function(){if(typeof window==="undefined"){return false}for(var e in window){try{if(!l["$"+e]&&o.call(window,e)&&window[e]!==null&&typeof window[e]==="object"){try{equalsConstructorPrototype(window[e])}catch(e){return true}}}catch(e){return true}}return false}();var equalsConstructorPrototypeIfNotBuggy=function(e){if(typeof window==="undefined"||!p){return equalsConstructorPrototype(e)}try{return equalsConstructorPrototype(e)}catch(e){return false}};n=function keys(e){var t=e!==null&&typeof e==="object";var r=i.call(e)==="[object Function]";var n=a(e);var c=t&&i.call(e)==="[object String]";var l=[];if(!t&&!r&&!n){throw new TypeError("Object.keys called on a non-object")}var p=f&&r;if(c&&e.length>0&&!o.call(e,0)){for(var y=0;y0){for(var g=0;g=0&&t.call(e.callee)==="[object Function]"}return n}},369:function(e){e.exports=function isBuffer(e){return e instanceof Buffer}},584:function(e,t,r){"use strict";var n=r(157);var o=r(391);var i=r(490);var a=r(994);function uncurryThis(e){return e.call.bind(e)}var c=typeof BigInt!=="undefined";var u=typeof Symbol!=="undefined";var f=uncurryThis(Object.prototype.toString);var s=uncurryThis(Number.prototype.valueOf);var l=uncurryThis(String.prototype.valueOf);var p=uncurryThis(Boolean.prototype.valueOf);if(c){var y=uncurryThis(BigInt.prototype.valueOf)}if(u){var g=uncurryThis(Symbol.prototype.valueOf)}function checkBoxedPrimitive(e,t){if(typeof e!=="object"){return false}try{t(e);return true}catch(e){return false}}t.isArgumentsObject=n;t.isGeneratorFunction=o;t.isTypedArray=a;function isPromise(e){return typeof Promise!=="undefined"&&e instanceof Promise||e!==null&&typeof e==="object"&&typeof e.then==="function"&&typeof e.catch==="function"}t.isPromise=isPromise;function isArrayBufferView(e){if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){return ArrayBuffer.isView(e)}return a(e)||isDataView(e)}t.isArrayBufferView=isArrayBufferView;function isUint8Array(e){return i(e)==="Uint8Array"}t.isUint8Array=isUint8Array;function isUint8ClampedArray(e){return i(e)==="Uint8ClampedArray"}t.isUint8ClampedArray=isUint8ClampedArray;function isUint16Array(e){return i(e)==="Uint16Array"}t.isUint16Array=isUint16Array;function isUint32Array(e){return i(e)==="Uint32Array"}t.isUint32Array=isUint32Array;function isInt8Array(e){return i(e)==="Int8Array"}t.isInt8Array=isInt8Array;function isInt16Array(e){return i(e)==="Int16Array"}t.isInt16Array=isInt16Array;function isInt32Array(e){return i(e)==="Int32Array"}t.isInt32Array=isInt32Array;function isFloat32Array(e){return i(e)==="Float32Array"}t.isFloat32Array=isFloat32Array;function isFloat64Array(e){return i(e)==="Float64Array"}t.isFloat64Array=isFloat64Array;function isBigInt64Array(e){return i(e)==="BigInt64Array"}t.isBigInt64Array=isBigInt64Array;function isBigUint64Array(e){return i(e)==="BigUint64Array"}t.isBigUint64Array=isBigUint64Array;function isMapToString(e){return f(e)==="[object Map]"}isMapToString.working=typeof Map!=="undefined"&&isMapToString(new Map);function isMap(e){if(typeof Map==="undefined"){return false}return isMapToString.working?isMapToString(e):e instanceof Map}t.isMap=isMap;function isSetToString(e){return f(e)==="[object Set]"}isSetToString.working=typeof Set!=="undefined"&&isSetToString(new Set);function isSet(e){if(typeof Set==="undefined"){return false}return isSetToString.working?isSetToString(e):e instanceof Set}t.isSet=isSet;function isWeakMapToString(e){return f(e)==="[object WeakMap]"}isWeakMapToString.working=typeof WeakMap!=="undefined"&&isWeakMapToString(new WeakMap);function isWeakMap(e){if(typeof WeakMap==="undefined"){return false}return isWeakMapToString.working?isWeakMapToString(e):e instanceof WeakMap}t.isWeakMap=isWeakMap;function isWeakSetToString(e){return f(e)==="[object WeakSet]"}isWeakSetToString.working=typeof WeakSet!=="undefined"&&isWeakSetToString(new WeakSet);function isWeakSet(e){return isWeakSetToString(e)}t.isWeakSet=isWeakSet;function isArrayBufferToString(e){return f(e)==="[object ArrayBuffer]"}isArrayBufferToString.working=typeof ArrayBuffer!=="undefined"&&isArrayBufferToString(new ArrayBuffer);function isArrayBuffer(e){if(typeof ArrayBuffer==="undefined"){return false}return isArrayBufferToString.working?isArrayBufferToString(e):e instanceof ArrayBuffer}t.isArrayBuffer=isArrayBuffer;function isDataViewToString(e){return f(e)==="[object DataView]"}isDataViewToString.working=typeof ArrayBuffer!=="undefined"&&typeof DataView!=="undefined"&&isDataViewToString(new DataView(new ArrayBuffer(1),0,1));function isDataView(e){if(typeof DataView==="undefined"){return false}return isDataViewToString.working?isDataViewToString(e):e instanceof DataView}t.isDataView=isDataView;var v=typeof SharedArrayBuffer!=="undefined"?SharedArrayBuffer:undefined;function isSharedArrayBufferToString(e){return f(e)==="[object SharedArrayBuffer]"}function isSharedArrayBuffer(e){if(typeof v==="undefined"){return false}if(typeof isSharedArrayBufferToString.working==="undefined"){isSharedArrayBufferToString.working=isSharedArrayBufferToString(new v)}return isSharedArrayBufferToString.working?isSharedArrayBufferToString(e):e instanceof v}t.isSharedArrayBuffer=isSharedArrayBuffer;function isAsyncFunction(e){return f(e)==="[object AsyncFunction]"}t.isAsyncFunction=isAsyncFunction;function isMapIterator(e){return f(e)==="[object Map Iterator]"}t.isMapIterator=isMapIterator;function isSetIterator(e){return f(e)==="[object Set Iterator]"}t.isSetIterator=isSetIterator;function isGeneratorObject(e){return f(e)==="[object Generator]"}t.isGeneratorObject=isGeneratorObject;function isWebAssemblyCompiledModule(e){return f(e)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=isWebAssemblyCompiledModule;function isNumberObject(e){return checkBoxedPrimitive(e,s)}t.isNumberObject=isNumberObject;function isStringObject(e){return checkBoxedPrimitive(e,l)}t.isStringObject=isStringObject;function isBooleanObject(e){return checkBoxedPrimitive(e,p)}t.isBooleanObject=isBooleanObject;function isBigIntObject(e){return c&&checkBoxedPrimitive(e,y)}t.isBigIntObject=isBigIntObject;function isSymbolObject(e){return u&&checkBoxedPrimitive(e,g)}t.isSymbolObject=isSymbolObject;function isBoxedPrimitive(e){return isNumberObject(e)||isStringObject(e)||isBooleanObject(e)||isBigIntObject(e)||isSymbolObject(e)}t.isBoxedPrimitive=isBoxedPrimitive;function isAnyArrayBuffer(e){return typeof Uint8Array!=="undefined"&&(isArrayBuffer(e)||isSharedArrayBuffer(e))}t.isAnyArrayBuffer=isAnyArrayBuffer;["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:false,value:function(){throw new Error(e+" is not supported in userland")}})}))},177:function(e,t,r){var n=Object.getOwnPropertyDescriptors||function getOwnPropertyDescriptors(e){var t=Object.keys(e);var r={};for(var n=0;n=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}));for(var c=n[r];r=3)n.depth=arguments[2];if(arguments.length>=4)n.colors=arguments[3];if(isBoolean(r)){n.showHidden=r}else if(r){t._extend(n,r)}if(isUndefined(n.showHidden))n.showHidden=false;if(isUndefined(n.depth))n.depth=2;if(isUndefined(n.colors))n.colors=false;if(isUndefined(n.customInspect))n.customInspect=true;if(n.colors)n.stylize=stylizeWithColor;return formatValue(n,e,n.depth)}t.inspect=inspect;inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(e,t){var r=inspect.styles[t];if(r){return"["+inspect.colors[r][0]+"m"+e+"["+inspect.colors[r][1]+"m"}else{return e}}function stylizeNoColor(e,t){return e}function arrayToHash(e){var t={};e.forEach((function(e,r){t[e]=true}));return t}function formatValue(e,r,n){if(e.customInspect&&r&&isFunction(r.inspect)&&r.inspect!==t.inspect&&!(r.constructor&&r.constructor.prototype===r)){var o=r.inspect(n,e);if(!isString(o)){o=formatValue(e,o,n)}return o}var i=formatPrimitive(e,r);if(i){return i}var a=Object.keys(r);var c=arrayToHash(a);if(e.showHidden){a=Object.getOwnPropertyNames(r)}if(isError(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0)){return formatError(r)}if(a.length===0){if(isFunction(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(isRegExp(r)){return e.stylize(RegExp.prototype.toString.call(r),"regexp")}if(isDate(r)){return e.stylize(Date.prototype.toString.call(r),"date")}if(isError(r)){return formatError(r)}}var f="",s=false,l=["{","}"];if(isArray(r)){s=true;l=["[","]"]}if(isFunction(r)){var p=r.name?": "+r.name:"";f=" [Function"+p+"]"}if(isRegExp(r)){f=" "+RegExp.prototype.toString.call(r)}if(isDate(r)){f=" "+Date.prototype.toUTCString.call(r)}if(isError(r)){f=" "+formatError(r)}if(a.length===0&&(!s||r.length==0)){return l[0]+f+l[1]}if(n<0){if(isRegExp(r)){return e.stylize(RegExp.prototype.toString.call(r),"regexp")}else{return e.stylize("[Object]","special")}}e.seen.push(r);var y;if(s){y=formatArray(e,r,n,c,a)}else{y=a.map((function(t){return formatProperty(e,r,n,c,t,s)}))}e.seen.pop();return reduceToSingleString(y,f,l)}function formatPrimitive(e,t){if(isUndefined(t))return e.stylize("undefined","undefined");if(isString(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(isNumber(t))return e.stylize(""+t,"number");if(isBoolean(t))return e.stylize(""+t,"boolean");if(isNull(t))return e.stylize("null","null")}function formatError(e){return"["+Error.prototype.toString.call(e)+"]"}function formatArray(e,t,r,n,o){var i=[];for(var a=0,c=t.length;a-1){if(i){c=c.split("\n").map((function(e){return" "+e})).join("\n").substr(2)}else{c="\n"+c.split("\n").map((function(e){return" "+e})).join("\n")}}}else{c=e.stylize("[Circular]","special")}}if(isUndefined(a)){if(i&&o.match(/^\d+$/)){return c}a=JSON.stringify(""+o);if(a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){a=a.substr(1,a.length-2);a=e.stylize(a,"name")}else{a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");a=e.stylize(a,"string")}}return a+": "+c}function reduceToSingleString(e,t,r){var n=0;var o=e.reduce((function(e,t){n++;if(t.indexOf("\n")>=0)n++;return e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(o>60){return r[0]+(t===""?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]}return r[0]+t+" "+e.join(", ")+" "+r[1]}t.types=r(584);function isArray(e){return Array.isArray(e)}t.isArray=isArray;function isBoolean(e){return typeof e==="boolean"}t.isBoolean=isBoolean;function isNull(e){return e===null}t.isNull=isNull;function isNullOrUndefined(e){return e==null}t.isNullOrUndefined=isNullOrUndefined;function isNumber(e){return typeof e==="number"}t.isNumber=isNumber;function isString(e){return typeof e==="string"}t.isString=isString;function isSymbol(e){return typeof e==="symbol"}t.isSymbol=isSymbol;function isUndefined(e){return e===void 0}t.isUndefined=isUndefined;function isRegExp(e){return isObject(e)&&objectToString(e)==="[object RegExp]"}t.isRegExp=isRegExp;t.types.isRegExp=isRegExp;function isObject(e){return typeof e==="object"&&e!==null}t.isObject=isObject;function isDate(e){return isObject(e)&&objectToString(e)==="[object Date]"}t.isDate=isDate;t.types.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}t.isError=isError;t.types.isNativeError=isError;function isFunction(e){return typeof e==="function"}t.isFunction=isFunction;function isPrimitive(e){return e===null||typeof e==="boolean"||typeof e==="number"||typeof e==="string"||typeof e==="symbol"||typeof e==="undefined"}t.isPrimitive=isPrimitive;t.isBuffer=r(369);function objectToString(e){return Object.prototype.toString.call(e)}function pad(e){return e<10?"0"+e.toString(10):e.toString(10)}var u=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var e=new Date;var t=[pad(e.getHours()),pad(e.getMinutes()),pad(e.getSeconds())].join(":");return[e.getDate(),u[e.getMonth()],t].join(" ")}t.log=function(){console.log("%s - %s",timestamp(),t.format.apply(t,arguments))};t.inherits=r(782);t._extend=function(e,t){if(!t||!isObject(t))return e;var r=Object.keys(t);var n=r.length;while(n--){e[r[n]]=t[r[n]]}return e};function hasOwnProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var f=typeof Symbol!=="undefined"?Symbol("util.promisify.custom"):undefined;t.promisify=function promisify(e){if(typeof e!=="function")throw new TypeError('The "original" argument must be of type Function');if(f&&e[f]){var t=e[f];if(typeof t!=="function"){throw new TypeError('The "util.promisify.custom" argument must be of type Function')}Object.defineProperty(t,f,{value:t,enumerable:false,writable:false,configurable:true});return t}function t(){var t,r;var n=new Promise((function(e,n){t=e;r=n}));var o=[];for(var i=0;i-1){return n(t)}return t}},139:function(r,e,t){"use strict";var o=t(174);var n=t(925);var i=n("%Function.prototype.apply%");var a=n("%Function.prototype.call%");var y=n("%Reflect.apply%",true)||o.call(a,i);var f=n("%Object.getOwnPropertyDescriptor%",true);var p=n("%Object.defineProperty%",true);var u=n("%Math.max%");if(p){try{p({},"a",{value:1})}catch(r){p=null}}r.exports=function callBind(r){var e=y(o,a,arguments);if(f&&p){var t=f(e,"length");if(t.configurable){p(e,"length",{value:1+u(0,r.length-(arguments.length-1))})}}return e};var s=function applyBind(){return y(o,i,arguments)};if(p){p(r.exports,"apply",{value:s})}else{r.exports.apply=s}},144:function(r){var e=Object.prototype.hasOwnProperty;var t=Object.prototype.toString;r.exports=function forEach(r,o,n){if(t.call(o)!=="[object Function]"){throw new TypeError("iterator must be a function")}var i=r.length;if(i===+i){for(var a=0;a1&&typeof e!=="boolean"){throw new a('"allowMissing" argument must be a boolean')}if(P(/^%?[^%]*%?$/g,r)===null){throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name")}var t=j(r);var i=t.length>0?t[0]:"";var f=E("%"+i+"%",e);var p=f.name;var u=f.value;var s=false;var c=f.alias;if(c){i=c[0];m(t,A([0,1],c))}for(var d=1,g=true;d=t.length){var w=y(u,v);g=!!w;if(g&&"get"in w&&!("originalValue"in w.get)){u=w.get}else{u=u[v]}}else{g=b(u,v);u=u[v]}if(g&&!s){l[p]=u}}}return u}},925:function(r,e,t){"use strict";var o;var n=SyntaxError;var i=Function;var a=TypeError;var getEvalledConstructor=function(r){try{return i('"use strict"; return ('+r+").constructor;")()}catch(r){}};var y=Object.getOwnPropertyDescriptor;if(y){try{y({},"")}catch(r){y=null}}var throwTypeError=function(){throw new a};var f=y?function(){try{arguments.callee;return throwTypeError}catch(r){try{return y(arguments,"callee").get}catch(r){return throwTypeError}}}():throwTypeError;var p=t(115)();var u=t(504)();var s=Object.getPrototypeOf||(u?function(r){return r.__proto__}:null);var c={};var l=typeof Uint8Array==="undefined"||!s?o:s(Uint8Array);var d={"%AggregateError%":typeof AggregateError==="undefined"?o:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?o:ArrayBuffer,"%ArrayIteratorPrototype%":p&&s?s([][Symbol.iterator]()):o,"%AsyncFromSyncIteratorPrototype%":o,"%AsyncFunction%":c,"%AsyncGenerator%":c,"%AsyncGeneratorFunction%":c,"%AsyncIteratorPrototype%":c,"%Atomics%":typeof Atomics==="undefined"?o:Atomics,"%BigInt%":typeof BigInt==="undefined"?o:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?o:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?o:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?o:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array==="undefined"?o:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?o:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?o:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":c,"%Int8Array%":typeof Int8Array==="undefined"?o:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?o:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?o:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p&&s?s(s([][Symbol.iterator]())):o,"%JSON%":typeof JSON==="object"?JSON:o,"%Map%":typeof Map==="undefined"?o:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!p||!s?o:s((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?o:Promise,"%Proxy%":typeof Proxy==="undefined"?o:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect==="undefined"?o:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?o:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!p||!s?o:s((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?o:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p&&s?s(""[Symbol.iterator]()):o,"%Symbol%":p?Symbol:o,"%SyntaxError%":n,"%ThrowTypeError%":f,"%TypedArray%":l,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array==="undefined"?o:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?o:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?o:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?o:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap==="undefined"?o:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?o:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?o:WeakSet};if(s){try{null.error}catch(r){var g=s(s(r));d["%Error.prototype%"]=g}}var v=function doEval(r){var e;if(r==="%AsyncFunction%"){e=getEvalledConstructor("async function () {}")}else if(r==="%GeneratorFunction%"){e=getEvalledConstructor("function* () {}")}else if(r==="%AsyncGeneratorFunction%"){e=getEvalledConstructor("async function* () {}")}else if(r==="%AsyncGenerator%"){var t=doEval("%AsyncGeneratorFunction%");if(t){e=t.prototype}}else if(r==="%AsyncIteratorPrototype%"){var o=doEval("%AsyncGenerator%");if(o&&s){e=s(o.prototype)}}d[r]=e;return e};var b={"%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"]};var A=t(174);var m=t(101);var S=A.call(Function.call,Array.prototype.concat);var h=A.call(Function.apply,Array.prototype.splice);var P=A.call(Function.call,String.prototype.replace);var O=A.call(Function.call,String.prototype.slice);var w=A.call(Function.call,RegExp.prototype.exec);var j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;var E=/\\(\\)?/g;var I=function stringToPath(r){var e=O(r,0,1);var t=O(r,-1);if(e==="%"&&t!=="%"){throw new n("invalid intrinsic syntax, expected closing `%`")}else if(t==="%"&&e!=="%"){throw new n("invalid intrinsic syntax, expected opening `%`")}var o=[];P(r,j,(function(r,e,t,n){o[o.length]=t?P(n,E,"$1"):e||r}));return o};var B=function getBaseIntrinsic(r,e){var t=r;var o;if(m(b,t)){o=b[t];t="%"+o[0]+"%"}if(m(d,t)){var i=d[t];if(i===c){i=v(t)}if(typeof i==="undefined"&&!e){throw new a("intrinsic "+r+" exists, but is not available. Please file an issue!")}return{alias:o,name:t,value:i}}throw new n("intrinsic "+r+" does not exist!")};r.exports=function GetIntrinsic(r,e){if(typeof r!=="string"||r.length===0){throw new a("intrinsic name must be a non-empty string")}if(arguments.length>1&&typeof e!=="boolean"){throw new a('"allowMissing" argument must be a boolean')}if(w(/^%?[^%]*%?$/,r)===null){throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name")}var t=I(r);var i=t.length>0?t[0]:"";var f=B("%"+i+"%",e);var p=f.name;var u=f.value;var s=false;var c=f.alias;if(c){i=c[0];h(t,S([0,1],c))}for(var l=1,g=true;l=t.length){var P=y(u,v);g=!!P;if(g&&"get"in P&&!("originalValue"in P.get)){u=P.get}else{u=u[v]}}else{g=m(u,v);u=u[v]}if(g&&!s){d[p]=u}}}return u}},504:function(r){"use strict";var e={foo:{}};var t=Object;r.exports=function hasProto(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof t)}},942:function(r,e,t){"use strict";var o=typeof Symbol!=="undefined"&&Symbol;var n=t(773);r.exports=function hasNativeSymbols(){if(typeof o!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof o("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return n()}},773:function(r){"use strict";r.exports=function hasSymbols(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var r={};var e=Symbol("test");var t=Object(e);if(typeof e==="string"){return false}if(Object.prototype.toString.call(e)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(t)!=="[object Symbol]"){return false}var o=42;r[e]=o;for(e in r){return false}if(typeof Object.keys==="function"&&Object.keys(r).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(r).length!==0){return false}var n=Object.getOwnPropertySymbols(r);if(n.length!==1||n[0]!==e){return false}if(!Object.prototype.propertyIsEnumerable.call(r,e)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var i=Object.getOwnPropertyDescriptor(r,e);if(i.value!==o||i.enumerable!==true){return false}}return true}},115:function(r,e,t){"use strict";var o=typeof Symbol!=="undefined"&&Symbol;var n=t(832);r.exports=function hasNativeSymbols(){if(typeof o!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof o("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return n()}},832:function(r){"use strict";r.exports=function hasSymbols(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var r={};var e=Symbol("test");var t=Object(e);if(typeof e==="string"){return false}if(Object.prototype.toString.call(e)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(t)!=="[object Symbol]"){return false}var o=42;r[e]=o;for(e in r){return false}if(typeof Object.keys==="function"&&Object.keys(r).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(r).length!==0){return false}var n=Object.getOwnPropertySymbols(r);if(n.length!==1||n[0]!==e){return false}if(!Object.prototype.propertyIsEnumerable.call(r,e)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var i=Object.getOwnPropertyDescriptor(r,e);if(i.value!==o||i.enumerable!==true){return false}}return true}},101:function(r,e,t){"use strict";var o=t(174);r.exports=o.call(Function.call,Object.prototype.hasOwnProperty)},782:function(r){if(typeof Object.create==="function"){r.exports=function inherits(r,e){if(e){r.super_=e;r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:false,writable:true,configurable:true}})}}}else{r.exports=function inherits(r,e){if(e){r.super_=e;var TempCtor=function(){};TempCtor.prototype=e.prototype;r.prototype=new TempCtor;r.prototype.constructor=r}}}},157:function(r){"use strict";var e=typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol";var t=Object.prototype.toString;var o=function isArguments(r){if(e&&r&&typeof r==="object"&&Symbol.toStringTag in r){return false}return t.call(r)==="[object Arguments]"};var n=function isArguments(r){if(o(r)){return true}return r!==null&&typeof r==="object"&&typeof r.length==="number"&&r.length>=0&&t.call(r)!=="[object Array]"&&t.call(r.callee)==="[object Function]"};var i=function(){return o(arguments)}();o.isLegacyArguments=n;r.exports=i?o:n},391:function(r){"use strict";var e=Object.prototype.toString;var t=Function.prototype.toString;var o=/^\s*(?:function)?\*/;var n=typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol";var i=Object.getPrototypeOf;var getGeneratorFunc=function(){if(!n){return false}try{return Function("return function*() {}")()}catch(r){}};var a=getGeneratorFunc();var y=a?i(a):{};r.exports=function isGeneratorFunction(r){if(typeof r!=="function"){return false}if(o.test(t.call(r))){return true}if(!n){var a=e.call(r);return a==="[object GeneratorFunction]"}return i(r)===y}},994:function(r,e,t){"use strict";var o=t(144);var n=t(349);var i=t(256);var a=i("Object.prototype.toString");var y=t(942)();var f=y&&typeof Symbol.toStringTag==="symbol";var p=n();var u=i("Array.prototype.indexOf",true)||function indexOf(r,e){for(var t=0;t-1}if(!l){return false}return g(r)}},369:function(r){r.exports=function isBuffer(r){return r instanceof Buffer}},584:function(r,e,t){"use strict";var o=t(157);var n=t(391);var i=t(490);var a=t(994);function uncurryThis(r){return r.call.bind(r)}var y=typeof BigInt!=="undefined";var f=typeof Symbol!=="undefined";var p=uncurryThis(Object.prototype.toString);var u=uncurryThis(Number.prototype.valueOf);var s=uncurryThis(String.prototype.valueOf);var c=uncurryThis(Boolean.prototype.valueOf);if(y){var l=uncurryThis(BigInt.prototype.valueOf)}if(f){var d=uncurryThis(Symbol.prototype.valueOf)}function checkBoxedPrimitive(r,e){if(typeof r!=="object"){return false}try{e(r);return true}catch(r){return false}}e.isArgumentsObject=o;e.isGeneratorFunction=n;e.isTypedArray=a;function isPromise(r){return typeof Promise!=="undefined"&&r instanceof Promise||r!==null&&typeof r==="object"&&typeof r.then==="function"&&typeof r.catch==="function"}e.isPromise=isPromise;function isArrayBufferView(r){if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){return ArrayBuffer.isView(r)}return a(r)||isDataView(r)}e.isArrayBufferView=isArrayBufferView;function isUint8Array(r){return i(r)==="Uint8Array"}e.isUint8Array=isUint8Array;function isUint8ClampedArray(r){return i(r)==="Uint8ClampedArray"}e.isUint8ClampedArray=isUint8ClampedArray;function isUint16Array(r){return i(r)==="Uint16Array"}e.isUint16Array=isUint16Array;function isUint32Array(r){return i(r)==="Uint32Array"}e.isUint32Array=isUint32Array;function isInt8Array(r){return i(r)==="Int8Array"}e.isInt8Array=isInt8Array;function isInt16Array(r){return i(r)==="Int16Array"}e.isInt16Array=isInt16Array;function isInt32Array(r){return i(r)==="Int32Array"}e.isInt32Array=isInt32Array;function isFloat32Array(r){return i(r)==="Float32Array"}e.isFloat32Array=isFloat32Array;function isFloat64Array(r){return i(r)==="Float64Array"}e.isFloat64Array=isFloat64Array;function isBigInt64Array(r){return i(r)==="BigInt64Array"}e.isBigInt64Array=isBigInt64Array;function isBigUint64Array(r){return i(r)==="BigUint64Array"}e.isBigUint64Array=isBigUint64Array;function isMapToString(r){return p(r)==="[object Map]"}isMapToString.working=typeof Map!=="undefined"&&isMapToString(new Map);function isMap(r){if(typeof Map==="undefined"){return false}return isMapToString.working?isMapToString(r):r instanceof Map}e.isMap=isMap;function isSetToString(r){return p(r)==="[object Set]"}isSetToString.working=typeof Set!=="undefined"&&isSetToString(new Set);function isSet(r){if(typeof Set==="undefined"){return false}return isSetToString.working?isSetToString(r):r instanceof Set}e.isSet=isSet;function isWeakMapToString(r){return p(r)==="[object WeakMap]"}isWeakMapToString.working=typeof WeakMap!=="undefined"&&isWeakMapToString(new WeakMap);function isWeakMap(r){if(typeof WeakMap==="undefined"){return false}return isWeakMapToString.working?isWeakMapToString(r):r instanceof WeakMap}e.isWeakMap=isWeakMap;function isWeakSetToString(r){return p(r)==="[object WeakSet]"}isWeakSetToString.working=typeof WeakSet!=="undefined"&&isWeakSetToString(new WeakSet);function isWeakSet(r){return isWeakSetToString(r)}e.isWeakSet=isWeakSet;function isArrayBufferToString(r){return p(r)==="[object ArrayBuffer]"}isArrayBufferToString.working=typeof ArrayBuffer!=="undefined"&&isArrayBufferToString(new ArrayBuffer);function isArrayBuffer(r){if(typeof ArrayBuffer==="undefined"){return false}return isArrayBufferToString.working?isArrayBufferToString(r):r instanceof ArrayBuffer}e.isArrayBuffer=isArrayBuffer;function isDataViewToString(r){return p(r)==="[object DataView]"}isDataViewToString.working=typeof ArrayBuffer!=="undefined"&&typeof DataView!=="undefined"&&isDataViewToString(new DataView(new ArrayBuffer(1),0,1));function isDataView(r){if(typeof DataView==="undefined"){return false}return isDataViewToString.working?isDataViewToString(r):r instanceof DataView}e.isDataView=isDataView;var g=typeof SharedArrayBuffer!=="undefined"?SharedArrayBuffer:undefined;function isSharedArrayBufferToString(r){return p(r)==="[object SharedArrayBuffer]"}function isSharedArrayBuffer(r){if(typeof g==="undefined"){return false}if(typeof isSharedArrayBufferToString.working==="undefined"){isSharedArrayBufferToString.working=isSharedArrayBufferToString(new g)}return isSharedArrayBufferToString.working?isSharedArrayBufferToString(r):r instanceof g}e.isSharedArrayBuffer=isSharedArrayBuffer;function isAsyncFunction(r){return p(r)==="[object AsyncFunction]"}e.isAsyncFunction=isAsyncFunction;function isMapIterator(r){return p(r)==="[object Map Iterator]"}e.isMapIterator=isMapIterator;function isSetIterator(r){return p(r)==="[object Set Iterator]"}e.isSetIterator=isSetIterator;function isGeneratorObject(r){return p(r)==="[object Generator]"}e.isGeneratorObject=isGeneratorObject;function isWebAssemblyCompiledModule(r){return p(r)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=isWebAssemblyCompiledModule;function isNumberObject(r){return checkBoxedPrimitive(r,u)}e.isNumberObject=isNumberObject;function isStringObject(r){return checkBoxedPrimitive(r,s)}e.isStringObject=isStringObject;function isBooleanObject(r){return checkBoxedPrimitive(r,c)}e.isBooleanObject=isBooleanObject;function isBigIntObject(r){return y&&checkBoxedPrimitive(r,l)}e.isBigIntObject=isBigIntObject;function isSymbolObject(r){return f&&checkBoxedPrimitive(r,d)}e.isSymbolObject=isSymbolObject;function isBoxedPrimitive(r){return isNumberObject(r)||isStringObject(r)||isBooleanObject(r)||isBigIntObject(r)||isSymbolObject(r)}e.isBoxedPrimitive=isBoxedPrimitive;function isAnyArrayBuffer(r){return typeof Uint8Array!=="undefined"&&(isArrayBuffer(r)||isSharedArrayBuffer(r))}e.isAnyArrayBuffer=isAnyArrayBuffer;["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(r){Object.defineProperty(e,r,{enumerable:false,value:function(){throw new Error(r+" is not supported in userland")}})}))},177:function(r,e,t){var o=Object.getOwnPropertyDescriptors||function getOwnPropertyDescriptors(r){var e=Object.keys(r);var t={};for(var o=0;o=i)return r;switch(r){case"%s":return String(o[t++]);case"%d":return Number(o[t++]);case"%j":try{return JSON.stringify(o[t++])}catch(r){return"[Circular]"}default:return r}}));for(var y=o[t];t=3)o.depth=arguments[2];if(arguments.length>=4)o.colors=arguments[3];if(isBoolean(t)){o.showHidden=t}else if(t){e._extend(o,t)}if(isUndefined(o.showHidden))o.showHidden=false;if(isUndefined(o.depth))o.depth=2;if(isUndefined(o.colors))o.colors=false;if(isUndefined(o.customInspect))o.customInspect=true;if(o.colors)o.stylize=stylizeWithColor;return formatValue(o,r,o.depth)}e.inspect=inspect;inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(r,e){var t=inspect.styles[e];if(t){return"["+inspect.colors[t][0]+"m"+r+"["+inspect.colors[t][1]+"m"}else{return r}}function stylizeNoColor(r,e){return r}function arrayToHash(r){var e={};r.forEach((function(r,t){e[r]=true}));return e}function formatValue(r,t,o){if(r.customInspect&&t&&isFunction(t.inspect)&&t.inspect!==e.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(o,r);if(!isString(n)){n=formatValue(r,n,o)}return n}var i=formatPrimitive(r,t);if(i){return i}var a=Object.keys(t);var y=arrayToHash(a);if(r.showHidden){a=Object.getOwnPropertyNames(t)}if(isError(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0)){return formatError(t)}if(a.length===0){if(isFunction(t)){var f=t.name?": "+t.name:"";return r.stylize("[Function"+f+"]","special")}if(isRegExp(t)){return r.stylize(RegExp.prototype.toString.call(t),"regexp")}if(isDate(t)){return r.stylize(Date.prototype.toString.call(t),"date")}if(isError(t)){return formatError(t)}}var p="",u=false,s=["{","}"];if(isArray(t)){u=true;s=["[","]"]}if(isFunction(t)){var c=t.name?": "+t.name:"";p=" [Function"+c+"]"}if(isRegExp(t)){p=" "+RegExp.prototype.toString.call(t)}if(isDate(t)){p=" "+Date.prototype.toUTCString.call(t)}if(isError(t)){p=" "+formatError(t)}if(a.length===0&&(!u||t.length==0)){return s[0]+p+s[1]}if(o<0){if(isRegExp(t)){return r.stylize(RegExp.prototype.toString.call(t),"regexp")}else{return r.stylize("[Object]","special")}}r.seen.push(t);var l;if(u){l=formatArray(r,t,o,y,a)}else{l=a.map((function(e){return formatProperty(r,t,o,y,e,u)}))}r.seen.pop();return reduceToSingleString(l,p,s)}function formatPrimitive(r,e){if(isUndefined(e))return r.stylize("undefined","undefined");if(isString(e)){var t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(t,"string")}if(isNumber(e))return r.stylize(""+e,"number");if(isBoolean(e))return r.stylize(""+e,"boolean");if(isNull(e))return r.stylize("null","null")}function formatError(r){return"["+Error.prototype.toString.call(r)+"]"}function formatArray(r,e,t,o,n){var i=[];for(var a=0,y=e.length;a-1){if(i){y=y.split("\n").map((function(r){return" "+r})).join("\n").substr(2)}else{y="\n"+y.split("\n").map((function(r){return" "+r})).join("\n")}}}else{y=r.stylize("[Circular]","special")}}if(isUndefined(a)){if(i&&n.match(/^\d+$/)){return y}a=JSON.stringify(""+n);if(a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){a=a.substr(1,a.length-2);a=r.stylize(a,"name")}else{a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");a=r.stylize(a,"string")}}return a+": "+y}function reduceToSingleString(r,e,t){var o=0;var n=r.reduce((function(r,e){o++;if(e.indexOf("\n")>=0)o++;return r+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60){return t[0]+(e===""?"":e+"\n ")+" "+r.join(",\n ")+" "+t[1]}return t[0]+e+" "+r.join(", ")+" "+t[1]}e.types=t(584);function isArray(r){return Array.isArray(r)}e.isArray=isArray;function isBoolean(r){return typeof r==="boolean"}e.isBoolean=isBoolean;function isNull(r){return r===null}e.isNull=isNull;function isNullOrUndefined(r){return r==null}e.isNullOrUndefined=isNullOrUndefined;function isNumber(r){return typeof r==="number"}e.isNumber=isNumber;function isString(r){return typeof r==="string"}e.isString=isString;function isSymbol(r){return typeof r==="symbol"}e.isSymbol=isSymbol;function isUndefined(r){return r===void 0}e.isUndefined=isUndefined;function isRegExp(r){return isObject(r)&&objectToString(r)==="[object RegExp]"}e.isRegExp=isRegExp;e.types.isRegExp=isRegExp;function isObject(r){return typeof r==="object"&&r!==null}e.isObject=isObject;function isDate(r){return isObject(r)&&objectToString(r)==="[object Date]"}e.isDate=isDate;e.types.isDate=isDate;function isError(r){return isObject(r)&&(objectToString(r)==="[object Error]"||r instanceof Error)}e.isError=isError;e.types.isNativeError=isError;function isFunction(r){return typeof r==="function"}e.isFunction=isFunction;function isPrimitive(r){return r===null||typeof r==="boolean"||typeof r==="number"||typeof r==="string"||typeof r==="symbol"||typeof r==="undefined"}e.isPrimitive=isPrimitive;e.isBuffer=t(369);function objectToString(r){return Object.prototype.toString.call(r)}function pad(r){return r<10?"0"+r.toString(10):r.toString(10)}var f=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var r=new Date;var e=[pad(r.getHours()),pad(r.getMinutes()),pad(r.getSeconds())].join(":");return[r.getDate(),f[r.getMonth()],e].join(" ")}e.log=function(){console.log("%s - %s",timestamp(),e.format.apply(e,arguments))};e.inherits=t(782);e._extend=function(r,e){if(!e||!isObject(e))return r;var t=Object.keys(e);var o=t.length;while(o--){r[t[o]]=e[t[o]]}return r};function hasOwnProperty(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var p=typeof Symbol!=="undefined"?Symbol("util.promisify.custom"):undefined;e.promisify=function promisify(r){if(typeof r!=="function")throw new TypeError('The "original" argument must be of type Function');if(p&&r[p]){var e=r[p];if(typeof e!=="function"){throw new TypeError('The "util.promisify.custom" argument must be of type Function')}Object.defineProperty(e,p,{value:e,enumerable:false,writable:false,configurable:true});return e}function e(){var e,t;var o=new Promise((function(r,o){e=r;t=o}));var n=[];for(var i=0;i-1){return o(e)}return e}},139:function(r,t,e){"use strict";var n=e(212);var o=e(925);var i=o("%Function.prototype.apply%");var a=o("%Function.prototype.call%");var f=o("%Reflect.apply%",true)||n.call(a,i);var u=o("%Object.getOwnPropertyDescriptor%",true);var s=o("%Object.defineProperty%",true);var y=o("%Math.max%");if(s){try{s({},"a",{value:1})}catch(r){s=null}}r.exports=function callBind(r){var t=f(n,a,arguments);if(u&&s){var e=u(t,"length");if(e.configurable){s(t,"length",{value:1+y(0,r.length-(arguments.length-1))})}}return t};var c=function applyBind(){return f(n,i,arguments)};if(s){s(r.exports,"apply",{value:c})}else{r.exports.apply=c}},144:function(r){var t=Object.prototype.hasOwnProperty;var e=Object.prototype.toString;r.exports=function forEach(r,n,o){if(e.call(n)!=="[object Function]"){throw new TypeError("iterator must be a function")}var i=r.length;if(i===+i){for(var a=0;a1&&typeof t!=="boolean"){throw new a('"allowMissing" argument must be a boolean')}if(w(/^%?[^%]*%?$/,r)===null){throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name")}var e=E(r);var i=e.length>0?e[0]:"";var u=T("%"+i+"%",t);var s=u.name;var y=u.value;var c=false;var p=u.alias;if(p){i=p[0];h(e,A([0,1],p))}for(var l=1,b=true;l=e.length){var O=f(y,v);b=!!O;if(b&&"get"in O&&!("originalValue"in O.get)){y=O.get}else{y=y[v]}}else{b=S(y,v);y=y[v]}if(b&&!c){g[s]=y}}}return y}},504:function(r){"use strict";var t={foo:{}};var e=Object;r.exports=function hasProto(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof e)}},942:function(r,t,e){"use strict";var n=typeof Symbol!=="undefined"&&Symbol;var o=e(773);r.exports=function hasNativeSymbols(){if(typeof n!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof n("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return o()}},773:function(r){"use strict";r.exports=function hasSymbols(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var r={};var t=Symbol("test");var e=Object(t);if(typeof t==="string"){return false}if(Object.prototype.toString.call(t)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(e)!=="[object Symbol]"){return false}var n=42;r[t]=n;for(t in r){return false}if(typeof Object.keys==="function"&&Object.keys(r).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(r).length!==0){return false}var o=Object.getOwnPropertySymbols(r);if(o.length!==1||o[0]!==t){return false}if(!Object.prototype.propertyIsEnumerable.call(r,t)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var i=Object.getOwnPropertyDescriptor(r,t);if(i.value!==n||i.enumerable!==true){return false}}return true}},115:function(r,t,e){"use strict";var n=typeof Symbol!=="undefined"&&Symbol;var o=e(832);r.exports=function hasNativeSymbols(){if(typeof n!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof n("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return o()}},832:function(r){"use strict";r.exports=function hasSymbols(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var r={};var t=Symbol("test");var e=Object(t);if(typeof t==="string"){return false}if(Object.prototype.toString.call(t)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(e)!=="[object Symbol]"){return false}var n=42;r[t]=n;for(t in r){return false}if(typeof Object.keys==="function"&&Object.keys(r).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(r).length!==0){return false}var o=Object.getOwnPropertySymbols(r);if(o.length!==1||o[0]!==t){return false}if(!Object.prototype.propertyIsEnumerable.call(r,t)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var i=Object.getOwnPropertyDescriptor(r,t);if(i.value!==n||i.enumerable!==true){return false}}return true}},101:function(r,t,e){"use strict";var n=e(174);r.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},782:function(r){if(typeof Object.create==="function"){r.exports=function inherits(r,t){if(t){r.super_=t;r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:false,writable:true,configurable:true}})}}}else{r.exports=function inherits(r,t){if(t){r.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype;r.prototype=new TempCtor;r.prototype.constructor=r}}}},157:function(r){"use strict";var t=typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol";var e=Object.prototype.toString;var n=function isArguments(r){if(t&&r&&typeof r==="object"&&Symbol.toStringTag in r){return false}return e.call(r)==="[object Arguments]"};var o=function isArguments(r){if(n(r)){return true}return r!==null&&typeof r==="object"&&typeof r.length==="number"&&r.length>=0&&e.call(r)!=="[object Array]"&&e.call(r.callee)==="[object Function]"};var i=function(){return n(arguments)}();n.isLegacyArguments=o;r.exports=i?n:o},391:function(r){"use strict";var t=Object.prototype.toString;var e=Function.prototype.toString;var n=/^\s*(?:function)?\*/;var o=typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol";var i=Object.getPrototypeOf;var getGeneratorFunc=function(){if(!o){return false}try{return Function("return function*() {}")()}catch(r){}};var a=getGeneratorFunc();var f=a?i(a):{};r.exports=function isGeneratorFunction(r){if(typeof r!=="function"){return false}if(n.test(e.call(r))){return true}if(!o){var a=t.call(r);return a==="[object GeneratorFunction]"}return i(r)===f}},994:function(r,t,e){"use strict";var n=e(144);var o=e(349);var i=e(256);var a=i("Object.prototype.toString");var f=e(942)();var u=f&&typeof Symbol.toStringTag==="symbol";var s=o();var y=i("Array.prototype.indexOf",true)||function indexOf(r,t){for(var e=0;e-1}if(!l){return false}return b(r)}},369:function(r){r.exports=function isBuffer(r){return r instanceof Buffer}},584:function(r,t,e){"use strict";var n=e(157);var o=e(391);var i=e(490);var a=e(994);function uncurryThis(r){return r.call.bind(r)}var f=typeof BigInt!=="undefined";var u=typeof Symbol!=="undefined";var s=uncurryThis(Object.prototype.toString);var y=uncurryThis(Number.prototype.valueOf);var c=uncurryThis(String.prototype.valueOf);var p=uncurryThis(Boolean.prototype.valueOf);if(f){var l=uncurryThis(BigInt.prototype.valueOf)}if(u){var g=uncurryThis(Symbol.prototype.valueOf)}function checkBoxedPrimitive(r,t){if(typeof r!=="object"){return false}try{t(r);return true}catch(r){return false}}t.isArgumentsObject=n;t.isGeneratorFunction=o;t.isTypedArray=a;function isPromise(r){return typeof Promise!=="undefined"&&r instanceof Promise||r!==null&&typeof r==="object"&&typeof r.then==="function"&&typeof r.catch==="function"}t.isPromise=isPromise;function isArrayBufferView(r){if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){return ArrayBuffer.isView(r)}return a(r)||isDataView(r)}t.isArrayBufferView=isArrayBufferView;function isUint8Array(r){return i(r)==="Uint8Array"}t.isUint8Array=isUint8Array;function isUint8ClampedArray(r){return i(r)==="Uint8ClampedArray"}t.isUint8ClampedArray=isUint8ClampedArray;function isUint16Array(r){return i(r)==="Uint16Array"}t.isUint16Array=isUint16Array;function isUint32Array(r){return i(r)==="Uint32Array"}t.isUint32Array=isUint32Array;function isInt8Array(r){return i(r)==="Int8Array"}t.isInt8Array=isInt8Array;function isInt16Array(r){return i(r)==="Int16Array"}t.isInt16Array=isInt16Array;function isInt32Array(r){return i(r)==="Int32Array"}t.isInt32Array=isInt32Array;function isFloat32Array(r){return i(r)==="Float32Array"}t.isFloat32Array=isFloat32Array;function isFloat64Array(r){return i(r)==="Float64Array"}t.isFloat64Array=isFloat64Array;function isBigInt64Array(r){return i(r)==="BigInt64Array"}t.isBigInt64Array=isBigInt64Array;function isBigUint64Array(r){return i(r)==="BigUint64Array"}t.isBigUint64Array=isBigUint64Array;function isMapToString(r){return s(r)==="[object Map]"}isMapToString.working=typeof Map!=="undefined"&&isMapToString(new Map);function isMap(r){if(typeof Map==="undefined"){return false}return isMapToString.working?isMapToString(r):r instanceof Map}t.isMap=isMap;function isSetToString(r){return s(r)==="[object Set]"}isSetToString.working=typeof Set!=="undefined"&&isSetToString(new Set);function isSet(r){if(typeof Set==="undefined"){return false}return isSetToString.working?isSetToString(r):r instanceof Set}t.isSet=isSet;function isWeakMapToString(r){return s(r)==="[object WeakMap]"}isWeakMapToString.working=typeof WeakMap!=="undefined"&&isWeakMapToString(new WeakMap);function isWeakMap(r){if(typeof WeakMap==="undefined"){return false}return isWeakMapToString.working?isWeakMapToString(r):r instanceof WeakMap}t.isWeakMap=isWeakMap;function isWeakSetToString(r){return s(r)==="[object WeakSet]"}isWeakSetToString.working=typeof WeakSet!=="undefined"&&isWeakSetToString(new WeakSet);function isWeakSet(r){return isWeakSetToString(r)}t.isWeakSet=isWeakSet;function isArrayBufferToString(r){return s(r)==="[object ArrayBuffer]"}isArrayBufferToString.working=typeof ArrayBuffer!=="undefined"&&isArrayBufferToString(new ArrayBuffer);function isArrayBuffer(r){if(typeof ArrayBuffer==="undefined"){return false}return isArrayBufferToString.working?isArrayBufferToString(r):r instanceof ArrayBuffer}t.isArrayBuffer=isArrayBuffer;function isDataViewToString(r){return s(r)==="[object DataView]"}isDataViewToString.working=typeof ArrayBuffer!=="undefined"&&typeof DataView!=="undefined"&&isDataViewToString(new DataView(new ArrayBuffer(1),0,1));function isDataView(r){if(typeof DataView==="undefined"){return false}return isDataViewToString.working?isDataViewToString(r):r instanceof DataView}t.isDataView=isDataView;var b=typeof SharedArrayBuffer!=="undefined"?SharedArrayBuffer:undefined;function isSharedArrayBufferToString(r){return s(r)==="[object SharedArrayBuffer]"}function isSharedArrayBuffer(r){if(typeof b==="undefined"){return false}if(typeof isSharedArrayBufferToString.working==="undefined"){isSharedArrayBufferToString.working=isSharedArrayBufferToString(new b)}return isSharedArrayBufferToString.working?isSharedArrayBufferToString(r):r instanceof b}t.isSharedArrayBuffer=isSharedArrayBuffer;function isAsyncFunction(r){return s(r)==="[object AsyncFunction]"}t.isAsyncFunction=isAsyncFunction;function isMapIterator(r){return s(r)==="[object Map Iterator]"}t.isMapIterator=isMapIterator;function isSetIterator(r){return s(r)==="[object Set Iterator]"}t.isSetIterator=isSetIterator;function isGeneratorObject(r){return s(r)==="[object Generator]"}t.isGeneratorObject=isGeneratorObject;function isWebAssemblyCompiledModule(r){return s(r)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=isWebAssemblyCompiledModule;function isNumberObject(r){return checkBoxedPrimitive(r,y)}t.isNumberObject=isNumberObject;function isStringObject(r){return checkBoxedPrimitive(r,c)}t.isStringObject=isStringObject;function isBooleanObject(r){return checkBoxedPrimitive(r,p)}t.isBooleanObject=isBooleanObject;function isBigIntObject(r){return f&&checkBoxedPrimitive(r,l)}t.isBigIntObject=isBigIntObject;function isSymbolObject(r){return u&&checkBoxedPrimitive(r,g)}t.isSymbolObject=isSymbolObject;function isBoxedPrimitive(r){return isNumberObject(r)||isStringObject(r)||isBooleanObject(r)||isBigIntObject(r)||isSymbolObject(r)}t.isBoxedPrimitive=isBoxedPrimitive;function isAnyArrayBuffer(r){return typeof Uint8Array!=="undefined"&&(isArrayBuffer(r)||isSharedArrayBuffer(r))}t.isAnyArrayBuffer=isAnyArrayBuffer;["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(r){Object.defineProperty(t,r,{enumerable:false,value:function(){throw new Error(r+" is not supported in userland")}})}))},177:function(r,t,e){var n=Object.getOwnPropertyDescriptors||function getOwnPropertyDescriptors(r){var t=Object.keys(r);var e={};for(var n=0;n=i)return r;switch(r){case"%s":return String(n[e++]);case"%d":return Number(n[e++]);case"%j":try{return JSON.stringify(n[e++])}catch(r){return"[Circular]"}default:return r}}));for(var f=n[e];e=3)n.depth=arguments[2];if(arguments.length>=4)n.colors=arguments[3];if(isBoolean(e)){n.showHidden=e}else if(e){t._extend(n,e)}if(isUndefined(n.showHidden))n.showHidden=false;if(isUndefined(n.depth))n.depth=2;if(isUndefined(n.colors))n.colors=false;if(isUndefined(n.customInspect))n.customInspect=true;if(n.colors)n.stylize=stylizeWithColor;return formatValue(n,r,n.depth)}t.inspect=inspect;inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(r,t){var e=inspect.styles[t];if(e){return"["+inspect.colors[e][0]+"m"+r+"["+inspect.colors[e][1]+"m"}else{return r}}function stylizeNoColor(r,t){return r}function arrayToHash(r){var t={};r.forEach((function(r,e){t[r]=true}));return t}function formatValue(r,e,n){if(r.customInspect&&e&&isFunction(e.inspect)&&e.inspect!==t.inspect&&!(e.constructor&&e.constructor.prototype===e)){var o=e.inspect(n,r);if(!isString(o)){o=formatValue(r,o,n)}return o}var i=formatPrimitive(r,e);if(i){return i}var a=Object.keys(e);var f=arrayToHash(a);if(r.showHidden){a=Object.getOwnPropertyNames(e)}if(isError(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0)){return formatError(e)}if(a.length===0){if(isFunction(e)){var u=e.name?": "+e.name:"";return r.stylize("[Function"+u+"]","special")}if(isRegExp(e)){return r.stylize(RegExp.prototype.toString.call(e),"regexp")}if(isDate(e)){return r.stylize(Date.prototype.toString.call(e),"date")}if(isError(e)){return formatError(e)}}var s="",y=false,c=["{","}"];if(isArray(e)){y=true;c=["[","]"]}if(isFunction(e)){var p=e.name?": "+e.name:"";s=" [Function"+p+"]"}if(isRegExp(e)){s=" "+RegExp.prototype.toString.call(e)}if(isDate(e)){s=" "+Date.prototype.toUTCString.call(e)}if(isError(e)){s=" "+formatError(e)}if(a.length===0&&(!y||e.length==0)){return c[0]+s+c[1]}if(n<0){if(isRegExp(e)){return r.stylize(RegExp.prototype.toString.call(e),"regexp")}else{return r.stylize("[Object]","special")}}r.seen.push(e);var l;if(y){l=formatArray(r,e,n,f,a)}else{l=a.map((function(t){return formatProperty(r,e,n,f,t,y)}))}r.seen.pop();return reduceToSingleString(l,s,c)}function formatPrimitive(r,t){if(isUndefined(t))return r.stylize("undefined","undefined");if(isString(t)){var e="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(e,"string")}if(isNumber(t))return r.stylize(""+t,"number");if(isBoolean(t))return r.stylize(""+t,"boolean");if(isNull(t))return r.stylize("null","null")}function formatError(r){return"["+Error.prototype.toString.call(r)+"]"}function formatArray(r,t,e,n,o){var i=[];for(var a=0,f=t.length;a-1){if(i){f=f.split("\n").map((function(r){return" "+r})).join("\n").substr(2)}else{f="\n"+f.split("\n").map((function(r){return" "+r})).join("\n")}}}else{f=r.stylize("[Circular]","special")}}if(isUndefined(a)){if(i&&o.match(/^\d+$/)){return f}a=JSON.stringify(""+o);if(a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){a=a.substr(1,a.length-2);a=r.stylize(a,"name")}else{a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");a=r.stylize(a,"string")}}return a+": "+f}function reduceToSingleString(r,t,e){var n=0;var o=r.reduce((function(r,t){n++;if(t.indexOf("\n")>=0)n++;return r+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(o>60){return e[0]+(t===""?"":t+"\n ")+" "+r.join(",\n ")+" "+e[1]}return e[0]+t+" "+r.join(", ")+" "+e[1]}t.types=e(584);function isArray(r){return Array.isArray(r)}t.isArray=isArray;function isBoolean(r){return typeof r==="boolean"}t.isBoolean=isBoolean;function isNull(r){return r===null}t.isNull=isNull;function isNullOrUndefined(r){return r==null}t.isNullOrUndefined=isNullOrUndefined;function isNumber(r){return typeof r==="number"}t.isNumber=isNumber;function isString(r){return typeof r==="string"}t.isString=isString;function isSymbol(r){return typeof r==="symbol"}t.isSymbol=isSymbol;function isUndefined(r){return r===void 0}t.isUndefined=isUndefined;function isRegExp(r){return isObject(r)&&objectToString(r)==="[object RegExp]"}t.isRegExp=isRegExp;t.types.isRegExp=isRegExp;function isObject(r){return typeof r==="object"&&r!==null}t.isObject=isObject;function isDate(r){return isObject(r)&&objectToString(r)==="[object Date]"}t.isDate=isDate;t.types.isDate=isDate;function isError(r){return isObject(r)&&(objectToString(r)==="[object Error]"||r instanceof Error)}t.isError=isError;t.types.isNativeError=isError;function isFunction(r){return typeof r==="function"}t.isFunction=isFunction;function isPrimitive(r){return r===null||typeof r==="boolean"||typeof r==="number"||typeof r==="string"||typeof r==="symbol"||typeof r==="undefined"}t.isPrimitive=isPrimitive;t.isBuffer=e(369);function objectToString(r){return Object.prototype.toString.call(r)}function pad(r){return r<10?"0"+r.toString(10):r.toString(10)}var u=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var r=new Date;var t=[pad(r.getHours()),pad(r.getMinutes()),pad(r.getSeconds())].join(":");return[r.getDate(),u[r.getMonth()],t].join(" ")}t.log=function(){console.log("%s - %s",timestamp(),t.format.apply(t,arguments))};t.inherits=e(782);t._extend=function(r,t){if(!t||!isObject(t))return r;var e=Object.keys(t);var n=e.length;while(n--){r[e[n]]=t[e[n]]}return r};function hasOwnProperty(r,t){return Object.prototype.hasOwnProperty.call(r,t)}var s=typeof Symbol!=="undefined"?Symbol("util.promisify.custom"):undefined;t.promisify=function promisify(r){if(typeof r!=="function")throw new TypeError('The "original" argument must be of type Function');if(s&&r[s]){var t=r[s];if(typeof t!=="function"){throw new TypeError('The "util.promisify.custom" argument must be of type Function')}Object.defineProperty(t,s,{value:t,enumerable:false,writable:false,configurable:true});return t}function t(){var t,e;var n=new Promise((function(r,n){t=r;e=n}));var o=[];for(var i=0;i=12.0.0'} + dependencies: + '@types/buffer-from': 1.1.3 + '@types/node': 20.12.3 + '@types/pako': 1.0.7 + buffer-from: 1.1.2 + cross-fetch: 3.1.8 + es6-promise: 4.2.8 + form-data: 4.0.0 + loglevel: 1.9.1 + pako: 2.1.0 + url-parse: 1.5.10 + transitivePeerDependencies: + - encoding + dev: true + /@datadog/native-appsec@3.2.0: resolution: {integrity: sha512-biAa7EFfuavjSWgSQaCit9CqGzr6Af5nhzfNNGJ38Y/Y387hDvLivAR374kK1z6XoxGZEOa+XPbVogmV/2Bcjw==} engines: {node: '>=12'} @@ -4438,6 +4459,11 @@ packages: engines: {node: '>=18'} dev: true + /@inquirer/figures@1.0.3: + resolution: {integrity: sha512-ErXXzENMH5pJt5/ssXV0DfWUZqly8nGzf0UcBV9xTnP+KyffE2mqyxIMBrZ8ijQck2nU0TQm40EQB53YreyWHw==} + engines: {node: '>=18'} + dev: true + /@inquirer/type@1.3.2: resolution: {integrity: sha512-5Frickan9c89QbPkSu6I6y8p+9eR6hZkdPahGmNDsTFX8FHLPAozyzCZMKUeW8FyYwnlCKUjqIEqxY+UctARiw==} engines: {node: '>=18'} @@ -5601,6 +5627,13 @@ packages: write-file-atomic: 3.0.3 dev: true + /@ljharb/through@2.3.13: + resolution: {integrity: sha512-/gKJun8NNiWGZJkGzI/Ragc53cOdcLNdzjLaIa+GEjguQs0ulsurx8WN0jijdK9yPqDvziX995sMRLyLt1uZMQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + dev: true + /@mantine/core@7.10.1(@mantine/hooks@7.10.1)(react-dom@19.0.0-rc-6230622a1a-20240610)(react@19.0.0-rc-6230622a1a-20240610)(types-react@19.0.0-rc.0): resolution: {integrity: sha512-l9ypojKN3PjwO1CSLIsqxi7mA25+7w+xc71Q+JuCCREI0tuGwkZsKbIOpuTATIJOjPh8ycLiW7QxX1LYsRTq6w==} peerDependencies: @@ -7155,6 +7188,12 @@ packages: resolution: {integrity: sha512-wJsiX1tosQ+J5+bY5LrSahHxr2wT+uME5UDwdN1kg4frt40euqA+wzECkmq4t5QbveHiJepfdThgQrPw6KiSlg==} dev: true + /@types/buffer-from@1.1.3: + resolution: {integrity: sha512-2lq4YC9uLUMGHkl2IDtX4tCXSo2+hwMpOJcY1qiIk1kybc31rIlPyM1HCVJhkPFIo75a/pOVxqyvwuf5TpCG/w==} + dependencies: + '@types/node': 20.12.3 + dev: true + /@types/busboy@1.5.3: resolution: {integrity: sha512-YMBLFN/xBD8bnqywIlGyYqsNFXu6bsiY7h3Ae0kO17qEuTjsqeyYMRPSUDacIKIquws2Y6KjmxAyNx8xB3xQbw==} dependencies: @@ -7464,6 +7503,10 @@ packages: /@types/normalize-package-data@2.4.0: resolution: {integrity: sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==} + /@types/pako@1.0.7: + resolution: {integrity: sha512-YBtzT2ztNF6R/9+UXj2wTGFnC9NklAnASt3sC0h2m1bbH7G6FyBIkt4AN8ThZpNfxUo1b2iMVO0UawiJymEt8A==} + dev: true + /@types/parse-json@4.0.0: resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} dev: true @@ -7910,6 +7953,22 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true + /@vercel/devlow-bench@0.3.1: + resolution: {integrity: sha512-RbKloNKAj55/JYqhx2QtqVFWKr1f7zvuBVGs8oPksCO6oZkSnvgJhcgjftOpFAzJKUSQ+oUOYIO9oWdjDUjgFw==} + hasBin: true + dependencies: + '@datadog/datadog-api-client': 1.25.0 + chalk: 2.4.2 + inquirer: 9.2.23 + minimist: 1.2.8 + pidusage-tree: 2.0.5 + playwright-chromium: 1.41.2 + split2: 4.2.0 + tree-kill: 1.2.2 + transitivePeerDependencies: + - encoding + dev: true + /@vercel/fetch-cached-dns@2.0.2(node-fetch@2.6.7): resolution: {integrity: sha512-gDqKEV8CeY2YmCdZpP1rn3tFK1L07Vw2+HYkCK8zpRHOVGr/sP8yhBsW+C/yqGVj0i9z/rIvqIHe5emvRvxwgw==} peerDependencies: @@ -9304,6 +9363,10 @@ packages: /buffer-from@1.1.1: resolution: {integrity: sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==} + /buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: true + /buffer-xor@1.0.3: resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} dev: true @@ -9429,9 +9492,20 @@ packages: /call-bind@1.0.2: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: - function-bind: 1.1.1 + function-bind: 1.1.2 get-intrinsic: 1.2.1 + /call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + set-function-length: 1.2.2 + dev: true + /caller-callsite@2.0.0: resolution: {integrity: sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ==} engines: {node: '>=4'} @@ -9997,27 +10071,18 @@ packages: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} requiresBuild: true - /color-string@1.5.4: - resolution: {integrity: sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==} - dependencies: - color-name: 1.1.4 - simple-swizzle: 0.2.2 - dev: true - /color-string@1.9.1: resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} requiresBuild: true dependencies: color-name: 1.1.4 simple-swizzle: 0.2.2 - dev: false - optional: true /color@3.1.3: resolution: {integrity: sha512-xgXAcTHa2HeFCGLE9Xs/R82hujGtu9Jd9x4NW3T34+OMs7VoPsjwzRczKHvTAHeJwWFwX5j15+MgAppE8ztObQ==} dependencies: color-convert: 1.9.3 - color-string: 1.5.4 + color-string: 1.9.1 dev: true /color@4.2.3: @@ -10544,6 +10609,14 @@ packages: node-fetch: 2.6.1 dev: true + /cross-fetch@3.1.8: + resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} + dependencies: + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + dev: true + /cross-spawn-async@2.2.5: resolution: {integrity: sha512-snteb3aVrxYYOX9e8BabYFK9WhCDhTlw1YQktfTthBogxri4/2r9U2nQc0ffY73ZAxezDc+U8gvHAeU1wy1ubQ==} deprecated: cross-spawn no longer requires a build toolchain, use it instead @@ -11509,6 +11582,15 @@ packages: engines: {node: '>=10'} dev: false + /define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + gopd: 1.0.1 + dev: true + /define-lazy-prop@2.0.0: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} engines: {node: '>=8'} @@ -12112,9 +12194,9 @@ packages: dependencies: call-bind: 1.0.2 es-to-primitive: 1.2.1 - function-bind: 1.1.1 + function-bind: 1.1.2 function.prototype.name: 1.1.5 - get-intrinsic: 1.1.2 + get-intrinsic: 1.2.1 get-symbol-description: 1.0.0 has: 1.0.3 has-property-descriptors: 1.0.0 @@ -12179,6 +12261,18 @@ packages: unbox-primitive: 1.0.2 which-typed-array: 1.1.11 + /es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.4 + dev: true + + /es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + dev: true + /es-iterator-helpers@1.0.13: resolution: {integrity: sha512-LK3VGwzvaPWobO8xzXXGRUOGw8Dcjyfk62CsY/wfHN75CwsJPbuypOYJxK6g5RyEL8YDjIWcl6jgd8foO6mmrA==} dependencies: @@ -13765,7 +13859,6 @@ packages: /function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - dev: true /function.prototype.name@1.1.5: resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} @@ -13815,14 +13908,6 @@ packages: engines: {node: '>=18'} dev: true - /get-intrinsic@1.1.2: - resolution: {integrity: sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==} - dependencies: - function-bind: 1.1.1 - has: 1.0.3 - has-symbols: 1.0.3 - dev: true - /get-intrinsic@1.2.1: resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} dependencies: @@ -13831,6 +13916,17 @@ packages: has-proto: 1.0.1 has-symbols: 1.0.3 + /get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + has-proto: 1.0.1 + has-symbols: 1.0.3 + hasown: 2.0.0 + dev: true + /get-nonce@1.0.1: resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==} engines: {node: '>=6'} @@ -14338,6 +14434,12 @@ packages: dependencies: get-intrinsic: 1.2.1 + /has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + dependencies: + es-define-property: 1.0.0 + dev: true + /has-proto@1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} engines: {node: '>= 0.4'} @@ -15066,11 +15168,32 @@ packages: run-async: 2.4.1 rxjs: 7.8.1 string-width: 4.2.3 - strip-ansi: 6.0.1 + strip-ansi: 6.0.0 through: 2.3.8 wrap-ansi: 6.2.0 dev: true + /inquirer@9.2.23: + resolution: {integrity: sha512-kod5s+FBPIDM2xiy9fu+6wdU/SkK5le5GS9lh4FEBjBHqiMgD9lLFbCbuqFNAjNL2ZOy9Wd9F694IOzN9pZHBA==} + engines: {node: '>=18'} + dependencies: + '@inquirer/figures': 1.0.3 + '@ljharb/through': 2.3.13 + ansi-escapes: 4.3.2 + chalk: 5.3.0 + cli-cursor: 3.1.0 + cli-width: 4.1.0 + external-editor: 3.1.0 + lodash: 4.17.21 + mute-stream: 1.0.0 + ora: 5.4.1 + run-async: 3.0.0 + rxjs: 7.8.1 + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + dev: true + /int64-buffer@0.1.10: resolution: {integrity: sha512-v7cSY1J8ydZ0GyjUHqF+1bshJ6cnEVLo9EnjB8p+4HDRPZc9N5jjmvUV7NvEsqQOKyH0pmIBFWXVQbiS0+OBbA==} dev: true @@ -16836,7 +16959,7 @@ packages: engines: {node: '>=6'} hasBin: true dependencies: - minimist: 1.2.6 + minimist: 1.2.8 /json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} @@ -17465,6 +17588,11 @@ packages: wrap-ansi: 9.0.0 dev: true + /loglevel@1.9.1: + resolution: {integrity: sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==} + engines: {node: '>= 0.6.0'} + dev: true + /long@4.0.0: resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==} dev: true @@ -18481,6 +18609,9 @@ packages: /minimist@1.2.6: resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==} + /minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + /minipass-collect@1.0.2: resolution: {integrity: sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==} engines: {node: '>= 8'} @@ -19528,7 +19659,7 @@ packages: bl: 4.1.0 chalk: 4.1.2 cli-cursor: 3.1.0 - cli-spinners: 2.6.1 + cli-spinners: 2.9.2 is-interactive: 1.0.0 is-unicode-supported: 0.1.0 log-symbols: 4.1.0 @@ -19751,6 +19882,10 @@ packages: resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} dev: true + /pako@2.1.0: + resolution: {integrity: sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==} + dev: true + /param-case@3.0.4: resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} dependencies: @@ -20084,6 +20219,20 @@ packages: hasBin: true dev: true + /pidusage-tree@2.0.5: + resolution: {integrity: sha512-4J9SkX1IorF9srgzbTrXpfO2xA4JHESDn5AGGDtCHXvVAGNvP4KzZpWwXhLDKlB+dC5rcERIKS5Z7JktjzCcCA==} + dependencies: + pidtree: 0.3.0 + pidusage: 2.0.21 + dev: true + + /pidusage@2.0.21: + resolution: {integrity: sha512-cv3xAQos+pugVX+BfXpHsbyz/dLzX+lr44zNMsYiGxUw+kV5sgQCIcLd1z+0vq+KyC7dJ+/ts2PsfgWfSC3WXA==} + engines: {node: '>=8'} + dependencies: + safe-buffer: 5.2.1 + dev: true + /pify@2.3.0: resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} engines: {node: '>=0.10.0'} @@ -22961,6 +23110,11 @@ packages: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} + /run-async@3.0.0: + resolution: {integrity: sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==} + engines: {node: '>=0.12.0'} + dev: true + /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: @@ -23250,6 +23404,18 @@ packages: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} dev: true + /set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + dev: true + /set-value@2.0.1: resolution: {integrity: sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==} engines: {node: '>=0.10.0'} @@ -23709,6 +23875,11 @@ packages: readable-stream: 3.6.0 dev: true + /split2@4.2.0: + resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} + engines: {node: '>= 10.x'} + dev: true + /split@0.2.10: resolution: {integrity: sha512-e0pKq+UUH2Xq/sXbYpZBZc3BawsfDZ7dgv+JtRTUPNcvF5CMR4Y9cvJqkMY0MoxWzTHvZuz1beg6pNEKlszPiQ==} dependencies: @@ -23914,7 +24085,7 @@ packages: call-bind: 1.0.2 define-properties: 1.1.4 es-abstract: 1.20.2 - get-intrinsic: 1.1.2 + get-intrinsic: 1.2.1 has-symbols: 1.0.3 internal-slot: 1.0.3 regexp.prototype.flags: 1.4.3 diff --git a/scripts/devlow-bench.mjs b/scripts/devlow-bench.mjs new file mode 100644 index 0000000000..be149c0c71 --- /dev/null +++ b/scripts/devlow-bench.mjs @@ -0,0 +1,402 @@ +import { rm, writeFile, readFile } from 'node:fs/promises' +import { join, resolve } from 'node:path' +import { fileURLToPath } from 'node:url' +import { describe } from '@vercel/devlow-bench' +import * as devlow from '@vercel/devlow-bench' +import { newBrowserSession } from '@vercel/devlow-bench/browser' +import { command } from '@vercel/devlow-bench/shell' +import { waitForFile } from '@vercel/devlow-bench/file' + +const REPO_ROOT = fileURLToPath(new URL('..', import.meta.url)) + +const GIT_SHA = + process.env.GITHUB_SHA ?? + (await (async () => { + const cmd = command('git', ['rev-parse', 'HEAD']) + await cmd.ok() + return cmd.output + })()) + +const GIT_BRANCH = + process.env.GITHUB_REF_NAME ?? + (await (async () => { + const cmd = command('git', ['rev-parse', '--abbrev-ref', 'HEAD']) + await cmd.ok() + return cmd.output + })()) + +const nextDevWorkflow = + (benchmarkName, pages) => + async ({ turbopack, page }) => { + const pageConfig = + typeof pages[page] === 'string' ? { url: pages[page] } : pages[page] + const cleanupTasks = [] + try { + const benchmarkDir = resolve(REPO_ROOT, 'bench', benchmarkName) + + // cleanup .next directory to remove persistent cache + await retry(() => + rm(join(benchmarkDir, '.next'), { recursive: true, force: true }) + ) + + await measureTime('cleanup', { + scenario: benchmarkName, + props: { turbopack: null, page: null }, + }) + + // startup browser + let session = await newBrowserSession({}) + const closeSession = async () => { + if (session) { + await session.close() + session = null + } + } + cleanupTasks.push(closeSession) + await measureTime('browser startup', { + props: { turbopack: null, page: null }, + }) + + const env = { + PATH: process.env.PATH, + NODE: process.env.NODE, + HOSTNAME: process.env.HOSTNAME, + PWD: process.env.PWD, + NODE_ENV: 'development', + // Disable otel initialization to prevent pending / hanging request to otel collector + OTEL_SDK_DISABLED: 'true', + NEXT_PUBLIC_OTEL_SENTRY: 'true', + NEXT_PUBLIC_OTEL_DEV_DISABLED: 'true', + NEXT_TRACE_UPLOAD_DISABLED: 'true', + // Enable next.js test mode to get HMR events + __NEXT_TEST_MODE: '1', + } + + // run command to start dev server + const args = [turbopack ? 'dev-turbopack' : 'dev-webpack'] + let shell = command('pnpm', args, { + cwd: benchmarkDir, + env, + }) + const killShell = async () => { + if (shell) { + await shell.kill() + shell = null + } + } + cleanupTasks.push(killShell) + + // wait for server to be ready + const START_SERVER_REGEXP = /Local:\s+(?.+)\n/ + const { + groups: { url }, + } = await shell.waitForOutput(START_SERVER_REGEXP) + await measureTime('server startup', { props: { page: null } }) + await shell.reportMemUsage('mem usage after startup', { + props: { page: null }, + }) + + // open page + const pageInstance = await session.hardNavigation( + 'open page', + url + pageConfig.url + ) + await shell.reportMemUsage('mem usage after open page') + + let status = 0 + try { + if ( + await pageInstance.evaluate( + '!next.appDir && __NEXT_DATA__.page === "/404"' + ) + ) { + status = 2 + } + } catch (e) { + status = 2 + } + + try { + if ( + !(await pageInstance.evaluate( + 'next.appDir || __NEXT_DATA__.page && !__NEXT_DATA__.err' + )) + ) { + status = 1 + } + } catch (e) { + status = 1 + } + + await reportMeasurement('page status', status, 'status code') + + // reload page + await session.reload('reload page') + + await reportMeasurement( + 'console output', + shell.output.split(/\n/).length, + 'lines' + ) + + // HMR + if (pageConfig.hmr) { + let hmrEvent = () => {} + pageInstance.exposeBinding( + 'TURBOPACK_HMR_EVENT', + (_source, latency) => { + hmrEvent(latency) + } + ) + const { file, before, after } = pageConfig.hmr + const path = resolve(benchmarkDir, file) + const content = await readFile(path, 'utf8') + cleanupTasks.push(async () => { + await writeFile(path, content, 'utf8') + }) + let currentContent = content + /* eslint-disable no-await-in-loop */ + for (let hmrAttempt = 0; hmrAttempt < 10; hmrAttempt++) { + if (hmrAttempt > 0) { + await new Promise((resolve) => { + setTimeout(resolve, 1000) + }) + } + const linesStart = shell.output.split(/\n/).length + let reportedName + if (hmrAttempt < 3) { + reportedName = 'hmr/warmup' + } else { + reportedName = 'hmr' + } + await pageInstance.evaluate( + 'window.__NEXT_HMR_CB = (arg) => TURBOPACK_HMR_EVENT(arg); window.__NEXT_HMR_LATENCY_CB = (arg) => TURBOPACK_HMR_EVENT(arg);' + ) + // eslint-disable-next-line no-loop-func + const hmrDone = new Promise((resolve) => { + let once = true + const end = async (code) => { + const success = code <= 1 + if (!success && !reportedName) reportedName = 'hmr' + if (reportedName) { + await reportMeasurement( + `${reportedName}/status`, + code, + 'status code' + ) + } + clearTimeout(timeout) + resolve(success) + } + cleanupTasks.push(async () => { + if (!once) return + once = false + await end(3) + }) + const timeout = setTimeout(async () => { + if (!once) return + once = false + await end(2) + }, 60000) + hmrEvent = async (latency) => { + if (!once) return + once = false + if (reportedName) { + if (typeof latency === 'number') { + await reportMeasurement( + `${reportedName}/reported latency`, + latency, + 'ms' + ) + } + await measureTime(reportedName, { + relativeTo: `${reportedName}/start`, + }) + } + await end(0) + } + pageInstance.once('load', async () => { + if (!once) return + once = false + if (reportedName) { + await measureTime(reportedName, { + relativeTo: `${reportedName}/start`, + }) + } + await end(1) + }) + }) + const idx = before + ? currentContent.indexOf(before) + : currentContent.indexOf(after) + after.length + + let newContent = `${currentContent}\n\n/* HMR */` + if (file.endsWith('.tsx')) { + newContent = `${currentContent.slice( + 0, + idx + )}
HMR
${currentContent.slice(idx)}` + } else if (file.endsWith('.css')) { + newContent = `${currentContent.slice( + 0, + idx + )}\n--hmr-test-${hmrAttempt}: 0;\n${currentContent.slice(idx)}` + } else if (file.endsWith('.mdx')) { + newContent = `${currentContent.slice( + 0, + idx + )}\n\nHMR\n\n${currentContent.slice(idx)}` + } + + if (reportedName) { + await measureTime(`${reportedName}/start`) + } + + if (currentContent === newContent) { + throw new Error("HMR didn't change content") + } + await writeFile(path, newContent, 'utf8') + currentContent = newContent + const success = await hmrDone + + if (reportedName) { + await reportMeasurement( + `console output/${reportedName}`, + shell.output.split(/\n/).length - linesStart, + 'lines' + ) + } + + if (!success) break + } + /* eslint-enable no-await-in-loop */ + } + + if (turbopack) { + // close dev server and browser + await killShell() + await closeSession() + } else { + // wait for persistent cache to be written + const waitPromise = new Promise((resolve) => { + setTimeout(resolve, 5000) + }) + const cacheLocation = join( + benchmarkDir, + '.next', + 'cache', + 'webpack', + 'client-development' + ) + await Promise.race([ + waitForFile(join(cacheLocation, 'index.pack')), + waitForFile(join(cacheLocation, 'index.pack.gz')), + ]) + await measureTime('cache created') + await waitPromise + await measureTime('waiting') + + // close dev server and browser + await killShell() + await closeSession() + } + + // startup new browser + session = await newBrowserSession({}) + await measureTime('browser startup', { + props: { turbopack: null, page: null }, + }) + + // run command to start dev server + shell = command('pnpm', args, { + cwd: benchmarkDir, + env, + }) + + // wait for server to be ready + const { + groups: { url: url2 }, + } = await shell.waitForOutput(START_SERVER_REGEXP) + await shell.reportMemUsage('mem usage after startup with cache') + + // open page + await session.hardNavigation( + 'open page with cache', + url2 + pageConfig.url + ) + + await reportMeasurement( + 'console output with cache', + shell.output.split(/\n/).length, + 'lines' + ) + await shell.reportMemUsage('mem usage after open page with cache') + } catch (e) { + console.log('CAUGHT', e) + throw e + } finally { + // This must run in order + // eslint-disable-next-line no-await-in-loop + for (const task of cleanupTasks.reverse()) await task() + await measureTime('shutdown') + } + } + +const pages = { + homepage: { + url: '/', + hmr: { + file: 'components/lodash.js', + before: '

Client Component

', + }, + }, +} + +describe( + 'heavy-npm-deps dev test', + { + turbopack: true, + page: Object.keys(pages), + }, + nextDevWorkflow('heavy-npm-deps', pages) +) + +async function retry(fn) { + let lastError + for (let i = 100; i < 2000; i += 100) { + try { + // eslint-disable-next-line no-await-in-loop + await fn() + return + } catch (e) { + lastError = e + // eslint-disable-next-line no-await-in-loop + await new Promise((resolve) => { + setTimeout(resolve, i) + }) + } + } + throw lastError +} + +function measureTime(name, options) { + return devlow.measureTime(name, { + props: { + git_sha: GIT_SHA, + git_branch: GIT_BRANCH, + ...options?.props, + }, + ...options, + }) +} + +function reportMeasurement(name, value, unit, options) { + return devlow.reportMeasurement(name, value, unit, { + props: { + git_sha: GIT_SHA, + git_branch: GIT_BRANCH, + ...options?.props, + }, + ...options, + }) +}