From 9cc1c3c5762765fa85fbda8b418d8db079e881fe Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Tue, 28 Jun 2022 14:48:23 +0200 Subject: [PATCH] Upgrade Edge Runtime (#38105) --- package.json | 2 +- .../@edge-runtime/primitives/index.js | 542 +++++++++--------- .../@edge-runtime/primitives/package.json | 2 +- packages/next/compiled/edge-runtime/index.js | 2 +- packages/next/package.json | 4 +- pnpm-lock.yaml | 41 +- 6 files changed, 287 insertions(+), 306 deletions(-) diff --git a/package.json b/package.json index a89acbe40d5e..21563e783db9 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "@babel/plugin-proposal-object-rest-spread": "7.14.7", "@babel/preset-flow": "7.14.5", "@babel/preset-react": "7.14.5", - "@edge-runtime/jest-environment": "1.1.0-beta.8", + "@edge-runtime/jest-environment": "1.1.0-beta.10", "@fullhuman/postcss-purgecss": "1.3.0", "@mdx-js/loader": "0.18.0", "@next/bundle-analyzer": "workspace:*", diff --git a/packages/next/compiled/@edge-runtime/primitives/index.js b/packages/next/compiled/@edge-runtime/primitives/index.js index b9a8e3ffacfa..b0b9a1a912a1 100755 --- a/packages/next/compiled/@edge-runtime/primitives/index.js +++ b/packages/next/compiled/@edge-runtime/primitives/index.js @@ -1,39 +1,12 @@ +"use strict"; var __create = Object.create; var __defProp = Object.defineProperty; -var __defProps = Object.defineProperties; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropNames = Object.getOwnPropertyNames; -var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; -var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - if (__getOwnPropSymbols) - for (var prop of __getOwnPropSymbols(b)) { - if (__propIsEnum.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - } - return a; -}; -var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __objRest = (source, exclude) => { - var target = {}; - for (var prop in source) - if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) - target[prop] = source[prop]; - if (source != null && __getOwnPropSymbols) - for (var prop of __getOwnPropSymbols(source)) { - if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) - target[prop] = source[prop]; - } - return target; -}; var __esm = (fn, res) => function __init() { return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; }; @@ -67,6 +40,7 @@ var __privateAdd = (obj, member, value) => { // src/constants.js var require_constants = __commonJS({ "src/constants.js"(exports, module2) { + "use strict"; module2.exports.ENUMERABLE_PROPERTIES = [ "AbortController", "AbortSignal", @@ -170,6 +144,7 @@ var require_constants = __commonJS({ // src/utils.js var require_utils = __commonJS({ "src/utils.js"(exports, module2) { + "use strict"; var CONSTANTS = require_constants(); function defineEnumerableProperty(obj, key, value) { if (!CONSTANTS.ENUMERABLE_PROPERTIES.includes(key)) { @@ -917,6 +892,7 @@ var require_cjs = __commonJS({ // src/polyfills/base64.js var require_base64 = __commonJS({ "src/polyfills/base64.js"(exports, module2) { + "use strict"; module2.exports.atob = (enc) => Buffer.from(enc, "base64").toString("binary"); module2.exports.btoa = (str) => Buffer.from(str, "binary").toString("base64"); } @@ -3488,6 +3464,7 @@ var require_cjs2 = __commonJS({ // src/polyfills/buffer.js var require_buffer = __commonJS({ "src/polyfills/buffer.js"(exports, module2) { + "use strict"; var buffer = require_buffer(); buffer.Blob = require_cjs2().Blob; module2.exports = buffer; @@ -4098,10 +4075,11 @@ function HexBlock(BaseClass) { return this.valueHexView.byteLength === this.valueHexView.buffer.byteLength ? this.valueHexView.buffer : this.valueHexView.slice().buffer; } toJSON() { - return __spreadProps(__spreadValues({}, super.toJSON()), { + return { + ...super.toJSON(), isHexOnly: this.isHexOnly, valueHex: Convert.ToHex(this.valueHexView) - }); + }; } }, "Some"), _a2.NAME = "hexBlock", _a2; } @@ -4971,11 +4949,12 @@ var init_index_es2 = __esm({ return inputOffset + this.blockLength; } toJSON() { - return __spreadProps(__spreadValues({}, super.toJSON()), { + return { + ...super.toJSON(), tagClass: this.tagClass, tagNumber: this.tagNumber, isConstructed: this.isConstructed - }); + }; } }; __name(LocalIdentificationBlock, "LocalIdentificationBlock"); @@ -5069,19 +5048,19 @@ var init_index_es2 = __esm({ return retBuf; } toJSON() { - return __spreadProps(__spreadValues({}, super.toJSON()), { + return { + ...super.toJSON(), isIndefiniteForm: this.isIndefiniteForm, longFormUsed: this.longFormUsed, length: this.length - }); + }; } }; __name(LocalLengthBlock, "LocalLengthBlock"); LocalLengthBlock.NAME = "lengthBlock"; typeStore = {}; BaseBlock = class extends LocalBaseBlock { - constructor(_a2 = {}, valueBlockType) { - var _b = _a2, { name = EMPTY_STRING, optional = false, primitiveSchema } = _b, parameters = __objRest(_b, ["name", "optional", "primitiveSchema"]); + constructor({ name = EMPTY_STRING, optional = false, primitiveSchema, ...parameters } = {}, valueBlockType) { super(parameters); this.name = name; this.optional = optional; @@ -5130,13 +5109,14 @@ var init_index_es2 = __esm({ return EMPTY_BUFFER; } toJSON() { - const object = __spreadProps(__spreadValues({}, super.toJSON()), { + const object = { + ...super.toJSON(), idBlock: this.idBlock.toJSON(), lenBlock: this.lenBlock.toJSON(), valueBlock: this.valueBlock.toJSON(), name: this.name, optional: this.optional - }); + }; if (this.primitiveSchema) object.primitiveSchema = this.primitiveSchema.toJSON(); return object; @@ -5166,8 +5146,7 @@ var init_index_es2 = __esm({ BaseBlock.NAME = "BaseBlock"; __name(prepareIndefiniteForm, "prepareIndefiniteForm"); BaseStringBlock = class extends BaseBlock { - constructor(_a2 = {}, stringValueBlockType) { - var _b = _a2, { value = EMPTY_STRING } = _b, parameters = __objRest(_b, ["value"]); + constructor({ value = EMPTY_STRING, ...parameters } = {}, stringValueBlockType) { super(parameters, stringValueBlockType); if (value) { this.fromString(value); @@ -5201,8 +5180,7 @@ var init_index_es2 = __esm({ __name(BaseStringBlock, "BaseStringBlock"); BaseStringBlock.NAME = "BaseStringBlock"; LocalPrimitiveValueBlock = class extends HexBlock(ValueBlock) { - constructor(_a2 = {}) { - var _b = _a2, { isHexOnly = true } = _b, parameters = __objRest(_b, ["isHexOnly"]); + constructor({ isHexOnly = true, ...parameters } = {}) { super(parameters); this.isHexOnly = isHexOnly; } @@ -5226,8 +5204,7 @@ var init_index_es2 = __esm({ __name(fromBER, "fromBER"); __name(checkLen, "checkLen"); LocalConstructedValueBlock = class extends ValueBlock { - constructor(_a2 = {}) { - var _b = _a2, { value = [], isIndefiniteForm = false } = _b, parameters = __objRest(_b, ["value", "isIndefiniteForm"]); + constructor({ value = [], isIndefiniteForm = false, ...parameters } = {}) { super(parameters); this.value = value; this.isIndefiniteForm = isIndefiniteForm; @@ -5278,10 +5255,11 @@ var init_index_es2 = __esm({ return EMPTY_BUFFER; } toJSON() { - const object = __spreadProps(__spreadValues({}, super.toJSON()), { + const object = { + ...super.toJSON(), isIndefiniteForm: this.isIndefiniteForm, value: [] - }); + }; for (const value of this.value) { object.value.push(value.toJSON()); } @@ -5392,8 +5370,7 @@ ${values.join("\n")}` : `${blockName} :`; })(); Null.NAME = "NULL"; LocalBooleanValueBlock = class extends HexBlock(ValueBlock) { - constructor(_a2 = {}) { - var _b = _a2, { value } = _b, parameters = __objRest(_b, ["value"]); + constructor({ value, ...parameters } = {}) { super(parameters); if (parameters.valueHex) { this.valueHexView = BufferSourceConverter.toUint8Array(parameters.valueHex); @@ -5432,9 +5409,10 @@ ${values.join("\n")}` : `${blockName} :`; return this.valueHexView.slice(); } toJSON() { - return __spreadProps(__spreadValues({}, super.toJSON()), { + return { + ...super.toJSON(), value: this.value - }); + }; } }; __name(LocalBooleanValueBlock, "LocalBooleanValueBlock"); @@ -5462,8 +5440,7 @@ ${values.join("\n")}` : `${blockName} :`; })(); Boolean2.NAME = "BOOLEAN"; LocalOctetStringValueBlock = class extends HexBlock(LocalConstructedValueBlock) { - constructor(_a2 = {}) { - var _b = _a2, { isConstructed = false } = _b, parameters = __objRest(_b, ["isConstructed"]); + constructor({ isConstructed = false, ...parameters } = {}) { super(parameters); this.isConstructed = isConstructed; } @@ -5502,26 +5479,29 @@ ${values.join("\n")}` : `${blockName} :`; return sizeOnly ? new ArrayBuffer(this.valueHexView.byteLength) : this.valueHexView.slice().buffer; } toJSON() { - return __spreadProps(__spreadValues({}, super.toJSON()), { + return { + ...super.toJSON(), isConstructed: this.isConstructed - }); + }; } }; __name(LocalOctetStringValueBlock, "LocalOctetStringValueBlock"); LocalOctetStringValueBlock.NAME = "OctetStringValueBlock"; OctetString = class extends BaseBlock { - constructor(_a2 = {}) { - var _b = _a2, { idBlock = {}, lenBlock = {} } = _b, parameters = __objRest(_b, ["idBlock", "lenBlock"]); - var _b2, _c; - (_b2 = parameters.isConstructed) !== null && _b2 !== void 0 ? _b2 : parameters.isConstructed = !!((_c = parameters.value) === null || _c === void 0 ? void 0 : _c.length); - super(__spreadValues({ - idBlock: __spreadValues({ - isConstructed: parameters.isConstructed - }, idBlock), - lenBlock: __spreadProps(__spreadValues({}, lenBlock), { + constructor({ idBlock = {}, lenBlock = {}, ...parameters } = {}) { + var _b, _c; + (_b = parameters.isConstructed) !== null && _b !== void 0 ? _b : parameters.isConstructed = !!((_c = parameters.value) === null || _c === void 0 ? void 0 : _c.length); + super({ + idBlock: { + isConstructed: parameters.isConstructed, + ...idBlock + }, + lenBlock: { + ...lenBlock, isIndefiniteForm: !!parameters.isIndefiniteForm - }) - }, parameters), LocalOctetStringValueBlock); + }, + ...parameters + }, LocalOctetStringValueBlock); this.idBlock.tagClass = 1; this.idBlock.tagNumber = 4; } @@ -5576,8 +5556,7 @@ ${values.join("\n")}` : `${blockName} :`; })(); OctetString.NAME = OCTET_STRING_NAME; LocalBitStringValueBlock = class extends HexBlock(LocalConstructedValueBlock) { - constructor(_a2 = {}) { - var _b = _a2, { unusedBits = 0, isConstructed = false } = _b, parameters = __objRest(_b, ["unusedBits", "isConstructed"]); + constructor({ unusedBits = 0, isConstructed = false, ...parameters } = {}) { super(parameters); this.unusedBits = unusedBits; this.isConstructed = isConstructed; @@ -5657,27 +5636,30 @@ ${values.join("\n")}` : `${blockName} :`; return retView.buffer; } toJSON() { - return __spreadProps(__spreadValues({}, super.toJSON()), { + return { + ...super.toJSON(), unusedBits: this.unusedBits, isConstructed: this.isConstructed - }); + }; } }; __name(LocalBitStringValueBlock, "LocalBitStringValueBlock"); LocalBitStringValueBlock.NAME = "BitStringValueBlock"; BitString = class extends BaseBlock { - constructor(_a2 = {}) { - var _b = _a2, { idBlock = {}, lenBlock = {} } = _b, parameters = __objRest(_b, ["idBlock", "lenBlock"]); - var _b2, _c; - (_b2 = parameters.isConstructed) !== null && _b2 !== void 0 ? _b2 : parameters.isConstructed = !!((_c = parameters.value) === null || _c === void 0 ? void 0 : _c.length); - super(__spreadValues({ - idBlock: __spreadValues({ - isConstructed: parameters.isConstructed - }, idBlock), - lenBlock: __spreadProps(__spreadValues({}, lenBlock), { + constructor({ idBlock = {}, lenBlock = {}, ...parameters } = {}) { + var _b, _c; + (_b = parameters.isConstructed) !== null && _b !== void 0 ? _b : parameters.isConstructed = !!((_c = parameters.value) === null || _c === void 0 ? void 0 : _c.length); + super({ + idBlock: { + isConstructed: parameters.isConstructed, + ...idBlock + }, + lenBlock: { + ...lenBlock, isIndefiniteForm: !!parameters.isIndefiniteForm - }) - }, parameters), LocalBitStringValueBlock); + }, + ...parameters + }, LocalBitStringValueBlock); this.idBlock.tagClass = 1; this.idBlock.tagNumber = 3; } @@ -5710,8 +5692,7 @@ ${values.join("\n")}` : `${blockName} :`; __name(power2, "power2"); __name(viewSub, "viewSub"); LocalIntegerValueBlock = class extends HexBlock(ValueBlock) { - constructor(_a2 = {}) { - var _b = _a2, { value } = _b, parameters = __objRest(_b, ["value"]); + constructor({ value, ...parameters } = {}) { super(parameters); this._valueDec = 0; if (parameters.valueHex) { @@ -5790,9 +5771,10 @@ ${values.join("\n")}` : `${blockName} :`; return sizeOnly ? new ArrayBuffer(this.valueHexView.length) : this.valueHexView.slice().buffer; } toJSON() { - return __spreadProps(__spreadValues({}, super.toJSON()), { + return { + ...super.toJSON(), valueDec: this.valueDec - }); + }; } toString() { const firstBit = this.valueHexView.length * 8 - 1; @@ -5913,8 +5895,7 @@ ${values.join("\n")}` : `${blockName} :`; })(); Enumerated.NAME = "ENUMERATED"; LocalSidValueBlock = class extends HexBlock(ValueBlock) { - constructor(_a2 = {}) { - var _b = _a2, { valueDec = -1, isFirstSid = false } = _b, parameters = __objRest(_b, ["valueDec", "isFirstSid"]); + constructor({ valueDec = -1, isFirstSid = false, ...parameters } = {}) { super(parameters); this.valueDec = valueDec; this.isFirstSid = isFirstSid; @@ -6017,17 +5998,17 @@ ${values.join("\n")}` : `${blockName} :`; return result; } toJSON() { - return __spreadProps(__spreadValues({}, super.toJSON()), { + return { + ...super.toJSON(), valueDec: this.valueDec, isFirstSid: this.isFirstSid - }); + }; } }; __name(LocalSidValueBlock, "LocalSidValueBlock"); LocalSidValueBlock.NAME = "sidBlock"; LocalObjectIdentifierValueBlock = class extends ValueBlock { - constructor(_a2 = {}) { - var _b = _a2, { value = EMPTY_STRING } = _b, parameters = __objRest(_b, ["value"]); + constructor({ value = EMPTY_STRING, ...parameters } = {}) { super(parameters); this.value = []; if (value) { @@ -6137,10 +6118,11 @@ ${values.join("\n")}` : `${blockName} :`; return result; } toJSON() { - const object = __spreadProps(__spreadValues({}, super.toJSON()), { + const object = { + ...super.toJSON(), value: this.toString(), sidArray: [] - }); + }; for (let i = 0; i < this.value.length; i++) { object.sidArray.push(this.value[i].toJSON()); } @@ -6165,9 +6147,10 @@ ${values.join("\n")}` : `${blockName} :`; return `${this.constructor.NAME} : ${this.valueBlock.toString() || "empty"}`; } toJSON() { - return __spreadProps(__spreadValues({}, super.toJSON()), { + return { + ...super.toJSON(), value: this.getValue() - }); + }; } }; __name(ObjectIdentifier, "ObjectIdentifier"); @@ -6177,8 +6160,7 @@ ${values.join("\n")}` : `${blockName} :`; })(); ObjectIdentifier.NAME = "OBJECT IDENTIFIER"; LocalRelativeSidValueBlock = class extends HexBlock(LocalBaseBlock) { - constructor(_a2 = {}) { - var _b = _a2, { valueDec = 0 } = _b, parameters = __objRest(_b, ["valueDec"]); + constructor({ valueDec = 0, ...parameters } = {}) { super(parameters); this.valueDec = valueDec; } @@ -6250,16 +6232,16 @@ ${values.join("\n")}` : `${blockName} :`; return result; } toJSON() { - return __spreadProps(__spreadValues({}, super.toJSON()), { + return { + ...super.toJSON(), valueDec: this.valueDec - }); + }; } }; __name(LocalRelativeSidValueBlock, "LocalRelativeSidValueBlock"); LocalRelativeSidValueBlock.NAME = "relativeSidBlock"; LocalRelativeObjectIdentifierValueBlock = class extends ValueBlock { - constructor(_a2 = {}) { - var _b = _a2, { value = EMPTY_STRING } = _b, parameters = __objRest(_b, ["value"]); + constructor({ value = EMPTY_STRING, ...parameters } = {}) { super(parameters); this.value = []; if (value) { @@ -6331,10 +6313,11 @@ ${values.join("\n")}` : `${blockName} :`; return result; } toJSON() { - const object = __spreadProps(__spreadValues({}, super.toJSON()), { + const object = { + ...super.toJSON(), value: this.toString(), sidArray: [] - }); + }; for (let i = 0; i < this.value.length; i++) object.sidArray.push(this.value[i].toJSON()); return object; @@ -6358,9 +6341,10 @@ ${values.join("\n")}` : `${blockName} :`; return `${this.constructor.NAME} : ${this.valueBlock.toString() || "empty"}`; } toJSON() { - return __spreadProps(__spreadValues({}, super.toJSON()), { + return { + ...super.toJSON(), value: this.getValue() - }); + }; } }; __name(RelativeObjectIdentifier, "RelativeObjectIdentifier"); @@ -6396,16 +6380,16 @@ ${values.join("\n")}` : `${blockName} :`; })(); Set2.NAME = "SET"; LocalStringValueBlock = class extends HexBlock(ValueBlock) { - constructor(_a2 = {}) { - var parameters = __objRest(_a2, []); + constructor({ ...parameters } = {}) { super(parameters); this.isHexOnly = true; this.value = EMPTY_STRING; } toJSON() { - return __spreadProps(__spreadValues({}, super.toJSON()), { + return { + ...super.toJSON(), value: this.value - }); + }; } }; __name(LocalStringValueBlock, "LocalStringValueBlock"); @@ -6415,8 +6399,7 @@ ${values.join("\n")}` : `${blockName} :`; __name(LocalSimpleStringValueBlock, "LocalSimpleStringValueBlock"); LocalSimpleStringValueBlock.NAME = "SimpleStringValueBlock"; LocalSimpleStringBlock = class extends BaseStringBlock { - constructor(_a2 = {}) { - var parameters = __objRest(_a2, []); + constructor({ ...parameters } = {}) { super(parameters, LocalSimpleStringValueBlock); } fromBuffer(inputBuffer) { @@ -6475,8 +6458,7 @@ ${values.join("\n")}` : `${blockName} :`; __name(LocalBmpStringValueBlock, "LocalBmpStringValueBlock"); LocalBmpStringValueBlock.NAME = "BmpStringValueBlock"; BmpString = class extends LocalBmpStringValueBlock { - constructor(_a2 = {}) { - var parameters = __objRest(_a2, []); + constructor({ ...parameters } = {}) { super(parameters); this.idBlock.tagClass = 1; this.idBlock.tagNumber = 30; @@ -6518,8 +6500,7 @@ ${values.join("\n")}` : `${blockName} :`; __name(LocalUniversalStringValueBlock, "LocalUniversalStringValueBlock"); LocalUniversalStringValueBlock.NAME = "UniversalStringValueBlock"; UniversalString = class extends LocalUniversalStringValueBlock { - constructor(_a2 = {}) { - var parameters = __objRest(_a2, []); + constructor({ ...parameters } = {}) { super(parameters); this.idBlock.tagClass = 1; this.idBlock.tagNumber = 28; @@ -6649,8 +6630,7 @@ ${values.join("\n")}` : `${blockName} :`; })(); CharacterString.NAME = "CharacterString"; UTCTime = class extends VisibleString { - constructor(_a2 = {}) { - var _b = _a2, { value, valueDate } = _b, parameters = __objRest(_b, ["value", "valueDate"]); + constructor({ value, valueDate, ...parameters } = {}) { super(parameters); this.year = 0; this.month = 0; @@ -6729,14 +6709,15 @@ ${values.join("\n")}` : `${blockName} :`; return `${this.constructor.NAME} : ${this.toDate().toISOString()}`; } toJSON() { - return __spreadProps(__spreadValues({}, super.toJSON()), { + return { + ...super.toJSON(), year: this.year, month: this.month, day: this.day, hour: this.hour, minute: this.minute, second: this.second - }); + }; } }; __name(UTCTime, "UTCTime"); @@ -6911,9 +6892,10 @@ ${values.join("\n")}` : `${blockName} :`; return super.toString(encoding); } toJSON() { - return __spreadProps(__spreadValues({}, super.toJSON()), { + return { + ...super.toJSON(), millisecond: this.millisecond - }); + }; } }; __name(GeneralizedTime, "GeneralizedTime"); @@ -6995,16 +6977,14 @@ ${values.join("\n")}` : `${blockName} :`; }; __name(Any, "Any"); Choice = class extends Any { - constructor(_a2 = {}) { - var _b = _a2, { value = [] } = _b, parameters = __objRest(_b, ["value"]); + constructor({ value = [], ...parameters } = {}) { super(parameters); this.value = value; } }; __name(Choice, "Choice"); Repeated = class extends Any { - constructor(_a2 = {}) { - var _b = _a2, { value = new Any(), local = false } = _b, parameters = __objRest(_b, ["value", "local"]); + constructor({ value = new Any(), local = false, ...parameters } = {}) { super(parameters); this.value = value; this.local = local; @@ -7036,10 +7016,10 @@ ${values.join("\n")}` : `${blockName} :`; } }); -// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/enums.js +// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/enums.js var AsnTypeTypes, AsnPropTypes; var init_enums = __esm({ - "../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/enums.js"() { + "../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/enums.js"() { (function(AsnTypeTypes2) { AsnTypeTypes2[AsnTypeTypes2["Sequence"] = 0] = "Sequence"; AsnTypeTypes2[AsnTypeTypes2["Set"] = 1] = "Set"; @@ -7077,7 +7057,7 @@ var init_enums = __esm({ } }); -// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/converters.js +// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/converters.js function createStringConverter(Asn1Type) { return { fromASN: (value) => value.valueBlock.value, @@ -7136,7 +7116,7 @@ function defaultConverter(type) { } var AsnAnyConverter, AsnIntegerConverter, AsnEnumeratedConverter, AsnBitStringConverter, AsnObjectIdentifierConverter, AsnBooleanConverter, AsnOctetStringConverter, AsnUtf8StringConverter, AsnBmpStringConverter, AsnUniversalStringConverter, AsnNumericStringConverter, AsnPrintableStringConverter, AsnTeletexStringConverter, AsnVideotexStringConverter, AsnIA5StringConverter, AsnGraphicStringConverter, AsnVisibleStringConverter, AsnGeneralStringConverter, AsnCharacterStringConverter, AsnUTCTimeConverter, AsnGeneralizedTimeConverter, AsnNullConverter; var init_converters = __esm({ - "../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/converters.js"() { + "../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/converters.js"() { init_index_es2(); init_enums(); AsnAnyConverter = { @@ -7153,7 +7133,7 @@ var init_converters = __esm({ } }; AsnIntegerConverter = { - fromASN: (value) => value.valueBlock.valueHex.byteLength > 4 ? value.valueBlock.toString() : value.valueBlock.valueDec, + fromASN: (value) => value.valueBlock.valueHexView.byteLength >= 4 ? value.valueBlock.toString() : value.valueBlock.valueDec, toASN: (value) => new Integer({ value }) }; AsnEnumeratedConverter = { @@ -7207,31 +7187,31 @@ var init_converters = __esm({ } }); -// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/types/bit_string.js +// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/types/bit_string.js var init_bit_string = __esm({ - "../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/types/bit_string.js"() { + "../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/types/bit_string.js"() { init_index_es2(); init_index_es(); } }); -// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/types/octet_string.js +// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/types/octet_string.js var init_octet_string = __esm({ - "../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/types/octet_string.js"() { + "../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/types/octet_string.js"() { init_index_es2(); init_index_es(); } }); -// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/types/index.js +// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/types/index.js var init_types = __esm({ - "../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/types/index.js"() { + "../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/types/index.js"() { init_bit_string(); init_octet_string(); } }); -// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/helper.js +// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/helper.js function isConvertible(target) { if (target && target.prototype) { if (target.prototype.toASN && target.prototype.fromASN) { @@ -7271,17 +7251,17 @@ function isArrayEqual(bytes1, bytes2) { return true; } var init_helper = __esm({ - "../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/helper.js"() { + "../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/helper.js"() { __name(isConvertible, "isConvertible"); __name(isTypeOfArray, "isTypeOfArray"); __name(isArrayEqual, "isArrayEqual"); } }); -// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/schema.js +// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/schema.js var AsnSchemaStorage; var init_schema = __esm({ - "../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/schema.js"() { + "../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/schema.js"() { init_index_es2(); init_enums(); init_helper(); @@ -7430,20 +7410,21 @@ var init_schema = __esm({ } }); -// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/storage.js +// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/storage.js var schemaStorage; var init_storage = __esm({ - "../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/storage.js"() { + "../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/storage.js"() { init_schema(); schemaStorage = new AsnSchemaStorage(); } }); -// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/decorators.js +// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/decorators.js var AsnType, AsnProp; var init_decorators = __esm({ - "../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/decorators.js"() { + "../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/decorators.js"() { init_converters(); + init_enums(); init_storage(); AsnType = /* @__PURE__ */ __name((options) => (target) => { let schema; @@ -7476,10 +7457,10 @@ var init_decorators = __esm({ } }); -// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/errors/schema_validation.js +// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/errors/schema_validation.js var AsnSchemaValidationError; var init_schema_validation = __esm({ - "../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/errors/schema_validation.js"() { + "../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/errors/schema_validation.js"() { AsnSchemaValidationError = class extends Error { constructor() { super(...arguments); @@ -7490,17 +7471,17 @@ var init_schema_validation = __esm({ } }); -// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/errors/index.js +// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/errors/index.js var init_errors = __esm({ - "../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/errors/index.js"() { + "../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/errors/index.js"() { init_schema_validation(); } }); -// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/parser.js +// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/parser.js var AsnParser; var init_parser = __esm({ - "../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/parser.js"() { + "../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/parser.js"() { init_index_es2(); init_enums(); init_converters(); @@ -7509,17 +7490,7 @@ var init_parser = __esm({ init_storage(); AsnParser = class { static parse(data, target) { - let buf; - if (data instanceof ArrayBuffer) { - buf = data; - } else if (typeof Buffer !== "undefined" && Buffer.isBuffer(data)) { - buf = new Uint8Array(data).buffer; - } else if (ArrayBuffer.isView(data) || data.buffer instanceof ArrayBuffer) { - buf = data.buffer; - } else { - throw new TypeError("Wrong type of 'data' argument"); - } - const asn1Parsed = fromBER(buf); + const asn1Parsed = fromBER(data); if (asn1Parsed.result.error) { throw new Error(asn1Parsed.result.error); } @@ -7548,7 +7519,7 @@ var init_parser = __esm({ delete asn1Schema[key]; } } - const asn1ComparedSchema = compareSchema(asn1Schema, asn1Schema, targetSchema); + const asn1ComparedSchema = compareSchema({}, asn1Schema, targetSchema); if (!asn1ComparedSchema.verified) { throw new AsnSchemaValidationError(`Data does not match to ${target.name} ASN1 schema. ${asn1ComparedSchema.result.error}`); } @@ -7565,7 +7536,8 @@ var init_parser = __esm({ } } for (const key in schema.items) { - if (!asn1Schema[key]) { + const asn1SchemaValue = asn1ComparedSchema.result[key]; + if (!asn1SchemaValue) { continue; } const schemaItem = schema.items[key]; @@ -7578,14 +7550,14 @@ var init_parser = __esm({ if (schemaItem.implicit) { const Container = schemaItem.repeated === "sequence" ? Sequence : Set2; const newItem = new Container(); - newItem.valueBlock = asn1Schema[key].valueBlock; + newItem.valueBlock = asn1SchemaValue.valueBlock; const value = fromBER(newItem.toBER(false)).result.valueBlock.value; res[key] = Array.from(value, (element) => converter.fromASN(element)); } else { - res[key] = Array.from(asn1Schema[key], (element) => converter.fromASN(element)); + res[key] = Array.from(asn1SchemaValue, (element) => converter.fromASN(element)); } } else { - let value = asn1Schema[key]; + let value = asn1SchemaValue; if (schemaItem.implicit) { let newItem; if (isConvertible(schemaItem.type)) { @@ -7605,9 +7577,9 @@ var init_parser = __esm({ } } else { if (schemaItem.repeated) { - res[key] = Array.from(asn1Schema[key], (element) => this.fromASN(element, schemaItem.type)); + res[key] = Array.from(asn1SchemaValue, (element) => this.fromASN(element, schemaItem.type)); } else { - res[key] = this.fromASN(asn1Schema[key], schemaItem.type); + res[key] = this.fromASN(asn1SchemaValue, schemaItem.type); } } } @@ -7624,10 +7596,10 @@ var init_parser = __esm({ } }); -// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/serializer.js +// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/serializer.js var AsnSerializer; var init_serializer = __esm({ - "../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/serializer.js"() { + "../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/serializer.js"() { init_index_es2(); init_converters(); init_enums(); @@ -7671,13 +7643,14 @@ var init_serializer = __esm({ if (!schemaItem.repeated && (typeof schemaItem.type === "number" || isConvertible(schemaItem.type))) { const value = {}; value.valueHex = asn1Item instanceof Null ? asn1Item.valueBeforeDecode : asn1Item.valueBlock.toBER(); - asn1Value.push(new Primitive(__spreadValues({ + asn1Value.push(new Primitive({ optional: schemaItem.optional, idBlock: { tagClass: 3, tagNumber: schemaItem.context - } - }, value))); + }, + ...value + })); } else { asn1Value.push(new Constructed({ optional: schemaItem.optional, @@ -7756,16 +7729,16 @@ var init_serializer = __esm({ } }); -// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/objects.js +// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/objects.js var init_objects = __esm({ - "../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/objects.js"() { + "../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/objects.js"() { } }); -// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/convert.js +// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/convert.js var AsnConvert; var init_convert = __esm({ - "../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/convert.js"() { + "../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/convert.js"() { init_index_es2(); init_index_es(); init_parser(); @@ -7790,9 +7763,9 @@ var init_convert = __esm({ } }); -// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/index.js +// ../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/index.js var init_es2015 = __esm({ - "../../node_modules/.pnpm/@peculiar+asn1-schema@2.1.8/node_modules/@peculiar/asn1-schema/build/es2015/index.js"() { + "../../node_modules/.pnpm/@peculiar+asn1-schema@2.2.0/node_modules/@peculiar/asn1-schema/build/es2015/index.js"() { init_converters(); init_types(); init_decorators(); @@ -8550,7 +8523,7 @@ var init_index_es3 = __esm({ } } static getSchemaByName(schema, name = DEFAULT_SCHEMA) { - return __spreadValues(__spreadValues({}, schema.names[DEFAULT_SCHEMA]), schema.names[name]); + return { ...schema.names[DEFAULT_SCHEMA], ...schema.names[name] }; } }; __name(JsonTransform, "JsonTransform"); @@ -8674,10 +8647,11 @@ var init_index_es3 = __esm({ obj[key] = value; } } else { - const newOptions = __spreadProps(__spreadValues({}, options), { + const newOptions = { + ...options, targetSchema: item.type, schemaName - }); + }; if (item.repeated) { obj[key] = value.map((el) => this.fromJSON(el, newOptions)); } else { @@ -9798,9 +9772,10 @@ var init_webcrypto_core_es = __esm({ const oid = new ObjectIdentifier2(); oid.value = item.id; const raw = AsnConvert.serialize(oid); - this.items.push(__spreadProps(__spreadValues({}, item), { + this.items.push({ + ...item, raw - })); + }); this.names.push(item.name); } static find(nameOrId) { @@ -9941,7 +9916,7 @@ var init_webcrypto_core_es = __esm({ this.defaultLength = 0; } digest(...args) { - args[0] = __spreadValues({ length: this.defaultLength }, args[0]); + args[0] = { length: this.defaultLength, ...args[0] }; return super.digest.apply(this, args); } checkDigest(algorithm, data) { @@ -10042,7 +10017,7 @@ var init_webcrypto_core_es = __esm({ const [algorithm, extractable, keyUsages, ...params] = args; const preparedAlgorithm = this.prepareAlgorithm(algorithm); const provider = this.getProvider(preparedAlgorithm.name); - const result = await provider.generateKey(__spreadProps(__spreadValues({}, preparedAlgorithm), { name: provider.name }), extractable, keyUsages, ...params); + const result = await provider.generateKey({ ...preparedAlgorithm, name: provider.name }, extractable, keyUsages, ...params); return result; } async sign(...args) { @@ -10052,7 +10027,7 @@ var init_webcrypto_core_es = __esm({ const preparedAlgorithm = this.prepareAlgorithm(algorithm); const preparedData = BufferSourceConverter.toArrayBuffer(data); const provider = this.getProvider(preparedAlgorithm.name); - const result = await provider.sign(__spreadProps(__spreadValues({}, preparedAlgorithm), { name: provider.name }), key, preparedData, ...params); + const result = await provider.sign({ ...preparedAlgorithm, name: provider.name }, key, preparedData, ...params); return result; } async verify(...args) { @@ -10063,7 +10038,7 @@ var init_webcrypto_core_es = __esm({ const preparedData = BufferSourceConverter.toArrayBuffer(data); const preparedSignature = BufferSourceConverter.toArrayBuffer(signature); const provider = this.getProvider(preparedAlgorithm.name); - const result = await provider.verify(__spreadProps(__spreadValues({}, preparedAlgorithm), { name: provider.name }), key, preparedSignature, preparedData, ...params); + const result = await provider.verify({ ...preparedAlgorithm, name: provider.name }, key, preparedSignature, preparedData, ...params); return result; } async encrypt(...args) { @@ -10073,7 +10048,7 @@ var init_webcrypto_core_es = __esm({ const preparedAlgorithm = this.prepareAlgorithm(algorithm); const preparedData = BufferSourceConverter.toArrayBuffer(data); const provider = this.getProvider(preparedAlgorithm.name); - const result = await provider.encrypt(__spreadProps(__spreadValues({}, preparedAlgorithm), { name: provider.name }), key, preparedData, { keyUsage: true }, ...params); + const result = await provider.encrypt({ ...preparedAlgorithm, name: provider.name }, key, preparedData, { keyUsage: true }, ...params); return result; } async decrypt(...args) { @@ -10083,7 +10058,7 @@ var init_webcrypto_core_es = __esm({ const preparedAlgorithm = this.prepareAlgorithm(algorithm); const preparedData = BufferSourceConverter.toArrayBuffer(data); const provider = this.getProvider(preparedAlgorithm.name); - const result = await provider.decrypt(__spreadProps(__spreadValues({}, preparedAlgorithm), { name: provider.name }), key, preparedData, { keyUsage: true }, ...params); + const result = await provider.decrypt({ ...preparedAlgorithm, name: provider.name }, key, preparedData, { keyUsage: true }, ...params); return result; } async deriveBits(...args) { @@ -10092,7 +10067,7 @@ var init_webcrypto_core_es = __esm({ this.checkCryptoKey(baseKey); const preparedAlgorithm = this.prepareAlgorithm(algorithm); const provider = this.getProvider(preparedAlgorithm.name); - const result = await provider.deriveBits(__spreadProps(__spreadValues({}, preparedAlgorithm), { name: provider.name }), baseKey, length, { keyUsage: true }, ...params); + const result = await provider.deriveBits({ ...preparedAlgorithm, name: provider.name }, baseKey, length, { keyUsage: true }, ...params); return result; } async deriveKey(...args) { @@ -10104,7 +10079,7 @@ var init_webcrypto_core_es = __esm({ const preparedAlgorithm = this.prepareAlgorithm(algorithm); const provider = this.getProvider(preparedAlgorithm.name); provider.checkCryptoKey(baseKey, "deriveKey"); - const derivedBits = await provider.deriveBits(__spreadProps(__spreadValues({}, preparedAlgorithm), { name: provider.name }), baseKey, derivedKeyType.length || 512, { keyUsage: false }, ...params); + const derivedBits = await provider.deriveBits({ ...preparedAlgorithm, name: provider.name }, baseKey, derivedKeyType.length || 512, { keyUsage: false }, ...params); return this.importKey("raw", derivedBits, derivedKeyType, extractable, keyUsages, ...params); } async exportKey(...args) { @@ -10122,13 +10097,13 @@ var init_webcrypto_core_es = __esm({ const provider = this.getProvider(preparedAlgorithm.name); if (["pkcs8", "spki", "raw"].indexOf(format) !== -1) { const preparedData = BufferSourceConverter.toArrayBuffer(keyData); - return provider.importKey(format, preparedData, __spreadProps(__spreadValues({}, preparedAlgorithm), { name: provider.name }), extractable, keyUsages, ...params); + return provider.importKey(format, preparedData, { ...preparedAlgorithm, name: provider.name }, extractable, keyUsages, ...params); } else { if (!keyData.kty) { throw new TypeError("keyData: Is not JSON"); } } - return provider.importKey(format, keyData, __spreadProps(__spreadValues({}, preparedAlgorithm), { name: provider.name }), extractable, keyUsages, ...params); + return provider.importKey(format, keyData, { ...preparedAlgorithm, name: provider.name }, extractable, keyUsages, ...params); } async wrapKey(format, key, wrappingKey, wrapAlgorithm, ...args) { let keyData = await this.exportKey(format, key, ...args); @@ -10139,13 +10114,13 @@ var init_webcrypto_core_es = __esm({ const preparedAlgorithm = this.prepareAlgorithm(wrapAlgorithm); const preparedData = BufferSourceConverter.toArrayBuffer(keyData); const provider = this.getProvider(preparedAlgorithm.name); - return provider.encrypt(__spreadProps(__spreadValues({}, preparedAlgorithm), { name: provider.name }), wrappingKey, preparedData, { keyUsage: false }, ...args); + return provider.encrypt({ ...preparedAlgorithm, name: provider.name }, wrappingKey, preparedData, { keyUsage: false }, ...args); } async unwrapKey(format, wrappedKey, unwrappingKey, unwrapAlgorithm, unwrappedKeyAlgorithm, extractable, keyUsages, ...args) { const preparedAlgorithm = this.prepareAlgorithm(unwrapAlgorithm); const preparedData = BufferSourceConverter.toArrayBuffer(wrappedKey); const provider = this.getProvider(preparedAlgorithm.name); - let keyData = await provider.decrypt(__spreadProps(__spreadValues({}, preparedAlgorithm), { name: provider.name }), unwrappingKey, preparedData, { keyUsage: false }, ...args); + let keyData = await provider.decrypt({ ...preparedAlgorithm, name: provider.name }, unwrappingKey, preparedData, { keyUsage: false }, ...args); if (format === "jwk") { try { keyData = JSON.parse(Convert.ToUtf8String(keyData)); @@ -10169,11 +10144,11 @@ var init_webcrypto_core_es = __esm({ }; } if (SubtleCrypto.isHashedAlgorithm(algorithm)) { - const preparedAlgorithm = __spreadValues({}, algorithm); + const preparedAlgorithm = { ...algorithm }; preparedAlgorithm.hash = this.prepareAlgorithm(algorithm.hash); return preparedAlgorithm; } - return __spreadValues({}, algorithm); + return { ...algorithm }; } getProvider(name) { const provider = this.providers.get(name); @@ -11226,9 +11201,10 @@ ${key.data.toString("base64")} ]; } async onGenerateKey(algorithm, extractable, keyUsages) { - const keys = await RsaCrypto.generateKey(__spreadProps(__spreadValues({}, algorithm), { + const keys = await RsaCrypto.generateKey({ + ...algorithm, name: this.name - }), extractable, keyUsages); + }, extractable, keyUsages); return { privateKey: setCryptoKey(keys.privateKey), publicKey: setCryptoKey(keys.publicKey) @@ -11244,7 +11220,7 @@ ${key.data.toString("base64")} return RsaCrypto.exportKey(format, getCryptoKey(key)); } async onImportKey(format, keyData, algorithm, extractable, keyUsages) { - const key = await RsaCrypto.importKey(format, keyData, __spreadProps(__spreadValues({}, algorithm), { name: this.name }), extractable, keyUsages); + const key = await RsaCrypto.importKey(format, keyData, { ...algorithm, name: this.name }, extractable, keyUsages); return setCryptoKey(key); } checkCryptoKey(key, keyUsage) { @@ -11272,9 +11248,10 @@ ${key.data.toString("base64")} ]; } async onGenerateKey(algorithm, extractable, keyUsages) { - const keys = await RsaCrypto.generateKey(__spreadProps(__spreadValues({}, algorithm), { + const keys = await RsaCrypto.generateKey({ + ...algorithm, name: this.name - }), extractable, keyUsages); + }, extractable, keyUsages); return { privateKey: setCryptoKey(keys.privateKey), publicKey: setCryptoKey(keys.publicKey) @@ -11290,7 +11267,7 @@ ${key.data.toString("base64")} return RsaCrypto.exportKey(format, getCryptoKey(key)); } async onImportKey(format, keyData, algorithm, extractable, keyUsages) { - const key = await RsaCrypto.importKey(format, keyData, __spreadProps(__spreadValues({}, algorithm), { name: this.name }), extractable, keyUsages); + const key = await RsaCrypto.importKey(format, keyData, { ...algorithm, name: this.name }, extractable, keyUsages); return setCryptoKey(key); } checkCryptoKey(key, keyUsage) { @@ -11349,9 +11326,10 @@ ${key.data.toString("base64")} __name(ShaCrypto, "ShaCrypto"); RsaOaepProvider2 = class extends RsaOaepProvider { async onGenerateKey(algorithm, extractable, keyUsages) { - const keys = await RsaCrypto.generateKey(__spreadProps(__spreadValues({}, algorithm), { + const keys = await RsaCrypto.generateKey({ + ...algorithm, name: this.name - }), extractable, keyUsages); + }, extractable, keyUsages); return { privateKey: setCryptoKey(keys.privateKey), publicKey: setCryptoKey(keys.publicKey) @@ -11451,7 +11429,7 @@ ${internalKey.data.toString("base64")} return RsaCrypto.exportKey(format, getCryptoKey(key)); } async onImportKey(format, keyData, algorithm, extractable, keyUsages) { - const key = await RsaCrypto.importKey(format, keyData, __spreadProps(__spreadValues({}, algorithm), { name: this.name }), extractable, keyUsages); + const key = await RsaCrypto.importKey(format, keyData, { ...algorithm, name: this.name }, extractable, keyUsages); return setCryptoKey(key); } checkCryptoKey(key, keyUsage) { @@ -11492,9 +11470,10 @@ ${internalKey.data.toString("base64")} }; } async onGenerateKey(algorithm, extractable, keyUsages) { - const keys = await RsaCrypto.generateKey(__spreadProps(__spreadValues({}, algorithm), { + const keys = await RsaCrypto.generateKey({ + ...algorithm, name: this.name - }), extractable, keyUsages); + }, extractable, keyUsages); return { privateKey: setCryptoKey(keys.privateKey), publicKey: setCryptoKey(keys.publicKey) @@ -11533,7 +11512,7 @@ ${internalKey.data.toString("base64")} return RsaCrypto.exportKey(format, getCryptoKey(key)); } async onImportKey(format, keyData, algorithm, extractable, keyUsages) { - const key = await RsaCrypto.importKey(format, keyData, __spreadProps(__spreadValues({}, algorithm), { name: this.name }), extractable, keyUsages); + const key = await RsaCrypto.importKey(format, keyData, { ...algorithm, name: this.name }, extractable, keyUsages); return setCryptoKey(key); } checkCryptoKey(key, keyUsage) { @@ -11934,9 +11913,10 @@ ${key.data.toString("base64")} ]; } async onGenerateKey(algorithm, extractable, keyUsages) { - const keys = await EcCrypto.generateKey(__spreadProps(__spreadValues({}, algorithm), { + const keys = await EcCrypto.generateKey({ + ...algorithm, name: this.name - }), extractable, keyUsages); + }, extractable, keyUsages); return { privateKey: setCryptoKey(keys.privateKey), publicKey: setCryptoKey(keys.publicKey) @@ -11952,7 +11932,7 @@ ${key.data.toString("base64")} return EcCrypto.exportKey(format, getCryptoKey(key)); } async onImportKey(format, keyData, algorithm, extractable, keyUsages) { - const key = await EcCrypto.importKey(format, keyData, __spreadProps(__spreadValues({}, algorithm), { name: this.name }), extractable, keyUsages); + const key = await EcCrypto.importKey(format, keyData, { ...algorithm, name: this.name }, extractable, keyUsages); return setCryptoKey(key); } checkCryptoKey(key, keyUsage) { @@ -11970,9 +11950,10 @@ ${key.data.toString("base64")} this.namedCurves = EcCurves.names; } async onGenerateKey(algorithm, extractable, keyUsages) { - const keys = await EcCrypto.generateKey(__spreadProps(__spreadValues({}, algorithm), { + const keys = await EcCrypto.generateKey({ + ...algorithm, name: this.name - }), extractable, keyUsages); + }, extractable, keyUsages); return { privateKey: setCryptoKey(keys.privateKey), publicKey: setCryptoKey(keys.publicKey) @@ -11982,7 +11963,7 @@ ${key.data.toString("base64")} return EcCrypto.exportKey(format, getCryptoKey(key)); } async onImportKey(format, keyData, algorithm, extractable, keyUsages) { - const key = await EcCrypto.importKey(format, keyData, __spreadProps(__spreadValues({}, algorithm), { name: this.name }), extractable, keyUsages); + const key = await EcCrypto.importKey(format, keyData, { ...algorithm, name: this.name }, extractable, keyUsages); return setCryptoKey(key); } checkCryptoKey(key, keyUsage) { @@ -11993,7 +11974,7 @@ ${key.data.toString("base64")} } } async onDeriveBits(algorithm, baseKey, length) { - const bits = await EcCrypto.deriveBits(__spreadProps(__spreadValues({}, algorithm), { public: getCryptoKey(algorithm.public) }), getCryptoKey(baseKey), length); + const bits = await EcCrypto.deriveBits({ ...algorithm, public: getCryptoKey(algorithm.public) }, getCryptoKey(baseKey), length); return bits; } }; @@ -12239,7 +12220,7 @@ ${key.data.toString("base64")} return EdCrypto.exportKey(format, getCryptoKey(key)); } async onImportKey(format, keyData, algorithm, extractable, keyUsages) { - const key = await EdCrypto.importKey(format, keyData, __spreadProps(__spreadValues({}, algorithm), { name: this.name }), extractable, keyUsages); + const key = await EdCrypto.importKey(format, keyData, { ...algorithm, name: this.name }, extractable, keyUsages); return setCryptoKey(key); } }; @@ -12256,14 +12237,14 @@ ${key.data.toString("base64")} }; } async onDeriveBits(algorithm, baseKey, length) { - const bits = await EdCrypto.deriveBits(__spreadProps(__spreadValues({}, algorithm), { public: getCryptoKey(algorithm.public) }), getCryptoKey(baseKey), length); + const bits = await EdCrypto.deriveBits({ ...algorithm, public: getCryptoKey(algorithm.public) }, getCryptoKey(baseKey), length); return bits; } async onExportKey(format, key) { return EdCrypto.exportKey(format, getCryptoKey(key)); } async onImportKey(format, keyData, algorithm, extractable, keyUsages) { - const key = await EdCrypto.importKey(format, keyData, __spreadProps(__spreadValues({}, algorithm), { name: this.name }), extractable, keyUsages); + const key = await EdCrypto.importKey(format, keyData, { ...algorithm, name: this.name }, extractable, keyUsages); return setCryptoKey(key); } }; @@ -12320,10 +12301,11 @@ ${key.data.toString("base64")} async onGenerateKey(algorithm, extractable, keyUsages) { const length = (algorithm.length || this.getDefaultLength(algorithm.hash.name)) >> 3 << 3; const key = new HmacCryptoKey(); - key.algorithm = __spreadProps(__spreadValues({}, algorithm), { + key.algorithm = { + ...algorithm, length, name: this.name - }); + }; key.extractable = extractable; key.usages = keyUsages; key.data = import_crypto.default.randomBytes(length >> 3); @@ -13018,6 +13000,7 @@ var require_dist = __commonJS({ // src/polyfills/web-crypto.js var require_web_crypto = __commonJS({ "src/polyfills/web-crypto.js"(exports, module2) { + "use strict"; var { Crypto: WebCrypto, CryptoKey: CryptoKey3 } = (init_webcrypto_es(), __toCommonJS(webcrypto_es_exports)); var { v4: uuid } = require_dist(); var _randomUUID; @@ -13443,6 +13426,7 @@ var require_errors = __commonJS({ // src/polyfills/web-streams.js var require_web_streams = __commonJS({ "src/polyfills/web-streams.js"(exports, module2) { + "use strict"; var streams = require_ponyfill(); var { ReadableStream, @@ -14945,11 +14929,12 @@ var require_response = __commonJS({ if (init === null || typeof init !== "object") { throw new TypeError(`Failed to execute 'json' on 'Response': init must be a RequestInit, found ${typeof init}.`); } - init = __spreadValues({ + init = { status: 200, statusText: "", - headers: new HeadersList() - }, init); + headers: new HeadersList(), + ...init + }; const bytes = new TextEncoder("utf-8").encode(serializeJavascriptValueToJSONString(data)); const body = extractBody(bytes); const relevantRealm = { settingsObject: {} }; @@ -15093,7 +15078,7 @@ var require_response = __commonJS({ if (response.internalResponse) { return filterResponse(cloneResponse(response.internalResponse), response.type); } - const newResponse = makeResponse(__spreadProps(__spreadValues({}, response), { body: null })); + const newResponse = makeResponse({ ...response, body: null }); if (response.body != null) { newResponse.body = cloneBody(response.body); } @@ -15101,7 +15086,7 @@ var require_response = __commonJS({ } __name(cloneResponse, "cloneResponse"); function makeResponse(init) { - return __spreadProps(__spreadValues({ + return { aborted: false, rangeRequested: false, timingAllowPassed: false, @@ -15110,11 +15095,11 @@ var require_response = __commonJS({ status: 200, timingInfo: null, cacheState: "", - statusText: "" - }, init), { + statusText: "", + ...init, headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList(), urlList: init.urlList ? [...init.urlList] : [] - }); + }; } __name(makeResponse, "makeResponse"); function makeNetworkError(reason) { @@ -15129,9 +15114,10 @@ var require_response = __commonJS({ } __name(makeNetworkError, "makeNetworkError"); function makeFilteredResponse(response, state) { - state = __spreadValues({ - internalResponse: response - }, state); + state = { + internalResponse: response, + ...state + }; return new Proxy(response, { get(target, p) { return p in state ? state[p] : target[p]; @@ -15610,7 +15596,7 @@ var require_request = __commonJS({ __name(Request, "Request"); mixinBody(Request.prototype); function makeRequest(init) { - const request = __spreadProps(__spreadValues({ + const request = { method: "GET", localURLsOnly: false, unsafeRequest: false, @@ -15645,16 +15631,16 @@ var require_request = __commonJS({ responseTainting: "basic", preventNoCacheCacheControlHeaderModification: false, done: false, - timingAllowFailed: false - }, init), { + timingAllowFailed: false, + ...init, headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList() - }); + }; request.url = request.urlList[0]; return request; } __name(makeRequest, "makeRequest"); function cloneRequest(request) { - const newRequest = makeRequest(__spreadProps(__spreadValues({}, request), { body: null })); + const newRequest = makeRequest({ ...request, body: null }); if (request.body != null) { newRequest.body = cloneBody(request.body); } @@ -16477,7 +16463,7 @@ var require_fetch = __commonJS({ httpRequest = request; } else { httpRequest = makeRequest(request); - httpFetchParams = __spreadValues({}, fetchParams); + httpFetchParams = { ...fetchParams }; httpFetchParams.request = httpRequest; } const includeCredentials = request.credentials === "include" || request.credentials === "same-origin" && request.responseTainting === "basic"; @@ -17493,7 +17479,7 @@ var require_redirect = __commonJS({ this.dispatcher = dispatcher; this.location = null; this.abort = null; - this.opts = __spreadProps(__spreadValues({}, opts), { maxRedirections: 0 }); + this.opts = { ...opts, maxRedirections: 0 }; this.maxRedirections = maxRedirections; this.handler = handler; this.history = []; @@ -17614,12 +17600,11 @@ var require_connect = __commonJS({ var util = require_util(); var { InvalidArgumentError: InvalidArgumentError2, ConnectTimeoutError } = require_errors(); var tls; - function buildConnector(_a2) { - var _b = _a2, { maxCachedSessions, socketPath, timeout } = _b, opts = __objRest(_b, ["maxCachedSessions", "socketPath", "timeout"]); + function buildConnector({ maxCachedSessions, socketPath, timeout, ...opts }) { if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { throw new InvalidArgumentError2("maxCachedSessions must be a positive integer or zero"); } - const options = __spreadValues({ path: socketPath }, opts); + const options = { path: socketPath, ...opts }; const sessionCache = /* @__PURE__ */ new Map(); timeout = timeout == null ? 1e4 : timeout; maxCachedSessions = maxCachedSessions == null ? 100 : maxCachedSessions; @@ -17633,15 +17618,15 @@ var require_connect = __commonJS({ const sessionKey = servername || hostname; const session = sessionCache.get(sessionKey) || null; assert(sessionKey); - socket = tls.connect(__spreadProps(__spreadValues({ - highWaterMark: 16384 - }, options), { + socket = tls.connect({ + highWaterMark: 16384, + ...options, servername, session, socket: httpSocket, port: port || 443, host: hostname - })); + }); socket.on("session", function(session2) { if (maxCachedSessions === 0) { return; @@ -17658,12 +17643,12 @@ var require_connect = __commonJS({ }); } else { assert(!httpSocket, "httpSocket can only be sent on TLS update"); - socket = net.connect(__spreadProps(__spreadValues({ - highWaterMark: 64 * 1024 - }, options), { + socket = net.connect({ + highWaterMark: 64 * 1024, + ...options, port: port || 80, host: hostname - })); + }); } const timeoutId = timeout ? setTimeout(onConnectTimeout, timeout, socket) : null; socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { @@ -18198,11 +18183,13 @@ var require_client = __commonJS({ throw new InvalidArgumentError2("maxRequestsPerClient must be a positive number"); } if (typeof connect2 !== "function") { - connect2 = buildConnector(__spreadValues(__spreadProps(__spreadValues({}, tls), { + connect2 = buildConnector({ + ...tls, maxCachedSessions, socketPath, - timeout: connectTimeout - }), connect2)); + timeout: connectTimeout, + ...connect2 + }); } this[kUrl] = util.parseOrigin(url); this[kConnector] = connect2; @@ -19390,24 +19377,16 @@ var require_pool = __commonJS({ } __name(defaultFactory, "defaultFactory"); var Pool = class extends PoolBase { - constructor(origin, _a2 = {}) { - var _b = _a2, { - connections, - factory = defaultFactory, - connect, - connectTimeout, - tls, - maxCachedSessions, - socketPath - } = _b, options = __objRest(_b, [ - "connections", - "factory", - "connect", - "connectTimeout", - "tls", - "maxCachedSessions", - "socketPath" - ]); + constructor(origin, { + connections, + factory = defaultFactory, + connect, + connectTimeout, + tls, + maxCachedSessions, + socketPath, + ...options + } = {}) { super(); if (connections != null && (!Number.isFinite(connections) || connections < 0)) { throw new InvalidArgumentError2("invalid connections"); @@ -19419,15 +19398,17 @@ var require_pool = __commonJS({ throw new InvalidArgumentError2("connect must be a function or an object"); } if (typeof connect !== "function") { - connect = buildConnector(__spreadValues(__spreadProps(__spreadValues({}, tls), { + connect = buildConnector({ + ...tls, maxCachedSessions, socketPath, - timeout: connectTimeout == null ? 1e4 : connectTimeout - }), connect)); + timeout: connectTimeout == null ? 1e4 : connectTimeout, + ...connect + }); } this[kConnections] = connections || null; this[kUrl] = util.parseOrigin(origin); - this[kOptions] = __spreadProps(__spreadValues({}, util.deepClone(options)), { connect }); + this[kOptions] = { ...util.deepClone(options), connect }; this[kFactory] = factory; } [kGetDispatcher]() { @@ -19508,8 +19489,7 @@ var require_agent = __commonJS({ } __name(defaultFactory, "defaultFactory"); var Agent = class extends DispatcherBase { - constructor(_a2 = {}) { - var _b = _a2, { factory = defaultFactory, maxRedirections = 0, connect } = _b, options = __objRest(_b, ["factory", "maxRedirections", "connect"]); + constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { super(); if (typeof factory !== "function") { throw new InvalidArgumentError2("factory must be a function."); @@ -19521,9 +19501,9 @@ var require_agent = __commonJS({ throw new InvalidArgumentError2("maxRedirections must be a positive number"); } if (connect && typeof connect !== "function") { - connect = __spreadValues({}, connect); + connect = { ...connect }; } - this[kOptions] = __spreadProps(__spreadValues({}, util.deepClone(options)), { connect }); + this[kOptions] = { ...util.deepClone(options), connect }; this[kMaxRedirections] = maxRedirections; this[kFactory] = factory; this[kClients] = /* @__PURE__ */ new Map(); @@ -19573,7 +19553,7 @@ var require_agent = __commonJS({ } const { maxRedirections = this[kMaxRedirections] } = opts; if (maxRedirections != null && maxRedirections !== 0) { - opts = __spreadProps(__spreadValues({}, opts), { maxRedirections: 0 }); + opts = { ...opts, maxRedirections: 0 }; handler = new RedirectHandler(this, maxRedirections, opts, handler); } return dispatcher.dispatch(opts, handler); @@ -19607,6 +19587,7 @@ var require_agent = __commonJS({ // src/polyfills/undici.js var require_undici = __commonJS({ "src/polyfills/undici.js"(exports, module2) { + "use strict"; var abort = require_abort_controller(); global.AbortController = abort.AbortController; global.AbortSignal = abort.AbortSignal; @@ -19877,6 +19858,7 @@ var require_cache = __commonJS({ // src/polyfills/web-event.js var require_web_event = __commonJS({ "src/polyfills/web-event.js"(exports, module2) { + "use strict"; var EventTargetShim = require_event_target_shim(); var { EventTarget } = EventTargetShim; var Event = class extends EventTargetShim { diff --git a/packages/next/compiled/@edge-runtime/primitives/package.json b/packages/next/compiled/@edge-runtime/primitives/package.json index 769b604d8dd7..a8ec5148a1db 100644 --- a/packages/next/compiled/@edge-runtime/primitives/package.json +++ b/packages/next/compiled/@edge-runtime/primitives/package.json @@ -1 +1 @@ -{"name":"@edge-runtime/primitives","version":"1.1.0-beta.8","main":"./index.js","license":"MPLv2"} +{"name":"@edge-runtime/primitives","version":"1.1.0-beta.10","main":"./index.js","license":"MPLv2"} diff --git a/packages/next/compiled/edge-runtime/index.js b/packages/next/compiled/edge-runtime/index.js index 62bd34ae4d05..701c076ddb23 100644 --- a/packages/next/compiled/edge-runtime/index.js +++ b/packages/next/compiled/edge-runtime/index.js @@ -1 +1 @@ -(()=>{var e={608:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EdgeVM=void 0;const n=r(951);const o=r(893);class EdgeVM extends o.VM{constructor(e={}){super({...e,extend:t=>e.extend?e.extend((0,n.addPrimitives)(t)):(0,n.addPrimitives)(t)})}}t.EdgeVM=EdgeVM},463:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VM=t.EdgeVM=void 0;var n=r(608);Object.defineProperty(t,"EdgeVM",{enumerable:true,get:function(){return n.EdgeVM}});var o=r(893);Object.defineProperty(t,"VM",{enumerable:true,get:function(){return o.VM}})},718:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createRequire=t.requireDependencies=void 0;const n=r(147);const o=r(144);const s=r(17);function requireDependencies(e){const{context:t,requireCache:r,dependencies:n}=e;const o=createRequire(t,r);for(const{path:e,mapExports:r}of n){const n=o(e,e);for(const e of Object.keys(r)){t[r[e]]=n[e]}}}t.requireDependencies=requireDependencies;function createRequire(e,t){return function requireFn(r,i){const a=require.resolve(i,{paths:[(0,s.dirname)(r)]});const E=t.get(a);if(E!==undefined){return E.exports}const d={exports:{},loaded:false,id:a};t.set(a,d);const c=(0,o.runInContext)(`(function(module,exports,require,__dirname,__filename) {${(0,n.readFileSync)(a,"utf-8")}\n})`,e);try{c(d,d.exports,requireFn.bind(null,a),(0,s.dirname)(a),a)}finally{t.delete(a)}d.loaded=true;return d.exports}}t.createRequire=createRequire},942:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.tempFile=void 0;const o=n(r(147));const s=n(r(37));const i=n(r(17));const a=n(r(951));const{crypto:E}=a.default;function tempFile(e){const t=i.default.join(s.default.tmpdir(),E.randomUUID());o.default.writeFileSync(t,e);return{path:t,remove:()=>o.default.unlinkSync(t)}}t.tempFile=tempFile},893:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VM=void 0;const n=r(144);const o=r(718);const s=r(942);class VM{constructor(e={}){var t,r,s,i;const a=(0,n.createContext)({},{name:"Edge Runtime",codeGeneration:(t=e.codeGeneration)!==null&&t!==void 0?t:{strings:false,wasm:false}});this.requireCache=(r=e.requireCache)!==null&&r!==void 0?r:new Map;this.context=(i=(s=e.extend)===null||s===void 0?void 0:s.call(e,a))!==null&&i!==void 0?i:a;this.requireFn=(0,o.createRequire)(this.context,this.requireCache)}evaluate(e){return(0,n.runInContext)(e,this.context)}require(e){return this.requireFn(e,e)}requireInContext(e){const t=this.require(e);for(const[e,r]of Object.entries(t)){this.context[e]=r}}requireInlineInContext(e){const t=(0,s.tempFile)(e);this.requireInContext(t.path);t.remove()}}t.VM=VM},734:e=>{"use strict";e.exports=e=>{const t=e[0]*1e9+e[1];const r=t/1e6;const n=t/1e9;return{seconds:n,milliseconds:r,nanoseconds:t}}},266:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EdgeRuntime=void 0;const n=r(463);const o=r(652);let s;let i;class EdgeRuntime extends n.EdgeVM{constructor(e){super({...e,extend:t=>{var r,n;return(n=(r=e===null||e===void 0?void 0:e.extend)===null||r===void 0?void 0:r.call(e,t))!==null&&n!==void 0?n:t}});defineHandlerProps({object:this,setterName:"__onUnhandledRejectionHandler",setter:e=>s=e,getterName:"__rejectionHandlers",getter:()=>s});defineHandlerProps({object:this,setterName:"__onErrorHandler",setter:e=>i=e,getterName:"__errorHandlers",getter:()=>i});Object.defineProperty(this.context,"EdgeRuntime",{configurable:false,enumerable:false,writable:false,value:{version:o.VERSION}});this.evaluate(getDefineEventListenersCode());this.dispatchFetch=this.evaluate(getDispatchFetchCode());if(e===null||e===void 0?void 0:e.initialCode){this.evaluate(e.initialCode)}}}t.EdgeRuntime=EdgeRuntime;process.on("unhandledRejection",(function invokeRejectionHandlers(e,t){s===null||s===void 0?void 0:s.forEach((r=>r(e,t)))}));process.on("uncaughtException",(function invokeErrorHandlers(e){i===null||i===void 0?void 0:i.forEach((t=>t(e)))}));function getDefineEventListenersCode(){return`\n Object.defineProperty(self, '__listeners', {\n configurable: false,\n enumerable: false,\n value: {},\n writable: true,\n })\n\n function conditionallyUpdatesHandlerList(eventType) {\n if (eventType === 'unhandledrejection') {\n self.__onUnhandledRejectionHandler = self.__listeners[eventType];\n } else if (eventType === 'error') {\n self.__onErrorHandler = self.__listeners[eventType];\n }\n }\n\n function addEventListener(type, handler) {\n const eventType = type.toLowerCase();\n if (eventType === 'fetch' && self.__listeners.fetch) {\n throw new TypeError('You can register just one "fetch" event listener');\n }\n\n self.__listeners[eventType] = self.__listeners[eventType] || [];\n self.__listeners[eventType].push(handler);\n conditionallyUpdatesHandlerList(eventType);\n }\n\n function removeEventListener(type, handler) {\n const eventType = type.toLowerCase();\n if (self.__listeners[eventType]) {\n self.__listeners[eventType] = self.__listeners[eventType].filter(item => {\n return item !== handler;\n });\n\n if (self.__listeners[eventType].length === 0) {\n delete self.__listeners[eventType];\n }\n }\n conditionallyUpdatesHandlerList(eventType);\n }\n `}function getDispatchFetchCode(){return`(async function dispatchFetch(input, init) {\n const request = new Request(input, init);\n const event = new FetchEvent(request);\n if (!self.__listeners.fetch) {\n throw new Error("No fetch event listeners found");\n }\n\n const getResponse = ({ response, error }) => {\n if (error || !response || !(response instanceof Response)) {\n console.error(error ? error : 'The event listener did not respond')\n response = new Response(null, {\n statusText: 'Internal Server Error',\n status: 500\n })\n }\n\n response.waitUntil = () => Promise.all(event.awaiting);\n return response;\n }\n\n try {\n await self.__listeners.fetch[0].call(event, event)\n } catch (error) {\n return getResponse({ error })\n }\n\n return Promise.resolve(event.response)\n .then(response => getResponse({ response }))\n .catch(error => getResponse({ error }))\n })`}function defineHandlerProps({object:e,setterName:t,setter:r,getterName:n,getter:o}){Object.defineProperty(e.context,t,{set:r,configurable:false,enumerable:false});Object.defineProperty(e,n,{get:o,configurable:false,enumerable:false})}},406:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getClonableBodyStream=void 0;const n=r(781);function getClonableBodyStream(e,t){let r=null;return{finalize(){if(r){replaceRequestBody(e,bodyStreamToNodeStream(r))}},cloneBodyStream(){const n=r!==null&&r!==void 0?r:requestToBodyStream(e,t);const[o,s]=n.tee();r=o;return s}}}t.getClonableBodyStream=getClonableBodyStream;function requestToBodyStream(e,t){const r=new t({start(t){e.on("data",(e=>t.enqueue(e)));e.on("end",(()=>t.terminate()));e.on("error",(e=>t.error(e)))}});return r.readable}function bodyStreamToNodeStream(e){const t=e.getReader();return n.Readable.from(async function*(){while(true){const{done:e,value:r}=await t.read();if(e){return}yield r}}())}function replaceRequestBody(e,t){for(const r in t){let n=t[r];if(typeof n==="function"){n=n.bind(t)}e[r]=n}return e}},986:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.createHandler=void 0;const o=r(406);const s=n(r(720));const i=n(r(242));const a=n(r(504));function createHandler(e){const t=new Set;return{handler:async(r,n)=>{var E,d;const c=(0,a.default)();const _=r.method!=="GET"&&r.method!=="HEAD"?(0,o.getClonableBodyStream)(r,e.runtime.context.TransformStream):undefined;const u=await e.runtime.dispatchFetch(String(getURL(r)),{headers:toRequestInitHeaders(r),method:r.method,body:_===null||_===void 0?void 0:_.cloneBodyStream()});const l=u.waitUntil();t.add(l);l.finally((()=>t.delete(l)));n.statusCode=u.status;n.statusMessage=u.statusText;for(const[e,t]of Object.entries(toNodeHeaders(u.headers))){if(e!=="content-encoding"&&t!==undefined){n.setHeader(e,t)}}if(u.body){for await(const e of u.body){n.write(e)}}const S=`${r.socket.remoteAddress} ${r.method} ${r.url}`;const R=`${(E=(0,s.default)(c()).match(/[a-zA-Z]+|[0-9]+/g))===null||E===void 0?void 0:E.join(" ")}`;const A=`${n.statusCode} ${i.default[n.statusCode]}`;(d=e.logger)===null||d===void 0?void 0:d.debug(`${S} → ${A} in ${R}`);n.end()},waitUntil:()=>Promise.all(t)}}t.createHandler=createHandler;function getURL(e){var t;const r=((t=e.socket)===null||t===void 0?void 0:t.encrypted)?"https":"http";return new URL(String(e.url),`${r}://${String(e.headers.host)}`)}function toRequestInitHeaders(e){return Object.keys(e.headers).map((t=>{const r=e.headers[t];return[t,Array.isArray(r)?r.join(", "):r!==null&&r!==void 0?r:""]}))}function toNodeHeaders(e){const t={};if(e){for(const[r,n]of e.entries()){t[r]=r.toLowerCase()==="set-cookie"?e.getAll("set-cookie"):n}}return t}},641:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runServer=t.createHandler=void 0;var n=r(986);Object.defineProperty(t,"createHandler",{enumerable:true,get:function(){return n.createHandler}});var o=r(255);Object.defineProperty(t,"runServer",{enumerable:true,get:function(){return o.runServer}})},255:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.runServer=void 0;const o=r(986);const s=r(361);const i=n(r(685));async function runServer(e){const{handler:t,waitUntil:r}=(0,o.createHandler)(e);const n=i.default.createServer(t);n.listen(e.port);try{await(0,s.once)(n,"listening")}catch(t){if((t===null||t===void 0?void 0:t.code)==="EADDRINUSE"){return runServer({...e,port:undefined})}throw t}const a=n.address();const E=typeof a==="string"||a==null?String(a):`http://localhost:${a.port}`;return{url:E,close:async()=>{await r();await new Promise(((e,t)=>n.close((r=>{if(r)t(r);e()}))))},waitUntil:r}}t.runServer=runServer},652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VERSION=void 0;t.VERSION="1.1.0-beta.8"},242:e=>{var t;t={"1xx":"Informational","1xx_NAME":"INFORMATIONAL","1xx_MESSAGE":"Indicates an interim response for communicating connection status or request progress prior to completing the requested action and sending a final response.",INFORMATIONAL:"1xx","2xx":"Successful","2xx_NAME":"SUCCESSFUL","2xx_MESSAGE":"Indicates that the client's request was successfully received, understood, and accepted.",SUCCESSFUL:"2xx","3xx":"Redirection","3xx_NAME":"REDIRECTION","3xx_MESSAGE":"Indicates that further action needs to be taken by the user agent in order to fulfill the request.",REDIRECTION:"3xx","4xx":"Client Error","4xx_NAME":"CLIENT_ERROR","4xx_MESSAGE":"Indicates that the client seems to have erred.",CLIENT_ERROR:"4xx","5xx":"Server Error","5xx_NAME":"SERVER_ERROR","5xx_MESSAGE":"Indicates that the server is aware that it has erred or is incapable of performing the requested method.",SERVER_ERROR:"5xx"};e.exports={classes:t,100:"Continue","100_NAME":"CONTINUE","100_MESSAGE":"The server has received the request headers and the client should proceed to send the request body.","100_CLASS":t.INFORMATIONAL,CONTINUE:100,101:"Switching Protocols","101_NAME":"SWITCHING_PROTOCOLS","101_MESSAGE":"The requester has asked the server to switch protocols and the server has agreed to do so.","101_CLASS":t.INFORMATIONAL,SWITCHING_PROTOCOLS:101,102:"Processing","102_NAME":"PROCESSING","102_MESSAGE":"A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request. This code indicates that the server has received and is processing the request, but no response is available yet.[7] This prevents the client from timing out and assuming the request was lost.","102_CLASS":t.INFORMATIONAL,PROCESSING:102,103:"Early Hints","103_NAME":"EARLY_HINTS","103_MESSAGE":"Used to return some response headers before final HTTP message.","103_CLASS":t.INFORMATIONAL,EARLY_HINTS:103,200:"OK","200_NAME":"OK","200_MESSAGE":"Standard response for successful HTTP requests.","200_CLASS":t.SUCCESSFUL,OK:200,201:"Created","201_NAME":"CREATED","201_MESSAGE":"The request has been fulfilled, resulting in the creation of a new resource.","201_CLASS":t.SUCCESSFUL,CREATED:201,202:"Accepted","202_NAME":"ACCEPTED","202_MESSAGE":"The request has been accepted for processing, but the processing has not been completed.","202_CLASS":t.SUCCESSFUL,ACCEPTED:202,203:"Non-Authoritative Information","203_NAME":"NON_AUTHORITATIVE_INFORMATION","203_MESSAGE":"The server is a transforming proxy (e.g. a Web accelerator) that received a 200 OK from its origin, but is returning a modified version of the origin's response.","203_CLASS":t.SUCCESSFUL,NON_AUTHORITATIVE_INFORMATION:203,204:"No Content","204_NAME":"NO_CONTENT","204_MESSAGE":"The server successfully processed the request and is not returning any content.","204_CLASS":t.SUCCESSFUL,NO_CONTENT:204,205:"Reset Content","205_NAME":"RESET_CONTENT","205_MESSAGE":"The server successfully processed the request, but is not returning any content. Unlike a 204 response, this response requires that the requester reset the document view.","205_CLASS":t.SUCCESSFUL,RESET_CONTENT:205,206:"Partial Content","206_NAME":"PARTIAL_CONTENT","206_MESSAGE":"The server is delivering only part of the resource (byte serving) due to a range header sent by the client.","206_CLASS":t.SUCCESSFUL,PARTIAL_CONTENT:206,207:"Multi Status","207_NAME":"MULTI_STATUS","207_MESSAGE":"The message body that follows is by default an XML message and can contain a number of separate response codes, depending on how many sub-requests were made.","207_CLASS":t.SUCCESSFUL,MULTI_STATUS:207,208:"Already Reported","208_NAME":"ALREADY_REPORTED","208_MESSAGE":"The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response, and are not being included again.","208_CLASS":t.SUCCESSFUL,ALREADY_REPORTED:208,226:"IM Used","226_NAME":"IM_USED","226_MESSAGE":"The server has fulfilled a request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.","226_CLASS":t.SUCCESSFUL,IM_USED:226,300:"Multiple Choices","300_NAME":"MULTIPLE_CHOICES","300_MESSAGE":"Indicates multiple options for the resource from which the client may choose.","300_CLASS":t.REDIRECTION,MULTIPLE_CHOICES:300,301:"Moved Permanently","301_NAME":"MOVED_PERMANENTLY","301_MESSAGE":"This and all future requests should be directed to the given URI.","301_CLASS":t.REDIRECTION,MOVED_PERMANENTLY:301,302:"Found","302_NAME":"FOUND","302_MESSAGE":'This is an example of industry practice contradicting the standard. The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302 with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307 to distinguish between the two behaviours.',"302_CLASS":t.REDIRECTION,FOUND:302,303:"See Other","303_NAME":"SEE_OTHER","303_MESSAGE":"The response to the request can be found under another URI using the GET method.","303_CLASS":t.REDIRECTION,SEE_OTHER:303,304:"Not Modified","304_NAME":"NOT_MODIFIED","304_MESSAGE":"Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.","304_CLASS":t.REDIRECTION,NOT_MODIFIED:304,305:"Use Proxy","305_NAME":"USE_PROXY","305_MESSAGE":"The requested resource is available only through a proxy, the address for which is provided in the response.","305_CLASS":t.REDIRECTION,USE_PROXY:305,306:"Switch Proxy","306_NAME":"SWITCH_PROXY","306_MESSAGE":'No longer used. Originally meant "Subsequent requests should use the specified proxy.',"306_CLASS":t.REDIRECTION,SWITCH_PROXY:306,307:"Temporary Redirect","307_NAME":"TEMPORARY_REDIRECT","307_MESSAGE":"In this case, the request should be repeated with another URI; however, future requests should still use the original URI.","307_CLASS":t.REDIRECTION,TEMPORARY_REDIRECT:307,308:"Permanent Redirect","308_NAME":"PERMANENT_REDIRECT","308_MESSAGE":"The request and all future requests should be repeated using another URI.","308_CLASS":t.REDIRECTION,PERMANENT_REDIRECT:308,400:"Bad Request","400_NAME":"BAD_REQUEST","400_MESSAGE":"The server cannot or will not process the request due to an apparent client error.","400_CLASS":t.CLIENT_ERROR,BAD_REQUEST:400,401:"Unauthorized","401_NAME":"UNAUTHORIZED","401_MESSAGE":"Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided.","401_CLASS":t.CLIENT_ERROR,UNAUTHORIZED:401,402:"Payment Required","402_NAME":"PAYMENT_REQUIRED","402_MESSAGE":"Reserved for future use. The original intention was that this code might be used as part of some form of digital cash or micropayment scheme, as proposed for example by GNU Taler, but that has not yet happened, and this code is not usually used.","402_CLASS":t.CLIENT_ERROR,PAYMENT_REQUIRED:402,403:"Forbidden","403_NAME":"FORBIDDEN","403_MESSAGE":"The request was valid, but the server is refusing action.","403_CLASS":t.CLIENT_ERROR,FORBIDDEN:403,404:"Not Found","404_NAME":"NOT_FOUND","404_MESSAGE":"The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.","404_CLASS":t.CLIENT_ERROR,NOT_FOUND:404,405:"Method Not Allowed","405_NAME":"METHOD_NOT_ALLOWED","405_MESSAGE":"A request method is not supported for the requested resource.","405_CLASS":t.CLIENT_ERROR,METHOD_NOT_ALLOWED:405,406:"Not Acceptable","406_NAME":"NOT_ACCEPTABLE","406_MESSAGE":"The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.","406_CLASS":t.CLIENT_ERROR,NOT_ACCEPTABLE:406,407:"Proxy Authentication Required","407_NAME":"PROXY_AUTHENTICATION_REQUIRED","407_MESSAGE":"The client must first authenticate itself with the proxy.","407_CLASS":t.CLIENT_ERROR,PROXY_AUTHENTICATION_REQUIRED:407,408:"Request Time-out","408_NAME":"REQUEST_TIMEOUT","408_MESSAGE":"The server timed out waiting for the request.","408_CLASS":t.CLIENT_ERROR,REQUEST_TIMEOUT:408,409:"Conflict","409_NAME":"CONFLICT","409_MESSAGE":"Indicates that the request could not be processed because of conflict in the request, such as an edit conflict between multiple simultaneous updates.","409_CLASS":t.CLIENT_ERROR,CONFLICT:409,410:"Gone","410_NAME":"GONE","410_MESSAGE":"Indicates that the resource requested is no longer available and will not be available again.","410_CLASS":t.CLIENT_ERROR,GONE:410,411:"Length Required","411_NAME":"LENGTH_REQUIRED","411_MESSAGE":"The request did not specify the length of its content, which is required by the requested resource.","411_CLASS":t.CLIENT_ERROR,LENGTH_REQUIRED:411,412:"Precondition Failed","412_NAME":"PRECONDITION_FAILED","412_MESSAGE":"The server does not meet one of the preconditions that the requester put on the request.","412_CLASS":t.CLIENT_ERROR,PRECONDITION_FAILED:412,413:"Request Entity Too Large","413_NAME":"REQUEST_ENTITY_TOO_LARGE","413_MESSAGE":'The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".',"413_CLASS":t.CLIENT_ERROR,REQUEST_ENTITY_TOO_LARGE:413,414:"Request-URI Too Large","414_NAME":"REQUEST_URI_TOO_LONG","414_MESSAGE":"The URI provided was too long for the server to process.","414_CLASS":t.CLIENT_ERROR,REQUEST_URI_TOO_LONG:414,415:"Unsupported Media Type","415_NAME":"UNSUPPORTED_MEDIA_TYPE","415_MESSAGE":"The request entity has a media type which the server or resource does not support.","415_CLASS":t.CLIENT_ERROR,UNSUPPORTED_MEDIA_TYPE:415,416:"Requested Range not Satisfiable","416_NAME":"REQUESTED_RANGE_NOT_SATISFIABLE","416_MESSAGE":"The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.","416_CLASS":t.CLIENT_ERROR,REQUESTED_RANGE_NOT_SATISFIABLE:416,417:"Expectation Failed","417_NAME":"EXPECTATION_FAILED","417_MESSAGE":"The server cannot meet the requirements of the Expect request-header field.","417_CLASS":t.CLIENT_ERROR,EXPECTATION_FAILED:417,418:"I'm a teapot","418_NAME":"IM_A_TEAPOT","418_MESSAGE":'Any attempt to brew coffee with a teapot should result in the error code "418 I\'m a teapot". The resulting entity body MAY be short and stout.',"418_CLASS":t.CLIENT_ERROR,IM_A_TEAPOT:418,421:"Misdirected Request","421_NAME":"MISDIRECTED_REQUEST","421_MESSAGE":"The request was directed at a server that is not able to produce a response.","421_CLASS":t.CLIENT_ERROR,MISDIRECTED_REQUEST:421,422:"Unprocessable Entity","422_NAME":"UNPROCESSABLE_ENTITY","422_MESSAGE":"The request was well-formed but was unable to be followed due to semantic errors.","422_CLASS":t.CLIENT_ERROR,UNPROCESSABLE_ENTITY:422,423:"Locked","423_NAME":"LOCKED","423_MESSAGE":"The resource that is being accessed is locked.","423_CLASS":t.CLIENT_ERROR,LOCKED:423,424:"Failed Dependency","424_NAME":"FAILED_DEPENDENCY","424_MESSAGE":"The request failed because it depended on another request and that request failed.","424_CLASS":t.CLIENT_ERROR,FAILED_DEPENDENCY:424,426:"Upgrade Required","426_NAME":"UPGRADE_REQUIRED","426_MESSAGE":"The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.","426_CLASS":t.CLIENT_ERROR,UPGRADE_REQUIRED:426,428:"Precondition Required","428_NAME":"PRECONDITION_REQUIRED","428_MESSAGE":"The origin server requires the request to be conditional.","428_CLASS":t.CLIENT_ERROR,PRECONDITION_REQUIRED:428,429:"Too Many Requests","429_NAME":"TOO_MANY_REQUESTS","429_MESSAGE":"The user has sent too many requests in a given amount of time.","429_CLASS":t.CLIENT_ERROR,TOO_MANY_REQUESTS:429,431:"Request Header Fields Too Large","431_NAME":"REQUEST_HEADER_FIELDS_TOO_LARGE","431_MESSAGE":"The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large.","431_CLASS":t.CLIENT_ERROR,REQUEST_HEADER_FIELDS_TOO_LARGE:431,451:"Unavailable For Legal Reasons","451_NAME":"UNAVAILABLE_FOR_LEGAL_REASONS","451_MESSAGE":"A server operator has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource.","451_CLASS":t.CLIENT_ERROR,UNAVAILABLE_FOR_LEGAL_REASONS:451,500:"Internal Server Error","500_NAME":"INTERNAL_SERVER_ERROR","500_MESSAGE":"A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.","500_CLASS":t.SERVER_ERROR,INTERNAL_SERVER_ERROR:500,501:"Not Implemented","501_NAME":"NOT_IMPLEMENTED","501_MESSAGE":"The server either does not recognize the request method, or it lacks the ability to fulfil the request. Usually this implies future availability.","501_CLASS":t.SERVER_ERROR,NOT_IMPLEMENTED:501,502:"Bad Gateway","502_NAME":"BAD_GATEWAY","502_MESSAGE":"The server was acting as a gateway or proxy and received an invalid response from the upstream server.","502_CLASS":t.SERVER_ERROR,BAD_GATEWAY:502,503:"Service Unavailable","503_NAME":"SERVICE_UNAVAILABLE","503_MESSAGE":"The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.","503_CLASS":t.SERVER_ERROR,SERVICE_UNAVAILABLE:503,504:"Gateway Time-out","504_NAME":"GATEWAY_TIMEOUT","504_MESSAGE":"The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.","504_CLASS":t.SERVER_ERROR,GATEWAY_TIMEOUT:504,505:"HTTP Version not Supported","505_NAME":"HTTP_VERSION_NOT_SUPPORTED","505_MESSAGE":"The server does not support the HTTP protocol version used in the request.","505_CLASS":t.SERVER_ERROR,HTTP_VERSION_NOT_SUPPORTED:505,506:"Variant Also Negotiates","506_NAME":"VARIANT_ALSO_NEGOTIATES","506_MESSAGE":"Transparent content negotiation for the request results in a circular reference.","506_CLASS":t.SERVER_ERROR,VARIANT_ALSO_NEGOTIATES:506,507:"Insufficient Storage","507_NAME":"INSUFFICIENT_STORAGE","507_MESSAGE":"The server is unable to store the representation needed to complete the request.","507_CLASS":t.SERVER_ERROR,INSUFFICIENT_STORAGE:507,508:"Loop Detected","508_NAME":"LOOP_DETECTED","508_MESSAGE":"The server detected an infinite loop while processing the request.","508_CLASS":t.SERVER_ERROR,LOOP_DETECTED:508,510:"Not Extended","510_NAME":"NOT_EXTENDED","510_MESSAGE":"Further extensions to the request are required for the server to fulfil it.","510_CLASS":t.SERVER_ERROR,NOT_EXTENDED:510,511:"Network Authentication Required","511_NAME":"NETWORK_AUTHENTICATION_REQUIRED","511_MESSAGE":"The client needs to authenticate to gain network access. Intended for use by intercepting proxies used to control access to the network.","511_CLASS":t.SERVER_ERROR,NETWORK_AUTHENTICATION_REQUIRED:511,extra:{unofficial:{103:"Checkpoint","103_NAME":"CHECKPOINT","103_MESSAGE":"Used in the resumable requests proposal to resume aborted PUT or POST requests.","103_CLASS":t.INFORMATIONAL,CHECKPOINT:103,419:"Page Expired","419_NAME":"PAGE_EXPIRED","419_MESSAGE":"Used by the Laravel Framework when a CSRF Token is missing or expired.","419_CLASS":t.CLIENT_ERROR,PAGE_EXPIRED:419,218:"This is fine","218_NAME":"THIS_IS_FINE","218_MESSAGE":"Used as a catch-all error condition for allowing response bodies to flow through Apache when ProxyErrorOverride is enabled. When ProxyErrorOverride is enabled in Apache, response bodies that contain a status code of 4xx or 5xx are automatically discarded by Apache in favor of a generic response or a custom response specified by the ErrorDocument directive.","218_CLASS":t.SUCCESSFUL,THIS_IS_FINE:218,420:"Enhance Your Calm","420_NAME":"ENHANCE_YOUR_CALM","420_MESSAGE":"Returned by version 1 of the Twitter Search and Trends API when the client is being rate limited; versions 1.1 and later use the 429 Too Many Requests response code instead.","420_CLASS":t.CLIENT_ERROR,ENHANCE_YOUR_CALM:420,450:"Blocked by Windows Parental Controls","450_NAME":"BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS","450_MESSAGE":"The Microsoft extension code indicated when Windows Parental Controls are turned on and are blocking access to the requested webpage.","450_CLASS":t.CLIENT_ERROR,BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS:450,498:"Invalid Token","498_NAME":"INVALID_TOKEN","498_MESSAGE":"Returned by ArcGIS for Server. Code 498 indicates an expired or otherwise invalid token.","498_CLASS":t.CLIENT_ERROR,INVALID_TOKEN:498,499:"Token Required","499_NAME":"TOKEN_REQUIRED","499_MESSAGE":"Returned by ArcGIS for Server. Code 499 indicates that a token is required but was not submitted.","499_CLASS":t.CLIENT_ERROR,TOKEN_REQUIRED:499,509:"Bandwidth Limit Exceeded","509_NAME":"BANDWIDTH_LIMIT_EXCEEDED","509_MESSAGE":"The server has exceeded the bandwidth specified by the server administrator.","509_CLASS":t.SERVER_ERROR,BANDWIDTH_LIMIT_EXCEEDED:509,530:"Site is frozen","530_NAME":"SITE_IS_FROZEN","530_MESSAGE":"Used by the Pantheon web platform to indicate a site that has been frozen due to inactivity.","530_CLASS":t.SERVER_ERROR,SITE_IS_FROZEN:530,598:"Network read timeout error","598_NAME":"NETWORK_READ_TIMEOUT_ERROR","598_MESSAGE":"Used by some HTTP proxies to signal a network read timeout behind the proxy to a client in front of the proxy.","598_CLASS":t.SERVER_ERROR,NETWORK_READ_TIMEOUT_ERROR:598},iis:{440:"Login Time-out","440_NAME":"LOGIN_TIME_OUT","440_MESSAGE":"The client's session has expired and must log in again.","440_CLASS":t.CLIENT_ERROR,LOGIN_TIME_OUT:440,449:"Retry With","449_NAME":"RETRY_WITH","449_MESSAGE":"The server cannot honour the request because the user has not provided the required information.","449_CLASS":t.CLIENT_ERROR,RETRY_WITH:449,451:"Redirect","451_NAME":"REDIRECT","451_MESSAGE":"Used in Exchange ActiveSync when either a more efficient server is available or the server cannot access the users' mailbox.","451_CLASS":t.CLIENT_ERROR,REDIRECT:451},nginx:{444:"No Response","444_NAME":"NO_RESPONSE","444_MESSAGE":"Used internally to instruct the server to return no information to the client and close the connection immediately.","444_CLASS":t.CLIENT_ERROR,NO_RESPONSE:444,494:"Request header too large","494_NAME":"REQUEST_HEADER_TOO_LARGE","494_MESSAGE":"Client sent too large request or too long header line.","494_CLASS":t.CLIENT_ERROR,REQUEST_HEADER_TOO_LARGE:494,495:"SSL Certificate Error","495_NAME":"SSL_CERTIFICATE_ERROR","495_MESSAGE":"An expansion of the 400 Bad Request response code, used when the client has provided an invalid client certificate.","495_CLASS":t.CLIENT_ERROR,SSL_CERTIFICATE_ERROR:495,496:"SSL Certificate Required","496_NAME":"SSL_CERTIFICATE_REQUIRED","496_MESSAGE":"An expansion of the 400 Bad Request response code, used when a client certificate is required but not provided.","496_CLASS":t.CLIENT_ERROR,SSL_CERTIFICATE_REQUIRED:496,497:"HTTP Request Sent to HTTPS Port","497_NAME":"HTTP_REQUEST_SENT_TO_HTTPS_PORT","497_MESSAGE":"An expansion of the 400 Bad Request response code, used when the client has made a HTTP request to a port listening for HTTPS requests.","497_CLASS":t.CLIENT_ERROR,HTTP_REQUEST_SENT_TO_HTTPS_PORT:497,499:"Client Closed Request","499_NAME":"CLIENT_CLOSED_REQUEST","499_MESSAGE":"Used when the client has closed the request before the server could send a response.","499_CLASS":t.CLIENT_ERROR,CLIENT_CLOSED_REQUEST:499},cloudflare:{520:"Unknown Error","520_NAME":"UNKNOWN_ERROR","520_MESSAGE":'The 520 error is used as a "catch-all response for when the origin server returns something unexpected", listing connection resets, large headers, and empty or invalid responses as common triggers.',"520_CLASS":t.SERVER_ERROR,UNKNOWN_ERROR:520,521:"Web Server Is Down","521_NAME":"WEB_SERVER_IS_DOWN","521_MESSAGE":"The origin server has refused the connection from Cloudflare.","521_CLASS":t.SERVER_ERROR,WEB_SERVER_IS_DOWN:521,522:"Connection Timed Out","522_NAME":"CONNECTION_TIMED_OUT","522_MESSAGE":"Cloudflare could not negotiate a TCP handshake with the origin server.","522_CLASS":t.SERVER_ERROR,CONNECTION_TIMED_OUT:522,523:"Origin Is Unreachable","523_NAME":"ORIGIN_IS_UNREACHABLE","523_MESSAGE":"Cloudflare could not reach the origin server.","523_CLASS":t.SERVER_ERROR,ORIGIN_IS_UNREACHABLE:523,524:"A Timeout Occurred","524_NAME":"A_TIMEOUT_OCCURRED","524_MESSAGE":"Cloudflare was able to complete a TCP connection to the origin server, but did not receive a timely HTTP response.","524_CLASS":t.SERVER_ERROR,A_TIMEOUT_OCCURRED:524,525:"SSL Handshake Failed","525_NAME":"SSL_HANDSHAKE_FAILED","525_MESSAGE":"Cloudflare could not negotiate a SSL/TLS handshake with the origin server.","525_CLASS":t.SERVER_ERROR,SSL_HANDSHAKE_FAILED:525,526:"Invalid SSL Certificate","526_NAME":"INVALID_SSL_CERTIFICATE","526_MESSAGE":"Cloudflare could not validate the SSL/TLS certificate that the origin server presented.","526_CLASS":t.SERVER_ERROR,INVALID_SSL_CERTIFICATE:526,527:"Railgun Error","527_NAME":"RAILGUN_ERROR","527_MESSAGE":"Error 527 indicates that the request timed out or failed after the WAN connection had been established.","527_CLASS":t.SERVER_ERROR,RAILGUN_ERROR:527}}}},672:e=>{"use strict";e.exports=e=>{if(typeof e!=="number"){throw new TypeError("Expected a number")}const t=e>0?Math.floor:Math.ceil;return{days:t(e/864e5),hours:t(e/36e5)%24,minutes:t(e/6e4)%60,seconds:t(e/1e3)%60,milliseconds:t(e)%1e3,microseconds:t(e*1e3)%1e3,nanoseconds:t(e*1e6)%1e3}}},720:(e,t,r)=>{"use strict";const n=r(672);const pluralize=(e,t)=>t===1?e:`${e}s`;const o=1e-7;e.exports=(e,t={})=>{if(!Number.isFinite(e)){throw new TypeError("Expected a finite number")}if(t.colonNotation){t.compact=false;t.formatSubMilliseconds=false;t.separateMilliseconds=false;t.verbose=false}if(t.compact){t.secondsDecimalDigits=0;t.millisecondsDecimalDigits=0}const r=[];const floorDecimals=(e,t)=>{const r=Math.floor(e*10**t+o);const n=Math.round(r)/10**t;return n.toFixed(t)};const add=(e,n,o,s)=>{if((r.length===0||!t.colonNotation)&&e===0&&!(t.colonNotation&&o==="m")){return}s=(s||e||"0").toString();let i;let a;if(t.colonNotation){i=r.length>0?":":"";a="";const e=s.includes(".")?s.split(".")[0].length:s.length;const t=r.length>0?2:1;s="0".repeat(Math.max(0,t-e))+s}else{i="";a=t.verbose?" "+pluralize(n,e):o}r.push(i+s+a)};const s=n(e);add(Math.trunc(s.days/365),"year","y");add(s.days%365,"day","d");add(s.hours,"hour","h");add(s.minutes,"minute","m");if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){add(s.seconds,"second","s");if(t.formatSubMilliseconds){add(s.milliseconds,"millisecond","ms");add(s.microseconds,"microsecond","µs");add(s.nanoseconds,"nanosecond","ns")}else{const e=s.milliseconds+s.microseconds/1e3+s.nanoseconds/1e6;const r=typeof t.millisecondsDecimalDigits==="number"?t.millisecondsDecimalDigits:0;const n=e>=1?Math.round(e):Math.ceil(e);const o=r?e.toFixed(r):n;add(Number.parseFloat(o,10),"millisecond","ms",o)}}else{const r=e/1e3%60;const n=typeof t.secondsDecimalDigits==="number"?t.secondsDecimalDigits:1;const o=floorDecimals(r,n);const s=t.keepDecimalsOnWholeSeconds?o:o.replace(/\.0+$/,"");add(Number.parseFloat(s,10),"second","s",s)}if(r.length===0){return"0"+(t.verbose?" milliseconds":"ms")}if(t.compact){return r[0]}if(typeof t.unitCount==="number"){const e=t.colonNotation?"":" ";return r.slice(0,Math.max(t.unitCount,1)).join(e)}return t.colonNotation?r.join(""):r.join(" ")}},504:(e,t,r)=>{"use strict";const n=r(734);e.exports=()=>{const e=process.hrtime();const end=t=>n(process.hrtime(e))[t];const returnValue=()=>end("milliseconds");returnValue.rounded=()=>Math.round(end("milliseconds"));returnValue.seconds=()=>end("seconds");returnValue.nanoseconds=()=>end("nanoseconds");return returnValue}},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},685:e=>{"use strict";e.exports=require("http")},951:e=>{"use strict";e.exports=require("next/dist/compiled/@edge-runtime/primitives")},37:e=>{"use strict";e.exports=require("os")},17:e=>{"use strict";e.exports=require("path")},781:e=>{"use strict";e.exports=require("stream")},144:e=>{"use strict";e.exports=require("vm")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var o=t[r]={exports:{}};var s=true;try{e[r].call(o.exports,o,o.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:true});e.EdgeRuntime=e.runServer=e.createHandler=void 0;var t=__nccwpck_require__(641);Object.defineProperty(e,"createHandler",{enumerable:true,get:function(){return t.createHandler}});Object.defineProperty(e,"runServer",{enumerable:true,get:function(){return t.runServer}});var n=__nccwpck_require__(266);Object.defineProperty(e,"EdgeRuntime",{enumerable:true,get:function(){return n.EdgeRuntime}})})();module.exports=r})(); \ No newline at end of file +(()=>{var e={290:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EdgeVM=void 0;const n=r(951);const o=r(657);class EdgeVM extends o.VM{constructor(e={}){super({...e,extend:t=>e.extend?e.extend((0,n.addPrimitives)(t)):(0,n.addPrimitives)(t)})}}t.EdgeVM=EdgeVM},411:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VM=t.EdgeVM=void 0;var n=r(290);Object.defineProperty(t,"EdgeVM",{enumerable:true,get:function(){return n.EdgeVM}});var o=r(657);Object.defineProperty(t,"VM",{enumerable:true,get:function(){return o.VM}})},4:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createRequire=t.requireDependencies=void 0;const n=r(147);const o=r(144);const s=r(17);function requireDependencies(e){const{context:t,requireCache:r,dependencies:n}=e;const o=createRequire(t,r);for(const{path:e,mapExports:r}of n){const n=o(e,e);for(const e of Object.keys(r)){t[r[e]]=n[e]}}}t.requireDependencies=requireDependencies;function createRequire(e,t){return function requireFn(r,i){const a=require.resolve(i,{paths:[(0,s.dirname)(r)]});const E=t.get(a);if(E!==undefined){return E.exports}const d={exports:{},loaded:false,id:a};t.set(a,d);const c=(0,o.runInContext)(`(function(module,exports,require,__dirname,__filename) {${(0,n.readFileSync)(a,"utf-8")}\n})`,e);try{c(d,d.exports,requireFn.bind(null,a),(0,s.dirname)(a),a)}finally{t.delete(a)}d.loaded=true;return d.exports}}t.createRequire=createRequire},586:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.tempFile=void 0;const o=n(r(147));const s=n(r(37));const i=n(r(17));const a=n(r(951));const{crypto:E}=a.default;function tempFile(e){const t=i.default.join(s.default.tmpdir(),E.randomUUID());o.default.writeFileSync(t,e);return{path:t,remove:()=>o.default.unlinkSync(t)}}t.tempFile=tempFile},657:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VM=void 0;const n=r(144);const o=r(4);const s=r(586);class VM{constructor(e={}){var t,r,s,i;const a=(0,n.createContext)({},{name:"Edge Runtime",codeGeneration:(t=e.codeGeneration)!==null&&t!==void 0?t:{strings:false,wasm:false}});this.requireCache=(r=e.requireCache)!==null&&r!==void 0?r:new Map;this.context=(i=(s=e.extend)===null||s===void 0?void 0:s.call(e,a))!==null&&i!==void 0?i:a;this.requireFn=(0,o.createRequire)(this.context,this.requireCache)}evaluate(e){return(0,n.runInContext)(e,this.context)}require(e){return this.requireFn(e,e)}requireInContext(e){const t=this.require(e);for(const[e,r]of Object.entries(t)){this.context[e]=r}}requireInlineInContext(e){const t=(0,s.tempFile)(e);this.requireInContext(t.path);t.remove()}}t.VM=VM},734:e=>{"use strict";e.exports=e=>{const t=e[0]*1e9+e[1];const r=t/1e6;const n=t/1e9;return{seconds:n,milliseconds:r,nanoseconds:t}}},447:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EdgeRuntime=void 0;const n=r(411);const o=r(641);let s;let i;class EdgeRuntime extends n.EdgeVM{constructor(e){super({...e,extend:t=>{var r,n;return(n=(r=e===null||e===void 0?void 0:e.extend)===null||r===void 0?void 0:r.call(e,t))!==null&&n!==void 0?n:t}});defineHandlerProps({object:this,setterName:"__onUnhandledRejectionHandler",setter:e=>s=e,getterName:"__rejectionHandlers",getter:()=>s});defineHandlerProps({object:this,setterName:"__onErrorHandler",setter:e=>i=e,getterName:"__errorHandlers",getter:()=>i});Object.defineProperty(this.context,"EdgeRuntime",{configurable:false,enumerable:false,writable:false,value:{version:o.VERSION}});this.evaluate(getDefineEventListenersCode());this.dispatchFetch=this.evaluate(getDispatchFetchCode());if(e===null||e===void 0?void 0:e.initialCode){this.evaluate(e.initialCode)}}}t.EdgeRuntime=EdgeRuntime;process.on("unhandledRejection",(function invokeRejectionHandlers(e,t){s===null||s===void 0?void 0:s.forEach((r=>r(e,t)))}));process.on("uncaughtException",(function invokeErrorHandlers(e){i===null||i===void 0?void 0:i.forEach((t=>t(e)))}));function getDefineEventListenersCode(){return`\n Object.defineProperty(self, '__listeners', {\n configurable: false,\n enumerable: false,\n value: {},\n writable: true,\n })\n\n function conditionallyUpdatesHandlerList(eventType) {\n if (eventType === 'unhandledrejection') {\n self.__onUnhandledRejectionHandler = self.__listeners[eventType];\n } else if (eventType === 'error') {\n self.__onErrorHandler = self.__listeners[eventType];\n }\n }\n\n function addEventListener(type, handler) {\n const eventType = type.toLowerCase();\n if (eventType === 'fetch' && self.__listeners.fetch) {\n throw new TypeError('You can register just one "fetch" event listener');\n }\n\n self.__listeners[eventType] = self.__listeners[eventType] || [];\n self.__listeners[eventType].push(handler);\n conditionallyUpdatesHandlerList(eventType);\n }\n\n function removeEventListener(type, handler) {\n const eventType = type.toLowerCase();\n if (self.__listeners[eventType]) {\n self.__listeners[eventType] = self.__listeners[eventType].filter(item => {\n return item !== handler;\n });\n\n if (self.__listeners[eventType].length === 0) {\n delete self.__listeners[eventType];\n }\n }\n conditionallyUpdatesHandlerList(eventType);\n }\n `}function getDispatchFetchCode(){return`(async function dispatchFetch(input, init) {\n const request = new Request(input, init);\n const event = new FetchEvent(request);\n if (!self.__listeners.fetch) {\n throw new Error("No fetch event listeners found");\n }\n\n const getResponse = ({ response, error }) => {\n if (error || !response || !(response instanceof Response)) {\n console.error(error ? error : 'The event listener did not respond')\n response = new Response(null, {\n statusText: 'Internal Server Error',\n status: 500\n })\n }\n\n response.waitUntil = () => Promise.all(event.awaiting);\n return response;\n }\n\n try {\n await self.__listeners.fetch[0].call(event, event)\n } catch (error) {\n return getResponse({ error })\n }\n\n return Promise.resolve(event.response)\n .then(response => getResponse({ response }))\n .catch(error => getResponse({ error }))\n })`}function defineHandlerProps({object:e,setterName:t,setter:r,getterName:n,getter:o}){Object.defineProperty(e.context,t,{set:r,configurable:false,enumerable:false});Object.defineProperty(e,n,{get:o,configurable:false,enumerable:false})}},572:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getClonableBodyStream=void 0;const n=r(781);function getClonableBodyStream(e,t){let r=null;return{finalize(){if(r){replaceRequestBody(e,bodyStreamToNodeStream(r))}},cloneBodyStream(){const n=r!==null&&r!==void 0?r:requestToBodyStream(e,t);const[o,s]=n.tee();r=o;return s}}}t.getClonableBodyStream=getClonableBodyStream;function requestToBodyStream(e,t){const r=new t({start(t){e.on("data",(e=>t.enqueue(e)));e.on("end",(()=>t.terminate()));e.on("error",(e=>t.error(e)))}});return r.readable}function bodyStreamToNodeStream(e){const t=e.getReader();return n.Readable.from(async function*(){while(true){const{done:e,value:r}=await t.read();if(e){return}yield r}}())}function replaceRequestBody(e,t){for(const r in t){let n=t[r];if(typeof n==="function"){n=n.bind(t)}e[r]=n}return e}},373:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.createHandler=void 0;const o=r(572);const s=n(r(720));const i=n(r(242));const a=n(r(504));function createHandler(e){const t=new Set;return{handler:async(r,n)=>{var E,d;const c=(0,a.default)();const _=r.method!=="GET"&&r.method!=="HEAD"?(0,o.getClonableBodyStream)(r,e.runtime.context.TransformStream):undefined;const u=await e.runtime.dispatchFetch(String(getURL(r)),{headers:toRequestInitHeaders(r),method:r.method,body:_===null||_===void 0?void 0:_.cloneBodyStream()});const l=u.waitUntil();t.add(l);l.finally((()=>t.delete(l)));n.statusCode=u.status;n.statusMessage=u.statusText;for(const[e,t]of Object.entries(toNodeHeaders(u.headers))){if(e!=="content-encoding"&&t!==undefined){n.setHeader(e,t)}}if(u.body){for await(const e of u.body){n.write(e)}}const S=`${r.socket.remoteAddress} ${r.method} ${r.url}`;const R=`${(E=(0,s.default)(c()).match(/[a-zA-Z]+|[0-9]+/g))===null||E===void 0?void 0:E.join(" ")}`;const A=`${n.statusCode} ${i.default[n.statusCode]}`;(d=e.logger)===null||d===void 0?void 0:d.debug(`${S} → ${A} in ${R}`);n.end()},waitUntil:()=>Promise.all(t)}}t.createHandler=createHandler;function getURL(e){var t;const r=((t=e.socket)===null||t===void 0?void 0:t.encrypted)?"https":"http";return new URL(String(e.url),`${r}://${String(e.headers.host)}`)}function toRequestInitHeaders(e){return Object.keys(e.headers).map((t=>{const r=e.headers[t];return[t,Array.isArray(r)?r.join(", "):r!==null&&r!==void 0?r:""]}))}function toNodeHeaders(e){const t={};if(e){for(const[r,n]of e.entries()){t[r]=r.toLowerCase()==="set-cookie"?e.getAll("set-cookie"):n}}return t}},31:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runServer=t.createHandler=void 0;var n=r(373);Object.defineProperty(t,"createHandler",{enumerable:true,get:function(){return n.createHandler}});var o=r(369);Object.defineProperty(t,"runServer",{enumerable:true,get:function(){return o.runServer}})},369:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.runServer=void 0;const o=r(373);const s=r(361);const i=n(r(685));async function runServer(e){const{handler:t,waitUntil:r}=(0,o.createHandler)(e);const n=i.default.createServer(t);n.listen(e.port);try{await(0,s.once)(n,"listening")}catch(t){if((t===null||t===void 0?void 0:t.code)==="EADDRINUSE"){return runServer({...e,port:undefined})}throw t}const a=n.address();const E=typeof a==="string"||a==null?String(a):`http://localhost:${a.port}`;return{url:E,close:async()=>{await r();await new Promise(((e,t)=>n.close((r=>{if(r)t(r);e()}))))},waitUntil:r}}t.runServer=runServer},641:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VERSION=void 0;t.VERSION="1.1.0-beta.10"},242:e=>{var t;t={"1xx":"Informational","1xx_NAME":"INFORMATIONAL","1xx_MESSAGE":"Indicates an interim response for communicating connection status or request progress prior to completing the requested action and sending a final response.",INFORMATIONAL:"1xx","2xx":"Successful","2xx_NAME":"SUCCESSFUL","2xx_MESSAGE":"Indicates that the client's request was successfully received, understood, and accepted.",SUCCESSFUL:"2xx","3xx":"Redirection","3xx_NAME":"REDIRECTION","3xx_MESSAGE":"Indicates that further action needs to be taken by the user agent in order to fulfill the request.",REDIRECTION:"3xx","4xx":"Client Error","4xx_NAME":"CLIENT_ERROR","4xx_MESSAGE":"Indicates that the client seems to have erred.",CLIENT_ERROR:"4xx","5xx":"Server Error","5xx_NAME":"SERVER_ERROR","5xx_MESSAGE":"Indicates that the server is aware that it has erred or is incapable of performing the requested method.",SERVER_ERROR:"5xx"};e.exports={classes:t,100:"Continue","100_NAME":"CONTINUE","100_MESSAGE":"The server has received the request headers and the client should proceed to send the request body.","100_CLASS":t.INFORMATIONAL,CONTINUE:100,101:"Switching Protocols","101_NAME":"SWITCHING_PROTOCOLS","101_MESSAGE":"The requester has asked the server to switch protocols and the server has agreed to do so.","101_CLASS":t.INFORMATIONAL,SWITCHING_PROTOCOLS:101,102:"Processing","102_NAME":"PROCESSING","102_MESSAGE":"A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request. This code indicates that the server has received and is processing the request, but no response is available yet.[7] This prevents the client from timing out and assuming the request was lost.","102_CLASS":t.INFORMATIONAL,PROCESSING:102,103:"Early Hints","103_NAME":"EARLY_HINTS","103_MESSAGE":"Used to return some response headers before final HTTP message.","103_CLASS":t.INFORMATIONAL,EARLY_HINTS:103,200:"OK","200_NAME":"OK","200_MESSAGE":"Standard response for successful HTTP requests.","200_CLASS":t.SUCCESSFUL,OK:200,201:"Created","201_NAME":"CREATED","201_MESSAGE":"The request has been fulfilled, resulting in the creation of a new resource.","201_CLASS":t.SUCCESSFUL,CREATED:201,202:"Accepted","202_NAME":"ACCEPTED","202_MESSAGE":"The request has been accepted for processing, but the processing has not been completed.","202_CLASS":t.SUCCESSFUL,ACCEPTED:202,203:"Non-Authoritative Information","203_NAME":"NON_AUTHORITATIVE_INFORMATION","203_MESSAGE":"The server is a transforming proxy (e.g. a Web accelerator) that received a 200 OK from its origin, but is returning a modified version of the origin's response.","203_CLASS":t.SUCCESSFUL,NON_AUTHORITATIVE_INFORMATION:203,204:"No Content","204_NAME":"NO_CONTENT","204_MESSAGE":"The server successfully processed the request and is not returning any content.","204_CLASS":t.SUCCESSFUL,NO_CONTENT:204,205:"Reset Content","205_NAME":"RESET_CONTENT","205_MESSAGE":"The server successfully processed the request, but is not returning any content. Unlike a 204 response, this response requires that the requester reset the document view.","205_CLASS":t.SUCCESSFUL,RESET_CONTENT:205,206:"Partial Content","206_NAME":"PARTIAL_CONTENT","206_MESSAGE":"The server is delivering only part of the resource (byte serving) due to a range header sent by the client.","206_CLASS":t.SUCCESSFUL,PARTIAL_CONTENT:206,207:"Multi Status","207_NAME":"MULTI_STATUS","207_MESSAGE":"The message body that follows is by default an XML message and can contain a number of separate response codes, depending on how many sub-requests were made.","207_CLASS":t.SUCCESSFUL,MULTI_STATUS:207,208:"Already Reported","208_NAME":"ALREADY_REPORTED","208_MESSAGE":"The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response, and are not being included again.","208_CLASS":t.SUCCESSFUL,ALREADY_REPORTED:208,226:"IM Used","226_NAME":"IM_USED","226_MESSAGE":"The server has fulfilled a request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.","226_CLASS":t.SUCCESSFUL,IM_USED:226,300:"Multiple Choices","300_NAME":"MULTIPLE_CHOICES","300_MESSAGE":"Indicates multiple options for the resource from which the client may choose.","300_CLASS":t.REDIRECTION,MULTIPLE_CHOICES:300,301:"Moved Permanently","301_NAME":"MOVED_PERMANENTLY","301_MESSAGE":"This and all future requests should be directed to the given URI.","301_CLASS":t.REDIRECTION,MOVED_PERMANENTLY:301,302:"Found","302_NAME":"FOUND","302_MESSAGE":'This is an example of industry practice contradicting the standard. The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302 with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307 to distinguish between the two behaviours.',"302_CLASS":t.REDIRECTION,FOUND:302,303:"See Other","303_NAME":"SEE_OTHER","303_MESSAGE":"The response to the request can be found under another URI using the GET method.","303_CLASS":t.REDIRECTION,SEE_OTHER:303,304:"Not Modified","304_NAME":"NOT_MODIFIED","304_MESSAGE":"Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.","304_CLASS":t.REDIRECTION,NOT_MODIFIED:304,305:"Use Proxy","305_NAME":"USE_PROXY","305_MESSAGE":"The requested resource is available only through a proxy, the address for which is provided in the response.","305_CLASS":t.REDIRECTION,USE_PROXY:305,306:"Switch Proxy","306_NAME":"SWITCH_PROXY","306_MESSAGE":'No longer used. Originally meant "Subsequent requests should use the specified proxy.',"306_CLASS":t.REDIRECTION,SWITCH_PROXY:306,307:"Temporary Redirect","307_NAME":"TEMPORARY_REDIRECT","307_MESSAGE":"In this case, the request should be repeated with another URI; however, future requests should still use the original URI.","307_CLASS":t.REDIRECTION,TEMPORARY_REDIRECT:307,308:"Permanent Redirect","308_NAME":"PERMANENT_REDIRECT","308_MESSAGE":"The request and all future requests should be repeated using another URI.","308_CLASS":t.REDIRECTION,PERMANENT_REDIRECT:308,400:"Bad Request","400_NAME":"BAD_REQUEST","400_MESSAGE":"The server cannot or will not process the request due to an apparent client error.","400_CLASS":t.CLIENT_ERROR,BAD_REQUEST:400,401:"Unauthorized","401_NAME":"UNAUTHORIZED","401_MESSAGE":"Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided.","401_CLASS":t.CLIENT_ERROR,UNAUTHORIZED:401,402:"Payment Required","402_NAME":"PAYMENT_REQUIRED","402_MESSAGE":"Reserved for future use. The original intention was that this code might be used as part of some form of digital cash or micropayment scheme, as proposed for example by GNU Taler, but that has not yet happened, and this code is not usually used.","402_CLASS":t.CLIENT_ERROR,PAYMENT_REQUIRED:402,403:"Forbidden","403_NAME":"FORBIDDEN","403_MESSAGE":"The request was valid, but the server is refusing action.","403_CLASS":t.CLIENT_ERROR,FORBIDDEN:403,404:"Not Found","404_NAME":"NOT_FOUND","404_MESSAGE":"The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.","404_CLASS":t.CLIENT_ERROR,NOT_FOUND:404,405:"Method Not Allowed","405_NAME":"METHOD_NOT_ALLOWED","405_MESSAGE":"A request method is not supported for the requested resource.","405_CLASS":t.CLIENT_ERROR,METHOD_NOT_ALLOWED:405,406:"Not Acceptable","406_NAME":"NOT_ACCEPTABLE","406_MESSAGE":"The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.","406_CLASS":t.CLIENT_ERROR,NOT_ACCEPTABLE:406,407:"Proxy Authentication Required","407_NAME":"PROXY_AUTHENTICATION_REQUIRED","407_MESSAGE":"The client must first authenticate itself with the proxy.","407_CLASS":t.CLIENT_ERROR,PROXY_AUTHENTICATION_REQUIRED:407,408:"Request Time-out","408_NAME":"REQUEST_TIMEOUT","408_MESSAGE":"The server timed out waiting for the request.","408_CLASS":t.CLIENT_ERROR,REQUEST_TIMEOUT:408,409:"Conflict","409_NAME":"CONFLICT","409_MESSAGE":"Indicates that the request could not be processed because of conflict in the request, such as an edit conflict between multiple simultaneous updates.","409_CLASS":t.CLIENT_ERROR,CONFLICT:409,410:"Gone","410_NAME":"GONE","410_MESSAGE":"Indicates that the resource requested is no longer available and will not be available again.","410_CLASS":t.CLIENT_ERROR,GONE:410,411:"Length Required","411_NAME":"LENGTH_REQUIRED","411_MESSAGE":"The request did not specify the length of its content, which is required by the requested resource.","411_CLASS":t.CLIENT_ERROR,LENGTH_REQUIRED:411,412:"Precondition Failed","412_NAME":"PRECONDITION_FAILED","412_MESSAGE":"The server does not meet one of the preconditions that the requester put on the request.","412_CLASS":t.CLIENT_ERROR,PRECONDITION_FAILED:412,413:"Request Entity Too Large","413_NAME":"REQUEST_ENTITY_TOO_LARGE","413_MESSAGE":'The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".',"413_CLASS":t.CLIENT_ERROR,REQUEST_ENTITY_TOO_LARGE:413,414:"Request-URI Too Large","414_NAME":"REQUEST_URI_TOO_LONG","414_MESSAGE":"The URI provided was too long for the server to process.","414_CLASS":t.CLIENT_ERROR,REQUEST_URI_TOO_LONG:414,415:"Unsupported Media Type","415_NAME":"UNSUPPORTED_MEDIA_TYPE","415_MESSAGE":"The request entity has a media type which the server or resource does not support.","415_CLASS":t.CLIENT_ERROR,UNSUPPORTED_MEDIA_TYPE:415,416:"Requested Range not Satisfiable","416_NAME":"REQUESTED_RANGE_NOT_SATISFIABLE","416_MESSAGE":"The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.","416_CLASS":t.CLIENT_ERROR,REQUESTED_RANGE_NOT_SATISFIABLE:416,417:"Expectation Failed","417_NAME":"EXPECTATION_FAILED","417_MESSAGE":"The server cannot meet the requirements of the Expect request-header field.","417_CLASS":t.CLIENT_ERROR,EXPECTATION_FAILED:417,418:"I'm a teapot","418_NAME":"IM_A_TEAPOT","418_MESSAGE":'Any attempt to brew coffee with a teapot should result in the error code "418 I\'m a teapot". The resulting entity body MAY be short and stout.',"418_CLASS":t.CLIENT_ERROR,IM_A_TEAPOT:418,421:"Misdirected Request","421_NAME":"MISDIRECTED_REQUEST","421_MESSAGE":"The request was directed at a server that is not able to produce a response.","421_CLASS":t.CLIENT_ERROR,MISDIRECTED_REQUEST:421,422:"Unprocessable Entity","422_NAME":"UNPROCESSABLE_ENTITY","422_MESSAGE":"The request was well-formed but was unable to be followed due to semantic errors.","422_CLASS":t.CLIENT_ERROR,UNPROCESSABLE_ENTITY:422,423:"Locked","423_NAME":"LOCKED","423_MESSAGE":"The resource that is being accessed is locked.","423_CLASS":t.CLIENT_ERROR,LOCKED:423,424:"Failed Dependency","424_NAME":"FAILED_DEPENDENCY","424_MESSAGE":"The request failed because it depended on another request and that request failed.","424_CLASS":t.CLIENT_ERROR,FAILED_DEPENDENCY:424,426:"Upgrade Required","426_NAME":"UPGRADE_REQUIRED","426_MESSAGE":"The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.","426_CLASS":t.CLIENT_ERROR,UPGRADE_REQUIRED:426,428:"Precondition Required","428_NAME":"PRECONDITION_REQUIRED","428_MESSAGE":"The origin server requires the request to be conditional.","428_CLASS":t.CLIENT_ERROR,PRECONDITION_REQUIRED:428,429:"Too Many Requests","429_NAME":"TOO_MANY_REQUESTS","429_MESSAGE":"The user has sent too many requests in a given amount of time.","429_CLASS":t.CLIENT_ERROR,TOO_MANY_REQUESTS:429,431:"Request Header Fields Too Large","431_NAME":"REQUEST_HEADER_FIELDS_TOO_LARGE","431_MESSAGE":"The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large.","431_CLASS":t.CLIENT_ERROR,REQUEST_HEADER_FIELDS_TOO_LARGE:431,451:"Unavailable For Legal Reasons","451_NAME":"UNAVAILABLE_FOR_LEGAL_REASONS","451_MESSAGE":"A server operator has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource.","451_CLASS":t.CLIENT_ERROR,UNAVAILABLE_FOR_LEGAL_REASONS:451,500:"Internal Server Error","500_NAME":"INTERNAL_SERVER_ERROR","500_MESSAGE":"A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.","500_CLASS":t.SERVER_ERROR,INTERNAL_SERVER_ERROR:500,501:"Not Implemented","501_NAME":"NOT_IMPLEMENTED","501_MESSAGE":"The server either does not recognize the request method, or it lacks the ability to fulfil the request. Usually this implies future availability.","501_CLASS":t.SERVER_ERROR,NOT_IMPLEMENTED:501,502:"Bad Gateway","502_NAME":"BAD_GATEWAY","502_MESSAGE":"The server was acting as a gateway or proxy and received an invalid response from the upstream server.","502_CLASS":t.SERVER_ERROR,BAD_GATEWAY:502,503:"Service Unavailable","503_NAME":"SERVICE_UNAVAILABLE","503_MESSAGE":"The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.","503_CLASS":t.SERVER_ERROR,SERVICE_UNAVAILABLE:503,504:"Gateway Time-out","504_NAME":"GATEWAY_TIMEOUT","504_MESSAGE":"The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.","504_CLASS":t.SERVER_ERROR,GATEWAY_TIMEOUT:504,505:"HTTP Version not Supported","505_NAME":"HTTP_VERSION_NOT_SUPPORTED","505_MESSAGE":"The server does not support the HTTP protocol version used in the request.","505_CLASS":t.SERVER_ERROR,HTTP_VERSION_NOT_SUPPORTED:505,506:"Variant Also Negotiates","506_NAME":"VARIANT_ALSO_NEGOTIATES","506_MESSAGE":"Transparent content negotiation for the request results in a circular reference.","506_CLASS":t.SERVER_ERROR,VARIANT_ALSO_NEGOTIATES:506,507:"Insufficient Storage","507_NAME":"INSUFFICIENT_STORAGE","507_MESSAGE":"The server is unable to store the representation needed to complete the request.","507_CLASS":t.SERVER_ERROR,INSUFFICIENT_STORAGE:507,508:"Loop Detected","508_NAME":"LOOP_DETECTED","508_MESSAGE":"The server detected an infinite loop while processing the request.","508_CLASS":t.SERVER_ERROR,LOOP_DETECTED:508,510:"Not Extended","510_NAME":"NOT_EXTENDED","510_MESSAGE":"Further extensions to the request are required for the server to fulfil it.","510_CLASS":t.SERVER_ERROR,NOT_EXTENDED:510,511:"Network Authentication Required","511_NAME":"NETWORK_AUTHENTICATION_REQUIRED","511_MESSAGE":"The client needs to authenticate to gain network access. Intended for use by intercepting proxies used to control access to the network.","511_CLASS":t.SERVER_ERROR,NETWORK_AUTHENTICATION_REQUIRED:511,extra:{unofficial:{103:"Checkpoint","103_NAME":"CHECKPOINT","103_MESSAGE":"Used in the resumable requests proposal to resume aborted PUT or POST requests.","103_CLASS":t.INFORMATIONAL,CHECKPOINT:103,419:"Page Expired","419_NAME":"PAGE_EXPIRED","419_MESSAGE":"Used by the Laravel Framework when a CSRF Token is missing or expired.","419_CLASS":t.CLIENT_ERROR,PAGE_EXPIRED:419,218:"This is fine","218_NAME":"THIS_IS_FINE","218_MESSAGE":"Used as a catch-all error condition for allowing response bodies to flow through Apache when ProxyErrorOverride is enabled. When ProxyErrorOverride is enabled in Apache, response bodies that contain a status code of 4xx or 5xx are automatically discarded by Apache in favor of a generic response or a custom response specified by the ErrorDocument directive.","218_CLASS":t.SUCCESSFUL,THIS_IS_FINE:218,420:"Enhance Your Calm","420_NAME":"ENHANCE_YOUR_CALM","420_MESSAGE":"Returned by version 1 of the Twitter Search and Trends API when the client is being rate limited; versions 1.1 and later use the 429 Too Many Requests response code instead.","420_CLASS":t.CLIENT_ERROR,ENHANCE_YOUR_CALM:420,450:"Blocked by Windows Parental Controls","450_NAME":"BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS","450_MESSAGE":"The Microsoft extension code indicated when Windows Parental Controls are turned on and are blocking access to the requested webpage.","450_CLASS":t.CLIENT_ERROR,BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS:450,498:"Invalid Token","498_NAME":"INVALID_TOKEN","498_MESSAGE":"Returned by ArcGIS for Server. Code 498 indicates an expired or otherwise invalid token.","498_CLASS":t.CLIENT_ERROR,INVALID_TOKEN:498,499:"Token Required","499_NAME":"TOKEN_REQUIRED","499_MESSAGE":"Returned by ArcGIS for Server. Code 499 indicates that a token is required but was not submitted.","499_CLASS":t.CLIENT_ERROR,TOKEN_REQUIRED:499,509:"Bandwidth Limit Exceeded","509_NAME":"BANDWIDTH_LIMIT_EXCEEDED","509_MESSAGE":"The server has exceeded the bandwidth specified by the server administrator.","509_CLASS":t.SERVER_ERROR,BANDWIDTH_LIMIT_EXCEEDED:509,530:"Site is frozen","530_NAME":"SITE_IS_FROZEN","530_MESSAGE":"Used by the Pantheon web platform to indicate a site that has been frozen due to inactivity.","530_CLASS":t.SERVER_ERROR,SITE_IS_FROZEN:530,598:"Network read timeout error","598_NAME":"NETWORK_READ_TIMEOUT_ERROR","598_MESSAGE":"Used by some HTTP proxies to signal a network read timeout behind the proxy to a client in front of the proxy.","598_CLASS":t.SERVER_ERROR,NETWORK_READ_TIMEOUT_ERROR:598},iis:{440:"Login Time-out","440_NAME":"LOGIN_TIME_OUT","440_MESSAGE":"The client's session has expired and must log in again.","440_CLASS":t.CLIENT_ERROR,LOGIN_TIME_OUT:440,449:"Retry With","449_NAME":"RETRY_WITH","449_MESSAGE":"The server cannot honour the request because the user has not provided the required information.","449_CLASS":t.CLIENT_ERROR,RETRY_WITH:449,451:"Redirect","451_NAME":"REDIRECT","451_MESSAGE":"Used in Exchange ActiveSync when either a more efficient server is available or the server cannot access the users' mailbox.","451_CLASS":t.CLIENT_ERROR,REDIRECT:451},nginx:{444:"No Response","444_NAME":"NO_RESPONSE","444_MESSAGE":"Used internally to instruct the server to return no information to the client and close the connection immediately.","444_CLASS":t.CLIENT_ERROR,NO_RESPONSE:444,494:"Request header too large","494_NAME":"REQUEST_HEADER_TOO_LARGE","494_MESSAGE":"Client sent too large request or too long header line.","494_CLASS":t.CLIENT_ERROR,REQUEST_HEADER_TOO_LARGE:494,495:"SSL Certificate Error","495_NAME":"SSL_CERTIFICATE_ERROR","495_MESSAGE":"An expansion of the 400 Bad Request response code, used when the client has provided an invalid client certificate.","495_CLASS":t.CLIENT_ERROR,SSL_CERTIFICATE_ERROR:495,496:"SSL Certificate Required","496_NAME":"SSL_CERTIFICATE_REQUIRED","496_MESSAGE":"An expansion of the 400 Bad Request response code, used when a client certificate is required but not provided.","496_CLASS":t.CLIENT_ERROR,SSL_CERTIFICATE_REQUIRED:496,497:"HTTP Request Sent to HTTPS Port","497_NAME":"HTTP_REQUEST_SENT_TO_HTTPS_PORT","497_MESSAGE":"An expansion of the 400 Bad Request response code, used when the client has made a HTTP request to a port listening for HTTPS requests.","497_CLASS":t.CLIENT_ERROR,HTTP_REQUEST_SENT_TO_HTTPS_PORT:497,499:"Client Closed Request","499_NAME":"CLIENT_CLOSED_REQUEST","499_MESSAGE":"Used when the client has closed the request before the server could send a response.","499_CLASS":t.CLIENT_ERROR,CLIENT_CLOSED_REQUEST:499},cloudflare:{520:"Unknown Error","520_NAME":"UNKNOWN_ERROR","520_MESSAGE":'The 520 error is used as a "catch-all response for when the origin server returns something unexpected", listing connection resets, large headers, and empty or invalid responses as common triggers.',"520_CLASS":t.SERVER_ERROR,UNKNOWN_ERROR:520,521:"Web Server Is Down","521_NAME":"WEB_SERVER_IS_DOWN","521_MESSAGE":"The origin server has refused the connection from Cloudflare.","521_CLASS":t.SERVER_ERROR,WEB_SERVER_IS_DOWN:521,522:"Connection Timed Out","522_NAME":"CONNECTION_TIMED_OUT","522_MESSAGE":"Cloudflare could not negotiate a TCP handshake with the origin server.","522_CLASS":t.SERVER_ERROR,CONNECTION_TIMED_OUT:522,523:"Origin Is Unreachable","523_NAME":"ORIGIN_IS_UNREACHABLE","523_MESSAGE":"Cloudflare could not reach the origin server.","523_CLASS":t.SERVER_ERROR,ORIGIN_IS_UNREACHABLE:523,524:"A Timeout Occurred","524_NAME":"A_TIMEOUT_OCCURRED","524_MESSAGE":"Cloudflare was able to complete a TCP connection to the origin server, but did not receive a timely HTTP response.","524_CLASS":t.SERVER_ERROR,A_TIMEOUT_OCCURRED:524,525:"SSL Handshake Failed","525_NAME":"SSL_HANDSHAKE_FAILED","525_MESSAGE":"Cloudflare could not negotiate a SSL/TLS handshake with the origin server.","525_CLASS":t.SERVER_ERROR,SSL_HANDSHAKE_FAILED:525,526:"Invalid SSL Certificate","526_NAME":"INVALID_SSL_CERTIFICATE","526_MESSAGE":"Cloudflare could not validate the SSL/TLS certificate that the origin server presented.","526_CLASS":t.SERVER_ERROR,INVALID_SSL_CERTIFICATE:526,527:"Railgun Error","527_NAME":"RAILGUN_ERROR","527_MESSAGE":"Error 527 indicates that the request timed out or failed after the WAN connection had been established.","527_CLASS":t.SERVER_ERROR,RAILGUN_ERROR:527}}}},672:e=>{"use strict";e.exports=e=>{if(typeof e!=="number"){throw new TypeError("Expected a number")}const t=e>0?Math.floor:Math.ceil;return{days:t(e/864e5),hours:t(e/36e5)%24,minutes:t(e/6e4)%60,seconds:t(e/1e3)%60,milliseconds:t(e)%1e3,microseconds:t(e*1e3)%1e3,nanoseconds:t(e*1e6)%1e3}}},720:(e,t,r)=>{"use strict";const n=r(672);const pluralize=(e,t)=>t===1?e:`${e}s`;const o=1e-7;e.exports=(e,t={})=>{if(!Number.isFinite(e)){throw new TypeError("Expected a finite number")}if(t.colonNotation){t.compact=false;t.formatSubMilliseconds=false;t.separateMilliseconds=false;t.verbose=false}if(t.compact){t.secondsDecimalDigits=0;t.millisecondsDecimalDigits=0}const r=[];const floorDecimals=(e,t)=>{const r=Math.floor(e*10**t+o);const n=Math.round(r)/10**t;return n.toFixed(t)};const add=(e,n,o,s)=>{if((r.length===0||!t.colonNotation)&&e===0&&!(t.colonNotation&&o==="m")){return}s=(s||e||"0").toString();let i;let a;if(t.colonNotation){i=r.length>0?":":"";a="";const e=s.includes(".")?s.split(".")[0].length:s.length;const t=r.length>0?2:1;s="0".repeat(Math.max(0,t-e))+s}else{i="";a=t.verbose?" "+pluralize(n,e):o}r.push(i+s+a)};const s=n(e);add(Math.trunc(s.days/365),"year","y");add(s.days%365,"day","d");add(s.hours,"hour","h");add(s.minutes,"minute","m");if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){add(s.seconds,"second","s");if(t.formatSubMilliseconds){add(s.milliseconds,"millisecond","ms");add(s.microseconds,"microsecond","µs");add(s.nanoseconds,"nanosecond","ns")}else{const e=s.milliseconds+s.microseconds/1e3+s.nanoseconds/1e6;const r=typeof t.millisecondsDecimalDigits==="number"?t.millisecondsDecimalDigits:0;const n=e>=1?Math.round(e):Math.ceil(e);const o=r?e.toFixed(r):n;add(Number.parseFloat(o,10),"millisecond","ms",o)}}else{const r=e/1e3%60;const n=typeof t.secondsDecimalDigits==="number"?t.secondsDecimalDigits:1;const o=floorDecimals(r,n);const s=t.keepDecimalsOnWholeSeconds?o:o.replace(/\.0+$/,"");add(Number.parseFloat(s,10),"second","s",s)}if(r.length===0){return"0"+(t.verbose?" milliseconds":"ms")}if(t.compact){return r[0]}if(typeof t.unitCount==="number"){const e=t.colonNotation?"":" ";return r.slice(0,Math.max(t.unitCount,1)).join(e)}return t.colonNotation?r.join(""):r.join(" ")}},504:(e,t,r)=>{"use strict";const n=r(734);e.exports=()=>{const e=process.hrtime();const end=t=>n(process.hrtime(e))[t];const returnValue=()=>end("milliseconds");returnValue.rounded=()=>Math.round(end("milliseconds"));returnValue.seconds=()=>end("seconds");returnValue.nanoseconds=()=>end("nanoseconds");return returnValue}},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},685:e=>{"use strict";e.exports=require("http")},951:e=>{"use strict";e.exports=require("next/dist/compiled/@edge-runtime/primitives")},37:e=>{"use strict";e.exports=require("os")},17:e=>{"use strict";e.exports=require("path")},781:e=>{"use strict";e.exports=require("stream")},144:e=>{"use strict";e.exports=require("vm")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var o=t[r]={exports:{}};var s=true;try{e[r].call(o.exports,o,o.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:true});e.EdgeRuntime=e.runServer=e.createHandler=void 0;var t=__nccwpck_require__(31);Object.defineProperty(e,"createHandler",{enumerable:true,get:function(){return t.createHandler}});Object.defineProperty(e,"runServer",{enumerable:true,get:function(){return t.runServer}});var n=__nccwpck_require__(447);Object.defineProperty(e,"EdgeRuntime",{enumerable:true,get:function(){return n.EdgeRuntime}})})();module.exports=r})(); \ No newline at end of file diff --git a/packages/next/package.json b/packages/next/package.json index 43aa10486f1d..b2264877727b 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -118,7 +118,7 @@ "@babel/runtime": "7.15.4", "@babel/traverse": "7.18.0", "@babel/types": "7.18.0", - "@edge-runtime/primitives": "1.1.0-beta.8", + "@edge-runtime/primitives": "1.1.0-beta.10", "@hapi/accept": "5.0.2", "@napi-rs/cli": "2.4.4", "@napi-rs/triples": "1.1.0", @@ -195,7 +195,7 @@ "debug": "4.1.1", "devalue": "2.0.1", "domain-browser": "4.19.0", - "edge-runtime": "1.1.0-beta.8", + "edge-runtime": "1.1.0-beta.10", "etag": "1.8.1", "events": "3.3.0", "find-cache-dir": "3.3.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d8c106a5e734..9adfb6ada586 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,7 +19,7 @@ importers: '@babel/plugin-proposal-object-rest-spread': 7.14.7 '@babel/preset-flow': 7.14.5 '@babel/preset-react': 7.14.5 - '@edge-runtime/jest-environment': 1.1.0-beta.8 + '@edge-runtime/jest-environment': 1.1.0-beta.10 '@fullhuman/postcss-purgecss': 1.3.0 '@mdx-js/loader': 0.18.0 '@next/bundle-analyzer': workspace:* @@ -168,7 +168,7 @@ importers: '@babel/plugin-proposal-object-rest-spread': 7.14.7_@babel+core@7.18.0 '@babel/preset-flow': 7.14.5_@babel+core@7.18.0 '@babel/preset-react': 7.14.5_@babel+core@7.18.0 - '@edge-runtime/jest-environment': 1.1.0-beta.8 + '@edge-runtime/jest-environment': 1.1.0-beta.10 '@fullhuman/postcss-purgecss': 1.3.0 '@mdx-js/loader': 0.18.0_uuaxwgga6hqycsez5ok7v2wg4i '@next/bundle-analyzer': link:packages/next-bundle-analyzer @@ -406,7 +406,7 @@ importers: '@babel/runtime': 7.15.4 '@babel/traverse': 7.18.0 '@babel/types': 7.18.0 - '@edge-runtime/primitives': 1.1.0-beta.8 + '@edge-runtime/primitives': 1.1.0-beta.10 '@hapi/accept': 5.0.2 '@napi-rs/cli': 2.4.4 '@napi-rs/triples': 1.1.0 @@ -486,7 +486,7 @@ importers: debug: 4.1.1 devalue: 2.0.1 domain-browser: 4.19.0 - edge-runtime: 1.1.0-beta.8 + edge-runtime: 1.1.0-beta.10 etag: 1.8.1 events: 3.3.0 find-cache-dir: 3.3.1 @@ -600,7 +600,7 @@ importers: '@babel/runtime': 7.15.4 '@babel/traverse': 7.18.0 '@babel/types': 7.18.0 - '@edge-runtime/primitives': 1.1.0-beta.8 + '@edge-runtime/primitives': 1.1.0-beta.10 '@hapi/accept': 5.0.2 '@napi-rs/cli': 2.4.4 '@napi-rs/triples': 1.1.0 @@ -677,7 +677,7 @@ importers: debug: 4.1.1 devalue: 2.0.1 domain-browser: 4.19.0 - edge-runtime: 1.1.0-beta.8 + edge-runtime: 1.1.0-beta.10 etag: 1.8.1 events: 3.3.0 find-cache-dir: 3.3.1 @@ -3225,10 +3225,10 @@ packages: resolution: {integrity: sha512-mxi0n00nJwnjaXUQIfTS7l64yvwGXs435gEjuDhzTHZyrmnCYdELXdJr3Q+6v4DO1mmmtNTYFHUvIlpCmMUC6g==} dev: true - /@edge-runtime/jest-environment/1.1.0-beta.8: - resolution: {integrity: sha512-CyzAWyMGII1QZQUxM4Z6iwqaSOLsYq4lubJyBtgEpznCmM7kozJTSQD/gfulodLnod1p7T63U6lf0Bc8W4G/jw==} + /@edge-runtime/jest-environment/1.1.0-beta.10: + resolution: {integrity: sha512-RXZwWyra3yxs7TWGVy+8sDD2m2MAaTho92BBpaxcHWCEErJKzJIQT3UsA7rmvozcdr4vwbuTaFy/aL3AhsffdQ==} dependencies: - '@edge-runtime/vm': 1.1.0-beta.8 + '@edge-runtime/vm': 1.1.0-beta.10 '@jest/environment': 28.1.1 '@jest/fake-timers': 28.1.1 '@jest/types': 28.1.1 @@ -3236,14 +3236,14 @@ packages: jest-util: 28.1.1 dev: true - /@edge-runtime/primitives/1.1.0-beta.8: - resolution: {integrity: sha512-9YR2UPcNJ0giGL3lfoRfmZwRUC3xBaAVo82GrTXtORdg3iMZnWrXjJj/UXlGJQdLXVWz1E1zMgNchWgsD6gL3Q==} + /@edge-runtime/primitives/1.1.0-beta.10: + resolution: {integrity: sha512-hv0i2ce35yspqlnmcSKV/GEKfk8WyB9aTSOk0ZMK6gOR6ZvBDCzDpdacIcGuktaTuDinwon2DLxXRhiAS2PjUg==} dev: true - /@edge-runtime/vm/1.1.0-beta.8: - resolution: {integrity: sha512-9F+9QSWPOQY7n5DLTfxV45JLPyYzGoA2Q8MRv4jNzQ1v/quw7ZEl+uDlx1VmxJl+TiMdhP18uF7uudIgh7iRiA==} + /@edge-runtime/vm/1.1.0-beta.10: + resolution: {integrity: sha512-AHeIdWp1OUf4kvA4to56shXZzM66bR84LMNTbYGY7G3+BBr+VkUcvU+hWr8JYCOj/iAHi/fuE9r1TyrMm2pQaw==} dependencies: - '@edge-runtime/primitives': 1.1.0-beta.8 + '@edge-runtime/primitives': 1.1.0-beta.10 dev: true /@emotion/is-prop-valid/0.8.8: @@ -9917,12 +9917,12 @@ packages: safe-buffer: 5.2.0 dev: true - /edge-runtime/1.1.0-beta.8: - resolution: {integrity: sha512-Dq86FKadB17HduGJHga6bX5m93v3qj5IKyKGqBj0X+wEC0DMW5hhKqU/JTY5mRMDAOs+UpJ2D0/4VTveGkuaaw==} + /edge-runtime/1.1.0-beta.10: + resolution: {integrity: sha512-dFjK7DawBZl5OxGhfWR9JkFadF7dNkcZ2PxSgBQhF4L9S8Q1mj5Jt0Tng2Q7vwOEpRiNC4Xr3q1uvmLsgNc9eg==} hasBin: true dependencies: '@edge-runtime/format': 1.0.0 - '@edge-runtime/vm': 1.1.0-beta.8 + '@edge-runtime/vm': 1.1.0-beta.10 exit-hook: 2.2.1 http-status: 1.5.2 mri: 1.2.0 @@ -20633,7 +20633,7 @@ packages: worker-farm: 1.7.0 dev: true - /terser-webpack-plugin/5.2.4_webpack@5.73.0: + /terser-webpack-plugin/5.2.4: resolution: {integrity: sha512-E2CkNMN+1cho04YpdANyRrn8CyN4yMy+WdFKZIySFZrGXZxJwJP6PMNGGc/Mcr6qygQHUUqRxnAPmi0M9f00XA==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -20655,7 +20655,6 @@ packages: serialize-javascript: 6.0.0 source-map: 0.6.1 terser: 5.10.0 - webpack: 5.73.0 dev: true /terser/4.8.0: @@ -21001,7 +21000,7 @@ packages: typescript: 4.6.3 /tty-browserify/0.0.0: - resolution: {integrity: sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=} + resolution: {integrity: sha512-JVa5ijo+j/sOoHGjw0sxw734b1LhBkQ3bvUGNdxnVXDCX81Yx7TFgnZygxrIIWn23hbfTaMYLwRmAxFyDuFmIw==} dev: true /tty-browserify/0.0.1: @@ -22084,7 +22083,7 @@ packages: neo-async: 2.6.2 schema-utils: 3.1.1 tapable: 2.2.0 - terser-webpack-plugin: 5.2.4_webpack@5.73.0 + terser-webpack-plugin: 5.2.4 watchpack: 2.4.0 webpack-sources: 3.2.3 transitivePeerDependencies: