create project

This commit is contained in:
ismailsosic
2022-12-27 12:05:56 +01:00
parent 2a33a2d3de
commit cd2143287c
16035 changed files with 2489703 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
declare const AbortControllerConstructor: typeof AbortController
declare const DOMExceptionConstructor: typeof DOMException
declare var AbortSignal: {
prototype: typeof AbortSignal
new (): typeof AbortSignal
/** Returns an AbortSignal instance which will be aborted in milliseconds milliseconds. Its abort reason will be set to a "TimeoutError" DOMException. */
timeout(milliseconds: number): AbortSignal
/** Returns an AbortSignal instance whose abort reason is set to reason if not undefined; otherwise to an "AbortError" DOMException. */
abort(reason?: string): AbortSignal
}
export { AbortControllerConstructor as AbortController, AbortSignal, DOMExceptionConstructor as DOMException };

View File

@@ -0,0 +1,127 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/primitives/abort-controller.js
var abort_controller_exports = {};
__export(abort_controller_exports, {
AbortController: () => AbortController,
AbortSignal: () => AbortSignal,
DOMException: () => DOMException
});
module.exports = __toCommonJS(abort_controller_exports);
var import_events = require("./events");
var kSignal = Symbol("kSignal");
var kAborted = Symbol("kAborted");
var kReason = Symbol("kReason");
var kName = Symbol("kName");
var kOnabort = Symbol("kOnabort");
var DOMException = class extends Error {
constructor(message, name) {
super(message);
this[kName] = name;
}
get name() {
return this[kName];
}
};
__name(DOMException, "DOMException");
function createAbortSignal() {
const signal = new import_events.EventTarget();
Object.setPrototypeOf(signal, AbortSignal.prototype);
signal[kAborted] = false;
signal[kReason] = void 0;
signal[kOnabort] = void 0;
return signal;
}
__name(createAbortSignal, "createAbortSignal");
function abortSignalAbort(signal, reason) {
if (typeof reason === "undefined") {
reason = new DOMException("The operation was aborted.", "AbortError");
}
if (signal.aborted) {
return;
}
signal[kReason] = reason;
signal[kAborted] = true;
signal.dispatchEvent(new import_events.Event("abort"));
}
__name(abortSignalAbort, "abortSignalAbort");
var AbortController = class {
constructor() {
this[kSignal] = createAbortSignal();
}
get signal() {
return this[kSignal];
}
abort(reason) {
abortSignalAbort(this.signal, reason);
}
};
__name(AbortController, "AbortController");
var AbortSignal = class extends import_events.EventTarget {
constructor() {
throw new TypeError("Illegal constructor.");
}
get aborted() {
return this[kAborted];
}
get reason() {
return this[kReason];
}
get onabort() {
return this[kOnabort];
}
set onabort(value) {
if (this[kOnabort]) {
this.removeEventListener("abort", this[kOnabort]);
}
if (value) {
this[kOnabort] = value;
this.addEventListener("abort", this[kOnabort]);
}
}
throwIfAborted() {
if (this[kAborted]) {
throw this[kReason];
}
}
static abort(reason) {
const signal = createAbortSignal();
abortSignalAbort(signal, reason);
return signal;
}
static timeout(milliseconds) {
const signal = createAbortSignal();
setTimeout(() => {
abortSignalAbort(
signal,
new DOMException("The operation timed out.", "TimeoutError")
);
}, milliseconds);
return signal;
}
};
__name(AbortSignal, "AbortSignal");
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
AbortController,
AbortSignal,
DOMException
});

View File

@@ -0,0 +1 @@
{"main":"../abort-controller.js","types":"../abort-controller.d.ts"}

View File

@@ -0,0 +1,3 @@
declare const BlobConstructor: typeof Blob
export { BlobConstructor as Blob };

View File

@@ -0,0 +1,617 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __esm = (fn, res) => function __init() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// <define:process>
var init_define_process = __esm({
"<define:process>"() {
}
});
// ../../node_modules/.pnpm/blob-polyfill@7.0.20220408/node_modules/blob-polyfill/Blob.js
var require_Blob = __commonJS({
"../../node_modules/.pnpm/blob-polyfill@7.0.20220408/node_modules/blob-polyfill/Blob.js"(exports) {
init_define_process();
(() => {
try {
global.Blob = void 0;
} catch {
}
})();
(function(global2) {
(function(factory) {
if (typeof define === "function" && define.amd) {
define(["exports"], factory);
} else if (typeof exports === "object" && typeof exports.nodeName !== "string") {
factory(exports);
} else {
factory(global2);
}
})(function(exports2) {
"use strict";
var BlobBuilder = global2.BlobBuilder || global2.WebKitBlobBuilder || global2.MSBlobBuilder || global2.MozBlobBuilder;
var URL = global2.URL || global2.webkitURL || function(href, a) {
a = document.createElement("a");
a.href = href;
return a;
};
var origBlob = global2.Blob;
var createObjectURL = URL.createObjectURL;
var revokeObjectURL = URL.revokeObjectURL;
var strTag = global2.Symbol && global2.Symbol.toStringTag;
var blobSupported = false;
var blobSupportsArrayBufferView = false;
var blobBuilderSupported = BlobBuilder && BlobBuilder.prototype.append && BlobBuilder.prototype.getBlob;
try {
blobSupported = new Blob(["\xE4"]).size === 2;
blobSupportsArrayBufferView = new Blob([new Uint8Array([1, 2])]).size === 2;
} catch (e) {
}
function mapArrayBufferViews(ary) {
return ary.map(function(chunk) {
if (chunk.buffer instanceof ArrayBuffer) {
var buf = chunk.buffer;
if (chunk.byteLength !== buf.byteLength) {
var copy = new Uint8Array(chunk.byteLength);
copy.set(new Uint8Array(buf, chunk.byteOffset, chunk.byteLength));
buf = copy.buffer;
}
return buf;
}
return chunk;
});
}
__name(mapArrayBufferViews, "mapArrayBufferViews");
function BlobBuilderConstructor(ary, options) {
options = options || {};
var bb = new BlobBuilder();
mapArrayBufferViews(ary).forEach(function(part) {
bb.append(part);
});
return options.type ? bb.getBlob(options.type) : bb.getBlob();
}
__name(BlobBuilderConstructor, "BlobBuilderConstructor");
function BlobConstructor(ary, options) {
return new origBlob(mapArrayBufferViews(ary), options || {});
}
__name(BlobConstructor, "BlobConstructor");
if (global2.Blob) {
BlobBuilderConstructor.prototype = Blob.prototype;
BlobConstructor.prototype = Blob.prototype;
}
function stringEncode(string) {
var pos = 0;
var len = string.length;
var Arr = global2.Uint8Array || Array;
var at = 0;
var tlen = Math.max(32, len + (len >> 1) + 7);
var target = new Arr(tlen >> 3 << 3);
while (pos < len) {
var value = string.charCodeAt(pos++);
if (value >= 55296 && value <= 56319) {
if (pos < len) {
var extra = string.charCodeAt(pos);
if ((extra & 64512) === 56320) {
++pos;
value = ((value & 1023) << 10) + (extra & 1023) + 65536;
}
}
if (value >= 55296 && value <= 56319) {
continue;
}
}
if (at + 4 > target.length) {
tlen += 8;
tlen *= 1 + pos / string.length * 2;
tlen = tlen >> 3 << 3;
var update = new Uint8Array(tlen);
update.set(target);
target = update;
}
if ((value & 4294967168) === 0) {
target[at++] = value;
continue;
} else if ((value & 4294965248) === 0) {
target[at++] = value >> 6 & 31 | 192;
} else if ((value & 4294901760) === 0) {
target[at++] = value >> 12 & 15 | 224;
target[at++] = value >> 6 & 63 | 128;
} else if ((value & 4292870144) === 0) {
target[at++] = value >> 18 & 7 | 240;
target[at++] = value >> 12 & 63 | 128;
target[at++] = value >> 6 & 63 | 128;
} else {
continue;
}
target[at++] = value & 63 | 128;
}
return target.slice(0, at);
}
__name(stringEncode, "stringEncode");
function stringDecode(buf) {
var end = buf.length;
var res = [];
var i = 0;
while (i < end) {
var firstByte = buf[i];
var codePoint = null;
var bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;
if (i + bytesPerSequence <= end) {
var secondByte, thirdByte, fourthByte, tempCodePoint;
switch (bytesPerSequence) {
case 1:
if (firstByte < 128) {
codePoint = firstByte;
}
break;
case 2:
secondByte = buf[i + 1];
if ((secondByte & 192) === 128) {
tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;
if (tempCodePoint > 127) {
codePoint = tempCodePoint;
}
}
break;
case 3:
secondByte = buf[i + 1];
thirdByte = buf[i + 2];
if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {
tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;
if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {
codePoint = tempCodePoint;
}
}
break;
case 4:
secondByte = buf[i + 1];
thirdByte = buf[i + 2];
fourthByte = buf[i + 3];
if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {
tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;
if (tempCodePoint > 65535 && tempCodePoint < 1114112) {
codePoint = tempCodePoint;
}
}
}
}
if (codePoint === null) {
codePoint = 65533;
bytesPerSequence = 1;
} else if (codePoint > 65535) {
codePoint -= 65536;
res.push(codePoint >>> 10 & 1023 | 55296);
codePoint = 56320 | codePoint & 1023;
}
res.push(codePoint);
i += bytesPerSequence;
}
var len = res.length;
var str = "";
var j = 0;
while (j < len) {
str += String.fromCharCode.apply(String, res.slice(j, j += 4096));
}
return str;
}
__name(stringDecode, "stringDecode");
var textEncode = typeof TextEncoder === "function" ? TextEncoder.prototype.encode.bind(new TextEncoder()) : stringEncode;
var textDecode = typeof TextDecoder === "function" ? TextDecoder.prototype.decode.bind(new TextDecoder()) : stringDecode;
function FakeBlobBuilder() {
function bufferClone(buf) {
var view = new Array(buf.byteLength);
var array = new Uint8Array(buf);
var i = view.length;
while (i--) {
view[i] = array[i];
}
return view;
}
__name(bufferClone, "bufferClone");
function array2base64(input) {
var byteToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
var output = [];
for (var i = 0; i < input.length; i += 3) {
var byte1 = input[i];
var haveByte2 = i + 1 < input.length;
var byte2 = haveByte2 ? input[i + 1] : 0;
var haveByte3 = i + 2 < input.length;
var byte3 = haveByte3 ? input[i + 2] : 0;
var outByte1 = byte1 >> 2;
var outByte2 = (byte1 & 3) << 4 | byte2 >> 4;
var outByte3 = (byte2 & 15) << 2 | byte3 >> 6;
var outByte4 = byte3 & 63;
if (!haveByte3) {
outByte4 = 64;
if (!haveByte2) {
outByte3 = 64;
}
}
output.push(
byteToCharMap[outByte1],
byteToCharMap[outByte2],
byteToCharMap[outByte3],
byteToCharMap[outByte4]
);
}
return output.join("");
}
__name(array2base64, "array2base64");
var create = Object.create || function(a) {
function c() {
}
__name(c, "c");
c.prototype = a;
return new c();
};
function getObjectTypeName(o) {
return Object.prototype.toString.call(o).slice(8, -1);
}
__name(getObjectTypeName, "getObjectTypeName");
function isPrototypeOf(c, o) {
return typeof c === "object" && Object.prototype.isPrototypeOf.call(c.prototype, o);
}
__name(isPrototypeOf, "isPrototypeOf");
function isDataView(o) {
return getObjectTypeName(o) === "DataView" || isPrototypeOf(global2.DataView, o);
}
__name(isDataView, "isDataView");
var arrayBufferClassNames = [
"Int8Array",
"Uint8Array",
"Uint8ClampedArray",
"Int16Array",
"Uint16Array",
"Int32Array",
"Uint32Array",
"Float32Array",
"Float64Array",
"ArrayBuffer"
];
function includes(a, v) {
return a.indexOf(v) !== -1;
}
__name(includes, "includes");
function isArrayBuffer(o) {
return includes(arrayBufferClassNames, getObjectTypeName(o)) || isPrototypeOf(global2.ArrayBuffer, o);
}
__name(isArrayBuffer, "isArrayBuffer");
function concatTypedarrays(chunks) {
var size = 0;
var j = chunks.length;
while (j--) {
size += chunks[j].length;
}
var b = new Uint8Array(size);
var offset = 0;
for (var i = 0; i < chunks.length; i++) {
var chunk = chunks[i];
b.set(chunk, offset);
offset += chunk.byteLength || chunk.length;
}
return b;
}
__name(concatTypedarrays, "concatTypedarrays");
function Blob3(chunks, opts) {
chunks = chunks ? chunks.slice() : [];
opts = opts == null ? {} : opts;
for (var i = 0, len = chunks.length; i < len; i++) {
var chunk = chunks[i];
if (chunk instanceof Blob3) {
chunks[i] = chunk._buffer;
} else if (typeof chunk === "string") {
chunks[i] = textEncode(chunk);
} else if (isDataView(chunk)) {
chunks[i] = bufferClone(chunk.buffer);
} else if (isArrayBuffer(chunk)) {
chunks[i] = bufferClone(chunk);
} else {
chunks[i] = textEncode(String(chunk));
}
}
this._buffer = global2.Uint8Array ? concatTypedarrays(chunks) : [].concat.apply([], chunks);
this.size = this._buffer.length;
this.type = opts.type || "";
if (/[^\u0020-\u007E]/.test(this.type)) {
this.type = "";
} else {
this.type = this.type.toLowerCase();
}
}
__name(Blob3, "Blob");
Blob3.prototype.arrayBuffer = function() {
return Promise.resolve(this._buffer.buffer || this._buffer);
};
Blob3.prototype.text = function() {
return Promise.resolve(textDecode(this._buffer));
};
Blob3.prototype.slice = function(start, end, type) {
var slice = this._buffer.slice(start || 0, end || this._buffer.length);
return new Blob3([slice], { type });
};
Blob3.prototype.toString = function() {
return "[object Blob]";
};
function File2(chunks, name, opts) {
opts = opts || {};
var a = Blob3.call(this, chunks, opts) || this;
a.name = name.replace(/\//g, ":");
a.lastModifiedDate = opts.lastModified ? new Date(opts.lastModified) : new Date();
a.lastModified = +a.lastModifiedDate;
return a;
}
__name(File2, "File");
File2.prototype = create(Blob3.prototype);
File2.prototype.constructor = File2;
if (Object.setPrototypeOf) {
Object.setPrototypeOf(File2, Blob3);
} else {
try {
File2.__proto__ = Blob3;
} catch (e) {
}
}
File2.prototype.toString = function() {
return "[object File]";
};
function FileReader2() {
if (!(this instanceof FileReader2)) {
throw new TypeError("Failed to construct 'FileReader': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");
}
var delegate = document.createDocumentFragment();
this.addEventListener = delegate.addEventListener;
this.dispatchEvent = function(evt) {
var local = this["on" + evt.type];
if (typeof local === "function")
local(evt);
delegate.dispatchEvent(evt);
};
this.removeEventListener = delegate.removeEventListener;
}
__name(FileReader2, "FileReader");
function _read(fr, blob2, kind) {
if (!(blob2 instanceof Blob3)) {
throw new TypeError("Failed to execute '" + kind + "' on 'FileReader': parameter 1 is not of type 'Blob'.");
}
fr.result = "";
setTimeout(function() {
this.readyState = FileReader2.LOADING;
fr.dispatchEvent(new Event("load"));
fr.dispatchEvent(new Event("loadend"));
});
}
__name(_read, "_read");
FileReader2.EMPTY = 0;
FileReader2.LOADING = 1;
FileReader2.DONE = 2;
FileReader2.prototype.error = null;
FileReader2.prototype.onabort = null;
FileReader2.prototype.onerror = null;
FileReader2.prototype.onload = null;
FileReader2.prototype.onloadend = null;
FileReader2.prototype.onloadstart = null;
FileReader2.prototype.onprogress = null;
FileReader2.prototype.readAsDataURL = function(blob2) {
_read(this, blob2, "readAsDataURL");
this.result = "data:" + blob2.type + ";base64," + array2base64(blob2._buffer);
};
FileReader2.prototype.readAsText = function(blob2) {
_read(this, blob2, "readAsText");
this.result = textDecode(blob2._buffer);
};
FileReader2.prototype.readAsArrayBuffer = function(blob2) {
_read(this, blob2, "readAsText");
this.result = (blob2._buffer.buffer || blob2._buffer).slice();
};
FileReader2.prototype.abort = function() {
};
URL.createObjectURL = function(blob2) {
return blob2 instanceof Blob3 ? "data:" + blob2.type + ";base64," + array2base64(blob2._buffer) : createObjectURL.call(URL, blob2);
};
URL.revokeObjectURL = function(url) {
revokeObjectURL && revokeObjectURL.call(URL, url);
};
var _send = global2.XMLHttpRequest && global2.XMLHttpRequest.prototype.send;
if (_send) {
XMLHttpRequest.prototype.send = function(data) {
if (data instanceof Blob3) {
this.setRequestHeader("Content-Type", data.type);
_send.call(this, textDecode(data._buffer));
} else {
_send.call(this, data);
}
};
}
exports2.Blob = Blob3;
exports2.File = File2;
exports2.FileReader = FileReader2;
exports2.URL = URL;
}
__name(FakeBlobBuilder, "FakeBlobBuilder");
function fixFileAndXHR() {
var isIE = !!global2.ActiveXObject || "-ms-scroll-limit" in document.documentElement.style && "-ms-ime-align" in document.documentElement.style;
var _send = global2.XMLHttpRequest && global2.XMLHttpRequest.prototype.send;
if (isIE && _send) {
XMLHttpRequest.prototype.send = function(data) {
if (data instanceof Blob) {
this.setRequestHeader("Content-Type", data.type);
_send.call(this, data);
} else {
_send.call(this, data);
}
};
}
try {
new File([], "");
exports2.File = global2.File;
exports2.FileReader = global2.FileReader;
} catch (e) {
try {
exports2.File = new Function(
'class File extends Blob {constructor(chunks, name, opts) {opts = opts || {};super(chunks, opts || {});this.name = name.replace(/\\//g, ":");this.lastModifiedDate = opts.lastModified ? new Date(opts.lastModified) : new Date();this.lastModified = +this.lastModifiedDate;}};return new File([], ""), File'
)();
} catch (e2) {
exports2.File = function(b, d, c) {
var blob2 = new Blob(b, c);
var t = c && void 0 !== c.lastModified ? new Date(c.lastModified) : new Date();
blob2.name = d.replace(/\//g, ":");
blob2.lastModifiedDate = t;
blob2.lastModified = +t;
blob2.toString = function() {
return "[object File]";
};
if (strTag) {
blob2[strTag] = "File";
}
return blob2;
};
}
}
}
__name(fixFileAndXHR, "fixFileAndXHR");
if (blobSupported) {
fixFileAndXHR();
exports2.Blob = blobSupportsArrayBufferView ? global2.Blob : BlobConstructor;
} else if (blobBuilderSupported) {
fixFileAndXHR();
exports2.Blob = BlobBuilderConstructor;
} else {
FakeBlobBuilder();
}
if (strTag) {
if (!exports2.File.prototype[strTag])
exports2.File.prototype[strTag] = "File";
if (!exports2.Blob.prototype[strTag])
exports2.Blob.prototype[strTag] = "Blob";
if (!exports2.FileReader.prototype[strTag])
exports2.FileReader.prototype[strTag] = "FileReader";
}
var blob = exports2.Blob.prototype;
var stream;
try {
new ReadableStream({ type: "bytes" });
stream = /* @__PURE__ */ __name(function stream2() {
var position = 0;
var blob2 = this;
return new ReadableStream({
type: "bytes",
autoAllocateChunkSize: 524288,
pull: function(controller) {
var v = controller.byobRequest.view;
var chunk = blob2.slice(position, position + v.byteLength);
return chunk.arrayBuffer().then(function(buffer) {
var uint8array = new Uint8Array(buffer);
var bytesRead = uint8array.byteLength;
position += bytesRead;
v.set(uint8array);
controller.byobRequest.respond(bytesRead);
if (position >= blob2.size)
controller.close();
});
}
});
}, "stream");
} catch (e) {
try {
new ReadableStream({});
stream = /* @__PURE__ */ __name(function stream2(blob2) {
var position = 0;
return new ReadableStream({
pull: function(controller) {
var chunk = blob2.slice(position, position + 524288);
return chunk.arrayBuffer().then(function(buffer) {
position += buffer.byteLength;
var uint8array = new Uint8Array(buffer);
controller.enqueue(uint8array);
if (position == blob2.size)
controller.close();
});
}
});
}, "stream");
} catch (e2) {
try {
new Response("").body.getReader().read();
stream = /* @__PURE__ */ __name(function stream2() {
return new Response(this).body;
}, "stream");
} catch (e3) {
stream = /* @__PURE__ */ __name(function stream2() {
throw new Error("Include https://github.com/MattiasBuelens/web-streams-polyfill");
}, "stream");
}
}
}
function promisify(obj) {
return new Promise(function(resolve, reject) {
obj.onload = obj.onerror = function(evt) {
obj.onload = obj.onerror = null;
evt.type === "load" ? resolve(obj.result || obj) : reject(new Error("Failed to read the blob/file"));
};
});
}
__name(promisify, "promisify");
if (!blob.arrayBuffer) {
blob.arrayBuffer = /* @__PURE__ */ __name(function arrayBuffer() {
var fr = new FileReader();
fr.readAsArrayBuffer(this);
return promisify(fr);
}, "arrayBuffer");
}
if (!blob.text) {
blob.text = /* @__PURE__ */ __name(function text() {
var fr = new FileReader();
fr.readAsText(this);
return promisify(fr);
}, "text");
}
if (!blob.stream) {
blob.stream = stream;
}
});
})(
typeof self !== "undefined" && self || typeof window !== "undefined" && window || typeof global !== "undefined" && global || exports
);
}
});
// src/primitives/blob.js
var blob_exports = {};
__export(blob_exports, {
Blob: () => import_blob_polyfill.Blob
});
module.exports = __toCommonJS(blob_exports);
init_define_process();
var import_blob_polyfill = __toESM(require_Blob());
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Blob
});

View File

@@ -0,0 +1 @@
{"main":"../blob.js","types":"../blob.d.ts"}

View File

@@ -0,0 +1,14 @@
declare function createCaches():
| undefined
| {
cacheStorage: () => CacheStorage
Cache: typeof Cache
CacheStorage: typeof CacheStorage
}
declare const caches: CacheStorage
declare const CacheStorageConstructor: typeof CacheStorage
declare const CacheConstructor: typeof Cache
export { CacheConstructor as Cache, CacheStorageConstructor as CacheStorage, caches, createCaches };

View File

@@ -0,0 +1,170 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/primitives/cache.js
var cache_exports = {};
__export(cache_exports, {
Cache: () => Cache,
CacheStorage: () => CacheStorage,
caches: () => caches,
createCaches: () => createCaches
});
module.exports = __toCommonJS(cache_exports);
var import_fetch = require("./fetch");
function createCaches() {
const getKey = /* @__PURE__ */ __name((request) => new URL(request.url).toString(), "getKey");
const normalizeRequest = /* @__PURE__ */ __name((input, { invokeName }) => {
if (typeof proxy === "object" && proxy.__normalized__)
return input;
const request = input instanceof import_fetch.Request ? input : new import_fetch.Request(input);
if (request.method !== "GET") {
throw new TypeError(
`Failed to execute '${invokeName}' on 'Cache': Request method '${request.method}' is unsupported`
);
}
if (!request.url.startsWith("http")) {
throw new TypeError(
`Failed to execute '${invokeName}' on 'Cache': Request scheme '${request.url.split(":")[0]}' is unsupported`
);
}
Object.defineProperty(request, "__normalized__", {
enumerable: false,
writable: false,
value: true
});
return request;
}, "normalizeRequest");
class Cache2 {
constructor(Storage = Map) {
Object.defineProperty(this, "store", {
enumerable: false,
writable: false,
value: new Storage()
});
}
async add(request) {
const response = await (0, import_fetch.fetch)(
normalizeRequest(request, { invokeName: "add" })
);
if (!response.ok) {
throw new TypeError(
"Failed to execute 'add' on 'Cache': Request failed"
);
}
return this.put(request, response);
}
async addAll(requests) {
await Promise.all(requests.map((request) => this.add(request)));
}
async match(request) {
const key = getKey(normalizeRequest(request, { invokeName: "match" }));
const cached = this.store.get(key);
return cached ? new import_fetch.Response(cached.body, cached.init) : void 0;
}
async delete(request) {
const key = getKey(normalizeRequest(request, { invokeName: "delete" }));
return this.store.delete(key);
}
async put(request, response) {
if (response.status === 206) {
throw new TypeError(
"Failed to execute 'put' on 'Cache': Partial response (status code 206) is unsupported"
);
}
const vary = response.headers.get("vary");
if (vary !== null && vary.includes("*")) {
throw new TypeError(
"Failed to execute 'put' on 'Cache': Vary header contains *"
);
}
request = normalizeRequest(request, { invokeName: "put" });
try {
this.store.set(getKey(request), {
body: new Uint8Array(await response.arrayBuffer()),
init: {
status: response.status,
headers: [...response.headers]
}
});
} catch (error) {
if (error.message === "disturbed") {
throw new TypeError("The body has already been consumed.");
}
throw error;
}
}
}
__name(Cache2, "Cache");
const cacheStorage = /* @__PURE__ */ __name((Storage = Map) => {
const caches2 = new Storage();
const open = /* @__PURE__ */ __name(async (cacheName) => {
let cache = caches2.get(cacheName);
if (cache === void 0) {
cache = new Cache2(Storage);
caches2.set(cacheName, cache);
}
return cache;
}, "open");
const has = /* @__PURE__ */ __name((cacheName) => Promise.resolve(caches2.has(cacheName)), "has");
const keys = /* @__PURE__ */ __name(() => Promise.resolve(caches2.keys()), "keys");
const _delete = /* @__PURE__ */ __name((cacheName) => Promise.resolve(caches2.delete(cacheName)), "_delete");
const match = /* @__PURE__ */ __name(async (request, options) => {
for (const cache of caches2.values()) {
const cached = await cache.match(request, options);
if (cached !== void 0)
return cached;
}
}, "match");
return {
open,
has,
keys,
delete: _delete,
match
};
}, "cacheStorage");
return { Cache: Cache2, cacheStorage };
}
__name(createCaches, "createCaches");
function Cache() {
if (!(this instanceof Cache))
return new Cache();
throw TypeError("Illegal constructor");
}
__name(Cache, "Cache");
function CacheStorage() {
if (!(this instanceof CacheStorage))
return new CacheStorage();
throw TypeError("Illegal constructor");
}
__name(CacheStorage, "CacheStorage");
var caches = (() => {
const { cacheStorage } = createCaches();
const caches2 = cacheStorage();
caches2.open("default");
return caches2;
})();
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Cache,
CacheStorage,
caches,
createCaches
});

View File

@@ -0,0 +1 @@
{"main":"../cache.js","types":"../cache.d.ts"}

View File

@@ -0,0 +1,18 @@
interface IConsole {
assert: Console['assert']
count: Console['count']
debug: Console['debug']
dir: Console['dir']
error: Console['error']
info: Console['info']
log: Console['log']
time: Console['time']
timeEnd: Console['timeEnd']
timeLog: Console['timeLog']
trace: Console['trace']
warn: Console['warn']
}
declare const console: IConsole
export { console };

View File

@@ -0,0 +1,596 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __esm = (fn, res) => function __init() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// <define:process>
var init_define_process = __esm({
"<define:process>"() {
}
});
// ../format/dist/index.js
var require_dist = __commonJS({
"../format/dist/index.js"(exports, module2) {
"use strict";
init_define_process();
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) => {
var _a;
return (_a = object.constructor) == null ? void 0 : _a.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");
}
if (opts.formatError === void 0) {
opts.formatError = (error2) => `[${Error.prototype.toString.call(error2)}]`;
}
const { formatError, customInspectSymbol } = opts;
function format2(...args) {
const [firstArg] = args;
if (!kind(firstArg, "string")) {
if (hasCustomSymbol(firstArg, customInspectSymbol)) {
return format2(firstArg[customInspectSymbol]());
} else {
return args.map((item) => inspect(item, { customInspectSymbol })).join(" ");
}
}
let index = 1;
let str = String(firstArg).replace(/%[sjdOoif%]/g, (token) => {
if (token === "%%")
return "%";
if (index >= args.length)
return token;
switch (token) {
case "%s": {
const arg = args[index++];
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": {
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":
return inspect(args[index++], {
customInspectSymbol,
showHidden: true,
depth: 4
});
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:
return token;
}
});
for (let arg = args[index]; index < args.length; arg = args[++index]) {
if (arg === null || !kind(arg, "object")) {
str += " " + arg;
} else {
str += " " + inspect(arg);
}
}
return str;
}
__name(format2, "format");
function formatValue(ctx, value, recurseTimes) {
if (hasCustomSymbol(value, customInspectSymbol)) {
return format2(value[customInspectSymbol]());
}
const formattedPrimitive = formatPrimitive(value);
if (formattedPrimitive !== void 0) {
return formattedPrimitive;
}
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}]`;
}
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;
}
}
if (noIterator) {
keys = getKeys(value, ctx.showHidden);
braces = ["{", "}"];
if (constructor === void 0) {
if (keys.length === 0) {
return `[Object: null prototype] {}`;
}
} else if (constructor === "Object") {
if (keys.length === 0) {
return `{}`;
}
} else if (kind(value, "function")) {
base = `[Function${value.name ? ": " + value.name : ""}]`;
if (keys.length === 0) {
return base;
}
} else if (isRegExp(value)) {
base = RegExp.prototype.toString.call(value);
if (keys.length === 0) {
return base;
}
base = " " + base;
} else if (isDate(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)) {
base = formatError(value);
if (keys.length === 0) {
return base;
}
base = " " + base;
} else if (hasCustomSymbol(value, ctx.customInspectSymbol)) {
base = format2(value[ctx.customInspectSymbol]());
if (keys.length === 0) {
return base;
}
base = " " + base;
} else {
braces[0] = `${getPrefix(constructor)}{`;
}
}
if (recurseTimes && recurseTimes < 0) {
return isRegExp(value) ? RegExp.prototype.toString.call(value) : "[Object]";
}
ctx.seen.push(value);
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 = `<ref *${index}>`;
base = base === "" ? reference : `${reference} ${base}`;
}
}
ctx.seen.pop();
return reduceToSingleString(output, base, braces);
}
__name(formatRaw, "formatRaw");
function inspect(value, opts2) {
opts2 = Object.assign({ seen: [], depth: 2 }, opts2);
return formatValue(opts2, value, opts2.depth);
}
__name(inspect, "inspect");
function formatProperty(ctx, value, recurseTimes, visibleKeys, key, isArray) {
let name;
let str;
const desc = Object.getOwnPropertyDescriptor(value, key) || {
value: value[key]
};
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 (isArray) {
return str;
}
if (kind(key, "symbol")) {
name = `[${SymbolPrototypeToString.call(key)}]`;
} else if (!visibleKeys.has(key)) {
name = "[" + key + "]";
} else {
name = key;
}
return `${name}: ${str}`;
}
__name(formatProperty, "formatProperty");
function formatArray(ctx, value, recurseTimes, visibleKeys) {
const output = [];
for (let index = 0; index < value.length; ++index) {
if (Object.prototype.hasOwnProperty.call(value, String(index))) {
output.push(
formatProperty(
ctx,
value,
recurseTimes,
visibleKeys,
String(index),
true
)
);
} else {
output.push("");
}
}
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);
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");
var formatBigInt = /* @__PURE__ */ __name((bigint) => `${bigint}n`, "formatBigInt");
function formatPrimitive(value) {
if (value === null)
return "null";
if (value === void 0)
return "undefined";
if (kind(value, "string")) {
return `'${JSON.stringify(value).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"')}'`;
}
if (kind(value, "boolean"))
return "" + value;
if (kind(value, "number"))
return "" + value;
if (kind(value, "bigint"))
return formatBigInt(value);
if (kind(value, "symbol"))
return value.toString();
}
__name(formatPrimitive, "formatPrimitive");
function hasCustomSymbol(value, customInspectSymbol) {
return value !== null && kind(value, "object") && customInspectSymbol in value && kind(value[customInspectSymbol], "function");
}
__name(hasCustomSymbol, "hasCustomSymbol");
function isRegExp(value) {
return kind(value, "object") && Object.prototype.toString.call(value) === "[object RegExp]";
}
__name(isRegExp, "isRegExp");
function isDate(value) {
return kind(value, "object") && Object.prototype.toString.call(value) === "[object Date]";
}
__name(isDate, "isDate");
function isError(value) {
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) {
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];
}
return ((base ? base + " " : "") + braces[0] + " " + output.join(", ") + " " + braces[1]).trim();
}
__name(reduceToSingleString, "reduceToSingleString");
function safeStringify(input) {
if (Array.isArray(input)) {
input = input.map(
(element) => JSON.parse(JSON.stringify(element, makeCircularReplacer()))
);
}
return JSON.stringify(input, makeCircularReplacer());
}
__name(safeStringify, "safeStringify");
function makeCircularReplacer() {
const seen = /* @__PURE__ */ new WeakSet();
return (key, value) => {
if (value !== null && kind(value, "object")) {
if (seen.has(value))
return "[Circular]";
seen.add(value);
}
return value;
};
}
__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");
}
});
// src/primitives/console.js
var console_exports = {};
__export(console_exports, {
console: () => konsole
});
module.exports = __toCommonJS(console_exports);
init_define_process();
var import_format = __toESM(require_dist());
var format = (0, import_format.createFormat)();
var bareError = console.error.bind(console);
var bareLog = console.log.bind(console);
var assert = console.assert.bind(console);
var time = console.time.bind(console);
var timeEnd = console.timeEnd.bind(console);
var timeLog = console.timeLog.bind(console);
var trace = console.trace.bind(console);
var error = /* @__PURE__ */ __name((...args) => bareError(format(...args)), "error");
var log = /* @__PURE__ */ __name((...args) => bareLog(format(...args)), "log");
var konsole = {
assert: (assertion, ...args) => assert(assertion, format(...args)),
count: console.count.bind(console),
debug: log,
dir: console.dir.bind(console),
error,
info: log,
log,
time: (...args) => time(format(...args)),
timeEnd: (...args) => timeEnd(format(...args)),
timeLog,
trace,
warn: error
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
console
});

View File

@@ -0,0 +1 @@
{"main":"../console.js","types":"../console.d.ts"}

View File

@@ -0,0 +1,7 @@
declare const crypto: Crypto
declare const CryptoConstructor: typeof Crypto
declare const CryptoKeyConstructor: typeof CryptoKey
declare const SubtleCryptoConstructor: typeof SubtleCrypto
export { CryptoConstructor as Crypto, CryptoKeyConstructor as CryptoKey, SubtleCryptoConstructor as SubtleCrypto, crypto };

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
{"main":"../crypto.js","types":"../crypto.d.ts"}

View File

@@ -0,0 +1,8 @@
declare const TextEncoderConstructor: typeof TextEncoder
declare const TextDecoderConstructor: typeof TextDecoder
declare const atob: (encoded: string) => string
declare const btoa: (str: string) => string
export { TextDecoderConstructor as TextDecoder, TextEncoderConstructor as TextEncoder, atob, btoa };

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"main":"../encoding.js","types":"../encoding.d.ts"}

View File

@@ -0,0 +1,322 @@
/**
* An implementation of the `EventTarget` interface.
* @see https://dom.spec.whatwg.org/#eventtarget
*/
declare class EventTarget<TEventMap extends Record<string, Event$1> = Record<string, Event$1>, TMode extends "standard" | "strict" = "standard"> {
/**
* Initialize this instance.
*/
constructor();
/**
* Add an event listener.
* @param type The event type.
* @param callback The event listener.
* @param options Options.
*/
addEventListener<T extends string & keyof TEventMap>(type: T, callback?: EventTarget.EventListener<this, TEventMap[T]> | null, options?: EventTarget.AddOptions): void;
/**
* Add an event listener.
* @param type The event type.
* @param callback The event listener.
* @param options Options.
*/
addEventListener(type: string, callback?: EventTarget.FallbackEventListener<this, TMode>, options?: EventTarget.AddOptions): void;
/**
* Add an event listener.
* @param type The event type.
* @param callback The event listener.
* @param capture The capture flag.
* @deprecated Use `{capture: boolean}` object instead of a boolean value.
*/
addEventListener<T extends string & keyof TEventMap>(type: T, callback: EventTarget.EventListener<this, TEventMap[T]> | null | undefined, capture: boolean): void;
/**
* Add an event listener.
* @param type The event type.
* @param callback The event listener.
* @param capture The capture flag.
* @deprecated Use `{capture: boolean}` object instead of a boolean value.
*/
addEventListener(type: string, callback: EventTarget.FallbackEventListener<this, TMode>, capture: boolean): void;
/**
* Remove an added event listener.
* @param type The event type.
* @param callback The event listener.
* @param options Options.
*/
removeEventListener<T extends string & keyof TEventMap>(type: T, callback?: EventTarget.EventListener<this, TEventMap[T]> | null, options?: EventTarget.Options): void;
/**
* Remove an added event listener.
* @param type The event type.
* @param callback The event listener.
* @param options Options.
*/
removeEventListener(type: string, callback?: EventTarget.FallbackEventListener<this, TMode>, options?: EventTarget.Options): void;
/**
* Remove an added event listener.
* @param type The event type.
* @param callback The event listener.
* @param capture The capture flag.
* @deprecated Use `{capture: boolean}` object instead of a boolean value.
*/
removeEventListener<T extends string & keyof TEventMap>(type: T, callback: EventTarget.EventListener<this, TEventMap[T]> | null | undefined, capture: boolean): void;
/**
* Remove an added event listener.
* @param type The event type.
* @param callback The event listener.
* @param capture The capture flag.
* @deprecated Use `{capture: boolean}` object instead of a boolean value.
*/
removeEventListener(type: string, callback: EventTarget.FallbackEventListener<this, TMode>, capture: boolean): void;
/**
* Dispatch an event.
* @param event The `Event` object to dispatch.
*/
dispatchEvent<T extends string & keyof TEventMap>(event: EventTarget.EventData<TEventMap, TMode, T>): boolean;
/**
* Dispatch an event.
* @param event The `Event` object to dispatch.
*/
dispatchEvent(event: EventTarget.FallbackEvent<TMode>): boolean;
}
declare namespace EventTarget {
/**
* The event listener.
*/
type EventListener<TEventTarget extends EventTarget<any, any>, TEvent extends Event$1> = CallbackFunction<TEventTarget, TEvent> | CallbackObject<TEvent>;
/**
* The event listener function.
*/
interface CallbackFunction<TEventTarget extends EventTarget<any, any>, TEvent extends Event$1> {
(this: TEventTarget, event: TEvent): void;
}
/**
* The event listener object.
* @see https://dom.spec.whatwg.org/#callbackdef-eventlistener
*/
interface CallbackObject<TEvent extends Event$1> {
handleEvent(event: TEvent): void;
}
/**
* The common options for both `addEventListener` and `removeEventListener` methods.
* @see https://dom.spec.whatwg.org/#dictdef-eventlisteneroptions
*/
interface Options {
capture?: boolean;
}
/**
* The options for the `addEventListener` methods.
* @see https://dom.spec.whatwg.org/#dictdef-addeventlisteneroptions
*/
interface AddOptions extends Options {
passive?: boolean;
once?: boolean;
signal?: AbortSignal | null | undefined;
}
/**
* The abort signal.
* @see https://dom.spec.whatwg.org/#abortsignal
*/
interface AbortSignal extends EventTarget<{
abort: Event$1;
}> {
readonly aborted: boolean;
onabort: CallbackFunction<this, Event$1> | null;
}
/**
* The event data to dispatch in strict mode.
*/
type EventData<TEventMap extends Record<string, Event$1>, TMode extends "standard" | "strict", TEventType extends string> = TMode extends "strict" ? IsValidEventMap<TEventMap> extends true ? ExplicitType<TEventType> & Omit<TEventMap[TEventType], keyof Event$1> & Partial<Omit<Event$1, "type">> : never : never;
/**
* Define explicit `type` property if `T` is a string literal.
* Otherwise, never.
*/
type ExplicitType<T extends string> = string extends T ? never : {
readonly type: T;
};
/**
* The event listener type in standard mode.
* Otherwise, never.
*/
type FallbackEventListener<TEventTarget extends EventTarget<any, any>, TMode extends "standard" | "strict"> = TMode extends "standard" ? EventListener<TEventTarget, Event$1> | null | undefined : never;
/**
* The event type in standard mode.
* Otherwise, never.
*/
type FallbackEvent<TMode extends "standard" | "strict"> = TMode extends "standard" ? Event$1 : never;
/**
* Check if given event map is valid.
* It's valid if the keys of the event map are narrower than `string`.
*/
type IsValidEventMap<T> = string extends keyof T ? false : true;
}
/**
* An implementation of `Event` interface, that wraps a given event object.
* `EventTarget` shim can control the internal state of this `Event` objects.
* @see https://dom.spec.whatwg.org/#event
*/
declare class Event$1<TEventType extends string = string> {
/**
* @see https://dom.spec.whatwg.org/#dom-event-none
*/
static get NONE(): number;
/**
* @see https://dom.spec.whatwg.org/#dom-event-capturing_phase
*/
static get CAPTURING_PHASE(): number;
/**
* @see https://dom.spec.whatwg.org/#dom-event-at_target
*/
static get AT_TARGET(): number;
/**
* @see https://dom.spec.whatwg.org/#dom-event-bubbling_phase
*/
static get BUBBLING_PHASE(): number;
/**
* Initialize this event instance.
* @param type The type of this event.
* @param eventInitDict Options to initialize.
* @see https://dom.spec.whatwg.org/#dom-event-event
*/
constructor(type: TEventType, eventInitDict?: Event$1.EventInit);
/**
* The type of this event.
* @see https://dom.spec.whatwg.org/#dom-event-type
*/
get type(): TEventType;
/**
* The event target of the current dispatching.
* @see https://dom.spec.whatwg.org/#dom-event-target
*/
get target(): EventTarget | null;
/**
* The event target of the current dispatching.
* @deprecated Use the `target` property instead.
* @see https://dom.spec.whatwg.org/#dom-event-srcelement
*/
get srcElement(): EventTarget | null;
/**
* The event target of the current dispatching.
* @see https://dom.spec.whatwg.org/#dom-event-currenttarget
*/
get currentTarget(): EventTarget | null;
/**
* The event target of the current dispatching.
* This doesn't support node tree.
* @see https://dom.spec.whatwg.org/#dom-event-composedpath
*/
composedPath(): EventTarget[];
/**
* @see https://dom.spec.whatwg.org/#dom-event-none
*/
get NONE(): number;
/**
* @see https://dom.spec.whatwg.org/#dom-event-capturing_phase
*/
get CAPTURING_PHASE(): number;
/**
* @see https://dom.spec.whatwg.org/#dom-event-at_target
*/
get AT_TARGET(): number;
/**
* @see https://dom.spec.whatwg.org/#dom-event-bubbling_phase
*/
get BUBBLING_PHASE(): number;
/**
* The current event phase.
* @see https://dom.spec.whatwg.org/#dom-event-eventphase
*/
get eventPhase(): number;
/**
* Stop event bubbling.
* Because this shim doesn't support node tree, this merely changes the `cancelBubble` property value.
* @see https://dom.spec.whatwg.org/#dom-event-stoppropagation
*/
stopPropagation(): void;
/**
* `true` if event bubbling was stopped.
* @deprecated
* @see https://dom.spec.whatwg.org/#dom-event-cancelbubble
*/
get cancelBubble(): boolean;
/**
* Stop event bubbling if `true` is set.
* @deprecated Use the `stopPropagation()` method instead.
* @see https://dom.spec.whatwg.org/#dom-event-cancelbubble
*/
set cancelBubble(value: boolean);
/**
* Stop event bubbling and subsequent event listener callings.
* @see https://dom.spec.whatwg.org/#dom-event-stopimmediatepropagation
*/
stopImmediatePropagation(): void;
/**
* `true` if this event will bubble.
* @see https://dom.spec.whatwg.org/#dom-event-bubbles
*/
get bubbles(): boolean;
/**
* `true` if this event can be canceled by the `preventDefault()` method.
* @see https://dom.spec.whatwg.org/#dom-event-cancelable
*/
get cancelable(): boolean;
/**
* `true` if the default behavior will act.
* @deprecated Use the `defaultPrevented` proeprty instead.
* @see https://dom.spec.whatwg.org/#dom-event-returnvalue
*/
get returnValue(): boolean;
/**
* Cancel the default behavior if `false` is set.
* @deprecated Use the `preventDefault()` method instead.
* @see https://dom.spec.whatwg.org/#dom-event-returnvalue
*/
set returnValue(value: boolean);
/**
* Cancel the default behavior.
* @see https://dom.spec.whatwg.org/#dom-event-preventdefault
*/
preventDefault(): void;
/**
* `true` if the default behavior was canceled.
* @see https://dom.spec.whatwg.org/#dom-event-defaultprevented
*/
get defaultPrevented(): boolean;
/**
* @see https://dom.spec.whatwg.org/#dom-event-composed
*/
get composed(): boolean;
/**
* @see https://dom.spec.whatwg.org/#dom-event-istrusted
*/
get isTrusted(): boolean;
/**
* @see https://dom.spec.whatwg.org/#dom-event-timestamp
*/
get timeStamp(): number;
/**
* @deprecated Don't use this method. The constructor did initialization.
*/
initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
}
declare namespace Event$1 {
/**
* The options of the `Event` constructor.
* @see https://dom.spec.whatwg.org/#dictdef-eventinit
*/
interface EventInit {
bubbles?: boolean;
cancelable?: boolean;
composed?: boolean;
}
}
declare const EventTargetConstructor: typeof EventTarget
declare const EventConstructor: typeof Event
declare class FetchEvent {
awaiting: Set<Promise<void>>
constructor(request: Request)
}
export { EventConstructor as Event, EventTargetConstructor as EventTarget, FetchEvent, EventTarget as PromiseRejectionEvent };

View File

@@ -0,0 +1,762 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/primitives/events.js
var events_exports = {};
__export(events_exports, {
Event: () => Event,
EventTarget: () => EventTarget,
FetchEvent: () => FetchEvent,
PromiseRejectionEvent: () => PromiseRejectionEvent
});
module.exports = __toCommonJS(events_exports);
// <define:process>
var define_process_default = { env: {}, versions: { node: "16.6.0" } };
// ../../node_modules/.pnpm/event-target-shim@6.0.2/node_modules/event-target-shim/index.mjs
function assertType(condition, message, ...args) {
if (!condition) {
throw new TypeError(format(message, args));
}
}
__name(assertType, "assertType");
function format(message, args) {
let i = 0;
return message.replace(/%[os]/gu, () => anyToString(args[i++]));
}
__name(format, "format");
function anyToString(x) {
if (typeof x !== "object" || x === null) {
return String(x);
}
return Object.prototype.toString.call(x);
}
__name(anyToString, "anyToString");
var currentErrorHandler;
function reportError(maybeError) {
try {
const error = maybeError instanceof Error ? maybeError : new Error(anyToString(maybeError));
if (currentErrorHandler) {
currentErrorHandler(error);
return;
}
if (typeof dispatchEvent === "function" && typeof ErrorEvent === "function") {
dispatchEvent(new ErrorEvent("error", { error, message: error.message }));
} else if (typeof define_process_default !== "undefined" && typeof define_process_default.emit === "function") {
define_process_default.emit("uncaughtException", error);
return;
}
console.error(error);
} catch (_a) {
}
}
__name(reportError, "reportError");
var Global = typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : typeof globalThis !== "undefined" ? globalThis : void 0;
var currentWarnHandler;
var Warning = class {
constructor(code, message) {
this.code = code;
this.message = message;
}
warn(...args) {
var _a;
try {
if (currentWarnHandler) {
currentWarnHandler({ ...this, args });
return;
}
const stack = ((_a = new Error().stack) !== null && _a !== void 0 ? _a : "").replace(/^(?:.+?\n){2}/gu, "\n");
console.warn(this.message, ...args, stack);
} catch (_b) {
}
}
};
__name(Warning, "Warning");
var InitEventWasCalledWhileDispatching = new Warning("W01", "Unable to initialize event under dispatching.");
var FalsyWasAssignedToCancelBubble = new Warning("W02", "Assigning any falsy value to 'cancelBubble' property has no effect.");
var TruthyWasAssignedToReturnValue = new Warning("W03", "Assigning any truthy value to 'returnValue' property has no effect.");
var NonCancelableEventWasCanceled = new Warning("W04", "Unable to preventDefault on non-cancelable events.");
var CanceledInPassiveListener = new Warning("W05", "Unable to preventDefault inside passive event listener invocation.");
var EventListenerWasDuplicated = new Warning("W06", "An event listener wasn't added because it has been added already: %o, %o");
var OptionWasIgnored = new Warning("W07", "The %o option value was abandoned because the event listener wasn't added as duplicated.");
var InvalidEventListener = new Warning("W08", "The 'callback' argument must be a function or an object that has 'handleEvent' method: %o");
var InvalidAttributeHandler = new Warning("W09", "Event attribute handler must be a function: %o");
var Event = class {
static get NONE() {
return NONE;
}
static get CAPTURING_PHASE() {
return CAPTURING_PHASE;
}
static get AT_TARGET() {
return AT_TARGET;
}
static get BUBBLING_PHASE() {
return BUBBLING_PHASE;
}
constructor(type, eventInitDict) {
Object.defineProperty(this, "isTrusted", {
value: false,
enumerable: true
});
const opts = eventInitDict !== null && eventInitDict !== void 0 ? eventInitDict : {};
internalDataMap.set(this, {
type: String(type),
bubbles: Boolean(opts.bubbles),
cancelable: Boolean(opts.cancelable),
composed: Boolean(opts.composed),
target: null,
currentTarget: null,
stopPropagationFlag: false,
stopImmediatePropagationFlag: false,
canceledFlag: false,
inPassiveListenerFlag: false,
dispatchFlag: false,
timeStamp: Date.now()
});
}
get type() {
return $(this).type;
}
get target() {
return $(this).target;
}
get srcElement() {
return $(this).target;
}
get currentTarget() {
return $(this).currentTarget;
}
composedPath() {
const currentTarget = $(this).currentTarget;
if (currentTarget) {
return [currentTarget];
}
return [];
}
get NONE() {
return NONE;
}
get CAPTURING_PHASE() {
return CAPTURING_PHASE;
}
get AT_TARGET() {
return AT_TARGET;
}
get BUBBLING_PHASE() {
return BUBBLING_PHASE;
}
get eventPhase() {
return $(this).dispatchFlag ? 2 : 0;
}
stopPropagation() {
$(this).stopPropagationFlag = true;
}
get cancelBubble() {
return $(this).stopPropagationFlag;
}
set cancelBubble(value) {
if (value) {
$(this).stopPropagationFlag = true;
} else {
FalsyWasAssignedToCancelBubble.warn();
}
}
stopImmediatePropagation() {
const data = $(this);
data.stopPropagationFlag = data.stopImmediatePropagationFlag = true;
}
get bubbles() {
return $(this).bubbles;
}
get cancelable() {
return $(this).cancelable;
}
get returnValue() {
return !$(this).canceledFlag;
}
set returnValue(value) {
if (!value) {
setCancelFlag($(this));
} else {
TruthyWasAssignedToReturnValue.warn();
}
}
preventDefault() {
setCancelFlag($(this));
}
get defaultPrevented() {
return $(this).canceledFlag;
}
get composed() {
return $(this).composed;
}
get isTrusted() {
return false;
}
get timeStamp() {
return $(this).timeStamp;
}
initEvent(type, bubbles = false, cancelable = false) {
const data = $(this);
if (data.dispatchFlag) {
InitEventWasCalledWhileDispatching.warn();
return;
}
internalDataMap.set(this, {
...data,
type: String(type),
bubbles: Boolean(bubbles),
cancelable: Boolean(cancelable),
target: null,
currentTarget: null,
stopPropagationFlag: false,
stopImmediatePropagationFlag: false,
canceledFlag: false
});
}
};
__name(Event, "Event");
var NONE = 0;
var CAPTURING_PHASE = 1;
var AT_TARGET = 2;
var BUBBLING_PHASE = 3;
var internalDataMap = /* @__PURE__ */ new WeakMap();
function $(event, name = "this") {
const retv = internalDataMap.get(event);
assertType(retv != null, "'%s' must be an object that Event constructor created, but got another one: %o", name, event);
return retv;
}
__name($, "$");
function setCancelFlag(data) {
if (data.inPassiveListenerFlag) {
CanceledInPassiveListener.warn();
return;
}
if (!data.cancelable) {
NonCancelableEventWasCanceled.warn();
return;
}
data.canceledFlag = true;
}
__name(setCancelFlag, "setCancelFlag");
Object.defineProperty(Event, "NONE", { enumerable: true });
Object.defineProperty(Event, "CAPTURING_PHASE", { enumerable: true });
Object.defineProperty(Event, "AT_TARGET", { enumerable: true });
Object.defineProperty(Event, "BUBBLING_PHASE", { enumerable: true });
var keys = Object.getOwnPropertyNames(Event.prototype);
for (let i = 0; i < keys.length; ++i) {
if (keys[i] === "constructor") {
continue;
}
Object.defineProperty(Event.prototype, keys[i], { enumerable: true });
}
if (typeof Global !== "undefined" && typeof Global.Event !== "undefined") {
Object.setPrototypeOf(Event.prototype, Global.Event.prototype);
}
function createInvalidStateError(message) {
if (Global.DOMException) {
return new Global.DOMException(message, "InvalidStateError");
}
if (DOMException == null) {
DOMException = /* @__PURE__ */ __name(class DOMException2 extends Error {
constructor(msg) {
super(msg);
if (Error.captureStackTrace) {
Error.captureStackTrace(this, DOMException2);
}
}
get code() {
return 11;
}
get name() {
return "InvalidStateError";
}
}, "DOMException");
Object.defineProperties(DOMException.prototype, {
code: { enumerable: true },
name: { enumerable: true }
});
defineErrorCodeProperties(DOMException);
defineErrorCodeProperties(DOMException.prototype);
}
return new DOMException(message);
}
__name(createInvalidStateError, "createInvalidStateError");
var DOMException;
var ErrorCodeMap = {
INDEX_SIZE_ERR: 1,
DOMSTRING_SIZE_ERR: 2,
HIERARCHY_REQUEST_ERR: 3,
WRONG_DOCUMENT_ERR: 4,
INVALID_CHARACTER_ERR: 5,
NO_DATA_ALLOWED_ERR: 6,
NO_MODIFICATION_ALLOWED_ERR: 7,
NOT_FOUND_ERR: 8,
NOT_SUPPORTED_ERR: 9,
INUSE_ATTRIBUTE_ERR: 10,
INVALID_STATE_ERR: 11,
SYNTAX_ERR: 12,
INVALID_MODIFICATION_ERR: 13,
NAMESPACE_ERR: 14,
INVALID_ACCESS_ERR: 15,
VALIDATION_ERR: 16,
TYPE_MISMATCH_ERR: 17,
SECURITY_ERR: 18,
NETWORK_ERR: 19,
ABORT_ERR: 20,
URL_MISMATCH_ERR: 21,
QUOTA_EXCEEDED_ERR: 22,
TIMEOUT_ERR: 23,
INVALID_NODE_TYPE_ERR: 24,
DATA_CLONE_ERR: 25
};
function defineErrorCodeProperties(obj) {
const keys2 = Object.keys(ErrorCodeMap);
for (let i = 0; i < keys2.length; ++i) {
const key = keys2[i];
const value = ErrorCodeMap[key];
Object.defineProperty(obj, key, {
get() {
return value;
},
configurable: true,
enumerable: true
});
}
}
__name(defineErrorCodeProperties, "defineErrorCodeProperties");
var EventWrapper = class extends Event {
static wrap(event) {
return new (getWrapperClassOf(event))(event);
}
constructor(event) {
super(event.type, {
bubbles: event.bubbles,
cancelable: event.cancelable,
composed: event.composed
});
if (event.cancelBubble) {
super.stopPropagation();
}
if (event.defaultPrevented) {
super.preventDefault();
}
internalDataMap$1.set(this, { original: event });
const keys2 = Object.keys(event);
for (let i = 0; i < keys2.length; ++i) {
const key = keys2[i];
if (!(key in this)) {
Object.defineProperty(this, key, defineRedirectDescriptor(event, key));
}
}
}
stopPropagation() {
super.stopPropagation();
const { original } = $$1(this);
if ("stopPropagation" in original) {
original.stopPropagation();
}
}
get cancelBubble() {
return super.cancelBubble;
}
set cancelBubble(value) {
super.cancelBubble = value;
const { original } = $$1(this);
if ("cancelBubble" in original) {
original.cancelBubble = value;
}
}
stopImmediatePropagation() {
super.stopImmediatePropagation();
const { original } = $$1(this);
if ("stopImmediatePropagation" in original) {
original.stopImmediatePropagation();
}
}
get returnValue() {
return super.returnValue;
}
set returnValue(value) {
super.returnValue = value;
const { original } = $$1(this);
if ("returnValue" in original) {
original.returnValue = value;
}
}
preventDefault() {
super.preventDefault();
const { original } = $$1(this);
if ("preventDefault" in original) {
original.preventDefault();
}
}
get timeStamp() {
const { original } = $$1(this);
if ("timeStamp" in original) {
return original.timeStamp;
}
return super.timeStamp;
}
};
__name(EventWrapper, "EventWrapper");
var internalDataMap$1 = /* @__PURE__ */ new WeakMap();
function $$1(event) {
const retv = internalDataMap$1.get(event);
assertType(retv != null, "'this' is expected an Event object, but got", event);
return retv;
}
__name($$1, "$$1");
var wrapperClassCache = /* @__PURE__ */ new WeakMap();
wrapperClassCache.set(Object.prototype, EventWrapper);
if (typeof Global !== "undefined" && typeof Global.Event !== "undefined") {
wrapperClassCache.set(Global.Event.prototype, EventWrapper);
}
function getWrapperClassOf(originalEvent) {
const prototype = Object.getPrototypeOf(originalEvent);
if (prototype == null) {
return EventWrapper;
}
let wrapper = wrapperClassCache.get(prototype);
if (wrapper == null) {
wrapper = defineWrapper(getWrapperClassOf(prototype), prototype);
wrapperClassCache.set(prototype, wrapper);
}
return wrapper;
}
__name(getWrapperClassOf, "getWrapperClassOf");
function defineWrapper(BaseEventWrapper, originalPrototype) {
class CustomEventWrapper extends BaseEventWrapper {
}
__name(CustomEventWrapper, "CustomEventWrapper");
const keys2 = Object.keys(originalPrototype);
for (let i = 0; i < keys2.length; ++i) {
Object.defineProperty(CustomEventWrapper.prototype, keys2[i], defineRedirectDescriptor(originalPrototype, keys2[i]));
}
return CustomEventWrapper;
}
__name(defineWrapper, "defineWrapper");
function defineRedirectDescriptor(obj, key) {
const d = Object.getOwnPropertyDescriptor(obj, key);
return {
get() {
const original = $$1(this).original;
const value = original[key];
if (typeof value === "function") {
return value.bind(original);
}
return value;
},
set(value) {
const original = $$1(this).original;
original[key] = value;
},
configurable: d.configurable,
enumerable: d.enumerable
};
}
__name(defineRedirectDescriptor, "defineRedirectDescriptor");
function createListener(callback, capture, passive, once, signal, signalListener) {
return {
callback,
flags: (capture ? 1 : 0) | (passive ? 2 : 0) | (once ? 4 : 0),
signal,
signalListener
};
}
__name(createListener, "createListener");
function setRemoved(listener) {
listener.flags |= 8;
}
__name(setRemoved, "setRemoved");
function isCapture(listener) {
return (listener.flags & 1) === 1;
}
__name(isCapture, "isCapture");
function isPassive(listener) {
return (listener.flags & 2) === 2;
}
__name(isPassive, "isPassive");
function isOnce(listener) {
return (listener.flags & 4) === 4;
}
__name(isOnce, "isOnce");
function isRemoved(listener) {
return (listener.flags & 8) === 8;
}
__name(isRemoved, "isRemoved");
function invokeCallback({ callback }, target, event) {
try {
if (typeof callback === "function") {
callback.call(target, event);
} else if (typeof callback.handleEvent === "function") {
callback.handleEvent(event);
}
} catch (thrownError) {
reportError(thrownError);
}
}
__name(invokeCallback, "invokeCallback");
function findIndexOfListener({ listeners }, callback, capture) {
for (let i = 0; i < listeners.length; ++i) {
if (listeners[i].callback === callback && isCapture(listeners[i]) === capture) {
return i;
}
}
return -1;
}
__name(findIndexOfListener, "findIndexOfListener");
function addListener(list, callback, capture, passive, once, signal) {
let signalListener;
if (signal) {
signalListener = removeListener.bind(null, list, callback, capture);
signal.addEventListener("abort", signalListener);
}
const listener = createListener(callback, capture, passive, once, signal, signalListener);
if (list.cow) {
list.cow = false;
list.listeners = [...list.listeners, listener];
} else {
list.listeners.push(listener);
}
return listener;
}
__name(addListener, "addListener");
function removeListener(list, callback, capture) {
const index = findIndexOfListener(list, callback, capture);
if (index !== -1) {
return removeListenerAt(list, index);
}
return false;
}
__name(removeListener, "removeListener");
function removeListenerAt(list, index, disableCow = false) {
const listener = list.listeners[index];
setRemoved(listener);
if (listener.signal) {
listener.signal.removeEventListener("abort", listener.signalListener);
}
if (list.cow && !disableCow) {
list.cow = false;
list.listeners = list.listeners.filter((_, i) => i !== index);
return false;
}
list.listeners.splice(index, 1);
return true;
}
__name(removeListenerAt, "removeListenerAt");
function createListenerListMap() {
return /* @__PURE__ */ Object.create(null);
}
__name(createListenerListMap, "createListenerListMap");
function ensureListenerList(listenerMap, type) {
var _a;
return (_a = listenerMap[type]) !== null && _a !== void 0 ? _a : listenerMap[type] = {
attrCallback: void 0,
attrListener: void 0,
cow: false,
listeners: []
};
}
__name(ensureListenerList, "ensureListenerList");
var EventTarget = class {
constructor() {
internalDataMap$2.set(this, createListenerListMap());
}
addEventListener(type0, callback0, options0) {
const listenerMap = $$2(this);
const { callback, capture, once, passive, signal, type } = normalizeAddOptions(type0, callback0, options0);
if (callback == null || (signal === null || signal === void 0 ? void 0 : signal.aborted)) {
return;
}
const list = ensureListenerList(listenerMap, type);
const i = findIndexOfListener(list, callback, capture);
if (i !== -1) {
warnDuplicate(list.listeners[i], passive, once, signal);
return;
}
addListener(list, callback, capture, passive, once, signal);
}
removeEventListener(type0, callback0, options0) {
const listenerMap = $$2(this);
const { callback, capture, type } = normalizeOptions(type0, callback0, options0);
const list = listenerMap[type];
if (callback != null && list) {
removeListener(list, callback, capture);
}
}
dispatchEvent(e) {
const list = $$2(this)[String(e.type)];
if (list == null) {
return true;
}
const event = e instanceof Event ? e : EventWrapper.wrap(e);
const eventData = $(event, "event");
if (eventData.dispatchFlag) {
throw createInvalidStateError("This event has been in dispatching.");
}
eventData.dispatchFlag = true;
eventData.target = eventData.currentTarget = this;
if (!eventData.stopPropagationFlag) {
const { cow, listeners } = list;
list.cow = true;
for (let i = 0; i < listeners.length; ++i) {
const listener = listeners[i];
if (isRemoved(listener)) {
continue;
}
if (isOnce(listener) && removeListenerAt(list, i, !cow)) {
i -= 1;
}
eventData.inPassiveListenerFlag = isPassive(listener);
invokeCallback(listener, this, event);
eventData.inPassiveListenerFlag = false;
if (eventData.stopImmediatePropagationFlag) {
break;
}
}
if (!cow) {
list.cow = false;
}
}
eventData.target = null;
eventData.currentTarget = null;
eventData.stopImmediatePropagationFlag = false;
eventData.stopPropagationFlag = false;
eventData.dispatchFlag = false;
return !eventData.canceledFlag;
}
};
__name(EventTarget, "EventTarget");
var internalDataMap$2 = /* @__PURE__ */ new WeakMap();
function $$2(target, name = "this") {
const retv = internalDataMap$2.get(target);
assertType(retv != null, "'%s' must be an object that EventTarget constructor created, but got another one: %o", name, target);
return retv;
}
__name($$2, "$$2");
function normalizeAddOptions(type, callback, options) {
var _a;
assertCallback(callback);
if (typeof options === "object" && options !== null) {
return {
type: String(type),
callback: callback !== null && callback !== void 0 ? callback : void 0,
capture: Boolean(options.capture),
passive: Boolean(options.passive),
once: Boolean(options.once),
signal: (_a = options.signal) !== null && _a !== void 0 ? _a : void 0
};
}
return {
type: String(type),
callback: callback !== null && callback !== void 0 ? callback : void 0,
capture: Boolean(options),
passive: false,
once: false,
signal: void 0
};
}
__name(normalizeAddOptions, "normalizeAddOptions");
function normalizeOptions(type, callback, options) {
assertCallback(callback);
if (typeof options === "object" && options !== null) {
return {
type: String(type),
callback: callback !== null && callback !== void 0 ? callback : void 0,
capture: Boolean(options.capture)
};
}
return {
type: String(type),
callback: callback !== null && callback !== void 0 ? callback : void 0,
capture: Boolean(options)
};
}
__name(normalizeOptions, "normalizeOptions");
function assertCallback(callback) {
if (typeof callback === "function" || typeof callback === "object" && callback !== null && typeof callback.handleEvent === "function") {
return;
}
if (callback == null || typeof callback === "object") {
InvalidEventListener.warn(callback);
return;
}
throw new TypeError(format(InvalidEventListener.message, [callback]));
}
__name(assertCallback, "assertCallback");
function warnDuplicate(listener, passive, once, signal) {
EventListenerWasDuplicated.warn(isCapture(listener) ? "capture" : "bubble", listener.callback);
if (isPassive(listener) !== passive) {
OptionWasIgnored.warn("passive");
}
if (isOnce(listener) !== once) {
OptionWasIgnored.warn("once");
}
if (listener.signal !== signal) {
OptionWasIgnored.warn("signal");
}
}
__name(warnDuplicate, "warnDuplicate");
var keys$1 = Object.getOwnPropertyNames(EventTarget.prototype);
for (let i = 0; i < keys$1.length; ++i) {
if (keys$1[i] === "constructor") {
continue;
}
Object.defineProperty(EventTarget.prototype, keys$1[i], { enumerable: true });
}
if (typeof Global !== "undefined" && typeof Global.EventTarget !== "undefined") {
Object.setPrototypeOf(EventTarget.prototype, Global.EventTarget.prototype);
}
// src/primitives/events.js
var FetchEvent = class extends Event {
constructor(request) {
super("fetch");
this.request = request;
this.response = null;
this.awaiting = /* @__PURE__ */ new Set();
}
respondWith(response) {
this.response = response;
}
waitUntil(promise) {
this.awaiting.add(promise);
promise.finally(() => this.awaiting.delete(promise));
}
};
__name(FetchEvent, "FetchEvent");
var PromiseRejectionEvent = class extends Event {
constructor(type, init) {
super(type, { cancelable: true });
this.promise = init.promise;
this.reason = init.reason;
}
};
__name(PromiseRejectionEvent, "PromiseRejectionEvent");
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Event,
EventTarget,
FetchEvent,
PromiseRejectionEvent
});

View File

@@ -0,0 +1 @@
{"main":"../events.js","types":"../events.d.ts"}

View File

@@ -0,0 +1,17 @@
declare class Headers extends globalThis.Headers {
getAll(key: 'set-cookie'): string[]
}
declare class Request extends globalThis.Request {
readonly headers: Headers
}
declare class Response extends globalThis.Response {
readonly headers: Headers
}
declare const fetchImplementation: typeof fetch
declare const FileConstructor: typeof File
declare const FormDataConstructor: typeof FormData
export { FileConstructor as File, FormDataConstructor as FormData, Headers, Request, Response, fetchImplementation as fetch };

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"main":"../fetch.js","types":"../fetch.d.ts"}

View File

@@ -0,0 +1,30 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/primitives/index.js
var primitives_exports = {};
module.exports = __toCommonJS(primitives_exports);
__reExport(primitives_exports, require("./abort-controller"), module.exports);
__reExport(primitives_exports, require("./blob"), module.exports);
__reExport(primitives_exports, require("./cache"), module.exports);
__reExport(primitives_exports, require("./console"), module.exports);
__reExport(primitives_exports, require("./crypto"), module.exports);
__reExport(primitives_exports, require("./encoding"), module.exports);
__reExport(primitives_exports, require("./events"), module.exports);
__reExport(primitives_exports, require("./fetch"), module.exports);
__reExport(primitives_exports, require("./streams"), module.exports);
__reExport(primitives_exports, require("./structured-clone"), module.exports);
__reExport(primitives_exports, require("./url"), module.exports);

View File

@@ -0,0 +1 @@
{"name":"@edge-runtime/primitives","version":"2.0.0","main":"./index.js","license":"MPLv2"}

View File

@@ -0,0 +1,22 @@
/**
* The type of `ReadableStreamBYOBReader` is not included in Typescript so we
* are declaring it inline to not have to worry about bundling.
*/
declare class ReadableStreamBYOBReader {
constructor(stream: ReadableStream<Uint8Array>)
get closed(): Promise<undefined>
cancel(reason?: any): Promise<void>
read<T extends ArrayBufferView>(
view: T
): Promise<{ done: false; value: T } | { done: true; value: T | undefined }>
releaseLock(): void
}
declare const ReadableStreamConstructor: typeof ReadableStream
declare const ReadableStreamBYOBReaderConstructor: typeof ReadableStreamBYOBReader
declare const ReadableStreamDefaultReaderConstructor: typeof ReadableStreamDefaultReader
declare const TransformStreamConstructor: typeof TransformStream
declare const WritableStreamConstructor: typeof WritableStream
declare const WritableStreamDefaultWriterConstructor: typeof WritableStreamDefaultWriter
export { ReadableStreamConstructor as ReadableStream, ReadableStreamBYOBReaderConstructor as ReadableStreamBYOBReader, ReadableStreamDefaultReaderConstructor as ReadableStreamDefaultReader, TransformStreamConstructor as TransformStream, WritableStreamConstructor as WritableStream, WritableStreamDefaultWriterConstructor as WritableStreamDefaultWriter };

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
{"main":"../streams.js","types":"../streams.d.ts"}

View File

@@ -0,0 +1,3 @@
declare const structuredClone: <T>(any: T, options?: { lossy?: boolean }) => T
export { structuredClone };

View File

@@ -0,0 +1,229 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/primitives/structured-clone.js
var structured_clone_exports = {};
__export(structured_clone_exports, {
structuredClone: () => esm_default
});
module.exports = __toCommonJS(structured_clone_exports);
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.1/node_modules/@ungap/structured-clone/esm/types.js
var VOID = -1;
var PRIMITIVE = 0;
var ARRAY = 1;
var OBJECT = 2;
var DATE = 3;
var REGEXP = 4;
var MAP = 5;
var SET = 6;
var ERROR = 7;
var BIGINT = 8;
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.1/node_modules/@ungap/structured-clone/esm/deserialize.js
var env = typeof self === "object" ? self : globalThis;
var deserializer = /* @__PURE__ */ __name(($, _) => {
const as = /* @__PURE__ */ __name((out, index) => {
$.set(index, out);
return out;
}, "as");
const unpair = /* @__PURE__ */ __name((index) => {
if ($.has(index))
return $.get(index);
const [type, value] = _[index];
switch (type) {
case PRIMITIVE:
case VOID:
return as(value, index);
case ARRAY: {
const arr = as([], index);
for (const index2 of value)
arr.push(unpair(index2));
return arr;
}
case OBJECT: {
const object = as({}, index);
for (const [key, index2] of value)
object[unpair(key)] = unpair(index2);
return object;
}
case DATE:
return as(new Date(value), index);
case REGEXP: {
const { source, flags } = value;
return as(new RegExp(source, flags), index);
}
case MAP: {
const map = as(/* @__PURE__ */ new Map(), index);
for (const [key, index2] of value)
map.set(unpair(key), unpair(index2));
return map;
}
case SET: {
const set = as(/* @__PURE__ */ new Set(), index);
for (const index2 of value)
set.add(unpair(index2));
return set;
}
case ERROR: {
const { name, message } = value;
return as(new env[name](message), index);
}
case BIGINT:
return as(BigInt(value), index);
case "BigInt":
return as(Object(BigInt(value)), index);
}
return as(new env[type](value), index);
}, "unpair");
return unpair;
}, "deserializer");
var deserialize = /* @__PURE__ */ __name((serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0), "deserialize");
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.1/node_modules/@ungap/structured-clone/esm/serialize.js
var EMPTY = "";
var { toString } = {};
var { keys } = Object;
var typeOf = /* @__PURE__ */ __name((value) => {
const type = typeof value;
if (type !== "object" || !value)
return [PRIMITIVE, type];
const asString = toString.call(value).slice(8, -1);
switch (asString) {
case "Array":
return [ARRAY, EMPTY];
case "Object":
return [OBJECT, EMPTY];
case "Date":
return [DATE, EMPTY];
case "RegExp":
return [REGEXP, EMPTY];
case "Map":
return [MAP, EMPTY];
case "Set":
return [SET, EMPTY];
}
if (asString.includes("Array"))
return [ARRAY, asString];
if (asString.includes("Error"))
return [ERROR, asString];
return [OBJECT, asString];
}, "typeOf");
var shouldSkip = /* @__PURE__ */ __name(([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol"), "shouldSkip");
var serializer = /* @__PURE__ */ __name((strict, json, $, _) => {
const as = /* @__PURE__ */ __name((out, value) => {
const index = _.push(out) - 1;
$.set(value, index);
return index;
}, "as");
const pair = /* @__PURE__ */ __name((value) => {
if ($.has(value))
return $.get(value);
let [TYPE, type] = typeOf(value);
switch (TYPE) {
case PRIMITIVE: {
let entry = value;
switch (type) {
case "bigint":
TYPE = BIGINT;
entry = value.toString();
break;
case "function":
case "symbol":
if (strict)
throw new TypeError("unable to serialize " + type);
entry = null;
break;
case "undefined":
return as([VOID], value);
}
return as([TYPE, entry], value);
}
case ARRAY: {
if (type)
return as([type, [...value]], value);
const arr = [];
const index = as([TYPE, arr], value);
for (const entry of value)
arr.push(pair(entry));
return index;
}
case OBJECT: {
if (type) {
switch (type) {
case "BigInt":
return as([type, value.toString()], value);
case "Boolean":
case "Number":
case "String":
return as([type, value.valueOf()], value);
}
}
if (json && "toJSON" in value)
return pair(value.toJSON());
const entries = [];
const index = as([TYPE, entries], value);
for (const key of keys(value)) {
if (strict || !shouldSkip(typeOf(value[key])))
entries.push([pair(key), pair(value[key])]);
}
return index;
}
case DATE:
return as([TYPE, value.toISOString()], value);
case REGEXP: {
const { source, flags } = value;
return as([TYPE, { source, flags }], value);
}
case MAP: {
const entries = [];
const index = as([TYPE, entries], value);
for (const [key, entry] of value) {
if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
entries.push([pair(key), pair(entry)]);
}
return index;
}
case SET: {
const entries = [];
const index = as([TYPE, entries], value);
for (const entry of value) {
if (strict || !shouldSkip(typeOf(entry)))
entries.push(pair(entry));
}
return index;
}
}
const { message } = value;
return as([TYPE, { name: type, message }], value);
}, "pair");
return pair;
}, "serializer");
var serialize = /* @__PURE__ */ __name((value, { json, lossy } = {}) => {
const _ = [];
return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
}, "serialize");
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.1/node_modules/@ungap/structured-clone/esm/index.js
var esm_default = typeof structuredClone === "function" ? (any, options) => options && ("json" in options || "lossy" in options) ? deserialize(serialize(any, options)) : structuredClone(any) : (any, options) => deserialize(serialize(any, options));
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
structuredClone
});

View File

@@ -0,0 +1 @@
{"main":"../structured-clone.js","types":"../structured-clone.d.ts"}

View File

@@ -0,0 +1,55 @@
type URLPatternInput = URLPatternInit | string;
declare class URLPattern {
constructor(init?: URLPatternInput, baseURL?: string);
test(input?: URLPatternInput, baseURL?: string): boolean;
exec(input?: URLPatternInput, baseURL?: string): URLPatternResult | null;
readonly protocol: string;
readonly username: string;
readonly password: string;
readonly hostname: string;
readonly port: string;
readonly pathname: string;
readonly search: string;
readonly hash: string;
}
interface URLPatternInit {
baseURL?: string;
username?: string;
password?: string;
protocol?: string;
hostname?: string;
port?: string;
pathname?: string;
search?: string;
hash?: string;
}
interface URLPatternResult {
inputs: [URLPatternInput];
protocol: URLPatternComponentResult;
username: URLPatternComponentResult;
password: URLPatternComponentResult;
hostname: URLPatternComponentResult;
port: URLPatternComponentResult;
pathname: URLPatternComponentResult;
search: URLPatternComponentResult;
hash: URLPatternComponentResult;
}
interface URLPatternComponentResult {
input: string;
groups: {
[key: string]: string | undefined;
};
}
declare const _URL: typeof URL
declare const _URLSearchParams: typeof URLSearchParams
declare class _URLPattern extends URLPattern {}
export { _URL as URL, _URLPattern as URLPattern, _URLSearchParams as URLSearchParams };

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"main":"../url.js","types":"../url.d.ts"}