From d12d300345b90688b327a5888405140d69e52a67 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Fri, 19 Aug 2022 11:44:07 +0200 Subject: [PATCH] build: upgrade edge-runtime --- package.json | 2 +- .../@edge-runtime/primitives/console.js | 420 ++++++++++++++---- .../@edge-runtime/primitives/package.json | 2 +- .../babel-packages/packages-bundle.js | 2 +- packages/next/compiled/edge-runtime/index.js | 2 +- packages/next/package.json | 4 +- pnpm-lock.yaml | 93 ++-- 7 files changed, 378 insertions(+), 147 deletions(-) diff --git a/package.json b/package.json index fbc7d8c6f297e28..b577e007ef80292 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,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.26", + "@edge-runtime/jest-environment": "1.1.0-beta.27", "@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/console.js b/packages/next/compiled/@edge-runtime/primitives/console.js index ace6cc41b55303e..e6c27210c2e495a 100644 --- a/packages/next/compiled/@edge-runtime/primitives/console.js +++ b/packages/next/compiled/@edge-runtime/primitives/console.js @@ -34,11 +34,87 @@ var init_define_process = __esm({ // ../format/dist/index.js var require_dist = __commonJS({ - "../format/dist/index.js"(exports) { - "use strict"; + "../format/dist/index.js"(exports, module2) { init_define_process(); - Object.defineProperty(exports, "__esModule", { value: true }); - exports.createFormat = void 0; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __export2 = /* @__PURE__ */ __name((target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }, "__export"); + var __copyProps2 = /* @__PURE__ */ __name((to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }, "__copyProps"); + var __toCommonJS2 = /* @__PURE__ */ __name((mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod), "__toCommonJS"); + var src_exports = {}; + __export2(src_exports, { + createFormat: () => createFormat2 + }); + module2.exports = __toCommonJS2(src_exports); + var ReflectGetOwnPropertyDescriptor = Reflect.getOwnPropertyDescriptor; + function GetOwnGetter(target, key) { + const descriptor = ReflectGetOwnPropertyDescriptor(target, key); + return descriptor ? descriptor.get : void 0; + } + __name(GetOwnGetter, "GetOwnGetter"); + var ReflectGetPrototypeOf = Reflect.getPrototypeOf; + var TypedArray = ReflectGetPrototypeOf(Uint8Array); + var ArrayPrototypeFilter = Array.prototype.filter; + var ArrayPrototypePush = Array.prototype.push; + var DatePrototypeGetTime = Date.prototype.getTime; + var DatePrototypeToISOString = Date.prototype.toISOString; + var ObjectGetOwnPropertyDescriptors = Object.getOwnPropertyDescriptors; + var ObjectGetOwnPropertyNames = Object.getOwnPropertyNames; + var ObjectGetOwnPropertySymbols = Object.getOwnPropertySymbols; + var ObjectKeys = Object.keys; + var ObjectPrototypePropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + var ObjectPrototypeToString = Object.prototype.toString; + var MapPrototypeGetSize = GetOwnGetter(Map.prototype, "size"); + var SetPrototypeGetSize = GetOwnGetter(Set.prototype, "size"); + var StringPrototypeIncludes = String.prototype.includes; + var SymbolIterator = Symbol.iterator; + var SymbolPrototypeToString = Symbol.prototype.toString; + var TypedArrayPrototypeGetLength = GetOwnGetter(TypedArray.prototype, "length"); + var typedArrayStrings = /* @__PURE__ */ new Set([ + "[object BigInt64Array]", + "[object BigUint64Array]", + "[object Float32Array]", + "[object Float64Array]", + "[object Int8Array]", + "[object Int16Array]", + "[object Int32Array]", + "[object Uint8Array]", + "[object Uint8ClampedArray]", + "[object Uint16Array]", + "[object Uint32Array]" + ]); + function getOwnNonIndexProperties(object, filter) { + const indexes = Array.isArray(object) || isTypedArray(object) ? new Set([...object.keys()].map((v) => v.toString())) : void 0; + return Object.entries(ObjectGetOwnPropertyDescriptors(object)).filter(([key, desc]) => { + if (indexes && indexes.has(key)) { + return false; + } + if (filter === 1 && !desc.enumerable) { + return false; + } + return true; + }).map(([key]) => key); + } + __name(getOwnNonIndexProperties, "getOwnNonIndexProperties"); + var isTypedArray = /* @__PURE__ */ __name((value) => kind(value, "object") && typedArrayStrings.has(ObjectPrototypeToString.call(value)), "isTypedArray"); + function kind(value, type) { + return typeof value === type; + } + __name(kind, "kind"); + var getConstructorName = /* @__PURE__ */ __name((object) => object.constructor.name, "getConstructorName"); + var getPrefix = /* @__PURE__ */ __name((constructor, size = "") => `${constructor}${size} `, "getPrefix"); function createFormat2(opts = {}) { if (opts.customInspectSymbol === void 0) { opts.customInspectSymbol = Symbol.for("edge-runtime.inspect.custom"); @@ -65,12 +141,24 @@ var require_dist = __commonJS({ switch (token) { case "%s": { const arg = args[index++]; - return hasCustomSymbol(arg, customInspectSymbol) ? format2(arg[customInspectSymbol]()) : String(arg); + if (hasCustomSymbol(arg, customInspectSymbol)) { + return format2(arg[customInspectSymbol]()); + } else if (isDate(arg) || isError(arg) || kind(arg, "bigint")) { + return format2(arg); + } else { + return String(arg); + } } case "%j": return safeStringify(args[index++]); - case "%d": - return String(Number(args[index++])); + case "%d": { + const arg = args[index++]; + if (kind(arg, "bigint")) { + return format2(arg); + } else { + return String(Number(arg)); + } + } case "%O": return inspect(args[index++], { customInspectSymbol }); case "%o": @@ -79,8 +167,14 @@ var require_dist = __commonJS({ showHidden: true, depth: 4 }); - case "%i": - return String(parseInt(args[index++], 10)); + case "%i": { + const arg = args[index++]; + if (kind(arg, "bigint")) { + return format2(arg); + } else { + return String(parseInt(arg, 10)); + } + } case "%f": return String(parseFloat(args[index++])); default: @@ -97,7 +191,7 @@ var require_dist = __commonJS({ return str; } __name(format2, "format"); - function formatValue(ctx, value, recurseTimes) { + function formatValue(ctx, value, recurseTimes, typedArray) { if (hasCustomSymbol(value, customInspectSymbol)) { return format2(value[customInspectSymbol]()); } @@ -105,58 +199,133 @@ var require_dist = __commonJS({ if (formattedPrimitive !== void 0) { return formattedPrimitive; } - const symbols = Object.getOwnPropertySymbols(value); - if (symbols.length > 0) { - symbols.forEach((symbol) => { - const obj = value; - const symbolKey = `[${symbol.toString()}]`; - obj[symbolKey] = obj[symbol]; - delete obj[symbol]; - }); + if (ctx.seen.includes(value)) { + let index = 1; + if (ctx.circular === void 0) { + ctx.circular = /* @__PURE__ */ new Map(); + ctx.circular.set(value, index); + } else { + index = ctx.circular.get(value); + if (index === void 0) { + index = ctx.circular.size + 1; + ctx.circular.set(value, index); + } + } + return `[Circular *${index}]`; } - const keys = ctx.showHidden ? Object.getOwnPropertyNames(value) : Object.keys(value); - const visibleKeys = /* @__PURE__ */ new Set(); - keys.forEach((key) => visibleKeys.add(key)); - if (keys.length === 0) { - if (kind(value, "function")) { - return `[Function${value.name ? ": " + value.name : ""}]`; + return formatRaw(ctx, value, recurseTimes); + } + __name(formatValue, "formatValue"); + function formatRaw(ctx, value, recurseTimes) { + let keys = []; + const constructor = getConstructorName(value); + let base = ""; + let formatter = /* @__PURE__ */ __name(() => [], "formatter"); + let braces = ["", ""]; + let noIterator = true; + const filter = ctx.showHidden ? 0 : 1; + if (SymbolIterator in value) { + noIterator = false; + if (Array.isArray(value)) { + const prefix = constructor !== "Array" ? getPrefix(constructor, `(${value.length})`) : ""; + keys = getOwnNonIndexProperties(value, filter); + braces = [`${prefix}[`, "]"]; + if (value.length === 0 && keys.length === 0) { + return `${braces[0]}]`; + } + formatter = formatArray; + } else if (isSet(value)) { + const size = SetPrototypeGetSize.call(value); + const prefix = getPrefix(constructor, `(${size})`); + keys = getKeys(value, ctx.showHidden); + formatter = formatSet; + if (size === 0 && keys.length === 0) { + return `${prefix}{}`; + } + braces = [`${prefix}{`, "}"]; + } else if (isMap(value)) { + const size = MapPrototypeGetSize.call(value); + const prefix = getPrefix(constructor, `(${size})`); + keys = getKeys(value, ctx.showHidden); + formatter = formatMap; + if (size === 0 && keys.length === 0) { + return `${prefix}{}`; + } + braces = [`${prefix}{`, "}"]; + } else if (isTypedArray(value)) { + keys = getOwnNonIndexProperties(value, filter); + const size = TypedArrayPrototypeGetLength.call(value); + const prefix = getPrefix(constructor, `(${size})`); + braces = [`${prefix}[`, "]"]; + if (value.length === 0 && keys.length === 0) + return `${braces[0]}]`; + formatter = formatTypedArray.bind(null, size); + } else { + noIterator = true; + } + } + let isValueFunction = false; + if (noIterator) { + keys = getKeys(value, ctx.showHidden); + braces = ["{", "}"]; + if (constructor === "Object") { + if (keys.length === 0) { + return `{}`; + } + } else if (kind(value, "function")) { + isValueFunction = true; + base = `[Function${value.name ? ": " + value.name : ""}]`; + if (keys.length === 0) { + return base; + } } else if (isRegExp(value)) { - return RegExp.prototype.toString.call(value); + base = RegExp.prototype.toString.call(value); + if (keys.length === 0) { + return base; + } + base = " " + base; } else if (isDate(value)) { - return Date.prototype.toString.call(value); + base = Number.isNaN(DatePrototypeGetTime.call(value)) ? Date.prototype.toString.call(value) : DatePrototypeToISOString.call(value); + if (keys.length === 0) { + return base; + } + base = " " + base; } else if (isError(value)) { - return formatError(value); + base = formatError(value); + if (keys.length === 0) { + return base; + } + base = " " + base; } else if (hasCustomSymbol(value, ctx.customInspectSymbol)) { - return format2(value[ctx.customInspectSymbol]()); + base = format2(value[ctx.customInspectSymbol]()); + if (keys.length === 0) { + return base; + } + base = " " + base; + } else { + braces[0] = `${getPrefix(constructor)}{`; } } - const isValueFunction = kind(value, "function"); - const isValueArray = Array.isArray(value); - let base = ""; - if (isValueFunction) { - base = `[Function${value.name ? ": " + value.name : ""}]`; - } else if (isRegExp(value)) { - base = " " + RegExp.prototype.toString.call(value); - } else if (isDate(value)) { - base = " " + Date.prototype.toUTCString.call(value); - } else if (isError(value)) { - base = " " + formatError(value); - } else if (hasCustomSymbol(value, ctx.customInspectSymbol)) { - base = " " + value[ctx.customInspectSymbol](); - } - const braces = isValueArray ? ["[", "]"] : isValueFunction ? ["", ""] : ["{", "}"]; - if (keys.length === 0 && (!isValueArray || value.length === 0)) { - return braces[0] + base + braces[1]; - } if (recurseTimes && recurseTimes < 0) { return isRegExp(value) ? RegExp.prototype.toString.call(value) : "[Object]"; } ctx.seen.push(value); - let output = isValueArray ? formatArray(ctx, value, recurseTimes, visibleKeys, keys) : keys.map((key) => formatProperty(ctx, value, recurseTimes, visibleKeys, key, false)); + const visibleKeys = new Set(keys); + const output = formatter(ctx, value, recurseTimes, visibleKeys, keys); + for (let i = 0; i < keys.length; i++) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, keys[i], false)); + } + if (ctx.circular !== void 0) { + const index = ctx.circular.get(value); + if (index !== void 0) { + const reference = ``; + base = base === "" ? reference : `${reference} ${base}`; + } + } ctx.seen.pop(); return reduceToSingleString(output, base, braces, isValueFunction); } - __name(formatValue, "formatValue"); + __name(formatRaw, "formatRaw"); function inspect(value, opts2) { opts2 = Object.assign({ seen: [], depth: 2 }, opts2); return formatValue(opts2, value, opts2.depth); @@ -168,34 +337,26 @@ var require_dist = __commonJS({ const desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { + if (desc.value !== void 0) { + str = formatValue(ctx, desc.value, recurseTimes); + } else if (desc.get) { str = desc.set ? "[Getter/Setter]" : "[Getter]"; } else if (desc.set) { str = "[Setter]"; + } else { + str = "undefined"; } - if (!visibleKeys.has(key)) { - name = "[" + key + "]"; + if (isArray) { + return str; } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - str = formatValue(ctx, desc.value, recurseTimes === null || recurseTimes === void 0 ? null : recurseTimes - 1); - if (str.indexOf("\n") > -1) { - if (isArray) { - str = str.split("\n").map((line) => ` ${line}`).join("\n").slice(2); - } else { - str = "\n" + str.split("\n").map((line) => ` ${line}`).join("\n"); - } - } - } else { - str = "[Circular]"; - } - } - if (name === void 0) { - if (isArray && key.match(/^\d+$/)) { - return str; - } + if (kind(key, "symbol")) { + name = `[${SymbolPrototypeToString.call(key)}]`; + } else if (!visibleKeys.has(key)) { + name = "[" + key + "]"; + } else { + name = key; } - return `${key}: ${str}`; + return `${name}: ${str}`; } __name(formatProperty, "formatProperty"); function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { @@ -207,18 +368,53 @@ var require_dist = __commonJS({ output.push(""); } } - keys.forEach((key) => { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true)); - } - }); return output; } __name(formatArray, "formatArray"); + function formatTypedArray(length, ctx, value, recurseTimes) { + const output = new Array(length); + for (let i = 0; i < length; ++i) { + output[i] = value.length > 0 && kind(value[0], "number") ? String(value[i]) : formatBigInt(value[i]); + } + if (ctx.showHidden) { + for (const key of [ + "BYTES_PER_ELEMENT", + "length", + "byteLength", + "byteOffset", + "buffer" + ]) { + const str = formatValue(ctx, value[key], recurseTimes, true); + ArrayPrototypePush.call(output, `[${String(key)}]: ${str}`); + } + } + return output; + } + __name(formatTypedArray, "formatTypedArray"); + function formatSet(ctx, value, recurseTimes) { + const output = []; + for (const v of value) { + ArrayPrototypePush.call(output, formatValue(ctx, v, recurseTimes)); + } + return output; + } + __name(formatSet, "formatSet"); + function formatMap(ctx, value, recurseTimes) { + const output = []; + for (const { 0: k, 1: v } of value) { + output.push(`${formatValue(ctx, k, recurseTimes)} => ${formatValue(ctx, v, recurseTimes)}`); + } + return output; + } + __name(formatMap, "formatMap"); return format2; } __name(createFormat2, "createFormat"); - exports.createFormat = createFormat2; + function formatBigInt(bigint) { + const str = String(bigint); + return `${str}n`; + } + __name(formatBigInt, "formatBigInt"); function formatPrimitive(value) { if (value === null) return "null"; @@ -232,7 +428,7 @@ var require_dist = __commonJS({ if (kind(value, "number")) return "" + value; if (kind(value, "bigint")) - return "" + value; + return formatBigInt(value); if (kind(value, "symbol")) return value.toString(); } @@ -241,10 +437,6 @@ var require_dist = __commonJS({ return value !== null && kind(value, "object") && customInspectSymbol in value && kind(value[customInspectSymbol], "function"); } __name(hasCustomSymbol, "hasCustomSymbol"); - function kind(value, type) { - return typeof value === type; - } - __name(kind, "kind"); function isRegExp(value) { return kind(value, "object") && Object.prototype.toString.call(value) === "[object RegExp]"; } @@ -257,25 +449,42 @@ var require_dist = __commonJS({ return kind(value, "object") && (Object.prototype.toString.call(value) === "[object Error]" || value instanceof Error); } __name(isError, "isError"); + function isMap(value) { + return kind(value, "object") && Object.prototype.toString.call(value) === "[object Map]"; + } + __name(isMap, "isMap"); + function isSet(value) { + return kind(value, "object") && Object.prototype.toString.call(value) === "[object Set]"; + } + __name(isSet, "isSet"); + function isBelowBreakLength(output, start, base) { + const breakLength = 80; + let totalLength = output.length + start; + if (totalLength + output.length > breakLength) { + return false; + } + for (let i = 0; i < output.length; i++) { + totalLength += output[i].length; + if (totalLength > breakLength) { + return false; + } + } + return base === "" || !StringPrototypeIncludes.call(base, "\n"); + } + __name(isBelowBreakLength, "isBelowBreakLength"); function reduceToSingleString(output, base, braces, isValueFunction) { - const length = output.reduce((prev, cur) => { - return prev + cur.replace(/\u001b\[\d\d?m/g, "").length + 1; - }, 0); - if (length > 60) { - const prefix2 = isValueFunction ? " {" : ""; - const suffix2 = isValueFunction ? "\n}" : " "; - return braces[0] + (base === "" ? "" : base + prefix2 + "\n ") + ` ${output.join(",\n ")}` + suffix2 + braces[1]; + const start = output.length + braces[0].length + base.length + 10; + if (!isBelowBreakLength(output, start, base)) { + return (base ? base + " " : "") + braces[0] + "\n " + output.join(",\n ") + "\n" + braces[1]; } - const prefix = isValueFunction ? " { " : " "; - const suffix = isValueFunction ? " } " : " "; - return (braces[0] + base + prefix + output.join(", ") + suffix + braces[1]).trim(); + return ((base ? base + " " : "") + braces[0] + " " + output.join(", ") + " " + braces[1]).trim(); } __name(reduceToSingleString, "reduceToSingleString"); - function safeStringify(object) { - if (Array.isArray(object)) { - object = object.map((element) => JSON.parse(JSON.stringify(element, makeCircularReplacer()))); + function safeStringify(input) { + if (Array.isArray(input)) { + input = input.map((element) => JSON.parse(JSON.stringify(element, makeCircularReplacer()))); } - return JSON.stringify(object, makeCircularReplacer()); + return JSON.stringify(input, makeCircularReplacer()); } __name(safeStringify, "safeStringify"); function makeCircularReplacer() { @@ -290,6 +499,27 @@ var require_dist = __commonJS({ }; } __name(makeCircularReplacer, "makeCircularReplacer"); + function getKeys(value, showHidden = false) { + let keys; + const symbols = ObjectGetOwnPropertySymbols(value); + if (showHidden) { + keys = ObjectGetOwnPropertyNames(value); + if (symbols.length !== 0) + ArrayPrototypePush.apply(keys, symbols); + } else { + try { + keys = ObjectKeys(value); + } catch (err) { + keys = ObjectGetOwnPropertyNames(value); + } + if (symbols.length !== 0) { + const filter = /* @__PURE__ */ __name((key) => ObjectPrototypePropertyIsEnumerable.call(value, key), "filter"); + ArrayPrototypePush.apply(keys, ArrayPrototypeFilter.call(symbols, filter)); + } + } + return keys; + } + __name(getKeys, "getKeys"); } }); diff --git a/packages/next/compiled/@edge-runtime/primitives/package.json b/packages/next/compiled/@edge-runtime/primitives/package.json index f313ba0b2bba632..fa65adbc5366cb0 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.26","main":"./index.js","license":"MPLv2"} +{"name":"@edge-runtime/primitives","version":"1.1.0-beta.27","main":"./index.js","license":"MPLv2"} diff --git a/packages/next/compiled/babel-packages/packages-bundle.js b/packages/next/compiled/babel-packages/packages-bundle.js index 05a6b599f3cb68b..274302d9cd29e73 100644 --- a/packages/next/compiled/babel-packages/packages-bundle.js +++ b/packages/next/compiled/babel-packages/packages-bundle.js @@ -141,7 +141,7 @@ ${n.types.cloneNode(v)} !== null && ${n.types.cloneNode(x)} !== void 0`;y.replaceWith(n.types.logicalExpression("&&",e,j));y=o.skipTransparentExprWrappers(y.get("right"))}else{const e=r?l`${n.types.cloneNode(v)} == null`:l` ${n.types.cloneNode(v)} === null || ${n.types.cloneNode(x)} === void 0`;const t=u?l`true`:l`void 0`;y.replaceWith(n.types.conditionalExpression(e,t,j));y=o.skipTransparentExprWrappers(y.get("alternate"))}}}var c=s.declare(((e,t)=>{var r,s;e.assertVersion(7);const{loose:a=false}=t;const n=(r=e.assumption("noDocumentAll"))!=null?r:a;const o=(s=e.assumption("pureGetters"))!=null?s:a;return{name:"proposal-optional-chaining",inherits:i["default"].default,visitor:{"OptionalCallExpression|OptionalMemberExpression"(e){transform(e,{noDocumentAll:n,pureGetters:o})}}}}));t["default"]=c;t.transform=transform},7806:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=r(2924);var n=(0,s.declare)(((e,t)=>{e.assertVersion(7);return(0,a.createClassFeaturePlugin)({name:"proposal-private-methods",api:e,feature:a.FEATURES.privateMethods,loose:t.loose,manipulateOptions(e,t){t.plugins.push("classPrivateMethods")}})}));t["default"]=n},6722:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=r(1603);var n=r(2924);var o=r(9102);var i=(0,s.declare)(((e,t)=>{e.assertVersion(7);const{types:r,template:s}=e;const{loose:i}=t;const l=new WeakMap;const c=new WeakMap;function unshadow(e,t,r){while(r!==t){if(r.hasOwnBinding(e))r.rename(e);r=r.parent}}function injectToFieldInit(e,t,s=false){if(e.node.value){if(s){e.get("value").insertBefore(t)}else{e.get("value").insertAfter(t)}}else{e.set("value",r.unaryExpression("void",t))}}function injectInitialization(e,t){let s;let a;for(const t of e.get("body.body")){if((t.isClassProperty()||t.isClassPrivateProperty())&&!t.node.static){s=t;break}if(!a&&t.isClassMethod({kind:"constructor"})){a=t}}if(s){injectToFieldInit(s,t,true)}else{(0,n.injectInitialization)(e,a,[r.expressionStatement(t)])}}function getWeakSetId(e,t,a,n="",i){let c=l.get(a.node);if(!c){c=t.scope.generateUidIdentifier(`${n||""} brandCheck`);l.set(a.node,c);i(a,s.expression.ast`${r.cloneNode(c)}.add(this)`);const e=r.newExpression(r.identifier("WeakSet"),[]);(0,o.default)(e);t.insertBefore(s.ast`var ${c} = ${e}`)}return r.cloneNode(c)}return{name:"proposal-private-property-in-object",inherits:a.default,pre(){(0,n.enableFeature)(this.file,n.FEATURES.privateIn,i)},visitor:{BinaryExpression(e){const{node:t}=e;if(t.operator!=="in")return;if(!r.isPrivateName(t.left))return;const{name:a}=t.left.id;let n;const o=e.findParent((e=>{if(!e.isClass())return false;n=e.get("body.body").find((({node:e})=>r.isPrivate(e)&&e.key.id.name===a));return!!n}));if(o.parentPath.scope.path.isPattern()){o.replaceWith(s.ast`(() => ${o.node})()`);return}if(n.isMethod()){if(n.node.static){if(o.node.id){unshadow(o.node.id.name,o.scope,e.scope)}else{o.set("id",e.scope.generateUidIdentifier("class"))}e.replaceWith(s.expression.ast` ${r.cloneNode(o.node.id)} === ${e.node.right} - `)}else{var i;const t=getWeakSetId(l,o,o,(i=o.node.id)==null?void 0:i.name,injectInitialization);e.replaceWith(s.expression.ast`${t}.has(${e.node.right})`)}}else{const t=getWeakSetId(c,o,n,n.node.key.id.name,injectToFieldInit);e.replaceWith(s.expression.ast`${t}.has(${e.node.right})`)}}}}}));t["default"]=i},8226:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6741);var a=r(3242);var n=(0,a.declare)(((e,t)=>{e.assertVersion(7);const{useUnicodeFlag:r=true}=t;if(typeof r!=="boolean"){throw new Error(".useUnicodeFlag must be a boolean, or undefined")}return(0,s.createRegExpFeaturePlugin)({name:"proposal-unicode-property-regex",feature:"unicodePropertyEscape",options:{useUnicodeFlag:r}})}));t["default"]=n},7978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-async-generators",manipulateOptions(e,t){t.plugins.push("asyncGenerators")}}}));t["default"]=a},9140:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-bigint",manipulateOptions(e,t){t.plugins.push("bigInt")}}}));t["default"]=a},749:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-class-properties",manipulateOptions(e,t){t.plugins.push("classProperties","classPrivateProperties","classPrivateMethods")}}}));t["default"]=a},2288:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-class-static-block",manipulateOptions(e,t){t.plugins.push("classStaticBlock")}}}));t["default"]=a},9854:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-dynamic-import",manipulateOptions(e,t){t.plugins.push("dynamicImport")}}}));t["default"]=a},9081:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-export-namespace-from",manipulateOptions(e,t){t.plugins.push("exportNamespaceFrom")}}}));t["default"]=a},9905:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-import-assertions",manipulateOptions(e,t){t.plugins.push(["importAssertions"])}}}));t["default"]=a},2228:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-import-assertions",manipulateOptions(e,t){t.plugins.push("importAssertions")}}}));t["default"]=a},4602:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-json-strings",manipulateOptions(e,t){t.plugins.push("jsonStrings")}}}));t["default"]=a},6178:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-jsx",manipulateOptions(e,t){if(t.plugins.some((e=>(Array.isArray(e)?e[0]:e)==="typescript"))){return}t.plugins.push("jsx")}}}));t["default"]=a},6709:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-logical-assignment-operators",manipulateOptions(e,t){t.plugins.push("logicalAssignment")}}}));t["default"]=a},3835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-nullish-coalescing-operator",manipulateOptions(e,t){t.plugins.push("nullishCoalescingOperator")}}}));t["default"]=a},3537:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-numeric-separator",manipulateOptions(e,t){t.plugins.push("numericSeparator")}}}));t["default"]=a},4396:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-object-rest-spread",manipulateOptions(e,t){t.plugins.push("objectRestSpread")}}}));t["default"]=a},2690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-optional-catch-binding",manipulateOptions(e,t){t.plugins.push("optionalCatchBinding")}}}));t["default"]=a},1648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-optional-chaining",manipulateOptions(e,t){t.plugins.push("optionalChaining")}}}));t["default"]=a},1603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-private-property-in-object",manipulateOptions(e,t){t.plugins.push("privateIn")}}}));t["default"]=a},9723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-top-level-await",manipulateOptions(e,t){t.plugins.push("topLevelAwait")}}}));t["default"]=a},7386:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);function removePlugin(e,t){const r=[];e.forEach(((e,s)=>{const a=Array.isArray(e)?e[0]:e;if(a===t){r.unshift(s)}}));for(const t of r){e.splice(t,1)}}var a=(0,s.declare)(((e,{isTSX:t,disallowAmbiguousJSXLike:r})=>{e.assertVersion(7);return{name:"syntax-typescript",manipulateOptions(e,s){const{plugins:a}=s;removePlugin(a,"flow");removePlugin(a,"jsx");a.push(["typescript",{disallowAmbiguousJSXLike:r}],"classProperties");{a.push("objectRestSpread")}if(t){a.push("jsx")}}}}));t["default"]=a},8137:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=(0,s.declare)(((e,t)=>{var r;e.assertVersion(7);const s=(r=e.assumption("noNewArrows"))!=null?r:!t.spec;return{name:"transform-arrow-functions",visitor:{ArrowFunctionExpression(e){if(!e.isArrowFunctionExpression())return;e.arrowFunctionToExpression({allowInsertArrow:false,noNewArrows:s,specCompliant:!s})}}}}));t["default"]=a},5333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=r(9567);var n=r(2786);var o=r(8304);var i=(0,s.declare)(((e,t)=>{var r,s;e.assertVersion(7);const{method:i,module:l}=t;const c=(r=e.assumption("noNewArrows"))!=null?r:true;const u=(s=e.assumption("ignoreFunctionLength"))!=null?s:false;if(i&&l){return{name:"transform-async-to-generator",visitor:{Function(e,t){if(!e.node.async||e.node.generator)return;let r=t.methodWrapper;if(r){r=o.types.cloneNode(r)}else{r=t.methodWrapper=(0,n.addNamed)(e,i,l)}(0,a.default)(e,{wrapAsync:r},c,u)}}}}return{name:"transform-async-to-generator",visitor:{Function(e,t){if(!e.node.async||e.node.generator)return;(0,a.default)(e,{wrapAsync:t.addHelper("asyncToGenerator")},c,u)}}}}));t["default"]=i},141:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=r(8304);var n=(0,s.declare)((e=>{e.assertVersion(7);function statementList(e,t){const r=t.get(e);for(const e of r){const t=e.node;if(!e.isFunctionDeclaration())continue;const r=a.types.variableDeclaration("let",[a.types.variableDeclarator(t.id,a.types.toExpression(t))]);r._blockHoist=2;t.id=null;e.replaceWith(r)}}return{name:"transform-block-scoped-functions",visitor:{BlockStatement(e){const{node:t,parent:r}=e;if(a.types.isFunction(r,{body:t})||a.types.isExportDeclaration(r)){return}statementList("body",e)},SwitchCase(e){statementList("consequent",e)}}}}));t["default"]=n},265:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=r(9987);var n=r(8304);const o=new WeakSet;var i=(0,s.declare)(((e,t)=>{e.assertVersion(7);const{throwIfClosureRequired:r=false,tdz:s=false}=t;if(typeof r!=="boolean"){throw new Error(`.throwIfClosureRequired must be a boolean, or undefined`)}if(typeof s!=="boolean"){throw new Error(`.tdz must be a boolean, or undefined`)}return{name:"transform-block-scoping",visitor:{VariableDeclaration(e){const{node:t,parent:r,scope:s}=e;if(!isBlockScoped(t))return;convertBlockScopedToVar(e,null,r,s,true);if(t._tdzThis){const r=[t];for(let e=0;ee.isLoop()||e.isFunction()));return t==null?void 0:t.isLoop()}function convertBlockScopedToVar(e,t,r,s,a=false){if(!t){t=e.node}if(isInLoop(e)&&!n.types.isFor(r)){for(let e=0;e0){e.traverse(u,t)}else{e.traverse(a.visitor,t)}return e.skip()}},a.visitor]);const u=n.traverse.visitors.merge([{ReferencedIdentifier(e,t){const r=t.letReferences.get(e.node.name);if(!r)return;const s=e.scope.getBindingIdentifier(e.node.name);if(s&&s!==r)return;t.closurify=true}},a.visitor]);const p={enter(e,t){if(e.isForStatement()){const{node:r}=e;if(isVar(r.init)){const e=t.pushDeclar(r.init);if(e.length===1){r.init=e[0]}else{r.init=n.types.sequenceExpression(e)}}}else if(e.isForInStatement()||e.isForOfStatement()){const{node:r}=e;if(isVar(r.left)){t.pushDeclar(r.left);r.left=r.left.declarations[0].id}}else if(isVar(e.node)){e.replaceWithMultiple(t.pushDeclar(e.node).map((e=>n.types.expressionStatement(e))))}else if(e.isFunction()){return e.skip()}}};const d={LabeledStatement({node:e},t){t.innerLabels.push(e.label.name)}};const f={enter(e,t){if(e.isAssignmentExpression()||e.isUpdateExpression()){for(const r of Object.keys(e.getBindingIdentifiers())){if(t.outsideReferences.get(r)!==e.scope.getBindingIdentifier(r)){continue}t.reassignments[r]=true}}else if(e.isReturnStatement()){t.returnStatements.push(e)}}};function loopNodeTo(e){if(n.types.isBreakStatement(e)){return"break"}else if(n.types.isContinueStatement(e)){return"continue"}}const y={Loop(e,t){const r=t.ignoreLabeless;t.ignoreLabeless=true;e.traverse(y,t);t.ignoreLabeless=r;e.skip()},Function(e){e.skip()},SwitchCase(e,t){const r=t.inSwitchCase;t.inSwitchCase=true;e.traverse(y,t);t.inSwitchCase=r;e.skip()},"BreakStatement|ContinueStatement|ReturnStatement"(e,t){const{node:r,scope:s}=e;if(t.loopIgnored.has(r))return;let a;let o=loopNodeTo(r);if(o){if(n.types.isReturnStatement(r)){throw new Error("Internal error: unexpected return statement with `loopText`")}if(r.label){if(t.innerLabels.indexOf(r.label.name)>=0){return}o=`${o}|${r.label.name}`}else{if(t.ignoreLabeless)return;if(n.types.isBreakStatement(r)&&t.inSwitchCase)return}t.hasBreakContinue=true;t.map[o]=r;a=n.types.stringLiteral(o)}if(n.types.isReturnStatement(r)){t.hasReturn=true;a=n.types.objectExpression([n.types.objectProperty(n.types.identifier("v"),r.argument||s.buildUndefinedNode())])}if(a){a=n.types.returnStatement(a);t.loopIgnored.add(a);e.skip();e.replaceWith(n.types.inherits(a,r))}}};function isStrict(e){return!!e.find((({node:e})=>{if(n.types.isProgram(e)){if(e.sourceType==="module")return true}else if(!n.types.isBlockStatement(e))return false;return e.directives.some((e=>e.value.value==="use strict"))}))}class BlockScoping{constructor(e,t,r,s,a,o,i){this.parent=void 0;this.state=void 0;this.scope=void 0;this.throwIfClosureRequired=void 0;this.tdzEnabled=void 0;this.blockPath=void 0;this.block=void 0;this.outsideLetReferences=void 0;this.hasLetReferences=void 0;this.letReferences=void 0;this.body=void 0;this.loopParent=void 0;this.loopLabel=void 0;this.loopPath=void 0;this.loop=void 0;this.has=void 0;this.parent=r;this.scope=s;this.state=i;this.throwIfClosureRequired=a;this.tdzEnabled=o;this.blockPath=t;this.block=t.node;this.outsideLetReferences=new Map;this.hasLetReferences=false;this.letReferences=new Map;this.body=[];if(e){this.loopParent=e.parent;this.loopLabel=n.types.isLabeledStatement(this.loopParent)&&this.loopParent.label;this.loopPath=e;this.loop=e.node}}run(){const e=this.block;if(o.has(e))return;o.add(e);const t=this.getLetReferences();this.checkConstants();if(n.types.isFunction(this.parent)||n.types.isProgram(this.block)){this.updateScopeInfo();return}if(!this.hasLetReferences)return;if(t){this.wrapClosure()}else{this.remap()}this.updateScopeInfo(t);if(this.loopLabel&&!n.types.isLabeledStatement(this.loopParent)){return n.types.labeledStatement(this.loopLabel,this.loop)}}checkConstants(){const e=this.scope;const t=this.state;for(const r of Object.keys(e.bindings)){const s=e.bindings[r];if(s.kind!=="const")continue;for(const e of s.constantViolations){const s=t.addHelper("readOnlyError");const a=n.types.callExpression(s,[n.types.stringLiteral(r)]);if(e.isAssignmentExpression()){const{operator:t}=e.node;if(t==="="){e.replaceWith(n.types.sequenceExpression([e.get("right").node,a]))}else if(["&&=","||=","??="].includes(t)){e.replaceWith(n.types.logicalExpression(t.slice(0,-1),e.get("left").node,n.types.sequenceExpression([e.get("right").node,a])))}else{e.replaceWith(n.types.sequenceExpression([n.types.binaryExpression(t.slice(0,-1),e.get("left").node,e.get("right").node),a]))}}else if(e.isUpdateExpression()){e.replaceWith(n.types.sequenceExpression([n.types.unaryExpression("+",e.get("argument").node),a]))}else if(e.isForXStatement()){e.ensureBlock();e.get("left").replaceWith(n.types.variableDeclaration("var",[n.types.variableDeclarator(e.scope.generateUidIdentifier(r))]));e.node.body.body.unshift(n.types.expressionStatement(a))}}}}updateScopeInfo(e){const t=this.blockPath.scope;const r=t.getFunctionParent()||t.getProgramParent();const s=this.letReferences;for(const a of s.keys()){const n=s.get(a);const o=t.getBinding(n.name);if(!o)continue;if(o.kind==="let"||o.kind==="const"){o.kind="var";if(e){if(t.hasOwnBinding(n.name)){t.removeBinding(n.name)}}else{t.moveBindingTo(n.name,r)}}}}remap(){const e=this.letReferences;const t=this.outsideLetReferences;const r=this.scope;const s=this.blockPath.scope;for(const t of e.keys()){const a=e.get(t);if(r.parentHasBinding(t)||r.hasGlobal(t)){const e=r.getOwnBinding(t);if(e){const s=r.parent.getOwnBinding(t);if(e.kind==="hoisted"&&!e.path.node.async&&!e.path.node.generator&&(!s||isVar(s.path.parent))&&!isStrict(e.path.parentPath)){continue}r.rename(a.name)}if(s.hasOwnBinding(t)){s.rename(a.name)}}}for(const r of t.keys()){const t=e.get(r);if(isInLoop(this.blockPath)&&s.hasOwnBinding(r)){s.rename(t.name)}}}wrapClosure(){if(this.throwIfClosureRequired){throw this.blockPath.buildCodeFrameError("Compiling let/const in this block would add a closure "+"(throwIfClosureRequired).")}const e=this.block;const t=this.outsideLetReferences;if(this.loop){for(const e of Array.from(t.keys())){const r=t.get(e);if(this.scope.hasGlobal(r.name)||this.scope.parentHasBinding(r.name)){t.delete(r.name);this.letReferences.delete(r.name);this.scope.rename(r.name);this.letReferences.set(r.name,r);t.set(r.name,r)}}}this.has=this.checkLoop();this.hoistVarDeclarations();const r=Array.from(t.values(),(e=>n.types.cloneNode(e)));const s=r.map((e=>n.types.cloneNode(e)));const a=this.blockPath.isSwitchStatement();const o=n.types.functionExpression(null,s,n.types.blockStatement(a?[e]:e.body));this.addContinuations(o);let i=n.types.callExpression(n.types.nullLiteral(),r);let l=".callee";const c=n.traverse.hasType(o.body,"YieldExpression",n.types.FUNCTION_TYPES);if(c){o.generator=true;i=n.types.yieldExpression(i,true);l=".argument"+l}const u=n.traverse.hasType(o.body,"AwaitExpression",n.types.FUNCTION_TYPES);if(u){o.async=true;i=n.types.awaitExpression(i);l=".argument"+l}let p;let d;if(this.has.hasReturn||this.has.hasBreakContinue){const e=this.scope.generateUid("ret");this.body.push(n.types.variableDeclaration("var",[n.types.variableDeclarator(n.types.identifier(e),i)]));p="declarations.0.init"+l;d=this.body.length-1;this.buildHas(e)}else{this.body.push(n.types.expressionStatement(i));p="expression"+l;d=this.body.length-1}let f;if(a){const{parentPath:e,listKey:t,key:r}=this.blockPath;this.blockPath.replaceWithMultiple(this.body);f=e.get(t)[r+d]}else{e.body=this.body;f=this.blockPath.get("body")[d]}const y=f.get(p);let g;if(this.loop){const e=this.scope.generateUid("loop");const t=this.loopPath.insertBefore(n.types.variableDeclaration("var",[n.types.variableDeclarator(n.types.identifier(e),o)]));y.replaceWith(n.types.identifier(e));g=t[0].get("declarations.0.init")}else{y.replaceWith(o);g=y}g.unwrapFunctionEnvironment()}addContinuations(e){const t={reassignments:{},returnStatements:[],outsideReferences:this.outsideLetReferences};this.scope.traverse(e,f,t);for(let r=0;r{e.insertBefore(n.types.expressionStatement(n.types.assignmentExpression("=",n.types.identifier(a),n.types.identifier(o))))}));e.body.body.push(n.types.expressionStatement(n.types.assignmentExpression("=",n.types.identifier(a),n.types.identifier(o))))}}getLetReferences(){const e=this.block;const t=[];if(this.loop){const e=this.loop.left||this.loop.init;if(isBlockScoped(e)){t.push(e);const r=n.types.getBindingIdentifiers(e);for(const e of Object.keys(r)){this.outsideLetReferences.set(e,r[e])}}}const addDeclarationsFromChild=(r,s)=>{s=s||r.node;if(n.types.isClassDeclaration(s)||n.types.isFunctionDeclaration(s)||isBlockScoped(s)){if(isBlockScoped(s)){convertBlockScopedToVar(r,s,e,this.scope)}if(s.declarations){for(let e=0;ethis.state.addHelper(e)};if(isInLoop(this.blockPath)){r.loopDepth++}this.blockPath.traverse(c,r);return r.closurify}checkLoop(){const e={hasBreakContinue:false,ignoreLabeless:false,inSwitchCase:false,innerLabels:[],hasReturn:false,isLoop:!!this.loop,map:{},loopIgnored:new WeakSet};this.blockPath.traverse(d,e);this.blockPath.traverse(y,e);return e}hoistVarDeclarations(){this.blockPath.traverse(p,this)}pushDeclar(e){const t=[];const r=n.types.getBindingIdentifiers(e);for(const e of Object.keys(r)){t.push(n.types.variableDeclarator(r[e]))}this.body.push(n.types.variableDeclaration(e.kind,t));const s=[];for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.visitor=void 0;var s=r(8304);function getTDZStatus(e,t){const r=t._guessExecutionStatusRelativeTo(e);if(r==="before"){return"outside"}else if(r==="after"){return"inside"}else{return"maybe"}}function buildTDZAssert(e,t){return s.types.callExpression(t.addHelper("temporalRef"),[e,s.types.stringLiteral(e.name)])}function isReference(e,t,r){const s=r.letReferences.get(e.name);if(!s)return false;return t.getBindingIdentifier(e.name)===s}const a=new WeakSet;const n={ReferencedIdentifier(e,t){if(!t.tdzEnabled)return;const{node:r,parent:n,scope:o}=e;if(e.parentPath.isFor({left:r}))return;if(!isReference(r,o,t))return;const i=o.getBinding(r.name).path;if(i.isFunctionDeclaration())return;const l=getTDZStatus(e,i);if(l==="outside")return;if(l==="maybe"){if(a.has(r)){return}a.add(r);const o=buildTDZAssert(r,t);i.parent._tdzThis=true;if(e.parentPath.isUpdateExpression()){if(n._ignoreBlockScopingTDZ)return;e.parentPath.replaceWith(s.types.sequenceExpression([o,n]))}else{e.replaceWith(o)}}else if(l==="inside"){e.replaceWith(s.template.ast`${t.addHelper("tdz")}("${r.name}")`)}},AssignmentExpression:{exit(e,t){if(!t.tdzEnabled)return;const{node:r}=e;if(r._ignoreBlockScopingTDZ)return;const a=[];const n=e.getBindingIdentifiers();for(const r of Object.keys(n)){const s=n[r];if(isReference(s,e.scope,t)){a.push(s)}}if(a.length){r._ignoreBlockScopingTDZ=true;a.push(r);e.replaceWithMultiple(a.map((e=>s.types.expressionStatement(e))))}}}};t.visitor=n},8323:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=r(9102);var n=r(1113);var o=r(821);var i=r(8304);var l=r(3315);var c=r(1685);const getBuiltinClasses=e=>Object.keys(l[e]).filter((e=>/^[A-Z]/.test(e)));const u=new Set([...getBuiltinClasses("builtin"),...getBuiltinClasses("browser")]);var p=(0,s.declare)(((e,t)=>{var r,s,l,p;e.assertVersion(7);const{loose:d=false}=t;const f=(r=e.assumption("setClassMethods"))!=null?r:d;const y=(s=e.assumption("constantSuper"))!=null?s:d;const g=(l=e.assumption("superIsCallableConstructor"))!=null?l:d;const h=(p=e.assumption("noClassCalls"))!=null?p:d;const b=new WeakSet;return{name:"transform-classes",visitor:{ExportDefaultDeclaration(e){if(!e.get("declaration").isClassDeclaration())return;(0,o.default)(e)},ClassDeclaration(e){const{node:t}=e;const r=t.id||e.scope.generateUidIdentifier("class");e.replaceWith(i.types.variableDeclaration("let",[i.types.variableDeclarator(r,i.types.toExpression(t))]))},ClassExpression(e,t){const{node:r}=e;if(b.has(r))return;const s=(0,n.default)(e);if(s&&s!==r){e.replaceWith(s);return}b.add(r);e.replaceWith((0,c.default)(e,t.file,u,d,{setClassMethods:f,constantSuper:y,superIsCallableConstructor:g,noClassCalls:h}));if(e.isCallExpression()){(0,a.default)(e);const t=e.get("callee");if(t.isArrowFunctionExpression()){t.arrowFunctionToExpression()}}}}}}));t["default"]=p},2088:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=addCreateSuperHelper;var s=r(8304);const a=new WeakMap;function addCreateSuperHelper(e){if(a.has(e)){return(s.types.cloneNode||s.types.clone)(a.get(e))}try{return e.addHelper("createSuper")}catch(e){}const t=e.scope.generateUidIdentifier("createSuper");a.set(e,t);const r=n({CREATE_SUPER:t,GET_PROTOTYPE_OF:e.addHelper("getPrototypeOf"),POSSIBLE_CONSTRUCTOR_RETURN:e.addHelper("possibleConstructorReturn")});e.path.unshiftContainer("body",[r]);e.scope.registerDeclaration(e.path.get("body.0"));return s.types.cloneNode(t)}const n=s.template.statement` + `)}else{var i;const t=getWeakSetId(l,o,o,(i=o.node.id)==null?void 0:i.name,injectInitialization);e.replaceWith(s.expression.ast`${t}.has(${e.node.right})`)}}else{const t=getWeakSetId(c,o,n,n.node.key.id.name,injectToFieldInit);e.replaceWith(s.expression.ast`${t}.has(${e.node.right})`)}}}}}));t["default"]=i},8226:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6741);var a=r(3242);var n=(0,a.declare)(((e,t)=>{e.assertVersion(7);const{useUnicodeFlag:r=true}=t;if(typeof r!=="boolean"){throw new Error(".useUnicodeFlag must be a boolean, or undefined")}return(0,s.createRegExpFeaturePlugin)({name:"proposal-unicode-property-regex",feature:"unicodePropertyEscape",options:{useUnicodeFlag:r}})}));t["default"]=n},7978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-async-generators",manipulateOptions(e,t){t.plugins.push("asyncGenerators")}}}));t["default"]=a},9140:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-bigint",manipulateOptions(e,t){t.plugins.push("bigInt")}}}));t["default"]=a},749:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-class-properties",manipulateOptions(e,t){t.plugins.push("classProperties","classPrivateProperties","classPrivateMethods")}}}));t["default"]=a},2288:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-class-static-block",manipulateOptions(e,t){t.plugins.push("classStaticBlock")}}}));t["default"]=a},9854:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-dynamic-import",manipulateOptions(e,t){t.plugins.push("dynamicImport")}}}));t["default"]=a},9081:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-export-namespace-from",manipulateOptions(e,t){t.plugins.push("exportNamespaceFrom")}}}));t["default"]=a},9905:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-import-assertions",manipulateOptions(e,t){t.plugins.push(["importAssertions"])}}}));t["default"]=a},2228:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-import-assertions",manipulateOptions(e,t){t.plugins.push("importAssertions")}}}));t["default"]=a},4602:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-json-strings",manipulateOptions(e,t){t.plugins.push("jsonStrings")}}}));t["default"]=a},6178:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-jsx",manipulateOptions(e,t){if(t.plugins.some((e=>(Array.isArray(e)?e[0]:e)==="typescript"))){return}t.plugins.push("jsx")}}}));t["default"]=a},6709:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-logical-assignment-operators",manipulateOptions(e,t){t.plugins.push("logicalAssignment")}}}));t["default"]=a},3835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-nullish-coalescing-operator",manipulateOptions(e,t){t.plugins.push("nullishCoalescingOperator")}}}));t["default"]=a},3537:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-numeric-separator",manipulateOptions(e,t){t.plugins.push("numericSeparator")}}}));t["default"]=a},4396:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-object-rest-spread",manipulateOptions(e,t){t.plugins.push("objectRestSpread")}}}));t["default"]=a},2690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-optional-catch-binding",manipulateOptions(e,t){t.plugins.push("optionalCatchBinding")}}}));t["default"]=a},1648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-optional-chaining",manipulateOptions(e,t){t.plugins.push("optionalChaining")}}}));t["default"]=a},1603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-private-property-in-object",manipulateOptions(e,t){t.plugins.push("privateIn")}}}));t["default"]=a},9723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3962);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-top-level-await",manipulateOptions(e,t){t.plugins.push("topLevelAwait")}}}));t["default"]=a},7386:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);function removePlugin(e,t){const r=[];e.forEach(((e,s)=>{const a=Array.isArray(e)?e[0]:e;if(a===t){r.unshift(s)}}));for(const t of r){e.splice(t,1)}}var a=(0,s.declare)(((e,{isTSX:t,disallowAmbiguousJSXLike:r})=>{e.assertVersion(7);return{name:"syntax-typescript",manipulateOptions(e,s){const{plugins:a}=s;removePlugin(a,"flow");removePlugin(a,"jsx");a.push(["typescript",{disallowAmbiguousJSXLike:r}],"classProperties");{a.push("objectRestSpread")}if(t){a.push("jsx")}}}}));t["default"]=a},8137:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=(0,s.declare)(((e,t)=>{var r;e.assertVersion(7);const s=(r=e.assumption("noNewArrows"))!=null?r:!t.spec;return{name:"transform-arrow-functions",visitor:{ArrowFunctionExpression(e){if(!e.isArrowFunctionExpression())return;e.arrowFunctionToExpression({allowInsertArrow:false,noNewArrows:s,specCompliant:!s})}}}}));t["default"]=a},5333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=r(9567);var n=r(2786);var o=r(8304);var i=(0,s.declare)(((e,t)=>{var r,s;e.assertVersion(7);const{method:i,module:l}=t;const c=(r=e.assumption("noNewArrows"))!=null?r:true;const u=(s=e.assumption("ignoreFunctionLength"))!=null?s:false;if(i&&l){return{name:"transform-async-to-generator",visitor:{Function(e,t){if(!e.node.async||e.node.generator)return;let r=t.methodWrapper;if(r){r=o.types.cloneNode(r)}else{r=t.methodWrapper=(0,n.addNamed)(e,i,l)}(0,a.default)(e,{wrapAsync:r},c,u)}}}}return{name:"transform-async-to-generator",visitor:{Function(e,t){if(!e.node.async||e.node.generator)return;(0,a.default)(e,{wrapAsync:t.addHelper("asyncToGenerator")},c,u)}}}}));t["default"]=i},141:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=r(8304);var n=(0,s.declare)((e=>{e.assertVersion(7);function statementList(e,t){const r=t.get(e);for(const e of r){const t=e.node;if(!e.isFunctionDeclaration())continue;const r=a.types.variableDeclaration("let",[a.types.variableDeclarator(t.id,a.types.toExpression(t))]);r._blockHoist=2;t.id=null;e.replaceWith(r)}}return{name:"transform-block-scoped-functions",visitor:{BlockStatement(e){const{node:t,parent:r}=e;if(a.types.isFunction(r,{body:t})||a.types.isExportDeclaration(r)){return}statementList("body",e)},SwitchCase(e){statementList("consequent",e)}}}}));t["default"]=n},265:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=r(9987);var n=r(8304);const o=new WeakSet;var i=(0,s.declare)(((e,t)=>{e.assertVersion(7);const{throwIfClosureRequired:r=false,tdz:s=false}=t;if(typeof r!=="boolean"){throw new Error(`.throwIfClosureRequired must be a boolean, or undefined`)}if(typeof s!=="boolean"){throw new Error(`.tdz must be a boolean, or undefined`)}return{name:"transform-block-scoping",visitor:{VariableDeclaration(e){const{node:t,parent:r,scope:s}=e;if(!isBlockScoped(t))return;convertBlockScopedToVar(e,null,r,s,true);if(t._tdzThis){const r=[t];for(let e=0;ee.isLoop()||e.isFunction()));return t==null?void 0:t.isLoop()}function convertBlockScopedToVar(e,t,r,s,a=false){if(!t){t=e.node}if(isInLoop(e)&&!n.types.isFor(r)){for(let e=0;e0){e.traverse(u,t)}else{e.traverse(a.visitor,t)}return e.skip()}},a.visitor]);const u=n.traverse.visitors.merge([{ReferencedIdentifier(e,t){const r=t.letReferences.get(e.node.name);if(!r)return;const s=e.scope.getBindingIdentifier(e.node.name);if(s&&s!==r)return;t.closurify=true}},a.visitor]);const p={enter(e,t){if(e.isForStatement()){const{node:r}=e;if(isVar(r.init)){const e=t.pushDeclar(r.init);if(e.length===1){r.init=e[0]}else{r.init=n.types.sequenceExpression(e)}}}else if(e.isForInStatement()||e.isForOfStatement()){const{node:r}=e;if(isVar(r.left)){t.pushDeclar(r.left);r.left=r.left.declarations[0].id}}else if(isVar(e.node)){e.replaceWithMultiple(t.pushDeclar(e.node).map((e=>n.types.expressionStatement(e))))}else if(e.isFunction()){return e.skip()}}};const d={LabeledStatement({node:e},t){t.innerLabels.push(e.label.name)}};const f={enter(e,t){if(e.isAssignmentExpression()||e.isUpdateExpression()){for(const r of Object.keys(e.getBindingIdentifiers())){if(t.outsideReferences.get(r)!==e.scope.getBindingIdentifier(r)){continue}t.reassignments[r]=true}}else if(e.isReturnStatement()){t.returnStatements.push(e)}}};function loopNodeTo(e){if(n.types.isBreakStatement(e)){return"break"}else if(n.types.isContinueStatement(e)){return"continue"}}const y={Loop(e,t){const r=t.ignoreLabeless;t.ignoreLabeless=true;e.traverse(y,t);t.ignoreLabeless=r;e.skip()},Function(e){e.skip()},SwitchCase(e,t){const r=t.inSwitchCase;t.inSwitchCase=true;e.traverse(y,t);t.inSwitchCase=r;e.skip()},"BreakStatement|ContinueStatement|ReturnStatement"(e,t){const{node:r,scope:s}=e;if(t.loopIgnored.has(r))return;let a;let o=loopNodeTo(r);if(o){if(n.types.isReturnStatement(r)){throw new Error("Internal error: unexpected return statement with `loopText`")}if(r.label){if(t.innerLabels.indexOf(r.label.name)>=0){return}o=`${o}|${r.label.name}`}else{if(t.ignoreLabeless)return;if(n.types.isBreakStatement(r)&&t.inSwitchCase)return}t.hasBreakContinue=true;t.map[o]=r;a=n.types.stringLiteral(o)}if(n.types.isReturnStatement(r)){t.hasReturn=true;a=n.types.objectExpression([n.types.objectProperty(n.types.identifier("v"),r.argument||s.buildUndefinedNode())])}if(a){a=n.types.returnStatement(a);t.loopIgnored.add(a);e.skip();e.replaceWith(n.types.inherits(a,r))}}};function isStrict(e){return!!e.find((({node:e})=>{if(n.types.isProgram(e)){if(e.sourceType==="module")return true}else if(!n.types.isBlockStatement(e))return false;return e.directives.some((e=>e.value.value==="use strict"))}))}class BlockScoping{constructor(e,t,r,s,a,o,i){this.parent=void 0;this.state=void 0;this.scope=void 0;this.throwIfClosureRequired=void 0;this.tdzEnabled=void 0;this.blockPath=void 0;this.block=void 0;this.outsideLetReferences=void 0;this.hasLetReferences=void 0;this.letReferences=void 0;this.body=void 0;this.loopParent=void 0;this.loopLabel=void 0;this.loopPath=void 0;this.loop=void 0;this.has=void 0;this.parent=r;this.scope=s;this.state=i;this.throwIfClosureRequired=a;this.tdzEnabled=o;this.blockPath=t;this.block=t.node;this.outsideLetReferences=new Map;this.hasLetReferences=false;this.letReferences=new Map;this.body=[];if(e){this.loopParent=e.parent;this.loopLabel=n.types.isLabeledStatement(this.loopParent)&&this.loopParent.label;this.loopPath=e;this.loop=e.node}}run(){const e=this.block;if(o.has(e))return;o.add(e);const t=this.getLetReferences();this.checkConstants();if(n.types.isFunction(this.parent)||n.types.isProgram(this.block)){this.updateScopeInfo();return}if(!this.hasLetReferences)return;if(t){this.wrapClosure()}else{this.remap()}this.updateScopeInfo(t);if(this.loopLabel&&!n.types.isLabeledStatement(this.loopParent)){return n.types.labeledStatement(this.loopLabel,this.loop)}}checkConstants(){const e=this.scope;const t=this.state;for(const r of Object.keys(e.bindings)){const s=e.bindings[r];if(s.kind!=="const")continue;for(const e of s.constantViolations){const s=t.addHelper("readOnlyError");const a=n.types.callExpression(s,[n.types.stringLiteral(r)]);if(e.isAssignmentExpression()){const{operator:t}=e.node;if(t==="="){e.replaceWith(n.types.sequenceExpression([e.get("right").node,a]))}else if(["&&=","||=","??="].includes(t)){e.replaceWith(n.types.logicalExpression(t.slice(0,-1),e.get("left").node,n.types.sequenceExpression([e.get("right").node,a])))}else{e.replaceWith(n.types.sequenceExpression([n.types.binaryExpression(t.slice(0,-1),e.get("left").node,e.get("right").node),a]))}}else if(e.isUpdateExpression()){e.replaceWith(n.types.sequenceExpression([n.types.unaryExpression("+",e.get("argument").node),a]))}else if(e.isForXStatement()){e.ensureBlock();e.get("left").replaceWith(n.types.variableDeclaration("var",[n.types.variableDeclarator(e.scope.generateUidIdentifier(r))]));e.node.body.body.unshift(n.types.expressionStatement(a))}}}}updateScopeInfo(e){const t=this.blockPath.scope;const r=t.getFunctionParent()||t.getProgramParent();const s=this.letReferences;for(const a of s.keys()){const n=s.get(a);const o=t.getBinding(n.name);if(!o)continue;if(o.kind==="let"||o.kind==="const"){o.kind="var";if(e){if(t.hasOwnBinding(n.name)){t.removeBinding(n.name)}}else{t.moveBindingTo(n.name,r)}}}}remap(){const e=this.letReferences;const t=this.outsideLetReferences;const r=this.scope;const s=this.blockPath.scope;for(const t of e.keys()){const a=e.get(t);if(r.parentHasBinding(t)||r.hasGlobal(t)){const e=r.getOwnBinding(t);if(e){const s=r.parent.getOwnBinding(t);if(e.kind==="hoisted"&&!e.path.node.async&&!e.path.node.generator&&(!s||isVar(s.path.parent))&&!isStrict(e.path.parentPath)){continue}r.rename(a.name)}if(s.hasOwnBinding(t)){s.rename(a.name)}}}for(const r of t.keys()){const t=e.get(r);if(isInLoop(this.blockPath)&&s.hasOwnBinding(r)){s.rename(t.name)}}}wrapClosure(){if(this.throwIfClosureRequired){throw this.blockPath.buildCodeFrameError("Compiling let/const in this block would add a closure "+"(throwIfClosureRequired).")}const e=this.block;const t=this.outsideLetReferences;if(this.loop){for(const e of Array.from(t.keys())){const r=t.get(e);if(this.scope.hasGlobal(r.name)||this.scope.parentHasBinding(r.name)){t.delete(r.name);this.letReferences.delete(r.name);this.scope.rename(r.name);this.letReferences.set(r.name,r);t.set(r.name,r)}}}this.has=this.checkLoop();this.hoistVarDeclarations();const r=Array.from(t.values(),(e=>n.types.cloneNode(e)));const s=r.map((e=>n.types.cloneNode(e)));const a=this.blockPath.isSwitchStatement();const o=n.types.functionExpression(null,s,n.types.blockStatement(a?[e]:e.body));this.addContinuations(o);let i=n.types.callExpression(n.types.nullLiteral(),r);let l=".callee";const c=n.traverse.hasType(o.body,"YieldExpression",n.types.FUNCTION_TYPES);if(c){o.generator=true;i=n.types.yieldExpression(i,true);l=".argument"+l}const u=n.traverse.hasType(o.body,"AwaitExpression",n.types.FUNCTION_TYPES);if(u){o.async=true;i=n.types.awaitExpression(i);l=".argument"+l}let p;let d;if(this.has.hasReturn||this.has.hasBreakContinue){const e=this.scope.generateUid("ret");this.body.push(n.types.variableDeclaration("var",[n.types.variableDeclarator(n.types.identifier(e),i)]));p="declarations.0.init"+l;d=this.body.length-1;this.buildHas(e)}else{this.body.push(n.types.expressionStatement(i));p="expression"+l;d=this.body.length-1}let f;if(a){const{parentPath:e,listKey:t,key:r}=this.blockPath;this.blockPath.replaceWithMultiple(this.body);f=e.get(t)[r+d]}else{e.body=this.body;f=this.blockPath.get("body")[d]}const y=f.get(p);let g;if(this.loop){const e=this.scope.generateUid("loop");const t=this.loopPath.insertBefore(n.types.variableDeclaration("var",[n.types.variableDeclarator(n.types.identifier(e),o)]));y.replaceWith(n.types.identifier(e));g=t[0].get("declarations.0.init")}else{y.replaceWith(o);g=y}g.unwrapFunctionEnvironment()}addContinuations(e){const t={reassignments:{},returnStatements:[],outsideReferences:this.outsideLetReferences};this.scope.traverse(e,f,t);for(let r=0;r{e.insertBefore(n.types.expressionStatement(n.types.assignmentExpression("=",n.types.identifier(a),n.types.identifier(o))))}));e.body.body.push(n.types.expressionStatement(n.types.assignmentExpression("=",n.types.identifier(a),n.types.identifier(o))))}}getLetReferences(){const e=this.block;const t=[];if(this.loop){const e=this.loop.left||this.loop.init;if(isBlockScoped(e)){t.push(e);const r=n.types.getBindingIdentifiers(e);for(const e of Object.keys(r)){this.outsideLetReferences.set(e,r[e])}}}const addDeclarationsFromChild=(r,s)=>{s=s||r.node;if(n.types.isClassDeclaration(s)||n.types.isFunctionDeclaration(s)||isBlockScoped(s)){if(isBlockScoped(s)){convertBlockScopedToVar(r,s,e,this.scope)}if(s.declarations){for(let e=0;ethis.state.addHelper(e)};if(isInLoop(this.blockPath)){r.loopDepth++}this.blockPath.traverse(c,r);return r.closurify}checkLoop(){const e={hasBreakContinue:false,ignoreLabeless:false,inSwitchCase:false,innerLabels:[],hasReturn:false,isLoop:!!this.loop,map:{},loopIgnored:new WeakSet};this.blockPath.traverse(d,e);this.blockPath.traverse(y,e);return e}hoistVarDeclarations(){this.blockPath.traverse(p,this)}pushDeclar(e){const t=[];const r=n.types.getBindingIdentifiers(e);for(const e of Object.keys(r)){t.push(n.types.variableDeclarator(r[e]))}this.body.push(n.types.variableDeclaration(e.kind,t));const s=[];for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.visitor=void 0;var s=r(8304);function getTDZStatus(e,t){const r=t._guessExecutionStatusRelativeTo(e);if(r==="before"){return"outside"}else if(r==="after"){return"inside"}else{return"maybe"}}function buildTDZAssert(e,t){return s.types.callExpression(t.addHelper("temporalRef"),[e,s.types.stringLiteral(e.name)])}function isReference(e,t,r){const s=r.letReferences.get(e.name);if(!s)return false;return t.getBindingIdentifier(e.name)===s}const a=new WeakSet;const n={ReferencedIdentifier(e,t){if(!t.tdzEnabled)return;const{node:r,parent:n,scope:o}=e;if(e.parentPath.isFor({left:r}))return;if(!isReference(r,o,t))return;const i=o.getBinding(r.name).path;if(i.isFunctionDeclaration())return;const l=getTDZStatus(e,i);if(l==="outside")return;if(l==="maybe"){if(a.has(r)){return}a.add(r);const o=buildTDZAssert(r,t);i.parent._tdzThis=true;if(e.parentPath.isUpdateExpression()){if(n._ignoreBlockScopingTDZ)return;e.parentPath.replaceWith(s.types.sequenceExpression([o,n]))}else{e.replaceWith(o)}}else if(l==="inside"){e.replaceWith(s.template.ast`${t.addHelper("tdz")}("${r.name}")`)}},AssignmentExpression:{exit(e,t){if(!t.tdzEnabled)return;const{node:r}=e;if(r._ignoreBlockScopingTDZ)return;const a=[];const n=e.getBindingIdentifiers();for(const r of Object.keys(n)){const s=n[r];if(isReference(s,e.scope,t)){a.push(s)}}if(a.length){r._ignoreBlockScopingTDZ=true;a.push(r);e.replaceWithMultiple(a.map((e=>s.types.expressionStatement(e))))}}}};t.visitor=n},8323:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3242);var a=r(9102);var n=r(1113);var o=r(821);var i=r(8304);var l=r(3315);var c=r(1685);const getBuiltinClasses=e=>Object.keys(l[e]).filter((e=>/^[A-Z]/.test(e)));const u=new Set([...getBuiltinClasses("builtin"),...getBuiltinClasses("browser")]);var p=(0,s.declare)(((e,t)=>{var r,s,l,p;e.assertVersion(7);const{loose:d=false}=t;const f=(r=e.assumption("setClassMethods"))!=null?r:d;const y=(s=e.assumption("constantSuper"))!=null?s:d;const g=(l=e.assumption("superIsCallableConstructor"))!=null?l:d;const h=(p=e.assumption("noClassCalls"))!=null?p:d;const b=new WeakSet;return{name:"transform-classes",visitor:{ExportDefaultDeclaration(e){if(!e.get("declaration").isClassDeclaration())return;(0,o.default)(e)},ClassDeclaration(e){const{node:t}=e;const r=t.id||e.scope.generateUidIdentifier("class");e.replaceWith(i.types.variableDeclaration("let",[i.types.variableDeclarator(r,i.types.toExpression(t))]))},ClassExpression(e,t){const{node:r}=e;if(b.has(r))return;const s=(0,n.default)(e);if(s&&s!==r){e.replaceWith(s);return}b.add(r);e.replaceWith((0,c.default)(e,t.file,u,d,{setClassMethods:f,constantSuper:y,superIsCallableConstructor:g,noClassCalls:h}));if(e.isCallExpression()){(0,a.default)(e);const t=e.get("callee");if(t.isArrowFunctionExpression()){t.arrowFunctionToExpression()}}}}}}));t["default"]=p},2088:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=addCreateSuperHelper;var s=r(8304);const a=new WeakMap;function addCreateSuperHelper(e){if(a.has(e)){return(s.types.cloneNode||s.types.clone)(a.get(e))}try{return e.addHelper("createSuper")}catch(e){}const t=e.scope.generateUidIdentifier("createSuper");a.set(e,t);const r=n({CREATE_SUPER:t,GET_PROTOTYPE_OF:e.addHelper("getPrototypeOf"),POSSIBLE_CONSTRUCTOR_RETURN:e.addHelper("possibleConstructorReturn")});e.path.unshiftContainer("body",[r]);e.scope.registerDeclaration(e.path.get("body.0"));return s.types.cloneNode(t)}const n=s.template.statement` function CREATE_SUPER(Derived) { function isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; diff --git a/packages/next/compiled/edge-runtime/index.js b/packages/next/compiled/edge-runtime/index.js index dd1b86049f7b953..1ac3b7818c40a5b 100644 --- a/packages/next/compiled/edge-runtime/index.js +++ b/packages/next/compiled/edge-runtime/index.js @@ -1 +1 @@ -(()=>{var __webpack_modules__={162:(__unused_webpack_module,exports,__nccwpck_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.EdgeVM=void 0;const buffer_1=__nccwpck_require__(300);const require_1=__nccwpck_require__(986);const vm_1=__nccwpck_require__(218);const vm_2=__nccwpck_require__(144);class EdgeVM extends vm_1.VM{constructor(e={}){super({...e,extend:t=>e.extend?e.extend(addPrimitives(t)):addPrimitives(t)})}}exports.EdgeVM=EdgeVM;function addPrimitives(context){defineProperty(context,"self",{enumerable:true,value:context});defineProperty(context,"globalThis",{value:context});defineProperty(context,"Symbol",{value:Symbol});defineProperty(context,"clearInterval",{value:clearInterval});defineProperty(context,"clearTimeout",{value:clearTimeout});defineProperty(context,"setInterval",{value:setInterval});defineProperty(context,"setTimeout",{value:setTimeout});defineProperty(context,"EdgeRuntime",{value:"edge-runtime"});defineProperties(context,{exports:(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/console"),scopedContext:{console:console}}),nonenumerable:["console"]});const encodings=(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/encoding"),scopedContext:{Buffer:buffer_1.Buffer,global:{ArrayBuffer:ArrayBuffer}}});defineProperties(context,{exports:encodings,nonenumerable:["atob","btoa","TextEncoder","TextDecoder"]});const streams=(0,require_1.requireWithCache)({path:require.resolve("next/dist/compiled/@edge-runtime/primitives/streams"),context:context});defineProperties(context,{exports:streams,nonenumerable:["ReadableStream","ReadableStreamBYOBReader","ReadableStreamDefaultReader","TransformStream","WritableStream","WritableStreamDefaultWriter"]});const abort=(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/abort-controller")});defineProperties(context,{exports:abort,nonenumerable:["AbortController","AbortSignal"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({cache:new Map([["punycode",{exports:__nccwpck_require__(477)}]]),context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/url"),scopedContext:{TextEncoder:encodings.TextEncoder,TextDecoder:encodings.TextDecoder}}),nonenumerable:["URL","URLSearchParams","URLPattern"]});const blob=(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/blob")});defineProperties(context,{exports:blob,nonenumerable:["Blob"]});const webFetch=(0,require_1.requireWithCache)({context:context,cache:new Map([["abort-controller",{exports:abort}],["assert",{exports:__nccwpck_require__(491)}],["buffer",{exports:__nccwpck_require__(300)}],["events",{exports:__nccwpck_require__(361)}],["http",{exports:__nccwpck_require__(685)}],["net",{exports:__nccwpck_require__(808)}],["perf_hooks",{exports:__nccwpck_require__(74)}],["stream",{exports:__nccwpck_require__(781)}],["tls",{exports:__nccwpck_require__(404)}],["util",{exports:__nccwpck_require__(837)}],["zlib",{exports:__nccwpck_require__(796)}],[require.resolve("next/dist/compiled/@edge-runtime/primitives/streams"),{exports:streams}],[require.resolve("next/dist/compiled/@edge-runtime/primitives/blob"),{exports:blob}]]),path:require.resolve("next/dist/compiled/@edge-runtime/primitives/fetch"),scopedContext:{Buffer:buffer_1.Buffer,FinalizationRegistry:function(){return{register:function(){}}},global:{},queueMicrotask:queueMicrotask,setImmediate:setImmediate}});defineProperties(context,{exports:webFetch,nonenumerable:["fetch","File","FormData","Headers","Request","Response"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({cache:new Map([[require.resolve("next/dist/compiled/@edge-runtime/primitives/fetch"),{exports:webFetch}]]),context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/cache"),scopedContext:{global:{}}}),enumerable:["caches"],nonenumerable:["Cache","CacheStorage"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({context:context,cache:new Map([["crypto",{exports:__nccwpck_require__(113)}],["process",{exports:__nccwpck_require__(282)}]]),path:require.resolve("next/dist/compiled/@edge-runtime/primitives/crypto"),scopedContext:{Buffer:buffer_1.Buffer,Uint8Array:new Proxy((0,vm_2.runInContext)("Uint8Array",context),{construct(e,t){const r=new e(...t);if(!(t[0]instanceof buffer_1.Buffer)){return r}return new e([...r])}})}}),enumerable:["crypto"],nonenumerable:["Crypto","CryptoKey","SubtleCrypto"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/events")}),nonenumerable:["Event","EventTarget","FetchEvent","PromiseRejectionEvent"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/structured-clone")}),nonenumerable:["structuredClone"]});return context}function defineProperty(e,t,r){var n,o,s;Object.defineProperty(e,t,{configurable:(n=r.configurable)!==null&&n!==void 0?n:false,enumerable:(o=r.enumerable)!==null&&o!==void 0?o:false,value:r.value,writable:(s=r.writable)!==null&&s!==void 0?s:true})}function defineProperties(e,t){var r,n;for(const n of(r=t.enumerable)!==null&&r!==void 0?r:[]){if(!t.exports[n]){throw new Error(`Attempt to export a nullable value for "${n}"`)}defineProperty(e,n,{enumerable:true,value:t.exports[n]})}for(const r of(n=t.nonenumerable)!==null&&n!==void 0?n:[]){if(!t.exports[r]){throw new Error(`Attempt to export a nullable value for "${r}"`)}defineProperty(e,r,{value:t.exports[r]})}}},135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VM=t.EdgeVM=void 0;var n=r(162);Object.defineProperty(t,"EdgeVM",{enumerable:true,get:function(){return n.EdgeVM}});var o=r(218);Object.defineProperty(t,"VM",{enumerable:true,get:function(){return o.VM}})},986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.requireWithCache=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,r,i={}){return function requireFn(a,E){const c=require.resolve(E,{paths:[(0,s.dirname)(a)]});const u=t.get(E)||t.get(c);if(u!==undefined&&u!==null){return u.exports}const _={exports:{},loaded:false,id:c};t.set(c,_);r===null||r===void 0?void 0:r.add(c);const d=(0,o.runInContext)(`(function(module,exports,require,__dirname,__filename,${Object.keys(i).join(",")}) {${(0,n.readFileSync)(c,"utf-8")}\n})`,e);try{d(_,_.exports,requireFn.bind(null,c),(0,s.dirname)(c),c,...Object.values(i))}catch(e){t.delete(c);throw e}_.loaded=true;return _.exports}}t.createRequire=createRequire;function requireWithCache(e){var t;return createRequire(e.context,(t=e.cache)!==null&&t!==void 0?t:new Map,e.references,e.scopedContext).call(null,e.path,e.path)}t.requireWithCache=requireWithCache},266: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=r(277);const s=n(r(17));const i=n(r(147));const a=n(r(37));function tempFile(e){const t=s.default.join(a.default.tmpdir(),o.crypto.randomUUID());i.default.writeFileSync(t,e);return{path:t,remove:()=>i.default.unlinkSync(t)}}t.tempFile=tempFile},218:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VM=void 0;const n=r(144);const o=r(986);const s=r(266);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:true}});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}}},593:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EdgeRuntime=void 0;const n=r(135);let o;let s;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=>o=e,getterName:"__rejectionHandlers",getter:()=>o});defineHandlerProps({object:this,setterName:"__onErrorHandler",setter:e=>s=e,getterName:"__errorHandlers",getter:()=>s});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){o===null||o===void 0?void 0:o.forEach((r=>r(e,t)))}));process.on("uncaughtException",(function invokeErrorHandlers(e){s===null||s===void 0?void 0:s.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})}},882:(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}},12: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(882);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,c;const u=(0,a.default)();const _=r.method!=="GET"&&r.method!=="HEAD"?(0,o.getClonableBodyStream)(r,e.runtime.context.TransformStream):undefined;const d=await e.runtime.dispatchFetch(String(getURL(r)),{headers:toRequestInitHeaders(r),method:r.method,body:_===null||_===void 0?void 0:_.cloneBodyStream()});const l=d.waitUntil();t.add(l);l.finally((()=>t.delete(l)));n.statusCode=d.status;n.statusMessage=d.statusText;for(const[e,t]of Object.entries(toNodeHeaders(d.headers))){if(e!=="content-encoding"&&t!==undefined){n.setHeader(e,t)}}if(d.body){for await(const e of d.body){n.write(e)}}const S=`${r.socket.remoteAddress} ${r.method} ${r.url}`;const R=`${(E=(0,s.default)(u()).match(/[a-zA-Z]+|[0-9]+/g))===null||E===void 0?void 0:E.join(" ")}`;const h=`${n.statusCode} ${i.default[n.statusCode]}`;(c=e.logger)===null||c===void 0?void 0:c.debug(`${S} → ${h} 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}},742:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runServer=t.createHandler=void 0;var n=r(12);Object.defineProperty(t,"createHandler",{enumerable:true,get:function(){return n.createHandler}});var o=r(653);Object.defineProperty(t,"runServer",{enumerable:true,get:function(){return o.runServer}})},653: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(12);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},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}},491:e=>{"use strict";e.exports=require("assert")},300:e=>{"use strict";e.exports=require("buffer")},113:e=>{"use strict";e.exports=require("crypto")},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},685:e=>{"use strict";e.exports=require("http")},808:e=>{"use strict";e.exports=require("net")},277:e=>{"use strict";e.exports=require("next/dist/compiled/@edge-runtime/primitives/crypto")},37:e=>{"use strict";e.exports=require("os")},17:e=>{"use strict";e.exports=require("path")},74:e=>{"use strict";e.exports=require("perf_hooks")},282:e=>{"use strict";e.exports=require("process")},477:e=>{"use strict";e.exports=require("punycode")},781:e=>{"use strict";e.exports=require("stream")},404:e=>{"use strict";e.exports=require("tls")},837:e=>{"use strict";e.exports=require("util")},144:e=>{"use strict";e.exports=require("vm")},796:e=>{"use strict";e.exports=require("zlib")}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={exports:{}};var n=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete __webpack_module_cache__[e]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__={};(()=>{"use strict";var e=__webpack_exports__;Object.defineProperty(e,"__esModule",{value:true});e.EdgeRuntime=e.runServer=e.createHandler=void 0;var t=__nccwpck_require__(742);Object.defineProperty(e,"createHandler",{enumerable:true,get:function(){return t.createHandler}});Object.defineProperty(e,"runServer",{enumerable:true,get:function(){return t.runServer}});var r=__nccwpck_require__(593);Object.defineProperty(e,"EdgeRuntime",{enumerable:true,get:function(){return r.EdgeRuntime}})})();module.exports=__webpack_exports__})(); \ No newline at end of file +(()=>{var __webpack_modules__={1:(__unused_webpack_module,exports,__nccwpck_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.EdgeVM=void 0;const buffer_1=__nccwpck_require__(300);const require_1=__nccwpck_require__(317);const vm_1=__nccwpck_require__(140);const vm_2=__nccwpck_require__(144);class EdgeVM extends vm_1.VM{constructor(e={}){super({...e,extend:t=>e.extend?e.extend(addPrimitives(t)):addPrimitives(t)})}}exports.EdgeVM=EdgeVM;function addPrimitives(context){defineProperty(context,"self",{enumerable:true,value:context});defineProperty(context,"globalThis",{value:context});defineProperty(context,"Symbol",{value:Symbol});defineProperty(context,"clearInterval",{value:clearInterval});defineProperty(context,"clearTimeout",{value:clearTimeout});defineProperty(context,"setInterval",{value:setInterval});defineProperty(context,"setTimeout",{value:setTimeout});defineProperty(context,"EdgeRuntime",{value:"edge-runtime"});defineProperties(context,{exports:(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/console"),scopedContext:{console:console}}),nonenumerable:["console"]});const encodings=(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/encoding"),scopedContext:{Buffer:buffer_1.Buffer,global:{}}});defineProperties(context,{exports:encodings,nonenumerable:["atob","btoa","TextEncoder","TextDecoder"]});const streams=(0,require_1.requireWithCache)({path:require.resolve("next/dist/compiled/@edge-runtime/primitives/streams"),context:context});defineProperties(context,{exports:streams,nonenumerable:["ReadableStream","ReadableStreamBYOBReader","ReadableStreamDefaultReader","TransformStream","WritableStream","WritableStreamDefaultWriter"]});const abort=(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/abort-controller")});defineProperties(context,{exports:abort,nonenumerable:["AbortController","AbortSignal"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({cache:new Map([["punycode",{exports:__nccwpck_require__(477)}]]),context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/url"),scopedContext:{TextEncoder:encodings.TextEncoder,TextDecoder:encodings.TextDecoder}}),nonenumerable:["URL","URLSearchParams","URLPattern"]});const blob=(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/blob")});defineProperties(context,{exports:blob,nonenumerable:["Blob"]});const webFetch=(0,require_1.requireWithCache)({context:context,cache:new Map([["abort-controller",{exports:abort}],["assert",{exports:__nccwpck_require__(491)}],["buffer",{exports:__nccwpck_require__(300)}],["events",{exports:__nccwpck_require__(361)}],["http",{exports:__nccwpck_require__(685)}],["net",{exports:__nccwpck_require__(808)}],["perf_hooks",{exports:__nccwpck_require__(74)}],["stream",{exports:__nccwpck_require__(781)}],["tls",{exports:__nccwpck_require__(404)}],["util",{exports:__nccwpck_require__(837)}],["zlib",{exports:__nccwpck_require__(796)}],[require.resolve("next/dist/compiled/@edge-runtime/primitives/streams"),{exports:streams}],[require.resolve("next/dist/compiled/@edge-runtime/primitives/blob"),{exports:blob}]]),path:require.resolve("next/dist/compiled/@edge-runtime/primitives/fetch"),scopedContext:{Uint8Array:createUint8ArrayForContext(context),Buffer:buffer_1.Buffer,FinalizationRegistry:function(){return{register:function(){}}},global:{},queueMicrotask:queueMicrotask,setImmediate:setImmediate}});defineProperties(context,{exports:webFetch,nonenumerable:["fetch","File","FormData","Headers","Request","Response"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({cache:new Map([[require.resolve("next/dist/compiled/@edge-runtime/primitives/fetch"),{exports:webFetch}]]),context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/cache"),scopedContext:{global:{}}}),enumerable:["caches"],nonenumerable:["Cache","CacheStorage"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({context:context,cache:new Map([["crypto",{exports:__nccwpck_require__(113)}],["process",{exports:__nccwpck_require__(282)}]]),path:require.resolve("next/dist/compiled/@edge-runtime/primitives/crypto"),scopedContext:{Buffer:buffer_1.Buffer,Uint8Array:createUint8ArrayForContext(context)}}),enumerable:["crypto"],nonenumerable:["Crypto","CryptoKey","SubtleCrypto"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/events")}),nonenumerable:["Event","EventTarget","FetchEvent","PromiseRejectionEvent"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/structured-clone")}),nonenumerable:["structuredClone"]});return context}function defineProperty(e,t,r){var n,o,s;Object.defineProperty(e,t,{configurable:(n=r.configurable)!==null&&n!==void 0?n:false,enumerable:(o=r.enumerable)!==null&&o!==void 0?o:false,value:r.value,writable:(s=r.writable)!==null&&s!==void 0?s:true})}function defineProperties(e,t){var r,n;for(const n of(r=t.enumerable)!==null&&r!==void 0?r:[]){if(!t.exports[n]){throw new Error(`Attempt to export a nullable value for "${n}"`)}defineProperty(e,n,{enumerable:true,value:t.exports[n]})}for(const r of(n=t.nonenumerable)!==null&&n!==void 0?n:[]){if(!t.exports[r]){throw new Error(`Attempt to export a nullable value for "${r}"`)}defineProperty(e,r,{value:t.exports[r]})}}function createUint8ArrayForContext(e){return new Proxy((0,vm_2.runInContext)("Uint8Array",e),{construct(e,t){const r=new e(...t);if(!(t[0]instanceof buffer_1.Buffer)){return r}return new e([...r])}})}},0:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VM=t.EdgeVM=void 0;var n=r(1);Object.defineProperty(t,"EdgeVM",{enumerable:true,get:function(){return n.EdgeVM}});var o=r(140);Object.defineProperty(t,"VM",{enumerable:true,get:function(){return o.VM}})},317:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.requireWithCache=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,r,i={}){return function requireFn(a,E){const c=require.resolve(E,{paths:[(0,s.dirname)(a)]});const u=t.get(E)||t.get(c);if(u!==undefined&&u!==null){return u.exports}const _={exports:{},loaded:false,id:c};t.set(c,_);r===null||r===void 0?void 0:r.add(c);const d=(0,o.runInContext)(`(function(module,exports,require,__dirname,__filename,${Object.keys(i).join(",")}) {${(0,n.readFileSync)(c,"utf-8")}\n})`,e);try{d(_,_.exports,requireFn.bind(null,c),(0,s.dirname)(c),c,...Object.values(i))}catch(e){t.delete(c);throw e}_.loaded=true;return _.exports}}t.createRequire=createRequire;function requireWithCache(e){var t;return createRequire(e.context,(t=e.cache)!==null&&t!==void 0?t:new Map,e.references,e.scopedContext).call(null,e.path,e.path)}t.requireWithCache=requireWithCache},370: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=r(277);const s=n(r(17));const i=n(r(147));const a=n(r(37));function tempFile(e){const t=s.default.join(a.default.tmpdir(),o.crypto.randomUUID());i.default.writeFileSync(t,e);return{path:t,remove:()=>i.default.unlinkSync(t)}}t.tempFile=tempFile},140:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VM=void 0;const n=r(144);const o=r(317);const s=r(370);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:true}});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}}},14:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EdgeRuntime=void 0;const n=r(0);let o;let s;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=>o=e,getterName:"__rejectionHandlers",getter:()=>o});defineHandlerProps({object:this,setterName:"__onErrorHandler",setter:e=>s=e,getterName:"__errorHandlers",getter:()=>s});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){o===null||o===void 0?void 0:o.forEach((r=>r(e,t)))}));process.on("uncaughtException",(function invokeErrorHandlers(e){s===null||s===void 0?void 0:s.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\n response.headers.delete('content-encoding');\n response.headers.delete('transform-encoding');\n response.headers.delete('content-length');\n\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})}},547:(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}},302: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(547);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,c;const u=(0,a.default)();const _=r.method!=="GET"&&r.method!=="HEAD"?(0,o.getClonableBodyStream)(r,e.runtime.context.TransformStream):undefined;const d=await e.runtime.dispatchFetch(String(getURL(r)),{headers:toRequestInitHeaders(r),method:r.method,body:_===null||_===void 0?void 0:_.cloneBodyStream()});const l=d.waitUntil();t.add(l);l.finally((()=>t.delete(l)));n.statusCode=d.status;n.statusMessage=d.statusText;for(const[e,t]of Object.entries(toNodeHeaders(d.headers))){if(t!==undefined){n.setHeader(e,t)}}if(d.body){for await(const e of d.body){n.write(e)}}const S=`${r.socket.remoteAddress} ${r.method} ${r.url}`;const R=`${(E=(0,s.default)(u()).match(/[a-zA-Z]+|[0-9]+/g))===null||E===void 0?void 0:E.join(" ")}`;const h=`${n.statusCode} ${i.default[n.statusCode]}`;(c=e.logger)===null||c===void 0?void 0:c.debug(`${S} → ${h} 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}},707:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runServer=t.createHandler=void 0;var n=r(302);Object.defineProperty(t,"createHandler",{enumerable:true,get:function(){return n.createHandler}});var o=r(719);Object.defineProperty(t,"runServer",{enumerable:true,get:function(){return o.runServer}})},719: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(302);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},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}},491:e=>{"use strict";e.exports=require("assert")},300:e=>{"use strict";e.exports=require("buffer")},113:e=>{"use strict";e.exports=require("crypto")},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},685:e=>{"use strict";e.exports=require("http")},808:e=>{"use strict";e.exports=require("net")},277:e=>{"use strict";e.exports=require("next/dist/compiled/@edge-runtime/primitives/crypto")},37:e=>{"use strict";e.exports=require("os")},17:e=>{"use strict";e.exports=require("path")},74:e=>{"use strict";e.exports=require("perf_hooks")},282:e=>{"use strict";e.exports=require("process")},477:e=>{"use strict";e.exports=require("punycode")},781:e=>{"use strict";e.exports=require("stream")},404:e=>{"use strict";e.exports=require("tls")},837:e=>{"use strict";e.exports=require("util")},144:e=>{"use strict";e.exports=require("vm")},796:e=>{"use strict";e.exports=require("zlib")}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={exports:{}};var n=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete __webpack_module_cache__[e]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__={};(()=>{"use strict";var e=__webpack_exports__;Object.defineProperty(e,"__esModule",{value:true});e.EdgeRuntime=e.runServer=e.createHandler=void 0;var t=__nccwpck_require__(707);Object.defineProperty(e,"createHandler",{enumerable:true,get:function(){return t.createHandler}});Object.defineProperty(e,"runServer",{enumerable:true,get:function(){return t.runServer}});var r=__nccwpck_require__(14);Object.defineProperty(e,"EdgeRuntime",{enumerable:true,get:function(){return r.EdgeRuntime}})})();module.exports=__webpack_exports__})(); \ No newline at end of file diff --git a/packages/next/package.json b/packages/next/package.json index 18dd23e393f2494..91f730ba99b7c7e 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -117,7 +117,7 @@ "@babel/runtime": "7.15.4", "@babel/traverse": "7.18.0", "@babel/types": "7.18.0", - "@edge-runtime/primitives": "1.1.0-beta.26", + "@edge-runtime/primitives": "1.1.0-beta.27", "@hapi/accept": "5.0.2", "@napi-rs/cli": "2.7.0", "@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.26", + "edge-runtime": "1.1.0-beta.27", "events": "3.3.0", "find-cache-dir": "3.3.1", "find-up": "4.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 986ce59f29e4630..9485aee0ec1e848 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.26 + '@edge-runtime/jest-environment': 1.1.0-beta.27 '@fullhuman/postcss-purgecss': 1.3.0 '@mdx-js/loader': 0.18.0 '@next/bundle-analyzer': workspace:* @@ -173,7 +173,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.26 + '@edge-runtime/jest-environment': 1.1.0-beta.27 '@fullhuman/postcss-purgecss': 1.3.0 '@mdx-js/loader': 0.18.0_uuaxwgga6hqycsez5ok7v2wg4i '@next/bundle-analyzer': link:packages/next-bundle-analyzer @@ -416,7 +416,7 @@ importers: '@babel/runtime': 7.15.4 '@babel/traverse': 7.18.0 '@babel/types': 7.18.0 - '@edge-runtime/primitives': 1.1.0-beta.26 + '@edge-runtime/primitives': 1.1.0-beta.27 '@hapi/accept': 5.0.2 '@napi-rs/cli': 2.7.0 '@napi-rs/triples': 1.1.0 @@ -497,7 +497,7 @@ importers: debug: 4.1.1 devalue: 2.0.1 domain-browser: 4.19.0 - edge-runtime: 1.1.0-beta.26 + edge-runtime: 1.1.0-beta.27 events: 3.3.0 find-cache-dir: 3.3.1 find-up: 4.1.0 @@ -609,7 +609,7 @@ importers: '@babel/runtime': 7.15.4 '@babel/traverse': 7.18.0 '@babel/types': 7.18.0 - '@edge-runtime/primitives': 1.1.0-beta.26 + '@edge-runtime/primitives': 1.1.0-beta.27 '@hapi/accept': 5.0.2 '@napi-rs/cli': 2.7.0 '@napi-rs/triples': 1.1.0 @@ -687,7 +687,7 @@ importers: debug: 4.1.1 devalue: 2.0.1 domain-browser: 4.19.0 - edge-runtime: 1.1.0-beta.26 + edge-runtime: 1.1.0-beta.27 events: 3.3.0 find-cache-dir: 3.3.1 find-up: 4.1.0 @@ -1886,7 +1886,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.0 - '@babel/helper-plugin-utils': 7.16.7 + '@babel/helper-plugin-utils': 7.17.12 /@babel/plugin-syntax-optional-catch-binding/7.8.3_@babel+core@7.18.0: resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} @@ -3216,14 +3216,14 @@ packages: protobufjs: 6.11.2 dev: true - /@edge-runtime/format/1.1.0-beta.26: - resolution: {integrity: sha512-05wywSsBZVE1iMezvYXW1ZMak6y2riJPVmEDK9RW9BECazykJtYOOQ+GG+oVaicNfxh2YtQTQD/WaI/4K3yKWA==} + /@edge-runtime/format/1.1.0-beta.27: + resolution: {integrity: sha512-67ig1yISH1M7OHxS/PxgXbrQ99X8c47GFqP6qrDx+uWw1gBnknNHIykL3OgeIt4yk1OPKKHtrLe/Gnrw9Lc9tQ==} dev: true - /@edge-runtime/jest-environment/1.1.0-beta.26: - resolution: {integrity: sha512-NnnYjF3Kaw83Vrkoy0lpuZCk49VjR5Ruo5XDjZ9dKqslA6lNVBkirTDvQrQBYSTaZM8lu3Ed39o50zH2Ua4lTw==} + /@edge-runtime/jest-environment/1.1.0-beta.27: + resolution: {integrity: sha512-zCKFLqhvQ3OWV2H1cvl6CD7pnRKR+hUtGaJU4fYVjHAOoIpv5R9W+qw+9rXu5CpZJ7F4k/+1vLicAxaXKVKJOg==} dependencies: - '@edge-runtime/vm': 1.1.0-beta.26 + '@edge-runtime/vm': 1.1.0-beta.27 '@jest/environment': 28.1.3 '@jest/fake-timers': 28.1.3 '@jest/types': 28.1.3 @@ -3231,14 +3231,14 @@ packages: jest-util: 28.1.3 dev: true - /@edge-runtime/primitives/1.1.0-beta.26: - resolution: {integrity: sha512-SsbXbw2+bAHbcjAmT+e5WoADmU/yDO5glNFkYd/971Zo26cJoW/1W3n4IMm5gOtyvLHbezSRKt8t5GteX0wYdA==} + /@edge-runtime/primitives/1.1.0-beta.27: + resolution: {integrity: sha512-9RLySRgIfNhPXzqprwk5jojUec4WmVRphXIGgXmqZs/22UPF50mKcmrstPVVutGiX0mt4YkHuUarLj0VtLjX1Q==} dev: true - /@edge-runtime/vm/1.1.0-beta.26: - resolution: {integrity: sha512-hxWtmuO13zgNkM3zHvRENfMeavM+PAKSoHhvzt+sHjSothxGlA06XXN38t/NT6LD4ND8p8FmPJ70+fTptL4a/A==} + /@edge-runtime/vm/1.1.0-beta.27: + resolution: {integrity: sha512-1ua5EI3GXKDDdjF6+1CUi37rmpxXMSWItCCl5sIMLBaIaf2klgnVYzIFVXORvXp0fKh1N3jEcS+Ykkutg/uzaw==} dependencies: - '@edge-runtime/primitives': 1.1.0-beta.26 + '@edge-runtime/primitives': 1.1.0-beta.27 dev: true /@emotion/is-prop-valid/0.8.8: @@ -4618,7 +4618,7 @@ packages: /@mdx-js/mdx/0.18.2_@babel+core@7.18.0: resolution: {integrity: sha512-7DqNBOGPV+36qpH8YZmKI5uvuXhrGZFhJ4C9+9uaQSpH2hQg9xAfdzjSSEO8FQhAlu6wJtUgb72J5/eWdc1HFw==} dependencies: - '@babel/plugin-proposal-object-rest-spread': 7.14.7_@babel+core@7.18.0 + '@babel/plugin-proposal-object-rest-spread': 7.18.0_@babel+core@7.18.0 '@babel/plugin-syntax-jsx': 7.14.5_@babel+core@7.18.0 change-case: 3.1.0 detab: 2.0.4 @@ -9741,12 +9741,12 @@ packages: safe-buffer: 5.2.0 dev: true - /edge-runtime/1.1.0-beta.26: - resolution: {integrity: sha512-2JZlxpISnRv3p0yh6Oo9QZF06lWcgJH0RMxVbJ5Az0Grde7B1PLw34oCIcOu23Zu7Icn4Lh2wojA6riq3jyDqg==} + /edge-runtime/1.1.0-beta.27: + resolution: {integrity: sha512-6Epw2VvkgQKNCZf1LpFdzrEpsSgnVAkLI3zGW5V7VduB8eNz5We/bpcNnFJTjGPUshhW+C5WxY7QNyioucMpDQ==} hasBin: true dependencies: - '@edge-runtime/format': 1.1.0-beta.26 - '@edge-runtime/vm': 1.1.0-beta.26 + '@edge-runtime/format': 1.1.0-beta.27 + '@edge-runtime/vm': 1.1.0-beta.27 exit-hook: 2.2.1 http-status: 1.5.2 mri: 1.2.0 @@ -11301,7 +11301,7 @@ packages: dev: true /get-stdin/4.0.1: - resolution: {integrity: sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=} + resolution: {integrity: sha512-F5aQMywwJ2n85s4hJPTT9RPxGmubonuB10MNYo17/xph174n2MIR33HRguhzVag10O/npM7SPk73LMZNP+FaWw==} engines: {node: '>=0.10.0'} dev: true @@ -11977,7 +11977,7 @@ packages: dev: true /header-case/1.0.1: - resolution: {integrity: sha1-lTWXMZfBRLCWE81l0xfvGZY70C0=} + resolution: {integrity: sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ==} dependencies: no-case: 2.3.2 upper-case: 1.1.3 @@ -12219,7 +12219,7 @@ packages: dev: true /humanize-ms/1.2.1: - resolution: {integrity: sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=} + resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} dependencies: ms: 2.1.2 dev: true @@ -12815,11 +12815,11 @@ packages: dev: true /is-lambda/1.0.1: - resolution: {integrity: sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU=} + resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==} dev: true /is-lower-case/1.1.3: - resolution: {integrity: sha1-fhR75HaNxGbbO/shzGCzHmrWk5M=} + resolution: {integrity: sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA==} dependencies: lower-case: 1.1.4 dev: true @@ -13050,7 +13050,7 @@ packages: dev: true /is-upper-case/1.1.2: - resolution: {integrity: sha1-jQsfp+eTOh5YSDYA7H2WYcuvdW8=} + resolution: {integrity: sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw==} dependencies: upper-case: 1.1.3 dev: true @@ -14670,13 +14670,13 @@ packages: dev: true /lower-case-first/1.0.2: - resolution: {integrity: sha1-5dp8JvKacHO+AtUrrJmA5ZIq36E=} + resolution: {integrity: sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA==} dependencies: lower-case: 1.1.4 dev: true /lower-case/1.1.4: - resolution: {integrity: sha1-miyr0bno4K6ZOkv31YdcOcQujqw=} + resolution: {integrity: sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==} dev: true /lower-case/2.0.2: @@ -14926,7 +14926,7 @@ packages: dev: true /mdurl/1.0.1: - resolution: {integrity: sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=} + resolution: {integrity: sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==} dev: true /media-typer/0.3.0: @@ -16419,7 +16419,7 @@ packages: dev: true /param-case/2.1.1: - resolution: {integrity: sha1-35T9jPZTHs915r75oIWPvHK+Ikc=} + resolution: {integrity: sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==} dependencies: no-case: 2.3.2 dev: true @@ -16590,7 +16590,7 @@ packages: dev: true /pascal-case/2.0.1: - resolution: {integrity: sha1-LVeNNFX2YNpl7KGO+VtODekSdh4=} + resolution: {integrity: sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ==} dependencies: camel-case: 3.0.0 upper-case-first: 1.1.2 @@ -16613,7 +16613,7 @@ packages: dev: true /path-case/2.1.1: - resolution: {integrity: sha1-lLgDfDctP+KQbkZbtF4l0ibo7qU=} + resolution: {integrity: sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q==} dependencies: no-case: 2.3.2 dev: true @@ -18794,7 +18794,7 @@ packages: dev: true /replace-ext/1.0.0: - resolution: {integrity: sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=} + resolution: {integrity: sha512-vuNYXC7gG7IeVNBC1xUllqCcZKRbJoSPOBhnTEcAIiKCsbuef6zO3F0Rve3isPMMoNoQRWjQwbAgAjHUHniyEA==} engines: {node: '>= 0.10'} dev: true @@ -19352,7 +19352,7 @@ packages: dev: true /sentence-case/2.1.1: - resolution: {integrity: sha1-H24t2jnBaL+S0T+G1KkYkz9mftQ=} + resolution: {integrity: sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ==} dependencies: no-case: 2.3.2 upper-case-first: 1.1.2 @@ -19543,7 +19543,7 @@ packages: dev: true /snake-case/2.1.0: - resolution: {integrity: sha1-Qb2xtz8w7GagTU4srRt2OH1NbZ8=} + resolution: {integrity: sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q==} dependencies: no-case: 2.3.2 dev: true @@ -20222,7 +20222,7 @@ packages: dev: true /swap-case/1.1.2: - resolution: {integrity: sha1-w5IDpFhzhfrTyFCgvRvK+ggZdOM=} + resolution: {integrity: sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ==} dependencies: lower-case: 1.1.4 upper-case: 1.1.3 @@ -20431,7 +20431,7 @@ packages: acorn: optional: true dependencies: - acorn: 8.6.0 + acorn: 8.8.0 commander: 2.20.3 source-map: 0.7.3 source-map-support: 0.5.20 @@ -20546,7 +20546,7 @@ packages: dev: true /title-case/2.1.1: - resolution: {integrity: sha1-PhJyFtpY0rxb7PE3q5Ha46fNj6o=} + resolution: {integrity: sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q==} dependencies: no-case: 2.3.2 upper-case: 1.1.3 @@ -20620,7 +20620,7 @@ packages: safe-regex: 1.1.0 /to-style/1.3.3: - resolution: {integrity: sha1-Y6K3Cm9KfU/cLtV6C+TnI1y2aZw=} + resolution: {integrity: sha512-9K8KYegr9hrdm8yPpu5iZjJp5t6RPAp4gFDU5hD9zR8hwqgF4fsoSitMtkRKQG2qkP5j/uG3wajbgV09rjmIqg==} dev: true /to-vfile/6.1.0: @@ -20705,7 +20705,7 @@ packages: dev: true /trim/0.0.1: - resolution: {integrity: sha1-WFhUf2spB1fulczMZm+1AITEYN0=} + resolution: {integrity: sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ==} dev: true /trough/1.0.4: @@ -21136,6 +21136,7 @@ packages: /unified/9.2.1: resolution: {integrity: sha512-juWjuI8Z4xFg8pJbnEZ41b5xjGUWGHqXALmBZ3FC3WX0PIx1CZBIIJ6mXbYMcf6Yw4Fi0rFUTA1cdz/BglbOhA==} dependencies: + '@types/unist': 2.0.3 bail: 1.0.4 extend: 3.0.2 is-buffer: 2.0.4 @@ -21380,7 +21381,7 @@ packages: dev: true /upper-case-first/1.1.2: - resolution: {integrity: sha1-XXm+3P8UQZUY/S7bCgUHybaFkRU=} + resolution: {integrity: sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ==} dependencies: upper-case: 1.1.3 dev: true @@ -21392,7 +21393,7 @@ packages: dev: true /upper-case/1.1.3: - resolution: {integrity: sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=} + resolution: {integrity: sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==} dev: true /upper-case/2.0.2: @@ -21532,7 +21533,7 @@ packages: dev: true /verror/1.10.0: - resolution: {integrity: sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=} + resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==} engines: {'0': node >=0.6.0} dependencies: assert-plus: 1.0.0 @@ -22015,7 +22016,7 @@ packages: dev: true /x-is-string/0.1.0: - resolution: {integrity: sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI=} + resolution: {integrity: sha512-GojqklwG8gpzOVEVki5KudKNoq7MbbjYZCbyWzEz7tyPA7eleiE0+ePwOWQQRb5fm86rD3S8Tc0tSFf3AOv50w==} dev: true /xdg-basedir/3.0.0: