aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar cirospaciari <ciro.spaciari@gmail.com> 2023-09-04 16:30:10 -0300
committerGravatar cirospaciari <ciro.spaciari@gmail.com> 2023-09-04 16:30:10 -0300
commit1b6586f094235bfe0c0ce9d9b3b2a08a65610b42 (patch)
treeaa8dab4154285de284790039b1db36491fc6cfcc
parentd134a261d5f710efd040122074fcfb9ed5dea23e (diff)
downloadbun-1b6586f094235bfe0c0ce9d9b3b2a08a65610b42.tar.gz
bun-1b6586f094235bfe0c0ce9d9b3b2a08a65610b42.tar.zst
bun-1b6586f094235bfe0c0ce9d9b3b2a08a65610b42.zip
WIP fix post data/refactor
-rw-r--r--Makefile8
-rwxr-xr-xbun.lockbbin73707 -> 81891 bytes
-rw-r--r--package.json1
-rw-r--r--src/bun.js/api/bun/h2_frame_parser.zig1483
-rw-r--r--src/bun.js/api/bun/lshpack.translated.zig442
-rw-r--r--src/bun.js/api/h2.classes.ts20
-rw-r--r--src/bun.js/bindings/ZigGeneratedClasses+DOMClientIsoSubspaces.h3
-rw-r--r--src/bun.js/bindings/ZigGeneratedClasses+DOMIsoSubspaces.h3
-rw-r--r--src/bun.js/bindings/ZigGeneratedClasses+lazyStructureHeader.h6
-rw-r--r--src/bun.js/bindings/ZigGeneratedClasses+lazyStructureImpl.h7
-rw-r--r--src/bun.js/bindings/ZigGeneratedClasses.cpp130
-rw-r--r--src/bun.js/bindings/ZigGeneratedClasses.h50
-rw-r--r--src/bun.js/bindings/ZigGlobalObject.cpp9
-rw-r--r--src/bun.js/bindings/generated_classes.zig12
-rw-r--r--src/bun.zig32
-rw-r--r--src/js/node/http2.ts484
-rw-r--r--src/js/node/zlib.js1
-rw-r--r--src/js/out/InternalModuleRegistryConstants.h12
-rw-r--r--src/js/out/WebCoreJSBuiltins.cpp3666
-rw-r--r--src/js/out/WebCoreJSBuiltins.d.ts144
-rw-r--r--src/js/out/WebCoreJSBuiltins.h6178
-rw-r--r--test/js/third_party/got/got.test.ts56
22 files changed, 7670 insertions, 5077 deletions
diff --git a/Makefile b/Makefile
index 0eca2d970..f484c0ea1 100644
--- a/Makefile
+++ b/Makefile
@@ -759,13 +759,17 @@ build-obj-safe:
UWS_CC_FLAGS = -pthread -DLIBUS_USE_OPENSSL=1 -DUWS_HTTPRESPONSE_NO_WRITEMARK=1 -DLIBUS_USE_BORINGSSL=1 -DWITH_BORINGSSL=1 -Wpedantic -Wall -Wextra -Wsign-conversion -Wconversion $(UWS_INCLUDE) -DUWS_WITH_PROXY
UWS_CXX_FLAGS = $(UWS_CC_FLAGS) -std=$(CXX_VERSION) -fno-exceptions -fno-rtti
-UWS_LDFLAGS = -I$(BUN_DEPS_DIR)/boringssl/include -I$(ZLIB_INCLUDE_DIR)
+UWS_LDFLAGS = -I$(BUN_DEPS_DIR)/boringssl/include -I$(ZLIB_INCLUDE_DIR)
USOCKETS_DIR = $(BUN_DEPS_DIR)/uws/uSockets/
USOCKETS_SRC_DIR = $(BUN_DEPS_DIR)/uws/uSockets/src/
+LSHPACK_SRC_DIR = $(BUN_DEPS_DIR)/uws/uSockets/lsquic/src/lshpack
+LSHPACK_CC_FLAGS = -DXXH_HEADER_NAME="<xxhash.h>"
+LSHPACK_LDFLAGS = -I$(LSHPACK_SRC_DIR) -I$(LSHPACK_SRC_DIR)/deps/xxhash
+
usockets:
rm -rf $(BUN_DEPS_DIR)/uws/uSockets/*.o $(BUN_DEPS_DIR)/uws/uSockets/**/*.o $(BUN_DEPS_DIR)/uws/uSockets/*.a $(BUN_DEPS_DIR)/uws/uSockets/*.bc
- cd $(USOCKETS_DIR) && $(CC_WITH_CCACHE) -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc $(EMIT_LLVM_FOR_RELEASE) $(MACOS_MIN_FLAG) -fPIC $(CFLAGS) $(UWS_CC_FLAGS) -save-temps -I$(BUN_DEPS_DIR)/uws/uSockets/src $(UWS_LDFLAGS) -g $(DEFAULT_LINKER_FLAGS) $(PLATFORM_LINKER_FLAGS) $(OPTIMIZATION_LEVEL) -c $(wildcard $(USOCKETS_SRC_DIR)/*.c) $(wildcard $(USOCKETS_SRC_DIR)/**/*.c)
+ cd $(USOCKETS_DIR) && $(CC_WITH_CCACHE) $(LSHPACK_CC_FLAGS) $(LSHPACK_LDFLAGS) -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc $(EMIT_LLVM_FOR_RELEASE) $(MACOS_MIN_FLAG) -fPIC $(CFLAGS) $(UWS_CC_FLAGS) -save-temps -I$(BUN_DEPS_DIR)/uws/uSockets/src $(UWS_LDFLAGS) -g $(DEFAULT_LINKER_FLAGS) $(PLATFORM_LINKER_FLAGS) $(OPTIMIZATION_LEVEL) -c $(wildcard $(USOCKETS_SRC_DIR)/*.c) $(wildcard $(USOCKETS_SRC_DIR)/**/*.c) $(wildcard $(LSHPACK_SRC_DIR)/deps/xxhash/*.c) $(wildcard $(LSHPACK_SRC_DIR)/*.c)
cd $(USOCKETS_DIR) && $(CXX_WITH_CCACHE) -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc $(EMIT_LLVM_FOR_RELEASE) $(MACOS_MIN_FLAG) -fPIC $(CXXFLAGS) $(UWS_CXX_FLAGS) -save-temps -I$(BUN_DEPS_DIR)/uws/uSockets/src $(UWS_LDFLAGS) -g $(DEFAULT_LINKER_FLAGS) $(PLATFORM_LINKER_FLAGS) $(OPTIMIZATION_LEVEL) -c $(wildcard $(USOCKETS_SRC_DIR)/*.cpp) $(wildcard $(USOCKETS_SRC_DIR)/**/*.cpp)
cd $(USOCKETS_DIR) && $(AR) rcvs $(BUN_DEPS_OUT_DIR)/libusockets.a $(USOCKETS_DIR)/*.{o,bc}
diff --git a/bun.lockb b/bun.lockb
index 416340aed..f4ca48190 100755
--- a/bun.lockb
+++ b/bun.lockb
Binary files differ
diff --git a/package.json b/package.json
index ca8feec10..75d723a71 100644
--- a/package.json
+++ b/package.json
@@ -4,6 +4,7 @@
"esbuild": "^0.17.15",
"eslint": "^8.20.0",
"eslint-config-prettier": "^8.5.0",
+ "got": "^13.0.0",
"mitata": "^0.1.3",
"peechy": "0.4.34",
"prettier": "^2.4.1",
diff --git a/src/bun.js/api/bun/h2_frame_parser.zig b/src/bun.js/api/bun/h2_frame_parser.zig
index 2041aad69..23e4d7eb2 100644
--- a/src/bun.js/api/bun/h2_frame_parser.zig
+++ b/src/bun.js/api/bun/h2_frame_parser.zig
@@ -6,6 +6,7 @@ const Allocator = std.mem.Allocator;
const JSC = bun.JSC;
const MutableString = bun.MutableString;
const native_endian = @import("builtin").target.cpu.arch.endian();
+const lshpack = @import("./lshpack.translated.zig");
const JSValue = JSC.JSValue;
@@ -24,6 +25,20 @@ const FrameType = enum(u8) {
HTTP_FRAME_CONTINUATION = 0x09,
};
+const PingFrameFlags = enum(u8) {
+ ACK = 0x1,
+};
+const DataFrameFlags = enum(u8) {
+ END_STREAM = 0x1,
+ PADDED = 0x8,
+};
+const HeadersFrameFlags = enum(u8) {
+ END_STREAM = 0x1,
+ END_HEADERS = 0x4,
+ PADDED = 0x8,
+ PRIORITY = 0x20,
+};
+
const ErrorCode = enum(u32) {
NO_ERROR = 0x0,
PROTOCOL_ERROR = 0x1,
@@ -57,6 +72,50 @@ const UInt31WithReserved = packed struct(u32) {
pub fn from(value: u32) UInt31WithReserved {
return @bitCast(value);
}
+
+ pub fn toUInt32(value: UInt31WithReserved) u32 {
+ return @bitCast(value);
+ }
+
+ pub inline fn fromBytes(src: []const u8) UInt31WithReserved {
+ var dst: u32 = 0;
+ @memcpy(@as(*[4]u8, @ptrCast(&dst)), src);
+ if (native_endian != .Big) {
+ dst = @byteSwap(dst);
+ }
+ return @bitCast(dst);
+ }
+
+ pub inline fn write(this: UInt31WithReserved, comptime Writer: type, writer: Writer) void {
+ var value: u32 = @bitCast(this);
+ if (native_endian != .Big) {
+ value = @byteSwap(value);
+ }
+
+ _ = writer.write(std.mem.asBytes(&value)) catch 0;
+ }
+};
+
+const StreamPriority = packed struct(u40) {
+ streamIdentifier: u32 = 0,
+ weight: u8 = 0,
+
+ pub const byteSize: usize = 5;
+ pub inline fn write(this: *StreamPriority, comptime Writer: type, writer: Writer) void {
+ var swap = this.*;
+ if (native_endian != .Big) {
+ std.mem.byteSwapAllFields(StreamPriority, &swap);
+ }
+
+ _ = writer.write(std.mem.asBytes(&swap)[0..StreamPriority.byteSize]) catch 0;
+ }
+
+ pub inline fn from(dst: *StreamPriority, src: []const u8) void {
+ @memcpy(@as(*[StreamPriority.byteSize]u8, @ptrCast(dst)), src);
+ if (native_endian != .Big) {
+ std.mem.byteSwapAllFields(StreamPriority, dst);
+ }
+ }
};
const FrameHeader = packed struct(u72) {
@@ -127,7 +186,7 @@ const FullSettingsPayload = packed struct(u288) {
}
pub fn updateWith(this: *FullSettingsPayload, option: SettingsPayloadUnit) void {
- switch (option.type) {
+ switch (@as(SettingsType, @enumFromInt(option.type))) {
.SETTINGS_HEADER_TABLE_SIZE => this.headerTableSize = option.value,
.SETTINGS_ENABLE_PUSH => this.enablePush = option.value,
.SETTINGS_MAX_CONCURRENT_STREAMS => this.maxConcurrentStreams = option.value,
@@ -156,13 +215,19 @@ const Handlers = struct {
onStreamData: JSC.JSValue = .zero,
onRemoteSettings: JSC.JSValue = .zero,
onLocalSettings: JSC.JSValue = .zero,
+ onWantTrailers: JSC.JSValue = .zero,
+ onPing: JSC.JSValue = .zero,
+ onEnd: JSC.JSValue = .zero,
+ onGoAway: JSC.JSValue = .zero,
+ onFrameError: JSC.JSValue = .zero,
+
binary_type: BinaryType = .Buffer,
vm: *JSC.VirtualMachine,
globalObject: *JSC.JSGlobalObject,
- pub fn callEventHandler(this: *Handlers, comptime event: []const u8, thisValue: JSValue, data: []const JSValue) bool {
- const callback = @field(this, event);
+ pub fn callEventHandler(this: *Handlers, comptime event: @Type(.EnumLiteral), thisValue: JSValue, data: []const JSValue) bool {
+ const callback = @field(this, @tagName(event));
if (callback == .zero) {
return false;
}
@@ -211,9 +276,15 @@ const Handlers = struct {
.{ "onStreamError", "streamError" },
.{ "onRemoteSettings", "remoteSettings" },
.{ "onLocalSettings", "localSettings" },
+ .{ "onWantTrailers", "wantTrailers" },
+ .{ "onPing", "ping" },
+ .{ "onEnd", "end" },
.{ "onError", "error" },
+ .{ "onGoAway", "goaway" },
+ .{ "onFrameError", "frameError" },
.{ "onWrite", "write" },
};
+
inline for (pairs) |pair| {
if (opts.getTruthy(globalObject, pair.@"1")) |callback_value| {
if (!callback_value.isCell() or !callback_value.isCallable(globalObject.vm())) {
@@ -247,6 +318,7 @@ const Handlers = struct {
pub fn unprotect(this: *Handlers) void {
this.onError.unprotect();
+ this.onGoAway.unprotect();
this.onWrite.unprotect();
this.onStreamError.unprotect();
this.onStreamStart.unprotect();
@@ -256,6 +328,10 @@ const Handlers = struct {
this.onStreamError.unprotect();
this.onLocalSettings.unprotect();
this.onRemoteSettings.unprotect();
+ this.onWantTrailers.unprotect();
+ this.onPing.unprotect();
+ this.onEnd.unprotect();
+ this.onFrameError.unprotect();
}
pub fn clear(this: *Handlers) void {
@@ -269,6 +345,11 @@ const Handlers = struct {
this.onStreamError = .zero;
this.onLocalSettings = .zero;
this.onRemoteSettings = .zero;
+ this.onWantTrailers = .zero;
+ this.onPing = .zero;
+ this.onEnd = .zero;
+ this.onGoAway = .zero;
+ this.onFrameError = .zero;
}
pub fn protect(this: *Handlers) void {
@@ -282,12 +363,22 @@ const Handlers = struct {
this.onStreamError.protect();
this.onLocalSettings.protect();
this.onRemoteSettings.protect();
+ this.onWantTrailers.protect();
+ this.onEnd.protect();
+ this.onGoAway.protect();
+ this.onFrameError.protect();
}
};
pub const H2FrameParser = struct {
pub const log = Output.scoped(.H2FrameParser, false);
pub usingnamespace JSC.Codegen.JSH2FrameParser;
+ const MAX_WINDOW_SIZE = 2147483647;
+ const MAX_HEADER_TABLE_SIZE = 4294967295;
+ const MAX_STREAM_ID = 2147483647;
+ const WINDOW_INCREMENT_SIZE = 65536;
+ const MAX_HPACK_HEADER_SIZE = 65536;
+ const MAX_FRAME_SIZE = 16777215;
strong_ctx: JSC.Strong = .{},
allocator: Allocator,
@@ -301,12 +392,336 @@ pub const H2FrameParser = struct {
remainingLength: i32 = 0,
// buffer if more data is needed for the current frame
readBuffer: MutableString,
+ // current window size for the connection
+ windowSize: u32 = 65535,
+ // used window size for the connection
+ usedWindowSize: u32 = 0,
+ lastStreamID: u32 = 0,
+ streams: bun.U32HashMap(Stream),
+ const Stream = struct {
+ id: u32 = 0,
+ state: enum(u8) {
+ IDLE = 0,
+ RESERVED_LOCAL = 1,
+ RESERVED_REMOTE = 2,
+ OPEN = 3,
+ HALF_CLOSED_LOCAL = 4,
+ HALF_CLOSED_REMOTE = 5,
+ CLOSED = 6,
+ } = .IDLE,
+ waitForTrailers: bool = false,
+ endAfterHeaders: bool = false,
+ isWaitingMoreHeaders: bool = false,
+ padding: ?u8 = 0,
+ rstCode: u32 = 0,
+ sentHeaders: JSC.JSValue = .zero,
+ streamDependency: u32 = 0,
+ exclusive: bool = false,
+ weight: u16 = 36,
+ // current window size for the stream
+ windowSize: u32 = 65535,
+ // used window size for the stream
+ usedWindowSize: u32 = 0,
+
+ decoder: lshpack.lshpack_dec = undefined,
+ encoder: lshpack.lshpack_enc = undefined,
+ signal: ?*JSC.WebCore.AbortSignal = null,
+
+ pub fn init(streamIdentifier: u32, initialWindowSize: u32, headerTableSize: u32) Stream {
+ var stream = Stream{
+ .id = streamIdentifier,
+ .state = .OPEN,
+ .windowSize = initialWindowSize,
+ .usedWindowSize = 0,
+ .weight = 36,
+ };
+
+ if (lshpack.lshpack_enc_init(&stream.encoder) != 0) {
+ @panic("OOM");
+ }
+ lshpack.lshpack_dec_init(&stream.decoder);
+ lshpack.lshpack_enc_set_max_capacity(&stream.encoder, headerTableSize);
+ lshpack.lshpack_dec_set_max_capacity(&stream.decoder, headerTableSize);
+
+ return stream;
+ }
+
+ pub fn canReceiveData(this: *Stream) bool {
+ return switch (this.state) {
+ .IDLE, .RESERVED_LOCAL, .RESERVED_REMOTE, .OPEN, .HALF_CLOSED_LOCAL => false,
+ .HALF_CLOSED_REMOTE, .CLOSED => true,
+ };
+ }
- pub fn dispatch(this: *H2FrameParser, comptime event: []const u8, value: JSC.JSValue) void {
+ pub fn canSendData(this: *Stream) bool {
+ return switch (this.state) {
+ .IDLE, .RESERVED_LOCAL, .RESERVED_REMOTE, .OPEN, .HALF_CLOSED_REMOTE => false,
+ .HALF_CLOSED_LOCAL, .CLOSED => true,
+ };
+ }
+
+ pub fn attachSignal(this: *Stream, signal: *JSC.WebCore.AbortSignal) void {
+ _ = signal.ref();
+ this.signal = signal.listen(Stream, this, Stream.abortListener);
+ }
+
+ pub fn abortListener(this: *Stream, reason: JSValue) void {
+ log("abortListener", .{});
+ reason.ensureStillAlive();
+ _ = this;
+ //TODO: send RST_STREAM
+ }
+
+ const HeaderValue = struct {
+ name: []const u8,
+ value: []const u8,
+ next: usize,
+ };
+
+ pub fn decode(this: *Stream, header_buffer: *[MAX_HPACK_HEADER_SIZE]u8, src_buffer: []const u8) !HeaderValue {
+ var xhdr: lshpack.lsxpack_header = .{};
+
+ lshpack.lsxpack_header_prepare_decode(&xhdr, header_buffer.ptr, 0, header_buffer.len);
+ var start = @intFromPtr(src_buffer.ptr);
+ var src = src_buffer.ptr;
+ if (lshpack.lshpack_dec_decode(&this.decoder, &src, @ptrFromInt(start + src_buffer.len), &xhdr) != 0) {
+ return error.UnableToDecode;
+ }
+ const name = lshpack.lsxpack_header_get_name(&xhdr);
+ if (name.len == 0) {
+ return error.EmptyHeaderName;
+ }
+ return .{
+ .name = name,
+ .value = lshpack.lsxpack_header_get_value(&xhdr),
+ .next = @intFromPtr(src) - start,
+ };
+ }
+
+ pub fn encode(this: *Stream, header_buffer: *[MAX_HPACK_HEADER_SIZE]u8, dst_buffer: []const u8, name: []const u8, value: []const u8, never_index: bool) !usize {
+ var xhdr: lshpack.lsxpack_header = .{ .indexed_type = if (never_index) 2 else 0 };
+ const size = name.len + value.len;
+ if (size > MAX_HPACK_HEADER_SIZE) {
+ return error.HeaderTooLarge;
+ }
+
+ @memcpy(header_buffer[0..name.len], name);
+ @memcpy(header_buffer[name.len..size], value);
+ lshpack.lsxpack_header_set_offset2(&xhdr, header_buffer.ptr, 0, name.len, name.len, value.len);
+ if (never_index) {
+ xhdr.indexed_type = 2;
+ }
+
+ var start = @intFromPtr(dst_buffer.ptr);
+ const ptr = lshpack.lshpack_enc_encode(&this.encoder, dst_buffer.ptr, @ptrFromInt(start + dst_buffer.len), &xhdr);
+ const end = @intFromPtr(ptr) - start;
+ if (end > 0) {
+ return end;
+ }
+ return error.UnableToEncode;
+ }
+
+ pub fn deinit(this: *Stream) void {
+ lshpack.lshpack_dec_cleanup(&this.decoder);
+ lshpack.lshpack_enc_cleanup(&this.encoder);
+ if (this.signal) |signal| {
+ this.signal = null;
+ signal.detach(this);
+ }
+ this.sentHeaders.unprotect();
+ this.sentHeaders = .zero;
+ }
+ };
+
+ /// Calculate the new window size for the connection and the stream
+ /// https://datatracker.ietf.org/doc/html/rfc7540#section-6.9.1
+ fn ajustWindowSize(this: *H2FrameParser, stream: ?*Stream, payloadSize: u32) void {
+ this.usedWindowSize += payloadSize;
+ if (this.usedWindowSize >= this.windowSize) {
+ var increment_size: u32 = WINDOW_INCREMENT_SIZE;
+ var new_size = this.windowSize + increment_size;
+ if (new_size > MAX_WINDOW_SIZE) {
+ new_size = MAX_WINDOW_SIZE;
+ increment_size = this.windowSize - MAX_WINDOW_SIZE;
+ }
+ if (new_size == this.windowSize) {
+ this.sendGoAway(0, .FLOW_CONTROL_ERROR, "Window size overflow", this.lastStreamID);
+ return;
+ }
+ this.windowSize = new_size;
+ this.sendWindowUpdate(0, UInt31WithReserved.from(increment_size));
+ }
+
+ if (stream) |s| {
+ s.usedWindowSize += payloadSize;
+ if (s.usedWindowSize >= s.windowSize) {
+ var increment_size: u32 = WINDOW_INCREMENT_SIZE;
+ var new_size = s.windowSize + increment_size;
+ if (new_size > MAX_WINDOW_SIZE) {
+ new_size = MAX_WINDOW_SIZE;
+ increment_size = s.windowSize - MAX_WINDOW_SIZE;
+ }
+ s.windowSize = new_size;
+ this.sendWindowUpdate(s.id, UInt31WithReserved.from(increment_size));
+ }
+ }
+ }
+
+ pub fn setSettings(this: *H2FrameParser, settings: FullSettingsPayload) void {
+ var buffer: [FrameHeader.byteSize + FullSettingsPayload.byteSize]u8 = undefined;
+ @memset(&buffer, 0);
+ var stream = std.io.fixedBufferStream(&buffer);
+ const writer = stream.writer();
+ var settingsHeader: FrameHeader = .{
+ .type = @intFromEnum(FrameType.HTTP_FRAME_SETTINGS),
+ .flags = 0,
+ .streamIdentifier = 0,
+ .length = 36,
+ };
+ settingsHeader.write(@TypeOf(writer), writer);
+ this.localSettings = settings;
+ this.localSettings.write(@TypeOf(writer), writer);
+ this.write(&buffer);
+ this.ajustWindowSize(null, @intCast(buffer.len));
+ }
+
+ pub fn endStream(this: *H2FrameParser, stream: *Stream, rstCode: ErrorCode) void {
+ var buffer: [FrameHeader.byteSize + 4]u8 = undefined;
+ @memset(&buffer, 0);
+ var writerStream = std.io.fixedBufferStream(&buffer);
+ const writer = writerStream.writer();
+
+ var frame: FrameHeader = .{
+ .type = @intFromEnum(FrameType.HTTP_FRAME_RST_STREAM),
+ .flags = 0,
+ .streamIdentifier = stream.id,
+ .length = 4,
+ };
+ frame.write(@TypeOf(writer), writer);
+ var value: u32 = @intFromEnum(rstCode);
+ stream.rstCode = value;
+ if (native_endian != .Big) {
+ value = @byteSwap(value);
+ }
+ _ = writer.write(std.mem.asBytes(&value)) catch 0;
+
+ stream.state = .CLOSED;
+ if (rstCode == .NO_ERROR) {
+ this.dispatchWithExtra(.onStreamEnd, JSC.JSValue.jsNumber(stream.id), JSC.JSValue.jsUndefined());
+ } else {
+ this.dispatchWithExtra(.onStreamError, JSC.JSValue.jsNumber(stream.id), JSC.JSValue.jsNumber(value));
+ }
+
+ this.write(&buffer);
+ }
+
+ pub fn sendGoAway(this: *H2FrameParser, streamIdentifier: u32, rstCode: ErrorCode, debug_data: []const u8, lastStreamID: u32) void {
+ var buffer: [FrameHeader.byteSize + 8]u8 = undefined;
+ @memset(&buffer, 0);
+ var stream = std.io.fixedBufferStream(&buffer);
+ const writer = stream.writer();
+
+ var frame: FrameHeader = .{
+ .type = @intFromEnum(FrameType.HTTP_FRAME_GOAWAY),
+ .flags = 0,
+ .streamIdentifier = streamIdentifier,
+ .length = @intCast(8 + debug_data.len),
+ };
+ frame.write(@TypeOf(writer), writer);
+ var last_id = UInt31WithReserved.from(lastStreamID);
+ last_id.write(@TypeOf(writer), writer);
+ var value: u32 = @intFromEnum(rstCode);
+ if (native_endian != .Big) {
+ value = @byteSwap(value);
+ }
+ _ = writer.write(std.mem.asBytes(&value)) catch 0;
+
+ this.write(&buffer);
+ if (debug_data.len > 0) {
+ this.write(debug_data);
+ }
+ const chunk = this.handlers.binary_type.toJS(debug_data, this.handlers.globalObject);
+ if (rstCode != .NO_ERROR) {
+ this.dispatchWith2Extra(.onError, JSC.JSValue.jsNumber(value), JSC.JSValue.jsNumber(this.lastStreamID), chunk);
+ }
+ this.dispatchWithExtra(.onEnd, JSC.JSValue.jsNumber(this.lastStreamID), chunk);
+ }
+
+ pub fn sendPing(this: *H2FrameParser, ack: bool, payload: []const u8) void {
+ var buffer: [FrameHeader.byteSize + 8]u8 = undefined;
+ @memset(&buffer, 0);
+ var stream = std.io.fixedBufferStream(&buffer);
+ const writer = stream.writer();
+ var frame = FrameHeader{
+ .type = @intFromEnum(FrameType.HTTP_FRAME_PING),
+ .flags = if (ack) @intFromEnum(PingFrameFlags.ACK) else 0,
+ .streamIdentifier = 0,
+ .length = 8,
+ };
+ frame.write(@TypeOf(writer), writer);
+ _ = writer.write(payload) catch 0;
+ this.write(&buffer);
+ }
+
+ pub fn sendPrefaceAndSettings(this: *H2FrameParser) void {
+ // PREFACE + Settings Frame
+ var preface_buffer: [24 + FrameHeader.byteSize + FullSettingsPayload.byteSize]u8 = undefined;
+ @memset(&preface_buffer, 0);
+ var preface_stream = std.io.fixedBufferStream(&preface_buffer);
+ const writer = preface_stream.writer();
+ _ = writer.write("PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n") catch 0;
+ var settingsHeader: FrameHeader = .{
+ .type = @intFromEnum(FrameType.HTTP_FRAME_SETTINGS),
+ .flags = 0,
+ .streamIdentifier = 0,
+ .length = 36,
+ };
+ settingsHeader.write(@TypeOf(writer), writer);
+ this.localSettings.write(@TypeOf(writer), writer);
+ this.write(&preface_buffer);
+ this.ajustWindowSize(null, @intCast(preface_buffer.len));
+ }
+
+ pub fn sendWindowUpdate(this: *H2FrameParser, streamIdentifier: u32, windowSize: UInt31WithReserved) void {
+ var buffer: [FrameHeader.byteSize + 4]u8 = undefined;
+ @memset(&buffer, 0);
+ var stream = std.io.fixedBufferStream(&buffer);
+ const writer = stream.writer();
+ var settingsHeader: FrameHeader = .{
+ .type = @intFromEnum(FrameType.HTTP_FRAME_WINDOW_UPDATE),
+ .flags = 0,
+ .streamIdentifier = streamIdentifier,
+ .length = 4,
+ };
+ settingsHeader.write(@TypeOf(writer), writer);
+ // always clear reserved bit
+ const cleanWindowSize: UInt31WithReserved = .{
+ .reserved = false,
+ .uint31 = windowSize.uint31,
+ };
+ cleanWindowSize.write(@TypeOf(writer), writer);
+ this.write(&buffer);
+ }
+
+ pub fn dispatch(this: *H2FrameParser, comptime event: @Type(.EnumLiteral), value: JSC.JSValue) void {
JSC.markBinding(@src());
const ctx_value = this.strong_ctx.get() orelse JSC.JSValue.jsUndefined();
value.ensureStillAlive();
- _ = this.handlers.callEvent(event, ctx_value, &[_]JSC.JSValue{ ctx_value, value });
+ _ = this.handlers.callEventHandler(event, ctx_value, &[_]JSC.JSValue{ ctx_value, value });
+ }
+
+ pub fn dispatchWithExtra(this: *H2FrameParser, comptime event: @Type(.EnumLiteral), value: JSC.JSValue, extra: JSC.JSValue) void {
+ JSC.markBinding(@src());
+ const ctx_value = this.strong_ctx.get() orelse JSC.JSValue.jsUndefined();
+ value.ensureStillAlive();
+ _ = this.handlers.callEventHandler(event, ctx_value, &[_]JSC.JSValue{ ctx_value, value, extra });
+ }
+
+ pub fn dispatchWith2Extra(this: *H2FrameParser, comptime event: @Type(.EnumLiteral), value: JSC.JSValue, extra: JSC.JSValue, extra2: JSC.JSValue) void {
+ JSC.markBinding(@src());
+ const ctx_value = this.strong_ctx.get() orelse JSC.JSValue.jsUndefined();
+ value.ensureStillAlive();
+ _ = this.handlers.callEventHandler(event, ctx_value, &[_]JSC.JSValue{ ctx_value, value, extra, extra2 });
}
pub fn write(this: *H2FrameParser, bytes: []const u8) void {
@@ -326,71 +741,422 @@ pub const H2FrameParser = struct {
return JSC.JSValue.jsUndefined();
}
+
+ const Payload = struct {
+ data: []const u8,
+ end: usize,
+ };
+
+ // Default handling for payload is buffering it
+ // for data frames we use another strategy
+ pub fn handleIncommingPayload(this: *H2FrameParser, data: []const u8, streamIdentifier: u32) ?Payload {
+ const end: usize = @min(@as(usize, @intCast(this.remainingLength)), data.len);
+ const payload = data[0..end];
+ this.remainingLength -= @intCast(end);
+ if (this.remainingLength > 0) {
+ // buffer more data
+ _ = this.readBuffer.appendSlice(payload) catch @panic("OOM");
+ return null;
+ } else if (this.remainingLength < 0) {
+ this.sendGoAway(streamIdentifier, ErrorCode.FRAME_SIZE_ERROR, "Invalid frame size", this.lastStreamID);
+ return null;
+ }
+
+ this.currentFrame = null;
+ return .{
+ .data = payload,
+ .end = end,
+ };
+ }
+
+ pub fn handleWindowUpdateFrame(this: *H2FrameParser, frame: FrameHeader, data: []const u8, stream: ?*Stream) usize {
+ // must be always 4 bytes (https://datatracker.ietf.org/doc/html/rfc7540#section-6.9)
+ if (frame.length != 4) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.FRAME_SIZE_ERROR, "Invalid dataframe frame size", this.lastStreamID);
+ return data.len;
+ }
+
+ if (handleIncommingPayload(this, data, frame.streamIdentifier)) |content| {
+ const payload = content.data;
+ const windowSizeIncrement = UInt31WithReserved.fromBytes(payload);
+ this.readBuffer.reset();
+ // we automatically send a window update when receiving one
+ this.sendWindowUpdate(frame.streamIdentifier, windowSizeIncrement);
+ if (stream) |s| {
+ s.windowSize += windowSizeIncrement.uint31;
+ } else {
+ this.windowSize += windowSizeIncrement.uint31;
+ }
+ log("windowSizeIncrement stream {} value {}", .{ frame.streamIdentifier, windowSizeIncrement.uint31 });
+ return content.end;
+ }
+ // needs more data
+ return data.len;
+ }
+
+ pub fn decodeHeaderBlock(this: *H2FrameParser, payload: []const u8, stream: *Stream, flags: u8) void {
+ log("decodeHeaderBlock", .{});
+
+ var header_buffer: [MAX_HPACK_HEADER_SIZE]u8 = undefined;
+ var offset: usize = 0;
+
+ const globalObject = this.handlers.globalObject;
+
+ const headers = JSC.JSValue.createEmptyArray(globalObject, 0);
+
+ while (true) {
+ const header = stream.decode(&header_buffer, payload[offset..]) catch break;
+ offset += header.next;
+ var result = JSValue.createEmptyObject(globalObject, 2);
+ const name = JSC.ZigString.fromUTF8(header.name).toValueGC(globalObject);
+ const value = JSC.ZigString.fromUTF8(header.value).toValueGC(globalObject);
+ result.put(globalObject, JSC.ZigString.static("name"), name);
+ result.put(globalObject, JSC.ZigString.static("value"), value);
+ headers.push(globalObject, result);
+ if (offset >= payload.len) {
+ break;
+ }
+ }
+
+ this.dispatchWith2Extra(.onStreamHeaders, JSC.JSValue.jsNumber(stream.id), headers, JSC.JSValue.jsNumber(flags));
+ }
+
+ pub fn handleDataFrame(this: *H2FrameParser, frame: FrameHeader, data: []const u8, stream_: ?*Stream) usize {
+ if (stream_ == null) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.PROTOCOL_ERROR, "Data frame on connection stream", this.lastStreamID);
+ return data.len;
+ }
+ var settings = this.remoteSettings orelse this.localSettings;
+
+ if (frame.length > settings.maxFrameSize) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.FRAME_SIZE_ERROR, "Invalid dataframe frame size", this.lastStreamID);
+ return data.len;
+ }
+
+ var stream = stream_.?;
+ this.readBuffer.reset();
+
+ const end: usize = @min(@as(usize, @intCast(this.remainingLength)), data.len);
+ var payload = data[0..end];
+
+ var data_needed: isize = this.remainingLength;
+
+ this.remainingLength -= @intCast(end);
+ var padding: u8 = 0;
+ if (frame.flags & @intFromEnum(DataFrameFlags.PADDED) != 0) {
+ if (stream.padding) |p| {
+ padding = p;
+ } else {
+ if (payload.len == 0) {
+ // await more data because we need to know the padding length
+ return data.len;
+ }
+ padding = payload[0];
+ stream.padding = payload[0];
+ payload = payload[1..];
+ }
+ }
+
+ if (this.remainingLength < 0) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.FRAME_SIZE_ERROR, "Invalid data frame size", this.lastStreamID);
+ return data.len;
+ }
+
+ // ignore padding
+ if (data_needed > padding) {
+ data_needed -= padding;
+ payload = payload[0..@min(@as(usize, @intCast(data_needed)), payload.len)];
+ const chunk = this.handlers.binary_type.toJS(payload, this.handlers.globalObject);
+ this.dispatchWithExtra(.onStreamData, JSC.JSValue.jsNumber(frame.streamIdentifier), chunk);
+ } else {
+ data_needed = 0;
+ }
+
+ if (this.remainingLength == 0) {
+ this.currentFrame = null;
+ if (frame.flags & @intFromEnum(DataFrameFlags.END_STREAM) != 0) {
+ stream.state = .HALF_CLOSED_REMOTE;
+ this.dispatch(.onStreamEnd, JSC.JSValue.jsNumber(frame.streamIdentifier));
+ }
+ }
+
+ return end;
+ }
+ pub fn handleGoAwayFrame(this: *H2FrameParser, frame: FrameHeader, data: []const u8, stream_: ?*Stream) usize {
+ if (stream_ != null) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.PROTOCOL_ERROR, "GoAway frame on stream", this.lastStreamID);
+ return data.len;
+ }
+ var settings = this.remoteSettings orelse this.localSettings;
+
+ if (frame.length < 8 or frame.length > settings.maxFrameSize) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.FRAME_SIZE_ERROR, "invalid GoAway frame size", this.lastStreamID);
+ return data.len;
+ }
+
+ if (handleIncommingPayload(this, data, frame.streamIdentifier)) |content| {
+ const payload = content.data;
+ const last_stream_id: u32 = @intCast(UInt31WithReserved.fromBytes(payload[0..4]).uint31);
+ const error_code = UInt31WithReserved.fromBytes(payload[4..8]).toUInt32();
+ const chunk = this.handlers.binary_type.toJS(payload[8..], this.handlers.globalObject);
+ if (error_code != @intFromEnum(ErrorCode.NO_ERROR)) {
+ this.dispatchWith2Extra(.onGoAway, JSC.JSValue.jsNumber(error_code), JSC.JSValue.jsNumber(last_stream_id), chunk);
+ } else {
+ this.dispatchWithExtra(.onGoAway, JSC.JSValue.jsNumber(last_stream_id), chunk);
+ }
+ this.readBuffer.reset();
+ return content.end;
+ }
+ return data.len;
+ }
+ pub fn handleRSTStreamFrame(this: *H2FrameParser, frame: FrameHeader, data: []const u8, stream_: ?*Stream) usize {
+ if (stream_ == null) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.PROTOCOL_ERROR, "RST_STREAM frame on connection stream", this.lastStreamID);
+ return data.len;
+ }
+ if (frame.length != 4) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.FRAME_SIZE_ERROR, "invalid RST_STREAM frame size", this.lastStreamID);
+ return data.len;
+ }
+
+ var stream = stream_.?;
+
+ if (stream.isWaitingMoreHeaders) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.PROTOCOL_ERROR, "Headers frame without continuation", this.lastStreamID);
+ return data.len;
+ }
+
+ if (handleIncommingPayload(this, data, frame.streamIdentifier)) |content| {
+ const payload = content.data;
+ const rst_code = UInt31WithReserved.fromBytes(payload).toUInt32();
+ stream.rstCode = rst_code;
+ this.readBuffer.reset();
+ if (rst_code != @intFromEnum(ErrorCode.NO_ERROR)) {
+ this.dispatchWithExtra(.onStreamError, JSC.JSValue.jsNumber(stream.id), JSC.JSValue.jsNumber(rst_code));
+ }
+ this.endStream(stream, ErrorCode.NO_ERROR);
+
+ return content.end;
+ }
+ return data.len;
+ }
+ pub fn handlePingFrame(this: *H2FrameParser, frame: FrameHeader, data: []const u8, stream_: ?*Stream) usize {
+ if (stream_ != null) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.PROTOCOL_ERROR, "Ping frame on stream", this.lastStreamID);
+ return data.len;
+ }
+
+ if (frame.length != 8) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.FRAME_SIZE_ERROR, "Invalid ping frame size", this.lastStreamID);
+ return data.len;
+ }
+
+ if (handleIncommingPayload(this, data, frame.streamIdentifier)) |content| {
+ const payload = content.data;
+ this.dispatch(.onPing, this.handlers.binary_type.toJS(payload, this.handlers.globalObject));
+ // if is not ACK send response
+ if (frame.flags & @intFromEnum(PingFrameFlags.ACK) == 0) {
+ this.sendPing(true, payload);
+ }
+ this.readBuffer.reset();
+ return content.end;
+ }
+ return data.len;
+ }
+ pub fn handlePriorityFrame(this: *H2FrameParser, frame: FrameHeader, data: []const u8, stream_: ?*Stream) usize {
+ if (stream_ == null) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.PROTOCOL_ERROR, "Priority frame on connection stream", this.lastStreamID);
+ return data.len;
+ }
+
+ if (frame.length != StreamPriority.byteSize) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.FRAME_SIZE_ERROR, "invalid Priority frame size", this.lastStreamID);
+ return data.len;
+ }
+
+ var stream = stream_.?;
+
+ if (handleIncommingPayload(this, data, frame.streamIdentifier)) |content| {
+ const payload = content.data;
+
+ var priority: StreamPriority = undefined;
+ priority.from(payload);
+
+ const stream_identifier = UInt31WithReserved.from(priority.streamIdentifier);
+ stream.streamDependency = stream_identifier.uint31;
+ stream.exclusive = stream_identifier.reserved;
+ stream.weight = priority.weight;
+
+ this.readBuffer.reset();
+ return content.end;
+ }
+ return data.len;
+ }
+ pub fn handleContinuationFrame(this: *H2FrameParser, frame: FrameHeader, data: []const u8, stream_: ?*Stream) usize {
+ if (stream_ == null) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.PROTOCOL_ERROR, "Continuation on connection stream", this.lastStreamID);
+ return data.len;
+ }
+ var stream = stream_.?;
+ if (!stream.isWaitingMoreHeaders) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.PROTOCOL_ERROR, "Continuation without headers", this.lastStreamID);
+ return data.len;
+ }
+ if (handleIncommingPayload(this, data, frame.streamIdentifier)) |content| {
+ const payload = content.data;
+ this.decodeHeaderBlock(payload[0..payload.len], stream, frame.flags);
+ this.readBuffer.reset();
+ if (frame.flags & @intFromEnum(HeadersFrameFlags.END_HEADERS) != 0) {
+ if (stream.state == .HALF_CLOSED_REMOTE) {
+ // no more continuation headers we can call it closed
+ stream.state = .CLOSED;
+ this.dispatch(.onStreamEnd, JSC.JSValue.jsNumber(frame.streamIdentifier));
+ }
+ stream.isWaitingMoreHeaders = false;
+ }
+
+ this.readBuffer.reset();
+ return content.end;
+ }
+
+ // needs more data
+ return data.len;
+ }
+
+ pub fn handleHeadersFrame(this: *H2FrameParser, frame: FrameHeader, data: []const u8, stream_: ?*Stream) usize {
+ if (stream_ == null) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.PROTOCOL_ERROR, "Headers frame on connection stream", this.lastStreamID);
+ return data.len;
+ }
+ var settings = this.remoteSettings orelse this.localSettings;
+ if (frame.length > settings.maxFrameSize) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.FRAME_SIZE_ERROR, "invalid Headers frame size", this.lastStreamID);
+ return data.len;
+ }
+ var stream = stream_.?;
+
+ if (stream.isWaitingMoreHeaders) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.PROTOCOL_ERROR, "Headers frame without continuation", this.lastStreamID);
+ return data.len;
+ }
+
+ if (handleIncommingPayload(this, data, frame.streamIdentifier)) |content| {
+ const payload = content.data;
+ var offset: usize = 0;
+ var padding: usize = 0;
+ if (frame.flags & @intFromEnum(HeadersFrameFlags.PADDED) != 0) {
+ // padding length
+ padding = payload[0];
+ offset += 1;
+ }
+ if (frame.flags & @intFromEnum(HeadersFrameFlags.PRIORITY) != 0) {
+ // skip priority (client dont need to care about it)
+ offset += 5;
+ }
+ this.decodeHeaderBlock(payload[offset .. payload.len - padding], stream, frame.flags);
+ stream.isWaitingMoreHeaders = frame.flags & @intFromEnum(HeadersFrameFlags.END_HEADERS) != 0;
+ if (frame.flags & @intFromEnum(HeadersFrameFlags.END_STREAM) != 0) {
+ if (stream.isWaitingMoreHeaders) {
+ stream.state = .HALF_CLOSED_REMOTE;
+ } else {
+ // no more continuation headers we can call it closed
+ stream.state = .CLOSED;
+ this.dispatch(.onStreamEnd, JSC.JSValue.jsNumber(frame.streamIdentifier));
+ }
+ }
+ this.readBuffer.reset();
+ return content.end;
+ }
+
+ // needs more data
+ return data.len;
+ }
pub fn handleSettingsFrame(this: *H2FrameParser, frame: FrameHeader, data: []const u8) usize {
if (frame.streamIdentifier != 0) {
- // this.#connection.write(createGoAwayFrameBuffer(this.#lastStreamID, ErrorCode.PROTOCOL_ERROR, Buffer.alloc(0)));
-
- // throw new Error("PROTOCOL_ERROR");
- log("PROTOCOL_ERROR", .{});
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.PROTOCOL_ERROR, "Settings frame on connection stream", this.lastStreamID);
return data.len;
}
+
const settingByteSize = SettingsPayloadUnit.byteSize;
if (frame.length > 0) {
- if (frame.flags & 0x1 or frame.length % settingByteSize != 0) {
- // this.#connection.write(
- // createGoAwayFrameBuffer(this.#lastStreamID, ErrorCode.FRAME_SIZE_ERROR, Buffer.alloc(0)),
- // );
- log("FRAME_SIZE_ERROR", .{});
+ if (frame.flags & 0x1 != 0 or frame.length % settingByteSize != 0) {
+ this.sendGoAway(frame.streamIdentifier, ErrorCode.FRAME_SIZE_ERROR, "Invalid settings frame size", this.lastStreamID);
return data.len;
}
} else {
- if (frame.flags & 0x1) {
+ if (frame.flags & 0x1 != 0) {
// we received an ACK
- this.remoteSettings = &this.localSettings;
+ this.remoteSettings = this.localSettings;
this.dispatch(.onLocalSettings, this.localSettings.toJS(this.handlers.globalObject));
}
+ this.currentFrame = null;
return 0;
}
- const end: i32 = @min(frame.remainingLength, data.len);
- const payload = data[0..end];
- this.remainingLength -= end;
- if (this.remainingLength > 0) {
- // buffer more data
- _ = this.readBuffer.appendSlice(payload) catch @panic("OOM");
- return data.len;
- } else if (this.remainingLength < 0) {
- // this.#connection.write(
- // createGoAwayFrameBuffer(this.#lastStreamID, ErrorCode.FRAME_SIZE_ERROR, Buffer.alloc(0)),
- // );
- log("FRAME_SIZE_ERROR", .{});
- return data.len;
+ if (handleIncommingPayload(this, data, frame.streamIdentifier)) |content| {
+ var remoteSettings = this.remoteSettings orelse this.localSettings;
+ var i: usize = 0;
+ const payload = content.data;
+ while (i < payload.len) {
+ defer i += settingByteSize;
+ var unit: SettingsPayloadUnit = undefined;
+ SettingsPayloadUnit.from(&unit, payload[i .. i + settingByteSize], 0, true);
+ remoteSettings.updateWith(unit);
+ }
+ this.readBuffer.reset();
+ this.remoteSettings = remoteSettings;
+ this.dispatch(.onRemoteSettings, remoteSettings.toJS(this.handlers.globalObject));
+ return content.end;
}
+ // needs more data
+ return data.len;
+ }
- this.currentFrame = null;
- var remoteSettings = this.remoteSettings orelse this.localSettings;
- var i: usize = 0;
- while (i < payload.len) {
- defer i += settingByteSize;
- var unit: SettingsPayloadUnit = undefined;
- SettingsPayloadUnit.from(&unit, payload[i .. i + settingByteSize], 0, true);
- remoteSettings.updateWith(unit);
+ fn handleReceivedStreamID(this: *H2FrameParser, streamIdentifier: u32) ?*Stream {
+ // connection stream
+ if (streamIdentifier == 0) {
+ return null;
}
- this.remoteSettings = remoteSettings;
- this.dispatch(.onRemoteSettings, remoteSettings.toJS(this.handlers.globalObject));
- // console.log(this.#settings);
- // this.#compressor = hpack.compressor.create({ table: { size: this.#settings.headerTableSize } });
- // this.#decompressor = hpack.decompressor.create({ table: { size: this.#settings.headerTableSize } });
+ // already exists
+ if (this.streams.getEntry(streamIdentifier)) |entry| {
+ return entry.value_ptr;
+ }
- return end;
+ if (streamIdentifier > this.lastStreamID) {
+ this.lastStreamID = streamIdentifier;
+ }
+
+ // new stream open
+ const settings = this.remoteSettings orelse this.localSettings;
+ var entry = this.streams.getOrPut(streamIdentifier) catch @panic("OOM");
+ entry.value_ptr.* = Stream.init(streamIdentifier, settings.initialWindowSize, settings.headerTableSize);
+
+ this.dispatch(.onStreamStart, JSC.JSValue.jsNumber(streamIdentifier));
+ return entry.value_ptr;
}
pub fn readBytes(this: *H2FrameParser, bytes: []u8) usize {
log("read", .{});
if (this.currentFrame) |header| {
- log("header {} {} {} {}", .{ header.type, header.length, header.flags, header.streamIdentifier });
- return bytes.len;
+ log("current frame {} {} {} {}", .{ header.type, header.length, header.flags, header.streamIdentifier });
+
+ const stream = this.handleReceivedStreamID(header.streamIdentifier);
+ return switch (@as(FrameType, @enumFromInt(header.type))) {
+ FrameType.HTTP_FRAME_SETTINGS => this.handleSettingsFrame(header, bytes),
+ FrameType.HTTP_FRAME_WINDOW_UPDATE => this.handleWindowUpdateFrame(header, bytes, stream),
+ FrameType.HTTP_FRAME_HEADERS => this.handleHeadersFrame(header, bytes, stream),
+ FrameType.HTTP_FRAME_DATA => this.handleDataFrame(header, bytes, stream),
+ FrameType.HTTP_FRAME_CONTINUATION => this.handleContinuationFrame(header, bytes, stream),
+ FrameType.HTTP_FRAME_PRIORITY => this.handlePriorityFrame(header, bytes, stream),
+ FrameType.HTTP_FRAME_PING => this.handlePingFrame(header, bytes, stream),
+ FrameType.HTTP_FRAME_GOAWAY => this.handleGoAwayFrame(header, bytes, stream),
+ FrameType.HTTP_FRAME_RST_STREAM => this.handleRSTStreamFrame(header, bytes, stream),
+ else => {
+ this.sendGoAway(header.streamIdentifier, ErrorCode.PROTOCOL_ERROR, "Unknown frame type", this.lastStreamID);
+ return bytes.len;
+ },
+ };
}
// nothing to do
@@ -418,12 +1184,21 @@ pub const H2FrameParser = struct {
this.currentFrame = header;
this.remainingLength = header.length;
- log("header {} {} {} {}", .{ header.type, header.length, header.flags, header.streamIdentifier });
-
+ log("new frame {} {} {} {}", .{ header.type, header.length, header.flags, header.streamIdentifier });
+ const stream = this.handleReceivedStreamID(header.streamIdentifier);
+ this.ajustWindowSize(stream, header.length);
return switch (@as(FrameType, @enumFromInt(header.type))) {
FrameType.HTTP_FRAME_SETTINGS => this.handleSettingsFrame(header, bytes[needed..]) + needed,
+ FrameType.HTTP_FRAME_WINDOW_UPDATE => this.handleWindowUpdateFrame(header, bytes[needed..], stream) + needed,
+ FrameType.HTTP_FRAME_HEADERS => this.handleHeadersFrame(header, bytes[needed..], stream) + needed,
+ FrameType.HTTP_FRAME_DATA => this.handleDataFrame(header, bytes[needed..], stream) + needed,
+ FrameType.HTTP_FRAME_CONTINUATION => this.handleContinuationFrame(header, bytes[needed..], stream) + needed,
+ FrameType.HTTP_FRAME_PRIORITY => this.handlePriorityFrame(header, bytes[needed..], stream) + needed,
+ FrameType.HTTP_FRAME_PING => this.handlePingFrame(header, bytes[needed..], stream) + needed,
+ FrameType.HTTP_FRAME_GOAWAY => this.handleGoAwayFrame(header, bytes[needed..], stream) + needed,
+ FrameType.HTTP_FRAME_RST_STREAM => this.handleRSTStreamFrame(header, bytes[needed..], stream) + needed,
else => {
- log("not implemented {}", .{header.type});
+ this.sendGoAway(header.streamIdentifier, ErrorCode.PROTOCOL_ERROR, "Unknown frame type", this.lastStreamID);
return bytes.len;
},
};
@@ -437,18 +1212,573 @@ pub const H2FrameParser = struct {
FrameHeader.from(&header, bytes[0..FrameHeader.byteSize], 0, true);
- log("header {} {} {} {}", .{ header.type, header.length, header.flags, header.streamIdentifier });
+ log("new frame {} {} {} {}", .{ header.type, header.length, header.flags, header.streamIdentifier });
this.currentFrame = header;
this.remainingLength = header.length;
+ const stream = this.handleReceivedStreamID(header.streamIdentifier);
+ this.ajustWindowSize(stream, header.length);
return switch (@as(FrameType, @enumFromInt(header.type))) {
FrameType.HTTP_FRAME_SETTINGS => this.handleSettingsFrame(header, bytes[FrameHeader.byteSize..]) + FrameHeader.byteSize,
+ FrameType.HTTP_FRAME_WINDOW_UPDATE => this.handleWindowUpdateFrame(header, bytes[FrameHeader.byteSize..], stream) + FrameHeader.byteSize,
+ FrameType.HTTP_FRAME_HEADERS => this.handleHeadersFrame(header, bytes[FrameHeader.byteSize..], stream) + FrameHeader.byteSize,
+ FrameType.HTTP_FRAME_DATA => this.handleDataFrame(header, bytes[FrameHeader.byteSize..], stream) + FrameHeader.byteSize,
+ FrameType.HTTP_FRAME_CONTINUATION => this.handleContinuationFrame(header, bytes[FrameHeader.byteSize..], stream) + FrameHeader.byteSize,
+ FrameType.HTTP_FRAME_PRIORITY => this.handlePriorityFrame(header, bytes[FrameHeader.byteSize..], stream) + FrameHeader.byteSize,
+ FrameType.HTTP_FRAME_PING => this.handlePingFrame(header, bytes[FrameHeader.byteSize..], stream) + FrameHeader.byteSize,
+ FrameType.HTTP_FRAME_GOAWAY => this.handleGoAwayFrame(header, bytes[FrameHeader.byteSize..], stream) + FrameHeader.byteSize,
+ FrameType.HTTP_FRAME_RST_STREAM => this.handleRSTStreamFrame(header, bytes[FrameHeader.byteSize..], stream) + FrameHeader.byteSize,
else => {
- log("not implemented {}", .{header.type});
+ this.sendGoAway(header.streamIdentifier, ErrorCode.PROTOCOL_ERROR, "Unknown frame type", this.lastStreamID);
return bytes.len;
},
};
}
+ const DirectWriterStruct = struct {
+ writer: *H2FrameParser,
+ pub fn write(this: *const DirectWriterStruct, data: []const u8) !bool {
+ this.writer.write(data);
+ return true;
+ }
+ };
+
+ fn toWriter(this: *H2FrameParser) DirectWriterStruct {
+ return DirectWriterStruct{ .writer = this };
+ }
+ pub fn setEncoding(this: *H2FrameParser, globalObject: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) callconv(.C) JSValue {
+ JSC.markBinding(@src());
+ const args_list = callframe.arguments(1);
+ if (args_list.len < 1) {
+ globalObject.throw("Expected encoding argument", .{});
+ return .zero;
+ }
+ this.handlers.binary_type = BinaryType.fromJSValue(globalObject, args_list.ptr[0]) orelse {
+ const err = JSC.toInvalidArguments("Expected 'binaryType' to be 'arraybuffer', 'uint8array', 'buffer'", .{}, globalObject).asObjectRef();
+ globalObject.throwValue(err);
+ return .zero;
+ };
+
+ return JSC.JSValue.jsUndefined();
+ }
+
+ pub fn setSettingsFromJSValue(this: *H2FrameParser, globalObject: *JSC.JSGlobalObject, options: JSC.JSValue) bool {
+
+ if(options.isEmptyOrUndefinedOrNull() or !options.isObject()) {
+ globalObject.throw("Expected settings to be a object", .{});
+ return false;
+ }
+
+ if(options.get(globalObject, "headerTableSize")) |headerTableSize| {
+ if(headerTableSize.isNumber()) {
+ const headerTableSizeValue = headerTableSize.toInt32();
+ if(headerTableSizeValue > MAX_HEADER_TABLE_SIZE or headerTableSizeValue < 0) {
+ globalObject.throw("Expected headerTableSize to be a number between 0 and 2^32-1", .{});
+ return false;
+ }
+ this.localSettings.headerTableSize = @intCast(headerTableSizeValue);
+ } else if(!headerTableSize.isEmptyOrUndefinedOrNull()) {
+ globalObject.throw("Expected headerTableSize to be a number", .{});
+ return false;
+ }
+ }
+
+ if(options.get(globalObject, "enablePush")) |enablePush| {
+ if(enablePush.isBoolean()) {
+ this.localSettings.enablePush = if(enablePush.asBoolean()) 1 else 0;
+ } else if(!enablePush.isEmptyOrUndefinedOrNull()) {
+ globalObject.throw("Expected enablePush to be a boolean", .{});
+ return false;
+ }
+ }
+
+ if(options.get(globalObject, "initialWindowSize")) |initialWindowSize| {
+ if(initialWindowSize.isNumber()) {
+ const initialWindowSizeValue = initialWindowSize.toInt32();
+ if(initialWindowSizeValue > MAX_HEADER_TABLE_SIZE or initialWindowSizeValue < 0) {
+ globalObject.throw("Expected initialWindowSize to be a number between 0 and 2^32-1", .{});
+ return false;
+ }
+ } else if(!initialWindowSize.isEmptyOrUndefinedOrNull()) {
+ globalObject.throw("Expected initialWindowSize to be a number", .{});
+ return false;
+ }
+ }
+
+ if(options.get(globalObject, "maxFrameSize")) |maxFrameSize| {
+ if(maxFrameSize.isNumber()) {
+ const maxFrameSizeValue = maxFrameSize.toInt32();
+ if(maxFrameSizeValue > MAX_FRAME_SIZE or maxFrameSizeValue < 16384) {
+ globalObject.throw("Expected maxFrameSize to be a number between 16,384 and 2^24-1", .{});
+ return false;
+ }
+ this.localSettings.maxFrameSize = @intCast(maxFrameSizeValue);
+ } else if(!maxFrameSize.isEmptyOrUndefinedOrNull()) {
+ globalObject.throw("Expected maxFrameSize to be a number", .{});
+ return false;
+ }
+ }
+
+ if(options.get(globalObject, "maxConcurrentStreams")) |maxConcurrentStreams| {
+ if(maxConcurrentStreams.isNumber()) {
+ const maxConcurrentStreamsValue = maxConcurrentStreams.toInt32();
+ if(maxConcurrentStreamsValue > MAX_HEADER_TABLE_SIZE or maxConcurrentStreamsValue < 0) {
+ globalObject.throw("Expected maxConcurrentStreams to be a number between 0 and 2^32-1", .{});
+ return false;
+ }
+ this.localSettings.maxConcurrentStreams = @intCast(maxConcurrentStreamsValue);
+ } else if(!maxConcurrentStreams.isEmptyOrUndefinedOrNull()) {
+ globalObject.throw("Expected maxConcurrentStreams to be a number", .{});
+ return false;
+ }
+ }
+
+ if(options.get(globalObject, "maxHeaderListSize")) |maxHeaderListSize| {
+ if(maxHeaderListSize.isNumber()) {
+ const maxHeaderListSizeValue = maxHeaderListSize.toInt32();
+ if(maxHeaderListSizeValue > MAX_HEADER_TABLE_SIZE or maxHeaderListSizeValue < 0) {
+ globalObject.throw("Expected maxHeaderListSize to be a number between 0 and 2^32-1", .{});
+ return false;
+ }
+ this.localSettings.maxHeaderListSize = @intCast(maxHeaderListSizeValue);
+ } else if(!maxHeaderListSize.isEmptyOrUndefinedOrNull()) {
+ globalObject.throw("Expected maxHeaderListSize to be a number", .{});
+ return false;
+ }
+ }
+
+ if(options.get(globalObject, "maxHeaderSize")) |maxHeaderSize| {
+ if(maxHeaderSize.isNumber()) {
+ const maxHeaderSizeValue = maxHeaderSize.toInt32();
+ if(maxHeaderSizeValue > MAX_HEADER_TABLE_SIZE or maxHeaderSizeValue < 0) {
+ globalObject.throw("Expected maxHeaderSize to be a number between 0 and 2^32-1", .{});
+ return false;
+ }
+ this.localSettings.maxHeaderListSize = @intCast(maxHeaderSizeValue);
+ } else if(!maxHeaderSize.isEmptyOrUndefinedOrNull()) {
+ globalObject.throw("Expected maxHeaderSize to be a number", .{});
+ return false;
+ }
+ }
+ return true;
+ }
+
+ pub fn updateSettings(this: *H2FrameParser, globalObject: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) callconv(.C) JSValue {
+ JSC.markBinding(@src());
+ const args_list = callframe.arguments(1);
+ if (args_list.len < 1) {
+ globalObject.throw("Expected settings argument", .{});
+ return .zero;
+ }
+
+ const options = args_list.ptr[0];
+
+ if(this.setSettingsFromJSValue(globalObject, options)) {
+ this.setSettings(this.localSettings);
+ return JSC.JSValue.jsUndefined();
+ }
+
+ return .zero;
+
+
+ }
+
+ pub fn getCurrentState(this: *H2FrameParser, globalObject: *JSC.JSGlobalObject, _: *JSC.CallFrame) callconv(.C) JSValue {
+ JSC.markBinding(@src());
+
+ // effectiveLocalWindowSize <number> The current local (receive) flow control window size for the Http2Session.
+ // effectiveRecvDataLength <number> The current number of bytes that have been received since the last flow control WINDOW_UPDATE.
+ // nextStreamID <number> The numeric identifier to be used the next time a new Http2Stream is created by this Http2Session.
+ // localWindowSize <number> The number of bytes that the remote peer can send without receiving a WINDOW_UPDATE.
+ // lastProcStreamID <number> The numeric id of the Http2Stream for which a HEADERS or DATA frame was most recently received.
+ // remoteWindowSize <number> The number of bytes that this Http2Session may send without receiving a WINDOW_UPDATE.
+ // outboundQueueSize <number> The number of frames currently within the outbound queue for this Http2Session.
+ // deflateDynamicTableSize <number> The current size in bytes of the outbound header compression state table.
+ // inflateDynamicTableSize <number> The current size in bytes of the inbound header compression state table.
+
+ var result = JSValue.createEmptyObject(globalObject, 9);
+ result.put(globalObject, JSC.ZigString.static("effectiveLocalWindowSize"), JSC.JSValue.jsNumber(this.localSettings.localWindowSize));
+ result.put(globalObject, JSC.ZigString.static("effectiveRecvDataLength"), JSC.JSValue.jsNumber(this.localSettings.localWindowSize - this.localSettings.usedWindowSize));
+ result.put(globalObject, JSC.ZigString.static("nextStreamID"), JSC.JSValue.jsNumber(this.getNextStreamID()));
+ var settings = this.remoteSettings orelse this.localWindowSize;
+ result.put(globalObject, JSC.ZigString.static("remoteWindowSize"), JSC.JSValue.jsNumber(settings.localWindowSize));
+ result.put(globalObject, JSC.ZigString.static("localWindowSize"), JSC.JSValue.jsNumber(this.localSettings.localWindowSize));
+ // TODO: make this real?
+ result.put(globalObject, JSC.ZigString.static("outboundQueueSize"), JSC.JSValue.jsNumber(0));
+ result.put(globalObject, JSC.ZigString.static("deflateDynamicTableSize"), JSC.JSValue.jsNumber(0));
+ result.put(globalObject, JSC.ZigString.static("inflateDynamicTableSize"), JSC.JSValue.jsNumber(0));
+
+ }
+ pub fn goaway(this: *H2FrameParser, globalObject: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) callconv(.C) JSValue {
+ JSC.markBinding(@src());
+ const args_list = callframe.arguments(3);
+ if (args_list.len < 1) {
+ globalObject.throw("Expected errorCode argument", .{});
+ return .zero;
+ }
+
+ const error_code_arg = args_list.ptr[0];
+
+ if (!error_code_arg.isNumber()) {
+ globalObject.throw("Expected errorCode to be a number", .{});
+ return .zero;
+ }
+ const errorCode = error_code_arg.toInt32();
+ if (errorCode < 1 and errorCode > 13) {
+ globalObject.throw("invalid errorCode", .{});
+ }
+
+ var lastStreamID = this.lastStreamID;
+ if(args_list.len >= 2) {
+ const last_stream_arg = args_list.ptr[1];
+ if(!last_stream_arg.isEmptyOrUndefinedOrNull()) {
+ if (!last_stream_arg.isNumber()) {
+ globalObject.throw("Expected lastStreamId to be a number", .{});
+ return .zero;
+ }
+ const id = last_stream_arg.toInt32();
+ if(id < 0 and id > MAX_STREAM_ID) {
+ globalObject.throw("Expected lastStreamId to be a number between 1 and 2147483647", .{});
+ return .zero;
+ }
+ lastStreamID = @intCast(id);
+ }
+ if(args_list.len >= 3) {
+ const opaque_data_arg = args_list.ptr[2];
+ if(!opaque_data_arg.isEmptyOrUndefinedOrNull()) {
+ if (opaque_data_arg.asArrayBuffer(globalObject)) |array_buffer| {
+ var slice = array_buffer.slice();
+ this.sendGoAway(0, @enumFromInt(errorCode), slice, lastStreamID);
+ globalObject.throw("Expected lastStreamId to be a number", .{});
+ return .zero;
+ }
+ const id = last_stream_arg.toInt32();
+ if(id < 0 and id > MAX_STREAM_ID) {
+ globalObject.throw("Expected lastStreamId to be a number between 1 and 2147483647", .{});
+ return .zero;
+ }
+ }
+ }
+ }
+
+ this.sendGoAway(0, @enumFromInt(errorCode), "", lastStreamID);
+ return JSC.JSValue.jsUndefined();
+ }
+
+ pub fn ping(this: *H2FrameParser, globalObject: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) callconv(.C) JSValue {
+ JSC.markBinding(@src());
+ const args_list = callframe.arguments(1);
+ if (args_list.len < 1) {
+ globalObject.throw("Expected payload argument", .{});
+ return .zero;
+ }
+
+ if (args_list.ptr[0].asArrayBuffer(globalObject)) |array_buffer| {
+ var slice = array_buffer.slice();
+ this.sendPing(false, slice);
+ return JSC.JSValue.jsUndefined();
+ }
+
+ globalObject.throw("Expected payload to be a Buffer", .{});
+ return .zero;
+ }
+ // pub fn writeStream(this: *H2FrameParser, globalObject: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) callconv(.C) JSValue {
+ // JSC.markBinding(@src());
+ // const args_list = callframe.arguments(2);
+ // if (args_list.len < 2) {
+ // globalObject.throw("Expected stream and data arguments", .{});
+ // return .zero;
+ // }
+ // var close_stream = false;
+ // if(args_list > 2) {
+ // const close_arg = args_list.ptr[2];
+ // if (!close_arg.jsType().isBoolean()) {
+ // globalObject.throw("Expected close to be a boolean", .{});
+ // return .zero;
+ // }
+ // close_stream = close_arg.asBoolean();
+ // }
+
+ // const stream_arg = args_list.ptr[0];
+ // const data_arg = args_list.ptr[1];
+
+ // if (!stream_arg.isNumber()) {
+ // globalObject.throw("Expected stream to be a number", .{});
+ // return .zero;
+ // }
+
+ // const stream_id = stream_arg.asNumber().asUInt32(globalObject);
+ // if (stream_id == 0) {
+ // globalObject.throw("Invalid stream id", .{});
+ // return .zero;
+ // }
+
+ // const stream = this.streams.get(stream_id) orelse {
+ // globalObject.throw("Invalid stream id", .{});
+ // return .zero;
+ // };
+
+ // if (stream.state == .CLOSED) {
+ // globalObject.throw("Stream is closed", .{});
+ // return .zero;
+ // }
+
+ // if (stream.state == .HALF_CLOSED_LOCAL or stream.state == .HALF_CLOSED_REMOTE) {
+ // globalObject.throw("Stream is half closed", .{});
+ // return .zero;
+ // }
+
+ // if (data_arg.asArrayBuffer(globalObject)) |array_buffer| {
+ // var slice = array_buffer.slice();
+ // } else if (bun.String.tryFromJS(data_arg, globalObject)) |bun_str| {
+ // var zig_str = bun_str.toUTF8(bun.default_allocator);
+ // defer zig_str.deinit();
+ // var slice = zig_str.slice();
+
+ // } else {
+ // globalObject.throw("Expected data to be an ArrayBuffer or a string", .{});
+ // return .zero;
+ // }
+
+ // return JSC.JSValue.jsBoolean(true);
+ // }
+
+ fn getNextStreamID(this: *H2FrameParser) u32 {
+ var stream_id: u32 = this.lastStreamID;
+ if (stream_id % 2 == 0) {
+ stream_id += 1;
+ } else if (stream_id == 0) {
+ stream_id = 1;
+ } else {
+ stream_id += 2;
+ }
+
+ return stream_id;
+ }
+
+ pub fn request(this: *H2FrameParser, globalObject: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) callconv(.C) JSValue {
+ JSC.markBinding(@src());
+ // we use PADDING_STRATEGY_NONE with is default
+ // TODO: PADDING_STRATEGY_MAX AND PADDING_STRATEGY_ALIGNED
+
+ const args_list = callframe.arguments(2);
+ if (args_list.len < 1) {
+ globalObject.throw("Expected headers argument", .{});
+ return .zero;
+ }
+
+ const headers_arg = args_list.ptr[0];
+
+ if (!headers_arg.jsType().isArray()) {
+ globalObject.throw("Expected headers to be an array", .{});
+ return .zero;
+ }
+
+ // max frame size will be always at least 16384
+ var buffer: [16384 - FrameHeader.byteSize - 5]u8 = undefined;
+ var header_buffer: [MAX_HPACK_HEADER_SIZE]u8 = undefined;
+ @memset(&buffer, 0);
+
+ var iter = headers_arg.arrayIterator(globalObject);
+ var encoded_size: usize = 0;
+
+ var stream_id: u32 = this.getNextStreamID();
+ if (stream_id > MAX_STREAM_ID) {
+ globalObject.throw("Failed to create stream", .{});
+ return .zero;
+ }
+
+ const stream = this.handleReceivedStreamID(stream_id) orelse {
+ globalObject.throw("Failed to create stream", .{});
+ return .zero;
+ };
+ // TODO: support CONTINUE for more headers if headers are too big
+ while (iter.next()) |header| {
+ if (!header.isObject()) {
+ stream.state = .CLOSED;
+ stream.rstCode = @intFromEnum(ErrorCode.INTERNAL_ERROR);
+ this.dispatchWithExtra(.onStreamError, JSC.JSValue.jsNumber(stream_id), JSC.JSValue.jsNumber(stream.rstCode));
+ globalObject.throwInvalidArguments("Expected header to be an Array of headers", .{});
+ return .zero;
+ }
+ var name = header.get(globalObject, "name") orelse JSC.JSValue.jsUndefined();
+ if (!name.isString()) {
+ stream.state = .CLOSED;
+ stream.rstCode = @intFromEnum(ErrorCode.INTERNAL_ERROR);
+ this.dispatchWithExtra(.onStreamError, JSC.JSValue.jsNumber(stream_id), JSC.JSValue.jsNumber(stream.rstCode));
+ globalObject.throwInvalidArguments("Expected header name to be a string", .{});
+ return .zero;
+ }
+
+ var value = header.get(globalObject, "value") orelse JSC.JSValue.jsUndefined();
+ if (!value.isString()) {
+ stream.state = .CLOSED;
+ stream.rstCode = @intFromEnum(ErrorCode.INTERNAL_ERROR);
+ this.dispatchWithExtra(.onStreamError, JSC.JSValue.jsNumber(stream_id), JSC.JSValue.jsNumber(stream.rstCode));
+ globalObject.throwInvalidArguments("Expected header value to be a string", .{});
+ return .zero;
+ }
+
+ var never_index = false;
+ var never_index_arg = header.get(globalObject, "neverIndex") orelse JSC.JSValue.jsUndefined();
+ if (never_index_arg.isBoolean()) {
+ never_index = never_index_arg.asBoolean();
+ } else {
+ never_index = false;
+ }
+
+ const name_slice = name.toSlice(globalObject, bun.default_allocator);
+ defer name_slice.deinit();
+ const value_slice = value.toSlice(globalObject, bun.default_allocator);
+ defer value_slice.deinit();
+
+ encoded_size += stream.encode(&header_buffer, buffer[encoded_size..], name_slice.slice(), value_slice.slice(), never_index) catch {
+ stream.state = .CLOSED;
+ stream.rstCode = @intFromEnum(ErrorCode.INTERNAL_ERROR);
+ this.dispatchWithExtra(.onStreamError, JSC.JSValue.jsNumber(stream_id), JSC.JSValue.jsNumber(stream.rstCode));
+ globalObject.throw("Failed to encode header", .{});
+ return .zero;
+ };
+ }
+ headers_arg.protect();
+ stream.sentHeaders = headers_arg;
+ var flags: u8 = @intFromEnum(HeadersFrameFlags.END_HEADERS);
+ var exclusive: bool = false;
+ var has_priority: bool = false;
+ var weight: i32 = 0;
+ var parent: i32 = 0;
+ var waitForTrailers: bool = false;
+ var signal: ?*JSC.WebCore.AbortSignal = null;
+ var end_stream: bool = false;
+ if (args_list.len > 1) {
+ const options = args_list.ptr[1];
+ if (!options.isObject()) {
+ stream.state = .CLOSED;
+ stream.rstCode = @intFromEnum(ErrorCode.INTERNAL_ERROR);
+ this.dispatchWithExtra(.onStreamError, JSC.JSValue.jsNumber(stream_id), JSC.JSValue.jsNumber(stream.rstCode));
+ globalObject.throw("Expected options to be an object", .{});
+ return .zero;
+ }
+
+ if (options.get(globalObject, "endStream")) |end_stream_js| {
+ if (end_stream_js.isBoolean()) {
+ if (end_stream_js.asBoolean()) {
+ end_stream = true;
+ flags |= @intFromEnum(HeadersFrameFlags.END_STREAM);
+ stream.endAfterHeaders = true;
+ }
+ }
+ }
+
+ if (options.get(globalObject, "exclusive")) |exclusive_js| {
+ if (exclusive_js.isBoolean()) {
+ if (exclusive_js.asBoolean()) {
+ exclusive = true;
+ stream.exclusive = true;
+ has_priority = true;
+ }
+ }
+ }
+
+ if (options.get(globalObject, "parent")) |parent_js| {
+ if (parent_js.isNumber() or parent_js.isInt32()) {
+ has_priority = true;
+ parent = parent_js.toInt32();
+ if (parent <= 0 or parent > MAX_STREAM_ID) {
+ stream.state = .CLOSED;
+ stream.rstCode = @intFromEnum(ErrorCode.INTERNAL_ERROR);
+ this.dispatchWithExtra(.onStreamError, JSC.JSValue.jsNumber(stream_id), JSC.JSValue.jsNumber(stream.rstCode));
+ globalObject.throw("Expected parent to be a number between 1 and 2147483647", .{});
+ return .zero;
+ }
+ stream.streamDependency = @intCast(parent);
+ }
+ }
+
+ if (options.get(globalObject, "weight")) |weight_js| {
+ if (weight_js.isNumber() or weight_js.isInt32()) {
+ has_priority = true;
+ weight = weight_js.toInt32();
+ if (weight < 1 or weight > 256) {
+ stream.state = .CLOSED;
+ stream.rstCode = @intFromEnum(ErrorCode.INTERNAL_ERROR);
+ this.dispatchWithExtra(.onStreamError, JSC.JSValue.jsNumber(stream_id), JSC.JSValue.jsNumber(stream.rstCode));
+ globalObject.throw("Expected weight to be a number between 1 and 256", .{});
+ return .zero;
+ }
+ stream.weight = @intCast(weight);
+ }
+
+ if (weight < 1 or weight > 256) {
+ stream.state = .CLOSED;
+ stream.rstCode = @intFromEnum(ErrorCode.INTERNAL_ERROR);
+ this.dispatchWithExtra(.onStreamError, JSC.JSValue.jsNumber(stream_id), JSC.JSValue.jsNumber(stream.rstCode));
+ globalObject.throw("Expected weight to be a number between 1 and 256", .{});
+ return .zero;
+ }
+ stream.weight = @intCast(weight);
+ }
+
+ if (options.get(globalObject, "waitForTrailers")) |trailes_js| {
+ if (trailes_js.isBoolean()) {
+ waitForTrailers = trailes_js.asBoolean();
+ stream.waitForTrailers = waitForTrailers;
+ }
+ }
+
+ if (options.get(globalObject, "signal")) |signal_arg| {
+ if (signal_arg.as(JSC.WebCore.AbortSignal)) |signal_| {
+ signal = signal_;
+ }
+ }
+ }
+
+ if (signal) |signal_| {
+ stream.attachSignal(signal_);
+ }
+
+ var length: usize = encoded_size;
+ if (has_priority) {
+ length += 5;
+ flags |= @intFromEnum(HeadersFrameFlags.PRIORITY);
+ }
+
+ log("request encoded_size {}", .{encoded_size});
+ var frame: FrameHeader = .{
+ .type = @intFromEnum(FrameType.HTTP_FRAME_HEADERS),
+ .flags = flags,
+ .streamIdentifier = stream.id,
+ .length = @intCast(encoded_size),
+ };
+ var writer = this.toWriter();
+ frame.write(@TypeOf(writer), writer);
+ //https://datatracker.ietf.org/doc/html/rfc7540#section-6.2
+ if (has_priority) {
+ var stream_identifier: UInt31WithReserved = .{
+ .reserved = exclusive,
+ .uint31 = @intCast(parent),
+ };
+
+ var priority: StreamPriority = .{
+ .streamIdentifier = stream_identifier.toUInt32(),
+ .weight = @intCast(weight),
+ };
+
+ priority.write(@TypeOf(writer), writer);
+ }
+
+ this.write(buffer[0..encoded_size]);
+
+ if (end_stream) {
+ stream.state = .HALF_CLOSED_LOCAL;
+
+ if (waitForTrailers) {
+ this.dispatch(.onWantTrailers, JSC.JSValue.jsNumber(stream.id));
+ }
+ }
+
+ return JSC.JSValue.jsNumber(stream.id);
+ }
+
pub fn read(this: *H2FrameParser, globalObject: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) callconv(.C) JSValue {
JSC.markBinding(@src());
const args_list = callframe.arguments(1);
@@ -492,10 +1822,16 @@ pub const H2FrameParser = struct {
globalObject.throw("Expected \"context\" option", .{});
return null;
};
- const handlers = Handlers.fromJS(globalObject, options, &exception) orelse {
+ var handler_js = JSC.JSValue.zero;
+ if(options.get(globalObject, "handlers")) |handlers_| {
+ handler_js = handlers_;
+ }
+ const handlers = Handlers.fromJS(globalObject, handler_js, &exception) orelse {
globalObject.throwValue(exception.?.value());
return null;
};
+
+
const allocator = getAllocator(globalObject);
var this = allocator.create(H2FrameParser) catch unreachable;
@@ -509,36 +1845,43 @@ pub const H2FrameParser = struct {
.capacity = 0,
},
},
+ .streams = bun.U32HashMap(Stream).init(bun.default_allocator),
};
+ if(options.get(globalObject, "settings")) |settings_js| {
+ if(settings_js.isEmptyOrUndefinedOrNull()) {
+ if(!this.setSettingsFromJSValue(globalObject, settings_js)) {
+ this.deinit();
+ return null;
+ }
+ }
+ }
this.handlers.protect();
this.strong_ctx.set(globalObject, context_obj);
- // PREFACE + Settings Frame
- var preface_buffer: [24 + FrameHeader.byteSize + FullSettingsPayload.byteSize]u8 = undefined;
- @memset(&preface_buffer, 0);
- var preface_stream = std.io.fixedBufferStream(&preface_buffer);
- const writer = preface_stream.writer();
- _ = writer.write("PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n") catch 0;
- var settingsHeader: FrameHeader = .{
- .type = @intFromEnum(FrameType.HTTP_FRAME_SETTINGS),
- .flags = 0,
- .streamIdentifier = 0,
- .length = 36,
- };
- settingsHeader.write(@TypeOf(writer), writer);
- this.localSettings.write(@TypeOf(writer), writer);
- this.write(&preface_buffer);
+ this.sendPrefaceAndSettings();
return this;
}
- pub fn finalize(
- this: *H2FrameParser,
- ) callconv(.C) void {
+ pub fn deinit(this: *H2FrameParser) void {
var allocator = this.allocator;
+ defer allocator.destroy(this);
this.strong_ctx.deinit();
this.handlers.unprotect();
this.readBuffer.deinit();
- allocator.destroy(this);
+
+ var it = this.streams.iterator();
+ while (it.next()) |*entry| {
+ var stream = entry.value_ptr.*;
+ stream.deinit();
+ }
+
+ this.streams.deinit();
+ }
+
+ pub fn finalize(
+ this: *H2FrameParser,
+ ) callconv(.C) void {
+ this.deinit();
}
};
diff --git a/src/bun.js/api/bun/lshpack.translated.zig b/src/bun.js/api/bun/lshpack.translated.zig
new file mode 100644
index 000000000..725384d6c
--- /dev/null
+++ b/src/bun.js/api/bun/lshpack.translated.zig
@@ -0,0 +1,442 @@
+pub const __builtin_bswap16 = @import("std").zig.c_builtins.__builtin_bswap16;
+pub const __builtin_bswap32 = @import("std").zig.c_builtins.__builtin_bswap32;
+pub const __builtin_bswap64 = @import("std").zig.c_builtins.__builtin_bswap64;
+pub const __builtin_signbit = @import("std").zig.c_builtins.__builtin_signbit;
+pub const __builtin_signbitf = @import("std").zig.c_builtins.__builtin_signbitf;
+pub const __builtin_popcount = @import("std").zig.c_builtins.__builtin_popcount;
+pub const __builtin_ctz = @import("std").zig.c_builtins.__builtin_ctz;
+pub const __builtin_clz = @import("std").zig.c_builtins.__builtin_clz;
+pub const __builtin_sqrt = @import("std").zig.c_builtins.__builtin_sqrt;
+pub const __builtin_sqrtf = @import("std").zig.c_builtins.__builtin_sqrtf;
+pub const __builtin_sin = @import("std").zig.c_builtins.__builtin_sin;
+pub const __builtin_sinf = @import("std").zig.c_builtins.__builtin_sinf;
+pub const __builtin_cos = @import("std").zig.c_builtins.__builtin_cos;
+pub const __builtin_cosf = @import("std").zig.c_builtins.__builtin_cosf;
+pub const __builtin_exp = @import("std").zig.c_builtins.__builtin_exp;
+pub const __builtin_expf = @import("std").zig.c_builtins.__builtin_expf;
+pub const __builtin_exp2 = @import("std").zig.c_builtins.__builtin_exp2;
+pub const __builtin_exp2f = @import("std").zig.c_builtins.__builtin_exp2f;
+pub const __builtin_log = @import("std").zig.c_builtins.__builtin_log;
+pub const __builtin_logf = @import("std").zig.c_builtins.__builtin_logf;
+pub const __builtin_log2 = @import("std").zig.c_builtins.__builtin_log2;
+pub const __builtin_log2f = @import("std").zig.c_builtins.__builtin_log2f;
+pub const __builtin_log10 = @import("std").zig.c_builtins.__builtin_log10;
+pub const __builtin_log10f = @import("std").zig.c_builtins.__builtin_log10f;
+pub const __builtin_abs = @import("std").zig.c_builtins.__builtin_abs;
+pub const __builtin_fabs = @import("std").zig.c_builtins.__builtin_fabs;
+pub const __builtin_fabsf = @import("std").zig.c_builtins.__builtin_fabsf;
+pub const __builtin_floor = @import("std").zig.c_builtins.__builtin_floor;
+pub const __builtin_floorf = @import("std").zig.c_builtins.__builtin_floorf;
+pub const __builtin_ceil = @import("std").zig.c_builtins.__builtin_ceil;
+pub const __builtin_ceilf = @import("std").zig.c_builtins.__builtin_ceilf;
+pub const __builtin_trunc = @import("std").zig.c_builtins.__builtin_trunc;
+pub const __builtin_truncf = @import("std").zig.c_builtins.__builtin_truncf;
+pub const __builtin_round = @import("std").zig.c_builtins.__builtin_round;
+pub const __builtin_roundf = @import("std").zig.c_builtins.__builtin_roundf;
+pub const __builtin_strlen = @import("std").zig.c_builtins.__builtin_strlen;
+pub const __builtin_strcmp = @import("std").zig.c_builtins.__builtin_strcmp;
+pub const __builtin_object_size = @import("std").zig.c_builtins.__builtin_object_size;
+pub const __builtin___memset_chk = @import("std").zig.c_builtins.__builtin___memset_chk;
+pub const __builtin_memset = @import("std").zig.c_builtins.__builtin_memset;
+pub const __builtin___memcpy_chk = @import("std").zig.c_builtins.__builtin___memcpy_chk;
+pub const __builtin_memcpy = @import("std").zig.c_builtins.__builtin_memcpy;
+pub const __builtin_expect = @import("std").zig.c_builtins.__builtin_expect;
+pub const __builtin_nanf = @import("std").zig.c_builtins.__builtin_nanf;
+pub const __builtin_huge_valf = @import("std").zig.c_builtins.__builtin_huge_valf;
+pub const __builtin_inff = @import("std").zig.c_builtins.__builtin_inff;
+pub const __builtin_isnan = @import("std").zig.c_builtins.__builtin_isnan;
+pub const __builtin_isinf = @import("std").zig.c_builtins.__builtin_isinf;
+pub const __builtin_isinf_sign = @import("std").zig.c_builtins.__builtin_isinf_sign;
+pub const __has_builtin = @import("std").zig.c_builtins.__has_builtin;
+pub const __builtin_assume = @import("std").zig.c_builtins.__builtin_assume;
+pub const __builtin_unreachable = @import("std").zig.c_builtins.__builtin_unreachable;
+pub const __builtin_constant_p = @import("std").zig.c_builtins.__builtin_constant_p;
+pub const __builtin_mul_overflow = @import("std").zig.c_builtins.__builtin_mul_overflow;
+pub const __u_char = u8;
+pub const __u_short = c_ushort;
+pub const __u_int = c_uint;
+pub const __u_long = c_ulong;
+pub const __int8_t = i8;
+pub const __uint8_t = u8;
+pub const __int16_t = c_short;
+pub const __uint16_t = c_ushort;
+pub const __int32_t = c_int;
+pub const __uint32_t = c_uint;
+pub const __int64_t = c_long;
+pub const __uint64_t = c_ulong;
+pub const __int_least8_t = __int8_t;
+pub const __uint_least8_t = __uint8_t;
+pub const __int_least16_t = __int16_t;
+pub const __uint_least16_t = __uint16_t;
+pub const __int_least32_t = __int32_t;
+pub const __uint_least32_t = __uint32_t;
+pub const __int_least64_t = __int64_t;
+pub const __uint_least64_t = __uint64_t;
+pub const __quad_t = c_long;
+pub const __u_quad_t = c_ulong;
+pub const __intmax_t = c_long;
+pub const __uintmax_t = c_ulong;
+pub const __dev_t = c_ulong;
+pub const __uid_t = c_uint;
+pub const __gid_t = c_uint;
+pub const __ino_t = c_ulong;
+pub const __ino64_t = c_ulong;
+pub const __mode_t = c_uint;
+pub const __nlink_t = c_ulong;
+pub const __off_t = c_long;
+pub const __off64_t = c_long;
+pub const __pid_t = c_int;
+pub const __fsid_t = extern struct {
+ __val: [2]c_int,
+};
+pub const __clock_t = c_long;
+pub const __rlim_t = c_ulong;
+pub const __rlim64_t = c_ulong;
+pub const __id_t = c_uint;
+pub const __time_t = c_long;
+pub const __useconds_t = c_uint;
+pub const __suseconds_t = c_long;
+pub const __suseconds64_t = c_long;
+pub const __daddr_t = c_int;
+pub const __key_t = c_int;
+pub const __clockid_t = c_int;
+pub const __timer_t = ?*anyopaque;
+pub const __blksize_t = c_long;
+pub const __blkcnt_t = c_long;
+pub const __blkcnt64_t = c_long;
+pub const __fsblkcnt_t = c_ulong;
+pub const __fsblkcnt64_t = c_ulong;
+pub const __fsfilcnt_t = c_ulong;
+pub const __fsfilcnt64_t = c_ulong;
+pub const __fsword_t = c_long;
+pub const __ssize_t = c_long;
+pub const __syscall_slong_t = c_long;
+pub const __syscall_ulong_t = c_ulong;
+pub const __loff_t = __off64_t;
+pub const __caddr_t = [*c]u8;
+pub const __intptr_t = c_long;
+pub const __socklen_t = c_uint;
+pub const __sig_atomic_t = c_int;
+pub const int_least8_t = __int_least8_t;
+pub const int_least16_t = __int_least16_t;
+pub const int_least32_t = __int_least32_t;
+pub const int_least64_t = __int_least64_t;
+pub const uint_least8_t = __uint_least8_t;
+pub const uint_least16_t = __uint_least16_t;
+pub const uint_least32_t = __uint_least32_t;
+pub const uint_least64_t = __uint_least64_t;
+pub const int_fast8_t = i8;
+pub const int_fast16_t = c_long;
+pub const int_fast32_t = c_long;
+pub const int_fast64_t = c_long;
+pub const uint_fast8_t = u8;
+pub const uint_fast16_t = c_ulong;
+pub const uint_fast32_t = c_ulong;
+pub const uint_fast64_t = c_ulong;
+pub const intmax_t = __intmax_t;
+pub const uintmax_t = __uintmax_t;
+pub const lsxpack_strlen_t = u16;
+pub const LSXPACK_HPACK_VAL_MATCHED: c_int = 1;
+pub const LSXPACK_QPACK_IDX: c_int = 2;
+pub const LSXPACK_APP_IDX: c_int = 4;
+pub const LSXPACK_NAME_HASH: c_int = 8;
+pub const LSXPACK_NAMEVAL_HASH: c_int = 16;
+pub const LSXPACK_VAL_MATCHED: c_int = 32;
+pub const LSXPACK_NEVER_INDEX: c_int = 64;
+pub const enum_lsxpack_flag = c_uint;
+
+// /// When header are decoded, it should be stored to @buf starting from @name_offset,
+// /// <name>: <value>\r\n
+// /// So, it can be used directly as HTTP/1.1 header. there are 4 extra characters
+// /// added.
+// ///
+// /// limitation: we currently does not support total header size > 64KB.
+pub const struct_lsxpack_header = extern struct {
+ /// the buffer for headers
+ buf: [*]u8 = undefined,
+ /// hash value for name
+ name_hash: __uint32_t = 0,
+ /// hash value for name + value
+ nameval_hash: __uint32_t = 0,
+ /// the offset for name in the buffer
+ name_offset: lsxpack_strlen_t = 0,
+ /// the length of name
+ name_len: lsxpack_strlen_t = 0,
+ /// the offset for value in the buffer
+ val_offset: lsxpack_strlen_t = 0,
+ /// the length of value
+ val_len: lsxpack_strlen_t = 0,
+ /// mainly for cookie value chain
+ chain_next_idx: __uint16_t = 0,
+ /// HPACK static table index
+ hpack_index: __uint8_t = 0,
+ /// QPACK static table index
+ qpack_index: __uint8_t = 0,
+ /// APP header index
+ app_index: __uint8_t = 0,
+ /// combination of lsxpack_flag
+ flags: u8 = 0,
+ /// control to disable index or not
+ indexed_type: __uint8_t = 0,
+ /// num of extra bytes written to decoded buffer
+ dec_overhead: __uint8_t = 0,
+};
+pub const lsxpack_header_t = struct_lsxpack_header;
+
+pub fn lsxpack_header_set_offset2(arg_hdr: *lsxpack_header_t, arg_buf: [*c]u8, arg_name_offset: usize, arg_name_len: usize, arg_val_offset: usize, arg_val_len: usize) callconv(.C) void {
+ arg_hdr.* = .{};
+ arg_hdr.buf = arg_buf;
+ arg_hdr.name_offset = @truncate(arg_name_offset);
+ arg_hdr.val_offset = @truncate(arg_val_offset);
+ arg_hdr.name_len = @truncate(arg_name_len);
+ arg_hdr.val_len = @truncate(arg_val_len);
+}
+
+pub fn lsxpack_header_prepare_decode(arg_hdr: *lsxpack_header_t, arg_out: [*c]u8, arg_offset: usize, arg_len: usize) callconv(.C) void {
+ arg_hdr.* = .{};
+ arg_hdr.buf = arg_out;
+ arg_hdr.name_offset = @truncate(arg_offset);
+ if (arg_len > LSXPACK_MAX_STRLEN) {
+ arg_hdr.val_len = LSXPACK_MAX_STRLEN;
+ } else {
+ arg_hdr.val_len = @truncate(arg_len);
+ }
+}
+
+pub fn lsxpack_header_get_name(hdr: *lsxpack_header_t) []const u8 {
+ if (hdr.name_len != 0) return hdr.buf[hdr.name_offset .. hdr.name_offset + hdr.name_len];
+ return "";
+}
+pub fn lsxpack_header_get_value(hdr: *lsxpack_header_t) []const u8 {
+ if (hdr.val_len != 0) return hdr.buf[hdr.val_offset .. hdr.val_offset + hdr.val_len];
+ return "";
+}
+pub fn lsxpack_header_get_dec_size(arg_hdr: ?*const lsxpack_header_t) callconv(.C) usize {
+ var hdr = arg_hdr;
+ return @as(usize, @bitCast(@as(c_long, (@as(c_int, @bitCast(@as(c_uint, hdr.*.name_len))) + @as(c_int, @bitCast(@as(c_uint, hdr.*.val_len)))) + @as(c_int, @bitCast(@as(c_uint, hdr.*.dec_overhead))))));
+}
+pub fn lsxpack_header_mark_val_changed(arg_hdr: ?*lsxpack_header_t) callconv(.C) void {
+ var hdr = arg_hdr;
+ hdr.*.flags = @as(c_uint, @bitCast(@as(c_int, @bitCast(hdr.*.flags)) & ~((LSXPACK_HPACK_VAL_MATCHED | LSXPACK_VAL_MATCHED) | LSXPACK_NAMEVAL_HASH)));
+}
+pub const struct_lshpack_enc_table_entry = opaque {};
+pub const struct_lshpack_enc_head = extern struct {
+ stqh_first: ?*struct_lshpack_enc_table_entry,
+ stqh_last: [*c]?*struct_lshpack_enc_table_entry,
+};
+pub const struct_lshpack_double_enc_head = opaque {};
+pub const LSHPACK_ENC_USE_HIST: c_int = 1;
+const enum_unnamed_1 = c_uint;
+pub const struct_lshpack_enc = extern struct {
+ hpe_cur_capacity: c_uint,
+ hpe_max_capacity: c_uint,
+ hpe_next_id: c_uint,
+ hpe_nelem: c_uint,
+ hpe_nbits: c_uint,
+ hpe_all_entries: struct_lshpack_enc_head,
+ hpe_buckets: ?*struct_lshpack_double_enc_head,
+ hpe_hist_buf: [*c]u32,
+ hpe_hist_size: c_uint,
+ hpe_hist_idx: c_uint,
+ hpe_hist_wrapped: c_int,
+ hpe_flags: enum_unnamed_1,
+};
+pub const struct_lshpack_arr = extern struct {
+ nalloc: c_uint,
+ nelem: c_uint,
+ off: c_uint,
+ els: [*c]usize,
+};
+pub const struct_lshpack_dec = extern struct {
+ hpd_dyn_table: struct_lshpack_arr,
+ hpd_max_capacity: c_uint,
+ hpd_cur_max_capacity: c_uint,
+ hpd_cur_capacity: c_uint,
+ hpd_state: c_uint,
+};
+pub const LSHPACK_HDR_UNKNOWN: c_int = 0;
+pub const LSHPACK_HDR_AUTHORITY: c_int = 1;
+pub const LSHPACK_HDR_METHOD_GET: c_int = 2;
+pub const LSHPACK_HDR_METHOD_POST: c_int = 3;
+pub const LSHPACK_HDR_PATH: c_int = 4;
+pub const LSHPACK_HDR_PATH_INDEX_HTML: c_int = 5;
+pub const LSHPACK_HDR_SCHEME_HTTP: c_int = 6;
+pub const LSHPACK_HDR_SCHEME_HTTPS: c_int = 7;
+pub const LSHPACK_HDR_STATUS_200: c_int = 8;
+pub const LSHPACK_HDR_STATUS_204: c_int = 9;
+pub const LSHPACK_HDR_STATUS_206: c_int = 10;
+pub const LSHPACK_HDR_STATUS_304: c_int = 11;
+pub const LSHPACK_HDR_STATUS_400: c_int = 12;
+pub const LSHPACK_HDR_STATUS_404: c_int = 13;
+pub const LSHPACK_HDR_STATUS_500: c_int = 14;
+pub const LSHPACK_HDR_ACCEPT_CHARSET: c_int = 15;
+pub const LSHPACK_HDR_ACCEPT_ENCODING: c_int = 16;
+pub const LSHPACK_HDR_ACCEPT_LANGUAGE: c_int = 17;
+pub const LSHPACK_HDR_ACCEPT_RANGES: c_int = 18;
+pub const LSHPACK_HDR_ACCEPT: c_int = 19;
+pub const LSHPACK_HDR_ACCESS_CONTROL_ALLOW_ORIGIN: c_int = 20;
+pub const LSHPACK_HDR_AGE: c_int = 21;
+pub const LSHPACK_HDR_ALLOW: c_int = 22;
+pub const LSHPACK_HDR_AUTHORIZATION: c_int = 23;
+pub const LSHPACK_HDR_CACHE_CONTROL: c_int = 24;
+pub const LSHPACK_HDR_CONTENT_DISPOSITION: c_int = 25;
+pub const LSHPACK_HDR_CONTENT_ENCODING: c_int = 26;
+pub const LSHPACK_HDR_CONTENT_LANGUAGE: c_int = 27;
+pub const LSHPACK_HDR_CONTENT_LENGTH: c_int = 28;
+pub const LSHPACK_HDR_CONTENT_LOCATION: c_int = 29;
+pub const LSHPACK_HDR_CONTENT_RANGE: c_int = 30;
+pub const LSHPACK_HDR_CONTENT_TYPE: c_int = 31;
+pub const LSHPACK_HDR_COOKIE: c_int = 32;
+pub const LSHPACK_HDR_DATE: c_int = 33;
+pub const LSHPACK_HDR_ETAG: c_int = 34;
+pub const LSHPACK_HDR_EXPECT: c_int = 35;
+pub const LSHPACK_HDR_EXPIRES: c_int = 36;
+pub const LSHPACK_HDR_FROM: c_int = 37;
+pub const LSHPACK_HDR_HOST: c_int = 38;
+pub const LSHPACK_HDR_IF_MATCH: c_int = 39;
+pub const LSHPACK_HDR_IF_MODIFIED_SINCE: c_int = 40;
+pub const LSHPACK_HDR_IF_NONE_MATCH: c_int = 41;
+pub const LSHPACK_HDR_IF_RANGE: c_int = 42;
+pub const LSHPACK_HDR_IF_UNMODIFIED_SINCE: c_int = 43;
+pub const LSHPACK_HDR_LAST_MODIFIED: c_int = 44;
+pub const LSHPACK_HDR_LINK: c_int = 45;
+pub const LSHPACK_HDR_LOCATION: c_int = 46;
+pub const LSHPACK_HDR_MAX_FORWARDS: c_int = 47;
+pub const LSHPACK_HDR_PROXY_AUTHENTICATE: c_int = 48;
+pub const LSHPACK_HDR_PROXY_AUTHORIZATION: c_int = 49;
+pub const LSHPACK_HDR_RANGE: c_int = 50;
+pub const LSHPACK_HDR_REFERER: c_int = 51;
+pub const LSHPACK_HDR_REFRESH: c_int = 52;
+pub const LSHPACK_HDR_RETRY_AFTER: c_int = 53;
+pub const LSHPACK_HDR_SERVER: c_int = 54;
+pub const LSHPACK_HDR_SET_COOKIE: c_int = 55;
+pub const LSHPACK_HDR_STRICT_TRANSPORT_SECURITY: c_int = 56;
+pub const LSHPACK_HDR_TRANSFER_ENCODING: c_int = 57;
+pub const LSHPACK_HDR_USER_AGENT: c_int = 58;
+pub const LSHPACK_HDR_VARY: c_int = 59;
+pub const LSHPACK_HDR_VIA: c_int = 60;
+pub const LSHPACK_HDR_WWW_AUTHENTICATE: c_int = 61;
+pub const LSHPACK_HDR_TOBE_INDEXED: c_int = 255;
+pub const enum_lshpack_static_hdr_idx = c_uint;
+pub extern fn lshpack_enc_init([*c]struct_lshpack_enc) c_int;
+pub extern fn lshpack_enc_cleanup([*c]struct_lshpack_enc) void;
+pub extern fn lshpack_enc_encode(henc: [*c]struct_lshpack_enc, dst: [*c]const u8, dst_end: [*c]u8, input: ?*struct_lsxpack_header) [*c]u8;
+pub extern fn lshpack_enc_set_max_capacity([*c]struct_lshpack_enc, c_uint) void;
+pub extern fn lshpack_enc_use_hist([*c]struct_lshpack_enc, on: c_int) c_int;
+pub extern fn lshpack_enc_hist_used([*c]const struct_lshpack_enc) c_int;
+pub extern fn lshpack_dec_init([*c]struct_lshpack_dec) void;
+pub extern fn lshpack_dec_cleanup([*c]struct_lshpack_dec) void;
+pub extern fn lshpack_dec_decode(dec: [*c]struct_lshpack_dec, src: *[*]const u8, src_end: [*c]const u8, output: ?*struct_lsxpack_header) c_int;
+pub extern fn lshpack_dec_set_max_capacity([*c]struct_lshpack_dec, c_uint) void;
+pub extern fn lshpack_enc_get_stx_tab_id(?*struct_lsxpack_header) c_uint;
+
+pub const __INT64_C = @import("std").zig.c_translation.Macros.L_SUFFIX;
+pub const __UINT64_C = @import("std").zig.c_translation.Macros.UL_SUFFIX;
+pub const INT8_MIN = -@as(c_int, 128);
+pub const INT16_MIN = -@as(c_int, 32767) - @as(c_int, 1);
+pub const INT32_MIN = -@import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal) - @as(c_int, 1);
+pub const INT64_MIN = -__INT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 9223372036854775807, .decimal)) - @as(c_int, 1);
+pub const INT8_MAX = @as(c_int, 127);
+pub const INT16_MAX = @as(c_int, 32767);
+pub const INT32_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal);
+pub const INT64_MAX = __INT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 9223372036854775807, .decimal));
+pub const UINT8_MAX = @as(c_int, 255);
+pub const UINT16_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_int, 65535, .decimal);
+pub const UINT32_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_uint, 4294967295, .decimal);
+pub const UINT64_MAX = __UINT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 18446744073709551615, .decimal));
+pub const INT_LEAST8_MIN = -@as(c_int, 128);
+pub const INT_LEAST16_MIN = -@as(c_int, 32767) - @as(c_int, 1);
+pub const INT_LEAST32_MIN = -@import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal) - @as(c_int, 1);
+pub const INT_LEAST64_MIN = -__INT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 9223372036854775807, .decimal)) - @as(c_int, 1);
+pub const INT_LEAST8_MAX = @as(c_int, 127);
+pub const INT_LEAST16_MAX = @as(c_int, 32767);
+pub const INT_LEAST32_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal);
+pub const INT_LEAST64_MAX = __INT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 9223372036854775807, .decimal));
+pub const UINT_LEAST8_MAX = @as(c_int, 255);
+pub const UINT_LEAST16_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_int, 65535, .decimal);
+pub const UINT_LEAST32_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_uint, 4294967295, .decimal);
+pub const UINT_LEAST64_MAX = __UINT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 18446744073709551615, .decimal));
+pub const INT_FAST8_MIN = -@as(c_int, 128);
+pub const INT_FAST16_MIN = -@import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal) - @as(c_int, 1);
+pub const INT_FAST32_MIN = -@import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal) - @as(c_int, 1);
+pub const INT_FAST64_MIN = -__INT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 9223372036854775807, .decimal)) - @as(c_int, 1);
+pub const INT_FAST8_MAX = @as(c_int, 127);
+pub const INT_FAST16_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal);
+pub const INT_FAST32_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal);
+pub const INT_FAST64_MAX = __INT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 9223372036854775807, .decimal));
+pub const UINT_FAST8_MAX = @as(c_int, 255);
+pub const UINT_FAST16_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_ulong, 18446744073709551615, .decimal);
+pub const UINT_FAST32_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_ulong, 18446744073709551615, .decimal);
+pub const UINT_FAST64_MAX = __UINT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 18446744073709551615, .decimal));
+pub const INTPTR_MIN = -@import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal) - @as(c_int, 1);
+pub const INTPTR_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal);
+pub const UINTPTR_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_ulong, 18446744073709551615, .decimal);
+pub const INTMAX_MIN = -__INT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 9223372036854775807, .decimal)) - @as(c_int, 1);
+pub const INTMAX_MAX = __INT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 9223372036854775807, .decimal));
+pub const UINTMAX_MAX = __UINT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 18446744073709551615, .decimal));
+pub const PTRDIFF_MIN = -@import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal) - @as(c_int, 1);
+pub const PTRDIFF_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal);
+pub const SIG_ATOMIC_MIN = -@import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal) - @as(c_int, 1);
+pub const SIG_ATOMIC_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal);
+pub const SIZE_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_ulong, 18446744073709551615, .decimal);
+pub const WINT_MIN = @as(c_uint, 0);
+pub const WINT_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_uint, 4294967295, .decimal);
+pub inline fn INT8_C(c: anytype) @TypeOf(c) {
+ return c;
+}
+pub inline fn INT16_C(c: anytype) @TypeOf(c) {
+ return c;
+}
+pub inline fn INT32_C(c: anytype) @TypeOf(c) {
+ return c;
+}
+pub const INT64_C = @import("std").zig.c_translation.Macros.L_SUFFIX;
+pub inline fn UINT8_C(c: anytype) @TypeOf(c) {
+ return c;
+}
+pub inline fn UINT16_C(c: anytype) @TypeOf(c) {
+ return c;
+}
+pub const UINT32_C = @import("std").zig.c_translation.Macros.U_SUFFIX;
+pub const UINT64_C = @import("std").zig.c_translation.Macros.UL_SUFFIX;
+pub const INTMAX_C = @import("std").zig.c_translation.Macros.L_SUFFIX;
+pub const UINTMAX_C = @import("std").zig.c_translation.Macros.UL_SUFFIX;
+pub const LSXPACK_HEADER_H_v206 = "";
+pub const _ASSERT_H = @as(c_int, 1);
+pub const _ASSERT_H_DECLS = "";
+pub const _STRING_H = @as(c_int, 1);
+pub const __need_size_t = "";
+pub const __need_NULL = "";
+pub const _SIZE_T = "";
+pub const NULL = @import("std").zig.c_translation.cast(?*anyopaque, @as(c_int, 0));
+pub const _BITS_TYPES_LOCALE_T_H = @as(c_int, 1);
+pub const _BITS_TYPES___LOCALE_T_H = @as(c_int, 1);
+pub const _STRINGS_H = @as(c_int, 1);
+pub const LSXPACK_MAX_STRLEN = UINT16_MAX;
+pub const LSXPACK_DEL = @import("std").zig.c_translation.cast([*c]u8, NULL);
+pub const LSHPACK_MAJOR_VERSION = @as(c_int, 2);
+pub const LSHPACK_MINOR_VERSION = @as(c_int, 3);
+pub const LSHPACK_PATCH_VERSION = @as(c_int, 0);
+pub const lshpack_strlen_t = lsxpack_strlen_t;
+pub const LSHPACK_MAX_STRLEN = LSXPACK_MAX_STRLEN;
+pub const LSHPACK_DEC_HTTP1X_OUTPUT = @as(c_int, 1);
+pub const LSHPACK_DEC_CALC_HASH = @as(c_int, 1);
+pub const LSHPACK_MAX_INDEX = @as(c_int, 61);
+pub const LSHPACK_ERR_MORE_BUF = -@as(c_int, 3);
+pub const LSHPACK_ERR_TOO_LARGE = -@as(c_int, 2);
+pub const LSHPACK_ERR_BAD_DATA = -@as(c_int, 1);
+pub const LSHPACK_OK = @as(c_int, 0);
+pub const LSHPACK_DEC_HTTP1X_EXTRA = @as(c_int, 2);
+pub inline fn lshpack_dec_extra_bytes(dec_: anytype) @TypeOf(@as(c_int, 4)) {
+ _ = @TypeOf(dec_);
+ return @as(c_int, 4);
+}
+pub const lsxpack_flag = enum_lsxpack_flag;
+pub const lsxpack_header = struct_lsxpack_header;
+pub const lshpack_enc_table_entry = struct_lshpack_enc_table_entry;
+pub const lshpack_enc_head = struct_lshpack_enc_head;
+pub const lshpack_double_enc_head = struct_lshpack_double_enc_head;
+pub const lshpack_enc = struct_lshpack_enc;
+pub const lshpack_arr = struct_lshpack_arr;
+pub const lshpack_dec = struct_lshpack_dec;
+pub const lshpack_static_hdr_idx = enum_lshpack_static_hdr_idx;
diff --git a/src/bun.js/api/h2.classes.ts b/src/bun.js/api/h2.classes.ts
index caadb5c40..3b53f3261 100644
--- a/src/bun.js/api/h2.classes.ts
+++ b/src/bun.js/api/h2.classes.ts
@@ -5,6 +5,26 @@ export default [
name: "H2FrameParser",
JSType: "0b11101110",
proto: {
+ request: {
+ fn: "request",
+ length: 2,
+ },
+ ping: {
+ fn: "ping",
+ length: 0,
+ },
+ goaway: {
+ fn: "goaway",
+ length: 3,
+ },
+ getCurrentState: {
+ fn: "getCurrentState",
+ length: 0,
+ },
+ settings: {
+ fn: "updateSettings",
+ length: 1,
+ },
read: {
fn: "read",
length: 1,
diff --git a/src/bun.js/bindings/ZigGeneratedClasses+DOMClientIsoSubspaces.h b/src/bun.js/bindings/ZigGeneratedClasses+DOMClientIsoSubspaces.h
index 3c3aa5669..5347e037b 100644
--- a/src/bun.js/bindings/ZigGeneratedClasses+DOMClientIsoSubspaces.h
+++ b/src/bun.js/bindings/ZigGeneratedClasses+DOMClientIsoSubspaces.h
@@ -21,7 +21,8 @@ std::unique_ptr<GCClient::IsoSubspace> m_clientSubspaceForExpectStringMatching;
std::unique_ptr<GCClient::IsoSubspace> m_clientSubspaceForFFI;
std::unique_ptr<GCClient::IsoSubspace> m_clientSubspaceForFSWatcher;
std::unique_ptr<GCClient::IsoSubspace> m_clientSubspaceForFileSystemRouter;
-std::unique_ptr<GCClient::IsoSubspace> m_clientSubspaceForFileSystemRouterConstructor;std::unique_ptr<GCClient::IsoSubspace> m_clientSubspaceForHTMLRewriter;
+std::unique_ptr<GCClient::IsoSubspace> m_clientSubspaceForFileSystemRouterConstructor;std::unique_ptr<GCClient::IsoSubspace> m_clientSubspaceForH2FrameParser;
+std::unique_ptr<GCClient::IsoSubspace> m_clientSubspaceForH2FrameParserConstructor;std::unique_ptr<GCClient::IsoSubspace> m_clientSubspaceForHTMLRewriter;
std::unique_ptr<GCClient::IsoSubspace> m_clientSubspaceForHTMLRewriterConstructor;std::unique_ptr<GCClient::IsoSubspace> m_clientSubspaceForHTTPSServer;
std::unique_ptr<GCClient::IsoSubspace> m_clientSubspaceForHTTPServer;
std::unique_ptr<GCClient::IsoSubspace> m_clientSubspaceForListener;
diff --git a/src/bun.js/bindings/ZigGeneratedClasses+DOMIsoSubspaces.h b/src/bun.js/bindings/ZigGeneratedClasses+DOMIsoSubspaces.h
index a521090c0..db9036b98 100644
--- a/src/bun.js/bindings/ZigGeneratedClasses+DOMIsoSubspaces.h
+++ b/src/bun.js/bindings/ZigGeneratedClasses+DOMIsoSubspaces.h
@@ -21,7 +21,8 @@ std::unique_ptr<IsoSubspace> m_subspaceForExpectStringMatching;
std::unique_ptr<IsoSubspace> m_subspaceForFFI;
std::unique_ptr<IsoSubspace> m_subspaceForFSWatcher;
std::unique_ptr<IsoSubspace> m_subspaceForFileSystemRouter;
-std::unique_ptr<IsoSubspace> m_subspaceForFileSystemRouterConstructor;std::unique_ptr<IsoSubspace> m_subspaceForHTMLRewriter;
+std::unique_ptr<IsoSubspace> m_subspaceForFileSystemRouterConstructor;std::unique_ptr<IsoSubspace> m_subspaceForH2FrameParser;
+std::unique_ptr<IsoSubspace> m_subspaceForH2FrameParserConstructor;std::unique_ptr<IsoSubspace> m_subspaceForHTMLRewriter;
std::unique_ptr<IsoSubspace> m_subspaceForHTMLRewriterConstructor;std::unique_ptr<IsoSubspace> m_subspaceForHTTPSServer;
std::unique_ptr<IsoSubspace> m_subspaceForHTTPServer;
std::unique_ptr<IsoSubspace> m_subspaceForListener;
diff --git a/src/bun.js/bindings/ZigGeneratedClasses+lazyStructureHeader.h b/src/bun.js/bindings/ZigGeneratedClasses+lazyStructureHeader.h
index 0596372b4..2dc660f5b 100644
--- a/src/bun.js/bindings/ZigGeneratedClasses+lazyStructureHeader.h
+++ b/src/bun.js/bindings/ZigGeneratedClasses+lazyStructureHeader.h
@@ -136,6 +136,12 @@ JSC::Structure* JSFileSystemRouterStructure() { return m_JSFileSystemRouter.getI
JSC::LazyClassStructure m_JSFileSystemRouter;
bool hasJSFileSystemRouterSetterValue { false };
mutable JSC::WriteBarrier<JSC::Unknown> m_JSFileSystemRouterSetterValue;
+JSC::Structure* JSH2FrameParserStructure() { return m_JSH2FrameParser.getInitializedOnMainThread(this); }
+ JSC::JSObject* JSH2FrameParserConstructor() { return m_JSH2FrameParser.constructorInitializedOnMainThread(this); }
+ JSC::JSValue JSH2FrameParserPrototype() { return m_JSH2FrameParser.prototypeInitializedOnMainThread(this); }
+ JSC::LazyClassStructure m_JSH2FrameParser;
+ bool hasJSH2FrameParserSetterValue { false };
+ mutable JSC::WriteBarrier<JSC::Unknown> m_JSH2FrameParserSetterValue;
JSC::Structure* JSHTMLRewriterStructure() { return m_JSHTMLRewriter.getInitializedOnMainThread(this); }
JSC::JSObject* JSHTMLRewriterConstructor() { return m_JSHTMLRewriter.constructorInitializedOnMainThread(this); }
JSC::JSValue JSHTMLRewriterPrototype() { return m_JSHTMLRewriter.prototypeInitializedOnMainThread(this); }
diff --git a/src/bun.js/bindings/ZigGeneratedClasses+lazyStructureImpl.h b/src/bun.js/bindings/ZigGeneratedClasses+lazyStructureImpl.h
index 40a473727..1ff623c44 100644
--- a/src/bun.js/bindings/ZigGeneratedClasses+lazyStructureImpl.h
+++ b/src/bun.js/bindings/ZigGeneratedClasses+lazyStructureImpl.h
@@ -137,6 +137,12 @@ void GlobalObject::initGeneratedLazyClasses() {
init.setStructure(WebCore::JSFileSystemRouter::createStructure(init.vm, init.global, init.prototype));
init.setConstructor(WebCore::JSFileSystemRouter::createConstructor(init.vm, init.global, init.prototype));
});
+ m_JSH2FrameParser.initLater(
+ [](LazyClassStructure::Initializer& init) {
+ init.setPrototype(WebCore::JSH2FrameParser::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
+ init.setStructure(WebCore::JSH2FrameParser::createStructure(init.vm, init.global, init.prototype));
+ init.setConstructor(WebCore::JSH2FrameParser::createConstructor(init.vm, init.global, init.prototype));
+ });
m_JSHTMLRewriter.initLater(
[](LazyClassStructure::Initializer& init) {
init.setPrototype(WebCore::JSHTMLRewriter::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
@@ -320,6 +326,7 @@ void GlobalObject::visitGeneratedLazyClasses(GlobalObject *thisObject, Visitor&
thisObject->m_JSFFI.visit(visitor); visitor.append(thisObject->m_JSFFISetterValue);
thisObject->m_JSFSWatcher.visit(visitor); visitor.append(thisObject->m_JSFSWatcherSetterValue);
thisObject->m_JSFileSystemRouter.visit(visitor); visitor.append(thisObject->m_JSFileSystemRouterSetterValue);
+ thisObject->m_JSH2FrameParser.visit(visitor); visitor.append(thisObject->m_JSH2FrameParserSetterValue);
thisObject->m_JSHTMLRewriter.visit(visitor); visitor.append(thisObject->m_JSHTMLRewriterSetterValue);
thisObject->m_JSHTTPSServer.visit(visitor); visitor.append(thisObject->m_JSHTTPSServerSetterValue);
thisObject->m_JSHTTPServer.visit(visitor); visitor.append(thisObject->m_JSHTTPServerSetterValue);
diff --git a/src/bun.js/bindings/ZigGeneratedClasses.cpp b/src/bun.js/bindings/ZigGeneratedClasses.cpp
index 376260383..86a1b3366 100644
--- a/src/bun.js/bindings/ZigGeneratedClasses.cpp
+++ b/src/bun.js/bindings/ZigGeneratedClasses.cpp
@@ -11052,14 +11052,30 @@ extern "C" void H2FrameParserClass__finalize(void*);
extern "C" EncodedJSValue H2FrameParserPrototype__detach(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame);
JSC_DECLARE_HOST_FUNCTION(H2FrameParserPrototype__detachCallback);
+extern "C" EncodedJSValue H2FrameParserPrototype__goaway(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame);
+JSC_DECLARE_HOST_FUNCTION(H2FrameParserPrototype__goawayCallback);
+
+extern "C" EncodedJSValue H2FrameParserPrototype__ping(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame);
+JSC_DECLARE_HOST_FUNCTION(H2FrameParserPrototype__pingCallback);
+
extern "C" EncodedJSValue H2FrameParserPrototype__read(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame);
JSC_DECLARE_HOST_FUNCTION(H2FrameParserPrototype__readCallback);
+extern "C" EncodedJSValue H2FrameParserPrototype__request(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame);
+JSC_DECLARE_HOST_FUNCTION(H2FrameParserPrototype__requestCallback);
+
+extern "C" EncodedJSValue H2FrameParserPrototype__updateSettings(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame);
+JSC_DECLARE_HOST_FUNCTION(H2FrameParserPrototype__settingsCallback);
+
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSH2FrameParserPrototype, JSH2FrameParserPrototype::Base);
static const HashTableValue JSH2FrameParserPrototypeTableValues[] = {
{ "detach"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, H2FrameParserPrototype__detachCallback, 0 } },
- { "read"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, H2FrameParserPrototype__readCallback, 1 } }
+ { "goaway"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, H2FrameParserPrototype__goawayCallback, 3 } },
+ { "ping"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, H2FrameParserPrototype__pingCallback, 0 } },
+ { "read"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, H2FrameParserPrototype__readCallback, 1 } },
+ { "request"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, H2FrameParserPrototype__requestCallback, 2 } },
+ { "settings"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, H2FrameParserPrototype__settingsCallback, 1 } }
};
const ClassInfo JSH2FrameParserPrototype::s_info = { "H2FrameParser"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSH2FrameParserPrototype) };
@@ -11104,6 +11120,62 @@ JSC_DEFINE_HOST_FUNCTION(H2FrameParserPrototype__detachCallback, (JSGlobalObject
return H2FrameParserPrototype__detach(thisObject->wrapped(), lexicalGlobalObject, callFrame);
}
+JSC_DEFINE_HOST_FUNCTION(H2FrameParserPrototype__goawayCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame))
+{
+ auto& vm = lexicalGlobalObject->vm();
+
+ JSH2FrameParser* thisObject = jsDynamicCast<JSH2FrameParser*>(callFrame->thisValue());
+
+ if (UNLIKELY(!thisObject)) {
+ auto throwScope = DECLARE_THROW_SCOPE(vm);
+ throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof H2FrameParser"_s);
+ return JSValue::encode({});
+ }
+
+ JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject);
+
+#ifdef BUN_DEBUG
+ /** View the file name of the JS file that called this function
+ * from a debugger */
+ SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm);
+ const char* fileName = sourceOrigin.string().utf8().data();
+ static const char* lastFileName = nullptr;
+ if (lastFileName != fileName) {
+ lastFileName = fileName;
+ }
+#endif
+
+ return H2FrameParserPrototype__goaway(thisObject->wrapped(), lexicalGlobalObject, callFrame);
+}
+
+JSC_DEFINE_HOST_FUNCTION(H2FrameParserPrototype__pingCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame))
+{
+ auto& vm = lexicalGlobalObject->vm();
+
+ JSH2FrameParser* thisObject = jsDynamicCast<JSH2FrameParser*>(callFrame->thisValue());
+
+ if (UNLIKELY(!thisObject)) {
+ auto throwScope = DECLARE_THROW_SCOPE(vm);
+ throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof H2FrameParser"_s);
+ return JSValue::encode({});
+ }
+
+ JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject);
+
+#ifdef BUN_DEBUG
+ /** View the file name of the JS file that called this function
+ * from a debugger */
+ SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm);
+ const char* fileName = sourceOrigin.string().utf8().data();
+ static const char* lastFileName = nullptr;
+ if (lastFileName != fileName) {
+ lastFileName = fileName;
+ }
+#endif
+
+ return H2FrameParserPrototype__ping(thisObject->wrapped(), lexicalGlobalObject, callFrame);
+}
+
JSC_DEFINE_HOST_FUNCTION(H2FrameParserPrototype__readCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame))
{
auto& vm = lexicalGlobalObject->vm();
@@ -11132,6 +11204,62 @@ JSC_DEFINE_HOST_FUNCTION(H2FrameParserPrototype__readCallback, (JSGlobalObject *
return H2FrameParserPrototype__read(thisObject->wrapped(), lexicalGlobalObject, callFrame);
}
+JSC_DEFINE_HOST_FUNCTION(H2FrameParserPrototype__requestCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame))
+{
+ auto& vm = lexicalGlobalObject->vm();
+
+ JSH2FrameParser* thisObject = jsDynamicCast<JSH2FrameParser*>(callFrame->thisValue());
+
+ if (UNLIKELY(!thisObject)) {
+ auto throwScope = DECLARE_THROW_SCOPE(vm);
+ throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof H2FrameParser"_s);
+ return JSValue::encode({});
+ }
+
+ JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject);
+
+#ifdef BUN_DEBUG
+ /** View the file name of the JS file that called this function
+ * from a debugger */
+ SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm);
+ const char* fileName = sourceOrigin.string().utf8().data();
+ static const char* lastFileName = nullptr;
+ if (lastFileName != fileName) {
+ lastFileName = fileName;
+ }
+#endif
+
+ return H2FrameParserPrototype__request(thisObject->wrapped(), lexicalGlobalObject, callFrame);
+}
+
+JSC_DEFINE_HOST_FUNCTION(H2FrameParserPrototype__settingsCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame))
+{
+ auto& vm = lexicalGlobalObject->vm();
+
+ JSH2FrameParser* thisObject = jsDynamicCast<JSH2FrameParser*>(callFrame->thisValue());
+
+ if (UNLIKELY(!thisObject)) {
+ auto throwScope = DECLARE_THROW_SCOPE(vm);
+ throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof H2FrameParser"_s);
+ return JSValue::encode({});
+ }
+
+ JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject);
+
+#ifdef BUN_DEBUG
+ /** View the file name of the JS file that called this function
+ * from a debugger */
+ SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm);
+ const char* fileName = sourceOrigin.string().utf8().data();
+ static const char* lastFileName = nullptr;
+ if (lastFileName != fileName) {
+ lastFileName = fileName;
+ }
+#endif
+
+ return H2FrameParserPrototype__updateSettings(thisObject->wrapped(), lexicalGlobalObject, callFrame);
+}
+
void JSH2FrameParserPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject)
{
Base::finishCreation(vm);
diff --git a/src/bun.js/bindings/ZigGeneratedClasses.h b/src/bun.js/bindings/ZigGeneratedClasses.h
index b8b694068..6bfd65a8a 100644
--- a/src/bun.js/bindings/ZigGeneratedClasses.h
+++ b/src/bun.js/bindings/ZigGeneratedClasses.h
@@ -1311,6 +1311,56 @@ public:
mutable JSC::WriteBarrier<JSC::Unknown> m_style;
};
+class JSH2FrameParser final : public JSC::JSDestructibleObject {
+public:
+ using Base = JSC::JSDestructibleObject;
+ static JSH2FrameParser* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx);
+
+ DECLARE_EXPORT_INFO;
+ template<typename, JSC::SubspaceAccess mode> static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm)
+ {
+ if constexpr (mode == JSC::SubspaceAccess::Concurrently)
+ return nullptr;
+ return WebCore::subspaceForImpl<JSH2FrameParser, WebCore::UseCustomHeapCellType::No>(
+ vm,
+ [](auto& spaces) { return spaces.m_clientSubspaceForH2FrameParser.get(); },
+ [](auto& spaces, auto&& space) { spaces.m_clientSubspaceForH2FrameParser = std::forward<decltype(space)>(space); },
+ [](auto& spaces) { return spaces.m_subspaceForH2FrameParser.get(); },
+ [](auto& spaces, auto&& space) { spaces.m_subspaceForH2FrameParser = std::forward<decltype(space)>(space); });
+ }
+
+ static void destroy(JSC::JSCell*);
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(static_cast<JSC::JSType>(0b11101110), StructureFlags), info());
+ }
+
+ static JSObject* createPrototype(VM& vm, JSDOMGlobalObject* globalObject);
+ static JSObject* createConstructor(VM& vm, JSGlobalObject* globalObject, JSValue prototype);
+
+ ~JSH2FrameParser();
+
+ void* wrapped() const { return m_ctx; }
+
+ void detach()
+ {
+ m_ctx = nullptr;
+ }
+
+ static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&);
+ static ptrdiff_t offsetOfWrapped() { return OBJECT_OFFSETOF(JSH2FrameParser, m_ctx); }
+
+ void* m_ctx { nullptr };
+
+ JSH2FrameParser(JSC::VM& vm, JSC::Structure* structure, void* sinkPtr)
+ : Base(vm, structure)
+ {
+ m_ctx = sinkPtr;
+ }
+
+ void finishCreation(JSC::VM&);
+};
+
class JSHTMLRewriter final : public JSC::JSDestructibleObject {
public:
using Base = JSC::JSDestructibleObject;
diff --git a/src/bun.js/bindings/ZigGlobalObject.cpp b/src/bun.js/bindings/ZigGlobalObject.cpp
index 467667953..9af138b9c 100644
--- a/src/bun.js/bindings/ZigGlobalObject.cpp
+++ b/src/bun.js/bindings/ZigGlobalObject.cpp
@@ -135,6 +135,7 @@ using namespace Bun;
extern "C" JSC::EncodedJSValue Bun__fetch(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame);
extern "C" JSC::EncodedJSValue Bun__canonicalizeIP(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame);
+extern "C" EncodedJSValue H2FrameParser__getConstructor(Zig::GlobalObject* globalObject);
using JSGlobalObject
= JSC::JSGlobalObject;
@@ -1640,6 +1641,14 @@ static JSC_DEFINE_HOST_FUNCTION(functionLazyLoad,
if (string == "events"_s) {
return JSValue::encode(WebCore::JSEventEmitter::getConstructor(vm, globalObject));
}
+ if(string == "internal/http2"_s) {
+ auto* obj = constructEmptyObject(globalObject);
+
+ obj->putDirect(
+ vm, JSC::PropertyName(JSC::Identifier::fromString(vm, "H2FrameParser"_s)), JSValue::decode(H2FrameParser__getConstructor(globalObject)), 0);
+
+ return JSValue::encode(obj);
+ }
if (string == "internal/tls"_s) {
auto* obj = constructEmptyObject(globalObject);
diff --git a/src/bun.js/bindings/generated_classes.zig b/src/bun.js/bindings/generated_classes.zig
index 7d5571ff3..6f106a1dd 100644
--- a/src/bun.js/bindings/generated_classes.zig
+++ b/src/bun.js/bindings/generated_classes.zig
@@ -3009,13 +3009,25 @@ pub const JSH2FrameParser = struct {
if (@TypeOf(H2FrameParser.detach) != CallbackType)
@compileLog("Expected H2FrameParser.detach to be a callback but received " ++ @typeName(@TypeOf(H2FrameParser.detach)));
+ if (@TypeOf(H2FrameParser.goaway) != CallbackType)
+ @compileLog("Expected H2FrameParser.goaway to be a callback but received " ++ @typeName(@TypeOf(H2FrameParser.goaway)));
+ if (@TypeOf(H2FrameParser.ping) != CallbackType)
+ @compileLog("Expected H2FrameParser.ping to be a callback but received " ++ @typeName(@TypeOf(H2FrameParser.ping)));
if (@TypeOf(H2FrameParser.read) != CallbackType)
@compileLog("Expected H2FrameParser.read to be a callback but received " ++ @typeName(@TypeOf(H2FrameParser.read)));
+ if (@TypeOf(H2FrameParser.request) != CallbackType)
+ @compileLog("Expected H2FrameParser.request to be a callback but received " ++ @typeName(@TypeOf(H2FrameParser.request)));
+ if (@TypeOf(H2FrameParser.updateSettings) != CallbackType)
+ @compileLog("Expected H2FrameParser.updateSettings to be a callback but received " ++ @typeName(@TypeOf(H2FrameParser.updateSettings)));
if (!JSC.is_bindgen) {
@export(H2FrameParser.constructor, .{ .name = "H2FrameParserClass__construct" });
@export(H2FrameParser.detach, .{ .name = "H2FrameParserPrototype__detach" });
@export(H2FrameParser.finalize, .{ .name = "H2FrameParserClass__finalize" });
+ @export(H2FrameParser.goaway, .{ .name = "H2FrameParserPrototype__goaway" });
+ @export(H2FrameParser.ping, .{ .name = "H2FrameParserPrototype__ping" });
@export(H2FrameParser.read, .{ .name = "H2FrameParserPrototype__read" });
+ @export(H2FrameParser.request, .{ .name = "H2FrameParserPrototype__request" });
+ @export(H2FrameParser.updateSettings, .{ .name = "H2FrameParserPrototype__updateSettings" });
}
}
};
diff --git a/src/bun.zig b/src/bun.zig
index c4dad48cf..89b92f9fd 100644
--- a/src/bun.zig
+++ b/src/bun.zig
@@ -765,6 +765,34 @@ pub const FDHashMapContext = struct {
}
};
};
+
+pub const U32HashMapContext = struct {
+ pub fn hash(_: @This(), value: u32) u64 {
+ return @intCast(value);
+ }
+ pub fn eql(_: @This(), a: u32, b: u32) bool {
+ return a == b;
+ }
+ pub fn pre(input: u32) Prehashed {
+ return Prehashed{
+ .value = @This().hash(.{}, input),
+ .input = input,
+ };
+ }
+
+ pub const Prehashed = struct {
+ value: u64,
+ input: u32,
+ pub fn hash(this: @This(), value: u32) u64 {
+ if (value == this.input) return this.value;
+ return @intCast(value);
+ }
+
+ pub fn eql(_: @This(), a: u32, b: u32) bool {
+ return a == b;
+ }
+ };
+};
// These wrappers exist to use our strings.eqlLong function
pub const StringArrayHashMapContext = struct {
pub fn hash(_: @This(), s: []const u8) u32 {
@@ -871,6 +899,10 @@ pub fn FDHashMap(comptime Type: type) type {
return std.HashMap(StoredFileDescriptorType, Type, FDHashMapContext, std.hash_map.default_max_load_percentage);
}
+pub fn U32HashMap(comptime Type: type) type {
+ return std.HashMap(u32, Type, U32HashMapContext, std.hash_map.default_max_load_percentage);
+}
+
const CopyFile = @import("./copy_file.zig");
pub const copyFileRange = CopyFile.copyFileRange;
pub const canUseCopyFileRangeSyscall = CopyFile.canUseCopyFileRangeSyscall;
diff --git a/src/js/node/http2.ts b/src/js/node/http2.ts
index f8d5058c2..01003f34b 100644
--- a/src/js/node/http2.ts
+++ b/src/js/node/http2.ts
@@ -2,8 +2,485 @@
// This is a stub! None of this is actually implemented yet.
const { hideFromStack, throwNotImplemented } = require("$shared");
-function connect() {
- throwNotImplemented("node:http2 connect", 887);
+const tls = require("node:tls");
+const net = require("node:net");
+type Socket = typeof net.Socket;
+type TLSSocket = typeof tls.TLSSocket;
+const EventEmitter = require("node:events");
+const { Duplex } = require("node:stream");
+const { H2FrameParser } = $lazy("internal/http2");
+
+
+type NativeHttp2HeaderValue = {
+ name: string;
+ value: string;
+ neverIndex?: boolean;
+};
+
+type Settings = {
+ headerTableSize: number;
+ enablePush: number;
+ maxConcurrentStreams: number;
+ initialWindowSize: number;
+ maxFrameSize: number;
+ maxHeaderListSize: number;
+};
+
+
+class Http2Session extends EventEmitter {
+
+}
+
+const http2 = {
+ sensitiveHeaders: Symbol("bun.http2.sensitiveHeaders"),
+};
+
+class ClientStream extends EventEmitter {
+
+}
+class Http2Stream extends EventEmitter {
+
+}
+
+const bunHTTP2Write = Symbol.for("::bunhttp2write::");
+const bunHTTP2StreamResponded = Symbol.for("::bunhttp2hasResponded::");
+const bunHTTP2StreamReadQueue = Symbol.for("::bunhttp2ReadQueue::");
+
+function reduceToCompatibleHeaders(obj: any, currentValue: any) {
+ let { name, value } = currentValue;
+ if(name === ":status") {
+ value = parseInt(value, 10);
+ }
+ const lastValue = obj[name];
+ if(typeof lastValue === "string" || typeof lastValue === "number") {
+ obj[name] = [obj[name], value];
+ } else if(Array.isArray(lastValue)) {
+ obj[name].push(value);
+ } else {
+ obj[name] = value;
+ }
+ return obj;
+}
+
+class ClientHttp2Stream extends Duplex {
+ #id: number;
+ #session: ClientHttp2Session | null = null;
+ [bunHTTP2StreamReadQueue]: Array<Buffer> = $createFIFO();
+ [bunHTTP2StreamResponded]: boolean = false;
+ constructor(streamId, session) {
+ super();
+ this.#id = streamId;
+ this.#session = session;
+ }
+
+ get session() {
+ return this.#session;
+ }
+
+ respond() {
+ // not implemented yet
+ }
+
+ _destroy(err, callback) {
+
+ callback(err);
+ }
+
+ _final(callback) {
+
+ callback();
+ }
+
+ _read(size) {
+ const queue = this[bunHTTP2StreamReadQueue];
+ let chunk;
+ while ((chunk = queue.peek())) {
+ if (!this.push(chunk)) return;
+ queue.shift();
+ }
+ }
+
+ _write(chunk, encoding, callback) {
+ if (typeof chunk == "string" && encoding !== "ascii") chunk = Buffer.from(chunk, encoding);
+ const session = this.#session;
+ if(session) {
+ session[bunHTTP2Write](this.#id, chunk);
+ if(typeof callback == "function") {
+ callback();
+ }
+ }
+ }
+}
+
+class ClientHttp2Session extends Http2Session{
+ #closed: boolean = false;
+ #queue: Array<Buffer> = [];
+ #connecions: number = 0;
+ #socket: TLSSocket | Socket | null;
+ #parser: typeof H2FrameParser | null;
+ #url: URL;
+ #originSet = new Set<string>();
+ #streams = new Map<number, any>();
+ #isServer: boolean = false;
+ #localSettings: Settings | null = {
+ headerTableSize: 4096,
+ enablePush: 1,
+ maxConcurrentStreams: 100,
+ initialWindowSize: 65535,
+ maxFrameSize: 16384,
+ maxHeaderListSize: 65535,
+ };
+ #pendingSettingsAck: boolean = true;
+ #remoteSettings: Settings | null = null;
+
+ static #Handlers = {
+ binaryType: "buffer",
+ streamStart(self: ClientHttp2Session, streamId: number){
+ self.#connecions++;
+ },
+ streamError(self: ClientHttp2Session, streamId: number, error: number){
+ // var stream = self.#streams.get(streamId);
+ // if(stream) {
+ // stream.state = 2;
+ // stream.error = error;
+ // }
+ },
+ streamEnd(self: ClientHttp2Session, streamId: number){
+ self.#connecions--;
+ var stream = self.#streams.get(streamId);
+ if(stream) {
+ stream.emit("end");
+ }
+ if(self.#connecions === 0 && self.#closed) {
+ self.#socket?.end();
+ self.#parser?.detach();
+ self.#parser = null;
+ }
+ },
+ streamData(self: ClientHttp2Session, streamId: number, data: Buffer){
+ var stream = self.#streams.get(streamId);
+ if(stream) {
+ const queue = stream[bunHTTP2StreamReadQueue];
+
+ if (queue.isEmpty()) {
+ if (stream.push(data)) return;
+ }
+ queue.push(data);
+ }
+ },
+ streamHeaders(self: ClientHttp2Session, streamId: number, headers: Array<NativeHttp2HeaderValue>, flags: number){
+ var stream = self.#streams.get(streamId);
+ if(stream) {
+ if(stream[bunHTTP2StreamResponded]) {
+ stream.emit("trailers", headers.reduce(reduceToCompatibleHeaders), flags);
+ } else {
+ stream[bunHTTP2StreamResponded] = true;
+ stream.emit("response", headers.reduce(reduceToCompatibleHeaders), flags);
+ }
+ }
+ },
+ localSettings(self: ClientHttp2Session, settings: Settings){
+ self.emit("localSettings", settings);
+ self.#localSettings = settings;
+ self.#pendingSettingsAck = false;
+ },
+ remoteSettings(self: ClientHttp2Session, settings: Settings){
+ self.emit("remoteSettings", settings);
+ self.#remoteSettings = settings;
+ },
+ ping(self: ClientHttp2Session, ping: Buffer){
+ self.emit("ping", ping);
+ },
+ error(self: ClientHttp2Session, errorCode: number, lastStreamId: number, opaqueData: Buffer){
+ self.emit("error", new Error("ERROR_HTTP2"));
+ self.#socket?.end();
+ self.#parser?.detach();
+ self.#parser = null;
+ },
+ goaway(self: ClientHttp2Session, errorCode: number, lastStreamId: number, opaqueData: Buffer){
+ self.emit("goaway", errorCode, lastStreamId, opaqueData);
+ self.#socket?.end();
+ self.#parser?.detach();
+ self.#parser = null;
+ },
+ end(self: ClientHttp2Session, errorCode: number, lastStreamId: number, opaqueData: Buffer){
+ self.#socket?.end();
+ self.#parser.detach();
+ self.#parser = null;
+ },
+ write(self: ClientHttp2Session, buffer: Buffer){
+ const socket = self.#socket;
+ if(self.#closed) {
+ //queue
+ self.#queue.push(buffer);
+ } else {
+ // redirect writes to socket
+ socket.write(buffer);
+ }
+ }
+ }
+
+ #onRead(data: Buffer){
+ this.#parser?.read(data);
+ }
+ get originSet() {
+ if(this.encrypted) {
+ return Array.from(this.#originSet);
+ }
+ }
+ get alpnProtocol() {
+
+ const socket = this.#socket;
+ if(!socket) return;
+ return (socket as TLSSocket).alpnProtocol;
+ }
+ #onConnect(){
+ this.#closed = false;
+ const socket = this.#socket as TLSSocket;
+ if (socket.alpnProtocol !== "h2") {
+ socket.end();
+ this.emit("error", new Error("h2 is not supported"));
+ }
+ this.#originSet.add(socket.remoteAddress as string);
+ socket.on("data", this.#onRead.bind(this));
+ // connected!
+ this.emit("connect", this, socket);
+
+ // redirect the queued buffers
+ const queue = this.#queue;
+ while(queue.length) {
+ socket.write(queue.shift());
+ }
+ }
+
+ #onClose(){
+ this.#parser?.detach();
+ this.#parser = null;
+ this.emit("close");
+ this.#socket = null;
+ }
+ #onError(error: Error){
+ this.#parser?.detach();
+ this.#parser = null;
+ this.emit("error", error);
+ }
+ #onTimeout(){
+ this.#parser?.detach();
+ this.#parser = null;
+ this.emit("timeout");
+ }
+
+ get connected() {
+ return this.#socket?.connecting === false;
+ }
+ get destroyed() {
+ return this.#socket === null;
+ }
+ get encrypted() {
+ if(!this.#socket) return;
+
+ return (this.#socket instanceof TLSSocket);
+ }
+ get closed() {
+ return this.#closed;
+ }
+
+ get remoteSettings() {
+ return this.#remoteSettings;
+ }
+
+ get localSettings() {
+ return this.#localSettings;
+ }
+
+ get pendingSettingsAck() {
+ return this.#pendingSettingsAck;
+ }
+
+ get type(){
+ if(this.#isServer) return 0;
+ return 1;
+ }
+ unref() {
+ return this.#socket?.unref();
+ }
+ ref() {
+ return this.#socket?.ref();
+ }
+ setTimeout(msecs, callback) {
+ return this.#socket?.setTimeout(msecs, callback);
+ }
+ ping(payload, callback) {
+ if(typeof callback === "function") {
+ this.once("ping", callback);
+ }
+ payload = payload || Buffer.alloc(8);
+ if(payload.byteLength !== 8) {
+ throw new Error("ERR_HTTP2_PING_PAYLOAD_SIZE");
+ }
+ this.#parser?.ping(payload);
+ return this.#parser && this.#socket ? true : false;
+ }
+ goaway(errorCode, lastStreamId, opaqueData) {
+ return this.#parser?.goaway(errorCode, lastStreamId, opaqueData);
+ }
+ setLocalWindowSize(windowSize) {
+ return this.#parser?.setLocalWindowSize(windowSize);
+ }
+ get socket() {
+ // TODO: Proxy socket
+ return this.#socket;
+ }
+ get state() {
+ return this.#parser?.getCurrentState();
+ }
+
+ settings(settings: Settings, callback) {
+ this.#pendingSettingsAck = true;
+ this.#parser?.settings(settings);
+ if(callback) {
+ const start = Date.now();
+ this.once("localSettings", ()=> {
+ callback(null, this.#localSettings, Date.now() - start);
+ });
+ }
+ }
+
+ constructor(url: string | URL, options?: Settings) {
+ super();
+
+ if(typeof url === "string") {
+ url = new URL(url);
+ }
+ if(!(url instanceof URL)) {
+ throw new Error("ERR_HTTP2: Invalid URL");
+ }
+ this.#isServer = true;
+ this.#url = url;
+ this.#socket = tls.connect({
+ host: url.hostname,
+ port: url.port ? parseInt(url.port, 10) : (url.protocol === "https:" ? 443 : 80),
+ ALPNProtocols: ["h2", "http/1.1"],
+ }, this.#onConnect.bind(this));
+ this.#parser = new H2FrameParser({
+ context: this,
+ settings: options,
+ handlers: ClientHttp2Session.#Handlers
+ });
+ this.#socket.on("close", this.#onClose.bind(this));
+ this.#socket.on("error", this.#onError.bind(this));
+ this.#socket.on("timeout", this.#onTimeout.bind(this));
+ }
+
+ request(headers: any, options?: any) {
+ if(!(headers instanceof Object)) {
+ throw new Error("ERROR_HTTP2: Invalid headers");
+ }
+ const flat_headers: Array<NativeHttp2HeaderValue> = [];
+ let has_scheme = false;
+ let has_authority = false;
+ let method: string | null = null;
+
+ Object.keys(headers).forEach(key => {
+ //@ts-ignore
+ if (key === http2.sensitiveHeaders) {
+ const name = headers[0];
+ const values = headers[key];
+ if(Array.isArray(values) === false) {
+ throw new Error("ERROR_HTTP2: Invalid sensitiveHeaders");
+ }
+ switch(name) {
+ case ":scheme":
+ has_scheme = true;
+ break;
+ case ":authority":
+ has_authority = true;
+ break;
+ case ":method":
+ method = values[1]?.toString();
+ break;
+ };
+
+ if(name === ":scheme") {
+ has_scheme = true;
+ } else if(name === ":authority") {
+ has_authority = true;
+ }
+ for(let i = 1; i < values.length; i++){
+ flat_headers.push({ name: name, value: values[i]?.toString(), neverIndex: true });
+ }
+ } else {
+ switch(key) {
+ case ":scheme":
+ has_scheme = true;
+ break;
+ case ":authority":
+ has_authority = true;
+ break;
+ case ":method":
+ method = headers[key]?.toString() || "GET";
+ break;
+ }
+
+ const value = headers[key];
+ if(Array.isArray(value)) {
+ for(let i = 0; i < value.length; i++){
+ flat_headers.push({ name: key, value: value[i]?.toString(), neverIndex: true });
+ }
+ } else {
+ flat_headers.push({ name: key, value: value?.toString() });
+ }
+ }
+ });
+
+ const url = this.#url;
+ if(!has_scheme) {
+ let protocol: string = options?.protocol || "https";
+ switch(url.protocol) {
+ case "https:":
+ protocol = "https";
+ break
+ case "http:":
+ protocol = "http";
+ break;
+ };
+
+ flat_headers.push({ name: ":scheme", value: protocol });
+ }
+ if(!has_authority) {
+ flat_headers.push({ name: ":authority", value: url.hostname });
+ }
+ if(!method) {
+ method = "GET";
+ flat_headers.push({ name: ":method", value: method });
+ }
+
+ let stream_id: number;
+ if(arguments.length === 1) {
+ stream_id = this.#parser.request(flat_headers);
+ } else {
+ stream_id = this.#parser.request(flat_headers, options);
+ }
+ const req = new ClientHttp2Stream(stream_id, this);
+ this.#streams.set(stream_id, req);
+ return req;
+ }
+ static connect(url: string | URL, options?: Settings) {
+ if(options) {
+ return new ClientHttp2Session(url, options);
+ }
+ return new ClientHttp2Session(url);
+ }
+ [bunHTTP2Write](streamId: number, chunk: Buffer) {
+ this.#parser?.writeStream(streamId, chunk);
+ }
+}
+
+function connect(url: string | URL, options?: Settings) {
+ if(options) {
+ return ClientHttp2Session.connect(url, options);
+ }
+ return ClientHttp2Session.connect(url);
}
const constants = {
NGHTTP2_ERR_FRAME_SIZE_ERROR: -522,
@@ -293,6 +770,7 @@ export default {
Http2ServerRequest,
Http2ServerResponse,
connect,
+ ClientHttp2Session,
};
hideFromStack([
@@ -304,4 +782,6 @@ hideFromStack([
getDefaultSettings,
getPackedSettings,
getUnpackedSettings,
+ ClientHttp2Session,
+ ClientHttp2Stream,
]);
diff --git a/src/js/node/zlib.js b/src/js/node/zlib.js
index 06c523b85..3e464a2de 100644
--- a/src/js/node/zlib.js
+++ b/src/js/node/zlib.js
@@ -3605,6 +3605,7 @@ var require_binding = __commonJS({
}
Zlib.prototype = {};
Zlib.prototype.close = function () {
+ console.log("Zlib close");
if (this.write_in_progress) {
this.pending_close = true;
return;
diff --git a/src/js/out/InternalModuleRegistryConstants.h b/src/js/out/InternalModuleRegistryConstants.h
index 3c8ff89c3..0e2b898a3 100644
--- a/src/js/out/InternalModuleRegistryConstants.h
+++ b/src/js/out/InternalModuleRegistryConstants.h
@@ -82,7 +82,7 @@ static constexpr ASCIILiteral NodeFSPromisesCode = "(function (){\"use strict\";
//
//
-static constexpr ASCIILiteral NodeHttpCode = "(function (){\"use strict\";// src/js/out/tmp/node/http.ts\nvar checkInvalidHeaderChar = function(val) {\n return RegExpPrototypeExec.call(headerCharRegex, val) !== null;\n}, isIPv6 = function(input) {\n return new RegExp(\"^((\?:(\?:[0-9a-fA-F]{1,4}):){7}(\?:(\?:[0-9a-fA-F]{1,4})|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){6}(\?:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|:(\?:[0-9a-fA-F]{1,4})|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){5}(\?::((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,2}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){4}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,1}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,3}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){3}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,2}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,4}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){2}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,3}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,5}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){1}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,4}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,6}|:)|(\?::((\?::(\?:[0-9a-fA-F]{1,4})){0,5}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(\?::(\?:[0-9a-fA-F]{1,4})){1,7}|:)))(%[0-9a-zA-Z-.:]{1,})\?$\").test(input);\n}, isValidTLSArray = function(obj) {\n if (typeof obj === \"string\" || isTypedArray(obj) || obj instanceof ArrayBuffer || obj instanceof Blob)\n return !0;\n if (Array.isArray(obj)) {\n for (var i = 0;i < obj.length; i++)\n if (typeof obj !== \"string\" && !isTypedArray(obj) && !(obj instanceof ArrayBuffer) && !(obj instanceof Blob))\n return !1;\n return !0;\n }\n}, validateMsecs = function(numberlike, field) {\n if (typeof numberlike !== \"number\" || numberlike < 0)\n throw new ERR_INVALID_ARG_TYPE(field, \"number\", numberlike);\n return numberlike;\n}, validateFunction = function(callable, field) {\n if (typeof callable !== \"function\")\n throw new ERR_INVALID_ARG_TYPE(field, \"Function\", callable);\n return callable;\n}, getHeader = function(headers, name) {\n if (!headers)\n return;\n const result = headers.get(name);\n return result == null \? void 0 : result;\n}, createServer = function(options, callback) {\n return new Server(options, callback);\n}, emitListeningNextTick = function(self, onListen, err, hostname, port) {\n if (typeof onListen === \"function\")\n try {\n onListen(err, hostname, port);\n } catch (err2) {\n self.emit(\"error\", err2);\n }\n if (self.listening = !err, err)\n self.emit(\"error\", err);\n else\n self.emit(\"listening\", hostname, port);\n}, assignHeaders = function(object, req) {\n var headers = req.headers.toJSON();\n const rawHeaders = @newArrayWithSize(req.headers.count * 2);\n var i = 0;\n for (let key in headers)\n rawHeaders[i++] = key, rawHeaders[i++] = headers[key];\n object.headers = headers, object.rawHeaders = rawHeaders;\n};\nvar getDefaultHTTPSAgent = function() {\n return _defaultHTTPSAgent \?\?= new Agent({ defaultPort: 443, protocol: \"https:\" });\n};\nvar urlToHttpOptions = function(url) {\n var { protocol, hostname, hash, search, pathname, href, port, username, password } = url;\n return {\n protocol,\n hostname: typeof hostname === \"string\" && StringPrototypeStartsWith.call(hostname, \"[\") \? StringPrototypeSlice.call(hostname, 1, -1) : hostname,\n hash,\n search,\n pathname,\n path: `${pathname || \"\"}${search || \"\"}`,\n href,\n port: port \? Number(port) : protocol === \"https:\" \? 443 : protocol === \"http:\" \? 80 : void 0,\n auth: username || password \? `${decodeURIComponent(username)}:${decodeURIComponent(password)}` : void 0\n };\n}, validateHost = function(host, name) {\n if (host !== null && host !== void 0 && typeof host !== \"string\")\n throw new Error(\"Invalid arg type in options\");\n return host;\n}, checkIsHttpToken = function(val) {\n return RegExpPrototypeExec.call(tokenRegExp, val) !== null;\n};\nvar _writeHead = function(statusCode, reason, obj, response) {\n if (statusCode |= 0, statusCode < 100 || statusCode > 999)\n throw new Error(\"status code must be between 100 and 999\");\n if (typeof reason === \"string\")\n response.statusMessage = reason;\n else {\n if (!response.statusMessage)\n response.statusMessage = STATUS_CODES[statusCode] || \"unknown\";\n obj = reason;\n }\n response.statusCode = statusCode;\n {\n let k;\n if (Array.isArray(obj)) {\n if (obj.length % 2 !== 0)\n throw new Error(\"raw headers must have an even number of elements\");\n for (let n = 0;n < obj.length; n += 2)\n if (k = obj[n + 0], k)\n response.setHeader(k, obj[n + 1]);\n } else if (obj) {\n const keys = Object.keys(obj);\n for (let i = 0;i < keys.length; i++)\n if (k = keys[i], k)\n response.setHeader(k, obj[k]);\n }\n }\n if (statusCode === 204 || statusCode === 304 || statusCode >= 100 && statusCode <= 199)\n response._hasBody = !1;\n}, request = function(url, options, cb) {\n return new ClientRequest(url, options, cb);\n}, get = function(url, options, cb) {\n const req = request(url, options, cb);\n return req.end(), req;\n}, $, EventEmitter = @getInternalField(@internalModuleRegistry, 16) || @createInternalModuleById(16), { isTypedArray } = @requireNativeModule(\"node:util/types\"), { Duplex, Readable, Writable } = @getInternalField(@internalModuleRegistry, 35) || @createInternalModuleById(35), headerCharRegex = /[^\\t\\x20-\\x7e\\x80-\\xff]/, validateHeaderName = (name, label) => {\n if (typeof name !== \"string\" || !name || !checkIsHttpToken(name))\n throw new Error(\"ERR_INVALID_HTTP_TOKEN\");\n}, validateHeaderValue = (name, value) => {\n if (value === void 0)\n throw new Error(\"ERR_HTTP_INVALID_HEADER_VALUE\");\n if (checkInvalidHeaderChar(value))\n throw new Error(\"ERR_INVALID_CHAR\");\n}, { URL } = globalThis, globalReportError = globalThis.reportError, setTimeout = globalThis.setTimeout, fetch = Bun.fetch;\nvar kEmptyObject = Object.freeze(Object.create(null)), kOutHeaders = Symbol.for(\"kOutHeaders\"), kEndCalled = Symbol.for(\"kEndCalled\"), kAbortController = Symbol.for(\"kAbortController\"), kClearTimeout = Symbol(\"kClearTimeout\"), kCorked = Symbol.for(\"kCorked\"), searchParamsSymbol = Symbol.for(\"query\"), StringPrototypeSlice = String.prototype.slice, StringPrototypeStartsWith = String.prototype.startsWith, StringPrototypeToUpperCase = String.prototype.toUpperCase, StringPrototypeIncludes = String.prototype.includes, StringPrototypeCharCodeAt = String.prototype.charCodeAt, StringPrototypeIndexOf = String.prototype.indexOf, ArrayIsArray = Array.isArray, RegExpPrototypeExec = RegExp.prototype.exec, ObjectAssign = Object.assign;\nvar INVALID_PATH_REGEX = /[^\\u0021-\\u00ff]/;\nvar _defaultHTTPSAgent, kInternalRequest = Symbol(\"kInternalRequest\"), kInternalSocketData = Symbol.for(\"::bunternal::\"), kEmptyBuffer = Buffer.alloc(0);\n\nclass ERR_INVALID_ARG_TYPE extends TypeError {\n constructor(name, expected, actual) {\n super(`The ${name} argument must be of type ${expected}. Received type ${typeof actual}`);\n this.code = \"ERR_INVALID_ARG_TYPE\";\n }\n}\nvar FakeSocket = class Socket extends Duplex {\n bytesRead = 0;\n bytesWritten = 0;\n connecting = !1;\n remoteAddress = null;\n remotePort;\n timeout = 0;\n isServer = !1;\n address() {\n return {\n address: this.localAddress,\n family: this.localFamily,\n port: this.localPort\n };\n }\n get bufferSize() {\n return this.writableLength;\n }\n connect(port, host, connectListener) {\n return this;\n }\n _destroy(err, callback) {\n }\n _final(callback) {\n }\n get localAddress() {\n return \"127.0.0.1\";\n }\n get localFamily() {\n return \"IPv4\";\n }\n get localPort() {\n return 80;\n }\n get pending() {\n return this.connecting;\n }\n _read(size) {\n }\n get readyState() {\n if (this.connecting)\n return \"opening\";\n if (this.readable)\n return this.writable \? \"open\" : \"readOnly\";\n else\n return this.writable \? \"writeOnly\" : \"closed\";\n }\n ref() {\n }\n get remoteFamily() {\n return \"IPv4\";\n }\n resetAndDestroy() {\n }\n setKeepAlive(enable = !1, initialDelay = 0) {\n }\n setNoDelay(noDelay = !0) {\n return this;\n }\n setTimeout(timeout, callback) {\n return this;\n }\n unref() {\n }\n _write(chunk, encoding, callback) {\n }\n};\n\nclass Agent extends EventEmitter {\n defaultPort = 80;\n protocol = \"http:\";\n options;\n requests;\n sockets;\n freeSockets;\n keepAliveMsecs;\n keepAlive;\n maxSockets;\n maxFreeSockets;\n scheduling;\n maxTotalSockets;\n totalSocketCount;\n #fakeSocket;\n static get globalAgent() {\n return globalAgent;\n }\n static get defaultMaxSockets() {\n return Infinity;\n }\n constructor(options = kEmptyObject) {\n super();\n if (this.options = options = { ...options, path: null }, options.noDelay === void 0)\n options.noDelay = !0;\n this.requests = kEmptyObject, this.sockets = kEmptyObject, this.freeSockets = kEmptyObject, this.keepAliveMsecs = options.keepAliveMsecs || 1000, this.keepAlive = options.keepAlive || !1, this.maxSockets = options.maxSockets || Agent.defaultMaxSockets, this.maxFreeSockets = options.maxFreeSockets || 256, this.scheduling = options.scheduling || \"lifo\", this.maxTotalSockets = options.maxTotalSockets, this.totalSocketCount = 0, this.defaultPort = options.defaultPort || 80, this.protocol = options.protocol || \"http:\";\n }\n createConnection() {\n return this.#fakeSocket \?\?= new FakeSocket;\n }\n getName(options = kEmptyObject) {\n let name = `http:${options.host || \"localhost\"}:`;\n if (options.port)\n name += options.port;\n if (name += \":\", options.localAddress)\n name += options.localAddress;\n if (options.family === 4 || options.family === 6)\n name += `:${options.family}`;\n if (options.socketPath)\n name += `:${options.socketPath}`;\n return name;\n }\n addRequest() {\n }\n createSocket(req, options, cb) {\n cb(null, this.#fakeSocket \?\?= new FakeSocket);\n }\n removeSocket() {\n }\n keepSocketAlive() {\n return !0;\n }\n reuseSocket() {\n }\n destroy() {\n }\n}\n\nclass Server extends EventEmitter {\n #server;\n #options;\n #tls;\n #is_tls = !1;\n listening = !1;\n serverName;\n constructor(options, callback) {\n super();\n if (typeof options === \"function\")\n callback = options, options = {};\n else if (options == null || typeof options === \"object\") {\n options = { ...options }, this.#tls = null;\n let key = options.key;\n if (key) {\n if (!isValidTLSArray(key))\n @throwTypeError(\"key argument must be an string, Buffer, TypedArray, BunFile or an array containing string, Buffer, TypedArray or BunFile\");\n this.#is_tls = !0;\n }\n let cert = options.cert;\n if (cert) {\n if (!isValidTLSArray(cert))\n @throwTypeError(\"cert argument must be an string, Buffer, TypedArray, BunFile or an array containing string, Buffer, TypedArray or BunFile\");\n this.#is_tls = !0;\n }\n let ca = options.ca;\n if (ca) {\n if (!isValidTLSArray(ca))\n @throwTypeError(\"ca argument must be an string, Buffer, TypedArray, BunFile or an array containing string, Buffer, TypedArray or BunFile\");\n this.#is_tls = !0;\n }\n let passphrase = options.passphrase;\n if (passphrase && typeof passphrase !== \"string\")\n @throwTypeError(\"passphrase argument must be an string\");\n let serverName = options.servername;\n if (serverName && typeof serverName !== \"string\")\n @throwTypeError(\"servername argument must be an string\");\n let secureOptions = options.secureOptions || 0;\n if (secureOptions && typeof secureOptions !== \"number\")\n @throwTypeError(\"secureOptions argument must be an number\");\n if (this.#is_tls)\n this.#tls = {\n serverName,\n key,\n cert,\n ca,\n passphrase,\n secureOptions\n };\n else\n this.#tls = null;\n } else\n throw new Error(\"bun-http-polyfill: invalid arguments\");\n if (this.#options = options, callback)\n this.on(\"request\", callback);\n }\n closeAllConnections() {\n const server = this.#server;\n if (!server)\n return;\n this.#server = void 0, server.stop(!0), this.emit(\"close\");\n }\n closeIdleConnections() {\n }\n close(optionalCallback) {\n const server = this.#server;\n if (!server) {\n if (typeof optionalCallback === \"function\")\n process.nextTick(optionalCallback, new Error(\"Server is not running\"));\n return;\n }\n if (this.#server = void 0, typeof optionalCallback === \"function\")\n this.once(\"close\", optionalCallback);\n server.stop(), this.emit(\"close\");\n }\n address() {\n if (!this.#server)\n return null;\n const address = this.#server.hostname;\n return {\n address,\n family: isIPv6(address) \? \"IPv6\" : \"IPv4\",\n port: this.#server.port\n };\n }\n listen(port, host, backlog, onListen) {\n const server = this;\n if (typeof host === \"function\")\n onListen = host, host = void 0;\n if (typeof port === \"function\")\n onListen = port;\n else if (typeof port === \"object\") {\n if (port\?.signal\?.addEventListener(\"abort\", () => {\n this.close();\n }), host = port\?.host, port = port\?.port, typeof port\?.callback === \"function\")\n onListen = port\?.callback;\n }\n if (typeof backlog === \"function\")\n onListen = backlog;\n const ResponseClass = this.#options.ServerResponse || ServerResponse, RequestClass = this.#options.IncomingMessage || IncomingMessage;\n try {\n const tls = this.#tls;\n if (tls)\n this.serverName = tls.serverName || host || \"localhost\";\n this.#server = Bun.serve({\n tls,\n port,\n hostname: host,\n websocket: {\n open(ws) {\n ws.data.open(ws);\n },\n message(ws, message) {\n ws.data.message(ws, message);\n },\n close(ws, code, reason) {\n ws.data.close(ws, code, reason);\n },\n drain(ws) {\n ws.data.drain(ws);\n }\n },\n fetch(req, _server) {\n var pendingResponse, pendingError, rejectFunction, resolveFunction, reject = (err) => {\n if (pendingError)\n return;\n if (pendingError = err, rejectFunction)\n rejectFunction(err);\n }, reply = function(resp) {\n if (pendingResponse)\n return;\n if (pendingResponse = resp, resolveFunction)\n resolveFunction(resp);\n };\n const http_req = new RequestClass(req), http_res = new ResponseClass({ reply, req: http_req });\n if (http_req.once(\"error\", (err) => reject(err)), http_res.once(\"error\", (err) => reject(err)), req.headers.get(\"upgrade\")) {\n const socket = new FakeSocket;\n socket[kInternalSocketData] = [_server, http_res, req], server.emit(\"upgrade\", http_req, socket, kEmptyBuffer);\n } else\n server.emit(\"request\", http_req, http_res);\n if (pendingError)\n throw pendingError;\n if (pendingResponse)\n return pendingResponse;\n return new Promise((resolve, reject2) => {\n resolveFunction = resolve, rejectFunction = reject2;\n });\n }\n }), setTimeout(emitListeningNextTick, 1, this, onListen, null, this.#server.hostname, this.#server.port);\n } catch (err) {\n setTimeout(emitListeningNextTick, 1, this, onListen, err);\n }\n return this;\n }\n setTimeout(msecs, callback) {\n }\n}\nclass IncomingMessage extends Readable {\n method;\n complete;\n constructor(req, defaultIncomingOpts) {\n const method = req.method;\n super();\n const url = new URL(req.url);\n var { type = \"request\", [kInternalRequest]: nodeReq } = defaultIncomingOpts || {};\n this.#noBody = type === \"request\" \? method === \"GET\" || method === \"HEAD\" || method === \"TRACE\" || method === \"CONNECT\" || method === \"OPTIONS\" || (parseInt(req.headers.get(\"Content-Length\") || \"\") || 0) === 0 : !1, this.#req = req, this.method = method, this.#type = type, this.complete = !!this.#noBody, this.#bodyStream = void 0;\n const socket = new FakeSocket;\n socket.remoteAddress = url.hostname, socket.remotePort = url.port, this.#fakeSocket = socket, this.url = url.pathname + url.search, this.#nodeReq = this.req = nodeReq, assignHeaders(this, req);\n }\n headers;\n rawHeaders;\n _consuming = !1;\n _dumped = !1;\n #bodyStream;\n #fakeSocket;\n #noBody = !1;\n #aborted = !1;\n #req;\n url;\n #type;\n #nodeReq;\n _construct(callback) {\n if (this.#type === \"response\" || this.#noBody) {\n callback();\n return;\n }\n const contentLength = this.#req.headers.get(\"content-length\");\n if ((contentLength \? parseInt(contentLength, 10) : 0) === 0) {\n this.#noBody = !0, callback();\n return;\n }\n callback();\n }\n async#consumeStream(reader) {\n while (!0) {\n var { done, value } = await reader.readMany();\n if (this.#aborted)\n return;\n if (done) {\n this.push(null), this.destroy();\n break;\n }\n for (var v of value)\n this.push(v);\n }\n }\n _read(size) {\n if (this.#noBody)\n this.push(null), this.complete = !0;\n else if (this.#bodyStream == null) {\n const reader = this.#req.body\?.getReader();\n if (!reader) {\n this.push(null);\n return;\n }\n this.#bodyStream = reader, this.#consumeStream(reader);\n }\n }\n get aborted() {\n return this.#aborted;\n }\n #abort() {\n if (this.#aborted)\n return;\n this.#aborted = !0;\n var bodyStream = this.#bodyStream;\n if (!bodyStream)\n return;\n bodyStream.cancel(), this.complete = !0, this.#bodyStream = void 0, this.push(null);\n }\n get connection() {\n return this.#fakeSocket;\n }\n get statusCode() {\n return this.#req.status;\n }\n get statusMessage() {\n return STATUS_CODES[this.#req.status];\n }\n get httpVersion() {\n return \"1.1\";\n }\n get rawTrailers() {\n return [];\n }\n get httpVersionMajor() {\n return 1;\n }\n get httpVersionMinor() {\n return 1;\n }\n get trailers() {\n return kEmptyObject;\n }\n get socket() {\n return this.#fakeSocket \?\?= new FakeSocket;\n }\n set socket(val) {\n this.#fakeSocket = val;\n }\n setTimeout(msecs, callback) {\n throw new Error(\"not implemented\");\n }\n}\n\nclass OutgoingMessage extends Writable {\n constructor() {\n super(...arguments);\n }\n #headers;\n headersSent = !1;\n sendDate = !0;\n req;\n timeout;\n #finished = !1;\n [kEndCalled] = !1;\n #fakeSocket;\n #timeoutTimer;\n [kAbortController] = null;\n _implicitHeader() {\n }\n get headers() {\n if (!this.#headers)\n return kEmptyObject;\n return this.#headers.toJSON();\n }\n get shouldKeepAlive() {\n return !0;\n }\n get chunkedEncoding() {\n return !1;\n }\n set chunkedEncoding(value) {\n }\n set shouldKeepAlive(value) {\n }\n get useChunkedEncodingByDefault() {\n return !0;\n }\n set useChunkedEncodingByDefault(value) {\n }\n get socket() {\n return this.#fakeSocket \?\?= new FakeSocket;\n }\n set socket(val) {\n this.#fakeSocket = val;\n }\n get connection() {\n return this.socket;\n }\n get finished() {\n return this.#finished;\n }\n appendHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n headers.append(name, value);\n }\n flushHeaders() {\n }\n getHeader(name) {\n return getHeader(this.#headers, name);\n }\n getHeaders() {\n if (!this.#headers)\n return kEmptyObject;\n return this.#headers.toJSON();\n }\n getHeaderNames() {\n var headers = this.#headers;\n if (!headers)\n return [];\n return Array.from(headers.keys());\n }\n removeHeader(name) {\n if (!this.#headers)\n return;\n this.#headers.delete(name);\n }\n setHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n return headers.set(name, value), this;\n }\n hasHeader(name) {\n if (!this.#headers)\n return !1;\n return this.#headers.has(name);\n }\n addTrailers(headers) {\n throw new Error(\"not implemented\");\n }\n [kClearTimeout]() {\n if (this.#timeoutTimer)\n clearTimeout(this.#timeoutTimer), this.removeAllListeners(\"timeout\"), this.#timeoutTimer = void 0;\n }\n #onTimeout() {\n this.#timeoutTimer = void 0, this[kAbortController]\?.abort(), this.emit(\"timeout\");\n }\n setTimeout(msecs, callback) {\n if (this.destroyed)\n return this;\n if (this.timeout = msecs = validateMsecs(msecs, \"msecs\"), clearTimeout(this.#timeoutTimer), msecs === 0) {\n if (callback !== void 0)\n validateFunction(callback, \"callback\"), this.removeListener(\"timeout\", callback);\n this.#timeoutTimer = void 0;\n } else if (this.#timeoutTimer = setTimeout(this.#onTimeout.bind(this), msecs).unref(), callback !== void 0)\n validateFunction(callback, \"callback\"), this.once(\"timeout\", callback);\n return this;\n }\n}\nvar OriginalWriteHeadFn, OriginalImplicitHeadFn;\n\nclass ServerResponse extends Writable {\n constructor({ req, reply }) {\n super();\n if (this.req = req, this._reply = reply, this.sendDate = !0, this.statusCode = 200, this.headersSent = !1, this.statusMessage = void 0, this.#controller = void 0, this.#firstWrite = void 0, this._writableState.decodeStrings = !1, this.#deferred = void 0, req.method === \"HEAD\")\n this._hasBody = !1;\n }\n req;\n _reply;\n sendDate;\n statusCode;\n #headers;\n headersSent = !1;\n statusMessage;\n #controller;\n #firstWrite;\n _sent100 = !1;\n _defaultKeepAlive = !1;\n _removedConnection = !1;\n _removedContLen = !1;\n _hasBody = !0;\n #deferred = void 0;\n #finished = !1;\n _implicitHeader() {\n this.writeHead(this.statusCode);\n }\n _write(chunk, encoding, callback) {\n if (!this.#firstWrite && !this.headersSent) {\n this.#firstWrite = chunk, callback();\n return;\n }\n this.#ensureReadableStreamController((controller) => {\n controller.write(chunk), callback();\n });\n }\n _writev(chunks, callback) {\n if (chunks.length === 1 && !this.headersSent && !this.#firstWrite) {\n this.#firstWrite = chunks[0].chunk, callback();\n return;\n }\n this.#ensureReadableStreamController((controller) => {\n for (let chunk of chunks)\n controller.write(chunk.chunk);\n callback();\n });\n }\n #ensureReadableStreamController(run) {\n var thisController = this.#controller;\n if (thisController)\n return run(thisController);\n this.headersSent = !0;\n var firstWrite = this.#firstWrite;\n this.#firstWrite = void 0, this._reply(new Response(new ReadableStream({\n type: \"direct\",\n pull: (controller) => {\n if (this.#controller = controller, firstWrite)\n controller.write(firstWrite);\n if (firstWrite = void 0, run(controller), !this.#finished)\n return new Promise((resolve) => {\n this.#deferred = resolve;\n });\n }\n }), {\n headers: this.#headers,\n status: this.statusCode,\n statusText: this.statusMessage \?\? STATUS_CODES[this.statusCode]\n }));\n }\n #drainHeadersIfObservable() {\n if (this._implicitHeader === OriginalImplicitHeadFn && this.writeHead === OriginalWriteHeadFn)\n return;\n this._implicitHeader();\n }\n _final(callback) {\n if (!this.headersSent) {\n var data = this.#firstWrite || \"\";\n this.#firstWrite = void 0, this.#finished = !0, this.#drainHeadersIfObservable(), this._reply(new Response(data, {\n headers: this.#headers,\n status: this.statusCode,\n statusText: this.statusMessage \?\? STATUS_CODES[this.statusCode]\n })), callback && callback();\n return;\n }\n this.#finished = !0, this.#ensureReadableStreamController((controller) => {\n controller.end(), callback();\n var deferred = this.#deferred;\n if (deferred)\n this.#deferred = void 0, deferred();\n });\n }\n writeProcessing() {\n throw new Error(\"not implemented\");\n }\n addTrailers(headers) {\n throw new Error(\"not implemented\");\n }\n assignSocket(socket) {\n throw new Error(\"not implemented\");\n }\n detachSocket(socket) {\n throw new Error(\"not implemented\");\n }\n writeContinue(callback) {\n throw new Error(\"not implemented\");\n }\n setTimeout(msecs, callback) {\n throw new Error(\"not implemented\");\n }\n get shouldKeepAlive() {\n return !0;\n }\n get chunkedEncoding() {\n return !1;\n }\n set chunkedEncoding(value) {\n }\n set shouldKeepAlive(value) {\n }\n get useChunkedEncodingByDefault() {\n return !0;\n }\n set useChunkedEncodingByDefault(value) {\n }\n appendHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n headers.append(name, value);\n }\n flushHeaders() {\n }\n getHeader(name) {\n return getHeader(this.#headers, name);\n }\n getHeaders() {\n var headers = this.#headers;\n if (!headers)\n return kEmptyObject;\n return headers.toJSON();\n }\n getHeaderNames() {\n var headers = this.#headers;\n if (!headers)\n return [];\n return Array.from(headers.keys());\n }\n removeHeader(name) {\n if (!this.#headers)\n return;\n this.#headers.delete(name);\n }\n setHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n return headers.set(name, value), this;\n }\n hasHeader(name) {\n if (!this.#headers)\n return !1;\n return this.#headers.has(name);\n }\n writeHead(statusCode, statusMessage, headers) {\n return _writeHead(statusCode, statusMessage, headers, this), this;\n }\n}\nOriginalWriteHeadFn = ServerResponse.prototype.writeHead;\nOriginalImplicitHeadFn = ServerResponse.prototype._implicitHeader;\n\nclass ClientRequest extends OutgoingMessage {\n #timeout;\n #res = null;\n #upgradeOrConnect = !1;\n #parser = null;\n #maxHeadersCount = null;\n #reusedSocket = !1;\n #host;\n #protocol;\n #method;\n #port;\n #useDefaultPort;\n #joinDuplicateHeaders;\n #maxHeaderSize;\n #agent = globalAgent;\n #path;\n #socketPath;\n #bodyChunks = null;\n #fetchRequest;\n #signal = null;\n [kAbortController] = null;\n #timeoutTimer = void 0;\n #options;\n #finished;\n get path() {\n return this.#path;\n }\n get port() {\n return this.#port;\n }\n get method() {\n return this.#method;\n }\n get host() {\n return this.#host;\n }\n get protocol() {\n return this.#protocol;\n }\n _write(chunk, encoding, callback) {\n if (!this.#bodyChunks) {\n this.#bodyChunks = [chunk], callback();\n return;\n }\n this.#bodyChunks.push(chunk), callback();\n }\n _writev(chunks, callback) {\n if (!this.#bodyChunks) {\n this.#bodyChunks = chunks, callback();\n return;\n }\n this.#bodyChunks.push(...chunks), callback();\n }\n _final(callback) {\n if (this.#finished = !0, this[kAbortController] = new AbortController, this[kAbortController].signal.addEventListener(\"abort\", () => {\n this[kClearTimeout]();\n }), this.#signal\?.aborted)\n this[kAbortController].abort();\n var method = this.#method, body = this.#bodyChunks\?.length === 1 \? this.#bodyChunks[0] : Buffer.concat(this.#bodyChunks || []);\n let url, proxy;\n if (this.#path.startsWith(\"http://\") || this.#path.startsWith(\"https://\"))\n url = this.#path, proxy = `${this.#protocol}//${this.#host}${this.#useDefaultPort \? \"\" : \":\" + this.#port}`;\n else\n url = `${this.#protocol}//${this.#host}${this.#useDefaultPort \? \"\" : \":\" + this.#port}${this.#path}`;\n try {\n this.#fetchRequest = fetch(url, {\n method,\n headers: this.getHeaders(),\n body: body && method !== \"GET\" && method !== \"HEAD\" && method !== \"OPTIONS\" \? body : void 0,\n redirect: \"manual\",\n verbose: !1,\n signal: this[kAbortController].signal,\n proxy,\n timeout: !1\n }).then((response) => {\n var res = this.#res = new IncomingMessage(response, {\n type: \"response\",\n [kInternalRequest]: this\n });\n this.emit(\"response\", res);\n }).catch((err) => {\n this.emit(\"error\", err);\n }).finally(() => {\n this.#fetchRequest = null, this[kClearTimeout]();\n });\n } catch (err) {\n this.emit(\"error\", err);\n } finally {\n callback();\n }\n }\n get aborted() {\n return this.#signal\?.aborted || !!this[kAbortController]\?.signal.aborted;\n }\n abort() {\n if (this.aborted)\n return;\n this[kAbortController].abort();\n }\n constructor(input, options, cb) {\n super();\n if (typeof input === \"string\") {\n const urlStr = input;\n try {\n var urlObject = new URL(urlStr);\n } catch (e) {\n @throwTypeError(`Invalid URL: ${urlStr}`);\n }\n input = urlToHttpOptions(urlObject);\n } else if (input && typeof input === \"object\" && input instanceof URL)\n input = urlToHttpOptions(input);\n else\n cb = options, options = input, input = null;\n if (typeof options === \"function\")\n cb = options, options = input || kEmptyObject;\n else\n options = ObjectAssign(input || {}, options);\n var defaultAgent = options._defaultAgent || Agent.globalAgent;\n let protocol = options.protocol;\n if (!protocol)\n if (options.port === 443)\n protocol = \"https:\";\n else\n protocol = defaultAgent.protocol || \"http:\";\n switch (this.#protocol = protocol, this.#agent\?.protocol) {\n case void 0:\n break;\n case \"http:\":\n if (protocol === \"https:\") {\n defaultAgent = this.#agent = getDefaultHTTPSAgent();\n break;\n }\n case \"https:\":\n if (protocol === \"https\") {\n defaultAgent = this.#agent = Agent.globalAgent;\n break;\n }\n default:\n break;\n }\n if (options.path) {\n const path = String(options.path);\n if (RegExpPrototypeExec.call(INVALID_PATH_REGEX, path) !== null)\n throw new Error(\"Path contains unescaped characters\");\n }\n if (protocol !== \"http:\" && protocol !== \"https:\" && protocol) {\n const expectedProtocol = defaultAgent\?.protocol \?\? \"http:\";\n throw new Error(`Protocol mismatch. Expected: ${expectedProtocol}. Got: ${protocol}`);\n }\n const defaultPort = protocol === \"https:\" \? 443 : 80;\n this.#port = options.port || options.defaultPort || this.#agent\?.defaultPort || defaultPort, this.#useDefaultPort = this.#port === defaultPort;\n const host = this.#host = options.host = validateHost(options.hostname, \"hostname\") || validateHost(options.host, \"host\") || \"localhost\";\n this.#socketPath = options.socketPath;\n const signal = options.signal;\n if (signal)\n signal.addEventListener(\"abort\", () => {\n this[kAbortController]\?.abort();\n }), this.#signal = signal;\n let method = options.method;\n const methodIsString = typeof method === \"string\";\n if (method !== null && method !== void 0 && !methodIsString)\n throw new Error(\"ERR_INVALID_ARG_TYPE: options.method\");\n if (methodIsString && method) {\n if (!checkIsHttpToken(method))\n throw new Error(\"ERR_INVALID_HTTP_TOKEN: Method\");\n method = this.#method = StringPrototypeToUpperCase.call(method);\n } else\n method = this.#method = \"GET\";\n const _maxHeaderSize = options.maxHeaderSize;\n this.#maxHeaderSize = _maxHeaderSize;\n var _joinDuplicateHeaders = options.joinDuplicateHeaders;\n if (this.#joinDuplicateHeaders = _joinDuplicateHeaders, this.#path = options.path || \"/\", cb)\n this.once(\"response\", cb);\n this.#finished = !1, this.#res = null, this.#upgradeOrConnect = !1, this.#parser = null, this.#maxHeadersCount = null, this.#reusedSocket = !1, this.#host = host, this.#protocol = protocol;\n var timeout = options.timeout;\n if (timeout !== void 0 && timeout !== 0)\n this.setTimeout(timeout, void 0);\n if (!ArrayIsArray(headers)) {\n var headers = options.headers;\n if (headers)\n for (let key in headers)\n this.setHeader(key, headers[key]);\n var auth = options.auth;\n if (auth && !this.getHeader(\"Authorization\"))\n this.setHeader(\"Authorization\", \"Basic \" + Buffer.from(auth).toString(\"base64\"));\n }\n var { signal: _signal, ...optsWithoutSignal } = options;\n this.#options = optsWithoutSignal;\n }\n setSocketKeepAlive(enable = !0, initialDelay = 0) {\n }\n setNoDelay(noDelay = !0) {\n }\n [kClearTimeout]() {\n if (this.#timeoutTimer)\n clearTimeout(this.#timeoutTimer), this.#timeoutTimer = void 0, this.removeAllListeners(\"timeout\");\n }\n #onTimeout() {\n this.#timeoutTimer = void 0, this[kAbortController]\?.abort(), this.emit(\"timeout\");\n }\n setTimeout(msecs, callback) {\n if (this.destroyed)\n return this;\n if (this.timeout = msecs = validateMsecs(msecs, \"msecs\"), clearTimeout(this.#timeoutTimer), msecs === 0) {\n if (callback !== void 0)\n validateFunction(callback, \"callback\"), this.removeListener(\"timeout\", callback);\n this.#timeoutTimer = void 0;\n } else if (this.#timeoutTimer = setTimeout(this.#onTimeout.bind(this), msecs).unref(), callback !== void 0)\n validateFunction(callback, \"callback\"), this.once(\"timeout\", callback);\n return this;\n }\n}\nvar tokenRegExp = /^[\\^_`a-zA-Z\\-0-9!#$%&'*+.|~]+$/, METHODS = [\n \"ACL\",\n \"BIND\",\n \"CHECKOUT\",\n \"CONNECT\",\n \"COPY\",\n \"DELETE\",\n \"GET\",\n \"HEAD\",\n \"LINK\",\n \"LOCK\",\n \"M-SEARCH\",\n \"MERGE\",\n \"MKACTIVITY\",\n \"MKCALENDAR\",\n \"MKCOL\",\n \"MOVE\",\n \"NOTIFY\",\n \"OPTIONS\",\n \"PATCH\",\n \"POST\",\n \"PROPFIND\",\n \"PROPPATCH\",\n \"PURGE\",\n \"PUT\",\n \"REBIND\",\n \"REPORT\",\n \"SEARCH\",\n \"SOURCE\",\n \"SUBSCRIBE\",\n \"TRACE\",\n \"UNBIND\",\n \"UNLINK\",\n \"UNLOCK\",\n \"UNSUBSCRIBE\"\n], STATUS_CODES = {\n 100: \"Continue\",\n 101: \"Switching Protocols\",\n 102: \"Processing\",\n 103: \"Early Hints\",\n 200: \"OK\",\n 201: \"Created\",\n 202: \"Accepted\",\n 203: \"Non-Authoritative Information\",\n 204: \"No Content\",\n 205: \"Reset Content\",\n 206: \"Partial Content\",\n 207: \"Multi-Status\",\n 208: \"Already Reported\",\n 226: \"IM Used\",\n 300: \"Multiple Choices\",\n 301: \"Moved Permanently\",\n 302: \"Found\",\n 303: \"See Other\",\n 304: \"Not Modified\",\n 305: \"Use Proxy\",\n 307: \"Temporary Redirect\",\n 308: \"Permanent Redirect\",\n 400: \"Bad Request\",\n 401: \"Unauthorized\",\n 402: \"Payment Required\",\n 403: \"Forbidden\",\n 404: \"Not Found\",\n 405: \"Method Not Allowed\",\n 406: \"Not Acceptable\",\n 407: \"Proxy Authentication Required\",\n 408: \"Request Timeout\",\n 409: \"Conflict\",\n 410: \"Gone\",\n 411: \"Length Required\",\n 412: \"Precondition Failed\",\n 413: \"Payload Too Large\",\n 414: \"URI Too Long\",\n 415: \"Unsupported Media Type\",\n 416: \"Range Not Satisfiable\",\n 417: \"Expectation Failed\",\n 418: \"I'm a Teapot\",\n 421: \"Misdirected Request\",\n 422: \"Unprocessable Entity\",\n 423: \"Locked\",\n 424: \"Failed Dependency\",\n 425: \"Too Early\",\n 426: \"Upgrade Required\",\n 428: \"Precondition Required\",\n 429: \"Too Many Requests\",\n 431: \"Request Header Fields Too Large\",\n 451: \"Unavailable For Legal Reasons\",\n 500: \"Internal Server Error\",\n 501: \"Not Implemented\",\n 502: \"Bad Gateway\",\n 503: \"Service Unavailable\",\n 504: \"Gateway Timeout\",\n 505: \"HTTP Version Not Supported\",\n 506: \"Variant Also Negotiates\",\n 507: \"Insufficient Storage\",\n 508: \"Loop Detected\",\n 509: \"Bandwidth Limit Exceeded\",\n 510: \"Not Extended\",\n 511: \"Network Authentication Required\"\n}, globalAgent = new Agent;\n$ = {\n Agent,\n Server,\n METHODS,\n STATUS_CODES,\n createServer,\n ServerResponse,\n IncomingMessage,\n request,\n get,\n maxHeaderSize: 16384,\n validateHeaderName,\n validateHeaderValue,\n setMaxIdleHTTPParsers(max) {\n },\n globalAgent,\n ClientRequest,\n OutgoingMessage\n};\nreturn $})\n"_s;
+static constexpr ASCIILiteral NodeHttpCode = "(function (){\"use strict\";// src/js/out/tmp/node/http.ts\nvar checkInvalidHeaderChar = function(val) {\n return RegExpPrototypeExec.call(headerCharRegex, val) !== null;\n}, isIPv6 = function(input) {\n return new RegExp(\"^((\?:(\?:[0-9a-fA-F]{1,4}):){7}(\?:(\?:[0-9a-fA-F]{1,4})|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){6}(\?:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|:(\?:[0-9a-fA-F]{1,4})|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){5}(\?::((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,2}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){4}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,1}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,3}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){3}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,2}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,4}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){2}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,3}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,5}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){1}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,4}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,6}|:)|(\?::((\?::(\?:[0-9a-fA-F]{1,4})){0,5}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(\?::(\?:[0-9a-fA-F]{1,4})){1,7}|:)))(%[0-9a-zA-Z-.:]{1,})\?$\").test(input);\n}, isValidTLSArray = function(obj) {\n if (typeof obj === \"string\" || isTypedArray(obj) || obj instanceof ArrayBuffer || obj instanceof Blob)\n return !0;\n if (Array.isArray(obj)) {\n for (var i = 0;i < obj.length; i++)\n if (typeof obj !== \"string\" && !isTypedArray(obj) && !(obj instanceof ArrayBuffer) && !(obj instanceof Blob))\n return !1;\n return !0;\n }\n}, validateMsecs = function(numberlike, field) {\n if (typeof numberlike !== \"number\" || numberlike < 0)\n throw new ERR_INVALID_ARG_TYPE(field, \"number\", numberlike);\n return numberlike;\n}, validateFunction = function(callable, field) {\n if (typeof callable !== \"function\")\n throw new ERR_INVALID_ARG_TYPE(field, \"Function\", callable);\n return callable;\n}, getHeader = function(headers, name) {\n if (!headers)\n return;\n const result = headers.get(name);\n return result == null \? void 0 : result;\n}, createServer = function(options, callback) {\n return new Server(options, callback);\n}, emitListeningNextTick = function(self, onListen, err, hostname, port) {\n if (typeof onListen === \"function\")\n try {\n onListen(err, hostname, port);\n } catch (err2) {\n self.emit(\"error\", err2);\n }\n if (self.listening = !err, err)\n self.emit(\"error\", err);\n else\n self.emit(\"listening\", hostname, port);\n}, assignHeaders = function(object, req) {\n var headers = req.headers.toJSON();\n const rawHeaders = @newArrayWithSize(req.headers.count * 2);\n var i = 0;\n for (let key in headers)\n rawHeaders[i++] = key, rawHeaders[i++] = headers[key];\n object.headers = headers, object.rawHeaders = rawHeaders;\n};\nvar getDefaultHTTPSAgent = function() {\n return _defaultHTTPSAgent \?\?= new Agent({ defaultPort: 443, protocol: \"https:\" });\n};\nvar urlToHttpOptions = function(url) {\n var { protocol, hostname, hash, search, pathname, href, port, username, password } = url;\n return {\n protocol,\n hostname: typeof hostname === \"string\" && StringPrototypeStartsWith.call(hostname, \"[\") \? StringPrototypeSlice.call(hostname, 1, -1) : hostname,\n hash,\n search,\n pathname,\n path: `${pathname || \"\"}${search || \"\"}`,\n href,\n port: port \? Number(port) : protocol === \"https:\" \? 443 : protocol === \"http:\" \? 80 : void 0,\n auth: username || password \? `${decodeURIComponent(username)}:${decodeURIComponent(password)}` : void 0\n };\n}, validateHost = function(host, name) {\n if (host !== null && host !== void 0 && typeof host !== \"string\")\n throw new Error(\"Invalid arg type in options\");\n return host;\n}, checkIsHttpToken = function(val) {\n return RegExpPrototypeExec.call(tokenRegExp, val) !== null;\n};\nvar _writeHead = function(statusCode, reason, obj, response) {\n if (statusCode |= 0, statusCode < 100 || statusCode > 999)\n throw new Error(\"status code must be between 100 and 999\");\n if (typeof reason === \"string\")\n response.statusMessage = reason;\n else {\n if (!response.statusMessage)\n response.statusMessage = STATUS_CODES[statusCode] || \"unknown\";\n obj = reason;\n }\n response.statusCode = statusCode;\n {\n let k;\n if (Array.isArray(obj)) {\n if (obj.length % 2 !== 0)\n throw new Error(\"raw headers must have an even number of elements\");\n for (let n = 0;n < obj.length; n += 2)\n if (k = obj[n + 0], k)\n response.setHeader(k, obj[n + 1]);\n } else if (obj) {\n const keys = Object.keys(obj);\n for (let i = 0;i < keys.length; i++)\n if (k = keys[i], k)\n response.setHeader(k, obj[k]);\n }\n }\n if (statusCode === 204 || statusCode === 304 || statusCode >= 100 && statusCode <= 199)\n response._hasBody = !1;\n}, request = function(url, options, cb) {\n return new ClientRequest(url, options, cb);\n}, get = function(url, options, cb) {\n const req = request(url, options, cb);\n return req.end(), req;\n}, $, EventEmitter = @getInternalField(@internalModuleRegistry, 16) || @createInternalModuleById(16), { isTypedArray } = @requireNativeModule(\"node:util/types\"), { Duplex, Readable, Writable } = @getInternalField(@internalModuleRegistry, 35) || @createInternalModuleById(35), headerCharRegex = /[^\\t\\x20-\\x7e\\x80-\\xff]/, validateHeaderName = (name, label) => {\n if (typeof name !== \"string\" || !name || !checkIsHttpToken(name))\n throw new Error(\"ERR_INVALID_HTTP_TOKEN\");\n}, validateHeaderValue = (name, value) => {\n if (value === void 0)\n throw new Error(\"ERR_HTTP_INVALID_HEADER_VALUE\");\n if (checkInvalidHeaderChar(value))\n throw new Error(\"ERR_INVALID_CHAR\");\n}, { URL } = globalThis, globalReportError = globalThis.reportError, setTimeout = globalThis.setTimeout, fetch = Bun.fetch;\nvar kEmptyObject = Object.freeze(Object.create(null)), kOutHeaders = Symbol.for(\"kOutHeaders\"), kEndCalled = Symbol.for(\"kEndCalled\"), kAbortController = Symbol.for(\"kAbortController\"), kClearTimeout = Symbol(\"kClearTimeout\"), kCorked = Symbol.for(\"kCorked\"), searchParamsSymbol = Symbol.for(\"query\"), StringPrototypeSlice = String.prototype.slice, StringPrototypeStartsWith = String.prototype.startsWith, StringPrototypeToUpperCase = String.prototype.toUpperCase, StringPrototypeIncludes = String.prototype.includes, StringPrototypeCharCodeAt = String.prototype.charCodeAt, StringPrototypeIndexOf = String.prototype.indexOf, ArrayIsArray = Array.isArray, RegExpPrototypeExec = RegExp.prototype.exec, ObjectAssign = Object.assign;\nvar INVALID_PATH_REGEX = /[^\\u0021-\\u00ff]/;\nvar _defaultHTTPSAgent, kInternalRequest = Symbol(\"kInternalRequest\"), kInternalSocketData = Symbol.for(\"::bunternal::\"), kEmptyBuffer = Buffer.alloc(0);\n\nclass ERR_INVALID_ARG_TYPE extends TypeError {\n constructor(name, expected, actual) {\n super(`The ${name} argument must be of type ${expected}. Received type ${typeof actual}`);\n this.code = \"ERR_INVALID_ARG_TYPE\";\n }\n}\nvar FakeSocket = class Socket extends Duplex {\n bytesRead = 0;\n bytesWritten = 0;\n connecting = !1;\n remoteAddress = null;\n remotePort;\n timeout = 0;\n isServer = !1;\n address() {\n return {\n address: this.localAddress,\n family: this.localFamily,\n port: this.localPort\n };\n }\n get bufferSize() {\n return this.writableLength;\n }\n connect(port, host, connectListener) {\n return this;\n }\n _destroy(err, callback) {\n }\n _final(callback) {\n }\n get localAddress() {\n return \"127.0.0.1\";\n }\n get localFamily() {\n return \"IPv4\";\n }\n get localPort() {\n return 80;\n }\n get pending() {\n return this.connecting;\n }\n _read(size) {\n }\n get readyState() {\n if (this.connecting)\n return \"opening\";\n if (this.readable)\n return this.writable \? \"open\" : \"readOnly\";\n else\n return this.writable \? \"writeOnly\" : \"closed\";\n }\n ref() {\n }\n get remoteFamily() {\n return \"IPv4\";\n }\n resetAndDestroy() {\n }\n setKeepAlive(enable = !1, initialDelay = 0) {\n }\n setNoDelay(noDelay = !0) {\n return this;\n }\n setTimeout(timeout, callback) {\n return this;\n }\n unref() {\n }\n _write(chunk, encoding, callback) {\n }\n};\n\nclass Agent extends EventEmitter {\n defaultPort = 80;\n protocol = \"http:\";\n options;\n requests;\n sockets;\n freeSockets;\n keepAliveMsecs;\n keepAlive;\n maxSockets;\n maxFreeSockets;\n scheduling;\n maxTotalSockets;\n totalSocketCount;\n #fakeSocket;\n static get globalAgent() {\n return globalAgent;\n }\n static get defaultMaxSockets() {\n return Infinity;\n }\n constructor(options = kEmptyObject) {\n super();\n if (this.options = options = { ...options, path: null }, options.noDelay === void 0)\n options.noDelay = !0;\n this.requests = kEmptyObject, this.sockets = kEmptyObject, this.freeSockets = kEmptyObject, this.keepAliveMsecs = options.keepAliveMsecs || 1000, this.keepAlive = options.keepAlive || !1, this.maxSockets = options.maxSockets || Agent.defaultMaxSockets, this.maxFreeSockets = options.maxFreeSockets || 256, this.scheduling = options.scheduling || \"lifo\", this.maxTotalSockets = options.maxTotalSockets, this.totalSocketCount = 0, this.defaultPort = options.defaultPort || 80, this.protocol = options.protocol || \"http:\";\n }\n createConnection() {\n return this.#fakeSocket \?\?= new FakeSocket;\n }\n getName(options = kEmptyObject) {\n let name = `http:${options.host || \"localhost\"}:`;\n if (options.port)\n name += options.port;\n if (name += \":\", options.localAddress)\n name += options.localAddress;\n if (options.family === 4 || options.family === 6)\n name += `:${options.family}`;\n if (options.socketPath)\n name += `:${options.socketPath}`;\n return name;\n }\n addRequest() {\n }\n createSocket(req, options, cb) {\n cb(null, this.#fakeSocket \?\?= new FakeSocket);\n }\n removeSocket() {\n }\n keepSocketAlive() {\n return !0;\n }\n reuseSocket() {\n }\n destroy() {\n }\n}\n\nclass Server extends EventEmitter {\n #server;\n #options;\n #tls;\n #is_tls = !1;\n listening = !1;\n serverName;\n constructor(options, callback) {\n super();\n if (typeof options === \"function\")\n callback = options, options = {};\n else if (options == null || typeof options === \"object\") {\n options = { ...options }, this.#tls = null;\n let key = options.key;\n if (key) {\n if (!isValidTLSArray(key))\n @throwTypeError(\"key argument must be an string, Buffer, TypedArray, BunFile or an array containing string, Buffer, TypedArray or BunFile\");\n this.#is_tls = !0;\n }\n let cert = options.cert;\n if (cert) {\n if (!isValidTLSArray(cert))\n @throwTypeError(\"cert argument must be an string, Buffer, TypedArray, BunFile or an array containing string, Buffer, TypedArray or BunFile\");\n this.#is_tls = !0;\n }\n let ca = options.ca;\n if (ca) {\n if (!isValidTLSArray(ca))\n @throwTypeError(\"ca argument must be an string, Buffer, TypedArray, BunFile or an array containing string, Buffer, TypedArray or BunFile\");\n this.#is_tls = !0;\n }\n let passphrase = options.passphrase;\n if (passphrase && typeof passphrase !== \"string\")\n @throwTypeError(\"passphrase argument must be an string\");\n let serverName = options.servername;\n if (serverName && typeof serverName !== \"string\")\n @throwTypeError(\"servername argument must be an string\");\n let secureOptions = options.secureOptions || 0;\n if (secureOptions && typeof secureOptions !== \"number\")\n @throwTypeError(\"secureOptions argument must be an number\");\n if (this.#is_tls)\n this.#tls = {\n serverName,\n key,\n cert,\n ca,\n passphrase,\n secureOptions\n };\n else\n this.#tls = null;\n } else\n throw new Error(\"bun-http-polyfill: invalid arguments\");\n if (this.#options = options, callback)\n this.on(\"request\", callback);\n }\n closeAllConnections() {\n const server = this.#server;\n if (!server)\n return;\n this.#server = void 0, server.stop(!0), this.emit(\"close\");\n }\n closeIdleConnections() {\n }\n close(optionalCallback) {\n const server = this.#server;\n if (!server) {\n if (typeof optionalCallback === \"function\")\n process.nextTick(optionalCallback, new Error(\"Server is not running\"));\n return;\n }\n if (this.#server = void 0, typeof optionalCallback === \"function\")\n this.once(\"close\", optionalCallback);\n server.stop(), this.emit(\"close\");\n }\n address() {\n if (!this.#server)\n return null;\n const address = this.#server.hostname;\n return {\n address,\n family: isIPv6(address) \? \"IPv6\" : \"IPv4\",\n port: this.#server.port\n };\n }\n listen(port, host, backlog, onListen) {\n const server = this;\n if (typeof host === \"function\")\n onListen = host, host = void 0;\n if (typeof port === \"function\")\n onListen = port;\n else if (typeof port === \"object\") {\n if (port\?.signal\?.addEventListener(\"abort\", () => {\n this.close();\n }), host = port\?.host, port = port\?.port, typeof port\?.callback === \"function\")\n onListen = port\?.callback;\n }\n if (typeof backlog === \"function\")\n onListen = backlog;\n const ResponseClass = this.#options.ServerResponse || ServerResponse, RequestClass = this.#options.IncomingMessage || IncomingMessage;\n try {\n const tls = this.#tls;\n if (tls)\n this.serverName = tls.serverName || host || \"localhost\";\n this.#server = Bun.serve({\n tls,\n port,\n hostname: host,\n websocket: {\n open(ws) {\n ws.data.open(ws);\n },\n message(ws, message) {\n ws.data.message(ws, message);\n },\n close(ws, code, reason) {\n ws.data.close(ws, code, reason);\n },\n drain(ws) {\n ws.data.drain(ws);\n }\n },\n fetch(req, _server) {\n var pendingResponse, pendingError, rejectFunction, resolveFunction, reject = (err) => {\n if (pendingError)\n return;\n if (pendingError = err, rejectFunction)\n rejectFunction(err);\n }, reply = function(resp) {\n if (pendingResponse)\n return;\n if (pendingResponse = resp, resolveFunction)\n resolveFunction(resp);\n };\n const http_req = new RequestClass(req), http_res = new ResponseClass({ reply, req: http_req });\n if (http_req.once(\"error\", (err) => reject(err)), http_res.once(\"error\", (err) => reject(err)), req.headers.get(\"upgrade\")) {\n const socket = new FakeSocket;\n socket[kInternalSocketData] = [_server, http_res, req], server.emit(\"upgrade\", http_req, socket, kEmptyBuffer);\n } else\n server.emit(\"request\", http_req, http_res);\n if (pendingError)\n throw pendingError;\n if (pendingResponse)\n return pendingResponse;\n return new Promise((resolve, reject2) => {\n resolveFunction = resolve, rejectFunction = reject2;\n });\n }\n }), setTimeout(emitListeningNextTick, 1, this, onListen, null, this.#server.hostname, this.#server.port);\n } catch (err) {\n setTimeout(emitListeningNextTick, 1, this, onListen, err);\n }\n return this;\n }\n setTimeout(msecs, callback) {\n }\n}\nclass IncomingMessage extends Readable {\n method;\n complete;\n constructor(req, defaultIncomingOpts) {\n const method = req.method;\n super();\n const url = new URL(req.url);\n var { type = \"request\", [kInternalRequest]: nodeReq } = defaultIncomingOpts || {};\n this.#noBody = type === \"request\" \? method === \"GET\" || method === \"HEAD\" || method === \"TRACE\" || method === \"CONNECT\" || method === \"OPTIONS\" || (parseInt(req.headers.get(\"Content-Length\") || \"\") || 0) === 0 : !1, this.#req = req, this.method = method, this.#type = type, this.complete = !!this.#noBody, this.#bodyStream = void 0;\n const socket = new FakeSocket;\n socket.remoteAddress = url.hostname, socket.remotePort = url.port, this.#fakeSocket = socket, this.url = url.pathname + url.search, this.#nodeReq = this.req = nodeReq, assignHeaders(this, req);\n }\n headers;\n rawHeaders;\n _consuming = !1;\n _dumped = !1;\n #bodyStream;\n #fakeSocket;\n #noBody = !1;\n #aborted = !1;\n #req;\n url;\n #type;\n #nodeReq;\n _construct(callback) {\n if (this.#type === \"response\" || this.#noBody) {\n callback();\n return;\n }\n const contentLength = this.#req.headers.get(\"content-length\");\n if ((contentLength \? parseInt(contentLength, 10) : 0) === 0) {\n this.#noBody = !0, callback();\n return;\n }\n callback();\n }\n async#consumeStream(reader) {\n while (!0) {\n var { done, value } = await reader.readMany();\n if (this.#aborted)\n return;\n if (done) {\n this.push(null), this.destroy();\n break;\n }\n for (var v of value)\n this.push(v);\n }\n }\n _read(size) {\n if (console.log(\"read\", size), this.#noBody)\n this.push(null), this.complete = !0;\n else if (this.#bodyStream == null) {\n const reader = this.#req.body\?.getReader();\n if (!reader) {\n this.push(null);\n return;\n }\n this.#bodyStream = reader, this.#consumeStream(reader);\n }\n }\n get aborted() {\n return this.#aborted;\n }\n #abort() {\n if (this.#aborted)\n return;\n this.#aborted = !0;\n var bodyStream = this.#bodyStream;\n if (!bodyStream)\n return;\n bodyStream.cancel(), this.complete = !0, this.#bodyStream = void 0, this.push(null);\n }\n get connection() {\n return this.#fakeSocket;\n }\n get statusCode() {\n return this.#req.status;\n }\n get statusMessage() {\n return STATUS_CODES[this.#req.status];\n }\n get httpVersion() {\n return \"1.1\";\n }\n get rawTrailers() {\n return [];\n }\n get httpVersionMajor() {\n return 1;\n }\n get httpVersionMinor() {\n return 1;\n }\n get trailers() {\n return kEmptyObject;\n }\n get socket() {\n return this.#fakeSocket \?\?= new FakeSocket;\n }\n set socket(val) {\n this.#fakeSocket = val;\n }\n setTimeout(msecs, callback) {\n throw new Error(\"not implemented\");\n }\n}\n\nclass OutgoingMessage extends Writable {\n constructor() {\n super(...arguments);\n }\n #headers;\n headersSent = !1;\n sendDate = !0;\n req;\n timeout;\n #finished = !1;\n [kEndCalled] = !1;\n #fakeSocket;\n #timeoutTimer;\n [kAbortController] = null;\n _implicitHeader() {\n }\n get headers() {\n if (!this.#headers)\n return kEmptyObject;\n return this.#headers.toJSON();\n }\n get shouldKeepAlive() {\n return !0;\n }\n get chunkedEncoding() {\n return !1;\n }\n set chunkedEncoding(value) {\n }\n set shouldKeepAlive(value) {\n }\n get useChunkedEncodingByDefault() {\n return !0;\n }\n set useChunkedEncodingByDefault(value) {\n }\n get socket() {\n return this.#fakeSocket \?\?= new FakeSocket;\n }\n set socket(val) {\n this.#fakeSocket = val;\n }\n get connection() {\n return this.socket;\n }\n get finished() {\n return this.#finished;\n }\n appendHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n headers.append(name, value);\n }\n flushHeaders() {\n }\n getHeader(name) {\n return getHeader(this.#headers, name);\n }\n getHeaders() {\n if (!this.#headers)\n return kEmptyObject;\n return this.#headers.toJSON();\n }\n getHeaderNames() {\n var headers = this.#headers;\n if (!headers)\n return [];\n return Array.from(headers.keys());\n }\n removeHeader(name) {\n if (!this.#headers)\n return;\n this.#headers.delete(name);\n }\n setHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n return headers.set(name, value), this;\n }\n hasHeader(name) {\n if (!this.#headers)\n return !1;\n return this.#headers.has(name);\n }\n addTrailers(headers) {\n throw new Error(\"not implemented\");\n }\n [kClearTimeout]() {\n if (this.#timeoutTimer)\n clearTimeout(this.#timeoutTimer), this.removeAllListeners(\"timeout\"), this.#timeoutTimer = void 0;\n }\n #onTimeout() {\n this.#timeoutTimer = void 0, this[kAbortController]\?.abort(), this.emit(\"timeout\");\n }\n setTimeout(msecs, callback) {\n if (this.destroyed)\n return this;\n if (this.timeout = msecs = validateMsecs(msecs, \"msecs\"), clearTimeout(this.#timeoutTimer), msecs === 0) {\n if (callback !== void 0)\n validateFunction(callback, \"callback\"), this.removeListener(\"timeout\", callback);\n this.#timeoutTimer = void 0;\n } else if (this.#timeoutTimer = setTimeout(this.#onTimeout.bind(this), msecs).unref(), callback !== void 0)\n validateFunction(callback, \"callback\"), this.once(\"timeout\", callback);\n return this;\n }\n}\nvar OriginalWriteHeadFn, OriginalImplicitHeadFn;\n\nclass ServerResponse extends Writable {\n constructor({ req, reply }) {\n super();\n if (this.req = req, this._reply = reply, this.sendDate = !0, this.statusCode = 200, this.headersSent = !1, this.statusMessage = void 0, this.#controller = void 0, this.#firstWrite = void 0, this._writableState.decodeStrings = !1, this.#deferred = void 0, req.method === \"HEAD\")\n this._hasBody = !1;\n }\n req;\n _reply;\n sendDate;\n statusCode;\n #headers;\n headersSent = !1;\n statusMessage;\n #controller;\n #firstWrite;\n _sent100 = !1;\n _defaultKeepAlive = !1;\n _removedConnection = !1;\n _removedContLen = !1;\n _hasBody = !0;\n #deferred = void 0;\n #finished = !1;\n _implicitHeader() {\n this.writeHead(this.statusCode);\n }\n _write(chunk, encoding, callback) {\n if (!this.#firstWrite && !this.headersSent) {\n this.#firstWrite = chunk, callback();\n return;\n }\n this.#ensureReadableStreamController((controller) => {\n controller.write(chunk), callback();\n });\n }\n _writev(chunks, callback) {\n if (chunks.length === 1 && !this.headersSent && !this.#firstWrite) {\n this.#firstWrite = chunks[0].chunk, callback();\n return;\n }\n this.#ensureReadableStreamController((controller) => {\n for (let chunk of chunks)\n controller.write(chunk.chunk);\n callback();\n });\n }\n #ensureReadableStreamController(run) {\n var thisController = this.#controller;\n if (thisController)\n return run(thisController);\n this.headersSent = !0;\n var firstWrite = this.#firstWrite;\n this.#firstWrite = void 0, this._reply(new Response(new ReadableStream({\n type: \"direct\",\n pull: (controller) => {\n if (this.#controller = controller, firstWrite)\n controller.write(firstWrite);\n if (firstWrite = void 0, run(controller), !this.#finished)\n return new Promise((resolve) => {\n this.#deferred = resolve;\n });\n }\n }), {\n headers: this.#headers,\n status: this.statusCode,\n statusText: this.statusMessage \?\? STATUS_CODES[this.statusCode]\n }));\n }\n #drainHeadersIfObservable() {\n if (this._implicitHeader === OriginalImplicitHeadFn && this.writeHead === OriginalWriteHeadFn)\n return;\n this._implicitHeader();\n }\n _final(callback) {\n if (!this.headersSent) {\n var data = this.#firstWrite || \"\";\n this.#firstWrite = void 0, this.#finished = !0, this.#drainHeadersIfObservable(), this._reply(new Response(data, {\n headers: this.#headers,\n status: this.statusCode,\n statusText: this.statusMessage \?\? STATUS_CODES[this.statusCode]\n })), callback && callback();\n return;\n }\n this.#finished = !0, this.#ensureReadableStreamController((controller) => {\n controller.end(), callback();\n var deferred = this.#deferred;\n if (deferred)\n this.#deferred = void 0, deferred();\n });\n }\n writeProcessing() {\n throw new Error(\"not implemented\");\n }\n addTrailers(headers) {\n throw new Error(\"not implemented\");\n }\n assignSocket(socket) {\n throw new Error(\"not implemented\");\n }\n detachSocket(socket) {\n throw new Error(\"not implemented\");\n }\n writeContinue(callback) {\n throw new Error(\"not implemented\");\n }\n setTimeout(msecs, callback) {\n throw new Error(\"not implemented\");\n }\n get shouldKeepAlive() {\n return !0;\n }\n get chunkedEncoding() {\n return !1;\n }\n set chunkedEncoding(value) {\n }\n set shouldKeepAlive(value) {\n }\n get useChunkedEncodingByDefault() {\n return !0;\n }\n set useChunkedEncodingByDefault(value) {\n }\n appendHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n headers.append(name, value);\n }\n flushHeaders() {\n }\n getHeader(name) {\n return getHeader(this.#headers, name);\n }\n getHeaders() {\n var headers = this.#headers;\n if (!headers)\n return kEmptyObject;\n return headers.toJSON();\n }\n getHeaderNames() {\n var headers = this.#headers;\n if (!headers)\n return [];\n return Array.from(headers.keys());\n }\n removeHeader(name) {\n if (!this.#headers)\n return;\n this.#headers.delete(name);\n }\n setHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n return headers.set(name, value), this;\n }\n hasHeader(name) {\n if (!this.#headers)\n return !1;\n return this.#headers.has(name);\n }\n writeHead(statusCode, statusMessage, headers) {\n return _writeHead(statusCode, statusMessage, headers, this), this;\n }\n}\nOriginalWriteHeadFn = ServerResponse.prototype.writeHead;\nOriginalImplicitHeadFn = ServerResponse.prototype._implicitHeader;\n\nclass ClientRequest extends OutgoingMessage {\n #timeout;\n #res = null;\n #upgradeOrConnect = !1;\n #parser = null;\n #maxHeadersCount = null;\n #reusedSocket = !1;\n #host;\n #protocol;\n #method;\n #port;\n #useDefaultPort;\n #joinDuplicateHeaders;\n #maxHeaderSize;\n #agent = globalAgent;\n #path;\n #socketPath;\n #bodyChunks = null;\n #fetchRequest;\n #signal = null;\n [kAbortController] = null;\n #timeoutTimer = void 0;\n #options;\n #finished;\n get path() {\n return this.#path;\n }\n get port() {\n return this.#port;\n }\n get method() {\n return this.#method;\n }\n get host() {\n return this.#host;\n }\n get protocol() {\n return this.#protocol;\n }\n _write(chunk, encoding, callback) {\n if (!this.#bodyChunks) {\n this.#bodyChunks = [chunk], callback();\n return;\n }\n this.#bodyChunks.push(chunk), callback();\n }\n _writev(chunks, callback) {\n if (!this.#bodyChunks) {\n this.#bodyChunks = chunks, callback();\n return;\n }\n this.#bodyChunks.push(...chunks), callback();\n }\n _final(callback) {\n if (this.#finished = !0, this[kAbortController] = new AbortController, this[kAbortController].signal.addEventListener(\"abort\", () => {\n this[kClearTimeout]();\n }), this.#signal\?.aborted)\n this[kAbortController].abort();\n var method = this.#method, body = this.#bodyChunks\?.length === 1 \? this.#bodyChunks[0] : Buffer.concat(this.#bodyChunks || []);\n let url, proxy;\n if (this.#path.startsWith(\"http://\") || this.#path.startsWith(\"https://\"))\n url = this.#path, proxy = `${this.#protocol}//${this.#host}${this.#useDefaultPort \? \"\" : \":\" + this.#port}`;\n else\n url = `${this.#protocol}//${this.#host}${this.#useDefaultPort \? \"\" : \":\" + this.#port}${this.#path}`;\n try {\n this.#fetchRequest = fetch(url, {\n method,\n headers: this.getHeaders(),\n body: body && method !== \"GET\" && method !== \"HEAD\" && method !== \"OPTIONS\" \? body : void 0,\n redirect: \"manual\",\n verbose: !1,\n signal: this[kAbortController].signal,\n proxy,\n timeout: !1\n }).then((response) => {\n var res = this.#res = new IncomingMessage(response, {\n type: \"response\",\n [kInternalRequest]: this\n });\n console.log(\"response\", response), this.emit(\"response\", res);\n }).catch((err) => {\n this.emit(\"error\", err);\n }).finally(() => {\n this.#fetchRequest = null, this[kClearTimeout]();\n });\n } catch (err) {\n this.emit(\"error\", err);\n } finally {\n callback();\n }\n }\n get aborted() {\n return this.#signal\?.aborted || !!this[kAbortController]\?.signal.aborted;\n }\n abort() {\n if (this.aborted)\n return;\n this[kAbortController].abort();\n }\n constructor(input, options, cb) {\n super();\n if (typeof input === \"string\") {\n const urlStr = input;\n try {\n var urlObject = new URL(urlStr);\n } catch (e) {\n @throwTypeError(`Invalid URL: ${urlStr}`);\n }\n input = urlToHttpOptions(urlObject);\n } else if (input && typeof input === \"object\" && input instanceof URL)\n input = urlToHttpOptions(input);\n else\n cb = options, options = input, input = null;\n if (typeof options === \"function\")\n cb = options, options = input || kEmptyObject;\n else\n options = ObjectAssign(input || {}, options);\n var defaultAgent = options._defaultAgent || Agent.globalAgent;\n let protocol = options.protocol;\n if (!protocol)\n if (options.port === 443)\n protocol = \"https:\";\n else\n protocol = defaultAgent.protocol || \"http:\";\n switch (this.#protocol = protocol, this.#agent\?.protocol) {\n case void 0:\n break;\n case \"http:\":\n if (protocol === \"https:\") {\n defaultAgent = this.#agent = getDefaultHTTPSAgent();\n break;\n }\n case \"https:\":\n if (protocol === \"https\") {\n defaultAgent = this.#agent = Agent.globalAgent;\n break;\n }\n default:\n break;\n }\n if (options.path) {\n const path = String(options.path);\n if (RegExpPrototypeExec.call(INVALID_PATH_REGEX, path) !== null)\n throw new Error(\"Path contains unescaped characters\");\n }\n if (protocol !== \"http:\" && protocol !== \"https:\" && protocol) {\n const expectedProtocol = defaultAgent\?.protocol \?\? \"http:\";\n throw new Error(`Protocol mismatch. Expected: ${expectedProtocol}. Got: ${protocol}`);\n }\n const defaultPort = protocol === \"https:\" \? 443 : 80;\n this.#port = options.port || options.defaultPort || this.#agent\?.defaultPort || defaultPort, this.#useDefaultPort = this.#port === defaultPort;\n const host = this.#host = options.host = validateHost(options.hostname, \"hostname\") || validateHost(options.host, \"host\") || \"localhost\";\n this.#socketPath = options.socketPath;\n const signal = options.signal;\n if (signal)\n signal.addEventListener(\"abort\", () => {\n this[kAbortController]\?.abort();\n }), this.#signal = signal;\n let method = options.method;\n const methodIsString = typeof method === \"string\";\n if (method !== null && method !== void 0 && !methodIsString)\n throw new Error(\"ERR_INVALID_ARG_TYPE: options.method\");\n if (methodIsString && method) {\n if (!checkIsHttpToken(method))\n throw new Error(\"ERR_INVALID_HTTP_TOKEN: Method\");\n method = this.#method = StringPrototypeToUpperCase.call(method);\n } else\n method = this.#method = \"GET\";\n const _maxHeaderSize = options.maxHeaderSize;\n this.#maxHeaderSize = _maxHeaderSize;\n var _joinDuplicateHeaders = options.joinDuplicateHeaders;\n if (this.#joinDuplicateHeaders = _joinDuplicateHeaders, this.#path = options.path || \"/\", cb)\n this.once(\"response\", cb);\n this.#finished = !1, this.#res = null, this.#upgradeOrConnect = !1, this.#parser = null, this.#maxHeadersCount = null, this.#reusedSocket = !1, this.#host = host, this.#protocol = protocol;\n var timeout = options.timeout;\n if (timeout !== void 0 && timeout !== 0)\n this.setTimeout(timeout, void 0);\n if (!ArrayIsArray(headers)) {\n var headers = options.headers;\n if (headers)\n for (let key in headers)\n this.setHeader(key, headers[key]);\n var auth = options.auth;\n if (auth && !this.getHeader(\"Authorization\"))\n this.setHeader(\"Authorization\", \"Basic \" + Buffer.from(auth).toString(\"base64\"));\n }\n var { signal: _signal, ...optsWithoutSignal } = options;\n this.#options = optsWithoutSignal;\n }\n setSocketKeepAlive(enable = !0, initialDelay = 0) {\n }\n setNoDelay(noDelay = !0) {\n }\n [kClearTimeout]() {\n if (this.#timeoutTimer)\n clearTimeout(this.#timeoutTimer), this.#timeoutTimer = void 0, this.removeAllListeners(\"timeout\");\n }\n #onTimeout() {\n this.#timeoutTimer = void 0, this[kAbortController]\?.abort(), this.emit(\"timeout\");\n }\n setTimeout(msecs, callback) {\n if (this.destroyed)\n return this;\n if (this.timeout = msecs = validateMsecs(msecs, \"msecs\"), clearTimeout(this.#timeoutTimer), msecs === 0) {\n if (callback !== void 0)\n validateFunction(callback, \"callback\"), this.removeListener(\"timeout\", callback);\n this.#timeoutTimer = void 0;\n } else if (this.#timeoutTimer = setTimeout(this.#onTimeout.bind(this), msecs).unref(), callback !== void 0)\n validateFunction(callback, \"callback\"), this.once(\"timeout\", callback);\n return this;\n }\n}\nvar tokenRegExp = /^[\\^_`a-zA-Z\\-0-9!#$%&'*+.|~]+$/, METHODS = [\n \"ACL\",\n \"BIND\",\n \"CHECKOUT\",\n \"CONNECT\",\n \"COPY\",\n \"DELETE\",\n \"GET\",\n \"HEAD\",\n \"LINK\",\n \"LOCK\",\n \"M-SEARCH\",\n \"MERGE\",\n \"MKACTIVITY\",\n \"MKCALENDAR\",\n \"MKCOL\",\n \"MOVE\",\n \"NOTIFY\",\n \"OPTIONS\",\n \"PATCH\",\n \"POST\",\n \"PROPFIND\",\n \"PROPPATCH\",\n \"PURGE\",\n \"PUT\",\n \"REBIND\",\n \"REPORT\",\n \"SEARCH\",\n \"SOURCE\",\n \"SUBSCRIBE\",\n \"TRACE\",\n \"UNBIND\",\n \"UNLINK\",\n \"UNLOCK\",\n \"UNSUBSCRIBE\"\n], STATUS_CODES = {\n 100: \"Continue\",\n 101: \"Switching Protocols\",\n 102: \"Processing\",\n 103: \"Early Hints\",\n 200: \"OK\",\n 201: \"Created\",\n 202: \"Accepted\",\n 203: \"Non-Authoritative Information\",\n 204: \"No Content\",\n 205: \"Reset Content\",\n 206: \"Partial Content\",\n 207: \"Multi-Status\",\n 208: \"Already Reported\",\n 226: \"IM Used\",\n 300: \"Multiple Choices\",\n 301: \"Moved Permanently\",\n 302: \"Found\",\n 303: \"See Other\",\n 304: \"Not Modified\",\n 305: \"Use Proxy\",\n 307: \"Temporary Redirect\",\n 308: \"Permanent Redirect\",\n 400: \"Bad Request\",\n 401: \"Unauthorized\",\n 402: \"Payment Required\",\n 403: \"Forbidden\",\n 404: \"Not Found\",\n 405: \"Method Not Allowed\",\n 406: \"Not Acceptable\",\n 407: \"Proxy Authentication Required\",\n 408: \"Request Timeout\",\n 409: \"Conflict\",\n 410: \"Gone\",\n 411: \"Length Required\",\n 412: \"Precondition Failed\",\n 413: \"Payload Too Large\",\n 414: \"URI Too Long\",\n 415: \"Unsupported Media Type\",\n 416: \"Range Not Satisfiable\",\n 417: \"Expectation Failed\",\n 418: \"I'm a Teapot\",\n 421: \"Misdirected Request\",\n 422: \"Unprocessable Entity\",\n 423: \"Locked\",\n 424: \"Failed Dependency\",\n 425: \"Too Early\",\n 426: \"Upgrade Required\",\n 428: \"Precondition Required\",\n 429: \"Too Many Requests\",\n 431: \"Request Header Fields Too Large\",\n 451: \"Unavailable For Legal Reasons\",\n 500: \"Internal Server Error\",\n 501: \"Not Implemented\",\n 502: \"Bad Gateway\",\n 503: \"Service Unavailable\",\n 504: \"Gateway Timeout\",\n 505: \"HTTP Version Not Supported\",\n 506: \"Variant Also Negotiates\",\n 507: \"Insufficient Storage\",\n 508: \"Loop Detected\",\n 509: \"Bandwidth Limit Exceeded\",\n 510: \"Not Extended\",\n 511: \"Network Authentication Required\"\n}, globalAgent = new Agent;\n$ = {\n Agent,\n Server,\n METHODS,\n STATUS_CODES,\n createServer,\n ServerResponse,\n IncomingMessage,\n request,\n get,\n maxHeaderSize: 16384,\n validateHeaderName,\n validateHeaderValue,\n setMaxIdleHTTPParsers(max) {\n },\n globalAgent,\n ClientRequest,\n OutgoingMessage\n};\nreturn $})\n"_s;
//
//
@@ -202,7 +202,7 @@ static constexpr ASCIILiteral NodeWorkerThreadsCode = "(function (){\"use strict
//
//
-static constexpr ASCIILiteral NodeZlibCode = "(function (){\"use strict\";// src/js/out/tmp/node/zlib.ts\nvar assert = @getInternalField(@internalModuleRegistry, 4) || @createInternalModuleById(4), BufferModule = @requireNativeModule(\"node:buffer\"), StreamModule = @getInternalField(@internalModuleRegistry, 35) || @createInternalModuleById(35), Util = @getInternalField(@internalModuleRegistry, 44) || @createInternalModuleById(44), __getOwnPropNames = Object.getOwnPropertyNames, __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n}, require_zstream = __commonJS({\n \"node_modules/pako/lib/zlib/zstream.js\"(exports, module2) {\n function ZStream() {\n this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = \"\", this.state = null, this.data_type = 2, this.adler = 0;\n }\n module2.exports = ZStream;\n }\n}), require_common = __commonJS({\n \"node_modules/pako/lib/utils/common.js\"(exports) {\n var TYPED_OK = typeof Uint8Array !== \"undefined\" && typeof Uint16Array !== \"undefined\" && typeof Int32Array !== \"undefined\";\n function _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n }\n exports.assign = function(obj) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source)\n continue;\n if (typeof source !== \"object\")\n @throwTypeError(source + \"must be non-object\");\n for (var p in source)\n if (_has(source, p))\n obj[p] = source[p];\n }\n return obj;\n }, exports.shrinkBuf = function(buf, size) {\n if (buf.length === size)\n return buf;\n if (buf.subarray)\n return buf.subarray(0, size);\n return buf.length = size, buf;\n };\n var fnTyped = {\n arraySet: function(dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n for (var i = 0;i < len; i++)\n dest[dest_offs + i] = src[src_offs + i];\n },\n flattenChunks: function(chunks) {\n var i, l, len, pos, chunk, result;\n len = 0;\n for (i = 0, l = chunks.length;i < l; i++)\n len += chunks[i].length;\n result = new Uint8Array(len), pos = 0;\n for (i = 0, l = chunks.length;i < l; i++)\n chunk = chunks[i], result.set(chunk, pos), pos += chunk.length;\n return result;\n }\n }, fnUntyped = {\n arraySet: function(dest, src, src_offs, len, dest_offs) {\n for (var i = 0;i < len; i++)\n dest[dest_offs + i] = src[src_offs + i];\n },\n flattenChunks: function(chunks) {\n return [].concat.apply([], chunks);\n }\n };\n exports.setTyped = function(on) {\n if (on)\n exports.Buf8 = Uint8Array, exports.Buf16 = Uint16Array, exports.Buf32 = Int32Array, exports.assign(exports, fnTyped);\n else\n exports.Buf8 = Array, exports.Buf16 = Array, exports.Buf32 = Array, exports.assign(exports, fnUntyped);\n }, exports.setTyped(TYPED_OK);\n }\n}), require_trees = __commonJS({\n \"node_modules/pako/lib/zlib/trees.js\"(exports) {\n var utils = require_common(), Z_FIXED = 4, Z_BINARY = 0, Z_TEXT = 1, Z_UNKNOWN = 2;\n function zero(buf) {\n var len = buf.length;\n while (--len >= 0)\n buf[len] = 0;\n }\n var STORED_BLOCK = 0, STATIC_TREES = 1, DYN_TREES = 2, MIN_MATCH = 3, MAX_MATCH = 258, LENGTH_CODES = 29, LITERALS = 256, L_CODES = LITERALS + 1 + LENGTH_CODES, D_CODES = 30, BL_CODES = 19, HEAP_SIZE = 2 * L_CODES + 1, MAX_BITS = 15, Buf_size = 16, MAX_BL_BITS = 7, END_BLOCK = 256, REP_3_6 = 16, REPZ_3_10 = 17, REPZ_11_138 = 18, extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], extra_dbits = [\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 2,\n 2,\n 3,\n 3,\n 4,\n 4,\n 5,\n 5,\n 6,\n 6,\n 7,\n 7,\n 8,\n 8,\n 9,\n 9,\n 10,\n 10,\n 11,\n 11,\n 12,\n 12,\n 13,\n 13\n ], extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], DIST_CODE_LEN = 512, static_ltree = new Array((L_CODES + 2) * 2);\n zero(static_ltree);\n var static_dtree = new Array(D_CODES * 2);\n zero(static_dtree);\n var _dist_code = new Array(DIST_CODE_LEN);\n zero(_dist_code);\n var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\n zero(_length_code);\n var base_length = new Array(LENGTH_CODES);\n zero(base_length);\n var base_dist = new Array(D_CODES);\n zero(base_dist);\n function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n this.static_tree = static_tree, this.extra_bits = extra_bits, this.extra_base = extra_base, this.elems = elems, this.max_length = max_length, this.has_stree = static_tree && static_tree.length;\n }\n var static_l_desc, static_d_desc, static_bl_desc;\n function TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree, this.max_code = 0, this.stat_desc = stat_desc;\n }\n function d_code(dist) {\n return dist < 256 \? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n }\n function put_short(s, w) {\n s.pending_buf[s.pending++] = w & 255, s.pending_buf[s.pending++] = w >>> 8 & 255;\n }\n function send_bits(s, value, length) {\n if (s.bi_valid > Buf_size - length)\n s.bi_buf |= value << s.bi_valid & 65535, put_short(s, s.bi_buf), s.bi_buf = value >> Buf_size - s.bi_valid, s.bi_valid += length - Buf_size;\n else\n s.bi_buf |= value << s.bi_valid & 65535, s.bi_valid += length;\n }\n function send_code(s, c, tree) {\n send_bits(s, tree[c * 2], tree[c * 2 + 1]);\n }\n function bi_reverse(code, len) {\n var res = 0;\n do\n res |= code & 1, code >>>= 1, res <<= 1;\n while (--len > 0);\n return res >>> 1;\n }\n function bi_flush(s) {\n if (s.bi_valid === 16)\n put_short(s, s.bi_buf), s.bi_buf = 0, s.bi_valid = 0;\n else if (s.bi_valid >= 8)\n s.pending_buf[s.pending++] = s.bi_buf & 255, s.bi_buf >>= 8, s.bi_valid -= 8;\n }\n function gen_bitlen(s, desc) {\n var { dyn_tree: tree, max_code } = desc, stree = desc.stat_desc.static_tree, has_stree = desc.stat_desc.has_stree, extra = desc.stat_desc.extra_bits, base = desc.stat_desc.extra_base, max_length = desc.stat_desc.max_length, h, n, m, bits, xbits, f, overflow = 0;\n for (bits = 0;bits <= MAX_BITS; bits++)\n s.bl_count[bits] = 0;\n tree[s.heap[s.heap_max] * 2 + 1] = 0;\n for (h = s.heap_max + 1;h < HEAP_SIZE; h++) {\n if (n = s.heap[h], bits = tree[tree[n * 2 + 1] * 2 + 1] + 1, bits > max_length)\n bits = max_length, overflow++;\n if (tree[n * 2 + 1] = bits, n > max_code)\n continue;\n if (s.bl_count[bits]++, xbits = 0, n >= base)\n xbits = extra[n - base];\n if (f = tree[n * 2], s.opt_len += f * (bits + xbits), has_stree)\n s.static_len += f * (stree[n * 2 + 1] + xbits);\n }\n if (overflow === 0)\n return;\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0)\n bits--;\n s.bl_count[bits]--, s.bl_count[bits + 1] += 2, s.bl_count[max_length]--, overflow -= 2;\n } while (overflow > 0);\n for (bits = max_length;bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n if (m = s.heap[--h], m > max_code)\n continue;\n if (tree[m * 2 + 1] !== bits)\n s.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2], tree[m * 2 + 1] = bits;\n n--;\n }\n }\n }\n function gen_codes(tree, max_code, bl_count) {\n var next_code = new Array(MAX_BITS + 1), code = 0, bits, n;\n for (bits = 1;bits <= MAX_BITS; bits++)\n next_code[bits] = code = code + bl_count[bits - 1] << 1;\n for (n = 0;n <= max_code; n++) {\n var len = tree[n * 2 + 1];\n if (len === 0)\n continue;\n tree[n * 2] = bi_reverse(next_code[len]++, len);\n }\n }\n function tr_static_init() {\n var n, bits, length, code, dist, bl_count = new Array(MAX_BITS + 1);\n length = 0;\n for (code = 0;code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0;n < 1 << extra_lbits[code]; n++)\n _length_code[length++] = code;\n }\n _length_code[length - 1] = code, dist = 0;\n for (code = 0;code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0;n < 1 << extra_dbits[code]; n++)\n _dist_code[dist++] = code;\n }\n dist >>= 7;\n for (;code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0;n < 1 << extra_dbits[code] - 7; n++)\n _dist_code[256 + dist++] = code;\n }\n for (bits = 0;bits <= MAX_BITS; bits++)\n bl_count[bits] = 0;\n n = 0;\n while (n <= 143)\n static_ltree[n * 2 + 1] = 8, n++, bl_count[8]++;\n while (n <= 255)\n static_ltree[n * 2 + 1] = 9, n++, bl_count[9]++;\n while (n <= 279)\n static_ltree[n * 2 + 1] = 7, n++, bl_count[7]++;\n while (n <= 287)\n static_ltree[n * 2 + 1] = 8, n++, bl_count[8]++;\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n for (n = 0;n < D_CODES; n++)\n static_dtree[n * 2 + 1] = 5, static_dtree[n * 2] = bi_reverse(n, 5);\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS), static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS), static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n }\n function init_block(s) {\n var n;\n for (n = 0;n < L_CODES; n++)\n s.dyn_ltree[n * 2] = 0;\n for (n = 0;n < D_CODES; n++)\n s.dyn_dtree[n * 2] = 0;\n for (n = 0;n < BL_CODES; n++)\n s.bl_tree[n * 2] = 0;\n s.dyn_ltree[END_BLOCK * 2] = 1, s.opt_len = s.static_len = 0, s.last_lit = s.matches = 0;\n }\n function bi_windup(s) {\n if (s.bi_valid > 8)\n put_short(s, s.bi_buf);\n else if (s.bi_valid > 0)\n s.pending_buf[s.pending++] = s.bi_buf;\n s.bi_buf = 0, s.bi_valid = 0;\n }\n function copy_block(s, buf, len, header) {\n if (bi_windup(s), header)\n put_short(s, len), put_short(s, ~len);\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending), s.pending += len;\n }\n function smaller(tree, n, m, depth) {\n var _n2 = n * 2, _m2 = m * 2;\n return tree[_n2] < tree[_m2] || tree[_n2] === tree[_m2] && depth[n] <= depth[m];\n }\n function pqdownheap(s, tree, k) {\n var v = s.heap[k], j = k << 1;\n while (j <= s.heap_len) {\n if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth))\n j++;\n if (smaller(tree, v, s.heap[j], s.depth))\n break;\n s.heap[k] = s.heap[j], k = j, j <<= 1;\n }\n s.heap[k] = v;\n }\n function compress_block(s, ltree, dtree) {\n var dist, lc, lx = 0, code, extra;\n if (s.last_lit !== 0)\n do\n if (dist = s.pending_buf[s.d_buf + lx * 2] << 8 | s.pending_buf[s.d_buf + lx * 2 + 1], lc = s.pending_buf[s.l_buf + lx], lx++, dist === 0)\n send_code(s, lc, ltree);\n else {\n if (code = _length_code[lc], send_code(s, code + LITERALS + 1, ltree), extra = extra_lbits[code], extra !== 0)\n lc -= base_length[code], send_bits(s, lc, extra);\n if (dist--, code = d_code(dist), send_code(s, code, dtree), extra = extra_dbits[code], extra !== 0)\n dist -= base_dist[code], send_bits(s, dist, extra);\n }\n while (lx < s.last_lit);\n send_code(s, END_BLOCK, ltree);\n }\n function build_tree(s, desc) {\n var tree = desc.dyn_tree, stree = desc.stat_desc.static_tree, has_stree = desc.stat_desc.has_stree, elems = desc.stat_desc.elems, n, m, max_code = -1, node;\n s.heap_len = 0, s.heap_max = HEAP_SIZE;\n for (n = 0;n < elems; n++)\n if (tree[n * 2] !== 0)\n s.heap[++s.heap_len] = max_code = n, s.depth[n] = 0;\n else\n tree[n * 2 + 1] = 0;\n while (s.heap_len < 2)\n if (node = s.heap[++s.heap_len] = max_code < 2 \? ++max_code : 0, tree[node * 2] = 1, s.depth[node] = 0, s.opt_len--, has_stree)\n s.static_len -= stree[node * 2 + 1];\n desc.max_code = max_code;\n for (n = s.heap_len >> 1;n >= 1; n--)\n pqdownheap(s, tree, n);\n node = elems;\n do\n n = s.heap[1], s.heap[1] = s.heap[s.heap_len--], pqdownheap(s, tree, 1), m = s.heap[1], s.heap[--s.heap_max] = n, s.heap[--s.heap_max] = m, tree[node * 2] = tree[n * 2] + tree[m * 2], s.depth[node] = (s.depth[n] >= s.depth[m] \? s.depth[n] : s.depth[m]) + 1, tree[n * 2 + 1] = tree[m * 2 + 1] = node, s.heap[1] = node++, pqdownheap(s, tree, 1);\n while (s.heap_len >= 2);\n s.heap[--s.heap_max] = s.heap[1], gen_bitlen(s, desc), gen_codes(tree, max_code, s.bl_count);\n }\n function scan_tree(s, tree, max_code) {\n var n, prevlen = -1, curlen, nextlen = tree[1], count = 0, max_count = 7, min_count = 4;\n if (nextlen === 0)\n max_count = 138, min_count = 3;\n tree[(max_code + 1) * 2 + 1] = 65535;\n for (n = 0;n <= max_code; n++) {\n if (curlen = nextlen, nextlen = tree[(n + 1) * 2 + 1], ++count < max_count && curlen === nextlen)\n continue;\n else if (count < min_count)\n s.bl_tree[curlen * 2] += count;\n else if (curlen !== 0) {\n if (curlen !== prevlen)\n s.bl_tree[curlen * 2]++;\n s.bl_tree[REP_3_6 * 2]++;\n } else if (count <= 10)\n s.bl_tree[REPZ_3_10 * 2]++;\n else\n s.bl_tree[REPZ_11_138 * 2]++;\n if (count = 0, prevlen = curlen, nextlen === 0)\n max_count = 138, min_count = 3;\n else if (curlen === nextlen)\n max_count = 6, min_count = 3;\n else\n max_count = 7, min_count = 4;\n }\n }\n function send_tree(s, tree, max_code) {\n var n, prevlen = -1, curlen, nextlen = tree[1], count = 0, max_count = 7, min_count = 4;\n if (nextlen === 0)\n max_count = 138, min_count = 3;\n for (n = 0;n <= max_code; n++) {\n if (curlen = nextlen, nextlen = tree[(n + 1) * 2 + 1], ++count < max_count && curlen === nextlen)\n continue;\n else if (count < min_count)\n do\n send_code(s, curlen, s.bl_tree);\n while (--count !== 0);\n else if (curlen !== 0) {\n if (curlen !== prevlen)\n send_code(s, curlen, s.bl_tree), count--;\n send_code(s, REP_3_6, s.bl_tree), send_bits(s, count - 3, 2);\n } else if (count <= 10)\n send_code(s, REPZ_3_10, s.bl_tree), send_bits(s, count - 3, 3);\n else\n send_code(s, REPZ_11_138, s.bl_tree), send_bits(s, count - 11, 7);\n if (count = 0, prevlen = curlen, nextlen === 0)\n max_count = 138, min_count = 3;\n else if (curlen === nextlen)\n max_count = 6, min_count = 3;\n else\n max_count = 7, min_count = 4;\n }\n }\n function build_bl_tree(s) {\n var max_blindex;\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code), scan_tree(s, s.dyn_dtree, s.d_desc.max_code), build_tree(s, s.bl_desc);\n for (max_blindex = BL_CODES - 1;max_blindex >= 3; max_blindex--)\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1] !== 0)\n break;\n return s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4, max_blindex;\n }\n function send_all_trees(s, lcodes, dcodes, blcodes) {\n var rank;\n send_bits(s, lcodes - 257, 5), send_bits(s, dcodes - 1, 5), send_bits(s, blcodes - 4, 4);\n for (rank = 0;rank < blcodes; rank++)\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1], 3);\n send_tree(s, s.dyn_ltree, lcodes - 1), send_tree(s, s.dyn_dtree, dcodes - 1);\n }\n function detect_data_type(s) {\n var black_mask = 4093624447, n;\n for (n = 0;n <= 31; n++, black_mask >>>= 1)\n if (black_mask & 1 && s.dyn_ltree[n * 2] !== 0)\n return Z_BINARY;\n if (s.dyn_ltree[18] !== 0 || s.dyn_ltree[20] !== 0 || s.dyn_ltree[26] !== 0)\n return Z_TEXT;\n for (n = 32;n < LITERALS; n++)\n if (s.dyn_ltree[n * 2] !== 0)\n return Z_TEXT;\n return Z_BINARY;\n }\n var static_init_done = !1;\n function _tr_init(s) {\n if (!static_init_done)\n tr_static_init(), static_init_done = !0;\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc), s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc), s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc), s.bi_buf = 0, s.bi_valid = 0, init_block(s);\n }\n function _tr_stored_block(s, buf, stored_len, last) {\n send_bits(s, (STORED_BLOCK << 1) + (last \? 1 : 0), 3), copy_block(s, buf, stored_len, !0);\n }\n function _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3), send_code(s, END_BLOCK, static_ltree), bi_flush(s);\n }\n function _tr_flush_block(s, buf, stored_len, last) {\n var opt_lenb, static_lenb, max_blindex = 0;\n if (s.level > 0) {\n if (s.strm.data_type === Z_UNKNOWN)\n s.strm.data_type = detect_data_type(s);\n if (build_tree(s, s.l_desc), build_tree(s, s.d_desc), max_blindex = build_bl_tree(s), opt_lenb = s.opt_len + 3 + 7 >>> 3, static_lenb = s.static_len + 3 + 7 >>> 3, static_lenb <= opt_lenb)\n opt_lenb = static_lenb;\n } else\n opt_lenb = static_lenb = stored_len + 5;\n if (stored_len + 4 <= opt_lenb && buf !== -1)\n _tr_stored_block(s, buf, stored_len, last);\n else if (s.strategy === Z_FIXED || static_lenb === opt_lenb)\n send_bits(s, (STATIC_TREES << 1) + (last \? 1 : 0), 3), compress_block(s, static_ltree, static_dtree);\n else\n send_bits(s, (DYN_TREES << 1) + (last \? 1 : 0), 3), send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1), compress_block(s, s.dyn_ltree, s.dyn_dtree);\n if (init_block(s), last)\n bi_windup(s);\n }\n function _tr_tally(s, dist, lc) {\n if (s.pending_buf[s.d_buf + s.last_lit * 2] = dist >>> 8 & 255, s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 255, s.pending_buf[s.l_buf + s.last_lit] = lc & 255, s.last_lit++, dist === 0)\n s.dyn_ltree[lc * 2]++;\n else\n s.matches++, dist--, s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]++, s.dyn_dtree[d_code(dist) * 2]++;\n return s.last_lit === s.lit_bufsize - 1;\n }\n exports._tr_init = _tr_init, exports._tr_stored_block = _tr_stored_block, exports._tr_flush_block = _tr_flush_block, exports._tr_tally = _tr_tally, exports._tr_align = _tr_align;\n }\n}), require_adler32 = __commonJS({\n \"node_modules/pako/lib/zlib/adler32.js\"(exports, module2) {\n function adler32(adler, buf, len, pos) {\n var s1 = adler & 65535 | 0, s2 = adler >>> 16 & 65535 | 0, n = 0;\n while (len !== 0) {\n n = len > 2000 \? 2000 : len, len -= n;\n do\n s1 = s1 + buf[pos++] | 0, s2 = s2 + s1 | 0;\n while (--n);\n s1 %= 65521, s2 %= 65521;\n }\n return s1 | s2 << 16 | 0;\n }\n module2.exports = adler32;\n }\n}), require_crc32 = __commonJS({\n \"node_modules/pako/lib/zlib/crc32.js\"(exports, module2) {\n function makeTable() {\n var c, table = [];\n for (var n = 0;n < 256; n++) {\n c = n;\n for (var k = 0;k < 8; k++)\n c = c & 1 \? 3988292384 ^ c >>> 1 : c >>> 1;\n table[n] = c;\n }\n return table;\n }\n var crcTable = makeTable();\n function crc32(crc, buf, len, pos) {\n var t = crcTable, end = pos + len;\n crc ^= -1;\n for (var i = pos;i < end; i++)\n crc = crc >>> 8 ^ t[(crc ^ buf[i]) & 255];\n return crc ^ -1;\n }\n module2.exports = crc32;\n }\n}), require_messages = __commonJS({\n \"node_modules/pako/lib/zlib/messages.js\"(exports, module2) {\n module2.exports = {\n 2: \"need dictionary\",\n 1: \"stream end\",\n 0: \"\",\n \"-1\": \"file error\",\n \"-2\": \"stream error\",\n \"-3\": \"data error\",\n \"-4\": \"insufficient memory\",\n \"-5\": \"buffer error\",\n \"-6\": \"incompatible version\"\n };\n }\n}), require_deflate = __commonJS({\n \"node_modules/pako/lib/zlib/deflate.js\"(exports) {\n var utils = require_common(), trees = require_trees(), adler32 = require_adler32(), crc32 = require_crc32(), msg = require_messages(), Z_NO_FLUSH = 0, Z_PARTIAL_FLUSH = 1, Z_FULL_FLUSH = 3, Z_FINISH = 4, Z_BLOCK = 5, Z_OK = 0, Z_STREAM_END = 1, Z_STREAM_ERROR = -2, Z_DATA_ERROR = -3, Z_BUF_ERROR = -5, Z_DEFAULT_COMPRESSION = -1, Z_FILTERED = 1, Z_HUFFMAN_ONLY = 2, Z_RLE = 3, Z_FIXED = 4, Z_DEFAULT_STRATEGY = 0, Z_UNKNOWN = 2, Z_DEFLATED = 8, MAX_MEM_LEVEL = 9, MAX_WBITS = 15, DEF_MEM_LEVEL = 8, LENGTH_CODES = 29, LITERALS = 256, L_CODES = LITERALS + 1 + LENGTH_CODES, D_CODES = 30, BL_CODES = 19, HEAP_SIZE = 2 * L_CODES + 1, MAX_BITS = 15, MIN_MATCH = 3, MAX_MATCH = 258, MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1, PRESET_DICT = 32, INIT_STATE = 42, EXTRA_STATE = 69, NAME_STATE = 73, COMMENT_STATE = 91, HCRC_STATE = 103, BUSY_STATE = 113, FINISH_STATE = 666, BS_NEED_MORE = 1, BS_BLOCK_DONE = 2, BS_FINISH_STARTED = 3, BS_FINISH_DONE = 4, OS_CODE = 3;\n function err(strm, errorCode) {\n return strm.msg = msg[errorCode], errorCode;\n }\n function rank(f) {\n return (f << 1) - (f > 4 \? 9 : 0);\n }\n function zero(buf) {\n var len = buf.length;\n while (--len >= 0)\n buf[len] = 0;\n }\n function flush_pending(strm) {\n var s = strm.state, len = s.pending;\n if (len > strm.avail_out)\n len = strm.avail_out;\n if (len === 0)\n return;\n if (utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out), strm.next_out += len, s.pending_out += len, strm.total_out += len, strm.avail_out -= len, s.pending -= len, s.pending === 0)\n s.pending_out = 0;\n }\n function flush_block_only(s, last) {\n trees._tr_flush_block(s, s.block_start >= 0 \? s.block_start : -1, s.strstart - s.block_start, last), s.block_start = s.strstart, flush_pending(s.strm);\n }\n function put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n }\n function putShortMSB(s, b) {\n s.pending_buf[s.pending++] = b >>> 8 & 255, s.pending_buf[s.pending++] = b & 255;\n }\n function read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n if (len > size)\n len = size;\n if (len === 0)\n return 0;\n if (strm.avail_in -= len, utils.arraySet(buf, strm.input, strm.next_in, len, start), strm.state.wrap === 1)\n strm.adler = adler32(strm.adler, buf, len, start);\n else if (strm.state.wrap === 2)\n strm.adler = crc32(strm.adler, buf, len, start);\n return strm.next_in += len, strm.total_in += len, len;\n }\n function longest_match(s, cur_match) {\n var { max_chain_length: chain_length, strstart: scan } = s, match, len, best_len = s.prev_length, nice_match = s.nice_match, limit = s.strstart > s.w_size - MIN_LOOKAHEAD \? s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0, _win = s.window, wmask = s.w_mask, prev = s.prev, strend = s.strstart + MAX_MATCH, scan_end1 = _win[scan + best_len - 1], scan_end = _win[scan + best_len];\n if (s.prev_length >= s.good_match)\n chain_length >>= 2;\n if (nice_match > s.lookahead)\n nice_match = s.lookahead;\n do {\n if (match = cur_match, _win[match + best_len] !== scan_end || _win[match + best_len - 1] !== scan_end1 || _win[match] !== _win[scan] || _win[++match] !== _win[scan + 1])\n continue;\n scan += 2, match++;\n do\n ;\n while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && scan < strend);\n if (len = MAX_MATCH - (strend - scan), scan = strend - MAX_MATCH, len > best_len) {\n if (s.match_start = cur_match, best_len = len, len >= nice_match)\n break;\n scan_end1 = _win[scan + best_len - 1], scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n if (best_len <= s.lookahead)\n return best_len;\n return s.lookahead;\n }\n function fill_window(s) {\n var _w_size = s.w_size, p, n, m, more, str;\n do {\n if (more = s.window_size - s.lookahead - s.strstart, s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0), s.match_start -= _w_size, s.strstart -= _w_size, s.block_start -= _w_size, n = s.hash_size, p = n;\n do\n m = s.head[--p], s.head[p] = m >= _w_size \? m - _w_size : 0;\n while (--n);\n n = _w_size, p = n;\n do\n m = s.prev[--p], s.prev[p] = m >= _w_size \? m - _w_size : 0;\n while (--n);\n more += _w_size;\n }\n if (s.strm.avail_in === 0)\n break;\n if (n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more), s.lookahead += n, s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert, s.ins_h = s.window[str], s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + 1]) & s.hash_mask;\n while (s.insert)\n if (s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask, s.prev[str & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = str, str++, s.insert--, s.lookahead + s.insert < MIN_MATCH)\n break;\n }\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n }\n function deflate_stored(s, flush) {\n var max_block_size = 65535;\n if (max_block_size > s.pending_buf_size - 5)\n max_block_size = s.pending_buf_size - 5;\n for (;; ) {\n if (s.lookahead <= 1) {\n if (fill_window(s), s.lookahead === 0 && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n s.strstart += s.lookahead, s.lookahead = 0;\n var max_start = s.block_start + max_block_size;\n if (s.strstart === 0 || s.strstart >= max_start) {\n if (s.lookahead = s.strstart - max_start, s.strstart = max_start, flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n if (s.strstart - s.block_start >= s.w_size - MIN_LOOKAHEAD) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = 0, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.strstart > s.block_start) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_NEED_MORE;\n }\n function deflate_fast(s, flush) {\n var hash_head, bflush;\n for (;; ) {\n if (s.lookahead < MIN_LOOKAHEAD) {\n if (fill_window(s), s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n if (hash_head = 0, s.lookahead >= MIN_MATCH)\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n if (hash_head !== 0 && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD)\n s.match_length = longest_match(s, hash_head);\n if (s.match_length >= MIN_MATCH)\n if (bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH), s.lookahead -= s.match_length, s.match_length <= s.max_lazy_match && s.lookahead >= MIN_MATCH) {\n s.match_length--;\n do\n s.strstart++, s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n while (--s.match_length !== 0);\n s.strstart++;\n } else\n s.strstart += s.match_length, s.match_length = 0, s.ins_h = s.window[s.strstart], s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + 1]) & s.hash_mask;\n else\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++;\n if (bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = s.strstart < MIN_MATCH - 1 \? s.strstart : MIN_MATCH - 1, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function deflate_slow(s, flush) {\n var hash_head, bflush, max_insert;\n for (;; ) {\n if (s.lookahead < MIN_LOOKAHEAD) {\n if (fill_window(s), s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n if (hash_head = 0, s.lookahead >= MIN_MATCH)\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n if (s.prev_length = s.match_length, s.prev_match = s.match_start, s.match_length = MIN_MATCH - 1, hash_head !== 0 && s.prev_length < s.max_lazy_match && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) {\n if (s.match_length = longest_match(s, hash_head), s.match_length <= 5 && (s.strategy === Z_FILTERED || s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096))\n s.match_length = MIN_MATCH - 1;\n }\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH, bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH), s.lookahead -= s.prev_length - 1, s.prev_length -= 2;\n do\n if (++s.strstart <= max_insert)\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n while (--s.prev_length !== 0);\n if (s.match_available = 0, s.match_length = MIN_MATCH - 1, s.strstart++, bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n } else if (s.match_available) {\n if (bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]), bflush)\n flush_block_only(s, !1);\n if (s.strstart++, s.lookahead--, s.strm.avail_out === 0)\n return BS_NEED_MORE;\n } else\n s.match_available = 1, s.strstart++, s.lookahead--;\n }\n if (s.match_available)\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]), s.match_available = 0;\n if (s.insert = s.strstart < MIN_MATCH - 1 \? s.strstart : MIN_MATCH - 1, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function deflate_rle(s, flush) {\n var bflush, prev, scan, strend, _win = s.window;\n for (;; ) {\n if (s.lookahead <= MAX_MATCH) {\n if (fill_window(s), s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n if (s.match_length = 0, s.lookahead >= MIN_MATCH && s.strstart > 0) {\n if (scan = s.strstart - 1, prev = _win[scan], prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do\n ;\n while (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && scan < strend);\n if (s.match_length = MAX_MATCH - (strend - scan), s.match_length > s.lookahead)\n s.match_length = s.lookahead;\n }\n }\n if (s.match_length >= MIN_MATCH)\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH), s.lookahead -= s.match_length, s.strstart += s.match_length, s.match_length = 0;\n else\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++;\n if (bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = 0, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function deflate_huff(s, flush) {\n var bflush;\n for (;; ) {\n if (s.lookahead === 0) {\n if (fill_window(s), s.lookahead === 0) {\n if (flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n break;\n }\n }\n if (s.match_length = 0, bflush = trees._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++, bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = 0, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length, this.max_lazy = max_lazy, this.nice_length = nice_length, this.max_chain = max_chain, this.func = func;\n }\n var configuration_table = [\n new Config(0, 0, 0, 0, deflate_stored),\n new Config(4, 4, 8, 4, deflate_fast),\n new Config(4, 5, 16, 8, deflate_fast),\n new Config(4, 6, 32, 32, deflate_fast),\n new Config(4, 4, 16, 16, deflate_slow),\n new Config(8, 16, 32, 32, deflate_slow),\n new Config(8, 16, 128, 128, deflate_slow),\n new Config(8, 32, 128, 256, deflate_slow),\n new Config(32, 128, 258, 1024, deflate_slow),\n new Config(32, 258, 258, 4096, deflate_slow)\n ];\n function lm_init(s) {\n s.window_size = 2 * s.w_size, zero(s.head), s.max_lazy_match = configuration_table[s.level].max_lazy, s.good_match = configuration_table[s.level].good_length, s.nice_match = configuration_table[s.level].nice_length, s.max_chain_length = configuration_table[s.level].max_chain, s.strstart = 0, s.block_start = 0, s.lookahead = 0, s.insert = 0, s.match_length = s.prev_length = MIN_MATCH - 1, s.match_available = 0, s.ins_h = 0;\n }\n function DeflateState() {\n this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = Z_DEFLATED, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2), this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2), this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2), zero(this.dyn_ltree), zero(this.dyn_dtree), zero(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new utils.Buf16(MAX_BITS + 1), this.heap = new utils.Buf16(2 * L_CODES + 1), zero(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new utils.Buf16(2 * L_CODES + 1), zero(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;\n }\n function deflateResetKeep(strm) {\n var s;\n if (!strm || !strm.state)\n return err(strm, Z_STREAM_ERROR);\n if (strm.total_in = strm.total_out = 0, strm.data_type = Z_UNKNOWN, s = strm.state, s.pending = 0, s.pending_out = 0, s.wrap < 0)\n s.wrap = -s.wrap;\n return s.status = s.wrap \? INIT_STATE : BUSY_STATE, strm.adler = s.wrap === 2 \? 0 : 1, s.last_flush = Z_NO_FLUSH, trees._tr_init(s), Z_OK;\n }\n function deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK)\n lm_init(strm.state);\n return ret;\n }\n function deflateSetHeader(strm, head) {\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (strm.state.wrap !== 2)\n return Z_STREAM_ERROR;\n return strm.state.gzhead = head, Z_OK;\n }\n function deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm)\n return Z_STREAM_ERROR;\n var wrap = 1;\n if (level === Z_DEFAULT_COMPRESSION)\n level = 6;\n if (windowBits < 0)\n wrap = 0, windowBits = -windowBits;\n else if (windowBits > 15)\n wrap = 2, windowBits -= 16;\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED)\n return err(strm, Z_STREAM_ERROR);\n if (windowBits === 8)\n windowBits = 9;\n var s = new DeflateState;\n return strm.state = s, s.strm = strm, s.wrap = wrap, s.gzhead = null, s.w_bits = windowBits, s.w_size = 1 << s.w_bits, s.w_mask = s.w_size - 1, s.hash_bits = memLevel + 7, s.hash_size = 1 << s.hash_bits, s.hash_mask = s.hash_size - 1, s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH), s.window = new utils.Buf8(s.w_size * 2), s.head = new utils.Buf16(s.hash_size), s.prev = new utils.Buf16(s.w_size), s.lit_bufsize = 1 << memLevel + 6, s.pending_buf_size = s.lit_bufsize * 4, s.pending_buf = new utils.Buf8(s.pending_buf_size), s.d_buf = 1 * s.lit_bufsize, s.l_buf = 3 * s.lit_bufsize, s.level = level, s.strategy = strategy, s.method = method, deflateReset(strm);\n }\n function deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n }\n function deflate(strm, flush) {\n var old_flush, s, beg, val;\n if (!strm || !strm.state || flush > Z_BLOCK || flush < 0)\n return strm \? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n if (s = strm.state, !strm.output || !strm.input && strm.avail_in !== 0 || s.status === FINISH_STATE && flush !== Z_FINISH)\n return err(strm, strm.avail_out === 0 \? Z_BUF_ERROR : Z_STREAM_ERROR);\n if (s.strm = strm, old_flush = s.last_flush, s.last_flush = flush, s.status === INIT_STATE)\n if (s.wrap === 2)\n if (strm.adler = 0, put_byte(s, 31), put_byte(s, 139), put_byte(s, 8), !s.gzhead)\n put_byte(s, 0), put_byte(s, 0), put_byte(s, 0), put_byte(s, 0), put_byte(s, 0), put_byte(s, s.level === 9 \? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 \? 4 : 0), put_byte(s, OS_CODE), s.status = BUSY_STATE;\n else {\n if (put_byte(s, (s.gzhead.text \? 1 : 0) + (s.gzhead.hcrc \? 2 : 0) + (!s.gzhead.extra \? 0 : 4) + (!s.gzhead.name \? 0 : 8) + (!s.gzhead.comment \? 0 : 16)), put_byte(s, s.gzhead.time & 255), put_byte(s, s.gzhead.time >> 8 & 255), put_byte(s, s.gzhead.time >> 16 & 255), put_byte(s, s.gzhead.time >> 24 & 255), put_byte(s, s.level === 9 \? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 \? 4 : 0), put_byte(s, s.gzhead.os & 255), s.gzhead.extra && s.gzhead.extra.length)\n put_byte(s, s.gzhead.extra.length & 255), put_byte(s, s.gzhead.extra.length >> 8 & 255);\n if (s.gzhead.hcrc)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n s.gzindex = 0, s.status = EXTRA_STATE;\n }\n else {\n var header = Z_DEFLATED + (s.w_bits - 8 << 4) << 8, level_flags = -1;\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2)\n level_flags = 0;\n else if (s.level < 6)\n level_flags = 1;\n else if (s.level === 6)\n level_flags = 2;\n else\n level_flags = 3;\n if (header |= level_flags << 6, s.strstart !== 0)\n header |= PRESET_DICT;\n if (header += 31 - header % 31, s.status = BUSY_STATE, putShortMSB(s, header), s.strstart !== 0)\n putShortMSB(s, strm.adler >>> 16), putShortMSB(s, strm.adler & 65535);\n strm.adler = 1;\n }\n if (s.status === EXTRA_STATE)\n if (s.gzhead.extra) {\n beg = s.pending;\n while (s.gzindex < (s.gzhead.extra.length & 65535)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (flush_pending(strm), beg = s.pending, s.pending === s.pending_buf_size)\n break;\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 255), s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (s.gzindex === s.gzhead.extra.length)\n s.gzindex = 0, s.status = NAME_STATE;\n } else\n s.status = NAME_STATE;\n if (s.status === NAME_STATE)\n if (s.gzhead.name) {\n beg = s.pending;\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (flush_pending(strm), beg = s.pending, s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n if (s.gzindex < s.gzhead.name.length)\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 255;\n else\n val = 0;\n put_byte(s, val);\n } while (val !== 0);\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (val === 0)\n s.gzindex = 0, s.status = COMMENT_STATE;\n } else\n s.status = COMMENT_STATE;\n if (s.status === COMMENT_STATE)\n if (s.gzhead.comment) {\n beg = s.pending;\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (flush_pending(strm), beg = s.pending, s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n if (s.gzindex < s.gzhead.comment.length)\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 255;\n else\n val = 0;\n put_byte(s, val);\n } while (val !== 0);\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (val === 0)\n s.status = HCRC_STATE;\n } else\n s.status = HCRC_STATE;\n if (s.status === HCRC_STATE)\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size)\n flush_pending(strm);\n if (s.pending + 2 <= s.pending_buf_size)\n put_byte(s, strm.adler & 255), put_byte(s, strm.adler >> 8 & 255), strm.adler = 0, s.status = BUSY_STATE;\n } else\n s.status = BUSY_STATE;\n if (s.pending !== 0) {\n if (flush_pending(strm), strm.avail_out === 0)\n return s.last_flush = -1, Z_OK;\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && flush !== Z_FINISH)\n return err(strm, Z_BUF_ERROR);\n if (s.status === FINISH_STATE && strm.avail_in !== 0)\n return err(strm, Z_BUF_ERROR);\n if (strm.avail_in !== 0 || s.lookahead !== 0 || flush !== Z_NO_FLUSH && s.status !== FINISH_STATE) {\n var bstate = s.strategy === Z_HUFFMAN_ONLY \? deflate_huff(s, flush) : s.strategy === Z_RLE \? deflate_rle(s, flush) : configuration_table[s.level].func(s, flush);\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE)\n s.status = FINISH_STATE;\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0)\n s.last_flush = -1;\n return Z_OK;\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH)\n trees._tr_align(s);\n else if (flush !== Z_BLOCK) {\n if (trees._tr_stored_block(s, 0, 0, !1), flush === Z_FULL_FLUSH) {\n if (zero(s.head), s.lookahead === 0)\n s.strstart = 0, s.block_start = 0, s.insert = 0;\n }\n }\n if (flush_pending(strm), strm.avail_out === 0)\n return s.last_flush = -1, Z_OK;\n }\n }\n if (flush !== Z_FINISH)\n return Z_OK;\n if (s.wrap <= 0)\n return Z_STREAM_END;\n if (s.wrap === 2)\n put_byte(s, strm.adler & 255), put_byte(s, strm.adler >> 8 & 255), put_byte(s, strm.adler >> 16 & 255), put_byte(s, strm.adler >> 24 & 255), put_byte(s, strm.total_in & 255), put_byte(s, strm.total_in >> 8 & 255), put_byte(s, strm.total_in >> 16 & 255), put_byte(s, strm.total_in >> 24 & 255);\n else\n putShortMSB(s, strm.adler >>> 16), putShortMSB(s, strm.adler & 65535);\n if (flush_pending(strm), s.wrap > 0)\n s.wrap = -s.wrap;\n return s.pending !== 0 \? Z_OK : Z_STREAM_END;\n }\n function deflateEnd(strm) {\n var status;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (status = strm.state.status, status !== INIT_STATE && status !== EXTRA_STATE && status !== NAME_STATE && status !== COMMENT_STATE && status !== HCRC_STATE && status !== BUSY_STATE && status !== FINISH_STATE)\n return err(strm, Z_STREAM_ERROR);\n return strm.state = null, status === BUSY_STATE \? err(strm, Z_DATA_ERROR) : Z_OK;\n }\n function deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length, s, str, n, wrap, avail, next, input, tmpDict;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (s = strm.state, wrap = s.wrap, wrap === 2 || wrap === 1 && s.status !== INIT_STATE || s.lookahead)\n return Z_STREAM_ERROR;\n if (wrap === 1)\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n if (s.wrap = 0, dictLength >= s.w_size) {\n if (wrap === 0)\n zero(s.head), s.strstart = 0, s.block_start = 0, s.insert = 0;\n tmpDict = new utils.Buf8(s.w_size), utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0), dictionary = tmpDict, dictLength = s.w_size;\n }\n avail = strm.avail_in, next = strm.next_in, input = strm.input, strm.avail_in = dictLength, strm.next_in = 0, strm.input = dictionary, fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart, n = s.lookahead - (MIN_MATCH - 1);\n do\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask, s.prev[str & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = str, str++;\n while (--n);\n s.strstart = str, s.lookahead = MIN_MATCH - 1, fill_window(s);\n }\n return s.strstart += s.lookahead, s.block_start = s.strstart, s.insert = s.lookahead, s.lookahead = 0, s.match_length = s.prev_length = MIN_MATCH - 1, s.match_available = 0, strm.next_in = next, strm.input = input, strm.avail_in = avail, s.wrap = wrap, Z_OK;\n }\n exports.deflateInit = deflateInit, exports.deflateInit2 = deflateInit2, exports.deflateReset = deflateReset, exports.deflateResetKeep = deflateResetKeep, exports.deflateSetHeader = deflateSetHeader, exports.deflate = deflate, exports.deflateEnd = deflateEnd, exports.deflateSetDictionary = deflateSetDictionary, exports.deflateInfo = \"pako deflate (from Nodeca project)\";\n }\n}), require_inffast = __commonJS({\n \"node_modules/pako/lib/zlib/inffast.js\"(exports, module2) {\n var BAD = 30, TYPE = 12;\n module2.exports = function inflate_fast(strm, start) {\n var state, _in, last, _out, beg, end, dmax, wsize, whave, wnext, s_window, hold, bits, lcode, dcode, lmask, dmask, here, op, len, dist, from, from_source, input, output;\n state = strm.state, _in = strm.next_in, input = strm.input, last = _in + (strm.avail_in - 5), _out = strm.next_out, output = strm.output, beg = _out - (start - strm.avail_out), end = _out + (strm.avail_out - 257), dmax = state.dmax, wsize = state.wsize, whave = state.whave, wnext = state.wnext, s_window = state.window, hold = state.hold, bits = state.bits, lcode = state.lencode, dcode = state.distcode, lmask = (1 << state.lenbits) - 1, dmask = (1 << state.distbits) - 1;\n top:\n do {\n if (bits < 15)\n hold += input[_in++] << bits, bits += 8, hold += input[_in++] << bits, bits += 8;\n here = lcode[hold & lmask];\n dolen:\n for (;; ) {\n if (op = here >>> 24, hold >>>= op, bits -= op, op = here >>> 16 & 255, op === 0)\n output[_out++] = here & 65535;\n else if (op & 16) {\n if (len = here & 65535, op &= 15, op) {\n if (bits < op)\n hold += input[_in++] << bits, bits += 8;\n len += hold & (1 << op) - 1, hold >>>= op, bits -= op;\n }\n if (bits < 15)\n hold += input[_in++] << bits, bits += 8, hold += input[_in++] << bits, bits += 8;\n here = dcode[hold & dmask];\n dodist:\n for (;; ) {\n if (op = here >>> 24, hold >>>= op, bits -= op, op = here >>> 16 & 255, op & 16) {\n if (dist = here & 65535, op &= 15, bits < op) {\n if (hold += input[_in++] << bits, bits += 8, bits < op)\n hold += input[_in++] << bits, bits += 8;\n }\n if (dist += hold & (1 << op) - 1, dist > dmax) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break top;\n }\n if (hold >>>= op, bits -= op, op = _out - beg, dist > op) {\n if (op = dist - op, op > whave) {\n if (state.sane) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break top;\n }\n }\n if (from = 0, from_source = s_window, wnext === 0) {\n if (from += wsize - op, op < len) {\n len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n from = _out - dist, from_source = output;\n }\n } else if (wnext < op) {\n if (from += wsize + wnext - op, op -= wnext, op < len) {\n len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n if (from = 0, wnext < len) {\n op = wnext, len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n from = _out - dist, from_source = output;\n }\n }\n } else if (from += wnext - op, op < len) {\n len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n from = _out - dist, from_source = output;\n }\n while (len > 2)\n output[_out++] = from_source[from++], output[_out++] = from_source[from++], output[_out++] = from_source[from++], len -= 3;\n if (len) {\n if (output[_out++] = from_source[from++], len > 1)\n output[_out++] = from_source[from++];\n }\n } else {\n from = _out - dist;\n do\n output[_out++] = output[from++], output[_out++] = output[from++], output[_out++] = output[from++], len -= 3;\n while (len > 2);\n if (len) {\n if (output[_out++] = output[from++], len > 1)\n output[_out++] = output[from++];\n }\n }\n } else if ((op & 64) === 0) {\n here = dcode[(here & 65535) + (hold & (1 << op) - 1)];\n continue dodist;\n } else {\n strm.msg = \"invalid distance code\", state.mode = BAD;\n break top;\n }\n break;\n }\n } else if ((op & 64) === 0) {\n here = lcode[(here & 65535) + (hold & (1 << op) - 1)];\n continue dolen;\n } else if (op & 32) {\n state.mode = TYPE;\n break top;\n } else {\n strm.msg = \"invalid literal/length code\", state.mode = BAD;\n break top;\n }\n break;\n }\n } while (_in < last && _out < end);\n len = bits >> 3, _in -= len, bits -= len << 3, hold &= (1 << bits) - 1, strm.next_in = _in, strm.next_out = _out, strm.avail_in = _in < last \? 5 + (last - _in) : 5 - (_in - last), strm.avail_out = _out < end \? 257 + (end - _out) : 257 - (_out - end), state.hold = hold, state.bits = bits;\n return;\n };\n }\n}), require_inftrees = __commonJS({\n \"node_modules/pako/lib/zlib/inftrees.js\"(exports, module2) {\n var utils = require_common(), MAXBITS = 15, ENOUGH_LENS = 852, ENOUGH_DISTS = 592, CODES = 0, LENS = 1, DISTS = 2, lbase = [\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 13,\n 15,\n 17,\n 19,\n 23,\n 27,\n 31,\n 35,\n 43,\n 51,\n 59,\n 67,\n 83,\n 99,\n 115,\n 131,\n 163,\n 195,\n 227,\n 258,\n 0,\n 0\n ], lext = [\n 16,\n 16,\n 16,\n 16,\n 16,\n 16,\n 16,\n 16,\n 17,\n 17,\n 17,\n 17,\n 18,\n 18,\n 18,\n 18,\n 19,\n 19,\n 19,\n 19,\n 20,\n 20,\n 20,\n 20,\n 21,\n 21,\n 21,\n 21,\n 16,\n 72,\n 78\n ], dbase = [\n 1,\n 2,\n 3,\n 4,\n 5,\n 7,\n 9,\n 13,\n 17,\n 25,\n 33,\n 49,\n 65,\n 97,\n 129,\n 193,\n 257,\n 385,\n 513,\n 769,\n 1025,\n 1537,\n 2049,\n 3073,\n 4097,\n 6145,\n 8193,\n 12289,\n 16385,\n 24577,\n 0,\n 0\n ], dext = [\n 16,\n 16,\n 16,\n 16,\n 17,\n 17,\n 18,\n 18,\n 19,\n 19,\n 20,\n 20,\n 21,\n 21,\n 22,\n 22,\n 23,\n 23,\n 24,\n 24,\n 25,\n 25,\n 26,\n 26,\n 27,\n 27,\n 28,\n 28,\n 29,\n 29,\n 64,\n 64\n ];\n module2.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) {\n var bits = opts.bits, len = 0, sym = 0, min = 0, max = 0, root = 0, curr = 0, drop = 0, left = 0, used = 0, huff = 0, incr, fill, low, mask, next, base = null, base_index = 0, end, count = new utils.Buf16(MAXBITS + 1), offs = new utils.Buf16(MAXBITS + 1), extra = null, extra_index = 0, here_bits, here_op, here_val;\n for (len = 0;len <= MAXBITS; len++)\n count[len] = 0;\n for (sym = 0;sym < codes; sym++)\n count[lens[lens_index + sym]]++;\n root = bits;\n for (max = MAXBITS;max >= 1; max--)\n if (count[max] !== 0)\n break;\n if (root > max)\n root = max;\n if (max === 0)\n return table[table_index++] = 1 << 24 | 64 << 16 | 0, table[table_index++] = 1 << 24 | 64 << 16 | 0, opts.bits = 1, 0;\n for (min = 1;min < max; min++)\n if (count[min] !== 0)\n break;\n if (root < min)\n root = min;\n left = 1;\n for (len = 1;len <= MAXBITS; len++)\n if (left <<= 1, left -= count[len], left < 0)\n return -1;\n if (left > 0 && (type === CODES || max !== 1))\n return -1;\n offs[1] = 0;\n for (len = 1;len < MAXBITS; len++)\n offs[len + 1] = offs[len] + count[len];\n for (sym = 0;sym < codes; sym++)\n if (lens[lens_index + sym] !== 0)\n work[offs[lens[lens_index + sym]]++] = sym;\n if (type === CODES)\n base = extra = work, end = 19;\n else if (type === LENS)\n base = lbase, base_index -= 257, extra = lext, extra_index -= 257, end = 256;\n else\n base = dbase, extra = dext, end = -1;\n if (huff = 0, sym = 0, len = min, next = table_index, curr = root, drop = 0, low = -1, used = 1 << root, mask = used - 1, type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS)\n return 1;\n for (;; ) {\n if (here_bits = len - drop, work[sym] < end)\n here_op = 0, here_val = work[sym];\n else if (work[sym] > end)\n here_op = extra[extra_index + work[sym]], here_val = base[base_index + work[sym]];\n else\n here_op = 96, here_val = 0;\n incr = 1 << len - drop, fill = 1 << curr, min = fill;\n do\n fill -= incr, table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0;\n while (fill !== 0);\n incr = 1 << len - 1;\n while (huff & incr)\n incr >>= 1;\n if (incr !== 0)\n huff &= incr - 1, huff += incr;\n else\n huff = 0;\n if (sym++, --count[len] === 0) {\n if (len === max)\n break;\n len = lens[lens_index + work[sym]];\n }\n if (len > root && (huff & mask) !== low) {\n if (drop === 0)\n drop = root;\n next += min, curr = len - drop, left = 1 << curr;\n while (curr + drop < max) {\n if (left -= count[curr + drop], left <= 0)\n break;\n curr++, left <<= 1;\n }\n if (used += 1 << curr, type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS)\n return 1;\n low = huff & mask, table[low] = root << 24 | curr << 16 | next - table_index | 0;\n }\n }\n if (huff !== 0)\n table[next + huff] = len - drop << 24 | 64 << 16 | 0;\n return opts.bits = root, 0;\n };\n }\n}), require_inflate = __commonJS({\n \"node_modules/pako/lib/zlib/inflate.js\"(exports) {\n var utils = require_common(), adler32 = require_adler32(), crc32 = require_crc32(), inflate_fast = require_inffast(), inflate_table = require_inftrees(), CODES = 0, LENS = 1, DISTS = 2, Z_FINISH = 4, Z_BLOCK = 5, Z_TREES = 6, Z_OK = 0, Z_STREAM_END = 1, Z_NEED_DICT = 2, Z_STREAM_ERROR = -2, Z_DATA_ERROR = -3, Z_MEM_ERROR = -4, Z_BUF_ERROR = -5, Z_DEFLATED = 8, HEAD = 1, FLAGS = 2, TIME = 3, OS = 4, EXLEN = 5, EXTRA = 6, NAME = 7, COMMENT = 8, HCRC = 9, DICTID = 10, DICT = 11, TYPE = 12, TYPEDO = 13, STORED = 14, COPY_ = 15, COPY = 16, TABLE = 17, LENLENS = 18, CODELENS = 19, LEN_ = 20, LEN = 21, LENEXT = 22, DIST = 23, DISTEXT = 24, MATCH = 25, LIT = 26, CHECK = 27, LENGTH = 28, DONE = 29, BAD = 30, MEM = 31, SYNC = 32, ENOUGH_LENS = 852, ENOUGH_DISTS = 592, MAX_WBITS = 15, DEF_WBITS = MAX_WBITS;\n function zswap32(q) {\n return (q >>> 24 & 255) + (q >>> 8 & 65280) + ((q & 65280) << 8) + ((q & 255) << 24);\n }\n function InflateState() {\n this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new utils.Buf16(320), this.work = new utils.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;\n }\n function inflateResetKeep(strm) {\n var state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, strm.total_in = strm.total_out = state.total = 0, strm.msg = \"\", state.wrap)\n strm.adler = state.wrap & 1;\n return state.mode = HEAD, state.last = 0, state.havedict = 0, state.dmax = 32768, state.head = null, state.hold = 0, state.bits = 0, state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS), state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS), state.sane = 1, state.back = -1, Z_OK;\n }\n function inflateReset(strm) {\n var state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n return state = strm.state, state.wsize = 0, state.whave = 0, state.wnext = 0, inflateResetKeep(strm);\n }\n function inflateReset2(strm, windowBits) {\n var wrap, state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, windowBits < 0)\n wrap = 0, windowBits = -windowBits;\n else if (wrap = (windowBits >> 4) + 1, windowBits < 48)\n windowBits &= 15;\n if (windowBits && (windowBits < 8 || windowBits > 15))\n return Z_STREAM_ERROR;\n if (state.window !== null && state.wbits !== windowBits)\n state.window = null;\n return state.wrap = wrap, state.wbits = windowBits, inflateReset(strm);\n }\n function inflateInit2(strm, windowBits) {\n var ret, state;\n if (!strm)\n return Z_STREAM_ERROR;\n if (state = new InflateState, strm.state = state, state.window = null, ret = inflateReset2(strm, windowBits), ret !== Z_OK)\n strm.state = null;\n return ret;\n }\n function inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n }\n var virgin = !0, lenfix, distfix;\n function fixedtables(state) {\n if (virgin) {\n var sym;\n lenfix = new utils.Buf32(512), distfix = new utils.Buf32(32), sym = 0;\n while (sym < 144)\n state.lens[sym++] = 8;\n while (sym < 256)\n state.lens[sym++] = 9;\n while (sym < 280)\n state.lens[sym++] = 7;\n while (sym < 288)\n state.lens[sym++] = 8;\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, {\n bits: 9\n }), sym = 0;\n while (sym < 32)\n state.lens[sym++] = 5;\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, {\n bits: 5\n }), virgin = !1;\n }\n state.lencode = lenfix, state.lenbits = 9, state.distcode = distfix, state.distbits = 5;\n }\n function updatewindow(strm, src, end, copy) {\n var dist, state = strm.state;\n if (state.window === null)\n state.wsize = 1 << state.wbits, state.wnext = 0, state.whave = 0, state.window = new utils.Buf8(state.wsize);\n if (copy >= state.wsize)\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0), state.wnext = 0, state.whave = state.wsize;\n else {\n if (dist = state.wsize - state.wnext, dist > copy)\n dist = copy;\n if (utils.arraySet(state.window, src, end - copy, dist, state.wnext), copy -= dist, copy)\n utils.arraySet(state.window, src, end - copy, copy, 0), state.wnext = copy, state.whave = state.wsize;\n else {\n if (state.wnext += dist, state.wnext === state.wsize)\n state.wnext = 0;\n if (state.whave < state.wsize)\n state.whave += dist;\n }\n }\n return 0;\n }\n function inflate(strm, flush) {\n var state, input, output, next, put, have, left, hold, bits, _in, _out, copy, from, from_source, here = 0, here_bits, here_op, here_val, last_bits, last_op, last_val, len, ret, hbuf = new utils.Buf8(4), opts, n, order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0)\n return Z_STREAM_ERROR;\n if (state = strm.state, state.mode === TYPE)\n state.mode = TYPEDO;\n put = strm.next_out, output = strm.output, left = strm.avail_out, next = strm.next_in, input = strm.input, have = strm.avail_in, hold = state.hold, bits = state.bits, _in = have, _out = left, ret = Z_OK;\n inf_leave:\n for (;; )\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.wrap & 2 && hold === 35615) {\n state.check = 0, hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0), hold = 0, bits = 0, state.mode = FLAGS;\n break;\n }\n if (state.flags = 0, state.head)\n state.head.done = !1;\n if (!(state.wrap & 1) || (((hold & 255) << 8) + (hold >> 8)) % 31) {\n strm.msg = \"incorrect header check\", state.mode = BAD;\n break;\n }\n if ((hold & 15) !== Z_DEFLATED) {\n strm.msg = \"unknown compression method\", state.mode = BAD;\n break;\n }\n if (hold >>>= 4, bits -= 4, len = (hold & 15) + 8, state.wbits === 0)\n state.wbits = len;\n else if (len > state.wbits) {\n strm.msg = \"invalid window size\", state.mode = BAD;\n break;\n }\n state.dmax = 1 << len, strm.adler = state.check = 1, state.mode = hold & 512 \? DICTID : TYPE, hold = 0, bits = 0;\n break;\n case FLAGS:\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.flags = hold, (state.flags & 255) !== Z_DEFLATED) {\n strm.msg = \"unknown compression method\", state.mode = BAD;\n break;\n }\n if (state.flags & 57344) {\n strm.msg = \"unknown header flags set\", state.mode = BAD;\n break;\n }\n if (state.head)\n state.head.text = hold >> 8 & 1;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0);\n hold = 0, bits = 0, state.mode = TIME;\n case TIME:\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.head)\n state.head.time = hold;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, hbuf[2] = hold >>> 16 & 255, hbuf[3] = hold >>> 24 & 255, state.check = crc32(state.check, hbuf, 4, 0);\n hold = 0, bits = 0, state.mode = OS;\n case OS:\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.head)\n state.head.xflags = hold & 255, state.head.os = hold >> 8;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0);\n hold = 0, bits = 0, state.mode = EXLEN;\n case EXLEN:\n if (state.flags & 1024) {\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.length = hold, state.head)\n state.head.extra_len = hold;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0);\n hold = 0, bits = 0;\n } else if (state.head)\n state.head.extra = null;\n state.mode = EXTRA;\n case EXTRA:\n if (state.flags & 1024) {\n if (copy = state.length, copy > have)\n copy = have;\n if (copy) {\n if (state.head) {\n if (len = state.head.extra_len - state.length, !state.head.extra)\n state.head.extra = new Array(state.head.extra_len);\n utils.arraySet(state.head.extra, input, next, copy, len);\n }\n if (state.flags & 512)\n state.check = crc32(state.check, input, copy, next);\n have -= copy, next += copy, state.length -= copy;\n }\n if (state.length)\n break inf_leave;\n }\n state.length = 0, state.mode = NAME;\n case NAME:\n if (state.flags & 2048) {\n if (have === 0)\n break inf_leave;\n copy = 0;\n do\n if (len = input[next + copy++], state.head && len && state.length < 65536)\n state.head.name += String.fromCharCode(len);\n while (len && copy < have);\n if (state.flags & 512)\n state.check = crc32(state.check, input, copy, next);\n if (have -= copy, next += copy, len)\n break inf_leave;\n } else if (state.head)\n state.head.name = null;\n state.length = 0, state.mode = COMMENT;\n case COMMENT:\n if (state.flags & 4096) {\n if (have === 0)\n break inf_leave;\n copy = 0;\n do\n if (len = input[next + copy++], state.head && len && state.length < 65536)\n state.head.comment += String.fromCharCode(len);\n while (len && copy < have);\n if (state.flags & 512)\n state.check = crc32(state.check, input, copy, next);\n if (have -= copy, next += copy, len)\n break inf_leave;\n } else if (state.head)\n state.head.comment = null;\n state.mode = HCRC;\n case HCRC:\n if (state.flags & 512) {\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (hold !== (state.check & 65535)) {\n strm.msg = \"header crc mismatch\", state.mode = BAD;\n break;\n }\n hold = 0, bits = 0;\n }\n if (state.head)\n state.head.hcrc = state.flags >> 9 & 1, state.head.done = !0;\n strm.adler = state.check = 0, state.mode = TYPE;\n break;\n case DICTID:\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n strm.adler = state.check = zswap32(hold), hold = 0, bits = 0, state.mode = DICT;\n case DICT:\n if (state.havedict === 0)\n return strm.next_out = put, strm.avail_out = left, strm.next_in = next, strm.avail_in = have, state.hold = hold, state.bits = bits, Z_NEED_DICT;\n strm.adler = state.check = 1, state.mode = TYPE;\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES)\n break inf_leave;\n case TYPEDO:\n if (state.last) {\n hold >>>= bits & 7, bits -= bits & 7, state.mode = CHECK;\n break;\n }\n while (bits < 3) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n switch (state.last = hold & 1, hold >>>= 1, bits -= 1, hold & 3) {\n case 0:\n state.mode = STORED;\n break;\n case 1:\n if (fixedtables(state), state.mode = LEN_, flush === Z_TREES) {\n hold >>>= 2, bits -= 2;\n break inf_leave;\n }\n break;\n case 2:\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = \"invalid block type\", state.mode = BAD;\n }\n hold >>>= 2, bits -= 2;\n break;\n case STORED:\n hold >>>= bits & 7, bits -= bits & 7;\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if ((hold & 65535) !== (hold >>> 16 ^ 65535)) {\n strm.msg = \"invalid stored block lengths\", state.mode = BAD;\n break;\n }\n if (state.length = hold & 65535, hold = 0, bits = 0, state.mode = COPY_, flush === Z_TREES)\n break inf_leave;\n case COPY_:\n state.mode = COPY;\n case COPY:\n if (copy = state.length, copy) {\n if (copy > have)\n copy = have;\n if (copy > left)\n copy = left;\n if (copy === 0)\n break inf_leave;\n utils.arraySet(output, input, next, copy, put), have -= copy, next += copy, left -= copy, put += copy, state.length -= copy;\n break;\n }\n state.mode = TYPE;\n break;\n case TABLE:\n while (bits < 14) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.nlen = (hold & 31) + 257, hold >>>= 5, bits -= 5, state.ndist = (hold & 31) + 1, hold >>>= 5, bits -= 5, state.ncode = (hold & 15) + 4, hold >>>= 4, bits -= 4, state.nlen > 286 || state.ndist > 30) {\n strm.msg = \"too many length or distance symbols\", state.mode = BAD;\n break;\n }\n state.have = 0, state.mode = LENLENS;\n case LENLENS:\n while (state.have < state.ncode) {\n while (bits < 3) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n state.lens[order[state.have++]] = hold & 7, hold >>>= 3, bits -= 3;\n }\n while (state.have < 19)\n state.lens[order[state.have++]] = 0;\n if (state.lencode = state.lendyn, state.lenbits = 7, opts = { bits: state.lenbits }, ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts), state.lenbits = opts.bits, ret) {\n strm.msg = \"invalid code lengths set\", state.mode = BAD;\n break;\n }\n state.have = 0, state.mode = CODELENS;\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;; ) {\n if (here = state.lencode[hold & (1 << state.lenbits) - 1], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (here_val < 16)\n hold >>>= here_bits, bits -= here_bits, state.lens[state.have++] = here_val;\n else {\n if (here_val === 16) {\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (hold >>>= here_bits, bits -= here_bits, state.have === 0) {\n strm.msg = \"invalid bit length repeat\", state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1], copy = 3 + (hold & 3), hold >>>= 2, bits -= 2;\n } else if (here_val === 17) {\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= here_bits, bits -= here_bits, len = 0, copy = 3 + (hold & 7), hold >>>= 3, bits -= 3;\n } else {\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= here_bits, bits -= here_bits, len = 0, copy = 11 + (hold & 127), hold >>>= 7, bits -= 7;\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = \"invalid bit length repeat\", state.mode = BAD;\n break;\n }\n while (copy--)\n state.lens[state.have++] = len;\n }\n }\n if (state.mode === BAD)\n break;\n if (state.lens[256] === 0) {\n strm.msg = \"invalid code -- missing end-of-block\", state.mode = BAD;\n break;\n }\n if (state.lenbits = 9, opts = { bits: state.lenbits }, ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts), state.lenbits = opts.bits, ret) {\n strm.msg = \"invalid literal/lengths set\", state.mode = BAD;\n break;\n }\n if (state.distbits = 6, state.distcode = state.distdyn, opts = { bits: state.distbits }, ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts), state.distbits = opts.bits, ret) {\n strm.msg = \"invalid distances set\", state.mode = BAD;\n break;\n }\n if (state.mode = LEN_, flush === Z_TREES)\n break inf_leave;\n case LEN_:\n state.mode = LEN;\n case LEN:\n if (have >= 6 && left >= 258) {\n if (strm.next_out = put, strm.avail_out = left, strm.next_in = next, strm.avail_in = have, state.hold = hold, state.bits = bits, inflate_fast(strm, _out), put = strm.next_out, output = strm.output, left = strm.avail_out, next = strm.next_in, input = strm.input, have = strm.avail_in, hold = state.hold, bits = state.bits, state.mode === TYPE)\n state.back = -1;\n break;\n }\n state.back = 0;\n for (;; ) {\n if (here = state.lencode[hold & (1 << state.lenbits) - 1], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (here_op && (here_op & 240) === 0) {\n last_bits = here_bits, last_op = here_op, last_val = here_val;\n for (;; ) {\n if (here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, last_bits + here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= last_bits, bits -= last_bits, state.back += last_bits;\n }\n if (hold >>>= here_bits, bits -= here_bits, state.back += here_bits, state.length = here_val, here_op === 0) {\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n state.back = -1, state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = \"invalid literal/length code\", state.mode = BAD;\n break;\n }\n state.extra = here_op & 15, state.mode = LENEXT;\n case LENEXT:\n if (state.extra) {\n n = state.extra;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n state.length += hold & (1 << state.extra) - 1, hold >>>= state.extra, bits -= state.extra, state.back += state.extra;\n }\n state.was = state.length, state.mode = DIST;\n case DIST:\n for (;; ) {\n if (here = state.distcode[hold & (1 << state.distbits) - 1], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if ((here_op & 240) === 0) {\n last_bits = here_bits, last_op = here_op, last_val = here_val;\n for (;; ) {\n if (here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, last_bits + here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= last_bits, bits -= last_bits, state.back += last_bits;\n }\n if (hold >>>= here_bits, bits -= here_bits, state.back += here_bits, here_op & 64) {\n strm.msg = \"invalid distance code\", state.mode = BAD;\n break;\n }\n state.offset = here_val, state.extra = here_op & 15, state.mode = DISTEXT;\n case DISTEXT:\n if (state.extra) {\n n = state.extra;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n state.offset += hold & (1 << state.extra) - 1, hold >>>= state.extra, bits -= state.extra, state.back += state.extra;\n }\n if (state.offset > state.dmax) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break;\n }\n state.mode = MATCH;\n case MATCH:\n if (left === 0)\n break inf_leave;\n if (copy = _out - left, state.offset > copy) {\n if (copy = state.offset - copy, copy > state.whave) {\n if (state.sane) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break;\n }\n }\n if (copy > state.wnext)\n copy -= state.wnext, from = state.wsize - copy;\n else\n from = state.wnext - copy;\n if (copy > state.length)\n copy = state.length;\n from_source = state.window;\n } else\n from_source = output, from = put - state.offset, copy = state.length;\n if (copy > left)\n copy = left;\n left -= copy, state.length -= copy;\n do\n output[put++] = from_source[from++];\n while (--copy);\n if (state.length === 0)\n state.mode = LEN;\n break;\n case LIT:\n if (left === 0)\n break inf_leave;\n output[put++] = state.length, left--, state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold |= input[next++] << bits, bits += 8;\n }\n if (_out -= left, strm.total_out += _out, state.total += _out, _out)\n strm.adler = state.check = state.flags \? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out);\n if (_out = left, (state.flags \? hold : zswap32(hold)) !== state.check) {\n strm.msg = \"incorrect data check\", state.mode = BAD;\n break;\n }\n hold = 0, bits = 0;\n }\n state.mode = LENGTH;\n case LENGTH:\n if (state.wrap && state.flags) {\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (hold !== (state.total & 4294967295)) {\n strm.msg = \"incorrect length check\", state.mode = BAD;\n break;\n }\n hold = 0, bits = 0;\n }\n state.mode = DONE;\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n default:\n return Z_STREAM_ERROR;\n }\n if (strm.next_out = put, strm.avail_out = left, strm.next_in = next, strm.avail_in = have, state.hold = hold, state.bits = bits, state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush !== Z_FINISH)) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out))\n return state.mode = MEM, Z_MEM_ERROR;\n }\n if (_in -= strm.avail_in, _out -= strm.avail_out, strm.total_in += _in, strm.total_out += _out, state.total += _out, state.wrap && _out)\n strm.adler = state.check = state.flags \? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out);\n if (strm.data_type = state.bits + (state.last \? 64 : 0) + (state.mode === TYPE \? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ \? 256 : 0), (_in === 0 && _out === 0 || flush === Z_FINISH) && ret === Z_OK)\n ret = Z_BUF_ERROR;\n return ret;\n }\n function inflateEnd(strm) {\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n var state = strm.state;\n if (state.window)\n state.window = null;\n return strm.state = null, Z_OK;\n }\n function inflateGetHeader(strm, head) {\n var state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, (state.wrap & 2) === 0)\n return Z_STREAM_ERROR;\n return state.head = head, head.done = !1, Z_OK;\n }\n function inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length, state, dictid, ret;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, state.wrap !== 0 && state.mode !== DICT)\n return Z_STREAM_ERROR;\n if (state.mode === DICT) {\n if (dictid = 1, dictid = adler32(dictid, dictionary, dictLength, 0), dictid !== state.check)\n return Z_DATA_ERROR;\n }\n if (ret = updatewindow(strm, dictionary, dictLength, dictLength), ret)\n return state.mode = MEM, Z_MEM_ERROR;\n return state.havedict = 1, Z_OK;\n }\n exports.inflateReset = inflateReset, exports.inflateReset2 = inflateReset2, exports.inflateResetKeep = inflateResetKeep, exports.inflateInit = inflateInit, exports.inflateInit2 = inflateInit2, exports.inflate = inflate, exports.inflateEnd = inflateEnd, exports.inflateGetHeader = inflateGetHeader, exports.inflateSetDictionary = inflateSetDictionary, exports.inflateInfo = \"pako inflate (from Nodeca project)\";\n }\n}), require_constants = __commonJS({\n \"node_modules/pako/lib/zlib/constants.js\"(exports, module2) {\n module2.exports = {\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n Z_BUF_ERROR: -5,\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n Z_BINARY: 0,\n Z_TEXT: 1,\n Z_UNKNOWN: 2,\n Z_DEFLATED: 8\n };\n }\n}), require_binding = __commonJS({\n \"node_modules/browserify-zlib/lib/binding.js\"(exports) {\n var Zstream = require_zstream(), zlib_deflate = require_deflate(), zlib_inflate = require_inflate(), constants = require_constants();\n for (key in constants)\n exports[key] = constants[key];\n var key;\n exports.NONE = 0, exports.DEFLATE = 1, exports.INFLATE = 2, exports.GZIP = 3, exports.GUNZIP = 4, exports.DEFLATERAW = 5, exports.INFLATERAW = 6, exports.UNZIP = 7;\n var GZIP_HEADER_ID1 = 31, GZIP_HEADER_ID2 = 139;\n function Zlib(mode) {\n if (typeof mode !== \"number\" || mode < exports.DEFLATE || mode > exports.UNZIP)\n @throwTypeError(\"Bad argument\");\n this.dictionary = null, this.err = 0, this.flush = 0, this.init_done = !1, this.level = 0, this.memLevel = 0, this.mode = mode, this.strategy = 0, this.windowBits = 0, this.write_in_progress = !1, this.pending_close = !1, this.gzip_id_bytes_read = 0;\n }\n Zlib.prototype = {}, Zlib.prototype.close = function() {\n if (this.write_in_progress) {\n this.pending_close = !0;\n return;\n }\n if (this.pending_close = !1, assert(this.init_done, \"close before init\"), assert(this.mode <= exports.UNZIP), this.mode === exports.DEFLATE || this.mode === exports.GZIP || this.mode === exports.DEFLATERAW)\n zlib_deflate.deflateEnd(this.strm);\n else if (this.mode === exports.INFLATE || this.mode === exports.GUNZIP || this.mode === exports.INFLATERAW || this.mode === exports.UNZIP)\n zlib_inflate.inflateEnd(this.strm);\n this.mode = exports.NONE, this.dictionary = null;\n }, Zlib.prototype.write = function(flush, input, in_off, in_len, out, out_off, out_len) {\n return this._write(!0, flush, input, in_off, in_len, out, out_off, out_len);\n }, Zlib.prototype.writeSync = function(flush, input, in_off, in_len, out, out_off, out_len) {\n return this._write(!1, flush, input, in_off, in_len, out, out_off, out_len);\n }, Zlib.prototype._write = function(async, flush, input, in_off, in_len, out, out_off, out_len) {\n if (assert.equal(arguments.length, 8), assert(this.init_done, \"write before init\"), assert(this.mode !== exports.NONE, \"already finalized\"), assert.equal(!1, this.write_in_progress, \"write already in progress\"), assert.equal(!1, this.pending_close, \"close is pending\"), this.write_in_progress = !0, assert.equal(!1, flush === void 0, \"must provide flush value\"), this.write_in_progress = !0, flush !== exports.Z_NO_FLUSH && flush !== exports.Z_PARTIAL_FLUSH && flush !== exports.Z_SYNC_FLUSH && flush !== exports.Z_FULL_FLUSH && flush !== exports.Z_FINISH && flush !== exports.Z_BLOCK)\n throw new Error(\"Invalid flush value\");\n if (input == null)\n input = Buffer.alloc(0), in_len = 0, in_off = 0;\n if (this.strm.avail_in = in_len, this.strm.input = input, this.strm.next_in = in_off, this.strm.avail_out = out_len, this.strm.output = out, this.strm.next_out = out_off, this.flush = flush, !async) {\n if (this._process(), this._checkError())\n return this._afterSync();\n return;\n }\n var self = this;\n return process.nextTick(function() {\n self._process(), self._after();\n }), this;\n }, Zlib.prototype._afterSync = function() {\n var avail_out = this.strm.avail_out, avail_in = this.strm.avail_in;\n return this.write_in_progress = !1, [avail_in, avail_out];\n }, Zlib.prototype._process = function() {\n var next_expected_header_byte = null;\n switch (this.mode) {\n case exports.DEFLATE:\n case exports.GZIP:\n case exports.DEFLATERAW:\n this.err = zlib_deflate.deflate(this.strm, this.flush);\n break;\n case exports.UNZIP:\n if (this.strm.avail_in > 0)\n next_expected_header_byte = this.strm.next_in;\n switch (this.gzip_id_bytes_read) {\n case 0:\n if (next_expected_header_byte === null)\n break;\n if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID1) {\n if (this.gzip_id_bytes_read = 1, next_expected_header_byte++, this.strm.avail_in === 1)\n break;\n } else {\n this.mode = exports.INFLATE;\n break;\n }\n case 1:\n if (next_expected_header_byte === null)\n break;\n if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID2)\n this.gzip_id_bytes_read = 2, this.mode = exports.GUNZIP;\n else\n this.mode = exports.INFLATE;\n break;\n default:\n throw new Error(\"invalid number of gzip magic number bytes read\");\n }\n case exports.INFLATE:\n case exports.GUNZIP:\n case exports.INFLATERAW:\n if (this.err = zlib_inflate.inflate(this.strm, this.flush), this.err === exports.Z_NEED_DICT && this.dictionary) {\n if (this.err = zlib_inflate.inflateSetDictionary(this.strm, this.dictionary), this.err === exports.Z_OK)\n this.err = zlib_inflate.inflate(this.strm, this.flush);\n else if (this.err === exports.Z_DATA_ERROR)\n this.err = exports.Z_NEED_DICT;\n }\n while (this.strm.avail_in > 0 && this.mode === exports.GUNZIP && this.err === exports.Z_STREAM_END && this.strm.next_in[0] !== 0)\n this.reset(), this.err = zlib_inflate.inflate(this.strm, this.flush);\n break;\n default:\n throw new Error(\"Unknown mode \" + this.mode);\n }\n }, Zlib.prototype._checkError = function() {\n switch (this.err) {\n case exports.Z_OK:\n case exports.Z_BUF_ERROR:\n if (this.strm.avail_out !== 0 && this.flush === exports.Z_FINISH)\n return this._error(\"unexpected end of file\"), !1;\n break;\n case exports.Z_STREAM_END:\n break;\n case exports.Z_NEED_DICT:\n if (this.dictionary == null)\n this._error(\"Missing dictionary\");\n else\n this._error(\"Bad dictionary\");\n return !1;\n default:\n return this._error(\"Zlib error\"), !1;\n }\n return !0;\n }, Zlib.prototype._after = function() {\n if (!this._checkError())\n return;\n var avail_out = this.strm.avail_out, avail_in = this.strm.avail_in;\n if (this.write_in_progress = !1, this.callback(avail_in, avail_out), this.pending_close)\n this.close();\n }, Zlib.prototype._error = function(message) {\n if (this.strm.msg)\n message = this.strm.msg;\n if (this.onerror(message, this.err), this.write_in_progress = !1, this.pending_close)\n this.close();\n }, Zlib.prototype.init = function(windowBits, level, memLevel, strategy, dictionary) {\n assert(arguments.length === 4 || arguments.length === 5, \"init(windowBits, level, memLevel, strategy, [dictionary])\"), assert(windowBits >= 8 && windowBits <= 15, \"invalid windowBits\"), assert(level >= -1 && level <= 9, \"invalid compression level\"), assert(memLevel >= 1 && memLevel <= 9, \"invalid memlevel\"), assert(strategy === exports.Z_FILTERED || strategy === exports.Z_HUFFMAN_ONLY || strategy === exports.Z_RLE || strategy === exports.Z_FIXED || strategy === exports.Z_DEFAULT_STRATEGY, \"invalid strategy\"), this._init(level, windowBits, memLevel, strategy, dictionary), this._setDictionary();\n }, Zlib.prototype.params = function() {\n throw new Error(\"deflateParams Not supported\");\n }, Zlib.prototype.reset = function() {\n this._reset(), this._setDictionary();\n }, Zlib.prototype._init = function(level, windowBits, memLevel, strategy, dictionary) {\n if (this.level = level, this.windowBits = windowBits, this.memLevel = memLevel, this.strategy = strategy, this.flush = exports.Z_NO_FLUSH, this.err = exports.Z_OK, this.mode === exports.GZIP || this.mode === exports.GUNZIP)\n this.windowBits += 16;\n if (this.mode === exports.UNZIP)\n this.windowBits += 32;\n if (this.mode === exports.DEFLATERAW || this.mode === exports.INFLATERAW)\n this.windowBits = -1 * this.windowBits;\n switch (this.strm = new Zstream, this.mode) {\n case exports.DEFLATE:\n case exports.GZIP:\n case exports.DEFLATERAW:\n this.err = zlib_deflate.deflateInit2(this.strm, this.level, exports.Z_DEFLATED, this.windowBits, this.memLevel, this.strategy);\n break;\n case exports.INFLATE:\n case exports.GUNZIP:\n case exports.INFLATERAW:\n case exports.UNZIP:\n this.err = zlib_inflate.inflateInit2(this.strm, this.windowBits);\n break;\n default:\n throw new Error(\"Unknown mode \" + this.mode);\n }\n if (this.err !== exports.Z_OK)\n this._error(\"Init error\");\n this.dictionary = dictionary, this.write_in_progress = !1, this.init_done = !0;\n }, Zlib.prototype._setDictionary = function() {\n if (this.dictionary == null)\n return;\n switch (this.err = exports.Z_OK, this.mode) {\n case exports.DEFLATE:\n case exports.DEFLATERAW:\n this.err = zlib_deflate.deflateSetDictionary(this.strm, this.dictionary);\n break;\n default:\n break;\n }\n if (this.err !== exports.Z_OK)\n this._error(\"Failed to set dictionary\");\n }, Zlib.prototype._reset = function() {\n switch (this.err = exports.Z_OK, this.mode) {\n case exports.DEFLATE:\n case exports.DEFLATERAW:\n case exports.GZIP:\n this.err = zlib_deflate.deflateReset(this.strm);\n break;\n case exports.INFLATE:\n case exports.INFLATERAW:\n case exports.GUNZIP:\n this.err = zlib_inflate.inflateReset(this.strm);\n break;\n default:\n break;\n }\n if (this.err !== exports.Z_OK)\n this._error(\"Failed to reset stream\");\n }, exports.Zlib = Zlib;\n }\n}), require_lib = __commonJS({\n \"node_modules/browserify-zlib/lib/index.js\"(exports) {\n var Buffer2 = BufferModule.Buffer, Transform = StreamModule.Transform, binding = require_binding(), util = Util, kMaxLength = BufferModule.kMaxLength, kRangeErrorMessage = \"Cannot create final Buffer. It would be larger than 0x\" + kMaxLength.toString(16) + \" bytes\";\n binding.Z_MIN_WINDOWBITS = 8, binding.Z_MAX_WINDOWBITS = 15, binding.Z_DEFAULT_WINDOWBITS = 15, binding.Z_MIN_CHUNK = 64, binding.Z_MAX_CHUNK = Infinity, binding.Z_DEFAULT_CHUNK = 16384, binding.Z_MIN_MEMLEVEL = 1, binding.Z_MAX_MEMLEVEL = 9, binding.Z_DEFAULT_MEMLEVEL = 8, binding.Z_MIN_LEVEL = -1, binding.Z_MAX_LEVEL = 9, binding.Z_DEFAULT_LEVEL = binding.Z_DEFAULT_COMPRESSION;\n var bkeys = Object.keys(binding);\n for (bk = 0;bk < bkeys.length; bk++)\n if (bkey = bkeys[bk], bkey.match(/^Z/))\n Object.defineProperty(exports, bkey, {\n enumerable: !0,\n value: binding[bkey],\n writable: !1\n });\n var bkey, bk, codes = {\n Z_OK: binding.Z_OK,\n Z_STREAM_END: binding.Z_STREAM_END,\n Z_NEED_DICT: binding.Z_NEED_DICT,\n Z_ERRNO: binding.Z_ERRNO,\n Z_STREAM_ERROR: binding.Z_STREAM_ERROR,\n Z_DATA_ERROR: binding.Z_DATA_ERROR,\n Z_MEM_ERROR: binding.Z_MEM_ERROR,\n Z_BUF_ERROR: binding.Z_BUF_ERROR,\n Z_VERSION_ERROR: binding.Z_VERSION_ERROR\n }, ckeys = Object.keys(codes);\n for (ck = 0;ck < ckeys.length; ck++)\n ckey = ckeys[ck], codes[codes[ckey]] = ckey;\n var ckey, ck;\n Object.defineProperty(exports, \"codes\", {\n enumerable: !0,\n value: Object.freeze(codes),\n writable: !1\n }), exports.constants = require_constants(), exports.Deflate = Deflate, exports.Inflate = Inflate, exports.Gzip = Gzip, exports.Gunzip = Gunzip, exports.DeflateRaw = DeflateRaw, exports.InflateRaw = InflateRaw, exports.Unzip = Unzip, exports.createDeflate = function(o) {\n return new Deflate(o);\n }, exports.createInflate = function(o) {\n return new Inflate(o);\n }, exports.createDeflateRaw = function(o) {\n return new DeflateRaw(o);\n }, exports.createInflateRaw = function(o) {\n return new InflateRaw(o);\n }, exports.createGzip = function(o) {\n return new Gzip(o);\n }, exports.createGunzip = function(o) {\n return new Gunzip(o);\n }, exports.createUnzip = function(o) {\n return new Unzip(o);\n }, exports.deflate = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Deflate(opts), buffer, callback);\n }, exports.deflateSync = function(buffer, opts) {\n return zlibBufferSync(new Deflate(opts), buffer);\n }, exports.gzip = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Gzip(opts), buffer, callback);\n }, exports.gzipSync = function(buffer, opts) {\n return zlibBufferSync(new Gzip(opts), buffer);\n }, exports.deflateRaw = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new DeflateRaw(opts), buffer, callback);\n }, exports.deflateRawSync = function(buffer, opts) {\n return zlibBufferSync(new DeflateRaw(opts), buffer);\n }, exports.unzip = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Unzip(opts), buffer, callback);\n }, exports.unzipSync = function(buffer, opts) {\n return zlibBufferSync(new Unzip(opts), buffer);\n }, exports.inflate = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Inflate(opts), buffer, callback);\n }, exports.inflateSync = function(buffer, opts) {\n return zlibBufferSync(new Inflate(opts), buffer);\n }, exports.gunzip = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Gunzip(opts), buffer, callback);\n }, exports.gunzipSync = function(buffer, opts) {\n return zlibBufferSync(new Gunzip(opts), buffer);\n }, exports.inflateRaw = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new InflateRaw(opts), buffer, callback);\n }, exports.inflateRawSync = function(buffer, opts) {\n return zlibBufferSync(new InflateRaw(opts), buffer);\n }, exports.brotliCompress = function(buffer, opts, callback) {\n throw new Error(\"zlib.brotliCompress is not implemented\");\n };\n function zlibBuffer(engine, buffer, callback) {\n var buffers = [], nread = 0;\n engine.on(\"error\", onError), engine.on(\"end\", onEnd), engine.end(buffer), flow();\n function flow() {\n var chunk;\n while ((chunk = engine.read()) !== null)\n buffers.push(chunk), nread += chunk.length;\n engine.once(\"readable\", flow);\n }\n function onError(err) {\n engine.removeListener(\"end\", onEnd), engine.removeListener(\"readable\", flow), callback(err);\n }\n function onEnd() {\n var buf, err = null;\n if (nread >= kMaxLength)\n err = new RangeError(kRangeErrorMessage);\n else\n buf = Buffer2.concat(buffers, nread);\n buffers = [], engine.close(), callback(err, buf);\n }\n }\n function zlibBufferSync(engine, buffer) {\n if (typeof buffer === \"string\")\n buffer = Buffer2.from(buffer);\n if (!Buffer2.isBuffer(buffer))\n @throwTypeError(\"Not a string or buffer\");\n var flushFlag = engine._finishFlushFlag;\n return engine._processChunk(buffer, flushFlag);\n }\n function Deflate(opts) {\n if (!(this instanceof Deflate))\n return new Deflate(opts);\n Zlib.call(this, opts, binding.DEFLATE);\n }\n function Inflate(opts) {\n if (!(this instanceof Inflate))\n return new Inflate(opts);\n Zlib.call(this, opts, binding.INFLATE);\n }\n function Gzip(opts) {\n if (!(this instanceof Gzip))\n return new Gzip(opts);\n Zlib.call(this, opts, binding.GZIP);\n }\n function Gunzip(opts) {\n if (!(this instanceof Gunzip))\n return new Gunzip(opts);\n Zlib.call(this, opts, binding.GUNZIP);\n }\n function DeflateRaw(opts) {\n if (!(this instanceof DeflateRaw))\n return new DeflateRaw(opts);\n Zlib.call(this, opts, binding.DEFLATERAW);\n }\n function InflateRaw(opts) {\n if (!(this instanceof InflateRaw))\n return new InflateRaw(opts);\n Zlib.call(this, opts, binding.INFLATERAW);\n }\n function Unzip(opts) {\n if (!(this instanceof Unzip))\n return new Unzip(opts);\n Zlib.call(this, opts, binding.UNZIP);\n }\n function isValidFlushFlag(flag) {\n return flag === binding.Z_NO_FLUSH || flag === binding.Z_PARTIAL_FLUSH || flag === binding.Z_SYNC_FLUSH || flag === binding.Z_FULL_FLUSH || flag === binding.Z_FINISH || flag === binding.Z_BLOCK;\n }\n function Zlib(opts, mode) {\n var _this = this;\n if (this._opts = opts = opts || {}, this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK, Transform.call(this, opts), opts.flush && !isValidFlushFlag(opts.flush))\n throw new Error(\"Invalid flush flag: \" + opts.flush);\n if (opts.finishFlush && !isValidFlushFlag(opts.finishFlush))\n throw new Error(\"Invalid flush flag: \" + opts.finishFlush);\n if (this._flushFlag = opts.flush || binding.Z_NO_FLUSH, this._finishFlushFlag = typeof opts.finishFlush !== \"undefined\" \? opts.finishFlush : binding.Z_FINISH, opts.chunkSize) {\n if (opts.chunkSize < exports.Z_MIN_CHUNK || opts.chunkSize > exports.Z_MAX_CHUNK)\n throw new Error(\"Invalid chunk size: \" + opts.chunkSize);\n }\n if (opts.windowBits) {\n if (opts.windowBits < exports.Z_MIN_WINDOWBITS || opts.windowBits > exports.Z_MAX_WINDOWBITS)\n throw new Error(\"Invalid windowBits: \" + opts.windowBits);\n }\n if (opts.level) {\n if (opts.level < exports.Z_MIN_LEVEL || opts.level > exports.Z_MAX_LEVEL)\n throw new Error(\"Invalid compression level: \" + opts.level);\n }\n if (opts.memLevel) {\n if (opts.memLevel < exports.Z_MIN_MEMLEVEL || opts.memLevel > exports.Z_MAX_MEMLEVEL)\n throw new Error(\"Invalid memLevel: \" + opts.memLevel);\n }\n if (opts.strategy) {\n if (opts.strategy != exports.Z_FILTERED && opts.strategy != exports.Z_HUFFMAN_ONLY && opts.strategy != exports.Z_RLE && opts.strategy != exports.Z_FIXED && opts.strategy != exports.Z_DEFAULT_STRATEGY)\n throw new Error(\"Invalid strategy: \" + opts.strategy);\n }\n if (opts.dictionary) {\n if (!Buffer2.isBuffer(opts.dictionary))\n throw new Error(\"Invalid dictionary: it should be a Buffer instance\");\n }\n this._handle = new binding.Zlib(mode);\n var self = this;\n this._hadError = !1, this._handle.onerror = function(message, errno) {\n _close(self), self._hadError = !0;\n var error = new Error(message);\n error.errno = errno, error.code = exports.codes[errno], self.emit(\"error\", error);\n };\n var level = exports.Z_DEFAULT_COMPRESSION;\n if (typeof opts.level === \"number\")\n level = opts.level;\n var strategy = exports.Z_DEFAULT_STRATEGY;\n if (typeof opts.strategy === \"number\")\n strategy = opts.strategy;\n this._handle.init(opts.windowBits || exports.Z_DEFAULT_WINDOWBITS, level, opts.memLevel || exports.Z_DEFAULT_MEMLEVEL, strategy, opts.dictionary), this._buffer = Buffer2.allocUnsafe(this._chunkSize), this._offset = 0, this._level = level, this._strategy = strategy, this.once(\"end\", this.close), Object.defineProperty(this, \"_closed\", {\n get: function() {\n return !_this._handle;\n },\n configurable: !0,\n enumerable: !0\n });\n }\n util.inherits(Zlib, Transform), Zlib.prototype.params = function(level, strategy, callback) {\n if (level < exports.Z_MIN_LEVEL || level > exports.Z_MAX_LEVEL)\n @throwRangeError(\"Invalid compression level: \" + level);\n if (strategy != exports.Z_FILTERED && strategy != exports.Z_HUFFMAN_ONLY && strategy != exports.Z_RLE && strategy != exports.Z_FIXED && strategy != exports.Z_DEFAULT_STRATEGY)\n @throwTypeError(\"Invalid strategy: \" + strategy);\n if (this._level !== level || this._strategy !== strategy) {\n var self = this;\n this.flush(binding.Z_SYNC_FLUSH, function() {\n if (assert(self._handle, \"zlib binding closed\"), self._handle.params(level, strategy), !self._hadError) {\n if (self._level = level, self._strategy = strategy, callback)\n callback();\n }\n });\n } else\n process.nextTick(callback);\n }, Zlib.prototype.reset = function() {\n return assert(this._handle, \"zlib binding closed\"), this._handle.reset();\n }, Zlib.prototype._flush = function(callback) {\n this._transform(Buffer2.alloc(0), \"\", callback);\n }, Zlib.prototype.flush = function(kind, callback) {\n var _this2 = this, ws = this._writableState;\n if (typeof kind === \"function\" || kind === void 0 && !callback)\n callback = kind, kind = binding.Z_FULL_FLUSH;\n if (ws.ended) {\n if (callback)\n process.nextTick(callback);\n } else if (ws.ending) {\n if (callback)\n this.once(\"end\", callback);\n } else if (ws.needDrain) {\n if (callback)\n this.once(\"drain\", function() {\n return _this2.flush(kind, callback);\n });\n } else\n this._flushFlag = kind, this.write(Buffer2.alloc(0), \"\", callback);\n }, Zlib.prototype.close = function(callback) {\n _close(this, callback), process.nextTick(emitCloseNT, this);\n };\n function _close(engine, callback) {\n if (callback)\n process.nextTick(callback);\n if (!engine._handle)\n return;\n engine._handle.close(), engine._handle = null;\n }\n function emitCloseNT(self) {\n self.emit(\"close\");\n }\n Zlib.prototype._transform = function(chunk, encoding, cb) {\n var flushFlag, ws = this._writableState, ending = ws.ending || ws.ended, last = ending && (!chunk || ws.length === chunk.length);\n if (chunk !== null && !Buffer2.isBuffer(chunk))\n return cb(new Error(\"invalid input\"));\n if (!this._handle)\n return cb(new Error(\"zlib binding closed\"));\n if (last)\n flushFlag = this._finishFlushFlag;\n else if (flushFlag = this._flushFlag, chunk.length >= ws.length)\n this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH;\n this._processChunk(chunk, flushFlag, cb);\n }, Zlib.prototype._processChunk = function(chunk, flushFlag, cb) {\n var availInBefore = chunk && chunk.length, availOutBefore = this._chunkSize - this._offset, inOff = 0, self = this, async = typeof cb === \"function\";\n if (!async) {\n var buffers = [], nread = 0, error;\n this.on(\"error\", function(er) {\n error = er;\n }), assert(this._handle, \"zlib binding closed\");\n do\n var res = this._handle.writeSync(flushFlag, chunk, inOff, availInBefore, this._buffer, this._offset, availOutBefore);\n while (!this._hadError && callback(res[0], res[1]));\n if (this._hadError)\n throw error;\n if (nread >= kMaxLength)\n _close(this), @throwRangeError(kRangeErrorMessage);\n var buf = Buffer2.concat(buffers, nread);\n return _close(this), buf;\n }\n assert(this._handle, \"zlib binding closed\");\n var req = this._handle.write(flushFlag, chunk, inOff, availInBefore, this._buffer, this._offset, availOutBefore);\n req.buffer = chunk, req.callback = callback;\n function callback(availInAfter, availOutAfter) {\n if (this)\n this.buffer = null, this.callback = null;\n if (self._hadError)\n return;\n var have = availOutBefore - availOutAfter;\n if (assert(have >= 0, \"have should not go down\"), have > 0) {\n var out = self._buffer.slice(self._offset, self._offset + have);\n if (self._offset += have, async)\n self.push(out);\n else\n buffers.push(out), nread += out.length;\n }\n if (availOutAfter === 0 || self._offset >= self._chunkSize)\n availOutBefore = self._chunkSize, self._offset = 0, self._buffer = Buffer2.allocUnsafe(self._chunkSize);\n if (availOutAfter === 0) {\n if (inOff += availInBefore - availInAfter, availInBefore = availInAfter, !async)\n return !0;\n var newReq = self._handle.write(flushFlag, chunk, inOff, availInBefore, self._buffer, self._offset, self._chunkSize);\n newReq.callback = callback, newReq.buffer = chunk;\n return;\n }\n if (!async)\n return !1;\n cb();\n }\n }, util.inherits(Deflate, Zlib), util.inherits(Inflate, Zlib), util.inherits(Gzip, Zlib), util.inherits(Gunzip, Zlib), util.inherits(DeflateRaw, Zlib), util.inherits(InflateRaw, Zlib), util.inherits(Unzip, Zlib);\n }\n});\nreturn require_lib()})\n"_s;
+static constexpr ASCIILiteral NodeZlibCode = "(function (){\"use strict\";// src/js/out/tmp/node/zlib.ts\nvar assert = @getInternalField(@internalModuleRegistry, 4) || @createInternalModuleById(4), BufferModule = @requireNativeModule(\"node:buffer\"), StreamModule = @getInternalField(@internalModuleRegistry, 35) || @createInternalModuleById(35), Util = @getInternalField(@internalModuleRegistry, 44) || @createInternalModuleById(44), __getOwnPropNames = Object.getOwnPropertyNames, __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n}, require_zstream = __commonJS({\n \"node_modules/pako/lib/zlib/zstream.js\"(exports, module2) {\n function ZStream() {\n this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = \"\", this.state = null, this.data_type = 2, this.adler = 0;\n }\n module2.exports = ZStream;\n }\n}), require_common = __commonJS({\n \"node_modules/pako/lib/utils/common.js\"(exports) {\n var TYPED_OK = typeof Uint8Array !== \"undefined\" && typeof Uint16Array !== \"undefined\" && typeof Int32Array !== \"undefined\";\n function _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n }\n exports.assign = function(obj) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source)\n continue;\n if (typeof source !== \"object\")\n @throwTypeError(source + \"must be non-object\");\n for (var p in source)\n if (_has(source, p))\n obj[p] = source[p];\n }\n return obj;\n }, exports.shrinkBuf = function(buf, size) {\n if (buf.length === size)\n return buf;\n if (buf.subarray)\n return buf.subarray(0, size);\n return buf.length = size, buf;\n };\n var fnTyped = {\n arraySet: function(dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n for (var i = 0;i < len; i++)\n dest[dest_offs + i] = src[src_offs + i];\n },\n flattenChunks: function(chunks) {\n var i, l, len, pos, chunk, result;\n len = 0;\n for (i = 0, l = chunks.length;i < l; i++)\n len += chunks[i].length;\n result = new Uint8Array(len), pos = 0;\n for (i = 0, l = chunks.length;i < l; i++)\n chunk = chunks[i], result.set(chunk, pos), pos += chunk.length;\n return result;\n }\n }, fnUntyped = {\n arraySet: function(dest, src, src_offs, len, dest_offs) {\n for (var i = 0;i < len; i++)\n dest[dest_offs + i] = src[src_offs + i];\n },\n flattenChunks: function(chunks) {\n return [].concat.apply([], chunks);\n }\n };\n exports.setTyped = function(on) {\n if (on)\n exports.Buf8 = Uint8Array, exports.Buf16 = Uint16Array, exports.Buf32 = Int32Array, exports.assign(exports, fnTyped);\n else\n exports.Buf8 = Array, exports.Buf16 = Array, exports.Buf32 = Array, exports.assign(exports, fnUntyped);\n }, exports.setTyped(TYPED_OK);\n }\n}), require_trees = __commonJS({\n \"node_modules/pako/lib/zlib/trees.js\"(exports) {\n var utils = require_common(), Z_FIXED = 4, Z_BINARY = 0, Z_TEXT = 1, Z_UNKNOWN = 2;\n function zero(buf) {\n var len = buf.length;\n while (--len >= 0)\n buf[len] = 0;\n }\n var STORED_BLOCK = 0, STATIC_TREES = 1, DYN_TREES = 2, MIN_MATCH = 3, MAX_MATCH = 258, LENGTH_CODES = 29, LITERALS = 256, L_CODES = LITERALS + 1 + LENGTH_CODES, D_CODES = 30, BL_CODES = 19, HEAP_SIZE = 2 * L_CODES + 1, MAX_BITS = 15, Buf_size = 16, MAX_BL_BITS = 7, END_BLOCK = 256, REP_3_6 = 16, REPZ_3_10 = 17, REPZ_11_138 = 18, extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], extra_dbits = [\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 2,\n 2,\n 3,\n 3,\n 4,\n 4,\n 5,\n 5,\n 6,\n 6,\n 7,\n 7,\n 8,\n 8,\n 9,\n 9,\n 10,\n 10,\n 11,\n 11,\n 12,\n 12,\n 13,\n 13\n ], extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], DIST_CODE_LEN = 512, static_ltree = new Array((L_CODES + 2) * 2);\n zero(static_ltree);\n var static_dtree = new Array(D_CODES * 2);\n zero(static_dtree);\n var _dist_code = new Array(DIST_CODE_LEN);\n zero(_dist_code);\n var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\n zero(_length_code);\n var base_length = new Array(LENGTH_CODES);\n zero(base_length);\n var base_dist = new Array(D_CODES);\n zero(base_dist);\n function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n this.static_tree = static_tree, this.extra_bits = extra_bits, this.extra_base = extra_base, this.elems = elems, this.max_length = max_length, this.has_stree = static_tree && static_tree.length;\n }\n var static_l_desc, static_d_desc, static_bl_desc;\n function TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree, this.max_code = 0, this.stat_desc = stat_desc;\n }\n function d_code(dist) {\n return dist < 256 \? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n }\n function put_short(s, w) {\n s.pending_buf[s.pending++] = w & 255, s.pending_buf[s.pending++] = w >>> 8 & 255;\n }\n function send_bits(s, value, length) {\n if (s.bi_valid > Buf_size - length)\n s.bi_buf |= value << s.bi_valid & 65535, put_short(s, s.bi_buf), s.bi_buf = value >> Buf_size - s.bi_valid, s.bi_valid += length - Buf_size;\n else\n s.bi_buf |= value << s.bi_valid & 65535, s.bi_valid += length;\n }\n function send_code(s, c, tree) {\n send_bits(s, tree[c * 2], tree[c * 2 + 1]);\n }\n function bi_reverse(code, len) {\n var res = 0;\n do\n res |= code & 1, code >>>= 1, res <<= 1;\n while (--len > 0);\n return res >>> 1;\n }\n function bi_flush(s) {\n if (s.bi_valid === 16)\n put_short(s, s.bi_buf), s.bi_buf = 0, s.bi_valid = 0;\n else if (s.bi_valid >= 8)\n s.pending_buf[s.pending++] = s.bi_buf & 255, s.bi_buf >>= 8, s.bi_valid -= 8;\n }\n function gen_bitlen(s, desc) {\n var { dyn_tree: tree, max_code } = desc, stree = desc.stat_desc.static_tree, has_stree = desc.stat_desc.has_stree, extra = desc.stat_desc.extra_bits, base = desc.stat_desc.extra_base, max_length = desc.stat_desc.max_length, h, n, m, bits, xbits, f, overflow = 0;\n for (bits = 0;bits <= MAX_BITS; bits++)\n s.bl_count[bits] = 0;\n tree[s.heap[s.heap_max] * 2 + 1] = 0;\n for (h = s.heap_max + 1;h < HEAP_SIZE; h++) {\n if (n = s.heap[h], bits = tree[tree[n * 2 + 1] * 2 + 1] + 1, bits > max_length)\n bits = max_length, overflow++;\n if (tree[n * 2 + 1] = bits, n > max_code)\n continue;\n if (s.bl_count[bits]++, xbits = 0, n >= base)\n xbits = extra[n - base];\n if (f = tree[n * 2], s.opt_len += f * (bits + xbits), has_stree)\n s.static_len += f * (stree[n * 2 + 1] + xbits);\n }\n if (overflow === 0)\n return;\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0)\n bits--;\n s.bl_count[bits]--, s.bl_count[bits + 1] += 2, s.bl_count[max_length]--, overflow -= 2;\n } while (overflow > 0);\n for (bits = max_length;bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n if (m = s.heap[--h], m > max_code)\n continue;\n if (tree[m * 2 + 1] !== bits)\n s.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2], tree[m * 2 + 1] = bits;\n n--;\n }\n }\n }\n function gen_codes(tree, max_code, bl_count) {\n var next_code = new Array(MAX_BITS + 1), code = 0, bits, n;\n for (bits = 1;bits <= MAX_BITS; bits++)\n next_code[bits] = code = code + bl_count[bits - 1] << 1;\n for (n = 0;n <= max_code; n++) {\n var len = tree[n * 2 + 1];\n if (len === 0)\n continue;\n tree[n * 2] = bi_reverse(next_code[len]++, len);\n }\n }\n function tr_static_init() {\n var n, bits, length, code, dist, bl_count = new Array(MAX_BITS + 1);\n length = 0;\n for (code = 0;code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0;n < 1 << extra_lbits[code]; n++)\n _length_code[length++] = code;\n }\n _length_code[length - 1] = code, dist = 0;\n for (code = 0;code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0;n < 1 << extra_dbits[code]; n++)\n _dist_code[dist++] = code;\n }\n dist >>= 7;\n for (;code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0;n < 1 << extra_dbits[code] - 7; n++)\n _dist_code[256 + dist++] = code;\n }\n for (bits = 0;bits <= MAX_BITS; bits++)\n bl_count[bits] = 0;\n n = 0;\n while (n <= 143)\n static_ltree[n * 2 + 1] = 8, n++, bl_count[8]++;\n while (n <= 255)\n static_ltree[n * 2 + 1] = 9, n++, bl_count[9]++;\n while (n <= 279)\n static_ltree[n * 2 + 1] = 7, n++, bl_count[7]++;\n while (n <= 287)\n static_ltree[n * 2 + 1] = 8, n++, bl_count[8]++;\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n for (n = 0;n < D_CODES; n++)\n static_dtree[n * 2 + 1] = 5, static_dtree[n * 2] = bi_reverse(n, 5);\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS), static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS), static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n }\n function init_block(s) {\n var n;\n for (n = 0;n < L_CODES; n++)\n s.dyn_ltree[n * 2] = 0;\n for (n = 0;n < D_CODES; n++)\n s.dyn_dtree[n * 2] = 0;\n for (n = 0;n < BL_CODES; n++)\n s.bl_tree[n * 2] = 0;\n s.dyn_ltree[END_BLOCK * 2] = 1, s.opt_len = s.static_len = 0, s.last_lit = s.matches = 0;\n }\n function bi_windup(s) {\n if (s.bi_valid > 8)\n put_short(s, s.bi_buf);\n else if (s.bi_valid > 0)\n s.pending_buf[s.pending++] = s.bi_buf;\n s.bi_buf = 0, s.bi_valid = 0;\n }\n function copy_block(s, buf, len, header) {\n if (bi_windup(s), header)\n put_short(s, len), put_short(s, ~len);\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending), s.pending += len;\n }\n function smaller(tree, n, m, depth) {\n var _n2 = n * 2, _m2 = m * 2;\n return tree[_n2] < tree[_m2] || tree[_n2] === tree[_m2] && depth[n] <= depth[m];\n }\n function pqdownheap(s, tree, k) {\n var v = s.heap[k], j = k << 1;\n while (j <= s.heap_len) {\n if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth))\n j++;\n if (smaller(tree, v, s.heap[j], s.depth))\n break;\n s.heap[k] = s.heap[j], k = j, j <<= 1;\n }\n s.heap[k] = v;\n }\n function compress_block(s, ltree, dtree) {\n var dist, lc, lx = 0, code, extra;\n if (s.last_lit !== 0)\n do\n if (dist = s.pending_buf[s.d_buf + lx * 2] << 8 | s.pending_buf[s.d_buf + lx * 2 + 1], lc = s.pending_buf[s.l_buf + lx], lx++, dist === 0)\n send_code(s, lc, ltree);\n else {\n if (code = _length_code[lc], send_code(s, code + LITERALS + 1, ltree), extra = extra_lbits[code], extra !== 0)\n lc -= base_length[code], send_bits(s, lc, extra);\n if (dist--, code = d_code(dist), send_code(s, code, dtree), extra = extra_dbits[code], extra !== 0)\n dist -= base_dist[code], send_bits(s, dist, extra);\n }\n while (lx < s.last_lit);\n send_code(s, END_BLOCK, ltree);\n }\n function build_tree(s, desc) {\n var tree = desc.dyn_tree, stree = desc.stat_desc.static_tree, has_stree = desc.stat_desc.has_stree, elems = desc.stat_desc.elems, n, m, max_code = -1, node;\n s.heap_len = 0, s.heap_max = HEAP_SIZE;\n for (n = 0;n < elems; n++)\n if (tree[n * 2] !== 0)\n s.heap[++s.heap_len] = max_code = n, s.depth[n] = 0;\n else\n tree[n * 2 + 1] = 0;\n while (s.heap_len < 2)\n if (node = s.heap[++s.heap_len] = max_code < 2 \? ++max_code : 0, tree[node * 2] = 1, s.depth[node] = 0, s.opt_len--, has_stree)\n s.static_len -= stree[node * 2 + 1];\n desc.max_code = max_code;\n for (n = s.heap_len >> 1;n >= 1; n--)\n pqdownheap(s, tree, n);\n node = elems;\n do\n n = s.heap[1], s.heap[1] = s.heap[s.heap_len--], pqdownheap(s, tree, 1), m = s.heap[1], s.heap[--s.heap_max] = n, s.heap[--s.heap_max] = m, tree[node * 2] = tree[n * 2] + tree[m * 2], s.depth[node] = (s.depth[n] >= s.depth[m] \? s.depth[n] : s.depth[m]) + 1, tree[n * 2 + 1] = tree[m * 2 + 1] = node, s.heap[1] = node++, pqdownheap(s, tree, 1);\n while (s.heap_len >= 2);\n s.heap[--s.heap_max] = s.heap[1], gen_bitlen(s, desc), gen_codes(tree, max_code, s.bl_count);\n }\n function scan_tree(s, tree, max_code) {\n var n, prevlen = -1, curlen, nextlen = tree[1], count = 0, max_count = 7, min_count = 4;\n if (nextlen === 0)\n max_count = 138, min_count = 3;\n tree[(max_code + 1) * 2 + 1] = 65535;\n for (n = 0;n <= max_code; n++) {\n if (curlen = nextlen, nextlen = tree[(n + 1) * 2 + 1], ++count < max_count && curlen === nextlen)\n continue;\n else if (count < min_count)\n s.bl_tree[curlen * 2] += count;\n else if (curlen !== 0) {\n if (curlen !== prevlen)\n s.bl_tree[curlen * 2]++;\n s.bl_tree[REP_3_6 * 2]++;\n } else if (count <= 10)\n s.bl_tree[REPZ_3_10 * 2]++;\n else\n s.bl_tree[REPZ_11_138 * 2]++;\n if (count = 0, prevlen = curlen, nextlen === 0)\n max_count = 138, min_count = 3;\n else if (curlen === nextlen)\n max_count = 6, min_count = 3;\n else\n max_count = 7, min_count = 4;\n }\n }\n function send_tree(s, tree, max_code) {\n var n, prevlen = -1, curlen, nextlen = tree[1], count = 0, max_count = 7, min_count = 4;\n if (nextlen === 0)\n max_count = 138, min_count = 3;\n for (n = 0;n <= max_code; n++) {\n if (curlen = nextlen, nextlen = tree[(n + 1) * 2 + 1], ++count < max_count && curlen === nextlen)\n continue;\n else if (count < min_count)\n do\n send_code(s, curlen, s.bl_tree);\n while (--count !== 0);\n else if (curlen !== 0) {\n if (curlen !== prevlen)\n send_code(s, curlen, s.bl_tree), count--;\n send_code(s, REP_3_6, s.bl_tree), send_bits(s, count - 3, 2);\n } else if (count <= 10)\n send_code(s, REPZ_3_10, s.bl_tree), send_bits(s, count - 3, 3);\n else\n send_code(s, REPZ_11_138, s.bl_tree), send_bits(s, count - 11, 7);\n if (count = 0, prevlen = curlen, nextlen === 0)\n max_count = 138, min_count = 3;\n else if (curlen === nextlen)\n max_count = 6, min_count = 3;\n else\n max_count = 7, min_count = 4;\n }\n }\n function build_bl_tree(s) {\n var max_blindex;\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code), scan_tree(s, s.dyn_dtree, s.d_desc.max_code), build_tree(s, s.bl_desc);\n for (max_blindex = BL_CODES - 1;max_blindex >= 3; max_blindex--)\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1] !== 0)\n break;\n return s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4, max_blindex;\n }\n function send_all_trees(s, lcodes, dcodes, blcodes) {\n var rank;\n send_bits(s, lcodes - 257, 5), send_bits(s, dcodes - 1, 5), send_bits(s, blcodes - 4, 4);\n for (rank = 0;rank < blcodes; rank++)\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1], 3);\n send_tree(s, s.dyn_ltree, lcodes - 1), send_tree(s, s.dyn_dtree, dcodes - 1);\n }\n function detect_data_type(s) {\n var black_mask = 4093624447, n;\n for (n = 0;n <= 31; n++, black_mask >>>= 1)\n if (black_mask & 1 && s.dyn_ltree[n * 2] !== 0)\n return Z_BINARY;\n if (s.dyn_ltree[18] !== 0 || s.dyn_ltree[20] !== 0 || s.dyn_ltree[26] !== 0)\n return Z_TEXT;\n for (n = 32;n < LITERALS; n++)\n if (s.dyn_ltree[n * 2] !== 0)\n return Z_TEXT;\n return Z_BINARY;\n }\n var static_init_done = !1;\n function _tr_init(s) {\n if (!static_init_done)\n tr_static_init(), static_init_done = !0;\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc), s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc), s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc), s.bi_buf = 0, s.bi_valid = 0, init_block(s);\n }\n function _tr_stored_block(s, buf, stored_len, last) {\n send_bits(s, (STORED_BLOCK << 1) + (last \? 1 : 0), 3), copy_block(s, buf, stored_len, !0);\n }\n function _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3), send_code(s, END_BLOCK, static_ltree), bi_flush(s);\n }\n function _tr_flush_block(s, buf, stored_len, last) {\n var opt_lenb, static_lenb, max_blindex = 0;\n if (s.level > 0) {\n if (s.strm.data_type === Z_UNKNOWN)\n s.strm.data_type = detect_data_type(s);\n if (build_tree(s, s.l_desc), build_tree(s, s.d_desc), max_blindex = build_bl_tree(s), opt_lenb = s.opt_len + 3 + 7 >>> 3, static_lenb = s.static_len + 3 + 7 >>> 3, static_lenb <= opt_lenb)\n opt_lenb = static_lenb;\n } else\n opt_lenb = static_lenb = stored_len + 5;\n if (stored_len + 4 <= opt_lenb && buf !== -1)\n _tr_stored_block(s, buf, stored_len, last);\n else if (s.strategy === Z_FIXED || static_lenb === opt_lenb)\n send_bits(s, (STATIC_TREES << 1) + (last \? 1 : 0), 3), compress_block(s, static_ltree, static_dtree);\n else\n send_bits(s, (DYN_TREES << 1) + (last \? 1 : 0), 3), send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1), compress_block(s, s.dyn_ltree, s.dyn_dtree);\n if (init_block(s), last)\n bi_windup(s);\n }\n function _tr_tally(s, dist, lc) {\n if (s.pending_buf[s.d_buf + s.last_lit * 2] = dist >>> 8 & 255, s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 255, s.pending_buf[s.l_buf + s.last_lit] = lc & 255, s.last_lit++, dist === 0)\n s.dyn_ltree[lc * 2]++;\n else\n s.matches++, dist--, s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]++, s.dyn_dtree[d_code(dist) * 2]++;\n return s.last_lit === s.lit_bufsize - 1;\n }\n exports._tr_init = _tr_init, exports._tr_stored_block = _tr_stored_block, exports._tr_flush_block = _tr_flush_block, exports._tr_tally = _tr_tally, exports._tr_align = _tr_align;\n }\n}), require_adler32 = __commonJS({\n \"node_modules/pako/lib/zlib/adler32.js\"(exports, module2) {\n function adler32(adler, buf, len, pos) {\n var s1 = adler & 65535 | 0, s2 = adler >>> 16 & 65535 | 0, n = 0;\n while (len !== 0) {\n n = len > 2000 \? 2000 : len, len -= n;\n do\n s1 = s1 + buf[pos++] | 0, s2 = s2 + s1 | 0;\n while (--n);\n s1 %= 65521, s2 %= 65521;\n }\n return s1 | s2 << 16 | 0;\n }\n module2.exports = adler32;\n }\n}), require_crc32 = __commonJS({\n \"node_modules/pako/lib/zlib/crc32.js\"(exports, module2) {\n function makeTable() {\n var c, table = [];\n for (var n = 0;n < 256; n++) {\n c = n;\n for (var k = 0;k < 8; k++)\n c = c & 1 \? 3988292384 ^ c >>> 1 : c >>> 1;\n table[n] = c;\n }\n return table;\n }\n var crcTable = makeTable();\n function crc32(crc, buf, len, pos) {\n var t = crcTable, end = pos + len;\n crc ^= -1;\n for (var i = pos;i < end; i++)\n crc = crc >>> 8 ^ t[(crc ^ buf[i]) & 255];\n return crc ^ -1;\n }\n module2.exports = crc32;\n }\n}), require_messages = __commonJS({\n \"node_modules/pako/lib/zlib/messages.js\"(exports, module2) {\n module2.exports = {\n 2: \"need dictionary\",\n 1: \"stream end\",\n 0: \"\",\n \"-1\": \"file error\",\n \"-2\": \"stream error\",\n \"-3\": \"data error\",\n \"-4\": \"insufficient memory\",\n \"-5\": \"buffer error\",\n \"-6\": \"incompatible version\"\n };\n }\n}), require_deflate = __commonJS({\n \"node_modules/pako/lib/zlib/deflate.js\"(exports) {\n var utils = require_common(), trees = require_trees(), adler32 = require_adler32(), crc32 = require_crc32(), msg = require_messages(), Z_NO_FLUSH = 0, Z_PARTIAL_FLUSH = 1, Z_FULL_FLUSH = 3, Z_FINISH = 4, Z_BLOCK = 5, Z_OK = 0, Z_STREAM_END = 1, Z_STREAM_ERROR = -2, Z_DATA_ERROR = -3, Z_BUF_ERROR = -5, Z_DEFAULT_COMPRESSION = -1, Z_FILTERED = 1, Z_HUFFMAN_ONLY = 2, Z_RLE = 3, Z_FIXED = 4, Z_DEFAULT_STRATEGY = 0, Z_UNKNOWN = 2, Z_DEFLATED = 8, MAX_MEM_LEVEL = 9, MAX_WBITS = 15, DEF_MEM_LEVEL = 8, LENGTH_CODES = 29, LITERALS = 256, L_CODES = LITERALS + 1 + LENGTH_CODES, D_CODES = 30, BL_CODES = 19, HEAP_SIZE = 2 * L_CODES + 1, MAX_BITS = 15, MIN_MATCH = 3, MAX_MATCH = 258, MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1, PRESET_DICT = 32, INIT_STATE = 42, EXTRA_STATE = 69, NAME_STATE = 73, COMMENT_STATE = 91, HCRC_STATE = 103, BUSY_STATE = 113, FINISH_STATE = 666, BS_NEED_MORE = 1, BS_BLOCK_DONE = 2, BS_FINISH_STARTED = 3, BS_FINISH_DONE = 4, OS_CODE = 3;\n function err(strm, errorCode) {\n return strm.msg = msg[errorCode], errorCode;\n }\n function rank(f) {\n return (f << 1) - (f > 4 \? 9 : 0);\n }\n function zero(buf) {\n var len = buf.length;\n while (--len >= 0)\n buf[len] = 0;\n }\n function flush_pending(strm) {\n var s = strm.state, len = s.pending;\n if (len > strm.avail_out)\n len = strm.avail_out;\n if (len === 0)\n return;\n if (utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out), strm.next_out += len, s.pending_out += len, strm.total_out += len, strm.avail_out -= len, s.pending -= len, s.pending === 0)\n s.pending_out = 0;\n }\n function flush_block_only(s, last) {\n trees._tr_flush_block(s, s.block_start >= 0 \? s.block_start : -1, s.strstart - s.block_start, last), s.block_start = s.strstart, flush_pending(s.strm);\n }\n function put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n }\n function putShortMSB(s, b) {\n s.pending_buf[s.pending++] = b >>> 8 & 255, s.pending_buf[s.pending++] = b & 255;\n }\n function read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n if (len > size)\n len = size;\n if (len === 0)\n return 0;\n if (strm.avail_in -= len, utils.arraySet(buf, strm.input, strm.next_in, len, start), strm.state.wrap === 1)\n strm.adler = adler32(strm.adler, buf, len, start);\n else if (strm.state.wrap === 2)\n strm.adler = crc32(strm.adler, buf, len, start);\n return strm.next_in += len, strm.total_in += len, len;\n }\n function longest_match(s, cur_match) {\n var { max_chain_length: chain_length, strstart: scan } = s, match, len, best_len = s.prev_length, nice_match = s.nice_match, limit = s.strstart > s.w_size - MIN_LOOKAHEAD \? s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0, _win = s.window, wmask = s.w_mask, prev = s.prev, strend = s.strstart + MAX_MATCH, scan_end1 = _win[scan + best_len - 1], scan_end = _win[scan + best_len];\n if (s.prev_length >= s.good_match)\n chain_length >>= 2;\n if (nice_match > s.lookahead)\n nice_match = s.lookahead;\n do {\n if (match = cur_match, _win[match + best_len] !== scan_end || _win[match + best_len - 1] !== scan_end1 || _win[match] !== _win[scan] || _win[++match] !== _win[scan + 1])\n continue;\n scan += 2, match++;\n do\n ;\n while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && scan < strend);\n if (len = MAX_MATCH - (strend - scan), scan = strend - MAX_MATCH, len > best_len) {\n if (s.match_start = cur_match, best_len = len, len >= nice_match)\n break;\n scan_end1 = _win[scan + best_len - 1], scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n if (best_len <= s.lookahead)\n return best_len;\n return s.lookahead;\n }\n function fill_window(s) {\n var _w_size = s.w_size, p, n, m, more, str;\n do {\n if (more = s.window_size - s.lookahead - s.strstart, s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0), s.match_start -= _w_size, s.strstart -= _w_size, s.block_start -= _w_size, n = s.hash_size, p = n;\n do\n m = s.head[--p], s.head[p] = m >= _w_size \? m - _w_size : 0;\n while (--n);\n n = _w_size, p = n;\n do\n m = s.prev[--p], s.prev[p] = m >= _w_size \? m - _w_size : 0;\n while (--n);\n more += _w_size;\n }\n if (s.strm.avail_in === 0)\n break;\n if (n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more), s.lookahead += n, s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert, s.ins_h = s.window[str], s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + 1]) & s.hash_mask;\n while (s.insert)\n if (s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask, s.prev[str & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = str, str++, s.insert--, s.lookahead + s.insert < MIN_MATCH)\n break;\n }\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n }\n function deflate_stored(s, flush) {\n var max_block_size = 65535;\n if (max_block_size > s.pending_buf_size - 5)\n max_block_size = s.pending_buf_size - 5;\n for (;; ) {\n if (s.lookahead <= 1) {\n if (fill_window(s), s.lookahead === 0 && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n s.strstart += s.lookahead, s.lookahead = 0;\n var max_start = s.block_start + max_block_size;\n if (s.strstart === 0 || s.strstart >= max_start) {\n if (s.lookahead = s.strstart - max_start, s.strstart = max_start, flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n if (s.strstart - s.block_start >= s.w_size - MIN_LOOKAHEAD) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = 0, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.strstart > s.block_start) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_NEED_MORE;\n }\n function deflate_fast(s, flush) {\n var hash_head, bflush;\n for (;; ) {\n if (s.lookahead < MIN_LOOKAHEAD) {\n if (fill_window(s), s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n if (hash_head = 0, s.lookahead >= MIN_MATCH)\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n if (hash_head !== 0 && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD)\n s.match_length = longest_match(s, hash_head);\n if (s.match_length >= MIN_MATCH)\n if (bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH), s.lookahead -= s.match_length, s.match_length <= s.max_lazy_match && s.lookahead >= MIN_MATCH) {\n s.match_length--;\n do\n s.strstart++, s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n while (--s.match_length !== 0);\n s.strstart++;\n } else\n s.strstart += s.match_length, s.match_length = 0, s.ins_h = s.window[s.strstart], s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + 1]) & s.hash_mask;\n else\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++;\n if (bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = s.strstart < MIN_MATCH - 1 \? s.strstart : MIN_MATCH - 1, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function deflate_slow(s, flush) {\n var hash_head, bflush, max_insert;\n for (;; ) {\n if (s.lookahead < MIN_LOOKAHEAD) {\n if (fill_window(s), s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n if (hash_head = 0, s.lookahead >= MIN_MATCH)\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n if (s.prev_length = s.match_length, s.prev_match = s.match_start, s.match_length = MIN_MATCH - 1, hash_head !== 0 && s.prev_length < s.max_lazy_match && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) {\n if (s.match_length = longest_match(s, hash_head), s.match_length <= 5 && (s.strategy === Z_FILTERED || s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096))\n s.match_length = MIN_MATCH - 1;\n }\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH, bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH), s.lookahead -= s.prev_length - 1, s.prev_length -= 2;\n do\n if (++s.strstart <= max_insert)\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n while (--s.prev_length !== 0);\n if (s.match_available = 0, s.match_length = MIN_MATCH - 1, s.strstart++, bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n } else if (s.match_available) {\n if (bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]), bflush)\n flush_block_only(s, !1);\n if (s.strstart++, s.lookahead--, s.strm.avail_out === 0)\n return BS_NEED_MORE;\n } else\n s.match_available = 1, s.strstart++, s.lookahead--;\n }\n if (s.match_available)\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]), s.match_available = 0;\n if (s.insert = s.strstart < MIN_MATCH - 1 \? s.strstart : MIN_MATCH - 1, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function deflate_rle(s, flush) {\n var bflush, prev, scan, strend, _win = s.window;\n for (;; ) {\n if (s.lookahead <= MAX_MATCH) {\n if (fill_window(s), s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n if (s.match_length = 0, s.lookahead >= MIN_MATCH && s.strstart > 0) {\n if (scan = s.strstart - 1, prev = _win[scan], prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do\n ;\n while (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && scan < strend);\n if (s.match_length = MAX_MATCH - (strend - scan), s.match_length > s.lookahead)\n s.match_length = s.lookahead;\n }\n }\n if (s.match_length >= MIN_MATCH)\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH), s.lookahead -= s.match_length, s.strstart += s.match_length, s.match_length = 0;\n else\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++;\n if (bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = 0, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function deflate_huff(s, flush) {\n var bflush;\n for (;; ) {\n if (s.lookahead === 0) {\n if (fill_window(s), s.lookahead === 0) {\n if (flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n break;\n }\n }\n if (s.match_length = 0, bflush = trees._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++, bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = 0, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length, this.max_lazy = max_lazy, this.nice_length = nice_length, this.max_chain = max_chain, this.func = func;\n }\n var configuration_table = [\n new Config(0, 0, 0, 0, deflate_stored),\n new Config(4, 4, 8, 4, deflate_fast),\n new Config(4, 5, 16, 8, deflate_fast),\n new Config(4, 6, 32, 32, deflate_fast),\n new Config(4, 4, 16, 16, deflate_slow),\n new Config(8, 16, 32, 32, deflate_slow),\n new Config(8, 16, 128, 128, deflate_slow),\n new Config(8, 32, 128, 256, deflate_slow),\n new Config(32, 128, 258, 1024, deflate_slow),\n new Config(32, 258, 258, 4096, deflate_slow)\n ];\n function lm_init(s) {\n s.window_size = 2 * s.w_size, zero(s.head), s.max_lazy_match = configuration_table[s.level].max_lazy, s.good_match = configuration_table[s.level].good_length, s.nice_match = configuration_table[s.level].nice_length, s.max_chain_length = configuration_table[s.level].max_chain, s.strstart = 0, s.block_start = 0, s.lookahead = 0, s.insert = 0, s.match_length = s.prev_length = MIN_MATCH - 1, s.match_available = 0, s.ins_h = 0;\n }\n function DeflateState() {\n this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = Z_DEFLATED, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2), this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2), this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2), zero(this.dyn_ltree), zero(this.dyn_dtree), zero(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new utils.Buf16(MAX_BITS + 1), this.heap = new utils.Buf16(2 * L_CODES + 1), zero(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new utils.Buf16(2 * L_CODES + 1), zero(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;\n }\n function deflateResetKeep(strm) {\n var s;\n if (!strm || !strm.state)\n return err(strm, Z_STREAM_ERROR);\n if (strm.total_in = strm.total_out = 0, strm.data_type = Z_UNKNOWN, s = strm.state, s.pending = 0, s.pending_out = 0, s.wrap < 0)\n s.wrap = -s.wrap;\n return s.status = s.wrap \? INIT_STATE : BUSY_STATE, strm.adler = s.wrap === 2 \? 0 : 1, s.last_flush = Z_NO_FLUSH, trees._tr_init(s), Z_OK;\n }\n function deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK)\n lm_init(strm.state);\n return ret;\n }\n function deflateSetHeader(strm, head) {\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (strm.state.wrap !== 2)\n return Z_STREAM_ERROR;\n return strm.state.gzhead = head, Z_OK;\n }\n function deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm)\n return Z_STREAM_ERROR;\n var wrap = 1;\n if (level === Z_DEFAULT_COMPRESSION)\n level = 6;\n if (windowBits < 0)\n wrap = 0, windowBits = -windowBits;\n else if (windowBits > 15)\n wrap = 2, windowBits -= 16;\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED)\n return err(strm, Z_STREAM_ERROR);\n if (windowBits === 8)\n windowBits = 9;\n var s = new DeflateState;\n return strm.state = s, s.strm = strm, s.wrap = wrap, s.gzhead = null, s.w_bits = windowBits, s.w_size = 1 << s.w_bits, s.w_mask = s.w_size - 1, s.hash_bits = memLevel + 7, s.hash_size = 1 << s.hash_bits, s.hash_mask = s.hash_size - 1, s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH), s.window = new utils.Buf8(s.w_size * 2), s.head = new utils.Buf16(s.hash_size), s.prev = new utils.Buf16(s.w_size), s.lit_bufsize = 1 << memLevel + 6, s.pending_buf_size = s.lit_bufsize * 4, s.pending_buf = new utils.Buf8(s.pending_buf_size), s.d_buf = 1 * s.lit_bufsize, s.l_buf = 3 * s.lit_bufsize, s.level = level, s.strategy = strategy, s.method = method, deflateReset(strm);\n }\n function deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n }\n function deflate(strm, flush) {\n var old_flush, s, beg, val;\n if (!strm || !strm.state || flush > Z_BLOCK || flush < 0)\n return strm \? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n if (s = strm.state, !strm.output || !strm.input && strm.avail_in !== 0 || s.status === FINISH_STATE && flush !== Z_FINISH)\n return err(strm, strm.avail_out === 0 \? Z_BUF_ERROR : Z_STREAM_ERROR);\n if (s.strm = strm, old_flush = s.last_flush, s.last_flush = flush, s.status === INIT_STATE)\n if (s.wrap === 2)\n if (strm.adler = 0, put_byte(s, 31), put_byte(s, 139), put_byte(s, 8), !s.gzhead)\n put_byte(s, 0), put_byte(s, 0), put_byte(s, 0), put_byte(s, 0), put_byte(s, 0), put_byte(s, s.level === 9 \? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 \? 4 : 0), put_byte(s, OS_CODE), s.status = BUSY_STATE;\n else {\n if (put_byte(s, (s.gzhead.text \? 1 : 0) + (s.gzhead.hcrc \? 2 : 0) + (!s.gzhead.extra \? 0 : 4) + (!s.gzhead.name \? 0 : 8) + (!s.gzhead.comment \? 0 : 16)), put_byte(s, s.gzhead.time & 255), put_byte(s, s.gzhead.time >> 8 & 255), put_byte(s, s.gzhead.time >> 16 & 255), put_byte(s, s.gzhead.time >> 24 & 255), put_byte(s, s.level === 9 \? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 \? 4 : 0), put_byte(s, s.gzhead.os & 255), s.gzhead.extra && s.gzhead.extra.length)\n put_byte(s, s.gzhead.extra.length & 255), put_byte(s, s.gzhead.extra.length >> 8 & 255);\n if (s.gzhead.hcrc)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n s.gzindex = 0, s.status = EXTRA_STATE;\n }\n else {\n var header = Z_DEFLATED + (s.w_bits - 8 << 4) << 8, level_flags = -1;\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2)\n level_flags = 0;\n else if (s.level < 6)\n level_flags = 1;\n else if (s.level === 6)\n level_flags = 2;\n else\n level_flags = 3;\n if (header |= level_flags << 6, s.strstart !== 0)\n header |= PRESET_DICT;\n if (header += 31 - header % 31, s.status = BUSY_STATE, putShortMSB(s, header), s.strstart !== 0)\n putShortMSB(s, strm.adler >>> 16), putShortMSB(s, strm.adler & 65535);\n strm.adler = 1;\n }\n if (s.status === EXTRA_STATE)\n if (s.gzhead.extra) {\n beg = s.pending;\n while (s.gzindex < (s.gzhead.extra.length & 65535)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (flush_pending(strm), beg = s.pending, s.pending === s.pending_buf_size)\n break;\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 255), s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (s.gzindex === s.gzhead.extra.length)\n s.gzindex = 0, s.status = NAME_STATE;\n } else\n s.status = NAME_STATE;\n if (s.status === NAME_STATE)\n if (s.gzhead.name) {\n beg = s.pending;\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (flush_pending(strm), beg = s.pending, s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n if (s.gzindex < s.gzhead.name.length)\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 255;\n else\n val = 0;\n put_byte(s, val);\n } while (val !== 0);\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (val === 0)\n s.gzindex = 0, s.status = COMMENT_STATE;\n } else\n s.status = COMMENT_STATE;\n if (s.status === COMMENT_STATE)\n if (s.gzhead.comment) {\n beg = s.pending;\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (flush_pending(strm), beg = s.pending, s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n if (s.gzindex < s.gzhead.comment.length)\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 255;\n else\n val = 0;\n put_byte(s, val);\n } while (val !== 0);\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (val === 0)\n s.status = HCRC_STATE;\n } else\n s.status = HCRC_STATE;\n if (s.status === HCRC_STATE)\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size)\n flush_pending(strm);\n if (s.pending + 2 <= s.pending_buf_size)\n put_byte(s, strm.adler & 255), put_byte(s, strm.adler >> 8 & 255), strm.adler = 0, s.status = BUSY_STATE;\n } else\n s.status = BUSY_STATE;\n if (s.pending !== 0) {\n if (flush_pending(strm), strm.avail_out === 0)\n return s.last_flush = -1, Z_OK;\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && flush !== Z_FINISH)\n return err(strm, Z_BUF_ERROR);\n if (s.status === FINISH_STATE && strm.avail_in !== 0)\n return err(strm, Z_BUF_ERROR);\n if (strm.avail_in !== 0 || s.lookahead !== 0 || flush !== Z_NO_FLUSH && s.status !== FINISH_STATE) {\n var bstate = s.strategy === Z_HUFFMAN_ONLY \? deflate_huff(s, flush) : s.strategy === Z_RLE \? deflate_rle(s, flush) : configuration_table[s.level].func(s, flush);\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE)\n s.status = FINISH_STATE;\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0)\n s.last_flush = -1;\n return Z_OK;\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH)\n trees._tr_align(s);\n else if (flush !== Z_BLOCK) {\n if (trees._tr_stored_block(s, 0, 0, !1), flush === Z_FULL_FLUSH) {\n if (zero(s.head), s.lookahead === 0)\n s.strstart = 0, s.block_start = 0, s.insert = 0;\n }\n }\n if (flush_pending(strm), strm.avail_out === 0)\n return s.last_flush = -1, Z_OK;\n }\n }\n if (flush !== Z_FINISH)\n return Z_OK;\n if (s.wrap <= 0)\n return Z_STREAM_END;\n if (s.wrap === 2)\n put_byte(s, strm.adler & 255), put_byte(s, strm.adler >> 8 & 255), put_byte(s, strm.adler >> 16 & 255), put_byte(s, strm.adler >> 24 & 255), put_byte(s, strm.total_in & 255), put_byte(s, strm.total_in >> 8 & 255), put_byte(s, strm.total_in >> 16 & 255), put_byte(s, strm.total_in >> 24 & 255);\n else\n putShortMSB(s, strm.adler >>> 16), putShortMSB(s, strm.adler & 65535);\n if (flush_pending(strm), s.wrap > 0)\n s.wrap = -s.wrap;\n return s.pending !== 0 \? Z_OK : Z_STREAM_END;\n }\n function deflateEnd(strm) {\n var status;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (status = strm.state.status, status !== INIT_STATE && status !== EXTRA_STATE && status !== NAME_STATE && status !== COMMENT_STATE && status !== HCRC_STATE && status !== BUSY_STATE && status !== FINISH_STATE)\n return err(strm, Z_STREAM_ERROR);\n return strm.state = null, status === BUSY_STATE \? err(strm, Z_DATA_ERROR) : Z_OK;\n }\n function deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length, s, str, n, wrap, avail, next, input, tmpDict;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (s = strm.state, wrap = s.wrap, wrap === 2 || wrap === 1 && s.status !== INIT_STATE || s.lookahead)\n return Z_STREAM_ERROR;\n if (wrap === 1)\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n if (s.wrap = 0, dictLength >= s.w_size) {\n if (wrap === 0)\n zero(s.head), s.strstart = 0, s.block_start = 0, s.insert = 0;\n tmpDict = new utils.Buf8(s.w_size), utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0), dictionary = tmpDict, dictLength = s.w_size;\n }\n avail = strm.avail_in, next = strm.next_in, input = strm.input, strm.avail_in = dictLength, strm.next_in = 0, strm.input = dictionary, fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart, n = s.lookahead - (MIN_MATCH - 1);\n do\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask, s.prev[str & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = str, str++;\n while (--n);\n s.strstart = str, s.lookahead = MIN_MATCH - 1, fill_window(s);\n }\n return s.strstart += s.lookahead, s.block_start = s.strstart, s.insert = s.lookahead, s.lookahead = 0, s.match_length = s.prev_length = MIN_MATCH - 1, s.match_available = 0, strm.next_in = next, strm.input = input, strm.avail_in = avail, s.wrap = wrap, Z_OK;\n }\n exports.deflateInit = deflateInit, exports.deflateInit2 = deflateInit2, exports.deflateReset = deflateReset, exports.deflateResetKeep = deflateResetKeep, exports.deflateSetHeader = deflateSetHeader, exports.deflate = deflate, exports.deflateEnd = deflateEnd, exports.deflateSetDictionary = deflateSetDictionary, exports.deflateInfo = \"pako deflate (from Nodeca project)\";\n }\n}), require_inffast = __commonJS({\n \"node_modules/pako/lib/zlib/inffast.js\"(exports, module2) {\n var BAD = 30, TYPE = 12;\n module2.exports = function inflate_fast(strm, start) {\n var state, _in, last, _out, beg, end, dmax, wsize, whave, wnext, s_window, hold, bits, lcode, dcode, lmask, dmask, here, op, len, dist, from, from_source, input, output;\n state = strm.state, _in = strm.next_in, input = strm.input, last = _in + (strm.avail_in - 5), _out = strm.next_out, output = strm.output, beg = _out - (start - strm.avail_out), end = _out + (strm.avail_out - 257), dmax = state.dmax, wsize = state.wsize, whave = state.whave, wnext = state.wnext, s_window = state.window, hold = state.hold, bits = state.bits, lcode = state.lencode, dcode = state.distcode, lmask = (1 << state.lenbits) - 1, dmask = (1 << state.distbits) - 1;\n top:\n do {\n if (bits < 15)\n hold += input[_in++] << bits, bits += 8, hold += input[_in++] << bits, bits += 8;\n here = lcode[hold & lmask];\n dolen:\n for (;; ) {\n if (op = here >>> 24, hold >>>= op, bits -= op, op = here >>> 16 & 255, op === 0)\n output[_out++] = here & 65535;\n else if (op & 16) {\n if (len = here & 65535, op &= 15, op) {\n if (bits < op)\n hold += input[_in++] << bits, bits += 8;\n len += hold & (1 << op) - 1, hold >>>= op, bits -= op;\n }\n if (bits < 15)\n hold += input[_in++] << bits, bits += 8, hold += input[_in++] << bits, bits += 8;\n here = dcode[hold & dmask];\n dodist:\n for (;; ) {\n if (op = here >>> 24, hold >>>= op, bits -= op, op = here >>> 16 & 255, op & 16) {\n if (dist = here & 65535, op &= 15, bits < op) {\n if (hold += input[_in++] << bits, bits += 8, bits < op)\n hold += input[_in++] << bits, bits += 8;\n }\n if (dist += hold & (1 << op) - 1, dist > dmax) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break top;\n }\n if (hold >>>= op, bits -= op, op = _out - beg, dist > op) {\n if (op = dist - op, op > whave) {\n if (state.sane) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break top;\n }\n }\n if (from = 0, from_source = s_window, wnext === 0) {\n if (from += wsize - op, op < len) {\n len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n from = _out - dist, from_source = output;\n }\n } else if (wnext < op) {\n if (from += wsize + wnext - op, op -= wnext, op < len) {\n len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n if (from = 0, wnext < len) {\n op = wnext, len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n from = _out - dist, from_source = output;\n }\n }\n } else if (from += wnext - op, op < len) {\n len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n from = _out - dist, from_source = output;\n }\n while (len > 2)\n output[_out++] = from_source[from++], output[_out++] = from_source[from++], output[_out++] = from_source[from++], len -= 3;\n if (len) {\n if (output[_out++] = from_source[from++], len > 1)\n output[_out++] = from_source[from++];\n }\n } else {\n from = _out - dist;\n do\n output[_out++] = output[from++], output[_out++] = output[from++], output[_out++] = output[from++], len -= 3;\n while (len > 2);\n if (len) {\n if (output[_out++] = output[from++], len > 1)\n output[_out++] = output[from++];\n }\n }\n } else if ((op & 64) === 0) {\n here = dcode[(here & 65535) + (hold & (1 << op) - 1)];\n continue dodist;\n } else {\n strm.msg = \"invalid distance code\", state.mode = BAD;\n break top;\n }\n break;\n }\n } else if ((op & 64) === 0) {\n here = lcode[(here & 65535) + (hold & (1 << op) - 1)];\n continue dolen;\n } else if (op & 32) {\n state.mode = TYPE;\n break top;\n } else {\n strm.msg = \"invalid literal/length code\", state.mode = BAD;\n break top;\n }\n break;\n }\n } while (_in < last && _out < end);\n len = bits >> 3, _in -= len, bits -= len << 3, hold &= (1 << bits) - 1, strm.next_in = _in, strm.next_out = _out, strm.avail_in = _in < last \? 5 + (last - _in) : 5 - (_in - last), strm.avail_out = _out < end \? 257 + (end - _out) : 257 - (_out - end), state.hold = hold, state.bits = bits;\n return;\n };\n }\n}), require_inftrees = __commonJS({\n \"node_modules/pako/lib/zlib/inftrees.js\"(exports, module2) {\n var utils = require_common(), MAXBITS = 15, ENOUGH_LENS = 852, ENOUGH_DISTS = 592, CODES = 0, LENS = 1, DISTS = 2, lbase = [\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 13,\n 15,\n 17,\n 19,\n 23,\n 27,\n 31,\n 35,\n 43,\n 51,\n 59,\n 67,\n 83,\n 99,\n 115,\n 131,\n 163,\n 195,\n 227,\n 258,\n 0,\n 0\n ], lext = [\n 16,\n 16,\n 16,\n 16,\n 16,\n 16,\n 16,\n 16,\n 17,\n 17,\n 17,\n 17,\n 18,\n 18,\n 18,\n 18,\n 19,\n 19,\n 19,\n 19,\n 20,\n 20,\n 20,\n 20,\n 21,\n 21,\n 21,\n 21,\n 16,\n 72,\n 78\n ], dbase = [\n 1,\n 2,\n 3,\n 4,\n 5,\n 7,\n 9,\n 13,\n 17,\n 25,\n 33,\n 49,\n 65,\n 97,\n 129,\n 193,\n 257,\n 385,\n 513,\n 769,\n 1025,\n 1537,\n 2049,\n 3073,\n 4097,\n 6145,\n 8193,\n 12289,\n 16385,\n 24577,\n 0,\n 0\n ], dext = [\n 16,\n 16,\n 16,\n 16,\n 17,\n 17,\n 18,\n 18,\n 19,\n 19,\n 20,\n 20,\n 21,\n 21,\n 22,\n 22,\n 23,\n 23,\n 24,\n 24,\n 25,\n 25,\n 26,\n 26,\n 27,\n 27,\n 28,\n 28,\n 29,\n 29,\n 64,\n 64\n ];\n module2.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) {\n var bits = opts.bits, len = 0, sym = 0, min = 0, max = 0, root = 0, curr = 0, drop = 0, left = 0, used = 0, huff = 0, incr, fill, low, mask, next, base = null, base_index = 0, end, count = new utils.Buf16(MAXBITS + 1), offs = new utils.Buf16(MAXBITS + 1), extra = null, extra_index = 0, here_bits, here_op, here_val;\n for (len = 0;len <= MAXBITS; len++)\n count[len] = 0;\n for (sym = 0;sym < codes; sym++)\n count[lens[lens_index + sym]]++;\n root = bits;\n for (max = MAXBITS;max >= 1; max--)\n if (count[max] !== 0)\n break;\n if (root > max)\n root = max;\n if (max === 0)\n return table[table_index++] = 1 << 24 | 64 << 16 | 0, table[table_index++] = 1 << 24 | 64 << 16 | 0, opts.bits = 1, 0;\n for (min = 1;min < max; min++)\n if (count[min] !== 0)\n break;\n if (root < min)\n root = min;\n left = 1;\n for (len = 1;len <= MAXBITS; len++)\n if (left <<= 1, left -= count[len], left < 0)\n return -1;\n if (left > 0 && (type === CODES || max !== 1))\n return -1;\n offs[1] = 0;\n for (len = 1;len < MAXBITS; len++)\n offs[len + 1] = offs[len] + count[len];\n for (sym = 0;sym < codes; sym++)\n if (lens[lens_index + sym] !== 0)\n work[offs[lens[lens_index + sym]]++] = sym;\n if (type === CODES)\n base = extra = work, end = 19;\n else if (type === LENS)\n base = lbase, base_index -= 257, extra = lext, extra_index -= 257, end = 256;\n else\n base = dbase, extra = dext, end = -1;\n if (huff = 0, sym = 0, len = min, next = table_index, curr = root, drop = 0, low = -1, used = 1 << root, mask = used - 1, type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS)\n return 1;\n for (;; ) {\n if (here_bits = len - drop, work[sym] < end)\n here_op = 0, here_val = work[sym];\n else if (work[sym] > end)\n here_op = extra[extra_index + work[sym]], here_val = base[base_index + work[sym]];\n else\n here_op = 96, here_val = 0;\n incr = 1 << len - drop, fill = 1 << curr, min = fill;\n do\n fill -= incr, table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0;\n while (fill !== 0);\n incr = 1 << len - 1;\n while (huff & incr)\n incr >>= 1;\n if (incr !== 0)\n huff &= incr - 1, huff += incr;\n else\n huff = 0;\n if (sym++, --count[len] === 0) {\n if (len === max)\n break;\n len = lens[lens_index + work[sym]];\n }\n if (len > root && (huff & mask) !== low) {\n if (drop === 0)\n drop = root;\n next += min, curr = len - drop, left = 1 << curr;\n while (curr + drop < max) {\n if (left -= count[curr + drop], left <= 0)\n break;\n curr++, left <<= 1;\n }\n if (used += 1 << curr, type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS)\n return 1;\n low = huff & mask, table[low] = root << 24 | curr << 16 | next - table_index | 0;\n }\n }\n if (huff !== 0)\n table[next + huff] = len - drop << 24 | 64 << 16 | 0;\n return opts.bits = root, 0;\n };\n }\n}), require_inflate = __commonJS({\n \"node_modules/pako/lib/zlib/inflate.js\"(exports) {\n var utils = require_common(), adler32 = require_adler32(), crc32 = require_crc32(), inflate_fast = require_inffast(), inflate_table = require_inftrees(), CODES = 0, LENS = 1, DISTS = 2, Z_FINISH = 4, Z_BLOCK = 5, Z_TREES = 6, Z_OK = 0, Z_STREAM_END = 1, Z_NEED_DICT = 2, Z_STREAM_ERROR = -2, Z_DATA_ERROR = -3, Z_MEM_ERROR = -4, Z_BUF_ERROR = -5, Z_DEFLATED = 8, HEAD = 1, FLAGS = 2, TIME = 3, OS = 4, EXLEN = 5, EXTRA = 6, NAME = 7, COMMENT = 8, HCRC = 9, DICTID = 10, DICT = 11, TYPE = 12, TYPEDO = 13, STORED = 14, COPY_ = 15, COPY = 16, TABLE = 17, LENLENS = 18, CODELENS = 19, LEN_ = 20, LEN = 21, LENEXT = 22, DIST = 23, DISTEXT = 24, MATCH = 25, LIT = 26, CHECK = 27, LENGTH = 28, DONE = 29, BAD = 30, MEM = 31, SYNC = 32, ENOUGH_LENS = 852, ENOUGH_DISTS = 592, MAX_WBITS = 15, DEF_WBITS = MAX_WBITS;\n function zswap32(q) {\n return (q >>> 24 & 255) + (q >>> 8 & 65280) + ((q & 65280) << 8) + ((q & 255) << 24);\n }\n function InflateState() {\n this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new utils.Buf16(320), this.work = new utils.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;\n }\n function inflateResetKeep(strm) {\n var state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, strm.total_in = strm.total_out = state.total = 0, strm.msg = \"\", state.wrap)\n strm.adler = state.wrap & 1;\n return state.mode = HEAD, state.last = 0, state.havedict = 0, state.dmax = 32768, state.head = null, state.hold = 0, state.bits = 0, state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS), state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS), state.sane = 1, state.back = -1, Z_OK;\n }\n function inflateReset(strm) {\n var state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n return state = strm.state, state.wsize = 0, state.whave = 0, state.wnext = 0, inflateResetKeep(strm);\n }\n function inflateReset2(strm, windowBits) {\n var wrap, state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, windowBits < 0)\n wrap = 0, windowBits = -windowBits;\n else if (wrap = (windowBits >> 4) + 1, windowBits < 48)\n windowBits &= 15;\n if (windowBits && (windowBits < 8 || windowBits > 15))\n return Z_STREAM_ERROR;\n if (state.window !== null && state.wbits !== windowBits)\n state.window = null;\n return state.wrap = wrap, state.wbits = windowBits, inflateReset(strm);\n }\n function inflateInit2(strm, windowBits) {\n var ret, state;\n if (!strm)\n return Z_STREAM_ERROR;\n if (state = new InflateState, strm.state = state, state.window = null, ret = inflateReset2(strm, windowBits), ret !== Z_OK)\n strm.state = null;\n return ret;\n }\n function inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n }\n var virgin = !0, lenfix, distfix;\n function fixedtables(state) {\n if (virgin) {\n var sym;\n lenfix = new utils.Buf32(512), distfix = new utils.Buf32(32), sym = 0;\n while (sym < 144)\n state.lens[sym++] = 8;\n while (sym < 256)\n state.lens[sym++] = 9;\n while (sym < 280)\n state.lens[sym++] = 7;\n while (sym < 288)\n state.lens[sym++] = 8;\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, {\n bits: 9\n }), sym = 0;\n while (sym < 32)\n state.lens[sym++] = 5;\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, {\n bits: 5\n }), virgin = !1;\n }\n state.lencode = lenfix, state.lenbits = 9, state.distcode = distfix, state.distbits = 5;\n }\n function updatewindow(strm, src, end, copy) {\n var dist, state = strm.state;\n if (state.window === null)\n state.wsize = 1 << state.wbits, state.wnext = 0, state.whave = 0, state.window = new utils.Buf8(state.wsize);\n if (copy >= state.wsize)\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0), state.wnext = 0, state.whave = state.wsize;\n else {\n if (dist = state.wsize - state.wnext, dist > copy)\n dist = copy;\n if (utils.arraySet(state.window, src, end - copy, dist, state.wnext), copy -= dist, copy)\n utils.arraySet(state.window, src, end - copy, copy, 0), state.wnext = copy, state.whave = state.wsize;\n else {\n if (state.wnext += dist, state.wnext === state.wsize)\n state.wnext = 0;\n if (state.whave < state.wsize)\n state.whave += dist;\n }\n }\n return 0;\n }\n function inflate(strm, flush) {\n var state, input, output, next, put, have, left, hold, bits, _in, _out, copy, from, from_source, here = 0, here_bits, here_op, here_val, last_bits, last_op, last_val, len, ret, hbuf = new utils.Buf8(4), opts, n, order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0)\n return Z_STREAM_ERROR;\n if (state = strm.state, state.mode === TYPE)\n state.mode = TYPEDO;\n put = strm.next_out, output = strm.output, left = strm.avail_out, next = strm.next_in, input = strm.input, have = strm.avail_in, hold = state.hold, bits = state.bits, _in = have, _out = left, ret = Z_OK;\n inf_leave:\n for (;; )\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.wrap & 2 && hold === 35615) {\n state.check = 0, hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0), hold = 0, bits = 0, state.mode = FLAGS;\n break;\n }\n if (state.flags = 0, state.head)\n state.head.done = !1;\n if (!(state.wrap & 1) || (((hold & 255) << 8) + (hold >> 8)) % 31) {\n strm.msg = \"incorrect header check\", state.mode = BAD;\n break;\n }\n if ((hold & 15) !== Z_DEFLATED) {\n strm.msg = \"unknown compression method\", state.mode = BAD;\n break;\n }\n if (hold >>>= 4, bits -= 4, len = (hold & 15) + 8, state.wbits === 0)\n state.wbits = len;\n else if (len > state.wbits) {\n strm.msg = \"invalid window size\", state.mode = BAD;\n break;\n }\n state.dmax = 1 << len, strm.adler = state.check = 1, state.mode = hold & 512 \? DICTID : TYPE, hold = 0, bits = 0;\n break;\n case FLAGS:\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.flags = hold, (state.flags & 255) !== Z_DEFLATED) {\n strm.msg = \"unknown compression method\", state.mode = BAD;\n break;\n }\n if (state.flags & 57344) {\n strm.msg = \"unknown header flags set\", state.mode = BAD;\n break;\n }\n if (state.head)\n state.head.text = hold >> 8 & 1;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0);\n hold = 0, bits = 0, state.mode = TIME;\n case TIME:\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.head)\n state.head.time = hold;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, hbuf[2] = hold >>> 16 & 255, hbuf[3] = hold >>> 24 & 255, state.check = crc32(state.check, hbuf, 4, 0);\n hold = 0, bits = 0, state.mode = OS;\n case OS:\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.head)\n state.head.xflags = hold & 255, state.head.os = hold >> 8;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0);\n hold = 0, bits = 0, state.mode = EXLEN;\n case EXLEN:\n if (state.flags & 1024) {\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.length = hold, state.head)\n state.head.extra_len = hold;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0);\n hold = 0, bits = 0;\n } else if (state.head)\n state.head.extra = null;\n state.mode = EXTRA;\n case EXTRA:\n if (state.flags & 1024) {\n if (copy = state.length, copy > have)\n copy = have;\n if (copy) {\n if (state.head) {\n if (len = state.head.extra_len - state.length, !state.head.extra)\n state.head.extra = new Array(state.head.extra_len);\n utils.arraySet(state.head.extra, input, next, copy, len);\n }\n if (state.flags & 512)\n state.check = crc32(state.check, input, copy, next);\n have -= copy, next += copy, state.length -= copy;\n }\n if (state.length)\n break inf_leave;\n }\n state.length = 0, state.mode = NAME;\n case NAME:\n if (state.flags & 2048) {\n if (have === 0)\n break inf_leave;\n copy = 0;\n do\n if (len = input[next + copy++], state.head && len && state.length < 65536)\n state.head.name += String.fromCharCode(len);\n while (len && copy < have);\n if (state.flags & 512)\n state.check = crc32(state.check, input, copy, next);\n if (have -= copy, next += copy, len)\n break inf_leave;\n } else if (state.head)\n state.head.name = null;\n state.length = 0, state.mode = COMMENT;\n case COMMENT:\n if (state.flags & 4096) {\n if (have === 0)\n break inf_leave;\n copy = 0;\n do\n if (len = input[next + copy++], state.head && len && state.length < 65536)\n state.head.comment += String.fromCharCode(len);\n while (len && copy < have);\n if (state.flags & 512)\n state.check = crc32(state.check, input, copy, next);\n if (have -= copy, next += copy, len)\n break inf_leave;\n } else if (state.head)\n state.head.comment = null;\n state.mode = HCRC;\n case HCRC:\n if (state.flags & 512) {\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (hold !== (state.check & 65535)) {\n strm.msg = \"header crc mismatch\", state.mode = BAD;\n break;\n }\n hold = 0, bits = 0;\n }\n if (state.head)\n state.head.hcrc = state.flags >> 9 & 1, state.head.done = !0;\n strm.adler = state.check = 0, state.mode = TYPE;\n break;\n case DICTID:\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n strm.adler = state.check = zswap32(hold), hold = 0, bits = 0, state.mode = DICT;\n case DICT:\n if (state.havedict === 0)\n return strm.next_out = put, strm.avail_out = left, strm.next_in = next, strm.avail_in = have, state.hold = hold, state.bits = bits, Z_NEED_DICT;\n strm.adler = state.check = 1, state.mode = TYPE;\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES)\n break inf_leave;\n case TYPEDO:\n if (state.last) {\n hold >>>= bits & 7, bits -= bits & 7, state.mode = CHECK;\n break;\n }\n while (bits < 3) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n switch (state.last = hold & 1, hold >>>= 1, bits -= 1, hold & 3) {\n case 0:\n state.mode = STORED;\n break;\n case 1:\n if (fixedtables(state), state.mode = LEN_, flush === Z_TREES) {\n hold >>>= 2, bits -= 2;\n break inf_leave;\n }\n break;\n case 2:\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = \"invalid block type\", state.mode = BAD;\n }\n hold >>>= 2, bits -= 2;\n break;\n case STORED:\n hold >>>= bits & 7, bits -= bits & 7;\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if ((hold & 65535) !== (hold >>> 16 ^ 65535)) {\n strm.msg = \"invalid stored block lengths\", state.mode = BAD;\n break;\n }\n if (state.length = hold & 65535, hold = 0, bits = 0, state.mode = COPY_, flush === Z_TREES)\n break inf_leave;\n case COPY_:\n state.mode = COPY;\n case COPY:\n if (copy = state.length, copy) {\n if (copy > have)\n copy = have;\n if (copy > left)\n copy = left;\n if (copy === 0)\n break inf_leave;\n utils.arraySet(output, input, next, copy, put), have -= copy, next += copy, left -= copy, put += copy, state.length -= copy;\n break;\n }\n state.mode = TYPE;\n break;\n case TABLE:\n while (bits < 14) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.nlen = (hold & 31) + 257, hold >>>= 5, bits -= 5, state.ndist = (hold & 31) + 1, hold >>>= 5, bits -= 5, state.ncode = (hold & 15) + 4, hold >>>= 4, bits -= 4, state.nlen > 286 || state.ndist > 30) {\n strm.msg = \"too many length or distance symbols\", state.mode = BAD;\n break;\n }\n state.have = 0, state.mode = LENLENS;\n case LENLENS:\n while (state.have < state.ncode) {\n while (bits < 3) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n state.lens[order[state.have++]] = hold & 7, hold >>>= 3, bits -= 3;\n }\n while (state.have < 19)\n state.lens[order[state.have++]] = 0;\n if (state.lencode = state.lendyn, state.lenbits = 7, opts = { bits: state.lenbits }, ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts), state.lenbits = opts.bits, ret) {\n strm.msg = \"invalid code lengths set\", state.mode = BAD;\n break;\n }\n state.have = 0, state.mode = CODELENS;\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;; ) {\n if (here = state.lencode[hold & (1 << state.lenbits) - 1], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (here_val < 16)\n hold >>>= here_bits, bits -= here_bits, state.lens[state.have++] = here_val;\n else {\n if (here_val === 16) {\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (hold >>>= here_bits, bits -= here_bits, state.have === 0) {\n strm.msg = \"invalid bit length repeat\", state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1], copy = 3 + (hold & 3), hold >>>= 2, bits -= 2;\n } else if (here_val === 17) {\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= here_bits, bits -= here_bits, len = 0, copy = 3 + (hold & 7), hold >>>= 3, bits -= 3;\n } else {\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= here_bits, bits -= here_bits, len = 0, copy = 11 + (hold & 127), hold >>>= 7, bits -= 7;\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = \"invalid bit length repeat\", state.mode = BAD;\n break;\n }\n while (copy--)\n state.lens[state.have++] = len;\n }\n }\n if (state.mode === BAD)\n break;\n if (state.lens[256] === 0) {\n strm.msg = \"invalid code -- missing end-of-block\", state.mode = BAD;\n break;\n }\n if (state.lenbits = 9, opts = { bits: state.lenbits }, ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts), state.lenbits = opts.bits, ret) {\n strm.msg = \"invalid literal/lengths set\", state.mode = BAD;\n break;\n }\n if (state.distbits = 6, state.distcode = state.distdyn, opts = { bits: state.distbits }, ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts), state.distbits = opts.bits, ret) {\n strm.msg = \"invalid distances set\", state.mode = BAD;\n break;\n }\n if (state.mode = LEN_, flush === Z_TREES)\n break inf_leave;\n case LEN_:\n state.mode = LEN;\n case LEN:\n if (have >= 6 && left >= 258) {\n if (strm.next_out = put, strm.avail_out = left, strm.next_in = next, strm.avail_in = have, state.hold = hold, state.bits = bits, inflate_fast(strm, _out), put = strm.next_out, output = strm.output, left = strm.avail_out, next = strm.next_in, input = strm.input, have = strm.avail_in, hold = state.hold, bits = state.bits, state.mode === TYPE)\n state.back = -1;\n break;\n }\n state.back = 0;\n for (;; ) {\n if (here = state.lencode[hold & (1 << state.lenbits) - 1], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (here_op && (here_op & 240) === 0) {\n last_bits = here_bits, last_op = here_op, last_val = here_val;\n for (;; ) {\n if (here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, last_bits + here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= last_bits, bits -= last_bits, state.back += last_bits;\n }\n if (hold >>>= here_bits, bits -= here_bits, state.back += here_bits, state.length = here_val, here_op === 0) {\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n state.back = -1, state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = \"invalid literal/length code\", state.mode = BAD;\n break;\n }\n state.extra = here_op & 15, state.mode = LENEXT;\n case LENEXT:\n if (state.extra) {\n n = state.extra;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n state.length += hold & (1 << state.extra) - 1, hold >>>= state.extra, bits -= state.extra, state.back += state.extra;\n }\n state.was = state.length, state.mode = DIST;\n case DIST:\n for (;; ) {\n if (here = state.distcode[hold & (1 << state.distbits) - 1], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if ((here_op & 240) === 0) {\n last_bits = here_bits, last_op = here_op, last_val = here_val;\n for (;; ) {\n if (here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, last_bits + here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= last_bits, bits -= last_bits, state.back += last_bits;\n }\n if (hold >>>= here_bits, bits -= here_bits, state.back += here_bits, here_op & 64) {\n strm.msg = \"invalid distance code\", state.mode = BAD;\n break;\n }\n state.offset = here_val, state.extra = here_op & 15, state.mode = DISTEXT;\n case DISTEXT:\n if (state.extra) {\n n = state.extra;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n state.offset += hold & (1 << state.extra) - 1, hold >>>= state.extra, bits -= state.extra, state.back += state.extra;\n }\n if (state.offset > state.dmax) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break;\n }\n state.mode = MATCH;\n case MATCH:\n if (left === 0)\n break inf_leave;\n if (copy = _out - left, state.offset > copy) {\n if (copy = state.offset - copy, copy > state.whave) {\n if (state.sane) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break;\n }\n }\n if (copy > state.wnext)\n copy -= state.wnext, from = state.wsize - copy;\n else\n from = state.wnext - copy;\n if (copy > state.length)\n copy = state.length;\n from_source = state.window;\n } else\n from_source = output, from = put - state.offset, copy = state.length;\n if (copy > left)\n copy = left;\n left -= copy, state.length -= copy;\n do\n output[put++] = from_source[from++];\n while (--copy);\n if (state.length === 0)\n state.mode = LEN;\n break;\n case LIT:\n if (left === 0)\n break inf_leave;\n output[put++] = state.length, left--, state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold |= input[next++] << bits, bits += 8;\n }\n if (_out -= left, strm.total_out += _out, state.total += _out, _out)\n strm.adler = state.check = state.flags \? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out);\n if (_out = left, (state.flags \? hold : zswap32(hold)) !== state.check) {\n strm.msg = \"incorrect data check\", state.mode = BAD;\n break;\n }\n hold = 0, bits = 0;\n }\n state.mode = LENGTH;\n case LENGTH:\n if (state.wrap && state.flags) {\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (hold !== (state.total & 4294967295)) {\n strm.msg = \"incorrect length check\", state.mode = BAD;\n break;\n }\n hold = 0, bits = 0;\n }\n state.mode = DONE;\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n default:\n return Z_STREAM_ERROR;\n }\n if (strm.next_out = put, strm.avail_out = left, strm.next_in = next, strm.avail_in = have, state.hold = hold, state.bits = bits, state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush !== Z_FINISH)) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out))\n return state.mode = MEM, Z_MEM_ERROR;\n }\n if (_in -= strm.avail_in, _out -= strm.avail_out, strm.total_in += _in, strm.total_out += _out, state.total += _out, state.wrap && _out)\n strm.adler = state.check = state.flags \? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out);\n if (strm.data_type = state.bits + (state.last \? 64 : 0) + (state.mode === TYPE \? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ \? 256 : 0), (_in === 0 && _out === 0 || flush === Z_FINISH) && ret === Z_OK)\n ret = Z_BUF_ERROR;\n return ret;\n }\n function inflateEnd(strm) {\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n var state = strm.state;\n if (state.window)\n state.window = null;\n return strm.state = null, Z_OK;\n }\n function inflateGetHeader(strm, head) {\n var state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, (state.wrap & 2) === 0)\n return Z_STREAM_ERROR;\n return state.head = head, head.done = !1, Z_OK;\n }\n function inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length, state, dictid, ret;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, state.wrap !== 0 && state.mode !== DICT)\n return Z_STREAM_ERROR;\n if (state.mode === DICT) {\n if (dictid = 1, dictid = adler32(dictid, dictionary, dictLength, 0), dictid !== state.check)\n return Z_DATA_ERROR;\n }\n if (ret = updatewindow(strm, dictionary, dictLength, dictLength), ret)\n return state.mode = MEM, Z_MEM_ERROR;\n return state.havedict = 1, Z_OK;\n }\n exports.inflateReset = inflateReset, exports.inflateReset2 = inflateReset2, exports.inflateResetKeep = inflateResetKeep, exports.inflateInit = inflateInit, exports.inflateInit2 = inflateInit2, exports.inflate = inflate, exports.inflateEnd = inflateEnd, exports.inflateGetHeader = inflateGetHeader, exports.inflateSetDictionary = inflateSetDictionary, exports.inflateInfo = \"pako inflate (from Nodeca project)\";\n }\n}), require_constants = __commonJS({\n \"node_modules/pako/lib/zlib/constants.js\"(exports, module2) {\n module2.exports = {\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n Z_BUF_ERROR: -5,\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n Z_BINARY: 0,\n Z_TEXT: 1,\n Z_UNKNOWN: 2,\n Z_DEFLATED: 8\n };\n }\n}), require_binding = __commonJS({\n \"node_modules/browserify-zlib/lib/binding.js\"(exports) {\n var Zstream = require_zstream(), zlib_deflate = require_deflate(), zlib_inflate = require_inflate(), constants = require_constants();\n for (key in constants)\n exports[key] = constants[key];\n var key;\n exports.NONE = 0, exports.DEFLATE = 1, exports.INFLATE = 2, exports.GZIP = 3, exports.GUNZIP = 4, exports.DEFLATERAW = 5, exports.INFLATERAW = 6, exports.UNZIP = 7;\n var GZIP_HEADER_ID1 = 31, GZIP_HEADER_ID2 = 139;\n function Zlib(mode) {\n if (typeof mode !== \"number\" || mode < exports.DEFLATE || mode > exports.UNZIP)\n @throwTypeError(\"Bad argument\");\n this.dictionary = null, this.err = 0, this.flush = 0, this.init_done = !1, this.level = 0, this.memLevel = 0, this.mode = mode, this.strategy = 0, this.windowBits = 0, this.write_in_progress = !1, this.pending_close = !1, this.gzip_id_bytes_read = 0;\n }\n Zlib.prototype = {}, Zlib.prototype.close = function() {\n if (console.log(\"Zlib close\"), this.write_in_progress) {\n this.pending_close = !0;\n return;\n }\n if (this.pending_close = !1, assert(this.init_done, \"close before init\"), assert(this.mode <= exports.UNZIP), this.mode === exports.DEFLATE || this.mode === exports.GZIP || this.mode === exports.DEFLATERAW)\n zlib_deflate.deflateEnd(this.strm);\n else if (this.mode === exports.INFLATE || this.mode === exports.GUNZIP || this.mode === exports.INFLATERAW || this.mode === exports.UNZIP)\n zlib_inflate.inflateEnd(this.strm);\n this.mode = exports.NONE, this.dictionary = null;\n }, Zlib.prototype.write = function(flush, input, in_off, in_len, out, out_off, out_len) {\n return this._write(!0, flush, input, in_off, in_len, out, out_off, out_len);\n }, Zlib.prototype.writeSync = function(flush, input, in_off, in_len, out, out_off, out_len) {\n return this._write(!1, flush, input, in_off, in_len, out, out_off, out_len);\n }, Zlib.prototype._write = function(async, flush, input, in_off, in_len, out, out_off, out_len) {\n if (assert.equal(arguments.length, 8), assert(this.init_done, \"write before init\"), assert(this.mode !== exports.NONE, \"already finalized\"), assert.equal(!1, this.write_in_progress, \"write already in progress\"), assert.equal(!1, this.pending_close, \"close is pending\"), this.write_in_progress = !0, assert.equal(!1, flush === void 0, \"must provide flush value\"), this.write_in_progress = !0, flush !== exports.Z_NO_FLUSH && flush !== exports.Z_PARTIAL_FLUSH && flush !== exports.Z_SYNC_FLUSH && flush !== exports.Z_FULL_FLUSH && flush !== exports.Z_FINISH && flush !== exports.Z_BLOCK)\n throw new Error(\"Invalid flush value\");\n if (input == null)\n input = Buffer.alloc(0), in_len = 0, in_off = 0;\n if (this.strm.avail_in = in_len, this.strm.input = input, this.strm.next_in = in_off, this.strm.avail_out = out_len, this.strm.output = out, this.strm.next_out = out_off, this.flush = flush, !async) {\n if (this._process(), this._checkError())\n return this._afterSync();\n return;\n }\n var self = this;\n return process.nextTick(function() {\n self._process(), self._after();\n }), this;\n }, Zlib.prototype._afterSync = function() {\n var avail_out = this.strm.avail_out, avail_in = this.strm.avail_in;\n return this.write_in_progress = !1, [avail_in, avail_out];\n }, Zlib.prototype._process = function() {\n var next_expected_header_byte = null;\n switch (this.mode) {\n case exports.DEFLATE:\n case exports.GZIP:\n case exports.DEFLATERAW:\n this.err = zlib_deflate.deflate(this.strm, this.flush);\n break;\n case exports.UNZIP:\n if (this.strm.avail_in > 0)\n next_expected_header_byte = this.strm.next_in;\n switch (this.gzip_id_bytes_read) {\n case 0:\n if (next_expected_header_byte === null)\n break;\n if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID1) {\n if (this.gzip_id_bytes_read = 1, next_expected_header_byte++, this.strm.avail_in === 1)\n break;\n } else {\n this.mode = exports.INFLATE;\n break;\n }\n case 1:\n if (next_expected_header_byte === null)\n break;\n if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID2)\n this.gzip_id_bytes_read = 2, this.mode = exports.GUNZIP;\n else\n this.mode = exports.INFLATE;\n break;\n default:\n throw new Error(\"invalid number of gzip magic number bytes read\");\n }\n case exports.INFLATE:\n case exports.GUNZIP:\n case exports.INFLATERAW:\n if (this.err = zlib_inflate.inflate(this.strm, this.flush), this.err === exports.Z_NEED_DICT && this.dictionary) {\n if (this.err = zlib_inflate.inflateSetDictionary(this.strm, this.dictionary), this.err === exports.Z_OK)\n this.err = zlib_inflate.inflate(this.strm, this.flush);\n else if (this.err === exports.Z_DATA_ERROR)\n this.err = exports.Z_NEED_DICT;\n }\n while (this.strm.avail_in > 0 && this.mode === exports.GUNZIP && this.err === exports.Z_STREAM_END && this.strm.next_in[0] !== 0)\n this.reset(), this.err = zlib_inflate.inflate(this.strm, this.flush);\n break;\n default:\n throw new Error(\"Unknown mode \" + this.mode);\n }\n }, Zlib.prototype._checkError = function() {\n switch (this.err) {\n case exports.Z_OK:\n case exports.Z_BUF_ERROR:\n if (this.strm.avail_out !== 0 && this.flush === exports.Z_FINISH)\n return this._error(\"unexpected end of file\"), !1;\n break;\n case exports.Z_STREAM_END:\n break;\n case exports.Z_NEED_DICT:\n if (this.dictionary == null)\n this._error(\"Missing dictionary\");\n else\n this._error(\"Bad dictionary\");\n return !1;\n default:\n return this._error(\"Zlib error\"), !1;\n }\n return !0;\n }, Zlib.prototype._after = function() {\n if (!this._checkError())\n return;\n var avail_out = this.strm.avail_out, avail_in = this.strm.avail_in;\n if (this.write_in_progress = !1, this.callback(avail_in, avail_out), this.pending_close)\n this.close();\n }, Zlib.prototype._error = function(message) {\n if (this.strm.msg)\n message = this.strm.msg;\n if (this.onerror(message, this.err), this.write_in_progress = !1, this.pending_close)\n this.close();\n }, Zlib.prototype.init = function(windowBits, level, memLevel, strategy, dictionary) {\n assert(arguments.length === 4 || arguments.length === 5, \"init(windowBits, level, memLevel, strategy, [dictionary])\"), assert(windowBits >= 8 && windowBits <= 15, \"invalid windowBits\"), assert(level >= -1 && level <= 9, \"invalid compression level\"), assert(memLevel >= 1 && memLevel <= 9, \"invalid memlevel\"), assert(strategy === exports.Z_FILTERED || strategy === exports.Z_HUFFMAN_ONLY || strategy === exports.Z_RLE || strategy === exports.Z_FIXED || strategy === exports.Z_DEFAULT_STRATEGY, \"invalid strategy\"), this._init(level, windowBits, memLevel, strategy, dictionary), this._setDictionary();\n }, Zlib.prototype.params = function() {\n throw new Error(\"deflateParams Not supported\");\n }, Zlib.prototype.reset = function() {\n this._reset(), this._setDictionary();\n }, Zlib.prototype._init = function(level, windowBits, memLevel, strategy, dictionary) {\n if (this.level = level, this.windowBits = windowBits, this.memLevel = memLevel, this.strategy = strategy, this.flush = exports.Z_NO_FLUSH, this.err = exports.Z_OK, this.mode === exports.GZIP || this.mode === exports.GUNZIP)\n this.windowBits += 16;\n if (this.mode === exports.UNZIP)\n this.windowBits += 32;\n if (this.mode === exports.DEFLATERAW || this.mode === exports.INFLATERAW)\n this.windowBits = -1 * this.windowBits;\n switch (this.strm = new Zstream, this.mode) {\n case exports.DEFLATE:\n case exports.GZIP:\n case exports.DEFLATERAW:\n this.err = zlib_deflate.deflateInit2(this.strm, this.level, exports.Z_DEFLATED, this.windowBits, this.memLevel, this.strategy);\n break;\n case exports.INFLATE:\n case exports.GUNZIP:\n case exports.INFLATERAW:\n case exports.UNZIP:\n this.err = zlib_inflate.inflateInit2(this.strm, this.windowBits);\n break;\n default:\n throw new Error(\"Unknown mode \" + this.mode);\n }\n if (this.err !== exports.Z_OK)\n this._error(\"Init error\");\n this.dictionary = dictionary, this.write_in_progress = !1, this.init_done = !0;\n }, Zlib.prototype._setDictionary = function() {\n if (this.dictionary == null)\n return;\n switch (this.err = exports.Z_OK, this.mode) {\n case exports.DEFLATE:\n case exports.DEFLATERAW:\n this.err = zlib_deflate.deflateSetDictionary(this.strm, this.dictionary);\n break;\n default:\n break;\n }\n if (this.err !== exports.Z_OK)\n this._error(\"Failed to set dictionary\");\n }, Zlib.prototype._reset = function() {\n switch (this.err = exports.Z_OK, this.mode) {\n case exports.DEFLATE:\n case exports.DEFLATERAW:\n case exports.GZIP:\n this.err = zlib_deflate.deflateReset(this.strm);\n break;\n case exports.INFLATE:\n case exports.INFLATERAW:\n case exports.GUNZIP:\n this.err = zlib_inflate.inflateReset(this.strm);\n break;\n default:\n break;\n }\n if (this.err !== exports.Z_OK)\n this._error(\"Failed to reset stream\");\n }, exports.Zlib = Zlib;\n }\n}), require_lib = __commonJS({\n \"node_modules/browserify-zlib/lib/index.js\"(exports) {\n var Buffer2 = BufferModule.Buffer, Transform = StreamModule.Transform, binding = require_binding(), util = Util, kMaxLength = BufferModule.kMaxLength, kRangeErrorMessage = \"Cannot create final Buffer. It would be larger than 0x\" + kMaxLength.toString(16) + \" bytes\";\n binding.Z_MIN_WINDOWBITS = 8, binding.Z_MAX_WINDOWBITS = 15, binding.Z_DEFAULT_WINDOWBITS = 15, binding.Z_MIN_CHUNK = 64, binding.Z_MAX_CHUNK = Infinity, binding.Z_DEFAULT_CHUNK = 16384, binding.Z_MIN_MEMLEVEL = 1, binding.Z_MAX_MEMLEVEL = 9, binding.Z_DEFAULT_MEMLEVEL = 8, binding.Z_MIN_LEVEL = -1, binding.Z_MAX_LEVEL = 9, binding.Z_DEFAULT_LEVEL = binding.Z_DEFAULT_COMPRESSION;\n var bkeys = Object.keys(binding);\n for (bk = 0;bk < bkeys.length; bk++)\n if (bkey = bkeys[bk], bkey.match(/^Z/))\n Object.defineProperty(exports, bkey, {\n enumerable: !0,\n value: binding[bkey],\n writable: !1\n });\n var bkey, bk, codes = {\n Z_OK: binding.Z_OK,\n Z_STREAM_END: binding.Z_STREAM_END,\n Z_NEED_DICT: binding.Z_NEED_DICT,\n Z_ERRNO: binding.Z_ERRNO,\n Z_STREAM_ERROR: binding.Z_STREAM_ERROR,\n Z_DATA_ERROR: binding.Z_DATA_ERROR,\n Z_MEM_ERROR: binding.Z_MEM_ERROR,\n Z_BUF_ERROR: binding.Z_BUF_ERROR,\n Z_VERSION_ERROR: binding.Z_VERSION_ERROR\n }, ckeys = Object.keys(codes);\n for (ck = 0;ck < ckeys.length; ck++)\n ckey = ckeys[ck], codes[codes[ckey]] = ckey;\n var ckey, ck;\n Object.defineProperty(exports, \"codes\", {\n enumerable: !0,\n value: Object.freeze(codes),\n writable: !1\n }), exports.constants = require_constants(), exports.Deflate = Deflate, exports.Inflate = Inflate, exports.Gzip = Gzip, exports.Gunzip = Gunzip, exports.DeflateRaw = DeflateRaw, exports.InflateRaw = InflateRaw, exports.Unzip = Unzip, exports.createDeflate = function(o) {\n return new Deflate(o);\n }, exports.createInflate = function(o) {\n return new Inflate(o);\n }, exports.createDeflateRaw = function(o) {\n return new DeflateRaw(o);\n }, exports.createInflateRaw = function(o) {\n return new InflateRaw(o);\n }, exports.createGzip = function(o) {\n return new Gzip(o);\n }, exports.createGunzip = function(o) {\n return new Gunzip(o);\n }, exports.createUnzip = function(o) {\n return new Unzip(o);\n }, exports.deflate = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Deflate(opts), buffer, callback);\n }, exports.deflateSync = function(buffer, opts) {\n return zlibBufferSync(new Deflate(opts), buffer);\n }, exports.gzip = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Gzip(opts), buffer, callback);\n }, exports.gzipSync = function(buffer, opts) {\n return zlibBufferSync(new Gzip(opts), buffer);\n }, exports.deflateRaw = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new DeflateRaw(opts), buffer, callback);\n }, exports.deflateRawSync = function(buffer, opts) {\n return zlibBufferSync(new DeflateRaw(opts), buffer);\n }, exports.unzip = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Unzip(opts), buffer, callback);\n }, exports.unzipSync = function(buffer, opts) {\n return zlibBufferSync(new Unzip(opts), buffer);\n }, exports.inflate = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Inflate(opts), buffer, callback);\n }, exports.inflateSync = function(buffer, opts) {\n return zlibBufferSync(new Inflate(opts), buffer);\n }, exports.gunzip = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Gunzip(opts), buffer, callback);\n }, exports.gunzipSync = function(buffer, opts) {\n return zlibBufferSync(new Gunzip(opts), buffer);\n }, exports.inflateRaw = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new InflateRaw(opts), buffer, callback);\n }, exports.inflateRawSync = function(buffer, opts) {\n return zlibBufferSync(new InflateRaw(opts), buffer);\n }, exports.brotliCompress = function(buffer, opts, callback) {\n throw new Error(\"zlib.brotliCompress is not implemented\");\n };\n function zlibBuffer(engine, buffer, callback) {\n var buffers = [], nread = 0;\n engine.on(\"error\", onError), engine.on(\"end\", onEnd), engine.end(buffer), flow();\n function flow() {\n var chunk;\n while ((chunk = engine.read()) !== null)\n buffers.push(chunk), nread += chunk.length;\n engine.once(\"readable\", flow);\n }\n function onError(err) {\n engine.removeListener(\"end\", onEnd), engine.removeListener(\"readable\", flow), callback(err);\n }\n function onEnd() {\n var buf, err = null;\n if (nread >= kMaxLength)\n err = new RangeError(kRangeErrorMessage);\n else\n buf = Buffer2.concat(buffers, nread);\n buffers = [], engine.close(), callback(err, buf);\n }\n }\n function zlibBufferSync(engine, buffer) {\n if (typeof buffer === \"string\")\n buffer = Buffer2.from(buffer);\n if (!Buffer2.isBuffer(buffer))\n @throwTypeError(\"Not a string or buffer\");\n var flushFlag = engine._finishFlushFlag;\n return engine._processChunk(buffer, flushFlag);\n }\n function Deflate(opts) {\n if (!(this instanceof Deflate))\n return new Deflate(opts);\n Zlib.call(this, opts, binding.DEFLATE);\n }\n function Inflate(opts) {\n if (!(this instanceof Inflate))\n return new Inflate(opts);\n Zlib.call(this, opts, binding.INFLATE);\n }\n function Gzip(opts) {\n if (!(this instanceof Gzip))\n return new Gzip(opts);\n Zlib.call(this, opts, binding.GZIP);\n }\n function Gunzip(opts) {\n if (!(this instanceof Gunzip))\n return new Gunzip(opts);\n Zlib.call(this, opts, binding.GUNZIP);\n }\n function DeflateRaw(opts) {\n if (!(this instanceof DeflateRaw))\n return new DeflateRaw(opts);\n Zlib.call(this, opts, binding.DEFLATERAW);\n }\n function InflateRaw(opts) {\n if (!(this instanceof InflateRaw))\n return new InflateRaw(opts);\n Zlib.call(this, opts, binding.INFLATERAW);\n }\n function Unzip(opts) {\n if (!(this instanceof Unzip))\n return new Unzip(opts);\n Zlib.call(this, opts, binding.UNZIP);\n }\n function isValidFlushFlag(flag) {\n return flag === binding.Z_NO_FLUSH || flag === binding.Z_PARTIAL_FLUSH || flag === binding.Z_SYNC_FLUSH || flag === binding.Z_FULL_FLUSH || flag === binding.Z_FINISH || flag === binding.Z_BLOCK;\n }\n function Zlib(opts, mode) {\n var _this = this;\n if (this._opts = opts = opts || {}, this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK, Transform.call(this, opts), opts.flush && !isValidFlushFlag(opts.flush))\n throw new Error(\"Invalid flush flag: \" + opts.flush);\n if (opts.finishFlush && !isValidFlushFlag(opts.finishFlush))\n throw new Error(\"Invalid flush flag: \" + opts.finishFlush);\n if (this._flushFlag = opts.flush || binding.Z_NO_FLUSH, this._finishFlushFlag = typeof opts.finishFlush !== \"undefined\" \? opts.finishFlush : binding.Z_FINISH, opts.chunkSize) {\n if (opts.chunkSize < exports.Z_MIN_CHUNK || opts.chunkSize > exports.Z_MAX_CHUNK)\n throw new Error(\"Invalid chunk size: \" + opts.chunkSize);\n }\n if (opts.windowBits) {\n if (opts.windowBits < exports.Z_MIN_WINDOWBITS || opts.windowBits > exports.Z_MAX_WINDOWBITS)\n throw new Error(\"Invalid windowBits: \" + opts.windowBits);\n }\n if (opts.level) {\n if (opts.level < exports.Z_MIN_LEVEL || opts.level > exports.Z_MAX_LEVEL)\n throw new Error(\"Invalid compression level: \" + opts.level);\n }\n if (opts.memLevel) {\n if (opts.memLevel < exports.Z_MIN_MEMLEVEL || opts.memLevel > exports.Z_MAX_MEMLEVEL)\n throw new Error(\"Invalid memLevel: \" + opts.memLevel);\n }\n if (opts.strategy) {\n if (opts.strategy != exports.Z_FILTERED && opts.strategy != exports.Z_HUFFMAN_ONLY && opts.strategy != exports.Z_RLE && opts.strategy != exports.Z_FIXED && opts.strategy != exports.Z_DEFAULT_STRATEGY)\n throw new Error(\"Invalid strategy: \" + opts.strategy);\n }\n if (opts.dictionary) {\n if (!Buffer2.isBuffer(opts.dictionary))\n throw new Error(\"Invalid dictionary: it should be a Buffer instance\");\n }\n this._handle = new binding.Zlib(mode);\n var self = this;\n this._hadError = !1, this._handle.onerror = function(message, errno) {\n _close(self), self._hadError = !0;\n var error = new Error(message);\n error.errno = errno, error.code = exports.codes[errno], self.emit(\"error\", error);\n };\n var level = exports.Z_DEFAULT_COMPRESSION;\n if (typeof opts.level === \"number\")\n level = opts.level;\n var strategy = exports.Z_DEFAULT_STRATEGY;\n if (typeof opts.strategy === \"number\")\n strategy = opts.strategy;\n this._handle.init(opts.windowBits || exports.Z_DEFAULT_WINDOWBITS, level, opts.memLevel || exports.Z_DEFAULT_MEMLEVEL, strategy, opts.dictionary), this._buffer = Buffer2.allocUnsafe(this._chunkSize), this._offset = 0, this._level = level, this._strategy = strategy, this.once(\"end\", this.close), Object.defineProperty(this, \"_closed\", {\n get: function() {\n return !_this._handle;\n },\n configurable: !0,\n enumerable: !0\n });\n }\n util.inherits(Zlib, Transform), Zlib.prototype.params = function(level, strategy, callback) {\n if (level < exports.Z_MIN_LEVEL || level > exports.Z_MAX_LEVEL)\n @throwRangeError(\"Invalid compression level: \" + level);\n if (strategy != exports.Z_FILTERED && strategy != exports.Z_HUFFMAN_ONLY && strategy != exports.Z_RLE && strategy != exports.Z_FIXED && strategy != exports.Z_DEFAULT_STRATEGY)\n @throwTypeError(\"Invalid strategy: \" + strategy);\n if (this._level !== level || this._strategy !== strategy) {\n var self = this;\n this.flush(binding.Z_SYNC_FLUSH, function() {\n if (assert(self._handle, \"zlib binding closed\"), self._handle.params(level, strategy), !self._hadError) {\n if (self._level = level, self._strategy = strategy, callback)\n callback();\n }\n });\n } else\n process.nextTick(callback);\n }, Zlib.prototype.reset = function() {\n return assert(this._handle, \"zlib binding closed\"), this._handle.reset();\n }, Zlib.prototype._flush = function(callback) {\n this._transform(Buffer2.alloc(0), \"\", callback);\n }, Zlib.prototype.flush = function(kind, callback) {\n var _this2 = this, ws = this._writableState;\n if (typeof kind === \"function\" || kind === void 0 && !callback)\n callback = kind, kind = binding.Z_FULL_FLUSH;\n if (ws.ended) {\n if (callback)\n process.nextTick(callback);\n } else if (ws.ending) {\n if (callback)\n this.once(\"end\", callback);\n } else if (ws.needDrain) {\n if (callback)\n this.once(\"drain\", function() {\n return _this2.flush(kind, callback);\n });\n } else\n this._flushFlag = kind, this.write(Buffer2.alloc(0), \"\", callback);\n }, Zlib.prototype.close = function(callback) {\n _close(this, callback), process.nextTick(emitCloseNT, this);\n };\n function _close(engine, callback) {\n if (callback)\n process.nextTick(callback);\n if (!engine._handle)\n return;\n engine._handle.close(), engine._handle = null;\n }\n function emitCloseNT(self) {\n self.emit(\"close\");\n }\n Zlib.prototype._transform = function(chunk, encoding, cb) {\n var flushFlag, ws = this._writableState, ending = ws.ending || ws.ended, last = ending && (!chunk || ws.length === chunk.length);\n if (chunk !== null && !Buffer2.isBuffer(chunk))\n return cb(new Error(\"invalid input\"));\n if (!this._handle)\n return cb(new Error(\"zlib binding closed\"));\n if (last)\n flushFlag = this._finishFlushFlag;\n else if (flushFlag = this._flushFlag, chunk.length >= ws.length)\n this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH;\n this._processChunk(chunk, flushFlag, cb);\n }, Zlib.prototype._processChunk = function(chunk, flushFlag, cb) {\n var availInBefore = chunk && chunk.length, availOutBefore = this._chunkSize - this._offset, inOff = 0, self = this, async = typeof cb === \"function\";\n if (!async) {\n var buffers = [], nread = 0, error;\n this.on(\"error\", function(er) {\n error = er;\n }), assert(this._handle, \"zlib binding closed\");\n do\n var res = this._handle.writeSync(flushFlag, chunk, inOff, availInBefore, this._buffer, this._offset, availOutBefore);\n while (!this._hadError && callback(res[0], res[1]));\n if (this._hadError)\n throw error;\n if (nread >= kMaxLength)\n _close(this), @throwRangeError(kRangeErrorMessage);\n var buf = Buffer2.concat(buffers, nread);\n return _close(this), buf;\n }\n assert(this._handle, \"zlib binding closed\");\n var req = this._handle.write(flushFlag, chunk, inOff, availInBefore, this._buffer, this._offset, availOutBefore);\n req.buffer = chunk, req.callback = callback;\n function callback(availInAfter, availOutAfter) {\n if (this)\n this.buffer = null, this.callback = null;\n if (self._hadError)\n return;\n var have = availOutBefore - availOutAfter;\n if (assert(have >= 0, \"have should not go down\"), have > 0) {\n var out = self._buffer.slice(self._offset, self._offset + have);\n if (self._offset += have, async)\n self.push(out);\n else\n buffers.push(out), nread += out.length;\n }\n if (availOutAfter === 0 || self._offset >= self._chunkSize)\n availOutBefore = self._chunkSize, self._offset = 0, self._buffer = Buffer2.allocUnsafe(self._chunkSize);\n if (availOutAfter === 0) {\n if (inOff += availInBefore - availInAfter, availInBefore = availInAfter, !async)\n return !0;\n var newReq = self._handle.write(flushFlag, chunk, inOff, availInBefore, self._buffer, self._offset, self._chunkSize);\n newReq.callback = callback, newReq.buffer = chunk;\n return;\n }\n if (!async)\n return !1;\n cb();\n }\n }, util.inherits(Deflate, Zlib), util.inherits(Inflate, Zlib), util.inherits(Gzip, Zlib), util.inherits(Gunzip, Zlib), util.inherits(DeflateRaw, Zlib), util.inherits(InflateRaw, Zlib), util.inherits(Unzip, Zlib);\n }\n});\nreturn require_lib()})\n"_s;
//
//
@@ -315,7 +315,7 @@ static constexpr ASCIILiteral NodeFSPromisesCode = "(function (){\"use strict\";
//
//
-static constexpr ASCIILiteral NodeHttpCode = "(function (){\"use strict\";// src/js/out/tmp/node/http.ts\nvar checkInvalidHeaderChar = function(val) {\n return RegExpPrototypeExec.call(headerCharRegex, val) !== null;\n}, isIPv6 = function(input) {\n return new RegExp(\"^((\?:(\?:[0-9a-fA-F]{1,4}):){7}(\?:(\?:[0-9a-fA-F]{1,4})|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){6}(\?:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|:(\?:[0-9a-fA-F]{1,4})|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){5}(\?::((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,2}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){4}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,1}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,3}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){3}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,2}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,4}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){2}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,3}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,5}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){1}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,4}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,6}|:)|(\?::((\?::(\?:[0-9a-fA-F]{1,4})){0,5}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(\?::(\?:[0-9a-fA-F]{1,4})){1,7}|:)))(%[0-9a-zA-Z-.:]{1,})\?$\").test(input);\n}, isValidTLSArray = function(obj) {\n if (typeof obj === \"string\" || isTypedArray(obj) || obj instanceof ArrayBuffer || obj instanceof Blob)\n return !0;\n if (Array.isArray(obj)) {\n for (var i = 0;i < obj.length; i++)\n if (typeof obj !== \"string\" && !isTypedArray(obj) && !(obj instanceof ArrayBuffer) && !(obj instanceof Blob))\n return !1;\n return !0;\n }\n}, validateMsecs = function(numberlike, field) {\n if (typeof numberlike !== \"number\" || numberlike < 0)\n throw new ERR_INVALID_ARG_TYPE(field, \"number\", numberlike);\n return numberlike;\n}, validateFunction = function(callable, field) {\n if (typeof callable !== \"function\")\n throw new ERR_INVALID_ARG_TYPE(field, \"Function\", callable);\n return callable;\n}, getHeader = function(headers, name) {\n if (!headers)\n return;\n const result = headers.get(name);\n return result == null \? void 0 : result;\n}, createServer = function(options, callback) {\n return new Server(options, callback);\n}, emitListeningNextTick = function(self, onListen, err, hostname, port) {\n if (typeof onListen === \"function\")\n try {\n onListen(err, hostname, port);\n } catch (err2) {\n self.emit(\"error\", err2);\n }\n if (self.listening = !err, err)\n self.emit(\"error\", err);\n else\n self.emit(\"listening\", hostname, port);\n}, assignHeaders = function(object, req) {\n var headers = req.headers.toJSON();\n const rawHeaders = @newArrayWithSize(req.headers.count * 2);\n var i = 0;\n for (let key in headers)\n rawHeaders[i++] = key, rawHeaders[i++] = headers[key];\n object.headers = headers, object.rawHeaders = rawHeaders;\n};\nvar getDefaultHTTPSAgent = function() {\n return _defaultHTTPSAgent \?\?= new Agent({ defaultPort: 443, protocol: \"https:\" });\n};\nvar urlToHttpOptions = function(url) {\n var { protocol, hostname, hash, search, pathname, href, port, username, password } = url;\n return {\n protocol,\n hostname: typeof hostname === \"string\" && StringPrototypeStartsWith.call(hostname, \"[\") \? StringPrototypeSlice.call(hostname, 1, -1) : hostname,\n hash,\n search,\n pathname,\n path: `${pathname || \"\"}${search || \"\"}`,\n href,\n port: port \? Number(port) : protocol === \"https:\" \? 443 : protocol === \"http:\" \? 80 : void 0,\n auth: username || password \? `${decodeURIComponent(username)}:${decodeURIComponent(password)}` : void 0\n };\n}, validateHost = function(host, name) {\n if (host !== null && host !== void 0 && typeof host !== \"string\")\n throw new Error(\"Invalid arg type in options\");\n return host;\n}, checkIsHttpToken = function(val) {\n return RegExpPrototypeExec.call(tokenRegExp, val) !== null;\n};\nvar _writeHead = function(statusCode, reason, obj, response) {\n if (statusCode |= 0, statusCode < 100 || statusCode > 999)\n throw new Error(\"status code must be between 100 and 999\");\n if (typeof reason === \"string\")\n response.statusMessage = reason;\n else {\n if (!response.statusMessage)\n response.statusMessage = STATUS_CODES[statusCode] || \"unknown\";\n obj = reason;\n }\n response.statusCode = statusCode;\n {\n let k;\n if (Array.isArray(obj)) {\n if (obj.length % 2 !== 0)\n throw new Error(\"raw headers must have an even number of elements\");\n for (let n = 0;n < obj.length; n += 2)\n if (k = obj[n + 0], k)\n response.setHeader(k, obj[n + 1]);\n } else if (obj) {\n const keys = Object.keys(obj);\n for (let i = 0;i < keys.length; i++)\n if (k = keys[i], k)\n response.setHeader(k, obj[k]);\n }\n }\n if (statusCode === 204 || statusCode === 304 || statusCode >= 100 && statusCode <= 199)\n response._hasBody = !1;\n}, request = function(url, options, cb) {\n return new ClientRequest(url, options, cb);\n}, get = function(url, options, cb) {\n const req = request(url, options, cb);\n return req.end(), req;\n}, $, EventEmitter = @getInternalField(@internalModuleRegistry, 16) || @createInternalModuleById(16), { isTypedArray } = @requireNativeModule(\"node:util/types\"), { Duplex, Readable, Writable } = @getInternalField(@internalModuleRegistry, 35) || @createInternalModuleById(35), headerCharRegex = /[^\\t\\x20-\\x7e\\x80-\\xff]/, validateHeaderName = (name, label) => {\n if (typeof name !== \"string\" || !name || !checkIsHttpToken(name))\n throw new Error(\"ERR_INVALID_HTTP_TOKEN\");\n}, validateHeaderValue = (name, value) => {\n if (value === void 0)\n throw new Error(\"ERR_HTTP_INVALID_HEADER_VALUE\");\n if (checkInvalidHeaderChar(value))\n throw new Error(\"ERR_INVALID_CHAR\");\n}, { URL } = globalThis, globalReportError = globalThis.reportError, setTimeout = globalThis.setTimeout, fetch = Bun.fetch;\nvar kEmptyObject = Object.freeze(Object.create(null)), kOutHeaders = Symbol.for(\"kOutHeaders\"), kEndCalled = Symbol.for(\"kEndCalled\"), kAbortController = Symbol.for(\"kAbortController\"), kClearTimeout = Symbol(\"kClearTimeout\"), kCorked = Symbol.for(\"kCorked\"), searchParamsSymbol = Symbol.for(\"query\"), StringPrototypeSlice = String.prototype.slice, StringPrototypeStartsWith = String.prototype.startsWith, StringPrototypeToUpperCase = String.prototype.toUpperCase, StringPrototypeIncludes = String.prototype.includes, StringPrototypeCharCodeAt = String.prototype.charCodeAt, StringPrototypeIndexOf = String.prototype.indexOf, ArrayIsArray = Array.isArray, RegExpPrototypeExec = RegExp.prototype.exec, ObjectAssign = Object.assign;\nvar INVALID_PATH_REGEX = /[^\\u0021-\\u00ff]/;\nvar _defaultHTTPSAgent, kInternalRequest = Symbol(\"kInternalRequest\"), kInternalSocketData = Symbol.for(\"::bunternal::\"), kEmptyBuffer = Buffer.alloc(0);\n\nclass ERR_INVALID_ARG_TYPE extends TypeError {\n constructor(name, expected, actual) {\n super(`The ${name} argument must be of type ${expected}. Received type ${typeof actual}`);\n this.code = \"ERR_INVALID_ARG_TYPE\";\n }\n}\nvar FakeSocket = class Socket extends Duplex {\n bytesRead = 0;\n bytesWritten = 0;\n connecting = !1;\n remoteAddress = null;\n remotePort;\n timeout = 0;\n isServer = !1;\n address() {\n return {\n address: this.localAddress,\n family: this.localFamily,\n port: this.localPort\n };\n }\n get bufferSize() {\n return this.writableLength;\n }\n connect(port, host, connectListener) {\n return this;\n }\n _destroy(err, callback) {\n }\n _final(callback) {\n }\n get localAddress() {\n return \"127.0.0.1\";\n }\n get localFamily() {\n return \"IPv4\";\n }\n get localPort() {\n return 80;\n }\n get pending() {\n return this.connecting;\n }\n _read(size) {\n }\n get readyState() {\n if (this.connecting)\n return \"opening\";\n if (this.readable)\n return this.writable \? \"open\" : \"readOnly\";\n else\n return this.writable \? \"writeOnly\" : \"closed\";\n }\n ref() {\n }\n get remoteFamily() {\n return \"IPv4\";\n }\n resetAndDestroy() {\n }\n setKeepAlive(enable = !1, initialDelay = 0) {\n }\n setNoDelay(noDelay = !0) {\n return this;\n }\n setTimeout(timeout, callback) {\n return this;\n }\n unref() {\n }\n _write(chunk, encoding, callback) {\n }\n};\n\nclass Agent extends EventEmitter {\n defaultPort = 80;\n protocol = \"http:\";\n options;\n requests;\n sockets;\n freeSockets;\n keepAliveMsecs;\n keepAlive;\n maxSockets;\n maxFreeSockets;\n scheduling;\n maxTotalSockets;\n totalSocketCount;\n #fakeSocket;\n static get globalAgent() {\n return globalAgent;\n }\n static get defaultMaxSockets() {\n return Infinity;\n }\n constructor(options = kEmptyObject) {\n super();\n if (this.options = options = { ...options, path: null }, options.noDelay === void 0)\n options.noDelay = !0;\n this.requests = kEmptyObject, this.sockets = kEmptyObject, this.freeSockets = kEmptyObject, this.keepAliveMsecs = options.keepAliveMsecs || 1000, this.keepAlive = options.keepAlive || !1, this.maxSockets = options.maxSockets || Agent.defaultMaxSockets, this.maxFreeSockets = options.maxFreeSockets || 256, this.scheduling = options.scheduling || \"lifo\", this.maxTotalSockets = options.maxTotalSockets, this.totalSocketCount = 0, this.defaultPort = options.defaultPort || 80, this.protocol = options.protocol || \"http:\";\n }\n createConnection() {\n return this.#fakeSocket \?\?= new FakeSocket;\n }\n getName(options = kEmptyObject) {\n let name = `http:${options.host || \"localhost\"}:`;\n if (options.port)\n name += options.port;\n if (name += \":\", options.localAddress)\n name += options.localAddress;\n if (options.family === 4 || options.family === 6)\n name += `:${options.family}`;\n if (options.socketPath)\n name += `:${options.socketPath}`;\n return name;\n }\n addRequest() {\n }\n createSocket(req, options, cb) {\n cb(null, this.#fakeSocket \?\?= new FakeSocket);\n }\n removeSocket() {\n }\n keepSocketAlive() {\n return !0;\n }\n reuseSocket() {\n }\n destroy() {\n }\n}\n\nclass Server extends EventEmitter {\n #server;\n #options;\n #tls;\n #is_tls = !1;\n listening = !1;\n serverName;\n constructor(options, callback) {\n super();\n if (typeof options === \"function\")\n callback = options, options = {};\n else if (options == null || typeof options === \"object\") {\n options = { ...options }, this.#tls = null;\n let key = options.key;\n if (key) {\n if (!isValidTLSArray(key))\n @throwTypeError(\"key argument must be an string, Buffer, TypedArray, BunFile or an array containing string, Buffer, TypedArray or BunFile\");\n this.#is_tls = !0;\n }\n let cert = options.cert;\n if (cert) {\n if (!isValidTLSArray(cert))\n @throwTypeError(\"cert argument must be an string, Buffer, TypedArray, BunFile or an array containing string, Buffer, TypedArray or BunFile\");\n this.#is_tls = !0;\n }\n let ca = options.ca;\n if (ca) {\n if (!isValidTLSArray(ca))\n @throwTypeError(\"ca argument must be an string, Buffer, TypedArray, BunFile or an array containing string, Buffer, TypedArray or BunFile\");\n this.#is_tls = !0;\n }\n let passphrase = options.passphrase;\n if (passphrase && typeof passphrase !== \"string\")\n @throwTypeError(\"passphrase argument must be an string\");\n let serverName = options.servername;\n if (serverName && typeof serverName !== \"string\")\n @throwTypeError(\"servername argument must be an string\");\n let secureOptions = options.secureOptions || 0;\n if (secureOptions && typeof secureOptions !== \"number\")\n @throwTypeError(\"secureOptions argument must be an number\");\n if (this.#is_tls)\n this.#tls = {\n serverName,\n key,\n cert,\n ca,\n passphrase,\n secureOptions\n };\n else\n this.#tls = null;\n } else\n throw new Error(\"bun-http-polyfill: invalid arguments\");\n if (this.#options = options, callback)\n this.on(\"request\", callback);\n }\n closeAllConnections() {\n const server = this.#server;\n if (!server)\n return;\n this.#server = void 0, server.stop(!0), this.emit(\"close\");\n }\n closeIdleConnections() {\n }\n close(optionalCallback) {\n const server = this.#server;\n if (!server) {\n if (typeof optionalCallback === \"function\")\n process.nextTick(optionalCallback, new Error(\"Server is not running\"));\n return;\n }\n if (this.#server = void 0, typeof optionalCallback === \"function\")\n this.once(\"close\", optionalCallback);\n server.stop(), this.emit(\"close\");\n }\n address() {\n if (!this.#server)\n return null;\n const address = this.#server.hostname;\n return {\n address,\n family: isIPv6(address) \? \"IPv6\" : \"IPv4\",\n port: this.#server.port\n };\n }\n listen(port, host, backlog, onListen) {\n const server = this;\n if (typeof host === \"function\")\n onListen = host, host = void 0;\n if (typeof port === \"function\")\n onListen = port;\n else if (typeof port === \"object\") {\n if (port\?.signal\?.addEventListener(\"abort\", () => {\n this.close();\n }), host = port\?.host, port = port\?.port, typeof port\?.callback === \"function\")\n onListen = port\?.callback;\n }\n if (typeof backlog === \"function\")\n onListen = backlog;\n const ResponseClass = this.#options.ServerResponse || ServerResponse, RequestClass = this.#options.IncomingMessage || IncomingMessage;\n try {\n const tls = this.#tls;\n if (tls)\n this.serverName = tls.serverName || host || \"localhost\";\n this.#server = Bun.serve({\n tls,\n port,\n hostname: host,\n websocket: {\n open(ws) {\n ws.data.open(ws);\n },\n message(ws, message) {\n ws.data.message(ws, message);\n },\n close(ws, code, reason) {\n ws.data.close(ws, code, reason);\n },\n drain(ws) {\n ws.data.drain(ws);\n }\n },\n fetch(req, _server) {\n var pendingResponse, pendingError, rejectFunction, resolveFunction, reject = (err) => {\n if (pendingError)\n return;\n if (pendingError = err, rejectFunction)\n rejectFunction(err);\n }, reply = function(resp) {\n if (pendingResponse)\n return;\n if (pendingResponse = resp, resolveFunction)\n resolveFunction(resp);\n };\n const http_req = new RequestClass(req), http_res = new ResponseClass({ reply, req: http_req });\n if (http_req.once(\"error\", (err) => reject(err)), http_res.once(\"error\", (err) => reject(err)), req.headers.get(\"upgrade\")) {\n const socket = new FakeSocket;\n socket[kInternalSocketData] = [_server, http_res, req], server.emit(\"upgrade\", http_req, socket, kEmptyBuffer);\n } else\n server.emit(\"request\", http_req, http_res);\n if (pendingError)\n throw pendingError;\n if (pendingResponse)\n return pendingResponse;\n return new Promise((resolve, reject2) => {\n resolveFunction = resolve, rejectFunction = reject2;\n });\n }\n }), setTimeout(emitListeningNextTick, 1, this, onListen, null, this.#server.hostname, this.#server.port);\n } catch (err) {\n setTimeout(emitListeningNextTick, 1, this, onListen, err);\n }\n return this;\n }\n setTimeout(msecs, callback) {\n }\n}\nclass IncomingMessage extends Readable {\n method;\n complete;\n constructor(req, defaultIncomingOpts) {\n const method = req.method;\n super();\n const url = new URL(req.url);\n var { type = \"request\", [kInternalRequest]: nodeReq } = defaultIncomingOpts || {};\n this.#noBody = type === \"request\" \? method === \"GET\" || method === \"HEAD\" || method === \"TRACE\" || method === \"CONNECT\" || method === \"OPTIONS\" || (parseInt(req.headers.get(\"Content-Length\") || \"\") || 0) === 0 : !1, this.#req = req, this.method = method, this.#type = type, this.complete = !!this.#noBody, this.#bodyStream = void 0;\n const socket = new FakeSocket;\n socket.remoteAddress = url.hostname, socket.remotePort = url.port, this.#fakeSocket = socket, this.url = url.pathname + url.search, this.#nodeReq = this.req = nodeReq, assignHeaders(this, req);\n }\n headers;\n rawHeaders;\n _consuming = !1;\n _dumped = !1;\n #bodyStream;\n #fakeSocket;\n #noBody = !1;\n #aborted = !1;\n #req;\n url;\n #type;\n #nodeReq;\n _construct(callback) {\n if (this.#type === \"response\" || this.#noBody) {\n callback();\n return;\n }\n const contentLength = this.#req.headers.get(\"content-length\");\n if ((contentLength \? parseInt(contentLength, 10) : 0) === 0) {\n this.#noBody = !0, callback();\n return;\n }\n callback();\n }\n async#consumeStream(reader) {\n while (!0) {\n var { done, value } = await reader.readMany();\n if (this.#aborted)\n return;\n if (done) {\n this.push(null), this.destroy();\n break;\n }\n for (var v of value)\n this.push(v);\n }\n }\n _read(size) {\n if (this.#noBody)\n this.push(null), this.complete = !0;\n else if (this.#bodyStream == null) {\n const reader = this.#req.body\?.getReader();\n if (!reader) {\n this.push(null);\n return;\n }\n this.#bodyStream = reader, this.#consumeStream(reader);\n }\n }\n get aborted() {\n return this.#aborted;\n }\n #abort() {\n if (this.#aborted)\n return;\n this.#aborted = !0;\n var bodyStream = this.#bodyStream;\n if (!bodyStream)\n return;\n bodyStream.cancel(), this.complete = !0, this.#bodyStream = void 0, this.push(null);\n }\n get connection() {\n return this.#fakeSocket;\n }\n get statusCode() {\n return this.#req.status;\n }\n get statusMessage() {\n return STATUS_CODES[this.#req.status];\n }\n get httpVersion() {\n return \"1.1\";\n }\n get rawTrailers() {\n return [];\n }\n get httpVersionMajor() {\n return 1;\n }\n get httpVersionMinor() {\n return 1;\n }\n get trailers() {\n return kEmptyObject;\n }\n get socket() {\n return this.#fakeSocket \?\?= new FakeSocket;\n }\n set socket(val) {\n this.#fakeSocket = val;\n }\n setTimeout(msecs, callback) {\n throw new Error(\"not implemented\");\n }\n}\n\nclass OutgoingMessage extends Writable {\n constructor() {\n super(...arguments);\n }\n #headers;\n headersSent = !1;\n sendDate = !0;\n req;\n timeout;\n #finished = !1;\n [kEndCalled] = !1;\n #fakeSocket;\n #timeoutTimer;\n [kAbortController] = null;\n _implicitHeader() {\n }\n get headers() {\n if (!this.#headers)\n return kEmptyObject;\n return this.#headers.toJSON();\n }\n get shouldKeepAlive() {\n return !0;\n }\n get chunkedEncoding() {\n return !1;\n }\n set chunkedEncoding(value) {\n }\n set shouldKeepAlive(value) {\n }\n get useChunkedEncodingByDefault() {\n return !0;\n }\n set useChunkedEncodingByDefault(value) {\n }\n get socket() {\n return this.#fakeSocket \?\?= new FakeSocket;\n }\n set socket(val) {\n this.#fakeSocket = val;\n }\n get connection() {\n return this.socket;\n }\n get finished() {\n return this.#finished;\n }\n appendHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n headers.append(name, value);\n }\n flushHeaders() {\n }\n getHeader(name) {\n return getHeader(this.#headers, name);\n }\n getHeaders() {\n if (!this.#headers)\n return kEmptyObject;\n return this.#headers.toJSON();\n }\n getHeaderNames() {\n var headers = this.#headers;\n if (!headers)\n return [];\n return Array.from(headers.keys());\n }\n removeHeader(name) {\n if (!this.#headers)\n return;\n this.#headers.delete(name);\n }\n setHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n return headers.set(name, value), this;\n }\n hasHeader(name) {\n if (!this.#headers)\n return !1;\n return this.#headers.has(name);\n }\n addTrailers(headers) {\n throw new Error(\"not implemented\");\n }\n [kClearTimeout]() {\n if (this.#timeoutTimer)\n clearTimeout(this.#timeoutTimer), this.removeAllListeners(\"timeout\"), this.#timeoutTimer = void 0;\n }\n #onTimeout() {\n this.#timeoutTimer = void 0, this[kAbortController]\?.abort(), this.emit(\"timeout\");\n }\n setTimeout(msecs, callback) {\n if (this.destroyed)\n return this;\n if (this.timeout = msecs = validateMsecs(msecs, \"msecs\"), clearTimeout(this.#timeoutTimer), msecs === 0) {\n if (callback !== void 0)\n validateFunction(callback, \"callback\"), this.removeListener(\"timeout\", callback);\n this.#timeoutTimer = void 0;\n } else if (this.#timeoutTimer = setTimeout(this.#onTimeout.bind(this), msecs).unref(), callback !== void 0)\n validateFunction(callback, \"callback\"), this.once(\"timeout\", callback);\n return this;\n }\n}\nvar OriginalWriteHeadFn, OriginalImplicitHeadFn;\n\nclass ServerResponse extends Writable {\n constructor({ req, reply }) {\n super();\n if (this.req = req, this._reply = reply, this.sendDate = !0, this.statusCode = 200, this.headersSent = !1, this.statusMessage = void 0, this.#controller = void 0, this.#firstWrite = void 0, this._writableState.decodeStrings = !1, this.#deferred = void 0, req.method === \"HEAD\")\n this._hasBody = !1;\n }\n req;\n _reply;\n sendDate;\n statusCode;\n #headers;\n headersSent = !1;\n statusMessage;\n #controller;\n #firstWrite;\n _sent100 = !1;\n _defaultKeepAlive = !1;\n _removedConnection = !1;\n _removedContLen = !1;\n _hasBody = !0;\n #deferred = void 0;\n #finished = !1;\n _implicitHeader() {\n this.writeHead(this.statusCode);\n }\n _write(chunk, encoding, callback) {\n if (!this.#firstWrite && !this.headersSent) {\n this.#firstWrite = chunk, callback();\n return;\n }\n this.#ensureReadableStreamController((controller) => {\n controller.write(chunk), callback();\n });\n }\n _writev(chunks, callback) {\n if (chunks.length === 1 && !this.headersSent && !this.#firstWrite) {\n this.#firstWrite = chunks[0].chunk, callback();\n return;\n }\n this.#ensureReadableStreamController((controller) => {\n for (let chunk of chunks)\n controller.write(chunk.chunk);\n callback();\n });\n }\n #ensureReadableStreamController(run) {\n var thisController = this.#controller;\n if (thisController)\n return run(thisController);\n this.headersSent = !0;\n var firstWrite = this.#firstWrite;\n this.#firstWrite = void 0, this._reply(new Response(new ReadableStream({\n type: \"direct\",\n pull: (controller) => {\n if (this.#controller = controller, firstWrite)\n controller.write(firstWrite);\n if (firstWrite = void 0, run(controller), !this.#finished)\n return new Promise((resolve) => {\n this.#deferred = resolve;\n });\n }\n }), {\n headers: this.#headers,\n status: this.statusCode,\n statusText: this.statusMessage \?\? STATUS_CODES[this.statusCode]\n }));\n }\n #drainHeadersIfObservable() {\n if (this._implicitHeader === OriginalImplicitHeadFn && this.writeHead === OriginalWriteHeadFn)\n return;\n this._implicitHeader();\n }\n _final(callback) {\n if (!this.headersSent) {\n var data = this.#firstWrite || \"\";\n this.#firstWrite = void 0, this.#finished = !0, this.#drainHeadersIfObservable(), this._reply(new Response(data, {\n headers: this.#headers,\n status: this.statusCode,\n statusText: this.statusMessage \?\? STATUS_CODES[this.statusCode]\n })), callback && callback();\n return;\n }\n this.#finished = !0, this.#ensureReadableStreamController((controller) => {\n controller.end(), callback();\n var deferred = this.#deferred;\n if (deferred)\n this.#deferred = void 0, deferred();\n });\n }\n writeProcessing() {\n throw new Error(\"not implemented\");\n }\n addTrailers(headers) {\n throw new Error(\"not implemented\");\n }\n assignSocket(socket) {\n throw new Error(\"not implemented\");\n }\n detachSocket(socket) {\n throw new Error(\"not implemented\");\n }\n writeContinue(callback) {\n throw new Error(\"not implemented\");\n }\n setTimeout(msecs, callback) {\n throw new Error(\"not implemented\");\n }\n get shouldKeepAlive() {\n return !0;\n }\n get chunkedEncoding() {\n return !1;\n }\n set chunkedEncoding(value) {\n }\n set shouldKeepAlive(value) {\n }\n get useChunkedEncodingByDefault() {\n return !0;\n }\n set useChunkedEncodingByDefault(value) {\n }\n appendHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n headers.append(name, value);\n }\n flushHeaders() {\n }\n getHeader(name) {\n return getHeader(this.#headers, name);\n }\n getHeaders() {\n var headers = this.#headers;\n if (!headers)\n return kEmptyObject;\n return headers.toJSON();\n }\n getHeaderNames() {\n var headers = this.#headers;\n if (!headers)\n return [];\n return Array.from(headers.keys());\n }\n removeHeader(name) {\n if (!this.#headers)\n return;\n this.#headers.delete(name);\n }\n setHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n return headers.set(name, value), this;\n }\n hasHeader(name) {\n if (!this.#headers)\n return !1;\n return this.#headers.has(name);\n }\n writeHead(statusCode, statusMessage, headers) {\n return _writeHead(statusCode, statusMessage, headers, this), this;\n }\n}\nOriginalWriteHeadFn = ServerResponse.prototype.writeHead;\nOriginalImplicitHeadFn = ServerResponse.prototype._implicitHeader;\n\nclass ClientRequest extends OutgoingMessage {\n #timeout;\n #res = null;\n #upgradeOrConnect = !1;\n #parser = null;\n #maxHeadersCount = null;\n #reusedSocket = !1;\n #host;\n #protocol;\n #method;\n #port;\n #useDefaultPort;\n #joinDuplicateHeaders;\n #maxHeaderSize;\n #agent = globalAgent;\n #path;\n #socketPath;\n #bodyChunks = null;\n #fetchRequest;\n #signal = null;\n [kAbortController] = null;\n #timeoutTimer = void 0;\n #options;\n #finished;\n get path() {\n return this.#path;\n }\n get port() {\n return this.#port;\n }\n get method() {\n return this.#method;\n }\n get host() {\n return this.#host;\n }\n get protocol() {\n return this.#protocol;\n }\n _write(chunk, encoding, callback) {\n if (!this.#bodyChunks) {\n this.#bodyChunks = [chunk], callback();\n return;\n }\n this.#bodyChunks.push(chunk), callback();\n }\n _writev(chunks, callback) {\n if (!this.#bodyChunks) {\n this.#bodyChunks = chunks, callback();\n return;\n }\n this.#bodyChunks.push(...chunks), callback();\n }\n _final(callback) {\n if (this.#finished = !0, this[kAbortController] = new AbortController, this[kAbortController].signal.addEventListener(\"abort\", () => {\n this[kClearTimeout]();\n }), this.#signal\?.aborted)\n this[kAbortController].abort();\n var method = this.#method, body = this.#bodyChunks\?.length === 1 \? this.#bodyChunks[0] : Buffer.concat(this.#bodyChunks || []);\n let url, proxy;\n if (this.#path.startsWith(\"http://\") || this.#path.startsWith(\"https://\"))\n url = this.#path, proxy = `${this.#protocol}//${this.#host}${this.#useDefaultPort \? \"\" : \":\" + this.#port}`;\n else\n url = `${this.#protocol}//${this.#host}${this.#useDefaultPort \? \"\" : \":\" + this.#port}${this.#path}`;\n try {\n this.#fetchRequest = fetch(url, {\n method,\n headers: this.getHeaders(),\n body: body && method !== \"GET\" && method !== \"HEAD\" && method !== \"OPTIONS\" \? body : void 0,\n redirect: \"manual\",\n verbose: !1,\n signal: this[kAbortController].signal,\n proxy,\n timeout: !1\n }).then((response) => {\n var res = this.#res = new IncomingMessage(response, {\n type: \"response\",\n [kInternalRequest]: this\n });\n this.emit(\"response\", res);\n }).catch((err) => {\n this.emit(\"error\", err);\n }).finally(() => {\n this.#fetchRequest = null, this[kClearTimeout]();\n });\n } catch (err) {\n this.emit(\"error\", err);\n } finally {\n callback();\n }\n }\n get aborted() {\n return this.#signal\?.aborted || !!this[kAbortController]\?.signal.aborted;\n }\n abort() {\n if (this.aborted)\n return;\n this[kAbortController].abort();\n }\n constructor(input, options, cb) {\n super();\n if (typeof input === \"string\") {\n const urlStr = input;\n try {\n var urlObject = new URL(urlStr);\n } catch (e) {\n @throwTypeError(`Invalid URL: ${urlStr}`);\n }\n input = urlToHttpOptions(urlObject);\n } else if (input && typeof input === \"object\" && input instanceof URL)\n input = urlToHttpOptions(input);\n else\n cb = options, options = input, input = null;\n if (typeof options === \"function\")\n cb = options, options = input || kEmptyObject;\n else\n options = ObjectAssign(input || {}, options);\n var defaultAgent = options._defaultAgent || Agent.globalAgent;\n let protocol = options.protocol;\n if (!protocol)\n if (options.port === 443)\n protocol = \"https:\";\n else\n protocol = defaultAgent.protocol || \"http:\";\n switch (this.#protocol = protocol, this.#agent\?.protocol) {\n case void 0:\n break;\n case \"http:\":\n if (protocol === \"https:\") {\n defaultAgent = this.#agent = getDefaultHTTPSAgent();\n break;\n }\n case \"https:\":\n if (protocol === \"https\") {\n defaultAgent = this.#agent = Agent.globalAgent;\n break;\n }\n default:\n break;\n }\n if (options.path) {\n const path = String(options.path);\n if (RegExpPrototypeExec.call(INVALID_PATH_REGEX, path) !== null)\n throw new Error(\"Path contains unescaped characters\");\n }\n if (protocol !== \"http:\" && protocol !== \"https:\" && protocol) {\n const expectedProtocol = defaultAgent\?.protocol \?\? \"http:\";\n throw new Error(`Protocol mismatch. Expected: ${expectedProtocol}. Got: ${protocol}`);\n }\n const defaultPort = protocol === \"https:\" \? 443 : 80;\n this.#port = options.port || options.defaultPort || this.#agent\?.defaultPort || defaultPort, this.#useDefaultPort = this.#port === defaultPort;\n const host = this.#host = options.host = validateHost(options.hostname, \"hostname\") || validateHost(options.host, \"host\") || \"localhost\";\n this.#socketPath = options.socketPath;\n const signal = options.signal;\n if (signal)\n signal.addEventListener(\"abort\", () => {\n this[kAbortController]\?.abort();\n }), this.#signal = signal;\n let method = options.method;\n const methodIsString = typeof method === \"string\";\n if (method !== null && method !== void 0 && !methodIsString)\n throw new Error(\"ERR_INVALID_ARG_TYPE: options.method\");\n if (methodIsString && method) {\n if (!checkIsHttpToken(method))\n throw new Error(\"ERR_INVALID_HTTP_TOKEN: Method\");\n method = this.#method = StringPrototypeToUpperCase.call(method);\n } else\n method = this.#method = \"GET\";\n const _maxHeaderSize = options.maxHeaderSize;\n this.#maxHeaderSize = _maxHeaderSize;\n var _joinDuplicateHeaders = options.joinDuplicateHeaders;\n if (this.#joinDuplicateHeaders = _joinDuplicateHeaders, this.#path = options.path || \"/\", cb)\n this.once(\"response\", cb);\n this.#finished = !1, this.#res = null, this.#upgradeOrConnect = !1, this.#parser = null, this.#maxHeadersCount = null, this.#reusedSocket = !1, this.#host = host, this.#protocol = protocol;\n var timeout = options.timeout;\n if (timeout !== void 0 && timeout !== 0)\n this.setTimeout(timeout, void 0);\n if (!ArrayIsArray(headers)) {\n var headers = options.headers;\n if (headers)\n for (let key in headers)\n this.setHeader(key, headers[key]);\n var auth = options.auth;\n if (auth && !this.getHeader(\"Authorization\"))\n this.setHeader(\"Authorization\", \"Basic \" + Buffer.from(auth).toString(\"base64\"));\n }\n var { signal: _signal, ...optsWithoutSignal } = options;\n this.#options = optsWithoutSignal;\n }\n setSocketKeepAlive(enable = !0, initialDelay = 0) {\n }\n setNoDelay(noDelay = !0) {\n }\n [kClearTimeout]() {\n if (this.#timeoutTimer)\n clearTimeout(this.#timeoutTimer), this.#timeoutTimer = void 0, this.removeAllListeners(\"timeout\");\n }\n #onTimeout() {\n this.#timeoutTimer = void 0, this[kAbortController]\?.abort(), this.emit(\"timeout\");\n }\n setTimeout(msecs, callback) {\n if (this.destroyed)\n return this;\n if (this.timeout = msecs = validateMsecs(msecs, \"msecs\"), clearTimeout(this.#timeoutTimer), msecs === 0) {\n if (callback !== void 0)\n validateFunction(callback, \"callback\"), this.removeListener(\"timeout\", callback);\n this.#timeoutTimer = void 0;\n } else if (this.#timeoutTimer = setTimeout(this.#onTimeout.bind(this), msecs).unref(), callback !== void 0)\n validateFunction(callback, \"callback\"), this.once(\"timeout\", callback);\n return this;\n }\n}\nvar tokenRegExp = /^[\\^_`a-zA-Z\\-0-9!#$%&'*+.|~]+$/, METHODS = [\n \"ACL\",\n \"BIND\",\n \"CHECKOUT\",\n \"CONNECT\",\n \"COPY\",\n \"DELETE\",\n \"GET\",\n \"HEAD\",\n \"LINK\",\n \"LOCK\",\n \"M-SEARCH\",\n \"MERGE\",\n \"MKACTIVITY\",\n \"MKCALENDAR\",\n \"MKCOL\",\n \"MOVE\",\n \"NOTIFY\",\n \"OPTIONS\",\n \"PATCH\",\n \"POST\",\n \"PROPFIND\",\n \"PROPPATCH\",\n \"PURGE\",\n \"PUT\",\n \"REBIND\",\n \"REPORT\",\n \"SEARCH\",\n \"SOURCE\",\n \"SUBSCRIBE\",\n \"TRACE\",\n \"UNBIND\",\n \"UNLINK\",\n \"UNLOCK\",\n \"UNSUBSCRIBE\"\n], STATUS_CODES = {\n 100: \"Continue\",\n 101: \"Switching Protocols\",\n 102: \"Processing\",\n 103: \"Early Hints\",\n 200: \"OK\",\n 201: \"Created\",\n 202: \"Accepted\",\n 203: \"Non-Authoritative Information\",\n 204: \"No Content\",\n 205: \"Reset Content\",\n 206: \"Partial Content\",\n 207: \"Multi-Status\",\n 208: \"Already Reported\",\n 226: \"IM Used\",\n 300: \"Multiple Choices\",\n 301: \"Moved Permanently\",\n 302: \"Found\",\n 303: \"See Other\",\n 304: \"Not Modified\",\n 305: \"Use Proxy\",\n 307: \"Temporary Redirect\",\n 308: \"Permanent Redirect\",\n 400: \"Bad Request\",\n 401: \"Unauthorized\",\n 402: \"Payment Required\",\n 403: \"Forbidden\",\n 404: \"Not Found\",\n 405: \"Method Not Allowed\",\n 406: \"Not Acceptable\",\n 407: \"Proxy Authentication Required\",\n 408: \"Request Timeout\",\n 409: \"Conflict\",\n 410: \"Gone\",\n 411: \"Length Required\",\n 412: \"Precondition Failed\",\n 413: \"Payload Too Large\",\n 414: \"URI Too Long\",\n 415: \"Unsupported Media Type\",\n 416: \"Range Not Satisfiable\",\n 417: \"Expectation Failed\",\n 418: \"I'm a Teapot\",\n 421: \"Misdirected Request\",\n 422: \"Unprocessable Entity\",\n 423: \"Locked\",\n 424: \"Failed Dependency\",\n 425: \"Too Early\",\n 426: \"Upgrade Required\",\n 428: \"Precondition Required\",\n 429: \"Too Many Requests\",\n 431: \"Request Header Fields Too Large\",\n 451: \"Unavailable For Legal Reasons\",\n 500: \"Internal Server Error\",\n 501: \"Not Implemented\",\n 502: \"Bad Gateway\",\n 503: \"Service Unavailable\",\n 504: \"Gateway Timeout\",\n 505: \"HTTP Version Not Supported\",\n 506: \"Variant Also Negotiates\",\n 507: \"Insufficient Storage\",\n 508: \"Loop Detected\",\n 509: \"Bandwidth Limit Exceeded\",\n 510: \"Not Extended\",\n 511: \"Network Authentication Required\"\n}, globalAgent = new Agent;\n$ = {\n Agent,\n Server,\n METHODS,\n STATUS_CODES,\n createServer,\n ServerResponse,\n IncomingMessage,\n request,\n get,\n maxHeaderSize: 16384,\n validateHeaderName,\n validateHeaderValue,\n setMaxIdleHTTPParsers(max) {\n },\n globalAgent,\n ClientRequest,\n OutgoingMessage\n};\nreturn $})\n"_s;
+static constexpr ASCIILiteral NodeHttpCode = "(function (){\"use strict\";// src/js/out/tmp/node/http.ts\nvar checkInvalidHeaderChar = function(val) {\n return RegExpPrototypeExec.call(headerCharRegex, val) !== null;\n}, isIPv6 = function(input) {\n return new RegExp(\"^((\?:(\?:[0-9a-fA-F]{1,4}):){7}(\?:(\?:[0-9a-fA-F]{1,4})|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){6}(\?:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|:(\?:[0-9a-fA-F]{1,4})|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){5}(\?::((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,2}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){4}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,1}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,3}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){3}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,2}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,4}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){2}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,3}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,5}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){1}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,4}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,6}|:)|(\?::((\?::(\?:[0-9a-fA-F]{1,4})){0,5}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(\?::(\?:[0-9a-fA-F]{1,4})){1,7}|:)))(%[0-9a-zA-Z-.:]{1,})\?$\").test(input);\n}, isValidTLSArray = function(obj) {\n if (typeof obj === \"string\" || isTypedArray(obj) || obj instanceof ArrayBuffer || obj instanceof Blob)\n return !0;\n if (Array.isArray(obj)) {\n for (var i = 0;i < obj.length; i++)\n if (typeof obj !== \"string\" && !isTypedArray(obj) && !(obj instanceof ArrayBuffer) && !(obj instanceof Blob))\n return !1;\n return !0;\n }\n}, validateMsecs = function(numberlike, field) {\n if (typeof numberlike !== \"number\" || numberlike < 0)\n throw new ERR_INVALID_ARG_TYPE(field, \"number\", numberlike);\n return numberlike;\n}, validateFunction = function(callable, field) {\n if (typeof callable !== \"function\")\n throw new ERR_INVALID_ARG_TYPE(field, \"Function\", callable);\n return callable;\n}, getHeader = function(headers, name) {\n if (!headers)\n return;\n const result = headers.get(name);\n return result == null \? void 0 : result;\n}, createServer = function(options, callback) {\n return new Server(options, callback);\n}, emitListeningNextTick = function(self, onListen, err, hostname, port) {\n if (typeof onListen === \"function\")\n try {\n onListen(err, hostname, port);\n } catch (err2) {\n self.emit(\"error\", err2);\n }\n if (self.listening = !err, err)\n self.emit(\"error\", err);\n else\n self.emit(\"listening\", hostname, port);\n}, assignHeaders = function(object, req) {\n var headers = req.headers.toJSON();\n const rawHeaders = @newArrayWithSize(req.headers.count * 2);\n var i = 0;\n for (let key in headers)\n rawHeaders[i++] = key, rawHeaders[i++] = headers[key];\n object.headers = headers, object.rawHeaders = rawHeaders;\n};\nvar getDefaultHTTPSAgent = function() {\n return _defaultHTTPSAgent \?\?= new Agent({ defaultPort: 443, protocol: \"https:\" });\n};\nvar urlToHttpOptions = function(url) {\n var { protocol, hostname, hash, search, pathname, href, port, username, password } = url;\n return {\n protocol,\n hostname: typeof hostname === \"string\" && StringPrototypeStartsWith.call(hostname, \"[\") \? StringPrototypeSlice.call(hostname, 1, -1) : hostname,\n hash,\n search,\n pathname,\n path: `${pathname || \"\"}${search || \"\"}`,\n href,\n port: port \? Number(port) : protocol === \"https:\" \? 443 : protocol === \"http:\" \? 80 : void 0,\n auth: username || password \? `${decodeURIComponent(username)}:${decodeURIComponent(password)}` : void 0\n };\n}, validateHost = function(host, name) {\n if (host !== null && host !== void 0 && typeof host !== \"string\")\n throw new Error(\"Invalid arg type in options\");\n return host;\n}, checkIsHttpToken = function(val) {\n return RegExpPrototypeExec.call(tokenRegExp, val) !== null;\n};\nvar _writeHead = function(statusCode, reason, obj, response) {\n if (statusCode |= 0, statusCode < 100 || statusCode > 999)\n throw new Error(\"status code must be between 100 and 999\");\n if (typeof reason === \"string\")\n response.statusMessage = reason;\n else {\n if (!response.statusMessage)\n response.statusMessage = STATUS_CODES[statusCode] || \"unknown\";\n obj = reason;\n }\n response.statusCode = statusCode;\n {\n let k;\n if (Array.isArray(obj)) {\n if (obj.length % 2 !== 0)\n throw new Error(\"raw headers must have an even number of elements\");\n for (let n = 0;n < obj.length; n += 2)\n if (k = obj[n + 0], k)\n response.setHeader(k, obj[n + 1]);\n } else if (obj) {\n const keys = Object.keys(obj);\n for (let i = 0;i < keys.length; i++)\n if (k = keys[i], k)\n response.setHeader(k, obj[k]);\n }\n }\n if (statusCode === 204 || statusCode === 304 || statusCode >= 100 && statusCode <= 199)\n response._hasBody = !1;\n}, request = function(url, options, cb) {\n return new ClientRequest(url, options, cb);\n}, get = function(url, options, cb) {\n const req = request(url, options, cb);\n return req.end(), req;\n}, $, EventEmitter = @getInternalField(@internalModuleRegistry, 16) || @createInternalModuleById(16), { isTypedArray } = @requireNativeModule(\"node:util/types\"), { Duplex, Readable, Writable } = @getInternalField(@internalModuleRegistry, 35) || @createInternalModuleById(35), headerCharRegex = /[^\\t\\x20-\\x7e\\x80-\\xff]/, validateHeaderName = (name, label) => {\n if (typeof name !== \"string\" || !name || !checkIsHttpToken(name))\n throw new Error(\"ERR_INVALID_HTTP_TOKEN\");\n}, validateHeaderValue = (name, value) => {\n if (value === void 0)\n throw new Error(\"ERR_HTTP_INVALID_HEADER_VALUE\");\n if (checkInvalidHeaderChar(value))\n throw new Error(\"ERR_INVALID_CHAR\");\n}, { URL } = globalThis, globalReportError = globalThis.reportError, setTimeout = globalThis.setTimeout, fetch = Bun.fetch;\nvar kEmptyObject = Object.freeze(Object.create(null)), kOutHeaders = Symbol.for(\"kOutHeaders\"), kEndCalled = Symbol.for(\"kEndCalled\"), kAbortController = Symbol.for(\"kAbortController\"), kClearTimeout = Symbol(\"kClearTimeout\"), kCorked = Symbol.for(\"kCorked\"), searchParamsSymbol = Symbol.for(\"query\"), StringPrototypeSlice = String.prototype.slice, StringPrototypeStartsWith = String.prototype.startsWith, StringPrototypeToUpperCase = String.prototype.toUpperCase, StringPrototypeIncludes = String.prototype.includes, StringPrototypeCharCodeAt = String.prototype.charCodeAt, StringPrototypeIndexOf = String.prototype.indexOf, ArrayIsArray = Array.isArray, RegExpPrototypeExec = RegExp.prototype.exec, ObjectAssign = Object.assign;\nvar INVALID_PATH_REGEX = /[^\\u0021-\\u00ff]/;\nvar _defaultHTTPSAgent, kInternalRequest = Symbol(\"kInternalRequest\"), kInternalSocketData = Symbol.for(\"::bunternal::\"), kEmptyBuffer = Buffer.alloc(0);\n\nclass ERR_INVALID_ARG_TYPE extends TypeError {\n constructor(name, expected, actual) {\n super(`The ${name} argument must be of type ${expected}. Received type ${typeof actual}`);\n this.code = \"ERR_INVALID_ARG_TYPE\";\n }\n}\nvar FakeSocket = class Socket extends Duplex {\n bytesRead = 0;\n bytesWritten = 0;\n connecting = !1;\n remoteAddress = null;\n remotePort;\n timeout = 0;\n isServer = !1;\n address() {\n return {\n address: this.localAddress,\n family: this.localFamily,\n port: this.localPort\n };\n }\n get bufferSize() {\n return this.writableLength;\n }\n connect(port, host, connectListener) {\n return this;\n }\n _destroy(err, callback) {\n }\n _final(callback) {\n }\n get localAddress() {\n return \"127.0.0.1\";\n }\n get localFamily() {\n return \"IPv4\";\n }\n get localPort() {\n return 80;\n }\n get pending() {\n return this.connecting;\n }\n _read(size) {\n }\n get readyState() {\n if (this.connecting)\n return \"opening\";\n if (this.readable)\n return this.writable \? \"open\" : \"readOnly\";\n else\n return this.writable \? \"writeOnly\" : \"closed\";\n }\n ref() {\n }\n get remoteFamily() {\n return \"IPv4\";\n }\n resetAndDestroy() {\n }\n setKeepAlive(enable = !1, initialDelay = 0) {\n }\n setNoDelay(noDelay = !0) {\n return this;\n }\n setTimeout(timeout, callback) {\n return this;\n }\n unref() {\n }\n _write(chunk, encoding, callback) {\n }\n};\n\nclass Agent extends EventEmitter {\n defaultPort = 80;\n protocol = \"http:\";\n options;\n requests;\n sockets;\n freeSockets;\n keepAliveMsecs;\n keepAlive;\n maxSockets;\n maxFreeSockets;\n scheduling;\n maxTotalSockets;\n totalSocketCount;\n #fakeSocket;\n static get globalAgent() {\n return globalAgent;\n }\n static get defaultMaxSockets() {\n return Infinity;\n }\n constructor(options = kEmptyObject) {\n super();\n if (this.options = options = { ...options, path: null }, options.noDelay === void 0)\n options.noDelay = !0;\n this.requests = kEmptyObject, this.sockets = kEmptyObject, this.freeSockets = kEmptyObject, this.keepAliveMsecs = options.keepAliveMsecs || 1000, this.keepAlive = options.keepAlive || !1, this.maxSockets = options.maxSockets || Agent.defaultMaxSockets, this.maxFreeSockets = options.maxFreeSockets || 256, this.scheduling = options.scheduling || \"lifo\", this.maxTotalSockets = options.maxTotalSockets, this.totalSocketCount = 0, this.defaultPort = options.defaultPort || 80, this.protocol = options.protocol || \"http:\";\n }\n createConnection() {\n return this.#fakeSocket \?\?= new FakeSocket;\n }\n getName(options = kEmptyObject) {\n let name = `http:${options.host || \"localhost\"}:`;\n if (options.port)\n name += options.port;\n if (name += \":\", options.localAddress)\n name += options.localAddress;\n if (options.family === 4 || options.family === 6)\n name += `:${options.family}`;\n if (options.socketPath)\n name += `:${options.socketPath}`;\n return name;\n }\n addRequest() {\n }\n createSocket(req, options, cb) {\n cb(null, this.#fakeSocket \?\?= new FakeSocket);\n }\n removeSocket() {\n }\n keepSocketAlive() {\n return !0;\n }\n reuseSocket() {\n }\n destroy() {\n }\n}\n\nclass Server extends EventEmitter {\n #server;\n #options;\n #tls;\n #is_tls = !1;\n listening = !1;\n serverName;\n constructor(options, callback) {\n super();\n if (typeof options === \"function\")\n callback = options, options = {};\n else if (options == null || typeof options === \"object\") {\n options = { ...options }, this.#tls = null;\n let key = options.key;\n if (key) {\n if (!isValidTLSArray(key))\n @throwTypeError(\"key argument must be an string, Buffer, TypedArray, BunFile or an array containing string, Buffer, TypedArray or BunFile\");\n this.#is_tls = !0;\n }\n let cert = options.cert;\n if (cert) {\n if (!isValidTLSArray(cert))\n @throwTypeError(\"cert argument must be an string, Buffer, TypedArray, BunFile or an array containing string, Buffer, TypedArray or BunFile\");\n this.#is_tls = !0;\n }\n let ca = options.ca;\n if (ca) {\n if (!isValidTLSArray(ca))\n @throwTypeError(\"ca argument must be an string, Buffer, TypedArray, BunFile or an array containing string, Buffer, TypedArray or BunFile\");\n this.#is_tls = !0;\n }\n let passphrase = options.passphrase;\n if (passphrase && typeof passphrase !== \"string\")\n @throwTypeError(\"passphrase argument must be an string\");\n let serverName = options.servername;\n if (serverName && typeof serverName !== \"string\")\n @throwTypeError(\"servername argument must be an string\");\n let secureOptions = options.secureOptions || 0;\n if (secureOptions && typeof secureOptions !== \"number\")\n @throwTypeError(\"secureOptions argument must be an number\");\n if (this.#is_tls)\n this.#tls = {\n serverName,\n key,\n cert,\n ca,\n passphrase,\n secureOptions\n };\n else\n this.#tls = null;\n } else\n throw new Error(\"bun-http-polyfill: invalid arguments\");\n if (this.#options = options, callback)\n this.on(\"request\", callback);\n }\n closeAllConnections() {\n const server = this.#server;\n if (!server)\n return;\n this.#server = void 0, server.stop(!0), this.emit(\"close\");\n }\n closeIdleConnections() {\n }\n close(optionalCallback) {\n const server = this.#server;\n if (!server) {\n if (typeof optionalCallback === \"function\")\n process.nextTick(optionalCallback, new Error(\"Server is not running\"));\n return;\n }\n if (this.#server = void 0, typeof optionalCallback === \"function\")\n this.once(\"close\", optionalCallback);\n server.stop(), this.emit(\"close\");\n }\n address() {\n if (!this.#server)\n return null;\n const address = this.#server.hostname;\n return {\n address,\n family: isIPv6(address) \? \"IPv6\" : \"IPv4\",\n port: this.#server.port\n };\n }\n listen(port, host, backlog, onListen) {\n const server = this;\n if (typeof host === \"function\")\n onListen = host, host = void 0;\n if (typeof port === \"function\")\n onListen = port;\n else if (typeof port === \"object\") {\n if (port\?.signal\?.addEventListener(\"abort\", () => {\n this.close();\n }), host = port\?.host, port = port\?.port, typeof port\?.callback === \"function\")\n onListen = port\?.callback;\n }\n if (typeof backlog === \"function\")\n onListen = backlog;\n const ResponseClass = this.#options.ServerResponse || ServerResponse, RequestClass = this.#options.IncomingMessage || IncomingMessage;\n try {\n const tls = this.#tls;\n if (tls)\n this.serverName = tls.serverName || host || \"localhost\";\n this.#server = Bun.serve({\n tls,\n port,\n hostname: host,\n websocket: {\n open(ws) {\n ws.data.open(ws);\n },\n message(ws, message) {\n ws.data.message(ws, message);\n },\n close(ws, code, reason) {\n ws.data.close(ws, code, reason);\n },\n drain(ws) {\n ws.data.drain(ws);\n }\n },\n fetch(req, _server) {\n var pendingResponse, pendingError, rejectFunction, resolveFunction, reject = (err) => {\n if (pendingError)\n return;\n if (pendingError = err, rejectFunction)\n rejectFunction(err);\n }, reply = function(resp) {\n if (pendingResponse)\n return;\n if (pendingResponse = resp, resolveFunction)\n resolveFunction(resp);\n };\n const http_req = new RequestClass(req), http_res = new ResponseClass({ reply, req: http_req });\n if (http_req.once(\"error\", (err) => reject(err)), http_res.once(\"error\", (err) => reject(err)), req.headers.get(\"upgrade\")) {\n const socket = new FakeSocket;\n socket[kInternalSocketData] = [_server, http_res, req], server.emit(\"upgrade\", http_req, socket, kEmptyBuffer);\n } else\n server.emit(\"request\", http_req, http_res);\n if (pendingError)\n throw pendingError;\n if (pendingResponse)\n return pendingResponse;\n return new Promise((resolve, reject2) => {\n resolveFunction = resolve, rejectFunction = reject2;\n });\n }\n }), setTimeout(emitListeningNextTick, 1, this, onListen, null, this.#server.hostname, this.#server.port);\n } catch (err) {\n setTimeout(emitListeningNextTick, 1, this, onListen, err);\n }\n return this;\n }\n setTimeout(msecs, callback) {\n }\n}\nclass IncomingMessage extends Readable {\n method;\n complete;\n constructor(req, defaultIncomingOpts) {\n const method = req.method;\n super();\n const url = new URL(req.url);\n var { type = \"request\", [kInternalRequest]: nodeReq } = defaultIncomingOpts || {};\n this.#noBody = type === \"request\" \? method === \"GET\" || method === \"HEAD\" || method === \"TRACE\" || method === \"CONNECT\" || method === \"OPTIONS\" || (parseInt(req.headers.get(\"Content-Length\") || \"\") || 0) === 0 : !1, this.#req = req, this.method = method, this.#type = type, this.complete = !!this.#noBody, this.#bodyStream = void 0;\n const socket = new FakeSocket;\n socket.remoteAddress = url.hostname, socket.remotePort = url.port, this.#fakeSocket = socket, this.url = url.pathname + url.search, this.#nodeReq = this.req = nodeReq, assignHeaders(this, req);\n }\n headers;\n rawHeaders;\n _consuming = !1;\n _dumped = !1;\n #bodyStream;\n #fakeSocket;\n #noBody = !1;\n #aborted = !1;\n #req;\n url;\n #type;\n #nodeReq;\n _construct(callback) {\n if (this.#type === \"response\" || this.#noBody) {\n callback();\n return;\n }\n const contentLength = this.#req.headers.get(\"content-length\");\n if ((contentLength \? parseInt(contentLength, 10) : 0) === 0) {\n this.#noBody = !0, callback();\n return;\n }\n callback();\n }\n async#consumeStream(reader) {\n while (!0) {\n var { done, value } = await reader.readMany();\n if (this.#aborted)\n return;\n if (done) {\n this.push(null), this.destroy();\n break;\n }\n for (var v of value)\n this.push(v);\n }\n }\n _read(size) {\n if (console.log(\"read\", size), this.#noBody)\n this.push(null), this.complete = !0;\n else if (this.#bodyStream == null) {\n const reader = this.#req.body\?.getReader();\n if (!reader) {\n this.push(null);\n return;\n }\n this.#bodyStream = reader, this.#consumeStream(reader);\n }\n }\n get aborted() {\n return this.#aborted;\n }\n #abort() {\n if (this.#aborted)\n return;\n this.#aborted = !0;\n var bodyStream = this.#bodyStream;\n if (!bodyStream)\n return;\n bodyStream.cancel(), this.complete = !0, this.#bodyStream = void 0, this.push(null);\n }\n get connection() {\n return this.#fakeSocket;\n }\n get statusCode() {\n return this.#req.status;\n }\n get statusMessage() {\n return STATUS_CODES[this.#req.status];\n }\n get httpVersion() {\n return \"1.1\";\n }\n get rawTrailers() {\n return [];\n }\n get httpVersionMajor() {\n return 1;\n }\n get httpVersionMinor() {\n return 1;\n }\n get trailers() {\n return kEmptyObject;\n }\n get socket() {\n return this.#fakeSocket \?\?= new FakeSocket;\n }\n set socket(val) {\n this.#fakeSocket = val;\n }\n setTimeout(msecs, callback) {\n throw new Error(\"not implemented\");\n }\n}\n\nclass OutgoingMessage extends Writable {\n constructor() {\n super(...arguments);\n }\n #headers;\n headersSent = !1;\n sendDate = !0;\n req;\n timeout;\n #finished = !1;\n [kEndCalled] = !1;\n #fakeSocket;\n #timeoutTimer;\n [kAbortController] = null;\n _implicitHeader() {\n }\n get headers() {\n if (!this.#headers)\n return kEmptyObject;\n return this.#headers.toJSON();\n }\n get shouldKeepAlive() {\n return !0;\n }\n get chunkedEncoding() {\n return !1;\n }\n set chunkedEncoding(value) {\n }\n set shouldKeepAlive(value) {\n }\n get useChunkedEncodingByDefault() {\n return !0;\n }\n set useChunkedEncodingByDefault(value) {\n }\n get socket() {\n return this.#fakeSocket \?\?= new FakeSocket;\n }\n set socket(val) {\n this.#fakeSocket = val;\n }\n get connection() {\n return this.socket;\n }\n get finished() {\n return this.#finished;\n }\n appendHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n headers.append(name, value);\n }\n flushHeaders() {\n }\n getHeader(name) {\n return getHeader(this.#headers, name);\n }\n getHeaders() {\n if (!this.#headers)\n return kEmptyObject;\n return this.#headers.toJSON();\n }\n getHeaderNames() {\n var headers = this.#headers;\n if (!headers)\n return [];\n return Array.from(headers.keys());\n }\n removeHeader(name) {\n if (!this.#headers)\n return;\n this.#headers.delete(name);\n }\n setHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n return headers.set(name, value), this;\n }\n hasHeader(name) {\n if (!this.#headers)\n return !1;\n return this.#headers.has(name);\n }\n addTrailers(headers) {\n throw new Error(\"not implemented\");\n }\n [kClearTimeout]() {\n if (this.#timeoutTimer)\n clearTimeout(this.#timeoutTimer), this.removeAllListeners(\"timeout\"), this.#timeoutTimer = void 0;\n }\n #onTimeout() {\n this.#timeoutTimer = void 0, this[kAbortController]\?.abort(), this.emit(\"timeout\");\n }\n setTimeout(msecs, callback) {\n if (this.destroyed)\n return this;\n if (this.timeout = msecs = validateMsecs(msecs, \"msecs\"), clearTimeout(this.#timeoutTimer), msecs === 0) {\n if (callback !== void 0)\n validateFunction(callback, \"callback\"), this.removeListener(\"timeout\", callback);\n this.#timeoutTimer = void 0;\n } else if (this.#timeoutTimer = setTimeout(this.#onTimeout.bind(this), msecs).unref(), callback !== void 0)\n validateFunction(callback, \"callback\"), this.once(\"timeout\", callback);\n return this;\n }\n}\nvar OriginalWriteHeadFn, OriginalImplicitHeadFn;\n\nclass ServerResponse extends Writable {\n constructor({ req, reply }) {\n super();\n if (this.req = req, this._reply = reply, this.sendDate = !0, this.statusCode = 200, this.headersSent = !1, this.statusMessage = void 0, this.#controller = void 0, this.#firstWrite = void 0, this._writableState.decodeStrings = !1, this.#deferred = void 0, req.method === \"HEAD\")\n this._hasBody = !1;\n }\n req;\n _reply;\n sendDate;\n statusCode;\n #headers;\n headersSent = !1;\n statusMessage;\n #controller;\n #firstWrite;\n _sent100 = !1;\n _defaultKeepAlive = !1;\n _removedConnection = !1;\n _removedContLen = !1;\n _hasBody = !0;\n #deferred = void 0;\n #finished = !1;\n _implicitHeader() {\n this.writeHead(this.statusCode);\n }\n _write(chunk, encoding, callback) {\n if (!this.#firstWrite && !this.headersSent) {\n this.#firstWrite = chunk, callback();\n return;\n }\n this.#ensureReadableStreamController((controller) => {\n controller.write(chunk), callback();\n });\n }\n _writev(chunks, callback) {\n if (chunks.length === 1 && !this.headersSent && !this.#firstWrite) {\n this.#firstWrite = chunks[0].chunk, callback();\n return;\n }\n this.#ensureReadableStreamController((controller) => {\n for (let chunk of chunks)\n controller.write(chunk.chunk);\n callback();\n });\n }\n #ensureReadableStreamController(run) {\n var thisController = this.#controller;\n if (thisController)\n return run(thisController);\n this.headersSent = !0;\n var firstWrite = this.#firstWrite;\n this.#firstWrite = void 0, this._reply(new Response(new ReadableStream({\n type: \"direct\",\n pull: (controller) => {\n if (this.#controller = controller, firstWrite)\n controller.write(firstWrite);\n if (firstWrite = void 0, run(controller), !this.#finished)\n return new Promise((resolve) => {\n this.#deferred = resolve;\n });\n }\n }), {\n headers: this.#headers,\n status: this.statusCode,\n statusText: this.statusMessage \?\? STATUS_CODES[this.statusCode]\n }));\n }\n #drainHeadersIfObservable() {\n if (this._implicitHeader === OriginalImplicitHeadFn && this.writeHead === OriginalWriteHeadFn)\n return;\n this._implicitHeader();\n }\n _final(callback) {\n if (!this.headersSent) {\n var data = this.#firstWrite || \"\";\n this.#firstWrite = void 0, this.#finished = !0, this.#drainHeadersIfObservable(), this._reply(new Response(data, {\n headers: this.#headers,\n status: this.statusCode,\n statusText: this.statusMessage \?\? STATUS_CODES[this.statusCode]\n })), callback && callback();\n return;\n }\n this.#finished = !0, this.#ensureReadableStreamController((controller) => {\n controller.end(), callback();\n var deferred = this.#deferred;\n if (deferred)\n this.#deferred = void 0, deferred();\n });\n }\n writeProcessing() {\n throw new Error(\"not implemented\");\n }\n addTrailers(headers) {\n throw new Error(\"not implemented\");\n }\n assignSocket(socket) {\n throw new Error(\"not implemented\");\n }\n detachSocket(socket) {\n throw new Error(\"not implemented\");\n }\n writeContinue(callback) {\n throw new Error(\"not implemented\");\n }\n setTimeout(msecs, callback) {\n throw new Error(\"not implemented\");\n }\n get shouldKeepAlive() {\n return !0;\n }\n get chunkedEncoding() {\n return !1;\n }\n set chunkedEncoding(value) {\n }\n set shouldKeepAlive(value) {\n }\n get useChunkedEncodingByDefault() {\n return !0;\n }\n set useChunkedEncodingByDefault(value) {\n }\n appendHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n headers.append(name, value);\n }\n flushHeaders() {\n }\n getHeader(name) {\n return getHeader(this.#headers, name);\n }\n getHeaders() {\n var headers = this.#headers;\n if (!headers)\n return kEmptyObject;\n return headers.toJSON();\n }\n getHeaderNames() {\n var headers = this.#headers;\n if (!headers)\n return [];\n return Array.from(headers.keys());\n }\n removeHeader(name) {\n if (!this.#headers)\n return;\n this.#headers.delete(name);\n }\n setHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n return headers.set(name, value), this;\n }\n hasHeader(name) {\n if (!this.#headers)\n return !1;\n return this.#headers.has(name);\n }\n writeHead(statusCode, statusMessage, headers) {\n return _writeHead(statusCode, statusMessage, headers, this), this;\n }\n}\nOriginalWriteHeadFn = ServerResponse.prototype.writeHead;\nOriginalImplicitHeadFn = ServerResponse.prototype._implicitHeader;\n\nclass ClientRequest extends OutgoingMessage {\n #timeout;\n #res = null;\n #upgradeOrConnect = !1;\n #parser = null;\n #maxHeadersCount = null;\n #reusedSocket = !1;\n #host;\n #protocol;\n #method;\n #port;\n #useDefaultPort;\n #joinDuplicateHeaders;\n #maxHeaderSize;\n #agent = globalAgent;\n #path;\n #socketPath;\n #bodyChunks = null;\n #fetchRequest;\n #signal = null;\n [kAbortController] = null;\n #timeoutTimer = void 0;\n #options;\n #finished;\n get path() {\n return this.#path;\n }\n get port() {\n return this.#port;\n }\n get method() {\n return this.#method;\n }\n get host() {\n return this.#host;\n }\n get protocol() {\n return this.#protocol;\n }\n _write(chunk, encoding, callback) {\n if (!this.#bodyChunks) {\n this.#bodyChunks = [chunk], callback();\n return;\n }\n this.#bodyChunks.push(chunk), callback();\n }\n _writev(chunks, callback) {\n if (!this.#bodyChunks) {\n this.#bodyChunks = chunks, callback();\n return;\n }\n this.#bodyChunks.push(...chunks), callback();\n }\n _final(callback) {\n if (this.#finished = !0, this[kAbortController] = new AbortController, this[kAbortController].signal.addEventListener(\"abort\", () => {\n this[kClearTimeout]();\n }), this.#signal\?.aborted)\n this[kAbortController].abort();\n var method = this.#method, body = this.#bodyChunks\?.length === 1 \? this.#bodyChunks[0] : Buffer.concat(this.#bodyChunks || []);\n let url, proxy;\n if (this.#path.startsWith(\"http://\") || this.#path.startsWith(\"https://\"))\n url = this.#path, proxy = `${this.#protocol}//${this.#host}${this.#useDefaultPort \? \"\" : \":\" + this.#port}`;\n else\n url = `${this.#protocol}//${this.#host}${this.#useDefaultPort \? \"\" : \":\" + this.#port}${this.#path}`;\n try {\n this.#fetchRequest = fetch(url, {\n method,\n headers: this.getHeaders(),\n body: body && method !== \"GET\" && method !== \"HEAD\" && method !== \"OPTIONS\" \? body : void 0,\n redirect: \"manual\",\n verbose: !1,\n signal: this[kAbortController].signal,\n proxy,\n timeout: !1\n }).then((response) => {\n var res = this.#res = new IncomingMessage(response, {\n type: \"response\",\n [kInternalRequest]: this\n });\n console.log(\"response\", response), this.emit(\"response\", res);\n }).catch((err) => {\n this.emit(\"error\", err);\n }).finally(() => {\n this.#fetchRequest = null, this[kClearTimeout]();\n });\n } catch (err) {\n this.emit(\"error\", err);\n } finally {\n callback();\n }\n }\n get aborted() {\n return this.#signal\?.aborted || !!this[kAbortController]\?.signal.aborted;\n }\n abort() {\n if (this.aborted)\n return;\n this[kAbortController].abort();\n }\n constructor(input, options, cb) {\n super();\n if (typeof input === \"string\") {\n const urlStr = input;\n try {\n var urlObject = new URL(urlStr);\n } catch (e) {\n @throwTypeError(`Invalid URL: ${urlStr}`);\n }\n input = urlToHttpOptions(urlObject);\n } else if (input && typeof input === \"object\" && input instanceof URL)\n input = urlToHttpOptions(input);\n else\n cb = options, options = input, input = null;\n if (typeof options === \"function\")\n cb = options, options = input || kEmptyObject;\n else\n options = ObjectAssign(input || {}, options);\n var defaultAgent = options._defaultAgent || Agent.globalAgent;\n let protocol = options.protocol;\n if (!protocol)\n if (options.port === 443)\n protocol = \"https:\";\n else\n protocol = defaultAgent.protocol || \"http:\";\n switch (this.#protocol = protocol, this.#agent\?.protocol) {\n case void 0:\n break;\n case \"http:\":\n if (protocol === \"https:\") {\n defaultAgent = this.#agent = getDefaultHTTPSAgent();\n break;\n }\n case \"https:\":\n if (protocol === \"https\") {\n defaultAgent = this.#agent = Agent.globalAgent;\n break;\n }\n default:\n break;\n }\n if (options.path) {\n const path = String(options.path);\n if (RegExpPrototypeExec.call(INVALID_PATH_REGEX, path) !== null)\n throw new Error(\"Path contains unescaped characters\");\n }\n if (protocol !== \"http:\" && protocol !== \"https:\" && protocol) {\n const expectedProtocol = defaultAgent\?.protocol \?\? \"http:\";\n throw new Error(`Protocol mismatch. Expected: ${expectedProtocol}. Got: ${protocol}`);\n }\n const defaultPort = protocol === \"https:\" \? 443 : 80;\n this.#port = options.port || options.defaultPort || this.#agent\?.defaultPort || defaultPort, this.#useDefaultPort = this.#port === defaultPort;\n const host = this.#host = options.host = validateHost(options.hostname, \"hostname\") || validateHost(options.host, \"host\") || \"localhost\";\n this.#socketPath = options.socketPath;\n const signal = options.signal;\n if (signal)\n signal.addEventListener(\"abort\", () => {\n this[kAbortController]\?.abort();\n }), this.#signal = signal;\n let method = options.method;\n const methodIsString = typeof method === \"string\";\n if (method !== null && method !== void 0 && !methodIsString)\n throw new Error(\"ERR_INVALID_ARG_TYPE: options.method\");\n if (methodIsString && method) {\n if (!checkIsHttpToken(method))\n throw new Error(\"ERR_INVALID_HTTP_TOKEN: Method\");\n method = this.#method = StringPrototypeToUpperCase.call(method);\n } else\n method = this.#method = \"GET\";\n const _maxHeaderSize = options.maxHeaderSize;\n this.#maxHeaderSize = _maxHeaderSize;\n var _joinDuplicateHeaders = options.joinDuplicateHeaders;\n if (this.#joinDuplicateHeaders = _joinDuplicateHeaders, this.#path = options.path || \"/\", cb)\n this.once(\"response\", cb);\n this.#finished = !1, this.#res = null, this.#upgradeOrConnect = !1, this.#parser = null, this.#maxHeadersCount = null, this.#reusedSocket = !1, this.#host = host, this.#protocol = protocol;\n var timeout = options.timeout;\n if (timeout !== void 0 && timeout !== 0)\n this.setTimeout(timeout, void 0);\n if (!ArrayIsArray(headers)) {\n var headers = options.headers;\n if (headers)\n for (let key in headers)\n this.setHeader(key, headers[key]);\n var auth = options.auth;\n if (auth && !this.getHeader(\"Authorization\"))\n this.setHeader(\"Authorization\", \"Basic \" + Buffer.from(auth).toString(\"base64\"));\n }\n var { signal: _signal, ...optsWithoutSignal } = options;\n this.#options = optsWithoutSignal;\n }\n setSocketKeepAlive(enable = !0, initialDelay = 0) {\n }\n setNoDelay(noDelay = !0) {\n }\n [kClearTimeout]() {\n if (this.#timeoutTimer)\n clearTimeout(this.#timeoutTimer), this.#timeoutTimer = void 0, this.removeAllListeners(\"timeout\");\n }\n #onTimeout() {\n this.#timeoutTimer = void 0, this[kAbortController]\?.abort(), this.emit(\"timeout\");\n }\n setTimeout(msecs, callback) {\n if (this.destroyed)\n return this;\n if (this.timeout = msecs = validateMsecs(msecs, \"msecs\"), clearTimeout(this.#timeoutTimer), msecs === 0) {\n if (callback !== void 0)\n validateFunction(callback, \"callback\"), this.removeListener(\"timeout\", callback);\n this.#timeoutTimer = void 0;\n } else if (this.#timeoutTimer = setTimeout(this.#onTimeout.bind(this), msecs).unref(), callback !== void 0)\n validateFunction(callback, \"callback\"), this.once(\"timeout\", callback);\n return this;\n }\n}\nvar tokenRegExp = /^[\\^_`a-zA-Z\\-0-9!#$%&'*+.|~]+$/, METHODS = [\n \"ACL\",\n \"BIND\",\n \"CHECKOUT\",\n \"CONNECT\",\n \"COPY\",\n \"DELETE\",\n \"GET\",\n \"HEAD\",\n \"LINK\",\n \"LOCK\",\n \"M-SEARCH\",\n \"MERGE\",\n \"MKACTIVITY\",\n \"MKCALENDAR\",\n \"MKCOL\",\n \"MOVE\",\n \"NOTIFY\",\n \"OPTIONS\",\n \"PATCH\",\n \"POST\",\n \"PROPFIND\",\n \"PROPPATCH\",\n \"PURGE\",\n \"PUT\",\n \"REBIND\",\n \"REPORT\",\n \"SEARCH\",\n \"SOURCE\",\n \"SUBSCRIBE\",\n \"TRACE\",\n \"UNBIND\",\n \"UNLINK\",\n \"UNLOCK\",\n \"UNSUBSCRIBE\"\n], STATUS_CODES = {\n 100: \"Continue\",\n 101: \"Switching Protocols\",\n 102: \"Processing\",\n 103: \"Early Hints\",\n 200: \"OK\",\n 201: \"Created\",\n 202: \"Accepted\",\n 203: \"Non-Authoritative Information\",\n 204: \"No Content\",\n 205: \"Reset Content\",\n 206: \"Partial Content\",\n 207: \"Multi-Status\",\n 208: \"Already Reported\",\n 226: \"IM Used\",\n 300: \"Multiple Choices\",\n 301: \"Moved Permanently\",\n 302: \"Found\",\n 303: \"See Other\",\n 304: \"Not Modified\",\n 305: \"Use Proxy\",\n 307: \"Temporary Redirect\",\n 308: \"Permanent Redirect\",\n 400: \"Bad Request\",\n 401: \"Unauthorized\",\n 402: \"Payment Required\",\n 403: \"Forbidden\",\n 404: \"Not Found\",\n 405: \"Method Not Allowed\",\n 406: \"Not Acceptable\",\n 407: \"Proxy Authentication Required\",\n 408: \"Request Timeout\",\n 409: \"Conflict\",\n 410: \"Gone\",\n 411: \"Length Required\",\n 412: \"Precondition Failed\",\n 413: \"Payload Too Large\",\n 414: \"URI Too Long\",\n 415: \"Unsupported Media Type\",\n 416: \"Range Not Satisfiable\",\n 417: \"Expectation Failed\",\n 418: \"I'm a Teapot\",\n 421: \"Misdirected Request\",\n 422: \"Unprocessable Entity\",\n 423: \"Locked\",\n 424: \"Failed Dependency\",\n 425: \"Too Early\",\n 426: \"Upgrade Required\",\n 428: \"Precondition Required\",\n 429: \"Too Many Requests\",\n 431: \"Request Header Fields Too Large\",\n 451: \"Unavailable For Legal Reasons\",\n 500: \"Internal Server Error\",\n 501: \"Not Implemented\",\n 502: \"Bad Gateway\",\n 503: \"Service Unavailable\",\n 504: \"Gateway Timeout\",\n 505: \"HTTP Version Not Supported\",\n 506: \"Variant Also Negotiates\",\n 507: \"Insufficient Storage\",\n 508: \"Loop Detected\",\n 509: \"Bandwidth Limit Exceeded\",\n 510: \"Not Extended\",\n 511: \"Network Authentication Required\"\n}, globalAgent = new Agent;\n$ = {\n Agent,\n Server,\n METHODS,\n STATUS_CODES,\n createServer,\n ServerResponse,\n IncomingMessage,\n request,\n get,\n maxHeaderSize: 16384,\n validateHeaderName,\n validateHeaderValue,\n setMaxIdleHTTPParsers(max) {\n },\n globalAgent,\n ClientRequest,\n OutgoingMessage\n};\nreturn $})\n"_s;
//
//
@@ -435,7 +435,7 @@ static constexpr ASCIILiteral NodeWorkerThreadsCode = "(function (){\"use strict
//
//
-static constexpr ASCIILiteral NodeZlibCode = "(function (){\"use strict\";// src/js/out/tmp/node/zlib.ts\nvar assert = @getInternalField(@internalModuleRegistry, 4) || @createInternalModuleById(4), BufferModule = @requireNativeModule(\"node:buffer\"), StreamModule = @getInternalField(@internalModuleRegistry, 35) || @createInternalModuleById(35), Util = @getInternalField(@internalModuleRegistry, 44) || @createInternalModuleById(44), __getOwnPropNames = Object.getOwnPropertyNames, __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n}, require_zstream = __commonJS({\n \"node_modules/pako/lib/zlib/zstream.js\"(exports, module2) {\n function ZStream() {\n this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = \"\", this.state = null, this.data_type = 2, this.adler = 0;\n }\n module2.exports = ZStream;\n }\n}), require_common = __commonJS({\n \"node_modules/pako/lib/utils/common.js\"(exports) {\n var TYPED_OK = typeof Uint8Array !== \"undefined\" && typeof Uint16Array !== \"undefined\" && typeof Int32Array !== \"undefined\";\n function _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n }\n exports.assign = function(obj) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source)\n continue;\n if (typeof source !== \"object\")\n @throwTypeError(source + \"must be non-object\");\n for (var p in source)\n if (_has(source, p))\n obj[p] = source[p];\n }\n return obj;\n }, exports.shrinkBuf = function(buf, size) {\n if (buf.length === size)\n return buf;\n if (buf.subarray)\n return buf.subarray(0, size);\n return buf.length = size, buf;\n };\n var fnTyped = {\n arraySet: function(dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n for (var i = 0;i < len; i++)\n dest[dest_offs + i] = src[src_offs + i];\n },\n flattenChunks: function(chunks) {\n var i, l, len, pos, chunk, result;\n len = 0;\n for (i = 0, l = chunks.length;i < l; i++)\n len += chunks[i].length;\n result = new Uint8Array(len), pos = 0;\n for (i = 0, l = chunks.length;i < l; i++)\n chunk = chunks[i], result.set(chunk, pos), pos += chunk.length;\n return result;\n }\n }, fnUntyped = {\n arraySet: function(dest, src, src_offs, len, dest_offs) {\n for (var i = 0;i < len; i++)\n dest[dest_offs + i] = src[src_offs + i];\n },\n flattenChunks: function(chunks) {\n return [].concat.apply([], chunks);\n }\n };\n exports.setTyped = function(on) {\n if (on)\n exports.Buf8 = Uint8Array, exports.Buf16 = Uint16Array, exports.Buf32 = Int32Array, exports.assign(exports, fnTyped);\n else\n exports.Buf8 = Array, exports.Buf16 = Array, exports.Buf32 = Array, exports.assign(exports, fnUntyped);\n }, exports.setTyped(TYPED_OK);\n }\n}), require_trees = __commonJS({\n \"node_modules/pako/lib/zlib/trees.js\"(exports) {\n var utils = require_common(), Z_FIXED = 4, Z_BINARY = 0, Z_TEXT = 1, Z_UNKNOWN = 2;\n function zero(buf) {\n var len = buf.length;\n while (--len >= 0)\n buf[len] = 0;\n }\n var STORED_BLOCK = 0, STATIC_TREES = 1, DYN_TREES = 2, MIN_MATCH = 3, MAX_MATCH = 258, LENGTH_CODES = 29, LITERALS = 256, L_CODES = LITERALS + 1 + LENGTH_CODES, D_CODES = 30, BL_CODES = 19, HEAP_SIZE = 2 * L_CODES + 1, MAX_BITS = 15, Buf_size = 16, MAX_BL_BITS = 7, END_BLOCK = 256, REP_3_6 = 16, REPZ_3_10 = 17, REPZ_11_138 = 18, extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], extra_dbits = [\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 2,\n 2,\n 3,\n 3,\n 4,\n 4,\n 5,\n 5,\n 6,\n 6,\n 7,\n 7,\n 8,\n 8,\n 9,\n 9,\n 10,\n 10,\n 11,\n 11,\n 12,\n 12,\n 13,\n 13\n ], extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], DIST_CODE_LEN = 512, static_ltree = new Array((L_CODES + 2) * 2);\n zero(static_ltree);\n var static_dtree = new Array(D_CODES * 2);\n zero(static_dtree);\n var _dist_code = new Array(DIST_CODE_LEN);\n zero(_dist_code);\n var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\n zero(_length_code);\n var base_length = new Array(LENGTH_CODES);\n zero(base_length);\n var base_dist = new Array(D_CODES);\n zero(base_dist);\n function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n this.static_tree = static_tree, this.extra_bits = extra_bits, this.extra_base = extra_base, this.elems = elems, this.max_length = max_length, this.has_stree = static_tree && static_tree.length;\n }\n var static_l_desc, static_d_desc, static_bl_desc;\n function TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree, this.max_code = 0, this.stat_desc = stat_desc;\n }\n function d_code(dist) {\n return dist < 256 \? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n }\n function put_short(s, w) {\n s.pending_buf[s.pending++] = w & 255, s.pending_buf[s.pending++] = w >>> 8 & 255;\n }\n function send_bits(s, value, length) {\n if (s.bi_valid > Buf_size - length)\n s.bi_buf |= value << s.bi_valid & 65535, put_short(s, s.bi_buf), s.bi_buf = value >> Buf_size - s.bi_valid, s.bi_valid += length - Buf_size;\n else\n s.bi_buf |= value << s.bi_valid & 65535, s.bi_valid += length;\n }\n function send_code(s, c, tree) {\n send_bits(s, tree[c * 2], tree[c * 2 + 1]);\n }\n function bi_reverse(code, len) {\n var res = 0;\n do\n res |= code & 1, code >>>= 1, res <<= 1;\n while (--len > 0);\n return res >>> 1;\n }\n function bi_flush(s) {\n if (s.bi_valid === 16)\n put_short(s, s.bi_buf), s.bi_buf = 0, s.bi_valid = 0;\n else if (s.bi_valid >= 8)\n s.pending_buf[s.pending++] = s.bi_buf & 255, s.bi_buf >>= 8, s.bi_valid -= 8;\n }\n function gen_bitlen(s, desc) {\n var { dyn_tree: tree, max_code } = desc, stree = desc.stat_desc.static_tree, has_stree = desc.stat_desc.has_stree, extra = desc.stat_desc.extra_bits, base = desc.stat_desc.extra_base, max_length = desc.stat_desc.max_length, h, n, m, bits, xbits, f, overflow = 0;\n for (bits = 0;bits <= MAX_BITS; bits++)\n s.bl_count[bits] = 0;\n tree[s.heap[s.heap_max] * 2 + 1] = 0;\n for (h = s.heap_max + 1;h < HEAP_SIZE; h++) {\n if (n = s.heap[h], bits = tree[tree[n * 2 + 1] * 2 + 1] + 1, bits > max_length)\n bits = max_length, overflow++;\n if (tree[n * 2 + 1] = bits, n > max_code)\n continue;\n if (s.bl_count[bits]++, xbits = 0, n >= base)\n xbits = extra[n - base];\n if (f = tree[n * 2], s.opt_len += f * (bits + xbits), has_stree)\n s.static_len += f * (stree[n * 2 + 1] + xbits);\n }\n if (overflow === 0)\n return;\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0)\n bits--;\n s.bl_count[bits]--, s.bl_count[bits + 1] += 2, s.bl_count[max_length]--, overflow -= 2;\n } while (overflow > 0);\n for (bits = max_length;bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n if (m = s.heap[--h], m > max_code)\n continue;\n if (tree[m * 2 + 1] !== bits)\n s.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2], tree[m * 2 + 1] = bits;\n n--;\n }\n }\n }\n function gen_codes(tree, max_code, bl_count) {\n var next_code = new Array(MAX_BITS + 1), code = 0, bits, n;\n for (bits = 1;bits <= MAX_BITS; bits++)\n next_code[bits] = code = code + bl_count[bits - 1] << 1;\n for (n = 0;n <= max_code; n++) {\n var len = tree[n * 2 + 1];\n if (len === 0)\n continue;\n tree[n * 2] = bi_reverse(next_code[len]++, len);\n }\n }\n function tr_static_init() {\n var n, bits, length, code, dist, bl_count = new Array(MAX_BITS + 1);\n length = 0;\n for (code = 0;code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0;n < 1 << extra_lbits[code]; n++)\n _length_code[length++] = code;\n }\n _length_code[length - 1] = code, dist = 0;\n for (code = 0;code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0;n < 1 << extra_dbits[code]; n++)\n _dist_code[dist++] = code;\n }\n dist >>= 7;\n for (;code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0;n < 1 << extra_dbits[code] - 7; n++)\n _dist_code[256 + dist++] = code;\n }\n for (bits = 0;bits <= MAX_BITS; bits++)\n bl_count[bits] = 0;\n n = 0;\n while (n <= 143)\n static_ltree[n * 2 + 1] = 8, n++, bl_count[8]++;\n while (n <= 255)\n static_ltree[n * 2 + 1] = 9, n++, bl_count[9]++;\n while (n <= 279)\n static_ltree[n * 2 + 1] = 7, n++, bl_count[7]++;\n while (n <= 287)\n static_ltree[n * 2 + 1] = 8, n++, bl_count[8]++;\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n for (n = 0;n < D_CODES; n++)\n static_dtree[n * 2 + 1] = 5, static_dtree[n * 2] = bi_reverse(n, 5);\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS), static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS), static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n }\n function init_block(s) {\n var n;\n for (n = 0;n < L_CODES; n++)\n s.dyn_ltree[n * 2] = 0;\n for (n = 0;n < D_CODES; n++)\n s.dyn_dtree[n * 2] = 0;\n for (n = 0;n < BL_CODES; n++)\n s.bl_tree[n * 2] = 0;\n s.dyn_ltree[END_BLOCK * 2] = 1, s.opt_len = s.static_len = 0, s.last_lit = s.matches = 0;\n }\n function bi_windup(s) {\n if (s.bi_valid > 8)\n put_short(s, s.bi_buf);\n else if (s.bi_valid > 0)\n s.pending_buf[s.pending++] = s.bi_buf;\n s.bi_buf = 0, s.bi_valid = 0;\n }\n function copy_block(s, buf, len, header) {\n if (bi_windup(s), header)\n put_short(s, len), put_short(s, ~len);\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending), s.pending += len;\n }\n function smaller(tree, n, m, depth) {\n var _n2 = n * 2, _m2 = m * 2;\n return tree[_n2] < tree[_m2] || tree[_n2] === tree[_m2] && depth[n] <= depth[m];\n }\n function pqdownheap(s, tree, k) {\n var v = s.heap[k], j = k << 1;\n while (j <= s.heap_len) {\n if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth))\n j++;\n if (smaller(tree, v, s.heap[j], s.depth))\n break;\n s.heap[k] = s.heap[j], k = j, j <<= 1;\n }\n s.heap[k] = v;\n }\n function compress_block(s, ltree, dtree) {\n var dist, lc, lx = 0, code, extra;\n if (s.last_lit !== 0)\n do\n if (dist = s.pending_buf[s.d_buf + lx * 2] << 8 | s.pending_buf[s.d_buf + lx * 2 + 1], lc = s.pending_buf[s.l_buf + lx], lx++, dist === 0)\n send_code(s, lc, ltree);\n else {\n if (code = _length_code[lc], send_code(s, code + LITERALS + 1, ltree), extra = extra_lbits[code], extra !== 0)\n lc -= base_length[code], send_bits(s, lc, extra);\n if (dist--, code = d_code(dist), send_code(s, code, dtree), extra = extra_dbits[code], extra !== 0)\n dist -= base_dist[code], send_bits(s, dist, extra);\n }\n while (lx < s.last_lit);\n send_code(s, END_BLOCK, ltree);\n }\n function build_tree(s, desc) {\n var tree = desc.dyn_tree, stree = desc.stat_desc.static_tree, has_stree = desc.stat_desc.has_stree, elems = desc.stat_desc.elems, n, m, max_code = -1, node;\n s.heap_len = 0, s.heap_max = HEAP_SIZE;\n for (n = 0;n < elems; n++)\n if (tree[n * 2] !== 0)\n s.heap[++s.heap_len] = max_code = n, s.depth[n] = 0;\n else\n tree[n * 2 + 1] = 0;\n while (s.heap_len < 2)\n if (node = s.heap[++s.heap_len] = max_code < 2 \? ++max_code : 0, tree[node * 2] = 1, s.depth[node] = 0, s.opt_len--, has_stree)\n s.static_len -= stree[node * 2 + 1];\n desc.max_code = max_code;\n for (n = s.heap_len >> 1;n >= 1; n--)\n pqdownheap(s, tree, n);\n node = elems;\n do\n n = s.heap[1], s.heap[1] = s.heap[s.heap_len--], pqdownheap(s, tree, 1), m = s.heap[1], s.heap[--s.heap_max] = n, s.heap[--s.heap_max] = m, tree[node * 2] = tree[n * 2] + tree[m * 2], s.depth[node] = (s.depth[n] >= s.depth[m] \? s.depth[n] : s.depth[m]) + 1, tree[n * 2 + 1] = tree[m * 2 + 1] = node, s.heap[1] = node++, pqdownheap(s, tree, 1);\n while (s.heap_len >= 2);\n s.heap[--s.heap_max] = s.heap[1], gen_bitlen(s, desc), gen_codes(tree, max_code, s.bl_count);\n }\n function scan_tree(s, tree, max_code) {\n var n, prevlen = -1, curlen, nextlen = tree[1], count = 0, max_count = 7, min_count = 4;\n if (nextlen === 0)\n max_count = 138, min_count = 3;\n tree[(max_code + 1) * 2 + 1] = 65535;\n for (n = 0;n <= max_code; n++) {\n if (curlen = nextlen, nextlen = tree[(n + 1) * 2 + 1], ++count < max_count && curlen === nextlen)\n continue;\n else if (count < min_count)\n s.bl_tree[curlen * 2] += count;\n else if (curlen !== 0) {\n if (curlen !== prevlen)\n s.bl_tree[curlen * 2]++;\n s.bl_tree[REP_3_6 * 2]++;\n } else if (count <= 10)\n s.bl_tree[REPZ_3_10 * 2]++;\n else\n s.bl_tree[REPZ_11_138 * 2]++;\n if (count = 0, prevlen = curlen, nextlen === 0)\n max_count = 138, min_count = 3;\n else if (curlen === nextlen)\n max_count = 6, min_count = 3;\n else\n max_count = 7, min_count = 4;\n }\n }\n function send_tree(s, tree, max_code) {\n var n, prevlen = -1, curlen, nextlen = tree[1], count = 0, max_count = 7, min_count = 4;\n if (nextlen === 0)\n max_count = 138, min_count = 3;\n for (n = 0;n <= max_code; n++) {\n if (curlen = nextlen, nextlen = tree[(n + 1) * 2 + 1], ++count < max_count && curlen === nextlen)\n continue;\n else if (count < min_count)\n do\n send_code(s, curlen, s.bl_tree);\n while (--count !== 0);\n else if (curlen !== 0) {\n if (curlen !== prevlen)\n send_code(s, curlen, s.bl_tree), count--;\n send_code(s, REP_3_6, s.bl_tree), send_bits(s, count - 3, 2);\n } else if (count <= 10)\n send_code(s, REPZ_3_10, s.bl_tree), send_bits(s, count - 3, 3);\n else\n send_code(s, REPZ_11_138, s.bl_tree), send_bits(s, count - 11, 7);\n if (count = 0, prevlen = curlen, nextlen === 0)\n max_count = 138, min_count = 3;\n else if (curlen === nextlen)\n max_count = 6, min_count = 3;\n else\n max_count = 7, min_count = 4;\n }\n }\n function build_bl_tree(s) {\n var max_blindex;\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code), scan_tree(s, s.dyn_dtree, s.d_desc.max_code), build_tree(s, s.bl_desc);\n for (max_blindex = BL_CODES - 1;max_blindex >= 3; max_blindex--)\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1] !== 0)\n break;\n return s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4, max_blindex;\n }\n function send_all_trees(s, lcodes, dcodes, blcodes) {\n var rank;\n send_bits(s, lcodes - 257, 5), send_bits(s, dcodes - 1, 5), send_bits(s, blcodes - 4, 4);\n for (rank = 0;rank < blcodes; rank++)\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1], 3);\n send_tree(s, s.dyn_ltree, lcodes - 1), send_tree(s, s.dyn_dtree, dcodes - 1);\n }\n function detect_data_type(s) {\n var black_mask = 4093624447, n;\n for (n = 0;n <= 31; n++, black_mask >>>= 1)\n if (black_mask & 1 && s.dyn_ltree[n * 2] !== 0)\n return Z_BINARY;\n if (s.dyn_ltree[18] !== 0 || s.dyn_ltree[20] !== 0 || s.dyn_ltree[26] !== 0)\n return Z_TEXT;\n for (n = 32;n < LITERALS; n++)\n if (s.dyn_ltree[n * 2] !== 0)\n return Z_TEXT;\n return Z_BINARY;\n }\n var static_init_done = !1;\n function _tr_init(s) {\n if (!static_init_done)\n tr_static_init(), static_init_done = !0;\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc), s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc), s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc), s.bi_buf = 0, s.bi_valid = 0, init_block(s);\n }\n function _tr_stored_block(s, buf, stored_len, last) {\n send_bits(s, (STORED_BLOCK << 1) + (last \? 1 : 0), 3), copy_block(s, buf, stored_len, !0);\n }\n function _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3), send_code(s, END_BLOCK, static_ltree), bi_flush(s);\n }\n function _tr_flush_block(s, buf, stored_len, last) {\n var opt_lenb, static_lenb, max_blindex = 0;\n if (s.level > 0) {\n if (s.strm.data_type === Z_UNKNOWN)\n s.strm.data_type = detect_data_type(s);\n if (build_tree(s, s.l_desc), build_tree(s, s.d_desc), max_blindex = build_bl_tree(s), opt_lenb = s.opt_len + 3 + 7 >>> 3, static_lenb = s.static_len + 3 + 7 >>> 3, static_lenb <= opt_lenb)\n opt_lenb = static_lenb;\n } else\n opt_lenb = static_lenb = stored_len + 5;\n if (stored_len + 4 <= opt_lenb && buf !== -1)\n _tr_stored_block(s, buf, stored_len, last);\n else if (s.strategy === Z_FIXED || static_lenb === opt_lenb)\n send_bits(s, (STATIC_TREES << 1) + (last \? 1 : 0), 3), compress_block(s, static_ltree, static_dtree);\n else\n send_bits(s, (DYN_TREES << 1) + (last \? 1 : 0), 3), send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1), compress_block(s, s.dyn_ltree, s.dyn_dtree);\n if (init_block(s), last)\n bi_windup(s);\n }\n function _tr_tally(s, dist, lc) {\n if (s.pending_buf[s.d_buf + s.last_lit * 2] = dist >>> 8 & 255, s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 255, s.pending_buf[s.l_buf + s.last_lit] = lc & 255, s.last_lit++, dist === 0)\n s.dyn_ltree[lc * 2]++;\n else\n s.matches++, dist--, s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]++, s.dyn_dtree[d_code(dist) * 2]++;\n return s.last_lit === s.lit_bufsize - 1;\n }\n exports._tr_init = _tr_init, exports._tr_stored_block = _tr_stored_block, exports._tr_flush_block = _tr_flush_block, exports._tr_tally = _tr_tally, exports._tr_align = _tr_align;\n }\n}), require_adler32 = __commonJS({\n \"node_modules/pako/lib/zlib/adler32.js\"(exports, module2) {\n function adler32(adler, buf, len, pos) {\n var s1 = adler & 65535 | 0, s2 = adler >>> 16 & 65535 | 0, n = 0;\n while (len !== 0) {\n n = len > 2000 \? 2000 : len, len -= n;\n do\n s1 = s1 + buf[pos++] | 0, s2 = s2 + s1 | 0;\n while (--n);\n s1 %= 65521, s2 %= 65521;\n }\n return s1 | s2 << 16 | 0;\n }\n module2.exports = adler32;\n }\n}), require_crc32 = __commonJS({\n \"node_modules/pako/lib/zlib/crc32.js\"(exports, module2) {\n function makeTable() {\n var c, table = [];\n for (var n = 0;n < 256; n++) {\n c = n;\n for (var k = 0;k < 8; k++)\n c = c & 1 \? 3988292384 ^ c >>> 1 : c >>> 1;\n table[n] = c;\n }\n return table;\n }\n var crcTable = makeTable();\n function crc32(crc, buf, len, pos) {\n var t = crcTable, end = pos + len;\n crc ^= -1;\n for (var i = pos;i < end; i++)\n crc = crc >>> 8 ^ t[(crc ^ buf[i]) & 255];\n return crc ^ -1;\n }\n module2.exports = crc32;\n }\n}), require_messages = __commonJS({\n \"node_modules/pako/lib/zlib/messages.js\"(exports, module2) {\n module2.exports = {\n 2: \"need dictionary\",\n 1: \"stream end\",\n 0: \"\",\n \"-1\": \"file error\",\n \"-2\": \"stream error\",\n \"-3\": \"data error\",\n \"-4\": \"insufficient memory\",\n \"-5\": \"buffer error\",\n \"-6\": \"incompatible version\"\n };\n }\n}), require_deflate = __commonJS({\n \"node_modules/pako/lib/zlib/deflate.js\"(exports) {\n var utils = require_common(), trees = require_trees(), adler32 = require_adler32(), crc32 = require_crc32(), msg = require_messages(), Z_NO_FLUSH = 0, Z_PARTIAL_FLUSH = 1, Z_FULL_FLUSH = 3, Z_FINISH = 4, Z_BLOCK = 5, Z_OK = 0, Z_STREAM_END = 1, Z_STREAM_ERROR = -2, Z_DATA_ERROR = -3, Z_BUF_ERROR = -5, Z_DEFAULT_COMPRESSION = -1, Z_FILTERED = 1, Z_HUFFMAN_ONLY = 2, Z_RLE = 3, Z_FIXED = 4, Z_DEFAULT_STRATEGY = 0, Z_UNKNOWN = 2, Z_DEFLATED = 8, MAX_MEM_LEVEL = 9, MAX_WBITS = 15, DEF_MEM_LEVEL = 8, LENGTH_CODES = 29, LITERALS = 256, L_CODES = LITERALS + 1 + LENGTH_CODES, D_CODES = 30, BL_CODES = 19, HEAP_SIZE = 2 * L_CODES + 1, MAX_BITS = 15, MIN_MATCH = 3, MAX_MATCH = 258, MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1, PRESET_DICT = 32, INIT_STATE = 42, EXTRA_STATE = 69, NAME_STATE = 73, COMMENT_STATE = 91, HCRC_STATE = 103, BUSY_STATE = 113, FINISH_STATE = 666, BS_NEED_MORE = 1, BS_BLOCK_DONE = 2, BS_FINISH_STARTED = 3, BS_FINISH_DONE = 4, OS_CODE = 3;\n function err(strm, errorCode) {\n return strm.msg = msg[errorCode], errorCode;\n }\n function rank(f) {\n return (f << 1) - (f > 4 \? 9 : 0);\n }\n function zero(buf) {\n var len = buf.length;\n while (--len >= 0)\n buf[len] = 0;\n }\n function flush_pending(strm) {\n var s = strm.state, len = s.pending;\n if (len > strm.avail_out)\n len = strm.avail_out;\n if (len === 0)\n return;\n if (utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out), strm.next_out += len, s.pending_out += len, strm.total_out += len, strm.avail_out -= len, s.pending -= len, s.pending === 0)\n s.pending_out = 0;\n }\n function flush_block_only(s, last) {\n trees._tr_flush_block(s, s.block_start >= 0 \? s.block_start : -1, s.strstart - s.block_start, last), s.block_start = s.strstart, flush_pending(s.strm);\n }\n function put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n }\n function putShortMSB(s, b) {\n s.pending_buf[s.pending++] = b >>> 8 & 255, s.pending_buf[s.pending++] = b & 255;\n }\n function read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n if (len > size)\n len = size;\n if (len === 0)\n return 0;\n if (strm.avail_in -= len, utils.arraySet(buf, strm.input, strm.next_in, len, start), strm.state.wrap === 1)\n strm.adler = adler32(strm.adler, buf, len, start);\n else if (strm.state.wrap === 2)\n strm.adler = crc32(strm.adler, buf, len, start);\n return strm.next_in += len, strm.total_in += len, len;\n }\n function longest_match(s, cur_match) {\n var { max_chain_length: chain_length, strstart: scan } = s, match, len, best_len = s.prev_length, nice_match = s.nice_match, limit = s.strstart > s.w_size - MIN_LOOKAHEAD \? s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0, _win = s.window, wmask = s.w_mask, prev = s.prev, strend = s.strstart + MAX_MATCH, scan_end1 = _win[scan + best_len - 1], scan_end = _win[scan + best_len];\n if (s.prev_length >= s.good_match)\n chain_length >>= 2;\n if (nice_match > s.lookahead)\n nice_match = s.lookahead;\n do {\n if (match = cur_match, _win[match + best_len] !== scan_end || _win[match + best_len - 1] !== scan_end1 || _win[match] !== _win[scan] || _win[++match] !== _win[scan + 1])\n continue;\n scan += 2, match++;\n do\n ;\n while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && scan < strend);\n if (len = MAX_MATCH - (strend - scan), scan = strend - MAX_MATCH, len > best_len) {\n if (s.match_start = cur_match, best_len = len, len >= nice_match)\n break;\n scan_end1 = _win[scan + best_len - 1], scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n if (best_len <= s.lookahead)\n return best_len;\n return s.lookahead;\n }\n function fill_window(s) {\n var _w_size = s.w_size, p, n, m, more, str;\n do {\n if (more = s.window_size - s.lookahead - s.strstart, s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0), s.match_start -= _w_size, s.strstart -= _w_size, s.block_start -= _w_size, n = s.hash_size, p = n;\n do\n m = s.head[--p], s.head[p] = m >= _w_size \? m - _w_size : 0;\n while (--n);\n n = _w_size, p = n;\n do\n m = s.prev[--p], s.prev[p] = m >= _w_size \? m - _w_size : 0;\n while (--n);\n more += _w_size;\n }\n if (s.strm.avail_in === 0)\n break;\n if (n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more), s.lookahead += n, s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert, s.ins_h = s.window[str], s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + 1]) & s.hash_mask;\n while (s.insert)\n if (s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask, s.prev[str & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = str, str++, s.insert--, s.lookahead + s.insert < MIN_MATCH)\n break;\n }\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n }\n function deflate_stored(s, flush) {\n var max_block_size = 65535;\n if (max_block_size > s.pending_buf_size - 5)\n max_block_size = s.pending_buf_size - 5;\n for (;; ) {\n if (s.lookahead <= 1) {\n if (fill_window(s), s.lookahead === 0 && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n s.strstart += s.lookahead, s.lookahead = 0;\n var max_start = s.block_start + max_block_size;\n if (s.strstart === 0 || s.strstart >= max_start) {\n if (s.lookahead = s.strstart - max_start, s.strstart = max_start, flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n if (s.strstart - s.block_start >= s.w_size - MIN_LOOKAHEAD) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = 0, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.strstart > s.block_start) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_NEED_MORE;\n }\n function deflate_fast(s, flush) {\n var hash_head, bflush;\n for (;; ) {\n if (s.lookahead < MIN_LOOKAHEAD) {\n if (fill_window(s), s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n if (hash_head = 0, s.lookahead >= MIN_MATCH)\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n if (hash_head !== 0 && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD)\n s.match_length = longest_match(s, hash_head);\n if (s.match_length >= MIN_MATCH)\n if (bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH), s.lookahead -= s.match_length, s.match_length <= s.max_lazy_match && s.lookahead >= MIN_MATCH) {\n s.match_length--;\n do\n s.strstart++, s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n while (--s.match_length !== 0);\n s.strstart++;\n } else\n s.strstart += s.match_length, s.match_length = 0, s.ins_h = s.window[s.strstart], s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + 1]) & s.hash_mask;\n else\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++;\n if (bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = s.strstart < MIN_MATCH - 1 \? s.strstart : MIN_MATCH - 1, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function deflate_slow(s, flush) {\n var hash_head, bflush, max_insert;\n for (;; ) {\n if (s.lookahead < MIN_LOOKAHEAD) {\n if (fill_window(s), s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n if (hash_head = 0, s.lookahead >= MIN_MATCH)\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n if (s.prev_length = s.match_length, s.prev_match = s.match_start, s.match_length = MIN_MATCH - 1, hash_head !== 0 && s.prev_length < s.max_lazy_match && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) {\n if (s.match_length = longest_match(s, hash_head), s.match_length <= 5 && (s.strategy === Z_FILTERED || s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096))\n s.match_length = MIN_MATCH - 1;\n }\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH, bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH), s.lookahead -= s.prev_length - 1, s.prev_length -= 2;\n do\n if (++s.strstart <= max_insert)\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n while (--s.prev_length !== 0);\n if (s.match_available = 0, s.match_length = MIN_MATCH - 1, s.strstart++, bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n } else if (s.match_available) {\n if (bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]), bflush)\n flush_block_only(s, !1);\n if (s.strstart++, s.lookahead--, s.strm.avail_out === 0)\n return BS_NEED_MORE;\n } else\n s.match_available = 1, s.strstart++, s.lookahead--;\n }\n if (s.match_available)\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]), s.match_available = 0;\n if (s.insert = s.strstart < MIN_MATCH - 1 \? s.strstart : MIN_MATCH - 1, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function deflate_rle(s, flush) {\n var bflush, prev, scan, strend, _win = s.window;\n for (;; ) {\n if (s.lookahead <= MAX_MATCH) {\n if (fill_window(s), s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n if (s.match_length = 0, s.lookahead >= MIN_MATCH && s.strstart > 0) {\n if (scan = s.strstart - 1, prev = _win[scan], prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do\n ;\n while (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && scan < strend);\n if (s.match_length = MAX_MATCH - (strend - scan), s.match_length > s.lookahead)\n s.match_length = s.lookahead;\n }\n }\n if (s.match_length >= MIN_MATCH)\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH), s.lookahead -= s.match_length, s.strstart += s.match_length, s.match_length = 0;\n else\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++;\n if (bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = 0, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function deflate_huff(s, flush) {\n var bflush;\n for (;; ) {\n if (s.lookahead === 0) {\n if (fill_window(s), s.lookahead === 0) {\n if (flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n break;\n }\n }\n if (s.match_length = 0, bflush = trees._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++, bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = 0, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length, this.max_lazy = max_lazy, this.nice_length = nice_length, this.max_chain = max_chain, this.func = func;\n }\n var configuration_table = [\n new Config(0, 0, 0, 0, deflate_stored),\n new Config(4, 4, 8, 4, deflate_fast),\n new Config(4, 5, 16, 8, deflate_fast),\n new Config(4, 6, 32, 32, deflate_fast),\n new Config(4, 4, 16, 16, deflate_slow),\n new Config(8, 16, 32, 32, deflate_slow),\n new Config(8, 16, 128, 128, deflate_slow),\n new Config(8, 32, 128, 256, deflate_slow),\n new Config(32, 128, 258, 1024, deflate_slow),\n new Config(32, 258, 258, 4096, deflate_slow)\n ];\n function lm_init(s) {\n s.window_size = 2 * s.w_size, zero(s.head), s.max_lazy_match = configuration_table[s.level].max_lazy, s.good_match = configuration_table[s.level].good_length, s.nice_match = configuration_table[s.level].nice_length, s.max_chain_length = configuration_table[s.level].max_chain, s.strstart = 0, s.block_start = 0, s.lookahead = 0, s.insert = 0, s.match_length = s.prev_length = MIN_MATCH - 1, s.match_available = 0, s.ins_h = 0;\n }\n function DeflateState() {\n this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = Z_DEFLATED, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2), this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2), this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2), zero(this.dyn_ltree), zero(this.dyn_dtree), zero(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new utils.Buf16(MAX_BITS + 1), this.heap = new utils.Buf16(2 * L_CODES + 1), zero(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new utils.Buf16(2 * L_CODES + 1), zero(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;\n }\n function deflateResetKeep(strm) {\n var s;\n if (!strm || !strm.state)\n return err(strm, Z_STREAM_ERROR);\n if (strm.total_in = strm.total_out = 0, strm.data_type = Z_UNKNOWN, s = strm.state, s.pending = 0, s.pending_out = 0, s.wrap < 0)\n s.wrap = -s.wrap;\n return s.status = s.wrap \? INIT_STATE : BUSY_STATE, strm.adler = s.wrap === 2 \? 0 : 1, s.last_flush = Z_NO_FLUSH, trees._tr_init(s), Z_OK;\n }\n function deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK)\n lm_init(strm.state);\n return ret;\n }\n function deflateSetHeader(strm, head) {\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (strm.state.wrap !== 2)\n return Z_STREAM_ERROR;\n return strm.state.gzhead = head, Z_OK;\n }\n function deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm)\n return Z_STREAM_ERROR;\n var wrap = 1;\n if (level === Z_DEFAULT_COMPRESSION)\n level = 6;\n if (windowBits < 0)\n wrap = 0, windowBits = -windowBits;\n else if (windowBits > 15)\n wrap = 2, windowBits -= 16;\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED)\n return err(strm, Z_STREAM_ERROR);\n if (windowBits === 8)\n windowBits = 9;\n var s = new DeflateState;\n return strm.state = s, s.strm = strm, s.wrap = wrap, s.gzhead = null, s.w_bits = windowBits, s.w_size = 1 << s.w_bits, s.w_mask = s.w_size - 1, s.hash_bits = memLevel + 7, s.hash_size = 1 << s.hash_bits, s.hash_mask = s.hash_size - 1, s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH), s.window = new utils.Buf8(s.w_size * 2), s.head = new utils.Buf16(s.hash_size), s.prev = new utils.Buf16(s.w_size), s.lit_bufsize = 1 << memLevel + 6, s.pending_buf_size = s.lit_bufsize * 4, s.pending_buf = new utils.Buf8(s.pending_buf_size), s.d_buf = 1 * s.lit_bufsize, s.l_buf = 3 * s.lit_bufsize, s.level = level, s.strategy = strategy, s.method = method, deflateReset(strm);\n }\n function deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n }\n function deflate(strm, flush) {\n var old_flush, s, beg, val;\n if (!strm || !strm.state || flush > Z_BLOCK || flush < 0)\n return strm \? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n if (s = strm.state, !strm.output || !strm.input && strm.avail_in !== 0 || s.status === FINISH_STATE && flush !== Z_FINISH)\n return err(strm, strm.avail_out === 0 \? Z_BUF_ERROR : Z_STREAM_ERROR);\n if (s.strm = strm, old_flush = s.last_flush, s.last_flush = flush, s.status === INIT_STATE)\n if (s.wrap === 2)\n if (strm.adler = 0, put_byte(s, 31), put_byte(s, 139), put_byte(s, 8), !s.gzhead)\n put_byte(s, 0), put_byte(s, 0), put_byte(s, 0), put_byte(s, 0), put_byte(s, 0), put_byte(s, s.level === 9 \? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 \? 4 : 0), put_byte(s, OS_CODE), s.status = BUSY_STATE;\n else {\n if (put_byte(s, (s.gzhead.text \? 1 : 0) + (s.gzhead.hcrc \? 2 : 0) + (!s.gzhead.extra \? 0 : 4) + (!s.gzhead.name \? 0 : 8) + (!s.gzhead.comment \? 0 : 16)), put_byte(s, s.gzhead.time & 255), put_byte(s, s.gzhead.time >> 8 & 255), put_byte(s, s.gzhead.time >> 16 & 255), put_byte(s, s.gzhead.time >> 24 & 255), put_byte(s, s.level === 9 \? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 \? 4 : 0), put_byte(s, s.gzhead.os & 255), s.gzhead.extra && s.gzhead.extra.length)\n put_byte(s, s.gzhead.extra.length & 255), put_byte(s, s.gzhead.extra.length >> 8 & 255);\n if (s.gzhead.hcrc)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n s.gzindex = 0, s.status = EXTRA_STATE;\n }\n else {\n var header = Z_DEFLATED + (s.w_bits - 8 << 4) << 8, level_flags = -1;\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2)\n level_flags = 0;\n else if (s.level < 6)\n level_flags = 1;\n else if (s.level === 6)\n level_flags = 2;\n else\n level_flags = 3;\n if (header |= level_flags << 6, s.strstart !== 0)\n header |= PRESET_DICT;\n if (header += 31 - header % 31, s.status = BUSY_STATE, putShortMSB(s, header), s.strstart !== 0)\n putShortMSB(s, strm.adler >>> 16), putShortMSB(s, strm.adler & 65535);\n strm.adler = 1;\n }\n if (s.status === EXTRA_STATE)\n if (s.gzhead.extra) {\n beg = s.pending;\n while (s.gzindex < (s.gzhead.extra.length & 65535)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (flush_pending(strm), beg = s.pending, s.pending === s.pending_buf_size)\n break;\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 255), s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (s.gzindex === s.gzhead.extra.length)\n s.gzindex = 0, s.status = NAME_STATE;\n } else\n s.status = NAME_STATE;\n if (s.status === NAME_STATE)\n if (s.gzhead.name) {\n beg = s.pending;\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (flush_pending(strm), beg = s.pending, s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n if (s.gzindex < s.gzhead.name.length)\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 255;\n else\n val = 0;\n put_byte(s, val);\n } while (val !== 0);\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (val === 0)\n s.gzindex = 0, s.status = COMMENT_STATE;\n } else\n s.status = COMMENT_STATE;\n if (s.status === COMMENT_STATE)\n if (s.gzhead.comment) {\n beg = s.pending;\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (flush_pending(strm), beg = s.pending, s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n if (s.gzindex < s.gzhead.comment.length)\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 255;\n else\n val = 0;\n put_byte(s, val);\n } while (val !== 0);\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (val === 0)\n s.status = HCRC_STATE;\n } else\n s.status = HCRC_STATE;\n if (s.status === HCRC_STATE)\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size)\n flush_pending(strm);\n if (s.pending + 2 <= s.pending_buf_size)\n put_byte(s, strm.adler & 255), put_byte(s, strm.adler >> 8 & 255), strm.adler = 0, s.status = BUSY_STATE;\n } else\n s.status = BUSY_STATE;\n if (s.pending !== 0) {\n if (flush_pending(strm), strm.avail_out === 0)\n return s.last_flush = -1, Z_OK;\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && flush !== Z_FINISH)\n return err(strm, Z_BUF_ERROR);\n if (s.status === FINISH_STATE && strm.avail_in !== 0)\n return err(strm, Z_BUF_ERROR);\n if (strm.avail_in !== 0 || s.lookahead !== 0 || flush !== Z_NO_FLUSH && s.status !== FINISH_STATE) {\n var bstate = s.strategy === Z_HUFFMAN_ONLY \? deflate_huff(s, flush) : s.strategy === Z_RLE \? deflate_rle(s, flush) : configuration_table[s.level].func(s, flush);\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE)\n s.status = FINISH_STATE;\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0)\n s.last_flush = -1;\n return Z_OK;\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH)\n trees._tr_align(s);\n else if (flush !== Z_BLOCK) {\n if (trees._tr_stored_block(s, 0, 0, !1), flush === Z_FULL_FLUSH) {\n if (zero(s.head), s.lookahead === 0)\n s.strstart = 0, s.block_start = 0, s.insert = 0;\n }\n }\n if (flush_pending(strm), strm.avail_out === 0)\n return s.last_flush = -1, Z_OK;\n }\n }\n if (flush !== Z_FINISH)\n return Z_OK;\n if (s.wrap <= 0)\n return Z_STREAM_END;\n if (s.wrap === 2)\n put_byte(s, strm.adler & 255), put_byte(s, strm.adler >> 8 & 255), put_byte(s, strm.adler >> 16 & 255), put_byte(s, strm.adler >> 24 & 255), put_byte(s, strm.total_in & 255), put_byte(s, strm.total_in >> 8 & 255), put_byte(s, strm.total_in >> 16 & 255), put_byte(s, strm.total_in >> 24 & 255);\n else\n putShortMSB(s, strm.adler >>> 16), putShortMSB(s, strm.adler & 65535);\n if (flush_pending(strm), s.wrap > 0)\n s.wrap = -s.wrap;\n return s.pending !== 0 \? Z_OK : Z_STREAM_END;\n }\n function deflateEnd(strm) {\n var status;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (status = strm.state.status, status !== INIT_STATE && status !== EXTRA_STATE && status !== NAME_STATE && status !== COMMENT_STATE && status !== HCRC_STATE && status !== BUSY_STATE && status !== FINISH_STATE)\n return err(strm, Z_STREAM_ERROR);\n return strm.state = null, status === BUSY_STATE \? err(strm, Z_DATA_ERROR) : Z_OK;\n }\n function deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length, s, str, n, wrap, avail, next, input, tmpDict;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (s = strm.state, wrap = s.wrap, wrap === 2 || wrap === 1 && s.status !== INIT_STATE || s.lookahead)\n return Z_STREAM_ERROR;\n if (wrap === 1)\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n if (s.wrap = 0, dictLength >= s.w_size) {\n if (wrap === 0)\n zero(s.head), s.strstart = 0, s.block_start = 0, s.insert = 0;\n tmpDict = new utils.Buf8(s.w_size), utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0), dictionary = tmpDict, dictLength = s.w_size;\n }\n avail = strm.avail_in, next = strm.next_in, input = strm.input, strm.avail_in = dictLength, strm.next_in = 0, strm.input = dictionary, fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart, n = s.lookahead - (MIN_MATCH - 1);\n do\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask, s.prev[str & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = str, str++;\n while (--n);\n s.strstart = str, s.lookahead = MIN_MATCH - 1, fill_window(s);\n }\n return s.strstart += s.lookahead, s.block_start = s.strstart, s.insert = s.lookahead, s.lookahead = 0, s.match_length = s.prev_length = MIN_MATCH - 1, s.match_available = 0, strm.next_in = next, strm.input = input, strm.avail_in = avail, s.wrap = wrap, Z_OK;\n }\n exports.deflateInit = deflateInit, exports.deflateInit2 = deflateInit2, exports.deflateReset = deflateReset, exports.deflateResetKeep = deflateResetKeep, exports.deflateSetHeader = deflateSetHeader, exports.deflate = deflate, exports.deflateEnd = deflateEnd, exports.deflateSetDictionary = deflateSetDictionary, exports.deflateInfo = \"pako deflate (from Nodeca project)\";\n }\n}), require_inffast = __commonJS({\n \"node_modules/pako/lib/zlib/inffast.js\"(exports, module2) {\n var BAD = 30, TYPE = 12;\n module2.exports = function inflate_fast(strm, start) {\n var state, _in, last, _out, beg, end, dmax, wsize, whave, wnext, s_window, hold, bits, lcode, dcode, lmask, dmask, here, op, len, dist, from, from_source, input, output;\n state = strm.state, _in = strm.next_in, input = strm.input, last = _in + (strm.avail_in - 5), _out = strm.next_out, output = strm.output, beg = _out - (start - strm.avail_out), end = _out + (strm.avail_out - 257), dmax = state.dmax, wsize = state.wsize, whave = state.whave, wnext = state.wnext, s_window = state.window, hold = state.hold, bits = state.bits, lcode = state.lencode, dcode = state.distcode, lmask = (1 << state.lenbits) - 1, dmask = (1 << state.distbits) - 1;\n top:\n do {\n if (bits < 15)\n hold += input[_in++] << bits, bits += 8, hold += input[_in++] << bits, bits += 8;\n here = lcode[hold & lmask];\n dolen:\n for (;; ) {\n if (op = here >>> 24, hold >>>= op, bits -= op, op = here >>> 16 & 255, op === 0)\n output[_out++] = here & 65535;\n else if (op & 16) {\n if (len = here & 65535, op &= 15, op) {\n if (bits < op)\n hold += input[_in++] << bits, bits += 8;\n len += hold & (1 << op) - 1, hold >>>= op, bits -= op;\n }\n if (bits < 15)\n hold += input[_in++] << bits, bits += 8, hold += input[_in++] << bits, bits += 8;\n here = dcode[hold & dmask];\n dodist:\n for (;; ) {\n if (op = here >>> 24, hold >>>= op, bits -= op, op = here >>> 16 & 255, op & 16) {\n if (dist = here & 65535, op &= 15, bits < op) {\n if (hold += input[_in++] << bits, bits += 8, bits < op)\n hold += input[_in++] << bits, bits += 8;\n }\n if (dist += hold & (1 << op) - 1, dist > dmax) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break top;\n }\n if (hold >>>= op, bits -= op, op = _out - beg, dist > op) {\n if (op = dist - op, op > whave) {\n if (state.sane) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break top;\n }\n }\n if (from = 0, from_source = s_window, wnext === 0) {\n if (from += wsize - op, op < len) {\n len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n from = _out - dist, from_source = output;\n }\n } else if (wnext < op) {\n if (from += wsize + wnext - op, op -= wnext, op < len) {\n len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n if (from = 0, wnext < len) {\n op = wnext, len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n from = _out - dist, from_source = output;\n }\n }\n } else if (from += wnext - op, op < len) {\n len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n from = _out - dist, from_source = output;\n }\n while (len > 2)\n output[_out++] = from_source[from++], output[_out++] = from_source[from++], output[_out++] = from_source[from++], len -= 3;\n if (len) {\n if (output[_out++] = from_source[from++], len > 1)\n output[_out++] = from_source[from++];\n }\n } else {\n from = _out - dist;\n do\n output[_out++] = output[from++], output[_out++] = output[from++], output[_out++] = output[from++], len -= 3;\n while (len > 2);\n if (len) {\n if (output[_out++] = output[from++], len > 1)\n output[_out++] = output[from++];\n }\n }\n } else if ((op & 64) === 0) {\n here = dcode[(here & 65535) + (hold & (1 << op) - 1)];\n continue dodist;\n } else {\n strm.msg = \"invalid distance code\", state.mode = BAD;\n break top;\n }\n break;\n }\n } else if ((op & 64) === 0) {\n here = lcode[(here & 65535) + (hold & (1 << op) - 1)];\n continue dolen;\n } else if (op & 32) {\n state.mode = TYPE;\n break top;\n } else {\n strm.msg = \"invalid literal/length code\", state.mode = BAD;\n break top;\n }\n break;\n }\n } while (_in < last && _out < end);\n len = bits >> 3, _in -= len, bits -= len << 3, hold &= (1 << bits) - 1, strm.next_in = _in, strm.next_out = _out, strm.avail_in = _in < last \? 5 + (last - _in) : 5 - (_in - last), strm.avail_out = _out < end \? 257 + (end - _out) : 257 - (_out - end), state.hold = hold, state.bits = bits;\n return;\n };\n }\n}), require_inftrees = __commonJS({\n \"node_modules/pako/lib/zlib/inftrees.js\"(exports, module2) {\n var utils = require_common(), MAXBITS = 15, ENOUGH_LENS = 852, ENOUGH_DISTS = 592, CODES = 0, LENS = 1, DISTS = 2, lbase = [\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 13,\n 15,\n 17,\n 19,\n 23,\n 27,\n 31,\n 35,\n 43,\n 51,\n 59,\n 67,\n 83,\n 99,\n 115,\n 131,\n 163,\n 195,\n 227,\n 258,\n 0,\n 0\n ], lext = [\n 16,\n 16,\n 16,\n 16,\n 16,\n 16,\n 16,\n 16,\n 17,\n 17,\n 17,\n 17,\n 18,\n 18,\n 18,\n 18,\n 19,\n 19,\n 19,\n 19,\n 20,\n 20,\n 20,\n 20,\n 21,\n 21,\n 21,\n 21,\n 16,\n 72,\n 78\n ], dbase = [\n 1,\n 2,\n 3,\n 4,\n 5,\n 7,\n 9,\n 13,\n 17,\n 25,\n 33,\n 49,\n 65,\n 97,\n 129,\n 193,\n 257,\n 385,\n 513,\n 769,\n 1025,\n 1537,\n 2049,\n 3073,\n 4097,\n 6145,\n 8193,\n 12289,\n 16385,\n 24577,\n 0,\n 0\n ], dext = [\n 16,\n 16,\n 16,\n 16,\n 17,\n 17,\n 18,\n 18,\n 19,\n 19,\n 20,\n 20,\n 21,\n 21,\n 22,\n 22,\n 23,\n 23,\n 24,\n 24,\n 25,\n 25,\n 26,\n 26,\n 27,\n 27,\n 28,\n 28,\n 29,\n 29,\n 64,\n 64\n ];\n module2.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) {\n var bits = opts.bits, len = 0, sym = 0, min = 0, max = 0, root = 0, curr = 0, drop = 0, left = 0, used = 0, huff = 0, incr, fill, low, mask, next, base = null, base_index = 0, end, count = new utils.Buf16(MAXBITS + 1), offs = new utils.Buf16(MAXBITS + 1), extra = null, extra_index = 0, here_bits, here_op, here_val;\n for (len = 0;len <= MAXBITS; len++)\n count[len] = 0;\n for (sym = 0;sym < codes; sym++)\n count[lens[lens_index + sym]]++;\n root = bits;\n for (max = MAXBITS;max >= 1; max--)\n if (count[max] !== 0)\n break;\n if (root > max)\n root = max;\n if (max === 0)\n return table[table_index++] = 1 << 24 | 64 << 16 | 0, table[table_index++] = 1 << 24 | 64 << 16 | 0, opts.bits = 1, 0;\n for (min = 1;min < max; min++)\n if (count[min] !== 0)\n break;\n if (root < min)\n root = min;\n left = 1;\n for (len = 1;len <= MAXBITS; len++)\n if (left <<= 1, left -= count[len], left < 0)\n return -1;\n if (left > 0 && (type === CODES || max !== 1))\n return -1;\n offs[1] = 0;\n for (len = 1;len < MAXBITS; len++)\n offs[len + 1] = offs[len] + count[len];\n for (sym = 0;sym < codes; sym++)\n if (lens[lens_index + sym] !== 0)\n work[offs[lens[lens_index + sym]]++] = sym;\n if (type === CODES)\n base = extra = work, end = 19;\n else if (type === LENS)\n base = lbase, base_index -= 257, extra = lext, extra_index -= 257, end = 256;\n else\n base = dbase, extra = dext, end = -1;\n if (huff = 0, sym = 0, len = min, next = table_index, curr = root, drop = 0, low = -1, used = 1 << root, mask = used - 1, type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS)\n return 1;\n for (;; ) {\n if (here_bits = len - drop, work[sym] < end)\n here_op = 0, here_val = work[sym];\n else if (work[sym] > end)\n here_op = extra[extra_index + work[sym]], here_val = base[base_index + work[sym]];\n else\n here_op = 96, here_val = 0;\n incr = 1 << len - drop, fill = 1 << curr, min = fill;\n do\n fill -= incr, table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0;\n while (fill !== 0);\n incr = 1 << len - 1;\n while (huff & incr)\n incr >>= 1;\n if (incr !== 0)\n huff &= incr - 1, huff += incr;\n else\n huff = 0;\n if (sym++, --count[len] === 0) {\n if (len === max)\n break;\n len = lens[lens_index + work[sym]];\n }\n if (len > root && (huff & mask) !== low) {\n if (drop === 0)\n drop = root;\n next += min, curr = len - drop, left = 1 << curr;\n while (curr + drop < max) {\n if (left -= count[curr + drop], left <= 0)\n break;\n curr++, left <<= 1;\n }\n if (used += 1 << curr, type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS)\n return 1;\n low = huff & mask, table[low] = root << 24 | curr << 16 | next - table_index | 0;\n }\n }\n if (huff !== 0)\n table[next + huff] = len - drop << 24 | 64 << 16 | 0;\n return opts.bits = root, 0;\n };\n }\n}), require_inflate = __commonJS({\n \"node_modules/pako/lib/zlib/inflate.js\"(exports) {\n var utils = require_common(), adler32 = require_adler32(), crc32 = require_crc32(), inflate_fast = require_inffast(), inflate_table = require_inftrees(), CODES = 0, LENS = 1, DISTS = 2, Z_FINISH = 4, Z_BLOCK = 5, Z_TREES = 6, Z_OK = 0, Z_STREAM_END = 1, Z_NEED_DICT = 2, Z_STREAM_ERROR = -2, Z_DATA_ERROR = -3, Z_MEM_ERROR = -4, Z_BUF_ERROR = -5, Z_DEFLATED = 8, HEAD = 1, FLAGS = 2, TIME = 3, OS = 4, EXLEN = 5, EXTRA = 6, NAME = 7, COMMENT = 8, HCRC = 9, DICTID = 10, DICT = 11, TYPE = 12, TYPEDO = 13, STORED = 14, COPY_ = 15, COPY = 16, TABLE = 17, LENLENS = 18, CODELENS = 19, LEN_ = 20, LEN = 21, LENEXT = 22, DIST = 23, DISTEXT = 24, MATCH = 25, LIT = 26, CHECK = 27, LENGTH = 28, DONE = 29, BAD = 30, MEM = 31, SYNC = 32, ENOUGH_LENS = 852, ENOUGH_DISTS = 592, MAX_WBITS = 15, DEF_WBITS = MAX_WBITS;\n function zswap32(q) {\n return (q >>> 24 & 255) + (q >>> 8 & 65280) + ((q & 65280) << 8) + ((q & 255) << 24);\n }\n function InflateState() {\n this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new utils.Buf16(320), this.work = new utils.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;\n }\n function inflateResetKeep(strm) {\n var state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, strm.total_in = strm.total_out = state.total = 0, strm.msg = \"\", state.wrap)\n strm.adler = state.wrap & 1;\n return state.mode = HEAD, state.last = 0, state.havedict = 0, state.dmax = 32768, state.head = null, state.hold = 0, state.bits = 0, state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS), state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS), state.sane = 1, state.back = -1, Z_OK;\n }\n function inflateReset(strm) {\n var state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n return state = strm.state, state.wsize = 0, state.whave = 0, state.wnext = 0, inflateResetKeep(strm);\n }\n function inflateReset2(strm, windowBits) {\n var wrap, state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, windowBits < 0)\n wrap = 0, windowBits = -windowBits;\n else if (wrap = (windowBits >> 4) + 1, windowBits < 48)\n windowBits &= 15;\n if (windowBits && (windowBits < 8 || windowBits > 15))\n return Z_STREAM_ERROR;\n if (state.window !== null && state.wbits !== windowBits)\n state.window = null;\n return state.wrap = wrap, state.wbits = windowBits, inflateReset(strm);\n }\n function inflateInit2(strm, windowBits) {\n var ret, state;\n if (!strm)\n return Z_STREAM_ERROR;\n if (state = new InflateState, strm.state = state, state.window = null, ret = inflateReset2(strm, windowBits), ret !== Z_OK)\n strm.state = null;\n return ret;\n }\n function inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n }\n var virgin = !0, lenfix, distfix;\n function fixedtables(state) {\n if (virgin) {\n var sym;\n lenfix = new utils.Buf32(512), distfix = new utils.Buf32(32), sym = 0;\n while (sym < 144)\n state.lens[sym++] = 8;\n while (sym < 256)\n state.lens[sym++] = 9;\n while (sym < 280)\n state.lens[sym++] = 7;\n while (sym < 288)\n state.lens[sym++] = 8;\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, {\n bits: 9\n }), sym = 0;\n while (sym < 32)\n state.lens[sym++] = 5;\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, {\n bits: 5\n }), virgin = !1;\n }\n state.lencode = lenfix, state.lenbits = 9, state.distcode = distfix, state.distbits = 5;\n }\n function updatewindow(strm, src, end, copy) {\n var dist, state = strm.state;\n if (state.window === null)\n state.wsize = 1 << state.wbits, state.wnext = 0, state.whave = 0, state.window = new utils.Buf8(state.wsize);\n if (copy >= state.wsize)\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0), state.wnext = 0, state.whave = state.wsize;\n else {\n if (dist = state.wsize - state.wnext, dist > copy)\n dist = copy;\n if (utils.arraySet(state.window, src, end - copy, dist, state.wnext), copy -= dist, copy)\n utils.arraySet(state.window, src, end - copy, copy, 0), state.wnext = copy, state.whave = state.wsize;\n else {\n if (state.wnext += dist, state.wnext === state.wsize)\n state.wnext = 0;\n if (state.whave < state.wsize)\n state.whave += dist;\n }\n }\n return 0;\n }\n function inflate(strm, flush) {\n var state, input, output, next, put, have, left, hold, bits, _in, _out, copy, from, from_source, here = 0, here_bits, here_op, here_val, last_bits, last_op, last_val, len, ret, hbuf = new utils.Buf8(4), opts, n, order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0)\n return Z_STREAM_ERROR;\n if (state = strm.state, state.mode === TYPE)\n state.mode = TYPEDO;\n put = strm.next_out, output = strm.output, left = strm.avail_out, next = strm.next_in, input = strm.input, have = strm.avail_in, hold = state.hold, bits = state.bits, _in = have, _out = left, ret = Z_OK;\n inf_leave:\n for (;; )\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.wrap & 2 && hold === 35615) {\n state.check = 0, hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0), hold = 0, bits = 0, state.mode = FLAGS;\n break;\n }\n if (state.flags = 0, state.head)\n state.head.done = !1;\n if (!(state.wrap & 1) || (((hold & 255) << 8) + (hold >> 8)) % 31) {\n strm.msg = \"incorrect header check\", state.mode = BAD;\n break;\n }\n if ((hold & 15) !== Z_DEFLATED) {\n strm.msg = \"unknown compression method\", state.mode = BAD;\n break;\n }\n if (hold >>>= 4, bits -= 4, len = (hold & 15) + 8, state.wbits === 0)\n state.wbits = len;\n else if (len > state.wbits) {\n strm.msg = \"invalid window size\", state.mode = BAD;\n break;\n }\n state.dmax = 1 << len, strm.adler = state.check = 1, state.mode = hold & 512 \? DICTID : TYPE, hold = 0, bits = 0;\n break;\n case FLAGS:\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.flags = hold, (state.flags & 255) !== Z_DEFLATED) {\n strm.msg = \"unknown compression method\", state.mode = BAD;\n break;\n }\n if (state.flags & 57344) {\n strm.msg = \"unknown header flags set\", state.mode = BAD;\n break;\n }\n if (state.head)\n state.head.text = hold >> 8 & 1;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0);\n hold = 0, bits = 0, state.mode = TIME;\n case TIME:\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.head)\n state.head.time = hold;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, hbuf[2] = hold >>> 16 & 255, hbuf[3] = hold >>> 24 & 255, state.check = crc32(state.check, hbuf, 4, 0);\n hold = 0, bits = 0, state.mode = OS;\n case OS:\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.head)\n state.head.xflags = hold & 255, state.head.os = hold >> 8;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0);\n hold = 0, bits = 0, state.mode = EXLEN;\n case EXLEN:\n if (state.flags & 1024) {\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.length = hold, state.head)\n state.head.extra_len = hold;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0);\n hold = 0, bits = 0;\n } else if (state.head)\n state.head.extra = null;\n state.mode = EXTRA;\n case EXTRA:\n if (state.flags & 1024) {\n if (copy = state.length, copy > have)\n copy = have;\n if (copy) {\n if (state.head) {\n if (len = state.head.extra_len - state.length, !state.head.extra)\n state.head.extra = new Array(state.head.extra_len);\n utils.arraySet(state.head.extra, input, next, copy, len);\n }\n if (state.flags & 512)\n state.check = crc32(state.check, input, copy, next);\n have -= copy, next += copy, state.length -= copy;\n }\n if (state.length)\n break inf_leave;\n }\n state.length = 0, state.mode = NAME;\n case NAME:\n if (state.flags & 2048) {\n if (have === 0)\n break inf_leave;\n copy = 0;\n do\n if (len = input[next + copy++], state.head && len && state.length < 65536)\n state.head.name += String.fromCharCode(len);\n while (len && copy < have);\n if (state.flags & 512)\n state.check = crc32(state.check, input, copy, next);\n if (have -= copy, next += copy, len)\n break inf_leave;\n } else if (state.head)\n state.head.name = null;\n state.length = 0, state.mode = COMMENT;\n case COMMENT:\n if (state.flags & 4096) {\n if (have === 0)\n break inf_leave;\n copy = 0;\n do\n if (len = input[next + copy++], state.head && len && state.length < 65536)\n state.head.comment += String.fromCharCode(len);\n while (len && copy < have);\n if (state.flags & 512)\n state.check = crc32(state.check, input, copy, next);\n if (have -= copy, next += copy, len)\n break inf_leave;\n } else if (state.head)\n state.head.comment = null;\n state.mode = HCRC;\n case HCRC:\n if (state.flags & 512) {\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (hold !== (state.check & 65535)) {\n strm.msg = \"header crc mismatch\", state.mode = BAD;\n break;\n }\n hold = 0, bits = 0;\n }\n if (state.head)\n state.head.hcrc = state.flags >> 9 & 1, state.head.done = !0;\n strm.adler = state.check = 0, state.mode = TYPE;\n break;\n case DICTID:\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n strm.adler = state.check = zswap32(hold), hold = 0, bits = 0, state.mode = DICT;\n case DICT:\n if (state.havedict === 0)\n return strm.next_out = put, strm.avail_out = left, strm.next_in = next, strm.avail_in = have, state.hold = hold, state.bits = bits, Z_NEED_DICT;\n strm.adler = state.check = 1, state.mode = TYPE;\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES)\n break inf_leave;\n case TYPEDO:\n if (state.last) {\n hold >>>= bits & 7, bits -= bits & 7, state.mode = CHECK;\n break;\n }\n while (bits < 3) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n switch (state.last = hold & 1, hold >>>= 1, bits -= 1, hold & 3) {\n case 0:\n state.mode = STORED;\n break;\n case 1:\n if (fixedtables(state), state.mode = LEN_, flush === Z_TREES) {\n hold >>>= 2, bits -= 2;\n break inf_leave;\n }\n break;\n case 2:\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = \"invalid block type\", state.mode = BAD;\n }\n hold >>>= 2, bits -= 2;\n break;\n case STORED:\n hold >>>= bits & 7, bits -= bits & 7;\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if ((hold & 65535) !== (hold >>> 16 ^ 65535)) {\n strm.msg = \"invalid stored block lengths\", state.mode = BAD;\n break;\n }\n if (state.length = hold & 65535, hold = 0, bits = 0, state.mode = COPY_, flush === Z_TREES)\n break inf_leave;\n case COPY_:\n state.mode = COPY;\n case COPY:\n if (copy = state.length, copy) {\n if (copy > have)\n copy = have;\n if (copy > left)\n copy = left;\n if (copy === 0)\n break inf_leave;\n utils.arraySet(output, input, next, copy, put), have -= copy, next += copy, left -= copy, put += copy, state.length -= copy;\n break;\n }\n state.mode = TYPE;\n break;\n case TABLE:\n while (bits < 14) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.nlen = (hold & 31) + 257, hold >>>= 5, bits -= 5, state.ndist = (hold & 31) + 1, hold >>>= 5, bits -= 5, state.ncode = (hold & 15) + 4, hold >>>= 4, bits -= 4, state.nlen > 286 || state.ndist > 30) {\n strm.msg = \"too many length or distance symbols\", state.mode = BAD;\n break;\n }\n state.have = 0, state.mode = LENLENS;\n case LENLENS:\n while (state.have < state.ncode) {\n while (bits < 3) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n state.lens[order[state.have++]] = hold & 7, hold >>>= 3, bits -= 3;\n }\n while (state.have < 19)\n state.lens[order[state.have++]] = 0;\n if (state.lencode = state.lendyn, state.lenbits = 7, opts = { bits: state.lenbits }, ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts), state.lenbits = opts.bits, ret) {\n strm.msg = \"invalid code lengths set\", state.mode = BAD;\n break;\n }\n state.have = 0, state.mode = CODELENS;\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;; ) {\n if (here = state.lencode[hold & (1 << state.lenbits) - 1], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (here_val < 16)\n hold >>>= here_bits, bits -= here_bits, state.lens[state.have++] = here_val;\n else {\n if (here_val === 16) {\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (hold >>>= here_bits, bits -= here_bits, state.have === 0) {\n strm.msg = \"invalid bit length repeat\", state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1], copy = 3 + (hold & 3), hold >>>= 2, bits -= 2;\n } else if (here_val === 17) {\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= here_bits, bits -= here_bits, len = 0, copy = 3 + (hold & 7), hold >>>= 3, bits -= 3;\n } else {\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= here_bits, bits -= here_bits, len = 0, copy = 11 + (hold & 127), hold >>>= 7, bits -= 7;\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = \"invalid bit length repeat\", state.mode = BAD;\n break;\n }\n while (copy--)\n state.lens[state.have++] = len;\n }\n }\n if (state.mode === BAD)\n break;\n if (state.lens[256] === 0) {\n strm.msg = \"invalid code -- missing end-of-block\", state.mode = BAD;\n break;\n }\n if (state.lenbits = 9, opts = { bits: state.lenbits }, ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts), state.lenbits = opts.bits, ret) {\n strm.msg = \"invalid literal/lengths set\", state.mode = BAD;\n break;\n }\n if (state.distbits = 6, state.distcode = state.distdyn, opts = { bits: state.distbits }, ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts), state.distbits = opts.bits, ret) {\n strm.msg = \"invalid distances set\", state.mode = BAD;\n break;\n }\n if (state.mode = LEN_, flush === Z_TREES)\n break inf_leave;\n case LEN_:\n state.mode = LEN;\n case LEN:\n if (have >= 6 && left >= 258) {\n if (strm.next_out = put, strm.avail_out = left, strm.next_in = next, strm.avail_in = have, state.hold = hold, state.bits = bits, inflate_fast(strm, _out), put = strm.next_out, output = strm.output, left = strm.avail_out, next = strm.next_in, input = strm.input, have = strm.avail_in, hold = state.hold, bits = state.bits, state.mode === TYPE)\n state.back = -1;\n break;\n }\n state.back = 0;\n for (;; ) {\n if (here = state.lencode[hold & (1 << state.lenbits) - 1], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (here_op && (here_op & 240) === 0) {\n last_bits = here_bits, last_op = here_op, last_val = here_val;\n for (;; ) {\n if (here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, last_bits + here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= last_bits, bits -= last_bits, state.back += last_bits;\n }\n if (hold >>>= here_bits, bits -= here_bits, state.back += here_bits, state.length = here_val, here_op === 0) {\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n state.back = -1, state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = \"invalid literal/length code\", state.mode = BAD;\n break;\n }\n state.extra = here_op & 15, state.mode = LENEXT;\n case LENEXT:\n if (state.extra) {\n n = state.extra;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n state.length += hold & (1 << state.extra) - 1, hold >>>= state.extra, bits -= state.extra, state.back += state.extra;\n }\n state.was = state.length, state.mode = DIST;\n case DIST:\n for (;; ) {\n if (here = state.distcode[hold & (1 << state.distbits) - 1], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if ((here_op & 240) === 0) {\n last_bits = here_bits, last_op = here_op, last_val = here_val;\n for (;; ) {\n if (here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, last_bits + here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= last_bits, bits -= last_bits, state.back += last_bits;\n }\n if (hold >>>= here_bits, bits -= here_bits, state.back += here_bits, here_op & 64) {\n strm.msg = \"invalid distance code\", state.mode = BAD;\n break;\n }\n state.offset = here_val, state.extra = here_op & 15, state.mode = DISTEXT;\n case DISTEXT:\n if (state.extra) {\n n = state.extra;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n state.offset += hold & (1 << state.extra) - 1, hold >>>= state.extra, bits -= state.extra, state.back += state.extra;\n }\n if (state.offset > state.dmax) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break;\n }\n state.mode = MATCH;\n case MATCH:\n if (left === 0)\n break inf_leave;\n if (copy = _out - left, state.offset > copy) {\n if (copy = state.offset - copy, copy > state.whave) {\n if (state.sane) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break;\n }\n }\n if (copy > state.wnext)\n copy -= state.wnext, from = state.wsize - copy;\n else\n from = state.wnext - copy;\n if (copy > state.length)\n copy = state.length;\n from_source = state.window;\n } else\n from_source = output, from = put - state.offset, copy = state.length;\n if (copy > left)\n copy = left;\n left -= copy, state.length -= copy;\n do\n output[put++] = from_source[from++];\n while (--copy);\n if (state.length === 0)\n state.mode = LEN;\n break;\n case LIT:\n if (left === 0)\n break inf_leave;\n output[put++] = state.length, left--, state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold |= input[next++] << bits, bits += 8;\n }\n if (_out -= left, strm.total_out += _out, state.total += _out, _out)\n strm.adler = state.check = state.flags \? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out);\n if (_out = left, (state.flags \? hold : zswap32(hold)) !== state.check) {\n strm.msg = \"incorrect data check\", state.mode = BAD;\n break;\n }\n hold = 0, bits = 0;\n }\n state.mode = LENGTH;\n case LENGTH:\n if (state.wrap && state.flags) {\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (hold !== (state.total & 4294967295)) {\n strm.msg = \"incorrect length check\", state.mode = BAD;\n break;\n }\n hold = 0, bits = 0;\n }\n state.mode = DONE;\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n default:\n return Z_STREAM_ERROR;\n }\n if (strm.next_out = put, strm.avail_out = left, strm.next_in = next, strm.avail_in = have, state.hold = hold, state.bits = bits, state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush !== Z_FINISH)) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out))\n return state.mode = MEM, Z_MEM_ERROR;\n }\n if (_in -= strm.avail_in, _out -= strm.avail_out, strm.total_in += _in, strm.total_out += _out, state.total += _out, state.wrap && _out)\n strm.adler = state.check = state.flags \? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out);\n if (strm.data_type = state.bits + (state.last \? 64 : 0) + (state.mode === TYPE \? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ \? 256 : 0), (_in === 0 && _out === 0 || flush === Z_FINISH) && ret === Z_OK)\n ret = Z_BUF_ERROR;\n return ret;\n }\n function inflateEnd(strm) {\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n var state = strm.state;\n if (state.window)\n state.window = null;\n return strm.state = null, Z_OK;\n }\n function inflateGetHeader(strm, head) {\n var state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, (state.wrap & 2) === 0)\n return Z_STREAM_ERROR;\n return state.head = head, head.done = !1, Z_OK;\n }\n function inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length, state, dictid, ret;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, state.wrap !== 0 && state.mode !== DICT)\n return Z_STREAM_ERROR;\n if (state.mode === DICT) {\n if (dictid = 1, dictid = adler32(dictid, dictionary, dictLength, 0), dictid !== state.check)\n return Z_DATA_ERROR;\n }\n if (ret = updatewindow(strm, dictionary, dictLength, dictLength), ret)\n return state.mode = MEM, Z_MEM_ERROR;\n return state.havedict = 1, Z_OK;\n }\n exports.inflateReset = inflateReset, exports.inflateReset2 = inflateReset2, exports.inflateResetKeep = inflateResetKeep, exports.inflateInit = inflateInit, exports.inflateInit2 = inflateInit2, exports.inflate = inflate, exports.inflateEnd = inflateEnd, exports.inflateGetHeader = inflateGetHeader, exports.inflateSetDictionary = inflateSetDictionary, exports.inflateInfo = \"pako inflate (from Nodeca project)\";\n }\n}), require_constants = __commonJS({\n \"node_modules/pako/lib/zlib/constants.js\"(exports, module2) {\n module2.exports = {\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n Z_BUF_ERROR: -5,\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n Z_BINARY: 0,\n Z_TEXT: 1,\n Z_UNKNOWN: 2,\n Z_DEFLATED: 8\n };\n }\n}), require_binding = __commonJS({\n \"node_modules/browserify-zlib/lib/binding.js\"(exports) {\n var Zstream = require_zstream(), zlib_deflate = require_deflate(), zlib_inflate = require_inflate(), constants = require_constants();\n for (key in constants)\n exports[key] = constants[key];\n var key;\n exports.NONE = 0, exports.DEFLATE = 1, exports.INFLATE = 2, exports.GZIP = 3, exports.GUNZIP = 4, exports.DEFLATERAW = 5, exports.INFLATERAW = 6, exports.UNZIP = 7;\n var GZIP_HEADER_ID1 = 31, GZIP_HEADER_ID2 = 139;\n function Zlib(mode) {\n if (typeof mode !== \"number\" || mode < exports.DEFLATE || mode > exports.UNZIP)\n @throwTypeError(\"Bad argument\");\n this.dictionary = null, this.err = 0, this.flush = 0, this.init_done = !1, this.level = 0, this.memLevel = 0, this.mode = mode, this.strategy = 0, this.windowBits = 0, this.write_in_progress = !1, this.pending_close = !1, this.gzip_id_bytes_read = 0;\n }\n Zlib.prototype = {}, Zlib.prototype.close = function() {\n if (this.write_in_progress) {\n this.pending_close = !0;\n return;\n }\n if (this.pending_close = !1, assert(this.init_done, \"close before init\"), assert(this.mode <= exports.UNZIP), this.mode === exports.DEFLATE || this.mode === exports.GZIP || this.mode === exports.DEFLATERAW)\n zlib_deflate.deflateEnd(this.strm);\n else if (this.mode === exports.INFLATE || this.mode === exports.GUNZIP || this.mode === exports.INFLATERAW || this.mode === exports.UNZIP)\n zlib_inflate.inflateEnd(this.strm);\n this.mode = exports.NONE, this.dictionary = null;\n }, Zlib.prototype.write = function(flush, input, in_off, in_len, out, out_off, out_len) {\n return this._write(!0, flush, input, in_off, in_len, out, out_off, out_len);\n }, Zlib.prototype.writeSync = function(flush, input, in_off, in_len, out, out_off, out_len) {\n return this._write(!1, flush, input, in_off, in_len, out, out_off, out_len);\n }, Zlib.prototype._write = function(async, flush, input, in_off, in_len, out, out_off, out_len) {\n if (assert.equal(arguments.length, 8), assert(this.init_done, \"write before init\"), assert(this.mode !== exports.NONE, \"already finalized\"), assert.equal(!1, this.write_in_progress, \"write already in progress\"), assert.equal(!1, this.pending_close, \"close is pending\"), this.write_in_progress = !0, assert.equal(!1, flush === void 0, \"must provide flush value\"), this.write_in_progress = !0, flush !== exports.Z_NO_FLUSH && flush !== exports.Z_PARTIAL_FLUSH && flush !== exports.Z_SYNC_FLUSH && flush !== exports.Z_FULL_FLUSH && flush !== exports.Z_FINISH && flush !== exports.Z_BLOCK)\n throw new Error(\"Invalid flush value\");\n if (input == null)\n input = Buffer.alloc(0), in_len = 0, in_off = 0;\n if (this.strm.avail_in = in_len, this.strm.input = input, this.strm.next_in = in_off, this.strm.avail_out = out_len, this.strm.output = out, this.strm.next_out = out_off, this.flush = flush, !async) {\n if (this._process(), this._checkError())\n return this._afterSync();\n return;\n }\n var self = this;\n return process.nextTick(function() {\n self._process(), self._after();\n }), this;\n }, Zlib.prototype._afterSync = function() {\n var avail_out = this.strm.avail_out, avail_in = this.strm.avail_in;\n return this.write_in_progress = !1, [avail_in, avail_out];\n }, Zlib.prototype._process = function() {\n var next_expected_header_byte = null;\n switch (this.mode) {\n case exports.DEFLATE:\n case exports.GZIP:\n case exports.DEFLATERAW:\n this.err = zlib_deflate.deflate(this.strm, this.flush);\n break;\n case exports.UNZIP:\n if (this.strm.avail_in > 0)\n next_expected_header_byte = this.strm.next_in;\n switch (this.gzip_id_bytes_read) {\n case 0:\n if (next_expected_header_byte === null)\n break;\n if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID1) {\n if (this.gzip_id_bytes_read = 1, next_expected_header_byte++, this.strm.avail_in === 1)\n break;\n } else {\n this.mode = exports.INFLATE;\n break;\n }\n case 1:\n if (next_expected_header_byte === null)\n break;\n if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID2)\n this.gzip_id_bytes_read = 2, this.mode = exports.GUNZIP;\n else\n this.mode = exports.INFLATE;\n break;\n default:\n throw new Error(\"invalid number of gzip magic number bytes read\");\n }\n case exports.INFLATE:\n case exports.GUNZIP:\n case exports.INFLATERAW:\n if (this.err = zlib_inflate.inflate(this.strm, this.flush), this.err === exports.Z_NEED_DICT && this.dictionary) {\n if (this.err = zlib_inflate.inflateSetDictionary(this.strm, this.dictionary), this.err === exports.Z_OK)\n this.err = zlib_inflate.inflate(this.strm, this.flush);\n else if (this.err === exports.Z_DATA_ERROR)\n this.err = exports.Z_NEED_DICT;\n }\n while (this.strm.avail_in > 0 && this.mode === exports.GUNZIP && this.err === exports.Z_STREAM_END && this.strm.next_in[0] !== 0)\n this.reset(), this.err = zlib_inflate.inflate(this.strm, this.flush);\n break;\n default:\n throw new Error(\"Unknown mode \" + this.mode);\n }\n }, Zlib.prototype._checkError = function() {\n switch (this.err) {\n case exports.Z_OK:\n case exports.Z_BUF_ERROR:\n if (this.strm.avail_out !== 0 && this.flush === exports.Z_FINISH)\n return this._error(\"unexpected end of file\"), !1;\n break;\n case exports.Z_STREAM_END:\n break;\n case exports.Z_NEED_DICT:\n if (this.dictionary == null)\n this._error(\"Missing dictionary\");\n else\n this._error(\"Bad dictionary\");\n return !1;\n default:\n return this._error(\"Zlib error\"), !1;\n }\n return !0;\n }, Zlib.prototype._after = function() {\n if (!this._checkError())\n return;\n var avail_out = this.strm.avail_out, avail_in = this.strm.avail_in;\n if (this.write_in_progress = !1, this.callback(avail_in, avail_out), this.pending_close)\n this.close();\n }, Zlib.prototype._error = function(message) {\n if (this.strm.msg)\n message = this.strm.msg;\n if (this.onerror(message, this.err), this.write_in_progress = !1, this.pending_close)\n this.close();\n }, Zlib.prototype.init = function(windowBits, level, memLevel, strategy, dictionary) {\n assert(arguments.length === 4 || arguments.length === 5, \"init(windowBits, level, memLevel, strategy, [dictionary])\"), assert(windowBits >= 8 && windowBits <= 15, \"invalid windowBits\"), assert(level >= -1 && level <= 9, \"invalid compression level\"), assert(memLevel >= 1 && memLevel <= 9, \"invalid memlevel\"), assert(strategy === exports.Z_FILTERED || strategy === exports.Z_HUFFMAN_ONLY || strategy === exports.Z_RLE || strategy === exports.Z_FIXED || strategy === exports.Z_DEFAULT_STRATEGY, \"invalid strategy\"), this._init(level, windowBits, memLevel, strategy, dictionary), this._setDictionary();\n }, Zlib.prototype.params = function() {\n throw new Error(\"deflateParams Not supported\");\n }, Zlib.prototype.reset = function() {\n this._reset(), this._setDictionary();\n }, Zlib.prototype._init = function(level, windowBits, memLevel, strategy, dictionary) {\n if (this.level = level, this.windowBits = windowBits, this.memLevel = memLevel, this.strategy = strategy, this.flush = exports.Z_NO_FLUSH, this.err = exports.Z_OK, this.mode === exports.GZIP || this.mode === exports.GUNZIP)\n this.windowBits += 16;\n if (this.mode === exports.UNZIP)\n this.windowBits += 32;\n if (this.mode === exports.DEFLATERAW || this.mode === exports.INFLATERAW)\n this.windowBits = -1 * this.windowBits;\n switch (this.strm = new Zstream, this.mode) {\n case exports.DEFLATE:\n case exports.GZIP:\n case exports.DEFLATERAW:\n this.err = zlib_deflate.deflateInit2(this.strm, this.level, exports.Z_DEFLATED, this.windowBits, this.memLevel, this.strategy);\n break;\n case exports.INFLATE:\n case exports.GUNZIP:\n case exports.INFLATERAW:\n case exports.UNZIP:\n this.err = zlib_inflate.inflateInit2(this.strm, this.windowBits);\n break;\n default:\n throw new Error(\"Unknown mode \" + this.mode);\n }\n if (this.err !== exports.Z_OK)\n this._error(\"Init error\");\n this.dictionary = dictionary, this.write_in_progress = !1, this.init_done = !0;\n }, Zlib.prototype._setDictionary = function() {\n if (this.dictionary == null)\n return;\n switch (this.err = exports.Z_OK, this.mode) {\n case exports.DEFLATE:\n case exports.DEFLATERAW:\n this.err = zlib_deflate.deflateSetDictionary(this.strm, this.dictionary);\n break;\n default:\n break;\n }\n if (this.err !== exports.Z_OK)\n this._error(\"Failed to set dictionary\");\n }, Zlib.prototype._reset = function() {\n switch (this.err = exports.Z_OK, this.mode) {\n case exports.DEFLATE:\n case exports.DEFLATERAW:\n case exports.GZIP:\n this.err = zlib_deflate.deflateReset(this.strm);\n break;\n case exports.INFLATE:\n case exports.INFLATERAW:\n case exports.GUNZIP:\n this.err = zlib_inflate.inflateReset(this.strm);\n break;\n default:\n break;\n }\n if (this.err !== exports.Z_OK)\n this._error(\"Failed to reset stream\");\n }, exports.Zlib = Zlib;\n }\n}), require_lib = __commonJS({\n \"node_modules/browserify-zlib/lib/index.js\"(exports) {\n var Buffer2 = BufferModule.Buffer, Transform = StreamModule.Transform, binding = require_binding(), util = Util, kMaxLength = BufferModule.kMaxLength, kRangeErrorMessage = \"Cannot create final Buffer. It would be larger than 0x\" + kMaxLength.toString(16) + \" bytes\";\n binding.Z_MIN_WINDOWBITS = 8, binding.Z_MAX_WINDOWBITS = 15, binding.Z_DEFAULT_WINDOWBITS = 15, binding.Z_MIN_CHUNK = 64, binding.Z_MAX_CHUNK = Infinity, binding.Z_DEFAULT_CHUNK = 16384, binding.Z_MIN_MEMLEVEL = 1, binding.Z_MAX_MEMLEVEL = 9, binding.Z_DEFAULT_MEMLEVEL = 8, binding.Z_MIN_LEVEL = -1, binding.Z_MAX_LEVEL = 9, binding.Z_DEFAULT_LEVEL = binding.Z_DEFAULT_COMPRESSION;\n var bkeys = Object.keys(binding);\n for (bk = 0;bk < bkeys.length; bk++)\n if (bkey = bkeys[bk], bkey.match(/^Z/))\n Object.defineProperty(exports, bkey, {\n enumerable: !0,\n value: binding[bkey],\n writable: !1\n });\n var bkey, bk, codes = {\n Z_OK: binding.Z_OK,\n Z_STREAM_END: binding.Z_STREAM_END,\n Z_NEED_DICT: binding.Z_NEED_DICT,\n Z_ERRNO: binding.Z_ERRNO,\n Z_STREAM_ERROR: binding.Z_STREAM_ERROR,\n Z_DATA_ERROR: binding.Z_DATA_ERROR,\n Z_MEM_ERROR: binding.Z_MEM_ERROR,\n Z_BUF_ERROR: binding.Z_BUF_ERROR,\n Z_VERSION_ERROR: binding.Z_VERSION_ERROR\n }, ckeys = Object.keys(codes);\n for (ck = 0;ck < ckeys.length; ck++)\n ckey = ckeys[ck], codes[codes[ckey]] = ckey;\n var ckey, ck;\n Object.defineProperty(exports, \"codes\", {\n enumerable: !0,\n value: Object.freeze(codes),\n writable: !1\n }), exports.constants = require_constants(), exports.Deflate = Deflate, exports.Inflate = Inflate, exports.Gzip = Gzip, exports.Gunzip = Gunzip, exports.DeflateRaw = DeflateRaw, exports.InflateRaw = InflateRaw, exports.Unzip = Unzip, exports.createDeflate = function(o) {\n return new Deflate(o);\n }, exports.createInflate = function(o) {\n return new Inflate(o);\n }, exports.createDeflateRaw = function(o) {\n return new DeflateRaw(o);\n }, exports.createInflateRaw = function(o) {\n return new InflateRaw(o);\n }, exports.createGzip = function(o) {\n return new Gzip(o);\n }, exports.createGunzip = function(o) {\n return new Gunzip(o);\n }, exports.createUnzip = function(o) {\n return new Unzip(o);\n }, exports.deflate = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Deflate(opts), buffer, callback);\n }, exports.deflateSync = function(buffer, opts) {\n return zlibBufferSync(new Deflate(opts), buffer);\n }, exports.gzip = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Gzip(opts), buffer, callback);\n }, exports.gzipSync = function(buffer, opts) {\n return zlibBufferSync(new Gzip(opts), buffer);\n }, exports.deflateRaw = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new DeflateRaw(opts), buffer, callback);\n }, exports.deflateRawSync = function(buffer, opts) {\n return zlibBufferSync(new DeflateRaw(opts), buffer);\n }, exports.unzip = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Unzip(opts), buffer, callback);\n }, exports.unzipSync = function(buffer, opts) {\n return zlibBufferSync(new Unzip(opts), buffer);\n }, exports.inflate = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Inflate(opts), buffer, callback);\n }, exports.inflateSync = function(buffer, opts) {\n return zlibBufferSync(new Inflate(opts), buffer);\n }, exports.gunzip = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Gunzip(opts), buffer, callback);\n }, exports.gunzipSync = function(buffer, opts) {\n return zlibBufferSync(new Gunzip(opts), buffer);\n }, exports.inflateRaw = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new InflateRaw(opts), buffer, callback);\n }, exports.inflateRawSync = function(buffer, opts) {\n return zlibBufferSync(new InflateRaw(opts), buffer);\n }, exports.brotliCompress = function(buffer, opts, callback) {\n throw new Error(\"zlib.brotliCompress is not implemented\");\n };\n function zlibBuffer(engine, buffer, callback) {\n var buffers = [], nread = 0;\n engine.on(\"error\", onError), engine.on(\"end\", onEnd), engine.end(buffer), flow();\n function flow() {\n var chunk;\n while ((chunk = engine.read()) !== null)\n buffers.push(chunk), nread += chunk.length;\n engine.once(\"readable\", flow);\n }\n function onError(err) {\n engine.removeListener(\"end\", onEnd), engine.removeListener(\"readable\", flow), callback(err);\n }\n function onEnd() {\n var buf, err = null;\n if (nread >= kMaxLength)\n err = new RangeError(kRangeErrorMessage);\n else\n buf = Buffer2.concat(buffers, nread);\n buffers = [], engine.close(), callback(err, buf);\n }\n }\n function zlibBufferSync(engine, buffer) {\n if (typeof buffer === \"string\")\n buffer = Buffer2.from(buffer);\n if (!Buffer2.isBuffer(buffer))\n @throwTypeError(\"Not a string or buffer\");\n var flushFlag = engine._finishFlushFlag;\n return engine._processChunk(buffer, flushFlag);\n }\n function Deflate(opts) {\n if (!(this instanceof Deflate))\n return new Deflate(opts);\n Zlib.call(this, opts, binding.DEFLATE);\n }\n function Inflate(opts) {\n if (!(this instanceof Inflate))\n return new Inflate(opts);\n Zlib.call(this, opts, binding.INFLATE);\n }\n function Gzip(opts) {\n if (!(this instanceof Gzip))\n return new Gzip(opts);\n Zlib.call(this, opts, binding.GZIP);\n }\n function Gunzip(opts) {\n if (!(this instanceof Gunzip))\n return new Gunzip(opts);\n Zlib.call(this, opts, binding.GUNZIP);\n }\n function DeflateRaw(opts) {\n if (!(this instanceof DeflateRaw))\n return new DeflateRaw(opts);\n Zlib.call(this, opts, binding.DEFLATERAW);\n }\n function InflateRaw(opts) {\n if (!(this instanceof InflateRaw))\n return new InflateRaw(opts);\n Zlib.call(this, opts, binding.INFLATERAW);\n }\n function Unzip(opts) {\n if (!(this instanceof Unzip))\n return new Unzip(opts);\n Zlib.call(this, opts, binding.UNZIP);\n }\n function isValidFlushFlag(flag) {\n return flag === binding.Z_NO_FLUSH || flag === binding.Z_PARTIAL_FLUSH || flag === binding.Z_SYNC_FLUSH || flag === binding.Z_FULL_FLUSH || flag === binding.Z_FINISH || flag === binding.Z_BLOCK;\n }\n function Zlib(opts, mode) {\n var _this = this;\n if (this._opts = opts = opts || {}, this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK, Transform.call(this, opts), opts.flush && !isValidFlushFlag(opts.flush))\n throw new Error(\"Invalid flush flag: \" + opts.flush);\n if (opts.finishFlush && !isValidFlushFlag(opts.finishFlush))\n throw new Error(\"Invalid flush flag: \" + opts.finishFlush);\n if (this._flushFlag = opts.flush || binding.Z_NO_FLUSH, this._finishFlushFlag = typeof opts.finishFlush !== \"undefined\" \? opts.finishFlush : binding.Z_FINISH, opts.chunkSize) {\n if (opts.chunkSize < exports.Z_MIN_CHUNK || opts.chunkSize > exports.Z_MAX_CHUNK)\n throw new Error(\"Invalid chunk size: \" + opts.chunkSize);\n }\n if (opts.windowBits) {\n if (opts.windowBits < exports.Z_MIN_WINDOWBITS || opts.windowBits > exports.Z_MAX_WINDOWBITS)\n throw new Error(\"Invalid windowBits: \" + opts.windowBits);\n }\n if (opts.level) {\n if (opts.level < exports.Z_MIN_LEVEL || opts.level > exports.Z_MAX_LEVEL)\n throw new Error(\"Invalid compression level: \" + opts.level);\n }\n if (opts.memLevel) {\n if (opts.memLevel < exports.Z_MIN_MEMLEVEL || opts.memLevel > exports.Z_MAX_MEMLEVEL)\n throw new Error(\"Invalid memLevel: \" + opts.memLevel);\n }\n if (opts.strategy) {\n if (opts.strategy != exports.Z_FILTERED && opts.strategy != exports.Z_HUFFMAN_ONLY && opts.strategy != exports.Z_RLE && opts.strategy != exports.Z_FIXED && opts.strategy != exports.Z_DEFAULT_STRATEGY)\n throw new Error(\"Invalid strategy: \" + opts.strategy);\n }\n if (opts.dictionary) {\n if (!Buffer2.isBuffer(opts.dictionary))\n throw new Error(\"Invalid dictionary: it should be a Buffer instance\");\n }\n this._handle = new binding.Zlib(mode);\n var self = this;\n this._hadError = !1, this._handle.onerror = function(message, errno) {\n _close(self), self._hadError = !0;\n var error = new Error(message);\n error.errno = errno, error.code = exports.codes[errno], self.emit(\"error\", error);\n };\n var level = exports.Z_DEFAULT_COMPRESSION;\n if (typeof opts.level === \"number\")\n level = opts.level;\n var strategy = exports.Z_DEFAULT_STRATEGY;\n if (typeof opts.strategy === \"number\")\n strategy = opts.strategy;\n this._handle.init(opts.windowBits || exports.Z_DEFAULT_WINDOWBITS, level, opts.memLevel || exports.Z_DEFAULT_MEMLEVEL, strategy, opts.dictionary), this._buffer = Buffer2.allocUnsafe(this._chunkSize), this._offset = 0, this._level = level, this._strategy = strategy, this.once(\"end\", this.close), Object.defineProperty(this, \"_closed\", {\n get: function() {\n return !_this._handle;\n },\n configurable: !0,\n enumerable: !0\n });\n }\n util.inherits(Zlib, Transform), Zlib.prototype.params = function(level, strategy, callback) {\n if (level < exports.Z_MIN_LEVEL || level > exports.Z_MAX_LEVEL)\n @throwRangeError(\"Invalid compression level: \" + level);\n if (strategy != exports.Z_FILTERED && strategy != exports.Z_HUFFMAN_ONLY && strategy != exports.Z_RLE && strategy != exports.Z_FIXED && strategy != exports.Z_DEFAULT_STRATEGY)\n @throwTypeError(\"Invalid strategy: \" + strategy);\n if (this._level !== level || this._strategy !== strategy) {\n var self = this;\n this.flush(binding.Z_SYNC_FLUSH, function() {\n if (assert(self._handle, \"zlib binding closed\"), self._handle.params(level, strategy), !self._hadError) {\n if (self._level = level, self._strategy = strategy, callback)\n callback();\n }\n });\n } else\n process.nextTick(callback);\n }, Zlib.prototype.reset = function() {\n return assert(this._handle, \"zlib binding closed\"), this._handle.reset();\n }, Zlib.prototype._flush = function(callback) {\n this._transform(Buffer2.alloc(0), \"\", callback);\n }, Zlib.prototype.flush = function(kind, callback) {\n var _this2 = this, ws = this._writableState;\n if (typeof kind === \"function\" || kind === void 0 && !callback)\n callback = kind, kind = binding.Z_FULL_FLUSH;\n if (ws.ended) {\n if (callback)\n process.nextTick(callback);\n } else if (ws.ending) {\n if (callback)\n this.once(\"end\", callback);\n } else if (ws.needDrain) {\n if (callback)\n this.once(\"drain\", function() {\n return _this2.flush(kind, callback);\n });\n } else\n this._flushFlag = kind, this.write(Buffer2.alloc(0), \"\", callback);\n }, Zlib.prototype.close = function(callback) {\n _close(this, callback), process.nextTick(emitCloseNT, this);\n };\n function _close(engine, callback) {\n if (callback)\n process.nextTick(callback);\n if (!engine._handle)\n return;\n engine._handle.close(), engine._handle = null;\n }\n function emitCloseNT(self) {\n self.emit(\"close\");\n }\n Zlib.prototype._transform = function(chunk, encoding, cb) {\n var flushFlag, ws = this._writableState, ending = ws.ending || ws.ended, last = ending && (!chunk || ws.length === chunk.length);\n if (chunk !== null && !Buffer2.isBuffer(chunk))\n return cb(new Error(\"invalid input\"));\n if (!this._handle)\n return cb(new Error(\"zlib binding closed\"));\n if (last)\n flushFlag = this._finishFlushFlag;\n else if (flushFlag = this._flushFlag, chunk.length >= ws.length)\n this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH;\n this._processChunk(chunk, flushFlag, cb);\n }, Zlib.prototype._processChunk = function(chunk, flushFlag, cb) {\n var availInBefore = chunk && chunk.length, availOutBefore = this._chunkSize - this._offset, inOff = 0, self = this, async = typeof cb === \"function\";\n if (!async) {\n var buffers = [], nread = 0, error;\n this.on(\"error\", function(er) {\n error = er;\n }), assert(this._handle, \"zlib binding closed\");\n do\n var res = this._handle.writeSync(flushFlag, chunk, inOff, availInBefore, this._buffer, this._offset, availOutBefore);\n while (!this._hadError && callback(res[0], res[1]));\n if (this._hadError)\n throw error;\n if (nread >= kMaxLength)\n _close(this), @throwRangeError(kRangeErrorMessage);\n var buf = Buffer2.concat(buffers, nread);\n return _close(this), buf;\n }\n assert(this._handle, \"zlib binding closed\");\n var req = this._handle.write(flushFlag, chunk, inOff, availInBefore, this._buffer, this._offset, availOutBefore);\n req.buffer = chunk, req.callback = callback;\n function callback(availInAfter, availOutAfter) {\n if (this)\n this.buffer = null, this.callback = null;\n if (self._hadError)\n return;\n var have = availOutBefore - availOutAfter;\n if (assert(have >= 0, \"have should not go down\"), have > 0) {\n var out = self._buffer.slice(self._offset, self._offset + have);\n if (self._offset += have, async)\n self.push(out);\n else\n buffers.push(out), nread += out.length;\n }\n if (availOutAfter === 0 || self._offset >= self._chunkSize)\n availOutBefore = self._chunkSize, self._offset = 0, self._buffer = Buffer2.allocUnsafe(self._chunkSize);\n if (availOutAfter === 0) {\n if (inOff += availInBefore - availInAfter, availInBefore = availInAfter, !async)\n return !0;\n var newReq = self._handle.write(flushFlag, chunk, inOff, availInBefore, self._buffer, self._offset, self._chunkSize);\n newReq.callback = callback, newReq.buffer = chunk;\n return;\n }\n if (!async)\n return !1;\n cb();\n }\n }, util.inherits(Deflate, Zlib), util.inherits(Inflate, Zlib), util.inherits(Gzip, Zlib), util.inherits(Gunzip, Zlib), util.inherits(DeflateRaw, Zlib), util.inherits(InflateRaw, Zlib), util.inherits(Unzip, Zlib);\n }\n});\nreturn require_lib()})\n"_s;
+static constexpr ASCIILiteral NodeZlibCode = "(function (){\"use strict\";// src/js/out/tmp/node/zlib.ts\nvar assert = @getInternalField(@internalModuleRegistry, 4) || @createInternalModuleById(4), BufferModule = @requireNativeModule(\"node:buffer\"), StreamModule = @getInternalField(@internalModuleRegistry, 35) || @createInternalModuleById(35), Util = @getInternalField(@internalModuleRegistry, 44) || @createInternalModuleById(44), __getOwnPropNames = Object.getOwnPropertyNames, __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n}, require_zstream = __commonJS({\n \"node_modules/pako/lib/zlib/zstream.js\"(exports, module2) {\n function ZStream() {\n this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = \"\", this.state = null, this.data_type = 2, this.adler = 0;\n }\n module2.exports = ZStream;\n }\n}), require_common = __commonJS({\n \"node_modules/pako/lib/utils/common.js\"(exports) {\n var TYPED_OK = typeof Uint8Array !== \"undefined\" && typeof Uint16Array !== \"undefined\" && typeof Int32Array !== \"undefined\";\n function _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n }\n exports.assign = function(obj) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source)\n continue;\n if (typeof source !== \"object\")\n @throwTypeError(source + \"must be non-object\");\n for (var p in source)\n if (_has(source, p))\n obj[p] = source[p];\n }\n return obj;\n }, exports.shrinkBuf = function(buf, size) {\n if (buf.length === size)\n return buf;\n if (buf.subarray)\n return buf.subarray(0, size);\n return buf.length = size, buf;\n };\n var fnTyped = {\n arraySet: function(dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n for (var i = 0;i < len; i++)\n dest[dest_offs + i] = src[src_offs + i];\n },\n flattenChunks: function(chunks) {\n var i, l, len, pos, chunk, result;\n len = 0;\n for (i = 0, l = chunks.length;i < l; i++)\n len += chunks[i].length;\n result = new Uint8Array(len), pos = 0;\n for (i = 0, l = chunks.length;i < l; i++)\n chunk = chunks[i], result.set(chunk, pos), pos += chunk.length;\n return result;\n }\n }, fnUntyped = {\n arraySet: function(dest, src, src_offs, len, dest_offs) {\n for (var i = 0;i < len; i++)\n dest[dest_offs + i] = src[src_offs + i];\n },\n flattenChunks: function(chunks) {\n return [].concat.apply([], chunks);\n }\n };\n exports.setTyped = function(on) {\n if (on)\n exports.Buf8 = Uint8Array, exports.Buf16 = Uint16Array, exports.Buf32 = Int32Array, exports.assign(exports, fnTyped);\n else\n exports.Buf8 = Array, exports.Buf16 = Array, exports.Buf32 = Array, exports.assign(exports, fnUntyped);\n }, exports.setTyped(TYPED_OK);\n }\n}), require_trees = __commonJS({\n \"node_modules/pako/lib/zlib/trees.js\"(exports) {\n var utils = require_common(), Z_FIXED = 4, Z_BINARY = 0, Z_TEXT = 1, Z_UNKNOWN = 2;\n function zero(buf) {\n var len = buf.length;\n while (--len >= 0)\n buf[len] = 0;\n }\n var STORED_BLOCK = 0, STATIC_TREES = 1, DYN_TREES = 2, MIN_MATCH = 3, MAX_MATCH = 258, LENGTH_CODES = 29, LITERALS = 256, L_CODES = LITERALS + 1 + LENGTH_CODES, D_CODES = 30, BL_CODES = 19, HEAP_SIZE = 2 * L_CODES + 1, MAX_BITS = 15, Buf_size = 16, MAX_BL_BITS = 7, END_BLOCK = 256, REP_3_6 = 16, REPZ_3_10 = 17, REPZ_11_138 = 18, extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], extra_dbits = [\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 2,\n 2,\n 3,\n 3,\n 4,\n 4,\n 5,\n 5,\n 6,\n 6,\n 7,\n 7,\n 8,\n 8,\n 9,\n 9,\n 10,\n 10,\n 11,\n 11,\n 12,\n 12,\n 13,\n 13\n ], extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], DIST_CODE_LEN = 512, static_ltree = new Array((L_CODES + 2) * 2);\n zero(static_ltree);\n var static_dtree = new Array(D_CODES * 2);\n zero(static_dtree);\n var _dist_code = new Array(DIST_CODE_LEN);\n zero(_dist_code);\n var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\n zero(_length_code);\n var base_length = new Array(LENGTH_CODES);\n zero(base_length);\n var base_dist = new Array(D_CODES);\n zero(base_dist);\n function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n this.static_tree = static_tree, this.extra_bits = extra_bits, this.extra_base = extra_base, this.elems = elems, this.max_length = max_length, this.has_stree = static_tree && static_tree.length;\n }\n var static_l_desc, static_d_desc, static_bl_desc;\n function TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree, this.max_code = 0, this.stat_desc = stat_desc;\n }\n function d_code(dist) {\n return dist < 256 \? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n }\n function put_short(s, w) {\n s.pending_buf[s.pending++] = w & 255, s.pending_buf[s.pending++] = w >>> 8 & 255;\n }\n function send_bits(s, value, length) {\n if (s.bi_valid > Buf_size - length)\n s.bi_buf |= value << s.bi_valid & 65535, put_short(s, s.bi_buf), s.bi_buf = value >> Buf_size - s.bi_valid, s.bi_valid += length - Buf_size;\n else\n s.bi_buf |= value << s.bi_valid & 65535, s.bi_valid += length;\n }\n function send_code(s, c, tree) {\n send_bits(s, tree[c * 2], tree[c * 2 + 1]);\n }\n function bi_reverse(code, len) {\n var res = 0;\n do\n res |= code & 1, code >>>= 1, res <<= 1;\n while (--len > 0);\n return res >>> 1;\n }\n function bi_flush(s) {\n if (s.bi_valid === 16)\n put_short(s, s.bi_buf), s.bi_buf = 0, s.bi_valid = 0;\n else if (s.bi_valid >= 8)\n s.pending_buf[s.pending++] = s.bi_buf & 255, s.bi_buf >>= 8, s.bi_valid -= 8;\n }\n function gen_bitlen(s, desc) {\n var { dyn_tree: tree, max_code } = desc, stree = desc.stat_desc.static_tree, has_stree = desc.stat_desc.has_stree, extra = desc.stat_desc.extra_bits, base = desc.stat_desc.extra_base, max_length = desc.stat_desc.max_length, h, n, m, bits, xbits, f, overflow = 0;\n for (bits = 0;bits <= MAX_BITS; bits++)\n s.bl_count[bits] = 0;\n tree[s.heap[s.heap_max] * 2 + 1] = 0;\n for (h = s.heap_max + 1;h < HEAP_SIZE; h++) {\n if (n = s.heap[h], bits = tree[tree[n * 2 + 1] * 2 + 1] + 1, bits > max_length)\n bits = max_length, overflow++;\n if (tree[n * 2 + 1] = bits, n > max_code)\n continue;\n if (s.bl_count[bits]++, xbits = 0, n >= base)\n xbits = extra[n - base];\n if (f = tree[n * 2], s.opt_len += f * (bits + xbits), has_stree)\n s.static_len += f * (stree[n * 2 + 1] + xbits);\n }\n if (overflow === 0)\n return;\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0)\n bits--;\n s.bl_count[bits]--, s.bl_count[bits + 1] += 2, s.bl_count[max_length]--, overflow -= 2;\n } while (overflow > 0);\n for (bits = max_length;bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n if (m = s.heap[--h], m > max_code)\n continue;\n if (tree[m * 2 + 1] !== bits)\n s.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2], tree[m * 2 + 1] = bits;\n n--;\n }\n }\n }\n function gen_codes(tree, max_code, bl_count) {\n var next_code = new Array(MAX_BITS + 1), code = 0, bits, n;\n for (bits = 1;bits <= MAX_BITS; bits++)\n next_code[bits] = code = code + bl_count[bits - 1] << 1;\n for (n = 0;n <= max_code; n++) {\n var len = tree[n * 2 + 1];\n if (len === 0)\n continue;\n tree[n * 2] = bi_reverse(next_code[len]++, len);\n }\n }\n function tr_static_init() {\n var n, bits, length, code, dist, bl_count = new Array(MAX_BITS + 1);\n length = 0;\n for (code = 0;code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0;n < 1 << extra_lbits[code]; n++)\n _length_code[length++] = code;\n }\n _length_code[length - 1] = code, dist = 0;\n for (code = 0;code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0;n < 1 << extra_dbits[code]; n++)\n _dist_code[dist++] = code;\n }\n dist >>= 7;\n for (;code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0;n < 1 << extra_dbits[code] - 7; n++)\n _dist_code[256 + dist++] = code;\n }\n for (bits = 0;bits <= MAX_BITS; bits++)\n bl_count[bits] = 0;\n n = 0;\n while (n <= 143)\n static_ltree[n * 2 + 1] = 8, n++, bl_count[8]++;\n while (n <= 255)\n static_ltree[n * 2 + 1] = 9, n++, bl_count[9]++;\n while (n <= 279)\n static_ltree[n * 2 + 1] = 7, n++, bl_count[7]++;\n while (n <= 287)\n static_ltree[n * 2 + 1] = 8, n++, bl_count[8]++;\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n for (n = 0;n < D_CODES; n++)\n static_dtree[n * 2 + 1] = 5, static_dtree[n * 2] = bi_reverse(n, 5);\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS), static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS), static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n }\n function init_block(s) {\n var n;\n for (n = 0;n < L_CODES; n++)\n s.dyn_ltree[n * 2] = 0;\n for (n = 0;n < D_CODES; n++)\n s.dyn_dtree[n * 2] = 0;\n for (n = 0;n < BL_CODES; n++)\n s.bl_tree[n * 2] = 0;\n s.dyn_ltree[END_BLOCK * 2] = 1, s.opt_len = s.static_len = 0, s.last_lit = s.matches = 0;\n }\n function bi_windup(s) {\n if (s.bi_valid > 8)\n put_short(s, s.bi_buf);\n else if (s.bi_valid > 0)\n s.pending_buf[s.pending++] = s.bi_buf;\n s.bi_buf = 0, s.bi_valid = 0;\n }\n function copy_block(s, buf, len, header) {\n if (bi_windup(s), header)\n put_short(s, len), put_short(s, ~len);\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending), s.pending += len;\n }\n function smaller(tree, n, m, depth) {\n var _n2 = n * 2, _m2 = m * 2;\n return tree[_n2] < tree[_m2] || tree[_n2] === tree[_m2] && depth[n] <= depth[m];\n }\n function pqdownheap(s, tree, k) {\n var v = s.heap[k], j = k << 1;\n while (j <= s.heap_len) {\n if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth))\n j++;\n if (smaller(tree, v, s.heap[j], s.depth))\n break;\n s.heap[k] = s.heap[j], k = j, j <<= 1;\n }\n s.heap[k] = v;\n }\n function compress_block(s, ltree, dtree) {\n var dist, lc, lx = 0, code, extra;\n if (s.last_lit !== 0)\n do\n if (dist = s.pending_buf[s.d_buf + lx * 2] << 8 | s.pending_buf[s.d_buf + lx * 2 + 1], lc = s.pending_buf[s.l_buf + lx], lx++, dist === 0)\n send_code(s, lc, ltree);\n else {\n if (code = _length_code[lc], send_code(s, code + LITERALS + 1, ltree), extra = extra_lbits[code], extra !== 0)\n lc -= base_length[code], send_bits(s, lc, extra);\n if (dist--, code = d_code(dist), send_code(s, code, dtree), extra = extra_dbits[code], extra !== 0)\n dist -= base_dist[code], send_bits(s, dist, extra);\n }\n while (lx < s.last_lit);\n send_code(s, END_BLOCK, ltree);\n }\n function build_tree(s, desc) {\n var tree = desc.dyn_tree, stree = desc.stat_desc.static_tree, has_stree = desc.stat_desc.has_stree, elems = desc.stat_desc.elems, n, m, max_code = -1, node;\n s.heap_len = 0, s.heap_max = HEAP_SIZE;\n for (n = 0;n < elems; n++)\n if (tree[n * 2] !== 0)\n s.heap[++s.heap_len] = max_code = n, s.depth[n] = 0;\n else\n tree[n * 2 + 1] = 0;\n while (s.heap_len < 2)\n if (node = s.heap[++s.heap_len] = max_code < 2 \? ++max_code : 0, tree[node * 2] = 1, s.depth[node] = 0, s.opt_len--, has_stree)\n s.static_len -= stree[node * 2 + 1];\n desc.max_code = max_code;\n for (n = s.heap_len >> 1;n >= 1; n--)\n pqdownheap(s, tree, n);\n node = elems;\n do\n n = s.heap[1], s.heap[1] = s.heap[s.heap_len--], pqdownheap(s, tree, 1), m = s.heap[1], s.heap[--s.heap_max] = n, s.heap[--s.heap_max] = m, tree[node * 2] = tree[n * 2] + tree[m * 2], s.depth[node] = (s.depth[n] >= s.depth[m] \? s.depth[n] : s.depth[m]) + 1, tree[n * 2 + 1] = tree[m * 2 + 1] = node, s.heap[1] = node++, pqdownheap(s, tree, 1);\n while (s.heap_len >= 2);\n s.heap[--s.heap_max] = s.heap[1], gen_bitlen(s, desc), gen_codes(tree, max_code, s.bl_count);\n }\n function scan_tree(s, tree, max_code) {\n var n, prevlen = -1, curlen, nextlen = tree[1], count = 0, max_count = 7, min_count = 4;\n if (nextlen === 0)\n max_count = 138, min_count = 3;\n tree[(max_code + 1) * 2 + 1] = 65535;\n for (n = 0;n <= max_code; n++) {\n if (curlen = nextlen, nextlen = tree[(n + 1) * 2 + 1], ++count < max_count && curlen === nextlen)\n continue;\n else if (count < min_count)\n s.bl_tree[curlen * 2] += count;\n else if (curlen !== 0) {\n if (curlen !== prevlen)\n s.bl_tree[curlen * 2]++;\n s.bl_tree[REP_3_6 * 2]++;\n } else if (count <= 10)\n s.bl_tree[REPZ_3_10 * 2]++;\n else\n s.bl_tree[REPZ_11_138 * 2]++;\n if (count = 0, prevlen = curlen, nextlen === 0)\n max_count = 138, min_count = 3;\n else if (curlen === nextlen)\n max_count = 6, min_count = 3;\n else\n max_count = 7, min_count = 4;\n }\n }\n function send_tree(s, tree, max_code) {\n var n, prevlen = -1, curlen, nextlen = tree[1], count = 0, max_count = 7, min_count = 4;\n if (nextlen === 0)\n max_count = 138, min_count = 3;\n for (n = 0;n <= max_code; n++) {\n if (curlen = nextlen, nextlen = tree[(n + 1) * 2 + 1], ++count < max_count && curlen === nextlen)\n continue;\n else if (count < min_count)\n do\n send_code(s, curlen, s.bl_tree);\n while (--count !== 0);\n else if (curlen !== 0) {\n if (curlen !== prevlen)\n send_code(s, curlen, s.bl_tree), count--;\n send_code(s, REP_3_6, s.bl_tree), send_bits(s, count - 3, 2);\n } else if (count <= 10)\n send_code(s, REPZ_3_10, s.bl_tree), send_bits(s, count - 3, 3);\n else\n send_code(s, REPZ_11_138, s.bl_tree), send_bits(s, count - 11, 7);\n if (count = 0, prevlen = curlen, nextlen === 0)\n max_count = 138, min_count = 3;\n else if (curlen === nextlen)\n max_count = 6, min_count = 3;\n else\n max_count = 7, min_count = 4;\n }\n }\n function build_bl_tree(s) {\n var max_blindex;\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code), scan_tree(s, s.dyn_dtree, s.d_desc.max_code), build_tree(s, s.bl_desc);\n for (max_blindex = BL_CODES - 1;max_blindex >= 3; max_blindex--)\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1] !== 0)\n break;\n return s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4, max_blindex;\n }\n function send_all_trees(s, lcodes, dcodes, blcodes) {\n var rank;\n send_bits(s, lcodes - 257, 5), send_bits(s, dcodes - 1, 5), send_bits(s, blcodes - 4, 4);\n for (rank = 0;rank < blcodes; rank++)\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1], 3);\n send_tree(s, s.dyn_ltree, lcodes - 1), send_tree(s, s.dyn_dtree, dcodes - 1);\n }\n function detect_data_type(s) {\n var black_mask = 4093624447, n;\n for (n = 0;n <= 31; n++, black_mask >>>= 1)\n if (black_mask & 1 && s.dyn_ltree[n * 2] !== 0)\n return Z_BINARY;\n if (s.dyn_ltree[18] !== 0 || s.dyn_ltree[20] !== 0 || s.dyn_ltree[26] !== 0)\n return Z_TEXT;\n for (n = 32;n < LITERALS; n++)\n if (s.dyn_ltree[n * 2] !== 0)\n return Z_TEXT;\n return Z_BINARY;\n }\n var static_init_done = !1;\n function _tr_init(s) {\n if (!static_init_done)\n tr_static_init(), static_init_done = !0;\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc), s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc), s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc), s.bi_buf = 0, s.bi_valid = 0, init_block(s);\n }\n function _tr_stored_block(s, buf, stored_len, last) {\n send_bits(s, (STORED_BLOCK << 1) + (last \? 1 : 0), 3), copy_block(s, buf, stored_len, !0);\n }\n function _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3), send_code(s, END_BLOCK, static_ltree), bi_flush(s);\n }\n function _tr_flush_block(s, buf, stored_len, last) {\n var opt_lenb, static_lenb, max_blindex = 0;\n if (s.level > 0) {\n if (s.strm.data_type === Z_UNKNOWN)\n s.strm.data_type = detect_data_type(s);\n if (build_tree(s, s.l_desc), build_tree(s, s.d_desc), max_blindex = build_bl_tree(s), opt_lenb = s.opt_len + 3 + 7 >>> 3, static_lenb = s.static_len + 3 + 7 >>> 3, static_lenb <= opt_lenb)\n opt_lenb = static_lenb;\n } else\n opt_lenb = static_lenb = stored_len + 5;\n if (stored_len + 4 <= opt_lenb && buf !== -1)\n _tr_stored_block(s, buf, stored_len, last);\n else if (s.strategy === Z_FIXED || static_lenb === opt_lenb)\n send_bits(s, (STATIC_TREES << 1) + (last \? 1 : 0), 3), compress_block(s, static_ltree, static_dtree);\n else\n send_bits(s, (DYN_TREES << 1) + (last \? 1 : 0), 3), send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1), compress_block(s, s.dyn_ltree, s.dyn_dtree);\n if (init_block(s), last)\n bi_windup(s);\n }\n function _tr_tally(s, dist, lc) {\n if (s.pending_buf[s.d_buf + s.last_lit * 2] = dist >>> 8 & 255, s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 255, s.pending_buf[s.l_buf + s.last_lit] = lc & 255, s.last_lit++, dist === 0)\n s.dyn_ltree[lc * 2]++;\n else\n s.matches++, dist--, s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]++, s.dyn_dtree[d_code(dist) * 2]++;\n return s.last_lit === s.lit_bufsize - 1;\n }\n exports._tr_init = _tr_init, exports._tr_stored_block = _tr_stored_block, exports._tr_flush_block = _tr_flush_block, exports._tr_tally = _tr_tally, exports._tr_align = _tr_align;\n }\n}), require_adler32 = __commonJS({\n \"node_modules/pako/lib/zlib/adler32.js\"(exports, module2) {\n function adler32(adler, buf, len, pos) {\n var s1 = adler & 65535 | 0, s2 = adler >>> 16 & 65535 | 0, n = 0;\n while (len !== 0) {\n n = len > 2000 \? 2000 : len, len -= n;\n do\n s1 = s1 + buf[pos++] | 0, s2 = s2 + s1 | 0;\n while (--n);\n s1 %= 65521, s2 %= 65521;\n }\n return s1 | s2 << 16 | 0;\n }\n module2.exports = adler32;\n }\n}), require_crc32 = __commonJS({\n \"node_modules/pako/lib/zlib/crc32.js\"(exports, module2) {\n function makeTable() {\n var c, table = [];\n for (var n = 0;n < 256; n++) {\n c = n;\n for (var k = 0;k < 8; k++)\n c = c & 1 \? 3988292384 ^ c >>> 1 : c >>> 1;\n table[n] = c;\n }\n return table;\n }\n var crcTable = makeTable();\n function crc32(crc, buf, len, pos) {\n var t = crcTable, end = pos + len;\n crc ^= -1;\n for (var i = pos;i < end; i++)\n crc = crc >>> 8 ^ t[(crc ^ buf[i]) & 255];\n return crc ^ -1;\n }\n module2.exports = crc32;\n }\n}), require_messages = __commonJS({\n \"node_modules/pako/lib/zlib/messages.js\"(exports, module2) {\n module2.exports = {\n 2: \"need dictionary\",\n 1: \"stream end\",\n 0: \"\",\n \"-1\": \"file error\",\n \"-2\": \"stream error\",\n \"-3\": \"data error\",\n \"-4\": \"insufficient memory\",\n \"-5\": \"buffer error\",\n \"-6\": \"incompatible version\"\n };\n }\n}), require_deflate = __commonJS({\n \"node_modules/pako/lib/zlib/deflate.js\"(exports) {\n var utils = require_common(), trees = require_trees(), adler32 = require_adler32(), crc32 = require_crc32(), msg = require_messages(), Z_NO_FLUSH = 0, Z_PARTIAL_FLUSH = 1, Z_FULL_FLUSH = 3, Z_FINISH = 4, Z_BLOCK = 5, Z_OK = 0, Z_STREAM_END = 1, Z_STREAM_ERROR = -2, Z_DATA_ERROR = -3, Z_BUF_ERROR = -5, Z_DEFAULT_COMPRESSION = -1, Z_FILTERED = 1, Z_HUFFMAN_ONLY = 2, Z_RLE = 3, Z_FIXED = 4, Z_DEFAULT_STRATEGY = 0, Z_UNKNOWN = 2, Z_DEFLATED = 8, MAX_MEM_LEVEL = 9, MAX_WBITS = 15, DEF_MEM_LEVEL = 8, LENGTH_CODES = 29, LITERALS = 256, L_CODES = LITERALS + 1 + LENGTH_CODES, D_CODES = 30, BL_CODES = 19, HEAP_SIZE = 2 * L_CODES + 1, MAX_BITS = 15, MIN_MATCH = 3, MAX_MATCH = 258, MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1, PRESET_DICT = 32, INIT_STATE = 42, EXTRA_STATE = 69, NAME_STATE = 73, COMMENT_STATE = 91, HCRC_STATE = 103, BUSY_STATE = 113, FINISH_STATE = 666, BS_NEED_MORE = 1, BS_BLOCK_DONE = 2, BS_FINISH_STARTED = 3, BS_FINISH_DONE = 4, OS_CODE = 3;\n function err(strm, errorCode) {\n return strm.msg = msg[errorCode], errorCode;\n }\n function rank(f) {\n return (f << 1) - (f > 4 \? 9 : 0);\n }\n function zero(buf) {\n var len = buf.length;\n while (--len >= 0)\n buf[len] = 0;\n }\n function flush_pending(strm) {\n var s = strm.state, len = s.pending;\n if (len > strm.avail_out)\n len = strm.avail_out;\n if (len === 0)\n return;\n if (utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out), strm.next_out += len, s.pending_out += len, strm.total_out += len, strm.avail_out -= len, s.pending -= len, s.pending === 0)\n s.pending_out = 0;\n }\n function flush_block_only(s, last) {\n trees._tr_flush_block(s, s.block_start >= 0 \? s.block_start : -1, s.strstart - s.block_start, last), s.block_start = s.strstart, flush_pending(s.strm);\n }\n function put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n }\n function putShortMSB(s, b) {\n s.pending_buf[s.pending++] = b >>> 8 & 255, s.pending_buf[s.pending++] = b & 255;\n }\n function read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n if (len > size)\n len = size;\n if (len === 0)\n return 0;\n if (strm.avail_in -= len, utils.arraySet(buf, strm.input, strm.next_in, len, start), strm.state.wrap === 1)\n strm.adler = adler32(strm.adler, buf, len, start);\n else if (strm.state.wrap === 2)\n strm.adler = crc32(strm.adler, buf, len, start);\n return strm.next_in += len, strm.total_in += len, len;\n }\n function longest_match(s, cur_match) {\n var { max_chain_length: chain_length, strstart: scan } = s, match, len, best_len = s.prev_length, nice_match = s.nice_match, limit = s.strstart > s.w_size - MIN_LOOKAHEAD \? s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0, _win = s.window, wmask = s.w_mask, prev = s.prev, strend = s.strstart + MAX_MATCH, scan_end1 = _win[scan + best_len - 1], scan_end = _win[scan + best_len];\n if (s.prev_length >= s.good_match)\n chain_length >>= 2;\n if (nice_match > s.lookahead)\n nice_match = s.lookahead;\n do {\n if (match = cur_match, _win[match + best_len] !== scan_end || _win[match + best_len - 1] !== scan_end1 || _win[match] !== _win[scan] || _win[++match] !== _win[scan + 1])\n continue;\n scan += 2, match++;\n do\n ;\n while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && scan < strend);\n if (len = MAX_MATCH - (strend - scan), scan = strend - MAX_MATCH, len > best_len) {\n if (s.match_start = cur_match, best_len = len, len >= nice_match)\n break;\n scan_end1 = _win[scan + best_len - 1], scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n if (best_len <= s.lookahead)\n return best_len;\n return s.lookahead;\n }\n function fill_window(s) {\n var _w_size = s.w_size, p, n, m, more, str;\n do {\n if (more = s.window_size - s.lookahead - s.strstart, s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0), s.match_start -= _w_size, s.strstart -= _w_size, s.block_start -= _w_size, n = s.hash_size, p = n;\n do\n m = s.head[--p], s.head[p] = m >= _w_size \? m - _w_size : 0;\n while (--n);\n n = _w_size, p = n;\n do\n m = s.prev[--p], s.prev[p] = m >= _w_size \? m - _w_size : 0;\n while (--n);\n more += _w_size;\n }\n if (s.strm.avail_in === 0)\n break;\n if (n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more), s.lookahead += n, s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert, s.ins_h = s.window[str], s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + 1]) & s.hash_mask;\n while (s.insert)\n if (s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask, s.prev[str & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = str, str++, s.insert--, s.lookahead + s.insert < MIN_MATCH)\n break;\n }\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n }\n function deflate_stored(s, flush) {\n var max_block_size = 65535;\n if (max_block_size > s.pending_buf_size - 5)\n max_block_size = s.pending_buf_size - 5;\n for (;; ) {\n if (s.lookahead <= 1) {\n if (fill_window(s), s.lookahead === 0 && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n s.strstart += s.lookahead, s.lookahead = 0;\n var max_start = s.block_start + max_block_size;\n if (s.strstart === 0 || s.strstart >= max_start) {\n if (s.lookahead = s.strstart - max_start, s.strstart = max_start, flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n if (s.strstart - s.block_start >= s.w_size - MIN_LOOKAHEAD) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = 0, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.strstart > s.block_start) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_NEED_MORE;\n }\n function deflate_fast(s, flush) {\n var hash_head, bflush;\n for (;; ) {\n if (s.lookahead < MIN_LOOKAHEAD) {\n if (fill_window(s), s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n if (hash_head = 0, s.lookahead >= MIN_MATCH)\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n if (hash_head !== 0 && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD)\n s.match_length = longest_match(s, hash_head);\n if (s.match_length >= MIN_MATCH)\n if (bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH), s.lookahead -= s.match_length, s.match_length <= s.max_lazy_match && s.lookahead >= MIN_MATCH) {\n s.match_length--;\n do\n s.strstart++, s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n while (--s.match_length !== 0);\n s.strstart++;\n } else\n s.strstart += s.match_length, s.match_length = 0, s.ins_h = s.window[s.strstart], s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + 1]) & s.hash_mask;\n else\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++;\n if (bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = s.strstart < MIN_MATCH - 1 \? s.strstart : MIN_MATCH - 1, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function deflate_slow(s, flush) {\n var hash_head, bflush, max_insert;\n for (;; ) {\n if (s.lookahead < MIN_LOOKAHEAD) {\n if (fill_window(s), s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n if (hash_head = 0, s.lookahead >= MIN_MATCH)\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n if (s.prev_length = s.match_length, s.prev_match = s.match_start, s.match_length = MIN_MATCH - 1, hash_head !== 0 && s.prev_length < s.max_lazy_match && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) {\n if (s.match_length = longest_match(s, hash_head), s.match_length <= 5 && (s.strategy === Z_FILTERED || s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096))\n s.match_length = MIN_MATCH - 1;\n }\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH, bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH), s.lookahead -= s.prev_length - 1, s.prev_length -= 2;\n do\n if (++s.strstart <= max_insert)\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n while (--s.prev_length !== 0);\n if (s.match_available = 0, s.match_length = MIN_MATCH - 1, s.strstart++, bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n } else if (s.match_available) {\n if (bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]), bflush)\n flush_block_only(s, !1);\n if (s.strstart++, s.lookahead--, s.strm.avail_out === 0)\n return BS_NEED_MORE;\n } else\n s.match_available = 1, s.strstart++, s.lookahead--;\n }\n if (s.match_available)\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]), s.match_available = 0;\n if (s.insert = s.strstart < MIN_MATCH - 1 \? s.strstart : MIN_MATCH - 1, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function deflate_rle(s, flush) {\n var bflush, prev, scan, strend, _win = s.window;\n for (;; ) {\n if (s.lookahead <= MAX_MATCH) {\n if (fill_window(s), s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n if (s.match_length = 0, s.lookahead >= MIN_MATCH && s.strstart > 0) {\n if (scan = s.strstart - 1, prev = _win[scan], prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do\n ;\n while (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && scan < strend);\n if (s.match_length = MAX_MATCH - (strend - scan), s.match_length > s.lookahead)\n s.match_length = s.lookahead;\n }\n }\n if (s.match_length >= MIN_MATCH)\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH), s.lookahead -= s.match_length, s.strstart += s.match_length, s.match_length = 0;\n else\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++;\n if (bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = 0, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function deflate_huff(s, flush) {\n var bflush;\n for (;; ) {\n if (s.lookahead === 0) {\n if (fill_window(s), s.lookahead === 0) {\n if (flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n break;\n }\n }\n if (s.match_length = 0, bflush = trees._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++, bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = 0, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length, this.max_lazy = max_lazy, this.nice_length = nice_length, this.max_chain = max_chain, this.func = func;\n }\n var configuration_table = [\n new Config(0, 0, 0, 0, deflate_stored),\n new Config(4, 4, 8, 4, deflate_fast),\n new Config(4, 5, 16, 8, deflate_fast),\n new Config(4, 6, 32, 32, deflate_fast),\n new Config(4, 4, 16, 16, deflate_slow),\n new Config(8, 16, 32, 32, deflate_slow),\n new Config(8, 16, 128, 128, deflate_slow),\n new Config(8, 32, 128, 256, deflate_slow),\n new Config(32, 128, 258, 1024, deflate_slow),\n new Config(32, 258, 258, 4096, deflate_slow)\n ];\n function lm_init(s) {\n s.window_size = 2 * s.w_size, zero(s.head), s.max_lazy_match = configuration_table[s.level].max_lazy, s.good_match = configuration_table[s.level].good_length, s.nice_match = configuration_table[s.level].nice_length, s.max_chain_length = configuration_table[s.level].max_chain, s.strstart = 0, s.block_start = 0, s.lookahead = 0, s.insert = 0, s.match_length = s.prev_length = MIN_MATCH - 1, s.match_available = 0, s.ins_h = 0;\n }\n function DeflateState() {\n this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = Z_DEFLATED, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2), this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2), this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2), zero(this.dyn_ltree), zero(this.dyn_dtree), zero(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new utils.Buf16(MAX_BITS + 1), this.heap = new utils.Buf16(2 * L_CODES + 1), zero(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new utils.Buf16(2 * L_CODES + 1), zero(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;\n }\n function deflateResetKeep(strm) {\n var s;\n if (!strm || !strm.state)\n return err(strm, Z_STREAM_ERROR);\n if (strm.total_in = strm.total_out = 0, strm.data_type = Z_UNKNOWN, s = strm.state, s.pending = 0, s.pending_out = 0, s.wrap < 0)\n s.wrap = -s.wrap;\n return s.status = s.wrap \? INIT_STATE : BUSY_STATE, strm.adler = s.wrap === 2 \? 0 : 1, s.last_flush = Z_NO_FLUSH, trees._tr_init(s), Z_OK;\n }\n function deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK)\n lm_init(strm.state);\n return ret;\n }\n function deflateSetHeader(strm, head) {\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (strm.state.wrap !== 2)\n return Z_STREAM_ERROR;\n return strm.state.gzhead = head, Z_OK;\n }\n function deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm)\n return Z_STREAM_ERROR;\n var wrap = 1;\n if (level === Z_DEFAULT_COMPRESSION)\n level = 6;\n if (windowBits < 0)\n wrap = 0, windowBits = -windowBits;\n else if (windowBits > 15)\n wrap = 2, windowBits -= 16;\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED)\n return err(strm, Z_STREAM_ERROR);\n if (windowBits === 8)\n windowBits = 9;\n var s = new DeflateState;\n return strm.state = s, s.strm = strm, s.wrap = wrap, s.gzhead = null, s.w_bits = windowBits, s.w_size = 1 << s.w_bits, s.w_mask = s.w_size - 1, s.hash_bits = memLevel + 7, s.hash_size = 1 << s.hash_bits, s.hash_mask = s.hash_size - 1, s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH), s.window = new utils.Buf8(s.w_size * 2), s.head = new utils.Buf16(s.hash_size), s.prev = new utils.Buf16(s.w_size), s.lit_bufsize = 1 << memLevel + 6, s.pending_buf_size = s.lit_bufsize * 4, s.pending_buf = new utils.Buf8(s.pending_buf_size), s.d_buf = 1 * s.lit_bufsize, s.l_buf = 3 * s.lit_bufsize, s.level = level, s.strategy = strategy, s.method = method, deflateReset(strm);\n }\n function deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n }\n function deflate(strm, flush) {\n var old_flush, s, beg, val;\n if (!strm || !strm.state || flush > Z_BLOCK || flush < 0)\n return strm \? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n if (s = strm.state, !strm.output || !strm.input && strm.avail_in !== 0 || s.status === FINISH_STATE && flush !== Z_FINISH)\n return err(strm, strm.avail_out === 0 \? Z_BUF_ERROR : Z_STREAM_ERROR);\n if (s.strm = strm, old_flush = s.last_flush, s.last_flush = flush, s.status === INIT_STATE)\n if (s.wrap === 2)\n if (strm.adler = 0, put_byte(s, 31), put_byte(s, 139), put_byte(s, 8), !s.gzhead)\n put_byte(s, 0), put_byte(s, 0), put_byte(s, 0), put_byte(s, 0), put_byte(s, 0), put_byte(s, s.level === 9 \? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 \? 4 : 0), put_byte(s, OS_CODE), s.status = BUSY_STATE;\n else {\n if (put_byte(s, (s.gzhead.text \? 1 : 0) + (s.gzhead.hcrc \? 2 : 0) + (!s.gzhead.extra \? 0 : 4) + (!s.gzhead.name \? 0 : 8) + (!s.gzhead.comment \? 0 : 16)), put_byte(s, s.gzhead.time & 255), put_byte(s, s.gzhead.time >> 8 & 255), put_byte(s, s.gzhead.time >> 16 & 255), put_byte(s, s.gzhead.time >> 24 & 255), put_byte(s, s.level === 9 \? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 \? 4 : 0), put_byte(s, s.gzhead.os & 255), s.gzhead.extra && s.gzhead.extra.length)\n put_byte(s, s.gzhead.extra.length & 255), put_byte(s, s.gzhead.extra.length >> 8 & 255);\n if (s.gzhead.hcrc)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n s.gzindex = 0, s.status = EXTRA_STATE;\n }\n else {\n var header = Z_DEFLATED + (s.w_bits - 8 << 4) << 8, level_flags = -1;\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2)\n level_flags = 0;\n else if (s.level < 6)\n level_flags = 1;\n else if (s.level === 6)\n level_flags = 2;\n else\n level_flags = 3;\n if (header |= level_flags << 6, s.strstart !== 0)\n header |= PRESET_DICT;\n if (header += 31 - header % 31, s.status = BUSY_STATE, putShortMSB(s, header), s.strstart !== 0)\n putShortMSB(s, strm.adler >>> 16), putShortMSB(s, strm.adler & 65535);\n strm.adler = 1;\n }\n if (s.status === EXTRA_STATE)\n if (s.gzhead.extra) {\n beg = s.pending;\n while (s.gzindex < (s.gzhead.extra.length & 65535)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (flush_pending(strm), beg = s.pending, s.pending === s.pending_buf_size)\n break;\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 255), s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (s.gzindex === s.gzhead.extra.length)\n s.gzindex = 0, s.status = NAME_STATE;\n } else\n s.status = NAME_STATE;\n if (s.status === NAME_STATE)\n if (s.gzhead.name) {\n beg = s.pending;\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (flush_pending(strm), beg = s.pending, s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n if (s.gzindex < s.gzhead.name.length)\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 255;\n else\n val = 0;\n put_byte(s, val);\n } while (val !== 0);\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (val === 0)\n s.gzindex = 0, s.status = COMMENT_STATE;\n } else\n s.status = COMMENT_STATE;\n if (s.status === COMMENT_STATE)\n if (s.gzhead.comment) {\n beg = s.pending;\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (flush_pending(strm), beg = s.pending, s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n if (s.gzindex < s.gzhead.comment.length)\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 255;\n else\n val = 0;\n put_byte(s, val);\n } while (val !== 0);\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (val === 0)\n s.status = HCRC_STATE;\n } else\n s.status = HCRC_STATE;\n if (s.status === HCRC_STATE)\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size)\n flush_pending(strm);\n if (s.pending + 2 <= s.pending_buf_size)\n put_byte(s, strm.adler & 255), put_byte(s, strm.adler >> 8 & 255), strm.adler = 0, s.status = BUSY_STATE;\n } else\n s.status = BUSY_STATE;\n if (s.pending !== 0) {\n if (flush_pending(strm), strm.avail_out === 0)\n return s.last_flush = -1, Z_OK;\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && flush !== Z_FINISH)\n return err(strm, Z_BUF_ERROR);\n if (s.status === FINISH_STATE && strm.avail_in !== 0)\n return err(strm, Z_BUF_ERROR);\n if (strm.avail_in !== 0 || s.lookahead !== 0 || flush !== Z_NO_FLUSH && s.status !== FINISH_STATE) {\n var bstate = s.strategy === Z_HUFFMAN_ONLY \? deflate_huff(s, flush) : s.strategy === Z_RLE \? deflate_rle(s, flush) : configuration_table[s.level].func(s, flush);\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE)\n s.status = FINISH_STATE;\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0)\n s.last_flush = -1;\n return Z_OK;\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH)\n trees._tr_align(s);\n else if (flush !== Z_BLOCK) {\n if (trees._tr_stored_block(s, 0, 0, !1), flush === Z_FULL_FLUSH) {\n if (zero(s.head), s.lookahead === 0)\n s.strstart = 0, s.block_start = 0, s.insert = 0;\n }\n }\n if (flush_pending(strm), strm.avail_out === 0)\n return s.last_flush = -1, Z_OK;\n }\n }\n if (flush !== Z_FINISH)\n return Z_OK;\n if (s.wrap <= 0)\n return Z_STREAM_END;\n if (s.wrap === 2)\n put_byte(s, strm.adler & 255), put_byte(s, strm.adler >> 8 & 255), put_byte(s, strm.adler >> 16 & 255), put_byte(s, strm.adler >> 24 & 255), put_byte(s, strm.total_in & 255), put_byte(s, strm.total_in >> 8 & 255), put_byte(s, strm.total_in >> 16 & 255), put_byte(s, strm.total_in >> 24 & 255);\n else\n putShortMSB(s, strm.adler >>> 16), putShortMSB(s, strm.adler & 65535);\n if (flush_pending(strm), s.wrap > 0)\n s.wrap = -s.wrap;\n return s.pending !== 0 \? Z_OK : Z_STREAM_END;\n }\n function deflateEnd(strm) {\n var status;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (status = strm.state.status, status !== INIT_STATE && status !== EXTRA_STATE && status !== NAME_STATE && status !== COMMENT_STATE && status !== HCRC_STATE && status !== BUSY_STATE && status !== FINISH_STATE)\n return err(strm, Z_STREAM_ERROR);\n return strm.state = null, status === BUSY_STATE \? err(strm, Z_DATA_ERROR) : Z_OK;\n }\n function deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length, s, str, n, wrap, avail, next, input, tmpDict;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (s = strm.state, wrap = s.wrap, wrap === 2 || wrap === 1 && s.status !== INIT_STATE || s.lookahead)\n return Z_STREAM_ERROR;\n if (wrap === 1)\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n if (s.wrap = 0, dictLength >= s.w_size) {\n if (wrap === 0)\n zero(s.head), s.strstart = 0, s.block_start = 0, s.insert = 0;\n tmpDict = new utils.Buf8(s.w_size), utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0), dictionary = tmpDict, dictLength = s.w_size;\n }\n avail = strm.avail_in, next = strm.next_in, input = strm.input, strm.avail_in = dictLength, strm.next_in = 0, strm.input = dictionary, fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart, n = s.lookahead - (MIN_MATCH - 1);\n do\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask, s.prev[str & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = str, str++;\n while (--n);\n s.strstart = str, s.lookahead = MIN_MATCH - 1, fill_window(s);\n }\n return s.strstart += s.lookahead, s.block_start = s.strstart, s.insert = s.lookahead, s.lookahead = 0, s.match_length = s.prev_length = MIN_MATCH - 1, s.match_available = 0, strm.next_in = next, strm.input = input, strm.avail_in = avail, s.wrap = wrap, Z_OK;\n }\n exports.deflateInit = deflateInit, exports.deflateInit2 = deflateInit2, exports.deflateReset = deflateReset, exports.deflateResetKeep = deflateResetKeep, exports.deflateSetHeader = deflateSetHeader, exports.deflate = deflate, exports.deflateEnd = deflateEnd, exports.deflateSetDictionary = deflateSetDictionary, exports.deflateInfo = \"pako deflate (from Nodeca project)\";\n }\n}), require_inffast = __commonJS({\n \"node_modules/pako/lib/zlib/inffast.js\"(exports, module2) {\n var BAD = 30, TYPE = 12;\n module2.exports = function inflate_fast(strm, start) {\n var state, _in, last, _out, beg, end, dmax, wsize, whave, wnext, s_window, hold, bits, lcode, dcode, lmask, dmask, here, op, len, dist, from, from_source, input, output;\n state = strm.state, _in = strm.next_in, input = strm.input, last = _in + (strm.avail_in - 5), _out = strm.next_out, output = strm.output, beg = _out - (start - strm.avail_out), end = _out + (strm.avail_out - 257), dmax = state.dmax, wsize = state.wsize, whave = state.whave, wnext = state.wnext, s_window = state.window, hold = state.hold, bits = state.bits, lcode = state.lencode, dcode = state.distcode, lmask = (1 << state.lenbits) - 1, dmask = (1 << state.distbits) - 1;\n top:\n do {\n if (bits < 15)\n hold += input[_in++] << bits, bits += 8, hold += input[_in++] << bits, bits += 8;\n here = lcode[hold & lmask];\n dolen:\n for (;; ) {\n if (op = here >>> 24, hold >>>= op, bits -= op, op = here >>> 16 & 255, op === 0)\n output[_out++] = here & 65535;\n else if (op & 16) {\n if (len = here & 65535, op &= 15, op) {\n if (bits < op)\n hold += input[_in++] << bits, bits += 8;\n len += hold & (1 << op) - 1, hold >>>= op, bits -= op;\n }\n if (bits < 15)\n hold += input[_in++] << bits, bits += 8, hold += input[_in++] << bits, bits += 8;\n here = dcode[hold & dmask];\n dodist:\n for (;; ) {\n if (op = here >>> 24, hold >>>= op, bits -= op, op = here >>> 16 & 255, op & 16) {\n if (dist = here & 65535, op &= 15, bits < op) {\n if (hold += input[_in++] << bits, bits += 8, bits < op)\n hold += input[_in++] << bits, bits += 8;\n }\n if (dist += hold & (1 << op) - 1, dist > dmax) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break top;\n }\n if (hold >>>= op, bits -= op, op = _out - beg, dist > op) {\n if (op = dist - op, op > whave) {\n if (state.sane) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break top;\n }\n }\n if (from = 0, from_source = s_window, wnext === 0) {\n if (from += wsize - op, op < len) {\n len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n from = _out - dist, from_source = output;\n }\n } else if (wnext < op) {\n if (from += wsize + wnext - op, op -= wnext, op < len) {\n len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n if (from = 0, wnext < len) {\n op = wnext, len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n from = _out - dist, from_source = output;\n }\n }\n } else if (from += wnext - op, op < len) {\n len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n from = _out - dist, from_source = output;\n }\n while (len > 2)\n output[_out++] = from_source[from++], output[_out++] = from_source[from++], output[_out++] = from_source[from++], len -= 3;\n if (len) {\n if (output[_out++] = from_source[from++], len > 1)\n output[_out++] = from_source[from++];\n }\n } else {\n from = _out - dist;\n do\n output[_out++] = output[from++], output[_out++] = output[from++], output[_out++] = output[from++], len -= 3;\n while (len > 2);\n if (len) {\n if (output[_out++] = output[from++], len > 1)\n output[_out++] = output[from++];\n }\n }\n } else if ((op & 64) === 0) {\n here = dcode[(here & 65535) + (hold & (1 << op) - 1)];\n continue dodist;\n } else {\n strm.msg = \"invalid distance code\", state.mode = BAD;\n break top;\n }\n break;\n }\n } else if ((op & 64) === 0) {\n here = lcode[(here & 65535) + (hold & (1 << op) - 1)];\n continue dolen;\n } else if (op & 32) {\n state.mode = TYPE;\n break top;\n } else {\n strm.msg = \"invalid literal/length code\", state.mode = BAD;\n break top;\n }\n break;\n }\n } while (_in < last && _out < end);\n len = bits >> 3, _in -= len, bits -= len << 3, hold &= (1 << bits) - 1, strm.next_in = _in, strm.next_out = _out, strm.avail_in = _in < last \? 5 + (last - _in) : 5 - (_in - last), strm.avail_out = _out < end \? 257 + (end - _out) : 257 - (_out - end), state.hold = hold, state.bits = bits;\n return;\n };\n }\n}), require_inftrees = __commonJS({\n \"node_modules/pako/lib/zlib/inftrees.js\"(exports, module2) {\n var utils = require_common(), MAXBITS = 15, ENOUGH_LENS = 852, ENOUGH_DISTS = 592, CODES = 0, LENS = 1, DISTS = 2, lbase = [\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 13,\n 15,\n 17,\n 19,\n 23,\n 27,\n 31,\n 35,\n 43,\n 51,\n 59,\n 67,\n 83,\n 99,\n 115,\n 131,\n 163,\n 195,\n 227,\n 258,\n 0,\n 0\n ], lext = [\n 16,\n 16,\n 16,\n 16,\n 16,\n 16,\n 16,\n 16,\n 17,\n 17,\n 17,\n 17,\n 18,\n 18,\n 18,\n 18,\n 19,\n 19,\n 19,\n 19,\n 20,\n 20,\n 20,\n 20,\n 21,\n 21,\n 21,\n 21,\n 16,\n 72,\n 78\n ], dbase = [\n 1,\n 2,\n 3,\n 4,\n 5,\n 7,\n 9,\n 13,\n 17,\n 25,\n 33,\n 49,\n 65,\n 97,\n 129,\n 193,\n 257,\n 385,\n 513,\n 769,\n 1025,\n 1537,\n 2049,\n 3073,\n 4097,\n 6145,\n 8193,\n 12289,\n 16385,\n 24577,\n 0,\n 0\n ], dext = [\n 16,\n 16,\n 16,\n 16,\n 17,\n 17,\n 18,\n 18,\n 19,\n 19,\n 20,\n 20,\n 21,\n 21,\n 22,\n 22,\n 23,\n 23,\n 24,\n 24,\n 25,\n 25,\n 26,\n 26,\n 27,\n 27,\n 28,\n 28,\n 29,\n 29,\n 64,\n 64\n ];\n module2.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) {\n var bits = opts.bits, len = 0, sym = 0, min = 0, max = 0, root = 0, curr = 0, drop = 0, left = 0, used = 0, huff = 0, incr, fill, low, mask, next, base = null, base_index = 0, end, count = new utils.Buf16(MAXBITS + 1), offs = new utils.Buf16(MAXBITS + 1), extra = null, extra_index = 0, here_bits, here_op, here_val;\n for (len = 0;len <= MAXBITS; len++)\n count[len] = 0;\n for (sym = 0;sym < codes; sym++)\n count[lens[lens_index + sym]]++;\n root = bits;\n for (max = MAXBITS;max >= 1; max--)\n if (count[max] !== 0)\n break;\n if (root > max)\n root = max;\n if (max === 0)\n return table[table_index++] = 1 << 24 | 64 << 16 | 0, table[table_index++] = 1 << 24 | 64 << 16 | 0, opts.bits = 1, 0;\n for (min = 1;min < max; min++)\n if (count[min] !== 0)\n break;\n if (root < min)\n root = min;\n left = 1;\n for (len = 1;len <= MAXBITS; len++)\n if (left <<= 1, left -= count[len], left < 0)\n return -1;\n if (left > 0 && (type === CODES || max !== 1))\n return -1;\n offs[1] = 0;\n for (len = 1;len < MAXBITS; len++)\n offs[len + 1] = offs[len] + count[len];\n for (sym = 0;sym < codes; sym++)\n if (lens[lens_index + sym] !== 0)\n work[offs[lens[lens_index + sym]]++] = sym;\n if (type === CODES)\n base = extra = work, end = 19;\n else if (type === LENS)\n base = lbase, base_index -= 257, extra = lext, extra_index -= 257, end = 256;\n else\n base = dbase, extra = dext, end = -1;\n if (huff = 0, sym = 0, len = min, next = table_index, curr = root, drop = 0, low = -1, used = 1 << root, mask = used - 1, type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS)\n return 1;\n for (;; ) {\n if (here_bits = len - drop, work[sym] < end)\n here_op = 0, here_val = work[sym];\n else if (work[sym] > end)\n here_op = extra[extra_index + work[sym]], here_val = base[base_index + work[sym]];\n else\n here_op = 96, here_val = 0;\n incr = 1 << len - drop, fill = 1 << curr, min = fill;\n do\n fill -= incr, table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0;\n while (fill !== 0);\n incr = 1 << len - 1;\n while (huff & incr)\n incr >>= 1;\n if (incr !== 0)\n huff &= incr - 1, huff += incr;\n else\n huff = 0;\n if (sym++, --count[len] === 0) {\n if (len === max)\n break;\n len = lens[lens_index + work[sym]];\n }\n if (len > root && (huff & mask) !== low) {\n if (drop === 0)\n drop = root;\n next += min, curr = len - drop, left = 1 << curr;\n while (curr + drop < max) {\n if (left -= count[curr + drop], left <= 0)\n break;\n curr++, left <<= 1;\n }\n if (used += 1 << curr, type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS)\n return 1;\n low = huff & mask, table[low] = root << 24 | curr << 16 | next - table_index | 0;\n }\n }\n if (huff !== 0)\n table[next + huff] = len - drop << 24 | 64 << 16 | 0;\n return opts.bits = root, 0;\n };\n }\n}), require_inflate = __commonJS({\n \"node_modules/pako/lib/zlib/inflate.js\"(exports) {\n var utils = require_common(), adler32 = require_adler32(), crc32 = require_crc32(), inflate_fast = require_inffast(), inflate_table = require_inftrees(), CODES = 0, LENS = 1, DISTS = 2, Z_FINISH = 4, Z_BLOCK = 5, Z_TREES = 6, Z_OK = 0, Z_STREAM_END = 1, Z_NEED_DICT = 2, Z_STREAM_ERROR = -2, Z_DATA_ERROR = -3, Z_MEM_ERROR = -4, Z_BUF_ERROR = -5, Z_DEFLATED = 8, HEAD = 1, FLAGS = 2, TIME = 3, OS = 4, EXLEN = 5, EXTRA = 6, NAME = 7, COMMENT = 8, HCRC = 9, DICTID = 10, DICT = 11, TYPE = 12, TYPEDO = 13, STORED = 14, COPY_ = 15, COPY = 16, TABLE = 17, LENLENS = 18, CODELENS = 19, LEN_ = 20, LEN = 21, LENEXT = 22, DIST = 23, DISTEXT = 24, MATCH = 25, LIT = 26, CHECK = 27, LENGTH = 28, DONE = 29, BAD = 30, MEM = 31, SYNC = 32, ENOUGH_LENS = 852, ENOUGH_DISTS = 592, MAX_WBITS = 15, DEF_WBITS = MAX_WBITS;\n function zswap32(q) {\n return (q >>> 24 & 255) + (q >>> 8 & 65280) + ((q & 65280) << 8) + ((q & 255) << 24);\n }\n function InflateState() {\n this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new utils.Buf16(320), this.work = new utils.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;\n }\n function inflateResetKeep(strm) {\n var state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, strm.total_in = strm.total_out = state.total = 0, strm.msg = \"\", state.wrap)\n strm.adler = state.wrap & 1;\n return state.mode = HEAD, state.last = 0, state.havedict = 0, state.dmax = 32768, state.head = null, state.hold = 0, state.bits = 0, state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS), state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS), state.sane = 1, state.back = -1, Z_OK;\n }\n function inflateReset(strm) {\n var state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n return state = strm.state, state.wsize = 0, state.whave = 0, state.wnext = 0, inflateResetKeep(strm);\n }\n function inflateReset2(strm, windowBits) {\n var wrap, state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, windowBits < 0)\n wrap = 0, windowBits = -windowBits;\n else if (wrap = (windowBits >> 4) + 1, windowBits < 48)\n windowBits &= 15;\n if (windowBits && (windowBits < 8 || windowBits > 15))\n return Z_STREAM_ERROR;\n if (state.window !== null && state.wbits !== windowBits)\n state.window = null;\n return state.wrap = wrap, state.wbits = windowBits, inflateReset(strm);\n }\n function inflateInit2(strm, windowBits) {\n var ret, state;\n if (!strm)\n return Z_STREAM_ERROR;\n if (state = new InflateState, strm.state = state, state.window = null, ret = inflateReset2(strm, windowBits), ret !== Z_OK)\n strm.state = null;\n return ret;\n }\n function inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n }\n var virgin = !0, lenfix, distfix;\n function fixedtables(state) {\n if (virgin) {\n var sym;\n lenfix = new utils.Buf32(512), distfix = new utils.Buf32(32), sym = 0;\n while (sym < 144)\n state.lens[sym++] = 8;\n while (sym < 256)\n state.lens[sym++] = 9;\n while (sym < 280)\n state.lens[sym++] = 7;\n while (sym < 288)\n state.lens[sym++] = 8;\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, {\n bits: 9\n }), sym = 0;\n while (sym < 32)\n state.lens[sym++] = 5;\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, {\n bits: 5\n }), virgin = !1;\n }\n state.lencode = lenfix, state.lenbits = 9, state.distcode = distfix, state.distbits = 5;\n }\n function updatewindow(strm, src, end, copy) {\n var dist, state = strm.state;\n if (state.window === null)\n state.wsize = 1 << state.wbits, state.wnext = 0, state.whave = 0, state.window = new utils.Buf8(state.wsize);\n if (copy >= state.wsize)\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0), state.wnext = 0, state.whave = state.wsize;\n else {\n if (dist = state.wsize - state.wnext, dist > copy)\n dist = copy;\n if (utils.arraySet(state.window, src, end - copy, dist, state.wnext), copy -= dist, copy)\n utils.arraySet(state.window, src, end - copy, copy, 0), state.wnext = copy, state.whave = state.wsize;\n else {\n if (state.wnext += dist, state.wnext === state.wsize)\n state.wnext = 0;\n if (state.whave < state.wsize)\n state.whave += dist;\n }\n }\n return 0;\n }\n function inflate(strm, flush) {\n var state, input, output, next, put, have, left, hold, bits, _in, _out, copy, from, from_source, here = 0, here_bits, here_op, here_val, last_bits, last_op, last_val, len, ret, hbuf = new utils.Buf8(4), opts, n, order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0)\n return Z_STREAM_ERROR;\n if (state = strm.state, state.mode === TYPE)\n state.mode = TYPEDO;\n put = strm.next_out, output = strm.output, left = strm.avail_out, next = strm.next_in, input = strm.input, have = strm.avail_in, hold = state.hold, bits = state.bits, _in = have, _out = left, ret = Z_OK;\n inf_leave:\n for (;; )\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.wrap & 2 && hold === 35615) {\n state.check = 0, hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0), hold = 0, bits = 0, state.mode = FLAGS;\n break;\n }\n if (state.flags = 0, state.head)\n state.head.done = !1;\n if (!(state.wrap & 1) || (((hold & 255) << 8) + (hold >> 8)) % 31) {\n strm.msg = \"incorrect header check\", state.mode = BAD;\n break;\n }\n if ((hold & 15) !== Z_DEFLATED) {\n strm.msg = \"unknown compression method\", state.mode = BAD;\n break;\n }\n if (hold >>>= 4, bits -= 4, len = (hold & 15) + 8, state.wbits === 0)\n state.wbits = len;\n else if (len > state.wbits) {\n strm.msg = \"invalid window size\", state.mode = BAD;\n break;\n }\n state.dmax = 1 << len, strm.adler = state.check = 1, state.mode = hold & 512 \? DICTID : TYPE, hold = 0, bits = 0;\n break;\n case FLAGS:\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.flags = hold, (state.flags & 255) !== Z_DEFLATED) {\n strm.msg = \"unknown compression method\", state.mode = BAD;\n break;\n }\n if (state.flags & 57344) {\n strm.msg = \"unknown header flags set\", state.mode = BAD;\n break;\n }\n if (state.head)\n state.head.text = hold >> 8 & 1;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0);\n hold = 0, bits = 0, state.mode = TIME;\n case TIME:\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.head)\n state.head.time = hold;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, hbuf[2] = hold >>> 16 & 255, hbuf[3] = hold >>> 24 & 255, state.check = crc32(state.check, hbuf, 4, 0);\n hold = 0, bits = 0, state.mode = OS;\n case OS:\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.head)\n state.head.xflags = hold & 255, state.head.os = hold >> 8;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0);\n hold = 0, bits = 0, state.mode = EXLEN;\n case EXLEN:\n if (state.flags & 1024) {\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.length = hold, state.head)\n state.head.extra_len = hold;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0);\n hold = 0, bits = 0;\n } else if (state.head)\n state.head.extra = null;\n state.mode = EXTRA;\n case EXTRA:\n if (state.flags & 1024) {\n if (copy = state.length, copy > have)\n copy = have;\n if (copy) {\n if (state.head) {\n if (len = state.head.extra_len - state.length, !state.head.extra)\n state.head.extra = new Array(state.head.extra_len);\n utils.arraySet(state.head.extra, input, next, copy, len);\n }\n if (state.flags & 512)\n state.check = crc32(state.check, input, copy, next);\n have -= copy, next += copy, state.length -= copy;\n }\n if (state.length)\n break inf_leave;\n }\n state.length = 0, state.mode = NAME;\n case NAME:\n if (state.flags & 2048) {\n if (have === 0)\n break inf_leave;\n copy = 0;\n do\n if (len = input[next + copy++], state.head && len && state.length < 65536)\n state.head.name += String.fromCharCode(len);\n while (len && copy < have);\n if (state.flags & 512)\n state.check = crc32(state.check, input, copy, next);\n if (have -= copy, next += copy, len)\n break inf_leave;\n } else if (state.head)\n state.head.name = null;\n state.length = 0, state.mode = COMMENT;\n case COMMENT:\n if (state.flags & 4096) {\n if (have === 0)\n break inf_leave;\n copy = 0;\n do\n if (len = input[next + copy++], state.head && len && state.length < 65536)\n state.head.comment += String.fromCharCode(len);\n while (len && copy < have);\n if (state.flags & 512)\n state.check = crc32(state.check, input, copy, next);\n if (have -= copy, next += copy, len)\n break inf_leave;\n } else if (state.head)\n state.head.comment = null;\n state.mode = HCRC;\n case HCRC:\n if (state.flags & 512) {\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (hold !== (state.check & 65535)) {\n strm.msg = \"header crc mismatch\", state.mode = BAD;\n break;\n }\n hold = 0, bits = 0;\n }\n if (state.head)\n state.head.hcrc = state.flags >> 9 & 1, state.head.done = !0;\n strm.adler = state.check = 0, state.mode = TYPE;\n break;\n case DICTID:\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n strm.adler = state.check = zswap32(hold), hold = 0, bits = 0, state.mode = DICT;\n case DICT:\n if (state.havedict === 0)\n return strm.next_out = put, strm.avail_out = left, strm.next_in = next, strm.avail_in = have, state.hold = hold, state.bits = bits, Z_NEED_DICT;\n strm.adler = state.check = 1, state.mode = TYPE;\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES)\n break inf_leave;\n case TYPEDO:\n if (state.last) {\n hold >>>= bits & 7, bits -= bits & 7, state.mode = CHECK;\n break;\n }\n while (bits < 3) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n switch (state.last = hold & 1, hold >>>= 1, bits -= 1, hold & 3) {\n case 0:\n state.mode = STORED;\n break;\n case 1:\n if (fixedtables(state), state.mode = LEN_, flush === Z_TREES) {\n hold >>>= 2, bits -= 2;\n break inf_leave;\n }\n break;\n case 2:\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = \"invalid block type\", state.mode = BAD;\n }\n hold >>>= 2, bits -= 2;\n break;\n case STORED:\n hold >>>= bits & 7, bits -= bits & 7;\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if ((hold & 65535) !== (hold >>> 16 ^ 65535)) {\n strm.msg = \"invalid stored block lengths\", state.mode = BAD;\n break;\n }\n if (state.length = hold & 65535, hold = 0, bits = 0, state.mode = COPY_, flush === Z_TREES)\n break inf_leave;\n case COPY_:\n state.mode = COPY;\n case COPY:\n if (copy = state.length, copy) {\n if (copy > have)\n copy = have;\n if (copy > left)\n copy = left;\n if (copy === 0)\n break inf_leave;\n utils.arraySet(output, input, next, copy, put), have -= copy, next += copy, left -= copy, put += copy, state.length -= copy;\n break;\n }\n state.mode = TYPE;\n break;\n case TABLE:\n while (bits < 14) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.nlen = (hold & 31) + 257, hold >>>= 5, bits -= 5, state.ndist = (hold & 31) + 1, hold >>>= 5, bits -= 5, state.ncode = (hold & 15) + 4, hold >>>= 4, bits -= 4, state.nlen > 286 || state.ndist > 30) {\n strm.msg = \"too many length or distance symbols\", state.mode = BAD;\n break;\n }\n state.have = 0, state.mode = LENLENS;\n case LENLENS:\n while (state.have < state.ncode) {\n while (bits < 3) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n state.lens[order[state.have++]] = hold & 7, hold >>>= 3, bits -= 3;\n }\n while (state.have < 19)\n state.lens[order[state.have++]] = 0;\n if (state.lencode = state.lendyn, state.lenbits = 7, opts = { bits: state.lenbits }, ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts), state.lenbits = opts.bits, ret) {\n strm.msg = \"invalid code lengths set\", state.mode = BAD;\n break;\n }\n state.have = 0, state.mode = CODELENS;\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;; ) {\n if (here = state.lencode[hold & (1 << state.lenbits) - 1], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (here_val < 16)\n hold >>>= here_bits, bits -= here_bits, state.lens[state.have++] = here_val;\n else {\n if (here_val === 16) {\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (hold >>>= here_bits, bits -= here_bits, state.have === 0) {\n strm.msg = \"invalid bit length repeat\", state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1], copy = 3 + (hold & 3), hold >>>= 2, bits -= 2;\n } else if (here_val === 17) {\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= here_bits, bits -= here_bits, len = 0, copy = 3 + (hold & 7), hold >>>= 3, bits -= 3;\n } else {\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= here_bits, bits -= here_bits, len = 0, copy = 11 + (hold & 127), hold >>>= 7, bits -= 7;\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = \"invalid bit length repeat\", state.mode = BAD;\n break;\n }\n while (copy--)\n state.lens[state.have++] = len;\n }\n }\n if (state.mode === BAD)\n break;\n if (state.lens[256] === 0) {\n strm.msg = \"invalid code -- missing end-of-block\", state.mode = BAD;\n break;\n }\n if (state.lenbits = 9, opts = { bits: state.lenbits }, ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts), state.lenbits = opts.bits, ret) {\n strm.msg = \"invalid literal/lengths set\", state.mode = BAD;\n break;\n }\n if (state.distbits = 6, state.distcode = state.distdyn, opts = { bits: state.distbits }, ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts), state.distbits = opts.bits, ret) {\n strm.msg = \"invalid distances set\", state.mode = BAD;\n break;\n }\n if (state.mode = LEN_, flush === Z_TREES)\n break inf_leave;\n case LEN_:\n state.mode = LEN;\n case LEN:\n if (have >= 6 && left >= 258) {\n if (strm.next_out = put, strm.avail_out = left, strm.next_in = next, strm.avail_in = have, state.hold = hold, state.bits = bits, inflate_fast(strm, _out), put = strm.next_out, output = strm.output, left = strm.avail_out, next = strm.next_in, input = strm.input, have = strm.avail_in, hold = state.hold, bits = state.bits, state.mode === TYPE)\n state.back = -1;\n break;\n }\n state.back = 0;\n for (;; ) {\n if (here = state.lencode[hold & (1 << state.lenbits) - 1], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (here_op && (here_op & 240) === 0) {\n last_bits = here_bits, last_op = here_op, last_val = here_val;\n for (;; ) {\n if (here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, last_bits + here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= last_bits, bits -= last_bits, state.back += last_bits;\n }\n if (hold >>>= here_bits, bits -= here_bits, state.back += here_bits, state.length = here_val, here_op === 0) {\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n state.back = -1, state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = \"invalid literal/length code\", state.mode = BAD;\n break;\n }\n state.extra = here_op & 15, state.mode = LENEXT;\n case LENEXT:\n if (state.extra) {\n n = state.extra;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n state.length += hold & (1 << state.extra) - 1, hold >>>= state.extra, bits -= state.extra, state.back += state.extra;\n }\n state.was = state.length, state.mode = DIST;\n case DIST:\n for (;; ) {\n if (here = state.distcode[hold & (1 << state.distbits) - 1], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if ((here_op & 240) === 0) {\n last_bits = here_bits, last_op = here_op, last_val = here_val;\n for (;; ) {\n if (here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, last_bits + here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= last_bits, bits -= last_bits, state.back += last_bits;\n }\n if (hold >>>= here_bits, bits -= here_bits, state.back += here_bits, here_op & 64) {\n strm.msg = \"invalid distance code\", state.mode = BAD;\n break;\n }\n state.offset = here_val, state.extra = here_op & 15, state.mode = DISTEXT;\n case DISTEXT:\n if (state.extra) {\n n = state.extra;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n state.offset += hold & (1 << state.extra) - 1, hold >>>= state.extra, bits -= state.extra, state.back += state.extra;\n }\n if (state.offset > state.dmax) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break;\n }\n state.mode = MATCH;\n case MATCH:\n if (left === 0)\n break inf_leave;\n if (copy = _out - left, state.offset > copy) {\n if (copy = state.offset - copy, copy > state.whave) {\n if (state.sane) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break;\n }\n }\n if (copy > state.wnext)\n copy -= state.wnext, from = state.wsize - copy;\n else\n from = state.wnext - copy;\n if (copy > state.length)\n copy = state.length;\n from_source = state.window;\n } else\n from_source = output, from = put - state.offset, copy = state.length;\n if (copy > left)\n copy = left;\n left -= copy, state.length -= copy;\n do\n output[put++] = from_source[from++];\n while (--copy);\n if (state.length === 0)\n state.mode = LEN;\n break;\n case LIT:\n if (left === 0)\n break inf_leave;\n output[put++] = state.length, left--, state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold |= input[next++] << bits, bits += 8;\n }\n if (_out -= left, strm.total_out += _out, state.total += _out, _out)\n strm.adler = state.check = state.flags \? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out);\n if (_out = left, (state.flags \? hold : zswap32(hold)) !== state.check) {\n strm.msg = \"incorrect data check\", state.mode = BAD;\n break;\n }\n hold = 0, bits = 0;\n }\n state.mode = LENGTH;\n case LENGTH:\n if (state.wrap && state.flags) {\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (hold !== (state.total & 4294967295)) {\n strm.msg = \"incorrect length check\", state.mode = BAD;\n break;\n }\n hold = 0, bits = 0;\n }\n state.mode = DONE;\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n default:\n return Z_STREAM_ERROR;\n }\n if (strm.next_out = put, strm.avail_out = left, strm.next_in = next, strm.avail_in = have, state.hold = hold, state.bits = bits, state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush !== Z_FINISH)) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out))\n return state.mode = MEM, Z_MEM_ERROR;\n }\n if (_in -= strm.avail_in, _out -= strm.avail_out, strm.total_in += _in, strm.total_out += _out, state.total += _out, state.wrap && _out)\n strm.adler = state.check = state.flags \? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out);\n if (strm.data_type = state.bits + (state.last \? 64 : 0) + (state.mode === TYPE \? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ \? 256 : 0), (_in === 0 && _out === 0 || flush === Z_FINISH) && ret === Z_OK)\n ret = Z_BUF_ERROR;\n return ret;\n }\n function inflateEnd(strm) {\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n var state = strm.state;\n if (state.window)\n state.window = null;\n return strm.state = null, Z_OK;\n }\n function inflateGetHeader(strm, head) {\n var state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, (state.wrap & 2) === 0)\n return Z_STREAM_ERROR;\n return state.head = head, head.done = !1, Z_OK;\n }\n function inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length, state, dictid, ret;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, state.wrap !== 0 && state.mode !== DICT)\n return Z_STREAM_ERROR;\n if (state.mode === DICT) {\n if (dictid = 1, dictid = adler32(dictid, dictionary, dictLength, 0), dictid !== state.check)\n return Z_DATA_ERROR;\n }\n if (ret = updatewindow(strm, dictionary, dictLength, dictLength), ret)\n return state.mode = MEM, Z_MEM_ERROR;\n return state.havedict = 1, Z_OK;\n }\n exports.inflateReset = inflateReset, exports.inflateReset2 = inflateReset2, exports.inflateResetKeep = inflateResetKeep, exports.inflateInit = inflateInit, exports.inflateInit2 = inflateInit2, exports.inflate = inflate, exports.inflateEnd = inflateEnd, exports.inflateGetHeader = inflateGetHeader, exports.inflateSetDictionary = inflateSetDictionary, exports.inflateInfo = \"pako inflate (from Nodeca project)\";\n }\n}), require_constants = __commonJS({\n \"node_modules/pako/lib/zlib/constants.js\"(exports, module2) {\n module2.exports = {\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n Z_BUF_ERROR: -5,\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n Z_BINARY: 0,\n Z_TEXT: 1,\n Z_UNKNOWN: 2,\n Z_DEFLATED: 8\n };\n }\n}), require_binding = __commonJS({\n \"node_modules/browserify-zlib/lib/binding.js\"(exports) {\n var Zstream = require_zstream(), zlib_deflate = require_deflate(), zlib_inflate = require_inflate(), constants = require_constants();\n for (key in constants)\n exports[key] = constants[key];\n var key;\n exports.NONE = 0, exports.DEFLATE = 1, exports.INFLATE = 2, exports.GZIP = 3, exports.GUNZIP = 4, exports.DEFLATERAW = 5, exports.INFLATERAW = 6, exports.UNZIP = 7;\n var GZIP_HEADER_ID1 = 31, GZIP_HEADER_ID2 = 139;\n function Zlib(mode) {\n if (typeof mode !== \"number\" || mode < exports.DEFLATE || mode > exports.UNZIP)\n @throwTypeError(\"Bad argument\");\n this.dictionary = null, this.err = 0, this.flush = 0, this.init_done = !1, this.level = 0, this.memLevel = 0, this.mode = mode, this.strategy = 0, this.windowBits = 0, this.write_in_progress = !1, this.pending_close = !1, this.gzip_id_bytes_read = 0;\n }\n Zlib.prototype = {}, Zlib.prototype.close = function() {\n if (console.log(\"Zlib close\"), this.write_in_progress) {\n this.pending_close = !0;\n return;\n }\n if (this.pending_close = !1, assert(this.init_done, \"close before init\"), assert(this.mode <= exports.UNZIP), this.mode === exports.DEFLATE || this.mode === exports.GZIP || this.mode === exports.DEFLATERAW)\n zlib_deflate.deflateEnd(this.strm);\n else if (this.mode === exports.INFLATE || this.mode === exports.GUNZIP || this.mode === exports.INFLATERAW || this.mode === exports.UNZIP)\n zlib_inflate.inflateEnd(this.strm);\n this.mode = exports.NONE, this.dictionary = null;\n }, Zlib.prototype.write = function(flush, input, in_off, in_len, out, out_off, out_len) {\n return this._write(!0, flush, input, in_off, in_len, out, out_off, out_len);\n }, Zlib.prototype.writeSync = function(flush, input, in_off, in_len, out, out_off, out_len) {\n return this._write(!1, flush, input, in_off, in_len, out, out_off, out_len);\n }, Zlib.prototype._write = function(async, flush, input, in_off, in_len, out, out_off, out_len) {\n if (assert.equal(arguments.length, 8), assert(this.init_done, \"write before init\"), assert(this.mode !== exports.NONE, \"already finalized\"), assert.equal(!1, this.write_in_progress, \"write already in progress\"), assert.equal(!1, this.pending_close, \"close is pending\"), this.write_in_progress = !0, assert.equal(!1, flush === void 0, \"must provide flush value\"), this.write_in_progress = !0, flush !== exports.Z_NO_FLUSH && flush !== exports.Z_PARTIAL_FLUSH && flush !== exports.Z_SYNC_FLUSH && flush !== exports.Z_FULL_FLUSH && flush !== exports.Z_FINISH && flush !== exports.Z_BLOCK)\n throw new Error(\"Invalid flush value\");\n if (input == null)\n input = Buffer.alloc(0), in_len = 0, in_off = 0;\n if (this.strm.avail_in = in_len, this.strm.input = input, this.strm.next_in = in_off, this.strm.avail_out = out_len, this.strm.output = out, this.strm.next_out = out_off, this.flush = flush, !async) {\n if (this._process(), this._checkError())\n return this._afterSync();\n return;\n }\n var self = this;\n return process.nextTick(function() {\n self._process(), self._after();\n }), this;\n }, Zlib.prototype._afterSync = function() {\n var avail_out = this.strm.avail_out, avail_in = this.strm.avail_in;\n return this.write_in_progress = !1, [avail_in, avail_out];\n }, Zlib.prototype._process = function() {\n var next_expected_header_byte = null;\n switch (this.mode) {\n case exports.DEFLATE:\n case exports.GZIP:\n case exports.DEFLATERAW:\n this.err = zlib_deflate.deflate(this.strm, this.flush);\n break;\n case exports.UNZIP:\n if (this.strm.avail_in > 0)\n next_expected_header_byte = this.strm.next_in;\n switch (this.gzip_id_bytes_read) {\n case 0:\n if (next_expected_header_byte === null)\n break;\n if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID1) {\n if (this.gzip_id_bytes_read = 1, next_expected_header_byte++, this.strm.avail_in === 1)\n break;\n } else {\n this.mode = exports.INFLATE;\n break;\n }\n case 1:\n if (next_expected_header_byte === null)\n break;\n if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID2)\n this.gzip_id_bytes_read = 2, this.mode = exports.GUNZIP;\n else\n this.mode = exports.INFLATE;\n break;\n default:\n throw new Error(\"invalid number of gzip magic number bytes read\");\n }\n case exports.INFLATE:\n case exports.GUNZIP:\n case exports.INFLATERAW:\n if (this.err = zlib_inflate.inflate(this.strm, this.flush), this.err === exports.Z_NEED_DICT && this.dictionary) {\n if (this.err = zlib_inflate.inflateSetDictionary(this.strm, this.dictionary), this.err === exports.Z_OK)\n this.err = zlib_inflate.inflate(this.strm, this.flush);\n else if (this.err === exports.Z_DATA_ERROR)\n this.err = exports.Z_NEED_DICT;\n }\n while (this.strm.avail_in > 0 && this.mode === exports.GUNZIP && this.err === exports.Z_STREAM_END && this.strm.next_in[0] !== 0)\n this.reset(), this.err = zlib_inflate.inflate(this.strm, this.flush);\n break;\n default:\n throw new Error(\"Unknown mode \" + this.mode);\n }\n }, Zlib.prototype._checkError = function() {\n switch (this.err) {\n case exports.Z_OK:\n case exports.Z_BUF_ERROR:\n if (this.strm.avail_out !== 0 && this.flush === exports.Z_FINISH)\n return this._error(\"unexpected end of file\"), !1;\n break;\n case exports.Z_STREAM_END:\n break;\n case exports.Z_NEED_DICT:\n if (this.dictionary == null)\n this._error(\"Missing dictionary\");\n else\n this._error(\"Bad dictionary\");\n return !1;\n default:\n return this._error(\"Zlib error\"), !1;\n }\n return !0;\n }, Zlib.prototype._after = function() {\n if (!this._checkError())\n return;\n var avail_out = this.strm.avail_out, avail_in = this.strm.avail_in;\n if (this.write_in_progress = !1, this.callback(avail_in, avail_out), this.pending_close)\n this.close();\n }, Zlib.prototype._error = function(message) {\n if (this.strm.msg)\n message = this.strm.msg;\n if (this.onerror(message, this.err), this.write_in_progress = !1, this.pending_close)\n this.close();\n }, Zlib.prototype.init = function(windowBits, level, memLevel, strategy, dictionary) {\n assert(arguments.length === 4 || arguments.length === 5, \"init(windowBits, level, memLevel, strategy, [dictionary])\"), assert(windowBits >= 8 && windowBits <= 15, \"invalid windowBits\"), assert(level >= -1 && level <= 9, \"invalid compression level\"), assert(memLevel >= 1 && memLevel <= 9, \"invalid memlevel\"), assert(strategy === exports.Z_FILTERED || strategy === exports.Z_HUFFMAN_ONLY || strategy === exports.Z_RLE || strategy === exports.Z_FIXED || strategy === exports.Z_DEFAULT_STRATEGY, \"invalid strategy\"), this._init(level, windowBits, memLevel, strategy, dictionary), this._setDictionary();\n }, Zlib.prototype.params = function() {\n throw new Error(\"deflateParams Not supported\");\n }, Zlib.prototype.reset = function() {\n this._reset(), this._setDictionary();\n }, Zlib.prototype._init = function(level, windowBits, memLevel, strategy, dictionary) {\n if (this.level = level, this.windowBits = windowBits, this.memLevel = memLevel, this.strategy = strategy, this.flush = exports.Z_NO_FLUSH, this.err = exports.Z_OK, this.mode === exports.GZIP || this.mode === exports.GUNZIP)\n this.windowBits += 16;\n if (this.mode === exports.UNZIP)\n this.windowBits += 32;\n if (this.mode === exports.DEFLATERAW || this.mode === exports.INFLATERAW)\n this.windowBits = -1 * this.windowBits;\n switch (this.strm = new Zstream, this.mode) {\n case exports.DEFLATE:\n case exports.GZIP:\n case exports.DEFLATERAW:\n this.err = zlib_deflate.deflateInit2(this.strm, this.level, exports.Z_DEFLATED, this.windowBits, this.memLevel, this.strategy);\n break;\n case exports.INFLATE:\n case exports.GUNZIP:\n case exports.INFLATERAW:\n case exports.UNZIP:\n this.err = zlib_inflate.inflateInit2(this.strm, this.windowBits);\n break;\n default:\n throw new Error(\"Unknown mode \" + this.mode);\n }\n if (this.err !== exports.Z_OK)\n this._error(\"Init error\");\n this.dictionary = dictionary, this.write_in_progress = !1, this.init_done = !0;\n }, Zlib.prototype._setDictionary = function() {\n if (this.dictionary == null)\n return;\n switch (this.err = exports.Z_OK, this.mode) {\n case exports.DEFLATE:\n case exports.DEFLATERAW:\n this.err = zlib_deflate.deflateSetDictionary(this.strm, this.dictionary);\n break;\n default:\n break;\n }\n if (this.err !== exports.Z_OK)\n this._error(\"Failed to set dictionary\");\n }, Zlib.prototype._reset = function() {\n switch (this.err = exports.Z_OK, this.mode) {\n case exports.DEFLATE:\n case exports.DEFLATERAW:\n case exports.GZIP:\n this.err = zlib_deflate.deflateReset(this.strm);\n break;\n case exports.INFLATE:\n case exports.INFLATERAW:\n case exports.GUNZIP:\n this.err = zlib_inflate.inflateReset(this.strm);\n break;\n default:\n break;\n }\n if (this.err !== exports.Z_OK)\n this._error(\"Failed to reset stream\");\n }, exports.Zlib = Zlib;\n }\n}), require_lib = __commonJS({\n \"node_modules/browserify-zlib/lib/index.js\"(exports) {\n var Buffer2 = BufferModule.Buffer, Transform = StreamModule.Transform, binding = require_binding(), util = Util, kMaxLength = BufferModule.kMaxLength, kRangeErrorMessage = \"Cannot create final Buffer. It would be larger than 0x\" + kMaxLength.toString(16) + \" bytes\";\n binding.Z_MIN_WINDOWBITS = 8, binding.Z_MAX_WINDOWBITS = 15, binding.Z_DEFAULT_WINDOWBITS = 15, binding.Z_MIN_CHUNK = 64, binding.Z_MAX_CHUNK = Infinity, binding.Z_DEFAULT_CHUNK = 16384, binding.Z_MIN_MEMLEVEL = 1, binding.Z_MAX_MEMLEVEL = 9, binding.Z_DEFAULT_MEMLEVEL = 8, binding.Z_MIN_LEVEL = -1, binding.Z_MAX_LEVEL = 9, binding.Z_DEFAULT_LEVEL = binding.Z_DEFAULT_COMPRESSION;\n var bkeys = Object.keys(binding);\n for (bk = 0;bk < bkeys.length; bk++)\n if (bkey = bkeys[bk], bkey.match(/^Z/))\n Object.defineProperty(exports, bkey, {\n enumerable: !0,\n value: binding[bkey],\n writable: !1\n });\n var bkey, bk, codes = {\n Z_OK: binding.Z_OK,\n Z_STREAM_END: binding.Z_STREAM_END,\n Z_NEED_DICT: binding.Z_NEED_DICT,\n Z_ERRNO: binding.Z_ERRNO,\n Z_STREAM_ERROR: binding.Z_STREAM_ERROR,\n Z_DATA_ERROR: binding.Z_DATA_ERROR,\n Z_MEM_ERROR: binding.Z_MEM_ERROR,\n Z_BUF_ERROR: binding.Z_BUF_ERROR,\n Z_VERSION_ERROR: binding.Z_VERSION_ERROR\n }, ckeys = Object.keys(codes);\n for (ck = 0;ck < ckeys.length; ck++)\n ckey = ckeys[ck], codes[codes[ckey]] = ckey;\n var ckey, ck;\n Object.defineProperty(exports, \"codes\", {\n enumerable: !0,\n value: Object.freeze(codes),\n writable: !1\n }), exports.constants = require_constants(), exports.Deflate = Deflate, exports.Inflate = Inflate, exports.Gzip = Gzip, exports.Gunzip = Gunzip, exports.DeflateRaw = DeflateRaw, exports.InflateRaw = InflateRaw, exports.Unzip = Unzip, exports.createDeflate = function(o) {\n return new Deflate(o);\n }, exports.createInflate = function(o) {\n return new Inflate(o);\n }, exports.createDeflateRaw = function(o) {\n return new DeflateRaw(o);\n }, exports.createInflateRaw = function(o) {\n return new InflateRaw(o);\n }, exports.createGzip = function(o) {\n return new Gzip(o);\n }, exports.createGunzip = function(o) {\n return new Gunzip(o);\n }, exports.createUnzip = function(o) {\n return new Unzip(o);\n }, exports.deflate = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Deflate(opts), buffer, callback);\n }, exports.deflateSync = function(buffer, opts) {\n return zlibBufferSync(new Deflate(opts), buffer);\n }, exports.gzip = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Gzip(opts), buffer, callback);\n }, exports.gzipSync = function(buffer, opts) {\n return zlibBufferSync(new Gzip(opts), buffer);\n }, exports.deflateRaw = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new DeflateRaw(opts), buffer, callback);\n }, exports.deflateRawSync = function(buffer, opts) {\n return zlibBufferSync(new DeflateRaw(opts), buffer);\n }, exports.unzip = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Unzip(opts), buffer, callback);\n }, exports.unzipSync = function(buffer, opts) {\n return zlibBufferSync(new Unzip(opts), buffer);\n }, exports.inflate = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Inflate(opts), buffer, callback);\n }, exports.inflateSync = function(buffer, opts) {\n return zlibBufferSync(new Inflate(opts), buffer);\n }, exports.gunzip = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Gunzip(opts), buffer, callback);\n }, exports.gunzipSync = function(buffer, opts) {\n return zlibBufferSync(new Gunzip(opts), buffer);\n }, exports.inflateRaw = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new InflateRaw(opts), buffer, callback);\n }, exports.inflateRawSync = function(buffer, opts) {\n return zlibBufferSync(new InflateRaw(opts), buffer);\n }, exports.brotliCompress = function(buffer, opts, callback) {\n throw new Error(\"zlib.brotliCompress is not implemented\");\n };\n function zlibBuffer(engine, buffer, callback) {\n var buffers = [], nread = 0;\n engine.on(\"error\", onError), engine.on(\"end\", onEnd), engine.end(buffer), flow();\n function flow() {\n var chunk;\n while ((chunk = engine.read()) !== null)\n buffers.push(chunk), nread += chunk.length;\n engine.once(\"readable\", flow);\n }\n function onError(err) {\n engine.removeListener(\"end\", onEnd), engine.removeListener(\"readable\", flow), callback(err);\n }\n function onEnd() {\n var buf, err = null;\n if (nread >= kMaxLength)\n err = new RangeError(kRangeErrorMessage);\n else\n buf = Buffer2.concat(buffers, nread);\n buffers = [], engine.close(), callback(err, buf);\n }\n }\n function zlibBufferSync(engine, buffer) {\n if (typeof buffer === \"string\")\n buffer = Buffer2.from(buffer);\n if (!Buffer2.isBuffer(buffer))\n @throwTypeError(\"Not a string or buffer\");\n var flushFlag = engine._finishFlushFlag;\n return engine._processChunk(buffer, flushFlag);\n }\n function Deflate(opts) {\n if (!(this instanceof Deflate))\n return new Deflate(opts);\n Zlib.call(this, opts, binding.DEFLATE);\n }\n function Inflate(opts) {\n if (!(this instanceof Inflate))\n return new Inflate(opts);\n Zlib.call(this, opts, binding.INFLATE);\n }\n function Gzip(opts) {\n if (!(this instanceof Gzip))\n return new Gzip(opts);\n Zlib.call(this, opts, binding.GZIP);\n }\n function Gunzip(opts) {\n if (!(this instanceof Gunzip))\n return new Gunzip(opts);\n Zlib.call(this, opts, binding.GUNZIP);\n }\n function DeflateRaw(opts) {\n if (!(this instanceof DeflateRaw))\n return new DeflateRaw(opts);\n Zlib.call(this, opts, binding.DEFLATERAW);\n }\n function InflateRaw(opts) {\n if (!(this instanceof InflateRaw))\n return new InflateRaw(opts);\n Zlib.call(this, opts, binding.INFLATERAW);\n }\n function Unzip(opts) {\n if (!(this instanceof Unzip))\n return new Unzip(opts);\n Zlib.call(this, opts, binding.UNZIP);\n }\n function isValidFlushFlag(flag) {\n return flag === binding.Z_NO_FLUSH || flag === binding.Z_PARTIAL_FLUSH || flag === binding.Z_SYNC_FLUSH || flag === binding.Z_FULL_FLUSH || flag === binding.Z_FINISH || flag === binding.Z_BLOCK;\n }\n function Zlib(opts, mode) {\n var _this = this;\n if (this._opts = opts = opts || {}, this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK, Transform.call(this, opts), opts.flush && !isValidFlushFlag(opts.flush))\n throw new Error(\"Invalid flush flag: \" + opts.flush);\n if (opts.finishFlush && !isValidFlushFlag(opts.finishFlush))\n throw new Error(\"Invalid flush flag: \" + opts.finishFlush);\n if (this._flushFlag = opts.flush || binding.Z_NO_FLUSH, this._finishFlushFlag = typeof opts.finishFlush !== \"undefined\" \? opts.finishFlush : binding.Z_FINISH, opts.chunkSize) {\n if (opts.chunkSize < exports.Z_MIN_CHUNK || opts.chunkSize > exports.Z_MAX_CHUNK)\n throw new Error(\"Invalid chunk size: \" + opts.chunkSize);\n }\n if (opts.windowBits) {\n if (opts.windowBits < exports.Z_MIN_WINDOWBITS || opts.windowBits > exports.Z_MAX_WINDOWBITS)\n throw new Error(\"Invalid windowBits: \" + opts.windowBits);\n }\n if (opts.level) {\n if (opts.level < exports.Z_MIN_LEVEL || opts.level > exports.Z_MAX_LEVEL)\n throw new Error(\"Invalid compression level: \" + opts.level);\n }\n if (opts.memLevel) {\n if (opts.memLevel < exports.Z_MIN_MEMLEVEL || opts.memLevel > exports.Z_MAX_MEMLEVEL)\n throw new Error(\"Invalid memLevel: \" + opts.memLevel);\n }\n if (opts.strategy) {\n if (opts.strategy != exports.Z_FILTERED && opts.strategy != exports.Z_HUFFMAN_ONLY && opts.strategy != exports.Z_RLE && opts.strategy != exports.Z_FIXED && opts.strategy != exports.Z_DEFAULT_STRATEGY)\n throw new Error(\"Invalid strategy: \" + opts.strategy);\n }\n if (opts.dictionary) {\n if (!Buffer2.isBuffer(opts.dictionary))\n throw new Error(\"Invalid dictionary: it should be a Buffer instance\");\n }\n this._handle = new binding.Zlib(mode);\n var self = this;\n this._hadError = !1, this._handle.onerror = function(message, errno) {\n _close(self), self._hadError = !0;\n var error = new Error(message);\n error.errno = errno, error.code = exports.codes[errno], self.emit(\"error\", error);\n };\n var level = exports.Z_DEFAULT_COMPRESSION;\n if (typeof opts.level === \"number\")\n level = opts.level;\n var strategy = exports.Z_DEFAULT_STRATEGY;\n if (typeof opts.strategy === \"number\")\n strategy = opts.strategy;\n this._handle.init(opts.windowBits || exports.Z_DEFAULT_WINDOWBITS, level, opts.memLevel || exports.Z_DEFAULT_MEMLEVEL, strategy, opts.dictionary), this._buffer = Buffer2.allocUnsafe(this._chunkSize), this._offset = 0, this._level = level, this._strategy = strategy, this.once(\"end\", this.close), Object.defineProperty(this, \"_closed\", {\n get: function() {\n return !_this._handle;\n },\n configurable: !0,\n enumerable: !0\n });\n }\n util.inherits(Zlib, Transform), Zlib.prototype.params = function(level, strategy, callback) {\n if (level < exports.Z_MIN_LEVEL || level > exports.Z_MAX_LEVEL)\n @throwRangeError(\"Invalid compression level: \" + level);\n if (strategy != exports.Z_FILTERED && strategy != exports.Z_HUFFMAN_ONLY && strategy != exports.Z_RLE && strategy != exports.Z_FIXED && strategy != exports.Z_DEFAULT_STRATEGY)\n @throwTypeError(\"Invalid strategy: \" + strategy);\n if (this._level !== level || this._strategy !== strategy) {\n var self = this;\n this.flush(binding.Z_SYNC_FLUSH, function() {\n if (assert(self._handle, \"zlib binding closed\"), self._handle.params(level, strategy), !self._hadError) {\n if (self._level = level, self._strategy = strategy, callback)\n callback();\n }\n });\n } else\n process.nextTick(callback);\n }, Zlib.prototype.reset = function() {\n return assert(this._handle, \"zlib binding closed\"), this._handle.reset();\n }, Zlib.prototype._flush = function(callback) {\n this._transform(Buffer2.alloc(0), \"\", callback);\n }, Zlib.prototype.flush = function(kind, callback) {\n var _this2 = this, ws = this._writableState;\n if (typeof kind === \"function\" || kind === void 0 && !callback)\n callback = kind, kind = binding.Z_FULL_FLUSH;\n if (ws.ended) {\n if (callback)\n process.nextTick(callback);\n } else if (ws.ending) {\n if (callback)\n this.once(\"end\", callback);\n } else if (ws.needDrain) {\n if (callback)\n this.once(\"drain\", function() {\n return _this2.flush(kind, callback);\n });\n } else\n this._flushFlag = kind, this.write(Buffer2.alloc(0), \"\", callback);\n }, Zlib.prototype.close = function(callback) {\n _close(this, callback), process.nextTick(emitCloseNT, this);\n };\n function _close(engine, callback) {\n if (callback)\n process.nextTick(callback);\n if (!engine._handle)\n return;\n engine._handle.close(), engine._handle = null;\n }\n function emitCloseNT(self) {\n self.emit(\"close\");\n }\n Zlib.prototype._transform = function(chunk, encoding, cb) {\n var flushFlag, ws = this._writableState, ending = ws.ending || ws.ended, last = ending && (!chunk || ws.length === chunk.length);\n if (chunk !== null && !Buffer2.isBuffer(chunk))\n return cb(new Error(\"invalid input\"));\n if (!this._handle)\n return cb(new Error(\"zlib binding closed\"));\n if (last)\n flushFlag = this._finishFlushFlag;\n else if (flushFlag = this._flushFlag, chunk.length >= ws.length)\n this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH;\n this._processChunk(chunk, flushFlag, cb);\n }, Zlib.prototype._processChunk = function(chunk, flushFlag, cb) {\n var availInBefore = chunk && chunk.length, availOutBefore = this._chunkSize - this._offset, inOff = 0, self = this, async = typeof cb === \"function\";\n if (!async) {\n var buffers = [], nread = 0, error;\n this.on(\"error\", function(er) {\n error = er;\n }), assert(this._handle, \"zlib binding closed\");\n do\n var res = this._handle.writeSync(flushFlag, chunk, inOff, availInBefore, this._buffer, this._offset, availOutBefore);\n while (!this._hadError && callback(res[0], res[1]));\n if (this._hadError)\n throw error;\n if (nread >= kMaxLength)\n _close(this), @throwRangeError(kRangeErrorMessage);\n var buf = Buffer2.concat(buffers, nread);\n return _close(this), buf;\n }\n assert(this._handle, \"zlib binding closed\");\n var req = this._handle.write(flushFlag, chunk, inOff, availInBefore, this._buffer, this._offset, availOutBefore);\n req.buffer = chunk, req.callback = callback;\n function callback(availInAfter, availOutAfter) {\n if (this)\n this.buffer = null, this.callback = null;\n if (self._hadError)\n return;\n var have = availOutBefore - availOutAfter;\n if (assert(have >= 0, \"have should not go down\"), have > 0) {\n var out = self._buffer.slice(self._offset, self._offset + have);\n if (self._offset += have, async)\n self.push(out);\n else\n buffers.push(out), nread += out.length;\n }\n if (availOutAfter === 0 || self._offset >= self._chunkSize)\n availOutBefore = self._chunkSize, self._offset = 0, self._buffer = Buffer2.allocUnsafe(self._chunkSize);\n if (availOutAfter === 0) {\n if (inOff += availInBefore - availInAfter, availInBefore = availInAfter, !async)\n return !0;\n var newReq = self._handle.write(flushFlag, chunk, inOff, availInBefore, self._buffer, self._offset, self._chunkSize);\n newReq.callback = callback, newReq.buffer = chunk;\n return;\n }\n if (!async)\n return !1;\n cb();\n }\n }, util.inherits(Deflate, Zlib), util.inherits(Inflate, Zlib), util.inherits(Gzip, Zlib), util.inherits(Gunzip, Zlib), util.inherits(DeflateRaw, Zlib), util.inherits(InflateRaw, Zlib), util.inherits(Unzip, Zlib);\n }\n});\nreturn require_lib()})\n"_s;
//
//
@@ -549,7 +549,7 @@ static constexpr ASCIILiteral NodeFSPromisesCode = "(function (){\"use strict\";
//
//
-static constexpr ASCIILiteral NodeHttpCode = "(function (){\"use strict\";// src/js/out/tmp/node/http.ts\nvar checkInvalidHeaderChar = function(val) {\n return RegExpPrototypeExec.call(headerCharRegex, val) !== null;\n}, isIPv6 = function(input) {\n return new RegExp(\"^((\?:(\?:[0-9a-fA-F]{1,4}):){7}(\?:(\?:[0-9a-fA-F]{1,4})|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){6}(\?:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|:(\?:[0-9a-fA-F]{1,4})|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){5}(\?::((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,2}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){4}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,1}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,3}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){3}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,2}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,4}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){2}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,3}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,5}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){1}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,4}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,6}|:)|(\?::((\?::(\?:[0-9a-fA-F]{1,4})){0,5}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(\?::(\?:[0-9a-fA-F]{1,4})){1,7}|:)))(%[0-9a-zA-Z-.:]{1,})\?$\").test(input);\n}, isValidTLSArray = function(obj) {\n if (typeof obj === \"string\" || isTypedArray(obj) || obj instanceof ArrayBuffer || obj instanceof Blob)\n return !0;\n if (Array.isArray(obj)) {\n for (var i = 0;i < obj.length; i++)\n if (typeof obj !== \"string\" && !isTypedArray(obj) && !(obj instanceof ArrayBuffer) && !(obj instanceof Blob))\n return !1;\n return !0;\n }\n}, validateMsecs = function(numberlike, field) {\n if (typeof numberlike !== \"number\" || numberlike < 0)\n throw new ERR_INVALID_ARG_TYPE(field, \"number\", numberlike);\n return numberlike;\n}, validateFunction = function(callable, field) {\n if (typeof callable !== \"function\")\n throw new ERR_INVALID_ARG_TYPE(field, \"Function\", callable);\n return callable;\n}, getHeader = function(headers, name) {\n if (!headers)\n return;\n const result = headers.get(name);\n return result == null \? void 0 : result;\n}, createServer = function(options, callback) {\n return new Server(options, callback);\n}, emitListeningNextTick = function(self, onListen, err, hostname, port) {\n if (typeof onListen === \"function\")\n try {\n onListen(err, hostname, port);\n } catch (err2) {\n self.emit(\"error\", err2);\n }\n if (self.listening = !err, err)\n self.emit(\"error\", err);\n else\n self.emit(\"listening\", hostname, port);\n}, assignHeaders = function(object, req) {\n var headers = req.headers.toJSON();\n const rawHeaders = @newArrayWithSize(req.headers.count * 2);\n var i = 0;\n for (let key in headers)\n rawHeaders[i++] = key, rawHeaders[i++] = headers[key];\n object.headers = headers, object.rawHeaders = rawHeaders;\n};\nvar getDefaultHTTPSAgent = function() {\n return _defaultHTTPSAgent \?\?= new Agent({ defaultPort: 443, protocol: \"https:\" });\n};\nvar urlToHttpOptions = function(url) {\n var { protocol, hostname, hash, search, pathname, href, port, username, password } = url;\n return {\n protocol,\n hostname: typeof hostname === \"string\" && StringPrototypeStartsWith.call(hostname, \"[\") \? StringPrototypeSlice.call(hostname, 1, -1) : hostname,\n hash,\n search,\n pathname,\n path: `${pathname || \"\"}${search || \"\"}`,\n href,\n port: port \? Number(port) : protocol === \"https:\" \? 443 : protocol === \"http:\" \? 80 : void 0,\n auth: username || password \? `${decodeURIComponent(username)}:${decodeURIComponent(password)}` : void 0\n };\n}, validateHost = function(host, name) {\n if (host !== null && host !== void 0 && typeof host !== \"string\")\n throw new Error(\"Invalid arg type in options\");\n return host;\n}, checkIsHttpToken = function(val) {\n return RegExpPrototypeExec.call(tokenRegExp, val) !== null;\n};\nvar _writeHead = function(statusCode, reason, obj, response) {\n if (statusCode |= 0, statusCode < 100 || statusCode > 999)\n throw new Error(\"status code must be between 100 and 999\");\n if (typeof reason === \"string\")\n response.statusMessage = reason;\n else {\n if (!response.statusMessage)\n response.statusMessage = STATUS_CODES[statusCode] || \"unknown\";\n obj = reason;\n }\n response.statusCode = statusCode;\n {\n let k;\n if (Array.isArray(obj)) {\n if (obj.length % 2 !== 0)\n throw new Error(\"raw headers must have an even number of elements\");\n for (let n = 0;n < obj.length; n += 2)\n if (k = obj[n + 0], k)\n response.setHeader(k, obj[n + 1]);\n } else if (obj) {\n const keys = Object.keys(obj);\n for (let i = 0;i < keys.length; i++)\n if (k = keys[i], k)\n response.setHeader(k, obj[k]);\n }\n }\n if (statusCode === 204 || statusCode === 304 || statusCode >= 100 && statusCode <= 199)\n response._hasBody = !1;\n}, request = function(url, options, cb) {\n return new ClientRequest(url, options, cb);\n}, get = function(url, options, cb) {\n const req = request(url, options, cb);\n return req.end(), req;\n}, $, EventEmitter = @getInternalField(@internalModuleRegistry, 16) || @createInternalModuleById(16), { isTypedArray } = @requireNativeModule(\"node:util/types\"), { Duplex, Readable, Writable } = @getInternalField(@internalModuleRegistry, 35) || @createInternalModuleById(35), headerCharRegex = /[^\\t\\x20-\\x7e\\x80-\\xff]/, validateHeaderName = (name, label) => {\n if (typeof name !== \"string\" || !name || !checkIsHttpToken(name))\n throw new Error(\"ERR_INVALID_HTTP_TOKEN\");\n}, validateHeaderValue = (name, value) => {\n if (value === void 0)\n throw new Error(\"ERR_HTTP_INVALID_HEADER_VALUE\");\n if (checkInvalidHeaderChar(value))\n throw new Error(\"ERR_INVALID_CHAR\");\n}, { URL } = globalThis, globalReportError = globalThis.reportError, setTimeout = globalThis.setTimeout, fetch = Bun.fetch;\nvar kEmptyObject = Object.freeze(Object.create(null)), kOutHeaders = Symbol.for(\"kOutHeaders\"), kEndCalled = Symbol.for(\"kEndCalled\"), kAbortController = Symbol.for(\"kAbortController\"), kClearTimeout = Symbol(\"kClearTimeout\"), kCorked = Symbol.for(\"kCorked\"), searchParamsSymbol = Symbol.for(\"query\"), StringPrototypeSlice = String.prototype.slice, StringPrototypeStartsWith = String.prototype.startsWith, StringPrototypeToUpperCase = String.prototype.toUpperCase, StringPrototypeIncludes = String.prototype.includes, StringPrototypeCharCodeAt = String.prototype.charCodeAt, StringPrototypeIndexOf = String.prototype.indexOf, ArrayIsArray = Array.isArray, RegExpPrototypeExec = RegExp.prototype.exec, ObjectAssign = Object.assign;\nvar INVALID_PATH_REGEX = /[^\\u0021-\\u00ff]/;\nvar _defaultHTTPSAgent, kInternalRequest = Symbol(\"kInternalRequest\"), kInternalSocketData = Symbol.for(\"::bunternal::\"), kEmptyBuffer = Buffer.alloc(0);\n\nclass ERR_INVALID_ARG_TYPE extends TypeError {\n constructor(name, expected, actual) {\n super(`The ${name} argument must be of type ${expected}. Received type ${typeof actual}`);\n this.code = \"ERR_INVALID_ARG_TYPE\";\n }\n}\nvar FakeSocket = class Socket extends Duplex {\n bytesRead = 0;\n bytesWritten = 0;\n connecting = !1;\n remoteAddress = null;\n remotePort;\n timeout = 0;\n isServer = !1;\n address() {\n return {\n address: this.localAddress,\n family: this.localFamily,\n port: this.localPort\n };\n }\n get bufferSize() {\n return this.writableLength;\n }\n connect(port, host, connectListener) {\n return this;\n }\n _destroy(err, callback) {\n }\n _final(callback) {\n }\n get localAddress() {\n return \"127.0.0.1\";\n }\n get localFamily() {\n return \"IPv4\";\n }\n get localPort() {\n return 80;\n }\n get pending() {\n return this.connecting;\n }\n _read(size) {\n }\n get readyState() {\n if (this.connecting)\n return \"opening\";\n if (this.readable)\n return this.writable \? \"open\" : \"readOnly\";\n else\n return this.writable \? \"writeOnly\" : \"closed\";\n }\n ref() {\n }\n get remoteFamily() {\n return \"IPv4\";\n }\n resetAndDestroy() {\n }\n setKeepAlive(enable = !1, initialDelay = 0) {\n }\n setNoDelay(noDelay = !0) {\n return this;\n }\n setTimeout(timeout, callback) {\n return this;\n }\n unref() {\n }\n _write(chunk, encoding, callback) {\n }\n};\n\nclass Agent extends EventEmitter {\n defaultPort = 80;\n protocol = \"http:\";\n options;\n requests;\n sockets;\n freeSockets;\n keepAliveMsecs;\n keepAlive;\n maxSockets;\n maxFreeSockets;\n scheduling;\n maxTotalSockets;\n totalSocketCount;\n #fakeSocket;\n static get globalAgent() {\n return globalAgent;\n }\n static get defaultMaxSockets() {\n return Infinity;\n }\n constructor(options = kEmptyObject) {\n super();\n if (this.options = options = { ...options, path: null }, options.noDelay === void 0)\n options.noDelay = !0;\n this.requests = kEmptyObject, this.sockets = kEmptyObject, this.freeSockets = kEmptyObject, this.keepAliveMsecs = options.keepAliveMsecs || 1000, this.keepAlive = options.keepAlive || !1, this.maxSockets = options.maxSockets || Agent.defaultMaxSockets, this.maxFreeSockets = options.maxFreeSockets || 256, this.scheduling = options.scheduling || \"lifo\", this.maxTotalSockets = options.maxTotalSockets, this.totalSocketCount = 0, this.defaultPort = options.defaultPort || 80, this.protocol = options.protocol || \"http:\";\n }\n createConnection() {\n return this.#fakeSocket \?\?= new FakeSocket;\n }\n getName(options = kEmptyObject) {\n let name = `http:${options.host || \"localhost\"}:`;\n if (options.port)\n name += options.port;\n if (name += \":\", options.localAddress)\n name += options.localAddress;\n if (options.family === 4 || options.family === 6)\n name += `:${options.family}`;\n if (options.socketPath)\n name += `:${options.socketPath}`;\n return name;\n }\n addRequest() {\n }\n createSocket(req, options, cb) {\n cb(null, this.#fakeSocket \?\?= new FakeSocket);\n }\n removeSocket() {\n }\n keepSocketAlive() {\n return !0;\n }\n reuseSocket() {\n }\n destroy() {\n }\n}\n\nclass Server extends EventEmitter {\n #server;\n #options;\n #tls;\n #is_tls = !1;\n listening = !1;\n serverName;\n constructor(options, callback) {\n super();\n if (typeof options === \"function\")\n callback = options, options = {};\n else if (options == null || typeof options === \"object\") {\n options = { ...options }, this.#tls = null;\n let key = options.key;\n if (key) {\n if (!isValidTLSArray(key))\n @throwTypeError(\"key argument must be an string, Buffer, TypedArray, BunFile or an array containing string, Buffer, TypedArray or BunFile\");\n this.#is_tls = !0;\n }\n let cert = options.cert;\n if (cert) {\n if (!isValidTLSArray(cert))\n @throwTypeError(\"cert argument must be an string, Buffer, TypedArray, BunFile or an array containing string, Buffer, TypedArray or BunFile\");\n this.#is_tls = !0;\n }\n let ca = options.ca;\n if (ca) {\n if (!isValidTLSArray(ca))\n @throwTypeError(\"ca argument must be an string, Buffer, TypedArray, BunFile or an array containing string, Buffer, TypedArray or BunFile\");\n this.#is_tls = !0;\n }\n let passphrase = options.passphrase;\n if (passphrase && typeof passphrase !== \"string\")\n @throwTypeError(\"passphrase argument must be an string\");\n let serverName = options.servername;\n if (serverName && typeof serverName !== \"string\")\n @throwTypeError(\"servername argument must be an string\");\n let secureOptions = options.secureOptions || 0;\n if (secureOptions && typeof secureOptions !== \"number\")\n @throwTypeError(\"secureOptions argument must be an number\");\n if (this.#is_tls)\n this.#tls = {\n serverName,\n key,\n cert,\n ca,\n passphrase,\n secureOptions\n };\n else\n this.#tls = null;\n } else\n throw new Error(\"bun-http-polyfill: invalid arguments\");\n if (this.#options = options, callback)\n this.on(\"request\", callback);\n }\n closeAllConnections() {\n const server = this.#server;\n if (!server)\n return;\n this.#server = void 0, server.stop(!0), this.emit(\"close\");\n }\n closeIdleConnections() {\n }\n close(optionalCallback) {\n const server = this.#server;\n if (!server) {\n if (typeof optionalCallback === \"function\")\n process.nextTick(optionalCallback, new Error(\"Server is not running\"));\n return;\n }\n if (this.#server = void 0, typeof optionalCallback === \"function\")\n this.once(\"close\", optionalCallback);\n server.stop(), this.emit(\"close\");\n }\n address() {\n if (!this.#server)\n return null;\n const address = this.#server.hostname;\n return {\n address,\n family: isIPv6(address) \? \"IPv6\" : \"IPv4\",\n port: this.#server.port\n };\n }\n listen(port, host, backlog, onListen) {\n const server = this;\n if (typeof host === \"function\")\n onListen = host, host = void 0;\n if (typeof port === \"function\")\n onListen = port;\n else if (typeof port === \"object\") {\n if (port\?.signal\?.addEventListener(\"abort\", () => {\n this.close();\n }), host = port\?.host, port = port\?.port, typeof port\?.callback === \"function\")\n onListen = port\?.callback;\n }\n if (typeof backlog === \"function\")\n onListen = backlog;\n const ResponseClass = this.#options.ServerResponse || ServerResponse, RequestClass = this.#options.IncomingMessage || IncomingMessage;\n try {\n const tls = this.#tls;\n if (tls)\n this.serverName = tls.serverName || host || \"localhost\";\n this.#server = Bun.serve({\n tls,\n port,\n hostname: host,\n websocket: {\n open(ws) {\n ws.data.open(ws);\n },\n message(ws, message) {\n ws.data.message(ws, message);\n },\n close(ws, code, reason) {\n ws.data.close(ws, code, reason);\n },\n drain(ws) {\n ws.data.drain(ws);\n }\n },\n fetch(req, _server) {\n var pendingResponse, pendingError, rejectFunction, resolveFunction, reject = (err) => {\n if (pendingError)\n return;\n if (pendingError = err, rejectFunction)\n rejectFunction(err);\n }, reply = function(resp) {\n if (pendingResponse)\n return;\n if (pendingResponse = resp, resolveFunction)\n resolveFunction(resp);\n };\n const http_req = new RequestClass(req), http_res = new ResponseClass({ reply, req: http_req });\n if (http_req.once(\"error\", (err) => reject(err)), http_res.once(\"error\", (err) => reject(err)), req.headers.get(\"upgrade\")) {\n const socket = new FakeSocket;\n socket[kInternalSocketData] = [_server, http_res, req], server.emit(\"upgrade\", http_req, socket, kEmptyBuffer);\n } else\n server.emit(\"request\", http_req, http_res);\n if (pendingError)\n throw pendingError;\n if (pendingResponse)\n return pendingResponse;\n return new Promise((resolve, reject2) => {\n resolveFunction = resolve, rejectFunction = reject2;\n });\n }\n }), setTimeout(emitListeningNextTick, 1, this, onListen, null, this.#server.hostname, this.#server.port);\n } catch (err) {\n setTimeout(emitListeningNextTick, 1, this, onListen, err);\n }\n return this;\n }\n setTimeout(msecs, callback) {\n }\n}\nclass IncomingMessage extends Readable {\n method;\n complete;\n constructor(req, defaultIncomingOpts) {\n const method = req.method;\n super();\n const url = new URL(req.url);\n var { type = \"request\", [kInternalRequest]: nodeReq } = defaultIncomingOpts || {};\n this.#noBody = type === \"request\" \? method === \"GET\" || method === \"HEAD\" || method === \"TRACE\" || method === \"CONNECT\" || method === \"OPTIONS\" || (parseInt(req.headers.get(\"Content-Length\") || \"\") || 0) === 0 : !1, this.#req = req, this.method = method, this.#type = type, this.complete = !!this.#noBody, this.#bodyStream = void 0;\n const socket = new FakeSocket;\n socket.remoteAddress = url.hostname, socket.remotePort = url.port, this.#fakeSocket = socket, this.url = url.pathname + url.search, this.#nodeReq = this.req = nodeReq, assignHeaders(this, req);\n }\n headers;\n rawHeaders;\n _consuming = !1;\n _dumped = !1;\n #bodyStream;\n #fakeSocket;\n #noBody = !1;\n #aborted = !1;\n #req;\n url;\n #type;\n #nodeReq;\n _construct(callback) {\n if (this.#type === \"response\" || this.#noBody) {\n callback();\n return;\n }\n const contentLength = this.#req.headers.get(\"content-length\");\n if ((contentLength \? parseInt(contentLength, 10) : 0) === 0) {\n this.#noBody = !0, callback();\n return;\n }\n callback();\n }\n async#consumeStream(reader) {\n while (!0) {\n var { done, value } = await reader.readMany();\n if (this.#aborted)\n return;\n if (done) {\n this.push(null), this.destroy();\n break;\n }\n for (var v of value)\n this.push(v);\n }\n }\n _read(size) {\n if (this.#noBody)\n this.push(null), this.complete = !0;\n else if (this.#bodyStream == null) {\n const reader = this.#req.body\?.getReader();\n if (!reader) {\n this.push(null);\n return;\n }\n this.#bodyStream = reader, this.#consumeStream(reader);\n }\n }\n get aborted() {\n return this.#aborted;\n }\n #abort() {\n if (this.#aborted)\n return;\n this.#aborted = !0;\n var bodyStream = this.#bodyStream;\n if (!bodyStream)\n return;\n bodyStream.cancel(), this.complete = !0, this.#bodyStream = void 0, this.push(null);\n }\n get connection() {\n return this.#fakeSocket;\n }\n get statusCode() {\n return this.#req.status;\n }\n get statusMessage() {\n return STATUS_CODES[this.#req.status];\n }\n get httpVersion() {\n return \"1.1\";\n }\n get rawTrailers() {\n return [];\n }\n get httpVersionMajor() {\n return 1;\n }\n get httpVersionMinor() {\n return 1;\n }\n get trailers() {\n return kEmptyObject;\n }\n get socket() {\n return this.#fakeSocket \?\?= new FakeSocket;\n }\n set socket(val) {\n this.#fakeSocket = val;\n }\n setTimeout(msecs, callback) {\n throw new Error(\"not implemented\");\n }\n}\n\nclass OutgoingMessage extends Writable {\n constructor() {\n super(...arguments);\n }\n #headers;\n headersSent = !1;\n sendDate = !0;\n req;\n timeout;\n #finished = !1;\n [kEndCalled] = !1;\n #fakeSocket;\n #timeoutTimer;\n [kAbortController] = null;\n _implicitHeader() {\n }\n get headers() {\n if (!this.#headers)\n return kEmptyObject;\n return this.#headers.toJSON();\n }\n get shouldKeepAlive() {\n return !0;\n }\n get chunkedEncoding() {\n return !1;\n }\n set chunkedEncoding(value) {\n }\n set shouldKeepAlive(value) {\n }\n get useChunkedEncodingByDefault() {\n return !0;\n }\n set useChunkedEncodingByDefault(value) {\n }\n get socket() {\n return this.#fakeSocket \?\?= new FakeSocket;\n }\n set socket(val) {\n this.#fakeSocket = val;\n }\n get connection() {\n return this.socket;\n }\n get finished() {\n return this.#finished;\n }\n appendHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n headers.append(name, value);\n }\n flushHeaders() {\n }\n getHeader(name) {\n return getHeader(this.#headers, name);\n }\n getHeaders() {\n if (!this.#headers)\n return kEmptyObject;\n return this.#headers.toJSON();\n }\n getHeaderNames() {\n var headers = this.#headers;\n if (!headers)\n return [];\n return Array.from(headers.keys());\n }\n removeHeader(name) {\n if (!this.#headers)\n return;\n this.#headers.delete(name);\n }\n setHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n return headers.set(name, value), this;\n }\n hasHeader(name) {\n if (!this.#headers)\n return !1;\n return this.#headers.has(name);\n }\n addTrailers(headers) {\n throw new Error(\"not implemented\");\n }\n [kClearTimeout]() {\n if (this.#timeoutTimer)\n clearTimeout(this.#timeoutTimer), this.removeAllListeners(\"timeout\"), this.#timeoutTimer = void 0;\n }\n #onTimeout() {\n this.#timeoutTimer = void 0, this[kAbortController]\?.abort(), this.emit(\"timeout\");\n }\n setTimeout(msecs, callback) {\n if (this.destroyed)\n return this;\n if (this.timeout = msecs = validateMsecs(msecs, \"msecs\"), clearTimeout(this.#timeoutTimer), msecs === 0) {\n if (callback !== void 0)\n validateFunction(callback, \"callback\"), this.removeListener(\"timeout\", callback);\n this.#timeoutTimer = void 0;\n } else if (this.#timeoutTimer = setTimeout(this.#onTimeout.bind(this), msecs).unref(), callback !== void 0)\n validateFunction(callback, \"callback\"), this.once(\"timeout\", callback);\n return this;\n }\n}\nvar OriginalWriteHeadFn, OriginalImplicitHeadFn;\n\nclass ServerResponse extends Writable {\n constructor({ req, reply }) {\n super();\n if (this.req = req, this._reply = reply, this.sendDate = !0, this.statusCode = 200, this.headersSent = !1, this.statusMessage = void 0, this.#controller = void 0, this.#firstWrite = void 0, this._writableState.decodeStrings = !1, this.#deferred = void 0, req.method === \"HEAD\")\n this._hasBody = !1;\n }\n req;\n _reply;\n sendDate;\n statusCode;\n #headers;\n headersSent = !1;\n statusMessage;\n #controller;\n #firstWrite;\n _sent100 = !1;\n _defaultKeepAlive = !1;\n _removedConnection = !1;\n _removedContLen = !1;\n _hasBody = !0;\n #deferred = void 0;\n #finished = !1;\n _implicitHeader() {\n this.writeHead(this.statusCode);\n }\n _write(chunk, encoding, callback) {\n if (!this.#firstWrite && !this.headersSent) {\n this.#firstWrite = chunk, callback();\n return;\n }\n this.#ensureReadableStreamController((controller) => {\n controller.write(chunk), callback();\n });\n }\n _writev(chunks, callback) {\n if (chunks.length === 1 && !this.headersSent && !this.#firstWrite) {\n this.#firstWrite = chunks[0].chunk, callback();\n return;\n }\n this.#ensureReadableStreamController((controller) => {\n for (let chunk of chunks)\n controller.write(chunk.chunk);\n callback();\n });\n }\n #ensureReadableStreamController(run) {\n var thisController = this.#controller;\n if (thisController)\n return run(thisController);\n this.headersSent = !0;\n var firstWrite = this.#firstWrite;\n this.#firstWrite = void 0, this._reply(new Response(new ReadableStream({\n type: \"direct\",\n pull: (controller) => {\n if (this.#controller = controller, firstWrite)\n controller.write(firstWrite);\n if (firstWrite = void 0, run(controller), !this.#finished)\n return new Promise((resolve) => {\n this.#deferred = resolve;\n });\n }\n }), {\n headers: this.#headers,\n status: this.statusCode,\n statusText: this.statusMessage \?\? STATUS_CODES[this.statusCode]\n }));\n }\n #drainHeadersIfObservable() {\n if (this._implicitHeader === OriginalImplicitHeadFn && this.writeHead === OriginalWriteHeadFn)\n return;\n this._implicitHeader();\n }\n _final(callback) {\n if (!this.headersSent) {\n var data = this.#firstWrite || \"\";\n this.#firstWrite = void 0, this.#finished = !0, this.#drainHeadersIfObservable(), this._reply(new Response(data, {\n headers: this.#headers,\n status: this.statusCode,\n statusText: this.statusMessage \?\? STATUS_CODES[this.statusCode]\n })), callback && callback();\n return;\n }\n this.#finished = !0, this.#ensureReadableStreamController((controller) => {\n controller.end(), callback();\n var deferred = this.#deferred;\n if (deferred)\n this.#deferred = void 0, deferred();\n });\n }\n writeProcessing() {\n throw new Error(\"not implemented\");\n }\n addTrailers(headers) {\n throw new Error(\"not implemented\");\n }\n assignSocket(socket) {\n throw new Error(\"not implemented\");\n }\n detachSocket(socket) {\n throw new Error(\"not implemented\");\n }\n writeContinue(callback) {\n throw new Error(\"not implemented\");\n }\n setTimeout(msecs, callback) {\n throw new Error(\"not implemented\");\n }\n get shouldKeepAlive() {\n return !0;\n }\n get chunkedEncoding() {\n return !1;\n }\n set chunkedEncoding(value) {\n }\n set shouldKeepAlive(value) {\n }\n get useChunkedEncodingByDefault() {\n return !0;\n }\n set useChunkedEncodingByDefault(value) {\n }\n appendHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n headers.append(name, value);\n }\n flushHeaders() {\n }\n getHeader(name) {\n return getHeader(this.#headers, name);\n }\n getHeaders() {\n var headers = this.#headers;\n if (!headers)\n return kEmptyObject;\n return headers.toJSON();\n }\n getHeaderNames() {\n var headers = this.#headers;\n if (!headers)\n return [];\n return Array.from(headers.keys());\n }\n removeHeader(name) {\n if (!this.#headers)\n return;\n this.#headers.delete(name);\n }\n setHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n return headers.set(name, value), this;\n }\n hasHeader(name) {\n if (!this.#headers)\n return !1;\n return this.#headers.has(name);\n }\n writeHead(statusCode, statusMessage, headers) {\n return _writeHead(statusCode, statusMessage, headers, this), this;\n }\n}\nOriginalWriteHeadFn = ServerResponse.prototype.writeHead;\nOriginalImplicitHeadFn = ServerResponse.prototype._implicitHeader;\n\nclass ClientRequest extends OutgoingMessage {\n #timeout;\n #res = null;\n #upgradeOrConnect = !1;\n #parser = null;\n #maxHeadersCount = null;\n #reusedSocket = !1;\n #host;\n #protocol;\n #method;\n #port;\n #useDefaultPort;\n #joinDuplicateHeaders;\n #maxHeaderSize;\n #agent = globalAgent;\n #path;\n #socketPath;\n #bodyChunks = null;\n #fetchRequest;\n #signal = null;\n [kAbortController] = null;\n #timeoutTimer = void 0;\n #options;\n #finished;\n get path() {\n return this.#path;\n }\n get port() {\n return this.#port;\n }\n get method() {\n return this.#method;\n }\n get host() {\n return this.#host;\n }\n get protocol() {\n return this.#protocol;\n }\n _write(chunk, encoding, callback) {\n if (!this.#bodyChunks) {\n this.#bodyChunks = [chunk], callback();\n return;\n }\n this.#bodyChunks.push(chunk), callback();\n }\n _writev(chunks, callback) {\n if (!this.#bodyChunks) {\n this.#bodyChunks = chunks, callback();\n return;\n }\n this.#bodyChunks.push(...chunks), callback();\n }\n _final(callback) {\n if (this.#finished = !0, this[kAbortController] = new AbortController, this[kAbortController].signal.addEventListener(\"abort\", () => {\n this[kClearTimeout]();\n }), this.#signal\?.aborted)\n this[kAbortController].abort();\n var method = this.#method, body = this.#bodyChunks\?.length === 1 \? this.#bodyChunks[0] : Buffer.concat(this.#bodyChunks || []);\n let url, proxy;\n if (this.#path.startsWith(\"http://\") || this.#path.startsWith(\"https://\"))\n url = this.#path, proxy = `${this.#protocol}//${this.#host}${this.#useDefaultPort \? \"\" : \":\" + this.#port}`;\n else\n url = `${this.#protocol}//${this.#host}${this.#useDefaultPort \? \"\" : \":\" + this.#port}${this.#path}`;\n try {\n this.#fetchRequest = fetch(url, {\n method,\n headers: this.getHeaders(),\n body: body && method !== \"GET\" && method !== \"HEAD\" && method !== \"OPTIONS\" \? body : void 0,\n redirect: \"manual\",\n verbose: !1,\n signal: this[kAbortController].signal,\n proxy,\n timeout: !1\n }).then((response) => {\n var res = this.#res = new IncomingMessage(response, {\n type: \"response\",\n [kInternalRequest]: this\n });\n this.emit(\"response\", res);\n }).catch((err) => {\n this.emit(\"error\", err);\n }).finally(() => {\n this.#fetchRequest = null, this[kClearTimeout]();\n });\n } catch (err) {\n this.emit(\"error\", err);\n } finally {\n callback();\n }\n }\n get aborted() {\n return this.#signal\?.aborted || !!this[kAbortController]\?.signal.aborted;\n }\n abort() {\n if (this.aborted)\n return;\n this[kAbortController].abort();\n }\n constructor(input, options, cb) {\n super();\n if (typeof input === \"string\") {\n const urlStr = input;\n try {\n var urlObject = new URL(urlStr);\n } catch (e) {\n @throwTypeError(`Invalid URL: ${urlStr}`);\n }\n input = urlToHttpOptions(urlObject);\n } else if (input && typeof input === \"object\" && input instanceof URL)\n input = urlToHttpOptions(input);\n else\n cb = options, options = input, input = null;\n if (typeof options === \"function\")\n cb = options, options = input || kEmptyObject;\n else\n options = ObjectAssign(input || {}, options);\n var defaultAgent = options._defaultAgent || Agent.globalAgent;\n let protocol = options.protocol;\n if (!protocol)\n if (options.port === 443)\n protocol = \"https:\";\n else\n protocol = defaultAgent.protocol || \"http:\";\n switch (this.#protocol = protocol, this.#agent\?.protocol) {\n case void 0:\n break;\n case \"http:\":\n if (protocol === \"https:\") {\n defaultAgent = this.#agent = getDefaultHTTPSAgent();\n break;\n }\n case \"https:\":\n if (protocol === \"https\") {\n defaultAgent = this.#agent = Agent.globalAgent;\n break;\n }\n default:\n break;\n }\n if (options.path) {\n const path = String(options.path);\n if (RegExpPrototypeExec.call(INVALID_PATH_REGEX, path) !== null)\n throw new Error(\"Path contains unescaped characters\");\n }\n if (protocol !== \"http:\" && protocol !== \"https:\" && protocol) {\n const expectedProtocol = defaultAgent\?.protocol \?\? \"http:\";\n throw new Error(`Protocol mismatch. Expected: ${expectedProtocol}. Got: ${protocol}`);\n }\n const defaultPort = protocol === \"https:\" \? 443 : 80;\n this.#port = options.port || options.defaultPort || this.#agent\?.defaultPort || defaultPort, this.#useDefaultPort = this.#port === defaultPort;\n const host = this.#host = options.host = validateHost(options.hostname, \"hostname\") || validateHost(options.host, \"host\") || \"localhost\";\n this.#socketPath = options.socketPath;\n const signal = options.signal;\n if (signal)\n signal.addEventListener(\"abort\", () => {\n this[kAbortController]\?.abort();\n }), this.#signal = signal;\n let method = options.method;\n const methodIsString = typeof method === \"string\";\n if (method !== null && method !== void 0 && !methodIsString)\n throw new Error(\"ERR_INVALID_ARG_TYPE: options.method\");\n if (methodIsString && method) {\n if (!checkIsHttpToken(method))\n throw new Error(\"ERR_INVALID_HTTP_TOKEN: Method\");\n method = this.#method = StringPrototypeToUpperCase.call(method);\n } else\n method = this.#method = \"GET\";\n const _maxHeaderSize = options.maxHeaderSize;\n this.#maxHeaderSize = _maxHeaderSize;\n var _joinDuplicateHeaders = options.joinDuplicateHeaders;\n if (this.#joinDuplicateHeaders = _joinDuplicateHeaders, this.#path = options.path || \"/\", cb)\n this.once(\"response\", cb);\n this.#finished = !1, this.#res = null, this.#upgradeOrConnect = !1, this.#parser = null, this.#maxHeadersCount = null, this.#reusedSocket = !1, this.#host = host, this.#protocol = protocol;\n var timeout = options.timeout;\n if (timeout !== void 0 && timeout !== 0)\n this.setTimeout(timeout, void 0);\n if (!ArrayIsArray(headers)) {\n var headers = options.headers;\n if (headers)\n for (let key in headers)\n this.setHeader(key, headers[key]);\n var auth = options.auth;\n if (auth && !this.getHeader(\"Authorization\"))\n this.setHeader(\"Authorization\", \"Basic \" + Buffer.from(auth).toString(\"base64\"));\n }\n var { signal: _signal, ...optsWithoutSignal } = options;\n this.#options = optsWithoutSignal;\n }\n setSocketKeepAlive(enable = !0, initialDelay = 0) {\n }\n setNoDelay(noDelay = !0) {\n }\n [kClearTimeout]() {\n if (this.#timeoutTimer)\n clearTimeout(this.#timeoutTimer), this.#timeoutTimer = void 0, this.removeAllListeners(\"timeout\");\n }\n #onTimeout() {\n this.#timeoutTimer = void 0, this[kAbortController]\?.abort(), this.emit(\"timeout\");\n }\n setTimeout(msecs, callback) {\n if (this.destroyed)\n return this;\n if (this.timeout = msecs = validateMsecs(msecs, \"msecs\"), clearTimeout(this.#timeoutTimer), msecs === 0) {\n if (callback !== void 0)\n validateFunction(callback, \"callback\"), this.removeListener(\"timeout\", callback);\n this.#timeoutTimer = void 0;\n } else if (this.#timeoutTimer = setTimeout(this.#onTimeout.bind(this), msecs).unref(), callback !== void 0)\n validateFunction(callback, \"callback\"), this.once(\"timeout\", callback);\n return this;\n }\n}\nvar tokenRegExp = /^[\\^_`a-zA-Z\\-0-9!#$%&'*+.|~]+$/, METHODS = [\n \"ACL\",\n \"BIND\",\n \"CHECKOUT\",\n \"CONNECT\",\n \"COPY\",\n \"DELETE\",\n \"GET\",\n \"HEAD\",\n \"LINK\",\n \"LOCK\",\n \"M-SEARCH\",\n \"MERGE\",\n \"MKACTIVITY\",\n \"MKCALENDAR\",\n \"MKCOL\",\n \"MOVE\",\n \"NOTIFY\",\n \"OPTIONS\",\n \"PATCH\",\n \"POST\",\n \"PROPFIND\",\n \"PROPPATCH\",\n \"PURGE\",\n \"PUT\",\n \"REBIND\",\n \"REPORT\",\n \"SEARCH\",\n \"SOURCE\",\n \"SUBSCRIBE\",\n \"TRACE\",\n \"UNBIND\",\n \"UNLINK\",\n \"UNLOCK\",\n \"UNSUBSCRIBE\"\n], STATUS_CODES = {\n 100: \"Continue\",\n 101: \"Switching Protocols\",\n 102: \"Processing\",\n 103: \"Early Hints\",\n 200: \"OK\",\n 201: \"Created\",\n 202: \"Accepted\",\n 203: \"Non-Authoritative Information\",\n 204: \"No Content\",\n 205: \"Reset Content\",\n 206: \"Partial Content\",\n 207: \"Multi-Status\",\n 208: \"Already Reported\",\n 226: \"IM Used\",\n 300: \"Multiple Choices\",\n 301: \"Moved Permanently\",\n 302: \"Found\",\n 303: \"See Other\",\n 304: \"Not Modified\",\n 305: \"Use Proxy\",\n 307: \"Temporary Redirect\",\n 308: \"Permanent Redirect\",\n 400: \"Bad Request\",\n 401: \"Unauthorized\",\n 402: \"Payment Required\",\n 403: \"Forbidden\",\n 404: \"Not Found\",\n 405: \"Method Not Allowed\",\n 406: \"Not Acceptable\",\n 407: \"Proxy Authentication Required\",\n 408: \"Request Timeout\",\n 409: \"Conflict\",\n 410: \"Gone\",\n 411: \"Length Required\",\n 412: \"Precondition Failed\",\n 413: \"Payload Too Large\",\n 414: \"URI Too Long\",\n 415: \"Unsupported Media Type\",\n 416: \"Range Not Satisfiable\",\n 417: \"Expectation Failed\",\n 418: \"I'm a Teapot\",\n 421: \"Misdirected Request\",\n 422: \"Unprocessable Entity\",\n 423: \"Locked\",\n 424: \"Failed Dependency\",\n 425: \"Too Early\",\n 426: \"Upgrade Required\",\n 428: \"Precondition Required\",\n 429: \"Too Many Requests\",\n 431: \"Request Header Fields Too Large\",\n 451: \"Unavailable For Legal Reasons\",\n 500: \"Internal Server Error\",\n 501: \"Not Implemented\",\n 502: \"Bad Gateway\",\n 503: \"Service Unavailable\",\n 504: \"Gateway Timeout\",\n 505: \"HTTP Version Not Supported\",\n 506: \"Variant Also Negotiates\",\n 507: \"Insufficient Storage\",\n 508: \"Loop Detected\",\n 509: \"Bandwidth Limit Exceeded\",\n 510: \"Not Extended\",\n 511: \"Network Authentication Required\"\n}, globalAgent = new Agent;\n$ = {\n Agent,\n Server,\n METHODS,\n STATUS_CODES,\n createServer,\n ServerResponse,\n IncomingMessage,\n request,\n get,\n maxHeaderSize: 16384,\n validateHeaderName,\n validateHeaderValue,\n setMaxIdleHTTPParsers(max) {\n },\n globalAgent,\n ClientRequest,\n OutgoingMessage\n};\nreturn $})\n"_s;
+static constexpr ASCIILiteral NodeHttpCode = "(function (){\"use strict\";// src/js/out/tmp/node/http.ts\nvar checkInvalidHeaderChar = function(val) {\n return RegExpPrototypeExec.call(headerCharRegex, val) !== null;\n}, isIPv6 = function(input) {\n return new RegExp(\"^((\?:(\?:[0-9a-fA-F]{1,4}):){7}(\?:(\?:[0-9a-fA-F]{1,4})|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){6}(\?:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|:(\?:[0-9a-fA-F]{1,4})|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){5}(\?::((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,2}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){4}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,1}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,3}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){3}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,2}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,4}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){2}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,3}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,5}|:)|(\?:(\?:[0-9a-fA-F]{1,4}):){1}(\?:(:(\?:[0-9a-fA-F]{1,4})){0,4}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(:(\?:[0-9a-fA-F]{1,4})){1,6}|:)|(\?::((\?::(\?:[0-9a-fA-F]{1,4})){0,5}:((\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])[.]){3}(\?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(\?::(\?:[0-9a-fA-F]{1,4})){1,7}|:)))(%[0-9a-zA-Z-.:]{1,})\?$\").test(input);\n}, isValidTLSArray = function(obj) {\n if (typeof obj === \"string\" || isTypedArray(obj) || obj instanceof ArrayBuffer || obj instanceof Blob)\n return !0;\n if (Array.isArray(obj)) {\n for (var i = 0;i < obj.length; i++)\n if (typeof obj !== \"string\" && !isTypedArray(obj) && !(obj instanceof ArrayBuffer) && !(obj instanceof Blob))\n return !1;\n return !0;\n }\n}, validateMsecs = function(numberlike, field) {\n if (typeof numberlike !== \"number\" || numberlike < 0)\n throw new ERR_INVALID_ARG_TYPE(field, \"number\", numberlike);\n return numberlike;\n}, validateFunction = function(callable, field) {\n if (typeof callable !== \"function\")\n throw new ERR_INVALID_ARG_TYPE(field, \"Function\", callable);\n return callable;\n}, getHeader = function(headers, name) {\n if (!headers)\n return;\n const result = headers.get(name);\n return result == null \? void 0 : result;\n}, createServer = function(options, callback) {\n return new Server(options, callback);\n}, emitListeningNextTick = function(self, onListen, err, hostname, port) {\n if (typeof onListen === \"function\")\n try {\n onListen(err, hostname, port);\n } catch (err2) {\n self.emit(\"error\", err2);\n }\n if (self.listening = !err, err)\n self.emit(\"error\", err);\n else\n self.emit(\"listening\", hostname, port);\n}, assignHeaders = function(object, req) {\n var headers = req.headers.toJSON();\n const rawHeaders = @newArrayWithSize(req.headers.count * 2);\n var i = 0;\n for (let key in headers)\n rawHeaders[i++] = key, rawHeaders[i++] = headers[key];\n object.headers = headers, object.rawHeaders = rawHeaders;\n};\nvar getDefaultHTTPSAgent = function() {\n return _defaultHTTPSAgent \?\?= new Agent({ defaultPort: 443, protocol: \"https:\" });\n};\nvar urlToHttpOptions = function(url) {\n var { protocol, hostname, hash, search, pathname, href, port, username, password } = url;\n return {\n protocol,\n hostname: typeof hostname === \"string\" && StringPrototypeStartsWith.call(hostname, \"[\") \? StringPrototypeSlice.call(hostname, 1, -1) : hostname,\n hash,\n search,\n pathname,\n path: `${pathname || \"\"}${search || \"\"}`,\n href,\n port: port \? Number(port) : protocol === \"https:\" \? 443 : protocol === \"http:\" \? 80 : void 0,\n auth: username || password \? `${decodeURIComponent(username)}:${decodeURIComponent(password)}` : void 0\n };\n}, validateHost = function(host, name) {\n if (host !== null && host !== void 0 && typeof host !== \"string\")\n throw new Error(\"Invalid arg type in options\");\n return host;\n}, checkIsHttpToken = function(val) {\n return RegExpPrototypeExec.call(tokenRegExp, val) !== null;\n};\nvar _writeHead = function(statusCode, reason, obj, response) {\n if (statusCode |= 0, statusCode < 100 || statusCode > 999)\n throw new Error(\"status code must be between 100 and 999\");\n if (typeof reason === \"string\")\n response.statusMessage = reason;\n else {\n if (!response.statusMessage)\n response.statusMessage = STATUS_CODES[statusCode] || \"unknown\";\n obj = reason;\n }\n response.statusCode = statusCode;\n {\n let k;\n if (Array.isArray(obj)) {\n if (obj.length % 2 !== 0)\n throw new Error(\"raw headers must have an even number of elements\");\n for (let n = 0;n < obj.length; n += 2)\n if (k = obj[n + 0], k)\n response.setHeader(k, obj[n + 1]);\n } else if (obj) {\n const keys = Object.keys(obj);\n for (let i = 0;i < keys.length; i++)\n if (k = keys[i], k)\n response.setHeader(k, obj[k]);\n }\n }\n if (statusCode === 204 || statusCode === 304 || statusCode >= 100 && statusCode <= 199)\n response._hasBody = !1;\n}, request = function(url, options, cb) {\n return new ClientRequest(url, options, cb);\n}, get = function(url, options, cb) {\n const req = request(url, options, cb);\n return req.end(), req;\n}, $, EventEmitter = @getInternalField(@internalModuleRegistry, 16) || @createInternalModuleById(16), { isTypedArray } = @requireNativeModule(\"node:util/types\"), { Duplex, Readable, Writable } = @getInternalField(@internalModuleRegistry, 35) || @createInternalModuleById(35), headerCharRegex = /[^\\t\\x20-\\x7e\\x80-\\xff]/, validateHeaderName = (name, label) => {\n if (typeof name !== \"string\" || !name || !checkIsHttpToken(name))\n throw new Error(\"ERR_INVALID_HTTP_TOKEN\");\n}, validateHeaderValue = (name, value) => {\n if (value === void 0)\n throw new Error(\"ERR_HTTP_INVALID_HEADER_VALUE\");\n if (checkInvalidHeaderChar(value))\n throw new Error(\"ERR_INVALID_CHAR\");\n}, { URL } = globalThis, globalReportError = globalThis.reportError, setTimeout = globalThis.setTimeout, fetch = Bun.fetch;\nvar kEmptyObject = Object.freeze(Object.create(null)), kOutHeaders = Symbol.for(\"kOutHeaders\"), kEndCalled = Symbol.for(\"kEndCalled\"), kAbortController = Symbol.for(\"kAbortController\"), kClearTimeout = Symbol(\"kClearTimeout\"), kCorked = Symbol.for(\"kCorked\"), searchParamsSymbol = Symbol.for(\"query\"), StringPrototypeSlice = String.prototype.slice, StringPrototypeStartsWith = String.prototype.startsWith, StringPrototypeToUpperCase = String.prototype.toUpperCase, StringPrototypeIncludes = String.prototype.includes, StringPrototypeCharCodeAt = String.prototype.charCodeAt, StringPrototypeIndexOf = String.prototype.indexOf, ArrayIsArray = Array.isArray, RegExpPrototypeExec = RegExp.prototype.exec, ObjectAssign = Object.assign;\nvar INVALID_PATH_REGEX = /[^\\u0021-\\u00ff]/;\nvar _defaultHTTPSAgent, kInternalRequest = Symbol(\"kInternalRequest\"), kInternalSocketData = Symbol.for(\"::bunternal::\"), kEmptyBuffer = Buffer.alloc(0);\n\nclass ERR_INVALID_ARG_TYPE extends TypeError {\n constructor(name, expected, actual) {\n super(`The ${name} argument must be of type ${expected}. Received type ${typeof actual}`);\n this.code = \"ERR_INVALID_ARG_TYPE\";\n }\n}\nvar FakeSocket = class Socket extends Duplex {\n bytesRead = 0;\n bytesWritten = 0;\n connecting = !1;\n remoteAddress = null;\n remotePort;\n timeout = 0;\n isServer = !1;\n address() {\n return {\n address: this.localAddress,\n family: this.localFamily,\n port: this.localPort\n };\n }\n get bufferSize() {\n return this.writableLength;\n }\n connect(port, host, connectListener) {\n return this;\n }\n _destroy(err, callback) {\n }\n _final(callback) {\n }\n get localAddress() {\n return \"127.0.0.1\";\n }\n get localFamily() {\n return \"IPv4\";\n }\n get localPort() {\n return 80;\n }\n get pending() {\n return this.connecting;\n }\n _read(size) {\n }\n get readyState() {\n if (this.connecting)\n return \"opening\";\n if (this.readable)\n return this.writable \? \"open\" : \"readOnly\";\n else\n return this.writable \? \"writeOnly\" : \"closed\";\n }\n ref() {\n }\n get remoteFamily() {\n return \"IPv4\";\n }\n resetAndDestroy() {\n }\n setKeepAlive(enable = !1, initialDelay = 0) {\n }\n setNoDelay(noDelay = !0) {\n return this;\n }\n setTimeout(timeout, callback) {\n return this;\n }\n unref() {\n }\n _write(chunk, encoding, callback) {\n }\n};\n\nclass Agent extends EventEmitter {\n defaultPort = 80;\n protocol = \"http:\";\n options;\n requests;\n sockets;\n freeSockets;\n keepAliveMsecs;\n keepAlive;\n maxSockets;\n maxFreeSockets;\n scheduling;\n maxTotalSockets;\n totalSocketCount;\n #fakeSocket;\n static get globalAgent() {\n return globalAgent;\n }\n static get defaultMaxSockets() {\n return Infinity;\n }\n constructor(options = kEmptyObject) {\n super();\n if (this.options = options = { ...options, path: null }, options.noDelay === void 0)\n options.noDelay = !0;\n this.requests = kEmptyObject, this.sockets = kEmptyObject, this.freeSockets = kEmptyObject, this.keepAliveMsecs = options.keepAliveMsecs || 1000, this.keepAlive = options.keepAlive || !1, this.maxSockets = options.maxSockets || Agent.defaultMaxSockets, this.maxFreeSockets = options.maxFreeSockets || 256, this.scheduling = options.scheduling || \"lifo\", this.maxTotalSockets = options.maxTotalSockets, this.totalSocketCount = 0, this.defaultPort = options.defaultPort || 80, this.protocol = options.protocol || \"http:\";\n }\n createConnection() {\n return this.#fakeSocket \?\?= new FakeSocket;\n }\n getName(options = kEmptyObject) {\n let name = `http:${options.host || \"localhost\"}:`;\n if (options.port)\n name += options.port;\n if (name += \":\", options.localAddress)\n name += options.localAddress;\n if (options.family === 4 || options.family === 6)\n name += `:${options.family}`;\n if (options.socketPath)\n name += `:${options.socketPath}`;\n return name;\n }\n addRequest() {\n }\n createSocket(req, options, cb) {\n cb(null, this.#fakeSocket \?\?= new FakeSocket);\n }\n removeSocket() {\n }\n keepSocketAlive() {\n return !0;\n }\n reuseSocket() {\n }\n destroy() {\n }\n}\n\nclass Server extends EventEmitter {\n #server;\n #options;\n #tls;\n #is_tls = !1;\n listening = !1;\n serverName;\n constructor(options, callback) {\n super();\n if (typeof options === \"function\")\n callback = options, options = {};\n else if (options == null || typeof options === \"object\") {\n options = { ...options }, this.#tls = null;\n let key = options.key;\n if (key) {\n if (!isValidTLSArray(key))\n @throwTypeError(\"key argument must be an string, Buffer, TypedArray, BunFile or an array containing string, Buffer, TypedArray or BunFile\");\n this.#is_tls = !0;\n }\n let cert = options.cert;\n if (cert) {\n if (!isValidTLSArray(cert))\n @throwTypeError(\"cert argument must be an string, Buffer, TypedArray, BunFile or an array containing string, Buffer, TypedArray or BunFile\");\n this.#is_tls = !0;\n }\n let ca = options.ca;\n if (ca) {\n if (!isValidTLSArray(ca))\n @throwTypeError(\"ca argument must be an string, Buffer, TypedArray, BunFile or an array containing string, Buffer, TypedArray or BunFile\");\n this.#is_tls = !0;\n }\n let passphrase = options.passphrase;\n if (passphrase && typeof passphrase !== \"string\")\n @throwTypeError(\"passphrase argument must be an string\");\n let serverName = options.servername;\n if (serverName && typeof serverName !== \"string\")\n @throwTypeError(\"servername argument must be an string\");\n let secureOptions = options.secureOptions || 0;\n if (secureOptions && typeof secureOptions !== \"number\")\n @throwTypeError(\"secureOptions argument must be an number\");\n if (this.#is_tls)\n this.#tls = {\n serverName,\n key,\n cert,\n ca,\n passphrase,\n secureOptions\n };\n else\n this.#tls = null;\n } else\n throw new Error(\"bun-http-polyfill: invalid arguments\");\n if (this.#options = options, callback)\n this.on(\"request\", callback);\n }\n closeAllConnections() {\n const server = this.#server;\n if (!server)\n return;\n this.#server = void 0, server.stop(!0), this.emit(\"close\");\n }\n closeIdleConnections() {\n }\n close(optionalCallback) {\n const server = this.#server;\n if (!server) {\n if (typeof optionalCallback === \"function\")\n process.nextTick(optionalCallback, new Error(\"Server is not running\"));\n return;\n }\n if (this.#server = void 0, typeof optionalCallback === \"function\")\n this.once(\"close\", optionalCallback);\n server.stop(), this.emit(\"close\");\n }\n address() {\n if (!this.#server)\n return null;\n const address = this.#server.hostname;\n return {\n address,\n family: isIPv6(address) \? \"IPv6\" : \"IPv4\",\n port: this.#server.port\n };\n }\n listen(port, host, backlog, onListen) {\n const server = this;\n if (typeof host === \"function\")\n onListen = host, host = void 0;\n if (typeof port === \"function\")\n onListen = port;\n else if (typeof port === \"object\") {\n if (port\?.signal\?.addEventListener(\"abort\", () => {\n this.close();\n }), host = port\?.host, port = port\?.port, typeof port\?.callback === \"function\")\n onListen = port\?.callback;\n }\n if (typeof backlog === \"function\")\n onListen = backlog;\n const ResponseClass = this.#options.ServerResponse || ServerResponse, RequestClass = this.#options.IncomingMessage || IncomingMessage;\n try {\n const tls = this.#tls;\n if (tls)\n this.serverName = tls.serverName || host || \"localhost\";\n this.#server = Bun.serve({\n tls,\n port,\n hostname: host,\n websocket: {\n open(ws) {\n ws.data.open(ws);\n },\n message(ws, message) {\n ws.data.message(ws, message);\n },\n close(ws, code, reason) {\n ws.data.close(ws, code, reason);\n },\n drain(ws) {\n ws.data.drain(ws);\n }\n },\n fetch(req, _server) {\n var pendingResponse, pendingError, rejectFunction, resolveFunction, reject = (err) => {\n if (pendingError)\n return;\n if (pendingError = err, rejectFunction)\n rejectFunction(err);\n }, reply = function(resp) {\n if (pendingResponse)\n return;\n if (pendingResponse = resp, resolveFunction)\n resolveFunction(resp);\n };\n const http_req = new RequestClass(req), http_res = new ResponseClass({ reply, req: http_req });\n if (http_req.once(\"error\", (err) => reject(err)), http_res.once(\"error\", (err) => reject(err)), req.headers.get(\"upgrade\")) {\n const socket = new FakeSocket;\n socket[kInternalSocketData] = [_server, http_res, req], server.emit(\"upgrade\", http_req, socket, kEmptyBuffer);\n } else\n server.emit(\"request\", http_req, http_res);\n if (pendingError)\n throw pendingError;\n if (pendingResponse)\n return pendingResponse;\n return new Promise((resolve, reject2) => {\n resolveFunction = resolve, rejectFunction = reject2;\n });\n }\n }), setTimeout(emitListeningNextTick, 1, this, onListen, null, this.#server.hostname, this.#server.port);\n } catch (err) {\n setTimeout(emitListeningNextTick, 1, this, onListen, err);\n }\n return this;\n }\n setTimeout(msecs, callback) {\n }\n}\nclass IncomingMessage extends Readable {\n method;\n complete;\n constructor(req, defaultIncomingOpts) {\n const method = req.method;\n super();\n const url = new URL(req.url);\n var { type = \"request\", [kInternalRequest]: nodeReq } = defaultIncomingOpts || {};\n this.#noBody = type === \"request\" \? method === \"GET\" || method === \"HEAD\" || method === \"TRACE\" || method === \"CONNECT\" || method === \"OPTIONS\" || (parseInt(req.headers.get(\"Content-Length\") || \"\") || 0) === 0 : !1, this.#req = req, this.method = method, this.#type = type, this.complete = !!this.#noBody, this.#bodyStream = void 0;\n const socket = new FakeSocket;\n socket.remoteAddress = url.hostname, socket.remotePort = url.port, this.#fakeSocket = socket, this.url = url.pathname + url.search, this.#nodeReq = this.req = nodeReq, assignHeaders(this, req);\n }\n headers;\n rawHeaders;\n _consuming = !1;\n _dumped = !1;\n #bodyStream;\n #fakeSocket;\n #noBody = !1;\n #aborted = !1;\n #req;\n url;\n #type;\n #nodeReq;\n _construct(callback) {\n if (this.#type === \"response\" || this.#noBody) {\n callback();\n return;\n }\n const contentLength = this.#req.headers.get(\"content-length\");\n if ((contentLength \? parseInt(contentLength, 10) : 0) === 0) {\n this.#noBody = !0, callback();\n return;\n }\n callback();\n }\n async#consumeStream(reader) {\n while (!0) {\n var { done, value } = await reader.readMany();\n if (this.#aborted)\n return;\n if (done) {\n this.push(null), this.destroy();\n break;\n }\n for (var v of value)\n this.push(v);\n }\n }\n _read(size) {\n if (console.log(\"read\", size), this.#noBody)\n this.push(null), this.complete = !0;\n else if (this.#bodyStream == null) {\n const reader = this.#req.body\?.getReader();\n if (!reader) {\n this.push(null);\n return;\n }\n this.#bodyStream = reader, this.#consumeStream(reader);\n }\n }\n get aborted() {\n return this.#aborted;\n }\n #abort() {\n if (this.#aborted)\n return;\n this.#aborted = !0;\n var bodyStream = this.#bodyStream;\n if (!bodyStream)\n return;\n bodyStream.cancel(), this.complete = !0, this.#bodyStream = void 0, this.push(null);\n }\n get connection() {\n return this.#fakeSocket;\n }\n get statusCode() {\n return this.#req.status;\n }\n get statusMessage() {\n return STATUS_CODES[this.#req.status];\n }\n get httpVersion() {\n return \"1.1\";\n }\n get rawTrailers() {\n return [];\n }\n get httpVersionMajor() {\n return 1;\n }\n get httpVersionMinor() {\n return 1;\n }\n get trailers() {\n return kEmptyObject;\n }\n get socket() {\n return this.#fakeSocket \?\?= new FakeSocket;\n }\n set socket(val) {\n this.#fakeSocket = val;\n }\n setTimeout(msecs, callback) {\n throw new Error(\"not implemented\");\n }\n}\n\nclass OutgoingMessage extends Writable {\n constructor() {\n super(...arguments);\n }\n #headers;\n headersSent = !1;\n sendDate = !0;\n req;\n timeout;\n #finished = !1;\n [kEndCalled] = !1;\n #fakeSocket;\n #timeoutTimer;\n [kAbortController] = null;\n _implicitHeader() {\n }\n get headers() {\n if (!this.#headers)\n return kEmptyObject;\n return this.#headers.toJSON();\n }\n get shouldKeepAlive() {\n return !0;\n }\n get chunkedEncoding() {\n return !1;\n }\n set chunkedEncoding(value) {\n }\n set shouldKeepAlive(value) {\n }\n get useChunkedEncodingByDefault() {\n return !0;\n }\n set useChunkedEncodingByDefault(value) {\n }\n get socket() {\n return this.#fakeSocket \?\?= new FakeSocket;\n }\n set socket(val) {\n this.#fakeSocket = val;\n }\n get connection() {\n return this.socket;\n }\n get finished() {\n return this.#finished;\n }\n appendHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n headers.append(name, value);\n }\n flushHeaders() {\n }\n getHeader(name) {\n return getHeader(this.#headers, name);\n }\n getHeaders() {\n if (!this.#headers)\n return kEmptyObject;\n return this.#headers.toJSON();\n }\n getHeaderNames() {\n var headers = this.#headers;\n if (!headers)\n return [];\n return Array.from(headers.keys());\n }\n removeHeader(name) {\n if (!this.#headers)\n return;\n this.#headers.delete(name);\n }\n setHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n return headers.set(name, value), this;\n }\n hasHeader(name) {\n if (!this.#headers)\n return !1;\n return this.#headers.has(name);\n }\n addTrailers(headers) {\n throw new Error(\"not implemented\");\n }\n [kClearTimeout]() {\n if (this.#timeoutTimer)\n clearTimeout(this.#timeoutTimer), this.removeAllListeners(\"timeout\"), this.#timeoutTimer = void 0;\n }\n #onTimeout() {\n this.#timeoutTimer = void 0, this[kAbortController]\?.abort(), this.emit(\"timeout\");\n }\n setTimeout(msecs, callback) {\n if (this.destroyed)\n return this;\n if (this.timeout = msecs = validateMsecs(msecs, \"msecs\"), clearTimeout(this.#timeoutTimer), msecs === 0) {\n if (callback !== void 0)\n validateFunction(callback, \"callback\"), this.removeListener(\"timeout\", callback);\n this.#timeoutTimer = void 0;\n } else if (this.#timeoutTimer = setTimeout(this.#onTimeout.bind(this), msecs).unref(), callback !== void 0)\n validateFunction(callback, \"callback\"), this.once(\"timeout\", callback);\n return this;\n }\n}\nvar OriginalWriteHeadFn, OriginalImplicitHeadFn;\n\nclass ServerResponse extends Writable {\n constructor({ req, reply }) {\n super();\n if (this.req = req, this._reply = reply, this.sendDate = !0, this.statusCode = 200, this.headersSent = !1, this.statusMessage = void 0, this.#controller = void 0, this.#firstWrite = void 0, this._writableState.decodeStrings = !1, this.#deferred = void 0, req.method === \"HEAD\")\n this._hasBody = !1;\n }\n req;\n _reply;\n sendDate;\n statusCode;\n #headers;\n headersSent = !1;\n statusMessage;\n #controller;\n #firstWrite;\n _sent100 = !1;\n _defaultKeepAlive = !1;\n _removedConnection = !1;\n _removedContLen = !1;\n _hasBody = !0;\n #deferred = void 0;\n #finished = !1;\n _implicitHeader() {\n this.writeHead(this.statusCode);\n }\n _write(chunk, encoding, callback) {\n if (!this.#firstWrite && !this.headersSent) {\n this.#firstWrite = chunk, callback();\n return;\n }\n this.#ensureReadableStreamController((controller) => {\n controller.write(chunk), callback();\n });\n }\n _writev(chunks, callback) {\n if (chunks.length === 1 && !this.headersSent && !this.#firstWrite) {\n this.#firstWrite = chunks[0].chunk, callback();\n return;\n }\n this.#ensureReadableStreamController((controller) => {\n for (let chunk of chunks)\n controller.write(chunk.chunk);\n callback();\n });\n }\n #ensureReadableStreamController(run) {\n var thisController = this.#controller;\n if (thisController)\n return run(thisController);\n this.headersSent = !0;\n var firstWrite = this.#firstWrite;\n this.#firstWrite = void 0, this._reply(new Response(new ReadableStream({\n type: \"direct\",\n pull: (controller) => {\n if (this.#controller = controller, firstWrite)\n controller.write(firstWrite);\n if (firstWrite = void 0, run(controller), !this.#finished)\n return new Promise((resolve) => {\n this.#deferred = resolve;\n });\n }\n }), {\n headers: this.#headers,\n status: this.statusCode,\n statusText: this.statusMessage \?\? STATUS_CODES[this.statusCode]\n }));\n }\n #drainHeadersIfObservable() {\n if (this._implicitHeader === OriginalImplicitHeadFn && this.writeHead === OriginalWriteHeadFn)\n return;\n this._implicitHeader();\n }\n _final(callback) {\n if (!this.headersSent) {\n var data = this.#firstWrite || \"\";\n this.#firstWrite = void 0, this.#finished = !0, this.#drainHeadersIfObservable(), this._reply(new Response(data, {\n headers: this.#headers,\n status: this.statusCode,\n statusText: this.statusMessage \?\? STATUS_CODES[this.statusCode]\n })), callback && callback();\n return;\n }\n this.#finished = !0, this.#ensureReadableStreamController((controller) => {\n controller.end(), callback();\n var deferred = this.#deferred;\n if (deferred)\n this.#deferred = void 0, deferred();\n });\n }\n writeProcessing() {\n throw new Error(\"not implemented\");\n }\n addTrailers(headers) {\n throw new Error(\"not implemented\");\n }\n assignSocket(socket) {\n throw new Error(\"not implemented\");\n }\n detachSocket(socket) {\n throw new Error(\"not implemented\");\n }\n writeContinue(callback) {\n throw new Error(\"not implemented\");\n }\n setTimeout(msecs, callback) {\n throw new Error(\"not implemented\");\n }\n get shouldKeepAlive() {\n return !0;\n }\n get chunkedEncoding() {\n return !1;\n }\n set chunkedEncoding(value) {\n }\n set shouldKeepAlive(value) {\n }\n get useChunkedEncodingByDefault() {\n return !0;\n }\n set useChunkedEncodingByDefault(value) {\n }\n appendHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n headers.append(name, value);\n }\n flushHeaders() {\n }\n getHeader(name) {\n return getHeader(this.#headers, name);\n }\n getHeaders() {\n var headers = this.#headers;\n if (!headers)\n return kEmptyObject;\n return headers.toJSON();\n }\n getHeaderNames() {\n var headers = this.#headers;\n if (!headers)\n return [];\n return Array.from(headers.keys());\n }\n removeHeader(name) {\n if (!this.#headers)\n return;\n this.#headers.delete(name);\n }\n setHeader(name, value) {\n var headers = this.#headers \?\?= new Headers;\n return headers.set(name, value), this;\n }\n hasHeader(name) {\n if (!this.#headers)\n return !1;\n return this.#headers.has(name);\n }\n writeHead(statusCode, statusMessage, headers) {\n return _writeHead(statusCode, statusMessage, headers, this), this;\n }\n}\nOriginalWriteHeadFn = ServerResponse.prototype.writeHead;\nOriginalImplicitHeadFn = ServerResponse.prototype._implicitHeader;\n\nclass ClientRequest extends OutgoingMessage {\n #timeout;\n #res = null;\n #upgradeOrConnect = !1;\n #parser = null;\n #maxHeadersCount = null;\n #reusedSocket = !1;\n #host;\n #protocol;\n #method;\n #port;\n #useDefaultPort;\n #joinDuplicateHeaders;\n #maxHeaderSize;\n #agent = globalAgent;\n #path;\n #socketPath;\n #bodyChunks = null;\n #fetchRequest;\n #signal = null;\n [kAbortController] = null;\n #timeoutTimer = void 0;\n #options;\n #finished;\n get path() {\n return this.#path;\n }\n get port() {\n return this.#port;\n }\n get method() {\n return this.#method;\n }\n get host() {\n return this.#host;\n }\n get protocol() {\n return this.#protocol;\n }\n _write(chunk, encoding, callback) {\n if (!this.#bodyChunks) {\n this.#bodyChunks = [chunk], callback();\n return;\n }\n this.#bodyChunks.push(chunk), callback();\n }\n _writev(chunks, callback) {\n if (!this.#bodyChunks) {\n this.#bodyChunks = chunks, callback();\n return;\n }\n this.#bodyChunks.push(...chunks), callback();\n }\n _final(callback) {\n if (this.#finished = !0, this[kAbortController] = new AbortController, this[kAbortController].signal.addEventListener(\"abort\", () => {\n this[kClearTimeout]();\n }), this.#signal\?.aborted)\n this[kAbortController].abort();\n var method = this.#method, body = this.#bodyChunks\?.length === 1 \? this.#bodyChunks[0] : Buffer.concat(this.#bodyChunks || []);\n let url, proxy;\n if (this.#path.startsWith(\"http://\") || this.#path.startsWith(\"https://\"))\n url = this.#path, proxy = `${this.#protocol}//${this.#host}${this.#useDefaultPort \? \"\" : \":\" + this.#port}`;\n else\n url = `${this.#protocol}//${this.#host}${this.#useDefaultPort \? \"\" : \":\" + this.#port}${this.#path}`;\n try {\n this.#fetchRequest = fetch(url, {\n method,\n headers: this.getHeaders(),\n body: body && method !== \"GET\" && method !== \"HEAD\" && method !== \"OPTIONS\" \? body : void 0,\n redirect: \"manual\",\n verbose: !1,\n signal: this[kAbortController].signal,\n proxy,\n timeout: !1\n }).then((response) => {\n var res = this.#res = new IncomingMessage(response, {\n type: \"response\",\n [kInternalRequest]: this\n });\n console.log(\"response\", response), this.emit(\"response\", res);\n }).catch((err) => {\n this.emit(\"error\", err);\n }).finally(() => {\n this.#fetchRequest = null, this[kClearTimeout]();\n });\n } catch (err) {\n this.emit(\"error\", err);\n } finally {\n callback();\n }\n }\n get aborted() {\n return this.#signal\?.aborted || !!this[kAbortController]\?.signal.aborted;\n }\n abort() {\n if (this.aborted)\n return;\n this[kAbortController].abort();\n }\n constructor(input, options, cb) {\n super();\n if (typeof input === \"string\") {\n const urlStr = input;\n try {\n var urlObject = new URL(urlStr);\n } catch (e) {\n @throwTypeError(`Invalid URL: ${urlStr}`);\n }\n input = urlToHttpOptions(urlObject);\n } else if (input && typeof input === \"object\" && input instanceof URL)\n input = urlToHttpOptions(input);\n else\n cb = options, options = input, input = null;\n if (typeof options === \"function\")\n cb = options, options = input || kEmptyObject;\n else\n options = ObjectAssign(input || {}, options);\n var defaultAgent = options._defaultAgent || Agent.globalAgent;\n let protocol = options.protocol;\n if (!protocol)\n if (options.port === 443)\n protocol = \"https:\";\n else\n protocol = defaultAgent.protocol || \"http:\";\n switch (this.#protocol = protocol, this.#agent\?.protocol) {\n case void 0:\n break;\n case \"http:\":\n if (protocol === \"https:\") {\n defaultAgent = this.#agent = getDefaultHTTPSAgent();\n break;\n }\n case \"https:\":\n if (protocol === \"https\") {\n defaultAgent = this.#agent = Agent.globalAgent;\n break;\n }\n default:\n break;\n }\n if (options.path) {\n const path = String(options.path);\n if (RegExpPrototypeExec.call(INVALID_PATH_REGEX, path) !== null)\n throw new Error(\"Path contains unescaped characters\");\n }\n if (protocol !== \"http:\" && protocol !== \"https:\" && protocol) {\n const expectedProtocol = defaultAgent\?.protocol \?\? \"http:\";\n throw new Error(`Protocol mismatch. Expected: ${expectedProtocol}. Got: ${protocol}`);\n }\n const defaultPort = protocol === \"https:\" \? 443 : 80;\n this.#port = options.port || options.defaultPort || this.#agent\?.defaultPort || defaultPort, this.#useDefaultPort = this.#port === defaultPort;\n const host = this.#host = options.host = validateHost(options.hostname, \"hostname\") || validateHost(options.host, \"host\") || \"localhost\";\n this.#socketPath = options.socketPath;\n const signal = options.signal;\n if (signal)\n signal.addEventListener(\"abort\", () => {\n this[kAbortController]\?.abort();\n }), this.#signal = signal;\n let method = options.method;\n const methodIsString = typeof method === \"string\";\n if (method !== null && method !== void 0 && !methodIsString)\n throw new Error(\"ERR_INVALID_ARG_TYPE: options.method\");\n if (methodIsString && method) {\n if (!checkIsHttpToken(method))\n throw new Error(\"ERR_INVALID_HTTP_TOKEN: Method\");\n method = this.#method = StringPrototypeToUpperCase.call(method);\n } else\n method = this.#method = \"GET\";\n const _maxHeaderSize = options.maxHeaderSize;\n this.#maxHeaderSize = _maxHeaderSize;\n var _joinDuplicateHeaders = options.joinDuplicateHeaders;\n if (this.#joinDuplicateHeaders = _joinDuplicateHeaders, this.#path = options.path || \"/\", cb)\n this.once(\"response\", cb);\n this.#finished = !1, this.#res = null, this.#upgradeOrConnect = !1, this.#parser = null, this.#maxHeadersCount = null, this.#reusedSocket = !1, this.#host = host, this.#protocol = protocol;\n var timeout = options.timeout;\n if (timeout !== void 0 && timeout !== 0)\n this.setTimeout(timeout, void 0);\n if (!ArrayIsArray(headers)) {\n var headers = options.headers;\n if (headers)\n for (let key in headers)\n this.setHeader(key, headers[key]);\n var auth = options.auth;\n if (auth && !this.getHeader(\"Authorization\"))\n this.setHeader(\"Authorization\", \"Basic \" + Buffer.from(auth).toString(\"base64\"));\n }\n var { signal: _signal, ...optsWithoutSignal } = options;\n this.#options = optsWithoutSignal;\n }\n setSocketKeepAlive(enable = !0, initialDelay = 0) {\n }\n setNoDelay(noDelay = !0) {\n }\n [kClearTimeout]() {\n if (this.#timeoutTimer)\n clearTimeout(this.#timeoutTimer), this.#timeoutTimer = void 0, this.removeAllListeners(\"timeout\");\n }\n #onTimeout() {\n this.#timeoutTimer = void 0, this[kAbortController]\?.abort(), this.emit(\"timeout\");\n }\n setTimeout(msecs, callback) {\n if (this.destroyed)\n return this;\n if (this.timeout = msecs = validateMsecs(msecs, \"msecs\"), clearTimeout(this.#timeoutTimer), msecs === 0) {\n if (callback !== void 0)\n validateFunction(callback, \"callback\"), this.removeListener(\"timeout\", callback);\n this.#timeoutTimer = void 0;\n } else if (this.#timeoutTimer = setTimeout(this.#onTimeout.bind(this), msecs).unref(), callback !== void 0)\n validateFunction(callback, \"callback\"), this.once(\"timeout\", callback);\n return this;\n }\n}\nvar tokenRegExp = /^[\\^_`a-zA-Z\\-0-9!#$%&'*+.|~]+$/, METHODS = [\n \"ACL\",\n \"BIND\",\n \"CHECKOUT\",\n \"CONNECT\",\n \"COPY\",\n \"DELETE\",\n \"GET\",\n \"HEAD\",\n \"LINK\",\n \"LOCK\",\n \"M-SEARCH\",\n \"MERGE\",\n \"MKACTIVITY\",\n \"MKCALENDAR\",\n \"MKCOL\",\n \"MOVE\",\n \"NOTIFY\",\n \"OPTIONS\",\n \"PATCH\",\n \"POST\",\n \"PROPFIND\",\n \"PROPPATCH\",\n \"PURGE\",\n \"PUT\",\n \"REBIND\",\n \"REPORT\",\n \"SEARCH\",\n \"SOURCE\",\n \"SUBSCRIBE\",\n \"TRACE\",\n \"UNBIND\",\n \"UNLINK\",\n \"UNLOCK\",\n \"UNSUBSCRIBE\"\n], STATUS_CODES = {\n 100: \"Continue\",\n 101: \"Switching Protocols\",\n 102: \"Processing\",\n 103: \"Early Hints\",\n 200: \"OK\",\n 201: \"Created\",\n 202: \"Accepted\",\n 203: \"Non-Authoritative Information\",\n 204: \"No Content\",\n 205: \"Reset Content\",\n 206: \"Partial Content\",\n 207: \"Multi-Status\",\n 208: \"Already Reported\",\n 226: \"IM Used\",\n 300: \"Multiple Choices\",\n 301: \"Moved Permanently\",\n 302: \"Found\",\n 303: \"See Other\",\n 304: \"Not Modified\",\n 305: \"Use Proxy\",\n 307: \"Temporary Redirect\",\n 308: \"Permanent Redirect\",\n 400: \"Bad Request\",\n 401: \"Unauthorized\",\n 402: \"Payment Required\",\n 403: \"Forbidden\",\n 404: \"Not Found\",\n 405: \"Method Not Allowed\",\n 406: \"Not Acceptable\",\n 407: \"Proxy Authentication Required\",\n 408: \"Request Timeout\",\n 409: \"Conflict\",\n 410: \"Gone\",\n 411: \"Length Required\",\n 412: \"Precondition Failed\",\n 413: \"Payload Too Large\",\n 414: \"URI Too Long\",\n 415: \"Unsupported Media Type\",\n 416: \"Range Not Satisfiable\",\n 417: \"Expectation Failed\",\n 418: \"I'm a Teapot\",\n 421: \"Misdirected Request\",\n 422: \"Unprocessable Entity\",\n 423: \"Locked\",\n 424: \"Failed Dependency\",\n 425: \"Too Early\",\n 426: \"Upgrade Required\",\n 428: \"Precondition Required\",\n 429: \"Too Many Requests\",\n 431: \"Request Header Fields Too Large\",\n 451: \"Unavailable For Legal Reasons\",\n 500: \"Internal Server Error\",\n 501: \"Not Implemented\",\n 502: \"Bad Gateway\",\n 503: \"Service Unavailable\",\n 504: \"Gateway Timeout\",\n 505: \"HTTP Version Not Supported\",\n 506: \"Variant Also Negotiates\",\n 507: \"Insufficient Storage\",\n 508: \"Loop Detected\",\n 509: \"Bandwidth Limit Exceeded\",\n 510: \"Not Extended\",\n 511: \"Network Authentication Required\"\n}, globalAgent = new Agent;\n$ = {\n Agent,\n Server,\n METHODS,\n STATUS_CODES,\n createServer,\n ServerResponse,\n IncomingMessage,\n request,\n get,\n maxHeaderSize: 16384,\n validateHeaderName,\n validateHeaderValue,\n setMaxIdleHTTPParsers(max) {\n },\n globalAgent,\n ClientRequest,\n OutgoingMessage\n};\nreturn $})\n"_s;
//
//
@@ -669,7 +669,7 @@ static constexpr ASCIILiteral NodeWorkerThreadsCode = "(function (){\"use strict
//
//
-static constexpr ASCIILiteral NodeZlibCode = "(function (){\"use strict\";// src/js/out/tmp/node/zlib.ts\nvar assert = @getInternalField(@internalModuleRegistry, 4) || @createInternalModuleById(4), BufferModule = @requireNativeModule(\"node:buffer\"), StreamModule = @getInternalField(@internalModuleRegistry, 35) || @createInternalModuleById(35), Util = @getInternalField(@internalModuleRegistry, 44) || @createInternalModuleById(44), __getOwnPropNames = Object.getOwnPropertyNames, __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n}, require_zstream = __commonJS({\n \"node_modules/pako/lib/zlib/zstream.js\"(exports, module2) {\n function ZStream() {\n this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = \"\", this.state = null, this.data_type = 2, this.adler = 0;\n }\n module2.exports = ZStream;\n }\n}), require_common = __commonJS({\n \"node_modules/pako/lib/utils/common.js\"(exports) {\n var TYPED_OK = typeof Uint8Array !== \"undefined\" && typeof Uint16Array !== \"undefined\" && typeof Int32Array !== \"undefined\";\n function _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n }\n exports.assign = function(obj) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source)\n continue;\n if (typeof source !== \"object\")\n @throwTypeError(source + \"must be non-object\");\n for (var p in source)\n if (_has(source, p))\n obj[p] = source[p];\n }\n return obj;\n }, exports.shrinkBuf = function(buf, size) {\n if (buf.length === size)\n return buf;\n if (buf.subarray)\n return buf.subarray(0, size);\n return buf.length = size, buf;\n };\n var fnTyped = {\n arraySet: function(dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n for (var i = 0;i < len; i++)\n dest[dest_offs + i] = src[src_offs + i];\n },\n flattenChunks: function(chunks) {\n var i, l, len, pos, chunk, result;\n len = 0;\n for (i = 0, l = chunks.length;i < l; i++)\n len += chunks[i].length;\n result = new Uint8Array(len), pos = 0;\n for (i = 0, l = chunks.length;i < l; i++)\n chunk = chunks[i], result.set(chunk, pos), pos += chunk.length;\n return result;\n }\n }, fnUntyped = {\n arraySet: function(dest, src, src_offs, len, dest_offs) {\n for (var i = 0;i < len; i++)\n dest[dest_offs + i] = src[src_offs + i];\n },\n flattenChunks: function(chunks) {\n return [].concat.apply([], chunks);\n }\n };\n exports.setTyped = function(on) {\n if (on)\n exports.Buf8 = Uint8Array, exports.Buf16 = Uint16Array, exports.Buf32 = Int32Array, exports.assign(exports, fnTyped);\n else\n exports.Buf8 = Array, exports.Buf16 = Array, exports.Buf32 = Array, exports.assign(exports, fnUntyped);\n }, exports.setTyped(TYPED_OK);\n }\n}), require_trees = __commonJS({\n \"node_modules/pako/lib/zlib/trees.js\"(exports) {\n var utils = require_common(), Z_FIXED = 4, Z_BINARY = 0, Z_TEXT = 1, Z_UNKNOWN = 2;\n function zero(buf) {\n var len = buf.length;\n while (--len >= 0)\n buf[len] = 0;\n }\n var STORED_BLOCK = 0, STATIC_TREES = 1, DYN_TREES = 2, MIN_MATCH = 3, MAX_MATCH = 258, LENGTH_CODES = 29, LITERALS = 256, L_CODES = LITERALS + 1 + LENGTH_CODES, D_CODES = 30, BL_CODES = 19, HEAP_SIZE = 2 * L_CODES + 1, MAX_BITS = 15, Buf_size = 16, MAX_BL_BITS = 7, END_BLOCK = 256, REP_3_6 = 16, REPZ_3_10 = 17, REPZ_11_138 = 18, extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], extra_dbits = [\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 2,\n 2,\n 3,\n 3,\n 4,\n 4,\n 5,\n 5,\n 6,\n 6,\n 7,\n 7,\n 8,\n 8,\n 9,\n 9,\n 10,\n 10,\n 11,\n 11,\n 12,\n 12,\n 13,\n 13\n ], extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], DIST_CODE_LEN = 512, static_ltree = new Array((L_CODES + 2) * 2);\n zero(static_ltree);\n var static_dtree = new Array(D_CODES * 2);\n zero(static_dtree);\n var _dist_code = new Array(DIST_CODE_LEN);\n zero(_dist_code);\n var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\n zero(_length_code);\n var base_length = new Array(LENGTH_CODES);\n zero(base_length);\n var base_dist = new Array(D_CODES);\n zero(base_dist);\n function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n this.static_tree = static_tree, this.extra_bits = extra_bits, this.extra_base = extra_base, this.elems = elems, this.max_length = max_length, this.has_stree = static_tree && static_tree.length;\n }\n var static_l_desc, static_d_desc, static_bl_desc;\n function TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree, this.max_code = 0, this.stat_desc = stat_desc;\n }\n function d_code(dist) {\n return dist < 256 \? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n }\n function put_short(s, w) {\n s.pending_buf[s.pending++] = w & 255, s.pending_buf[s.pending++] = w >>> 8 & 255;\n }\n function send_bits(s, value, length) {\n if (s.bi_valid > Buf_size - length)\n s.bi_buf |= value << s.bi_valid & 65535, put_short(s, s.bi_buf), s.bi_buf = value >> Buf_size - s.bi_valid, s.bi_valid += length - Buf_size;\n else\n s.bi_buf |= value << s.bi_valid & 65535, s.bi_valid += length;\n }\n function send_code(s, c, tree) {\n send_bits(s, tree[c * 2], tree[c * 2 + 1]);\n }\n function bi_reverse(code, len) {\n var res = 0;\n do\n res |= code & 1, code >>>= 1, res <<= 1;\n while (--len > 0);\n return res >>> 1;\n }\n function bi_flush(s) {\n if (s.bi_valid === 16)\n put_short(s, s.bi_buf), s.bi_buf = 0, s.bi_valid = 0;\n else if (s.bi_valid >= 8)\n s.pending_buf[s.pending++] = s.bi_buf & 255, s.bi_buf >>= 8, s.bi_valid -= 8;\n }\n function gen_bitlen(s, desc) {\n var { dyn_tree: tree, max_code } = desc, stree = desc.stat_desc.static_tree, has_stree = desc.stat_desc.has_stree, extra = desc.stat_desc.extra_bits, base = desc.stat_desc.extra_base, max_length = desc.stat_desc.max_length, h, n, m, bits, xbits, f, overflow = 0;\n for (bits = 0;bits <= MAX_BITS; bits++)\n s.bl_count[bits] = 0;\n tree[s.heap[s.heap_max] * 2 + 1] = 0;\n for (h = s.heap_max + 1;h < HEAP_SIZE; h++) {\n if (n = s.heap[h], bits = tree[tree[n * 2 + 1] * 2 + 1] + 1, bits > max_length)\n bits = max_length, overflow++;\n if (tree[n * 2 + 1] = bits, n > max_code)\n continue;\n if (s.bl_count[bits]++, xbits = 0, n >= base)\n xbits = extra[n - base];\n if (f = tree[n * 2], s.opt_len += f * (bits + xbits), has_stree)\n s.static_len += f * (stree[n * 2 + 1] + xbits);\n }\n if (overflow === 0)\n return;\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0)\n bits--;\n s.bl_count[bits]--, s.bl_count[bits + 1] += 2, s.bl_count[max_length]--, overflow -= 2;\n } while (overflow > 0);\n for (bits = max_length;bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n if (m = s.heap[--h], m > max_code)\n continue;\n if (tree[m * 2 + 1] !== bits)\n s.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2], tree[m * 2 + 1] = bits;\n n--;\n }\n }\n }\n function gen_codes(tree, max_code, bl_count) {\n var next_code = new Array(MAX_BITS + 1), code = 0, bits, n;\n for (bits = 1;bits <= MAX_BITS; bits++)\n next_code[bits] = code = code + bl_count[bits - 1] << 1;\n for (n = 0;n <= max_code; n++) {\n var len = tree[n * 2 + 1];\n if (len === 0)\n continue;\n tree[n * 2] = bi_reverse(next_code[len]++, len);\n }\n }\n function tr_static_init() {\n var n, bits, length, code, dist, bl_count = new Array(MAX_BITS + 1);\n length = 0;\n for (code = 0;code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0;n < 1 << extra_lbits[code]; n++)\n _length_code[length++] = code;\n }\n _length_code[length - 1] = code, dist = 0;\n for (code = 0;code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0;n < 1 << extra_dbits[code]; n++)\n _dist_code[dist++] = code;\n }\n dist >>= 7;\n for (;code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0;n < 1 << extra_dbits[code] - 7; n++)\n _dist_code[256 + dist++] = code;\n }\n for (bits = 0;bits <= MAX_BITS; bits++)\n bl_count[bits] = 0;\n n = 0;\n while (n <= 143)\n static_ltree[n * 2 + 1] = 8, n++, bl_count[8]++;\n while (n <= 255)\n static_ltree[n * 2 + 1] = 9, n++, bl_count[9]++;\n while (n <= 279)\n static_ltree[n * 2 + 1] = 7, n++, bl_count[7]++;\n while (n <= 287)\n static_ltree[n * 2 + 1] = 8, n++, bl_count[8]++;\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n for (n = 0;n < D_CODES; n++)\n static_dtree[n * 2 + 1] = 5, static_dtree[n * 2] = bi_reverse(n, 5);\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS), static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS), static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n }\n function init_block(s) {\n var n;\n for (n = 0;n < L_CODES; n++)\n s.dyn_ltree[n * 2] = 0;\n for (n = 0;n < D_CODES; n++)\n s.dyn_dtree[n * 2] = 0;\n for (n = 0;n < BL_CODES; n++)\n s.bl_tree[n * 2] = 0;\n s.dyn_ltree[END_BLOCK * 2] = 1, s.opt_len = s.static_len = 0, s.last_lit = s.matches = 0;\n }\n function bi_windup(s) {\n if (s.bi_valid > 8)\n put_short(s, s.bi_buf);\n else if (s.bi_valid > 0)\n s.pending_buf[s.pending++] = s.bi_buf;\n s.bi_buf = 0, s.bi_valid = 0;\n }\n function copy_block(s, buf, len, header) {\n if (bi_windup(s), header)\n put_short(s, len), put_short(s, ~len);\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending), s.pending += len;\n }\n function smaller(tree, n, m, depth) {\n var _n2 = n * 2, _m2 = m * 2;\n return tree[_n2] < tree[_m2] || tree[_n2] === tree[_m2] && depth[n] <= depth[m];\n }\n function pqdownheap(s, tree, k) {\n var v = s.heap[k], j = k << 1;\n while (j <= s.heap_len) {\n if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth))\n j++;\n if (smaller(tree, v, s.heap[j], s.depth))\n break;\n s.heap[k] = s.heap[j], k = j, j <<= 1;\n }\n s.heap[k] = v;\n }\n function compress_block(s, ltree, dtree) {\n var dist, lc, lx = 0, code, extra;\n if (s.last_lit !== 0)\n do\n if (dist = s.pending_buf[s.d_buf + lx * 2] << 8 | s.pending_buf[s.d_buf + lx * 2 + 1], lc = s.pending_buf[s.l_buf + lx], lx++, dist === 0)\n send_code(s, lc, ltree);\n else {\n if (code = _length_code[lc], send_code(s, code + LITERALS + 1, ltree), extra = extra_lbits[code], extra !== 0)\n lc -= base_length[code], send_bits(s, lc, extra);\n if (dist--, code = d_code(dist), send_code(s, code, dtree), extra = extra_dbits[code], extra !== 0)\n dist -= base_dist[code], send_bits(s, dist, extra);\n }\n while (lx < s.last_lit);\n send_code(s, END_BLOCK, ltree);\n }\n function build_tree(s, desc) {\n var tree = desc.dyn_tree, stree = desc.stat_desc.static_tree, has_stree = desc.stat_desc.has_stree, elems = desc.stat_desc.elems, n, m, max_code = -1, node;\n s.heap_len = 0, s.heap_max = HEAP_SIZE;\n for (n = 0;n < elems; n++)\n if (tree[n * 2] !== 0)\n s.heap[++s.heap_len] = max_code = n, s.depth[n] = 0;\n else\n tree[n * 2 + 1] = 0;\n while (s.heap_len < 2)\n if (node = s.heap[++s.heap_len] = max_code < 2 \? ++max_code : 0, tree[node * 2] = 1, s.depth[node] = 0, s.opt_len--, has_stree)\n s.static_len -= stree[node * 2 + 1];\n desc.max_code = max_code;\n for (n = s.heap_len >> 1;n >= 1; n--)\n pqdownheap(s, tree, n);\n node = elems;\n do\n n = s.heap[1], s.heap[1] = s.heap[s.heap_len--], pqdownheap(s, tree, 1), m = s.heap[1], s.heap[--s.heap_max] = n, s.heap[--s.heap_max] = m, tree[node * 2] = tree[n * 2] + tree[m * 2], s.depth[node] = (s.depth[n] >= s.depth[m] \? s.depth[n] : s.depth[m]) + 1, tree[n * 2 + 1] = tree[m * 2 + 1] = node, s.heap[1] = node++, pqdownheap(s, tree, 1);\n while (s.heap_len >= 2);\n s.heap[--s.heap_max] = s.heap[1], gen_bitlen(s, desc), gen_codes(tree, max_code, s.bl_count);\n }\n function scan_tree(s, tree, max_code) {\n var n, prevlen = -1, curlen, nextlen = tree[1], count = 0, max_count = 7, min_count = 4;\n if (nextlen === 0)\n max_count = 138, min_count = 3;\n tree[(max_code + 1) * 2 + 1] = 65535;\n for (n = 0;n <= max_code; n++) {\n if (curlen = nextlen, nextlen = tree[(n + 1) * 2 + 1], ++count < max_count && curlen === nextlen)\n continue;\n else if (count < min_count)\n s.bl_tree[curlen * 2] += count;\n else if (curlen !== 0) {\n if (curlen !== prevlen)\n s.bl_tree[curlen * 2]++;\n s.bl_tree[REP_3_6 * 2]++;\n } else if (count <= 10)\n s.bl_tree[REPZ_3_10 * 2]++;\n else\n s.bl_tree[REPZ_11_138 * 2]++;\n if (count = 0, prevlen = curlen, nextlen === 0)\n max_count = 138, min_count = 3;\n else if (curlen === nextlen)\n max_count = 6, min_count = 3;\n else\n max_count = 7, min_count = 4;\n }\n }\n function send_tree(s, tree, max_code) {\n var n, prevlen = -1, curlen, nextlen = tree[1], count = 0, max_count = 7, min_count = 4;\n if (nextlen === 0)\n max_count = 138, min_count = 3;\n for (n = 0;n <= max_code; n++) {\n if (curlen = nextlen, nextlen = tree[(n + 1) * 2 + 1], ++count < max_count && curlen === nextlen)\n continue;\n else if (count < min_count)\n do\n send_code(s, curlen, s.bl_tree);\n while (--count !== 0);\n else if (curlen !== 0) {\n if (curlen !== prevlen)\n send_code(s, curlen, s.bl_tree), count--;\n send_code(s, REP_3_6, s.bl_tree), send_bits(s, count - 3, 2);\n } else if (count <= 10)\n send_code(s, REPZ_3_10, s.bl_tree), send_bits(s, count - 3, 3);\n else\n send_code(s, REPZ_11_138, s.bl_tree), send_bits(s, count - 11, 7);\n if (count = 0, prevlen = curlen, nextlen === 0)\n max_count = 138, min_count = 3;\n else if (curlen === nextlen)\n max_count = 6, min_count = 3;\n else\n max_count = 7, min_count = 4;\n }\n }\n function build_bl_tree(s) {\n var max_blindex;\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code), scan_tree(s, s.dyn_dtree, s.d_desc.max_code), build_tree(s, s.bl_desc);\n for (max_blindex = BL_CODES - 1;max_blindex >= 3; max_blindex--)\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1] !== 0)\n break;\n return s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4, max_blindex;\n }\n function send_all_trees(s, lcodes, dcodes, blcodes) {\n var rank;\n send_bits(s, lcodes - 257, 5), send_bits(s, dcodes - 1, 5), send_bits(s, blcodes - 4, 4);\n for (rank = 0;rank < blcodes; rank++)\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1], 3);\n send_tree(s, s.dyn_ltree, lcodes - 1), send_tree(s, s.dyn_dtree, dcodes - 1);\n }\n function detect_data_type(s) {\n var black_mask = 4093624447, n;\n for (n = 0;n <= 31; n++, black_mask >>>= 1)\n if (black_mask & 1 && s.dyn_ltree[n * 2] !== 0)\n return Z_BINARY;\n if (s.dyn_ltree[18] !== 0 || s.dyn_ltree[20] !== 0 || s.dyn_ltree[26] !== 0)\n return Z_TEXT;\n for (n = 32;n < LITERALS; n++)\n if (s.dyn_ltree[n * 2] !== 0)\n return Z_TEXT;\n return Z_BINARY;\n }\n var static_init_done = !1;\n function _tr_init(s) {\n if (!static_init_done)\n tr_static_init(), static_init_done = !0;\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc), s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc), s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc), s.bi_buf = 0, s.bi_valid = 0, init_block(s);\n }\n function _tr_stored_block(s, buf, stored_len, last) {\n send_bits(s, (STORED_BLOCK << 1) + (last \? 1 : 0), 3), copy_block(s, buf, stored_len, !0);\n }\n function _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3), send_code(s, END_BLOCK, static_ltree), bi_flush(s);\n }\n function _tr_flush_block(s, buf, stored_len, last) {\n var opt_lenb, static_lenb, max_blindex = 0;\n if (s.level > 0) {\n if (s.strm.data_type === Z_UNKNOWN)\n s.strm.data_type = detect_data_type(s);\n if (build_tree(s, s.l_desc), build_tree(s, s.d_desc), max_blindex = build_bl_tree(s), opt_lenb = s.opt_len + 3 + 7 >>> 3, static_lenb = s.static_len + 3 + 7 >>> 3, static_lenb <= opt_lenb)\n opt_lenb = static_lenb;\n } else\n opt_lenb = static_lenb = stored_len + 5;\n if (stored_len + 4 <= opt_lenb && buf !== -1)\n _tr_stored_block(s, buf, stored_len, last);\n else if (s.strategy === Z_FIXED || static_lenb === opt_lenb)\n send_bits(s, (STATIC_TREES << 1) + (last \? 1 : 0), 3), compress_block(s, static_ltree, static_dtree);\n else\n send_bits(s, (DYN_TREES << 1) + (last \? 1 : 0), 3), send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1), compress_block(s, s.dyn_ltree, s.dyn_dtree);\n if (init_block(s), last)\n bi_windup(s);\n }\n function _tr_tally(s, dist, lc) {\n if (s.pending_buf[s.d_buf + s.last_lit * 2] = dist >>> 8 & 255, s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 255, s.pending_buf[s.l_buf + s.last_lit] = lc & 255, s.last_lit++, dist === 0)\n s.dyn_ltree[lc * 2]++;\n else\n s.matches++, dist--, s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]++, s.dyn_dtree[d_code(dist) * 2]++;\n return s.last_lit === s.lit_bufsize - 1;\n }\n exports._tr_init = _tr_init, exports._tr_stored_block = _tr_stored_block, exports._tr_flush_block = _tr_flush_block, exports._tr_tally = _tr_tally, exports._tr_align = _tr_align;\n }\n}), require_adler32 = __commonJS({\n \"node_modules/pako/lib/zlib/adler32.js\"(exports, module2) {\n function adler32(adler, buf, len, pos) {\n var s1 = adler & 65535 | 0, s2 = adler >>> 16 & 65535 | 0, n = 0;\n while (len !== 0) {\n n = len > 2000 \? 2000 : len, len -= n;\n do\n s1 = s1 + buf[pos++] | 0, s2 = s2 + s1 | 0;\n while (--n);\n s1 %= 65521, s2 %= 65521;\n }\n return s1 | s2 << 16 | 0;\n }\n module2.exports = adler32;\n }\n}), require_crc32 = __commonJS({\n \"node_modules/pako/lib/zlib/crc32.js\"(exports, module2) {\n function makeTable() {\n var c, table = [];\n for (var n = 0;n < 256; n++) {\n c = n;\n for (var k = 0;k < 8; k++)\n c = c & 1 \? 3988292384 ^ c >>> 1 : c >>> 1;\n table[n] = c;\n }\n return table;\n }\n var crcTable = makeTable();\n function crc32(crc, buf, len, pos) {\n var t = crcTable, end = pos + len;\n crc ^= -1;\n for (var i = pos;i < end; i++)\n crc = crc >>> 8 ^ t[(crc ^ buf[i]) & 255];\n return crc ^ -1;\n }\n module2.exports = crc32;\n }\n}), require_messages = __commonJS({\n \"node_modules/pako/lib/zlib/messages.js\"(exports, module2) {\n module2.exports = {\n 2: \"need dictionary\",\n 1: \"stream end\",\n 0: \"\",\n \"-1\": \"file error\",\n \"-2\": \"stream error\",\n \"-3\": \"data error\",\n \"-4\": \"insufficient memory\",\n \"-5\": \"buffer error\",\n \"-6\": \"incompatible version\"\n };\n }\n}), require_deflate = __commonJS({\n \"node_modules/pako/lib/zlib/deflate.js\"(exports) {\n var utils = require_common(), trees = require_trees(), adler32 = require_adler32(), crc32 = require_crc32(), msg = require_messages(), Z_NO_FLUSH = 0, Z_PARTIAL_FLUSH = 1, Z_FULL_FLUSH = 3, Z_FINISH = 4, Z_BLOCK = 5, Z_OK = 0, Z_STREAM_END = 1, Z_STREAM_ERROR = -2, Z_DATA_ERROR = -3, Z_BUF_ERROR = -5, Z_DEFAULT_COMPRESSION = -1, Z_FILTERED = 1, Z_HUFFMAN_ONLY = 2, Z_RLE = 3, Z_FIXED = 4, Z_DEFAULT_STRATEGY = 0, Z_UNKNOWN = 2, Z_DEFLATED = 8, MAX_MEM_LEVEL = 9, MAX_WBITS = 15, DEF_MEM_LEVEL = 8, LENGTH_CODES = 29, LITERALS = 256, L_CODES = LITERALS + 1 + LENGTH_CODES, D_CODES = 30, BL_CODES = 19, HEAP_SIZE = 2 * L_CODES + 1, MAX_BITS = 15, MIN_MATCH = 3, MAX_MATCH = 258, MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1, PRESET_DICT = 32, INIT_STATE = 42, EXTRA_STATE = 69, NAME_STATE = 73, COMMENT_STATE = 91, HCRC_STATE = 103, BUSY_STATE = 113, FINISH_STATE = 666, BS_NEED_MORE = 1, BS_BLOCK_DONE = 2, BS_FINISH_STARTED = 3, BS_FINISH_DONE = 4, OS_CODE = 3;\n function err(strm, errorCode) {\n return strm.msg = msg[errorCode], errorCode;\n }\n function rank(f) {\n return (f << 1) - (f > 4 \? 9 : 0);\n }\n function zero(buf) {\n var len = buf.length;\n while (--len >= 0)\n buf[len] = 0;\n }\n function flush_pending(strm) {\n var s = strm.state, len = s.pending;\n if (len > strm.avail_out)\n len = strm.avail_out;\n if (len === 0)\n return;\n if (utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out), strm.next_out += len, s.pending_out += len, strm.total_out += len, strm.avail_out -= len, s.pending -= len, s.pending === 0)\n s.pending_out = 0;\n }\n function flush_block_only(s, last) {\n trees._tr_flush_block(s, s.block_start >= 0 \? s.block_start : -1, s.strstart - s.block_start, last), s.block_start = s.strstart, flush_pending(s.strm);\n }\n function put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n }\n function putShortMSB(s, b) {\n s.pending_buf[s.pending++] = b >>> 8 & 255, s.pending_buf[s.pending++] = b & 255;\n }\n function read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n if (len > size)\n len = size;\n if (len === 0)\n return 0;\n if (strm.avail_in -= len, utils.arraySet(buf, strm.input, strm.next_in, len, start), strm.state.wrap === 1)\n strm.adler = adler32(strm.adler, buf, len, start);\n else if (strm.state.wrap === 2)\n strm.adler = crc32(strm.adler, buf, len, start);\n return strm.next_in += len, strm.total_in += len, len;\n }\n function longest_match(s, cur_match) {\n var { max_chain_length: chain_length, strstart: scan } = s, match, len, best_len = s.prev_length, nice_match = s.nice_match, limit = s.strstart > s.w_size - MIN_LOOKAHEAD \? s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0, _win = s.window, wmask = s.w_mask, prev = s.prev, strend = s.strstart + MAX_MATCH, scan_end1 = _win[scan + best_len - 1], scan_end = _win[scan + best_len];\n if (s.prev_length >= s.good_match)\n chain_length >>= 2;\n if (nice_match > s.lookahead)\n nice_match = s.lookahead;\n do {\n if (match = cur_match, _win[match + best_len] !== scan_end || _win[match + best_len - 1] !== scan_end1 || _win[match] !== _win[scan] || _win[++match] !== _win[scan + 1])\n continue;\n scan += 2, match++;\n do\n ;\n while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && scan < strend);\n if (len = MAX_MATCH - (strend - scan), scan = strend - MAX_MATCH, len > best_len) {\n if (s.match_start = cur_match, best_len = len, len >= nice_match)\n break;\n scan_end1 = _win[scan + best_len - 1], scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n if (best_len <= s.lookahead)\n return best_len;\n return s.lookahead;\n }\n function fill_window(s) {\n var _w_size = s.w_size, p, n, m, more, str;\n do {\n if (more = s.window_size - s.lookahead - s.strstart, s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0), s.match_start -= _w_size, s.strstart -= _w_size, s.block_start -= _w_size, n = s.hash_size, p = n;\n do\n m = s.head[--p], s.head[p] = m >= _w_size \? m - _w_size : 0;\n while (--n);\n n = _w_size, p = n;\n do\n m = s.prev[--p], s.prev[p] = m >= _w_size \? m - _w_size : 0;\n while (--n);\n more += _w_size;\n }\n if (s.strm.avail_in === 0)\n break;\n if (n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more), s.lookahead += n, s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert, s.ins_h = s.window[str], s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + 1]) & s.hash_mask;\n while (s.insert)\n if (s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask, s.prev[str & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = str, str++, s.insert--, s.lookahead + s.insert < MIN_MATCH)\n break;\n }\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n }\n function deflate_stored(s, flush) {\n var max_block_size = 65535;\n if (max_block_size > s.pending_buf_size - 5)\n max_block_size = s.pending_buf_size - 5;\n for (;; ) {\n if (s.lookahead <= 1) {\n if (fill_window(s), s.lookahead === 0 && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n s.strstart += s.lookahead, s.lookahead = 0;\n var max_start = s.block_start + max_block_size;\n if (s.strstart === 0 || s.strstart >= max_start) {\n if (s.lookahead = s.strstart - max_start, s.strstart = max_start, flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n if (s.strstart - s.block_start >= s.w_size - MIN_LOOKAHEAD) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = 0, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.strstart > s.block_start) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_NEED_MORE;\n }\n function deflate_fast(s, flush) {\n var hash_head, bflush;\n for (;; ) {\n if (s.lookahead < MIN_LOOKAHEAD) {\n if (fill_window(s), s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n if (hash_head = 0, s.lookahead >= MIN_MATCH)\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n if (hash_head !== 0 && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD)\n s.match_length = longest_match(s, hash_head);\n if (s.match_length >= MIN_MATCH)\n if (bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH), s.lookahead -= s.match_length, s.match_length <= s.max_lazy_match && s.lookahead >= MIN_MATCH) {\n s.match_length--;\n do\n s.strstart++, s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n while (--s.match_length !== 0);\n s.strstart++;\n } else\n s.strstart += s.match_length, s.match_length = 0, s.ins_h = s.window[s.strstart], s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + 1]) & s.hash_mask;\n else\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++;\n if (bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = s.strstart < MIN_MATCH - 1 \? s.strstart : MIN_MATCH - 1, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function deflate_slow(s, flush) {\n var hash_head, bflush, max_insert;\n for (;; ) {\n if (s.lookahead < MIN_LOOKAHEAD) {\n if (fill_window(s), s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n if (hash_head = 0, s.lookahead >= MIN_MATCH)\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n if (s.prev_length = s.match_length, s.prev_match = s.match_start, s.match_length = MIN_MATCH - 1, hash_head !== 0 && s.prev_length < s.max_lazy_match && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) {\n if (s.match_length = longest_match(s, hash_head), s.match_length <= 5 && (s.strategy === Z_FILTERED || s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096))\n s.match_length = MIN_MATCH - 1;\n }\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH, bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH), s.lookahead -= s.prev_length - 1, s.prev_length -= 2;\n do\n if (++s.strstart <= max_insert)\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n while (--s.prev_length !== 0);\n if (s.match_available = 0, s.match_length = MIN_MATCH - 1, s.strstart++, bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n } else if (s.match_available) {\n if (bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]), bflush)\n flush_block_only(s, !1);\n if (s.strstart++, s.lookahead--, s.strm.avail_out === 0)\n return BS_NEED_MORE;\n } else\n s.match_available = 1, s.strstart++, s.lookahead--;\n }\n if (s.match_available)\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]), s.match_available = 0;\n if (s.insert = s.strstart < MIN_MATCH - 1 \? s.strstart : MIN_MATCH - 1, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function deflate_rle(s, flush) {\n var bflush, prev, scan, strend, _win = s.window;\n for (;; ) {\n if (s.lookahead <= MAX_MATCH) {\n if (fill_window(s), s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n if (s.match_length = 0, s.lookahead >= MIN_MATCH && s.strstart > 0) {\n if (scan = s.strstart - 1, prev = _win[scan], prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do\n ;\n while (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && scan < strend);\n if (s.match_length = MAX_MATCH - (strend - scan), s.match_length > s.lookahead)\n s.match_length = s.lookahead;\n }\n }\n if (s.match_length >= MIN_MATCH)\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH), s.lookahead -= s.match_length, s.strstart += s.match_length, s.match_length = 0;\n else\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++;\n if (bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = 0, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function deflate_huff(s, flush) {\n var bflush;\n for (;; ) {\n if (s.lookahead === 0) {\n if (fill_window(s), s.lookahead === 0) {\n if (flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n break;\n }\n }\n if (s.match_length = 0, bflush = trees._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++, bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = 0, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length, this.max_lazy = max_lazy, this.nice_length = nice_length, this.max_chain = max_chain, this.func = func;\n }\n var configuration_table = [\n new Config(0, 0, 0, 0, deflate_stored),\n new Config(4, 4, 8, 4, deflate_fast),\n new Config(4, 5, 16, 8, deflate_fast),\n new Config(4, 6, 32, 32, deflate_fast),\n new Config(4, 4, 16, 16, deflate_slow),\n new Config(8, 16, 32, 32, deflate_slow),\n new Config(8, 16, 128, 128, deflate_slow),\n new Config(8, 32, 128, 256, deflate_slow),\n new Config(32, 128, 258, 1024, deflate_slow),\n new Config(32, 258, 258, 4096, deflate_slow)\n ];\n function lm_init(s) {\n s.window_size = 2 * s.w_size, zero(s.head), s.max_lazy_match = configuration_table[s.level].max_lazy, s.good_match = configuration_table[s.level].good_length, s.nice_match = configuration_table[s.level].nice_length, s.max_chain_length = configuration_table[s.level].max_chain, s.strstart = 0, s.block_start = 0, s.lookahead = 0, s.insert = 0, s.match_length = s.prev_length = MIN_MATCH - 1, s.match_available = 0, s.ins_h = 0;\n }\n function DeflateState() {\n this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = Z_DEFLATED, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2), this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2), this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2), zero(this.dyn_ltree), zero(this.dyn_dtree), zero(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new utils.Buf16(MAX_BITS + 1), this.heap = new utils.Buf16(2 * L_CODES + 1), zero(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new utils.Buf16(2 * L_CODES + 1), zero(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;\n }\n function deflateResetKeep(strm) {\n var s;\n if (!strm || !strm.state)\n return err(strm, Z_STREAM_ERROR);\n if (strm.total_in = strm.total_out = 0, strm.data_type = Z_UNKNOWN, s = strm.state, s.pending = 0, s.pending_out = 0, s.wrap < 0)\n s.wrap = -s.wrap;\n return s.status = s.wrap \? INIT_STATE : BUSY_STATE, strm.adler = s.wrap === 2 \? 0 : 1, s.last_flush = Z_NO_FLUSH, trees._tr_init(s), Z_OK;\n }\n function deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK)\n lm_init(strm.state);\n return ret;\n }\n function deflateSetHeader(strm, head) {\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (strm.state.wrap !== 2)\n return Z_STREAM_ERROR;\n return strm.state.gzhead = head, Z_OK;\n }\n function deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm)\n return Z_STREAM_ERROR;\n var wrap = 1;\n if (level === Z_DEFAULT_COMPRESSION)\n level = 6;\n if (windowBits < 0)\n wrap = 0, windowBits = -windowBits;\n else if (windowBits > 15)\n wrap = 2, windowBits -= 16;\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED)\n return err(strm, Z_STREAM_ERROR);\n if (windowBits === 8)\n windowBits = 9;\n var s = new DeflateState;\n return strm.state = s, s.strm = strm, s.wrap = wrap, s.gzhead = null, s.w_bits = windowBits, s.w_size = 1 << s.w_bits, s.w_mask = s.w_size - 1, s.hash_bits = memLevel + 7, s.hash_size = 1 << s.hash_bits, s.hash_mask = s.hash_size - 1, s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH), s.window = new utils.Buf8(s.w_size * 2), s.head = new utils.Buf16(s.hash_size), s.prev = new utils.Buf16(s.w_size), s.lit_bufsize = 1 << memLevel + 6, s.pending_buf_size = s.lit_bufsize * 4, s.pending_buf = new utils.Buf8(s.pending_buf_size), s.d_buf = 1 * s.lit_bufsize, s.l_buf = 3 * s.lit_bufsize, s.level = level, s.strategy = strategy, s.method = method, deflateReset(strm);\n }\n function deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n }\n function deflate(strm, flush) {\n var old_flush, s, beg, val;\n if (!strm || !strm.state || flush > Z_BLOCK || flush < 0)\n return strm \? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n if (s = strm.state, !strm.output || !strm.input && strm.avail_in !== 0 || s.status === FINISH_STATE && flush !== Z_FINISH)\n return err(strm, strm.avail_out === 0 \? Z_BUF_ERROR : Z_STREAM_ERROR);\n if (s.strm = strm, old_flush = s.last_flush, s.last_flush = flush, s.status === INIT_STATE)\n if (s.wrap === 2)\n if (strm.adler = 0, put_byte(s, 31), put_byte(s, 139), put_byte(s, 8), !s.gzhead)\n put_byte(s, 0), put_byte(s, 0), put_byte(s, 0), put_byte(s, 0), put_byte(s, 0), put_byte(s, s.level === 9 \? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 \? 4 : 0), put_byte(s, OS_CODE), s.status = BUSY_STATE;\n else {\n if (put_byte(s, (s.gzhead.text \? 1 : 0) + (s.gzhead.hcrc \? 2 : 0) + (!s.gzhead.extra \? 0 : 4) + (!s.gzhead.name \? 0 : 8) + (!s.gzhead.comment \? 0 : 16)), put_byte(s, s.gzhead.time & 255), put_byte(s, s.gzhead.time >> 8 & 255), put_byte(s, s.gzhead.time >> 16 & 255), put_byte(s, s.gzhead.time >> 24 & 255), put_byte(s, s.level === 9 \? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 \? 4 : 0), put_byte(s, s.gzhead.os & 255), s.gzhead.extra && s.gzhead.extra.length)\n put_byte(s, s.gzhead.extra.length & 255), put_byte(s, s.gzhead.extra.length >> 8 & 255);\n if (s.gzhead.hcrc)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n s.gzindex = 0, s.status = EXTRA_STATE;\n }\n else {\n var header = Z_DEFLATED + (s.w_bits - 8 << 4) << 8, level_flags = -1;\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2)\n level_flags = 0;\n else if (s.level < 6)\n level_flags = 1;\n else if (s.level === 6)\n level_flags = 2;\n else\n level_flags = 3;\n if (header |= level_flags << 6, s.strstart !== 0)\n header |= PRESET_DICT;\n if (header += 31 - header % 31, s.status = BUSY_STATE, putShortMSB(s, header), s.strstart !== 0)\n putShortMSB(s, strm.adler >>> 16), putShortMSB(s, strm.adler & 65535);\n strm.adler = 1;\n }\n if (s.status === EXTRA_STATE)\n if (s.gzhead.extra) {\n beg = s.pending;\n while (s.gzindex < (s.gzhead.extra.length & 65535)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (flush_pending(strm), beg = s.pending, s.pending === s.pending_buf_size)\n break;\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 255), s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (s.gzindex === s.gzhead.extra.length)\n s.gzindex = 0, s.status = NAME_STATE;\n } else\n s.status = NAME_STATE;\n if (s.status === NAME_STATE)\n if (s.gzhead.name) {\n beg = s.pending;\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (flush_pending(strm), beg = s.pending, s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n if (s.gzindex < s.gzhead.name.length)\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 255;\n else\n val = 0;\n put_byte(s, val);\n } while (val !== 0);\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (val === 0)\n s.gzindex = 0, s.status = COMMENT_STATE;\n } else\n s.status = COMMENT_STATE;\n if (s.status === COMMENT_STATE)\n if (s.gzhead.comment) {\n beg = s.pending;\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (flush_pending(strm), beg = s.pending, s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n if (s.gzindex < s.gzhead.comment.length)\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 255;\n else\n val = 0;\n put_byte(s, val);\n } while (val !== 0);\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (val === 0)\n s.status = HCRC_STATE;\n } else\n s.status = HCRC_STATE;\n if (s.status === HCRC_STATE)\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size)\n flush_pending(strm);\n if (s.pending + 2 <= s.pending_buf_size)\n put_byte(s, strm.adler & 255), put_byte(s, strm.adler >> 8 & 255), strm.adler = 0, s.status = BUSY_STATE;\n } else\n s.status = BUSY_STATE;\n if (s.pending !== 0) {\n if (flush_pending(strm), strm.avail_out === 0)\n return s.last_flush = -1, Z_OK;\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && flush !== Z_FINISH)\n return err(strm, Z_BUF_ERROR);\n if (s.status === FINISH_STATE && strm.avail_in !== 0)\n return err(strm, Z_BUF_ERROR);\n if (strm.avail_in !== 0 || s.lookahead !== 0 || flush !== Z_NO_FLUSH && s.status !== FINISH_STATE) {\n var bstate = s.strategy === Z_HUFFMAN_ONLY \? deflate_huff(s, flush) : s.strategy === Z_RLE \? deflate_rle(s, flush) : configuration_table[s.level].func(s, flush);\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE)\n s.status = FINISH_STATE;\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0)\n s.last_flush = -1;\n return Z_OK;\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH)\n trees._tr_align(s);\n else if (flush !== Z_BLOCK) {\n if (trees._tr_stored_block(s, 0, 0, !1), flush === Z_FULL_FLUSH) {\n if (zero(s.head), s.lookahead === 0)\n s.strstart = 0, s.block_start = 0, s.insert = 0;\n }\n }\n if (flush_pending(strm), strm.avail_out === 0)\n return s.last_flush = -1, Z_OK;\n }\n }\n if (flush !== Z_FINISH)\n return Z_OK;\n if (s.wrap <= 0)\n return Z_STREAM_END;\n if (s.wrap === 2)\n put_byte(s, strm.adler & 255), put_byte(s, strm.adler >> 8 & 255), put_byte(s, strm.adler >> 16 & 255), put_byte(s, strm.adler >> 24 & 255), put_byte(s, strm.total_in & 255), put_byte(s, strm.total_in >> 8 & 255), put_byte(s, strm.total_in >> 16 & 255), put_byte(s, strm.total_in >> 24 & 255);\n else\n putShortMSB(s, strm.adler >>> 16), putShortMSB(s, strm.adler & 65535);\n if (flush_pending(strm), s.wrap > 0)\n s.wrap = -s.wrap;\n return s.pending !== 0 \? Z_OK : Z_STREAM_END;\n }\n function deflateEnd(strm) {\n var status;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (status = strm.state.status, status !== INIT_STATE && status !== EXTRA_STATE && status !== NAME_STATE && status !== COMMENT_STATE && status !== HCRC_STATE && status !== BUSY_STATE && status !== FINISH_STATE)\n return err(strm, Z_STREAM_ERROR);\n return strm.state = null, status === BUSY_STATE \? err(strm, Z_DATA_ERROR) : Z_OK;\n }\n function deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length, s, str, n, wrap, avail, next, input, tmpDict;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (s = strm.state, wrap = s.wrap, wrap === 2 || wrap === 1 && s.status !== INIT_STATE || s.lookahead)\n return Z_STREAM_ERROR;\n if (wrap === 1)\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n if (s.wrap = 0, dictLength >= s.w_size) {\n if (wrap === 0)\n zero(s.head), s.strstart = 0, s.block_start = 0, s.insert = 0;\n tmpDict = new utils.Buf8(s.w_size), utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0), dictionary = tmpDict, dictLength = s.w_size;\n }\n avail = strm.avail_in, next = strm.next_in, input = strm.input, strm.avail_in = dictLength, strm.next_in = 0, strm.input = dictionary, fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart, n = s.lookahead - (MIN_MATCH - 1);\n do\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask, s.prev[str & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = str, str++;\n while (--n);\n s.strstart = str, s.lookahead = MIN_MATCH - 1, fill_window(s);\n }\n return s.strstart += s.lookahead, s.block_start = s.strstart, s.insert = s.lookahead, s.lookahead = 0, s.match_length = s.prev_length = MIN_MATCH - 1, s.match_available = 0, strm.next_in = next, strm.input = input, strm.avail_in = avail, s.wrap = wrap, Z_OK;\n }\n exports.deflateInit = deflateInit, exports.deflateInit2 = deflateInit2, exports.deflateReset = deflateReset, exports.deflateResetKeep = deflateResetKeep, exports.deflateSetHeader = deflateSetHeader, exports.deflate = deflate, exports.deflateEnd = deflateEnd, exports.deflateSetDictionary = deflateSetDictionary, exports.deflateInfo = \"pako deflate (from Nodeca project)\";\n }\n}), require_inffast = __commonJS({\n \"node_modules/pako/lib/zlib/inffast.js\"(exports, module2) {\n var BAD = 30, TYPE = 12;\n module2.exports = function inflate_fast(strm, start) {\n var state, _in, last, _out, beg, end, dmax, wsize, whave, wnext, s_window, hold, bits, lcode, dcode, lmask, dmask, here, op, len, dist, from, from_source, input, output;\n state = strm.state, _in = strm.next_in, input = strm.input, last = _in + (strm.avail_in - 5), _out = strm.next_out, output = strm.output, beg = _out - (start - strm.avail_out), end = _out + (strm.avail_out - 257), dmax = state.dmax, wsize = state.wsize, whave = state.whave, wnext = state.wnext, s_window = state.window, hold = state.hold, bits = state.bits, lcode = state.lencode, dcode = state.distcode, lmask = (1 << state.lenbits) - 1, dmask = (1 << state.distbits) - 1;\n top:\n do {\n if (bits < 15)\n hold += input[_in++] << bits, bits += 8, hold += input[_in++] << bits, bits += 8;\n here = lcode[hold & lmask];\n dolen:\n for (;; ) {\n if (op = here >>> 24, hold >>>= op, bits -= op, op = here >>> 16 & 255, op === 0)\n output[_out++] = here & 65535;\n else if (op & 16) {\n if (len = here & 65535, op &= 15, op) {\n if (bits < op)\n hold += input[_in++] << bits, bits += 8;\n len += hold & (1 << op) - 1, hold >>>= op, bits -= op;\n }\n if (bits < 15)\n hold += input[_in++] << bits, bits += 8, hold += input[_in++] << bits, bits += 8;\n here = dcode[hold & dmask];\n dodist:\n for (;; ) {\n if (op = here >>> 24, hold >>>= op, bits -= op, op = here >>> 16 & 255, op & 16) {\n if (dist = here & 65535, op &= 15, bits < op) {\n if (hold += input[_in++] << bits, bits += 8, bits < op)\n hold += input[_in++] << bits, bits += 8;\n }\n if (dist += hold & (1 << op) - 1, dist > dmax) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break top;\n }\n if (hold >>>= op, bits -= op, op = _out - beg, dist > op) {\n if (op = dist - op, op > whave) {\n if (state.sane) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break top;\n }\n }\n if (from = 0, from_source = s_window, wnext === 0) {\n if (from += wsize - op, op < len) {\n len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n from = _out - dist, from_source = output;\n }\n } else if (wnext < op) {\n if (from += wsize + wnext - op, op -= wnext, op < len) {\n len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n if (from = 0, wnext < len) {\n op = wnext, len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n from = _out - dist, from_source = output;\n }\n }\n } else if (from += wnext - op, op < len) {\n len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n from = _out - dist, from_source = output;\n }\n while (len > 2)\n output[_out++] = from_source[from++], output[_out++] = from_source[from++], output[_out++] = from_source[from++], len -= 3;\n if (len) {\n if (output[_out++] = from_source[from++], len > 1)\n output[_out++] = from_source[from++];\n }\n } else {\n from = _out - dist;\n do\n output[_out++] = output[from++], output[_out++] = output[from++], output[_out++] = output[from++], len -= 3;\n while (len > 2);\n if (len) {\n if (output[_out++] = output[from++], len > 1)\n output[_out++] = output[from++];\n }\n }\n } else if ((op & 64) === 0) {\n here = dcode[(here & 65535) + (hold & (1 << op) - 1)];\n continue dodist;\n } else {\n strm.msg = \"invalid distance code\", state.mode = BAD;\n break top;\n }\n break;\n }\n } else if ((op & 64) === 0) {\n here = lcode[(here & 65535) + (hold & (1 << op) - 1)];\n continue dolen;\n } else if (op & 32) {\n state.mode = TYPE;\n break top;\n } else {\n strm.msg = \"invalid literal/length code\", state.mode = BAD;\n break top;\n }\n break;\n }\n } while (_in < last && _out < end);\n len = bits >> 3, _in -= len, bits -= len << 3, hold &= (1 << bits) - 1, strm.next_in = _in, strm.next_out = _out, strm.avail_in = _in < last \? 5 + (last - _in) : 5 - (_in - last), strm.avail_out = _out < end \? 257 + (end - _out) : 257 - (_out - end), state.hold = hold, state.bits = bits;\n return;\n };\n }\n}), require_inftrees = __commonJS({\n \"node_modules/pako/lib/zlib/inftrees.js\"(exports, module2) {\n var utils = require_common(), MAXBITS = 15, ENOUGH_LENS = 852, ENOUGH_DISTS = 592, CODES = 0, LENS = 1, DISTS = 2, lbase = [\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 13,\n 15,\n 17,\n 19,\n 23,\n 27,\n 31,\n 35,\n 43,\n 51,\n 59,\n 67,\n 83,\n 99,\n 115,\n 131,\n 163,\n 195,\n 227,\n 258,\n 0,\n 0\n ], lext = [\n 16,\n 16,\n 16,\n 16,\n 16,\n 16,\n 16,\n 16,\n 17,\n 17,\n 17,\n 17,\n 18,\n 18,\n 18,\n 18,\n 19,\n 19,\n 19,\n 19,\n 20,\n 20,\n 20,\n 20,\n 21,\n 21,\n 21,\n 21,\n 16,\n 72,\n 78\n ], dbase = [\n 1,\n 2,\n 3,\n 4,\n 5,\n 7,\n 9,\n 13,\n 17,\n 25,\n 33,\n 49,\n 65,\n 97,\n 129,\n 193,\n 257,\n 385,\n 513,\n 769,\n 1025,\n 1537,\n 2049,\n 3073,\n 4097,\n 6145,\n 8193,\n 12289,\n 16385,\n 24577,\n 0,\n 0\n ], dext = [\n 16,\n 16,\n 16,\n 16,\n 17,\n 17,\n 18,\n 18,\n 19,\n 19,\n 20,\n 20,\n 21,\n 21,\n 22,\n 22,\n 23,\n 23,\n 24,\n 24,\n 25,\n 25,\n 26,\n 26,\n 27,\n 27,\n 28,\n 28,\n 29,\n 29,\n 64,\n 64\n ];\n module2.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) {\n var bits = opts.bits, len = 0, sym = 0, min = 0, max = 0, root = 0, curr = 0, drop = 0, left = 0, used = 0, huff = 0, incr, fill, low, mask, next, base = null, base_index = 0, end, count = new utils.Buf16(MAXBITS + 1), offs = new utils.Buf16(MAXBITS + 1), extra = null, extra_index = 0, here_bits, here_op, here_val;\n for (len = 0;len <= MAXBITS; len++)\n count[len] = 0;\n for (sym = 0;sym < codes; sym++)\n count[lens[lens_index + sym]]++;\n root = bits;\n for (max = MAXBITS;max >= 1; max--)\n if (count[max] !== 0)\n break;\n if (root > max)\n root = max;\n if (max === 0)\n return table[table_index++] = 1 << 24 | 64 << 16 | 0, table[table_index++] = 1 << 24 | 64 << 16 | 0, opts.bits = 1, 0;\n for (min = 1;min < max; min++)\n if (count[min] !== 0)\n break;\n if (root < min)\n root = min;\n left = 1;\n for (len = 1;len <= MAXBITS; len++)\n if (left <<= 1, left -= count[len], left < 0)\n return -1;\n if (left > 0 && (type === CODES || max !== 1))\n return -1;\n offs[1] = 0;\n for (len = 1;len < MAXBITS; len++)\n offs[len + 1] = offs[len] + count[len];\n for (sym = 0;sym < codes; sym++)\n if (lens[lens_index + sym] !== 0)\n work[offs[lens[lens_index + sym]]++] = sym;\n if (type === CODES)\n base = extra = work, end = 19;\n else if (type === LENS)\n base = lbase, base_index -= 257, extra = lext, extra_index -= 257, end = 256;\n else\n base = dbase, extra = dext, end = -1;\n if (huff = 0, sym = 0, len = min, next = table_index, curr = root, drop = 0, low = -1, used = 1 << root, mask = used - 1, type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS)\n return 1;\n for (;; ) {\n if (here_bits = len - drop, work[sym] < end)\n here_op = 0, here_val = work[sym];\n else if (work[sym] > end)\n here_op = extra[extra_index + work[sym]], here_val = base[base_index + work[sym]];\n else\n here_op = 96, here_val = 0;\n incr = 1 << len - drop, fill = 1 << curr, min = fill;\n do\n fill -= incr, table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0;\n while (fill !== 0);\n incr = 1 << len - 1;\n while (huff & incr)\n incr >>= 1;\n if (incr !== 0)\n huff &= incr - 1, huff += incr;\n else\n huff = 0;\n if (sym++, --count[len] === 0) {\n if (len === max)\n break;\n len = lens[lens_index + work[sym]];\n }\n if (len > root && (huff & mask) !== low) {\n if (drop === 0)\n drop = root;\n next += min, curr = len - drop, left = 1 << curr;\n while (curr + drop < max) {\n if (left -= count[curr + drop], left <= 0)\n break;\n curr++, left <<= 1;\n }\n if (used += 1 << curr, type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS)\n return 1;\n low = huff & mask, table[low] = root << 24 | curr << 16 | next - table_index | 0;\n }\n }\n if (huff !== 0)\n table[next + huff] = len - drop << 24 | 64 << 16 | 0;\n return opts.bits = root, 0;\n };\n }\n}), require_inflate = __commonJS({\n \"node_modules/pako/lib/zlib/inflate.js\"(exports) {\n var utils = require_common(), adler32 = require_adler32(), crc32 = require_crc32(), inflate_fast = require_inffast(), inflate_table = require_inftrees(), CODES = 0, LENS = 1, DISTS = 2, Z_FINISH = 4, Z_BLOCK = 5, Z_TREES = 6, Z_OK = 0, Z_STREAM_END = 1, Z_NEED_DICT = 2, Z_STREAM_ERROR = -2, Z_DATA_ERROR = -3, Z_MEM_ERROR = -4, Z_BUF_ERROR = -5, Z_DEFLATED = 8, HEAD = 1, FLAGS = 2, TIME = 3, OS = 4, EXLEN = 5, EXTRA = 6, NAME = 7, COMMENT = 8, HCRC = 9, DICTID = 10, DICT = 11, TYPE = 12, TYPEDO = 13, STORED = 14, COPY_ = 15, COPY = 16, TABLE = 17, LENLENS = 18, CODELENS = 19, LEN_ = 20, LEN = 21, LENEXT = 22, DIST = 23, DISTEXT = 24, MATCH = 25, LIT = 26, CHECK = 27, LENGTH = 28, DONE = 29, BAD = 30, MEM = 31, SYNC = 32, ENOUGH_LENS = 852, ENOUGH_DISTS = 592, MAX_WBITS = 15, DEF_WBITS = MAX_WBITS;\n function zswap32(q) {\n return (q >>> 24 & 255) + (q >>> 8 & 65280) + ((q & 65280) << 8) + ((q & 255) << 24);\n }\n function InflateState() {\n this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new utils.Buf16(320), this.work = new utils.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;\n }\n function inflateResetKeep(strm) {\n var state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, strm.total_in = strm.total_out = state.total = 0, strm.msg = \"\", state.wrap)\n strm.adler = state.wrap & 1;\n return state.mode = HEAD, state.last = 0, state.havedict = 0, state.dmax = 32768, state.head = null, state.hold = 0, state.bits = 0, state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS), state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS), state.sane = 1, state.back = -1, Z_OK;\n }\n function inflateReset(strm) {\n var state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n return state = strm.state, state.wsize = 0, state.whave = 0, state.wnext = 0, inflateResetKeep(strm);\n }\n function inflateReset2(strm, windowBits) {\n var wrap, state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, windowBits < 0)\n wrap = 0, windowBits = -windowBits;\n else if (wrap = (windowBits >> 4) + 1, windowBits < 48)\n windowBits &= 15;\n if (windowBits && (windowBits < 8 || windowBits > 15))\n return Z_STREAM_ERROR;\n if (state.window !== null && state.wbits !== windowBits)\n state.window = null;\n return state.wrap = wrap, state.wbits = windowBits, inflateReset(strm);\n }\n function inflateInit2(strm, windowBits) {\n var ret, state;\n if (!strm)\n return Z_STREAM_ERROR;\n if (state = new InflateState, strm.state = state, state.window = null, ret = inflateReset2(strm, windowBits), ret !== Z_OK)\n strm.state = null;\n return ret;\n }\n function inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n }\n var virgin = !0, lenfix, distfix;\n function fixedtables(state) {\n if (virgin) {\n var sym;\n lenfix = new utils.Buf32(512), distfix = new utils.Buf32(32), sym = 0;\n while (sym < 144)\n state.lens[sym++] = 8;\n while (sym < 256)\n state.lens[sym++] = 9;\n while (sym < 280)\n state.lens[sym++] = 7;\n while (sym < 288)\n state.lens[sym++] = 8;\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, {\n bits: 9\n }), sym = 0;\n while (sym < 32)\n state.lens[sym++] = 5;\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, {\n bits: 5\n }), virgin = !1;\n }\n state.lencode = lenfix, state.lenbits = 9, state.distcode = distfix, state.distbits = 5;\n }\n function updatewindow(strm, src, end, copy) {\n var dist, state = strm.state;\n if (state.window === null)\n state.wsize = 1 << state.wbits, state.wnext = 0, state.whave = 0, state.window = new utils.Buf8(state.wsize);\n if (copy >= state.wsize)\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0), state.wnext = 0, state.whave = state.wsize;\n else {\n if (dist = state.wsize - state.wnext, dist > copy)\n dist = copy;\n if (utils.arraySet(state.window, src, end - copy, dist, state.wnext), copy -= dist, copy)\n utils.arraySet(state.window, src, end - copy, copy, 0), state.wnext = copy, state.whave = state.wsize;\n else {\n if (state.wnext += dist, state.wnext === state.wsize)\n state.wnext = 0;\n if (state.whave < state.wsize)\n state.whave += dist;\n }\n }\n return 0;\n }\n function inflate(strm, flush) {\n var state, input, output, next, put, have, left, hold, bits, _in, _out, copy, from, from_source, here = 0, here_bits, here_op, here_val, last_bits, last_op, last_val, len, ret, hbuf = new utils.Buf8(4), opts, n, order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0)\n return Z_STREAM_ERROR;\n if (state = strm.state, state.mode === TYPE)\n state.mode = TYPEDO;\n put = strm.next_out, output = strm.output, left = strm.avail_out, next = strm.next_in, input = strm.input, have = strm.avail_in, hold = state.hold, bits = state.bits, _in = have, _out = left, ret = Z_OK;\n inf_leave:\n for (;; )\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.wrap & 2 && hold === 35615) {\n state.check = 0, hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0), hold = 0, bits = 0, state.mode = FLAGS;\n break;\n }\n if (state.flags = 0, state.head)\n state.head.done = !1;\n if (!(state.wrap & 1) || (((hold & 255) << 8) + (hold >> 8)) % 31) {\n strm.msg = \"incorrect header check\", state.mode = BAD;\n break;\n }\n if ((hold & 15) !== Z_DEFLATED) {\n strm.msg = \"unknown compression method\", state.mode = BAD;\n break;\n }\n if (hold >>>= 4, bits -= 4, len = (hold & 15) + 8, state.wbits === 0)\n state.wbits = len;\n else if (len > state.wbits) {\n strm.msg = \"invalid window size\", state.mode = BAD;\n break;\n }\n state.dmax = 1 << len, strm.adler = state.check = 1, state.mode = hold & 512 \? DICTID : TYPE, hold = 0, bits = 0;\n break;\n case FLAGS:\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.flags = hold, (state.flags & 255) !== Z_DEFLATED) {\n strm.msg = \"unknown compression method\", state.mode = BAD;\n break;\n }\n if (state.flags & 57344) {\n strm.msg = \"unknown header flags set\", state.mode = BAD;\n break;\n }\n if (state.head)\n state.head.text = hold >> 8 & 1;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0);\n hold = 0, bits = 0, state.mode = TIME;\n case TIME:\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.head)\n state.head.time = hold;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, hbuf[2] = hold >>> 16 & 255, hbuf[3] = hold >>> 24 & 255, state.check = crc32(state.check, hbuf, 4, 0);\n hold = 0, bits = 0, state.mode = OS;\n case OS:\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.head)\n state.head.xflags = hold & 255, state.head.os = hold >> 8;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0);\n hold = 0, bits = 0, state.mode = EXLEN;\n case EXLEN:\n if (state.flags & 1024) {\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.length = hold, state.head)\n state.head.extra_len = hold;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0);\n hold = 0, bits = 0;\n } else if (state.head)\n state.head.extra = null;\n state.mode = EXTRA;\n case EXTRA:\n if (state.flags & 1024) {\n if (copy = state.length, copy > have)\n copy = have;\n if (copy) {\n if (state.head) {\n if (len = state.head.extra_len - state.length, !state.head.extra)\n state.head.extra = new Array(state.head.extra_len);\n utils.arraySet(state.head.extra, input, next, copy, len);\n }\n if (state.flags & 512)\n state.check = crc32(state.check, input, copy, next);\n have -= copy, next += copy, state.length -= copy;\n }\n if (state.length)\n break inf_leave;\n }\n state.length = 0, state.mode = NAME;\n case NAME:\n if (state.flags & 2048) {\n if (have === 0)\n break inf_leave;\n copy = 0;\n do\n if (len = input[next + copy++], state.head && len && state.length < 65536)\n state.head.name += String.fromCharCode(len);\n while (len && copy < have);\n if (state.flags & 512)\n state.check = crc32(state.check, input, copy, next);\n if (have -= copy, next += copy, len)\n break inf_leave;\n } else if (state.head)\n state.head.name = null;\n state.length = 0, state.mode = COMMENT;\n case COMMENT:\n if (state.flags & 4096) {\n if (have === 0)\n break inf_leave;\n copy = 0;\n do\n if (len = input[next + copy++], state.head && len && state.length < 65536)\n state.head.comment += String.fromCharCode(len);\n while (len && copy < have);\n if (state.flags & 512)\n state.check = crc32(state.check, input, copy, next);\n if (have -= copy, next += copy, len)\n break inf_leave;\n } else if (state.head)\n state.head.comment = null;\n state.mode = HCRC;\n case HCRC:\n if (state.flags & 512) {\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (hold !== (state.check & 65535)) {\n strm.msg = \"header crc mismatch\", state.mode = BAD;\n break;\n }\n hold = 0, bits = 0;\n }\n if (state.head)\n state.head.hcrc = state.flags >> 9 & 1, state.head.done = !0;\n strm.adler = state.check = 0, state.mode = TYPE;\n break;\n case DICTID:\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n strm.adler = state.check = zswap32(hold), hold = 0, bits = 0, state.mode = DICT;\n case DICT:\n if (state.havedict === 0)\n return strm.next_out = put, strm.avail_out = left, strm.next_in = next, strm.avail_in = have, state.hold = hold, state.bits = bits, Z_NEED_DICT;\n strm.adler = state.check = 1, state.mode = TYPE;\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES)\n break inf_leave;\n case TYPEDO:\n if (state.last) {\n hold >>>= bits & 7, bits -= bits & 7, state.mode = CHECK;\n break;\n }\n while (bits < 3) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n switch (state.last = hold & 1, hold >>>= 1, bits -= 1, hold & 3) {\n case 0:\n state.mode = STORED;\n break;\n case 1:\n if (fixedtables(state), state.mode = LEN_, flush === Z_TREES) {\n hold >>>= 2, bits -= 2;\n break inf_leave;\n }\n break;\n case 2:\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = \"invalid block type\", state.mode = BAD;\n }\n hold >>>= 2, bits -= 2;\n break;\n case STORED:\n hold >>>= bits & 7, bits -= bits & 7;\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if ((hold & 65535) !== (hold >>> 16 ^ 65535)) {\n strm.msg = \"invalid stored block lengths\", state.mode = BAD;\n break;\n }\n if (state.length = hold & 65535, hold = 0, bits = 0, state.mode = COPY_, flush === Z_TREES)\n break inf_leave;\n case COPY_:\n state.mode = COPY;\n case COPY:\n if (copy = state.length, copy) {\n if (copy > have)\n copy = have;\n if (copy > left)\n copy = left;\n if (copy === 0)\n break inf_leave;\n utils.arraySet(output, input, next, copy, put), have -= copy, next += copy, left -= copy, put += copy, state.length -= copy;\n break;\n }\n state.mode = TYPE;\n break;\n case TABLE:\n while (bits < 14) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.nlen = (hold & 31) + 257, hold >>>= 5, bits -= 5, state.ndist = (hold & 31) + 1, hold >>>= 5, bits -= 5, state.ncode = (hold & 15) + 4, hold >>>= 4, bits -= 4, state.nlen > 286 || state.ndist > 30) {\n strm.msg = \"too many length or distance symbols\", state.mode = BAD;\n break;\n }\n state.have = 0, state.mode = LENLENS;\n case LENLENS:\n while (state.have < state.ncode) {\n while (bits < 3) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n state.lens[order[state.have++]] = hold & 7, hold >>>= 3, bits -= 3;\n }\n while (state.have < 19)\n state.lens[order[state.have++]] = 0;\n if (state.lencode = state.lendyn, state.lenbits = 7, opts = { bits: state.lenbits }, ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts), state.lenbits = opts.bits, ret) {\n strm.msg = \"invalid code lengths set\", state.mode = BAD;\n break;\n }\n state.have = 0, state.mode = CODELENS;\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;; ) {\n if (here = state.lencode[hold & (1 << state.lenbits) - 1], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (here_val < 16)\n hold >>>= here_bits, bits -= here_bits, state.lens[state.have++] = here_val;\n else {\n if (here_val === 16) {\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (hold >>>= here_bits, bits -= here_bits, state.have === 0) {\n strm.msg = \"invalid bit length repeat\", state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1], copy = 3 + (hold & 3), hold >>>= 2, bits -= 2;\n } else if (here_val === 17) {\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= here_bits, bits -= here_bits, len = 0, copy = 3 + (hold & 7), hold >>>= 3, bits -= 3;\n } else {\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= here_bits, bits -= here_bits, len = 0, copy = 11 + (hold & 127), hold >>>= 7, bits -= 7;\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = \"invalid bit length repeat\", state.mode = BAD;\n break;\n }\n while (copy--)\n state.lens[state.have++] = len;\n }\n }\n if (state.mode === BAD)\n break;\n if (state.lens[256] === 0) {\n strm.msg = \"invalid code -- missing end-of-block\", state.mode = BAD;\n break;\n }\n if (state.lenbits = 9, opts = { bits: state.lenbits }, ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts), state.lenbits = opts.bits, ret) {\n strm.msg = \"invalid literal/lengths set\", state.mode = BAD;\n break;\n }\n if (state.distbits = 6, state.distcode = state.distdyn, opts = { bits: state.distbits }, ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts), state.distbits = opts.bits, ret) {\n strm.msg = \"invalid distances set\", state.mode = BAD;\n break;\n }\n if (state.mode = LEN_, flush === Z_TREES)\n break inf_leave;\n case LEN_:\n state.mode = LEN;\n case LEN:\n if (have >= 6 && left >= 258) {\n if (strm.next_out = put, strm.avail_out = left, strm.next_in = next, strm.avail_in = have, state.hold = hold, state.bits = bits, inflate_fast(strm, _out), put = strm.next_out, output = strm.output, left = strm.avail_out, next = strm.next_in, input = strm.input, have = strm.avail_in, hold = state.hold, bits = state.bits, state.mode === TYPE)\n state.back = -1;\n break;\n }\n state.back = 0;\n for (;; ) {\n if (here = state.lencode[hold & (1 << state.lenbits) - 1], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (here_op && (here_op & 240) === 0) {\n last_bits = here_bits, last_op = here_op, last_val = here_val;\n for (;; ) {\n if (here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, last_bits + here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= last_bits, bits -= last_bits, state.back += last_bits;\n }\n if (hold >>>= here_bits, bits -= here_bits, state.back += here_bits, state.length = here_val, here_op === 0) {\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n state.back = -1, state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = \"invalid literal/length code\", state.mode = BAD;\n break;\n }\n state.extra = here_op & 15, state.mode = LENEXT;\n case LENEXT:\n if (state.extra) {\n n = state.extra;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n state.length += hold & (1 << state.extra) - 1, hold >>>= state.extra, bits -= state.extra, state.back += state.extra;\n }\n state.was = state.length, state.mode = DIST;\n case DIST:\n for (;; ) {\n if (here = state.distcode[hold & (1 << state.distbits) - 1], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if ((here_op & 240) === 0) {\n last_bits = here_bits, last_op = here_op, last_val = here_val;\n for (;; ) {\n if (here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, last_bits + here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= last_bits, bits -= last_bits, state.back += last_bits;\n }\n if (hold >>>= here_bits, bits -= here_bits, state.back += here_bits, here_op & 64) {\n strm.msg = \"invalid distance code\", state.mode = BAD;\n break;\n }\n state.offset = here_val, state.extra = here_op & 15, state.mode = DISTEXT;\n case DISTEXT:\n if (state.extra) {\n n = state.extra;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n state.offset += hold & (1 << state.extra) - 1, hold >>>= state.extra, bits -= state.extra, state.back += state.extra;\n }\n if (state.offset > state.dmax) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break;\n }\n state.mode = MATCH;\n case MATCH:\n if (left === 0)\n break inf_leave;\n if (copy = _out - left, state.offset > copy) {\n if (copy = state.offset - copy, copy > state.whave) {\n if (state.sane) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break;\n }\n }\n if (copy > state.wnext)\n copy -= state.wnext, from = state.wsize - copy;\n else\n from = state.wnext - copy;\n if (copy > state.length)\n copy = state.length;\n from_source = state.window;\n } else\n from_source = output, from = put - state.offset, copy = state.length;\n if (copy > left)\n copy = left;\n left -= copy, state.length -= copy;\n do\n output[put++] = from_source[from++];\n while (--copy);\n if (state.length === 0)\n state.mode = LEN;\n break;\n case LIT:\n if (left === 0)\n break inf_leave;\n output[put++] = state.length, left--, state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold |= input[next++] << bits, bits += 8;\n }\n if (_out -= left, strm.total_out += _out, state.total += _out, _out)\n strm.adler = state.check = state.flags \? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out);\n if (_out = left, (state.flags \? hold : zswap32(hold)) !== state.check) {\n strm.msg = \"incorrect data check\", state.mode = BAD;\n break;\n }\n hold = 0, bits = 0;\n }\n state.mode = LENGTH;\n case LENGTH:\n if (state.wrap && state.flags) {\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (hold !== (state.total & 4294967295)) {\n strm.msg = \"incorrect length check\", state.mode = BAD;\n break;\n }\n hold = 0, bits = 0;\n }\n state.mode = DONE;\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n default:\n return Z_STREAM_ERROR;\n }\n if (strm.next_out = put, strm.avail_out = left, strm.next_in = next, strm.avail_in = have, state.hold = hold, state.bits = bits, state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush !== Z_FINISH)) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out))\n return state.mode = MEM, Z_MEM_ERROR;\n }\n if (_in -= strm.avail_in, _out -= strm.avail_out, strm.total_in += _in, strm.total_out += _out, state.total += _out, state.wrap && _out)\n strm.adler = state.check = state.flags \? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out);\n if (strm.data_type = state.bits + (state.last \? 64 : 0) + (state.mode === TYPE \? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ \? 256 : 0), (_in === 0 && _out === 0 || flush === Z_FINISH) && ret === Z_OK)\n ret = Z_BUF_ERROR;\n return ret;\n }\n function inflateEnd(strm) {\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n var state = strm.state;\n if (state.window)\n state.window = null;\n return strm.state = null, Z_OK;\n }\n function inflateGetHeader(strm, head) {\n var state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, (state.wrap & 2) === 0)\n return Z_STREAM_ERROR;\n return state.head = head, head.done = !1, Z_OK;\n }\n function inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length, state, dictid, ret;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, state.wrap !== 0 && state.mode !== DICT)\n return Z_STREAM_ERROR;\n if (state.mode === DICT) {\n if (dictid = 1, dictid = adler32(dictid, dictionary, dictLength, 0), dictid !== state.check)\n return Z_DATA_ERROR;\n }\n if (ret = updatewindow(strm, dictionary, dictLength, dictLength), ret)\n return state.mode = MEM, Z_MEM_ERROR;\n return state.havedict = 1, Z_OK;\n }\n exports.inflateReset = inflateReset, exports.inflateReset2 = inflateReset2, exports.inflateResetKeep = inflateResetKeep, exports.inflateInit = inflateInit, exports.inflateInit2 = inflateInit2, exports.inflate = inflate, exports.inflateEnd = inflateEnd, exports.inflateGetHeader = inflateGetHeader, exports.inflateSetDictionary = inflateSetDictionary, exports.inflateInfo = \"pako inflate (from Nodeca project)\";\n }\n}), require_constants = __commonJS({\n \"node_modules/pako/lib/zlib/constants.js\"(exports, module2) {\n module2.exports = {\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n Z_BUF_ERROR: -5,\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n Z_BINARY: 0,\n Z_TEXT: 1,\n Z_UNKNOWN: 2,\n Z_DEFLATED: 8\n };\n }\n}), require_binding = __commonJS({\n \"node_modules/browserify-zlib/lib/binding.js\"(exports) {\n var Zstream = require_zstream(), zlib_deflate = require_deflate(), zlib_inflate = require_inflate(), constants = require_constants();\n for (key in constants)\n exports[key] = constants[key];\n var key;\n exports.NONE = 0, exports.DEFLATE = 1, exports.INFLATE = 2, exports.GZIP = 3, exports.GUNZIP = 4, exports.DEFLATERAW = 5, exports.INFLATERAW = 6, exports.UNZIP = 7;\n var GZIP_HEADER_ID1 = 31, GZIP_HEADER_ID2 = 139;\n function Zlib(mode) {\n if (typeof mode !== \"number\" || mode < exports.DEFLATE || mode > exports.UNZIP)\n @throwTypeError(\"Bad argument\");\n this.dictionary = null, this.err = 0, this.flush = 0, this.init_done = !1, this.level = 0, this.memLevel = 0, this.mode = mode, this.strategy = 0, this.windowBits = 0, this.write_in_progress = !1, this.pending_close = !1, this.gzip_id_bytes_read = 0;\n }\n Zlib.prototype = {}, Zlib.prototype.close = function() {\n if (this.write_in_progress) {\n this.pending_close = !0;\n return;\n }\n if (this.pending_close = !1, assert(this.init_done, \"close before init\"), assert(this.mode <= exports.UNZIP), this.mode === exports.DEFLATE || this.mode === exports.GZIP || this.mode === exports.DEFLATERAW)\n zlib_deflate.deflateEnd(this.strm);\n else if (this.mode === exports.INFLATE || this.mode === exports.GUNZIP || this.mode === exports.INFLATERAW || this.mode === exports.UNZIP)\n zlib_inflate.inflateEnd(this.strm);\n this.mode = exports.NONE, this.dictionary = null;\n }, Zlib.prototype.write = function(flush, input, in_off, in_len, out, out_off, out_len) {\n return this._write(!0, flush, input, in_off, in_len, out, out_off, out_len);\n }, Zlib.prototype.writeSync = function(flush, input, in_off, in_len, out, out_off, out_len) {\n return this._write(!1, flush, input, in_off, in_len, out, out_off, out_len);\n }, Zlib.prototype._write = function(async, flush, input, in_off, in_len, out, out_off, out_len) {\n if (assert.equal(arguments.length, 8), assert(this.init_done, \"write before init\"), assert(this.mode !== exports.NONE, \"already finalized\"), assert.equal(!1, this.write_in_progress, \"write already in progress\"), assert.equal(!1, this.pending_close, \"close is pending\"), this.write_in_progress = !0, assert.equal(!1, flush === void 0, \"must provide flush value\"), this.write_in_progress = !0, flush !== exports.Z_NO_FLUSH && flush !== exports.Z_PARTIAL_FLUSH && flush !== exports.Z_SYNC_FLUSH && flush !== exports.Z_FULL_FLUSH && flush !== exports.Z_FINISH && flush !== exports.Z_BLOCK)\n throw new Error(\"Invalid flush value\");\n if (input == null)\n input = Buffer.alloc(0), in_len = 0, in_off = 0;\n if (this.strm.avail_in = in_len, this.strm.input = input, this.strm.next_in = in_off, this.strm.avail_out = out_len, this.strm.output = out, this.strm.next_out = out_off, this.flush = flush, !async) {\n if (this._process(), this._checkError())\n return this._afterSync();\n return;\n }\n var self = this;\n return process.nextTick(function() {\n self._process(), self._after();\n }), this;\n }, Zlib.prototype._afterSync = function() {\n var avail_out = this.strm.avail_out, avail_in = this.strm.avail_in;\n return this.write_in_progress = !1, [avail_in, avail_out];\n }, Zlib.prototype._process = function() {\n var next_expected_header_byte = null;\n switch (this.mode) {\n case exports.DEFLATE:\n case exports.GZIP:\n case exports.DEFLATERAW:\n this.err = zlib_deflate.deflate(this.strm, this.flush);\n break;\n case exports.UNZIP:\n if (this.strm.avail_in > 0)\n next_expected_header_byte = this.strm.next_in;\n switch (this.gzip_id_bytes_read) {\n case 0:\n if (next_expected_header_byte === null)\n break;\n if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID1) {\n if (this.gzip_id_bytes_read = 1, next_expected_header_byte++, this.strm.avail_in === 1)\n break;\n } else {\n this.mode = exports.INFLATE;\n break;\n }\n case 1:\n if (next_expected_header_byte === null)\n break;\n if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID2)\n this.gzip_id_bytes_read = 2, this.mode = exports.GUNZIP;\n else\n this.mode = exports.INFLATE;\n break;\n default:\n throw new Error(\"invalid number of gzip magic number bytes read\");\n }\n case exports.INFLATE:\n case exports.GUNZIP:\n case exports.INFLATERAW:\n if (this.err = zlib_inflate.inflate(this.strm, this.flush), this.err === exports.Z_NEED_DICT && this.dictionary) {\n if (this.err = zlib_inflate.inflateSetDictionary(this.strm, this.dictionary), this.err === exports.Z_OK)\n this.err = zlib_inflate.inflate(this.strm, this.flush);\n else if (this.err === exports.Z_DATA_ERROR)\n this.err = exports.Z_NEED_DICT;\n }\n while (this.strm.avail_in > 0 && this.mode === exports.GUNZIP && this.err === exports.Z_STREAM_END && this.strm.next_in[0] !== 0)\n this.reset(), this.err = zlib_inflate.inflate(this.strm, this.flush);\n break;\n default:\n throw new Error(\"Unknown mode \" + this.mode);\n }\n }, Zlib.prototype._checkError = function() {\n switch (this.err) {\n case exports.Z_OK:\n case exports.Z_BUF_ERROR:\n if (this.strm.avail_out !== 0 && this.flush === exports.Z_FINISH)\n return this._error(\"unexpected end of file\"), !1;\n break;\n case exports.Z_STREAM_END:\n break;\n case exports.Z_NEED_DICT:\n if (this.dictionary == null)\n this._error(\"Missing dictionary\");\n else\n this._error(\"Bad dictionary\");\n return !1;\n default:\n return this._error(\"Zlib error\"), !1;\n }\n return !0;\n }, Zlib.prototype._after = function() {\n if (!this._checkError())\n return;\n var avail_out = this.strm.avail_out, avail_in = this.strm.avail_in;\n if (this.write_in_progress = !1, this.callback(avail_in, avail_out), this.pending_close)\n this.close();\n }, Zlib.prototype._error = function(message) {\n if (this.strm.msg)\n message = this.strm.msg;\n if (this.onerror(message, this.err), this.write_in_progress = !1, this.pending_close)\n this.close();\n }, Zlib.prototype.init = function(windowBits, level, memLevel, strategy, dictionary) {\n assert(arguments.length === 4 || arguments.length === 5, \"init(windowBits, level, memLevel, strategy, [dictionary])\"), assert(windowBits >= 8 && windowBits <= 15, \"invalid windowBits\"), assert(level >= -1 && level <= 9, \"invalid compression level\"), assert(memLevel >= 1 && memLevel <= 9, \"invalid memlevel\"), assert(strategy === exports.Z_FILTERED || strategy === exports.Z_HUFFMAN_ONLY || strategy === exports.Z_RLE || strategy === exports.Z_FIXED || strategy === exports.Z_DEFAULT_STRATEGY, \"invalid strategy\"), this._init(level, windowBits, memLevel, strategy, dictionary), this._setDictionary();\n }, Zlib.prototype.params = function() {\n throw new Error(\"deflateParams Not supported\");\n }, Zlib.prototype.reset = function() {\n this._reset(), this._setDictionary();\n }, Zlib.prototype._init = function(level, windowBits, memLevel, strategy, dictionary) {\n if (this.level = level, this.windowBits = windowBits, this.memLevel = memLevel, this.strategy = strategy, this.flush = exports.Z_NO_FLUSH, this.err = exports.Z_OK, this.mode === exports.GZIP || this.mode === exports.GUNZIP)\n this.windowBits += 16;\n if (this.mode === exports.UNZIP)\n this.windowBits += 32;\n if (this.mode === exports.DEFLATERAW || this.mode === exports.INFLATERAW)\n this.windowBits = -1 * this.windowBits;\n switch (this.strm = new Zstream, this.mode) {\n case exports.DEFLATE:\n case exports.GZIP:\n case exports.DEFLATERAW:\n this.err = zlib_deflate.deflateInit2(this.strm, this.level, exports.Z_DEFLATED, this.windowBits, this.memLevel, this.strategy);\n break;\n case exports.INFLATE:\n case exports.GUNZIP:\n case exports.INFLATERAW:\n case exports.UNZIP:\n this.err = zlib_inflate.inflateInit2(this.strm, this.windowBits);\n break;\n default:\n throw new Error(\"Unknown mode \" + this.mode);\n }\n if (this.err !== exports.Z_OK)\n this._error(\"Init error\");\n this.dictionary = dictionary, this.write_in_progress = !1, this.init_done = !0;\n }, Zlib.prototype._setDictionary = function() {\n if (this.dictionary == null)\n return;\n switch (this.err = exports.Z_OK, this.mode) {\n case exports.DEFLATE:\n case exports.DEFLATERAW:\n this.err = zlib_deflate.deflateSetDictionary(this.strm, this.dictionary);\n break;\n default:\n break;\n }\n if (this.err !== exports.Z_OK)\n this._error(\"Failed to set dictionary\");\n }, Zlib.prototype._reset = function() {\n switch (this.err = exports.Z_OK, this.mode) {\n case exports.DEFLATE:\n case exports.DEFLATERAW:\n case exports.GZIP:\n this.err = zlib_deflate.deflateReset(this.strm);\n break;\n case exports.INFLATE:\n case exports.INFLATERAW:\n case exports.GUNZIP:\n this.err = zlib_inflate.inflateReset(this.strm);\n break;\n default:\n break;\n }\n if (this.err !== exports.Z_OK)\n this._error(\"Failed to reset stream\");\n }, exports.Zlib = Zlib;\n }\n}), require_lib = __commonJS({\n \"node_modules/browserify-zlib/lib/index.js\"(exports) {\n var Buffer2 = BufferModule.Buffer, Transform = StreamModule.Transform, binding = require_binding(), util = Util, kMaxLength = BufferModule.kMaxLength, kRangeErrorMessage = \"Cannot create final Buffer. It would be larger than 0x\" + kMaxLength.toString(16) + \" bytes\";\n binding.Z_MIN_WINDOWBITS = 8, binding.Z_MAX_WINDOWBITS = 15, binding.Z_DEFAULT_WINDOWBITS = 15, binding.Z_MIN_CHUNK = 64, binding.Z_MAX_CHUNK = Infinity, binding.Z_DEFAULT_CHUNK = 16384, binding.Z_MIN_MEMLEVEL = 1, binding.Z_MAX_MEMLEVEL = 9, binding.Z_DEFAULT_MEMLEVEL = 8, binding.Z_MIN_LEVEL = -1, binding.Z_MAX_LEVEL = 9, binding.Z_DEFAULT_LEVEL = binding.Z_DEFAULT_COMPRESSION;\n var bkeys = Object.keys(binding);\n for (bk = 0;bk < bkeys.length; bk++)\n if (bkey = bkeys[bk], bkey.match(/^Z/))\n Object.defineProperty(exports, bkey, {\n enumerable: !0,\n value: binding[bkey],\n writable: !1\n });\n var bkey, bk, codes = {\n Z_OK: binding.Z_OK,\n Z_STREAM_END: binding.Z_STREAM_END,\n Z_NEED_DICT: binding.Z_NEED_DICT,\n Z_ERRNO: binding.Z_ERRNO,\n Z_STREAM_ERROR: binding.Z_STREAM_ERROR,\n Z_DATA_ERROR: binding.Z_DATA_ERROR,\n Z_MEM_ERROR: binding.Z_MEM_ERROR,\n Z_BUF_ERROR: binding.Z_BUF_ERROR,\n Z_VERSION_ERROR: binding.Z_VERSION_ERROR\n }, ckeys = Object.keys(codes);\n for (ck = 0;ck < ckeys.length; ck++)\n ckey = ckeys[ck], codes[codes[ckey]] = ckey;\n var ckey, ck;\n Object.defineProperty(exports, \"codes\", {\n enumerable: !0,\n value: Object.freeze(codes),\n writable: !1\n }), exports.constants = require_constants(), exports.Deflate = Deflate, exports.Inflate = Inflate, exports.Gzip = Gzip, exports.Gunzip = Gunzip, exports.DeflateRaw = DeflateRaw, exports.InflateRaw = InflateRaw, exports.Unzip = Unzip, exports.createDeflate = function(o) {\n return new Deflate(o);\n }, exports.createInflate = function(o) {\n return new Inflate(o);\n }, exports.createDeflateRaw = function(o) {\n return new DeflateRaw(o);\n }, exports.createInflateRaw = function(o) {\n return new InflateRaw(o);\n }, exports.createGzip = function(o) {\n return new Gzip(o);\n }, exports.createGunzip = function(o) {\n return new Gunzip(o);\n }, exports.createUnzip = function(o) {\n return new Unzip(o);\n }, exports.deflate = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Deflate(opts), buffer, callback);\n }, exports.deflateSync = function(buffer, opts) {\n return zlibBufferSync(new Deflate(opts), buffer);\n }, exports.gzip = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Gzip(opts), buffer, callback);\n }, exports.gzipSync = function(buffer, opts) {\n return zlibBufferSync(new Gzip(opts), buffer);\n }, exports.deflateRaw = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new DeflateRaw(opts), buffer, callback);\n }, exports.deflateRawSync = function(buffer, opts) {\n return zlibBufferSync(new DeflateRaw(opts), buffer);\n }, exports.unzip = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Unzip(opts), buffer, callback);\n }, exports.unzipSync = function(buffer, opts) {\n return zlibBufferSync(new Unzip(opts), buffer);\n }, exports.inflate = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Inflate(opts), buffer, callback);\n }, exports.inflateSync = function(buffer, opts) {\n return zlibBufferSync(new Inflate(opts), buffer);\n }, exports.gunzip = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Gunzip(opts), buffer, callback);\n }, exports.gunzipSync = function(buffer, opts) {\n return zlibBufferSync(new Gunzip(opts), buffer);\n }, exports.inflateRaw = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new InflateRaw(opts), buffer, callback);\n }, exports.inflateRawSync = function(buffer, opts) {\n return zlibBufferSync(new InflateRaw(opts), buffer);\n }, exports.brotliCompress = function(buffer, opts, callback) {\n throw new Error(\"zlib.brotliCompress is not implemented\");\n };\n function zlibBuffer(engine, buffer, callback) {\n var buffers = [], nread = 0;\n engine.on(\"error\", onError), engine.on(\"end\", onEnd), engine.end(buffer), flow();\n function flow() {\n var chunk;\n while ((chunk = engine.read()) !== null)\n buffers.push(chunk), nread += chunk.length;\n engine.once(\"readable\", flow);\n }\n function onError(err) {\n engine.removeListener(\"end\", onEnd), engine.removeListener(\"readable\", flow), callback(err);\n }\n function onEnd() {\n var buf, err = null;\n if (nread >= kMaxLength)\n err = new RangeError(kRangeErrorMessage);\n else\n buf = Buffer2.concat(buffers, nread);\n buffers = [], engine.close(), callback(err, buf);\n }\n }\n function zlibBufferSync(engine, buffer) {\n if (typeof buffer === \"string\")\n buffer = Buffer2.from(buffer);\n if (!Buffer2.isBuffer(buffer))\n @throwTypeError(\"Not a string or buffer\");\n var flushFlag = engine._finishFlushFlag;\n return engine._processChunk(buffer, flushFlag);\n }\n function Deflate(opts) {\n if (!(this instanceof Deflate))\n return new Deflate(opts);\n Zlib.call(this, opts, binding.DEFLATE);\n }\n function Inflate(opts) {\n if (!(this instanceof Inflate))\n return new Inflate(opts);\n Zlib.call(this, opts, binding.INFLATE);\n }\n function Gzip(opts) {\n if (!(this instanceof Gzip))\n return new Gzip(opts);\n Zlib.call(this, opts, binding.GZIP);\n }\n function Gunzip(opts) {\n if (!(this instanceof Gunzip))\n return new Gunzip(opts);\n Zlib.call(this, opts, binding.GUNZIP);\n }\n function DeflateRaw(opts) {\n if (!(this instanceof DeflateRaw))\n return new DeflateRaw(opts);\n Zlib.call(this, opts, binding.DEFLATERAW);\n }\n function InflateRaw(opts) {\n if (!(this instanceof InflateRaw))\n return new InflateRaw(opts);\n Zlib.call(this, opts, binding.INFLATERAW);\n }\n function Unzip(opts) {\n if (!(this instanceof Unzip))\n return new Unzip(opts);\n Zlib.call(this, opts, binding.UNZIP);\n }\n function isValidFlushFlag(flag) {\n return flag === binding.Z_NO_FLUSH || flag === binding.Z_PARTIAL_FLUSH || flag === binding.Z_SYNC_FLUSH || flag === binding.Z_FULL_FLUSH || flag === binding.Z_FINISH || flag === binding.Z_BLOCK;\n }\n function Zlib(opts, mode) {\n var _this = this;\n if (this._opts = opts = opts || {}, this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK, Transform.call(this, opts), opts.flush && !isValidFlushFlag(opts.flush))\n throw new Error(\"Invalid flush flag: \" + opts.flush);\n if (opts.finishFlush && !isValidFlushFlag(opts.finishFlush))\n throw new Error(\"Invalid flush flag: \" + opts.finishFlush);\n if (this._flushFlag = opts.flush || binding.Z_NO_FLUSH, this._finishFlushFlag = typeof opts.finishFlush !== \"undefined\" \? opts.finishFlush : binding.Z_FINISH, opts.chunkSize) {\n if (opts.chunkSize < exports.Z_MIN_CHUNK || opts.chunkSize > exports.Z_MAX_CHUNK)\n throw new Error(\"Invalid chunk size: \" + opts.chunkSize);\n }\n if (opts.windowBits) {\n if (opts.windowBits < exports.Z_MIN_WINDOWBITS || opts.windowBits > exports.Z_MAX_WINDOWBITS)\n throw new Error(\"Invalid windowBits: \" + opts.windowBits);\n }\n if (opts.level) {\n if (opts.level < exports.Z_MIN_LEVEL || opts.level > exports.Z_MAX_LEVEL)\n throw new Error(\"Invalid compression level: \" + opts.level);\n }\n if (opts.memLevel) {\n if (opts.memLevel < exports.Z_MIN_MEMLEVEL || opts.memLevel > exports.Z_MAX_MEMLEVEL)\n throw new Error(\"Invalid memLevel: \" + opts.memLevel);\n }\n if (opts.strategy) {\n if (opts.strategy != exports.Z_FILTERED && opts.strategy != exports.Z_HUFFMAN_ONLY && opts.strategy != exports.Z_RLE && opts.strategy != exports.Z_FIXED && opts.strategy != exports.Z_DEFAULT_STRATEGY)\n throw new Error(\"Invalid strategy: \" + opts.strategy);\n }\n if (opts.dictionary) {\n if (!Buffer2.isBuffer(opts.dictionary))\n throw new Error(\"Invalid dictionary: it should be a Buffer instance\");\n }\n this._handle = new binding.Zlib(mode);\n var self = this;\n this._hadError = !1, this._handle.onerror = function(message, errno) {\n _close(self), self._hadError = !0;\n var error = new Error(message);\n error.errno = errno, error.code = exports.codes[errno], self.emit(\"error\", error);\n };\n var level = exports.Z_DEFAULT_COMPRESSION;\n if (typeof opts.level === \"number\")\n level = opts.level;\n var strategy = exports.Z_DEFAULT_STRATEGY;\n if (typeof opts.strategy === \"number\")\n strategy = opts.strategy;\n this._handle.init(opts.windowBits || exports.Z_DEFAULT_WINDOWBITS, level, opts.memLevel || exports.Z_DEFAULT_MEMLEVEL, strategy, opts.dictionary), this._buffer = Buffer2.allocUnsafe(this._chunkSize), this._offset = 0, this._level = level, this._strategy = strategy, this.once(\"end\", this.close), Object.defineProperty(this, \"_closed\", {\n get: function() {\n return !_this._handle;\n },\n configurable: !0,\n enumerable: !0\n });\n }\n util.inherits(Zlib, Transform), Zlib.prototype.params = function(level, strategy, callback) {\n if (level < exports.Z_MIN_LEVEL || level > exports.Z_MAX_LEVEL)\n @throwRangeError(\"Invalid compression level: \" + level);\n if (strategy != exports.Z_FILTERED && strategy != exports.Z_HUFFMAN_ONLY && strategy != exports.Z_RLE && strategy != exports.Z_FIXED && strategy != exports.Z_DEFAULT_STRATEGY)\n @throwTypeError(\"Invalid strategy: \" + strategy);\n if (this._level !== level || this._strategy !== strategy) {\n var self = this;\n this.flush(binding.Z_SYNC_FLUSH, function() {\n if (assert(self._handle, \"zlib binding closed\"), self._handle.params(level, strategy), !self._hadError) {\n if (self._level = level, self._strategy = strategy, callback)\n callback();\n }\n });\n } else\n process.nextTick(callback);\n }, Zlib.prototype.reset = function() {\n return assert(this._handle, \"zlib binding closed\"), this._handle.reset();\n }, Zlib.prototype._flush = function(callback) {\n this._transform(Buffer2.alloc(0), \"\", callback);\n }, Zlib.prototype.flush = function(kind, callback) {\n var _this2 = this, ws = this._writableState;\n if (typeof kind === \"function\" || kind === void 0 && !callback)\n callback = kind, kind = binding.Z_FULL_FLUSH;\n if (ws.ended) {\n if (callback)\n process.nextTick(callback);\n } else if (ws.ending) {\n if (callback)\n this.once(\"end\", callback);\n } else if (ws.needDrain) {\n if (callback)\n this.once(\"drain\", function() {\n return _this2.flush(kind, callback);\n });\n } else\n this._flushFlag = kind, this.write(Buffer2.alloc(0), \"\", callback);\n }, Zlib.prototype.close = function(callback) {\n _close(this, callback), process.nextTick(emitCloseNT, this);\n };\n function _close(engine, callback) {\n if (callback)\n process.nextTick(callback);\n if (!engine._handle)\n return;\n engine._handle.close(), engine._handle = null;\n }\n function emitCloseNT(self) {\n self.emit(\"close\");\n }\n Zlib.prototype._transform = function(chunk, encoding, cb) {\n var flushFlag, ws = this._writableState, ending = ws.ending || ws.ended, last = ending && (!chunk || ws.length === chunk.length);\n if (chunk !== null && !Buffer2.isBuffer(chunk))\n return cb(new Error(\"invalid input\"));\n if (!this._handle)\n return cb(new Error(\"zlib binding closed\"));\n if (last)\n flushFlag = this._finishFlushFlag;\n else if (flushFlag = this._flushFlag, chunk.length >= ws.length)\n this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH;\n this._processChunk(chunk, flushFlag, cb);\n }, Zlib.prototype._processChunk = function(chunk, flushFlag, cb) {\n var availInBefore = chunk && chunk.length, availOutBefore = this._chunkSize - this._offset, inOff = 0, self = this, async = typeof cb === \"function\";\n if (!async) {\n var buffers = [], nread = 0, error;\n this.on(\"error\", function(er) {\n error = er;\n }), assert(this._handle, \"zlib binding closed\");\n do\n var res = this._handle.writeSync(flushFlag, chunk, inOff, availInBefore, this._buffer, this._offset, availOutBefore);\n while (!this._hadError && callback(res[0], res[1]));\n if (this._hadError)\n throw error;\n if (nread >= kMaxLength)\n _close(this), @throwRangeError(kRangeErrorMessage);\n var buf = Buffer2.concat(buffers, nread);\n return _close(this), buf;\n }\n assert(this._handle, \"zlib binding closed\");\n var req = this._handle.write(flushFlag, chunk, inOff, availInBefore, this._buffer, this._offset, availOutBefore);\n req.buffer = chunk, req.callback = callback;\n function callback(availInAfter, availOutAfter) {\n if (this)\n this.buffer = null, this.callback = null;\n if (self._hadError)\n return;\n var have = availOutBefore - availOutAfter;\n if (assert(have >= 0, \"have should not go down\"), have > 0) {\n var out = self._buffer.slice(self._offset, self._offset + have);\n if (self._offset += have, async)\n self.push(out);\n else\n buffers.push(out), nread += out.length;\n }\n if (availOutAfter === 0 || self._offset >= self._chunkSize)\n availOutBefore = self._chunkSize, self._offset = 0, self._buffer = Buffer2.allocUnsafe(self._chunkSize);\n if (availOutAfter === 0) {\n if (inOff += availInBefore - availInAfter, availInBefore = availInAfter, !async)\n return !0;\n var newReq = self._handle.write(flushFlag, chunk, inOff, availInBefore, self._buffer, self._offset, self._chunkSize);\n newReq.callback = callback, newReq.buffer = chunk;\n return;\n }\n if (!async)\n return !1;\n cb();\n }\n }, util.inherits(Deflate, Zlib), util.inherits(Inflate, Zlib), util.inherits(Gzip, Zlib), util.inherits(Gunzip, Zlib), util.inherits(DeflateRaw, Zlib), util.inherits(InflateRaw, Zlib), util.inherits(Unzip, Zlib);\n }\n});\nreturn require_lib()})\n"_s;
+static constexpr ASCIILiteral NodeZlibCode = "(function (){\"use strict\";// src/js/out/tmp/node/zlib.ts\nvar assert = @getInternalField(@internalModuleRegistry, 4) || @createInternalModuleById(4), BufferModule = @requireNativeModule(\"node:buffer\"), StreamModule = @getInternalField(@internalModuleRegistry, 35) || @createInternalModuleById(35), Util = @getInternalField(@internalModuleRegistry, 44) || @createInternalModuleById(44), __getOwnPropNames = Object.getOwnPropertyNames, __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n}, require_zstream = __commonJS({\n \"node_modules/pako/lib/zlib/zstream.js\"(exports, module2) {\n function ZStream() {\n this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = \"\", this.state = null, this.data_type = 2, this.adler = 0;\n }\n module2.exports = ZStream;\n }\n}), require_common = __commonJS({\n \"node_modules/pako/lib/utils/common.js\"(exports) {\n var TYPED_OK = typeof Uint8Array !== \"undefined\" && typeof Uint16Array !== \"undefined\" && typeof Int32Array !== \"undefined\";\n function _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n }\n exports.assign = function(obj) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source)\n continue;\n if (typeof source !== \"object\")\n @throwTypeError(source + \"must be non-object\");\n for (var p in source)\n if (_has(source, p))\n obj[p] = source[p];\n }\n return obj;\n }, exports.shrinkBuf = function(buf, size) {\n if (buf.length === size)\n return buf;\n if (buf.subarray)\n return buf.subarray(0, size);\n return buf.length = size, buf;\n };\n var fnTyped = {\n arraySet: function(dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n for (var i = 0;i < len; i++)\n dest[dest_offs + i] = src[src_offs + i];\n },\n flattenChunks: function(chunks) {\n var i, l, len, pos, chunk, result;\n len = 0;\n for (i = 0, l = chunks.length;i < l; i++)\n len += chunks[i].length;\n result = new Uint8Array(len), pos = 0;\n for (i = 0, l = chunks.length;i < l; i++)\n chunk = chunks[i], result.set(chunk, pos), pos += chunk.length;\n return result;\n }\n }, fnUntyped = {\n arraySet: function(dest, src, src_offs, len, dest_offs) {\n for (var i = 0;i < len; i++)\n dest[dest_offs + i] = src[src_offs + i];\n },\n flattenChunks: function(chunks) {\n return [].concat.apply([], chunks);\n }\n };\n exports.setTyped = function(on) {\n if (on)\n exports.Buf8 = Uint8Array, exports.Buf16 = Uint16Array, exports.Buf32 = Int32Array, exports.assign(exports, fnTyped);\n else\n exports.Buf8 = Array, exports.Buf16 = Array, exports.Buf32 = Array, exports.assign(exports, fnUntyped);\n }, exports.setTyped(TYPED_OK);\n }\n}), require_trees = __commonJS({\n \"node_modules/pako/lib/zlib/trees.js\"(exports) {\n var utils = require_common(), Z_FIXED = 4, Z_BINARY = 0, Z_TEXT = 1, Z_UNKNOWN = 2;\n function zero(buf) {\n var len = buf.length;\n while (--len >= 0)\n buf[len] = 0;\n }\n var STORED_BLOCK = 0, STATIC_TREES = 1, DYN_TREES = 2, MIN_MATCH = 3, MAX_MATCH = 258, LENGTH_CODES = 29, LITERALS = 256, L_CODES = LITERALS + 1 + LENGTH_CODES, D_CODES = 30, BL_CODES = 19, HEAP_SIZE = 2 * L_CODES + 1, MAX_BITS = 15, Buf_size = 16, MAX_BL_BITS = 7, END_BLOCK = 256, REP_3_6 = 16, REPZ_3_10 = 17, REPZ_11_138 = 18, extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], extra_dbits = [\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 2,\n 2,\n 3,\n 3,\n 4,\n 4,\n 5,\n 5,\n 6,\n 6,\n 7,\n 7,\n 8,\n 8,\n 9,\n 9,\n 10,\n 10,\n 11,\n 11,\n 12,\n 12,\n 13,\n 13\n ], extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], DIST_CODE_LEN = 512, static_ltree = new Array((L_CODES + 2) * 2);\n zero(static_ltree);\n var static_dtree = new Array(D_CODES * 2);\n zero(static_dtree);\n var _dist_code = new Array(DIST_CODE_LEN);\n zero(_dist_code);\n var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\n zero(_length_code);\n var base_length = new Array(LENGTH_CODES);\n zero(base_length);\n var base_dist = new Array(D_CODES);\n zero(base_dist);\n function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n this.static_tree = static_tree, this.extra_bits = extra_bits, this.extra_base = extra_base, this.elems = elems, this.max_length = max_length, this.has_stree = static_tree && static_tree.length;\n }\n var static_l_desc, static_d_desc, static_bl_desc;\n function TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree, this.max_code = 0, this.stat_desc = stat_desc;\n }\n function d_code(dist) {\n return dist < 256 \? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n }\n function put_short(s, w) {\n s.pending_buf[s.pending++] = w & 255, s.pending_buf[s.pending++] = w >>> 8 & 255;\n }\n function send_bits(s, value, length) {\n if (s.bi_valid > Buf_size - length)\n s.bi_buf |= value << s.bi_valid & 65535, put_short(s, s.bi_buf), s.bi_buf = value >> Buf_size - s.bi_valid, s.bi_valid += length - Buf_size;\n else\n s.bi_buf |= value << s.bi_valid & 65535, s.bi_valid += length;\n }\n function send_code(s, c, tree) {\n send_bits(s, tree[c * 2], tree[c * 2 + 1]);\n }\n function bi_reverse(code, len) {\n var res = 0;\n do\n res |= code & 1, code >>>= 1, res <<= 1;\n while (--len > 0);\n return res >>> 1;\n }\n function bi_flush(s) {\n if (s.bi_valid === 16)\n put_short(s, s.bi_buf), s.bi_buf = 0, s.bi_valid = 0;\n else if (s.bi_valid >= 8)\n s.pending_buf[s.pending++] = s.bi_buf & 255, s.bi_buf >>= 8, s.bi_valid -= 8;\n }\n function gen_bitlen(s, desc) {\n var { dyn_tree: tree, max_code } = desc, stree = desc.stat_desc.static_tree, has_stree = desc.stat_desc.has_stree, extra = desc.stat_desc.extra_bits, base = desc.stat_desc.extra_base, max_length = desc.stat_desc.max_length, h, n, m, bits, xbits, f, overflow = 0;\n for (bits = 0;bits <= MAX_BITS; bits++)\n s.bl_count[bits] = 0;\n tree[s.heap[s.heap_max] * 2 + 1] = 0;\n for (h = s.heap_max + 1;h < HEAP_SIZE; h++) {\n if (n = s.heap[h], bits = tree[tree[n * 2 + 1] * 2 + 1] + 1, bits > max_length)\n bits = max_length, overflow++;\n if (tree[n * 2 + 1] = bits, n > max_code)\n continue;\n if (s.bl_count[bits]++, xbits = 0, n >= base)\n xbits = extra[n - base];\n if (f = tree[n * 2], s.opt_len += f * (bits + xbits), has_stree)\n s.static_len += f * (stree[n * 2 + 1] + xbits);\n }\n if (overflow === 0)\n return;\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0)\n bits--;\n s.bl_count[bits]--, s.bl_count[bits + 1] += 2, s.bl_count[max_length]--, overflow -= 2;\n } while (overflow > 0);\n for (bits = max_length;bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n if (m = s.heap[--h], m > max_code)\n continue;\n if (tree[m * 2 + 1] !== bits)\n s.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2], tree[m * 2 + 1] = bits;\n n--;\n }\n }\n }\n function gen_codes(tree, max_code, bl_count) {\n var next_code = new Array(MAX_BITS + 1), code = 0, bits, n;\n for (bits = 1;bits <= MAX_BITS; bits++)\n next_code[bits] = code = code + bl_count[bits - 1] << 1;\n for (n = 0;n <= max_code; n++) {\n var len = tree[n * 2 + 1];\n if (len === 0)\n continue;\n tree[n * 2] = bi_reverse(next_code[len]++, len);\n }\n }\n function tr_static_init() {\n var n, bits, length, code, dist, bl_count = new Array(MAX_BITS + 1);\n length = 0;\n for (code = 0;code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0;n < 1 << extra_lbits[code]; n++)\n _length_code[length++] = code;\n }\n _length_code[length - 1] = code, dist = 0;\n for (code = 0;code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0;n < 1 << extra_dbits[code]; n++)\n _dist_code[dist++] = code;\n }\n dist >>= 7;\n for (;code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0;n < 1 << extra_dbits[code] - 7; n++)\n _dist_code[256 + dist++] = code;\n }\n for (bits = 0;bits <= MAX_BITS; bits++)\n bl_count[bits] = 0;\n n = 0;\n while (n <= 143)\n static_ltree[n * 2 + 1] = 8, n++, bl_count[8]++;\n while (n <= 255)\n static_ltree[n * 2 + 1] = 9, n++, bl_count[9]++;\n while (n <= 279)\n static_ltree[n * 2 + 1] = 7, n++, bl_count[7]++;\n while (n <= 287)\n static_ltree[n * 2 + 1] = 8, n++, bl_count[8]++;\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n for (n = 0;n < D_CODES; n++)\n static_dtree[n * 2 + 1] = 5, static_dtree[n * 2] = bi_reverse(n, 5);\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS), static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS), static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n }\n function init_block(s) {\n var n;\n for (n = 0;n < L_CODES; n++)\n s.dyn_ltree[n * 2] = 0;\n for (n = 0;n < D_CODES; n++)\n s.dyn_dtree[n * 2] = 0;\n for (n = 0;n < BL_CODES; n++)\n s.bl_tree[n * 2] = 0;\n s.dyn_ltree[END_BLOCK * 2] = 1, s.opt_len = s.static_len = 0, s.last_lit = s.matches = 0;\n }\n function bi_windup(s) {\n if (s.bi_valid > 8)\n put_short(s, s.bi_buf);\n else if (s.bi_valid > 0)\n s.pending_buf[s.pending++] = s.bi_buf;\n s.bi_buf = 0, s.bi_valid = 0;\n }\n function copy_block(s, buf, len, header) {\n if (bi_windup(s), header)\n put_short(s, len), put_short(s, ~len);\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending), s.pending += len;\n }\n function smaller(tree, n, m, depth) {\n var _n2 = n * 2, _m2 = m * 2;\n return tree[_n2] < tree[_m2] || tree[_n2] === tree[_m2] && depth[n] <= depth[m];\n }\n function pqdownheap(s, tree, k) {\n var v = s.heap[k], j = k << 1;\n while (j <= s.heap_len) {\n if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth))\n j++;\n if (smaller(tree, v, s.heap[j], s.depth))\n break;\n s.heap[k] = s.heap[j], k = j, j <<= 1;\n }\n s.heap[k] = v;\n }\n function compress_block(s, ltree, dtree) {\n var dist, lc, lx = 0, code, extra;\n if (s.last_lit !== 0)\n do\n if (dist = s.pending_buf[s.d_buf + lx * 2] << 8 | s.pending_buf[s.d_buf + lx * 2 + 1], lc = s.pending_buf[s.l_buf + lx], lx++, dist === 0)\n send_code(s, lc, ltree);\n else {\n if (code = _length_code[lc], send_code(s, code + LITERALS + 1, ltree), extra = extra_lbits[code], extra !== 0)\n lc -= base_length[code], send_bits(s, lc, extra);\n if (dist--, code = d_code(dist), send_code(s, code, dtree), extra = extra_dbits[code], extra !== 0)\n dist -= base_dist[code], send_bits(s, dist, extra);\n }\n while (lx < s.last_lit);\n send_code(s, END_BLOCK, ltree);\n }\n function build_tree(s, desc) {\n var tree = desc.dyn_tree, stree = desc.stat_desc.static_tree, has_stree = desc.stat_desc.has_stree, elems = desc.stat_desc.elems, n, m, max_code = -1, node;\n s.heap_len = 0, s.heap_max = HEAP_SIZE;\n for (n = 0;n < elems; n++)\n if (tree[n * 2] !== 0)\n s.heap[++s.heap_len] = max_code = n, s.depth[n] = 0;\n else\n tree[n * 2 + 1] = 0;\n while (s.heap_len < 2)\n if (node = s.heap[++s.heap_len] = max_code < 2 \? ++max_code : 0, tree[node * 2] = 1, s.depth[node] = 0, s.opt_len--, has_stree)\n s.static_len -= stree[node * 2 + 1];\n desc.max_code = max_code;\n for (n = s.heap_len >> 1;n >= 1; n--)\n pqdownheap(s, tree, n);\n node = elems;\n do\n n = s.heap[1], s.heap[1] = s.heap[s.heap_len--], pqdownheap(s, tree, 1), m = s.heap[1], s.heap[--s.heap_max] = n, s.heap[--s.heap_max] = m, tree[node * 2] = tree[n * 2] + tree[m * 2], s.depth[node] = (s.depth[n] >= s.depth[m] \? s.depth[n] : s.depth[m]) + 1, tree[n * 2 + 1] = tree[m * 2 + 1] = node, s.heap[1] = node++, pqdownheap(s, tree, 1);\n while (s.heap_len >= 2);\n s.heap[--s.heap_max] = s.heap[1], gen_bitlen(s, desc), gen_codes(tree, max_code, s.bl_count);\n }\n function scan_tree(s, tree, max_code) {\n var n, prevlen = -1, curlen, nextlen = tree[1], count = 0, max_count = 7, min_count = 4;\n if (nextlen === 0)\n max_count = 138, min_count = 3;\n tree[(max_code + 1) * 2 + 1] = 65535;\n for (n = 0;n <= max_code; n++) {\n if (curlen = nextlen, nextlen = tree[(n + 1) * 2 + 1], ++count < max_count && curlen === nextlen)\n continue;\n else if (count < min_count)\n s.bl_tree[curlen * 2] += count;\n else if (curlen !== 0) {\n if (curlen !== prevlen)\n s.bl_tree[curlen * 2]++;\n s.bl_tree[REP_3_6 * 2]++;\n } else if (count <= 10)\n s.bl_tree[REPZ_3_10 * 2]++;\n else\n s.bl_tree[REPZ_11_138 * 2]++;\n if (count = 0, prevlen = curlen, nextlen === 0)\n max_count = 138, min_count = 3;\n else if (curlen === nextlen)\n max_count = 6, min_count = 3;\n else\n max_count = 7, min_count = 4;\n }\n }\n function send_tree(s, tree, max_code) {\n var n, prevlen = -1, curlen, nextlen = tree[1], count = 0, max_count = 7, min_count = 4;\n if (nextlen === 0)\n max_count = 138, min_count = 3;\n for (n = 0;n <= max_code; n++) {\n if (curlen = nextlen, nextlen = tree[(n + 1) * 2 + 1], ++count < max_count && curlen === nextlen)\n continue;\n else if (count < min_count)\n do\n send_code(s, curlen, s.bl_tree);\n while (--count !== 0);\n else if (curlen !== 0) {\n if (curlen !== prevlen)\n send_code(s, curlen, s.bl_tree), count--;\n send_code(s, REP_3_6, s.bl_tree), send_bits(s, count - 3, 2);\n } else if (count <= 10)\n send_code(s, REPZ_3_10, s.bl_tree), send_bits(s, count - 3, 3);\n else\n send_code(s, REPZ_11_138, s.bl_tree), send_bits(s, count - 11, 7);\n if (count = 0, prevlen = curlen, nextlen === 0)\n max_count = 138, min_count = 3;\n else if (curlen === nextlen)\n max_count = 6, min_count = 3;\n else\n max_count = 7, min_count = 4;\n }\n }\n function build_bl_tree(s) {\n var max_blindex;\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code), scan_tree(s, s.dyn_dtree, s.d_desc.max_code), build_tree(s, s.bl_desc);\n for (max_blindex = BL_CODES - 1;max_blindex >= 3; max_blindex--)\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1] !== 0)\n break;\n return s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4, max_blindex;\n }\n function send_all_trees(s, lcodes, dcodes, blcodes) {\n var rank;\n send_bits(s, lcodes - 257, 5), send_bits(s, dcodes - 1, 5), send_bits(s, blcodes - 4, 4);\n for (rank = 0;rank < blcodes; rank++)\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1], 3);\n send_tree(s, s.dyn_ltree, lcodes - 1), send_tree(s, s.dyn_dtree, dcodes - 1);\n }\n function detect_data_type(s) {\n var black_mask = 4093624447, n;\n for (n = 0;n <= 31; n++, black_mask >>>= 1)\n if (black_mask & 1 && s.dyn_ltree[n * 2] !== 0)\n return Z_BINARY;\n if (s.dyn_ltree[18] !== 0 || s.dyn_ltree[20] !== 0 || s.dyn_ltree[26] !== 0)\n return Z_TEXT;\n for (n = 32;n < LITERALS; n++)\n if (s.dyn_ltree[n * 2] !== 0)\n return Z_TEXT;\n return Z_BINARY;\n }\n var static_init_done = !1;\n function _tr_init(s) {\n if (!static_init_done)\n tr_static_init(), static_init_done = !0;\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc), s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc), s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc), s.bi_buf = 0, s.bi_valid = 0, init_block(s);\n }\n function _tr_stored_block(s, buf, stored_len, last) {\n send_bits(s, (STORED_BLOCK << 1) + (last \? 1 : 0), 3), copy_block(s, buf, stored_len, !0);\n }\n function _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3), send_code(s, END_BLOCK, static_ltree), bi_flush(s);\n }\n function _tr_flush_block(s, buf, stored_len, last) {\n var opt_lenb, static_lenb, max_blindex = 0;\n if (s.level > 0) {\n if (s.strm.data_type === Z_UNKNOWN)\n s.strm.data_type = detect_data_type(s);\n if (build_tree(s, s.l_desc), build_tree(s, s.d_desc), max_blindex = build_bl_tree(s), opt_lenb = s.opt_len + 3 + 7 >>> 3, static_lenb = s.static_len + 3 + 7 >>> 3, static_lenb <= opt_lenb)\n opt_lenb = static_lenb;\n } else\n opt_lenb = static_lenb = stored_len + 5;\n if (stored_len + 4 <= opt_lenb && buf !== -1)\n _tr_stored_block(s, buf, stored_len, last);\n else if (s.strategy === Z_FIXED || static_lenb === opt_lenb)\n send_bits(s, (STATIC_TREES << 1) + (last \? 1 : 0), 3), compress_block(s, static_ltree, static_dtree);\n else\n send_bits(s, (DYN_TREES << 1) + (last \? 1 : 0), 3), send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1), compress_block(s, s.dyn_ltree, s.dyn_dtree);\n if (init_block(s), last)\n bi_windup(s);\n }\n function _tr_tally(s, dist, lc) {\n if (s.pending_buf[s.d_buf + s.last_lit * 2] = dist >>> 8 & 255, s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 255, s.pending_buf[s.l_buf + s.last_lit] = lc & 255, s.last_lit++, dist === 0)\n s.dyn_ltree[lc * 2]++;\n else\n s.matches++, dist--, s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]++, s.dyn_dtree[d_code(dist) * 2]++;\n return s.last_lit === s.lit_bufsize - 1;\n }\n exports._tr_init = _tr_init, exports._tr_stored_block = _tr_stored_block, exports._tr_flush_block = _tr_flush_block, exports._tr_tally = _tr_tally, exports._tr_align = _tr_align;\n }\n}), require_adler32 = __commonJS({\n \"node_modules/pako/lib/zlib/adler32.js\"(exports, module2) {\n function adler32(adler, buf, len, pos) {\n var s1 = adler & 65535 | 0, s2 = adler >>> 16 & 65535 | 0, n = 0;\n while (len !== 0) {\n n = len > 2000 \? 2000 : len, len -= n;\n do\n s1 = s1 + buf[pos++] | 0, s2 = s2 + s1 | 0;\n while (--n);\n s1 %= 65521, s2 %= 65521;\n }\n return s1 | s2 << 16 | 0;\n }\n module2.exports = adler32;\n }\n}), require_crc32 = __commonJS({\n \"node_modules/pako/lib/zlib/crc32.js\"(exports, module2) {\n function makeTable() {\n var c, table = [];\n for (var n = 0;n < 256; n++) {\n c = n;\n for (var k = 0;k < 8; k++)\n c = c & 1 \? 3988292384 ^ c >>> 1 : c >>> 1;\n table[n] = c;\n }\n return table;\n }\n var crcTable = makeTable();\n function crc32(crc, buf, len, pos) {\n var t = crcTable, end = pos + len;\n crc ^= -1;\n for (var i = pos;i < end; i++)\n crc = crc >>> 8 ^ t[(crc ^ buf[i]) & 255];\n return crc ^ -1;\n }\n module2.exports = crc32;\n }\n}), require_messages = __commonJS({\n \"node_modules/pako/lib/zlib/messages.js\"(exports, module2) {\n module2.exports = {\n 2: \"need dictionary\",\n 1: \"stream end\",\n 0: \"\",\n \"-1\": \"file error\",\n \"-2\": \"stream error\",\n \"-3\": \"data error\",\n \"-4\": \"insufficient memory\",\n \"-5\": \"buffer error\",\n \"-6\": \"incompatible version\"\n };\n }\n}), require_deflate = __commonJS({\n \"node_modules/pako/lib/zlib/deflate.js\"(exports) {\n var utils = require_common(), trees = require_trees(), adler32 = require_adler32(), crc32 = require_crc32(), msg = require_messages(), Z_NO_FLUSH = 0, Z_PARTIAL_FLUSH = 1, Z_FULL_FLUSH = 3, Z_FINISH = 4, Z_BLOCK = 5, Z_OK = 0, Z_STREAM_END = 1, Z_STREAM_ERROR = -2, Z_DATA_ERROR = -3, Z_BUF_ERROR = -5, Z_DEFAULT_COMPRESSION = -1, Z_FILTERED = 1, Z_HUFFMAN_ONLY = 2, Z_RLE = 3, Z_FIXED = 4, Z_DEFAULT_STRATEGY = 0, Z_UNKNOWN = 2, Z_DEFLATED = 8, MAX_MEM_LEVEL = 9, MAX_WBITS = 15, DEF_MEM_LEVEL = 8, LENGTH_CODES = 29, LITERALS = 256, L_CODES = LITERALS + 1 + LENGTH_CODES, D_CODES = 30, BL_CODES = 19, HEAP_SIZE = 2 * L_CODES + 1, MAX_BITS = 15, MIN_MATCH = 3, MAX_MATCH = 258, MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1, PRESET_DICT = 32, INIT_STATE = 42, EXTRA_STATE = 69, NAME_STATE = 73, COMMENT_STATE = 91, HCRC_STATE = 103, BUSY_STATE = 113, FINISH_STATE = 666, BS_NEED_MORE = 1, BS_BLOCK_DONE = 2, BS_FINISH_STARTED = 3, BS_FINISH_DONE = 4, OS_CODE = 3;\n function err(strm, errorCode) {\n return strm.msg = msg[errorCode], errorCode;\n }\n function rank(f) {\n return (f << 1) - (f > 4 \? 9 : 0);\n }\n function zero(buf) {\n var len = buf.length;\n while (--len >= 0)\n buf[len] = 0;\n }\n function flush_pending(strm) {\n var s = strm.state, len = s.pending;\n if (len > strm.avail_out)\n len = strm.avail_out;\n if (len === 0)\n return;\n if (utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out), strm.next_out += len, s.pending_out += len, strm.total_out += len, strm.avail_out -= len, s.pending -= len, s.pending === 0)\n s.pending_out = 0;\n }\n function flush_block_only(s, last) {\n trees._tr_flush_block(s, s.block_start >= 0 \? s.block_start : -1, s.strstart - s.block_start, last), s.block_start = s.strstart, flush_pending(s.strm);\n }\n function put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n }\n function putShortMSB(s, b) {\n s.pending_buf[s.pending++] = b >>> 8 & 255, s.pending_buf[s.pending++] = b & 255;\n }\n function read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n if (len > size)\n len = size;\n if (len === 0)\n return 0;\n if (strm.avail_in -= len, utils.arraySet(buf, strm.input, strm.next_in, len, start), strm.state.wrap === 1)\n strm.adler = adler32(strm.adler, buf, len, start);\n else if (strm.state.wrap === 2)\n strm.adler = crc32(strm.adler, buf, len, start);\n return strm.next_in += len, strm.total_in += len, len;\n }\n function longest_match(s, cur_match) {\n var { max_chain_length: chain_length, strstart: scan } = s, match, len, best_len = s.prev_length, nice_match = s.nice_match, limit = s.strstart > s.w_size - MIN_LOOKAHEAD \? s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0, _win = s.window, wmask = s.w_mask, prev = s.prev, strend = s.strstart + MAX_MATCH, scan_end1 = _win[scan + best_len - 1], scan_end = _win[scan + best_len];\n if (s.prev_length >= s.good_match)\n chain_length >>= 2;\n if (nice_match > s.lookahead)\n nice_match = s.lookahead;\n do {\n if (match = cur_match, _win[match + best_len] !== scan_end || _win[match + best_len - 1] !== scan_end1 || _win[match] !== _win[scan] || _win[++match] !== _win[scan + 1])\n continue;\n scan += 2, match++;\n do\n ;\n while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && scan < strend);\n if (len = MAX_MATCH - (strend - scan), scan = strend - MAX_MATCH, len > best_len) {\n if (s.match_start = cur_match, best_len = len, len >= nice_match)\n break;\n scan_end1 = _win[scan + best_len - 1], scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n if (best_len <= s.lookahead)\n return best_len;\n return s.lookahead;\n }\n function fill_window(s) {\n var _w_size = s.w_size, p, n, m, more, str;\n do {\n if (more = s.window_size - s.lookahead - s.strstart, s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0), s.match_start -= _w_size, s.strstart -= _w_size, s.block_start -= _w_size, n = s.hash_size, p = n;\n do\n m = s.head[--p], s.head[p] = m >= _w_size \? m - _w_size : 0;\n while (--n);\n n = _w_size, p = n;\n do\n m = s.prev[--p], s.prev[p] = m >= _w_size \? m - _w_size : 0;\n while (--n);\n more += _w_size;\n }\n if (s.strm.avail_in === 0)\n break;\n if (n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more), s.lookahead += n, s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert, s.ins_h = s.window[str], s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + 1]) & s.hash_mask;\n while (s.insert)\n if (s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask, s.prev[str & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = str, str++, s.insert--, s.lookahead + s.insert < MIN_MATCH)\n break;\n }\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n }\n function deflate_stored(s, flush) {\n var max_block_size = 65535;\n if (max_block_size > s.pending_buf_size - 5)\n max_block_size = s.pending_buf_size - 5;\n for (;; ) {\n if (s.lookahead <= 1) {\n if (fill_window(s), s.lookahead === 0 && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n s.strstart += s.lookahead, s.lookahead = 0;\n var max_start = s.block_start + max_block_size;\n if (s.strstart === 0 || s.strstart >= max_start) {\n if (s.lookahead = s.strstart - max_start, s.strstart = max_start, flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n if (s.strstart - s.block_start >= s.w_size - MIN_LOOKAHEAD) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = 0, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.strstart > s.block_start) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_NEED_MORE;\n }\n function deflate_fast(s, flush) {\n var hash_head, bflush;\n for (;; ) {\n if (s.lookahead < MIN_LOOKAHEAD) {\n if (fill_window(s), s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n if (hash_head = 0, s.lookahead >= MIN_MATCH)\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n if (hash_head !== 0 && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD)\n s.match_length = longest_match(s, hash_head);\n if (s.match_length >= MIN_MATCH)\n if (bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH), s.lookahead -= s.match_length, s.match_length <= s.max_lazy_match && s.lookahead >= MIN_MATCH) {\n s.match_length--;\n do\n s.strstart++, s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n while (--s.match_length !== 0);\n s.strstart++;\n } else\n s.strstart += s.match_length, s.match_length = 0, s.ins_h = s.window[s.strstart], s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + 1]) & s.hash_mask;\n else\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++;\n if (bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = s.strstart < MIN_MATCH - 1 \? s.strstart : MIN_MATCH - 1, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function deflate_slow(s, flush) {\n var hash_head, bflush, max_insert;\n for (;; ) {\n if (s.lookahead < MIN_LOOKAHEAD) {\n if (fill_window(s), s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n if (hash_head = 0, s.lookahead >= MIN_MATCH)\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n if (s.prev_length = s.match_length, s.prev_match = s.match_start, s.match_length = MIN_MATCH - 1, hash_head !== 0 && s.prev_length < s.max_lazy_match && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) {\n if (s.match_length = longest_match(s, hash_head), s.match_length <= 5 && (s.strategy === Z_FILTERED || s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096))\n s.match_length = MIN_MATCH - 1;\n }\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH, bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH), s.lookahead -= s.prev_length - 1, s.prev_length -= 2;\n do\n if (++s.strstart <= max_insert)\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask, hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart;\n while (--s.prev_length !== 0);\n if (s.match_available = 0, s.match_length = MIN_MATCH - 1, s.strstart++, bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n } else if (s.match_available) {\n if (bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]), bflush)\n flush_block_only(s, !1);\n if (s.strstart++, s.lookahead--, s.strm.avail_out === 0)\n return BS_NEED_MORE;\n } else\n s.match_available = 1, s.strstart++, s.lookahead--;\n }\n if (s.match_available)\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]), s.match_available = 0;\n if (s.insert = s.strstart < MIN_MATCH - 1 \? s.strstart : MIN_MATCH - 1, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function deflate_rle(s, flush) {\n var bflush, prev, scan, strend, _win = s.window;\n for (;; ) {\n if (s.lookahead <= MAX_MATCH) {\n if (fill_window(s), s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n if (s.lookahead === 0)\n break;\n }\n if (s.match_length = 0, s.lookahead >= MIN_MATCH && s.strstart > 0) {\n if (scan = s.strstart - 1, prev = _win[scan], prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do\n ;\n while (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && scan < strend);\n if (s.match_length = MAX_MATCH - (strend - scan), s.match_length > s.lookahead)\n s.match_length = s.lookahead;\n }\n }\n if (s.match_length >= MIN_MATCH)\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH), s.lookahead -= s.match_length, s.strstart += s.match_length, s.match_length = 0;\n else\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++;\n if (bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = 0, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function deflate_huff(s, flush) {\n var bflush;\n for (;; ) {\n if (s.lookahead === 0) {\n if (fill_window(s), s.lookahead === 0) {\n if (flush === Z_NO_FLUSH)\n return BS_NEED_MORE;\n break;\n }\n }\n if (s.match_length = 0, bflush = trees._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++, bflush) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n }\n if (s.insert = 0, flush === Z_FINISH) {\n if (flush_block_only(s, !0), s.strm.avail_out === 0)\n return BS_FINISH_STARTED;\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n if (flush_block_only(s, !1), s.strm.avail_out === 0)\n return BS_NEED_MORE;\n }\n return BS_BLOCK_DONE;\n }\n function Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length, this.max_lazy = max_lazy, this.nice_length = nice_length, this.max_chain = max_chain, this.func = func;\n }\n var configuration_table = [\n new Config(0, 0, 0, 0, deflate_stored),\n new Config(4, 4, 8, 4, deflate_fast),\n new Config(4, 5, 16, 8, deflate_fast),\n new Config(4, 6, 32, 32, deflate_fast),\n new Config(4, 4, 16, 16, deflate_slow),\n new Config(8, 16, 32, 32, deflate_slow),\n new Config(8, 16, 128, 128, deflate_slow),\n new Config(8, 32, 128, 256, deflate_slow),\n new Config(32, 128, 258, 1024, deflate_slow),\n new Config(32, 258, 258, 4096, deflate_slow)\n ];\n function lm_init(s) {\n s.window_size = 2 * s.w_size, zero(s.head), s.max_lazy_match = configuration_table[s.level].max_lazy, s.good_match = configuration_table[s.level].good_length, s.nice_match = configuration_table[s.level].nice_length, s.max_chain_length = configuration_table[s.level].max_chain, s.strstart = 0, s.block_start = 0, s.lookahead = 0, s.insert = 0, s.match_length = s.prev_length = MIN_MATCH - 1, s.match_available = 0, s.ins_h = 0;\n }\n function DeflateState() {\n this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = Z_DEFLATED, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2), this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2), this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2), zero(this.dyn_ltree), zero(this.dyn_dtree), zero(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new utils.Buf16(MAX_BITS + 1), this.heap = new utils.Buf16(2 * L_CODES + 1), zero(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new utils.Buf16(2 * L_CODES + 1), zero(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;\n }\n function deflateResetKeep(strm) {\n var s;\n if (!strm || !strm.state)\n return err(strm, Z_STREAM_ERROR);\n if (strm.total_in = strm.total_out = 0, strm.data_type = Z_UNKNOWN, s = strm.state, s.pending = 0, s.pending_out = 0, s.wrap < 0)\n s.wrap = -s.wrap;\n return s.status = s.wrap \? INIT_STATE : BUSY_STATE, strm.adler = s.wrap === 2 \? 0 : 1, s.last_flush = Z_NO_FLUSH, trees._tr_init(s), Z_OK;\n }\n function deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK)\n lm_init(strm.state);\n return ret;\n }\n function deflateSetHeader(strm, head) {\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (strm.state.wrap !== 2)\n return Z_STREAM_ERROR;\n return strm.state.gzhead = head, Z_OK;\n }\n function deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm)\n return Z_STREAM_ERROR;\n var wrap = 1;\n if (level === Z_DEFAULT_COMPRESSION)\n level = 6;\n if (windowBits < 0)\n wrap = 0, windowBits = -windowBits;\n else if (windowBits > 15)\n wrap = 2, windowBits -= 16;\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED)\n return err(strm, Z_STREAM_ERROR);\n if (windowBits === 8)\n windowBits = 9;\n var s = new DeflateState;\n return strm.state = s, s.strm = strm, s.wrap = wrap, s.gzhead = null, s.w_bits = windowBits, s.w_size = 1 << s.w_bits, s.w_mask = s.w_size - 1, s.hash_bits = memLevel + 7, s.hash_size = 1 << s.hash_bits, s.hash_mask = s.hash_size - 1, s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH), s.window = new utils.Buf8(s.w_size * 2), s.head = new utils.Buf16(s.hash_size), s.prev = new utils.Buf16(s.w_size), s.lit_bufsize = 1 << memLevel + 6, s.pending_buf_size = s.lit_bufsize * 4, s.pending_buf = new utils.Buf8(s.pending_buf_size), s.d_buf = 1 * s.lit_bufsize, s.l_buf = 3 * s.lit_bufsize, s.level = level, s.strategy = strategy, s.method = method, deflateReset(strm);\n }\n function deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n }\n function deflate(strm, flush) {\n var old_flush, s, beg, val;\n if (!strm || !strm.state || flush > Z_BLOCK || flush < 0)\n return strm \? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n if (s = strm.state, !strm.output || !strm.input && strm.avail_in !== 0 || s.status === FINISH_STATE && flush !== Z_FINISH)\n return err(strm, strm.avail_out === 0 \? Z_BUF_ERROR : Z_STREAM_ERROR);\n if (s.strm = strm, old_flush = s.last_flush, s.last_flush = flush, s.status === INIT_STATE)\n if (s.wrap === 2)\n if (strm.adler = 0, put_byte(s, 31), put_byte(s, 139), put_byte(s, 8), !s.gzhead)\n put_byte(s, 0), put_byte(s, 0), put_byte(s, 0), put_byte(s, 0), put_byte(s, 0), put_byte(s, s.level === 9 \? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 \? 4 : 0), put_byte(s, OS_CODE), s.status = BUSY_STATE;\n else {\n if (put_byte(s, (s.gzhead.text \? 1 : 0) + (s.gzhead.hcrc \? 2 : 0) + (!s.gzhead.extra \? 0 : 4) + (!s.gzhead.name \? 0 : 8) + (!s.gzhead.comment \? 0 : 16)), put_byte(s, s.gzhead.time & 255), put_byte(s, s.gzhead.time >> 8 & 255), put_byte(s, s.gzhead.time >> 16 & 255), put_byte(s, s.gzhead.time >> 24 & 255), put_byte(s, s.level === 9 \? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 \? 4 : 0), put_byte(s, s.gzhead.os & 255), s.gzhead.extra && s.gzhead.extra.length)\n put_byte(s, s.gzhead.extra.length & 255), put_byte(s, s.gzhead.extra.length >> 8 & 255);\n if (s.gzhead.hcrc)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n s.gzindex = 0, s.status = EXTRA_STATE;\n }\n else {\n var header = Z_DEFLATED + (s.w_bits - 8 << 4) << 8, level_flags = -1;\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2)\n level_flags = 0;\n else if (s.level < 6)\n level_flags = 1;\n else if (s.level === 6)\n level_flags = 2;\n else\n level_flags = 3;\n if (header |= level_flags << 6, s.strstart !== 0)\n header |= PRESET_DICT;\n if (header += 31 - header % 31, s.status = BUSY_STATE, putShortMSB(s, header), s.strstart !== 0)\n putShortMSB(s, strm.adler >>> 16), putShortMSB(s, strm.adler & 65535);\n strm.adler = 1;\n }\n if (s.status === EXTRA_STATE)\n if (s.gzhead.extra) {\n beg = s.pending;\n while (s.gzindex < (s.gzhead.extra.length & 65535)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (flush_pending(strm), beg = s.pending, s.pending === s.pending_buf_size)\n break;\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 255), s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (s.gzindex === s.gzhead.extra.length)\n s.gzindex = 0, s.status = NAME_STATE;\n } else\n s.status = NAME_STATE;\n if (s.status === NAME_STATE)\n if (s.gzhead.name) {\n beg = s.pending;\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (flush_pending(strm), beg = s.pending, s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n if (s.gzindex < s.gzhead.name.length)\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 255;\n else\n val = 0;\n put_byte(s, val);\n } while (val !== 0);\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (val === 0)\n s.gzindex = 0, s.status = COMMENT_STATE;\n } else\n s.status = COMMENT_STATE;\n if (s.status === COMMENT_STATE)\n if (s.gzhead.comment) {\n beg = s.pending;\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (flush_pending(strm), beg = s.pending, s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n if (s.gzindex < s.gzhead.comment.length)\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 255;\n else\n val = 0;\n put_byte(s, val);\n } while (val !== 0);\n if (s.gzhead.hcrc && s.pending > beg)\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n if (val === 0)\n s.status = HCRC_STATE;\n } else\n s.status = HCRC_STATE;\n if (s.status === HCRC_STATE)\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size)\n flush_pending(strm);\n if (s.pending + 2 <= s.pending_buf_size)\n put_byte(s, strm.adler & 255), put_byte(s, strm.adler >> 8 & 255), strm.adler = 0, s.status = BUSY_STATE;\n } else\n s.status = BUSY_STATE;\n if (s.pending !== 0) {\n if (flush_pending(strm), strm.avail_out === 0)\n return s.last_flush = -1, Z_OK;\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && flush !== Z_FINISH)\n return err(strm, Z_BUF_ERROR);\n if (s.status === FINISH_STATE && strm.avail_in !== 0)\n return err(strm, Z_BUF_ERROR);\n if (strm.avail_in !== 0 || s.lookahead !== 0 || flush !== Z_NO_FLUSH && s.status !== FINISH_STATE) {\n var bstate = s.strategy === Z_HUFFMAN_ONLY \? deflate_huff(s, flush) : s.strategy === Z_RLE \? deflate_rle(s, flush) : configuration_table[s.level].func(s, flush);\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE)\n s.status = FINISH_STATE;\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0)\n s.last_flush = -1;\n return Z_OK;\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH)\n trees._tr_align(s);\n else if (flush !== Z_BLOCK) {\n if (trees._tr_stored_block(s, 0, 0, !1), flush === Z_FULL_FLUSH) {\n if (zero(s.head), s.lookahead === 0)\n s.strstart = 0, s.block_start = 0, s.insert = 0;\n }\n }\n if (flush_pending(strm), strm.avail_out === 0)\n return s.last_flush = -1, Z_OK;\n }\n }\n if (flush !== Z_FINISH)\n return Z_OK;\n if (s.wrap <= 0)\n return Z_STREAM_END;\n if (s.wrap === 2)\n put_byte(s, strm.adler & 255), put_byte(s, strm.adler >> 8 & 255), put_byte(s, strm.adler >> 16 & 255), put_byte(s, strm.adler >> 24 & 255), put_byte(s, strm.total_in & 255), put_byte(s, strm.total_in >> 8 & 255), put_byte(s, strm.total_in >> 16 & 255), put_byte(s, strm.total_in >> 24 & 255);\n else\n putShortMSB(s, strm.adler >>> 16), putShortMSB(s, strm.adler & 65535);\n if (flush_pending(strm), s.wrap > 0)\n s.wrap = -s.wrap;\n return s.pending !== 0 \? Z_OK : Z_STREAM_END;\n }\n function deflateEnd(strm) {\n var status;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (status = strm.state.status, status !== INIT_STATE && status !== EXTRA_STATE && status !== NAME_STATE && status !== COMMENT_STATE && status !== HCRC_STATE && status !== BUSY_STATE && status !== FINISH_STATE)\n return err(strm, Z_STREAM_ERROR);\n return strm.state = null, status === BUSY_STATE \? err(strm, Z_DATA_ERROR) : Z_OK;\n }\n function deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length, s, str, n, wrap, avail, next, input, tmpDict;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (s = strm.state, wrap = s.wrap, wrap === 2 || wrap === 1 && s.status !== INIT_STATE || s.lookahead)\n return Z_STREAM_ERROR;\n if (wrap === 1)\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n if (s.wrap = 0, dictLength >= s.w_size) {\n if (wrap === 0)\n zero(s.head), s.strstart = 0, s.block_start = 0, s.insert = 0;\n tmpDict = new utils.Buf8(s.w_size), utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0), dictionary = tmpDict, dictLength = s.w_size;\n }\n avail = strm.avail_in, next = strm.next_in, input = strm.input, strm.avail_in = dictLength, strm.next_in = 0, strm.input = dictionary, fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart, n = s.lookahead - (MIN_MATCH - 1);\n do\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask, s.prev[str & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = str, str++;\n while (--n);\n s.strstart = str, s.lookahead = MIN_MATCH - 1, fill_window(s);\n }\n return s.strstart += s.lookahead, s.block_start = s.strstart, s.insert = s.lookahead, s.lookahead = 0, s.match_length = s.prev_length = MIN_MATCH - 1, s.match_available = 0, strm.next_in = next, strm.input = input, strm.avail_in = avail, s.wrap = wrap, Z_OK;\n }\n exports.deflateInit = deflateInit, exports.deflateInit2 = deflateInit2, exports.deflateReset = deflateReset, exports.deflateResetKeep = deflateResetKeep, exports.deflateSetHeader = deflateSetHeader, exports.deflate = deflate, exports.deflateEnd = deflateEnd, exports.deflateSetDictionary = deflateSetDictionary, exports.deflateInfo = \"pako deflate (from Nodeca project)\";\n }\n}), require_inffast = __commonJS({\n \"node_modules/pako/lib/zlib/inffast.js\"(exports, module2) {\n var BAD = 30, TYPE = 12;\n module2.exports = function inflate_fast(strm, start) {\n var state, _in, last, _out, beg, end, dmax, wsize, whave, wnext, s_window, hold, bits, lcode, dcode, lmask, dmask, here, op, len, dist, from, from_source, input, output;\n state = strm.state, _in = strm.next_in, input = strm.input, last = _in + (strm.avail_in - 5), _out = strm.next_out, output = strm.output, beg = _out - (start - strm.avail_out), end = _out + (strm.avail_out - 257), dmax = state.dmax, wsize = state.wsize, whave = state.whave, wnext = state.wnext, s_window = state.window, hold = state.hold, bits = state.bits, lcode = state.lencode, dcode = state.distcode, lmask = (1 << state.lenbits) - 1, dmask = (1 << state.distbits) - 1;\n top:\n do {\n if (bits < 15)\n hold += input[_in++] << bits, bits += 8, hold += input[_in++] << bits, bits += 8;\n here = lcode[hold & lmask];\n dolen:\n for (;; ) {\n if (op = here >>> 24, hold >>>= op, bits -= op, op = here >>> 16 & 255, op === 0)\n output[_out++] = here & 65535;\n else if (op & 16) {\n if (len = here & 65535, op &= 15, op) {\n if (bits < op)\n hold += input[_in++] << bits, bits += 8;\n len += hold & (1 << op) - 1, hold >>>= op, bits -= op;\n }\n if (bits < 15)\n hold += input[_in++] << bits, bits += 8, hold += input[_in++] << bits, bits += 8;\n here = dcode[hold & dmask];\n dodist:\n for (;; ) {\n if (op = here >>> 24, hold >>>= op, bits -= op, op = here >>> 16 & 255, op & 16) {\n if (dist = here & 65535, op &= 15, bits < op) {\n if (hold += input[_in++] << bits, bits += 8, bits < op)\n hold += input[_in++] << bits, bits += 8;\n }\n if (dist += hold & (1 << op) - 1, dist > dmax) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break top;\n }\n if (hold >>>= op, bits -= op, op = _out - beg, dist > op) {\n if (op = dist - op, op > whave) {\n if (state.sane) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break top;\n }\n }\n if (from = 0, from_source = s_window, wnext === 0) {\n if (from += wsize - op, op < len) {\n len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n from = _out - dist, from_source = output;\n }\n } else if (wnext < op) {\n if (from += wsize + wnext - op, op -= wnext, op < len) {\n len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n if (from = 0, wnext < len) {\n op = wnext, len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n from = _out - dist, from_source = output;\n }\n }\n } else if (from += wnext - op, op < len) {\n len -= op;\n do\n output[_out++] = s_window[from++];\n while (--op);\n from = _out - dist, from_source = output;\n }\n while (len > 2)\n output[_out++] = from_source[from++], output[_out++] = from_source[from++], output[_out++] = from_source[from++], len -= 3;\n if (len) {\n if (output[_out++] = from_source[from++], len > 1)\n output[_out++] = from_source[from++];\n }\n } else {\n from = _out - dist;\n do\n output[_out++] = output[from++], output[_out++] = output[from++], output[_out++] = output[from++], len -= 3;\n while (len > 2);\n if (len) {\n if (output[_out++] = output[from++], len > 1)\n output[_out++] = output[from++];\n }\n }\n } else if ((op & 64) === 0) {\n here = dcode[(here & 65535) + (hold & (1 << op) - 1)];\n continue dodist;\n } else {\n strm.msg = \"invalid distance code\", state.mode = BAD;\n break top;\n }\n break;\n }\n } else if ((op & 64) === 0) {\n here = lcode[(here & 65535) + (hold & (1 << op) - 1)];\n continue dolen;\n } else if (op & 32) {\n state.mode = TYPE;\n break top;\n } else {\n strm.msg = \"invalid literal/length code\", state.mode = BAD;\n break top;\n }\n break;\n }\n } while (_in < last && _out < end);\n len = bits >> 3, _in -= len, bits -= len << 3, hold &= (1 << bits) - 1, strm.next_in = _in, strm.next_out = _out, strm.avail_in = _in < last \? 5 + (last - _in) : 5 - (_in - last), strm.avail_out = _out < end \? 257 + (end - _out) : 257 - (_out - end), state.hold = hold, state.bits = bits;\n return;\n };\n }\n}), require_inftrees = __commonJS({\n \"node_modules/pako/lib/zlib/inftrees.js\"(exports, module2) {\n var utils = require_common(), MAXBITS = 15, ENOUGH_LENS = 852, ENOUGH_DISTS = 592, CODES = 0, LENS = 1, DISTS = 2, lbase = [\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 13,\n 15,\n 17,\n 19,\n 23,\n 27,\n 31,\n 35,\n 43,\n 51,\n 59,\n 67,\n 83,\n 99,\n 115,\n 131,\n 163,\n 195,\n 227,\n 258,\n 0,\n 0\n ], lext = [\n 16,\n 16,\n 16,\n 16,\n 16,\n 16,\n 16,\n 16,\n 17,\n 17,\n 17,\n 17,\n 18,\n 18,\n 18,\n 18,\n 19,\n 19,\n 19,\n 19,\n 20,\n 20,\n 20,\n 20,\n 21,\n 21,\n 21,\n 21,\n 16,\n 72,\n 78\n ], dbase = [\n 1,\n 2,\n 3,\n 4,\n 5,\n 7,\n 9,\n 13,\n 17,\n 25,\n 33,\n 49,\n 65,\n 97,\n 129,\n 193,\n 257,\n 385,\n 513,\n 769,\n 1025,\n 1537,\n 2049,\n 3073,\n 4097,\n 6145,\n 8193,\n 12289,\n 16385,\n 24577,\n 0,\n 0\n ], dext = [\n 16,\n 16,\n 16,\n 16,\n 17,\n 17,\n 18,\n 18,\n 19,\n 19,\n 20,\n 20,\n 21,\n 21,\n 22,\n 22,\n 23,\n 23,\n 24,\n 24,\n 25,\n 25,\n 26,\n 26,\n 27,\n 27,\n 28,\n 28,\n 29,\n 29,\n 64,\n 64\n ];\n module2.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) {\n var bits = opts.bits, len = 0, sym = 0, min = 0, max = 0, root = 0, curr = 0, drop = 0, left = 0, used = 0, huff = 0, incr, fill, low, mask, next, base = null, base_index = 0, end, count = new utils.Buf16(MAXBITS + 1), offs = new utils.Buf16(MAXBITS + 1), extra = null, extra_index = 0, here_bits, here_op, here_val;\n for (len = 0;len <= MAXBITS; len++)\n count[len] = 0;\n for (sym = 0;sym < codes; sym++)\n count[lens[lens_index + sym]]++;\n root = bits;\n for (max = MAXBITS;max >= 1; max--)\n if (count[max] !== 0)\n break;\n if (root > max)\n root = max;\n if (max === 0)\n return table[table_index++] = 1 << 24 | 64 << 16 | 0, table[table_index++] = 1 << 24 | 64 << 16 | 0, opts.bits = 1, 0;\n for (min = 1;min < max; min++)\n if (count[min] !== 0)\n break;\n if (root < min)\n root = min;\n left = 1;\n for (len = 1;len <= MAXBITS; len++)\n if (left <<= 1, left -= count[len], left < 0)\n return -1;\n if (left > 0 && (type === CODES || max !== 1))\n return -1;\n offs[1] = 0;\n for (len = 1;len < MAXBITS; len++)\n offs[len + 1] = offs[len] + count[len];\n for (sym = 0;sym < codes; sym++)\n if (lens[lens_index + sym] !== 0)\n work[offs[lens[lens_index + sym]]++] = sym;\n if (type === CODES)\n base = extra = work, end = 19;\n else if (type === LENS)\n base = lbase, base_index -= 257, extra = lext, extra_index -= 257, end = 256;\n else\n base = dbase, extra = dext, end = -1;\n if (huff = 0, sym = 0, len = min, next = table_index, curr = root, drop = 0, low = -1, used = 1 << root, mask = used - 1, type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS)\n return 1;\n for (;; ) {\n if (here_bits = len - drop, work[sym] < end)\n here_op = 0, here_val = work[sym];\n else if (work[sym] > end)\n here_op = extra[extra_index + work[sym]], here_val = base[base_index + work[sym]];\n else\n here_op = 96, here_val = 0;\n incr = 1 << len - drop, fill = 1 << curr, min = fill;\n do\n fill -= incr, table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0;\n while (fill !== 0);\n incr = 1 << len - 1;\n while (huff & incr)\n incr >>= 1;\n if (incr !== 0)\n huff &= incr - 1, huff += incr;\n else\n huff = 0;\n if (sym++, --count[len] === 0) {\n if (len === max)\n break;\n len = lens[lens_index + work[sym]];\n }\n if (len > root && (huff & mask) !== low) {\n if (drop === 0)\n drop = root;\n next += min, curr = len - drop, left = 1 << curr;\n while (curr + drop < max) {\n if (left -= count[curr + drop], left <= 0)\n break;\n curr++, left <<= 1;\n }\n if (used += 1 << curr, type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS)\n return 1;\n low = huff & mask, table[low] = root << 24 | curr << 16 | next - table_index | 0;\n }\n }\n if (huff !== 0)\n table[next + huff] = len - drop << 24 | 64 << 16 | 0;\n return opts.bits = root, 0;\n };\n }\n}), require_inflate = __commonJS({\n \"node_modules/pako/lib/zlib/inflate.js\"(exports) {\n var utils = require_common(), adler32 = require_adler32(), crc32 = require_crc32(), inflate_fast = require_inffast(), inflate_table = require_inftrees(), CODES = 0, LENS = 1, DISTS = 2, Z_FINISH = 4, Z_BLOCK = 5, Z_TREES = 6, Z_OK = 0, Z_STREAM_END = 1, Z_NEED_DICT = 2, Z_STREAM_ERROR = -2, Z_DATA_ERROR = -3, Z_MEM_ERROR = -4, Z_BUF_ERROR = -5, Z_DEFLATED = 8, HEAD = 1, FLAGS = 2, TIME = 3, OS = 4, EXLEN = 5, EXTRA = 6, NAME = 7, COMMENT = 8, HCRC = 9, DICTID = 10, DICT = 11, TYPE = 12, TYPEDO = 13, STORED = 14, COPY_ = 15, COPY = 16, TABLE = 17, LENLENS = 18, CODELENS = 19, LEN_ = 20, LEN = 21, LENEXT = 22, DIST = 23, DISTEXT = 24, MATCH = 25, LIT = 26, CHECK = 27, LENGTH = 28, DONE = 29, BAD = 30, MEM = 31, SYNC = 32, ENOUGH_LENS = 852, ENOUGH_DISTS = 592, MAX_WBITS = 15, DEF_WBITS = MAX_WBITS;\n function zswap32(q) {\n return (q >>> 24 & 255) + (q >>> 8 & 65280) + ((q & 65280) << 8) + ((q & 255) << 24);\n }\n function InflateState() {\n this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new utils.Buf16(320), this.work = new utils.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;\n }\n function inflateResetKeep(strm) {\n var state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, strm.total_in = strm.total_out = state.total = 0, strm.msg = \"\", state.wrap)\n strm.adler = state.wrap & 1;\n return state.mode = HEAD, state.last = 0, state.havedict = 0, state.dmax = 32768, state.head = null, state.hold = 0, state.bits = 0, state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS), state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS), state.sane = 1, state.back = -1, Z_OK;\n }\n function inflateReset(strm) {\n var state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n return state = strm.state, state.wsize = 0, state.whave = 0, state.wnext = 0, inflateResetKeep(strm);\n }\n function inflateReset2(strm, windowBits) {\n var wrap, state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, windowBits < 0)\n wrap = 0, windowBits = -windowBits;\n else if (wrap = (windowBits >> 4) + 1, windowBits < 48)\n windowBits &= 15;\n if (windowBits && (windowBits < 8 || windowBits > 15))\n return Z_STREAM_ERROR;\n if (state.window !== null && state.wbits !== windowBits)\n state.window = null;\n return state.wrap = wrap, state.wbits = windowBits, inflateReset(strm);\n }\n function inflateInit2(strm, windowBits) {\n var ret, state;\n if (!strm)\n return Z_STREAM_ERROR;\n if (state = new InflateState, strm.state = state, state.window = null, ret = inflateReset2(strm, windowBits), ret !== Z_OK)\n strm.state = null;\n return ret;\n }\n function inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n }\n var virgin = !0, lenfix, distfix;\n function fixedtables(state) {\n if (virgin) {\n var sym;\n lenfix = new utils.Buf32(512), distfix = new utils.Buf32(32), sym = 0;\n while (sym < 144)\n state.lens[sym++] = 8;\n while (sym < 256)\n state.lens[sym++] = 9;\n while (sym < 280)\n state.lens[sym++] = 7;\n while (sym < 288)\n state.lens[sym++] = 8;\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, {\n bits: 9\n }), sym = 0;\n while (sym < 32)\n state.lens[sym++] = 5;\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, {\n bits: 5\n }), virgin = !1;\n }\n state.lencode = lenfix, state.lenbits = 9, state.distcode = distfix, state.distbits = 5;\n }\n function updatewindow(strm, src, end, copy) {\n var dist, state = strm.state;\n if (state.window === null)\n state.wsize = 1 << state.wbits, state.wnext = 0, state.whave = 0, state.window = new utils.Buf8(state.wsize);\n if (copy >= state.wsize)\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0), state.wnext = 0, state.whave = state.wsize;\n else {\n if (dist = state.wsize - state.wnext, dist > copy)\n dist = copy;\n if (utils.arraySet(state.window, src, end - copy, dist, state.wnext), copy -= dist, copy)\n utils.arraySet(state.window, src, end - copy, copy, 0), state.wnext = copy, state.whave = state.wsize;\n else {\n if (state.wnext += dist, state.wnext === state.wsize)\n state.wnext = 0;\n if (state.whave < state.wsize)\n state.whave += dist;\n }\n }\n return 0;\n }\n function inflate(strm, flush) {\n var state, input, output, next, put, have, left, hold, bits, _in, _out, copy, from, from_source, here = 0, here_bits, here_op, here_val, last_bits, last_op, last_val, len, ret, hbuf = new utils.Buf8(4), opts, n, order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0)\n return Z_STREAM_ERROR;\n if (state = strm.state, state.mode === TYPE)\n state.mode = TYPEDO;\n put = strm.next_out, output = strm.output, left = strm.avail_out, next = strm.next_in, input = strm.input, have = strm.avail_in, hold = state.hold, bits = state.bits, _in = have, _out = left, ret = Z_OK;\n inf_leave:\n for (;; )\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.wrap & 2 && hold === 35615) {\n state.check = 0, hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0), hold = 0, bits = 0, state.mode = FLAGS;\n break;\n }\n if (state.flags = 0, state.head)\n state.head.done = !1;\n if (!(state.wrap & 1) || (((hold & 255) << 8) + (hold >> 8)) % 31) {\n strm.msg = \"incorrect header check\", state.mode = BAD;\n break;\n }\n if ((hold & 15) !== Z_DEFLATED) {\n strm.msg = \"unknown compression method\", state.mode = BAD;\n break;\n }\n if (hold >>>= 4, bits -= 4, len = (hold & 15) + 8, state.wbits === 0)\n state.wbits = len;\n else if (len > state.wbits) {\n strm.msg = \"invalid window size\", state.mode = BAD;\n break;\n }\n state.dmax = 1 << len, strm.adler = state.check = 1, state.mode = hold & 512 \? DICTID : TYPE, hold = 0, bits = 0;\n break;\n case FLAGS:\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.flags = hold, (state.flags & 255) !== Z_DEFLATED) {\n strm.msg = \"unknown compression method\", state.mode = BAD;\n break;\n }\n if (state.flags & 57344) {\n strm.msg = \"unknown header flags set\", state.mode = BAD;\n break;\n }\n if (state.head)\n state.head.text = hold >> 8 & 1;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0);\n hold = 0, bits = 0, state.mode = TIME;\n case TIME:\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.head)\n state.head.time = hold;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, hbuf[2] = hold >>> 16 & 255, hbuf[3] = hold >>> 24 & 255, state.check = crc32(state.check, hbuf, 4, 0);\n hold = 0, bits = 0, state.mode = OS;\n case OS:\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.head)\n state.head.xflags = hold & 255, state.head.os = hold >> 8;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0);\n hold = 0, bits = 0, state.mode = EXLEN;\n case EXLEN:\n if (state.flags & 1024) {\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.length = hold, state.head)\n state.head.extra_len = hold;\n if (state.flags & 512)\n hbuf[0] = hold & 255, hbuf[1] = hold >>> 8 & 255, state.check = crc32(state.check, hbuf, 2, 0);\n hold = 0, bits = 0;\n } else if (state.head)\n state.head.extra = null;\n state.mode = EXTRA;\n case EXTRA:\n if (state.flags & 1024) {\n if (copy = state.length, copy > have)\n copy = have;\n if (copy) {\n if (state.head) {\n if (len = state.head.extra_len - state.length, !state.head.extra)\n state.head.extra = new Array(state.head.extra_len);\n utils.arraySet(state.head.extra, input, next, copy, len);\n }\n if (state.flags & 512)\n state.check = crc32(state.check, input, copy, next);\n have -= copy, next += copy, state.length -= copy;\n }\n if (state.length)\n break inf_leave;\n }\n state.length = 0, state.mode = NAME;\n case NAME:\n if (state.flags & 2048) {\n if (have === 0)\n break inf_leave;\n copy = 0;\n do\n if (len = input[next + copy++], state.head && len && state.length < 65536)\n state.head.name += String.fromCharCode(len);\n while (len && copy < have);\n if (state.flags & 512)\n state.check = crc32(state.check, input, copy, next);\n if (have -= copy, next += copy, len)\n break inf_leave;\n } else if (state.head)\n state.head.name = null;\n state.length = 0, state.mode = COMMENT;\n case COMMENT:\n if (state.flags & 4096) {\n if (have === 0)\n break inf_leave;\n copy = 0;\n do\n if (len = input[next + copy++], state.head && len && state.length < 65536)\n state.head.comment += String.fromCharCode(len);\n while (len && copy < have);\n if (state.flags & 512)\n state.check = crc32(state.check, input, copy, next);\n if (have -= copy, next += copy, len)\n break inf_leave;\n } else if (state.head)\n state.head.comment = null;\n state.mode = HCRC;\n case HCRC:\n if (state.flags & 512) {\n while (bits < 16) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (hold !== (state.check & 65535)) {\n strm.msg = \"header crc mismatch\", state.mode = BAD;\n break;\n }\n hold = 0, bits = 0;\n }\n if (state.head)\n state.head.hcrc = state.flags >> 9 & 1, state.head.done = !0;\n strm.adler = state.check = 0, state.mode = TYPE;\n break;\n case DICTID:\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n strm.adler = state.check = zswap32(hold), hold = 0, bits = 0, state.mode = DICT;\n case DICT:\n if (state.havedict === 0)\n return strm.next_out = put, strm.avail_out = left, strm.next_in = next, strm.avail_in = have, state.hold = hold, state.bits = bits, Z_NEED_DICT;\n strm.adler = state.check = 1, state.mode = TYPE;\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES)\n break inf_leave;\n case TYPEDO:\n if (state.last) {\n hold >>>= bits & 7, bits -= bits & 7, state.mode = CHECK;\n break;\n }\n while (bits < 3) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n switch (state.last = hold & 1, hold >>>= 1, bits -= 1, hold & 3) {\n case 0:\n state.mode = STORED;\n break;\n case 1:\n if (fixedtables(state), state.mode = LEN_, flush === Z_TREES) {\n hold >>>= 2, bits -= 2;\n break inf_leave;\n }\n break;\n case 2:\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = \"invalid block type\", state.mode = BAD;\n }\n hold >>>= 2, bits -= 2;\n break;\n case STORED:\n hold >>>= bits & 7, bits -= bits & 7;\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if ((hold & 65535) !== (hold >>> 16 ^ 65535)) {\n strm.msg = \"invalid stored block lengths\", state.mode = BAD;\n break;\n }\n if (state.length = hold & 65535, hold = 0, bits = 0, state.mode = COPY_, flush === Z_TREES)\n break inf_leave;\n case COPY_:\n state.mode = COPY;\n case COPY:\n if (copy = state.length, copy) {\n if (copy > have)\n copy = have;\n if (copy > left)\n copy = left;\n if (copy === 0)\n break inf_leave;\n utils.arraySet(output, input, next, copy, put), have -= copy, next += copy, left -= copy, put += copy, state.length -= copy;\n break;\n }\n state.mode = TYPE;\n break;\n case TABLE:\n while (bits < 14) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (state.nlen = (hold & 31) + 257, hold >>>= 5, bits -= 5, state.ndist = (hold & 31) + 1, hold >>>= 5, bits -= 5, state.ncode = (hold & 15) + 4, hold >>>= 4, bits -= 4, state.nlen > 286 || state.ndist > 30) {\n strm.msg = \"too many length or distance symbols\", state.mode = BAD;\n break;\n }\n state.have = 0, state.mode = LENLENS;\n case LENLENS:\n while (state.have < state.ncode) {\n while (bits < 3) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n state.lens[order[state.have++]] = hold & 7, hold >>>= 3, bits -= 3;\n }\n while (state.have < 19)\n state.lens[order[state.have++]] = 0;\n if (state.lencode = state.lendyn, state.lenbits = 7, opts = { bits: state.lenbits }, ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts), state.lenbits = opts.bits, ret) {\n strm.msg = \"invalid code lengths set\", state.mode = BAD;\n break;\n }\n state.have = 0, state.mode = CODELENS;\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;; ) {\n if (here = state.lencode[hold & (1 << state.lenbits) - 1], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (here_val < 16)\n hold >>>= here_bits, bits -= here_bits, state.lens[state.have++] = here_val;\n else {\n if (here_val === 16) {\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (hold >>>= here_bits, bits -= here_bits, state.have === 0) {\n strm.msg = \"invalid bit length repeat\", state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1], copy = 3 + (hold & 3), hold >>>= 2, bits -= 2;\n } else if (here_val === 17) {\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= here_bits, bits -= here_bits, len = 0, copy = 3 + (hold & 7), hold >>>= 3, bits -= 3;\n } else {\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= here_bits, bits -= here_bits, len = 0, copy = 11 + (hold & 127), hold >>>= 7, bits -= 7;\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = \"invalid bit length repeat\", state.mode = BAD;\n break;\n }\n while (copy--)\n state.lens[state.have++] = len;\n }\n }\n if (state.mode === BAD)\n break;\n if (state.lens[256] === 0) {\n strm.msg = \"invalid code -- missing end-of-block\", state.mode = BAD;\n break;\n }\n if (state.lenbits = 9, opts = { bits: state.lenbits }, ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts), state.lenbits = opts.bits, ret) {\n strm.msg = \"invalid literal/lengths set\", state.mode = BAD;\n break;\n }\n if (state.distbits = 6, state.distcode = state.distdyn, opts = { bits: state.distbits }, ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts), state.distbits = opts.bits, ret) {\n strm.msg = \"invalid distances set\", state.mode = BAD;\n break;\n }\n if (state.mode = LEN_, flush === Z_TREES)\n break inf_leave;\n case LEN_:\n state.mode = LEN;\n case LEN:\n if (have >= 6 && left >= 258) {\n if (strm.next_out = put, strm.avail_out = left, strm.next_in = next, strm.avail_in = have, state.hold = hold, state.bits = bits, inflate_fast(strm, _out), put = strm.next_out, output = strm.output, left = strm.avail_out, next = strm.next_in, input = strm.input, have = strm.avail_in, hold = state.hold, bits = state.bits, state.mode === TYPE)\n state.back = -1;\n break;\n }\n state.back = 0;\n for (;; ) {\n if (here = state.lencode[hold & (1 << state.lenbits) - 1], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (here_op && (here_op & 240) === 0) {\n last_bits = here_bits, last_op = here_op, last_val = here_val;\n for (;; ) {\n if (here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, last_bits + here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= last_bits, bits -= last_bits, state.back += last_bits;\n }\n if (hold >>>= here_bits, bits -= here_bits, state.back += here_bits, state.length = here_val, here_op === 0) {\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n state.back = -1, state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = \"invalid literal/length code\", state.mode = BAD;\n break;\n }\n state.extra = here_op & 15, state.mode = LENEXT;\n case LENEXT:\n if (state.extra) {\n n = state.extra;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n state.length += hold & (1 << state.extra) - 1, hold >>>= state.extra, bits -= state.extra, state.back += state.extra;\n }\n state.was = state.length, state.mode = DIST;\n case DIST:\n for (;; ) {\n if (here = state.distcode[hold & (1 << state.distbits) - 1], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if ((here_op & 240) === 0) {\n last_bits = here_bits, last_op = here_op, last_val = here_val;\n for (;; ) {\n if (here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)], here_bits = here >>> 24, here_op = here >>> 16 & 255, here_val = here & 65535, last_bits + here_bits <= bits)\n break;\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n hold >>>= last_bits, bits -= last_bits, state.back += last_bits;\n }\n if (hold >>>= here_bits, bits -= here_bits, state.back += here_bits, here_op & 64) {\n strm.msg = \"invalid distance code\", state.mode = BAD;\n break;\n }\n state.offset = here_val, state.extra = here_op & 15, state.mode = DISTEXT;\n case DISTEXT:\n if (state.extra) {\n n = state.extra;\n while (bits < n) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n state.offset += hold & (1 << state.extra) - 1, hold >>>= state.extra, bits -= state.extra, state.back += state.extra;\n }\n if (state.offset > state.dmax) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break;\n }\n state.mode = MATCH;\n case MATCH:\n if (left === 0)\n break inf_leave;\n if (copy = _out - left, state.offset > copy) {\n if (copy = state.offset - copy, copy > state.whave) {\n if (state.sane) {\n strm.msg = \"invalid distance too far back\", state.mode = BAD;\n break;\n }\n }\n if (copy > state.wnext)\n copy -= state.wnext, from = state.wsize - copy;\n else\n from = state.wnext - copy;\n if (copy > state.length)\n copy = state.length;\n from_source = state.window;\n } else\n from_source = output, from = put - state.offset, copy = state.length;\n if (copy > left)\n copy = left;\n left -= copy, state.length -= copy;\n do\n output[put++] = from_source[from++];\n while (--copy);\n if (state.length === 0)\n state.mode = LEN;\n break;\n case LIT:\n if (left === 0)\n break inf_leave;\n output[put++] = state.length, left--, state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold |= input[next++] << bits, bits += 8;\n }\n if (_out -= left, strm.total_out += _out, state.total += _out, _out)\n strm.adler = state.check = state.flags \? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out);\n if (_out = left, (state.flags \? hold : zswap32(hold)) !== state.check) {\n strm.msg = \"incorrect data check\", state.mode = BAD;\n break;\n }\n hold = 0, bits = 0;\n }\n state.mode = LENGTH;\n case LENGTH:\n if (state.wrap && state.flags) {\n while (bits < 32) {\n if (have === 0)\n break inf_leave;\n have--, hold += input[next++] << bits, bits += 8;\n }\n if (hold !== (state.total & 4294967295)) {\n strm.msg = \"incorrect length check\", state.mode = BAD;\n break;\n }\n hold = 0, bits = 0;\n }\n state.mode = DONE;\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n default:\n return Z_STREAM_ERROR;\n }\n if (strm.next_out = put, strm.avail_out = left, strm.next_in = next, strm.avail_in = have, state.hold = hold, state.bits = bits, state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush !== Z_FINISH)) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out))\n return state.mode = MEM, Z_MEM_ERROR;\n }\n if (_in -= strm.avail_in, _out -= strm.avail_out, strm.total_in += _in, strm.total_out += _out, state.total += _out, state.wrap && _out)\n strm.adler = state.check = state.flags \? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out);\n if (strm.data_type = state.bits + (state.last \? 64 : 0) + (state.mode === TYPE \? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ \? 256 : 0), (_in === 0 && _out === 0 || flush === Z_FINISH) && ret === Z_OK)\n ret = Z_BUF_ERROR;\n return ret;\n }\n function inflateEnd(strm) {\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n var state = strm.state;\n if (state.window)\n state.window = null;\n return strm.state = null, Z_OK;\n }\n function inflateGetHeader(strm, head) {\n var state;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, (state.wrap & 2) === 0)\n return Z_STREAM_ERROR;\n return state.head = head, head.done = !1, Z_OK;\n }\n function inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length, state, dictid, ret;\n if (!strm || !strm.state)\n return Z_STREAM_ERROR;\n if (state = strm.state, state.wrap !== 0 && state.mode !== DICT)\n return Z_STREAM_ERROR;\n if (state.mode === DICT) {\n if (dictid = 1, dictid = adler32(dictid, dictionary, dictLength, 0), dictid !== state.check)\n return Z_DATA_ERROR;\n }\n if (ret = updatewindow(strm, dictionary, dictLength, dictLength), ret)\n return state.mode = MEM, Z_MEM_ERROR;\n return state.havedict = 1, Z_OK;\n }\n exports.inflateReset = inflateReset, exports.inflateReset2 = inflateReset2, exports.inflateResetKeep = inflateResetKeep, exports.inflateInit = inflateInit, exports.inflateInit2 = inflateInit2, exports.inflate = inflate, exports.inflateEnd = inflateEnd, exports.inflateGetHeader = inflateGetHeader, exports.inflateSetDictionary = inflateSetDictionary, exports.inflateInfo = \"pako inflate (from Nodeca project)\";\n }\n}), require_constants = __commonJS({\n \"node_modules/pako/lib/zlib/constants.js\"(exports, module2) {\n module2.exports = {\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n Z_BUF_ERROR: -5,\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n Z_BINARY: 0,\n Z_TEXT: 1,\n Z_UNKNOWN: 2,\n Z_DEFLATED: 8\n };\n }\n}), require_binding = __commonJS({\n \"node_modules/browserify-zlib/lib/binding.js\"(exports) {\n var Zstream = require_zstream(), zlib_deflate = require_deflate(), zlib_inflate = require_inflate(), constants = require_constants();\n for (key in constants)\n exports[key] = constants[key];\n var key;\n exports.NONE = 0, exports.DEFLATE = 1, exports.INFLATE = 2, exports.GZIP = 3, exports.GUNZIP = 4, exports.DEFLATERAW = 5, exports.INFLATERAW = 6, exports.UNZIP = 7;\n var GZIP_HEADER_ID1 = 31, GZIP_HEADER_ID2 = 139;\n function Zlib(mode) {\n if (typeof mode !== \"number\" || mode < exports.DEFLATE || mode > exports.UNZIP)\n @throwTypeError(\"Bad argument\");\n this.dictionary = null, this.err = 0, this.flush = 0, this.init_done = !1, this.level = 0, this.memLevel = 0, this.mode = mode, this.strategy = 0, this.windowBits = 0, this.write_in_progress = !1, this.pending_close = !1, this.gzip_id_bytes_read = 0;\n }\n Zlib.prototype = {}, Zlib.prototype.close = function() {\n if (console.log(\"Zlib close\"), this.write_in_progress) {\n this.pending_close = !0;\n return;\n }\n if (this.pending_close = !1, assert(this.init_done, \"close before init\"), assert(this.mode <= exports.UNZIP), this.mode === exports.DEFLATE || this.mode === exports.GZIP || this.mode === exports.DEFLATERAW)\n zlib_deflate.deflateEnd(this.strm);\n else if (this.mode === exports.INFLATE || this.mode === exports.GUNZIP || this.mode === exports.INFLATERAW || this.mode === exports.UNZIP)\n zlib_inflate.inflateEnd(this.strm);\n this.mode = exports.NONE, this.dictionary = null;\n }, Zlib.prototype.write = function(flush, input, in_off, in_len, out, out_off, out_len) {\n return this._write(!0, flush, input, in_off, in_len, out, out_off, out_len);\n }, Zlib.prototype.writeSync = function(flush, input, in_off, in_len, out, out_off, out_len) {\n return this._write(!1, flush, input, in_off, in_len, out, out_off, out_len);\n }, Zlib.prototype._write = function(async, flush, input, in_off, in_len, out, out_off, out_len) {\n if (assert.equal(arguments.length, 8), assert(this.init_done, \"write before init\"), assert(this.mode !== exports.NONE, \"already finalized\"), assert.equal(!1, this.write_in_progress, \"write already in progress\"), assert.equal(!1, this.pending_close, \"close is pending\"), this.write_in_progress = !0, assert.equal(!1, flush === void 0, \"must provide flush value\"), this.write_in_progress = !0, flush !== exports.Z_NO_FLUSH && flush !== exports.Z_PARTIAL_FLUSH && flush !== exports.Z_SYNC_FLUSH && flush !== exports.Z_FULL_FLUSH && flush !== exports.Z_FINISH && flush !== exports.Z_BLOCK)\n throw new Error(\"Invalid flush value\");\n if (input == null)\n input = Buffer.alloc(0), in_len = 0, in_off = 0;\n if (this.strm.avail_in = in_len, this.strm.input = input, this.strm.next_in = in_off, this.strm.avail_out = out_len, this.strm.output = out, this.strm.next_out = out_off, this.flush = flush, !async) {\n if (this._process(), this._checkError())\n return this._afterSync();\n return;\n }\n var self = this;\n return process.nextTick(function() {\n self._process(), self._after();\n }), this;\n }, Zlib.prototype._afterSync = function() {\n var avail_out = this.strm.avail_out, avail_in = this.strm.avail_in;\n return this.write_in_progress = !1, [avail_in, avail_out];\n }, Zlib.prototype._process = function() {\n var next_expected_header_byte = null;\n switch (this.mode) {\n case exports.DEFLATE:\n case exports.GZIP:\n case exports.DEFLATERAW:\n this.err = zlib_deflate.deflate(this.strm, this.flush);\n break;\n case exports.UNZIP:\n if (this.strm.avail_in > 0)\n next_expected_header_byte = this.strm.next_in;\n switch (this.gzip_id_bytes_read) {\n case 0:\n if (next_expected_header_byte === null)\n break;\n if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID1) {\n if (this.gzip_id_bytes_read = 1, next_expected_header_byte++, this.strm.avail_in === 1)\n break;\n } else {\n this.mode = exports.INFLATE;\n break;\n }\n case 1:\n if (next_expected_header_byte === null)\n break;\n if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID2)\n this.gzip_id_bytes_read = 2, this.mode = exports.GUNZIP;\n else\n this.mode = exports.INFLATE;\n break;\n default:\n throw new Error(\"invalid number of gzip magic number bytes read\");\n }\n case exports.INFLATE:\n case exports.GUNZIP:\n case exports.INFLATERAW:\n if (this.err = zlib_inflate.inflate(this.strm, this.flush), this.err === exports.Z_NEED_DICT && this.dictionary) {\n if (this.err = zlib_inflate.inflateSetDictionary(this.strm, this.dictionary), this.err === exports.Z_OK)\n this.err = zlib_inflate.inflate(this.strm, this.flush);\n else if (this.err === exports.Z_DATA_ERROR)\n this.err = exports.Z_NEED_DICT;\n }\n while (this.strm.avail_in > 0 && this.mode === exports.GUNZIP && this.err === exports.Z_STREAM_END && this.strm.next_in[0] !== 0)\n this.reset(), this.err = zlib_inflate.inflate(this.strm, this.flush);\n break;\n default:\n throw new Error(\"Unknown mode \" + this.mode);\n }\n }, Zlib.prototype._checkError = function() {\n switch (this.err) {\n case exports.Z_OK:\n case exports.Z_BUF_ERROR:\n if (this.strm.avail_out !== 0 && this.flush === exports.Z_FINISH)\n return this._error(\"unexpected end of file\"), !1;\n break;\n case exports.Z_STREAM_END:\n break;\n case exports.Z_NEED_DICT:\n if (this.dictionary == null)\n this._error(\"Missing dictionary\");\n else\n this._error(\"Bad dictionary\");\n return !1;\n default:\n return this._error(\"Zlib error\"), !1;\n }\n return !0;\n }, Zlib.prototype._after = function() {\n if (!this._checkError())\n return;\n var avail_out = this.strm.avail_out, avail_in = this.strm.avail_in;\n if (this.write_in_progress = !1, this.callback(avail_in, avail_out), this.pending_close)\n this.close();\n }, Zlib.prototype._error = function(message) {\n if (this.strm.msg)\n message = this.strm.msg;\n if (this.onerror(message, this.err), this.write_in_progress = !1, this.pending_close)\n this.close();\n }, Zlib.prototype.init = function(windowBits, level, memLevel, strategy, dictionary) {\n assert(arguments.length === 4 || arguments.length === 5, \"init(windowBits, level, memLevel, strategy, [dictionary])\"), assert(windowBits >= 8 && windowBits <= 15, \"invalid windowBits\"), assert(level >= -1 && level <= 9, \"invalid compression level\"), assert(memLevel >= 1 && memLevel <= 9, \"invalid memlevel\"), assert(strategy === exports.Z_FILTERED || strategy === exports.Z_HUFFMAN_ONLY || strategy === exports.Z_RLE || strategy === exports.Z_FIXED || strategy === exports.Z_DEFAULT_STRATEGY, \"invalid strategy\"), this._init(level, windowBits, memLevel, strategy, dictionary), this._setDictionary();\n }, Zlib.prototype.params = function() {\n throw new Error(\"deflateParams Not supported\");\n }, Zlib.prototype.reset = function() {\n this._reset(), this._setDictionary();\n }, Zlib.prototype._init = function(level, windowBits, memLevel, strategy, dictionary) {\n if (this.level = level, this.windowBits = windowBits, this.memLevel = memLevel, this.strategy = strategy, this.flush = exports.Z_NO_FLUSH, this.err = exports.Z_OK, this.mode === exports.GZIP || this.mode === exports.GUNZIP)\n this.windowBits += 16;\n if (this.mode === exports.UNZIP)\n this.windowBits += 32;\n if (this.mode === exports.DEFLATERAW || this.mode === exports.INFLATERAW)\n this.windowBits = -1 * this.windowBits;\n switch (this.strm = new Zstream, this.mode) {\n case exports.DEFLATE:\n case exports.GZIP:\n case exports.DEFLATERAW:\n this.err = zlib_deflate.deflateInit2(this.strm, this.level, exports.Z_DEFLATED, this.windowBits, this.memLevel, this.strategy);\n break;\n case exports.INFLATE:\n case exports.GUNZIP:\n case exports.INFLATERAW:\n case exports.UNZIP:\n this.err = zlib_inflate.inflateInit2(this.strm, this.windowBits);\n break;\n default:\n throw new Error(\"Unknown mode \" + this.mode);\n }\n if (this.err !== exports.Z_OK)\n this._error(\"Init error\");\n this.dictionary = dictionary, this.write_in_progress = !1, this.init_done = !0;\n }, Zlib.prototype._setDictionary = function() {\n if (this.dictionary == null)\n return;\n switch (this.err = exports.Z_OK, this.mode) {\n case exports.DEFLATE:\n case exports.DEFLATERAW:\n this.err = zlib_deflate.deflateSetDictionary(this.strm, this.dictionary);\n break;\n default:\n break;\n }\n if (this.err !== exports.Z_OK)\n this._error(\"Failed to set dictionary\");\n }, Zlib.prototype._reset = function() {\n switch (this.err = exports.Z_OK, this.mode) {\n case exports.DEFLATE:\n case exports.DEFLATERAW:\n case exports.GZIP:\n this.err = zlib_deflate.deflateReset(this.strm);\n break;\n case exports.INFLATE:\n case exports.INFLATERAW:\n case exports.GUNZIP:\n this.err = zlib_inflate.inflateReset(this.strm);\n break;\n default:\n break;\n }\n if (this.err !== exports.Z_OK)\n this._error(\"Failed to reset stream\");\n }, exports.Zlib = Zlib;\n }\n}), require_lib = __commonJS({\n \"node_modules/browserify-zlib/lib/index.js\"(exports) {\n var Buffer2 = BufferModule.Buffer, Transform = StreamModule.Transform, binding = require_binding(), util = Util, kMaxLength = BufferModule.kMaxLength, kRangeErrorMessage = \"Cannot create final Buffer. It would be larger than 0x\" + kMaxLength.toString(16) + \" bytes\";\n binding.Z_MIN_WINDOWBITS = 8, binding.Z_MAX_WINDOWBITS = 15, binding.Z_DEFAULT_WINDOWBITS = 15, binding.Z_MIN_CHUNK = 64, binding.Z_MAX_CHUNK = Infinity, binding.Z_DEFAULT_CHUNK = 16384, binding.Z_MIN_MEMLEVEL = 1, binding.Z_MAX_MEMLEVEL = 9, binding.Z_DEFAULT_MEMLEVEL = 8, binding.Z_MIN_LEVEL = -1, binding.Z_MAX_LEVEL = 9, binding.Z_DEFAULT_LEVEL = binding.Z_DEFAULT_COMPRESSION;\n var bkeys = Object.keys(binding);\n for (bk = 0;bk < bkeys.length; bk++)\n if (bkey = bkeys[bk], bkey.match(/^Z/))\n Object.defineProperty(exports, bkey, {\n enumerable: !0,\n value: binding[bkey],\n writable: !1\n });\n var bkey, bk, codes = {\n Z_OK: binding.Z_OK,\n Z_STREAM_END: binding.Z_STREAM_END,\n Z_NEED_DICT: binding.Z_NEED_DICT,\n Z_ERRNO: binding.Z_ERRNO,\n Z_STREAM_ERROR: binding.Z_STREAM_ERROR,\n Z_DATA_ERROR: binding.Z_DATA_ERROR,\n Z_MEM_ERROR: binding.Z_MEM_ERROR,\n Z_BUF_ERROR: binding.Z_BUF_ERROR,\n Z_VERSION_ERROR: binding.Z_VERSION_ERROR\n }, ckeys = Object.keys(codes);\n for (ck = 0;ck < ckeys.length; ck++)\n ckey = ckeys[ck], codes[codes[ckey]] = ckey;\n var ckey, ck;\n Object.defineProperty(exports, \"codes\", {\n enumerable: !0,\n value: Object.freeze(codes),\n writable: !1\n }), exports.constants = require_constants(), exports.Deflate = Deflate, exports.Inflate = Inflate, exports.Gzip = Gzip, exports.Gunzip = Gunzip, exports.DeflateRaw = DeflateRaw, exports.InflateRaw = InflateRaw, exports.Unzip = Unzip, exports.createDeflate = function(o) {\n return new Deflate(o);\n }, exports.createInflate = function(o) {\n return new Inflate(o);\n }, exports.createDeflateRaw = function(o) {\n return new DeflateRaw(o);\n }, exports.createInflateRaw = function(o) {\n return new InflateRaw(o);\n }, exports.createGzip = function(o) {\n return new Gzip(o);\n }, exports.createGunzip = function(o) {\n return new Gunzip(o);\n }, exports.createUnzip = function(o) {\n return new Unzip(o);\n }, exports.deflate = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Deflate(opts), buffer, callback);\n }, exports.deflateSync = function(buffer, opts) {\n return zlibBufferSync(new Deflate(opts), buffer);\n }, exports.gzip = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Gzip(opts), buffer, callback);\n }, exports.gzipSync = function(buffer, opts) {\n return zlibBufferSync(new Gzip(opts), buffer);\n }, exports.deflateRaw = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new DeflateRaw(opts), buffer, callback);\n }, exports.deflateRawSync = function(buffer, opts) {\n return zlibBufferSync(new DeflateRaw(opts), buffer);\n }, exports.unzip = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Unzip(opts), buffer, callback);\n }, exports.unzipSync = function(buffer, opts) {\n return zlibBufferSync(new Unzip(opts), buffer);\n }, exports.inflate = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Inflate(opts), buffer, callback);\n }, exports.inflateSync = function(buffer, opts) {\n return zlibBufferSync(new Inflate(opts), buffer);\n }, exports.gunzip = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new Gunzip(opts), buffer, callback);\n }, exports.gunzipSync = function(buffer, opts) {\n return zlibBufferSync(new Gunzip(opts), buffer);\n }, exports.inflateRaw = function(buffer, opts, callback) {\n if (typeof opts === \"function\")\n callback = opts, opts = {};\n return zlibBuffer(new InflateRaw(opts), buffer, callback);\n }, exports.inflateRawSync = function(buffer, opts) {\n return zlibBufferSync(new InflateRaw(opts), buffer);\n }, exports.brotliCompress = function(buffer, opts, callback) {\n throw new Error(\"zlib.brotliCompress is not implemented\");\n };\n function zlibBuffer(engine, buffer, callback) {\n var buffers = [], nread = 0;\n engine.on(\"error\", onError), engine.on(\"end\", onEnd), engine.end(buffer), flow();\n function flow() {\n var chunk;\n while ((chunk = engine.read()) !== null)\n buffers.push(chunk), nread += chunk.length;\n engine.once(\"readable\", flow);\n }\n function onError(err) {\n engine.removeListener(\"end\", onEnd), engine.removeListener(\"readable\", flow), callback(err);\n }\n function onEnd() {\n var buf, err = null;\n if (nread >= kMaxLength)\n err = new RangeError(kRangeErrorMessage);\n else\n buf = Buffer2.concat(buffers, nread);\n buffers = [], engine.close(), callback(err, buf);\n }\n }\n function zlibBufferSync(engine, buffer) {\n if (typeof buffer === \"string\")\n buffer = Buffer2.from(buffer);\n if (!Buffer2.isBuffer(buffer))\n @throwTypeError(\"Not a string or buffer\");\n var flushFlag = engine._finishFlushFlag;\n return engine._processChunk(buffer, flushFlag);\n }\n function Deflate(opts) {\n if (!(this instanceof Deflate))\n return new Deflate(opts);\n Zlib.call(this, opts, binding.DEFLATE);\n }\n function Inflate(opts) {\n if (!(this instanceof Inflate))\n return new Inflate(opts);\n Zlib.call(this, opts, binding.INFLATE);\n }\n function Gzip(opts) {\n if (!(this instanceof Gzip))\n return new Gzip(opts);\n Zlib.call(this, opts, binding.GZIP);\n }\n function Gunzip(opts) {\n if (!(this instanceof Gunzip))\n return new Gunzip(opts);\n Zlib.call(this, opts, binding.GUNZIP);\n }\n function DeflateRaw(opts) {\n if (!(this instanceof DeflateRaw))\n return new DeflateRaw(opts);\n Zlib.call(this, opts, binding.DEFLATERAW);\n }\n function InflateRaw(opts) {\n if (!(this instanceof InflateRaw))\n return new InflateRaw(opts);\n Zlib.call(this, opts, binding.INFLATERAW);\n }\n function Unzip(opts) {\n if (!(this instanceof Unzip))\n return new Unzip(opts);\n Zlib.call(this, opts, binding.UNZIP);\n }\n function isValidFlushFlag(flag) {\n return flag === binding.Z_NO_FLUSH || flag === binding.Z_PARTIAL_FLUSH || flag === binding.Z_SYNC_FLUSH || flag === binding.Z_FULL_FLUSH || flag === binding.Z_FINISH || flag === binding.Z_BLOCK;\n }\n function Zlib(opts, mode) {\n var _this = this;\n if (this._opts = opts = opts || {}, this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK, Transform.call(this, opts), opts.flush && !isValidFlushFlag(opts.flush))\n throw new Error(\"Invalid flush flag: \" + opts.flush);\n if (opts.finishFlush && !isValidFlushFlag(opts.finishFlush))\n throw new Error(\"Invalid flush flag: \" + opts.finishFlush);\n if (this._flushFlag = opts.flush || binding.Z_NO_FLUSH, this._finishFlushFlag = typeof opts.finishFlush !== \"undefined\" \? opts.finishFlush : binding.Z_FINISH, opts.chunkSize) {\n if (opts.chunkSize < exports.Z_MIN_CHUNK || opts.chunkSize > exports.Z_MAX_CHUNK)\n throw new Error(\"Invalid chunk size: \" + opts.chunkSize);\n }\n if (opts.windowBits) {\n if (opts.windowBits < exports.Z_MIN_WINDOWBITS || opts.windowBits > exports.Z_MAX_WINDOWBITS)\n throw new Error(\"Invalid windowBits: \" + opts.windowBits);\n }\n if (opts.level) {\n if (opts.level < exports.Z_MIN_LEVEL || opts.level > exports.Z_MAX_LEVEL)\n throw new Error(\"Invalid compression level: \" + opts.level);\n }\n if (opts.memLevel) {\n if (opts.memLevel < exports.Z_MIN_MEMLEVEL || opts.memLevel > exports.Z_MAX_MEMLEVEL)\n throw new Error(\"Invalid memLevel: \" + opts.memLevel);\n }\n if (opts.strategy) {\n if (opts.strategy != exports.Z_FILTERED && opts.strategy != exports.Z_HUFFMAN_ONLY && opts.strategy != exports.Z_RLE && opts.strategy != exports.Z_FIXED && opts.strategy != exports.Z_DEFAULT_STRATEGY)\n throw new Error(\"Invalid strategy: \" + opts.strategy);\n }\n if (opts.dictionary) {\n if (!Buffer2.isBuffer(opts.dictionary))\n throw new Error(\"Invalid dictionary: it should be a Buffer instance\");\n }\n this._handle = new binding.Zlib(mode);\n var self = this;\n this._hadError = !1, this._handle.onerror = function(message, errno) {\n _close(self), self._hadError = !0;\n var error = new Error(message);\n error.errno = errno, error.code = exports.codes[errno], self.emit(\"error\", error);\n };\n var level = exports.Z_DEFAULT_COMPRESSION;\n if (typeof opts.level === \"number\")\n level = opts.level;\n var strategy = exports.Z_DEFAULT_STRATEGY;\n if (typeof opts.strategy === \"number\")\n strategy = opts.strategy;\n this._handle.init(opts.windowBits || exports.Z_DEFAULT_WINDOWBITS, level, opts.memLevel || exports.Z_DEFAULT_MEMLEVEL, strategy, opts.dictionary), this._buffer = Buffer2.allocUnsafe(this._chunkSize), this._offset = 0, this._level = level, this._strategy = strategy, this.once(\"end\", this.close), Object.defineProperty(this, \"_closed\", {\n get: function() {\n return !_this._handle;\n },\n configurable: !0,\n enumerable: !0\n });\n }\n util.inherits(Zlib, Transform), Zlib.prototype.params = function(level, strategy, callback) {\n if (level < exports.Z_MIN_LEVEL || level > exports.Z_MAX_LEVEL)\n @throwRangeError(\"Invalid compression level: \" + level);\n if (strategy != exports.Z_FILTERED && strategy != exports.Z_HUFFMAN_ONLY && strategy != exports.Z_RLE && strategy != exports.Z_FIXED && strategy != exports.Z_DEFAULT_STRATEGY)\n @throwTypeError(\"Invalid strategy: \" + strategy);\n if (this._level !== level || this._strategy !== strategy) {\n var self = this;\n this.flush(binding.Z_SYNC_FLUSH, function() {\n if (assert(self._handle, \"zlib binding closed\"), self._handle.params(level, strategy), !self._hadError) {\n if (self._level = level, self._strategy = strategy, callback)\n callback();\n }\n });\n } else\n process.nextTick(callback);\n }, Zlib.prototype.reset = function() {\n return assert(this._handle, \"zlib binding closed\"), this._handle.reset();\n }, Zlib.prototype._flush = function(callback) {\n this._transform(Buffer2.alloc(0), \"\", callback);\n }, Zlib.prototype.flush = function(kind, callback) {\n var _this2 = this, ws = this._writableState;\n if (typeof kind === \"function\" || kind === void 0 && !callback)\n callback = kind, kind = binding.Z_FULL_FLUSH;\n if (ws.ended) {\n if (callback)\n process.nextTick(callback);\n } else if (ws.ending) {\n if (callback)\n this.once(\"end\", callback);\n } else if (ws.needDrain) {\n if (callback)\n this.once(\"drain\", function() {\n return _this2.flush(kind, callback);\n });\n } else\n this._flushFlag = kind, this.write(Buffer2.alloc(0), \"\", callback);\n }, Zlib.prototype.close = function(callback) {\n _close(this, callback), process.nextTick(emitCloseNT, this);\n };\n function _close(engine, callback) {\n if (callback)\n process.nextTick(callback);\n if (!engine._handle)\n return;\n engine._handle.close(), engine._handle = null;\n }\n function emitCloseNT(self) {\n self.emit(\"close\");\n }\n Zlib.prototype._transform = function(chunk, encoding, cb) {\n var flushFlag, ws = this._writableState, ending = ws.ending || ws.ended, last = ending && (!chunk || ws.length === chunk.length);\n if (chunk !== null && !Buffer2.isBuffer(chunk))\n return cb(new Error(\"invalid input\"));\n if (!this._handle)\n return cb(new Error(\"zlib binding closed\"));\n if (last)\n flushFlag = this._finishFlushFlag;\n else if (flushFlag = this._flushFlag, chunk.length >= ws.length)\n this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH;\n this._processChunk(chunk, flushFlag, cb);\n }, Zlib.prototype._processChunk = function(chunk, flushFlag, cb) {\n var availInBefore = chunk && chunk.length, availOutBefore = this._chunkSize - this._offset, inOff = 0, self = this, async = typeof cb === \"function\";\n if (!async) {\n var buffers = [], nread = 0, error;\n this.on(\"error\", function(er) {\n error = er;\n }), assert(this._handle, \"zlib binding closed\");\n do\n var res = this._handle.writeSync(flushFlag, chunk, inOff, availInBefore, this._buffer, this._offset, availOutBefore);\n while (!this._hadError && callback(res[0], res[1]));\n if (this._hadError)\n throw error;\n if (nread >= kMaxLength)\n _close(this), @throwRangeError(kRangeErrorMessage);\n var buf = Buffer2.concat(buffers, nread);\n return _close(this), buf;\n }\n assert(this._handle, \"zlib binding closed\");\n var req = this._handle.write(flushFlag, chunk, inOff, availInBefore, this._buffer, this._offset, availOutBefore);\n req.buffer = chunk, req.callback = callback;\n function callback(availInAfter, availOutAfter) {\n if (this)\n this.buffer = null, this.callback = null;\n if (self._hadError)\n return;\n var have = availOutBefore - availOutAfter;\n if (assert(have >= 0, \"have should not go down\"), have > 0) {\n var out = self._buffer.slice(self._offset, self._offset + have);\n if (self._offset += have, async)\n self.push(out);\n else\n buffers.push(out), nread += out.length;\n }\n if (availOutAfter === 0 || self._offset >= self._chunkSize)\n availOutBefore = self._chunkSize, self._offset = 0, self._buffer = Buffer2.allocUnsafe(self._chunkSize);\n if (availOutAfter === 0) {\n if (inOff += availInBefore - availInAfter, availInBefore = availInAfter, !async)\n return !0;\n var newReq = self._handle.write(flushFlag, chunk, inOff, availInBefore, self._buffer, self._offset, self._chunkSize);\n newReq.callback = callback, newReq.buffer = chunk;\n return;\n }\n if (!async)\n return !1;\n cb();\n }\n }, util.inherits(Deflate, Zlib), util.inherits(Inflate, Zlib), util.inherits(Gzip, Zlib), util.inherits(Gunzip, Zlib), util.inherits(DeflateRaw, Zlib), util.inherits(InflateRaw, Zlib), util.inherits(Unzip, Zlib);\n }\n});\nreturn require_lib()})\n"_s;
//
//
diff --git a/src/js/out/WebCoreJSBuiltins.cpp b/src/js/out/WebCoreJSBuiltins.cpp
index 10ce30192..cae774d80 100644
--- a/src/js/out/WebCoreJSBuiltins.cpp
+++ b/src/js/out/WebCoreJSBuiltins.cpp
@@ -9,474 +9,104 @@ namespace Zig { class GlobalObject; }
namespace WebCore {
-/* BundlerPlugin.ts */
-// runSetupFunction
-const JSC::ConstructAbility s_bundlerPluginRunSetupFunctionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_bundlerPluginRunSetupFunctionCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_bundlerPluginRunSetupFunctionCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_bundlerPluginRunSetupFunctionCodeLength = 3224;
-static const JSC::Intrinsic s_bundlerPluginRunSetupFunctionCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_bundlerPluginRunSetupFunctionCode = "(function (setup,config){\"use strict\";var onLoadPlugins=new Map,onResolvePlugins=new Map;function validate(filterObject,callback,map){if(!filterObject||!@isObject(filterObject))@throwTypeError('Expected an object with \"filter\" RegExp');if(!callback||!@isCallable(callback))@throwTypeError(\"callback must be a function\");var{filter,namespace=\"file\"}=filterObject;if(!filter)@throwTypeError('Expected an object with \"filter\" RegExp');if(!@isRegExpObject(filter))@throwTypeError(\"filter must be a RegExp\");if(namespace&&typeof namespace!==\"string\")@throwTypeError(\"namespace must be a string\");if((namespace\?.length\?\?0)===0)namespace=\"file\";if(!/^([/@a-zA-Z0-9_\\\\-]+)$/.test(namespace))@throwTypeError(\"namespace can only contain $a-zA-Z0-9_\\\\-\");var callbacks=map.@get(namespace);if(!callbacks)map.@set(namespace,[[filter,callback]]);else @arrayPush(callbacks,[filter,callback])}function onLoad(filterObject,callback){validate(filterObject,callback,onLoadPlugins)}function onResolve(filterObject,callback){validate(filterObject,callback,onResolvePlugins)}const processSetupResult=()=>{var anyOnLoad=!1,anyOnResolve=!1;for(var[namespace,callbacks]of onLoadPlugins.entries())for(var[filter]of callbacks)this.addFilter(filter,namespace,1),anyOnLoad=!0;for(var[namespace,callbacks]of onResolvePlugins.entries())for(var[filter]of callbacks)this.addFilter(filter,namespace,0),anyOnResolve=!0;if(anyOnResolve){var onResolveObject=this.onResolve;if(!onResolveObject)this.onResolve=onResolvePlugins;else for(var[namespace,callbacks]of onResolvePlugins.entries()){var existing=onResolveObject.@get(namespace);if(!existing)onResolveObject.@set(namespace,callbacks);else onResolveObject.@set(namespace,existing.concat(callbacks))}}if(anyOnLoad){var onLoadObject=this.onLoad;if(!onLoadObject)this.onLoad=onLoadPlugins;else for(var[namespace,callbacks]of onLoadPlugins.entries()){var existing=onLoadObject.@get(namespace);if(!existing)onLoadObject.@set(namespace,callbacks);else onLoadObject.@set(namespace,existing.concat(callbacks))}}return anyOnLoad||anyOnResolve};var setupResult=setup({config,onDispose:()=>@throwTypeError(\"@{@2} is not implemented yet. See https://github.com/oven-sh/bun/issues/@1\"),onEnd:()=>@throwTypeError(\"@{@2} is not implemented yet. See https://github.com/oven-sh/bun/issues/@1\"),onLoad,onResolve,onStart:()=>@throwTypeError(\"@{@2} is not implemented yet. See https://github.com/oven-sh/bun/issues/@1\"),resolve:()=>@throwTypeError(\"@{@2} is not implemented yet. See https://github.com/oven-sh/bun/issues/@1\"),initialOptions:{...config,bundle:!0,entryPoints:config.entrypoints\?\?config.entryPoints\?\?[],minify:typeof config.minify===\"boolean\"\?config.minify:!1,minifyIdentifiers:config.minify===!0||config.minify\?.identifiers,minifyWhitespace:config.minify===!0||config.minify\?.whitespace,minifySyntax:config.minify===!0||config.minify\?.syntax,outbase:config.root,platform:config.target===\"bun\"\?\"node\":config.target},esbuild:{}});if(setupResult&&@isPromise(setupResult))if(@getPromiseInternalField(setupResult,@promiseFieldFlags)&@promiseStateFulfilled)setupResult=@getPromiseInternalField(setupResult,@promiseFieldReactionsOrResult);else return setupResult.@then(processSetupResult);return processSetupResult()})\n";
+/* WritableStreamDefaultWriter.ts */
+// initializeWritableStreamDefaultWriter
+const JSC::ConstructAbility s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeLength = 301;
+static const JSC::Intrinsic s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCode = "(function (stream){\"use strict\";const internalStream=@getInternalWritableStream(stream);if(internalStream)stream=internalStream;if(!@isWritableStream(stream))@throwTypeError(\"WritableStreamDefaultWriter constructor takes a WritableStream\");return @setUpWritableStreamDefaultWriter(this,stream),this})\n";
-// runOnResolvePlugins
-const JSC::ConstructAbility s_bundlerPluginRunOnResolvePluginsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_bundlerPluginRunOnResolvePluginsCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_bundlerPluginRunOnResolvePluginsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_bundlerPluginRunOnResolvePluginsCodeLength = 2359;
-static const JSC::Intrinsic s_bundlerPluginRunOnResolvePluginsCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_bundlerPluginRunOnResolvePluginsCode = "(function (specifier,inputNamespace,importer,internalID,kindId){\"use strict\";const kind=[\"entry-point\",\"import-statement\",\"require-call\",\"dynamic-import\",\"require-resolve\",\"import-rule\",\"url-token\",\"internal\"][kindId];var promiseResult=(async(inputPath,inputNamespace2,importer2,kind2)=>{var{onResolve,onLoad}=this,results=onResolve.@get(inputNamespace2);if(!results)return this.onResolveAsync(internalID,null,null,null),null;for(let[filter,callback]of results)if(filter.test(inputPath)){var result=callback({path:inputPath,importer:importer2,namespace:inputNamespace2,kind:kind2});while(result&&@isPromise(result)&&(@getPromiseInternalField(result,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)result=@getPromiseInternalField(result,@promiseFieldReactionsOrResult);if(result&&@isPromise(result))result=await result;if(!result||!@isObject(result))continue;var{path,namespace:userNamespace=inputNamespace2,external}=result;if(typeof path!==\"string\"||typeof userNamespace!==\"string\")@throwTypeError(\"onResolve plugins must return an object with a string 'path' and string 'loader' field\");if(!path)continue;if(!userNamespace)userNamespace=inputNamespace2;if(typeof external!==\"boolean\"&&!@isUndefinedOrNull(external))@throwTypeError('onResolve plugins \"external\" field must be boolean or unspecified');if(!external){if(userNamespace===\"file\"){if(process.platform!==\"win32\"){if(path[0]!==\"/\"||path.includes(\"..\"))@throwTypeError('onResolve plugin \"path\" must be absolute when the namespace is \"file\"')}}if(userNamespace===\"dataurl\"){if(!path.startsWith(\"data:\"))@throwTypeError('onResolve plugin \"path\" must start with \"data:\" when the namespace is \"dataurl\"')}if(userNamespace&&userNamespace!==\"file\"&&(!onLoad||!onLoad.@has(userNamespace)))@throwTypeError(`Expected onLoad plugin for namespace ${userNamespace} to exist`)}return this.onResolveAsync(internalID,path,userNamespace,external),null}return this.onResolveAsync(internalID,null,null,null),null})(specifier,inputNamespace,importer,kind);while(promiseResult&&@isPromise(promiseResult)&&(@getPromiseInternalField(promiseResult,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)promiseResult=@getPromiseInternalField(promiseResult,@promiseFieldReactionsOrResult);if(promiseResult&&@isPromise(promiseResult))promiseResult.then(()=>{},(e)=>{this.addError(internalID,e,0)})})\n";
+// closed
+const JSC::ConstructAbility s_writableStreamDefaultWriterClosedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamDefaultWriterClosedCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamDefaultWriterClosedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamDefaultWriterClosedCodeLength = 214;
+static const JSC::Intrinsic s_writableStreamDefaultWriterClosedCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamDefaultWriterClosedCode = "(function (){\"use strict\";if(!@isWritableStreamDefaultWriter(this))return @Promise.@reject(@makeGetterTypeError(\"WritableStreamDefaultWriter\",\"closed\"));return @getByIdDirectPrivate(this,\"closedPromise\").promise})\n";
-// runOnLoadPlugins
-const JSC::ConstructAbility s_bundlerPluginRunOnLoadPluginsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_bundlerPluginRunOnLoadPluginsCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_bundlerPluginRunOnLoadPluginsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_bundlerPluginRunOnLoadPluginsCodeLength = 1835;
-static const JSC::Intrinsic s_bundlerPluginRunOnLoadPluginsCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_bundlerPluginRunOnLoadPluginsCode = "(function (internalID,path,namespace,defaultLoaderId){\"use strict\";const LOADERS_MAP={jsx:0,js:1,ts:2,tsx:3,css:4,file:5,json:6,toml:7,wasm:8,napi:9,base64:10,dataurl:11,text:12},loaderName=[\"jsx\",\"js\",\"ts\",\"tsx\",\"css\",\"file\",\"json\",\"toml\",\"wasm\",\"napi\",\"base64\",\"dataurl\",\"text\"][defaultLoaderId];var promiseResult=(async(internalID2,path2,namespace2,defaultLoader)=>{var results=this.onLoad.@get(namespace2);if(!results)return this.onLoadAsync(internalID2,null,null),null;for(let[filter,callback]of results)if(filter.test(path2)){var result=callback({path:path2,namespace:namespace2,loader:defaultLoader});while(result&&@isPromise(result)&&(@getPromiseInternalField(result,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)result=@getPromiseInternalField(result,@promiseFieldReactionsOrResult);if(result&&@isPromise(result))result=await result;if(!result||!@isObject(result))continue;var{contents,loader=defaultLoader}=result;if(typeof contents!==\"string\"&&!@isTypedArrayView(contents))@throwTypeError('onLoad plugins must return an object with \"contents\" as a string or Uint8Array');if(typeof loader!==\"string\")@throwTypeError('onLoad plugins must return an object with \"loader\" as a string');const chosenLoader=LOADERS_MAP[loader];if(chosenLoader===@undefined)@throwTypeError(`Loader ${loader} is not supported.`);return this.onLoadAsync(internalID2,contents,chosenLoader),null}return this.onLoadAsync(internalID2,null,null),null})(internalID,path,namespace,loaderName);while(promiseResult&&@isPromise(promiseResult)&&(@getPromiseInternalField(promiseResult,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)promiseResult=@getPromiseInternalField(promiseResult,@promiseFieldReactionsOrResult);if(promiseResult&&@isPromise(promiseResult))promiseResult.then(()=>{},(e)=>{this.addError(internalID,e,1)})})\n";
+// desiredSize
+const JSC::ConstructAbility s_writableStreamDefaultWriterDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamDefaultWriterDesiredSizeCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamDefaultWriterDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamDefaultWriterDesiredSizeCodeLength = 309;
+static const JSC::Intrinsic s_writableStreamDefaultWriterDesiredSizeCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamDefaultWriterDesiredSizeCode = "(function (){\"use strict\";if(!@isWritableStreamDefaultWriter(this))throw @makeThisTypeError(\"WritableStreamDefaultWriter\",\"desiredSize\");if(@getByIdDirectPrivate(this,\"stream\")===@undefined)@throwTypeError(\"WritableStreamDefaultWriter has no stream\");return @writableStreamDefaultWriterGetDesiredSize(this)})\n";
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
-JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
-{\
- JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().bundlerPluginBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().bundlerPluginBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
-}
-WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
-#undef DEFINE_BUILTIN_GENERATOR
+// ready
+const JSC::ConstructAbility s_writableStreamDefaultWriterReadyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamDefaultWriterReadyCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamDefaultWriterReadyCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamDefaultWriterReadyCodeLength = 210;
+static const JSC::Intrinsic s_writableStreamDefaultWriterReadyCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamDefaultWriterReadyCode = "(function (){\"use strict\";if(!@isWritableStreamDefaultWriter(this))return @Promise.@reject(@makeThisTypeError(\"WritableStreamDefaultWriter\",\"ready\"));return @getByIdDirectPrivate(this,\"readyPromise\").promise})\n";
-/* ByteLengthQueuingStrategy.ts */
-// highWaterMark
-const JSC::ConstructAbility s_byteLengthQueuingStrategyHighWaterMarkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_byteLengthQueuingStrategyHighWaterMarkCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_byteLengthQueuingStrategyHighWaterMarkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_byteLengthQueuingStrategyHighWaterMarkCodeLength = 246;
-static const JSC::Intrinsic s_byteLengthQueuingStrategyHighWaterMarkCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_byteLengthQueuingStrategyHighWaterMarkCode = "(function (){\"use strict\";const highWaterMark=@getByIdDirectPrivate(this,\"highWaterMark\");if(highWaterMark===@undefined)@throwTypeError(\"ByteLengthQueuingStrategy.highWaterMark getter called on incompatible |this| value.\");return highWaterMark})\n";
+// abort
+const JSC::ConstructAbility s_writableStreamDefaultWriterAbortCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamDefaultWriterAbortCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamDefaultWriterAbortCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamDefaultWriterAbortCodeLength = 350;
+static const JSC::Intrinsic s_writableStreamDefaultWriterAbortCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamDefaultWriterAbortCode = "(function (reason){\"use strict\";if(!@isWritableStreamDefaultWriter(this))return @Promise.@reject(@makeThisTypeError(\"WritableStreamDefaultWriter\",\"abort\"));if(@getByIdDirectPrivate(this,\"stream\")===@undefined)return @Promise.@reject(@makeTypeError(\"WritableStreamDefaultWriter has no stream\"));return @writableStreamDefaultWriterAbort(this,reason)})\n";
-// size
-const JSC::ConstructAbility s_byteLengthQueuingStrategySizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_byteLengthQueuingStrategySizeCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_byteLengthQueuingStrategySizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_byteLengthQueuingStrategySizeCodeLength = 57;
-static const JSC::Intrinsic s_byteLengthQueuingStrategySizeCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_byteLengthQueuingStrategySizeCode = "(function (chunk){\"use strict\";return chunk.byteLength})\n";
+// close
+const JSC::ConstructAbility s_writableStreamDefaultWriterCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamDefaultWriterCloseCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamDefaultWriterCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamDefaultWriterCloseCodeLength = 492;
+static const JSC::Intrinsic s_writableStreamDefaultWriterCloseCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamDefaultWriterCloseCode = "(function (){\"use strict\";if(!@isWritableStreamDefaultWriter(this))return @Promise.@reject(@makeThisTypeError(\"WritableStreamDefaultWriter\",\"close\"));const stream=@getByIdDirectPrivate(this,\"stream\");if(stream===@undefined)return @Promise.@reject(@makeTypeError(\"WritableStreamDefaultWriter has no stream\"));if(@writableStreamCloseQueuedOrInFlight(stream))return @Promise.@reject(@makeTypeError(\"WritableStreamDefaultWriter is being closed\"));return @writableStreamDefaultWriterClose(this)})\n";
-// initializeByteLengthQueuingStrategy
-const JSC::ConstructAbility s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeLength = 139;
-static const JSC::Intrinsic s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCode = "(function (parameters){\"use strict\";@putByIdDirectPrivate(this,\"highWaterMark\",@extractHighWaterMarkFromQueuingStrategyInit(parameters))})\n";
+// releaseLock
+const JSC::ConstructAbility s_writableStreamDefaultWriterReleaseLockCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamDefaultWriterReleaseLockCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamDefaultWriterReleaseLockCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamDefaultWriterReleaseLockCodeLength = 241;
+static const JSC::Intrinsic s_writableStreamDefaultWriterReleaseLockCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamDefaultWriterReleaseLockCode = "(function (){\"use strict\";if(!@isWritableStreamDefaultWriter(this))throw @makeThisTypeError(\"WritableStreamDefaultWriter\",\"releaseLock\");if(@getByIdDirectPrivate(this,\"stream\")===@undefined)return;@writableStreamDefaultWriterRelease(this)})\n";
+
+// write
+const JSC::ConstructAbility s_writableStreamDefaultWriterWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamDefaultWriterWriteCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamDefaultWriterWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamDefaultWriterWriteCodeLength = 348;
+static const JSC::Intrinsic s_writableStreamDefaultWriterWriteCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamDefaultWriterWriteCode = "(function (chunk){\"use strict\";if(!@isWritableStreamDefaultWriter(this))return @Promise.@reject(@makeThisTypeError(\"WritableStreamDefaultWriter\",\"write\"));if(@getByIdDirectPrivate(this,\"stream\")===@undefined)return @Promise.@reject(@makeTypeError(\"WritableStreamDefaultWriter has no stream\"));return @writableStreamDefaultWriterWrite(this,chunk)})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().byteLengthQueuingStrategyBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().byteLengthQueuingStrategyBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+ return clientData->builtinFunctions().writableStreamDefaultWriterBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().writableStreamDefaultWriterBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
-WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
-/* WritableStreamInternals.ts */
-// isWritableStream
-const JSC::ConstructAbility s_writableStreamInternalsIsWritableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsIsWritableStreamCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsIsWritableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsIsWritableStreamCodeLength = 109;
-static const JSC::Intrinsic s_writableStreamInternalsIsWritableStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsIsWritableStreamCode = "(function (stream){\"use strict\";return @isObject(stream)&&!!@getByIdDirectPrivate(stream,\"underlyingSink\")})\n";
-
-// isWritableStreamDefaultWriter
-const JSC::ConstructAbility s_writableStreamInternalsIsWritableStreamDefaultWriterCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsIsWritableStreamDefaultWriterCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsIsWritableStreamDefaultWriterCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsIsWritableStreamDefaultWriterCodeLength = 108;
-static const JSC::Intrinsic s_writableStreamInternalsIsWritableStreamDefaultWriterCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsIsWritableStreamDefaultWriterCode = "(function (writer){\"use strict\";return @isObject(writer)&&!!@getByIdDirectPrivate(writer,\"closedPromise\")})\n";
-
-// acquireWritableStreamDefaultWriter
-const JSC::ConstructAbility s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeLength = 82;
-static const JSC::Intrinsic s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsAcquireWritableStreamDefaultWriterCode = "(function (stream){\"use strict\";return new @WritableStreamDefaultWriter(stream)})\n";
-
-// createWritableStream
-const JSC::ConstructAbility s_writableStreamInternalsCreateWritableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsCreateWritableStreamCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsCreateWritableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsCreateWritableStreamCodeLength = 453;
-static const JSC::Intrinsic s_writableStreamInternalsCreateWritableStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsCreateWritableStreamCode = "(function (startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,highWaterMark,sizeAlgorithm){\"use strict\";const internalStream={};@initializeWritableStreamSlots(internalStream,{});const controller=new @WritableStreamDefaultController;return @setUpWritableStreamDefaultController(internalStream,controller,startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,highWaterMark,sizeAlgorithm),@createWritableStreamFromInternal(internalStream)})\n";
-
-// createInternalWritableStreamFromUnderlyingSink
-const JSC::ConstructAbility s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeLength = 1388;
-static const JSC::Intrinsic s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCode = "(function (underlyingSink,strategy){\"use strict\";const stream={};if(underlyingSink===@undefined)underlyingSink={};if(strategy===@undefined)strategy={};if(!@isObject(underlyingSink))@throwTypeError(\"WritableStream constructor takes an object as first argument\");if(\"type\"in underlyingSink)@throwRangeError(\"Invalid type is specified\");const sizeAlgorithm=@extractSizeAlgorithm(strategy),highWaterMark=@extractHighWaterMark(strategy,1),underlyingSinkDict={};if(\"start\"in underlyingSink){if(underlyingSinkDict.start=underlyingSink.start,typeof underlyingSinkDict.start!==\"function\")@throwTypeError(\"underlyingSink.start should be a function\")}if(\"write\"in underlyingSink){if(underlyingSinkDict.write=underlyingSink.write,typeof underlyingSinkDict.write!==\"function\")@throwTypeError(\"underlyingSink.write should be a function\")}if(\"close\"in underlyingSink){if(underlyingSinkDict.close=underlyingSink.close,typeof underlyingSinkDict.close!==\"function\")@throwTypeError(\"underlyingSink.close should be a function\")}if(\"abort\"in underlyingSink){if(underlyingSinkDict.abort=underlyingSink.abort,typeof underlyingSinkDict.abort!==\"function\")@throwTypeError(\"underlyingSink.abort should be a function\")}return @initializeWritableStreamSlots(stream,underlyingSink),@setUpWritableStreamDefaultControllerFromUnderlyingSink(stream,underlyingSink,underlyingSinkDict,highWaterMark,sizeAlgorithm),stream})\n";
-
-// initializeWritableStreamSlots
-const JSC::ConstructAbility s_writableStreamInternalsInitializeWritableStreamSlotsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsInitializeWritableStreamSlotsCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsInitializeWritableStreamSlotsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsInitializeWritableStreamSlotsCodeLength = 674;
-static const JSC::Intrinsic s_writableStreamInternalsInitializeWritableStreamSlotsCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsInitializeWritableStreamSlotsCode = "(function (stream,underlyingSink){\"use strict\";@putByIdDirectPrivate(stream,\"state\",\"writable\"),@putByIdDirectPrivate(stream,\"storedError\",@undefined),@putByIdDirectPrivate(stream,\"writer\",@undefined),@putByIdDirectPrivate(stream,\"controller\",@undefined),@putByIdDirectPrivate(stream,\"inFlightWriteRequest\",@undefined),@putByIdDirectPrivate(stream,\"closeRequest\",@undefined),@putByIdDirectPrivate(stream,\"inFlightCloseRequest\",@undefined),@putByIdDirectPrivate(stream,\"pendingAbortRequest\",@undefined),@putByIdDirectPrivate(stream,\"writeRequests\",@createFIFO()),@putByIdDirectPrivate(stream,\"backpressure\",!1),@putByIdDirectPrivate(stream,\"underlyingSink\",underlyingSink)})\n";
-
-// writableStreamCloseForBindings
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamCloseForBindingsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamCloseForBindingsCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamCloseForBindingsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamCloseForBindingsCodeLength = 390;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamCloseForBindingsCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamCloseForBindingsCode = "(function (stream){\"use strict\";if(@isWritableStreamLocked(stream))return @Promise.@reject(@makeTypeError(\"WritableStream.close method can only be used on non locked WritableStream\"));if(@writableStreamCloseQueuedOrInFlight(stream))return @Promise.@reject(@makeTypeError(\"WritableStream.close method can only be used on a being close WritableStream\"));return @writableStreamClose(stream)})\n";
-
-// writableStreamAbortForBindings
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamAbortForBindingsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamAbortForBindingsCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamAbortForBindingsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamAbortForBindingsCodeLength = 236;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamAbortForBindingsCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamAbortForBindingsCode = "(function (stream,reason){\"use strict\";if(@isWritableStreamLocked(stream))return @Promise.@reject(@makeTypeError(\"WritableStream.abort method can only be used on non locked WritableStream\"));return @writableStreamAbort(stream,reason)})\n";
-
-// isWritableStreamLocked
-const JSC::ConstructAbility s_writableStreamInternalsIsWritableStreamLockedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsIsWritableStreamLockedCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsIsWritableStreamLockedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsIsWritableStreamLockedCodeLength = 93;
-static const JSC::Intrinsic s_writableStreamInternalsIsWritableStreamLockedCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsIsWritableStreamLockedCode = "(function (stream){\"use strict\";return @getByIdDirectPrivate(stream,\"writer\")!==@undefined})\n";
-
-// setUpWritableStreamDefaultWriter
-const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeLength = 1249;
-static const JSC::Intrinsic s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsSetUpWritableStreamDefaultWriterCode = "(function (writer,stream){\"use strict\";if(@isWritableStreamLocked(stream))@throwTypeError(\"WritableStream is locked\");@putByIdDirectPrivate(writer,\"stream\",stream),@putByIdDirectPrivate(stream,\"writer\",writer);const readyPromiseCapability=@newPromiseCapability(@Promise),closedPromiseCapability=@newPromiseCapability(@Promise);@putByIdDirectPrivate(writer,\"readyPromise\",readyPromiseCapability),@putByIdDirectPrivate(writer,\"closedPromise\",closedPromiseCapability);const state=@getByIdDirectPrivate(stream,\"state\");if(state===\"writable\"){if(@writableStreamCloseQueuedOrInFlight(stream)||!@getByIdDirectPrivate(stream,\"backpressure\"))readyPromiseCapability.resolve.@call()}else if(state===\"erroring\")readyPromiseCapability.reject.@call(@undefined,@getByIdDirectPrivate(stream,\"storedError\")),@markPromiseAsHandled(readyPromiseCapability.promise);else if(state===\"closed\")readyPromiseCapability.resolve.@call(),closedPromiseCapability.resolve.@call();else{const storedError=@getByIdDirectPrivate(stream,\"storedError\");readyPromiseCapability.reject.@call(@undefined,storedError),@markPromiseAsHandled(readyPromiseCapability.promise),closedPromiseCapability.reject.@call(@undefined,storedError),@markPromiseAsHandled(closedPromiseCapability.promise)}})\n";
-
-// writableStreamAbort
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamAbortCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamAbortCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamAbortCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamAbortCodeLength = 679;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamAbortCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamAbortCode = "(function (stream,reason){\"use strict\";const state=@getByIdDirectPrivate(stream,\"state\");if(state===\"closed\"||state===\"errored\")return @Promise.@resolve();const pendingAbortRequest=@getByIdDirectPrivate(stream,\"pendingAbortRequest\");if(pendingAbortRequest!==@undefined)return pendingAbortRequest.promise.promise;let wasAlreadyErroring=!1;if(state===\"erroring\")wasAlreadyErroring=!0,reason=@undefined;const abortPromiseCapability=@newPromiseCapability(@Promise);if(@putByIdDirectPrivate(stream,\"pendingAbortRequest\",{promise:abortPromiseCapability,reason,wasAlreadyErroring}),!wasAlreadyErroring)@writableStreamStartErroring(stream,reason);return abortPromiseCapability.promise})\n";
-
-// writableStreamClose
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamCloseCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamCloseCodeLength = 674;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamCloseCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamCloseCode = "(function (stream){\"use strict\";const state=@getByIdDirectPrivate(stream,\"state\");if(state===\"closed\"||state===\"errored\")return @Promise.@reject(@makeTypeError(\"Cannot close a writable stream that is closed or errored\"));const closePromiseCapability=@newPromiseCapability(@Promise);@putByIdDirectPrivate(stream,\"closeRequest\",closePromiseCapability);const writer=@getByIdDirectPrivate(stream,\"writer\");if(writer!==@undefined&&@getByIdDirectPrivate(stream,\"backpressure\")&&state===\"writable\")@getByIdDirectPrivate(writer,\"readyPromise\").resolve.@call();return @writableStreamDefaultControllerClose(@getByIdDirectPrivate(stream,\"controller\")),closePromiseCapability.promise})\n";
-
-// writableStreamAddWriteRequest
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamAddWriteRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamAddWriteRequestCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamAddWriteRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamAddWriteRequestCodeLength = 208;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamAddWriteRequestCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamAddWriteRequestCode = "(function (stream){\"use strict\";const writePromiseCapability=@newPromiseCapability(@Promise);return @getByIdDirectPrivate(stream,\"writeRequests\").push(writePromiseCapability),writePromiseCapability.promise})\n";
-
-// writableStreamCloseQueuedOrInFlight
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeLength = 166;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCode = "(function (stream){\"use strict\";return @getByIdDirectPrivate(stream,\"closeRequest\")!==@undefined||@getByIdDirectPrivate(stream,\"inFlightCloseRequest\")!==@undefined})\n";
-
-// writableStreamDealWithRejection
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDealWithRejectionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDealWithRejectionCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDealWithRejectionCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDealWithRejectionCodeLength = 183;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDealWithRejectionCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDealWithRejectionCode = "(function (stream,error){\"use strict\";if(@getByIdDirectPrivate(stream,\"state\")===\"writable\"){@writableStreamStartErroring(stream,error);return}@writableStreamFinishErroring(stream)})\n";
-
-// writableStreamFinishErroring
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishErroringCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishErroringCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishErroringCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamFinishErroringCodeLength = 1193;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishErroringCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamFinishErroringCode = "(function (stream){\"use strict\";@putByIdDirectPrivate(stream,\"state\",\"errored\");const controller=@getByIdDirectPrivate(stream,\"controller\");@getByIdDirectPrivate(controller,\"errorSteps\").@call();const storedError=@getByIdDirectPrivate(stream,\"storedError\"),requests=@getByIdDirectPrivate(stream,\"writeRequests\");for(var request=requests.shift();request;request=requests.shift())request.reject.@call(@undefined,storedError);@putByIdDirectPrivate(stream,\"writeRequests\",@createFIFO());const abortRequest=@getByIdDirectPrivate(stream,\"pendingAbortRequest\");if(abortRequest===@undefined){@writableStreamRejectCloseAndClosedPromiseIfNeeded(stream);return}if(@putByIdDirectPrivate(stream,\"pendingAbortRequest\",@undefined),abortRequest.wasAlreadyErroring){abortRequest.promise.reject.@call(@undefined,storedError),@writableStreamRejectCloseAndClosedPromiseIfNeeded(stream);return}@getByIdDirectPrivate(controller,\"abortSteps\").@call(@undefined,abortRequest.reason).@then(()=>{abortRequest.promise.resolve.@call(),@writableStreamRejectCloseAndClosedPromiseIfNeeded(stream)},(reason)=>{abortRequest.promise.reject.@call(@undefined,reason),@writableStreamRejectCloseAndClosedPromiseIfNeeded(stream)})})\n";
-
-// writableStreamFinishInFlightClose
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeLength = 661;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamFinishInFlightCloseCode = "(function (stream){\"use strict\";if(@getByIdDirectPrivate(stream,\"inFlightCloseRequest\").resolve.@call(),@putByIdDirectPrivate(stream,\"inFlightCloseRequest\",@undefined),@getByIdDirectPrivate(stream,\"state\")===\"erroring\"){@putByIdDirectPrivate(stream,\"storedError\",@undefined);const abortRequest=@getByIdDirectPrivate(stream,\"pendingAbortRequest\");if(abortRequest!==@undefined)abortRequest.promise.resolve.@call(),@putByIdDirectPrivate(stream,\"pendingAbortRequest\",@undefined)}@putByIdDirectPrivate(stream,\"state\",\"closed\");const writer=@getByIdDirectPrivate(stream,\"writer\");if(writer!==@undefined)@getByIdDirectPrivate(writer,\"closedPromise\").resolve.@call()})\n";
-
-// writableStreamFinishInFlightCloseWithError
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeLength = 494;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCode = "(function (stream,error){\"use strict\";@getByIdDirectPrivate(stream,\"inFlightCloseRequest\").reject.@call(@undefined,error),@putByIdDirectPrivate(stream,\"inFlightCloseRequest\",@undefined);const state=@getByIdDirectPrivate(stream,\"state\"),abortRequest=@getByIdDirectPrivate(stream,\"pendingAbortRequest\");if(abortRequest!==@undefined)abortRequest.promise.reject.@call(@undefined,error),@putByIdDirectPrivate(stream,\"pendingAbortRequest\",@undefined);@writableStreamDealWithRejection(stream,error)})\n";
-
-// writableStreamFinishInFlightWrite
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeLength = 167;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamFinishInFlightWriteCode = "(function (stream){\"use strict\";@getByIdDirectPrivate(stream,\"inFlightWriteRequest\").resolve.@call(),@putByIdDirectPrivate(stream,\"inFlightWriteRequest\",@undefined)})\n";
-
-// writableStreamFinishInFlightWriteWithError
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeLength = 285;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCode = "(function (stream,error){\"use strict\";@getByIdDirectPrivate(stream,\"inFlightWriteRequest\").reject.@call(@undefined,error),@putByIdDirectPrivate(stream,\"inFlightWriteRequest\",@undefined);const state=@getByIdDirectPrivate(stream,\"state\");@writableStreamDealWithRejection(stream,error)})\n";
-
-// writableStreamHasOperationMarkedInFlight
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeLength = 174;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCode = "(function (stream){\"use strict\";return @getByIdDirectPrivate(stream,\"inFlightWriteRequest\")!==@undefined||@getByIdDirectPrivate(stream,\"inFlightCloseRequest\")!==@undefined})\n";
-
-// writableStreamMarkCloseRequestInFlight
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeLength = 220;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCode = "(function (stream){\"use strict\";const closeRequest=@getByIdDirectPrivate(stream,\"closeRequest\");@putByIdDirectPrivate(stream,\"inFlightCloseRequest\",closeRequest),@putByIdDirectPrivate(stream,\"closeRequest\",@undefined)})\n";
-
-// writableStreamMarkFirstWriteRequestInFlight
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeLength = 173;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCode = "(function (stream){\"use strict\";const writeRequest=@getByIdDirectPrivate(stream,\"writeRequests\").shift();@putByIdDirectPrivate(stream,\"inFlightWriteRequest\",writeRequest)})\n";
-
-// writableStreamRejectCloseAndClosedPromiseIfNeeded
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeLength = 528;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCode = "(function (stream){\"use strict\";const storedError=@getByIdDirectPrivate(stream,\"storedError\"),closeRequest=@getByIdDirectPrivate(stream,\"closeRequest\");if(closeRequest!==@undefined)closeRequest.reject.@call(@undefined,storedError),@putByIdDirectPrivate(stream,\"closeRequest\",@undefined);const writer=@getByIdDirectPrivate(stream,\"writer\");if(writer!==@undefined){const closedPromise=@getByIdDirectPrivate(writer,\"closedPromise\");closedPromise.reject.@call(@undefined,storedError),@markPromiseAsHandled(closedPromise.promise)}})\n";
-
-// writableStreamStartErroring
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamStartErroringCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamStartErroringCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamStartErroringCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamStartErroringCodeLength = 487;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamStartErroringCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamStartErroringCode = "(function (stream,reason){\"use strict\";const controller=@getByIdDirectPrivate(stream,\"controller\");@putByIdDirectPrivate(stream,\"state\",\"erroring\"),@putByIdDirectPrivate(stream,\"storedError\",reason);const writer=@getByIdDirectPrivate(stream,\"writer\");if(writer!==@undefined)@writableStreamDefaultWriterEnsureReadyPromiseRejected(writer,reason);if(!@writableStreamHasOperationMarkedInFlight(stream)&&@getByIdDirectPrivate(controller,\"started\")===1)@writableStreamFinishErroring(stream)})\n";
-
-// writableStreamUpdateBackpressure
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamUpdateBackpressureCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamUpdateBackpressureCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamUpdateBackpressureCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamUpdateBackpressureCodeLength = 400;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamUpdateBackpressureCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamUpdateBackpressureCode = "(function (stream,backpressure){\"use strict\";const writer=@getByIdDirectPrivate(stream,\"writer\");if(writer!==@undefined&&backpressure!==@getByIdDirectPrivate(stream,\"backpressure\"))if(backpressure)@putByIdDirectPrivate(writer,\"readyPromise\",@newPromiseCapability(@Promise));else @getByIdDirectPrivate(writer,\"readyPromise\").resolve.@call();@putByIdDirectPrivate(stream,\"backpressure\",backpressure)})\n";
-
-// writableStreamDefaultWriterAbort
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeLength = 136;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultWriterAbortCode = "(function (writer,reason){\"use strict\";const stream=@getByIdDirectPrivate(writer,\"stream\");return @writableStreamAbort(stream,reason)})\n";
-
-// writableStreamDefaultWriterClose
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeLength = 122;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultWriterCloseCode = "(function (writer){\"use strict\";const stream=@getByIdDirectPrivate(writer,\"stream\");return @writableStreamClose(stream)})\n";
-
-// writableStreamDefaultWriterCloseWithErrorPropagation
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeLength = 362;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCode = "(function (writer){\"use strict\";const stream=@getByIdDirectPrivate(writer,\"stream\"),state=@getByIdDirectPrivate(stream,\"state\");if(@writableStreamCloseQueuedOrInFlight(stream)||state===\"closed\")return @Promise.@resolve();if(state===\"errored\")return @Promise.@reject(@getByIdDirectPrivate(stream,\"storedError\"));return @writableStreamDefaultWriterClose(writer)})\n";
-
-// writableStreamDefaultWriterEnsureClosedPromiseRejected
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeLength = 529;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCode = "(function (writer,error){\"use strict\";let closedPromiseCapability=@getByIdDirectPrivate(writer,\"closedPromise\"),closedPromise=closedPromiseCapability.promise;if((@getPromiseInternalField(closedPromise,@promiseFieldFlags)&@promiseStateMask)!==@promiseStatePending)closedPromiseCapability=@newPromiseCapability(@Promise),closedPromise=closedPromiseCapability.promise,@putByIdDirectPrivate(writer,\"closedPromise\",closedPromiseCapability);closedPromiseCapability.reject.@call(@undefined,error),@markPromiseAsHandled(closedPromise)})\n";
-
-// writableStreamDefaultWriterEnsureReadyPromiseRejected
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeLength = 517;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCode = "(function (writer,error){\"use strict\";let readyPromiseCapability=@getByIdDirectPrivate(writer,\"readyPromise\"),readyPromise=readyPromiseCapability.promise;if((@getPromiseInternalField(readyPromise,@promiseFieldFlags)&@promiseStateMask)!==@promiseStatePending)readyPromiseCapability=@newPromiseCapability(@Promise),readyPromise=readyPromiseCapability.promise,@putByIdDirectPrivate(writer,\"readyPromise\",readyPromiseCapability);readyPromiseCapability.reject.@call(@undefined,error),@markPromiseAsHandled(readyPromise)})\n";
-
-// writableStreamDefaultWriterGetDesiredSize
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeLength = 310;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCode = "(function (writer){\"use strict\";const stream=@getByIdDirectPrivate(writer,\"stream\"),state=@getByIdDirectPrivate(stream,\"state\");if(state===\"errored\"||state===\"erroring\")return null;if(state===\"closed\")return 0;return @writableStreamDefaultControllerGetDesiredSize(@getByIdDirectPrivate(stream,\"controller\"))})\n";
-
-// writableStreamDefaultWriterRelease
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeLength = 408;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultWriterReleaseCode = "(function (writer){\"use strict\";const stream=@getByIdDirectPrivate(writer,\"stream\"),releasedError=@makeTypeError(\"writableStreamDefaultWriterRelease\");@writableStreamDefaultWriterEnsureReadyPromiseRejected(writer,releasedError),@writableStreamDefaultWriterEnsureClosedPromiseRejected(writer,releasedError),@putByIdDirectPrivate(stream,\"writer\",@undefined),@putByIdDirectPrivate(writer,\"stream\",@undefined)})\n";
-
-// writableStreamDefaultWriterWrite
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeLength = 982;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultWriterWriteCode = "(function (writer,chunk){\"use strict\";const stream=@getByIdDirectPrivate(writer,\"stream\"),controller=@getByIdDirectPrivate(stream,\"controller\"),chunkSize=@writableStreamDefaultControllerGetChunkSize(controller,chunk);if(stream!==@getByIdDirectPrivate(writer,\"stream\"))return @Promise.@reject(@makeTypeError(\"writer is not stream's writer\"));const state=@getByIdDirectPrivate(stream,\"state\");if(state===\"errored\")return @Promise.@reject(@getByIdDirectPrivate(stream,\"storedError\"));if(@writableStreamCloseQueuedOrInFlight(stream)||state===\"closed\")return @Promise.@reject(@makeTypeError(\"stream is closing or closed\"));if(@writableStreamCloseQueuedOrInFlight(stream)||state===\"closed\")return @Promise.@reject(@makeTypeError(\"stream is closing or closed\"));if(state===\"erroring\")return @Promise.@reject(@getByIdDirectPrivate(stream,\"storedError\"));const promise=@writableStreamAddWriteRequest(stream);return @writableStreamDefaultControllerWrite(controller,chunk,chunkSize),promise})\n";
-
-// setUpWritableStreamDefaultController
-const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeLength = 921;
-static const JSC::Intrinsic s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerCode = "(function (stream,controller,startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,highWaterMark,sizeAlgorithm){\"use strict\";@putByIdDirectPrivate(controller,\"stream\",stream),@putByIdDirectPrivate(stream,\"controller\",controller),@resetQueue(@getByIdDirectPrivate(controller,\"queue\")),@putByIdDirectPrivate(controller,\"started\",-1),@putByIdDirectPrivate(controller,\"startAlgorithm\",startAlgorithm),@putByIdDirectPrivate(controller,\"strategySizeAlgorithm\",sizeAlgorithm),@putByIdDirectPrivate(controller,\"strategyHWM\",highWaterMark),@putByIdDirectPrivate(controller,\"writeAlgorithm\",writeAlgorithm),@putByIdDirectPrivate(controller,\"closeAlgorithm\",closeAlgorithm),@putByIdDirectPrivate(controller,\"abortAlgorithm\",abortAlgorithm);const backpressure=@writableStreamDefaultControllerGetBackpressure(controller);@writableStreamUpdateBackpressure(stream,backpressure),@writableStreamDefaultControllerStart(controller)})\n";
-
-// writableStreamDefaultControllerStart
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerStartCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerStartCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerStartCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultControllerStartCodeLength = 710;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerStartCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultControllerStartCode = "(function (controller){\"use strict\";if(@getByIdDirectPrivate(controller,\"started\")!==-1)return;@putByIdDirectPrivate(controller,\"started\",0);const startAlgorithm=@getByIdDirectPrivate(controller,\"startAlgorithm\");@putByIdDirectPrivate(controller,\"startAlgorithm\",@undefined);const stream=@getByIdDirectPrivate(controller,\"stream\");return @Promise.@resolve(startAlgorithm.@call()).@then(()=>{const state=@getByIdDirectPrivate(stream,\"state\");@putByIdDirectPrivate(controller,\"started\",1),@writableStreamDefaultControllerAdvanceQueueIfNeeded(controller)},(error)=>{const state=@getByIdDirectPrivate(stream,\"state\");@putByIdDirectPrivate(controller,\"started\",1),@writableStreamDealWithRejection(stream,error)})})\n";
-
-// setUpWritableStreamDefaultControllerFromUnderlyingSink
-const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeLength = 1127;
-static const JSC::Intrinsic s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCode = "(function (stream,underlyingSink,underlyingSinkDict,highWaterMark,sizeAlgorithm){\"use strict\";const controller=new @WritableStreamDefaultController;let startAlgorithm=()=>{},writeAlgorithm=()=>{return @Promise.@resolve()},closeAlgorithm=()=>{return @Promise.@resolve()},abortAlgorithm=()=>{return @Promise.@resolve()};if(\"start\"in underlyingSinkDict){const startMethod=underlyingSinkDict.start;startAlgorithm=()=>@promiseInvokeOrNoopMethodNoCatch(underlyingSink,startMethod,[controller])}if(\"write\"in underlyingSinkDict){const writeMethod=underlyingSinkDict.write;writeAlgorithm=(chunk)=>@promiseInvokeOrNoopMethod(underlyingSink,writeMethod,[chunk,controller])}if(\"close\"in underlyingSinkDict){const closeMethod=underlyingSinkDict.close;closeAlgorithm=()=>@promiseInvokeOrNoopMethod(underlyingSink,closeMethod,[])}if(\"abort\"in underlyingSinkDict){const abortMethod=underlyingSinkDict.abort;abortAlgorithm=(reason)=>@promiseInvokeOrNoopMethod(underlyingSink,abortMethod,[reason])}@setUpWritableStreamDefaultController(stream,controller,startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,highWaterMark,sizeAlgorithm)})\n";
-
-// writableStreamDefaultControllerAdvanceQueueIfNeeded
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeLength = 609;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"stream\");if(@getByIdDirectPrivate(controller,\"started\")!==1)return;if(@getByIdDirectPrivate(stream,\"inFlightWriteRequest\")!==@undefined)return;if(@getByIdDirectPrivate(stream,\"state\")===\"erroring\"){@writableStreamFinishErroring(stream);return}const queue=@getByIdDirectPrivate(controller,\"queue\");if(queue.content\?.isEmpty()\?\?!1)return;const value=@peekQueueValue(queue);if(value===@isCloseSentinel)@writableStreamDefaultControllerProcessClose(controller);else @writableStreamDefaultControllerProcessWrite(controller,value)})\n";
-
-// isCloseSentinel
-const JSC::ConstructAbility s_writableStreamInternalsIsCloseSentinelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsIsCloseSentinelCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsIsCloseSentinelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsIsCloseSentinelCodeLength = 29;
-static const JSC::Intrinsic s_writableStreamInternalsIsCloseSentinelCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsIsCloseSentinelCode = "(function (){\"use strict\";})\n";
-
-// writableStreamDefaultControllerClearAlgorithms
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeLength = 293;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCode = "(function (controller){\"use strict\";@putByIdDirectPrivate(controller,\"writeAlgorithm\",@undefined),@putByIdDirectPrivate(controller,\"closeAlgorithm\",@undefined),@putByIdDirectPrivate(controller,\"abortAlgorithm\",@undefined),@putByIdDirectPrivate(controller,\"strategySizeAlgorithm\",@undefined)})\n";
-
-// writableStreamDefaultControllerClose
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeLength = 187;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultControllerCloseCode = "(function (controller){\"use strict\";@enqueueValueWithSize(@getByIdDirectPrivate(controller,\"queue\"),@isCloseSentinel,0),@writableStreamDefaultControllerAdvanceQueueIfNeeded(controller)})\n";
-
-// writableStreamDefaultControllerError
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeLength = 203;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultControllerErrorCode = "(function (controller,error){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"stream\");@writableStreamDefaultControllerClearAlgorithms(controller),@writableStreamStartErroring(stream,error)})\n";
-
-// writableStreamDefaultControllerErrorIfNeeded
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeLength = 210;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCode = "(function (controller,error){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"stream\");if(@getByIdDirectPrivate(stream,\"state\")===\"writable\")@writableStreamDefaultControllerError(controller,error)})\n";
-
-// writableStreamDefaultControllerGetBackpressure
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeLength = 107;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCode = "(function (controller){\"use strict\";return @writableStreamDefaultControllerGetDesiredSize(controller)<=0})\n";
-
-// writableStreamDefaultControllerGetChunkSize
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeLength = 216;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCode = "(function (controller,chunk){\"use strict\";try{return @getByIdDirectPrivate(controller,\"strategySizeAlgorithm\").@call(@undefined,chunk)}catch(e){return @writableStreamDefaultControllerErrorIfNeeded(controller,e),1}})\n";
-
-// writableStreamDefaultControllerGetDesiredSize
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeLength = 140;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCode = "(function (controller){\"use strict\";return @getByIdDirectPrivate(controller,\"strategyHWM\")-@getByIdDirectPrivate(controller,\"queue\").size})\n";
-
-// writableStreamDefaultControllerProcessClose
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeLength = 485;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"stream\");@writableStreamMarkCloseRequestInFlight(stream),@dequeueValue(@getByIdDirectPrivate(controller,\"queue\"));const sinkClosePromise=@getByIdDirectPrivate(controller,\"closeAlgorithm\").@call();@writableStreamDefaultControllerClearAlgorithms(controller),sinkClosePromise.@then(()=>{@writableStreamFinishInFlightClose(stream)},(reason)=>{@writableStreamFinishInFlightCloseWithError(stream,reason)})})\n";
-
-// writableStreamDefaultControllerProcessWrite
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeLength = 845;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCode = "(function (controller,chunk){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"stream\");@writableStreamMarkFirstWriteRequestInFlight(stream),@getByIdDirectPrivate(controller,\"writeAlgorithm\").@call(@undefined,chunk).@then(()=>{@writableStreamFinishInFlightWrite(stream);const state=@getByIdDirectPrivate(stream,\"state\");if(@dequeueValue(@getByIdDirectPrivate(controller,\"queue\")),!@writableStreamCloseQueuedOrInFlight(stream)&&state===\"writable\"){const backpressure=@writableStreamDefaultControllerGetBackpressure(controller);@writableStreamUpdateBackpressure(stream,backpressure)}@writableStreamDefaultControllerAdvanceQueueIfNeeded(controller)},(reason)=>{if(@getByIdDirectPrivate(stream,\"state\")===\"writable\")@writableStreamDefaultControllerClearAlgorithms(controller);@writableStreamFinishInFlightWriteWithError(stream,reason)})})\n";
+/* ConsoleObject.ts */
+// asyncIterator
+const JSC::ConstructAbility s_consoleObjectAsyncIteratorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_consoleObjectAsyncIteratorCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_consoleObjectAsyncIteratorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_consoleObjectAsyncIteratorCodeLength = 949;
+static const JSC::Intrinsic s_consoleObjectAsyncIteratorCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_consoleObjectAsyncIteratorCode = "(function (){\"use strict\";const Iterator=async function*ConsoleAsyncIterator(){var reader=@Bun.stdin.stream().getReader(),decoder=new globalThis.TextDecoder(\"utf-8\",{fatal:!1}),deferredError,indexOf=@Bun.indexOfLine;try{while(!0){var done,value,pendingChunk;const firstResult=reader.readMany();if(@isPromise(firstResult))({done,value}=await firstResult);else({done,value}=firstResult);if(done){if(pendingChunk)yield decoder.decode(pendingChunk);return}var actualChunk;for(let chunk of value){if(actualChunk=chunk,pendingChunk)actualChunk=@Buffer.concat([pendingChunk,chunk]),pendingChunk=null;var last=0,i=indexOf(actualChunk,last);while(i!==-1)yield decoder.decode(actualChunk.subarray(last,i)),last=i+1,i=indexOf(actualChunk,last);pendingChunk=actualChunk.subarray(last)}}}catch(e){deferredError=e}finally{if(reader.releaseLock(),deferredError)throw deferredError}},symbol=globalThis.Symbol.asyncIterator;return this[symbol]=Iterator,Iterator()})\n";
-// writableStreamDefaultControllerWrite
-const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeLength = 578;
-static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultControllerWriteCode = "(function (controller,chunk,chunkSize){\"use strict\";try{@enqueueValueWithSize(@getByIdDirectPrivate(controller,\"queue\"),chunk,chunkSize);const stream=@getByIdDirectPrivate(controller,\"stream\"),state=@getByIdDirectPrivate(stream,\"state\");if(!@writableStreamCloseQueuedOrInFlight(stream)&&state===\"writable\"){const backpressure=@writableStreamDefaultControllerGetBackpressure(controller);@writableStreamUpdateBackpressure(stream,backpressure)}@writableStreamDefaultControllerAdvanceQueueIfNeeded(controller)}catch(e){@writableStreamDefaultControllerErrorIfNeeded(controller,e)}})\n";
+// write
+const JSC::ConstructAbility s_consoleObjectWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_consoleObjectWriteCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_consoleObjectWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_consoleObjectWriteCodeLength = 392;
+static const JSC::Intrinsic s_consoleObjectWriteCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_consoleObjectWriteCode = "(function (input){\"use strict\";var writer=@getByIdDirectPrivate(this,\"writer\");if(!writer){var length=@toLength(input\?.length\?\?0);writer=@Bun.stdout.writer({highWaterMark:length>65536\?length:65536}),@putByIdDirectPrivate(this,\"writer\",writer)}var wrote=writer.write(input);const count=@argumentCount();for(var i=1;i<count;i++)wrote+=writer.write(@argument(i));return writer.flush(!0),wrote})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().writableStreamInternalsBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().writableStreamInternalsBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+ return clientData->builtinFunctions().consoleObjectBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().consoleObjectBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
-WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* TransformStreamInternals.ts */
@@ -633,72 +263,122 @@ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
WEBCORE_FOREACH_TRANSFORMSTREAMINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
-/* ProcessObjectInternals.ts */
-// binding
-const JSC::ConstructAbility s_processObjectInternalsBindingCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_processObjectInternalsBindingCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_processObjectInternalsBindingCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_processObjectInternalsBindingCodeLength = 511;
-static const JSC::Intrinsic s_processObjectInternalsBindingCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_processObjectInternalsBindingCode = "(function (bindingName){\"use strict\";if(bindingName===\"constants\")return @processBindingConstants;const issue={fs:3546,buffer:2020,natives:2254,uv:2891}[bindingName];if(issue)throw new Error(`process.binding(\"${bindingName}\") is not implemented in Bun. Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/${issue}`);@throwTypeError(`process.binding(\"${bindingName}\") is not implemented in Bun. If that breaks something, please file an issue and include a reproducible code sample.`)})\n";
+/* ReadableStreamBYOBRequest.ts */
+// initializeReadableStreamBYOBRequest
+const JSC::ConstructAbility s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeLength = 267;
+static const JSC::Intrinsic s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCode = "(function (controller,view){\"use strict\";if(arguments.length!==3&&arguments[2]!==@isReadableStream)@throwTypeError(\"ReadableStreamBYOBRequest constructor should not be called directly\");return @privateInitializeReadableStreamBYOBRequest.@call(this,controller,view)})\n";
-// getStdioWriteStream
-const JSC::ConstructAbility s_processObjectInternalsGetStdioWriteStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_processObjectInternalsGetStdioWriteStreamCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_processObjectInternalsGetStdioWriteStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_processObjectInternalsGetStdioWriteStreamCodeLength = 621;
-static const JSC::Intrinsic s_processObjectInternalsGetStdioWriteStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_processObjectInternalsGetStdioWriteStreamCode = "(function (fd){\"use strict\";const stream=(@getInternalField(@internalModuleRegistry,42)||@createInternalModuleById(42)).WriteStream(fd);if(process.on(\"SIGWINCH\",()=>{stream._refreshSize()}),fd===1)stream.destroySoon=stream.destroy,stream._destroy=function(err,cb){if(cb(err),this._undestroy(),!this._writableState.emitClose)process.nextTick(()=>{this.emit(\"close\")})};else if(fd===2)stream.destroySoon=stream.destroy,stream._destroy=function(err,cb){if(cb(err),this._undestroy(),!this._writableState.emitClose)process.nextTick(()=>{this.emit(\"close\")})};return stream._type=\"tty\",stream._isStdio=!0,stream.fd=fd,stream})\n";
+// respond
+const JSC::ConstructAbility s_readableStreamBYOBRequestRespondCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamBYOBRequestRespondCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamBYOBRequestRespondCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamBYOBRequestRespondCodeLength = 452;
+static const JSC::Intrinsic s_readableStreamBYOBRequestRespondCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamBYOBRequestRespondCode = "(function (bytesWritten){\"use strict\";if(!@isReadableStreamBYOBRequest(this))throw @makeThisTypeError(\"ReadableStreamBYOBRequest\",\"respond\");if(@getByIdDirectPrivate(this,\"associatedReadableByteStreamController\")===@undefined)@throwTypeError(\"ReadableStreamBYOBRequest.associatedReadableByteStreamController is undefined\");return @readableByteStreamControllerRespond(@getByIdDirectPrivate(this,\"associatedReadableByteStreamController\"),bytesWritten)})\n";
-// getStdinStream
-const JSC::ConstructAbility s_processObjectInternalsGetStdinStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_processObjectInternalsGetStdinStreamCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_processObjectInternalsGetStdinStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_processObjectInternalsGetStdinStreamCodeLength = 1386;
-static const JSC::Intrinsic s_processObjectInternalsGetStdinStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_processObjectInternalsGetStdinStreamCode = "(function (fd){\"use strict\";var reader,readerRef;function ref(){reader\?\?=@Bun.stdin.stream().getReader(),readerRef\?\?=setInterval(()=>{},1<<30)}function unref(){if(readerRef)clearInterval(readerRef),readerRef=@undefined;if(reader)reader.cancel(),reader=@undefined}const stream=new((@getInternalField(@internalModuleRegistry,42))||(@createInternalModuleById(42))).ReadStream(fd),originalOn=stream.on;stream.on=function(event,listener){if(event===\"readable\")ref();return originalOn.call(this,event,listener)},stream.fd=fd;const originalPause=stream.pause;stream.pause=function(){return unref(),originalPause.call(this)};const originalResume=stream.resume;stream.resume=function(){return ref(),originalResume.call(this)};async function internalRead(stream2){try{var done,value;const read=reader\?.readMany();if(@isPromise(read))({done,value}=await read);else({done,value}=read);if(!done){stream2.push(value[0]);const length=value.length;for(let i=1;i<length;i++)stream2.push(value[i])}else stream2.emit(\"end\"),stream2.pause()}catch(err){stream2.destroy(err)}}return stream._read=function(size){internalRead(this)},stream.on(\"resume\",()=>{ref(),stream._undestroy()}),stream._readableState.reading=!1,stream.on(\"pause\",()=>{process.nextTick(()=>{if(!stream.readableFlowing)stream._readableState.reading=!1})}),stream.on(\"close\",()=>{process.nextTick(()=>{stream.destroy(),unref()})}),stream})\n";
+// respondWithNewView
+const JSC::ConstructAbility s_readableStreamBYOBRequestRespondWithNewViewCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamBYOBRequestRespondWithNewViewCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamBYOBRequestRespondWithNewViewCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamBYOBRequestRespondWithNewViewCodeLength = 607;
+static const JSC::Intrinsic s_readableStreamBYOBRequestRespondWithNewViewCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamBYOBRequestRespondWithNewViewCode = "(function (view){\"use strict\";if(!@isReadableStreamBYOBRequest(this))throw @makeThisTypeError(\"ReadableStreamBYOBRequest\",\"respond\");if(@getByIdDirectPrivate(this,\"associatedReadableByteStreamController\")===@undefined)@throwTypeError(\"ReadableStreamBYOBRequest.associatedReadableByteStreamController is undefined\");if(!@isObject(view))@throwTypeError(\"Provided view is not an object\");if(!@ArrayBuffer.@isView(view))@throwTypeError(\"Provided view is not an ArrayBufferView\");return @readableByteStreamControllerRespondWithNewView(@getByIdDirectPrivate(this,\"associatedReadableByteStreamController\"),view)})\n";
+
+// view
+const JSC::ConstructAbility s_readableStreamBYOBRequestViewCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamBYOBRequestViewCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamBYOBRequestViewCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamBYOBRequestViewCodeLength = 172;
+static const JSC::Intrinsic s_readableStreamBYOBRequestViewCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamBYOBRequestViewCode = "(function (){\"use strict\";if(!@isReadableStreamBYOBRequest(this))throw @makeGetterTypeError(\"ReadableStreamBYOBRequest\",\"view\");return @getByIdDirectPrivate(this,\"view\")})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().processObjectInternalsBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().processObjectInternalsBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+ return clientData->builtinFunctions().readableStreamBYOBRequestBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().readableStreamBYOBRequestBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
-WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
-/* TransformStream.ts */
-// initializeTransformStream
-const JSC::ConstructAbility s_transformStreamInitializeTransformStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_transformStreamInitializeTransformStreamCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_transformStreamInitializeTransformStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_transformStreamInitializeTransformStreamCodeLength = 2041;
-static const JSC::Intrinsic s_transformStreamInitializeTransformStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_transformStreamInitializeTransformStreamCode = "(function (){\"use strict\";let transformer=arguments[0];if(@isObject(transformer)&&@getByIdDirectPrivate(transformer,\"TransformStream\"))return this;let writableStrategy=arguments[1],readableStrategy=arguments[2];if(transformer===@undefined)transformer=null;if(readableStrategy===@undefined)readableStrategy={};if(writableStrategy===@undefined)writableStrategy={};let transformerDict={};if(transformer!==null){if(\"start\"in transformer){if(transformerDict.start=transformer.start,typeof transformerDict.start!==\"function\")@throwTypeError(\"transformer.start should be a function\")}if(\"transform\"in transformer){if(transformerDict.transform=transformer.transform,typeof transformerDict.transform!==\"function\")@throwTypeError(\"transformer.transform should be a function\")}if(\"flush\"in transformer){if(transformerDict.flush=transformer.flush,typeof transformerDict.flush!==\"function\")@throwTypeError(\"transformer.flush should be a function\")}if(\"readableType\"in transformer)@throwRangeError(\"TransformStream transformer has a readableType\");if(\"writableType\"in transformer)@throwRangeError(\"TransformStream transformer has a writableType\")}const readableHighWaterMark=@extractHighWaterMark(readableStrategy,0),readableSizeAlgorithm=@extractSizeAlgorithm(readableStrategy),writableHighWaterMark=@extractHighWaterMark(writableStrategy,1),writableSizeAlgorithm=@extractSizeAlgorithm(writableStrategy),startPromiseCapability=@newPromiseCapability(@Promise);if(@initializeTransformStream(this,startPromiseCapability.promise,writableHighWaterMark,writableSizeAlgorithm,readableHighWaterMark,readableSizeAlgorithm),@setUpTransformStreamDefaultControllerFromTransformer(this,transformer,transformerDict),(\"start\"in transformerDict)){const controller=@getByIdDirectPrivate(this,\"controller\");(()=>@promiseInvokeOrNoopMethodNoCatch(transformer,transformerDict.start,[controller]))().@then(()=>{startPromiseCapability.resolve.@call()},(error)=>{startPromiseCapability.reject.@call(@undefined,error)})}else startPromiseCapability.resolve.@call();return this})\n";
+/* ReadableStreamBYOBReader.ts */
+// initializeReadableStreamBYOBReader
+const JSC::ConstructAbility s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeLength = 510;
+static const JSC::Intrinsic s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCode = "(function (stream){\"use strict\";if(!@isReadableStream(stream))@throwTypeError(\"ReadableStreamBYOBReader needs a ReadableStream\");if(!@isReadableByteStreamController(@getByIdDirectPrivate(stream,\"readableStreamController\")))@throwTypeError(\"ReadableStreamBYOBReader needs a ReadableByteStreamController\");if(@isReadableStreamLocked(stream))@throwTypeError(\"ReadableStream is locked\");return @readableStreamReaderGenericInitialize(this,stream),@putByIdDirectPrivate(this,\"readIntoRequests\",@createFIFO()),this})\n";
-// readable
-const JSC::ConstructAbility s_transformStreamReadableCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_transformStreamReadableCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_transformStreamReadableCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_transformStreamReadableCodeLength = 158;
-static const JSC::Intrinsic s_transformStreamReadableCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_transformStreamReadableCode = "(function (){\"use strict\";if(!@isTransformStream(this))throw @makeThisTypeError(\"TransformStream\",\"readable\");return @getByIdDirectPrivate(this,\"readable\")})\n";
+// cancel
+const JSC::ConstructAbility s_readableStreamBYOBReaderCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamBYOBReaderCancelCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamBYOBReaderCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamBYOBReaderCancelCodeLength = 361;
+static const JSC::Intrinsic s_readableStreamBYOBReaderCancelCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamBYOBReaderCancelCode = "(function (reason){\"use strict\";if(!@isReadableStreamBYOBReader(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStreamBYOBReader\",\"cancel\"));if(!@getByIdDirectPrivate(this,\"ownerReadableStream\"))return @Promise.@reject(@makeTypeError(\"cancel() called on a reader owned by no readable stream\"));return @readableStreamReaderGenericCancel(this,reason)})\n";
-// writable
-const JSC::ConstructAbility s_transformStreamWritableCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_transformStreamWritableCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_transformStreamWritableCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_transformStreamWritableCodeLength = 158;
-static const JSC::Intrinsic s_transformStreamWritableCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_transformStreamWritableCode = "(function (){\"use strict\";if(!@isTransformStream(this))throw @makeThisTypeError(\"TransformStream\",\"writable\");return @getByIdDirectPrivate(this,\"writable\")})\n";
+// read
+const JSC::ConstructAbility s_readableStreamBYOBReaderReadCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamBYOBReaderReadCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamBYOBReaderReadCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamBYOBReaderReadCodeLength = 663;
+static const JSC::Intrinsic s_readableStreamBYOBReaderReadCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamBYOBReaderReadCode = "(function (view){\"use strict\";if(!@isReadableStreamBYOBReader(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStreamBYOBReader\",\"read\"));if(!@getByIdDirectPrivate(this,\"ownerReadableStream\"))return @Promise.@reject(@makeTypeError(\"read() called on a reader owned by no readable stream\"));if(!@isObject(view))return @Promise.@reject(@makeTypeError(\"Provided view is not an object\"));if(!@ArrayBuffer.@isView(view))return @Promise.@reject(@makeTypeError(\"Provided view is not an ArrayBufferView\"));if(view.byteLength===0)return @Promise.@reject(@makeTypeError(\"Provided view cannot have a 0 byteLength\"));return @readableStreamBYOBReaderRead(this,view)})\n";
+
+// releaseLock
+const JSC::ConstructAbility s_readableStreamBYOBReaderReleaseLockCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamBYOBReaderReleaseLockCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamBYOBReaderReleaseLockCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamBYOBReaderReleaseLockCodeLength = 382;
+static const JSC::Intrinsic s_readableStreamBYOBReaderReleaseLockCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamBYOBReaderReleaseLockCode = "(function (){\"use strict\";if(!@isReadableStreamBYOBReader(this))throw @makeThisTypeError(\"ReadableStreamBYOBReader\",\"releaseLock\");if(!@getByIdDirectPrivate(this,\"ownerReadableStream\"))return;if(@getByIdDirectPrivate(this,\"readIntoRequests\")\?.isNotEmpty())@throwTypeError(\"There are still pending read requests, cannot release the lock\");@readableStreamReaderGenericRelease(this)})\n";
+
+// closed
+const JSC::ConstructAbility s_readableStreamBYOBReaderClosedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamBYOBReaderClosedCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamBYOBReaderClosedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamBYOBReaderClosedCodeLength = 218;
+static const JSC::Intrinsic s_readableStreamBYOBReaderClosedCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamBYOBReaderClosedCode = "(function (){\"use strict\";if(!@isReadableStreamBYOBReader(this))return @Promise.@reject(@makeGetterTypeError(\"ReadableStreamBYOBReader\",\"closed\"));return @getByIdDirectPrivate(this,\"closedPromiseCapability\").promise})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().transformStreamBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().transformStreamBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+ return clientData->builtinFunctions().readableStreamBYOBReaderBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().readableStreamBYOBReaderBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
-WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+
+/* WritableStreamDefaultController.ts */
+// initializeWritableStreamDefaultController
+const JSC::ConstructAbility s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeLength = 388;
+static const JSC::Intrinsic s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCode = "(function (){\"use strict\";return @putByIdDirectPrivate(this,\"queue\",@newQueue()),@putByIdDirectPrivate(this,\"abortSteps\",(reason)=>{const result=@getByIdDirectPrivate(this,\"abortAlgorithm\").@call(@undefined,reason);return @writableStreamDefaultControllerClearAlgorithms(this),result}),@putByIdDirectPrivate(this,\"errorSteps\",()=>{@resetQueue(@getByIdDirectPrivate(this,\"queue\"))}),this})\n";
+
+// error
+const JSC::ConstructAbility s_writableStreamDefaultControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamDefaultControllerErrorCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamDefaultControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamDefaultControllerErrorCodeLength = 311;
+static const JSC::Intrinsic s_writableStreamDefaultControllerErrorCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamDefaultControllerErrorCode = "(function (e){\"use strict\";if(@getByIdDirectPrivate(this,\"abortSteps\")===@undefined)throw @makeThisTypeError(\"WritableStreamDefaultController\",\"error\");const stream=@getByIdDirectPrivate(this,\"stream\");if(@getByIdDirectPrivate(stream,\"state\")!==\"writable\")return;@writableStreamDefaultControllerError(this,e)})\n";
+
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
+{\
+ JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
+ return clientData->builtinFunctions().writableStreamDefaultControllerBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().writableStreamDefaultControllerBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+}
+WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* Module.ts */
@@ -743,544 +423,6 @@ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
WEBCORE_FOREACH_MODULE_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
-/* JSBufferPrototype.ts */
-// setBigUint64
-const JSC::ConstructAbility s_jsBufferPrototypeSetBigUint64CodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeSetBigUint64CodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeSetBigUint64CodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeSetBigUint64CodeLength = 156;
-static const JSC::Intrinsic s_jsBufferPrototypeSetBigUint64CodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeSetBigUint64Code = "(function (offset,value,le){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigUint64(offset,value,le)})\n";
-
-// readInt8
-const JSC::ConstructAbility s_jsBufferPrototypeReadInt8CodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadInt8CodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt8CodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadInt8CodeLength = 133;
-static const JSC::Intrinsic s_jsBufferPrototypeReadInt8CodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadInt8Code = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getInt8(offset)})\n";
-
-// readUInt8
-const JSC::ConstructAbility s_jsBufferPrototypeReadUInt8CodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadUInt8CodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt8CodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadUInt8CodeLength = 134;
-static const JSC::Intrinsic s_jsBufferPrototypeReadUInt8CodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadUInt8Code = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getUint8(offset)})\n";
-
-// readInt16LE
-const JSC::ConstructAbility s_jsBufferPrototypeReadInt16LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadInt16LECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt16LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadInt16LECodeLength = 137;
-static const JSC::Intrinsic s_jsBufferPrototypeReadInt16LECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadInt16LECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getInt16(offset,!0)})\n";
-
-// readInt16BE
-const JSC::ConstructAbility s_jsBufferPrototypeReadInt16BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadInt16BECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt16BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadInt16BECodeLength = 137;
-static const JSC::Intrinsic s_jsBufferPrototypeReadInt16BECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadInt16BECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getInt16(offset,!1)})\n";
-
-// readUInt16LE
-const JSC::ConstructAbility s_jsBufferPrototypeReadUInt16LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadUInt16LECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt16LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadUInt16LECodeLength = 138;
-static const JSC::Intrinsic s_jsBufferPrototypeReadUInt16LECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadUInt16LECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getUint16(offset,!0)})\n";
-
-// readUInt16BE
-const JSC::ConstructAbility s_jsBufferPrototypeReadUInt16BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadUInt16BECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt16BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadUInt16BECodeLength = 138;
-static const JSC::Intrinsic s_jsBufferPrototypeReadUInt16BECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadUInt16BECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getUint16(offset,!1)})\n";
-
-// readInt32LE
-const JSC::ConstructAbility s_jsBufferPrototypeReadInt32LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadInt32LECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt32LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadInt32LECodeLength = 137;
-static const JSC::Intrinsic s_jsBufferPrototypeReadInt32LECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadInt32LECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getInt32(offset,!0)})\n";
-
-// readInt32BE
-const JSC::ConstructAbility s_jsBufferPrototypeReadInt32BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadInt32BECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt32BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadInt32BECodeLength = 137;
-static const JSC::Intrinsic s_jsBufferPrototypeReadInt32BECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadInt32BECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getInt32(offset,!1)})\n";
-
-// readUInt32LE
-const JSC::ConstructAbility s_jsBufferPrototypeReadUInt32LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadUInt32LECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt32LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadUInt32LECodeLength = 138;
-static const JSC::Intrinsic s_jsBufferPrototypeReadUInt32LECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadUInt32LECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getUint32(offset,!0)})\n";
-
-// readUInt32BE
-const JSC::ConstructAbility s_jsBufferPrototypeReadUInt32BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadUInt32BECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt32BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadUInt32BECodeLength = 138;
-static const JSC::Intrinsic s_jsBufferPrototypeReadUInt32BECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadUInt32BECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getUint32(offset,!1)})\n";
-
-// readIntLE
-const JSC::ConstructAbility s_jsBufferPrototypeReadIntLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadIntLECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadIntLECodeLength = 650;
-static const JSC::Intrinsic s_jsBufferPrototypeReadIntLECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadIntLECode = "(function (offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:return view.getInt8(offset);case 2:return view.getInt16(offset,!0);case 3:{const val=view.getUint16(offset,!0)+view.getUint8(offset+2)*65536;return val|(val&8388608)*510}case 4:return view.getInt32(offset,!0);case 5:{const last=view.getUint8(offset+4);return(last|(last&128)*33554430)*4294967296+view.getUint32(offset,!0)}case 6:{const last=view.getUint16(offset+4,!0);return(last|(last&32768)*131070)*4294967296+view.getUint32(offset,!0)}}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n";
-
-// readIntBE
-const JSC::ConstructAbility s_jsBufferPrototypeReadIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadIntBECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadIntBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadIntBECodeLength = 650;
-static const JSC::Intrinsic s_jsBufferPrototypeReadIntBECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadIntBECode = "(function (offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:return view.getInt8(offset);case 2:return view.getInt16(offset,!1);case 3:{const val=view.getUint16(offset+1,!1)+view.getUint8(offset)*65536;return val|(val&8388608)*510}case 4:return view.getInt32(offset,!1);case 5:{const last=view.getUint8(offset);return(last|(last&128)*33554430)*4294967296+view.getUint32(offset+1,!1)}case 6:{const last=view.getUint16(offset,!1);return(last|(last&32768)*131070)*4294967296+view.getUint32(offset+2,!1)}}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n";
-
-// readUIntLE
-const JSC::ConstructAbility s_jsBufferPrototypeReadUIntLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadUIntLECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadUIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadUIntLECodeLength = 543;
-static const JSC::Intrinsic s_jsBufferPrototypeReadUIntLECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadUIntLECode = "(function (offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:return view.getUint8(offset);case 2:return view.getUint16(offset,!0);case 3:return view.getUint16(offset,!0)+view.getUint8(offset+2)*65536;case 4:return view.getUint32(offset,!0);case 5:return view.getUint8(offset+4)*4294967296+view.getUint32(offset,!0);case 6:return view.getUint16(offset+4,!0)*4294967296+view.getUint32(offset,!0)}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n";
-
-// readUIntBE
-const JSC::ConstructAbility s_jsBufferPrototypeReadUIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadUIntBECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadUIntBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadUIntBECodeLength = 620;
-static const JSC::Intrinsic s_jsBufferPrototypeReadUIntBECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadUIntBECode = "(function (offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:return view.getUint8(offset);case 2:return view.getUint16(offset,!1);case 3:return view.getUint16(offset+1,!1)+view.getUint8(offset)*65536;case 4:return view.getUint32(offset,!1);case 5:{const last=view.getUint8(offset);return(last|(last&128)*33554430)*4294967296+view.getUint32(offset+1,!1)}case 6:{const last=view.getUint16(offset,!1);return(last|(last&32768)*131070)*4294967296+view.getUint32(offset+2,!1)}}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n";
-
-// readFloatLE
-const JSC::ConstructAbility s_jsBufferPrototypeReadFloatLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadFloatLECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadFloatLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadFloatLECodeLength = 139;
-static const JSC::Intrinsic s_jsBufferPrototypeReadFloatLECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadFloatLECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getFloat32(offset,!0)})\n";
-
-// readFloatBE
-const JSC::ConstructAbility s_jsBufferPrototypeReadFloatBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadFloatBECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadFloatBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadFloatBECodeLength = 139;
-static const JSC::Intrinsic s_jsBufferPrototypeReadFloatBECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadFloatBECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getFloat32(offset,!1)})\n";
-
-// readDoubleLE
-const JSC::ConstructAbility s_jsBufferPrototypeReadDoubleLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadDoubleLECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadDoubleLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadDoubleLECodeLength = 139;
-static const JSC::Intrinsic s_jsBufferPrototypeReadDoubleLECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadDoubleLECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getFloat64(offset,!0)})\n";
-
-// readDoubleBE
-const JSC::ConstructAbility s_jsBufferPrototypeReadDoubleBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadDoubleBECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadDoubleBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadDoubleBECodeLength = 139;
-static const JSC::Intrinsic s_jsBufferPrototypeReadDoubleBECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadDoubleBECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getFloat64(offset,!1)})\n";
-
-// readBigInt64LE
-const JSC::ConstructAbility s_jsBufferPrototypeReadBigInt64LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadBigInt64LECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigInt64LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadBigInt64LECodeLength = 140;
-static const JSC::Intrinsic s_jsBufferPrototypeReadBigInt64LECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadBigInt64LECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getBigInt64(offset,!0)})\n";
-
-// readBigInt64BE
-const JSC::ConstructAbility s_jsBufferPrototypeReadBigInt64BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadBigInt64BECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigInt64BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadBigInt64BECodeLength = 140;
-static const JSC::Intrinsic s_jsBufferPrototypeReadBigInt64BECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadBigInt64BECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getBigInt64(offset,!1)})\n";
-
-// readBigUInt64LE
-const JSC::ConstructAbility s_jsBufferPrototypeReadBigUInt64LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadBigUInt64LECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigUInt64LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadBigUInt64LECodeLength = 141;
-static const JSC::Intrinsic s_jsBufferPrototypeReadBigUInt64LECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadBigUInt64LECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getBigUint64(offset,!0)})\n";
-
-// readBigUInt64BE
-const JSC::ConstructAbility s_jsBufferPrototypeReadBigUInt64BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeReadBigUInt64BECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigUInt64BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeReadBigUInt64BECodeLength = 141;
-static const JSC::Intrinsic s_jsBufferPrototypeReadBigUInt64BECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeReadBigUInt64BECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getBigUint64(offset,!1)})\n";
-
-// writeInt8
-const JSC::ConstructAbility s_jsBufferPrototypeWriteInt8CodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteInt8CodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt8CodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteInt8CodeLength = 154;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteInt8CodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteInt8Code = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt8(offset,value),offset+1})\n";
-
-// writeUInt8
-const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt8CodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt8CodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt8CodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteUInt8CodeLength = 155;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt8CodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteUInt8Code = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint8(offset,value),offset+1})\n";
-
-// writeInt16LE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteInt16LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteInt16LECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt16LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteInt16LECodeLength = 158;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteInt16LECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteInt16LECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt16(offset,value,!0),offset+2})\n";
-
-// writeInt16BE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteInt16BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteInt16BECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt16BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteInt16BECodeLength = 158;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteInt16BECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteInt16BECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt16(offset,value,!1),offset+2})\n";
-
-// writeUInt16LE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt16LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt16LECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt16LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteUInt16LECodeLength = 159;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt16LECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteUInt16LECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint16(offset,value,!0),offset+2})\n";
-
-// writeUInt16BE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt16BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt16BECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt16BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteUInt16BECodeLength = 159;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt16BECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteUInt16BECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint16(offset,value,!1),offset+2})\n";
-
-// writeInt32LE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteInt32LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteInt32LECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt32LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteInt32LECodeLength = 158;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteInt32LECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteInt32LECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt32(offset,value,!0),offset+4})\n";
-
-// writeInt32BE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteInt32BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteInt32BECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt32BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteInt32BECodeLength = 158;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteInt32BECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteInt32BECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt32(offset,value,!1),offset+4})\n";
-
-// writeUInt32LE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt32LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt32LECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt32LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteUInt32LECodeLength = 159;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt32LECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteUInt32LECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint32(offset,value,!0),offset+4})\n";
-
-// writeUInt32BE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt32BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt32BECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt32BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteUInt32BECodeLength = 159;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt32BECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteUInt32BECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint32(offset,value,!1),offset+4})\n";
-
-// writeIntLE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteIntLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteIntLECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteIntLECodeLength = 725;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteIntLECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteIntLECode = "(function (value,offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:{view.setInt8(offset,value);break}case 2:{view.setInt16(offset,value,!0);break}case 3:{view.setUint16(offset,value&65535,!0),view.setInt8(offset+2,Math.floor(value*0.0000152587890625));break}case 4:{view.setInt32(offset,value,!0);break}case 5:{view.setUint32(offset,value|0,!0),view.setInt8(offset+4,Math.floor(value*0.00000000023283064365386964));break}case 6:{view.setUint32(offset,value|0,!0),view.setInt16(offset+4,Math.floor(value*0.00000000023283064365386964),!0);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return offset+byteLength})\n";
-
-// writeIntBE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteIntBECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteIntBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteIntBECodeLength = 725;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteIntBECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteIntBECode = "(function (value,offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:{view.setInt8(offset,value);break}case 2:{view.setInt16(offset,value,!1);break}case 3:{view.setUint16(offset+1,value&65535,!1),view.setInt8(offset,Math.floor(value*0.0000152587890625));break}case 4:{view.setInt32(offset,value,!1);break}case 5:{view.setUint32(offset+1,value|0,!1),view.setInt8(offset,Math.floor(value*0.00000000023283064365386964));break}case 6:{view.setUint32(offset+2,value|0,!1),view.setInt16(offset,Math.floor(value*0.00000000023283064365386964),!1);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return offset+byteLength})\n";
-
-// writeUIntLE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteUIntLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteUIntLECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteUIntLECodeLength = 731;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteUIntLECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteUIntLECode = "(function (value,offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:{view.setUint8(offset,value);break}case 2:{view.setUint16(offset,value,!0);break}case 3:{view.setUint16(offset,value&65535,!0),view.setUint8(offset+2,Math.floor(value*0.0000152587890625));break}case 4:{view.setUint32(offset,value,!0);break}case 5:{view.setUint32(offset,value|0,!0),view.setUint8(offset+4,Math.floor(value*0.00000000023283064365386964));break}case 6:{view.setUint32(offset,value|0,!0),view.setUint16(offset+4,Math.floor(value*0.00000000023283064365386964),!0);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return offset+byteLength})\n";
-
-// writeUIntBE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteUIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteUIntBECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUIntBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteUIntBECodeLength = 731;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteUIntBECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteUIntBECode = "(function (value,offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:{view.setUint8(offset,value);break}case 2:{view.setUint16(offset,value,!1);break}case 3:{view.setUint16(offset+1,value&65535,!1),view.setUint8(offset,Math.floor(value*0.0000152587890625));break}case 4:{view.setUint32(offset,value,!1);break}case 5:{view.setUint32(offset+1,value|0,!1),view.setUint8(offset,Math.floor(value*0.00000000023283064365386964));break}case 6:{view.setUint32(offset+2,value|0,!1),view.setUint16(offset,Math.floor(value*0.00000000023283064365386964),!1);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return offset+byteLength})\n";
-
-// writeFloatLE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteFloatLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteFloatLECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteFloatLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteFloatLECodeLength = 160;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteFloatLECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteFloatLECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat32(offset,value,!0),offset+4})\n";
-
-// writeFloatBE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteFloatBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteFloatBECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteFloatBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteFloatBECodeLength = 160;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteFloatBECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteFloatBECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat32(offset,value,!1),offset+4})\n";
-
-// writeDoubleLE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteDoubleLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteDoubleLECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteDoubleLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteDoubleLECodeLength = 160;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteDoubleLECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteDoubleLECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat64(offset,value,!0),offset+8})\n";
-
-// writeDoubleBE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteDoubleBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteDoubleBECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteDoubleBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteDoubleBECodeLength = 160;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteDoubleBECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteDoubleBECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat64(offset,value,!1),offset+8})\n";
-
-// writeBigInt64LE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteBigInt64LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteBigInt64LECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigInt64LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteBigInt64LECodeLength = 161;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteBigInt64LECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteBigInt64LECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigInt64(offset,value,!0),offset+8})\n";
-
-// writeBigInt64BE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteBigInt64BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteBigInt64BECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigInt64BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteBigInt64BECodeLength = 161;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteBigInt64BECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteBigInt64BECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigInt64(offset,value,!1),offset+8})\n";
-
-// writeBigUInt64LE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteBigUInt64LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteBigUInt64LECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigUInt64LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteBigUInt64LECodeLength = 162;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteBigUInt64LECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteBigUInt64LECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigUint64(offset,value,!0),offset+8})\n";
-
-// writeBigUInt64BE
-const JSC::ConstructAbility s_jsBufferPrototypeWriteBigUInt64BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeWriteBigUInt64BECodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigUInt64BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeWriteBigUInt64BECodeLength = 162;
-static const JSC::Intrinsic s_jsBufferPrototypeWriteBigUInt64BECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteBigUInt64BECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigUint64(offset,value,!1),offset+8})\n";
-
-// utf8Write
-const JSC::ConstructAbility s_jsBufferPrototypeUtf8WriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeUtf8WriteCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeUtf8WriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeUtf8WriteCodeLength = 91;
-static const JSC::Intrinsic s_jsBufferPrototypeUtf8WriteCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeUtf8WriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"utf8\")})\n";
-
-// ucs2Write
-const JSC::ConstructAbility s_jsBufferPrototypeUcs2WriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeUcs2WriteCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeUcs2WriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeUcs2WriteCodeLength = 91;
-static const JSC::Intrinsic s_jsBufferPrototypeUcs2WriteCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeUcs2WriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"ucs2\")})\n";
-
-// utf16leWrite
-const JSC::ConstructAbility s_jsBufferPrototypeUtf16leWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeUtf16leWriteCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeUtf16leWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeUtf16leWriteCodeLength = 94;
-static const JSC::Intrinsic s_jsBufferPrototypeUtf16leWriteCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeUtf16leWriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"utf16le\")})\n";
-
-// latin1Write
-const JSC::ConstructAbility s_jsBufferPrototypeLatin1WriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeLatin1WriteCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeLatin1WriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeLatin1WriteCodeLength = 93;
-static const JSC::Intrinsic s_jsBufferPrototypeLatin1WriteCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeLatin1WriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"latin1\")})\n";
-
-// asciiWrite
-const JSC::ConstructAbility s_jsBufferPrototypeAsciiWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeAsciiWriteCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeAsciiWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeAsciiWriteCodeLength = 92;
-static const JSC::Intrinsic s_jsBufferPrototypeAsciiWriteCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeAsciiWriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"ascii\")})\n";
-
-// base64Write
-const JSC::ConstructAbility s_jsBufferPrototypeBase64WriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeBase64WriteCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeBase64WriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeBase64WriteCodeLength = 93;
-static const JSC::Intrinsic s_jsBufferPrototypeBase64WriteCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeBase64WriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"base64\")})\n";
-
-// base64urlWrite
-const JSC::ConstructAbility s_jsBufferPrototypeBase64urlWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeBase64urlWriteCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeBase64urlWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeBase64urlWriteCodeLength = 96;
-static const JSC::Intrinsic s_jsBufferPrototypeBase64urlWriteCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeBase64urlWriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"base64url\")})\n";
-
-// hexWrite
-const JSC::ConstructAbility s_jsBufferPrototypeHexWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeHexWriteCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeHexWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeHexWriteCodeLength = 90;
-static const JSC::Intrinsic s_jsBufferPrototypeHexWriteCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeHexWriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"hex\")})\n";
-
-// utf8Slice
-const JSC::ConstructAbility s_jsBufferPrototypeUtf8SliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeUtf8SliceCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeUtf8SliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeUtf8SliceCodeLength = 76;
-static const JSC::Intrinsic s_jsBufferPrototypeUtf8SliceCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeUtf8SliceCode = "(function (start,end){\"use strict\";return this.toString(\"utf8\",start,end)})\n";
-
-// ucs2Slice
-const JSC::ConstructAbility s_jsBufferPrototypeUcs2SliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeUcs2SliceCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeUcs2SliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeUcs2SliceCodeLength = 76;
-static const JSC::Intrinsic s_jsBufferPrototypeUcs2SliceCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeUcs2SliceCode = "(function (start,end){\"use strict\";return this.toString(\"ucs2\",start,end)})\n";
-
-// utf16leSlice
-const JSC::ConstructAbility s_jsBufferPrototypeUtf16leSliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeUtf16leSliceCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeUtf16leSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeUtf16leSliceCodeLength = 79;
-static const JSC::Intrinsic s_jsBufferPrototypeUtf16leSliceCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeUtf16leSliceCode = "(function (start,end){\"use strict\";return this.toString(\"utf16le\",start,end)})\n";
-
-// latin1Slice
-const JSC::ConstructAbility s_jsBufferPrototypeLatin1SliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeLatin1SliceCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeLatin1SliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeLatin1SliceCodeLength = 78;
-static const JSC::Intrinsic s_jsBufferPrototypeLatin1SliceCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeLatin1SliceCode = "(function (start,end){\"use strict\";return this.toString(\"latin1\",start,end)})\n";
-
-// asciiSlice
-const JSC::ConstructAbility s_jsBufferPrototypeAsciiSliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeAsciiSliceCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeAsciiSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeAsciiSliceCodeLength = 77;
-static const JSC::Intrinsic s_jsBufferPrototypeAsciiSliceCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeAsciiSliceCode = "(function (start,end){\"use strict\";return this.toString(\"ascii\",start,end)})\n";
-
-// base64Slice
-const JSC::ConstructAbility s_jsBufferPrototypeBase64SliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeBase64SliceCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeBase64SliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeBase64SliceCodeLength = 78;
-static const JSC::Intrinsic s_jsBufferPrototypeBase64SliceCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeBase64SliceCode = "(function (start,end){\"use strict\";return this.toString(\"base64\",start,end)})\n";
-
-// base64urlSlice
-const JSC::ConstructAbility s_jsBufferPrototypeBase64urlSliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeBase64urlSliceCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeBase64urlSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeBase64urlSliceCodeLength = 81;
-static const JSC::Intrinsic s_jsBufferPrototypeBase64urlSliceCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeBase64urlSliceCode = "(function (start,end){\"use strict\";return this.toString(\"base64url\",start,end)})\n";
-
-// hexSlice
-const JSC::ConstructAbility s_jsBufferPrototypeHexSliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeHexSliceCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeHexSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeHexSliceCodeLength = 75;
-static const JSC::Intrinsic s_jsBufferPrototypeHexSliceCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeHexSliceCode = "(function (start,end){\"use strict\";return this.toString(\"hex\",start,end)})\n";
-
-// toJSON
-const JSC::ConstructAbility s_jsBufferPrototypeToJSONCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeToJSONCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeToJSONCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeToJSONCodeLength = 73;
-static const JSC::Intrinsic s_jsBufferPrototypeToJSONCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeToJSONCode = "(function (){\"use strict\";return{type:\"Buffer\",data:@Array.from(this)}})\n";
-
-// slice
-const JSC::ConstructAbility s_jsBufferPrototypeSliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeSliceCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeSliceCodeLength = 447;
-static const JSC::Intrinsic s_jsBufferPrototypeSliceCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeSliceCode = "(function (start,end){\"use strict\";var{buffer,byteOffset,byteLength}=this;function adjustOffset(offset,length){if(offset=@trunc(offset),offset===0||offset!==offset)return 0;else if(offset<0)return offset+=length,offset>0\?offset:0;else return offset<length\?offset:length}var start_=adjustOffset(start,byteLength),end_=end!==@undefined\?adjustOffset(end,byteLength):byteLength;return new @Buffer(buffer,byteOffset+start_,end_>start_\?end_-start_:0)})\n";
-
-// parent
-const JSC::ConstructAbility s_jsBufferPrototypeParentCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeParentCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeParentCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeParentCodeLength = 99;
-static const JSC::Intrinsic s_jsBufferPrototypeParentCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeParentCode = "(function (){\"use strict\";return @isObject(this)&&this instanceof @Buffer\?this.buffer:@undefined})\n";
-
-// offset
-const JSC::ConstructAbility s_jsBufferPrototypeOffsetCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeOffsetCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeOffsetCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeOffsetCodeLength = 103;
-static const JSC::Intrinsic s_jsBufferPrototypeOffsetCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeOffsetCode = "(function (){\"use strict\";return @isObject(this)&&this instanceof @Buffer\?this.byteOffset:@undefined})\n";
-
-// inspect
-const JSC::ConstructAbility s_jsBufferPrototypeInspectCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferPrototypeInspectCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferPrototypeInspectCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferPrototypeInspectCodeLength = 70;
-static const JSC::Intrinsic s_jsBufferPrototypeInspectCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeInspectCode = "(function (recurseTimes,ctx){\"use strict\";return @Bun.inspect(this)})\n";
-
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
-JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
-{\
- JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().jsBufferPrototypeBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().jsBufferPrototypeBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
-}
-WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
-#undef DEFINE_BUILTIN_GENERATOR
-
/* ReadableByteStreamController.ts */
// initializeReadableByteStreamController
const JSC::ConstructAbility s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1339,56 +481,206 @@ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
-/* UtilInspect.ts */
-// getStylizeWithColor
-const JSC::ConstructAbility s_utilInspectGetStylizeWithColorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_utilInspectGetStylizeWithColorCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_utilInspectGetStylizeWithColorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_utilInspectGetStylizeWithColorCodeLength = 261;
-static const JSC::Intrinsic s_utilInspectGetStylizeWithColorCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_utilInspectGetStylizeWithColorCode = "(function (inspect){\"use strict\";return function stylizeWithColor(str,styleType){const style=inspect.styles[styleType];if(style!==@undefined){const color=inspect.colors[style];if(color!==@undefined)return`\\x1B[${color[0]}m${str}\\x1B[${color[1]}m`}return str}})\n";
+/* ReadableStreamDefaultReader.ts */
+// initializeReadableStreamDefaultReader
+const JSC::ConstructAbility s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeLength = 334;
+static const JSC::Intrinsic s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCode = "(function (stream){\"use strict\";if(!@isReadableStream(stream))@throwTypeError(\"ReadableStreamDefaultReader needs a ReadableStream\");if(@isReadableStreamLocked(stream))@throwTypeError(\"ReadableStream is locked\");return @readableStreamReaderGenericInitialize(this,stream),@putByIdDirectPrivate(this,\"readRequests\",@createFIFO()),this})\n";
-// stylizeWithNoColor
-const JSC::ConstructAbility s_utilInspectStylizeWithNoColorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_utilInspectStylizeWithNoColorCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_utilInspectStylizeWithNoColorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_utilInspectStylizeWithNoColorCodeLength = 42;
-static const JSC::Intrinsic s_utilInspectStylizeWithNoColorCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_utilInspectStylizeWithNoColorCode = "(function (str){\"use strict\";return str})\n";
+// cancel
+const JSC::ConstructAbility s_readableStreamDefaultReaderCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamDefaultReaderCancelCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamDefaultReaderCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamDefaultReaderCancelCodeLength = 367;
+static const JSC::Intrinsic s_readableStreamDefaultReaderCancelCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamDefaultReaderCancelCode = "(function (reason){\"use strict\";if(!@isReadableStreamDefaultReader(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStreamDefaultReader\",\"cancel\"));if(!@getByIdDirectPrivate(this,\"ownerReadableStream\"))return @Promise.@reject(@makeTypeError(\"cancel() called on a reader owned by no readable stream\"));return @readableStreamReaderGenericCancel(this,reason)})\n";
+
+// readMany
+const JSC::ConstructAbility s_readableStreamDefaultReaderReadManyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamDefaultReaderReadManyCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamDefaultReaderReadManyCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamDefaultReaderReadManyCodeLength = 3230;
+static const JSC::Intrinsic s_readableStreamDefaultReaderReadManyCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamDefaultReaderReadManyCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultReader(this))@throwTypeError(\"ReadableStreamDefaultReader.readMany() should not be called directly\");const stream=@getByIdDirectPrivate(this,\"ownerReadableStream\");if(!stream)@throwTypeError(\"readMany() called on a reader owned by no readable stream\");const state=@getByIdDirectPrivate(stream,\"state\");if(@putByIdDirectPrivate(stream,\"disturbed\",!0),state===@streamClosed)return{value:[],size:0,done:!0};else if(state===@streamErrored)throw @getByIdDirectPrivate(stream,\"storedError\");var controller=@getByIdDirectPrivate(stream,\"readableStreamController\"),queue=@getByIdDirectPrivate(controller,\"queue\");if(!queue)return controller.@pull(controller).@then(function({done,value}){return done\?{done:!0,value:[],size:0}:{value:[value],size:1,done:!1}});const content=queue.content;var size=queue.size,values=content.toArray(!1),length=values.length;if(length>0){var outValues=@newArrayWithSize(length);if(@isReadableByteStreamController(controller)){{const buf=values[0];if(!(@ArrayBuffer.@isView(buf)||buf instanceof @ArrayBuffer))@putByValDirect(outValues,0,new @Uint8Array(buf.buffer,buf.byteOffset,buf.byteLength));else @putByValDirect(outValues,0,buf)}for(var i=1;i<length;i++){const buf=values[i];if(!(@ArrayBuffer.@isView(buf)||buf instanceof @ArrayBuffer))@putByValDirect(outValues,i,new @Uint8Array(buf.buffer,buf.byteOffset,buf.byteLength));else @putByValDirect(outValues,i,buf)}}else{@putByValDirect(outValues,0,values[0].value);for(var i=1;i<length;i++)@putByValDirect(outValues,i,values[i].value)}if(@resetQueue(@getByIdDirectPrivate(controller,\"queue\")),@getByIdDirectPrivate(controller,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(controller,\"controlledReadableStream\"));else if(@isReadableStreamDefaultController(controller))@readableStreamDefaultControllerCallPullIfNeeded(controller);else if(@isReadableByteStreamController(controller))@readableByteStreamControllerCallPullIfNeeded(controller);return{value:outValues,size,done:!1}}var onPullMany=(result)=>{if(result.done)return{value:[],size:0,done:!0};var controller2=@getByIdDirectPrivate(stream,\"readableStreamController\"),queue2=@getByIdDirectPrivate(controller2,\"queue\"),value=[result.value].concat(queue2.content.toArray(!1)),length2=value.length;if(@isReadableByteStreamController(controller2))for(var i2=0;i2<length2;i2++){const buf=value[i2];if(!(@ArrayBuffer.@isView(buf)||buf instanceof @ArrayBuffer)){const{buffer,byteOffset,byteLength}=buf;@putByValDirect(value,i2,new @Uint8Array(buffer,byteOffset,byteLength))}}else for(var i2=1;i2<length2;i2++)@putByValDirect(value,i2,value[i2].value);var size2=queue2.size;if(@resetQueue(queue2),@getByIdDirectPrivate(controller2,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(controller2,\"controlledReadableStream\"));else if(@isReadableStreamDefaultController(controller2))@readableStreamDefaultControllerCallPullIfNeeded(controller2);else if(@isReadableByteStreamController(controller2))@readableByteStreamControllerCallPullIfNeeded(controller2);return{value,size:size2,done:!1}},pullResult=controller.@pull(controller);if(pullResult&&@isPromise(pullResult))return pullResult.@then(onPullMany);return onPullMany(pullResult)})\n";
+
+// read
+const JSC::ConstructAbility s_readableStreamDefaultReaderReadCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamDefaultReaderReadCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamDefaultReaderReadCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamDefaultReaderReadCodeLength = 348;
+static const JSC::Intrinsic s_readableStreamDefaultReaderReadCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamDefaultReaderReadCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultReader(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStreamDefaultReader\",\"read\"));if(!@getByIdDirectPrivate(this,\"ownerReadableStream\"))return @Promise.@reject(@makeTypeError(\"read() called on a reader owned by no readable stream\"));return @readableStreamDefaultReaderRead(this)})\n";
+
+// releaseLock
+const JSC::ConstructAbility s_readableStreamDefaultReaderReleaseLockCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamDefaultReaderReleaseLockCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamDefaultReaderReleaseLockCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamDefaultReaderReleaseLockCodeLength = 384;
+static const JSC::Intrinsic s_readableStreamDefaultReaderReleaseLockCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamDefaultReaderReleaseLockCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultReader(this))throw @makeThisTypeError(\"ReadableStreamDefaultReader\",\"releaseLock\");if(!@getByIdDirectPrivate(this,\"ownerReadableStream\"))return;if(@getByIdDirectPrivate(this,\"readRequests\")\?.isNotEmpty())@throwTypeError(\"There are still pending read requests, cannot release the lock\");@readableStreamReaderGenericRelease(this)})\n";
+
+// closed
+const JSC::ConstructAbility s_readableStreamDefaultReaderClosedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamDefaultReaderClosedCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamDefaultReaderClosedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamDefaultReaderClosedCodeLength = 224;
+static const JSC::Intrinsic s_readableStreamDefaultReaderClosedCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamDefaultReaderClosedCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultReader(this))return @Promise.@reject(@makeGetterTypeError(\"ReadableStreamDefaultReader\",\"closed\"));return @getByIdDirectPrivate(this,\"closedPromiseCapability\").promise})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().utilInspectBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().utilInspectBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+ return clientData->builtinFunctions().readableStreamDefaultReaderBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().readableStreamDefaultReaderBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
-WEBCORE_FOREACH_UTILINSPECT_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
-/* ConsoleObject.ts */
-// asyncIterator
-const JSC::ConstructAbility s_consoleObjectAsyncIteratorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_consoleObjectAsyncIteratorCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_consoleObjectAsyncIteratorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_consoleObjectAsyncIteratorCodeLength = 949;
-static const JSC::Intrinsic s_consoleObjectAsyncIteratorCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_consoleObjectAsyncIteratorCode = "(function (){\"use strict\";const Iterator=async function*ConsoleAsyncIterator(){var reader=@Bun.stdin.stream().getReader(),decoder=new globalThis.TextDecoder(\"utf-8\",{fatal:!1}),deferredError,indexOf=@Bun.indexOfLine;try{while(!0){var done,value,pendingChunk;const firstResult=reader.readMany();if(@isPromise(firstResult))({done,value}=await firstResult);else({done,value}=firstResult);if(done){if(pendingChunk)yield decoder.decode(pendingChunk);return}var actualChunk;for(let chunk of value){if(actualChunk=chunk,pendingChunk)actualChunk=@Buffer.concat([pendingChunk,chunk]),pendingChunk=null;var last=0,i=indexOf(actualChunk,last);while(i!==-1)yield decoder.decode(actualChunk.subarray(last,i)),last=i+1,i=indexOf(actualChunk,last);pendingChunk=actualChunk.subarray(last)}}}catch(e){deferredError=e}finally{if(reader.releaseLock(),deferredError)throw deferredError}},symbol=globalThis.Symbol.asyncIterator;return this[symbol]=Iterator,Iterator()})\n";
+/* ByteLengthQueuingStrategy.ts */
+// highWaterMark
+const JSC::ConstructAbility s_byteLengthQueuingStrategyHighWaterMarkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_byteLengthQueuingStrategyHighWaterMarkCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_byteLengthQueuingStrategyHighWaterMarkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_byteLengthQueuingStrategyHighWaterMarkCodeLength = 246;
+static const JSC::Intrinsic s_byteLengthQueuingStrategyHighWaterMarkCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_byteLengthQueuingStrategyHighWaterMarkCode = "(function (){\"use strict\";const highWaterMark=@getByIdDirectPrivate(this,\"highWaterMark\");if(highWaterMark===@undefined)@throwTypeError(\"ByteLengthQueuingStrategy.highWaterMark getter called on incompatible |this| value.\");return highWaterMark})\n";
-// write
-const JSC::ConstructAbility s_consoleObjectWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_consoleObjectWriteCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_consoleObjectWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_consoleObjectWriteCodeLength = 392;
-static const JSC::Intrinsic s_consoleObjectWriteCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_consoleObjectWriteCode = "(function (input){\"use strict\";var writer=@getByIdDirectPrivate(this,\"writer\");if(!writer){var length=@toLength(input\?.length\?\?0);writer=@Bun.stdout.writer({highWaterMark:length>65536\?length:65536}),@putByIdDirectPrivate(this,\"writer\",writer)}var wrote=writer.write(input);const count=@argumentCount();for(var i=1;i<count;i++)wrote+=writer.write(@argument(i));return writer.flush(!0),wrote})\n";
+// size
+const JSC::ConstructAbility s_byteLengthQueuingStrategySizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_byteLengthQueuingStrategySizeCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_byteLengthQueuingStrategySizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_byteLengthQueuingStrategySizeCodeLength = 57;
+static const JSC::Intrinsic s_byteLengthQueuingStrategySizeCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_byteLengthQueuingStrategySizeCode = "(function (chunk){\"use strict\";return chunk.byteLength})\n";
+
+// initializeByteLengthQueuingStrategy
+const JSC::ConstructAbility s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeLength = 139;
+static const JSC::Intrinsic s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCode = "(function (parameters){\"use strict\";@putByIdDirectPrivate(this,\"highWaterMark\",@extractHighWaterMarkFromQueuingStrategyInit(parameters))})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().consoleObjectBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().consoleObjectBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+ return clientData->builtinFunctions().byteLengthQueuingStrategyBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().byteLengthQueuingStrategyBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
-WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+
+/* JSBufferConstructor.ts */
+// from
+const JSC::ConstructAbility s_jsBufferConstructorFromCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferConstructorFromCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferConstructorFromCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferConstructorFromCodeLength = 1274;
+static const JSC::Intrinsic s_jsBufferConstructorFromCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferConstructorFromCode = "(function (items){\"use strict\";if(@isUndefinedOrNull(items))@throwTypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object.\");if(typeof items===\"string\"||typeof items===\"object\"&&(@isTypedArrayView(items)||items instanceof @ArrayBuffer||items instanceof SharedArrayBuffer||items instanceof @String))switch(@argumentCount()){case 1:return new @Buffer(items);case 2:return new @Buffer(items,@argument(1));default:return new @Buffer(items,@argument(1),@argument(2))}var arrayLike=@toObject(items,\"The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object.\");if(!@isJSArray(arrayLike)){const toPrimitive=@tryGetByIdWithWellKnownSymbol(items,\"toPrimitive\");if(toPrimitive){const primitive=toPrimitive.@call(items,\"string\");if(typeof primitive===\"string\")switch(@argumentCount()){case 1:return new @Buffer(primitive);case 2:return new @Buffer(primitive,@argument(1));default:return new @Buffer(primitive,@argument(1),@argument(2))}}if(!(\"length\"in arrayLike)||@isCallable(arrayLike))@throwTypeError(\"The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object.\")}return new @Buffer(@Uint8Array.from(arrayLike).buffer)})\n";
+
+// isBuffer
+const JSC::ConstructAbility s_jsBufferConstructorIsBufferCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferConstructorIsBufferCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferConstructorIsBufferCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferConstructorIsBufferCodeLength = 75;
+static const JSC::Intrinsic s_jsBufferConstructorIsBufferCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferConstructorIsBufferCode = "(function (bufferlike){\"use strict\";return bufferlike instanceof @Buffer})\n";
+
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
+{\
+ JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
+ return clientData->builtinFunctions().jsBufferConstructorBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().jsBufferConstructorBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+}
+WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+
+/* ImportMetaObject.ts */
+// loadCJS2ESM
+const JSC::ConstructAbility s_importMetaObjectLoadCJS2ESMCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_importMetaObjectLoadCJS2ESMCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_importMetaObjectLoadCJS2ESMCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_importMetaObjectLoadCJS2ESMCodeLength = 2214;
+static const JSC::Intrinsic s_importMetaObjectLoadCJS2ESMCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_importMetaObjectLoadCJS2ESMCode = "(function (resolvedSpecifier){\"use strict\";var loader=@Loader,queue=@createFIFO(),key=resolvedSpecifier;while(key){var entry=loader.registry.@get(key);if((entry\?.state\?\?0)<=@ModuleFetch)@fulfillModuleSync(key),entry=loader.registry.@get(key);var sourceCodeObject=@getPromiseInternalField(entry.fetch,@promiseFieldReactionsOrResult),moduleRecordPromise=loader.parseModule(key,sourceCodeObject),mod=entry.module;if(moduleRecordPromise&&@isPromise(moduleRecordPromise)){var reactionsOrResult=@getPromiseInternalField(moduleRecordPromise,@promiseFieldReactionsOrResult),flags=@getPromiseInternalField(moduleRecordPromise,@promiseFieldFlags),state=flags&@promiseStateMask;if(state===@promiseStatePending||reactionsOrResult&&@isPromise(reactionsOrResult))@throwTypeError(`require() async module \"${key}\" is unsupported. use \"await import()\" instead.`);else if(state===@promiseStateRejected){if(!reactionsOrResult\?.message)@throwTypeError(`${reactionsOrResult+\"\"\?reactionsOrResult:\"An error occurred\"} occurred while parsing module \\\"${key}\\\"`);throw reactionsOrResult}entry.module=mod=reactionsOrResult}else if(moduleRecordPromise&&!mod)entry.module=mod=moduleRecordPromise;@setStateToMax(entry,@ModuleLink);var dependenciesMap=mod.dependenciesMap,requestedModules=loader.requestedModules(mod),dependencies=@newArrayWithSize(requestedModules.length);for(var i=0,length=requestedModules.length;i<length;++i){var depName=requestedModules[i],depKey=depName[0]===\"/\"\?depName:loader.resolve(depName,key),depEntry=loader.ensureRegistered(depKey);if(depEntry.state<@ModuleLink)queue.push(depKey);@putByValDirect(dependencies,i,depEntry),dependenciesMap.@set(depName,depEntry)}entry.dependencies=dependencies,entry.instantiate=@Promise.@resolve(entry),entry.satisfy=@Promise.@resolve(entry),entry.isSatisfied=!0,key=queue.shift();while(key&&(loader.registry.@get(key)\?.state\?\?@ModuleFetch)>=@ModuleLink)key=queue.shift()}var linkAndEvaluateResult=loader.linkAndEvaluateModule(resolvedSpecifier,@undefined);if(linkAndEvaluateResult&&@isPromise(linkAndEvaluateResult))@throwTypeError(`require() async module \\\"${resolvedSpecifier}\\\" is unsupported. use \"await import()\" instead.`);return loader.registry.@get(resolvedSpecifier)})\n";
+
+// requireESM
+const JSC::ConstructAbility s_importMetaObjectRequireESMCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_importMetaObjectRequireESMCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_importMetaObjectRequireESMCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_importMetaObjectRequireESMCodeLength = 364;
+static const JSC::Intrinsic s_importMetaObjectRequireESMCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_importMetaObjectRequireESMCode = "(function (resolved){\"use strict\";var entry=@Loader.registry.@get(resolved);if(!entry||!entry.evaluated)entry=@loadCJS2ESM(resolved);if(!entry||!entry.evaluated||!entry.module)@throwTypeError(`require() failed to evaluate module \"${resolved}\". This is an internal consistentency error.`);var exports=@Loader.getModuleNamespaceObject(entry.module);return exports})\n";
+
+// internalRequire
+const JSC::ConstructAbility s_importMetaObjectInternalRequireCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_importMetaObjectInternalRequireCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_importMetaObjectInternalRequireCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_importMetaObjectInternalRequireCodeLength = 857;
+static const JSC::Intrinsic s_importMetaObjectInternalRequireCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_importMetaObjectInternalRequireCode = "(function (id){\"use strict\";var cached=@requireMap.@get(id);const last5=id.substring(id.length-5);if(cached)return cached.exports;if(last5===\".json\"){var fs=globalThis[Symbol.for(\"_fs\")]||=@Bun.fs(),exports=JSON.parse(fs.readFileSync(id,\"utf8\"));return @requireMap.@set(id,@createCommonJSModule(id,exports,!0)),exports}else if(last5===\".node\"){const module=@createCommonJSModule(id,{},!0);return process.dlopen(module,id),@requireMap.@set(id,module),module.exports}else if(last5===\".toml\"){var fs=globalThis[Symbol.for(\"_fs\")]||=@Bun.fs(),exports=@Bun.TOML.parse(fs.readFileSync(id,\"utf8\"));return @requireMap.@set(id,@createCommonJSModule(id,exports,!0)),exports}else{var exports=@requireESM(id);const cachedModule=@requireMap.@get(id);if(cachedModule)return cachedModule.exports;return @requireMap.@set(id,@createCommonJSModule(id,exports,!0)),exports}})\n";
+
+// createRequireCache
+const JSC::ConstructAbility s_importMetaObjectCreateRequireCacheCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_importMetaObjectCreateRequireCacheCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_importMetaObjectCreateRequireCacheCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_importMetaObjectCreateRequireCacheCodeLength = 978;
+static const JSC::Intrinsic s_importMetaObjectCreateRequireCacheCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_importMetaObjectCreateRequireCacheCode = "(function (){\"use strict\";var moduleMap=new Map,inner={};return new Proxy(inner,{get(target,key){const entry=@requireMap.@get(key);if(entry)return entry;const esm=@Loader.registry.@get(key);if(esm\?.evaluated){const namespace=@Loader.getModuleNamespaceObject(esm.module),mod=@createCommonJSModule(key,namespace,!0);return @requireMap.@set(key,mod),mod}return inner[key]},set(target,key,value){return @requireMap.@set(key,value),!0},has(target,key){return @requireMap.@has(key)||@Loader.registry.@has(key)},deleteProperty(target,key){return moduleMap.@delete(key),@requireMap.@delete(key),@Loader.registry.@delete(key),!0},ownKeys(target){var array=[...@requireMap.@keys()];const registryKeys=[...@Loader.registry.@keys()];for(let key of registryKeys)if(!array.includes(key))@arrayPush(array,key);return array},getPrototypeOf(target){return null},getOwnPropertyDescriptor(target,key){if(@requireMap.@has(key)||@Loader.registry.@has(key))return{configurable:!0,enumerable:!0}}})})\n";
+
+// main
+const JSC::ConstructAbility s_importMetaObjectMainCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_importMetaObjectMainCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_importMetaObjectMainCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_importMetaObjectMainCodeLength = 76;
+static const JSC::Intrinsic s_importMetaObjectMainCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_importMetaObjectMainCode = "(function (){\"use strict\";return this.path===@Bun.main&&@Bun.isMainThread})\n";
+
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
+{\
+ JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
+ return clientData->builtinFunctions().importMetaObjectBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().importMetaObjectBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+}
+WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+
+/* TransformStream.ts */
+// initializeTransformStream
+const JSC::ConstructAbility s_transformStreamInitializeTransformStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_transformStreamInitializeTransformStreamCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_transformStreamInitializeTransformStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_transformStreamInitializeTransformStreamCodeLength = 2041;
+static const JSC::Intrinsic s_transformStreamInitializeTransformStreamCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_transformStreamInitializeTransformStreamCode = "(function (){\"use strict\";let transformer=arguments[0];if(@isObject(transformer)&&@getByIdDirectPrivate(transformer,\"TransformStream\"))return this;let writableStrategy=arguments[1],readableStrategy=arguments[2];if(transformer===@undefined)transformer=null;if(readableStrategy===@undefined)readableStrategy={};if(writableStrategy===@undefined)writableStrategy={};let transformerDict={};if(transformer!==null){if(\"start\"in transformer){if(transformerDict.start=transformer.start,typeof transformerDict.start!==\"function\")@throwTypeError(\"transformer.start should be a function\")}if(\"transform\"in transformer){if(transformerDict.transform=transformer.transform,typeof transformerDict.transform!==\"function\")@throwTypeError(\"transformer.transform should be a function\")}if(\"flush\"in transformer){if(transformerDict.flush=transformer.flush,typeof transformerDict.flush!==\"function\")@throwTypeError(\"transformer.flush should be a function\")}if(\"readableType\"in transformer)@throwRangeError(\"TransformStream transformer has a readableType\");if(\"writableType\"in transformer)@throwRangeError(\"TransformStream transformer has a writableType\")}const readableHighWaterMark=@extractHighWaterMark(readableStrategy,0),readableSizeAlgorithm=@extractSizeAlgorithm(readableStrategy),writableHighWaterMark=@extractHighWaterMark(writableStrategy,1),writableSizeAlgorithm=@extractSizeAlgorithm(writableStrategy),startPromiseCapability=@newPromiseCapability(@Promise);if(@initializeTransformStream(this,startPromiseCapability.promise,writableHighWaterMark,writableSizeAlgorithm,readableHighWaterMark,readableSizeAlgorithm),@setUpTransformStreamDefaultControllerFromTransformer(this,transformer,transformerDict),(\"start\"in transformerDict)){const controller=@getByIdDirectPrivate(this,\"controller\");(()=>@promiseInvokeOrNoopMethodNoCatch(transformer,transformerDict.start,[controller]))().@then(()=>{startPromiseCapability.resolve.@call()},(error)=>{startPromiseCapability.reject.@call(@undefined,error)})}else startPromiseCapability.resolve.@call();return this})\n";
+
+// readable
+const JSC::ConstructAbility s_transformStreamReadableCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_transformStreamReadableCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_transformStreamReadableCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_transformStreamReadableCodeLength = 158;
+static const JSC::Intrinsic s_transformStreamReadableCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_transformStreamReadableCode = "(function (){\"use strict\";if(!@isTransformStream(this))throw @makeThisTypeError(\"TransformStream\",\"readable\");return @getByIdDirectPrivate(this,\"readable\")})\n";
+
+// writable
+const JSC::ConstructAbility s_transformStreamWritableCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_transformStreamWritableCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_transformStreamWritableCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_transformStreamWritableCodeLength = 158;
+static const JSC::Intrinsic s_transformStreamWritableCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_transformStreamWritableCode = "(function (){\"use strict\";if(!@isTransformStream(this))throw @makeThisTypeError(\"TransformStream\",\"writable\");return @getByIdDirectPrivate(this,\"writable\")})\n";
+
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
+{\
+ JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
+ return clientData->builtinFunctions().transformStreamBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().transformStreamBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+}
+WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* ReadableStreamInternals.ts */
@@ -1913,188 +1205,1054 @@ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
WEBCORE_FOREACH_READABLESTREAMINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
-/* TransformStreamDefaultController.ts */
-// initializeTransformStreamDefaultController
-const JSC::ConstructAbility s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeLength = 40;
-static const JSC::Intrinsic s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCode = "(function (){\"use strict\";return this})\n";
+/* ReadableByteStreamInternals.ts */
+// privateInitializeReadableByteStreamController
+const JSC::ConstructAbility s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeLength = 1896;
+static const JSC::Intrinsic s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCode = "(function (stream,underlyingByteSource,highWaterMark){\"use strict\";if(!@isReadableStream(stream))@throwTypeError(\"ReadableByteStreamController needs a ReadableStream\");if(@getByIdDirectPrivate(stream,\"readableStreamController\")!==null)@throwTypeError(\"ReadableStream already has a controller\");@putByIdDirectPrivate(this,\"controlledReadableStream\",stream),@putByIdDirectPrivate(this,\"underlyingByteSource\",underlyingByteSource),@putByIdDirectPrivate(this,\"pullAgain\",!1),@putByIdDirectPrivate(this,\"pulling\",!1),@readableByteStreamControllerClearPendingPullIntos(this),@putByIdDirectPrivate(this,\"queue\",@newQueue()),@putByIdDirectPrivate(this,\"started\",0),@putByIdDirectPrivate(this,\"closeRequested\",!1);let hwm=@toNumber(highWaterMark);if(hwm!==hwm||hwm<0)@throwRangeError(\"highWaterMark value is negative or not a number\");@putByIdDirectPrivate(this,\"strategyHWM\",hwm);let autoAllocateChunkSize=underlyingByteSource.autoAllocateChunkSize;if(autoAllocateChunkSize!==@undefined){if(autoAllocateChunkSize=@toNumber(autoAllocateChunkSize),autoAllocateChunkSize<=0||autoAllocateChunkSize===@Infinity||autoAllocateChunkSize===-@Infinity)@throwRangeError(\"autoAllocateChunkSize value is negative or equal to positive or negative infinity\")}@putByIdDirectPrivate(this,\"autoAllocateChunkSize\",autoAllocateChunkSize),@putByIdDirectPrivate(this,\"pendingPullIntos\",@createFIFO());const controller=this;return @promiseInvokeOrNoopNoCatch(@getByIdDirectPrivate(controller,\"underlyingByteSource\"),\"start\",[controller]).@then(()=>{@putByIdDirectPrivate(controller,\"started\",1),@readableByteStreamControllerCallPullIfNeeded(controller)},(error)=>{if(@getByIdDirectPrivate(stream,\"state\")===@streamReadable)@readableByteStreamControllerError(controller,error)}),@putByIdDirectPrivate(this,\"cancel\",@readableByteStreamControllerCancel),@putByIdDirectPrivate(this,\"pull\",@readableByteStreamControllerPull),this})\n";
-// desiredSize
-const JSC::ConstructAbility s_transformStreamDefaultControllerDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_transformStreamDefaultControllerDesiredSizeCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_transformStreamDefaultControllerDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_transformStreamDefaultControllerDesiredSizeCodeLength = 397;
-static const JSC::Intrinsic s_transformStreamDefaultControllerDesiredSizeCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_transformStreamDefaultControllerDesiredSizeCode = "(function (){\"use strict\";if(!@isTransformStreamDefaultController(this))throw @makeThisTypeError(\"TransformStreamDefaultController\",\"enqueue\");const stream=@getByIdDirectPrivate(this,\"stream\"),readable=@getByIdDirectPrivate(stream,\"readable\"),readableController=@getByIdDirectPrivate(readable,\"readableStreamController\");return @readableStreamDefaultControllerGetDesiredSize(readableController)})\n";
+// readableStreamByteStreamControllerStart
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeLength = 91;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCode = "(function (controller){\"use strict\";@putByIdDirectPrivate(controller,\"start\",@undefined)})\n";
-// enqueue
-const JSC::ConstructAbility s_transformStreamDefaultControllerEnqueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_transformStreamDefaultControllerEnqueueCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_transformStreamDefaultControllerEnqueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_transformStreamDefaultControllerEnqueueCodeLength = 203;
-static const JSC::Intrinsic s_transformStreamDefaultControllerEnqueueCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_transformStreamDefaultControllerEnqueueCode = "(function (chunk){\"use strict\";if(!@isTransformStreamDefaultController(this))throw @makeThisTypeError(\"TransformStreamDefaultController\",\"enqueue\");@transformStreamDefaultControllerEnqueue(this,chunk)})\n";
+// privateInitializeReadableStreamBYOBRequest
+const JSC::ConstructAbility s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeLength = 163;
+static const JSC::Intrinsic s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCode = "(function (controller,view){\"use strict\";@putByIdDirectPrivate(this,\"associatedReadableByteStreamController\",controller),@putByIdDirectPrivate(this,\"view\",view)})\n";
-// error
-const JSC::ConstructAbility s_transformStreamDefaultControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_transformStreamDefaultControllerErrorCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_transformStreamDefaultControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_transformStreamDefaultControllerErrorCodeLength = 191;
-static const JSC::Intrinsic s_transformStreamDefaultControllerErrorCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_transformStreamDefaultControllerErrorCode = "(function (e){\"use strict\";if(!@isTransformStreamDefaultController(this))throw @makeThisTypeError(\"TransformStreamDefaultController\",\"error\");@transformStreamDefaultControllerError(this,e)})\n";
+// isReadableByteStreamController
+const JSC::ConstructAbility s_readableByteStreamInternalsIsReadableByteStreamControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsIsReadableByteStreamControllerCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsIsReadableByteStreamControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsIsReadableByteStreamControllerCodeLength = 127;
+static const JSC::Intrinsic s_readableByteStreamInternalsIsReadableByteStreamControllerCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsIsReadableByteStreamControllerCode = "(function (controller){\"use strict\";return @isObject(controller)&&!!@getByIdDirectPrivate(controller,\"underlyingByteSource\")})\n";
-// terminate
-const JSC::ConstructAbility s_transformStreamDefaultControllerTerminateCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_transformStreamDefaultControllerTerminateCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_transformStreamDefaultControllerTerminateCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_transformStreamDefaultControllerTerminateCodeLength = 196;
-static const JSC::Intrinsic s_transformStreamDefaultControllerTerminateCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_transformStreamDefaultControllerTerminateCode = "(function (){\"use strict\";if(!@isTransformStreamDefaultController(this))throw @makeThisTypeError(\"TransformStreamDefaultController\",\"terminate\");@transformStreamDefaultControllerTerminate(this)})\n";
+// isReadableStreamBYOBRequest
+const JSC::ConstructAbility s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeLength = 148;
+static const JSC::Intrinsic s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsIsReadableStreamBYOBRequestCode = "(function (byobRequest){\"use strict\";return @isObject(byobRequest)&&!!@getByIdDirectPrivate(byobRequest,\"associatedReadableByteStreamController\")})\n";
+
+// isReadableStreamBYOBReader
+const JSC::ConstructAbility s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeLength = 111;
+static const JSC::Intrinsic s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsIsReadableStreamBYOBReaderCode = "(function (reader){\"use strict\";return @isObject(reader)&&!!@getByIdDirectPrivate(reader,\"readIntoRequests\")})\n";
+
+// readableByteStreamControllerCancel
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeLength = 336;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerCancelCode = "(function (controller,reason){\"use strict\";var pendingPullIntos=@getByIdDirectPrivate(controller,\"pendingPullIntos\"),first=pendingPullIntos.peek();if(first)first.bytesFilled=0;return @putByIdDirectPrivate(controller,\"queue\",@newQueue()),@promiseInvokeOrNoop(@getByIdDirectPrivate(controller,\"underlyingByteSource\"),\"cancel\",[reason])})\n";
+
+// readableByteStreamControllerError
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeLength = 242;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerErrorCode = "(function (controller,e){\"use strict\";@readableByteStreamControllerClearPendingPullIntos(controller),@putByIdDirectPrivate(controller,\"queue\",@newQueue()),@readableStreamError(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),e)})\n";
+
+// readableByteStreamControllerClose
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeLength = 473;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerCloseCode = "(function (controller){\"use strict\";if(@getByIdDirectPrivate(controller,\"queue\").size>0){@putByIdDirectPrivate(controller,\"closeRequested\",!0);return}var first=@getByIdDirectPrivate(controller,\"pendingPullIntos\")\?.peek();if(first){if(first.bytesFilled>0){const e=@makeTypeError(\"Close requested while there remain pending bytes\");throw @readableByteStreamControllerError(controller,e),e}}@readableStreamClose(@getByIdDirectPrivate(controller,\"controlledReadableStream\"))})\n";
+
+// readableByteStreamControllerClearPendingPullIntos
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeLength = 281;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCode = "(function (controller){\"use strict\";@readableByteStreamControllerInvalidateBYOBRequest(controller);var existing=@getByIdDirectPrivate(controller,\"pendingPullIntos\");if(existing!==@undefined)existing.clear();else @putByIdDirectPrivate(controller,\"pendingPullIntos\",@createFIFO())})\n";
+
+// readableByteStreamControllerGetDesiredSize
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeLength = 330;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\"),state=@getByIdDirectPrivate(stream,\"state\");if(state===@streamErrored)return null;if(state===@streamClosed)return 0;return @getByIdDirectPrivate(controller,\"strategyHWM\")-@getByIdDirectPrivate(controller,\"queue\").size})\n";
+
+// readableStreamHasBYOBReader
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeLength = 150;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableStreamHasBYOBReaderCode = "(function (stream){\"use strict\";const reader=@getByIdDirectPrivate(stream,\"reader\");return reader!==@undefined&&@isReadableStreamBYOBReader(reader)})\n";
+
+// readableStreamHasDefaultReader
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeLength = 153;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableStreamHasDefaultReaderCode = "(function (stream){\"use strict\";const reader=@getByIdDirectPrivate(stream,\"reader\");return reader!==@undefined&&@isReadableStreamDefaultReader(reader)})\n";
+
+// readableByteStreamControllerHandleQueueDrain
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeLength = 287;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCode = "(function (controller){\"use strict\";if(!@getByIdDirectPrivate(controller,\"queue\").size&&@getByIdDirectPrivate(controller,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(controller,\"controlledReadableStream\"));else @readableByteStreamControllerCallPullIfNeeded(controller)})\n";
+
+// readableByteStreamControllerPull
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerPullCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerPullCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerPullCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerPullCodeLength = 1169;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerPullCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");if(@getByIdDirectPrivate(controller,\"queue\").content\?.isNotEmpty()){const entry=@getByIdDirectPrivate(controller,\"queue\").content.shift();@getByIdDirectPrivate(controller,\"queue\").size-=entry.byteLength,@readableByteStreamControllerHandleQueueDrain(controller);let view;try{view=new @Uint8Array(entry.buffer,entry.byteOffset,entry.byteLength)}catch(error){return @Promise.@reject(error)}return @createFulfilledPromise({value:view,done:!1})}if(@getByIdDirectPrivate(controller,\"autoAllocateChunkSize\")!==@undefined){let buffer;try{buffer=@createUninitializedArrayBuffer(@getByIdDirectPrivate(controller,\"autoAllocateChunkSize\"))}catch(error){return @Promise.@reject(error)}const pullIntoDescriptor={buffer,byteOffset:0,byteLength:@getByIdDirectPrivate(controller,\"autoAllocateChunkSize\"),bytesFilled:0,elementSize:1,ctor:@Uint8Array,readerType:\"default\"};@getByIdDirectPrivate(controller,\"pendingPullIntos\").push(pullIntoDescriptor)}const promise=@readableStreamAddReadRequest(stream);return @readableByteStreamControllerCallPullIfNeeded(controller),promise})\n";
+
+// readableByteStreamControllerShouldCallPull
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeLength = 709;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");if(@getByIdDirectPrivate(stream,\"state\")!==@streamReadable)return!1;if(@getByIdDirectPrivate(controller,\"closeRequested\"))return!1;if(!(@getByIdDirectPrivate(controller,\"started\")>0))return!1;const reader=@getByIdDirectPrivate(stream,\"reader\");if(reader&&(@getByIdDirectPrivate(reader,\"readRequests\")\?.isNotEmpty()||!!@getByIdDirectPrivate(reader,\"bunNativePtr\")))return!0;if(@readableStreamHasBYOBReader(stream)&&@getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readIntoRequests\")\?.isNotEmpty())return!0;if(@readableByteStreamControllerGetDesiredSize(controller)>0)return!0;return!1})\n";
+
+// readableByteStreamControllerCallPullIfNeeded
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeLength = 748;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCode = "(function (controller){\"use strict\";if(!@readableByteStreamControllerShouldCallPull(controller))return;if(@getByIdDirectPrivate(controller,\"pulling\")){@putByIdDirectPrivate(controller,\"pullAgain\",!0);return}@putByIdDirectPrivate(controller,\"pulling\",!0),@promiseInvokeOrNoop(@getByIdDirectPrivate(controller,\"underlyingByteSource\"),\"pull\",[controller]).@then(()=>{if(@putByIdDirectPrivate(controller,\"pulling\",!1),@getByIdDirectPrivate(controller,\"pullAgain\"))@putByIdDirectPrivate(controller,\"pullAgain\",!1),@readableByteStreamControllerCallPullIfNeeded(controller)},(error)=>{if(@getByIdDirectPrivate(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),\"state\")===@streamReadable)@readableByteStreamControllerError(controller,error)})})\n";
+
+// transferBufferToCurrentRealm
+const JSC::ConstructAbility s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeLength = 48;
+static const JSC::Intrinsic s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsTransferBufferToCurrentRealmCode = "(function (buffer){\"use strict\";return buffer})\n";
+
+// readableStreamReaderKind
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamReaderKindCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamReaderKindCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamReaderKindCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableStreamReaderKindCodeLength = 208;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamReaderKindCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableStreamReaderKindCode = "(function (reader){\"use strict\";if(@getByIdDirectPrivate(reader,\"readRequests\"))return @getByIdDirectPrivate(reader,\"bunNativePtr\")\?3:1;if(@getByIdDirectPrivate(reader,\"readIntoRequests\"))return 2;return 0})\n";
+
+// readableByteStreamControllerEnqueue
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeLength = 1036;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCode = "(function (controller,chunk){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");switch(@getByIdDirectPrivate(stream,\"reader\")\?@readableStreamReaderKind(@getByIdDirectPrivate(stream,\"reader\")):0){case 1:{if(!@getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readRequests\")\?.isNotEmpty())@readableByteStreamControllerEnqueueChunk(controller,@transferBufferToCurrentRealm(chunk.buffer),chunk.byteOffset,chunk.byteLength);else{const transferredView=chunk.constructor===@Uint8Array\?chunk:new @Uint8Array(chunk.buffer,chunk.byteOffset,chunk.byteLength);@readableStreamFulfillReadRequest(stream,transferredView,!1)}break}case 2:{@readableByteStreamControllerEnqueueChunk(controller,@transferBufferToCurrentRealm(chunk.buffer),chunk.byteOffset,chunk.byteLength),@readableByteStreamControllerProcessPullDescriptors(controller);break}case 3:break;default:{@readableByteStreamControllerEnqueueChunk(controller,@transferBufferToCurrentRealm(chunk.buffer),chunk.byteOffset,chunk.byteLength);break}}})\n";
+
+// readableByteStreamControllerEnqueueChunk
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeLength = 213;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCode = "(function (controller,buffer,byteOffset,byteLength){\"use strict\";@getByIdDirectPrivate(controller,\"queue\").content.push({buffer,byteOffset,byteLength}),@getByIdDirectPrivate(controller,\"queue\").size+=byteLength})\n";
+
+// readableByteStreamControllerRespondWithNewView
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeLength = 463;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCode = "(function (controller,view){\"use strict\";let firstDescriptor=@getByIdDirectPrivate(controller,\"pendingPullIntos\").peek();if(firstDescriptor.byteOffset+firstDescriptor.bytesFilled!==view.byteOffset)@throwRangeError(\"Invalid value for view.byteOffset\");if(firstDescriptor.byteLength!==view.byteLength)@throwRangeError(\"Invalid value for view.byteLength\");firstDescriptor.buffer=view.buffer,@readableByteStreamControllerRespondInternal(controller,view.byteLength)})\n";
+
+// readableByteStreamControllerRespond
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeLength = 287;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondCode = "(function (controller,bytesWritten){\"use strict\";if(bytesWritten=@toNumber(bytesWritten),bytesWritten!==bytesWritten||bytesWritten===@Infinity||bytesWritten<0)@throwRangeError(\"bytesWritten has an incorrect value\");@readableByteStreamControllerRespondInternal(controller,bytesWritten)})\n";
+
+// readableByteStreamControllerRespondInternal
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeLength = 534;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCode = "(function (controller,bytesWritten){\"use strict\";let firstDescriptor=@getByIdDirectPrivate(controller,\"pendingPullIntos\").peek(),stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");if(@getByIdDirectPrivate(stream,\"state\")===@streamClosed){if(bytesWritten!==0)@throwTypeError(\"bytesWritten is different from 0 even though stream is closed\");@readableByteStreamControllerRespondInClosedState(controller,firstDescriptor)}else @readableByteStreamControllerRespondInReadableState(controller,bytesWritten,firstDescriptor)})\n";
+
+// readableByteStreamControllerRespondInReadableState
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeLength = 1110;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCode = "(function (controller,bytesWritten,pullIntoDescriptor){\"use strict\";if(pullIntoDescriptor.bytesFilled+bytesWritten>pullIntoDescriptor.byteLength)@throwRangeError(\"bytesWritten value is too great\");if(@readableByteStreamControllerInvalidateBYOBRequest(controller),pullIntoDescriptor.bytesFilled+=bytesWritten,pullIntoDescriptor.bytesFilled<pullIntoDescriptor.elementSize)return;@readableByteStreamControllerShiftPendingDescriptor(controller);const remainderSize=pullIntoDescriptor.bytesFilled%pullIntoDescriptor.elementSize;if(remainderSize>0){const end=pullIntoDescriptor.byteOffset+pullIntoDescriptor.bytesFilled,remainder=@cloneArrayBuffer(pullIntoDescriptor.buffer,end-remainderSize,remainderSize);@readableByteStreamControllerEnqueueChunk(controller,remainder,0,remainder.byteLength)}pullIntoDescriptor.buffer=@transferBufferToCurrentRealm(pullIntoDescriptor.buffer),pullIntoDescriptor.bytesFilled-=remainderSize,@readableByteStreamControllerCommitDescriptor(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),pullIntoDescriptor),@readableByteStreamControllerProcessPullDescriptors(controller)})\n";
+
+// readableByteStreamControllerRespondInClosedState
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeLength = 596;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCode = "(function (controller,firstDescriptor){\"use strict\";if(firstDescriptor.buffer=@transferBufferToCurrentRealm(firstDescriptor.buffer),@readableStreamHasBYOBReader(@getByIdDirectPrivate(controller,\"controlledReadableStream\")))while(@getByIdDirectPrivate(@getByIdDirectPrivate(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),\"reader\"),\"readIntoRequests\")\?.isNotEmpty()){let pullIntoDescriptor=@readableByteStreamControllerShiftPendingDescriptor(controller);@readableByteStreamControllerCommitDescriptor(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),pullIntoDescriptor)}})\n";
+
+// readableByteStreamControllerProcessPullDescriptors
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeLength = 534;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCode = "(function (controller){\"use strict\";while(@getByIdDirectPrivate(controller,\"pendingPullIntos\").isNotEmpty()){if(@getByIdDirectPrivate(controller,\"queue\").size===0)return;let pullIntoDescriptor=@getByIdDirectPrivate(controller,\"pendingPullIntos\").peek();if(@readableByteStreamControllerFillDescriptorFromQueue(controller,pullIntoDescriptor))@readableByteStreamControllerShiftPendingDescriptor(controller),@readableByteStreamControllerCommitDescriptor(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),pullIntoDescriptor)}})\n";
+
+// readableByteStreamControllerFillDescriptorFromQueue
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeLength = 1538;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCode = "(function (controller,pullIntoDescriptor){\"use strict\";const currentAlignedBytes=pullIntoDescriptor.bytesFilled-pullIntoDescriptor.bytesFilled%pullIntoDescriptor.elementSize,maxBytesToCopy=@getByIdDirectPrivate(controller,\"queue\").size<pullIntoDescriptor.byteLength-pullIntoDescriptor.bytesFilled\?@getByIdDirectPrivate(controller,\"queue\").size:pullIntoDescriptor.byteLength-pullIntoDescriptor.bytesFilled,maxBytesFilled=pullIntoDescriptor.bytesFilled+maxBytesToCopy,maxAlignedBytes=maxBytesFilled-maxBytesFilled%pullIntoDescriptor.elementSize;let totalBytesToCopyRemaining=maxBytesToCopy,ready=!1;if(maxAlignedBytes>currentAlignedBytes)totalBytesToCopyRemaining=maxAlignedBytes-pullIntoDescriptor.bytesFilled,ready=!0;while(totalBytesToCopyRemaining>0){let headOfQueue=@getByIdDirectPrivate(controller,\"queue\").content.peek();const bytesToCopy=totalBytesToCopyRemaining<headOfQueue.byteLength\?totalBytesToCopyRemaining:headOfQueue.byteLength,destStart=pullIntoDescriptor.byteOffset+pullIntoDescriptor.bytesFilled;if(new @Uint8Array(pullIntoDescriptor.buffer).set(new @Uint8Array(headOfQueue.buffer,headOfQueue.byteOffset,bytesToCopy),destStart),headOfQueue.byteLength===bytesToCopy)@getByIdDirectPrivate(controller,\"queue\").content.shift();else headOfQueue.byteOffset+=bytesToCopy,headOfQueue.byteLength-=bytesToCopy;@getByIdDirectPrivate(controller,\"queue\").size-=bytesToCopy,@readableByteStreamControllerInvalidateBYOBRequest(controller),pullIntoDescriptor.bytesFilled+=bytesToCopy,totalBytesToCopyRemaining-=bytesToCopy}return ready})\n";
+
+// readableByteStreamControllerShiftPendingDescriptor
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeLength = 195;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCode = "(function (controller){\"use strict\";let descriptor=@getByIdDirectPrivate(controller,\"pendingPullIntos\").shift();return @readableByteStreamControllerInvalidateBYOBRequest(controller),descriptor})\n";
+
+// readableByteStreamControllerInvalidateBYOBRequest
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeLength = 374;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCode = "(function (controller){\"use strict\";if(@getByIdDirectPrivate(controller,\"byobRequest\")===@undefined)return;const byobRequest=@getByIdDirectPrivate(controller,\"byobRequest\");@putByIdDirectPrivate(byobRequest,\"associatedReadableByteStreamController\",@undefined),@putByIdDirectPrivate(byobRequest,\"view\",@undefined),@putByIdDirectPrivate(controller,\"byobRequest\",@undefined)})\n";
+
+// readableByteStreamControllerCommitDescriptor
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeLength = 382;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCode = "(function (stream,pullIntoDescriptor){\"use strict\";let done=!1;if(@getByIdDirectPrivate(stream,\"state\")===@streamClosed)done=!0;let filledView=@readableByteStreamControllerConvertDescriptor(pullIntoDescriptor);if(pullIntoDescriptor.readerType===\"default\")@readableStreamFulfillReadRequest(stream,filledView,done);else @readableStreamFulfillReadIntoRequest(stream,filledView,done)})\n";
+
+// readableByteStreamControllerConvertDescriptor
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeLength = 200;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCode = "(function (pullIntoDescriptor){\"use strict\";return new pullIntoDescriptor.ctor(pullIntoDescriptor.buffer,pullIntoDescriptor.byteOffset,pullIntoDescriptor.bytesFilled/pullIntoDescriptor.elementSize)})\n";
+
+// readableStreamFulfillReadIntoRequest
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeLength = 208;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCode = "(function (stream,chunk,done){\"use strict\";const readIntoRequest=@getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readIntoRequests\").shift();@fulfillPromise(readIntoRequest,{value:chunk,done})})\n";
+
+// readableStreamBYOBReaderRead
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeLength = 384;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableStreamBYOBReaderReadCode = "(function (reader,view){\"use strict\";const stream=@getByIdDirectPrivate(reader,\"ownerReadableStream\");if(@putByIdDirectPrivate(stream,\"disturbed\",!0),@getByIdDirectPrivate(stream,\"state\")===@streamErrored)return @Promise.@reject(@getByIdDirectPrivate(stream,\"storedError\"));return @readableByteStreamControllerPullInto(@getByIdDirectPrivate(stream,\"readableStreamController\"),view)})\n";
+
+// readableByteStreamControllerPullInto
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeLength = 1659;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCode = "(function (controller,view){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");let elementSize=1;if(view.BYTES_PER_ELEMENT!==@undefined)elementSize=view.BYTES_PER_ELEMENT;const ctor=view.constructor,pullIntoDescriptor={buffer:view.buffer,byteOffset:view.byteOffset,byteLength:view.byteLength,bytesFilled:0,elementSize,ctor,readerType:\"byob\"};var pending=@getByIdDirectPrivate(controller,\"pendingPullIntos\");if(pending\?.isNotEmpty())return pullIntoDescriptor.buffer=@transferBufferToCurrentRealm(pullIntoDescriptor.buffer),pending.push(pullIntoDescriptor),@readableStreamAddReadIntoRequest(stream);if(@getByIdDirectPrivate(stream,\"state\")===@streamClosed){const emptyView=new ctor(pullIntoDescriptor.buffer,pullIntoDescriptor.byteOffset,0);return @createFulfilledPromise({value:emptyView,done:!0})}if(@getByIdDirectPrivate(controller,\"queue\").size>0){if(@readableByteStreamControllerFillDescriptorFromQueue(controller,pullIntoDescriptor)){const filledView=@readableByteStreamControllerConvertDescriptor(pullIntoDescriptor);return @readableByteStreamControllerHandleQueueDrain(controller),@createFulfilledPromise({value:filledView,done:!1})}if(@getByIdDirectPrivate(controller,\"closeRequested\")){const e=@makeTypeError(\"Closing stream has been requested\");return @readableByteStreamControllerError(controller,e),@Promise.@reject(e)}}pullIntoDescriptor.buffer=@transferBufferToCurrentRealm(pullIntoDescriptor.buffer),@getByIdDirectPrivate(controller,\"pendingPullIntos\").push(pullIntoDescriptor);const promise=@readableStreamAddReadIntoRequest(stream);return @readableByteStreamControllerCallPullIfNeeded(controller),promise})\n";
+
+// readableStreamAddReadIntoRequest
+const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeLength = 184;
+static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCode = "(function (stream){\"use strict\";const readRequest=@newPromise();return @getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readIntoRequests\").push(readRequest),readRequest})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().transformStreamDefaultControllerBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().transformStreamDefaultControllerBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+ return clientData->builtinFunctions().readableByteStreamInternalsBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().readableByteStreamInternalsBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
-WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
-/* ReadableStreamBYOBReader.ts */
-// initializeReadableStreamBYOBReader
-const JSC::ConstructAbility s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeLength = 510;
-static const JSC::Intrinsic s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCode = "(function (stream){\"use strict\";if(!@isReadableStream(stream))@throwTypeError(\"ReadableStreamBYOBReader needs a ReadableStream\");if(!@isReadableByteStreamController(@getByIdDirectPrivate(stream,\"readableStreamController\")))@throwTypeError(\"ReadableStreamBYOBReader needs a ReadableByteStreamController\");if(@isReadableStreamLocked(stream))@throwTypeError(\"ReadableStream is locked\");return @readableStreamReaderGenericInitialize(this,stream),@putByIdDirectPrivate(this,\"readIntoRequests\",@createFIFO()),this})\n";
-
-// cancel
-const JSC::ConstructAbility s_readableStreamBYOBReaderCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamBYOBReaderCancelCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamBYOBReaderCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamBYOBReaderCancelCodeLength = 361;
-static const JSC::Intrinsic s_readableStreamBYOBReaderCancelCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamBYOBReaderCancelCode = "(function (reason){\"use strict\";if(!@isReadableStreamBYOBReader(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStreamBYOBReader\",\"cancel\"));if(!@getByIdDirectPrivate(this,\"ownerReadableStream\"))return @Promise.@reject(@makeTypeError(\"cancel() called on a reader owned by no readable stream\"));return @readableStreamReaderGenericCancel(this,reason)})\n";
-
-// read
-const JSC::ConstructAbility s_readableStreamBYOBReaderReadCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamBYOBReaderReadCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamBYOBReaderReadCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamBYOBReaderReadCodeLength = 663;
-static const JSC::Intrinsic s_readableStreamBYOBReaderReadCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamBYOBReaderReadCode = "(function (view){\"use strict\";if(!@isReadableStreamBYOBReader(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStreamBYOBReader\",\"read\"));if(!@getByIdDirectPrivate(this,\"ownerReadableStream\"))return @Promise.@reject(@makeTypeError(\"read() called on a reader owned by no readable stream\"));if(!@isObject(view))return @Promise.@reject(@makeTypeError(\"Provided view is not an object\"));if(!@ArrayBuffer.@isView(view))return @Promise.@reject(@makeTypeError(\"Provided view is not an ArrayBufferView\"));if(view.byteLength===0)return @Promise.@reject(@makeTypeError(\"Provided view cannot have a 0 byteLength\"));return @readableStreamBYOBReaderRead(this,view)})\n";
-
-// releaseLock
-const JSC::ConstructAbility s_readableStreamBYOBReaderReleaseLockCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamBYOBReaderReleaseLockCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamBYOBReaderReleaseLockCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamBYOBReaderReleaseLockCodeLength = 382;
-static const JSC::Intrinsic s_readableStreamBYOBReaderReleaseLockCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamBYOBReaderReleaseLockCode = "(function (){\"use strict\";if(!@isReadableStreamBYOBReader(this))throw @makeThisTypeError(\"ReadableStreamBYOBReader\",\"releaseLock\");if(!@getByIdDirectPrivate(this,\"ownerReadableStream\"))return;if(@getByIdDirectPrivate(this,\"readIntoRequests\")\?.isNotEmpty())@throwTypeError(\"There are still pending read requests, cannot release the lock\");@readableStreamReaderGenericRelease(this)})\n";
+/* UtilInspect.ts */
+// getStylizeWithColor
+const JSC::ConstructAbility s_utilInspectGetStylizeWithColorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_utilInspectGetStylizeWithColorCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_utilInspectGetStylizeWithColorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_utilInspectGetStylizeWithColorCodeLength = 261;
+static const JSC::Intrinsic s_utilInspectGetStylizeWithColorCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_utilInspectGetStylizeWithColorCode = "(function (inspect){\"use strict\";return function stylizeWithColor(str,styleType){const style=inspect.styles[styleType];if(style!==@undefined){const color=inspect.colors[style];if(color!==@undefined)return`\\x1B[${color[0]}m${str}\\x1B[${color[1]}m`}return str}})\n";
-// closed
-const JSC::ConstructAbility s_readableStreamBYOBReaderClosedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamBYOBReaderClosedCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamBYOBReaderClosedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamBYOBReaderClosedCodeLength = 218;
-static const JSC::Intrinsic s_readableStreamBYOBReaderClosedCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamBYOBReaderClosedCode = "(function (){\"use strict\";if(!@isReadableStreamBYOBReader(this))return @Promise.@reject(@makeGetterTypeError(\"ReadableStreamBYOBReader\",\"closed\"));return @getByIdDirectPrivate(this,\"closedPromiseCapability\").promise})\n";
+// stylizeWithNoColor
+const JSC::ConstructAbility s_utilInspectStylizeWithNoColorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_utilInspectStylizeWithNoColorCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_utilInspectStylizeWithNoColorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_utilInspectStylizeWithNoColorCodeLength = 42;
+static const JSC::Intrinsic s_utilInspectStylizeWithNoColorCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_utilInspectStylizeWithNoColorCode = "(function (str){\"use strict\";return str})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().readableStreamBYOBReaderBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().readableStreamBYOBReaderBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+ return clientData->builtinFunctions().utilInspectBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().utilInspectBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
-WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_UTILINSPECT_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
-/* JSBufferConstructor.ts */
-// from
-const JSC::ConstructAbility s_jsBufferConstructorFromCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferConstructorFromCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferConstructorFromCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferConstructorFromCodeLength = 1274;
-static const JSC::Intrinsic s_jsBufferConstructorFromCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferConstructorFromCode = "(function (items){\"use strict\";if(@isUndefinedOrNull(items))@throwTypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object.\");if(typeof items===\"string\"||typeof items===\"object\"&&(@isTypedArrayView(items)||items instanceof @ArrayBuffer||items instanceof SharedArrayBuffer||items instanceof @String))switch(@argumentCount()){case 1:return new @Buffer(items);case 2:return new @Buffer(items,@argument(1));default:return new @Buffer(items,@argument(1),@argument(2))}var arrayLike=@toObject(items,\"The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object.\");if(!@isJSArray(arrayLike)){const toPrimitive=@tryGetByIdWithWellKnownSymbol(items,\"toPrimitive\");if(toPrimitive){const primitive=toPrimitive.@call(items,\"string\");if(typeof primitive===\"string\")switch(@argumentCount()){case 1:return new @Buffer(primitive);case 2:return new @Buffer(primitive,@argument(1));default:return new @Buffer(primitive,@argument(1),@argument(2))}}if(!(\"length\"in arrayLike)||@isCallable(arrayLike))@throwTypeError(\"The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object.\")}return new @Buffer(@Uint8Array.from(arrayLike).buffer)})\n";
+/* JSBufferPrototype.ts */
+// setBigUint64
+const JSC::ConstructAbility s_jsBufferPrototypeSetBigUint64CodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeSetBigUint64CodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeSetBigUint64CodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeSetBigUint64CodeLength = 156;
+static const JSC::Intrinsic s_jsBufferPrototypeSetBigUint64CodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeSetBigUint64Code = "(function (offset,value,le){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigUint64(offset,value,le)})\n";
-// isBuffer
-const JSC::ConstructAbility s_jsBufferConstructorIsBufferCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_jsBufferConstructorIsBufferCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_jsBufferConstructorIsBufferCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_jsBufferConstructorIsBufferCodeLength = 75;
-static const JSC::Intrinsic s_jsBufferConstructorIsBufferCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferConstructorIsBufferCode = "(function (bufferlike){\"use strict\";return bufferlike instanceof @Buffer})\n";
+// readInt8
+const JSC::ConstructAbility s_jsBufferPrototypeReadInt8CodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadInt8CodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt8CodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadInt8CodeLength = 133;
+static const JSC::Intrinsic s_jsBufferPrototypeReadInt8CodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadInt8Code = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getInt8(offset)})\n";
+
+// readUInt8
+const JSC::ConstructAbility s_jsBufferPrototypeReadUInt8CodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadUInt8CodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt8CodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadUInt8CodeLength = 134;
+static const JSC::Intrinsic s_jsBufferPrototypeReadUInt8CodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadUInt8Code = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getUint8(offset)})\n";
+
+// readInt16LE
+const JSC::ConstructAbility s_jsBufferPrototypeReadInt16LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadInt16LECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt16LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadInt16LECodeLength = 137;
+static const JSC::Intrinsic s_jsBufferPrototypeReadInt16LECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadInt16LECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getInt16(offset,!0)})\n";
+
+// readInt16BE
+const JSC::ConstructAbility s_jsBufferPrototypeReadInt16BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadInt16BECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt16BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadInt16BECodeLength = 137;
+static const JSC::Intrinsic s_jsBufferPrototypeReadInt16BECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadInt16BECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getInt16(offset,!1)})\n";
+
+// readUInt16LE
+const JSC::ConstructAbility s_jsBufferPrototypeReadUInt16LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadUInt16LECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt16LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadUInt16LECodeLength = 138;
+static const JSC::Intrinsic s_jsBufferPrototypeReadUInt16LECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadUInt16LECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getUint16(offset,!0)})\n";
+
+// readUInt16BE
+const JSC::ConstructAbility s_jsBufferPrototypeReadUInt16BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadUInt16BECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt16BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadUInt16BECodeLength = 138;
+static const JSC::Intrinsic s_jsBufferPrototypeReadUInt16BECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadUInt16BECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getUint16(offset,!1)})\n";
+
+// readInt32LE
+const JSC::ConstructAbility s_jsBufferPrototypeReadInt32LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadInt32LECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt32LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadInt32LECodeLength = 137;
+static const JSC::Intrinsic s_jsBufferPrototypeReadInt32LECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadInt32LECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getInt32(offset,!0)})\n";
+
+// readInt32BE
+const JSC::ConstructAbility s_jsBufferPrototypeReadInt32BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadInt32BECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt32BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadInt32BECodeLength = 137;
+static const JSC::Intrinsic s_jsBufferPrototypeReadInt32BECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadInt32BECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getInt32(offset,!1)})\n";
+
+// readUInt32LE
+const JSC::ConstructAbility s_jsBufferPrototypeReadUInt32LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadUInt32LECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt32LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadUInt32LECodeLength = 138;
+static const JSC::Intrinsic s_jsBufferPrototypeReadUInt32LECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadUInt32LECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getUint32(offset,!0)})\n";
+
+// readUInt32BE
+const JSC::ConstructAbility s_jsBufferPrototypeReadUInt32BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadUInt32BECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt32BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadUInt32BECodeLength = 138;
+static const JSC::Intrinsic s_jsBufferPrototypeReadUInt32BECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadUInt32BECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getUint32(offset,!1)})\n";
+
+// readIntLE
+const JSC::ConstructAbility s_jsBufferPrototypeReadIntLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadIntLECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadIntLECodeLength = 650;
+static const JSC::Intrinsic s_jsBufferPrototypeReadIntLECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadIntLECode = "(function (offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:return view.getInt8(offset);case 2:return view.getInt16(offset,!0);case 3:{const val=view.getUint16(offset,!0)+view.getUint8(offset+2)*65536;return val|(val&8388608)*510}case 4:return view.getInt32(offset,!0);case 5:{const last=view.getUint8(offset+4);return(last|(last&128)*33554430)*4294967296+view.getUint32(offset,!0)}case 6:{const last=view.getUint16(offset+4,!0);return(last|(last&32768)*131070)*4294967296+view.getUint32(offset,!0)}}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n";
+
+// readIntBE
+const JSC::ConstructAbility s_jsBufferPrototypeReadIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadIntBECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadIntBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadIntBECodeLength = 650;
+static const JSC::Intrinsic s_jsBufferPrototypeReadIntBECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadIntBECode = "(function (offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:return view.getInt8(offset);case 2:return view.getInt16(offset,!1);case 3:{const val=view.getUint16(offset+1,!1)+view.getUint8(offset)*65536;return val|(val&8388608)*510}case 4:return view.getInt32(offset,!1);case 5:{const last=view.getUint8(offset);return(last|(last&128)*33554430)*4294967296+view.getUint32(offset+1,!1)}case 6:{const last=view.getUint16(offset,!1);return(last|(last&32768)*131070)*4294967296+view.getUint32(offset+2,!1)}}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n";
+
+// readUIntLE
+const JSC::ConstructAbility s_jsBufferPrototypeReadUIntLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadUIntLECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadUIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadUIntLECodeLength = 543;
+static const JSC::Intrinsic s_jsBufferPrototypeReadUIntLECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadUIntLECode = "(function (offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:return view.getUint8(offset);case 2:return view.getUint16(offset,!0);case 3:return view.getUint16(offset,!0)+view.getUint8(offset+2)*65536;case 4:return view.getUint32(offset,!0);case 5:return view.getUint8(offset+4)*4294967296+view.getUint32(offset,!0);case 6:return view.getUint16(offset+4,!0)*4294967296+view.getUint32(offset,!0)}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n";
+
+// readUIntBE
+const JSC::ConstructAbility s_jsBufferPrototypeReadUIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadUIntBECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadUIntBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadUIntBECodeLength = 620;
+static const JSC::Intrinsic s_jsBufferPrototypeReadUIntBECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadUIntBECode = "(function (offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:return view.getUint8(offset);case 2:return view.getUint16(offset,!1);case 3:return view.getUint16(offset+1,!1)+view.getUint8(offset)*65536;case 4:return view.getUint32(offset,!1);case 5:{const last=view.getUint8(offset);return(last|(last&128)*33554430)*4294967296+view.getUint32(offset+1,!1)}case 6:{const last=view.getUint16(offset,!1);return(last|(last&32768)*131070)*4294967296+view.getUint32(offset+2,!1)}}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n";
+
+// readFloatLE
+const JSC::ConstructAbility s_jsBufferPrototypeReadFloatLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadFloatLECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadFloatLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadFloatLECodeLength = 139;
+static const JSC::Intrinsic s_jsBufferPrototypeReadFloatLECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadFloatLECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getFloat32(offset,!0)})\n";
+
+// readFloatBE
+const JSC::ConstructAbility s_jsBufferPrototypeReadFloatBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadFloatBECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadFloatBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadFloatBECodeLength = 139;
+static const JSC::Intrinsic s_jsBufferPrototypeReadFloatBECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadFloatBECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getFloat32(offset,!1)})\n";
+
+// readDoubleLE
+const JSC::ConstructAbility s_jsBufferPrototypeReadDoubleLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadDoubleLECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadDoubleLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadDoubleLECodeLength = 139;
+static const JSC::Intrinsic s_jsBufferPrototypeReadDoubleLECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadDoubleLECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getFloat64(offset,!0)})\n";
+
+// readDoubleBE
+const JSC::ConstructAbility s_jsBufferPrototypeReadDoubleBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadDoubleBECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadDoubleBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadDoubleBECodeLength = 139;
+static const JSC::Intrinsic s_jsBufferPrototypeReadDoubleBECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadDoubleBECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getFloat64(offset,!1)})\n";
+
+// readBigInt64LE
+const JSC::ConstructAbility s_jsBufferPrototypeReadBigInt64LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadBigInt64LECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigInt64LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadBigInt64LECodeLength = 140;
+static const JSC::Intrinsic s_jsBufferPrototypeReadBigInt64LECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadBigInt64LECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getBigInt64(offset,!0)})\n";
+
+// readBigInt64BE
+const JSC::ConstructAbility s_jsBufferPrototypeReadBigInt64BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadBigInt64BECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigInt64BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadBigInt64BECodeLength = 140;
+static const JSC::Intrinsic s_jsBufferPrototypeReadBigInt64BECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadBigInt64BECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getBigInt64(offset,!1)})\n";
+
+// readBigUInt64LE
+const JSC::ConstructAbility s_jsBufferPrototypeReadBigUInt64LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadBigUInt64LECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigUInt64LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadBigUInt64LECodeLength = 141;
+static const JSC::Intrinsic s_jsBufferPrototypeReadBigUInt64LECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadBigUInt64LECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getBigUint64(offset,!0)})\n";
+
+// readBigUInt64BE
+const JSC::ConstructAbility s_jsBufferPrototypeReadBigUInt64BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeReadBigUInt64BECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigUInt64BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeReadBigUInt64BECodeLength = 141;
+static const JSC::Intrinsic s_jsBufferPrototypeReadBigUInt64BECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeReadBigUInt64BECode = "(function (offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).getBigUint64(offset,!1)})\n";
+
+// writeInt8
+const JSC::ConstructAbility s_jsBufferPrototypeWriteInt8CodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteInt8CodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt8CodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteInt8CodeLength = 154;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteInt8CodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteInt8Code = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt8(offset,value),offset+1})\n";
+
+// writeUInt8
+const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt8CodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt8CodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt8CodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteUInt8CodeLength = 155;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt8CodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteUInt8Code = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint8(offset,value),offset+1})\n";
+
+// writeInt16LE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteInt16LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteInt16LECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt16LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteInt16LECodeLength = 158;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteInt16LECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteInt16LECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt16(offset,value,!0),offset+2})\n";
+
+// writeInt16BE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteInt16BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteInt16BECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt16BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteInt16BECodeLength = 158;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteInt16BECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteInt16BECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt16(offset,value,!1),offset+2})\n";
+
+// writeUInt16LE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt16LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt16LECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt16LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteUInt16LECodeLength = 159;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt16LECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteUInt16LECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint16(offset,value,!0),offset+2})\n";
+
+// writeUInt16BE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt16BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt16BECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt16BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteUInt16BECodeLength = 159;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt16BECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteUInt16BECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint16(offset,value,!1),offset+2})\n";
+
+// writeInt32LE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteInt32LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteInt32LECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt32LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteInt32LECodeLength = 158;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteInt32LECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteInt32LECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt32(offset,value,!0),offset+4})\n";
+
+// writeInt32BE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteInt32BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteInt32BECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt32BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteInt32BECodeLength = 158;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteInt32BECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteInt32BECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt32(offset,value,!1),offset+4})\n";
+
+// writeUInt32LE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt32LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt32LECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt32LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteUInt32LECodeLength = 159;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt32LECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteUInt32LECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint32(offset,value,!0),offset+4})\n";
+
+// writeUInt32BE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt32BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt32BECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt32BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteUInt32BECodeLength = 159;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt32BECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteUInt32BECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint32(offset,value,!1),offset+4})\n";
+
+// writeIntLE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteIntLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteIntLECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteIntLECodeLength = 725;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteIntLECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteIntLECode = "(function (value,offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:{view.setInt8(offset,value);break}case 2:{view.setInt16(offset,value,!0);break}case 3:{view.setUint16(offset,value&65535,!0),view.setInt8(offset+2,Math.floor(value*0.0000152587890625));break}case 4:{view.setInt32(offset,value,!0);break}case 5:{view.setUint32(offset,value|0,!0),view.setInt8(offset+4,Math.floor(value*0.00000000023283064365386964));break}case 6:{view.setUint32(offset,value|0,!0),view.setInt16(offset+4,Math.floor(value*0.00000000023283064365386964),!0);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return offset+byteLength})\n";
+
+// writeIntBE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteIntBECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteIntBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteIntBECodeLength = 725;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteIntBECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteIntBECode = "(function (value,offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:{view.setInt8(offset,value);break}case 2:{view.setInt16(offset,value,!1);break}case 3:{view.setUint16(offset+1,value&65535,!1),view.setInt8(offset,Math.floor(value*0.0000152587890625));break}case 4:{view.setInt32(offset,value,!1);break}case 5:{view.setUint32(offset+1,value|0,!1),view.setInt8(offset,Math.floor(value*0.00000000023283064365386964));break}case 6:{view.setUint32(offset+2,value|0,!1),view.setInt16(offset,Math.floor(value*0.00000000023283064365386964),!1);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return offset+byteLength})\n";
+
+// writeUIntLE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteUIntLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteUIntLECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteUIntLECodeLength = 731;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteUIntLECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteUIntLECode = "(function (value,offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:{view.setUint8(offset,value);break}case 2:{view.setUint16(offset,value,!0);break}case 3:{view.setUint16(offset,value&65535,!0),view.setUint8(offset+2,Math.floor(value*0.0000152587890625));break}case 4:{view.setUint32(offset,value,!0);break}case 5:{view.setUint32(offset,value|0,!0),view.setUint8(offset+4,Math.floor(value*0.00000000023283064365386964));break}case 6:{view.setUint32(offset,value|0,!0),view.setUint16(offset+4,Math.floor(value*0.00000000023283064365386964),!0);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return offset+byteLength})\n";
+
+// writeUIntBE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteUIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteUIntBECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUIntBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteUIntBECodeLength = 731;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteUIntBECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteUIntBECode = "(function (value,offset,byteLength){\"use strict\";const view=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(byteLength){case 1:{view.setUint8(offset,value);break}case 2:{view.setUint16(offset,value,!1);break}case 3:{view.setUint16(offset+1,value&65535,!1),view.setUint8(offset,Math.floor(value*0.0000152587890625));break}case 4:{view.setUint32(offset,value,!1);break}case 5:{view.setUint32(offset+1,value|0,!1),view.setUint8(offset,Math.floor(value*0.00000000023283064365386964));break}case 6:{view.setUint32(offset+2,value|0,!1),view.setUint16(offset,Math.floor(value*0.00000000023283064365386964),!1);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return offset+byteLength})\n";
+
+// writeFloatLE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteFloatLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteFloatLECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteFloatLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteFloatLECodeLength = 160;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteFloatLECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteFloatLECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat32(offset,value,!0),offset+4})\n";
+
+// writeFloatBE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteFloatBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteFloatBECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteFloatBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteFloatBECodeLength = 160;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteFloatBECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteFloatBECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat32(offset,value,!1),offset+4})\n";
+
+// writeDoubleLE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteDoubleLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteDoubleLECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteDoubleLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteDoubleLECodeLength = 160;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteDoubleLECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteDoubleLECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat64(offset,value,!0),offset+8})\n";
+
+// writeDoubleBE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteDoubleBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteDoubleBECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteDoubleBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteDoubleBECodeLength = 160;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteDoubleBECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteDoubleBECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat64(offset,value,!1),offset+8})\n";
+
+// writeBigInt64LE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteBigInt64LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteBigInt64LECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigInt64LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteBigInt64LECodeLength = 161;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteBigInt64LECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteBigInt64LECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigInt64(offset,value,!0),offset+8})\n";
+
+// writeBigInt64BE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteBigInt64BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteBigInt64BECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigInt64BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteBigInt64BECodeLength = 161;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteBigInt64BECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteBigInt64BECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigInt64(offset,value,!1),offset+8})\n";
+
+// writeBigUInt64LE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteBigUInt64LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteBigUInt64LECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigUInt64LECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteBigUInt64LECodeLength = 162;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteBigUInt64LECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteBigUInt64LECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigUint64(offset,value,!0),offset+8})\n";
+
+// writeBigUInt64BE
+const JSC::ConstructAbility s_jsBufferPrototypeWriteBigUInt64BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeWriteBigUInt64BECodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigUInt64BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeWriteBigUInt64BECodeLength = 162;
+static const JSC::Intrinsic s_jsBufferPrototypeWriteBigUInt64BECodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeWriteBigUInt64BECode = "(function (value,offset){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigUint64(offset,value,!1),offset+8})\n";
+
+// utf8Write
+const JSC::ConstructAbility s_jsBufferPrototypeUtf8WriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeUtf8WriteCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeUtf8WriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeUtf8WriteCodeLength = 91;
+static const JSC::Intrinsic s_jsBufferPrototypeUtf8WriteCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeUtf8WriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"utf8\")})\n";
+
+// ucs2Write
+const JSC::ConstructAbility s_jsBufferPrototypeUcs2WriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeUcs2WriteCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeUcs2WriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeUcs2WriteCodeLength = 91;
+static const JSC::Intrinsic s_jsBufferPrototypeUcs2WriteCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeUcs2WriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"ucs2\")})\n";
+
+// utf16leWrite
+const JSC::ConstructAbility s_jsBufferPrototypeUtf16leWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeUtf16leWriteCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeUtf16leWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeUtf16leWriteCodeLength = 94;
+static const JSC::Intrinsic s_jsBufferPrototypeUtf16leWriteCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeUtf16leWriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"utf16le\")})\n";
+
+// latin1Write
+const JSC::ConstructAbility s_jsBufferPrototypeLatin1WriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeLatin1WriteCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeLatin1WriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeLatin1WriteCodeLength = 93;
+static const JSC::Intrinsic s_jsBufferPrototypeLatin1WriteCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeLatin1WriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"latin1\")})\n";
+
+// asciiWrite
+const JSC::ConstructAbility s_jsBufferPrototypeAsciiWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeAsciiWriteCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeAsciiWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeAsciiWriteCodeLength = 92;
+static const JSC::Intrinsic s_jsBufferPrototypeAsciiWriteCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeAsciiWriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"ascii\")})\n";
+
+// base64Write
+const JSC::ConstructAbility s_jsBufferPrototypeBase64WriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeBase64WriteCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeBase64WriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeBase64WriteCodeLength = 93;
+static const JSC::Intrinsic s_jsBufferPrototypeBase64WriteCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeBase64WriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"base64\")})\n";
+
+// base64urlWrite
+const JSC::ConstructAbility s_jsBufferPrototypeBase64urlWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeBase64urlWriteCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeBase64urlWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeBase64urlWriteCodeLength = 96;
+static const JSC::Intrinsic s_jsBufferPrototypeBase64urlWriteCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeBase64urlWriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"base64url\")})\n";
+
+// hexWrite
+const JSC::ConstructAbility s_jsBufferPrototypeHexWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeHexWriteCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeHexWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeHexWriteCodeLength = 90;
+static const JSC::Intrinsic s_jsBufferPrototypeHexWriteCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeHexWriteCode = "(function (text,offset,length){\"use strict\";return this.write(text,offset,length,\"hex\")})\n";
+
+// utf8Slice
+const JSC::ConstructAbility s_jsBufferPrototypeUtf8SliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeUtf8SliceCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeUtf8SliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeUtf8SliceCodeLength = 76;
+static const JSC::Intrinsic s_jsBufferPrototypeUtf8SliceCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeUtf8SliceCode = "(function (start,end){\"use strict\";return this.toString(\"utf8\",start,end)})\n";
+
+// ucs2Slice
+const JSC::ConstructAbility s_jsBufferPrototypeUcs2SliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeUcs2SliceCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeUcs2SliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeUcs2SliceCodeLength = 76;
+static const JSC::Intrinsic s_jsBufferPrototypeUcs2SliceCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeUcs2SliceCode = "(function (start,end){\"use strict\";return this.toString(\"ucs2\",start,end)})\n";
+
+// utf16leSlice
+const JSC::ConstructAbility s_jsBufferPrototypeUtf16leSliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeUtf16leSliceCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeUtf16leSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeUtf16leSliceCodeLength = 79;
+static const JSC::Intrinsic s_jsBufferPrototypeUtf16leSliceCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeUtf16leSliceCode = "(function (start,end){\"use strict\";return this.toString(\"utf16le\",start,end)})\n";
+
+// latin1Slice
+const JSC::ConstructAbility s_jsBufferPrototypeLatin1SliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeLatin1SliceCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeLatin1SliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeLatin1SliceCodeLength = 78;
+static const JSC::Intrinsic s_jsBufferPrototypeLatin1SliceCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeLatin1SliceCode = "(function (start,end){\"use strict\";return this.toString(\"latin1\",start,end)})\n";
+
+// asciiSlice
+const JSC::ConstructAbility s_jsBufferPrototypeAsciiSliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeAsciiSliceCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeAsciiSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeAsciiSliceCodeLength = 77;
+static const JSC::Intrinsic s_jsBufferPrototypeAsciiSliceCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeAsciiSliceCode = "(function (start,end){\"use strict\";return this.toString(\"ascii\",start,end)})\n";
+
+// base64Slice
+const JSC::ConstructAbility s_jsBufferPrototypeBase64SliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeBase64SliceCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeBase64SliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeBase64SliceCodeLength = 78;
+static const JSC::Intrinsic s_jsBufferPrototypeBase64SliceCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeBase64SliceCode = "(function (start,end){\"use strict\";return this.toString(\"base64\",start,end)})\n";
+
+// base64urlSlice
+const JSC::ConstructAbility s_jsBufferPrototypeBase64urlSliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeBase64urlSliceCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeBase64urlSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeBase64urlSliceCodeLength = 81;
+static const JSC::Intrinsic s_jsBufferPrototypeBase64urlSliceCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeBase64urlSliceCode = "(function (start,end){\"use strict\";return this.toString(\"base64url\",start,end)})\n";
+
+// hexSlice
+const JSC::ConstructAbility s_jsBufferPrototypeHexSliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeHexSliceCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeHexSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeHexSliceCodeLength = 75;
+static const JSC::Intrinsic s_jsBufferPrototypeHexSliceCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeHexSliceCode = "(function (start,end){\"use strict\";return this.toString(\"hex\",start,end)})\n";
+
+// toJSON
+const JSC::ConstructAbility s_jsBufferPrototypeToJSONCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeToJSONCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeToJSONCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeToJSONCodeLength = 73;
+static const JSC::Intrinsic s_jsBufferPrototypeToJSONCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeToJSONCode = "(function (){\"use strict\";return{type:\"Buffer\",data:@Array.from(this)}})\n";
+
+// slice
+const JSC::ConstructAbility s_jsBufferPrototypeSliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeSliceCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeSliceCodeLength = 447;
+static const JSC::Intrinsic s_jsBufferPrototypeSliceCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeSliceCode = "(function (start,end){\"use strict\";var{buffer,byteOffset,byteLength}=this;function adjustOffset(offset,length){if(offset=@trunc(offset),offset===0||offset!==offset)return 0;else if(offset<0)return offset+=length,offset>0\?offset:0;else return offset<length\?offset:length}var start_=adjustOffset(start,byteLength),end_=end!==@undefined\?adjustOffset(end,byteLength):byteLength;return new @Buffer(buffer,byteOffset+start_,end_>start_\?end_-start_:0)})\n";
+
+// parent
+const JSC::ConstructAbility s_jsBufferPrototypeParentCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeParentCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeParentCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeParentCodeLength = 99;
+static const JSC::Intrinsic s_jsBufferPrototypeParentCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeParentCode = "(function (){\"use strict\";return @isObject(this)&&this instanceof @Buffer\?this.buffer:@undefined})\n";
+
+// offset
+const JSC::ConstructAbility s_jsBufferPrototypeOffsetCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeOffsetCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeOffsetCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeOffsetCodeLength = 103;
+static const JSC::Intrinsic s_jsBufferPrototypeOffsetCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeOffsetCode = "(function (){\"use strict\";return @isObject(this)&&this instanceof @Buffer\?this.byteOffset:@undefined})\n";
+
+// inspect
+const JSC::ConstructAbility s_jsBufferPrototypeInspectCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_jsBufferPrototypeInspectCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_jsBufferPrototypeInspectCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_jsBufferPrototypeInspectCodeLength = 70;
+static const JSC::Intrinsic s_jsBufferPrototypeInspectCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_jsBufferPrototypeInspectCode = "(function (recurseTimes,ctx){\"use strict\";return @Bun.inspect(this)})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().jsBufferConstructorBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().jsBufferConstructorBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+ return clientData->builtinFunctions().jsBufferPrototypeBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().jsBufferPrototypeBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
-WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
-/* ReadableStreamDefaultReader.ts */
-// initializeReadableStreamDefaultReader
-const JSC::ConstructAbility s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeLength = 334;
-static const JSC::Intrinsic s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCode = "(function (stream){\"use strict\";if(!@isReadableStream(stream))@throwTypeError(\"ReadableStreamDefaultReader needs a ReadableStream\");if(@isReadableStreamLocked(stream))@throwTypeError(\"ReadableStream is locked\");return @readableStreamReaderGenericInitialize(this,stream),@putByIdDirectPrivate(this,\"readRequests\",@createFIFO()),this})\n";
+/* ReadableStream.ts */
+// initializeReadableStream
+const JSC::ConstructAbility s_readableStreamInitializeReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamInitializeReadableStreamCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamInitializeReadableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamInitializeReadableStreamCodeLength = 2702;
+static const JSC::Intrinsic s_readableStreamInitializeReadableStreamCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamInitializeReadableStreamCode = "(function (underlyingSource,strategy){\"use strict\";if(underlyingSource===@undefined)underlyingSource={@bunNativeType:0,@bunNativePtr:0,@lazy:!1};if(strategy===@undefined)strategy={};if(!@isObject(underlyingSource))@throwTypeError(\"ReadableStream constructor takes an object as first argument\");if(strategy!==@undefined&&!@isObject(strategy))@throwTypeError(\"ReadableStream constructor takes an object as second argument, if any\");@putByIdDirectPrivate(this,\"state\",@streamReadable),@putByIdDirectPrivate(this,\"reader\",@undefined),@putByIdDirectPrivate(this,\"storedError\",@undefined),@putByIdDirectPrivate(this,\"disturbed\",!1),@putByIdDirectPrivate(this,\"readableStreamController\",null),@putByIdDirectPrivate(this,\"bunNativeType\",@getByIdDirectPrivate(underlyingSource,\"bunNativeType\")\?\?0),@putByIdDirectPrivate(this,\"bunNativePtr\",@getByIdDirectPrivate(underlyingSource,\"bunNativePtr\")\?\?0),@putByIdDirectPrivate(this,\"asyncContext\",@getInternalField(@asyncContext,0));const isDirect=underlyingSource.type===\"direct\",isUnderlyingSourceLazy=!!underlyingSource.@lazy,isLazy=isDirect||isUnderlyingSourceLazy;if(@getByIdDirectPrivate(underlyingSource,\"pull\")!==@undefined&&!isLazy){const size=@getByIdDirectPrivate(strategy,\"size\"),highWaterMark=@getByIdDirectPrivate(strategy,\"highWaterMark\");return @putByIdDirectPrivate(this,\"highWaterMark\",highWaterMark),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@setupReadableStreamDefaultController(this,underlyingSource,size,highWaterMark!==@undefined\?highWaterMark:1,@getByIdDirectPrivate(underlyingSource,\"start\"),@getByIdDirectPrivate(underlyingSource,\"pull\"),@getByIdDirectPrivate(underlyingSource,\"cancel\")),this}if(isDirect)@putByIdDirectPrivate(this,\"underlyingSource\",underlyingSource),@putByIdDirectPrivate(this,\"highWaterMark\",@getByIdDirectPrivate(strategy,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",()=>@createReadableStreamController(this,underlyingSource,strategy));else if(isLazy){const autoAllocateChunkSize=underlyingSource.autoAllocateChunkSize;@putByIdDirectPrivate(this,\"highWaterMark\",@undefined),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"highWaterMark\",autoAllocateChunkSize||@getByIdDirectPrivate(strategy,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",()=>{const instance=@lazyLoadStream(this,autoAllocateChunkSize);if(instance)@createReadableStreamController(this,instance,strategy)})}else @putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"highWaterMark\",@getByIdDirectPrivate(strategy,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",@undefined),@createReadableStreamController(this,underlyingSource,strategy);return this})\n";
+
+// readableStreamToArray
+const JSC::ConstructAbility s_readableStreamReadableStreamToArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamReadableStreamToArrayCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamReadableStreamToArrayCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
+const int s_readableStreamReadableStreamToArrayCodeLength = 238;
+static const JSC::Intrinsic s_readableStreamReadableStreamToArrayCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamReadableStreamToArrayCode = "(function (stream){\"use strict\";var underlyingSource=@getByIdDirectPrivate(stream,\"underlyingSource\");if(underlyingSource!==@undefined)return @readableStreamToArrayDirect(stream,underlyingSource);return @readableStreamIntoArray(stream)})\n";
+
+// readableStreamToText
+const JSC::ConstructAbility s_readableStreamReadableStreamToTextCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamReadableStreamToTextCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamReadableStreamToTextCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
+const int s_readableStreamReadableStreamToTextCodeLength = 236;
+static const JSC::Intrinsic s_readableStreamReadableStreamToTextCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamReadableStreamToTextCode = "(function (stream){\"use strict\";var underlyingSource=@getByIdDirectPrivate(stream,\"underlyingSource\");if(underlyingSource!==@undefined)return @readableStreamToTextDirect(stream,underlyingSource);return @readableStreamIntoText(stream)})\n";
+
+// readableStreamToArrayBuffer
+const JSC::ConstructAbility s_readableStreamReadableStreamToArrayBufferCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamReadableStreamToArrayBufferCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamReadableStreamToArrayBufferCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
+const int s_readableStreamReadableStreamToArrayBufferCodeLength = 355;
+static const JSC::Intrinsic s_readableStreamReadableStreamToArrayBufferCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamReadableStreamToArrayBufferCode = "(function (stream){\"use strict\";var underlyingSource=@getByIdDirectPrivate(stream,\"underlyingSource\");if(underlyingSource!==@undefined)return @readableStreamToArrayBufferDirect(stream,underlyingSource);var result=@Bun.readableStreamToArray(stream);if(@isPromise(result))return result.then(@Bun.concatArrayBuffers);return @Bun.concatArrayBuffers(result)})\n";
+
+// readableStreamToFormData
+const JSC::ConstructAbility s_readableStreamReadableStreamToFormDataCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamReadableStreamToFormDataCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamReadableStreamToFormDataCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
+const int s_readableStreamReadableStreamToFormDataCodeLength = 142;
+static const JSC::Intrinsic s_readableStreamReadableStreamToFormDataCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamReadableStreamToFormDataCode = "(function (stream,contentType){\"use strict\";return @Bun.readableStreamToBlob(stream).then((blob)=>{return FormData.from(blob,contentType)})})\n";
+
+// readableStreamToJSON
+const JSC::ConstructAbility s_readableStreamReadableStreamToJSONCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamReadableStreamToJSONCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamReadableStreamToJSONCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
+const int s_readableStreamReadableStreamToJSONCodeLength = 104;
+static const JSC::Intrinsic s_readableStreamReadableStreamToJSONCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamReadableStreamToJSONCode = "(function (stream){\"use strict\";return @Bun.readableStreamToText(stream).@then(globalThis.JSON.parse)})\n";
+
+// readableStreamToBlob
+const JSC::ConstructAbility s_readableStreamReadableStreamToBlobCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamReadableStreamToBlobCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamReadableStreamToBlobCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
+const int s_readableStreamReadableStreamToBlobCodeLength = 126;
+static const JSC::Intrinsic s_readableStreamReadableStreamToBlobCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamReadableStreamToBlobCode = "(function (stream){\"use strict\";return @Promise.resolve(@Bun.readableStreamToArray(stream)).@then((array)=>new Blob(array))})\n";
+
+// consumeReadableStream
+const JSC::ConstructAbility s_readableStreamConsumeReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamConsumeReadableStreamCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamConsumeReadableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
+const int s_readableStreamConsumeReadableStreamCodeLength = 2131;
+static const JSC::Intrinsic s_readableStreamConsumeReadableStreamCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamConsumeReadableStreamCode = "(function (nativePtr,nativeType,inputStream){\"use strict\";const symbol=globalThis.Symbol.for(\"Bun.consumeReadableStreamPrototype\");var cached=globalThis[symbol];if(!cached)cached=globalThis[symbol]=[];var Prototype=cached[nativeType];if(Prototype===@undefined){var[doRead,doError,doReadMany,doClose,onClose,deinit]=globalThis[globalThis.Symbol.for('Bun.lazy')](nativeType);Prototype=class NativeReadableStreamSink{handleError;handleClosed;processResult;constructor(reader,ptr){this.#ptr=ptr,this.#reader=reader,this.#didClose=!1,this.handleError=this._handleError.bind(this),this.handleClosed=this._handleClosed.bind(this),this.processResult=this._processResult.bind(this),reader.closed.then(this.handleClosed,this.handleError)}_handleClosed(){if(this.#didClose)return;this.#didClose=!0;var ptr=this.#ptr;this.#ptr=0,doClose(ptr),deinit(ptr)}_handleError(error){if(this.#didClose)return;this.#didClose=!0;var ptr=this.#ptr;this.#ptr=0,doError(ptr,error),deinit(ptr)}#ptr;#didClose=!1;#reader;_handleReadMany({value,done,size}){if(done){this.handleClosed();return}if(this.#didClose)return;doReadMany(this.#ptr,value,done,size)}read(){if(!this.#ptr)return @throwTypeError(\"ReadableStreamSink is already closed\");return this.processResult(this.#reader.read())}_processResult(result){if(result&&@isPromise(result)){if(@getPromiseInternalField(result,@promiseFieldFlags)&@promiseStateFulfilled){const fulfilledValue=@getPromiseInternalField(result,@promiseFieldReactionsOrResult);if(fulfilledValue)result=fulfilledValue}}if(result&&@isPromise(result))return result.then(this.processResult,this.handleError),null;if(result.done)return this.handleClosed(),0;else if(result.value)return result.value;else return-1}readMany(){if(!this.#ptr)return @throwTypeError(\"ReadableStreamSink is already closed\");return this.processResult(this.#reader.readMany())}};const minlength=nativeType+1;if(cached.length<minlength)cached.length=minlength;@putByValDirect(cached,nativeType,Prototype)}if(@isReadableStreamLocked(inputStream))@throwTypeError(\"Cannot start reading from a locked stream\");return new Prototype(inputStream.getReader(),nativePtr)})\n";
+
+// createEmptyReadableStream
+const JSC::ConstructAbility s_readableStreamCreateEmptyReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamCreateEmptyReadableStreamCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamCreateEmptyReadableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
+const int s_readableStreamCreateEmptyReadableStreamCodeLength = 114;
+static const JSC::Intrinsic s_readableStreamCreateEmptyReadableStreamCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamCreateEmptyReadableStreamCode = "(function (){\"use strict\";var stream=new @ReadableStream({pull(){}});return @readableStreamClose(stream),stream})\n";
+
+// createNativeReadableStream
+const JSC::ConstructAbility s_readableStreamCreateNativeReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamCreateNativeReadableStreamCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamCreateNativeReadableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
+const int s_readableStreamCreateNativeReadableStreamCodeLength = 181;
+static const JSC::Intrinsic s_readableStreamCreateNativeReadableStreamCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamCreateNativeReadableStreamCode = "(function (nativePtr,nativeType,autoAllocateChunkSize){\"use strict\";return new @ReadableStream({@lazy:!0,@bunNativeType:nativeType,@bunNativePtr:nativePtr,autoAllocateChunkSize})})\n";
// cancel
-const JSC::ConstructAbility s_readableStreamDefaultReaderCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamDefaultReaderCancelCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamDefaultReaderCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamDefaultReaderCancelCodeLength = 367;
-static const JSC::Intrinsic s_readableStreamDefaultReaderCancelCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamDefaultReaderCancelCode = "(function (reason){\"use strict\";if(!@isReadableStreamDefaultReader(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStreamDefaultReader\",\"cancel\"));if(!@getByIdDirectPrivate(this,\"ownerReadableStream\"))return @Promise.@reject(@makeTypeError(\"cancel() called on a reader owned by no readable stream\"));return @readableStreamReaderGenericCancel(this,reason)})\n";
+const JSC::ConstructAbility s_readableStreamCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamCancelCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamCancelCodeLength = 276;
+static const JSC::Intrinsic s_readableStreamCancelCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamCancelCode = "(function (reason){\"use strict\";if(!@isReadableStream(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStream\",\"cancel\"));if(@isReadableStreamLocked(this))return @Promise.@reject(@makeTypeError(\"ReadableStream is locked\"));return @readableStreamCancel(this,reason)})\n";
-// readMany
-const JSC::ConstructAbility s_readableStreamDefaultReaderReadManyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamDefaultReaderReadManyCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamDefaultReaderReadManyCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamDefaultReaderReadManyCodeLength = 3230;
-static const JSC::Intrinsic s_readableStreamDefaultReaderReadManyCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamDefaultReaderReadManyCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultReader(this))@throwTypeError(\"ReadableStreamDefaultReader.readMany() should not be called directly\");const stream=@getByIdDirectPrivate(this,\"ownerReadableStream\");if(!stream)@throwTypeError(\"readMany() called on a reader owned by no readable stream\");const state=@getByIdDirectPrivate(stream,\"state\");if(@putByIdDirectPrivate(stream,\"disturbed\",!0),state===@streamClosed)return{value:[],size:0,done:!0};else if(state===@streamErrored)throw @getByIdDirectPrivate(stream,\"storedError\");var controller=@getByIdDirectPrivate(stream,\"readableStreamController\"),queue=@getByIdDirectPrivate(controller,\"queue\");if(!queue)return controller.@pull(controller).@then(function({done,value}){return done\?{done:!0,value:[],size:0}:{value:[value],size:1,done:!1}});const content=queue.content;var size=queue.size,values=content.toArray(!1),length=values.length;if(length>0){var outValues=@newArrayWithSize(length);if(@isReadableByteStreamController(controller)){{const buf=values[0];if(!(@ArrayBuffer.@isView(buf)||buf instanceof @ArrayBuffer))@putByValDirect(outValues,0,new @Uint8Array(buf.buffer,buf.byteOffset,buf.byteLength));else @putByValDirect(outValues,0,buf)}for(var i=1;i<length;i++){const buf=values[i];if(!(@ArrayBuffer.@isView(buf)||buf instanceof @ArrayBuffer))@putByValDirect(outValues,i,new @Uint8Array(buf.buffer,buf.byteOffset,buf.byteLength));else @putByValDirect(outValues,i,buf)}}else{@putByValDirect(outValues,0,values[0].value);for(var i=1;i<length;i++)@putByValDirect(outValues,i,values[i].value)}if(@resetQueue(@getByIdDirectPrivate(controller,\"queue\")),@getByIdDirectPrivate(controller,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(controller,\"controlledReadableStream\"));else if(@isReadableStreamDefaultController(controller))@readableStreamDefaultControllerCallPullIfNeeded(controller);else if(@isReadableByteStreamController(controller))@readableByteStreamControllerCallPullIfNeeded(controller);return{value:outValues,size,done:!1}}var onPullMany=(result)=>{if(result.done)return{value:[],size:0,done:!0};var controller2=@getByIdDirectPrivate(stream,\"readableStreamController\"),queue2=@getByIdDirectPrivate(controller2,\"queue\"),value=[result.value].concat(queue2.content.toArray(!1)),length2=value.length;if(@isReadableByteStreamController(controller2))for(var i2=0;i2<length2;i2++){const buf=value[i2];if(!(@ArrayBuffer.@isView(buf)||buf instanceof @ArrayBuffer)){const{buffer,byteOffset,byteLength}=buf;@putByValDirect(value,i2,new @Uint8Array(buffer,byteOffset,byteLength))}}else for(var i2=1;i2<length2;i2++)@putByValDirect(value,i2,value[i2].value);var size2=queue2.size;if(@resetQueue(queue2),@getByIdDirectPrivate(controller2,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(controller2,\"controlledReadableStream\"));else if(@isReadableStreamDefaultController(controller2))@readableStreamDefaultControllerCallPullIfNeeded(controller2);else if(@isReadableByteStreamController(controller2))@readableByteStreamControllerCallPullIfNeeded(controller2);return{value,size:size2,done:!1}},pullResult=controller.@pull(controller);if(pullResult&&@isPromise(pullResult))return pullResult.@then(onPullMany);return onPullMany(pullResult)})\n";
+// getReader
+const JSC::ConstructAbility s_readableStreamGetReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamGetReaderCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamGetReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamGetReaderCodeLength = 506;
+static const JSC::Intrinsic s_readableStreamGetReaderCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamGetReaderCode = "(function (options){\"use strict\";if(!@isReadableStream(this))throw @makeThisTypeError(\"ReadableStream\",\"getReader\");const mode=@toDictionary(options,{},\"ReadableStream.getReader takes an object as first argument\").mode;if(mode===@undefined){var start_=@getByIdDirectPrivate(this,\"start\");if(start_)@putByIdDirectPrivate(this,\"start\",@undefined),start_();return new @ReadableStreamDefaultReader(this)}if(mode==\"byob\")return new @ReadableStreamBYOBReader(this);@throwTypeError(\"Invalid mode is specified\")})\n";
-// read
-const JSC::ConstructAbility s_readableStreamDefaultReaderReadCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamDefaultReaderReadCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamDefaultReaderReadCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamDefaultReaderReadCodeLength = 348;
-static const JSC::Intrinsic s_readableStreamDefaultReaderReadCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamDefaultReaderReadCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultReader(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStreamDefaultReader\",\"read\"));if(!@getByIdDirectPrivate(this,\"ownerReadableStream\"))return @Promise.@reject(@makeTypeError(\"read() called on a reader owned by no readable stream\"));return @readableStreamDefaultReaderRead(this)})\n";
+// pipeThrough
+const JSC::ConstructAbility s_readableStreamPipeThroughCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamPipeThroughCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamPipeThroughCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamPipeThroughCodeLength = 1162;
+static const JSC::Intrinsic s_readableStreamPipeThroughCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamPipeThroughCode = "(function (streams,options){\"use strict\";const transforms=streams,readable=transforms.readable;if(!@isReadableStream(readable))throw @makeTypeError(\"readable should be ReadableStream\");const writable=transforms.writable,internalWritable=@getInternalWritableStream(writable);if(!@isWritableStream(internalWritable))throw @makeTypeError(\"writable should be WritableStream\");let preventClose=!1,preventAbort=!1,preventCancel=!1,signal;if(!@isUndefinedOrNull(options)){if(!@isObject(options))throw @makeTypeError(\"options must be an object\");if(preventAbort=!!options.preventAbort,preventCancel=!!options.preventCancel,preventClose=!!options.preventClose,signal=options.signal,signal!==@undefined&&!@isAbortSignal(signal))throw @makeTypeError(\"options.signal must be AbortSignal\")}if(!@isReadableStream(this))throw @makeThisTypeError(\"ReadableStream\",\"pipeThrough\");if(@isReadableStreamLocked(this))throw @makeTypeError(\"ReadableStream is locked\");if(@isWritableStreamLocked(internalWritable))throw @makeTypeError(\"WritableStream is locked\");return @readableStreamPipeToWritableStream(this,internalWritable,preventClose,preventAbort,preventCancel,signal),readable})\n";
-// releaseLock
-const JSC::ConstructAbility s_readableStreamDefaultReaderReleaseLockCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamDefaultReaderReleaseLockCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamDefaultReaderReleaseLockCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamDefaultReaderReleaseLockCodeLength = 384;
-static const JSC::Intrinsic s_readableStreamDefaultReaderReleaseLockCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamDefaultReaderReleaseLockCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultReader(this))throw @makeThisTypeError(\"ReadableStreamDefaultReader\",\"releaseLock\");if(!@getByIdDirectPrivate(this,\"ownerReadableStream\"))return;if(@getByIdDirectPrivate(this,\"readRequests\")\?.isNotEmpty())@throwTypeError(\"There are still pending read requests, cannot release the lock\");@readableStreamReaderGenericRelease(this)})\n";
+// pipeTo
+const JSC::ConstructAbility s_readableStreamPipeToCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamPipeToCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamPipeToCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamPipeToCodeLength = 1175;
+static const JSC::Intrinsic s_readableStreamPipeToCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamPipeToCode = "(function (destination){\"use strict\";if(!@isReadableStream(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStream\",\"pipeTo\"));if(@isReadableStreamLocked(this))return @Promise.@reject(@makeTypeError(\"ReadableStream is locked\"));let options=@argument(1),preventClose=!1,preventAbort=!1,preventCancel=!1,signal;if(!@isUndefinedOrNull(options)){if(!@isObject(options))return @Promise.@reject(@makeTypeError(\"options must be an object\"));try{preventAbort=!!options.preventAbort,preventCancel=!!options.preventCancel,preventClose=!!options.preventClose,signal=options.signal}catch(e){return @Promise.@reject(e)}if(signal!==@undefined&&!@isAbortSignal(signal))return @Promise.@reject(@makeTypeError(\"options.signal must be AbortSignal\"))}const internalDestination=@getInternalWritableStream(destination);if(!@isWritableStream(internalDestination))return @Promise.@reject(@makeTypeError(\"ReadableStream pipeTo requires a WritableStream\"));if(@isWritableStreamLocked(internalDestination))return @Promise.@reject(@makeTypeError(\"WritableStream is locked\"));return @readableStreamPipeToWritableStream(this,internalDestination,preventClose,preventAbort,preventCancel,signal)})\n";
-// closed
-const JSC::ConstructAbility s_readableStreamDefaultReaderClosedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamDefaultReaderClosedCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamDefaultReaderClosedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamDefaultReaderClosedCodeLength = 224;
-static const JSC::Intrinsic s_readableStreamDefaultReaderClosedCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamDefaultReaderClosedCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultReader(this))return @Promise.@reject(@makeGetterTypeError(\"ReadableStreamDefaultReader\",\"closed\"));return @getByIdDirectPrivate(this,\"closedPromiseCapability\").promise})\n";
+// tee
+const JSC::ConstructAbility s_readableStreamTeeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamTeeCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamTeeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamTeeCodeLength = 140;
+static const JSC::Intrinsic s_readableStreamTeeCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamTeeCode = "(function (){\"use strict\";if(!@isReadableStream(this))throw @makeThisTypeError(\"ReadableStream\",\"tee\");return @readableStreamTee(this,!1)})\n";
+
+// locked
+const JSC::ConstructAbility s_readableStreamLockedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamLockedCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamLockedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamLockedCodeLength = 147;
+static const JSC::Intrinsic s_readableStreamLockedCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamLockedCode = "(function (){\"use strict\";if(!@isReadableStream(this))throw @makeGetterTypeError(\"ReadableStream\",\"locked\");return @isReadableStreamLocked(this)})\n";
+
+// values
+const JSC::ConstructAbility s_readableStreamValuesCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamValuesCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamValuesCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_readableStreamValuesCodeLength = 165;
+static const JSC::Intrinsic s_readableStreamValuesCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamValuesCode = "(function (options){\"use strict\";var prototype=@ReadableStream.prototype;return @readableStreamDefineLazyIterators(prototype),prototype.values.@call(this,options)})\n";
+
+// lazyAsyncIterator
+const JSC::ConstructAbility s_readableStreamLazyAsyncIteratorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_readableStreamLazyAsyncIteratorCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_readableStreamLazyAsyncIteratorCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
+const int s_readableStreamLazyAsyncIteratorCodeLength = 176;
+static const JSC::Intrinsic s_readableStreamLazyAsyncIteratorCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_readableStreamLazyAsyncIteratorCode = "(function (){\"use strict\";var prototype=@ReadableStream.prototype;return @readableStreamDefineLazyIterators(prototype),prototype[globalThis.Symbol.asyncIterator].@call(this)})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().readableStreamDefaultReaderBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().readableStreamDefaultReaderBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+ return clientData->builtinFunctions().readableStreamBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().readableStreamBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
-WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_READABLESTREAM_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+
+/* BundlerPlugin.ts */
+// runSetupFunction
+const JSC::ConstructAbility s_bundlerPluginRunSetupFunctionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_bundlerPluginRunSetupFunctionCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_bundlerPluginRunSetupFunctionCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_bundlerPluginRunSetupFunctionCodeLength = 3224;
+static const JSC::Intrinsic s_bundlerPluginRunSetupFunctionCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_bundlerPluginRunSetupFunctionCode = "(function (setup,config){\"use strict\";var onLoadPlugins=new Map,onResolvePlugins=new Map;function validate(filterObject,callback,map){if(!filterObject||!@isObject(filterObject))@throwTypeError('Expected an object with \"filter\" RegExp');if(!callback||!@isCallable(callback))@throwTypeError(\"callback must be a function\");var{filter,namespace=\"file\"}=filterObject;if(!filter)@throwTypeError('Expected an object with \"filter\" RegExp');if(!@isRegExpObject(filter))@throwTypeError(\"filter must be a RegExp\");if(namespace&&typeof namespace!==\"string\")@throwTypeError(\"namespace must be a string\");if((namespace\?.length\?\?0)===0)namespace=\"file\";if(!/^([/@a-zA-Z0-9_\\\\-]+)$/.test(namespace))@throwTypeError(\"namespace can only contain $a-zA-Z0-9_\\\\-\");var callbacks=map.@get(namespace);if(!callbacks)map.@set(namespace,[[filter,callback]]);else @arrayPush(callbacks,[filter,callback])}function onLoad(filterObject,callback){validate(filterObject,callback,onLoadPlugins)}function onResolve(filterObject,callback){validate(filterObject,callback,onResolvePlugins)}const processSetupResult=()=>{var anyOnLoad=!1,anyOnResolve=!1;for(var[namespace,callbacks]of onLoadPlugins.entries())for(var[filter]of callbacks)this.addFilter(filter,namespace,1),anyOnLoad=!0;for(var[namespace,callbacks]of onResolvePlugins.entries())for(var[filter]of callbacks)this.addFilter(filter,namespace,0),anyOnResolve=!0;if(anyOnResolve){var onResolveObject=this.onResolve;if(!onResolveObject)this.onResolve=onResolvePlugins;else for(var[namespace,callbacks]of onResolvePlugins.entries()){var existing=onResolveObject.@get(namespace);if(!existing)onResolveObject.@set(namespace,callbacks);else onResolveObject.@set(namespace,existing.concat(callbacks))}}if(anyOnLoad){var onLoadObject=this.onLoad;if(!onLoadObject)this.onLoad=onLoadPlugins;else for(var[namespace,callbacks]of onLoadPlugins.entries()){var existing=onLoadObject.@get(namespace);if(!existing)onLoadObject.@set(namespace,callbacks);else onLoadObject.@set(namespace,existing.concat(callbacks))}}return anyOnLoad||anyOnResolve};var setupResult=setup({config,onDispose:()=>@throwTypeError(\"@{@2} is not implemented yet. See https://github.com/oven-sh/bun/issues/@1\"),onEnd:()=>@throwTypeError(\"@{@2} is not implemented yet. See https://github.com/oven-sh/bun/issues/@1\"),onLoad,onResolve,onStart:()=>@throwTypeError(\"@{@2} is not implemented yet. See https://github.com/oven-sh/bun/issues/@1\"),resolve:()=>@throwTypeError(\"@{@2} is not implemented yet. See https://github.com/oven-sh/bun/issues/@1\"),initialOptions:{...config,bundle:!0,entryPoints:config.entrypoints\?\?config.entryPoints\?\?[],minify:typeof config.minify===\"boolean\"\?config.minify:!1,minifyIdentifiers:config.minify===!0||config.minify\?.identifiers,minifyWhitespace:config.minify===!0||config.minify\?.whitespace,minifySyntax:config.minify===!0||config.minify\?.syntax,outbase:config.root,platform:config.target===\"bun\"\?\"node\":config.target},esbuild:{}});if(setupResult&&@isPromise(setupResult))if(@getPromiseInternalField(setupResult,@promiseFieldFlags)&@promiseStateFulfilled)setupResult=@getPromiseInternalField(setupResult,@promiseFieldReactionsOrResult);else return setupResult.@then(processSetupResult);return processSetupResult()})\n";
+
+// runOnResolvePlugins
+const JSC::ConstructAbility s_bundlerPluginRunOnResolvePluginsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_bundlerPluginRunOnResolvePluginsCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_bundlerPluginRunOnResolvePluginsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_bundlerPluginRunOnResolvePluginsCodeLength = 2359;
+static const JSC::Intrinsic s_bundlerPluginRunOnResolvePluginsCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_bundlerPluginRunOnResolvePluginsCode = "(function (specifier,inputNamespace,importer,internalID,kindId){\"use strict\";const kind=[\"entry-point\",\"import-statement\",\"require-call\",\"dynamic-import\",\"require-resolve\",\"import-rule\",\"url-token\",\"internal\"][kindId];var promiseResult=(async(inputPath,inputNamespace2,importer2,kind2)=>{var{onResolve,onLoad}=this,results=onResolve.@get(inputNamespace2);if(!results)return this.onResolveAsync(internalID,null,null,null),null;for(let[filter,callback]of results)if(filter.test(inputPath)){var result=callback({path:inputPath,importer:importer2,namespace:inputNamespace2,kind:kind2});while(result&&@isPromise(result)&&(@getPromiseInternalField(result,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)result=@getPromiseInternalField(result,@promiseFieldReactionsOrResult);if(result&&@isPromise(result))result=await result;if(!result||!@isObject(result))continue;var{path,namespace:userNamespace=inputNamespace2,external}=result;if(typeof path!==\"string\"||typeof userNamespace!==\"string\")@throwTypeError(\"onResolve plugins must return an object with a string 'path' and string 'loader' field\");if(!path)continue;if(!userNamespace)userNamespace=inputNamespace2;if(typeof external!==\"boolean\"&&!@isUndefinedOrNull(external))@throwTypeError('onResolve plugins \"external\" field must be boolean or unspecified');if(!external){if(userNamespace===\"file\"){if(process.platform!==\"win32\"){if(path[0]!==\"/\"||path.includes(\"..\"))@throwTypeError('onResolve plugin \"path\" must be absolute when the namespace is \"file\"')}}if(userNamespace===\"dataurl\"){if(!path.startsWith(\"data:\"))@throwTypeError('onResolve plugin \"path\" must start with \"data:\" when the namespace is \"dataurl\"')}if(userNamespace&&userNamespace!==\"file\"&&(!onLoad||!onLoad.@has(userNamespace)))@throwTypeError(`Expected onLoad plugin for namespace ${userNamespace} to exist`)}return this.onResolveAsync(internalID,path,userNamespace,external),null}return this.onResolveAsync(internalID,null,null,null),null})(specifier,inputNamespace,importer,kind);while(promiseResult&&@isPromise(promiseResult)&&(@getPromiseInternalField(promiseResult,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)promiseResult=@getPromiseInternalField(promiseResult,@promiseFieldReactionsOrResult);if(promiseResult&&@isPromise(promiseResult))promiseResult.then(()=>{},(e)=>{this.addError(internalID,e,0)})})\n";
+
+// runOnLoadPlugins
+const JSC::ConstructAbility s_bundlerPluginRunOnLoadPluginsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_bundlerPluginRunOnLoadPluginsCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_bundlerPluginRunOnLoadPluginsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_bundlerPluginRunOnLoadPluginsCodeLength = 1835;
+static const JSC::Intrinsic s_bundlerPluginRunOnLoadPluginsCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_bundlerPluginRunOnLoadPluginsCode = "(function (internalID,path,namespace,defaultLoaderId){\"use strict\";const LOADERS_MAP={jsx:0,js:1,ts:2,tsx:3,css:4,file:5,json:6,toml:7,wasm:8,napi:9,base64:10,dataurl:11,text:12},loaderName=[\"jsx\",\"js\",\"ts\",\"tsx\",\"css\",\"file\",\"json\",\"toml\",\"wasm\",\"napi\",\"base64\",\"dataurl\",\"text\"][defaultLoaderId];var promiseResult=(async(internalID2,path2,namespace2,defaultLoader)=>{var results=this.onLoad.@get(namespace2);if(!results)return this.onLoadAsync(internalID2,null,null),null;for(let[filter,callback]of results)if(filter.test(path2)){var result=callback({path:path2,namespace:namespace2,loader:defaultLoader});while(result&&@isPromise(result)&&(@getPromiseInternalField(result,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)result=@getPromiseInternalField(result,@promiseFieldReactionsOrResult);if(result&&@isPromise(result))result=await result;if(!result||!@isObject(result))continue;var{contents,loader=defaultLoader}=result;if(typeof contents!==\"string\"&&!@isTypedArrayView(contents))@throwTypeError('onLoad plugins must return an object with \"contents\" as a string or Uint8Array');if(typeof loader!==\"string\")@throwTypeError('onLoad plugins must return an object with \"loader\" as a string');const chosenLoader=LOADERS_MAP[loader];if(chosenLoader===@undefined)@throwTypeError(`Loader ${loader} is not supported.`);return this.onLoadAsync(internalID2,contents,chosenLoader),null}return this.onLoadAsync(internalID2,null,null),null})(internalID,path,namespace,loaderName);while(promiseResult&&@isPromise(promiseResult)&&(@getPromiseInternalField(promiseResult,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)promiseResult=@getPromiseInternalField(promiseResult,@promiseFieldReactionsOrResult);if(promiseResult&&@isPromise(promiseResult))promiseResult.then(()=>{},(e)=>{this.addError(internalID,e,1)})})\n";
+
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
+{\
+ JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
+ return clientData->builtinFunctions().bundlerPluginBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().bundlerPluginBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+}
+WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* StreamInternals.ts */
@@ -2259,358 +2417,456 @@ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
-/* ImportMetaObject.ts */
-// loadCJS2ESM
-const JSC::ConstructAbility s_importMetaObjectLoadCJS2ESMCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_importMetaObjectLoadCJS2ESMCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_importMetaObjectLoadCJS2ESMCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_importMetaObjectLoadCJS2ESMCodeLength = 2214;
-static const JSC::Intrinsic s_importMetaObjectLoadCJS2ESMCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_importMetaObjectLoadCJS2ESMCode = "(function (resolvedSpecifier){\"use strict\";var loader=@Loader,queue=@createFIFO(),key=resolvedSpecifier;while(key){var entry=loader.registry.@get(key);if((entry\?.state\?\?0)<=@ModuleFetch)@fulfillModuleSync(key),entry=loader.registry.@get(key);var sourceCodeObject=@getPromiseInternalField(entry.fetch,@promiseFieldReactionsOrResult),moduleRecordPromise=loader.parseModule(key,sourceCodeObject),mod=entry.module;if(moduleRecordPromise&&@isPromise(moduleRecordPromise)){var reactionsOrResult=@getPromiseInternalField(moduleRecordPromise,@promiseFieldReactionsOrResult),flags=@getPromiseInternalField(moduleRecordPromise,@promiseFieldFlags),state=flags&@promiseStateMask;if(state===@promiseStatePending||reactionsOrResult&&@isPromise(reactionsOrResult))@throwTypeError(`require() async module \"${key}\" is unsupported. use \"await import()\" instead.`);else if(state===@promiseStateRejected){if(!reactionsOrResult\?.message)@throwTypeError(`${reactionsOrResult+\"\"\?reactionsOrResult:\"An error occurred\"} occurred while parsing module \\\"${key}\\\"`);throw reactionsOrResult}entry.module=mod=reactionsOrResult}else if(moduleRecordPromise&&!mod)entry.module=mod=moduleRecordPromise;@setStateToMax(entry,@ModuleLink);var dependenciesMap=mod.dependenciesMap,requestedModules=loader.requestedModules(mod),dependencies=@newArrayWithSize(requestedModules.length);for(var i=0,length=requestedModules.length;i<length;++i){var depName=requestedModules[i],depKey=depName[0]===\"/\"\?depName:loader.resolve(depName,key),depEntry=loader.ensureRegistered(depKey);if(depEntry.state<@ModuleLink)queue.push(depKey);@putByValDirect(dependencies,i,depEntry),dependenciesMap.@set(depName,depEntry)}entry.dependencies=dependencies,entry.instantiate=@Promise.@resolve(entry),entry.satisfy=@Promise.@resolve(entry),entry.isSatisfied=!0,key=queue.shift();while(key&&(loader.registry.@get(key)\?.state\?\?@ModuleFetch)>=@ModuleLink)key=queue.shift()}var linkAndEvaluateResult=loader.linkAndEvaluateModule(resolvedSpecifier,@undefined);if(linkAndEvaluateResult&&@isPromise(linkAndEvaluateResult))@throwTypeError(`require() async module \\\"${resolvedSpecifier}\\\" is unsupported. use \"await import()\" instead.`);return loader.registry.@get(resolvedSpecifier)})\n";
+/* TransformStreamDefaultController.ts */
+// initializeTransformStreamDefaultController
+const JSC::ConstructAbility s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeLength = 40;
+static const JSC::Intrinsic s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCode = "(function (){\"use strict\";return this})\n";
-// requireESM
-const JSC::ConstructAbility s_importMetaObjectRequireESMCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_importMetaObjectRequireESMCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_importMetaObjectRequireESMCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_importMetaObjectRequireESMCodeLength = 364;
-static const JSC::Intrinsic s_importMetaObjectRequireESMCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_importMetaObjectRequireESMCode = "(function (resolved){\"use strict\";var entry=@Loader.registry.@get(resolved);if(!entry||!entry.evaluated)entry=@loadCJS2ESM(resolved);if(!entry||!entry.evaluated||!entry.module)@throwTypeError(`require() failed to evaluate module \"${resolved}\". This is an internal consistentency error.`);var exports=@Loader.getModuleNamespaceObject(entry.module);return exports})\n";
+// desiredSize
+const JSC::ConstructAbility s_transformStreamDefaultControllerDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_transformStreamDefaultControllerDesiredSizeCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_transformStreamDefaultControllerDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_transformStreamDefaultControllerDesiredSizeCodeLength = 397;
+static const JSC::Intrinsic s_transformStreamDefaultControllerDesiredSizeCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_transformStreamDefaultControllerDesiredSizeCode = "(function (){\"use strict\";if(!@isTransformStreamDefaultController(this))throw @makeThisTypeError(\"TransformStreamDefaultController\",\"enqueue\");const stream=@getByIdDirectPrivate(this,\"stream\"),readable=@getByIdDirectPrivate(stream,\"readable\"),readableController=@getByIdDirectPrivate(readable,\"readableStreamController\");return @readableStreamDefaultControllerGetDesiredSize(readableController)})\n";
-// internalRequire
-const JSC::ConstructAbility s_importMetaObjectInternalRequireCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_importMetaObjectInternalRequireCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_importMetaObjectInternalRequireCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_importMetaObjectInternalRequireCodeLength = 857;
-static const JSC::Intrinsic s_importMetaObjectInternalRequireCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_importMetaObjectInternalRequireCode = "(function (id){\"use strict\";var cached=@requireMap.@get(id);const last5=id.substring(id.length-5);if(cached)return cached.exports;if(last5===\".json\"){var fs=globalThis[Symbol.for(\"_fs\")]||=@Bun.fs(),exports=JSON.parse(fs.readFileSync(id,\"utf8\"));return @requireMap.@set(id,@createCommonJSModule(id,exports,!0)),exports}else if(last5===\".node\"){const module=@createCommonJSModule(id,{},!0);return process.dlopen(module,id),@requireMap.@set(id,module),module.exports}else if(last5===\".toml\"){var fs=globalThis[Symbol.for(\"_fs\")]||=@Bun.fs(),exports=@Bun.TOML.parse(fs.readFileSync(id,\"utf8\"));return @requireMap.@set(id,@createCommonJSModule(id,exports,!0)),exports}else{var exports=@requireESM(id);const cachedModule=@requireMap.@get(id);if(cachedModule)return cachedModule.exports;return @requireMap.@set(id,@createCommonJSModule(id,exports,!0)),exports}})\n";
+// enqueue
+const JSC::ConstructAbility s_transformStreamDefaultControllerEnqueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_transformStreamDefaultControllerEnqueueCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_transformStreamDefaultControllerEnqueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_transformStreamDefaultControllerEnqueueCodeLength = 203;
+static const JSC::Intrinsic s_transformStreamDefaultControllerEnqueueCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_transformStreamDefaultControllerEnqueueCode = "(function (chunk){\"use strict\";if(!@isTransformStreamDefaultController(this))throw @makeThisTypeError(\"TransformStreamDefaultController\",\"enqueue\");@transformStreamDefaultControllerEnqueue(this,chunk)})\n";
-// createRequireCache
-const JSC::ConstructAbility s_importMetaObjectCreateRequireCacheCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_importMetaObjectCreateRequireCacheCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_importMetaObjectCreateRequireCacheCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_importMetaObjectCreateRequireCacheCodeLength = 978;
-static const JSC::Intrinsic s_importMetaObjectCreateRequireCacheCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_importMetaObjectCreateRequireCacheCode = "(function (){\"use strict\";var moduleMap=new Map,inner={};return new Proxy(inner,{get(target,key){const entry=@requireMap.@get(key);if(entry)return entry;const esm=@Loader.registry.@get(key);if(esm\?.evaluated){const namespace=@Loader.getModuleNamespaceObject(esm.module),mod=@createCommonJSModule(key,namespace,!0);return @requireMap.@set(key,mod),mod}return inner[key]},set(target,key,value){return @requireMap.@set(key,value),!0},has(target,key){return @requireMap.@has(key)||@Loader.registry.@has(key)},deleteProperty(target,key){return moduleMap.@delete(key),@requireMap.@delete(key),@Loader.registry.@delete(key),!0},ownKeys(target){var array=[...@requireMap.@keys()];const registryKeys=[...@Loader.registry.@keys()];for(let key of registryKeys)if(!array.includes(key))@arrayPush(array,key);return array},getPrototypeOf(target){return null},getOwnPropertyDescriptor(target,key){if(@requireMap.@has(key)||@Loader.registry.@has(key))return{configurable:!0,enumerable:!0}}})})\n";
+// error
+const JSC::ConstructAbility s_transformStreamDefaultControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_transformStreamDefaultControllerErrorCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_transformStreamDefaultControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_transformStreamDefaultControllerErrorCodeLength = 191;
+static const JSC::Intrinsic s_transformStreamDefaultControllerErrorCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_transformStreamDefaultControllerErrorCode = "(function (e){\"use strict\";if(!@isTransformStreamDefaultController(this))throw @makeThisTypeError(\"TransformStreamDefaultController\",\"error\");@transformStreamDefaultControllerError(this,e)})\n";
-// main
-const JSC::ConstructAbility s_importMetaObjectMainCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_importMetaObjectMainCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_importMetaObjectMainCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_importMetaObjectMainCodeLength = 76;
-static const JSC::Intrinsic s_importMetaObjectMainCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_importMetaObjectMainCode = "(function (){\"use strict\";return this.path===@Bun.main&&@Bun.isMainThread})\n";
+// terminate
+const JSC::ConstructAbility s_transformStreamDefaultControllerTerminateCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_transformStreamDefaultControllerTerminateCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_transformStreamDefaultControllerTerminateCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_transformStreamDefaultControllerTerminateCodeLength = 196;
+static const JSC::Intrinsic s_transformStreamDefaultControllerTerminateCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_transformStreamDefaultControllerTerminateCode = "(function (){\"use strict\";if(!@isTransformStreamDefaultController(this))throw @makeThisTypeError(\"TransformStreamDefaultController\",\"terminate\");@transformStreamDefaultControllerTerminate(this)})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().importMetaObjectBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().importMetaObjectBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+ return clientData->builtinFunctions().transformStreamDefaultControllerBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().transformStreamDefaultControllerBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
-WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
-/* CountQueuingStrategy.ts */
-// highWaterMark
-const JSC::ConstructAbility s_countQueuingStrategyHighWaterMarkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_countQueuingStrategyHighWaterMarkCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_countQueuingStrategyHighWaterMarkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_countQueuingStrategyHighWaterMarkCodeLength = 241;
-static const JSC::Intrinsic s_countQueuingStrategyHighWaterMarkCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_countQueuingStrategyHighWaterMarkCode = "(function (){\"use strict\";const highWaterMark=@getByIdDirectPrivate(this,\"highWaterMark\");if(highWaterMark===@undefined)@throwTypeError(\"CountQueuingStrategy.highWaterMark getter called on incompatible |this| value.\");return highWaterMark})\n";
+/* WritableStreamInternals.ts */
+// isWritableStream
+const JSC::ConstructAbility s_writableStreamInternalsIsWritableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsIsWritableStreamCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsIsWritableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsIsWritableStreamCodeLength = 109;
+static const JSC::Intrinsic s_writableStreamInternalsIsWritableStreamCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsIsWritableStreamCode = "(function (stream){\"use strict\";return @isObject(stream)&&!!@getByIdDirectPrivate(stream,\"underlyingSink\")})\n";
-// size
-const JSC::ConstructAbility s_countQueuingStrategySizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_countQueuingStrategySizeCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_countQueuingStrategySizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_countQueuingStrategySizeCodeLength = 37;
-static const JSC::Intrinsic s_countQueuingStrategySizeCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_countQueuingStrategySizeCode = "(function (){\"use strict\";return 1})\n";
+// isWritableStreamDefaultWriter
+const JSC::ConstructAbility s_writableStreamInternalsIsWritableStreamDefaultWriterCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsIsWritableStreamDefaultWriterCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsIsWritableStreamDefaultWriterCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsIsWritableStreamDefaultWriterCodeLength = 108;
+static const JSC::Intrinsic s_writableStreamInternalsIsWritableStreamDefaultWriterCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsIsWritableStreamDefaultWriterCode = "(function (writer){\"use strict\";return @isObject(writer)&&!!@getByIdDirectPrivate(writer,\"closedPromise\")})\n";
-// initializeCountQueuingStrategy
-const JSC::ConstructAbility s_countQueuingStrategyInitializeCountQueuingStrategyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_countQueuingStrategyInitializeCountQueuingStrategyCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_countQueuingStrategyInitializeCountQueuingStrategyCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_countQueuingStrategyInitializeCountQueuingStrategyCodeLength = 139;
-static const JSC::Intrinsic s_countQueuingStrategyInitializeCountQueuingStrategyCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_countQueuingStrategyInitializeCountQueuingStrategyCode = "(function (parameters){\"use strict\";@putByIdDirectPrivate(this,\"highWaterMark\",@extractHighWaterMarkFromQueuingStrategyInit(parameters))})\n";
+// acquireWritableStreamDefaultWriter
+const JSC::ConstructAbility s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeLength = 82;
+static const JSC::Intrinsic s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsAcquireWritableStreamDefaultWriterCode = "(function (stream){\"use strict\";return new @WritableStreamDefaultWriter(stream)})\n";
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
-JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
-{\
- JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().countQueuingStrategyBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().countQueuingStrategyBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
-}
-WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
-#undef DEFINE_BUILTIN_GENERATOR
+// createWritableStream
+const JSC::ConstructAbility s_writableStreamInternalsCreateWritableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsCreateWritableStreamCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsCreateWritableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsCreateWritableStreamCodeLength = 453;
+static const JSC::Intrinsic s_writableStreamInternalsCreateWritableStreamCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsCreateWritableStreamCode = "(function (startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,highWaterMark,sizeAlgorithm){\"use strict\";const internalStream={};@initializeWritableStreamSlots(internalStream,{});const controller=new @WritableStreamDefaultController;return @setUpWritableStreamDefaultController(internalStream,controller,startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,highWaterMark,sizeAlgorithm),@createWritableStreamFromInternal(internalStream)})\n";
-/* ReadableStreamBYOBRequest.ts */
-// initializeReadableStreamBYOBRequest
-const JSC::ConstructAbility s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeLength = 267;
-static const JSC::Intrinsic s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCode = "(function (controller,view){\"use strict\";if(arguments.length!==3&&arguments[2]!==@isReadableStream)@throwTypeError(\"ReadableStreamBYOBRequest constructor should not be called directly\");return @privateInitializeReadableStreamBYOBRequest.@call(this,controller,view)})\n";
+// createInternalWritableStreamFromUnderlyingSink
+const JSC::ConstructAbility s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeLength = 1388;
+static const JSC::Intrinsic s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCode = "(function (underlyingSink,strategy){\"use strict\";const stream={};if(underlyingSink===@undefined)underlyingSink={};if(strategy===@undefined)strategy={};if(!@isObject(underlyingSink))@throwTypeError(\"WritableStream constructor takes an object as first argument\");if(\"type\"in underlyingSink)@throwRangeError(\"Invalid type is specified\");const sizeAlgorithm=@extractSizeAlgorithm(strategy),highWaterMark=@extractHighWaterMark(strategy,1),underlyingSinkDict={};if(\"start\"in underlyingSink){if(underlyingSinkDict.start=underlyingSink.start,typeof underlyingSinkDict.start!==\"function\")@throwTypeError(\"underlyingSink.start should be a function\")}if(\"write\"in underlyingSink){if(underlyingSinkDict.write=underlyingSink.write,typeof underlyingSinkDict.write!==\"function\")@throwTypeError(\"underlyingSink.write should be a function\")}if(\"close\"in underlyingSink){if(underlyingSinkDict.close=underlyingSink.close,typeof underlyingSinkDict.close!==\"function\")@throwTypeError(\"underlyingSink.close should be a function\")}if(\"abort\"in underlyingSink){if(underlyingSinkDict.abort=underlyingSink.abort,typeof underlyingSinkDict.abort!==\"function\")@throwTypeError(\"underlyingSink.abort should be a function\")}return @initializeWritableStreamSlots(stream,underlyingSink),@setUpWritableStreamDefaultControllerFromUnderlyingSink(stream,underlyingSink,underlyingSinkDict,highWaterMark,sizeAlgorithm),stream})\n";
-// respond
-const JSC::ConstructAbility s_readableStreamBYOBRequestRespondCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamBYOBRequestRespondCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamBYOBRequestRespondCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamBYOBRequestRespondCodeLength = 452;
-static const JSC::Intrinsic s_readableStreamBYOBRequestRespondCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamBYOBRequestRespondCode = "(function (bytesWritten){\"use strict\";if(!@isReadableStreamBYOBRequest(this))throw @makeThisTypeError(\"ReadableStreamBYOBRequest\",\"respond\");if(@getByIdDirectPrivate(this,\"associatedReadableByteStreamController\")===@undefined)@throwTypeError(\"ReadableStreamBYOBRequest.associatedReadableByteStreamController is undefined\");return @readableByteStreamControllerRespond(@getByIdDirectPrivate(this,\"associatedReadableByteStreamController\"),bytesWritten)})\n";
+// initializeWritableStreamSlots
+const JSC::ConstructAbility s_writableStreamInternalsInitializeWritableStreamSlotsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsInitializeWritableStreamSlotsCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsInitializeWritableStreamSlotsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsInitializeWritableStreamSlotsCodeLength = 674;
+static const JSC::Intrinsic s_writableStreamInternalsInitializeWritableStreamSlotsCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsInitializeWritableStreamSlotsCode = "(function (stream,underlyingSink){\"use strict\";@putByIdDirectPrivate(stream,\"state\",\"writable\"),@putByIdDirectPrivate(stream,\"storedError\",@undefined),@putByIdDirectPrivate(stream,\"writer\",@undefined),@putByIdDirectPrivate(stream,\"controller\",@undefined),@putByIdDirectPrivate(stream,\"inFlightWriteRequest\",@undefined),@putByIdDirectPrivate(stream,\"closeRequest\",@undefined),@putByIdDirectPrivate(stream,\"inFlightCloseRequest\",@undefined),@putByIdDirectPrivate(stream,\"pendingAbortRequest\",@undefined),@putByIdDirectPrivate(stream,\"writeRequests\",@createFIFO()),@putByIdDirectPrivate(stream,\"backpressure\",!1),@putByIdDirectPrivate(stream,\"underlyingSink\",underlyingSink)})\n";
-// respondWithNewView
-const JSC::ConstructAbility s_readableStreamBYOBRequestRespondWithNewViewCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamBYOBRequestRespondWithNewViewCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamBYOBRequestRespondWithNewViewCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamBYOBRequestRespondWithNewViewCodeLength = 607;
-static const JSC::Intrinsic s_readableStreamBYOBRequestRespondWithNewViewCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamBYOBRequestRespondWithNewViewCode = "(function (view){\"use strict\";if(!@isReadableStreamBYOBRequest(this))throw @makeThisTypeError(\"ReadableStreamBYOBRequest\",\"respond\");if(@getByIdDirectPrivate(this,\"associatedReadableByteStreamController\")===@undefined)@throwTypeError(\"ReadableStreamBYOBRequest.associatedReadableByteStreamController is undefined\");if(!@isObject(view))@throwTypeError(\"Provided view is not an object\");if(!@ArrayBuffer.@isView(view))@throwTypeError(\"Provided view is not an ArrayBufferView\");return @readableByteStreamControllerRespondWithNewView(@getByIdDirectPrivate(this,\"associatedReadableByteStreamController\"),view)})\n";
+// writableStreamCloseForBindings
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamCloseForBindingsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamCloseForBindingsCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamCloseForBindingsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamCloseForBindingsCodeLength = 390;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamCloseForBindingsCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamCloseForBindingsCode = "(function (stream){\"use strict\";if(@isWritableStreamLocked(stream))return @Promise.@reject(@makeTypeError(\"WritableStream.close method can only be used on non locked WritableStream\"));if(@writableStreamCloseQueuedOrInFlight(stream))return @Promise.@reject(@makeTypeError(\"WritableStream.close method can only be used on a being close WritableStream\"));return @writableStreamClose(stream)})\n";
-// view
-const JSC::ConstructAbility s_readableStreamBYOBRequestViewCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamBYOBRequestViewCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamBYOBRequestViewCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamBYOBRequestViewCodeLength = 172;
-static const JSC::Intrinsic s_readableStreamBYOBRequestViewCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamBYOBRequestViewCode = "(function (){\"use strict\";if(!@isReadableStreamBYOBRequest(this))throw @makeGetterTypeError(\"ReadableStreamBYOBRequest\",\"view\");return @getByIdDirectPrivate(this,\"view\")})\n";
+// writableStreamAbortForBindings
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamAbortForBindingsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamAbortForBindingsCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamAbortForBindingsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamAbortForBindingsCodeLength = 236;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamAbortForBindingsCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamAbortForBindingsCode = "(function (stream,reason){\"use strict\";if(@isWritableStreamLocked(stream))return @Promise.@reject(@makeTypeError(\"WritableStream.abort method can only be used on non locked WritableStream\"));return @writableStreamAbort(stream,reason)})\n";
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
-JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
-{\
- JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().readableStreamBYOBRequestBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().readableStreamBYOBRequestBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
-}
-WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
-#undef DEFINE_BUILTIN_GENERATOR
+// isWritableStreamLocked
+const JSC::ConstructAbility s_writableStreamInternalsIsWritableStreamLockedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsIsWritableStreamLockedCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsIsWritableStreamLockedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsIsWritableStreamLockedCodeLength = 93;
+static const JSC::Intrinsic s_writableStreamInternalsIsWritableStreamLockedCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsIsWritableStreamLockedCode = "(function (stream){\"use strict\";return @getByIdDirectPrivate(stream,\"writer\")!==@undefined})\n";
-/* WritableStreamDefaultWriter.ts */
-// initializeWritableStreamDefaultWriter
-const JSC::ConstructAbility s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeLength = 301;
-static const JSC::Intrinsic s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCode = "(function (stream){\"use strict\";const internalStream=@getInternalWritableStream(stream);if(internalStream)stream=internalStream;if(!@isWritableStream(stream))@throwTypeError(\"WritableStreamDefaultWriter constructor takes a WritableStream\");return @setUpWritableStreamDefaultWriter(this,stream),this})\n";
+// setUpWritableStreamDefaultWriter
+const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeLength = 1249;
+static const JSC::Intrinsic s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsSetUpWritableStreamDefaultWriterCode = "(function (writer,stream){\"use strict\";if(@isWritableStreamLocked(stream))@throwTypeError(\"WritableStream is locked\");@putByIdDirectPrivate(writer,\"stream\",stream),@putByIdDirectPrivate(stream,\"writer\",writer);const readyPromiseCapability=@newPromiseCapability(@Promise),closedPromiseCapability=@newPromiseCapability(@Promise);@putByIdDirectPrivate(writer,\"readyPromise\",readyPromiseCapability),@putByIdDirectPrivate(writer,\"closedPromise\",closedPromiseCapability);const state=@getByIdDirectPrivate(stream,\"state\");if(state===\"writable\"){if(@writableStreamCloseQueuedOrInFlight(stream)||!@getByIdDirectPrivate(stream,\"backpressure\"))readyPromiseCapability.resolve.@call()}else if(state===\"erroring\")readyPromiseCapability.reject.@call(@undefined,@getByIdDirectPrivate(stream,\"storedError\")),@markPromiseAsHandled(readyPromiseCapability.promise);else if(state===\"closed\")readyPromiseCapability.resolve.@call(),closedPromiseCapability.resolve.@call();else{const storedError=@getByIdDirectPrivate(stream,\"storedError\");readyPromiseCapability.reject.@call(@undefined,storedError),@markPromiseAsHandled(readyPromiseCapability.promise),closedPromiseCapability.reject.@call(@undefined,storedError),@markPromiseAsHandled(closedPromiseCapability.promise)}})\n";
-// closed
-const JSC::ConstructAbility s_writableStreamDefaultWriterClosedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamDefaultWriterClosedCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamDefaultWriterClosedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamDefaultWriterClosedCodeLength = 214;
-static const JSC::Intrinsic s_writableStreamDefaultWriterClosedCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamDefaultWriterClosedCode = "(function (){\"use strict\";if(!@isWritableStreamDefaultWriter(this))return @Promise.@reject(@makeGetterTypeError(\"WritableStreamDefaultWriter\",\"closed\"));return @getByIdDirectPrivate(this,\"closedPromise\").promise})\n";
+// writableStreamAbort
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamAbortCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamAbortCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamAbortCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamAbortCodeLength = 679;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamAbortCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamAbortCode = "(function (stream,reason){\"use strict\";const state=@getByIdDirectPrivate(stream,\"state\");if(state===\"closed\"||state===\"errored\")return @Promise.@resolve();const pendingAbortRequest=@getByIdDirectPrivate(stream,\"pendingAbortRequest\");if(pendingAbortRequest!==@undefined)return pendingAbortRequest.promise.promise;let wasAlreadyErroring=!1;if(state===\"erroring\")wasAlreadyErroring=!0,reason=@undefined;const abortPromiseCapability=@newPromiseCapability(@Promise);if(@putByIdDirectPrivate(stream,\"pendingAbortRequest\",{promise:abortPromiseCapability,reason,wasAlreadyErroring}),!wasAlreadyErroring)@writableStreamStartErroring(stream,reason);return abortPromiseCapability.promise})\n";
-// desiredSize
-const JSC::ConstructAbility s_writableStreamDefaultWriterDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamDefaultWriterDesiredSizeCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamDefaultWriterDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamDefaultWriterDesiredSizeCodeLength = 309;
-static const JSC::Intrinsic s_writableStreamDefaultWriterDesiredSizeCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamDefaultWriterDesiredSizeCode = "(function (){\"use strict\";if(!@isWritableStreamDefaultWriter(this))throw @makeThisTypeError(\"WritableStreamDefaultWriter\",\"desiredSize\");if(@getByIdDirectPrivate(this,\"stream\")===@undefined)@throwTypeError(\"WritableStreamDefaultWriter has no stream\");return @writableStreamDefaultWriterGetDesiredSize(this)})\n";
+// writableStreamClose
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamCloseCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamCloseCodeLength = 674;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamCloseCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamCloseCode = "(function (stream){\"use strict\";const state=@getByIdDirectPrivate(stream,\"state\");if(state===\"closed\"||state===\"errored\")return @Promise.@reject(@makeTypeError(\"Cannot close a writable stream that is closed or errored\"));const closePromiseCapability=@newPromiseCapability(@Promise);@putByIdDirectPrivate(stream,\"closeRequest\",closePromiseCapability);const writer=@getByIdDirectPrivate(stream,\"writer\");if(writer!==@undefined&&@getByIdDirectPrivate(stream,\"backpressure\")&&state===\"writable\")@getByIdDirectPrivate(writer,\"readyPromise\").resolve.@call();return @writableStreamDefaultControllerClose(@getByIdDirectPrivate(stream,\"controller\")),closePromiseCapability.promise})\n";
-// ready
-const JSC::ConstructAbility s_writableStreamDefaultWriterReadyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamDefaultWriterReadyCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamDefaultWriterReadyCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamDefaultWriterReadyCodeLength = 210;
-static const JSC::Intrinsic s_writableStreamDefaultWriterReadyCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamDefaultWriterReadyCode = "(function (){\"use strict\";if(!@isWritableStreamDefaultWriter(this))return @Promise.@reject(@makeThisTypeError(\"WritableStreamDefaultWriter\",\"ready\"));return @getByIdDirectPrivate(this,\"readyPromise\").promise})\n";
+// writableStreamAddWriteRequest
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamAddWriteRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamAddWriteRequestCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamAddWriteRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamAddWriteRequestCodeLength = 208;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamAddWriteRequestCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamAddWriteRequestCode = "(function (stream){\"use strict\";const writePromiseCapability=@newPromiseCapability(@Promise);return @getByIdDirectPrivate(stream,\"writeRequests\").push(writePromiseCapability),writePromiseCapability.promise})\n";
-// abort
-const JSC::ConstructAbility s_writableStreamDefaultWriterAbortCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamDefaultWriterAbortCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamDefaultWriterAbortCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamDefaultWriterAbortCodeLength = 350;
-static const JSC::Intrinsic s_writableStreamDefaultWriterAbortCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamDefaultWriterAbortCode = "(function (reason){\"use strict\";if(!@isWritableStreamDefaultWriter(this))return @Promise.@reject(@makeThisTypeError(\"WritableStreamDefaultWriter\",\"abort\"));if(@getByIdDirectPrivate(this,\"stream\")===@undefined)return @Promise.@reject(@makeTypeError(\"WritableStreamDefaultWriter has no stream\"));return @writableStreamDefaultWriterAbort(this,reason)})\n";
+// writableStreamCloseQueuedOrInFlight
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeLength = 166;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCode = "(function (stream){\"use strict\";return @getByIdDirectPrivate(stream,\"closeRequest\")!==@undefined||@getByIdDirectPrivate(stream,\"inFlightCloseRequest\")!==@undefined})\n";
-// close
-const JSC::ConstructAbility s_writableStreamDefaultWriterCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamDefaultWriterCloseCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamDefaultWriterCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamDefaultWriterCloseCodeLength = 492;
-static const JSC::Intrinsic s_writableStreamDefaultWriterCloseCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamDefaultWriterCloseCode = "(function (){\"use strict\";if(!@isWritableStreamDefaultWriter(this))return @Promise.@reject(@makeThisTypeError(\"WritableStreamDefaultWriter\",\"close\"));const stream=@getByIdDirectPrivate(this,\"stream\");if(stream===@undefined)return @Promise.@reject(@makeTypeError(\"WritableStreamDefaultWriter has no stream\"));if(@writableStreamCloseQueuedOrInFlight(stream))return @Promise.@reject(@makeTypeError(\"WritableStreamDefaultWriter is being closed\"));return @writableStreamDefaultWriterClose(this)})\n";
+// writableStreamDealWithRejection
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDealWithRejectionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDealWithRejectionCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDealWithRejectionCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDealWithRejectionCodeLength = 183;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDealWithRejectionCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDealWithRejectionCode = "(function (stream,error){\"use strict\";if(@getByIdDirectPrivate(stream,\"state\")===\"writable\"){@writableStreamStartErroring(stream,error);return}@writableStreamFinishErroring(stream)})\n";
-// releaseLock
-const JSC::ConstructAbility s_writableStreamDefaultWriterReleaseLockCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamDefaultWriterReleaseLockCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamDefaultWriterReleaseLockCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamDefaultWriterReleaseLockCodeLength = 241;
-static const JSC::Intrinsic s_writableStreamDefaultWriterReleaseLockCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamDefaultWriterReleaseLockCode = "(function (){\"use strict\";if(!@isWritableStreamDefaultWriter(this))throw @makeThisTypeError(\"WritableStreamDefaultWriter\",\"releaseLock\");if(@getByIdDirectPrivate(this,\"stream\")===@undefined)return;@writableStreamDefaultWriterRelease(this)})\n";
+// writableStreamFinishErroring
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishErroringCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishErroringCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishErroringCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamFinishErroringCodeLength = 1193;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishErroringCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamFinishErroringCode = "(function (stream){\"use strict\";@putByIdDirectPrivate(stream,\"state\",\"errored\");const controller=@getByIdDirectPrivate(stream,\"controller\");@getByIdDirectPrivate(controller,\"errorSteps\").@call();const storedError=@getByIdDirectPrivate(stream,\"storedError\"),requests=@getByIdDirectPrivate(stream,\"writeRequests\");for(var request=requests.shift();request;request=requests.shift())request.reject.@call(@undefined,storedError);@putByIdDirectPrivate(stream,\"writeRequests\",@createFIFO());const abortRequest=@getByIdDirectPrivate(stream,\"pendingAbortRequest\");if(abortRequest===@undefined){@writableStreamRejectCloseAndClosedPromiseIfNeeded(stream);return}if(@putByIdDirectPrivate(stream,\"pendingAbortRequest\",@undefined),abortRequest.wasAlreadyErroring){abortRequest.promise.reject.@call(@undefined,storedError),@writableStreamRejectCloseAndClosedPromiseIfNeeded(stream);return}@getByIdDirectPrivate(controller,\"abortSteps\").@call(@undefined,abortRequest.reason).@then(()=>{abortRequest.promise.resolve.@call(),@writableStreamRejectCloseAndClosedPromiseIfNeeded(stream)},(reason)=>{abortRequest.promise.reject.@call(@undefined,reason),@writableStreamRejectCloseAndClosedPromiseIfNeeded(stream)})})\n";
-// write
-const JSC::ConstructAbility s_writableStreamDefaultWriterWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamDefaultWriterWriteCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamDefaultWriterWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamDefaultWriterWriteCodeLength = 348;
-static const JSC::Intrinsic s_writableStreamDefaultWriterWriteCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamDefaultWriterWriteCode = "(function (chunk){\"use strict\";if(!@isWritableStreamDefaultWriter(this))return @Promise.@reject(@makeThisTypeError(\"WritableStreamDefaultWriter\",\"write\"));if(@getByIdDirectPrivate(this,\"stream\")===@undefined)return @Promise.@reject(@makeTypeError(\"WritableStreamDefaultWriter has no stream\"));return @writableStreamDefaultWriterWrite(this,chunk)})\n";
+// writableStreamFinishInFlightClose
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeLength = 661;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamFinishInFlightCloseCode = "(function (stream){\"use strict\";if(@getByIdDirectPrivate(stream,\"inFlightCloseRequest\").resolve.@call(),@putByIdDirectPrivate(stream,\"inFlightCloseRequest\",@undefined),@getByIdDirectPrivate(stream,\"state\")===\"erroring\"){@putByIdDirectPrivate(stream,\"storedError\",@undefined);const abortRequest=@getByIdDirectPrivate(stream,\"pendingAbortRequest\");if(abortRequest!==@undefined)abortRequest.promise.resolve.@call(),@putByIdDirectPrivate(stream,\"pendingAbortRequest\",@undefined)}@putByIdDirectPrivate(stream,\"state\",\"closed\");const writer=@getByIdDirectPrivate(stream,\"writer\");if(writer!==@undefined)@getByIdDirectPrivate(writer,\"closedPromise\").resolve.@call()})\n";
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
-JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
-{\
- JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().writableStreamDefaultWriterBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().writableStreamDefaultWriterBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
-}
-WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
-#undef DEFINE_BUILTIN_GENERATOR
+// writableStreamFinishInFlightCloseWithError
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeLength = 494;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCode = "(function (stream,error){\"use strict\";@getByIdDirectPrivate(stream,\"inFlightCloseRequest\").reject.@call(@undefined,error),@putByIdDirectPrivate(stream,\"inFlightCloseRequest\",@undefined);const state=@getByIdDirectPrivate(stream,\"state\"),abortRequest=@getByIdDirectPrivate(stream,\"pendingAbortRequest\");if(abortRequest!==@undefined)abortRequest.promise.reject.@call(@undefined,error),@putByIdDirectPrivate(stream,\"pendingAbortRequest\",@undefined);@writableStreamDealWithRejection(stream,error)})\n";
-/* ReadableStream.ts */
-// initializeReadableStream
-const JSC::ConstructAbility s_readableStreamInitializeReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamInitializeReadableStreamCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamInitializeReadableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamInitializeReadableStreamCodeLength = 2702;
-static const JSC::Intrinsic s_readableStreamInitializeReadableStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInitializeReadableStreamCode = "(function (underlyingSource,strategy){\"use strict\";if(underlyingSource===@undefined)underlyingSource={@bunNativeType:0,@bunNativePtr:0,@lazy:!1};if(strategy===@undefined)strategy={};if(!@isObject(underlyingSource))@throwTypeError(\"ReadableStream constructor takes an object as first argument\");if(strategy!==@undefined&&!@isObject(strategy))@throwTypeError(\"ReadableStream constructor takes an object as second argument, if any\");@putByIdDirectPrivate(this,\"state\",@streamReadable),@putByIdDirectPrivate(this,\"reader\",@undefined),@putByIdDirectPrivate(this,\"storedError\",@undefined),@putByIdDirectPrivate(this,\"disturbed\",!1),@putByIdDirectPrivate(this,\"readableStreamController\",null),@putByIdDirectPrivate(this,\"bunNativeType\",@getByIdDirectPrivate(underlyingSource,\"bunNativeType\")\?\?0),@putByIdDirectPrivate(this,\"bunNativePtr\",@getByIdDirectPrivate(underlyingSource,\"bunNativePtr\")\?\?0),@putByIdDirectPrivate(this,\"asyncContext\",@getInternalField(@asyncContext,0));const isDirect=underlyingSource.type===\"direct\",isUnderlyingSourceLazy=!!underlyingSource.@lazy,isLazy=isDirect||isUnderlyingSourceLazy;if(@getByIdDirectPrivate(underlyingSource,\"pull\")!==@undefined&&!isLazy){const size=@getByIdDirectPrivate(strategy,\"size\"),highWaterMark=@getByIdDirectPrivate(strategy,\"highWaterMark\");return @putByIdDirectPrivate(this,\"highWaterMark\",highWaterMark),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@setupReadableStreamDefaultController(this,underlyingSource,size,highWaterMark!==@undefined\?highWaterMark:1,@getByIdDirectPrivate(underlyingSource,\"start\"),@getByIdDirectPrivate(underlyingSource,\"pull\"),@getByIdDirectPrivate(underlyingSource,\"cancel\")),this}if(isDirect)@putByIdDirectPrivate(this,\"underlyingSource\",underlyingSource),@putByIdDirectPrivate(this,\"highWaterMark\",@getByIdDirectPrivate(strategy,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",()=>@createReadableStreamController(this,underlyingSource,strategy));else if(isLazy){const autoAllocateChunkSize=underlyingSource.autoAllocateChunkSize;@putByIdDirectPrivate(this,\"highWaterMark\",@undefined),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"highWaterMark\",autoAllocateChunkSize||@getByIdDirectPrivate(strategy,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",()=>{const instance=@lazyLoadStream(this,autoAllocateChunkSize);if(instance)@createReadableStreamController(this,instance,strategy)})}else @putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"highWaterMark\",@getByIdDirectPrivate(strategy,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",@undefined),@createReadableStreamController(this,underlyingSource,strategy);return this})\n";
+// writableStreamFinishInFlightWrite
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeLength = 167;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamFinishInFlightWriteCode = "(function (stream){\"use strict\";@getByIdDirectPrivate(stream,\"inFlightWriteRequest\").resolve.@call(),@putByIdDirectPrivate(stream,\"inFlightWriteRequest\",@undefined)})\n";
-// readableStreamToArray
-const JSC::ConstructAbility s_readableStreamReadableStreamToArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamReadableStreamToArrayCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamReadableStreamToArrayCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
-const int s_readableStreamReadableStreamToArrayCodeLength = 238;
-static const JSC::Intrinsic s_readableStreamReadableStreamToArrayCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamReadableStreamToArrayCode = "(function (stream){\"use strict\";var underlyingSource=@getByIdDirectPrivate(stream,\"underlyingSource\");if(underlyingSource!==@undefined)return @readableStreamToArrayDirect(stream,underlyingSource);return @readableStreamIntoArray(stream)})\n";
+// writableStreamFinishInFlightWriteWithError
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeLength = 285;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCode = "(function (stream,error){\"use strict\";@getByIdDirectPrivate(stream,\"inFlightWriteRequest\").reject.@call(@undefined,error),@putByIdDirectPrivate(stream,\"inFlightWriteRequest\",@undefined);const state=@getByIdDirectPrivate(stream,\"state\");@writableStreamDealWithRejection(stream,error)})\n";
-// readableStreamToText
-const JSC::ConstructAbility s_readableStreamReadableStreamToTextCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamReadableStreamToTextCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamReadableStreamToTextCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
-const int s_readableStreamReadableStreamToTextCodeLength = 236;
-static const JSC::Intrinsic s_readableStreamReadableStreamToTextCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamReadableStreamToTextCode = "(function (stream){\"use strict\";var underlyingSource=@getByIdDirectPrivate(stream,\"underlyingSource\");if(underlyingSource!==@undefined)return @readableStreamToTextDirect(stream,underlyingSource);return @readableStreamIntoText(stream)})\n";
+// writableStreamHasOperationMarkedInFlight
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeLength = 174;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCode = "(function (stream){\"use strict\";return @getByIdDirectPrivate(stream,\"inFlightWriteRequest\")!==@undefined||@getByIdDirectPrivate(stream,\"inFlightCloseRequest\")!==@undefined})\n";
-// readableStreamToArrayBuffer
-const JSC::ConstructAbility s_readableStreamReadableStreamToArrayBufferCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamReadableStreamToArrayBufferCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamReadableStreamToArrayBufferCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
-const int s_readableStreamReadableStreamToArrayBufferCodeLength = 355;
-static const JSC::Intrinsic s_readableStreamReadableStreamToArrayBufferCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamReadableStreamToArrayBufferCode = "(function (stream){\"use strict\";var underlyingSource=@getByIdDirectPrivate(stream,\"underlyingSource\");if(underlyingSource!==@undefined)return @readableStreamToArrayBufferDirect(stream,underlyingSource);var result=@Bun.readableStreamToArray(stream);if(@isPromise(result))return result.then(@Bun.concatArrayBuffers);return @Bun.concatArrayBuffers(result)})\n";
+// writableStreamMarkCloseRequestInFlight
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeLength = 220;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCode = "(function (stream){\"use strict\";const closeRequest=@getByIdDirectPrivate(stream,\"closeRequest\");@putByIdDirectPrivate(stream,\"inFlightCloseRequest\",closeRequest),@putByIdDirectPrivate(stream,\"closeRequest\",@undefined)})\n";
-// readableStreamToFormData
-const JSC::ConstructAbility s_readableStreamReadableStreamToFormDataCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamReadableStreamToFormDataCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamReadableStreamToFormDataCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
-const int s_readableStreamReadableStreamToFormDataCodeLength = 142;
-static const JSC::Intrinsic s_readableStreamReadableStreamToFormDataCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamReadableStreamToFormDataCode = "(function (stream,contentType){\"use strict\";return @Bun.readableStreamToBlob(stream).then((blob)=>{return FormData.from(blob,contentType)})})\n";
+// writableStreamMarkFirstWriteRequestInFlight
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeLength = 173;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCode = "(function (stream){\"use strict\";const writeRequest=@getByIdDirectPrivate(stream,\"writeRequests\").shift();@putByIdDirectPrivate(stream,\"inFlightWriteRequest\",writeRequest)})\n";
-// readableStreamToJSON
-const JSC::ConstructAbility s_readableStreamReadableStreamToJSONCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamReadableStreamToJSONCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamReadableStreamToJSONCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
-const int s_readableStreamReadableStreamToJSONCodeLength = 104;
-static const JSC::Intrinsic s_readableStreamReadableStreamToJSONCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamReadableStreamToJSONCode = "(function (stream){\"use strict\";return @Bun.readableStreamToText(stream).@then(globalThis.JSON.parse)})\n";
+// writableStreamRejectCloseAndClosedPromiseIfNeeded
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeLength = 528;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCode = "(function (stream){\"use strict\";const storedError=@getByIdDirectPrivate(stream,\"storedError\"),closeRequest=@getByIdDirectPrivate(stream,\"closeRequest\");if(closeRequest!==@undefined)closeRequest.reject.@call(@undefined,storedError),@putByIdDirectPrivate(stream,\"closeRequest\",@undefined);const writer=@getByIdDirectPrivate(stream,\"writer\");if(writer!==@undefined){const closedPromise=@getByIdDirectPrivate(writer,\"closedPromise\");closedPromise.reject.@call(@undefined,storedError),@markPromiseAsHandled(closedPromise.promise)}})\n";
-// readableStreamToBlob
-const JSC::ConstructAbility s_readableStreamReadableStreamToBlobCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamReadableStreamToBlobCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamReadableStreamToBlobCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
-const int s_readableStreamReadableStreamToBlobCodeLength = 126;
-static const JSC::Intrinsic s_readableStreamReadableStreamToBlobCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamReadableStreamToBlobCode = "(function (stream){\"use strict\";return @Promise.resolve(@Bun.readableStreamToArray(stream)).@then((array)=>new Blob(array))})\n";
+// writableStreamStartErroring
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamStartErroringCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamStartErroringCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamStartErroringCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamStartErroringCodeLength = 487;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamStartErroringCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamStartErroringCode = "(function (stream,reason){\"use strict\";const controller=@getByIdDirectPrivate(stream,\"controller\");@putByIdDirectPrivate(stream,\"state\",\"erroring\"),@putByIdDirectPrivate(stream,\"storedError\",reason);const writer=@getByIdDirectPrivate(stream,\"writer\");if(writer!==@undefined)@writableStreamDefaultWriterEnsureReadyPromiseRejected(writer,reason);if(!@writableStreamHasOperationMarkedInFlight(stream)&&@getByIdDirectPrivate(controller,\"started\")===1)@writableStreamFinishErroring(stream)})\n";
-// consumeReadableStream
-const JSC::ConstructAbility s_readableStreamConsumeReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamConsumeReadableStreamCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamConsumeReadableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
-const int s_readableStreamConsumeReadableStreamCodeLength = 2131;
-static const JSC::Intrinsic s_readableStreamConsumeReadableStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamConsumeReadableStreamCode = "(function (nativePtr,nativeType,inputStream){\"use strict\";const symbol=globalThis.Symbol.for(\"Bun.consumeReadableStreamPrototype\");var cached=globalThis[symbol];if(!cached)cached=globalThis[symbol]=[];var Prototype=cached[nativeType];if(Prototype===@undefined){var[doRead,doError,doReadMany,doClose,onClose,deinit]=globalThis[globalThis.Symbol.for('Bun.lazy')](nativeType);Prototype=class NativeReadableStreamSink{handleError;handleClosed;processResult;constructor(reader,ptr){this.#ptr=ptr,this.#reader=reader,this.#didClose=!1,this.handleError=this._handleError.bind(this),this.handleClosed=this._handleClosed.bind(this),this.processResult=this._processResult.bind(this),reader.closed.then(this.handleClosed,this.handleError)}_handleClosed(){if(this.#didClose)return;this.#didClose=!0;var ptr=this.#ptr;this.#ptr=0,doClose(ptr),deinit(ptr)}_handleError(error){if(this.#didClose)return;this.#didClose=!0;var ptr=this.#ptr;this.#ptr=0,doError(ptr,error),deinit(ptr)}#ptr;#didClose=!1;#reader;_handleReadMany({value,done,size}){if(done){this.handleClosed();return}if(this.#didClose)return;doReadMany(this.#ptr,value,done,size)}read(){if(!this.#ptr)return @throwTypeError(\"ReadableStreamSink is already closed\");return this.processResult(this.#reader.read())}_processResult(result){if(result&&@isPromise(result)){if(@getPromiseInternalField(result,@promiseFieldFlags)&@promiseStateFulfilled){const fulfilledValue=@getPromiseInternalField(result,@promiseFieldReactionsOrResult);if(fulfilledValue)result=fulfilledValue}}if(result&&@isPromise(result))return result.then(this.processResult,this.handleError),null;if(result.done)return this.handleClosed(),0;else if(result.value)return result.value;else return-1}readMany(){if(!this.#ptr)return @throwTypeError(\"ReadableStreamSink is already closed\");return this.processResult(this.#reader.readMany())}};const minlength=nativeType+1;if(cached.length<minlength)cached.length=minlength;@putByValDirect(cached,nativeType,Prototype)}if(@isReadableStreamLocked(inputStream))@throwTypeError(\"Cannot start reading from a locked stream\");return new Prototype(inputStream.getReader(),nativePtr)})\n";
+// writableStreamUpdateBackpressure
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamUpdateBackpressureCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamUpdateBackpressureCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamUpdateBackpressureCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamUpdateBackpressureCodeLength = 400;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamUpdateBackpressureCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamUpdateBackpressureCode = "(function (stream,backpressure){\"use strict\";const writer=@getByIdDirectPrivate(stream,\"writer\");if(writer!==@undefined&&backpressure!==@getByIdDirectPrivate(stream,\"backpressure\"))if(backpressure)@putByIdDirectPrivate(writer,\"readyPromise\",@newPromiseCapability(@Promise));else @getByIdDirectPrivate(writer,\"readyPromise\").resolve.@call();@putByIdDirectPrivate(stream,\"backpressure\",backpressure)})\n";
-// createEmptyReadableStream
-const JSC::ConstructAbility s_readableStreamCreateEmptyReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamCreateEmptyReadableStreamCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamCreateEmptyReadableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
-const int s_readableStreamCreateEmptyReadableStreamCodeLength = 114;
-static const JSC::Intrinsic s_readableStreamCreateEmptyReadableStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamCreateEmptyReadableStreamCode = "(function (){\"use strict\";var stream=new @ReadableStream({pull(){}});return @readableStreamClose(stream),stream})\n";
+// writableStreamDefaultWriterAbort
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeLength = 136;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultWriterAbortCode = "(function (writer,reason){\"use strict\";const stream=@getByIdDirectPrivate(writer,\"stream\");return @writableStreamAbort(stream,reason)})\n";
-// createNativeReadableStream
-const JSC::ConstructAbility s_readableStreamCreateNativeReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamCreateNativeReadableStreamCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamCreateNativeReadableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
-const int s_readableStreamCreateNativeReadableStreamCodeLength = 181;
-static const JSC::Intrinsic s_readableStreamCreateNativeReadableStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamCreateNativeReadableStreamCode = "(function (nativePtr,nativeType,autoAllocateChunkSize){\"use strict\";return new @ReadableStream({@lazy:!0,@bunNativeType:nativeType,@bunNativePtr:nativePtr,autoAllocateChunkSize})})\n";
+// writableStreamDefaultWriterClose
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeLength = 122;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultWriterCloseCode = "(function (writer){\"use strict\";const stream=@getByIdDirectPrivate(writer,\"stream\");return @writableStreamClose(stream)})\n";
-// cancel
-const JSC::ConstructAbility s_readableStreamCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamCancelCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamCancelCodeLength = 276;
-static const JSC::Intrinsic s_readableStreamCancelCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamCancelCode = "(function (reason){\"use strict\";if(!@isReadableStream(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStream\",\"cancel\"));if(@isReadableStreamLocked(this))return @Promise.@reject(@makeTypeError(\"ReadableStream is locked\"));return @readableStreamCancel(this,reason)})\n";
+// writableStreamDefaultWriterCloseWithErrorPropagation
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeLength = 362;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCode = "(function (writer){\"use strict\";const stream=@getByIdDirectPrivate(writer,\"stream\"),state=@getByIdDirectPrivate(stream,\"state\");if(@writableStreamCloseQueuedOrInFlight(stream)||state===\"closed\")return @Promise.@resolve();if(state===\"errored\")return @Promise.@reject(@getByIdDirectPrivate(stream,\"storedError\"));return @writableStreamDefaultWriterClose(writer)})\n";
-// getReader
-const JSC::ConstructAbility s_readableStreamGetReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamGetReaderCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamGetReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamGetReaderCodeLength = 506;
-static const JSC::Intrinsic s_readableStreamGetReaderCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamGetReaderCode = "(function (options){\"use strict\";if(!@isReadableStream(this))throw @makeThisTypeError(\"ReadableStream\",\"getReader\");const mode=@toDictionary(options,{},\"ReadableStream.getReader takes an object as first argument\").mode;if(mode===@undefined){var start_=@getByIdDirectPrivate(this,\"start\");if(start_)@putByIdDirectPrivate(this,\"start\",@undefined),start_();return new @ReadableStreamDefaultReader(this)}if(mode==\"byob\")return new @ReadableStreamBYOBReader(this);@throwTypeError(\"Invalid mode is specified\")})\n";
+// writableStreamDefaultWriterEnsureClosedPromiseRejected
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeLength = 529;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCode = "(function (writer,error){\"use strict\";let closedPromiseCapability=@getByIdDirectPrivate(writer,\"closedPromise\"),closedPromise=closedPromiseCapability.promise;if((@getPromiseInternalField(closedPromise,@promiseFieldFlags)&@promiseStateMask)!==@promiseStatePending)closedPromiseCapability=@newPromiseCapability(@Promise),closedPromise=closedPromiseCapability.promise,@putByIdDirectPrivate(writer,\"closedPromise\",closedPromiseCapability);closedPromiseCapability.reject.@call(@undefined,error),@markPromiseAsHandled(closedPromise)})\n";
-// pipeThrough
-const JSC::ConstructAbility s_readableStreamPipeThroughCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamPipeThroughCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamPipeThroughCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamPipeThroughCodeLength = 1162;
-static const JSC::Intrinsic s_readableStreamPipeThroughCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamPipeThroughCode = "(function (streams,options){\"use strict\";const transforms=streams,readable=transforms.readable;if(!@isReadableStream(readable))throw @makeTypeError(\"readable should be ReadableStream\");const writable=transforms.writable,internalWritable=@getInternalWritableStream(writable);if(!@isWritableStream(internalWritable))throw @makeTypeError(\"writable should be WritableStream\");let preventClose=!1,preventAbort=!1,preventCancel=!1,signal;if(!@isUndefinedOrNull(options)){if(!@isObject(options))throw @makeTypeError(\"options must be an object\");if(preventAbort=!!options.preventAbort,preventCancel=!!options.preventCancel,preventClose=!!options.preventClose,signal=options.signal,signal!==@undefined&&!@isAbortSignal(signal))throw @makeTypeError(\"options.signal must be AbortSignal\")}if(!@isReadableStream(this))throw @makeThisTypeError(\"ReadableStream\",\"pipeThrough\");if(@isReadableStreamLocked(this))throw @makeTypeError(\"ReadableStream is locked\");if(@isWritableStreamLocked(internalWritable))throw @makeTypeError(\"WritableStream is locked\");return @readableStreamPipeToWritableStream(this,internalWritable,preventClose,preventAbort,preventCancel,signal),readable})\n";
+// writableStreamDefaultWriterEnsureReadyPromiseRejected
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeLength = 517;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCode = "(function (writer,error){\"use strict\";let readyPromiseCapability=@getByIdDirectPrivate(writer,\"readyPromise\"),readyPromise=readyPromiseCapability.promise;if((@getPromiseInternalField(readyPromise,@promiseFieldFlags)&@promiseStateMask)!==@promiseStatePending)readyPromiseCapability=@newPromiseCapability(@Promise),readyPromise=readyPromiseCapability.promise,@putByIdDirectPrivate(writer,\"readyPromise\",readyPromiseCapability);readyPromiseCapability.reject.@call(@undefined,error),@markPromiseAsHandled(readyPromise)})\n";
-// pipeTo
-const JSC::ConstructAbility s_readableStreamPipeToCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamPipeToCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamPipeToCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamPipeToCodeLength = 1175;
-static const JSC::Intrinsic s_readableStreamPipeToCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamPipeToCode = "(function (destination){\"use strict\";if(!@isReadableStream(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStream\",\"pipeTo\"));if(@isReadableStreamLocked(this))return @Promise.@reject(@makeTypeError(\"ReadableStream is locked\"));let options=@argument(1),preventClose=!1,preventAbort=!1,preventCancel=!1,signal;if(!@isUndefinedOrNull(options)){if(!@isObject(options))return @Promise.@reject(@makeTypeError(\"options must be an object\"));try{preventAbort=!!options.preventAbort,preventCancel=!!options.preventCancel,preventClose=!!options.preventClose,signal=options.signal}catch(e){return @Promise.@reject(e)}if(signal!==@undefined&&!@isAbortSignal(signal))return @Promise.@reject(@makeTypeError(\"options.signal must be AbortSignal\"))}const internalDestination=@getInternalWritableStream(destination);if(!@isWritableStream(internalDestination))return @Promise.@reject(@makeTypeError(\"ReadableStream pipeTo requires a WritableStream\"));if(@isWritableStreamLocked(internalDestination))return @Promise.@reject(@makeTypeError(\"WritableStream is locked\"));return @readableStreamPipeToWritableStream(this,internalDestination,preventClose,preventAbort,preventCancel,signal)})\n";
+// writableStreamDefaultWriterGetDesiredSize
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeLength = 310;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCode = "(function (writer){\"use strict\";const stream=@getByIdDirectPrivate(writer,\"stream\"),state=@getByIdDirectPrivate(stream,\"state\");if(state===\"errored\"||state===\"erroring\")return null;if(state===\"closed\")return 0;return @writableStreamDefaultControllerGetDesiredSize(@getByIdDirectPrivate(stream,\"controller\"))})\n";
-// tee
-const JSC::ConstructAbility s_readableStreamTeeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamTeeCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamTeeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamTeeCodeLength = 140;
-static const JSC::Intrinsic s_readableStreamTeeCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamTeeCode = "(function (){\"use strict\";if(!@isReadableStream(this))throw @makeThisTypeError(\"ReadableStream\",\"tee\");return @readableStreamTee(this,!1)})\n";
+// writableStreamDefaultWriterRelease
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeLength = 408;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultWriterReleaseCode = "(function (writer){\"use strict\";const stream=@getByIdDirectPrivate(writer,\"stream\"),releasedError=@makeTypeError(\"writableStreamDefaultWriterRelease\");@writableStreamDefaultWriterEnsureReadyPromiseRejected(writer,releasedError),@writableStreamDefaultWriterEnsureClosedPromiseRejected(writer,releasedError),@putByIdDirectPrivate(stream,\"writer\",@undefined),@putByIdDirectPrivate(writer,\"stream\",@undefined)})\n";
-// locked
-const JSC::ConstructAbility s_readableStreamLockedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamLockedCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamLockedCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamLockedCodeLength = 147;
-static const JSC::Intrinsic s_readableStreamLockedCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamLockedCode = "(function (){\"use strict\";if(!@isReadableStream(this))throw @makeGetterTypeError(\"ReadableStream\",\"locked\");return @isReadableStreamLocked(this)})\n";
+// writableStreamDefaultWriterWrite
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeLength = 982;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultWriterWriteCode = "(function (writer,chunk){\"use strict\";const stream=@getByIdDirectPrivate(writer,\"stream\"),controller=@getByIdDirectPrivate(stream,\"controller\"),chunkSize=@writableStreamDefaultControllerGetChunkSize(controller,chunk);if(stream!==@getByIdDirectPrivate(writer,\"stream\"))return @Promise.@reject(@makeTypeError(\"writer is not stream's writer\"));const state=@getByIdDirectPrivate(stream,\"state\");if(state===\"errored\")return @Promise.@reject(@getByIdDirectPrivate(stream,\"storedError\"));if(@writableStreamCloseQueuedOrInFlight(stream)||state===\"closed\")return @Promise.@reject(@makeTypeError(\"stream is closing or closed\"));if(@writableStreamCloseQueuedOrInFlight(stream)||state===\"closed\")return @Promise.@reject(@makeTypeError(\"stream is closing or closed\"));if(state===\"erroring\")return @Promise.@reject(@getByIdDirectPrivate(stream,\"storedError\"));const promise=@writableStreamAddWriteRequest(stream);return @writableStreamDefaultControllerWrite(controller,chunk,chunkSize),promise})\n";
-// values
-const JSC::ConstructAbility s_readableStreamValuesCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamValuesCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamValuesCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamValuesCodeLength = 165;
-static const JSC::Intrinsic s_readableStreamValuesCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamValuesCode = "(function (options){\"use strict\";var prototype=@ReadableStream.prototype;return @readableStreamDefineLazyIterators(prototype),prototype.values.@call(this,options)})\n";
+// setUpWritableStreamDefaultController
+const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeLength = 921;
+static const JSC::Intrinsic s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerCode = "(function (stream,controller,startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,highWaterMark,sizeAlgorithm){\"use strict\";@putByIdDirectPrivate(controller,\"stream\",stream),@putByIdDirectPrivate(stream,\"controller\",controller),@resetQueue(@getByIdDirectPrivate(controller,\"queue\")),@putByIdDirectPrivate(controller,\"started\",-1),@putByIdDirectPrivate(controller,\"startAlgorithm\",startAlgorithm),@putByIdDirectPrivate(controller,\"strategySizeAlgorithm\",sizeAlgorithm),@putByIdDirectPrivate(controller,\"strategyHWM\",highWaterMark),@putByIdDirectPrivate(controller,\"writeAlgorithm\",writeAlgorithm),@putByIdDirectPrivate(controller,\"closeAlgorithm\",closeAlgorithm),@putByIdDirectPrivate(controller,\"abortAlgorithm\",abortAlgorithm);const backpressure=@writableStreamDefaultControllerGetBackpressure(controller);@writableStreamUpdateBackpressure(stream,backpressure),@writableStreamDefaultControllerStart(controller)})\n";
-// lazyAsyncIterator
-const JSC::ConstructAbility s_readableStreamLazyAsyncIteratorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableStreamLazyAsyncIteratorCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableStreamLazyAsyncIteratorCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
-const int s_readableStreamLazyAsyncIteratorCodeLength = 176;
-static const JSC::Intrinsic s_readableStreamLazyAsyncIteratorCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamLazyAsyncIteratorCode = "(function (){\"use strict\";var prototype=@ReadableStream.prototype;return @readableStreamDefineLazyIterators(prototype),prototype[globalThis.Symbol.asyncIterator].@call(this)})\n";
+// writableStreamDefaultControllerStart
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerStartCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerStartCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerStartCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultControllerStartCodeLength = 710;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerStartCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultControllerStartCode = "(function (controller){\"use strict\";if(@getByIdDirectPrivate(controller,\"started\")!==-1)return;@putByIdDirectPrivate(controller,\"started\",0);const startAlgorithm=@getByIdDirectPrivate(controller,\"startAlgorithm\");@putByIdDirectPrivate(controller,\"startAlgorithm\",@undefined);const stream=@getByIdDirectPrivate(controller,\"stream\");return @Promise.@resolve(startAlgorithm.@call()).@then(()=>{const state=@getByIdDirectPrivate(stream,\"state\");@putByIdDirectPrivate(controller,\"started\",1),@writableStreamDefaultControllerAdvanceQueueIfNeeded(controller)},(error)=>{const state=@getByIdDirectPrivate(stream,\"state\");@putByIdDirectPrivate(controller,\"started\",1),@writableStreamDealWithRejection(stream,error)})})\n";
+
+// setUpWritableStreamDefaultControllerFromUnderlyingSink
+const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeLength = 1127;
+static const JSC::Intrinsic s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCode = "(function (stream,underlyingSink,underlyingSinkDict,highWaterMark,sizeAlgorithm){\"use strict\";const controller=new @WritableStreamDefaultController;let startAlgorithm=()=>{},writeAlgorithm=()=>{return @Promise.@resolve()},closeAlgorithm=()=>{return @Promise.@resolve()},abortAlgorithm=()=>{return @Promise.@resolve()};if(\"start\"in underlyingSinkDict){const startMethod=underlyingSinkDict.start;startAlgorithm=()=>@promiseInvokeOrNoopMethodNoCatch(underlyingSink,startMethod,[controller])}if(\"write\"in underlyingSinkDict){const writeMethod=underlyingSinkDict.write;writeAlgorithm=(chunk)=>@promiseInvokeOrNoopMethod(underlyingSink,writeMethod,[chunk,controller])}if(\"close\"in underlyingSinkDict){const closeMethod=underlyingSinkDict.close;closeAlgorithm=()=>@promiseInvokeOrNoopMethod(underlyingSink,closeMethod,[])}if(\"abort\"in underlyingSinkDict){const abortMethod=underlyingSinkDict.abort;abortAlgorithm=(reason)=>@promiseInvokeOrNoopMethod(underlyingSink,abortMethod,[reason])}@setUpWritableStreamDefaultController(stream,controller,startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,highWaterMark,sizeAlgorithm)})\n";
+
+// writableStreamDefaultControllerAdvanceQueueIfNeeded
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeLength = 609;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"stream\");if(@getByIdDirectPrivate(controller,\"started\")!==1)return;if(@getByIdDirectPrivate(stream,\"inFlightWriteRequest\")!==@undefined)return;if(@getByIdDirectPrivate(stream,\"state\")===\"erroring\"){@writableStreamFinishErroring(stream);return}const queue=@getByIdDirectPrivate(controller,\"queue\");if(queue.content\?.isEmpty()\?\?!1)return;const value=@peekQueueValue(queue);if(value===@isCloseSentinel)@writableStreamDefaultControllerProcessClose(controller);else @writableStreamDefaultControllerProcessWrite(controller,value)})\n";
+
+// isCloseSentinel
+const JSC::ConstructAbility s_writableStreamInternalsIsCloseSentinelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsIsCloseSentinelCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsIsCloseSentinelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsIsCloseSentinelCodeLength = 29;
+static const JSC::Intrinsic s_writableStreamInternalsIsCloseSentinelCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsIsCloseSentinelCode = "(function (){\"use strict\";})\n";
+
+// writableStreamDefaultControllerClearAlgorithms
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeLength = 293;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCode = "(function (controller){\"use strict\";@putByIdDirectPrivate(controller,\"writeAlgorithm\",@undefined),@putByIdDirectPrivate(controller,\"closeAlgorithm\",@undefined),@putByIdDirectPrivate(controller,\"abortAlgorithm\",@undefined),@putByIdDirectPrivate(controller,\"strategySizeAlgorithm\",@undefined)})\n";
+
+// writableStreamDefaultControllerClose
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeLength = 187;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultControllerCloseCode = "(function (controller){\"use strict\";@enqueueValueWithSize(@getByIdDirectPrivate(controller,\"queue\"),@isCloseSentinel,0),@writableStreamDefaultControllerAdvanceQueueIfNeeded(controller)})\n";
+
+// writableStreamDefaultControllerError
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeLength = 203;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultControllerErrorCode = "(function (controller,error){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"stream\");@writableStreamDefaultControllerClearAlgorithms(controller),@writableStreamStartErroring(stream,error)})\n";
+
+// writableStreamDefaultControllerErrorIfNeeded
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeLength = 210;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCode = "(function (controller,error){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"stream\");if(@getByIdDirectPrivate(stream,\"state\")===\"writable\")@writableStreamDefaultControllerError(controller,error)})\n";
+
+// writableStreamDefaultControllerGetBackpressure
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeLength = 107;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCode = "(function (controller){\"use strict\";return @writableStreamDefaultControllerGetDesiredSize(controller)<=0})\n";
+
+// writableStreamDefaultControllerGetChunkSize
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeLength = 216;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCode = "(function (controller,chunk){\"use strict\";try{return @getByIdDirectPrivate(controller,\"strategySizeAlgorithm\").@call(@undefined,chunk)}catch(e){return @writableStreamDefaultControllerErrorIfNeeded(controller,e),1}})\n";
+
+// writableStreamDefaultControllerGetDesiredSize
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeLength = 140;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCode = "(function (controller){\"use strict\";return @getByIdDirectPrivate(controller,\"strategyHWM\")-@getByIdDirectPrivate(controller,\"queue\").size})\n";
+
+// writableStreamDefaultControllerProcessClose
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeLength = 485;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"stream\");@writableStreamMarkCloseRequestInFlight(stream),@dequeueValue(@getByIdDirectPrivate(controller,\"queue\"));const sinkClosePromise=@getByIdDirectPrivate(controller,\"closeAlgorithm\").@call();@writableStreamDefaultControllerClearAlgorithms(controller),sinkClosePromise.@then(()=>{@writableStreamFinishInFlightClose(stream)},(reason)=>{@writableStreamFinishInFlightCloseWithError(stream,reason)})})\n";
+
+// writableStreamDefaultControllerProcessWrite
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeLength = 845;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCode = "(function (controller,chunk){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"stream\");@writableStreamMarkFirstWriteRequestInFlight(stream),@getByIdDirectPrivate(controller,\"writeAlgorithm\").@call(@undefined,chunk).@then(()=>{@writableStreamFinishInFlightWrite(stream);const state=@getByIdDirectPrivate(stream,\"state\");if(@dequeueValue(@getByIdDirectPrivate(controller,\"queue\")),!@writableStreamCloseQueuedOrInFlight(stream)&&state===\"writable\"){const backpressure=@writableStreamDefaultControllerGetBackpressure(controller);@writableStreamUpdateBackpressure(stream,backpressure)}@writableStreamDefaultControllerAdvanceQueueIfNeeded(controller)},(reason)=>{if(@getByIdDirectPrivate(stream,\"state\")===\"writable\")@writableStreamDefaultControllerClearAlgorithms(controller);@writableStreamFinishInFlightWriteWithError(stream,reason)})})\n";
+
+// writableStreamDefaultControllerWrite
+const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeLength = 578;
+static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_writableStreamInternalsWritableStreamDefaultControllerWriteCode = "(function (controller,chunk,chunkSize){\"use strict\";try{@enqueueValueWithSize(@getByIdDirectPrivate(controller,\"queue\"),chunk,chunkSize);const stream=@getByIdDirectPrivate(controller,\"stream\"),state=@getByIdDirectPrivate(stream,\"state\");if(!@writableStreamCloseQueuedOrInFlight(stream)&&state===\"writable\"){const backpressure=@writableStreamDefaultControllerGetBackpressure(controller);@writableStreamUpdateBackpressure(stream,backpressure)}@writableStreamDefaultControllerAdvanceQueueIfNeeded(controller)}catch(e){@writableStreamDefaultControllerErrorIfNeeded(controller,e)}})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().readableStreamBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().readableStreamBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+ return clientData->builtinFunctions().writableStreamInternalsBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().writableStreamInternalsBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
-WEBCORE_FOREACH_READABLESTREAM_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* ReadableStreamDefaultController.ts */
@@ -2663,328 +2919,38 @@ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
WEBCORE_FOREACH_READABLESTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
-/* ReadableByteStreamInternals.ts */
-// privateInitializeReadableByteStreamController
-const JSC::ConstructAbility s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeLength = 1896;
-static const JSC::Intrinsic s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCode = "(function (stream,underlyingByteSource,highWaterMark){\"use strict\";if(!@isReadableStream(stream))@throwTypeError(\"ReadableByteStreamController needs a ReadableStream\");if(@getByIdDirectPrivate(stream,\"readableStreamController\")!==null)@throwTypeError(\"ReadableStream already has a controller\");@putByIdDirectPrivate(this,\"controlledReadableStream\",stream),@putByIdDirectPrivate(this,\"underlyingByteSource\",underlyingByteSource),@putByIdDirectPrivate(this,\"pullAgain\",!1),@putByIdDirectPrivate(this,\"pulling\",!1),@readableByteStreamControllerClearPendingPullIntos(this),@putByIdDirectPrivate(this,\"queue\",@newQueue()),@putByIdDirectPrivate(this,\"started\",0),@putByIdDirectPrivate(this,\"closeRequested\",!1);let hwm=@toNumber(highWaterMark);if(hwm!==hwm||hwm<0)@throwRangeError(\"highWaterMark value is negative or not a number\");@putByIdDirectPrivate(this,\"strategyHWM\",hwm);let autoAllocateChunkSize=underlyingByteSource.autoAllocateChunkSize;if(autoAllocateChunkSize!==@undefined){if(autoAllocateChunkSize=@toNumber(autoAllocateChunkSize),autoAllocateChunkSize<=0||autoAllocateChunkSize===@Infinity||autoAllocateChunkSize===-@Infinity)@throwRangeError(\"autoAllocateChunkSize value is negative or equal to positive or negative infinity\")}@putByIdDirectPrivate(this,\"autoAllocateChunkSize\",autoAllocateChunkSize),@putByIdDirectPrivate(this,\"pendingPullIntos\",@createFIFO());const controller=this;return @promiseInvokeOrNoopNoCatch(@getByIdDirectPrivate(controller,\"underlyingByteSource\"),\"start\",[controller]).@then(()=>{@putByIdDirectPrivate(controller,\"started\",1),@readableByteStreamControllerCallPullIfNeeded(controller)},(error)=>{if(@getByIdDirectPrivate(stream,\"state\")===@streamReadable)@readableByteStreamControllerError(controller,error)}),@putByIdDirectPrivate(this,\"cancel\",@readableByteStreamControllerCancel),@putByIdDirectPrivate(this,\"pull\",@readableByteStreamControllerPull),this})\n";
-
-// readableStreamByteStreamControllerStart
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeLength = 91;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCode = "(function (controller){\"use strict\";@putByIdDirectPrivate(controller,\"start\",@undefined)})\n";
-
-// privateInitializeReadableStreamBYOBRequest
-const JSC::ConstructAbility s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeLength = 163;
-static const JSC::Intrinsic s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCode = "(function (controller,view){\"use strict\";@putByIdDirectPrivate(this,\"associatedReadableByteStreamController\",controller),@putByIdDirectPrivate(this,\"view\",view)})\n";
-
-// isReadableByteStreamController
-const JSC::ConstructAbility s_readableByteStreamInternalsIsReadableByteStreamControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsIsReadableByteStreamControllerCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsIsReadableByteStreamControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsIsReadableByteStreamControllerCodeLength = 127;
-static const JSC::Intrinsic s_readableByteStreamInternalsIsReadableByteStreamControllerCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsIsReadableByteStreamControllerCode = "(function (controller){\"use strict\";return @isObject(controller)&&!!@getByIdDirectPrivate(controller,\"underlyingByteSource\")})\n";
-
-// isReadableStreamBYOBRequest
-const JSC::ConstructAbility s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeLength = 148;
-static const JSC::Intrinsic s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsIsReadableStreamBYOBRequestCode = "(function (byobRequest){\"use strict\";return @isObject(byobRequest)&&!!@getByIdDirectPrivate(byobRequest,\"associatedReadableByteStreamController\")})\n";
-
-// isReadableStreamBYOBReader
-const JSC::ConstructAbility s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeLength = 111;
-static const JSC::Intrinsic s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsIsReadableStreamBYOBReaderCode = "(function (reader){\"use strict\";return @isObject(reader)&&!!@getByIdDirectPrivate(reader,\"readIntoRequests\")})\n";
-
-// readableByteStreamControllerCancel
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeLength = 336;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerCancelCode = "(function (controller,reason){\"use strict\";var pendingPullIntos=@getByIdDirectPrivate(controller,\"pendingPullIntos\"),first=pendingPullIntos.peek();if(first)first.bytesFilled=0;return @putByIdDirectPrivate(controller,\"queue\",@newQueue()),@promiseInvokeOrNoop(@getByIdDirectPrivate(controller,\"underlyingByteSource\"),\"cancel\",[reason])})\n";
-
-// readableByteStreamControllerError
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeLength = 242;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerErrorCode = "(function (controller,e){\"use strict\";@readableByteStreamControllerClearPendingPullIntos(controller),@putByIdDirectPrivate(controller,\"queue\",@newQueue()),@readableStreamError(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),e)})\n";
-
-// readableByteStreamControllerClose
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeLength = 473;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerCloseCode = "(function (controller){\"use strict\";if(@getByIdDirectPrivate(controller,\"queue\").size>0){@putByIdDirectPrivate(controller,\"closeRequested\",!0);return}var first=@getByIdDirectPrivate(controller,\"pendingPullIntos\")\?.peek();if(first){if(first.bytesFilled>0){const e=@makeTypeError(\"Close requested while there remain pending bytes\");throw @readableByteStreamControllerError(controller,e),e}}@readableStreamClose(@getByIdDirectPrivate(controller,\"controlledReadableStream\"))})\n";
-
-// readableByteStreamControllerClearPendingPullIntos
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeLength = 281;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCode = "(function (controller){\"use strict\";@readableByteStreamControllerInvalidateBYOBRequest(controller);var existing=@getByIdDirectPrivate(controller,\"pendingPullIntos\");if(existing!==@undefined)existing.clear();else @putByIdDirectPrivate(controller,\"pendingPullIntos\",@createFIFO())})\n";
-
-// readableByteStreamControllerGetDesiredSize
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeLength = 330;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\"),state=@getByIdDirectPrivate(stream,\"state\");if(state===@streamErrored)return null;if(state===@streamClosed)return 0;return @getByIdDirectPrivate(controller,\"strategyHWM\")-@getByIdDirectPrivate(controller,\"queue\").size})\n";
-
-// readableStreamHasBYOBReader
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeLength = 150;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableStreamHasBYOBReaderCode = "(function (stream){\"use strict\";const reader=@getByIdDirectPrivate(stream,\"reader\");return reader!==@undefined&&@isReadableStreamBYOBReader(reader)})\n";
-
-// readableStreamHasDefaultReader
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeLength = 153;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableStreamHasDefaultReaderCode = "(function (stream){\"use strict\";const reader=@getByIdDirectPrivate(stream,\"reader\");return reader!==@undefined&&@isReadableStreamDefaultReader(reader)})\n";
-
-// readableByteStreamControllerHandleQueueDrain
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeLength = 287;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCode = "(function (controller){\"use strict\";if(!@getByIdDirectPrivate(controller,\"queue\").size&&@getByIdDirectPrivate(controller,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(controller,\"controlledReadableStream\"));else @readableByteStreamControllerCallPullIfNeeded(controller)})\n";
-
-// readableByteStreamControllerPull
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerPullCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerPullCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerPullCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerPullCodeLength = 1169;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerPullCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");if(@getByIdDirectPrivate(controller,\"queue\").content\?.isNotEmpty()){const entry=@getByIdDirectPrivate(controller,\"queue\").content.shift();@getByIdDirectPrivate(controller,\"queue\").size-=entry.byteLength,@readableByteStreamControllerHandleQueueDrain(controller);let view;try{view=new @Uint8Array(entry.buffer,entry.byteOffset,entry.byteLength)}catch(error){return @Promise.@reject(error)}return @createFulfilledPromise({value:view,done:!1})}if(@getByIdDirectPrivate(controller,\"autoAllocateChunkSize\")!==@undefined){let buffer;try{buffer=@createUninitializedArrayBuffer(@getByIdDirectPrivate(controller,\"autoAllocateChunkSize\"))}catch(error){return @Promise.@reject(error)}const pullIntoDescriptor={buffer,byteOffset:0,byteLength:@getByIdDirectPrivate(controller,\"autoAllocateChunkSize\"),bytesFilled:0,elementSize:1,ctor:@Uint8Array,readerType:\"default\"};@getByIdDirectPrivate(controller,\"pendingPullIntos\").push(pullIntoDescriptor)}const promise=@readableStreamAddReadRequest(stream);return @readableByteStreamControllerCallPullIfNeeded(controller),promise})\n";
-
-// readableByteStreamControllerShouldCallPull
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeLength = 709;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCode = "(function (controller){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");if(@getByIdDirectPrivate(stream,\"state\")!==@streamReadable)return!1;if(@getByIdDirectPrivate(controller,\"closeRequested\"))return!1;if(!(@getByIdDirectPrivate(controller,\"started\")>0))return!1;const reader=@getByIdDirectPrivate(stream,\"reader\");if(reader&&(@getByIdDirectPrivate(reader,\"readRequests\")\?.isNotEmpty()||!!@getByIdDirectPrivate(reader,\"bunNativePtr\")))return!0;if(@readableStreamHasBYOBReader(stream)&&@getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readIntoRequests\")\?.isNotEmpty())return!0;if(@readableByteStreamControllerGetDesiredSize(controller)>0)return!0;return!1})\n";
-
-// readableByteStreamControllerCallPullIfNeeded
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeLength = 748;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCode = "(function (controller){\"use strict\";if(!@readableByteStreamControllerShouldCallPull(controller))return;if(@getByIdDirectPrivate(controller,\"pulling\")){@putByIdDirectPrivate(controller,\"pullAgain\",!0);return}@putByIdDirectPrivate(controller,\"pulling\",!0),@promiseInvokeOrNoop(@getByIdDirectPrivate(controller,\"underlyingByteSource\"),\"pull\",[controller]).@then(()=>{if(@putByIdDirectPrivate(controller,\"pulling\",!1),@getByIdDirectPrivate(controller,\"pullAgain\"))@putByIdDirectPrivate(controller,\"pullAgain\",!1),@readableByteStreamControllerCallPullIfNeeded(controller)},(error)=>{if(@getByIdDirectPrivate(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),\"state\")===@streamReadable)@readableByteStreamControllerError(controller,error)})})\n";
-
-// transferBufferToCurrentRealm
-const JSC::ConstructAbility s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeLength = 48;
-static const JSC::Intrinsic s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsTransferBufferToCurrentRealmCode = "(function (buffer){\"use strict\";return buffer})\n";
-
-// readableStreamReaderKind
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamReaderKindCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamReaderKindCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamReaderKindCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableStreamReaderKindCodeLength = 208;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamReaderKindCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableStreamReaderKindCode = "(function (reader){\"use strict\";if(@getByIdDirectPrivate(reader,\"readRequests\"))return @getByIdDirectPrivate(reader,\"bunNativePtr\")\?3:1;if(@getByIdDirectPrivate(reader,\"readIntoRequests\"))return 2;return 0})\n";
-
-// readableByteStreamControllerEnqueue
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeLength = 1036;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCode = "(function (controller,chunk){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");switch(@getByIdDirectPrivate(stream,\"reader\")\?@readableStreamReaderKind(@getByIdDirectPrivate(stream,\"reader\")):0){case 1:{if(!@getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readRequests\")\?.isNotEmpty())@readableByteStreamControllerEnqueueChunk(controller,@transferBufferToCurrentRealm(chunk.buffer),chunk.byteOffset,chunk.byteLength);else{const transferredView=chunk.constructor===@Uint8Array\?chunk:new @Uint8Array(chunk.buffer,chunk.byteOffset,chunk.byteLength);@readableStreamFulfillReadRequest(stream,transferredView,!1)}break}case 2:{@readableByteStreamControllerEnqueueChunk(controller,@transferBufferToCurrentRealm(chunk.buffer),chunk.byteOffset,chunk.byteLength),@readableByteStreamControllerProcessPullDescriptors(controller);break}case 3:break;default:{@readableByteStreamControllerEnqueueChunk(controller,@transferBufferToCurrentRealm(chunk.buffer),chunk.byteOffset,chunk.byteLength);break}}})\n";
-
-// readableByteStreamControllerEnqueueChunk
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeLength = 213;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCode = "(function (controller,buffer,byteOffset,byteLength){\"use strict\";@getByIdDirectPrivate(controller,\"queue\").content.push({buffer,byteOffset,byteLength}),@getByIdDirectPrivate(controller,\"queue\").size+=byteLength})\n";
-
-// readableByteStreamControllerRespondWithNewView
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeLength = 463;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCode = "(function (controller,view){\"use strict\";let firstDescriptor=@getByIdDirectPrivate(controller,\"pendingPullIntos\").peek();if(firstDescriptor.byteOffset+firstDescriptor.bytesFilled!==view.byteOffset)@throwRangeError(\"Invalid value for view.byteOffset\");if(firstDescriptor.byteLength!==view.byteLength)@throwRangeError(\"Invalid value for view.byteLength\");firstDescriptor.buffer=view.buffer,@readableByteStreamControllerRespondInternal(controller,view.byteLength)})\n";
-
-// readableByteStreamControllerRespond
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeLength = 287;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondCode = "(function (controller,bytesWritten){\"use strict\";if(bytesWritten=@toNumber(bytesWritten),bytesWritten!==bytesWritten||bytesWritten===@Infinity||bytesWritten<0)@throwRangeError(\"bytesWritten has an incorrect value\");@readableByteStreamControllerRespondInternal(controller,bytesWritten)})\n";
-
-// readableByteStreamControllerRespondInternal
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeLength = 534;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCode = "(function (controller,bytesWritten){\"use strict\";let firstDescriptor=@getByIdDirectPrivate(controller,\"pendingPullIntos\").peek(),stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");if(@getByIdDirectPrivate(stream,\"state\")===@streamClosed){if(bytesWritten!==0)@throwTypeError(\"bytesWritten is different from 0 even though stream is closed\");@readableByteStreamControllerRespondInClosedState(controller,firstDescriptor)}else @readableByteStreamControllerRespondInReadableState(controller,bytesWritten,firstDescriptor)})\n";
-
-// readableByteStreamControllerRespondInReadableState
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeLength = 1110;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCode = "(function (controller,bytesWritten,pullIntoDescriptor){\"use strict\";if(pullIntoDescriptor.bytesFilled+bytesWritten>pullIntoDescriptor.byteLength)@throwRangeError(\"bytesWritten value is too great\");if(@readableByteStreamControllerInvalidateBYOBRequest(controller),pullIntoDescriptor.bytesFilled+=bytesWritten,pullIntoDescriptor.bytesFilled<pullIntoDescriptor.elementSize)return;@readableByteStreamControllerShiftPendingDescriptor(controller);const remainderSize=pullIntoDescriptor.bytesFilled%pullIntoDescriptor.elementSize;if(remainderSize>0){const end=pullIntoDescriptor.byteOffset+pullIntoDescriptor.bytesFilled,remainder=@cloneArrayBuffer(pullIntoDescriptor.buffer,end-remainderSize,remainderSize);@readableByteStreamControllerEnqueueChunk(controller,remainder,0,remainder.byteLength)}pullIntoDescriptor.buffer=@transferBufferToCurrentRealm(pullIntoDescriptor.buffer),pullIntoDescriptor.bytesFilled-=remainderSize,@readableByteStreamControllerCommitDescriptor(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),pullIntoDescriptor),@readableByteStreamControllerProcessPullDescriptors(controller)})\n";
-
-// readableByteStreamControllerRespondInClosedState
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeLength = 596;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCode = "(function (controller,firstDescriptor){\"use strict\";if(firstDescriptor.buffer=@transferBufferToCurrentRealm(firstDescriptor.buffer),@readableStreamHasBYOBReader(@getByIdDirectPrivate(controller,\"controlledReadableStream\")))while(@getByIdDirectPrivate(@getByIdDirectPrivate(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),\"reader\"),\"readIntoRequests\")\?.isNotEmpty()){let pullIntoDescriptor=@readableByteStreamControllerShiftPendingDescriptor(controller);@readableByteStreamControllerCommitDescriptor(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),pullIntoDescriptor)}})\n";
-
-// readableByteStreamControllerProcessPullDescriptors
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeLength = 534;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCode = "(function (controller){\"use strict\";while(@getByIdDirectPrivate(controller,\"pendingPullIntos\").isNotEmpty()){if(@getByIdDirectPrivate(controller,\"queue\").size===0)return;let pullIntoDescriptor=@getByIdDirectPrivate(controller,\"pendingPullIntos\").peek();if(@readableByteStreamControllerFillDescriptorFromQueue(controller,pullIntoDescriptor))@readableByteStreamControllerShiftPendingDescriptor(controller),@readableByteStreamControllerCommitDescriptor(@getByIdDirectPrivate(controller,\"controlledReadableStream\"),pullIntoDescriptor)}})\n";
-
-// readableByteStreamControllerFillDescriptorFromQueue
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeLength = 1538;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCode = "(function (controller,pullIntoDescriptor){\"use strict\";const currentAlignedBytes=pullIntoDescriptor.bytesFilled-pullIntoDescriptor.bytesFilled%pullIntoDescriptor.elementSize,maxBytesToCopy=@getByIdDirectPrivate(controller,\"queue\").size<pullIntoDescriptor.byteLength-pullIntoDescriptor.bytesFilled\?@getByIdDirectPrivate(controller,\"queue\").size:pullIntoDescriptor.byteLength-pullIntoDescriptor.bytesFilled,maxBytesFilled=pullIntoDescriptor.bytesFilled+maxBytesToCopy,maxAlignedBytes=maxBytesFilled-maxBytesFilled%pullIntoDescriptor.elementSize;let totalBytesToCopyRemaining=maxBytesToCopy,ready=!1;if(maxAlignedBytes>currentAlignedBytes)totalBytesToCopyRemaining=maxAlignedBytes-pullIntoDescriptor.bytesFilled,ready=!0;while(totalBytesToCopyRemaining>0){let headOfQueue=@getByIdDirectPrivate(controller,\"queue\").content.peek();const bytesToCopy=totalBytesToCopyRemaining<headOfQueue.byteLength\?totalBytesToCopyRemaining:headOfQueue.byteLength,destStart=pullIntoDescriptor.byteOffset+pullIntoDescriptor.bytesFilled;if(new @Uint8Array(pullIntoDescriptor.buffer).set(new @Uint8Array(headOfQueue.buffer,headOfQueue.byteOffset,bytesToCopy),destStart),headOfQueue.byteLength===bytesToCopy)@getByIdDirectPrivate(controller,\"queue\").content.shift();else headOfQueue.byteOffset+=bytesToCopy,headOfQueue.byteLength-=bytesToCopy;@getByIdDirectPrivate(controller,\"queue\").size-=bytesToCopy,@readableByteStreamControllerInvalidateBYOBRequest(controller),pullIntoDescriptor.bytesFilled+=bytesToCopy,totalBytesToCopyRemaining-=bytesToCopy}return ready})\n";
-
-// readableByteStreamControllerShiftPendingDescriptor
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeLength = 195;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCode = "(function (controller){\"use strict\";let descriptor=@getByIdDirectPrivate(controller,\"pendingPullIntos\").shift();return @readableByteStreamControllerInvalidateBYOBRequest(controller),descriptor})\n";
-
-// readableByteStreamControllerInvalidateBYOBRequest
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeLength = 374;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCode = "(function (controller){\"use strict\";if(@getByIdDirectPrivate(controller,\"byobRequest\")===@undefined)return;const byobRequest=@getByIdDirectPrivate(controller,\"byobRequest\");@putByIdDirectPrivate(byobRequest,\"associatedReadableByteStreamController\",@undefined),@putByIdDirectPrivate(byobRequest,\"view\",@undefined),@putByIdDirectPrivate(controller,\"byobRequest\",@undefined)})\n";
-
-// readableByteStreamControllerCommitDescriptor
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeLength = 382;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCode = "(function (stream,pullIntoDescriptor){\"use strict\";let done=!1;if(@getByIdDirectPrivate(stream,\"state\")===@streamClosed)done=!0;let filledView=@readableByteStreamControllerConvertDescriptor(pullIntoDescriptor);if(pullIntoDescriptor.readerType===\"default\")@readableStreamFulfillReadRequest(stream,filledView,done);else @readableStreamFulfillReadIntoRequest(stream,filledView,done)})\n";
-
-// readableByteStreamControllerConvertDescriptor
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeLength = 200;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCode = "(function (pullIntoDescriptor){\"use strict\";return new pullIntoDescriptor.ctor(pullIntoDescriptor.buffer,pullIntoDescriptor.byteOffset,pullIntoDescriptor.bytesFilled/pullIntoDescriptor.elementSize)})\n";
-
-// readableStreamFulfillReadIntoRequest
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeLength = 208;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCode = "(function (stream,chunk,done){\"use strict\";const readIntoRequest=@getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readIntoRequests\").shift();@fulfillPromise(readIntoRequest,{value:chunk,done})})\n";
-
-// readableStreamBYOBReaderRead
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeLength = 384;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableStreamBYOBReaderReadCode = "(function (reader,view){\"use strict\";const stream=@getByIdDirectPrivate(reader,\"ownerReadableStream\");if(@putByIdDirectPrivate(stream,\"disturbed\",!0),@getByIdDirectPrivate(stream,\"state\")===@streamErrored)return @Promise.@reject(@getByIdDirectPrivate(stream,\"storedError\"));return @readableByteStreamControllerPullInto(@getByIdDirectPrivate(stream,\"readableStreamController\"),view)})\n";
-
-// readableByteStreamControllerPullInto
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeLength = 1659;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCode = "(function (controller,view){\"use strict\";const stream=@getByIdDirectPrivate(controller,\"controlledReadableStream\");let elementSize=1;if(view.BYTES_PER_ELEMENT!==@undefined)elementSize=view.BYTES_PER_ELEMENT;const ctor=view.constructor,pullIntoDescriptor={buffer:view.buffer,byteOffset:view.byteOffset,byteLength:view.byteLength,bytesFilled:0,elementSize,ctor,readerType:\"byob\"};var pending=@getByIdDirectPrivate(controller,\"pendingPullIntos\");if(pending\?.isNotEmpty())return pullIntoDescriptor.buffer=@transferBufferToCurrentRealm(pullIntoDescriptor.buffer),pending.push(pullIntoDescriptor),@readableStreamAddReadIntoRequest(stream);if(@getByIdDirectPrivate(stream,\"state\")===@streamClosed){const emptyView=new ctor(pullIntoDescriptor.buffer,pullIntoDescriptor.byteOffset,0);return @createFulfilledPromise({value:emptyView,done:!0})}if(@getByIdDirectPrivate(controller,\"queue\").size>0){if(@readableByteStreamControllerFillDescriptorFromQueue(controller,pullIntoDescriptor)){const filledView=@readableByteStreamControllerConvertDescriptor(pullIntoDescriptor);return @readableByteStreamControllerHandleQueueDrain(controller),@createFulfilledPromise({value:filledView,done:!1})}if(@getByIdDirectPrivate(controller,\"closeRequested\")){const e=@makeTypeError(\"Closing stream has been requested\");return @readableByteStreamControllerError(controller,e),@Promise.@reject(e)}}pullIntoDescriptor.buffer=@transferBufferToCurrentRealm(pullIntoDescriptor.buffer),@getByIdDirectPrivate(controller,\"pendingPullIntos\").push(pullIntoDescriptor);const promise=@readableStreamAddReadIntoRequest(stream);return @readableByteStreamControllerCallPullIfNeeded(controller),promise})\n";
-
-// readableStreamAddReadIntoRequest
-const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeLength = 184;
-static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCode = "(function (stream){\"use strict\";const readRequest=@newPromise();return @getByIdDirectPrivate(@getByIdDirectPrivate(stream,\"reader\"),\"readIntoRequests\").push(readRequest),readRequest})\n";
-
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
-JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
-{\
- JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().readableByteStreamInternalsBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().readableByteStreamInternalsBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
-}
-WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
-#undef DEFINE_BUILTIN_GENERATOR
+/* CountQueuingStrategy.ts */
+// highWaterMark
+const JSC::ConstructAbility s_countQueuingStrategyHighWaterMarkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_countQueuingStrategyHighWaterMarkCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_countQueuingStrategyHighWaterMarkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_countQueuingStrategyHighWaterMarkCodeLength = 241;
+static const JSC::Intrinsic s_countQueuingStrategyHighWaterMarkCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_countQueuingStrategyHighWaterMarkCode = "(function (){\"use strict\";const highWaterMark=@getByIdDirectPrivate(this,\"highWaterMark\");if(highWaterMark===@undefined)@throwTypeError(\"CountQueuingStrategy.highWaterMark getter called on incompatible |this| value.\");return highWaterMark})\n";
-/* WritableStreamDefaultController.ts */
-// initializeWritableStreamDefaultController
-const JSC::ConstructAbility s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeLength = 388;
-static const JSC::Intrinsic s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCode = "(function (){\"use strict\";return @putByIdDirectPrivate(this,\"queue\",@newQueue()),@putByIdDirectPrivate(this,\"abortSteps\",(reason)=>{const result=@getByIdDirectPrivate(this,\"abortAlgorithm\").@call(@undefined,reason);return @writableStreamDefaultControllerClearAlgorithms(this),result}),@putByIdDirectPrivate(this,\"errorSteps\",()=>{@resetQueue(@getByIdDirectPrivate(this,\"queue\"))}),this})\n";
+// size
+const JSC::ConstructAbility s_countQueuingStrategySizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_countQueuingStrategySizeCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_countQueuingStrategySizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_countQueuingStrategySizeCodeLength = 37;
+static const JSC::Intrinsic s_countQueuingStrategySizeCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_countQueuingStrategySizeCode = "(function (){\"use strict\";return 1})\n";
-// error
-const JSC::ConstructAbility s_writableStreamDefaultControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const JSC::ConstructorKind s_writableStreamDefaultControllerErrorCodeConstructorKind = JSC::ConstructorKind::None;
-const JSC::ImplementationVisibility s_writableStreamDefaultControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_writableStreamDefaultControllerErrorCodeLength = 311;
-static const JSC::Intrinsic s_writableStreamDefaultControllerErrorCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamDefaultControllerErrorCode = "(function (e){\"use strict\";if(@getByIdDirectPrivate(this,\"abortSteps\")===@undefined)throw @makeThisTypeError(\"WritableStreamDefaultController\",\"error\");const stream=@getByIdDirectPrivate(this,\"stream\");if(@getByIdDirectPrivate(stream,\"state\")!==\"writable\")return;@writableStreamDefaultControllerError(this,e)})\n";
+// initializeCountQueuingStrategy
+const JSC::ConstructAbility s_countQueuingStrategyInitializeCountQueuingStrategyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_countQueuingStrategyInitializeCountQueuingStrategyCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_countQueuingStrategyInitializeCountQueuingStrategyCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_countQueuingStrategyInitializeCountQueuingStrategyCodeLength = 139;
+static const JSC::Intrinsic s_countQueuingStrategyInitializeCountQueuingStrategyCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_countQueuingStrategyInitializeCountQueuingStrategyCode = "(function (parameters){\"use strict\";@putByIdDirectPrivate(this,\"highWaterMark\",@extractHighWaterMarkFromQueuingStrategyInit(parameters))})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
- return clientData->builtinFunctions().writableStreamDefaultControllerBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().writableStreamDefaultControllerBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+ return clientData->builtinFunctions().countQueuingStrategyBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().countQueuingStrategyBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
}
-WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
/* EventSource.ts */
@@ -3005,15 +2971,49 @@ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
+/* ProcessObjectInternals.ts */
+// binding
+const JSC::ConstructAbility s_processObjectInternalsBindingCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_processObjectInternalsBindingCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_processObjectInternalsBindingCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_processObjectInternalsBindingCodeLength = 511;
+static const JSC::Intrinsic s_processObjectInternalsBindingCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_processObjectInternalsBindingCode = "(function (bindingName){\"use strict\";if(bindingName===\"constants\")return @processBindingConstants;const issue={fs:3546,buffer:2020,natives:2254,uv:2891}[bindingName];if(issue)throw new Error(`process.binding(\"${bindingName}\") is not implemented in Bun. Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/${issue}`);@throwTypeError(`process.binding(\"${bindingName}\") is not implemented in Bun. If that breaks something, please file an issue and include a reproducible code sample.`)})\n";
+
+// getStdioWriteStream
+const JSC::ConstructAbility s_processObjectInternalsGetStdioWriteStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_processObjectInternalsGetStdioWriteStreamCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_processObjectInternalsGetStdioWriteStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_processObjectInternalsGetStdioWriteStreamCodeLength = 621;
+static const JSC::Intrinsic s_processObjectInternalsGetStdioWriteStreamCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_processObjectInternalsGetStdioWriteStreamCode = "(function (fd){\"use strict\";const stream=(@getInternalField(@internalModuleRegistry,42)||@createInternalModuleById(42)).WriteStream(fd);if(process.on(\"SIGWINCH\",()=>{stream._refreshSize()}),fd===1)stream.destroySoon=stream.destroy,stream._destroy=function(err,cb){if(cb(err),this._undestroy(),!this._writableState.emitClose)process.nextTick(()=>{this.emit(\"close\")})};else if(fd===2)stream.destroySoon=stream.destroy,stream._destroy=function(err,cb){if(cb(err),this._undestroy(),!this._writableState.emitClose)process.nextTick(()=>{this.emit(\"close\")})};return stream._type=\"tty\",stream._isStdio=!0,stream.fd=fd,stream})\n";
+
+// getStdinStream
+const JSC::ConstructAbility s_processObjectInternalsGetStdinStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const JSC::ConstructorKind s_processObjectInternalsGetStdinStreamCodeConstructorKind = JSC::ConstructorKind::None;
+const JSC::ImplementationVisibility s_processObjectInternalsGetStdinStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
+const int s_processObjectInternalsGetStdinStreamCodeLength = 1386;
+static const JSC::Intrinsic s_processObjectInternalsGetStdinStreamCodeIntrinsic = JSC::NoIntrinsic;
+const char* const s_processObjectInternalsGetStdinStreamCode = "(function (fd){\"use strict\";var reader,readerRef;function ref(){reader\?\?=@Bun.stdin.stream().getReader(),readerRef\?\?=setInterval(()=>{},1<<30)}function unref(){if(readerRef)clearInterval(readerRef),readerRef=@undefined;if(reader)reader.cancel(),reader=@undefined}const stream=new((@getInternalField(@internalModuleRegistry,42))||(@createInternalModuleById(42))).ReadStream(fd),originalOn=stream.on;stream.on=function(event,listener){if(event===\"readable\")ref();return originalOn.call(this,event,listener)},stream.fd=fd;const originalPause=stream.pause;stream.pause=function(){return unref(),originalPause.call(this)};const originalResume=stream.resume;stream.resume=function(){return ref(),originalResume.call(this)};async function internalRead(stream2){try{var done,value;const read=reader\?.readMany();if(@isPromise(read))({done,value}=await read);else({done,value}=read);if(!done){stream2.push(value[0]);const length=value.length;for(let i=1;i<length;i++)stream2.push(value[i])}else stream2.emit(\"end\"),stream2.pause()}catch(err){stream2.destroy(err)}}return stream._read=function(size){internalRead(this)},stream.on(\"resume\",()=>{ref(),stream._undestroy()}),stream._readableState.reading=!1,stream.on(\"pause\",()=>{process.nextTick(()=>{if(!stream.readableFlowing)stream._readableState.reading=!1})}),stream.on(\"close\",()=>{process.nextTick(()=>{stream.destroy(),unref()})}),stream})\n";
+
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
+{\
+ JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
+ return clientData->builtinFunctions().processObjectInternalsBuiltins().codeName##Executable()->link(vm, nullptr, clientData->builtinFunctions().processObjectInternalsBuiltins().codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
+}
+WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+
JSBuiltinInternalFunctions::JSBuiltinInternalFunctions(JSC::VM& vm)
: m_vm(vm)
- , m_writableStreamInternals(vm)
, m_transformStreamInternals(vm)
, m_readableStreamInternals(vm)
- , m_streamInternals(vm)
, m_readableByteStreamInternals(vm)
+ , m_streamInternals(vm)
+ , m_writableStreamInternals(vm)
{
UNUSED_PARAM(vm);
@@ -3022,11 +3022,11 @@ JSBuiltinInternalFunctions::JSBuiltinInternalFunctions(JSC::VM& vm)
template<typename Visitor>
void JSBuiltinInternalFunctions::visit(Visitor& visitor)
{
- m_writableStreamInternals.visit(visitor);
m_transformStreamInternals.visit(visitor);
m_readableStreamInternals.visit(visitor);
- m_streamInternals.visit(visitor);
m_readableByteStreamInternals.visit(visitor);
+ m_streamInternals.visit(visitor);
+ m_writableStreamInternals.visit(visitor);
UNUSED_PARAM(visitor);
}
@@ -3037,21 +3037,16 @@ template void JSBuiltinInternalFunctions::visit(SlotVisitor&);
SUPPRESS_ASAN void JSBuiltinInternalFunctions::initialize(Zig::GlobalObject& globalObject)
{
UNUSED_PARAM(globalObject);
- m_writableStreamInternals.init(globalObject);
m_transformStreamInternals.init(globalObject);
m_readableStreamInternals.init(globalObject);
- m_streamInternals.init(globalObject);
m_readableByteStreamInternals.init(globalObject);
+ m_streamInternals.init(globalObject);
+ m_writableStreamInternals.init(globalObject);
JSVMClientData& clientData = *static_cast<JSVMClientData*>(m_vm.clientData);
Zig::GlobalObject::GlobalPropertyInfo staticGlobals[] = {
#define DECLARE_GLOBAL_STATIC(name) \
Zig::GlobalObject::GlobalPropertyInfo( \
- clientData.builtinFunctions().writableStreamInternalsBuiltins().name##PrivateName(), writableStreamInternals().m_##name##Function.get() , JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly),
- WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
- #undef DECLARE_GLOBAL_STATIC
- #define DECLARE_GLOBAL_STATIC(name) \
- Zig::GlobalObject::GlobalPropertyInfo( \
clientData.builtinFunctions().transformStreamInternalsBuiltins().name##PrivateName(), transformStreamInternals().m_##name##Function.get() , JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly),
WEBCORE_FOREACH_TRANSFORMSTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
#undef DECLARE_GLOBAL_STATIC
@@ -3062,13 +3057,18 @@ SUPPRESS_ASAN void JSBuiltinInternalFunctions::initialize(Zig::GlobalObject& glo
#undef DECLARE_GLOBAL_STATIC
#define DECLARE_GLOBAL_STATIC(name) \
Zig::GlobalObject::GlobalPropertyInfo( \
+ clientData.builtinFunctions().readableByteStreamInternalsBuiltins().name##PrivateName(), readableByteStreamInternals().m_##name##Function.get() , JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly),
+ WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
+ #undef DECLARE_GLOBAL_STATIC
+ #define DECLARE_GLOBAL_STATIC(name) \
+ Zig::GlobalObject::GlobalPropertyInfo( \
clientData.builtinFunctions().streamInternalsBuiltins().name##PrivateName(), streamInternals().m_##name##Function.get() , JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly),
WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
#undef DECLARE_GLOBAL_STATIC
#define DECLARE_GLOBAL_STATIC(name) \
Zig::GlobalObject::GlobalPropertyInfo( \
- clientData.builtinFunctions().readableByteStreamInternalsBuiltins().name##PrivateName(), readableByteStreamInternals().m_##name##Function.get() , JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly),
- WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
+ clientData.builtinFunctions().writableStreamInternalsBuiltins().name##PrivateName(), writableStreamInternals().m_##name##Function.get() , JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly),
+ WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
#undef DECLARE_GLOBAL_STATIC
};
diff --git a/src/js/out/WebCoreJSBuiltins.d.ts b/src/js/out/WebCoreJSBuiltins.d.ts
index b05f2b681..e57e85dea 100644
--- a/src/js/out/WebCoreJSBuiltins.d.ts
+++ b/src/js/out/WebCoreJSBuiltins.d.ts
@@ -2,57 +2,6 @@
// Do not edit by hand.
type RemoveThis<F> = F extends (this: infer T, ...args: infer A) => infer R ? (...args: A) => R : F;
-// WritableStreamInternals.ts
-declare const $isWritableStream: RemoveThis<typeof import("../builtins/WritableStreamInternals")["isWritableStream"]>;
-declare const $isWritableStreamDefaultWriter: RemoveThis<typeof import("../builtins/WritableStreamInternals")["isWritableStreamDefaultWriter"]>;
-declare const $acquireWritableStreamDefaultWriter: RemoveThis<typeof import("../builtins/WritableStreamInternals")["acquireWritableStreamDefaultWriter"]>;
-declare const $createWritableStream: RemoveThis<typeof import("../builtins/WritableStreamInternals")["createWritableStream"]>;
-declare const $createInternalWritableStreamFromUnderlyingSink: RemoveThis<typeof import("../builtins/WritableStreamInternals")["createInternalWritableStreamFromUnderlyingSink"]>;
-declare const $initializeWritableStreamSlots: RemoveThis<typeof import("../builtins/WritableStreamInternals")["initializeWritableStreamSlots"]>;
-declare const $writableStreamCloseForBindings: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamCloseForBindings"]>;
-declare const $writableStreamAbortForBindings: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamAbortForBindings"]>;
-declare const $isWritableStreamLocked: RemoveThis<typeof import("../builtins/WritableStreamInternals")["isWritableStreamLocked"]>;
-declare const $setUpWritableStreamDefaultWriter: RemoveThis<typeof import("../builtins/WritableStreamInternals")["setUpWritableStreamDefaultWriter"]>;
-declare const $writableStreamAbort: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamAbort"]>;
-declare const $writableStreamClose: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamClose"]>;
-declare const $writableStreamAddWriteRequest: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamAddWriteRequest"]>;
-declare const $writableStreamCloseQueuedOrInFlight: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamCloseQueuedOrInFlight"]>;
-declare const $writableStreamDealWithRejection: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDealWithRejection"]>;
-declare const $writableStreamFinishErroring: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamFinishErroring"]>;
-declare const $writableStreamFinishInFlightClose: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamFinishInFlightClose"]>;
-declare const $writableStreamFinishInFlightCloseWithError: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamFinishInFlightCloseWithError"]>;
-declare const $writableStreamFinishInFlightWrite: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamFinishInFlightWrite"]>;
-declare const $writableStreamFinishInFlightWriteWithError: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamFinishInFlightWriteWithError"]>;
-declare const $writableStreamHasOperationMarkedInFlight: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamHasOperationMarkedInFlight"]>;
-declare const $writableStreamMarkCloseRequestInFlight: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamMarkCloseRequestInFlight"]>;
-declare const $writableStreamMarkFirstWriteRequestInFlight: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamMarkFirstWriteRequestInFlight"]>;
-declare const $writableStreamRejectCloseAndClosedPromiseIfNeeded: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamRejectCloseAndClosedPromiseIfNeeded"]>;
-declare const $writableStreamStartErroring: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamStartErroring"]>;
-declare const $writableStreamUpdateBackpressure: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamUpdateBackpressure"]>;
-declare const $writableStreamDefaultWriterAbort: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultWriterAbort"]>;
-declare const $writableStreamDefaultWriterClose: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultWriterClose"]>;
-declare const $writableStreamDefaultWriterCloseWithErrorPropagation: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultWriterCloseWithErrorPropagation"]>;
-declare const $writableStreamDefaultWriterEnsureClosedPromiseRejected: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultWriterEnsureClosedPromiseRejected"]>;
-declare const $writableStreamDefaultWriterEnsureReadyPromiseRejected: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultWriterEnsureReadyPromiseRejected"]>;
-declare const $writableStreamDefaultWriterGetDesiredSize: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultWriterGetDesiredSize"]>;
-declare const $writableStreamDefaultWriterRelease: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultWriterRelease"]>;
-declare const $writableStreamDefaultWriterWrite: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultWriterWrite"]>;
-declare const $setUpWritableStreamDefaultController: RemoveThis<typeof import("../builtins/WritableStreamInternals")["setUpWritableStreamDefaultController"]>;
-declare const $writableStreamDefaultControllerStart: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerStart"]>;
-declare const $setUpWritableStreamDefaultControllerFromUnderlyingSink: RemoveThis<typeof import("../builtins/WritableStreamInternals")["setUpWritableStreamDefaultControllerFromUnderlyingSink"]>;
-declare const $writableStreamDefaultControllerAdvanceQueueIfNeeded: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerAdvanceQueueIfNeeded"]>;
-declare const $isCloseSentinel: RemoveThis<typeof import("../builtins/WritableStreamInternals")["isCloseSentinel"]>;
-declare const $writableStreamDefaultControllerClearAlgorithms: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerClearAlgorithms"]>;
-declare const $writableStreamDefaultControllerClose: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerClose"]>;
-declare const $writableStreamDefaultControllerError: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerError"]>;
-declare const $writableStreamDefaultControllerErrorIfNeeded: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerErrorIfNeeded"]>;
-declare const $writableStreamDefaultControllerGetBackpressure: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerGetBackpressure"]>;
-declare const $writableStreamDefaultControllerGetChunkSize: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerGetChunkSize"]>;
-declare const $writableStreamDefaultControllerGetDesiredSize: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerGetDesiredSize"]>;
-declare const $writableStreamDefaultControllerProcessClose: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerProcessClose"]>;
-declare const $writableStreamDefaultControllerProcessWrite: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerProcessWrite"]>;
-declare const $writableStreamDefaultControllerWrite: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerWrite"]>;
-
// TransformStreamInternals.ts
declare const $isTransformStream: RemoveThis<typeof import("../builtins/TransformStreamInternals")["isTransformStream"]>;
declare const $isTransformStreamDefaultController: RemoveThis<typeof import("../builtins/TransformStreamInternals")["isTransformStreamDefaultController"]>;
@@ -139,27 +88,6 @@ declare const $readableStreamToTextDirect: RemoveThis<typeof import("../builtins
declare const $readableStreamToArrayDirect: RemoveThis<typeof import("../builtins/ReadableStreamInternals")["readableStreamToArrayDirect"]>;
declare const $readableStreamDefineLazyIterators: RemoveThis<typeof import("../builtins/ReadableStreamInternals")["readableStreamDefineLazyIterators"]>;
-// StreamInternals.ts
-declare const $markPromiseAsHandled: RemoveThis<typeof import("../builtins/StreamInternals")["markPromiseAsHandled"]>;
-declare const $shieldingPromiseResolve: RemoveThis<typeof import("../builtins/StreamInternals")["shieldingPromiseResolve"]>;
-declare const $promiseInvokeOrNoopMethodNoCatch: RemoveThis<typeof import("../builtins/StreamInternals")["promiseInvokeOrNoopMethodNoCatch"]>;
-declare const $promiseInvokeOrNoopNoCatch: RemoveThis<typeof import("../builtins/StreamInternals")["promiseInvokeOrNoopNoCatch"]>;
-declare const $promiseInvokeOrNoopMethod: RemoveThis<typeof import("../builtins/StreamInternals")["promiseInvokeOrNoopMethod"]>;
-declare const $promiseInvokeOrNoop: RemoveThis<typeof import("../builtins/StreamInternals")["promiseInvokeOrNoop"]>;
-declare const $promiseInvokeOrFallbackOrNoop: RemoveThis<typeof import("../builtins/StreamInternals")["promiseInvokeOrFallbackOrNoop"]>;
-declare const $validateAndNormalizeQueuingStrategy: RemoveThis<typeof import("../builtins/StreamInternals")["validateAndNormalizeQueuingStrategy"]>;
-declare const $createFIFO: RemoveThis<typeof import("../builtins/StreamInternals")["createFIFO"]>;
-declare const $newQueue: RemoveThis<typeof import("../builtins/StreamInternals")["newQueue"]>;
-declare const $dequeueValue: RemoveThis<typeof import("../builtins/StreamInternals")["dequeueValue"]>;
-declare const $enqueueValueWithSize: RemoveThis<typeof import("../builtins/StreamInternals")["enqueueValueWithSize"]>;
-declare const $peekQueueValue: RemoveThis<typeof import("../builtins/StreamInternals")["peekQueueValue"]>;
-declare const $resetQueue: RemoveThis<typeof import("../builtins/StreamInternals")["resetQueue"]>;
-declare const $extractSizeAlgorithm: RemoveThis<typeof import("../builtins/StreamInternals")["extractSizeAlgorithm"]>;
-declare const $extractHighWaterMark: RemoveThis<typeof import("../builtins/StreamInternals")["extractHighWaterMark"]>;
-declare const $extractHighWaterMarkFromQueuingStrategyInit: RemoveThis<typeof import("../builtins/StreamInternals")["extractHighWaterMarkFromQueuingStrategyInit"]>;
-declare const $createFulfilledPromise: RemoveThis<typeof import("../builtins/StreamInternals")["createFulfilledPromise"]>;
-declare const $toDictionary: RemoveThis<typeof import("../builtins/StreamInternals")["toDictionary"]>;
-
// ReadableByteStreamInternals.ts
declare const $privateInitializeReadableByteStreamController: RemoveThis<typeof import("../builtins/ReadableByteStreamInternals")["privateInitializeReadableByteStreamController"]>;
declare const $readableStreamByteStreamControllerStart: RemoveThis<typeof import("../builtins/ReadableByteStreamInternals")["readableStreamByteStreamControllerStart"]>;
@@ -197,3 +125,75 @@ declare const $readableStreamFulfillReadIntoRequest: RemoveThis<typeof import(".
declare const $readableStreamBYOBReaderRead: RemoveThis<typeof import("../builtins/ReadableByteStreamInternals")["readableStreamBYOBReaderRead"]>;
declare const $readableByteStreamControllerPullInto: RemoveThis<typeof import("../builtins/ReadableByteStreamInternals")["readableByteStreamControllerPullInto"]>;
declare const $readableStreamAddReadIntoRequest: RemoveThis<typeof import("../builtins/ReadableByteStreamInternals")["readableStreamAddReadIntoRequest"]>;
+
+// StreamInternals.ts
+declare const $markPromiseAsHandled: RemoveThis<typeof import("../builtins/StreamInternals")["markPromiseAsHandled"]>;
+declare const $shieldingPromiseResolve: RemoveThis<typeof import("../builtins/StreamInternals")["shieldingPromiseResolve"]>;
+declare const $promiseInvokeOrNoopMethodNoCatch: RemoveThis<typeof import("../builtins/StreamInternals")["promiseInvokeOrNoopMethodNoCatch"]>;
+declare const $promiseInvokeOrNoopNoCatch: RemoveThis<typeof import("../builtins/StreamInternals")["promiseInvokeOrNoopNoCatch"]>;
+declare const $promiseInvokeOrNoopMethod: RemoveThis<typeof import("../builtins/StreamInternals")["promiseInvokeOrNoopMethod"]>;
+declare const $promiseInvokeOrNoop: RemoveThis<typeof import("../builtins/StreamInternals")["promiseInvokeOrNoop"]>;
+declare const $promiseInvokeOrFallbackOrNoop: RemoveThis<typeof import("../builtins/StreamInternals")["promiseInvokeOrFallbackOrNoop"]>;
+declare const $validateAndNormalizeQueuingStrategy: RemoveThis<typeof import("../builtins/StreamInternals")["validateAndNormalizeQueuingStrategy"]>;
+declare const $createFIFO: RemoveThis<typeof import("../builtins/StreamInternals")["createFIFO"]>;
+declare const $newQueue: RemoveThis<typeof import("../builtins/StreamInternals")["newQueue"]>;
+declare const $dequeueValue: RemoveThis<typeof import("../builtins/StreamInternals")["dequeueValue"]>;
+declare const $enqueueValueWithSize: RemoveThis<typeof import("../builtins/StreamInternals")["enqueueValueWithSize"]>;
+declare const $peekQueueValue: RemoveThis<typeof import("../builtins/StreamInternals")["peekQueueValue"]>;
+declare const $resetQueue: RemoveThis<typeof import("../builtins/StreamInternals")["resetQueue"]>;
+declare const $extractSizeAlgorithm: RemoveThis<typeof import("../builtins/StreamInternals")["extractSizeAlgorithm"]>;
+declare const $extractHighWaterMark: RemoveThis<typeof import("../builtins/StreamInternals")["extractHighWaterMark"]>;
+declare const $extractHighWaterMarkFromQueuingStrategyInit: RemoveThis<typeof import("../builtins/StreamInternals")["extractHighWaterMarkFromQueuingStrategyInit"]>;
+declare const $createFulfilledPromise: RemoveThis<typeof import("../builtins/StreamInternals")["createFulfilledPromise"]>;
+declare const $toDictionary: RemoveThis<typeof import("../builtins/StreamInternals")["toDictionary"]>;
+
+// WritableStreamInternals.ts
+declare const $isWritableStream: RemoveThis<typeof import("../builtins/WritableStreamInternals")["isWritableStream"]>;
+declare const $isWritableStreamDefaultWriter: RemoveThis<typeof import("../builtins/WritableStreamInternals")["isWritableStreamDefaultWriter"]>;
+declare const $acquireWritableStreamDefaultWriter: RemoveThis<typeof import("../builtins/WritableStreamInternals")["acquireWritableStreamDefaultWriter"]>;
+declare const $createWritableStream: RemoveThis<typeof import("../builtins/WritableStreamInternals")["createWritableStream"]>;
+declare const $createInternalWritableStreamFromUnderlyingSink: RemoveThis<typeof import("../builtins/WritableStreamInternals")["createInternalWritableStreamFromUnderlyingSink"]>;
+declare const $initializeWritableStreamSlots: RemoveThis<typeof import("../builtins/WritableStreamInternals")["initializeWritableStreamSlots"]>;
+declare const $writableStreamCloseForBindings: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamCloseForBindings"]>;
+declare const $writableStreamAbortForBindings: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamAbortForBindings"]>;
+declare const $isWritableStreamLocked: RemoveThis<typeof import("../builtins/WritableStreamInternals")["isWritableStreamLocked"]>;
+declare const $setUpWritableStreamDefaultWriter: RemoveThis<typeof import("../builtins/WritableStreamInternals")["setUpWritableStreamDefaultWriter"]>;
+declare const $writableStreamAbort: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamAbort"]>;
+declare const $writableStreamClose: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamClose"]>;
+declare const $writableStreamAddWriteRequest: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamAddWriteRequest"]>;
+declare const $writableStreamCloseQueuedOrInFlight: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamCloseQueuedOrInFlight"]>;
+declare const $writableStreamDealWithRejection: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDealWithRejection"]>;
+declare const $writableStreamFinishErroring: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamFinishErroring"]>;
+declare const $writableStreamFinishInFlightClose: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamFinishInFlightClose"]>;
+declare const $writableStreamFinishInFlightCloseWithError: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamFinishInFlightCloseWithError"]>;
+declare const $writableStreamFinishInFlightWrite: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamFinishInFlightWrite"]>;
+declare const $writableStreamFinishInFlightWriteWithError: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamFinishInFlightWriteWithError"]>;
+declare const $writableStreamHasOperationMarkedInFlight: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamHasOperationMarkedInFlight"]>;
+declare const $writableStreamMarkCloseRequestInFlight: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamMarkCloseRequestInFlight"]>;
+declare const $writableStreamMarkFirstWriteRequestInFlight: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamMarkFirstWriteRequestInFlight"]>;
+declare const $writableStreamRejectCloseAndClosedPromiseIfNeeded: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamRejectCloseAndClosedPromiseIfNeeded"]>;
+declare const $writableStreamStartErroring: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamStartErroring"]>;
+declare const $writableStreamUpdateBackpressure: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamUpdateBackpressure"]>;
+declare const $writableStreamDefaultWriterAbort: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultWriterAbort"]>;
+declare const $writableStreamDefaultWriterClose: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultWriterClose"]>;
+declare const $writableStreamDefaultWriterCloseWithErrorPropagation: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultWriterCloseWithErrorPropagation"]>;
+declare const $writableStreamDefaultWriterEnsureClosedPromiseRejected: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultWriterEnsureClosedPromiseRejected"]>;
+declare const $writableStreamDefaultWriterEnsureReadyPromiseRejected: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultWriterEnsureReadyPromiseRejected"]>;
+declare const $writableStreamDefaultWriterGetDesiredSize: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultWriterGetDesiredSize"]>;
+declare const $writableStreamDefaultWriterRelease: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultWriterRelease"]>;
+declare const $writableStreamDefaultWriterWrite: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultWriterWrite"]>;
+declare const $setUpWritableStreamDefaultController: RemoveThis<typeof import("../builtins/WritableStreamInternals")["setUpWritableStreamDefaultController"]>;
+declare const $writableStreamDefaultControllerStart: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerStart"]>;
+declare const $setUpWritableStreamDefaultControllerFromUnderlyingSink: RemoveThis<typeof import("../builtins/WritableStreamInternals")["setUpWritableStreamDefaultControllerFromUnderlyingSink"]>;
+declare const $writableStreamDefaultControllerAdvanceQueueIfNeeded: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerAdvanceQueueIfNeeded"]>;
+declare const $isCloseSentinel: RemoveThis<typeof import("../builtins/WritableStreamInternals")["isCloseSentinel"]>;
+declare const $writableStreamDefaultControllerClearAlgorithms: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerClearAlgorithms"]>;
+declare const $writableStreamDefaultControllerClose: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerClose"]>;
+declare const $writableStreamDefaultControllerError: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerError"]>;
+declare const $writableStreamDefaultControllerErrorIfNeeded: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerErrorIfNeeded"]>;
+declare const $writableStreamDefaultControllerGetBackpressure: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerGetBackpressure"]>;
+declare const $writableStreamDefaultControllerGetChunkSize: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerGetChunkSize"]>;
+declare const $writableStreamDefaultControllerGetDesiredSize: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerGetDesiredSize"]>;
+declare const $writableStreamDefaultControllerProcessClose: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerProcessClose"]>;
+declare const $writableStreamDefaultControllerProcessWrite: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerProcessWrite"]>;
+declare const $writableStreamDefaultControllerWrite: RemoveThis<typeof import("../builtins/WritableStreamInternals")["writableStreamDefaultControllerWrite"]>;
diff --git a/src/js/out/WebCoreJSBuiltins.h b/src/js/out/WebCoreJSBuiltins.h
index cf28fa82a..18d357229 100644
--- a/src/js/out/WebCoreJSBuiltins.h
+++ b/src/js/out/WebCoreJSBuiltins.h
@@ -15,159 +15,114 @@ class FunctionExecutable;
}
namespace WebCore {
-/* BundlerPlugin.ts */
-// runSetupFunction
-#define WEBCORE_BUILTIN_BUNDLERPLUGIN_RUNSETUPFUNCTION 1
-extern const char* const s_bundlerPluginRunSetupFunctionCode;
-extern const int s_bundlerPluginRunSetupFunctionCodeLength;
-extern const JSC::ConstructAbility s_bundlerPluginRunSetupFunctionCodeConstructAbility;
-extern const JSC::ConstructorKind s_bundlerPluginRunSetupFunctionCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_bundlerPluginRunSetupFunctionCodeImplementationVisibility;
-
-// runOnResolvePlugins
-#define WEBCORE_BUILTIN_BUNDLERPLUGIN_RUNONRESOLVEPLUGINS 1
-extern const char* const s_bundlerPluginRunOnResolvePluginsCode;
-extern const int s_bundlerPluginRunOnResolvePluginsCodeLength;
-extern const JSC::ConstructAbility s_bundlerPluginRunOnResolvePluginsCodeConstructAbility;
-extern const JSC::ConstructorKind s_bundlerPluginRunOnResolvePluginsCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_bundlerPluginRunOnResolvePluginsCodeImplementationVisibility;
-
-// runOnLoadPlugins
-#define WEBCORE_BUILTIN_BUNDLERPLUGIN_RUNONLOADPLUGINS 1
-extern const char* const s_bundlerPluginRunOnLoadPluginsCode;
-extern const int s_bundlerPluginRunOnLoadPluginsCodeLength;
-extern const JSC::ConstructAbility s_bundlerPluginRunOnLoadPluginsCodeConstructAbility;
-extern const JSC::ConstructorKind s_bundlerPluginRunOnLoadPluginsCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_bundlerPluginRunOnLoadPluginsCodeImplementationVisibility;
-
-#define WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_DATA(macro) \
- macro(runSetupFunction, bundlerPluginRunSetupFunction, 2) \
- macro(runOnResolvePlugins, bundlerPluginRunOnResolvePlugins, 5) \
- macro(runOnLoadPlugins, bundlerPluginRunOnLoadPlugins, 4) \
-
-#define WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_CODE(macro) \
- macro(bundlerPluginRunSetupFunctionCode, runSetupFunction, ASCIILiteral(), s_bundlerPluginRunSetupFunctionCodeLength) \
- macro(bundlerPluginRunOnResolvePluginsCode, runOnResolvePlugins, ASCIILiteral(), s_bundlerPluginRunOnResolvePluginsCodeLength) \
- macro(bundlerPluginRunOnLoadPluginsCode, runOnLoadPlugins, ASCIILiteral(), s_bundlerPluginRunOnLoadPluginsCodeLength) \
-
-#define WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_FUNCTION_NAME(macro) \
- macro(runSetupFunction) \
- macro(runOnResolvePlugins) \
- macro(runOnLoadPlugins) \
-
-#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
- JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-
-WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
-#undef DECLARE_BUILTIN_GENERATOR
-
-class BundlerPluginBuiltinsWrapper : private JSC::WeakHandleOwner {
-public:
- explicit BundlerPluginBuiltinsWrapper(JSC::VM& vm)
- : m_vm(vm)
- WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
-#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
-#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
- {
- }
-
-#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
- JSC::UnlinkedFunctionExecutable* name##Executable(); \
- const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
-#undef EXPOSE_BUILTIN_EXECUTABLES
-
- WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
-
- void exportNames();
-
-private:
- JSC::VM& m_vm;
+/* WritableStreamDefaultWriter.ts */
+// initializeWritableStreamDefaultWriter
+#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTWRITER_INITIALIZEWRITABLESTREAMDEFAULTWRITER 1
+extern const char* const s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCode;
+extern const int s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeLength;
+extern const JSC::ConstructAbility s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeImplementationVisibility;
- WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+// closed
+#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTWRITER_CLOSED 1
+extern const char* const s_writableStreamDefaultWriterClosedCode;
+extern const int s_writableStreamDefaultWriterClosedCodeLength;
+extern const JSC::ConstructAbility s_writableStreamDefaultWriterClosedCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamDefaultWriterClosedCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamDefaultWriterClosedCodeImplementationVisibility;
-#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
- JSC::SourceCode m_##name##Source;\
- JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
-#undef DECLARE_BUILTIN_SOURCE_MEMBERS
+// desiredSize
+#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTWRITER_DESIREDSIZE 1
+extern const char* const s_writableStreamDefaultWriterDesiredSizeCode;
+extern const int s_writableStreamDefaultWriterDesiredSizeCodeLength;
+extern const JSC::ConstructAbility s_writableStreamDefaultWriterDesiredSizeCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamDefaultWriterDesiredSizeCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamDefaultWriterDesiredSizeCodeImplementationVisibility;
-};
+// ready
+#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTWRITER_READY 1
+extern const char* const s_writableStreamDefaultWriterReadyCode;
+extern const int s_writableStreamDefaultWriterReadyCodeLength;
+extern const JSC::ConstructAbility s_writableStreamDefaultWriterReadyCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamDefaultWriterReadyCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamDefaultWriterReadyCodeImplementationVisibility;
-#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* BundlerPluginBuiltinsWrapper::name##Executable() \
-{\
- if (!m_##name##Executable) {\
- JSC::Identifier executableName = functionName##PublicName();\
- if (overriddenName)\
- executableName = JSC::Identifier::fromString(m_vm, overriddenName);\
- m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, executableName, s_##name##ImplementationVisibility, s_##name##ConstructorKind, s_##name##ConstructAbility), this, &m_##name##Executable);\
- }\
- return m_##name##Executable.get();\
-}
-WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
-#undef DEFINE_BUILTIN_EXECUTABLES
+// abort
+#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTWRITER_ABORT 1
+extern const char* const s_writableStreamDefaultWriterAbortCode;
+extern const int s_writableStreamDefaultWriterAbortCodeLength;
+extern const JSC::ConstructAbility s_writableStreamDefaultWriterAbortCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamDefaultWriterAbortCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamDefaultWriterAbortCodeImplementationVisibility;
-inline void BundlerPluginBuiltinsWrapper::exportNames()
-{
-#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
-#undef EXPORT_FUNCTION_NAME
-}
-/* ByteLengthQueuingStrategy.ts */
-// highWaterMark
-#define WEBCORE_BUILTIN_BYTELENGTHQUEUINGSTRATEGY_HIGHWATERMARK 1
-extern const char* const s_byteLengthQueuingStrategyHighWaterMarkCode;
-extern const int s_byteLengthQueuingStrategyHighWaterMarkCodeLength;
-extern const JSC::ConstructAbility s_byteLengthQueuingStrategyHighWaterMarkCodeConstructAbility;
-extern const JSC::ConstructorKind s_byteLengthQueuingStrategyHighWaterMarkCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_byteLengthQueuingStrategyHighWaterMarkCodeImplementationVisibility;
+// close
+#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTWRITER_CLOSE 1
+extern const char* const s_writableStreamDefaultWriterCloseCode;
+extern const int s_writableStreamDefaultWriterCloseCodeLength;
+extern const JSC::ConstructAbility s_writableStreamDefaultWriterCloseCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamDefaultWriterCloseCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamDefaultWriterCloseCodeImplementationVisibility;
-// size
-#define WEBCORE_BUILTIN_BYTELENGTHQUEUINGSTRATEGY_SIZE 1
-extern const char* const s_byteLengthQueuingStrategySizeCode;
-extern const int s_byteLengthQueuingStrategySizeCodeLength;
-extern const JSC::ConstructAbility s_byteLengthQueuingStrategySizeCodeConstructAbility;
-extern const JSC::ConstructorKind s_byteLengthQueuingStrategySizeCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_byteLengthQueuingStrategySizeCodeImplementationVisibility;
+// releaseLock
+#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTWRITER_RELEASELOCK 1
+extern const char* const s_writableStreamDefaultWriterReleaseLockCode;
+extern const int s_writableStreamDefaultWriterReleaseLockCodeLength;
+extern const JSC::ConstructAbility s_writableStreamDefaultWriterReleaseLockCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamDefaultWriterReleaseLockCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamDefaultWriterReleaseLockCodeImplementationVisibility;
-// initializeByteLengthQueuingStrategy
-#define WEBCORE_BUILTIN_BYTELENGTHQUEUINGSTRATEGY_INITIALIZEBYTELENGTHQUEUINGSTRATEGY 1
-extern const char* const s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCode;
-extern const int s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeLength;
-extern const JSC::ConstructAbility s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeConstructAbility;
-extern const JSC::ConstructorKind s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeImplementationVisibility;
+// write
+#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTWRITER_WRITE 1
+extern const char* const s_writableStreamDefaultWriterWriteCode;
+extern const int s_writableStreamDefaultWriterWriteCodeLength;
+extern const JSC::ConstructAbility s_writableStreamDefaultWriterWriteCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamDefaultWriterWriteCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamDefaultWriterWriteCodeImplementationVisibility;
-#define WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_DATA(macro) \
- macro(highWaterMark, byteLengthQueuingStrategyHighWaterMark, 0) \
- macro(size, byteLengthQueuingStrategySize, 1) \
- macro(initializeByteLengthQueuingStrategy, byteLengthQueuingStrategyInitializeByteLengthQueuingStrategy, 1) \
+#define WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_DATA(macro) \
+ macro(initializeWritableStreamDefaultWriter, writableStreamDefaultWriterInitializeWritableStreamDefaultWriter, 1) \
+ macro(closed, writableStreamDefaultWriterClosed, 0) \
+ macro(desiredSize, writableStreamDefaultWriterDesiredSize, 0) \
+ macro(ready, writableStreamDefaultWriterReady, 0) \
+ macro(abort, writableStreamDefaultWriterAbort, 1) \
+ macro(close, writableStreamDefaultWriterClose, 0) \
+ macro(releaseLock, writableStreamDefaultWriterReleaseLock, 0) \
+ macro(write, writableStreamDefaultWriterWrite, 1) \
-#define WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_CODE(macro) \
- macro(byteLengthQueuingStrategyHighWaterMarkCode, highWaterMark, "get highWaterMark"_s, s_byteLengthQueuingStrategyHighWaterMarkCodeLength) \
- macro(byteLengthQueuingStrategySizeCode, size, ASCIILiteral(), s_byteLengthQueuingStrategySizeCodeLength) \
- macro(byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCode, initializeByteLengthQueuingStrategy, ASCIILiteral(), s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeLength) \
+#define WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_CODE(macro) \
+ macro(writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCode, initializeWritableStreamDefaultWriter, ASCIILiteral(), s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeLength) \
+ macro(writableStreamDefaultWriterClosedCode, closed, "get closed"_s, s_writableStreamDefaultWriterClosedCodeLength) \
+ macro(writableStreamDefaultWriterDesiredSizeCode, desiredSize, "get desiredSize"_s, s_writableStreamDefaultWriterDesiredSizeCodeLength) \
+ macro(writableStreamDefaultWriterReadyCode, ready, "get ready"_s, s_writableStreamDefaultWriterReadyCodeLength) \
+ macro(writableStreamDefaultWriterAbortCode, abort, ASCIILiteral(), s_writableStreamDefaultWriterAbortCodeLength) \
+ macro(writableStreamDefaultWriterCloseCode, close, ASCIILiteral(), s_writableStreamDefaultWriterCloseCodeLength) \
+ macro(writableStreamDefaultWriterReleaseLockCode, releaseLock, ASCIILiteral(), s_writableStreamDefaultWriterReleaseLockCodeLength) \
+ macro(writableStreamDefaultWriterWriteCode, write, ASCIILiteral(), s_writableStreamDefaultWriterWriteCodeLength) \
-#define WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(macro) \
- macro(highWaterMark) \
- macro(size) \
- macro(initializeByteLengthQueuingStrategy) \
+#define WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_FUNCTION_NAME(macro) \
+ macro(initializeWritableStreamDefaultWriter) \
+ macro(closed) \
+ macro(desiredSize) \
+ macro(ready) \
+ macro(abort) \
+ macro(close) \
+ macro(releaseLock) \
+ macro(write) \
#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
#undef DECLARE_BUILTIN_GENERATOR
-class ByteLengthQueuingStrategyBuiltinsWrapper : private JSC::WeakHandleOwner {
+class WritableStreamDefaultWriterBuiltinsWrapper : private JSC::WeakHandleOwner {
public:
- explicit ByteLengthQueuingStrategyBuiltinsWrapper(JSC::VM& vm)
+ explicit WritableStreamDefaultWriterBuiltinsWrapper(JSC::VM& vm)
: m_vm(vm)
- WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
{
}
@@ -175,28 +130,28 @@ public:
#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
JSC::UnlinkedFunctionExecutable* name##Executable(); \
const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+ WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
#undef EXPOSE_BUILTIN_EXECUTABLES
- WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+ WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
void exportNames();
private:
JSC::VM& m_vm;
- WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
JSC::SourceCode m_##name##Source;\
JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
#undef DECLARE_BUILTIN_SOURCE_MEMBERS
};
#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* ByteLengthQueuingStrategyBuiltinsWrapper::name##Executable() \
+inline JSC::UnlinkedFunctionExecutable* WritableStreamDefaultWriterBuiltinsWrapper::name##Executable() \
{\
if (!m_##name##Executable) {\
JSC::Identifier executableName = functionName##PublicName();\
@@ -206,574 +161,57 @@ inline JSC::UnlinkedFunctionExecutable* ByteLengthQueuingStrategyBuiltinsWrapper
}\
return m_##name##Executable.get();\
}
-WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
#undef DEFINE_BUILTIN_EXECUTABLES
-inline void ByteLengthQueuingStrategyBuiltinsWrapper::exportNames()
+inline void WritableStreamDefaultWriterBuiltinsWrapper::exportNames()
{
#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+ WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
-/* WritableStreamInternals.ts */
-// isWritableStream
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_ISWRITABLESTREAM 1
-extern const char* const s_writableStreamInternalsIsWritableStreamCode;
-extern const int s_writableStreamInternalsIsWritableStreamCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsIsWritableStreamCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsIsWritableStreamCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsIsWritableStreamCodeImplementationVisibility;
-
-// isWritableStreamDefaultWriter
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_ISWRITABLESTREAMDEFAULTWRITER 1
-extern const char* const s_writableStreamInternalsIsWritableStreamDefaultWriterCode;
-extern const int s_writableStreamInternalsIsWritableStreamDefaultWriterCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsIsWritableStreamDefaultWriterCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsIsWritableStreamDefaultWriterCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsIsWritableStreamDefaultWriterCodeImplementationVisibility;
-
-// acquireWritableStreamDefaultWriter
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_ACQUIREWRITABLESTREAMDEFAULTWRITER 1
-extern const char* const s_writableStreamInternalsAcquireWritableStreamDefaultWriterCode;
-extern const int s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeImplementationVisibility;
-
-// createWritableStream
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_CREATEWRITABLESTREAM 1
-extern const char* const s_writableStreamInternalsCreateWritableStreamCode;
-extern const int s_writableStreamInternalsCreateWritableStreamCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsCreateWritableStreamCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsCreateWritableStreamCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsCreateWritableStreamCodeImplementationVisibility;
-
-// createInternalWritableStreamFromUnderlyingSink
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_CREATEINTERNALWRITABLESTREAMFROMUNDERLYINGSINK 1
-extern const char* const s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCode;
-extern const int s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeImplementationVisibility;
-
-// initializeWritableStreamSlots
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_INITIALIZEWRITABLESTREAMSLOTS 1
-extern const char* const s_writableStreamInternalsInitializeWritableStreamSlotsCode;
-extern const int s_writableStreamInternalsInitializeWritableStreamSlotsCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsInitializeWritableStreamSlotsCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsInitializeWritableStreamSlotsCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsInitializeWritableStreamSlotsCodeImplementationVisibility;
-
-// writableStreamCloseForBindings
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMCLOSEFORBINDINGS 1
-extern const char* const s_writableStreamInternalsWritableStreamCloseForBindingsCode;
-extern const int s_writableStreamInternalsWritableStreamCloseForBindingsCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamCloseForBindingsCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamCloseForBindingsCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamCloseForBindingsCodeImplementationVisibility;
-
-// writableStreamAbortForBindings
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMABORTFORBINDINGS 1
-extern const char* const s_writableStreamInternalsWritableStreamAbortForBindingsCode;
-extern const int s_writableStreamInternalsWritableStreamAbortForBindingsCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamAbortForBindingsCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamAbortForBindingsCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamAbortForBindingsCodeImplementationVisibility;
-
-// isWritableStreamLocked
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_ISWRITABLESTREAMLOCKED 1
-extern const char* const s_writableStreamInternalsIsWritableStreamLockedCode;
-extern const int s_writableStreamInternalsIsWritableStreamLockedCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsIsWritableStreamLockedCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsIsWritableStreamLockedCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsIsWritableStreamLockedCodeImplementationVisibility;
-
-// setUpWritableStreamDefaultWriter
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_SETUPWRITABLESTREAMDEFAULTWRITER 1
-extern const char* const s_writableStreamInternalsSetUpWritableStreamDefaultWriterCode;
-extern const int s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeImplementationVisibility;
-
-// writableStreamAbort
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMABORT 1
-extern const char* const s_writableStreamInternalsWritableStreamAbortCode;
-extern const int s_writableStreamInternalsWritableStreamAbortCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamAbortCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamAbortCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamAbortCodeImplementationVisibility;
-
-// writableStreamClose
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMCLOSE 1
-extern const char* const s_writableStreamInternalsWritableStreamCloseCode;
-extern const int s_writableStreamInternalsWritableStreamCloseCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamCloseCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamCloseCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamCloseCodeImplementationVisibility;
-
-// writableStreamAddWriteRequest
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMADDWRITEREQUEST 1
-extern const char* const s_writableStreamInternalsWritableStreamAddWriteRequestCode;
-extern const int s_writableStreamInternalsWritableStreamAddWriteRequestCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamAddWriteRequestCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamAddWriteRequestCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamAddWriteRequestCodeImplementationVisibility;
-
-// writableStreamCloseQueuedOrInFlight
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMCLOSEQUEUEDORINFLIGHT 1
-extern const char* const s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCode;
-extern const int s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeImplementationVisibility;
-
-// writableStreamDealWithRejection
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEALWITHREJECTION 1
-extern const char* const s_writableStreamInternalsWritableStreamDealWithRejectionCode;
-extern const int s_writableStreamInternalsWritableStreamDealWithRejectionCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDealWithRejectionCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDealWithRejectionCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDealWithRejectionCodeImplementationVisibility;
-
-// writableStreamFinishErroring
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMFINISHERRORING 1
-extern const char* const s_writableStreamInternalsWritableStreamFinishErroringCode;
-extern const int s_writableStreamInternalsWritableStreamFinishErroringCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishErroringCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishErroringCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishErroringCodeImplementationVisibility;
-
-// writableStreamFinishInFlightClose
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMFINISHINFLIGHTCLOSE 1
-extern const char* const s_writableStreamInternalsWritableStreamFinishInFlightCloseCode;
-extern const int s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeImplementationVisibility;
-
-// writableStreamFinishInFlightCloseWithError
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMFINISHINFLIGHTCLOSEWITHERROR 1
-extern const char* const s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCode;
-extern const int s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeImplementationVisibility;
-
-// writableStreamFinishInFlightWrite
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMFINISHINFLIGHTWRITE 1
-extern const char* const s_writableStreamInternalsWritableStreamFinishInFlightWriteCode;
-extern const int s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeImplementationVisibility;
-
-// writableStreamFinishInFlightWriteWithError
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMFINISHINFLIGHTWRITEWITHERROR 1
-extern const char* const s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCode;
-extern const int s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeImplementationVisibility;
-
-// writableStreamHasOperationMarkedInFlight
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMHASOPERATIONMARKEDINFLIGHT 1
-extern const char* const s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCode;
-extern const int s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeImplementationVisibility;
-
-// writableStreamMarkCloseRequestInFlight
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMMARKCLOSEREQUESTINFLIGHT 1
-extern const char* const s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCode;
-extern const int s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeImplementationVisibility;
-
-// writableStreamMarkFirstWriteRequestInFlight
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMMARKFIRSTWRITEREQUESTINFLIGHT 1
-extern const char* const s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCode;
-extern const int s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeImplementationVisibility;
-
-// writableStreamRejectCloseAndClosedPromiseIfNeeded
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMREJECTCLOSEANDCLOSEDPROMISEIFNEEDED 1
-extern const char* const s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCode;
-extern const int s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeImplementationVisibility;
-
-// writableStreamStartErroring
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMSTARTERRORING 1
-extern const char* const s_writableStreamInternalsWritableStreamStartErroringCode;
-extern const int s_writableStreamInternalsWritableStreamStartErroringCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamStartErroringCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamStartErroringCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamStartErroringCodeImplementationVisibility;
-
-// writableStreamUpdateBackpressure
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMUPDATEBACKPRESSURE 1
-extern const char* const s_writableStreamInternalsWritableStreamUpdateBackpressureCode;
-extern const int s_writableStreamInternalsWritableStreamUpdateBackpressureCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamUpdateBackpressureCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamUpdateBackpressureCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamUpdateBackpressureCodeImplementationVisibility;
-
-// writableStreamDefaultWriterAbort
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTWRITERABORT 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultWriterAbortCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeImplementationVisibility;
-
-// writableStreamDefaultWriterClose
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTWRITERCLOSE 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultWriterCloseCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeImplementationVisibility;
-
-// writableStreamDefaultWriterCloseWithErrorPropagation
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTWRITERCLOSEWITHERRORPROPAGATION 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeImplementationVisibility;
-
-// writableStreamDefaultWriterEnsureClosedPromiseRejected
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTWRITERENSURECLOSEDPROMISEREJECTED 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeImplementationVisibility;
-
-// writableStreamDefaultWriterEnsureReadyPromiseRejected
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTWRITERENSUREREADYPROMISEREJECTED 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeImplementationVisibility;
-
-// writableStreamDefaultWriterGetDesiredSize
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTWRITERGETDESIREDSIZE 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeImplementationVisibility;
-
-// writableStreamDefaultWriterRelease
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTWRITERRELEASE 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultWriterReleaseCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeImplementationVisibility;
-
-// writableStreamDefaultWriterWrite
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTWRITERWRITE 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultWriterWriteCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeImplementationVisibility;
-
-// setUpWritableStreamDefaultController
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_SETUPWRITABLESTREAMDEFAULTCONTROLLER 1
-extern const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerCode;
-extern const int s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeImplementationVisibility;
-
-// writableStreamDefaultControllerStart
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERSTART 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerStartCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultControllerStartCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerStartCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerStartCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerStartCodeImplementationVisibility;
-
-// setUpWritableStreamDefaultControllerFromUnderlyingSink
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_SETUPWRITABLESTREAMDEFAULTCONTROLLERFROMUNDERLYINGSINK 1
-extern const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCode;
-extern const int s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeImplementationVisibility;
-
-// writableStreamDefaultControllerAdvanceQueueIfNeeded
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERADVANCEQUEUEIFNEEDED 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeImplementationVisibility;
-
-// isCloseSentinel
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_ISCLOSESENTINEL 1
-extern const char* const s_writableStreamInternalsIsCloseSentinelCode;
-extern const int s_writableStreamInternalsIsCloseSentinelCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsIsCloseSentinelCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsIsCloseSentinelCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsIsCloseSentinelCodeImplementationVisibility;
-
-// writableStreamDefaultControllerClearAlgorithms
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERCLEARALGORITHMS 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeImplementationVisibility;
-
-// writableStreamDefaultControllerClose
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERCLOSE 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerCloseCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeImplementationVisibility;
-
-// writableStreamDefaultControllerError
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERERROR 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerErrorCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeImplementationVisibility;
-
-// writableStreamDefaultControllerErrorIfNeeded
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERERRORIFNEEDED 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeImplementationVisibility;
-
-// writableStreamDefaultControllerGetBackpressure
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERGETBACKPRESSURE 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeImplementationVisibility;
-
-// writableStreamDefaultControllerGetChunkSize
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERGETCHUNKSIZE 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeImplementationVisibility;
-
-// writableStreamDefaultControllerGetDesiredSize
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERGETDESIREDSIZE 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeImplementationVisibility;
-
-// writableStreamDefaultControllerProcessClose
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERPROCESSCLOSE 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeImplementationVisibility;
-
-// writableStreamDefaultControllerProcessWrite
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERPROCESSWRITE 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeImplementationVisibility;
+/* ConsoleObject.ts */
+// asyncIterator
+#define WEBCORE_BUILTIN_CONSOLEOBJECT_ASYNCITERATOR 1
+extern const char* const s_consoleObjectAsyncIteratorCode;
+extern const int s_consoleObjectAsyncIteratorCodeLength;
+extern const JSC::ConstructAbility s_consoleObjectAsyncIteratorCodeConstructAbility;
+extern const JSC::ConstructorKind s_consoleObjectAsyncIteratorCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_consoleObjectAsyncIteratorCodeImplementationVisibility;
-// writableStreamDefaultControllerWrite
-#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERWRITE 1
-extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerWriteCode;
-extern const int s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeLength;
-extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeImplementationVisibility;
+// write
+#define WEBCORE_BUILTIN_CONSOLEOBJECT_WRITE 1
+extern const char* const s_consoleObjectWriteCode;
+extern const int s_consoleObjectWriteCodeLength;
+extern const JSC::ConstructAbility s_consoleObjectWriteCodeConstructAbility;
+extern const JSC::ConstructorKind s_consoleObjectWriteCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_consoleObjectWriteCodeImplementationVisibility;
-#define WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_DATA(macro) \
- macro(isWritableStream, writableStreamInternalsIsWritableStream, 1) \
- macro(isWritableStreamDefaultWriter, writableStreamInternalsIsWritableStreamDefaultWriter, 1) \
- macro(acquireWritableStreamDefaultWriter, writableStreamInternalsAcquireWritableStreamDefaultWriter, 1) \
- macro(createWritableStream, writableStreamInternalsCreateWritableStream, 7) \
- macro(createInternalWritableStreamFromUnderlyingSink, writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSink, 2) \
- macro(initializeWritableStreamSlots, writableStreamInternalsInitializeWritableStreamSlots, 2) \
- macro(writableStreamCloseForBindings, writableStreamInternalsWritableStreamCloseForBindings, 1) \
- macro(writableStreamAbortForBindings, writableStreamInternalsWritableStreamAbortForBindings, 2) \
- macro(isWritableStreamLocked, writableStreamInternalsIsWritableStreamLocked, 1) \
- macro(setUpWritableStreamDefaultWriter, writableStreamInternalsSetUpWritableStreamDefaultWriter, 2) \
- macro(writableStreamAbort, writableStreamInternalsWritableStreamAbort, 2) \
- macro(writableStreamClose, writableStreamInternalsWritableStreamClose, 1) \
- macro(writableStreamAddWriteRequest, writableStreamInternalsWritableStreamAddWriteRequest, 1) \
- macro(writableStreamCloseQueuedOrInFlight, writableStreamInternalsWritableStreamCloseQueuedOrInFlight, 1) \
- macro(writableStreamDealWithRejection, writableStreamInternalsWritableStreamDealWithRejection, 2) \
- macro(writableStreamFinishErroring, writableStreamInternalsWritableStreamFinishErroring, 1) \
- macro(writableStreamFinishInFlightClose, writableStreamInternalsWritableStreamFinishInFlightClose, 1) \
- macro(writableStreamFinishInFlightCloseWithError, writableStreamInternalsWritableStreamFinishInFlightCloseWithError, 2) \
- macro(writableStreamFinishInFlightWrite, writableStreamInternalsWritableStreamFinishInFlightWrite, 1) \
- macro(writableStreamFinishInFlightWriteWithError, writableStreamInternalsWritableStreamFinishInFlightWriteWithError, 2) \
- macro(writableStreamHasOperationMarkedInFlight, writableStreamInternalsWritableStreamHasOperationMarkedInFlight, 1) \
- macro(writableStreamMarkCloseRequestInFlight, writableStreamInternalsWritableStreamMarkCloseRequestInFlight, 1) \
- macro(writableStreamMarkFirstWriteRequestInFlight, writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlight, 1) \
- macro(writableStreamRejectCloseAndClosedPromiseIfNeeded, writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeeded, 1) \
- macro(writableStreamStartErroring, writableStreamInternalsWritableStreamStartErroring, 2) \
- macro(writableStreamUpdateBackpressure, writableStreamInternalsWritableStreamUpdateBackpressure, 2) \
- macro(writableStreamDefaultWriterAbort, writableStreamInternalsWritableStreamDefaultWriterAbort, 2) \
- macro(writableStreamDefaultWriterClose, writableStreamInternalsWritableStreamDefaultWriterClose, 1) \
- macro(writableStreamDefaultWriterCloseWithErrorPropagation, writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagation, 1) \
- macro(writableStreamDefaultWriterEnsureClosedPromiseRejected, writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejected, 2) \
- macro(writableStreamDefaultWriterEnsureReadyPromiseRejected, writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejected, 2) \
- macro(writableStreamDefaultWriterGetDesiredSize, writableStreamInternalsWritableStreamDefaultWriterGetDesiredSize, 1) \
- macro(writableStreamDefaultWriterRelease, writableStreamInternalsWritableStreamDefaultWriterRelease, 1) \
- macro(writableStreamDefaultWriterWrite, writableStreamInternalsWritableStreamDefaultWriterWrite, 2) \
- macro(setUpWritableStreamDefaultController, writableStreamInternalsSetUpWritableStreamDefaultController, 9) \
- macro(writableStreamDefaultControllerStart, writableStreamInternalsWritableStreamDefaultControllerStart, 1) \
- macro(setUpWritableStreamDefaultControllerFromUnderlyingSink, writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSink, 6) \
- macro(writableStreamDefaultControllerAdvanceQueueIfNeeded, writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeeded, 1) \
- macro(isCloseSentinel, writableStreamInternalsIsCloseSentinel, 0) \
- macro(writableStreamDefaultControllerClearAlgorithms, writableStreamInternalsWritableStreamDefaultControllerClearAlgorithms, 1) \
- macro(writableStreamDefaultControllerClose, writableStreamInternalsWritableStreamDefaultControllerClose, 1) \
- macro(writableStreamDefaultControllerError, writableStreamInternalsWritableStreamDefaultControllerError, 2) \
- macro(writableStreamDefaultControllerErrorIfNeeded, writableStreamInternalsWritableStreamDefaultControllerErrorIfNeeded, 2) \
- macro(writableStreamDefaultControllerGetBackpressure, writableStreamInternalsWritableStreamDefaultControllerGetBackpressure, 1) \
- macro(writableStreamDefaultControllerGetChunkSize, writableStreamInternalsWritableStreamDefaultControllerGetChunkSize, 2) \
- macro(writableStreamDefaultControllerGetDesiredSize, writableStreamInternalsWritableStreamDefaultControllerGetDesiredSize, 1) \
- macro(writableStreamDefaultControllerProcessClose, writableStreamInternalsWritableStreamDefaultControllerProcessClose, 1) \
- macro(writableStreamDefaultControllerProcessWrite, writableStreamInternalsWritableStreamDefaultControllerProcessWrite, 2) \
- macro(writableStreamDefaultControllerWrite, writableStreamInternalsWritableStreamDefaultControllerWrite, 3) \
+#define WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_DATA(macro) \
+ macro(asyncIterator, consoleObjectAsyncIterator, 0) \
+ macro(write, consoleObjectWrite, 1) \
-#define WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_CODE(macro) \
- macro(writableStreamInternalsIsWritableStreamCode, isWritableStream, ASCIILiteral(), s_writableStreamInternalsIsWritableStreamCodeLength) \
- macro(writableStreamInternalsIsWritableStreamDefaultWriterCode, isWritableStreamDefaultWriter, ASCIILiteral(), s_writableStreamInternalsIsWritableStreamDefaultWriterCodeLength) \
- macro(writableStreamInternalsAcquireWritableStreamDefaultWriterCode, acquireWritableStreamDefaultWriter, ASCIILiteral(), s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeLength) \
- macro(writableStreamInternalsCreateWritableStreamCode, createWritableStream, ASCIILiteral(), s_writableStreamInternalsCreateWritableStreamCodeLength) \
- macro(writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCode, createInternalWritableStreamFromUnderlyingSink, ASCIILiteral(), s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeLength) \
- macro(writableStreamInternalsInitializeWritableStreamSlotsCode, initializeWritableStreamSlots, ASCIILiteral(), s_writableStreamInternalsInitializeWritableStreamSlotsCodeLength) \
- macro(writableStreamInternalsWritableStreamCloseForBindingsCode, writableStreamCloseForBindings, ASCIILiteral(), s_writableStreamInternalsWritableStreamCloseForBindingsCodeLength) \
- macro(writableStreamInternalsWritableStreamAbortForBindingsCode, writableStreamAbortForBindings, ASCIILiteral(), s_writableStreamInternalsWritableStreamAbortForBindingsCodeLength) \
- macro(writableStreamInternalsIsWritableStreamLockedCode, isWritableStreamLocked, ASCIILiteral(), s_writableStreamInternalsIsWritableStreamLockedCodeLength) \
- macro(writableStreamInternalsSetUpWritableStreamDefaultWriterCode, setUpWritableStreamDefaultWriter, ASCIILiteral(), s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeLength) \
- macro(writableStreamInternalsWritableStreamAbortCode, writableStreamAbort, ASCIILiteral(), s_writableStreamInternalsWritableStreamAbortCodeLength) \
- macro(writableStreamInternalsWritableStreamCloseCode, writableStreamClose, ASCIILiteral(), s_writableStreamInternalsWritableStreamCloseCodeLength) \
- macro(writableStreamInternalsWritableStreamAddWriteRequestCode, writableStreamAddWriteRequest, ASCIILiteral(), s_writableStreamInternalsWritableStreamAddWriteRequestCodeLength) \
- macro(writableStreamInternalsWritableStreamCloseQueuedOrInFlightCode, writableStreamCloseQueuedOrInFlight, ASCIILiteral(), s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeLength) \
- macro(writableStreamInternalsWritableStreamDealWithRejectionCode, writableStreamDealWithRejection, ASCIILiteral(), s_writableStreamInternalsWritableStreamDealWithRejectionCodeLength) \
- macro(writableStreamInternalsWritableStreamFinishErroringCode, writableStreamFinishErroring, ASCIILiteral(), s_writableStreamInternalsWritableStreamFinishErroringCodeLength) \
- macro(writableStreamInternalsWritableStreamFinishInFlightCloseCode, writableStreamFinishInFlightClose, ASCIILiteral(), s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeLength) \
- macro(writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCode, writableStreamFinishInFlightCloseWithError, ASCIILiteral(), s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeLength) \
- macro(writableStreamInternalsWritableStreamFinishInFlightWriteCode, writableStreamFinishInFlightWrite, ASCIILiteral(), s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeLength) \
- macro(writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCode, writableStreamFinishInFlightWriteWithError, ASCIILiteral(), s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeLength) \
- macro(writableStreamInternalsWritableStreamHasOperationMarkedInFlightCode, writableStreamHasOperationMarkedInFlight, ASCIILiteral(), s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeLength) \
- macro(writableStreamInternalsWritableStreamMarkCloseRequestInFlightCode, writableStreamMarkCloseRequestInFlight, ASCIILiteral(), s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeLength) \
- macro(writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCode, writableStreamMarkFirstWriteRequestInFlight, ASCIILiteral(), s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeLength) \
- macro(writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCode, writableStreamRejectCloseAndClosedPromiseIfNeeded, ASCIILiteral(), s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeLength) \
- macro(writableStreamInternalsWritableStreamStartErroringCode, writableStreamStartErroring, ASCIILiteral(), s_writableStreamInternalsWritableStreamStartErroringCodeLength) \
- macro(writableStreamInternalsWritableStreamUpdateBackpressureCode, writableStreamUpdateBackpressure, ASCIILiteral(), s_writableStreamInternalsWritableStreamUpdateBackpressureCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultWriterAbortCode, writableStreamDefaultWriterAbort, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultWriterCloseCode, writableStreamDefaultWriterClose, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCode, writableStreamDefaultWriterCloseWithErrorPropagation, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCode, writableStreamDefaultWriterEnsureClosedPromiseRejected, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCode, writableStreamDefaultWriterEnsureReadyPromiseRejected, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCode, writableStreamDefaultWriterGetDesiredSize, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultWriterReleaseCode, writableStreamDefaultWriterRelease, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultWriterWriteCode, writableStreamDefaultWriterWrite, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeLength) \
- macro(writableStreamInternalsSetUpWritableStreamDefaultControllerCode, setUpWritableStreamDefaultController, ASCIILiteral(), s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultControllerStartCode, writableStreamDefaultControllerStart, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerStartCodeLength) \
- macro(writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCode, setUpWritableStreamDefaultControllerFromUnderlyingSink, ASCIILiteral(), s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCode, writableStreamDefaultControllerAdvanceQueueIfNeeded, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeLength) \
- macro(writableStreamInternalsIsCloseSentinelCode, isCloseSentinel, ASCIILiteral(), s_writableStreamInternalsIsCloseSentinelCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCode, writableStreamDefaultControllerClearAlgorithms, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultControllerCloseCode, writableStreamDefaultControllerClose, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultControllerErrorCode, writableStreamDefaultControllerError, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCode, writableStreamDefaultControllerErrorIfNeeded, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCode, writableStreamDefaultControllerGetBackpressure, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCode, writableStreamDefaultControllerGetChunkSize, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCode, writableStreamDefaultControllerGetDesiredSize, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultControllerProcessCloseCode, writableStreamDefaultControllerProcessClose, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultControllerProcessWriteCode, writableStreamDefaultControllerProcessWrite, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeLength) \
- macro(writableStreamInternalsWritableStreamDefaultControllerWriteCode, writableStreamDefaultControllerWrite, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeLength) \
+#define WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_CODE(macro) \
+ macro(consoleObjectAsyncIteratorCode, asyncIterator, "[Symbol.asyncIterator]"_s, s_consoleObjectAsyncIteratorCodeLength) \
+ macro(consoleObjectWriteCode, write, ASCIILiteral(), s_consoleObjectWriteCodeLength) \
-#define WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(macro) \
- macro(isWritableStream) \
- macro(isWritableStreamDefaultWriter) \
- macro(acquireWritableStreamDefaultWriter) \
- macro(createWritableStream) \
- macro(createInternalWritableStreamFromUnderlyingSink) \
- macro(initializeWritableStreamSlots) \
- macro(writableStreamCloseForBindings) \
- macro(writableStreamAbortForBindings) \
- macro(isWritableStreamLocked) \
- macro(setUpWritableStreamDefaultWriter) \
- macro(writableStreamAbort) \
- macro(writableStreamClose) \
- macro(writableStreamAddWriteRequest) \
- macro(writableStreamCloseQueuedOrInFlight) \
- macro(writableStreamDealWithRejection) \
- macro(writableStreamFinishErroring) \
- macro(writableStreamFinishInFlightClose) \
- macro(writableStreamFinishInFlightCloseWithError) \
- macro(writableStreamFinishInFlightWrite) \
- macro(writableStreamFinishInFlightWriteWithError) \
- macro(writableStreamHasOperationMarkedInFlight) \
- macro(writableStreamMarkCloseRequestInFlight) \
- macro(writableStreamMarkFirstWriteRequestInFlight) \
- macro(writableStreamRejectCloseAndClosedPromiseIfNeeded) \
- macro(writableStreamStartErroring) \
- macro(writableStreamUpdateBackpressure) \
- macro(writableStreamDefaultWriterAbort) \
- macro(writableStreamDefaultWriterClose) \
- macro(writableStreamDefaultWriterCloseWithErrorPropagation) \
- macro(writableStreamDefaultWriterEnsureClosedPromiseRejected) \
- macro(writableStreamDefaultWriterEnsureReadyPromiseRejected) \
- macro(writableStreamDefaultWriterGetDesiredSize) \
- macro(writableStreamDefaultWriterRelease) \
- macro(writableStreamDefaultWriterWrite) \
- macro(setUpWritableStreamDefaultController) \
- macro(writableStreamDefaultControllerStart) \
- macro(setUpWritableStreamDefaultControllerFromUnderlyingSink) \
- macro(writableStreamDefaultControllerAdvanceQueueIfNeeded) \
- macro(isCloseSentinel) \
- macro(writableStreamDefaultControllerClearAlgorithms) \
- macro(writableStreamDefaultControllerClose) \
- macro(writableStreamDefaultControllerError) \
- macro(writableStreamDefaultControllerErrorIfNeeded) \
- macro(writableStreamDefaultControllerGetBackpressure) \
- macro(writableStreamDefaultControllerGetChunkSize) \
- macro(writableStreamDefaultControllerGetDesiredSize) \
- macro(writableStreamDefaultControllerProcessClose) \
- macro(writableStreamDefaultControllerProcessWrite) \
- macro(writableStreamDefaultControllerWrite) \
+#define WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_FUNCTION_NAME(macro) \
+ macro(asyncIterator) \
+ macro(write) \
#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
#undef DECLARE_BUILTIN_GENERATOR
-class WritableStreamInternalsBuiltinsWrapper : private JSC::WeakHandleOwner {
+class ConsoleObjectBuiltinsWrapper : private JSC::WeakHandleOwner {
public:
- explicit WritableStreamInternalsBuiltinsWrapper(JSC::VM& vm)
+ explicit ConsoleObjectBuiltinsWrapper(JSC::VM& vm)
: m_vm(vm)
- WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
{
}
@@ -781,28 +219,28 @@ public:
#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
JSC::UnlinkedFunctionExecutable* name##Executable(); \
const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+ WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
#undef EXPOSE_BUILTIN_EXECUTABLES
- WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+ WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
void exportNames();
private:
JSC::VM& m_vm;
- WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
JSC::SourceCode m_##name##Source;\
JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
#undef DECLARE_BUILTIN_SOURCE_MEMBERS
};
#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* WritableStreamInternalsBuiltinsWrapper::name##Executable() \
+inline JSC::UnlinkedFunctionExecutable* ConsoleObjectBuiltinsWrapper::name##Executable() \
{\
if (!m_##name##Executable) {\
JSC::Identifier executableName = functionName##PublicName();\
@@ -812,50 +250,16 @@ inline JSC::UnlinkedFunctionExecutable* WritableStreamInternalsBuiltinsWrapper::
}\
return m_##name##Executable.get();\
}
-WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
#undef DEFINE_BUILTIN_EXECUTABLES
-inline void WritableStreamInternalsBuiltinsWrapper::exportNames()
+inline void ConsoleObjectBuiltinsWrapper::exportNames()
{
#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+ WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
-class WritableStreamInternalsBuiltinFunctions {
-public:
- explicit WritableStreamInternalsBuiltinFunctions(JSC::VM& vm) : m_vm(vm) { }
-
- void init(JSC::JSGlobalObject&);
- template<typename Visitor> void visit(Visitor&);
-
-public:
- JSC::VM& m_vm;
-
-#define DECLARE_BUILTIN_SOURCE_MEMBERS(functionName) \
- JSC::WriteBarrier<JSC::JSFunction> m_##functionName##Function;
- WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_SOURCE_MEMBERS)
-#undef DECLARE_BUILTIN_SOURCE_MEMBERS
-};
-
-inline void WritableStreamInternalsBuiltinFunctions::init(JSC::JSGlobalObject& globalObject)
-{
-#define EXPORT_FUNCTION(codeName, functionName, overriddenName, length) \
- m_##functionName##Function.set(m_vm, &globalObject, JSC::JSFunction::create(m_vm, codeName##Generator(m_vm), &globalObject));
- WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_CODE(EXPORT_FUNCTION)
-#undef EXPORT_FUNCTION
-}
-
-template<typename Visitor>
-inline void WritableStreamInternalsBuiltinFunctions::visit(Visitor& visitor)
-{
-#define VISIT_FUNCTION(name) visitor.append(m_##name##Function);
- WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(VISIT_FUNCTION)
-#undef VISIT_FUNCTION
-}
-
-template void WritableStreamInternalsBuiltinFunctions::visit(JSC::AbstractSlotVisitor&);
-template void WritableStreamInternalsBuiltinFunctions::visit(JSC::SlotVisitor&);
- /* TransformStreamInternals.ts */
+/* TransformStreamInternals.ts */
// isTransformStream
#define WEBCORE_BUILTIN_TRANSFORMSTREAMINTERNALS_ISTRANSFORMSTREAM 1
extern const char* const s_transformStreamInternalsIsTransformStreamCode;
@@ -1154,59 +558,70 @@ inline void TransformStreamInternalsBuiltinFunctions::visit(Visitor& visitor)
template void TransformStreamInternalsBuiltinFunctions::visit(JSC::AbstractSlotVisitor&);
template void TransformStreamInternalsBuiltinFunctions::visit(JSC::SlotVisitor&);
- /* ProcessObjectInternals.ts */
-// binding
-#define WEBCORE_BUILTIN_PROCESSOBJECTINTERNALS_BINDING 1
-extern const char* const s_processObjectInternalsBindingCode;
-extern const int s_processObjectInternalsBindingCodeLength;
-extern const JSC::ConstructAbility s_processObjectInternalsBindingCodeConstructAbility;
-extern const JSC::ConstructorKind s_processObjectInternalsBindingCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_processObjectInternalsBindingCodeImplementationVisibility;
+ /* ReadableStreamBYOBRequest.ts */
+// initializeReadableStreamBYOBRequest
+#define WEBCORE_BUILTIN_READABLESTREAMBYOBREQUEST_INITIALIZEREADABLESTREAMBYOBREQUEST 1
+extern const char* const s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCode;
+extern const int s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeLength;
+extern const JSC::ConstructAbility s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeImplementationVisibility;
-// getStdioWriteStream
-#define WEBCORE_BUILTIN_PROCESSOBJECTINTERNALS_GETSTDIOWRITESTREAM 1
-extern const char* const s_processObjectInternalsGetStdioWriteStreamCode;
-extern const int s_processObjectInternalsGetStdioWriteStreamCodeLength;
-extern const JSC::ConstructAbility s_processObjectInternalsGetStdioWriteStreamCodeConstructAbility;
-extern const JSC::ConstructorKind s_processObjectInternalsGetStdioWriteStreamCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_processObjectInternalsGetStdioWriteStreamCodeImplementationVisibility;
+// respond
+#define WEBCORE_BUILTIN_READABLESTREAMBYOBREQUEST_RESPOND 1
+extern const char* const s_readableStreamBYOBRequestRespondCode;
+extern const int s_readableStreamBYOBRequestRespondCodeLength;
+extern const JSC::ConstructAbility s_readableStreamBYOBRequestRespondCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamBYOBRequestRespondCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamBYOBRequestRespondCodeImplementationVisibility;
-// getStdinStream
-#define WEBCORE_BUILTIN_PROCESSOBJECTINTERNALS_GETSTDINSTREAM 1
-extern const char* const s_processObjectInternalsGetStdinStreamCode;
-extern const int s_processObjectInternalsGetStdinStreamCodeLength;
-extern const JSC::ConstructAbility s_processObjectInternalsGetStdinStreamCodeConstructAbility;
-extern const JSC::ConstructorKind s_processObjectInternalsGetStdinStreamCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_processObjectInternalsGetStdinStreamCodeImplementationVisibility;
+// respondWithNewView
+#define WEBCORE_BUILTIN_READABLESTREAMBYOBREQUEST_RESPONDWITHNEWVIEW 1
+extern const char* const s_readableStreamBYOBRequestRespondWithNewViewCode;
+extern const int s_readableStreamBYOBRequestRespondWithNewViewCodeLength;
+extern const JSC::ConstructAbility s_readableStreamBYOBRequestRespondWithNewViewCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamBYOBRequestRespondWithNewViewCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamBYOBRequestRespondWithNewViewCodeImplementationVisibility;
-#define WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_DATA(macro) \
- macro(binding, processObjectInternalsBinding, 1) \
- macro(getStdioWriteStream, processObjectInternalsGetStdioWriteStream, 1) \
- macro(getStdinStream, processObjectInternalsGetStdinStream, 1) \
+// view
+#define WEBCORE_BUILTIN_READABLESTREAMBYOBREQUEST_VIEW 1
+extern const char* const s_readableStreamBYOBRequestViewCode;
+extern const int s_readableStreamBYOBRequestViewCodeLength;
+extern const JSC::ConstructAbility s_readableStreamBYOBRequestViewCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamBYOBRequestViewCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamBYOBRequestViewCodeImplementationVisibility;
-#define WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_CODE(macro) \
- macro(processObjectInternalsBindingCode, binding, ASCIILiteral(), s_processObjectInternalsBindingCodeLength) \
- macro(processObjectInternalsGetStdioWriteStreamCode, getStdioWriteStream, ASCIILiteral(), s_processObjectInternalsGetStdioWriteStreamCodeLength) \
- macro(processObjectInternalsGetStdinStreamCode, getStdinStream, ASCIILiteral(), s_processObjectInternalsGetStdinStreamCodeLength) \
+#define WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_DATA(macro) \
+ macro(initializeReadableStreamBYOBRequest, readableStreamBYOBRequestInitializeReadableStreamBYOBRequest, 2) \
+ macro(respond, readableStreamBYOBRequestRespond, 1) \
+ macro(respondWithNewView, readableStreamBYOBRequestRespondWithNewView, 1) \
+ macro(view, readableStreamBYOBRequestView, 0) \
-#define WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_FUNCTION_NAME(macro) \
- macro(binding) \
- macro(getStdioWriteStream) \
- macro(getStdinStream) \
+#define WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_CODE(macro) \
+ macro(readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCode, initializeReadableStreamBYOBRequest, ASCIILiteral(), s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeLength) \
+ macro(readableStreamBYOBRequestRespondCode, respond, ASCIILiteral(), s_readableStreamBYOBRequestRespondCodeLength) \
+ macro(readableStreamBYOBRequestRespondWithNewViewCode, respondWithNewView, ASCIILiteral(), s_readableStreamBYOBRequestRespondWithNewViewCodeLength) \
+ macro(readableStreamBYOBRequestViewCode, view, "get view"_s, s_readableStreamBYOBRequestViewCodeLength) \
+
+#define WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_FUNCTION_NAME(macro) \
+ macro(initializeReadableStreamBYOBRequest) \
+ macro(respond) \
+ macro(respondWithNewView) \
+ macro(view) \
#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
#undef DECLARE_BUILTIN_GENERATOR
-class ProcessObjectInternalsBuiltinsWrapper : private JSC::WeakHandleOwner {
+class ReadableStreamBYOBRequestBuiltinsWrapper : private JSC::WeakHandleOwner {
public:
- explicit ProcessObjectInternalsBuiltinsWrapper(JSC::VM& vm)
+ explicit ReadableStreamBYOBRequestBuiltinsWrapper(JSC::VM& vm)
: m_vm(vm)
- WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
{
}
@@ -1214,28 +629,28 @@ public:
#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
JSC::UnlinkedFunctionExecutable* name##Executable(); \
const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+ WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
#undef EXPOSE_BUILTIN_EXECUTABLES
- WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+ WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
void exportNames();
private:
JSC::VM& m_vm;
- WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
JSC::SourceCode m_##name##Source;\
JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
#undef DECLARE_BUILTIN_SOURCE_MEMBERS
};
#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* ProcessObjectInternalsBuiltinsWrapper::name##Executable() \
+inline JSC::UnlinkedFunctionExecutable* ReadableStreamBYOBRequestBuiltinsWrapper::name##Executable() \
{\
if (!m_##name##Executable) {\
JSC::Identifier executableName = functionName##PublicName();\
@@ -1245,68 +660,90 @@ inline JSC::UnlinkedFunctionExecutable* ProcessObjectInternalsBuiltinsWrapper::n
}\
return m_##name##Executable.get();\
}
-WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
#undef DEFINE_BUILTIN_EXECUTABLES
-inline void ProcessObjectInternalsBuiltinsWrapper::exportNames()
+inline void ReadableStreamBYOBRequestBuiltinsWrapper::exportNames()
{
#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+ WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
-/* TransformStream.ts */
-// initializeTransformStream
-#define WEBCORE_BUILTIN_TRANSFORMSTREAM_INITIALIZETRANSFORMSTREAM 1
-extern const char* const s_transformStreamInitializeTransformStreamCode;
-extern const int s_transformStreamInitializeTransformStreamCodeLength;
-extern const JSC::ConstructAbility s_transformStreamInitializeTransformStreamCodeConstructAbility;
-extern const JSC::ConstructorKind s_transformStreamInitializeTransformStreamCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_transformStreamInitializeTransformStreamCodeImplementationVisibility;
+/* ReadableStreamBYOBReader.ts */
+// initializeReadableStreamBYOBReader
+#define WEBCORE_BUILTIN_READABLESTREAMBYOBREADER_INITIALIZEREADABLESTREAMBYOBREADER 1
+extern const char* const s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCode;
+extern const int s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeLength;
+extern const JSC::ConstructAbility s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeImplementationVisibility;
-// readable
-#define WEBCORE_BUILTIN_TRANSFORMSTREAM_READABLE 1
-extern const char* const s_transformStreamReadableCode;
-extern const int s_transformStreamReadableCodeLength;
-extern const JSC::ConstructAbility s_transformStreamReadableCodeConstructAbility;
-extern const JSC::ConstructorKind s_transformStreamReadableCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_transformStreamReadableCodeImplementationVisibility;
+// cancel
+#define WEBCORE_BUILTIN_READABLESTREAMBYOBREADER_CANCEL 1
+extern const char* const s_readableStreamBYOBReaderCancelCode;
+extern const int s_readableStreamBYOBReaderCancelCodeLength;
+extern const JSC::ConstructAbility s_readableStreamBYOBReaderCancelCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamBYOBReaderCancelCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamBYOBReaderCancelCodeImplementationVisibility;
-// writable
-#define WEBCORE_BUILTIN_TRANSFORMSTREAM_WRITABLE 1
-extern const char* const s_transformStreamWritableCode;
-extern const int s_transformStreamWritableCodeLength;
-extern const JSC::ConstructAbility s_transformStreamWritableCodeConstructAbility;
-extern const JSC::ConstructorKind s_transformStreamWritableCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_transformStreamWritableCodeImplementationVisibility;
+// read
+#define WEBCORE_BUILTIN_READABLESTREAMBYOBREADER_READ 1
+extern const char* const s_readableStreamBYOBReaderReadCode;
+extern const int s_readableStreamBYOBReaderReadCodeLength;
+extern const JSC::ConstructAbility s_readableStreamBYOBReaderReadCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamBYOBReaderReadCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamBYOBReaderReadCodeImplementationVisibility;
-#define WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_DATA(macro) \
- macro(initializeTransformStream, transformStreamInitializeTransformStream, 0) \
- macro(readable, transformStreamReadable, 0) \
- macro(writable, transformStreamWritable, 0) \
+// releaseLock
+#define WEBCORE_BUILTIN_READABLESTREAMBYOBREADER_RELEASELOCK 1
+extern const char* const s_readableStreamBYOBReaderReleaseLockCode;
+extern const int s_readableStreamBYOBReaderReleaseLockCodeLength;
+extern const JSC::ConstructAbility s_readableStreamBYOBReaderReleaseLockCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamBYOBReaderReleaseLockCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamBYOBReaderReleaseLockCodeImplementationVisibility;
-#define WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_CODE(macro) \
- macro(transformStreamInitializeTransformStreamCode, initializeTransformStream, ASCIILiteral(), s_transformStreamInitializeTransformStreamCodeLength) \
- macro(transformStreamReadableCode, readable, "get readable"_s, s_transformStreamReadableCodeLength) \
- macro(transformStreamWritableCode, writable, ASCIILiteral(), s_transformStreamWritableCodeLength) \
+// closed
+#define WEBCORE_BUILTIN_READABLESTREAMBYOBREADER_CLOSED 1
+extern const char* const s_readableStreamBYOBReaderClosedCode;
+extern const int s_readableStreamBYOBReaderClosedCodeLength;
+extern const JSC::ConstructAbility s_readableStreamBYOBReaderClosedCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamBYOBReaderClosedCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamBYOBReaderClosedCodeImplementationVisibility;
-#define WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_FUNCTION_NAME(macro) \
- macro(initializeTransformStream) \
- macro(readable) \
- macro(writable) \
+#define WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_DATA(macro) \
+ macro(initializeReadableStreamBYOBReader, readableStreamBYOBReaderInitializeReadableStreamBYOBReader, 1) \
+ macro(cancel, readableStreamBYOBReaderCancel, 1) \
+ macro(read, readableStreamBYOBReaderRead, 1) \
+ macro(releaseLock, readableStreamBYOBReaderReleaseLock, 0) \
+ macro(closed, readableStreamBYOBReaderClosed, 0) \
+
+#define WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_CODE(macro) \
+ macro(readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCode, initializeReadableStreamBYOBReader, ASCIILiteral(), s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeLength) \
+ macro(readableStreamBYOBReaderCancelCode, cancel, ASCIILiteral(), s_readableStreamBYOBReaderCancelCodeLength) \
+ macro(readableStreamBYOBReaderReadCode, read, ASCIILiteral(), s_readableStreamBYOBReaderReadCodeLength) \
+ macro(readableStreamBYOBReaderReleaseLockCode, releaseLock, ASCIILiteral(), s_readableStreamBYOBReaderReleaseLockCodeLength) \
+ macro(readableStreamBYOBReaderClosedCode, closed, "get closed"_s, s_readableStreamBYOBReaderClosedCodeLength) \
+
+#define WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_FUNCTION_NAME(macro) \
+ macro(initializeReadableStreamBYOBReader) \
+ macro(cancel) \
+ macro(read) \
+ macro(releaseLock) \
+ macro(closed) \
#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
#undef DECLARE_BUILTIN_GENERATOR
-class TransformStreamBuiltinsWrapper : private JSC::WeakHandleOwner {
+class ReadableStreamBYOBReaderBuiltinsWrapper : private JSC::WeakHandleOwner {
public:
- explicit TransformStreamBuiltinsWrapper(JSC::VM& vm)
+ explicit ReadableStreamBYOBReaderBuiltinsWrapper(JSC::VM& vm)
: m_vm(vm)
- WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
{
}
@@ -1314,28 +751,28 @@ public:
#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
JSC::UnlinkedFunctionExecutable* name##Executable(); \
const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+ WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
#undef EXPOSE_BUILTIN_EXECUTABLES
- WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+ WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
void exportNames();
private:
JSC::VM& m_vm;
- WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
JSC::SourceCode m_##name##Source;\
JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
#undef DECLARE_BUILTIN_SOURCE_MEMBERS
};
#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* TransformStreamBuiltinsWrapper::name##Executable() \
+inline JSC::UnlinkedFunctionExecutable* ReadableStreamBYOBReaderBuiltinsWrapper::name##Executable() \
{\
if (!m_##name##Executable) {\
JSC::Identifier executableName = functionName##PublicName();\
@@ -1345,13 +782,102 @@ inline JSC::UnlinkedFunctionExecutable* TransformStreamBuiltinsWrapper::name##Ex
}\
return m_##name##Executable.get();\
}
-WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
#undef DEFINE_BUILTIN_EXECUTABLES
-inline void TransformStreamBuiltinsWrapper::exportNames()
+inline void ReadableStreamBYOBReaderBuiltinsWrapper::exportNames()
{
#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+ WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+#undef EXPORT_FUNCTION_NAME
+}
+/* WritableStreamDefaultController.ts */
+// initializeWritableStreamDefaultController
+#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTCONTROLLER_INITIALIZEWRITABLESTREAMDEFAULTCONTROLLER 1
+extern const char* const s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCode;
+extern const int s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeLength;
+extern const JSC::ConstructAbility s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeImplementationVisibility;
+
+// error
+#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTCONTROLLER_ERROR 1
+extern const char* const s_writableStreamDefaultControllerErrorCode;
+extern const int s_writableStreamDefaultControllerErrorCodeLength;
+extern const JSC::ConstructAbility s_writableStreamDefaultControllerErrorCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamDefaultControllerErrorCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamDefaultControllerErrorCodeImplementationVisibility;
+
+#define WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_DATA(macro) \
+ macro(initializeWritableStreamDefaultController, writableStreamDefaultControllerInitializeWritableStreamDefaultController, 0) \
+ macro(error, writableStreamDefaultControllerError, 1) \
+
+#define WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_CODE(macro) \
+ macro(writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCode, initializeWritableStreamDefaultController, ASCIILiteral(), s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeLength) \
+ macro(writableStreamDefaultControllerErrorCode, error, ASCIILiteral(), s_writableStreamDefaultControllerErrorCodeLength) \
+
+#define WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(macro) \
+ macro(initializeWritableStreamDefaultController) \
+ macro(error) \
+
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+ JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
+
+WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+#undef DECLARE_BUILTIN_GENERATOR
+
+class WritableStreamDefaultControllerBuiltinsWrapper : private JSC::WeakHandleOwner {
+public:
+ explicit WritableStreamDefaultControllerBuiltinsWrapper(JSC::VM& vm)
+ : m_vm(vm)
+ WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
+ WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
+ {
+ }
+
+#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
+ JSC::UnlinkedFunctionExecutable* name##Executable(); \
+ const JSC::SourceCode& name##Source() const { return m_##name##Source; }
+ WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+#undef EXPOSE_BUILTIN_EXECUTABLES
+
+ WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+
+ void exportNames();
+
+private:
+ JSC::VM& m_vm;
+
+ WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
+ JSC::SourceCode m_##name##Source;\
+ JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
+ WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+#undef DECLARE_BUILTIN_SOURCE_MEMBERS
+
+};
+
+#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
+inline JSC::UnlinkedFunctionExecutable* WritableStreamDefaultControllerBuiltinsWrapper::name##Executable() \
+{\
+ if (!m_##name##Executable) {\
+ JSC::Identifier executableName = functionName##PublicName();\
+ if (overriddenName)\
+ executableName = JSC::Identifier::fromString(m_vm, overriddenName);\
+ m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, executableName, s_##name##ImplementationVisibility, s_##name##ConstructorKind, s_##name##ConstructAbility), this, &m_##name##Executable);\
+ }\
+ return m_##name##Executable.get();\
+}
+WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+#undef DEFINE_BUILTIN_EXECUTABLES
+
+inline void WritableStreamDefaultControllerBuiltinsWrapper::exportNames()
+{
+#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
+ WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
/* Module.ts */
@@ -1465,752 +991,325 @@ inline void ModuleBuiltinsWrapper::exportNames()
WEBCORE_FOREACH_MODULE_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
-/* JSBufferPrototype.ts */
-// setBigUint64
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_SETBIGUINT64 1
-extern const char* const s_jsBufferPrototypeSetBigUint64Code;
-extern const int s_jsBufferPrototypeSetBigUint64CodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeSetBigUint64CodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeSetBigUint64CodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeSetBigUint64CodeImplementationVisibility;
-
-// readInt8
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READINT8 1
-extern const char* const s_jsBufferPrototypeReadInt8Code;
-extern const int s_jsBufferPrototypeReadInt8CodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadInt8CodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadInt8CodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt8CodeImplementationVisibility;
-
-// readUInt8
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READUINT8 1
-extern const char* const s_jsBufferPrototypeReadUInt8Code;
-extern const int s_jsBufferPrototypeReadUInt8CodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadUInt8CodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadUInt8CodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt8CodeImplementationVisibility;
-
-// readInt16LE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READINT16LE 1
-extern const char* const s_jsBufferPrototypeReadInt16LECode;
-extern const int s_jsBufferPrototypeReadInt16LECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadInt16LECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadInt16LECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt16LECodeImplementationVisibility;
-
-// readInt16BE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READINT16BE 1
-extern const char* const s_jsBufferPrototypeReadInt16BECode;
-extern const int s_jsBufferPrototypeReadInt16BECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadInt16BECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadInt16BECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt16BECodeImplementationVisibility;
-
-// readUInt16LE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READUINT16LE 1
-extern const char* const s_jsBufferPrototypeReadUInt16LECode;
-extern const int s_jsBufferPrototypeReadUInt16LECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadUInt16LECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadUInt16LECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt16LECodeImplementationVisibility;
-
-// readUInt16BE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READUINT16BE 1
-extern const char* const s_jsBufferPrototypeReadUInt16BECode;
-extern const int s_jsBufferPrototypeReadUInt16BECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadUInt16BECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadUInt16BECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt16BECodeImplementationVisibility;
-
-// readInt32LE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READINT32LE 1
-extern const char* const s_jsBufferPrototypeReadInt32LECode;
-extern const int s_jsBufferPrototypeReadInt32LECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadInt32LECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadInt32LECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt32LECodeImplementationVisibility;
-
-// readInt32BE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READINT32BE 1
-extern const char* const s_jsBufferPrototypeReadInt32BECode;
-extern const int s_jsBufferPrototypeReadInt32BECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadInt32BECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadInt32BECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt32BECodeImplementationVisibility;
-
-// readUInt32LE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READUINT32LE 1
-extern const char* const s_jsBufferPrototypeReadUInt32LECode;
-extern const int s_jsBufferPrototypeReadUInt32LECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadUInt32LECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadUInt32LECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt32LECodeImplementationVisibility;
-
-// readUInt32BE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READUINT32BE 1
-extern const char* const s_jsBufferPrototypeReadUInt32BECode;
-extern const int s_jsBufferPrototypeReadUInt32BECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadUInt32BECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadUInt32BECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt32BECodeImplementationVisibility;
-
-// readIntLE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READINTLE 1
-extern const char* const s_jsBufferPrototypeReadIntLECode;
-extern const int s_jsBufferPrototypeReadIntLECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadIntLECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadIntLECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadIntLECodeImplementationVisibility;
-
-// readIntBE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READINTBE 1
-extern const char* const s_jsBufferPrototypeReadIntBECode;
-extern const int s_jsBufferPrototypeReadIntBECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadIntBECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadIntBECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadIntBECodeImplementationVisibility;
-
-// readUIntLE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READUINTLE 1
-extern const char* const s_jsBufferPrototypeReadUIntLECode;
-extern const int s_jsBufferPrototypeReadUIntLECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadUIntLECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadUIntLECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadUIntLECodeImplementationVisibility;
-
-// readUIntBE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READUINTBE 1
-extern const char* const s_jsBufferPrototypeReadUIntBECode;
-extern const int s_jsBufferPrototypeReadUIntBECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadUIntBECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadUIntBECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadUIntBECodeImplementationVisibility;
-
-// readFloatLE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READFLOATLE 1
-extern const char* const s_jsBufferPrototypeReadFloatLECode;
-extern const int s_jsBufferPrototypeReadFloatLECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadFloatLECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadFloatLECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadFloatLECodeImplementationVisibility;
-
-// readFloatBE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READFLOATBE 1
-extern const char* const s_jsBufferPrototypeReadFloatBECode;
-extern const int s_jsBufferPrototypeReadFloatBECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadFloatBECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadFloatBECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadFloatBECodeImplementationVisibility;
-
-// readDoubleLE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READDOUBLELE 1
-extern const char* const s_jsBufferPrototypeReadDoubleLECode;
-extern const int s_jsBufferPrototypeReadDoubleLECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadDoubleLECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadDoubleLECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadDoubleLECodeImplementationVisibility;
-
-// readDoubleBE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READDOUBLEBE 1
-extern const char* const s_jsBufferPrototypeReadDoubleBECode;
-extern const int s_jsBufferPrototypeReadDoubleBECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadDoubleBECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadDoubleBECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadDoubleBECodeImplementationVisibility;
-
-// readBigInt64LE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READBIGINT64LE 1
-extern const char* const s_jsBufferPrototypeReadBigInt64LECode;
-extern const int s_jsBufferPrototypeReadBigInt64LECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadBigInt64LECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadBigInt64LECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigInt64LECodeImplementationVisibility;
-
-// readBigInt64BE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READBIGINT64BE 1
-extern const char* const s_jsBufferPrototypeReadBigInt64BECode;
-extern const int s_jsBufferPrototypeReadBigInt64BECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadBigInt64BECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadBigInt64BECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigInt64BECodeImplementationVisibility;
-
-// readBigUInt64LE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READBIGUINT64LE 1
-extern const char* const s_jsBufferPrototypeReadBigUInt64LECode;
-extern const int s_jsBufferPrototypeReadBigUInt64LECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadBigUInt64LECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadBigUInt64LECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigUInt64LECodeImplementationVisibility;
-
-// readBigUInt64BE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READBIGUINT64BE 1
-extern const char* const s_jsBufferPrototypeReadBigUInt64BECode;
-extern const int s_jsBufferPrototypeReadBigUInt64BECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeReadBigUInt64BECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeReadBigUInt64BECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigUInt64BECodeImplementationVisibility;
-
-// writeInt8
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEINT8 1
-extern const char* const s_jsBufferPrototypeWriteInt8Code;
-extern const int s_jsBufferPrototypeWriteInt8CodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteInt8CodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteInt8CodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt8CodeImplementationVisibility;
+/* ReadableByteStreamController.ts */
+// initializeReadableByteStreamController
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMCONTROLLER_INITIALIZEREADABLEBYTESTREAMCONTROLLER 1
+extern const char* const s_readableByteStreamControllerInitializeReadableByteStreamControllerCode;
+extern const int s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeImplementationVisibility;
-// writeUInt8
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEUINT8 1
-extern const char* const s_jsBufferPrototypeWriteUInt8Code;
-extern const int s_jsBufferPrototypeWriteUInt8CodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt8CodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt8CodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt8CodeImplementationVisibility;
+// enqueue
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMCONTROLLER_ENQUEUE 1
+extern const char* const s_readableByteStreamControllerEnqueueCode;
+extern const int s_readableByteStreamControllerEnqueueCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamControllerEnqueueCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamControllerEnqueueCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamControllerEnqueueCodeImplementationVisibility;
-// writeInt16LE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEINT16LE 1
-extern const char* const s_jsBufferPrototypeWriteInt16LECode;
-extern const int s_jsBufferPrototypeWriteInt16LECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteInt16LECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteInt16LECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt16LECodeImplementationVisibility;
+// error
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMCONTROLLER_ERROR 1
+extern const char* const s_readableByteStreamControllerErrorCode;
+extern const int s_readableByteStreamControllerErrorCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamControllerErrorCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamControllerErrorCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamControllerErrorCodeImplementationVisibility;
-// writeInt16BE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEINT16BE 1
-extern const char* const s_jsBufferPrototypeWriteInt16BECode;
-extern const int s_jsBufferPrototypeWriteInt16BECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteInt16BECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteInt16BECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt16BECodeImplementationVisibility;
+// close
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMCONTROLLER_CLOSE 1
+extern const char* const s_readableByteStreamControllerCloseCode;
+extern const int s_readableByteStreamControllerCloseCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamControllerCloseCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamControllerCloseCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamControllerCloseCodeImplementationVisibility;
-// writeUInt16LE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEUINT16LE 1
-extern const char* const s_jsBufferPrototypeWriteUInt16LECode;
-extern const int s_jsBufferPrototypeWriteUInt16LECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt16LECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt16LECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt16LECodeImplementationVisibility;
+// byobRequest
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMCONTROLLER_BYOBREQUEST 1
+extern const char* const s_readableByteStreamControllerByobRequestCode;
+extern const int s_readableByteStreamControllerByobRequestCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamControllerByobRequestCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamControllerByobRequestCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamControllerByobRequestCodeImplementationVisibility;
-// writeUInt16BE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEUINT16BE 1
-extern const char* const s_jsBufferPrototypeWriteUInt16BECode;
-extern const int s_jsBufferPrototypeWriteUInt16BECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt16BECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt16BECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt16BECodeImplementationVisibility;
+// desiredSize
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMCONTROLLER_DESIREDSIZE 1
+extern const char* const s_readableByteStreamControllerDesiredSizeCode;
+extern const int s_readableByteStreamControllerDesiredSizeCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamControllerDesiredSizeCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamControllerDesiredSizeCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamControllerDesiredSizeCodeImplementationVisibility;
-// writeInt32LE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEINT32LE 1
-extern const char* const s_jsBufferPrototypeWriteInt32LECode;
-extern const int s_jsBufferPrototypeWriteInt32LECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteInt32LECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteInt32LECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt32LECodeImplementationVisibility;
+#define WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_DATA(macro) \
+ macro(initializeReadableByteStreamController, readableByteStreamControllerInitializeReadableByteStreamController, 3) \
+ macro(enqueue, readableByteStreamControllerEnqueue, 1) \
+ macro(error, readableByteStreamControllerError, 1) \
+ macro(close, readableByteStreamControllerClose, 0) \
+ macro(byobRequest, readableByteStreamControllerByobRequest, 0) \
+ macro(desiredSize, readableByteStreamControllerDesiredSize, 0) \
-// writeInt32BE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEINT32BE 1
-extern const char* const s_jsBufferPrototypeWriteInt32BECode;
-extern const int s_jsBufferPrototypeWriteInt32BECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteInt32BECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteInt32BECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt32BECodeImplementationVisibility;
+#define WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_CODE(macro) \
+ macro(readableByteStreamControllerInitializeReadableByteStreamControllerCode, initializeReadableByteStreamController, ASCIILiteral(), s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeLength) \
+ macro(readableByteStreamControllerEnqueueCode, enqueue, ASCIILiteral(), s_readableByteStreamControllerEnqueueCodeLength) \
+ macro(readableByteStreamControllerErrorCode, error, ASCIILiteral(), s_readableByteStreamControllerErrorCodeLength) \
+ macro(readableByteStreamControllerCloseCode, close, ASCIILiteral(), s_readableByteStreamControllerCloseCodeLength) \
+ macro(readableByteStreamControllerByobRequestCode, byobRequest, "get byobRequest"_s, s_readableByteStreamControllerByobRequestCodeLength) \
+ macro(readableByteStreamControllerDesiredSizeCode, desiredSize, "get desiredSize"_s, s_readableByteStreamControllerDesiredSizeCodeLength) \
-// writeUInt32LE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEUINT32LE 1
-extern const char* const s_jsBufferPrototypeWriteUInt32LECode;
-extern const int s_jsBufferPrototypeWriteUInt32LECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt32LECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt32LECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt32LECodeImplementationVisibility;
+#define WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_FUNCTION_NAME(macro) \
+ macro(initializeReadableByteStreamController) \
+ macro(enqueue) \
+ macro(error) \
+ macro(close) \
+ macro(byobRequest) \
+ macro(desiredSize) \
-// writeUInt32BE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEUINT32BE 1
-extern const char* const s_jsBufferPrototypeWriteUInt32BECode;
-extern const int s_jsBufferPrototypeWriteUInt32BECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt32BECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt32BECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt32BECodeImplementationVisibility;
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+ JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-// writeIntLE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEINTLE 1
-extern const char* const s_jsBufferPrototypeWriteIntLECode;
-extern const int s_jsBufferPrototypeWriteIntLECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteIntLECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteIntLECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteIntLECodeImplementationVisibility;
+WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+#undef DECLARE_BUILTIN_GENERATOR
-// writeIntBE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEINTBE 1
-extern const char* const s_jsBufferPrototypeWriteIntBECode;
-extern const int s_jsBufferPrototypeWriteIntBECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteIntBECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteIntBECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteIntBECodeImplementationVisibility;
+class ReadableByteStreamControllerBuiltinsWrapper : private JSC::WeakHandleOwner {
+public:
+ explicit ReadableByteStreamControllerBuiltinsWrapper(JSC::VM& vm)
+ : m_vm(vm)
+ WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
+ WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
+ {
+ }
-// writeUIntLE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEUINTLE 1
-extern const char* const s_jsBufferPrototypeWriteUIntLECode;
-extern const int s_jsBufferPrototypeWriteUIntLECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteUIntLECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteUIntLECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUIntLECodeImplementationVisibility;
+#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
+ JSC::UnlinkedFunctionExecutable* name##Executable(); \
+ const JSC::SourceCode& name##Source() const { return m_##name##Source; }
+ WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+#undef EXPOSE_BUILTIN_EXECUTABLES
-// writeUIntBE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEUINTBE 1
-extern const char* const s_jsBufferPrototypeWriteUIntBECode;
-extern const int s_jsBufferPrototypeWriteUIntBECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteUIntBECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteUIntBECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUIntBECodeImplementationVisibility;
+ WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
-// writeFloatLE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEFLOATLE 1
-extern const char* const s_jsBufferPrototypeWriteFloatLECode;
-extern const int s_jsBufferPrototypeWriteFloatLECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteFloatLECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteFloatLECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteFloatLECodeImplementationVisibility;
+ void exportNames();
-// writeFloatBE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEFLOATBE 1
-extern const char* const s_jsBufferPrototypeWriteFloatBECode;
-extern const int s_jsBufferPrototypeWriteFloatBECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteFloatBECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteFloatBECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteFloatBECodeImplementationVisibility;
+private:
+ JSC::VM& m_vm;
-// writeDoubleLE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEDOUBLELE 1
-extern const char* const s_jsBufferPrototypeWriteDoubleLECode;
-extern const int s_jsBufferPrototypeWriteDoubleLECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteDoubleLECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteDoubleLECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteDoubleLECodeImplementationVisibility;
+ WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
-// writeDoubleBE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEDOUBLEBE 1
-extern const char* const s_jsBufferPrototypeWriteDoubleBECode;
-extern const int s_jsBufferPrototypeWriteDoubleBECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteDoubleBECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteDoubleBECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteDoubleBECodeImplementationVisibility;
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
+ JSC::SourceCode m_##name##Source;\
+ JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
+ WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+#undef DECLARE_BUILTIN_SOURCE_MEMBERS
-// writeBigInt64LE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEBIGINT64LE 1
-extern const char* const s_jsBufferPrototypeWriteBigInt64LECode;
-extern const int s_jsBufferPrototypeWriteBigInt64LECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteBigInt64LECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteBigInt64LECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigInt64LECodeImplementationVisibility;
+};
-// writeBigInt64BE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEBIGINT64BE 1
-extern const char* const s_jsBufferPrototypeWriteBigInt64BECode;
-extern const int s_jsBufferPrototypeWriteBigInt64BECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteBigInt64BECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteBigInt64BECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigInt64BECodeImplementationVisibility;
+#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
+inline JSC::UnlinkedFunctionExecutable* ReadableByteStreamControllerBuiltinsWrapper::name##Executable() \
+{\
+ if (!m_##name##Executable) {\
+ JSC::Identifier executableName = functionName##PublicName();\
+ if (overriddenName)\
+ executableName = JSC::Identifier::fromString(m_vm, overriddenName);\
+ m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, executableName, s_##name##ImplementationVisibility, s_##name##ConstructorKind, s_##name##ConstructAbility), this, &m_##name##Executable);\
+ }\
+ return m_##name##Executable.get();\
+}
+WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+#undef DEFINE_BUILTIN_EXECUTABLES
-// writeBigUInt64LE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEBIGUINT64LE 1
-extern const char* const s_jsBufferPrototypeWriteBigUInt64LECode;
-extern const int s_jsBufferPrototypeWriteBigUInt64LECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteBigUInt64LECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteBigUInt64LECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigUInt64LECodeImplementationVisibility;
+inline void ReadableByteStreamControllerBuiltinsWrapper::exportNames()
+{
+#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
+ WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+#undef EXPORT_FUNCTION_NAME
+}
+/* ReadableStreamDefaultReader.ts */
+// initializeReadableStreamDefaultReader
+#define WEBCORE_BUILTIN_READABLESTREAMDEFAULTREADER_INITIALIZEREADABLESTREAMDEFAULTREADER 1
+extern const char* const s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCode;
+extern const int s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeLength;
+extern const JSC::ConstructAbility s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeImplementationVisibility;
-// writeBigUInt64BE
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEBIGUINT64BE 1
-extern const char* const s_jsBufferPrototypeWriteBigUInt64BECode;
-extern const int s_jsBufferPrototypeWriteBigUInt64BECodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeWriteBigUInt64BECodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeWriteBigUInt64BECodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigUInt64BECodeImplementationVisibility;
+// cancel
+#define WEBCORE_BUILTIN_READABLESTREAMDEFAULTREADER_CANCEL 1
+extern const char* const s_readableStreamDefaultReaderCancelCode;
+extern const int s_readableStreamDefaultReaderCancelCodeLength;
+extern const JSC::ConstructAbility s_readableStreamDefaultReaderCancelCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamDefaultReaderCancelCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamDefaultReaderCancelCodeImplementationVisibility;
-// utf8Write
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_UTF8WRITE 1
-extern const char* const s_jsBufferPrototypeUtf8WriteCode;
-extern const int s_jsBufferPrototypeUtf8WriteCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeUtf8WriteCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeUtf8WriteCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeUtf8WriteCodeImplementationVisibility;
+// readMany
+#define WEBCORE_BUILTIN_READABLESTREAMDEFAULTREADER_READMANY 1
+extern const char* const s_readableStreamDefaultReaderReadManyCode;
+extern const int s_readableStreamDefaultReaderReadManyCodeLength;
+extern const JSC::ConstructAbility s_readableStreamDefaultReaderReadManyCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamDefaultReaderReadManyCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamDefaultReaderReadManyCodeImplementationVisibility;
-// ucs2Write
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_UCS2WRITE 1
-extern const char* const s_jsBufferPrototypeUcs2WriteCode;
-extern const int s_jsBufferPrototypeUcs2WriteCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeUcs2WriteCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeUcs2WriteCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeUcs2WriteCodeImplementationVisibility;
+// read
+#define WEBCORE_BUILTIN_READABLESTREAMDEFAULTREADER_READ 1
+extern const char* const s_readableStreamDefaultReaderReadCode;
+extern const int s_readableStreamDefaultReaderReadCodeLength;
+extern const JSC::ConstructAbility s_readableStreamDefaultReaderReadCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamDefaultReaderReadCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamDefaultReaderReadCodeImplementationVisibility;
-// utf16leWrite
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_UTF16LEWRITE 1
-extern const char* const s_jsBufferPrototypeUtf16leWriteCode;
-extern const int s_jsBufferPrototypeUtf16leWriteCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeUtf16leWriteCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeUtf16leWriteCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeUtf16leWriteCodeImplementationVisibility;
+// releaseLock
+#define WEBCORE_BUILTIN_READABLESTREAMDEFAULTREADER_RELEASELOCK 1
+extern const char* const s_readableStreamDefaultReaderReleaseLockCode;
+extern const int s_readableStreamDefaultReaderReleaseLockCodeLength;
+extern const JSC::ConstructAbility s_readableStreamDefaultReaderReleaseLockCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamDefaultReaderReleaseLockCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamDefaultReaderReleaseLockCodeImplementationVisibility;
-// latin1Write
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_LATIN1WRITE 1
-extern const char* const s_jsBufferPrototypeLatin1WriteCode;
-extern const int s_jsBufferPrototypeLatin1WriteCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeLatin1WriteCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeLatin1WriteCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeLatin1WriteCodeImplementationVisibility;
+// closed
+#define WEBCORE_BUILTIN_READABLESTREAMDEFAULTREADER_CLOSED 1
+extern const char* const s_readableStreamDefaultReaderClosedCode;
+extern const int s_readableStreamDefaultReaderClosedCodeLength;
+extern const JSC::ConstructAbility s_readableStreamDefaultReaderClosedCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamDefaultReaderClosedCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamDefaultReaderClosedCodeImplementationVisibility;
-// asciiWrite
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_ASCIIWRITE 1
-extern const char* const s_jsBufferPrototypeAsciiWriteCode;
-extern const int s_jsBufferPrototypeAsciiWriteCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeAsciiWriteCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeAsciiWriteCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeAsciiWriteCodeImplementationVisibility;
+#define WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_DATA(macro) \
+ macro(initializeReadableStreamDefaultReader, readableStreamDefaultReaderInitializeReadableStreamDefaultReader, 1) \
+ macro(cancel, readableStreamDefaultReaderCancel, 1) \
+ macro(readMany, readableStreamDefaultReaderReadMany, 0) \
+ macro(read, readableStreamDefaultReaderRead, 0) \
+ macro(releaseLock, readableStreamDefaultReaderReleaseLock, 0) \
+ macro(closed, readableStreamDefaultReaderClosed, 0) \
-// base64Write
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_BASE64WRITE 1
-extern const char* const s_jsBufferPrototypeBase64WriteCode;
-extern const int s_jsBufferPrototypeBase64WriteCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeBase64WriteCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeBase64WriteCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeBase64WriteCodeImplementationVisibility;
+#define WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_CODE(macro) \
+ macro(readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCode, initializeReadableStreamDefaultReader, ASCIILiteral(), s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeLength) \
+ macro(readableStreamDefaultReaderCancelCode, cancel, ASCIILiteral(), s_readableStreamDefaultReaderCancelCodeLength) \
+ macro(readableStreamDefaultReaderReadManyCode, readMany, ASCIILiteral(), s_readableStreamDefaultReaderReadManyCodeLength) \
+ macro(readableStreamDefaultReaderReadCode, read, ASCIILiteral(), s_readableStreamDefaultReaderReadCodeLength) \
+ macro(readableStreamDefaultReaderReleaseLockCode, releaseLock, ASCIILiteral(), s_readableStreamDefaultReaderReleaseLockCodeLength) \
+ macro(readableStreamDefaultReaderClosedCode, closed, "get closed"_s, s_readableStreamDefaultReaderClosedCodeLength) \
-// base64urlWrite
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_BASE64URLWRITE 1
-extern const char* const s_jsBufferPrototypeBase64urlWriteCode;
-extern const int s_jsBufferPrototypeBase64urlWriteCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeBase64urlWriteCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeBase64urlWriteCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeBase64urlWriteCodeImplementationVisibility;
+#define WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_FUNCTION_NAME(macro) \
+ macro(initializeReadableStreamDefaultReader) \
+ macro(cancel) \
+ macro(readMany) \
+ macro(read) \
+ macro(releaseLock) \
+ macro(closed) \
-// hexWrite
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_HEXWRITE 1
-extern const char* const s_jsBufferPrototypeHexWriteCode;
-extern const int s_jsBufferPrototypeHexWriteCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeHexWriteCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeHexWriteCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeHexWriteCodeImplementationVisibility;
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+ JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-// utf8Slice
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_UTF8SLICE 1
-extern const char* const s_jsBufferPrototypeUtf8SliceCode;
-extern const int s_jsBufferPrototypeUtf8SliceCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeUtf8SliceCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeUtf8SliceCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeUtf8SliceCodeImplementationVisibility;
+WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+#undef DECLARE_BUILTIN_GENERATOR
-// ucs2Slice
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_UCS2SLICE 1
-extern const char* const s_jsBufferPrototypeUcs2SliceCode;
-extern const int s_jsBufferPrototypeUcs2SliceCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeUcs2SliceCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeUcs2SliceCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeUcs2SliceCodeImplementationVisibility;
+class ReadableStreamDefaultReaderBuiltinsWrapper : private JSC::WeakHandleOwner {
+public:
+ explicit ReadableStreamDefaultReaderBuiltinsWrapper(JSC::VM& vm)
+ : m_vm(vm)
+ WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
+ WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
+ {
+ }
-// utf16leSlice
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_UTF16LESLICE 1
-extern const char* const s_jsBufferPrototypeUtf16leSliceCode;
-extern const int s_jsBufferPrototypeUtf16leSliceCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeUtf16leSliceCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeUtf16leSliceCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeUtf16leSliceCodeImplementationVisibility;
+#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
+ JSC::UnlinkedFunctionExecutable* name##Executable(); \
+ const JSC::SourceCode& name##Source() const { return m_##name##Source; }
+ WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+#undef EXPOSE_BUILTIN_EXECUTABLES
-// latin1Slice
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_LATIN1SLICE 1
-extern const char* const s_jsBufferPrototypeLatin1SliceCode;
-extern const int s_jsBufferPrototypeLatin1SliceCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeLatin1SliceCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeLatin1SliceCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeLatin1SliceCodeImplementationVisibility;
+ WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
-// asciiSlice
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_ASCIISLICE 1
-extern const char* const s_jsBufferPrototypeAsciiSliceCode;
-extern const int s_jsBufferPrototypeAsciiSliceCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeAsciiSliceCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeAsciiSliceCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeAsciiSliceCodeImplementationVisibility;
+ void exportNames();
-// base64Slice
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_BASE64SLICE 1
-extern const char* const s_jsBufferPrototypeBase64SliceCode;
-extern const int s_jsBufferPrototypeBase64SliceCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeBase64SliceCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeBase64SliceCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeBase64SliceCodeImplementationVisibility;
+private:
+ JSC::VM& m_vm;
-// base64urlSlice
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_BASE64URLSLICE 1
-extern const char* const s_jsBufferPrototypeBase64urlSliceCode;
-extern const int s_jsBufferPrototypeBase64urlSliceCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeBase64urlSliceCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeBase64urlSliceCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeBase64urlSliceCodeImplementationVisibility;
+ WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
-// hexSlice
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_HEXSLICE 1
-extern const char* const s_jsBufferPrototypeHexSliceCode;
-extern const int s_jsBufferPrototypeHexSliceCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeHexSliceCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeHexSliceCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeHexSliceCodeImplementationVisibility;
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
+ JSC::SourceCode m_##name##Source;\
+ JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
+ WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+#undef DECLARE_BUILTIN_SOURCE_MEMBERS
-// toJSON
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_TOJSON 1
-extern const char* const s_jsBufferPrototypeToJSONCode;
-extern const int s_jsBufferPrototypeToJSONCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeToJSONCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeToJSONCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeToJSONCodeImplementationVisibility;
+};
-// slice
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_SLICE 1
-extern const char* const s_jsBufferPrototypeSliceCode;
-extern const int s_jsBufferPrototypeSliceCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeSliceCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeSliceCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeSliceCodeImplementationVisibility;
+#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
+inline JSC::UnlinkedFunctionExecutable* ReadableStreamDefaultReaderBuiltinsWrapper::name##Executable() \
+{\
+ if (!m_##name##Executable) {\
+ JSC::Identifier executableName = functionName##PublicName();\
+ if (overriddenName)\
+ executableName = JSC::Identifier::fromString(m_vm, overriddenName);\
+ m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, executableName, s_##name##ImplementationVisibility, s_##name##ConstructorKind, s_##name##ConstructAbility), this, &m_##name##Executable);\
+ }\
+ return m_##name##Executable.get();\
+}
+WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+#undef DEFINE_BUILTIN_EXECUTABLES
-// parent
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_PARENT 1
-extern const char* const s_jsBufferPrototypeParentCode;
-extern const int s_jsBufferPrototypeParentCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeParentCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeParentCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeParentCodeImplementationVisibility;
+inline void ReadableStreamDefaultReaderBuiltinsWrapper::exportNames()
+{
+#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
+ WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+#undef EXPORT_FUNCTION_NAME
+}
+/* ByteLengthQueuingStrategy.ts */
+// highWaterMark
+#define WEBCORE_BUILTIN_BYTELENGTHQUEUINGSTRATEGY_HIGHWATERMARK 1
+extern const char* const s_byteLengthQueuingStrategyHighWaterMarkCode;
+extern const int s_byteLengthQueuingStrategyHighWaterMarkCodeLength;
+extern const JSC::ConstructAbility s_byteLengthQueuingStrategyHighWaterMarkCodeConstructAbility;
+extern const JSC::ConstructorKind s_byteLengthQueuingStrategyHighWaterMarkCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_byteLengthQueuingStrategyHighWaterMarkCodeImplementationVisibility;
-// offset
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_OFFSET 1
-extern const char* const s_jsBufferPrototypeOffsetCode;
-extern const int s_jsBufferPrototypeOffsetCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeOffsetCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeOffsetCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeOffsetCodeImplementationVisibility;
+// size
+#define WEBCORE_BUILTIN_BYTELENGTHQUEUINGSTRATEGY_SIZE 1
+extern const char* const s_byteLengthQueuingStrategySizeCode;
+extern const int s_byteLengthQueuingStrategySizeCodeLength;
+extern const JSC::ConstructAbility s_byteLengthQueuingStrategySizeCodeConstructAbility;
+extern const JSC::ConstructorKind s_byteLengthQueuingStrategySizeCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_byteLengthQueuingStrategySizeCodeImplementationVisibility;
-// inspect
-#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_INSPECT 1
-extern const char* const s_jsBufferPrototypeInspectCode;
-extern const int s_jsBufferPrototypeInspectCodeLength;
-extern const JSC::ConstructAbility s_jsBufferPrototypeInspectCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferPrototypeInspectCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferPrototypeInspectCodeImplementationVisibility;
+// initializeByteLengthQueuingStrategy
+#define WEBCORE_BUILTIN_BYTELENGTHQUEUINGSTRATEGY_INITIALIZEBYTELENGTHQUEUINGSTRATEGY 1
+extern const char* const s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCode;
+extern const int s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeLength;
+extern const JSC::ConstructAbility s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeConstructAbility;
+extern const JSC::ConstructorKind s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeImplementationVisibility;
-#define WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_DATA(macro) \
- macro(setBigUint64, jsBufferPrototypeSetBigUint64, 3) \
- macro(readInt8, jsBufferPrototypeReadInt8, 1) \
- macro(readUInt8, jsBufferPrototypeReadUInt8, 1) \
- macro(readInt16LE, jsBufferPrototypeReadInt16LE, 1) \
- macro(readInt16BE, jsBufferPrototypeReadInt16BE, 1) \
- macro(readUInt16LE, jsBufferPrototypeReadUInt16LE, 1) \
- macro(readUInt16BE, jsBufferPrototypeReadUInt16BE, 1) \
- macro(readInt32LE, jsBufferPrototypeReadInt32LE, 1) \
- macro(readInt32BE, jsBufferPrototypeReadInt32BE, 1) \
- macro(readUInt32LE, jsBufferPrototypeReadUInt32LE, 1) \
- macro(readUInt32BE, jsBufferPrototypeReadUInt32BE, 1) \
- macro(readIntLE, jsBufferPrototypeReadIntLE, 2) \
- macro(readIntBE, jsBufferPrototypeReadIntBE, 2) \
- macro(readUIntLE, jsBufferPrototypeReadUIntLE, 2) \
- macro(readUIntBE, jsBufferPrototypeReadUIntBE, 2) \
- macro(readFloatLE, jsBufferPrototypeReadFloatLE, 1) \
- macro(readFloatBE, jsBufferPrototypeReadFloatBE, 1) \
- macro(readDoubleLE, jsBufferPrototypeReadDoubleLE, 1) \
- macro(readDoubleBE, jsBufferPrototypeReadDoubleBE, 1) \
- macro(readBigInt64LE, jsBufferPrototypeReadBigInt64LE, 1) \
- macro(readBigInt64BE, jsBufferPrototypeReadBigInt64BE, 1) \
- macro(readBigUInt64LE, jsBufferPrototypeReadBigUInt64LE, 1) \
- macro(readBigUInt64BE, jsBufferPrototypeReadBigUInt64BE, 1) \
- macro(writeInt8, jsBufferPrototypeWriteInt8, 2) \
- macro(writeUInt8, jsBufferPrototypeWriteUInt8, 2) \
- macro(writeInt16LE, jsBufferPrototypeWriteInt16LE, 2) \
- macro(writeInt16BE, jsBufferPrototypeWriteInt16BE, 2) \
- macro(writeUInt16LE, jsBufferPrototypeWriteUInt16LE, 2) \
- macro(writeUInt16BE, jsBufferPrototypeWriteUInt16BE, 2) \
- macro(writeInt32LE, jsBufferPrototypeWriteInt32LE, 2) \
- macro(writeInt32BE, jsBufferPrototypeWriteInt32BE, 2) \
- macro(writeUInt32LE, jsBufferPrototypeWriteUInt32LE, 2) \
- macro(writeUInt32BE, jsBufferPrototypeWriteUInt32BE, 2) \
- macro(writeIntLE, jsBufferPrototypeWriteIntLE, 3) \
- macro(writeIntBE, jsBufferPrototypeWriteIntBE, 3) \
- macro(writeUIntLE, jsBufferPrototypeWriteUIntLE, 3) \
- macro(writeUIntBE, jsBufferPrototypeWriteUIntBE, 3) \
- macro(writeFloatLE, jsBufferPrototypeWriteFloatLE, 2) \
- macro(writeFloatBE, jsBufferPrototypeWriteFloatBE, 2) \
- macro(writeDoubleLE, jsBufferPrototypeWriteDoubleLE, 2) \
- macro(writeDoubleBE, jsBufferPrototypeWriteDoubleBE, 2) \
- macro(writeBigInt64LE, jsBufferPrototypeWriteBigInt64LE, 2) \
- macro(writeBigInt64BE, jsBufferPrototypeWriteBigInt64BE, 2) \
- macro(writeBigUInt64LE, jsBufferPrototypeWriteBigUInt64LE, 2) \
- macro(writeBigUInt64BE, jsBufferPrototypeWriteBigUInt64BE, 2) \
- macro(utf8Write, jsBufferPrototypeUtf8Write, 3) \
- macro(ucs2Write, jsBufferPrototypeUcs2Write, 3) \
- macro(utf16leWrite, jsBufferPrototypeUtf16leWrite, 3) \
- macro(latin1Write, jsBufferPrototypeLatin1Write, 3) \
- macro(asciiWrite, jsBufferPrototypeAsciiWrite, 3) \
- macro(base64Write, jsBufferPrototypeBase64Write, 3) \
- macro(base64urlWrite, jsBufferPrototypeBase64urlWrite, 3) \
- macro(hexWrite, jsBufferPrototypeHexWrite, 3) \
- macro(utf8Slice, jsBufferPrototypeUtf8Slice, 2) \
- macro(ucs2Slice, jsBufferPrototypeUcs2Slice, 2) \
- macro(utf16leSlice, jsBufferPrototypeUtf16leSlice, 2) \
- macro(latin1Slice, jsBufferPrototypeLatin1Slice, 2) \
- macro(asciiSlice, jsBufferPrototypeAsciiSlice, 2) \
- macro(base64Slice, jsBufferPrototypeBase64Slice, 2) \
- macro(base64urlSlice, jsBufferPrototypeBase64urlSlice, 2) \
- macro(hexSlice, jsBufferPrototypeHexSlice, 2) \
- macro(toJSON, jsBufferPrototypeToJSON, 0) \
- macro(slice, jsBufferPrototypeSlice, 2) \
- macro(parent, jsBufferPrototypeParent, 0) \
- macro(offset, jsBufferPrototypeOffset, 0) \
- macro(inspect, jsBufferPrototypeInspect, 2) \
+#define WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_DATA(macro) \
+ macro(highWaterMark, byteLengthQueuingStrategyHighWaterMark, 0) \
+ macro(size, byteLengthQueuingStrategySize, 1) \
+ macro(initializeByteLengthQueuingStrategy, byteLengthQueuingStrategyInitializeByteLengthQueuingStrategy, 1) \
-#define WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_CODE(macro) \
- macro(jsBufferPrototypeSetBigUint64Code, setBigUint64, ASCIILiteral(), s_jsBufferPrototypeSetBigUint64CodeLength) \
- macro(jsBufferPrototypeReadInt8Code, readInt8, ASCIILiteral(), s_jsBufferPrototypeReadInt8CodeLength) \
- macro(jsBufferPrototypeReadUInt8Code, readUInt8, ASCIILiteral(), s_jsBufferPrototypeReadUInt8CodeLength) \
- macro(jsBufferPrototypeReadInt16LECode, readInt16LE, ASCIILiteral(), s_jsBufferPrototypeReadInt16LECodeLength) \
- macro(jsBufferPrototypeReadInt16BECode, readInt16BE, ASCIILiteral(), s_jsBufferPrototypeReadInt16BECodeLength) \
- macro(jsBufferPrototypeReadUInt16LECode, readUInt16LE, ASCIILiteral(), s_jsBufferPrototypeReadUInt16LECodeLength) \
- macro(jsBufferPrototypeReadUInt16BECode, readUInt16BE, ASCIILiteral(), s_jsBufferPrototypeReadUInt16BECodeLength) \
- macro(jsBufferPrototypeReadInt32LECode, readInt32LE, ASCIILiteral(), s_jsBufferPrototypeReadInt32LECodeLength) \
- macro(jsBufferPrototypeReadInt32BECode, readInt32BE, ASCIILiteral(), s_jsBufferPrototypeReadInt32BECodeLength) \
- macro(jsBufferPrototypeReadUInt32LECode, readUInt32LE, ASCIILiteral(), s_jsBufferPrototypeReadUInt32LECodeLength) \
- macro(jsBufferPrototypeReadUInt32BECode, readUInt32BE, ASCIILiteral(), s_jsBufferPrototypeReadUInt32BECodeLength) \
- macro(jsBufferPrototypeReadIntLECode, readIntLE, ASCIILiteral(), s_jsBufferPrototypeReadIntLECodeLength) \
- macro(jsBufferPrototypeReadIntBECode, readIntBE, ASCIILiteral(), s_jsBufferPrototypeReadIntBECodeLength) \
- macro(jsBufferPrototypeReadUIntLECode, readUIntLE, ASCIILiteral(), s_jsBufferPrototypeReadUIntLECodeLength) \
- macro(jsBufferPrototypeReadUIntBECode, readUIntBE, ASCIILiteral(), s_jsBufferPrototypeReadUIntBECodeLength) \
- macro(jsBufferPrototypeReadFloatLECode, readFloatLE, ASCIILiteral(), s_jsBufferPrototypeReadFloatLECodeLength) \
- macro(jsBufferPrototypeReadFloatBECode, readFloatBE, ASCIILiteral(), s_jsBufferPrototypeReadFloatBECodeLength) \
- macro(jsBufferPrototypeReadDoubleLECode, readDoubleLE, ASCIILiteral(), s_jsBufferPrototypeReadDoubleLECodeLength) \
- macro(jsBufferPrototypeReadDoubleBECode, readDoubleBE, ASCIILiteral(), s_jsBufferPrototypeReadDoubleBECodeLength) \
- macro(jsBufferPrototypeReadBigInt64LECode, readBigInt64LE, ASCIILiteral(), s_jsBufferPrototypeReadBigInt64LECodeLength) \
- macro(jsBufferPrototypeReadBigInt64BECode, readBigInt64BE, ASCIILiteral(), s_jsBufferPrototypeReadBigInt64BECodeLength) \
- macro(jsBufferPrototypeReadBigUInt64LECode, readBigUInt64LE, ASCIILiteral(), s_jsBufferPrototypeReadBigUInt64LECodeLength) \
- macro(jsBufferPrototypeReadBigUInt64BECode, readBigUInt64BE, ASCIILiteral(), s_jsBufferPrototypeReadBigUInt64BECodeLength) \
- macro(jsBufferPrototypeWriteInt8Code, writeInt8, ASCIILiteral(), s_jsBufferPrototypeWriteInt8CodeLength) \
- macro(jsBufferPrototypeWriteUInt8Code, writeUInt8, ASCIILiteral(), s_jsBufferPrototypeWriteUInt8CodeLength) \
- macro(jsBufferPrototypeWriteInt16LECode, writeInt16LE, ASCIILiteral(), s_jsBufferPrototypeWriteInt16LECodeLength) \
- macro(jsBufferPrototypeWriteInt16BECode, writeInt16BE, ASCIILiteral(), s_jsBufferPrototypeWriteInt16BECodeLength) \
- macro(jsBufferPrototypeWriteUInt16LECode, writeUInt16LE, ASCIILiteral(), s_jsBufferPrototypeWriteUInt16LECodeLength) \
- macro(jsBufferPrototypeWriteUInt16BECode, writeUInt16BE, ASCIILiteral(), s_jsBufferPrototypeWriteUInt16BECodeLength) \
- macro(jsBufferPrototypeWriteInt32LECode, writeInt32LE, ASCIILiteral(), s_jsBufferPrototypeWriteInt32LECodeLength) \
- macro(jsBufferPrototypeWriteInt32BECode, writeInt32BE, ASCIILiteral(), s_jsBufferPrototypeWriteInt32BECodeLength) \
- macro(jsBufferPrototypeWriteUInt32LECode, writeUInt32LE, ASCIILiteral(), s_jsBufferPrototypeWriteUInt32LECodeLength) \
- macro(jsBufferPrototypeWriteUInt32BECode, writeUInt32BE, ASCIILiteral(), s_jsBufferPrototypeWriteUInt32BECodeLength) \
- macro(jsBufferPrototypeWriteIntLECode, writeIntLE, ASCIILiteral(), s_jsBufferPrototypeWriteIntLECodeLength) \
- macro(jsBufferPrototypeWriteIntBECode, writeIntBE, ASCIILiteral(), s_jsBufferPrototypeWriteIntBECodeLength) \
- macro(jsBufferPrototypeWriteUIntLECode, writeUIntLE, ASCIILiteral(), s_jsBufferPrototypeWriteUIntLECodeLength) \
- macro(jsBufferPrototypeWriteUIntBECode, writeUIntBE, ASCIILiteral(), s_jsBufferPrototypeWriteUIntBECodeLength) \
- macro(jsBufferPrototypeWriteFloatLECode, writeFloatLE, ASCIILiteral(), s_jsBufferPrototypeWriteFloatLECodeLength) \
- macro(jsBufferPrototypeWriteFloatBECode, writeFloatBE, ASCIILiteral(), s_jsBufferPrototypeWriteFloatBECodeLength) \
- macro(jsBufferPrototypeWriteDoubleLECode, writeDoubleLE, ASCIILiteral(), s_jsBufferPrototypeWriteDoubleLECodeLength) \
- macro(jsBufferPrototypeWriteDoubleBECode, writeDoubleBE, ASCIILiteral(), s_jsBufferPrototypeWriteDoubleBECodeLength) \
- macro(jsBufferPrototypeWriteBigInt64LECode, writeBigInt64LE, ASCIILiteral(), s_jsBufferPrototypeWriteBigInt64LECodeLength) \
- macro(jsBufferPrototypeWriteBigInt64BECode, writeBigInt64BE, ASCIILiteral(), s_jsBufferPrototypeWriteBigInt64BECodeLength) \
- macro(jsBufferPrototypeWriteBigUInt64LECode, writeBigUInt64LE, ASCIILiteral(), s_jsBufferPrototypeWriteBigUInt64LECodeLength) \
- macro(jsBufferPrototypeWriteBigUInt64BECode, writeBigUInt64BE, ASCIILiteral(), s_jsBufferPrototypeWriteBigUInt64BECodeLength) \
- macro(jsBufferPrototypeUtf8WriteCode, utf8Write, ASCIILiteral(), s_jsBufferPrototypeUtf8WriteCodeLength) \
- macro(jsBufferPrototypeUcs2WriteCode, ucs2Write, ASCIILiteral(), s_jsBufferPrototypeUcs2WriteCodeLength) \
- macro(jsBufferPrototypeUtf16leWriteCode, utf16leWrite, ASCIILiteral(), s_jsBufferPrototypeUtf16leWriteCodeLength) \
- macro(jsBufferPrototypeLatin1WriteCode, latin1Write, ASCIILiteral(), s_jsBufferPrototypeLatin1WriteCodeLength) \
- macro(jsBufferPrototypeAsciiWriteCode, asciiWrite, ASCIILiteral(), s_jsBufferPrototypeAsciiWriteCodeLength) \
- macro(jsBufferPrototypeBase64WriteCode, base64Write, ASCIILiteral(), s_jsBufferPrototypeBase64WriteCodeLength) \
- macro(jsBufferPrototypeBase64urlWriteCode, base64urlWrite, ASCIILiteral(), s_jsBufferPrototypeBase64urlWriteCodeLength) \
- macro(jsBufferPrototypeHexWriteCode, hexWrite, ASCIILiteral(), s_jsBufferPrototypeHexWriteCodeLength) \
- macro(jsBufferPrototypeUtf8SliceCode, utf8Slice, ASCIILiteral(), s_jsBufferPrototypeUtf8SliceCodeLength) \
- macro(jsBufferPrototypeUcs2SliceCode, ucs2Slice, ASCIILiteral(), s_jsBufferPrototypeUcs2SliceCodeLength) \
- macro(jsBufferPrototypeUtf16leSliceCode, utf16leSlice, ASCIILiteral(), s_jsBufferPrototypeUtf16leSliceCodeLength) \
- macro(jsBufferPrototypeLatin1SliceCode, latin1Slice, ASCIILiteral(), s_jsBufferPrototypeLatin1SliceCodeLength) \
- macro(jsBufferPrototypeAsciiSliceCode, asciiSlice, ASCIILiteral(), s_jsBufferPrototypeAsciiSliceCodeLength) \
- macro(jsBufferPrototypeBase64SliceCode, base64Slice, ASCIILiteral(), s_jsBufferPrototypeBase64SliceCodeLength) \
- macro(jsBufferPrototypeBase64urlSliceCode, base64urlSlice, ASCIILiteral(), s_jsBufferPrototypeBase64urlSliceCodeLength) \
- macro(jsBufferPrototypeHexSliceCode, hexSlice, ASCIILiteral(), s_jsBufferPrototypeHexSliceCodeLength) \
- macro(jsBufferPrototypeToJSONCode, toJSON, ASCIILiteral(), s_jsBufferPrototypeToJSONCodeLength) \
- macro(jsBufferPrototypeSliceCode, slice, ASCIILiteral(), s_jsBufferPrototypeSliceCodeLength) \
- macro(jsBufferPrototypeParentCode, parent, "get parent"_s, s_jsBufferPrototypeParentCodeLength) \
- macro(jsBufferPrototypeOffsetCode, offset, "get offset"_s, s_jsBufferPrototypeOffsetCodeLength) \
- macro(jsBufferPrototypeInspectCode, inspect, ASCIILiteral(), s_jsBufferPrototypeInspectCodeLength) \
+#define WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_CODE(macro) \
+ macro(byteLengthQueuingStrategyHighWaterMarkCode, highWaterMark, "get highWaterMark"_s, s_byteLengthQueuingStrategyHighWaterMarkCodeLength) \
+ macro(byteLengthQueuingStrategySizeCode, size, ASCIILiteral(), s_byteLengthQueuingStrategySizeCodeLength) \
+ macro(byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCode, initializeByteLengthQueuingStrategy, ASCIILiteral(), s_byteLengthQueuingStrategyInitializeByteLengthQueuingStrategyCodeLength) \
-#define WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_FUNCTION_NAME(macro) \
- macro(setBigUint64) \
- macro(readInt8) \
- macro(readUInt8) \
- macro(readInt16LE) \
- macro(readInt16BE) \
- macro(readUInt16LE) \
- macro(readUInt16BE) \
- macro(readInt32LE) \
- macro(readInt32BE) \
- macro(readUInt32LE) \
- macro(readUInt32BE) \
- macro(readIntLE) \
- macro(readIntBE) \
- macro(readUIntLE) \
- macro(readUIntBE) \
- macro(readFloatLE) \
- macro(readFloatBE) \
- macro(readDoubleLE) \
- macro(readDoubleBE) \
- macro(readBigInt64LE) \
- macro(readBigInt64BE) \
- macro(readBigUInt64LE) \
- macro(readBigUInt64BE) \
- macro(writeInt8) \
- macro(writeUInt8) \
- macro(writeInt16LE) \
- macro(writeInt16BE) \
- macro(writeUInt16LE) \
- macro(writeUInt16BE) \
- macro(writeInt32LE) \
- macro(writeInt32BE) \
- macro(writeUInt32LE) \
- macro(writeUInt32BE) \
- macro(writeIntLE) \
- macro(writeIntBE) \
- macro(writeUIntLE) \
- macro(writeUIntBE) \
- macro(writeFloatLE) \
- macro(writeFloatBE) \
- macro(writeDoubleLE) \
- macro(writeDoubleBE) \
- macro(writeBigInt64LE) \
- macro(writeBigInt64BE) \
- macro(writeBigUInt64LE) \
- macro(writeBigUInt64BE) \
- macro(utf8Write) \
- macro(ucs2Write) \
- macro(utf16leWrite) \
- macro(latin1Write) \
- macro(asciiWrite) \
- macro(base64Write) \
- macro(base64urlWrite) \
- macro(hexWrite) \
- macro(utf8Slice) \
- macro(ucs2Slice) \
- macro(utf16leSlice) \
- macro(latin1Slice) \
- macro(asciiSlice) \
- macro(base64Slice) \
- macro(base64urlSlice) \
- macro(hexSlice) \
- macro(toJSON) \
- macro(slice) \
- macro(parent) \
- macro(offset) \
- macro(inspect) \
+#define WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(macro) \
+ macro(highWaterMark) \
+ macro(size) \
+ macro(initializeByteLengthQueuingStrategy) \
#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
#undef DECLARE_BUILTIN_GENERATOR
-class JSBufferPrototypeBuiltinsWrapper : private JSC::WeakHandleOwner {
+class ByteLengthQueuingStrategyBuiltinsWrapper : private JSC::WeakHandleOwner {
public:
- explicit JSBufferPrototypeBuiltinsWrapper(JSC::VM& vm)
+ explicit ByteLengthQueuingStrategyBuiltinsWrapper(JSC::VM& vm)
: m_vm(vm)
- WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
{
}
@@ -2218,28 +1317,28 @@ public:
#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
JSC::UnlinkedFunctionExecutable* name##Executable(); \
const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+ WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
#undef EXPOSE_BUILTIN_EXECUTABLES
- WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+ WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
void exportNames();
private:
JSC::VM& m_vm;
- WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
JSC::SourceCode m_##name##Source;\
JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
#undef DECLARE_BUILTIN_SOURCE_MEMBERS
};
#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* JSBufferPrototypeBuiltinsWrapper::name##Executable() \
+inline JSC::UnlinkedFunctionExecutable* ByteLengthQueuingStrategyBuiltinsWrapper::name##Executable() \
{\
if (!m_##name##Executable) {\
JSC::Identifier executableName = functionName##PublicName();\
@@ -2249,101 +1348,57 @@ inline JSC::UnlinkedFunctionExecutable* JSBufferPrototypeBuiltinsWrapper::name##
}\
return m_##name##Executable.get();\
}
-WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
#undef DEFINE_BUILTIN_EXECUTABLES
-inline void JSBufferPrototypeBuiltinsWrapper::exportNames()
+inline void ByteLengthQueuingStrategyBuiltinsWrapper::exportNames()
{
#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+ WEBCORE_FOREACH_BYTELENGTHQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
-/* ReadableByteStreamController.ts */
-// initializeReadableByteStreamController
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMCONTROLLER_INITIALIZEREADABLEBYTESTREAMCONTROLLER 1
-extern const char* const s_readableByteStreamControllerInitializeReadableByteStreamControllerCode;
-extern const int s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeImplementationVisibility;
-
-// enqueue
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMCONTROLLER_ENQUEUE 1
-extern const char* const s_readableByteStreamControllerEnqueueCode;
-extern const int s_readableByteStreamControllerEnqueueCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamControllerEnqueueCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamControllerEnqueueCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamControllerEnqueueCodeImplementationVisibility;
-
-// error
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMCONTROLLER_ERROR 1
-extern const char* const s_readableByteStreamControllerErrorCode;
-extern const int s_readableByteStreamControllerErrorCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamControllerErrorCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamControllerErrorCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamControllerErrorCodeImplementationVisibility;
-
-// close
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMCONTROLLER_CLOSE 1
-extern const char* const s_readableByteStreamControllerCloseCode;
-extern const int s_readableByteStreamControllerCloseCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamControllerCloseCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamControllerCloseCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamControllerCloseCodeImplementationVisibility;
-
-// byobRequest
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMCONTROLLER_BYOBREQUEST 1
-extern const char* const s_readableByteStreamControllerByobRequestCode;
-extern const int s_readableByteStreamControllerByobRequestCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamControllerByobRequestCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamControllerByobRequestCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamControllerByobRequestCodeImplementationVisibility;
+/* JSBufferConstructor.ts */
+// from
+#define WEBCORE_BUILTIN_JSBUFFERCONSTRUCTOR_FROM 1
+extern const char* const s_jsBufferConstructorFromCode;
+extern const int s_jsBufferConstructorFromCodeLength;
+extern const JSC::ConstructAbility s_jsBufferConstructorFromCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferConstructorFromCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferConstructorFromCodeImplementationVisibility;
-// desiredSize
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMCONTROLLER_DESIREDSIZE 1
-extern const char* const s_readableByteStreamControllerDesiredSizeCode;
-extern const int s_readableByteStreamControllerDesiredSizeCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamControllerDesiredSizeCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamControllerDesiredSizeCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamControllerDesiredSizeCodeImplementationVisibility;
+// isBuffer
+#define WEBCORE_BUILTIN_JSBUFFERCONSTRUCTOR_ISBUFFER 1
+extern const char* const s_jsBufferConstructorIsBufferCode;
+extern const int s_jsBufferConstructorIsBufferCodeLength;
+extern const JSC::ConstructAbility s_jsBufferConstructorIsBufferCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferConstructorIsBufferCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferConstructorIsBufferCodeImplementationVisibility;
-#define WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_DATA(macro) \
- macro(initializeReadableByteStreamController, readableByteStreamControllerInitializeReadableByteStreamController, 3) \
- macro(enqueue, readableByteStreamControllerEnqueue, 1) \
- macro(error, readableByteStreamControllerError, 1) \
- macro(close, readableByteStreamControllerClose, 0) \
- macro(byobRequest, readableByteStreamControllerByobRequest, 0) \
- macro(desiredSize, readableByteStreamControllerDesiredSize, 0) \
+#define WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_DATA(macro) \
+ macro(from, jsBufferConstructorFrom, 1) \
+ macro(isBuffer, jsBufferConstructorIsBuffer, 1) \
-#define WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_CODE(macro) \
- macro(readableByteStreamControllerInitializeReadableByteStreamControllerCode, initializeReadableByteStreamController, ASCIILiteral(), s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeLength) \
- macro(readableByteStreamControllerEnqueueCode, enqueue, ASCIILiteral(), s_readableByteStreamControllerEnqueueCodeLength) \
- macro(readableByteStreamControllerErrorCode, error, ASCIILiteral(), s_readableByteStreamControllerErrorCodeLength) \
- macro(readableByteStreamControllerCloseCode, close, ASCIILiteral(), s_readableByteStreamControllerCloseCodeLength) \
- macro(readableByteStreamControllerByobRequestCode, byobRequest, "get byobRequest"_s, s_readableByteStreamControllerByobRequestCodeLength) \
- macro(readableByteStreamControllerDesiredSizeCode, desiredSize, "get desiredSize"_s, s_readableByteStreamControllerDesiredSizeCodeLength) \
+#define WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_CODE(macro) \
+ macro(jsBufferConstructorFromCode, from, ASCIILiteral(), s_jsBufferConstructorFromCodeLength) \
+ macro(jsBufferConstructorIsBufferCode, isBuffer, ASCIILiteral(), s_jsBufferConstructorIsBufferCodeLength) \
-#define WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_FUNCTION_NAME(macro) \
- macro(initializeReadableByteStreamController) \
- macro(enqueue) \
- macro(error) \
- macro(close) \
- macro(byobRequest) \
- macro(desiredSize) \
+#define WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_FUNCTION_NAME(macro) \
+ macro(from) \
+ macro(isBuffer) \
#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
#undef DECLARE_BUILTIN_GENERATOR
-class ReadableByteStreamControllerBuiltinsWrapper : private JSC::WeakHandleOwner {
+class JSBufferConstructorBuiltinsWrapper : private JSC::WeakHandleOwner {
public:
- explicit ReadableByteStreamControllerBuiltinsWrapper(JSC::VM& vm)
+ explicit JSBufferConstructorBuiltinsWrapper(JSC::VM& vm)
: m_vm(vm)
- WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
{
}
@@ -2351,28 +1406,28 @@ public:
#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
JSC::UnlinkedFunctionExecutable* name##Executable(); \
const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+ WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
#undef EXPOSE_BUILTIN_EXECUTABLES
- WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+ WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
void exportNames();
private:
JSC::VM& m_vm;
- WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
JSC::SourceCode m_##name##Source;\
JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
#undef DECLARE_BUILTIN_SOURCE_MEMBERS
};
#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* ReadableByteStreamControllerBuiltinsWrapper::name##Executable() \
+inline JSC::UnlinkedFunctionExecutable* JSBufferConstructorBuiltinsWrapper::name##Executable() \
{\
if (!m_##name##Executable) {\
JSC::Identifier executableName = functionName##PublicName();\
@@ -2382,57 +1437,90 @@ inline JSC::UnlinkedFunctionExecutable* ReadableByteStreamControllerBuiltinsWrap
}\
return m_##name##Executable.get();\
}
-WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
#undef DEFINE_BUILTIN_EXECUTABLES
-inline void ReadableByteStreamControllerBuiltinsWrapper::exportNames()
+inline void JSBufferConstructorBuiltinsWrapper::exportNames()
{
#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_READABLEBYTESTREAMCONTROLLER_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+ WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
-/* UtilInspect.ts */
-// getStylizeWithColor
-#define WEBCORE_BUILTIN_UTILINSPECT_GETSTYLIZEWITHCOLOR 1
-extern const char* const s_utilInspectGetStylizeWithColorCode;
-extern const int s_utilInspectGetStylizeWithColorCodeLength;
-extern const JSC::ConstructAbility s_utilInspectGetStylizeWithColorCodeConstructAbility;
-extern const JSC::ConstructorKind s_utilInspectGetStylizeWithColorCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_utilInspectGetStylizeWithColorCodeImplementationVisibility;
+/* ImportMetaObject.ts */
+// loadCJS2ESM
+#define WEBCORE_BUILTIN_IMPORTMETAOBJECT_LOADCJS2ESM 1
+extern const char* const s_importMetaObjectLoadCJS2ESMCode;
+extern const int s_importMetaObjectLoadCJS2ESMCodeLength;
+extern const JSC::ConstructAbility s_importMetaObjectLoadCJS2ESMCodeConstructAbility;
+extern const JSC::ConstructorKind s_importMetaObjectLoadCJS2ESMCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_importMetaObjectLoadCJS2ESMCodeImplementationVisibility;
-// stylizeWithNoColor
-#define WEBCORE_BUILTIN_UTILINSPECT_STYLIZEWITHNOCOLOR 1
-extern const char* const s_utilInspectStylizeWithNoColorCode;
-extern const int s_utilInspectStylizeWithNoColorCodeLength;
-extern const JSC::ConstructAbility s_utilInspectStylizeWithNoColorCodeConstructAbility;
-extern const JSC::ConstructorKind s_utilInspectStylizeWithNoColorCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_utilInspectStylizeWithNoColorCodeImplementationVisibility;
+// requireESM
+#define WEBCORE_BUILTIN_IMPORTMETAOBJECT_REQUIREESM 1
+extern const char* const s_importMetaObjectRequireESMCode;
+extern const int s_importMetaObjectRequireESMCodeLength;
+extern const JSC::ConstructAbility s_importMetaObjectRequireESMCodeConstructAbility;
+extern const JSC::ConstructorKind s_importMetaObjectRequireESMCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_importMetaObjectRequireESMCodeImplementationVisibility;
-#define WEBCORE_FOREACH_UTILINSPECT_BUILTIN_DATA(macro) \
- macro(getStylizeWithColor, utilInspectGetStylizeWithColor, 1) \
- macro(stylizeWithNoColor, utilInspectStylizeWithNoColor, 1) \
+// internalRequire
+#define WEBCORE_BUILTIN_IMPORTMETAOBJECT_INTERNALREQUIRE 1
+extern const char* const s_importMetaObjectInternalRequireCode;
+extern const int s_importMetaObjectInternalRequireCodeLength;
+extern const JSC::ConstructAbility s_importMetaObjectInternalRequireCodeConstructAbility;
+extern const JSC::ConstructorKind s_importMetaObjectInternalRequireCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_importMetaObjectInternalRequireCodeImplementationVisibility;
-#define WEBCORE_FOREACH_UTILINSPECT_BUILTIN_CODE(macro) \
- macro(utilInspectGetStylizeWithColorCode, getStylizeWithColor, ASCIILiteral(), s_utilInspectGetStylizeWithColorCodeLength) \
- macro(utilInspectStylizeWithNoColorCode, stylizeWithNoColor, ASCIILiteral(), s_utilInspectStylizeWithNoColorCodeLength) \
+// createRequireCache
+#define WEBCORE_BUILTIN_IMPORTMETAOBJECT_CREATEREQUIRECACHE 1
+extern const char* const s_importMetaObjectCreateRequireCacheCode;
+extern const int s_importMetaObjectCreateRequireCacheCodeLength;
+extern const JSC::ConstructAbility s_importMetaObjectCreateRequireCacheCodeConstructAbility;
+extern const JSC::ConstructorKind s_importMetaObjectCreateRequireCacheCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_importMetaObjectCreateRequireCacheCodeImplementationVisibility;
-#define WEBCORE_FOREACH_UTILINSPECT_BUILTIN_FUNCTION_NAME(macro) \
- macro(getStylizeWithColor) \
- macro(stylizeWithNoColor) \
+// main
+#define WEBCORE_BUILTIN_IMPORTMETAOBJECT_MAIN 1
+extern const char* const s_importMetaObjectMainCode;
+extern const int s_importMetaObjectMainCodeLength;
+extern const JSC::ConstructAbility s_importMetaObjectMainCodeConstructAbility;
+extern const JSC::ConstructorKind s_importMetaObjectMainCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_importMetaObjectMainCodeImplementationVisibility;
+
+#define WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_DATA(macro) \
+ macro(loadCJS2ESM, importMetaObjectLoadCJS2ESM, 1) \
+ macro(requireESM, importMetaObjectRequireESM, 1) \
+ macro(internalRequire, importMetaObjectInternalRequire, 1) \
+ macro(createRequireCache, importMetaObjectCreateRequireCache, 0) \
+ macro(main, importMetaObjectMain, 0) \
+
+#define WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_CODE(macro) \
+ macro(importMetaObjectLoadCJS2ESMCode, loadCJS2ESM, ASCIILiteral(), s_importMetaObjectLoadCJS2ESMCodeLength) \
+ macro(importMetaObjectRequireESMCode, requireESM, ASCIILiteral(), s_importMetaObjectRequireESMCodeLength) \
+ macro(importMetaObjectInternalRequireCode, internalRequire, ASCIILiteral(), s_importMetaObjectInternalRequireCodeLength) \
+ macro(importMetaObjectCreateRequireCacheCode, createRequireCache, ASCIILiteral(), s_importMetaObjectCreateRequireCacheCodeLength) \
+ macro(importMetaObjectMainCode, main, "get main"_s, s_importMetaObjectMainCodeLength) \
+
+#define WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_FUNCTION_NAME(macro) \
+ macro(loadCJS2ESM) \
+ macro(requireESM) \
+ macro(internalRequire) \
+ macro(createRequireCache) \
+ macro(main) \
#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-WEBCORE_FOREACH_UTILINSPECT_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
#undef DECLARE_BUILTIN_GENERATOR
-class UtilInspectBuiltinsWrapper : private JSC::WeakHandleOwner {
+class ImportMetaObjectBuiltinsWrapper : private JSC::WeakHandleOwner {
public:
- explicit UtilInspectBuiltinsWrapper(JSC::VM& vm)
+ explicit ImportMetaObjectBuiltinsWrapper(JSC::VM& vm)
: m_vm(vm)
- WEBCORE_FOREACH_UTILINSPECT_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_UTILINSPECT_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
{
}
@@ -2440,28 +1528,28 @@ public:
#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
JSC::UnlinkedFunctionExecutable* name##Executable(); \
const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_UTILINSPECT_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+ WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
#undef EXPOSE_BUILTIN_EXECUTABLES
- WEBCORE_FOREACH_UTILINSPECT_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+ WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
void exportNames();
private:
JSC::VM& m_vm;
- WEBCORE_FOREACH_UTILINSPECT_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
JSC::SourceCode m_##name##Source;\
JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_UTILINSPECT_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
#undef DECLARE_BUILTIN_SOURCE_MEMBERS
};
#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* UtilInspectBuiltinsWrapper::name##Executable() \
+inline JSC::UnlinkedFunctionExecutable* ImportMetaObjectBuiltinsWrapper::name##Executable() \
{\
if (!m_##name##Executable) {\
JSC::Identifier executableName = functionName##PublicName();\
@@ -2471,57 +1559,68 @@ inline JSC::UnlinkedFunctionExecutable* UtilInspectBuiltinsWrapper::name##Execut
}\
return m_##name##Executable.get();\
}
-WEBCORE_FOREACH_UTILINSPECT_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
#undef DEFINE_BUILTIN_EXECUTABLES
-inline void UtilInspectBuiltinsWrapper::exportNames()
+inline void ImportMetaObjectBuiltinsWrapper::exportNames()
{
#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_UTILINSPECT_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+ WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
-/* ConsoleObject.ts */
-// asyncIterator
-#define WEBCORE_BUILTIN_CONSOLEOBJECT_ASYNCITERATOR 1
-extern const char* const s_consoleObjectAsyncIteratorCode;
-extern const int s_consoleObjectAsyncIteratorCodeLength;
-extern const JSC::ConstructAbility s_consoleObjectAsyncIteratorCodeConstructAbility;
-extern const JSC::ConstructorKind s_consoleObjectAsyncIteratorCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_consoleObjectAsyncIteratorCodeImplementationVisibility;
+/* TransformStream.ts */
+// initializeTransformStream
+#define WEBCORE_BUILTIN_TRANSFORMSTREAM_INITIALIZETRANSFORMSTREAM 1
+extern const char* const s_transformStreamInitializeTransformStreamCode;
+extern const int s_transformStreamInitializeTransformStreamCodeLength;
+extern const JSC::ConstructAbility s_transformStreamInitializeTransformStreamCodeConstructAbility;
+extern const JSC::ConstructorKind s_transformStreamInitializeTransformStreamCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_transformStreamInitializeTransformStreamCodeImplementationVisibility;
-// write
-#define WEBCORE_BUILTIN_CONSOLEOBJECT_WRITE 1
-extern const char* const s_consoleObjectWriteCode;
-extern const int s_consoleObjectWriteCodeLength;
-extern const JSC::ConstructAbility s_consoleObjectWriteCodeConstructAbility;
-extern const JSC::ConstructorKind s_consoleObjectWriteCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_consoleObjectWriteCodeImplementationVisibility;
+// readable
+#define WEBCORE_BUILTIN_TRANSFORMSTREAM_READABLE 1
+extern const char* const s_transformStreamReadableCode;
+extern const int s_transformStreamReadableCodeLength;
+extern const JSC::ConstructAbility s_transformStreamReadableCodeConstructAbility;
+extern const JSC::ConstructorKind s_transformStreamReadableCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_transformStreamReadableCodeImplementationVisibility;
-#define WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_DATA(macro) \
- macro(asyncIterator, consoleObjectAsyncIterator, 0) \
- macro(write, consoleObjectWrite, 1) \
+// writable
+#define WEBCORE_BUILTIN_TRANSFORMSTREAM_WRITABLE 1
+extern const char* const s_transformStreamWritableCode;
+extern const int s_transformStreamWritableCodeLength;
+extern const JSC::ConstructAbility s_transformStreamWritableCodeConstructAbility;
+extern const JSC::ConstructorKind s_transformStreamWritableCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_transformStreamWritableCodeImplementationVisibility;
-#define WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_CODE(macro) \
- macro(consoleObjectAsyncIteratorCode, asyncIterator, "[Symbol.asyncIterator]"_s, s_consoleObjectAsyncIteratorCodeLength) \
- macro(consoleObjectWriteCode, write, ASCIILiteral(), s_consoleObjectWriteCodeLength) \
+#define WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_DATA(macro) \
+ macro(initializeTransformStream, transformStreamInitializeTransformStream, 0) \
+ macro(readable, transformStreamReadable, 0) \
+ macro(writable, transformStreamWritable, 0) \
-#define WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_FUNCTION_NAME(macro) \
- macro(asyncIterator) \
- macro(write) \
+#define WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_CODE(macro) \
+ macro(transformStreamInitializeTransformStreamCode, initializeTransformStream, ASCIILiteral(), s_transformStreamInitializeTransformStreamCodeLength) \
+ macro(transformStreamReadableCode, readable, "get readable"_s, s_transformStreamReadableCodeLength) \
+ macro(transformStreamWritableCode, writable, ASCIILiteral(), s_transformStreamWritableCodeLength) \
+
+#define WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_FUNCTION_NAME(macro) \
+ macro(initializeTransformStream) \
+ macro(readable) \
+ macro(writable) \
#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
#undef DECLARE_BUILTIN_GENERATOR
-class ConsoleObjectBuiltinsWrapper : private JSC::WeakHandleOwner {
+class TransformStreamBuiltinsWrapper : private JSC::WeakHandleOwner {
public:
- explicit ConsoleObjectBuiltinsWrapper(JSC::VM& vm)
+ explicit TransformStreamBuiltinsWrapper(JSC::VM& vm)
: m_vm(vm)
- WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
{
}
@@ -2529,28 +1628,28 @@ public:
#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
JSC::UnlinkedFunctionExecutable* name##Executable(); \
const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+ WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
#undef EXPOSE_BUILTIN_EXECUTABLES
- WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+ WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
void exportNames();
private:
JSC::VM& m_vm;
- WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
JSC::SourceCode m_##name##Source;\
JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
#undef DECLARE_BUILTIN_SOURCE_MEMBERS
};
#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* ConsoleObjectBuiltinsWrapper::name##Executable() \
+inline JSC::UnlinkedFunctionExecutable* TransformStreamBuiltinsWrapper::name##Executable() \
{\
if (!m_##name##Executable) {\
JSC::Identifier executableName = functionName##PublicName();\
@@ -2560,13 +1659,13 @@ inline JSC::UnlinkedFunctionExecutable* ConsoleObjectBuiltinsWrapper::name##Exec
}\
return m_##name##Executable.get();\
}
-WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
#undef DEFINE_BUILTIN_EXECUTABLES
-inline void ConsoleObjectBuiltinsWrapper::exportNames()
+inline void TransformStreamBuiltinsWrapper::exportNames()
{
#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_CONSOLEOBJECT_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+ WEBCORE_FOREACH_TRANSFORMSTREAM_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
/* ReadableStreamInternals.ts */
@@ -3374,81 +2473,422 @@ inline void ReadableStreamInternalsBuiltinFunctions::visit(Visitor& visitor)
template void ReadableStreamInternalsBuiltinFunctions::visit(JSC::AbstractSlotVisitor&);
template void ReadableStreamInternalsBuiltinFunctions::visit(JSC::SlotVisitor&);
- /* TransformStreamDefaultController.ts */
-// initializeTransformStreamDefaultController
-#define WEBCORE_BUILTIN_TRANSFORMSTREAMDEFAULTCONTROLLER_INITIALIZETRANSFORMSTREAMDEFAULTCONTROLLER 1
-extern const char* const s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCode;
-extern const int s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeLength;
-extern const JSC::ConstructAbility s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeConstructAbility;
-extern const JSC::ConstructorKind s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeImplementationVisibility;
+ /* ReadableByteStreamInternals.ts */
+// privateInitializeReadableByteStreamController
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_PRIVATEINITIALIZEREADABLEBYTESTREAMCONTROLLER 1
+extern const char* const s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCode;
+extern const int s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeImplementationVisibility;
-// desiredSize
-#define WEBCORE_BUILTIN_TRANSFORMSTREAMDEFAULTCONTROLLER_DESIREDSIZE 1
-extern const char* const s_transformStreamDefaultControllerDesiredSizeCode;
-extern const int s_transformStreamDefaultControllerDesiredSizeCodeLength;
-extern const JSC::ConstructAbility s_transformStreamDefaultControllerDesiredSizeCodeConstructAbility;
-extern const JSC::ConstructorKind s_transformStreamDefaultControllerDesiredSizeCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_transformStreamDefaultControllerDesiredSizeCodeImplementationVisibility;
+// readableStreamByteStreamControllerStart
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLESTREAMBYTESTREAMCONTROLLERSTART 1
+extern const char* const s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCode;
+extern const int s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeImplementationVisibility;
-// enqueue
-#define WEBCORE_BUILTIN_TRANSFORMSTREAMDEFAULTCONTROLLER_ENQUEUE 1
-extern const char* const s_transformStreamDefaultControllerEnqueueCode;
-extern const int s_transformStreamDefaultControllerEnqueueCodeLength;
-extern const JSC::ConstructAbility s_transformStreamDefaultControllerEnqueueCodeConstructAbility;
-extern const JSC::ConstructorKind s_transformStreamDefaultControllerEnqueueCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_transformStreamDefaultControllerEnqueueCodeImplementationVisibility;
+// privateInitializeReadableStreamBYOBRequest
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_PRIVATEINITIALIZEREADABLESTREAMBYOBREQUEST 1
+extern const char* const s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCode;
+extern const int s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeImplementationVisibility;
-// error
-#define WEBCORE_BUILTIN_TRANSFORMSTREAMDEFAULTCONTROLLER_ERROR 1
-extern const char* const s_transformStreamDefaultControllerErrorCode;
-extern const int s_transformStreamDefaultControllerErrorCodeLength;
-extern const JSC::ConstructAbility s_transformStreamDefaultControllerErrorCodeConstructAbility;
-extern const JSC::ConstructorKind s_transformStreamDefaultControllerErrorCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_transformStreamDefaultControllerErrorCodeImplementationVisibility;
+// isReadableByteStreamController
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_ISREADABLEBYTESTREAMCONTROLLER 1
+extern const char* const s_readableByteStreamInternalsIsReadableByteStreamControllerCode;
+extern const int s_readableByteStreamInternalsIsReadableByteStreamControllerCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsIsReadableByteStreamControllerCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsIsReadableByteStreamControllerCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsIsReadableByteStreamControllerCodeImplementationVisibility;
-// terminate
-#define WEBCORE_BUILTIN_TRANSFORMSTREAMDEFAULTCONTROLLER_TERMINATE 1
-extern const char* const s_transformStreamDefaultControllerTerminateCode;
-extern const int s_transformStreamDefaultControllerTerminateCodeLength;
-extern const JSC::ConstructAbility s_transformStreamDefaultControllerTerminateCodeConstructAbility;
-extern const JSC::ConstructorKind s_transformStreamDefaultControllerTerminateCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_transformStreamDefaultControllerTerminateCodeImplementationVisibility;
+// isReadableStreamBYOBRequest
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_ISREADABLESTREAMBYOBREQUEST 1
+extern const char* const s_readableByteStreamInternalsIsReadableStreamBYOBRequestCode;
+extern const int s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeImplementationVisibility;
-#define WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_DATA(macro) \
- macro(initializeTransformStreamDefaultController, transformStreamDefaultControllerInitializeTransformStreamDefaultController, 0) \
- macro(desiredSize, transformStreamDefaultControllerDesiredSize, 0) \
- macro(enqueue, transformStreamDefaultControllerEnqueue, 1) \
- macro(error, transformStreamDefaultControllerError, 1) \
- macro(terminate, transformStreamDefaultControllerTerminate, 0) \
+// isReadableStreamBYOBReader
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_ISREADABLESTREAMBYOBREADER 1
+extern const char* const s_readableByteStreamInternalsIsReadableStreamBYOBReaderCode;
+extern const int s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeImplementationVisibility;
-#define WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_CODE(macro) \
- macro(transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCode, initializeTransformStreamDefaultController, ASCIILiteral(), s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeLength) \
- macro(transformStreamDefaultControllerDesiredSizeCode, desiredSize, "get desiredSize"_s, s_transformStreamDefaultControllerDesiredSizeCodeLength) \
- macro(transformStreamDefaultControllerEnqueueCode, enqueue, ASCIILiteral(), s_transformStreamDefaultControllerEnqueueCodeLength) \
- macro(transformStreamDefaultControllerErrorCode, error, ASCIILiteral(), s_transformStreamDefaultControllerErrorCodeLength) \
- macro(transformStreamDefaultControllerTerminateCode, terminate, ASCIILiteral(), s_transformStreamDefaultControllerTerminateCodeLength) \
+// readableByteStreamControllerCancel
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERCANCEL 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerCancelCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeImplementationVisibility;
-#define WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(macro) \
- macro(initializeTransformStreamDefaultController) \
- macro(desiredSize) \
- macro(enqueue) \
- macro(error) \
- macro(terminate) \
+// readableByteStreamControllerError
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERERROR 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerErrorCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeImplementationVisibility;
+
+// readableByteStreamControllerClose
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERCLOSE 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerCloseCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeImplementationVisibility;
+
+// readableByteStreamControllerClearPendingPullIntos
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERCLEARPENDINGPULLINTOS 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeImplementationVisibility;
+
+// readableByteStreamControllerGetDesiredSize
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERGETDESIREDSIZE 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeImplementationVisibility;
+
+// readableStreamHasBYOBReader
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLESTREAMHASBYOBREADER 1
+extern const char* const s_readableByteStreamInternalsReadableStreamHasBYOBReaderCode;
+extern const int s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeImplementationVisibility;
+
+// readableStreamHasDefaultReader
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLESTREAMHASDEFAULTREADER 1
+extern const char* const s_readableByteStreamInternalsReadableStreamHasDefaultReaderCode;
+extern const int s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeImplementationVisibility;
+
+// readableByteStreamControllerHandleQueueDrain
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERHANDLEQUEUEDRAIN 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeImplementationVisibility;
+
+// readableByteStreamControllerPull
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERPULL 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerPullCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerPullCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerPullCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerPullCodeImplementationVisibility;
+
+// readableByteStreamControllerShouldCallPull
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERSHOULDCALLPULL 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeImplementationVisibility;
+
+// readableByteStreamControllerCallPullIfNeeded
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERCALLPULLIFNEEDED 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeImplementationVisibility;
+
+// transferBufferToCurrentRealm
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_TRANSFERBUFFERTOCURRENTREALM 1
+extern const char* const s_readableByteStreamInternalsTransferBufferToCurrentRealmCode;
+extern const int s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeImplementationVisibility;
+
+// readableStreamReaderKind
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLESTREAMREADERKIND 1
+extern const char* const s_readableByteStreamInternalsReadableStreamReaderKindCode;
+extern const int s_readableByteStreamInternalsReadableStreamReaderKindCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamReaderKindCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamReaderKindCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamReaderKindCodeImplementationVisibility;
+
+// readableByteStreamControllerEnqueue
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERENQUEUE 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeImplementationVisibility;
+
+// readableByteStreamControllerEnqueueChunk
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERENQUEUECHUNK 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeImplementationVisibility;
+
+// readableByteStreamControllerRespondWithNewView
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERRESPONDWITHNEWVIEW 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeImplementationVisibility;
+
+// readableByteStreamControllerRespond
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERRESPOND 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeImplementationVisibility;
+
+// readableByteStreamControllerRespondInternal
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERRESPONDINTERNAL 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeImplementationVisibility;
+
+// readableByteStreamControllerRespondInReadableState
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERRESPONDINREADABLESTATE 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeImplementationVisibility;
+
+// readableByteStreamControllerRespondInClosedState
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERRESPONDINCLOSEDSTATE 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeImplementationVisibility;
+
+// readableByteStreamControllerProcessPullDescriptors
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERPROCESSPULLDESCRIPTORS 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeImplementationVisibility;
+
+// readableByteStreamControllerFillDescriptorFromQueue
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERFILLDESCRIPTORFROMQUEUE 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeImplementationVisibility;
+
+// readableByteStreamControllerShiftPendingDescriptor
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERSHIFTPENDINGDESCRIPTOR 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeImplementationVisibility;
+
+// readableByteStreamControllerInvalidateBYOBRequest
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERINVALIDATEBYOBREQUEST 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeImplementationVisibility;
+
+// readableByteStreamControllerCommitDescriptor
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERCOMMITDESCRIPTOR 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeImplementationVisibility;
+
+// readableByteStreamControllerConvertDescriptor
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERCONVERTDESCRIPTOR 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeImplementationVisibility;
+
+// readableStreamFulfillReadIntoRequest
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLESTREAMFULFILLREADINTOREQUEST 1
+extern const char* const s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCode;
+extern const int s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeImplementationVisibility;
+
+// readableStreamBYOBReaderRead
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLESTREAMBYOBREADERREAD 1
+extern const char* const s_readableByteStreamInternalsReadableStreamBYOBReaderReadCode;
+extern const int s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeImplementationVisibility;
+
+// readableByteStreamControllerPullInto
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERPULLINTO 1
+extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCode;
+extern const int s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeImplementationVisibility;
+
+// readableStreamAddReadIntoRequest
+#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLESTREAMADDREADINTOREQUEST 1
+extern const char* const s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCode;
+extern const int s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeLength;
+extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeImplementationVisibility;
+
+#define WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_DATA(macro) \
+ macro(privateInitializeReadableByteStreamController, readableByteStreamInternalsPrivateInitializeReadableByteStreamController, 3) \
+ macro(readableStreamByteStreamControllerStart, readableByteStreamInternalsReadableStreamByteStreamControllerStart, 1) \
+ macro(privateInitializeReadableStreamBYOBRequest, readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequest, 2) \
+ macro(isReadableByteStreamController, readableByteStreamInternalsIsReadableByteStreamController, 1) \
+ macro(isReadableStreamBYOBRequest, readableByteStreamInternalsIsReadableStreamBYOBRequest, 1) \
+ macro(isReadableStreamBYOBReader, readableByteStreamInternalsIsReadableStreamBYOBReader, 1) \
+ macro(readableByteStreamControllerCancel, readableByteStreamInternalsReadableByteStreamControllerCancel, 2) \
+ macro(readableByteStreamControllerError, readableByteStreamInternalsReadableByteStreamControllerError, 2) \
+ macro(readableByteStreamControllerClose, readableByteStreamInternalsReadableByteStreamControllerClose, 1) \
+ macro(readableByteStreamControllerClearPendingPullIntos, readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntos, 1) \
+ macro(readableByteStreamControllerGetDesiredSize, readableByteStreamInternalsReadableByteStreamControllerGetDesiredSize, 1) \
+ macro(readableStreamHasBYOBReader, readableByteStreamInternalsReadableStreamHasBYOBReader, 1) \
+ macro(readableStreamHasDefaultReader, readableByteStreamInternalsReadableStreamHasDefaultReader, 1) \
+ macro(readableByteStreamControllerHandleQueueDrain, readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrain, 1) \
+ macro(readableByteStreamControllerPull, readableByteStreamInternalsReadableByteStreamControllerPull, 1) \
+ macro(readableByteStreamControllerShouldCallPull, readableByteStreamInternalsReadableByteStreamControllerShouldCallPull, 1) \
+ macro(readableByteStreamControllerCallPullIfNeeded, readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeeded, 1) \
+ macro(transferBufferToCurrentRealm, readableByteStreamInternalsTransferBufferToCurrentRealm, 1) \
+ macro(readableStreamReaderKind, readableByteStreamInternalsReadableStreamReaderKind, 1) \
+ macro(readableByteStreamControllerEnqueue, readableByteStreamInternalsReadableByteStreamControllerEnqueue, 2) \
+ macro(readableByteStreamControllerEnqueueChunk, readableByteStreamInternalsReadableByteStreamControllerEnqueueChunk, 4) \
+ macro(readableByteStreamControllerRespondWithNewView, readableByteStreamInternalsReadableByteStreamControllerRespondWithNewView, 2) \
+ macro(readableByteStreamControllerRespond, readableByteStreamInternalsReadableByteStreamControllerRespond, 2) \
+ macro(readableByteStreamControllerRespondInternal, readableByteStreamInternalsReadableByteStreamControllerRespondInternal, 2) \
+ macro(readableByteStreamControllerRespondInReadableState, readableByteStreamInternalsReadableByteStreamControllerRespondInReadableState, 3) \
+ macro(readableByteStreamControllerRespondInClosedState, readableByteStreamInternalsReadableByteStreamControllerRespondInClosedState, 2) \
+ macro(readableByteStreamControllerProcessPullDescriptors, readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptors, 1) \
+ macro(readableByteStreamControllerFillDescriptorFromQueue, readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueue, 2) \
+ macro(readableByteStreamControllerShiftPendingDescriptor, readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptor, 1) \
+ macro(readableByteStreamControllerInvalidateBYOBRequest, readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequest, 1) \
+ macro(readableByteStreamControllerCommitDescriptor, readableByteStreamInternalsReadableByteStreamControllerCommitDescriptor, 2) \
+ macro(readableByteStreamControllerConvertDescriptor, readableByteStreamInternalsReadableByteStreamControllerConvertDescriptor, 1) \
+ macro(readableStreamFulfillReadIntoRequest, readableByteStreamInternalsReadableStreamFulfillReadIntoRequest, 3) \
+ macro(readableStreamBYOBReaderRead, readableByteStreamInternalsReadableStreamBYOBReaderRead, 2) \
+ macro(readableByteStreamControllerPullInto, readableByteStreamInternalsReadableByteStreamControllerPullInto, 2) \
+ macro(readableStreamAddReadIntoRequest, readableByteStreamInternalsReadableStreamAddReadIntoRequest, 1) \
+
+#define WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_CODE(macro) \
+ macro(readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCode, privateInitializeReadableByteStreamController, ASCIILiteral(), s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeLength) \
+ macro(readableByteStreamInternalsReadableStreamByteStreamControllerStartCode, readableStreamByteStreamControllerStart, ASCIILiteral(), s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeLength) \
+ macro(readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCode, privateInitializeReadableStreamBYOBRequest, ASCIILiteral(), s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeLength) \
+ macro(readableByteStreamInternalsIsReadableByteStreamControllerCode, isReadableByteStreamController, ASCIILiteral(), s_readableByteStreamInternalsIsReadableByteStreamControllerCodeLength) \
+ macro(readableByteStreamInternalsIsReadableStreamBYOBRequestCode, isReadableStreamBYOBRequest, ASCIILiteral(), s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeLength) \
+ macro(readableByteStreamInternalsIsReadableStreamBYOBReaderCode, isReadableStreamBYOBReader, ASCIILiteral(), s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerCancelCode, readableByteStreamControllerCancel, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerErrorCode, readableByteStreamControllerError, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerCloseCode, readableByteStreamControllerClose, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCode, readableByteStreamControllerClearPendingPullIntos, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCode, readableByteStreamControllerGetDesiredSize, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeLength) \
+ macro(readableByteStreamInternalsReadableStreamHasBYOBReaderCode, readableStreamHasBYOBReader, ASCIILiteral(), s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeLength) \
+ macro(readableByteStreamInternalsReadableStreamHasDefaultReaderCode, readableStreamHasDefaultReader, ASCIILiteral(), s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCode, readableByteStreamControllerHandleQueueDrain, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerPullCode, readableByteStreamControllerPull, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerPullCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCode, readableByteStreamControllerShouldCallPull, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCode, readableByteStreamControllerCallPullIfNeeded, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeLength) \
+ macro(readableByteStreamInternalsTransferBufferToCurrentRealmCode, transferBufferToCurrentRealm, ASCIILiteral(), s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeLength) \
+ macro(readableByteStreamInternalsReadableStreamReaderKindCode, readableStreamReaderKind, ASCIILiteral(), s_readableByteStreamInternalsReadableStreamReaderKindCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerEnqueueCode, readableByteStreamControllerEnqueue, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCode, readableByteStreamControllerEnqueueChunk, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCode, readableByteStreamControllerRespondWithNewView, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerRespondCode, readableByteStreamControllerRespond, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerRespondInternalCode, readableByteStreamControllerRespondInternal, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCode, readableByteStreamControllerRespondInReadableState, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCode, readableByteStreamControllerRespondInClosedState, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCode, readableByteStreamControllerProcessPullDescriptors, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCode, readableByteStreamControllerFillDescriptorFromQueue, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCode, readableByteStreamControllerShiftPendingDescriptor, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCode, readableByteStreamControllerInvalidateBYOBRequest, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCode, readableByteStreamControllerCommitDescriptor, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCode, readableByteStreamControllerConvertDescriptor, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeLength) \
+ macro(readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCode, readableStreamFulfillReadIntoRequest, ASCIILiteral(), s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeLength) \
+ macro(readableByteStreamInternalsReadableStreamBYOBReaderReadCode, readableStreamBYOBReaderRead, ASCIILiteral(), s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeLength) \
+ macro(readableByteStreamInternalsReadableByteStreamControllerPullIntoCode, readableByteStreamControllerPullInto, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeLength) \
+ macro(readableByteStreamInternalsReadableStreamAddReadIntoRequestCode, readableStreamAddReadIntoRequest, ASCIILiteral(), s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeLength) \
+
+#define WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(macro) \
+ macro(privateInitializeReadableByteStreamController) \
+ macro(readableStreamByteStreamControllerStart) \
+ macro(privateInitializeReadableStreamBYOBRequest) \
+ macro(isReadableByteStreamController) \
+ macro(isReadableStreamBYOBRequest) \
+ macro(isReadableStreamBYOBReader) \
+ macro(readableByteStreamControllerCancel) \
+ macro(readableByteStreamControllerError) \
+ macro(readableByteStreamControllerClose) \
+ macro(readableByteStreamControllerClearPendingPullIntos) \
+ macro(readableByteStreamControllerGetDesiredSize) \
+ macro(readableStreamHasBYOBReader) \
+ macro(readableStreamHasDefaultReader) \
+ macro(readableByteStreamControllerHandleQueueDrain) \
+ macro(readableByteStreamControllerPull) \
+ macro(readableByteStreamControllerShouldCallPull) \
+ macro(readableByteStreamControllerCallPullIfNeeded) \
+ macro(transferBufferToCurrentRealm) \
+ macro(readableStreamReaderKind) \
+ macro(readableByteStreamControllerEnqueue) \
+ macro(readableByteStreamControllerEnqueueChunk) \
+ macro(readableByteStreamControllerRespondWithNewView) \
+ macro(readableByteStreamControllerRespond) \
+ macro(readableByteStreamControllerRespondInternal) \
+ macro(readableByteStreamControllerRespondInReadableState) \
+ macro(readableByteStreamControllerRespondInClosedState) \
+ macro(readableByteStreamControllerProcessPullDescriptors) \
+ macro(readableByteStreamControllerFillDescriptorFromQueue) \
+ macro(readableByteStreamControllerShiftPendingDescriptor) \
+ macro(readableByteStreamControllerInvalidateBYOBRequest) \
+ macro(readableByteStreamControllerCommitDescriptor) \
+ macro(readableByteStreamControllerConvertDescriptor) \
+ macro(readableStreamFulfillReadIntoRequest) \
+ macro(readableStreamBYOBReaderRead) \
+ macro(readableByteStreamControllerPullInto) \
+ macro(readableStreamAddReadIntoRequest) \
#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
#undef DECLARE_BUILTIN_GENERATOR
-class TransformStreamDefaultControllerBuiltinsWrapper : private JSC::WeakHandleOwner {
+class ReadableByteStreamInternalsBuiltinsWrapper : private JSC::WeakHandleOwner {
public:
- explicit TransformStreamDefaultControllerBuiltinsWrapper(JSC::VM& vm)
+ explicit ReadableByteStreamInternalsBuiltinsWrapper(JSC::VM& vm)
: m_vm(vm)
- WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
{
}
@@ -3456,28 +2896,28 @@ public:
#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
JSC::UnlinkedFunctionExecutable* name##Executable(); \
const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+ WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
#undef EXPOSE_BUILTIN_EXECUTABLES
- WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+ WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
void exportNames();
private:
JSC::VM& m_vm;
- WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
JSC::SourceCode m_##name##Source;\
JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
#undef DECLARE_BUILTIN_SOURCE_MEMBERS
};
#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* TransformStreamDefaultControllerBuiltinsWrapper::name##Executable() \
+inline JSC::UnlinkedFunctionExecutable* ReadableByteStreamInternalsBuiltinsWrapper::name##Executable() \
{\
if (!m_##name##Executable) {\
JSC::Identifier executableName = functionName##PublicName();\
@@ -3487,90 +2927,91 @@ inline JSC::UnlinkedFunctionExecutable* TransformStreamDefaultControllerBuiltins
}\
return m_##name##Executable.get();\
}
-WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
#undef DEFINE_BUILTIN_EXECUTABLES
-inline void TransformStreamDefaultControllerBuiltinsWrapper::exportNames()
+inline void ReadableByteStreamInternalsBuiltinsWrapper::exportNames()
{
#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+ WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
-/* ReadableStreamBYOBReader.ts */
-// initializeReadableStreamBYOBReader
-#define WEBCORE_BUILTIN_READABLESTREAMBYOBREADER_INITIALIZEREADABLESTREAMBYOBREADER 1
-extern const char* const s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCode;
-extern const int s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeLength;
-extern const JSC::ConstructAbility s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeImplementationVisibility;
+class ReadableByteStreamInternalsBuiltinFunctions {
+public:
+ explicit ReadableByteStreamInternalsBuiltinFunctions(JSC::VM& vm) : m_vm(vm) { }
-// cancel
-#define WEBCORE_BUILTIN_READABLESTREAMBYOBREADER_CANCEL 1
-extern const char* const s_readableStreamBYOBReaderCancelCode;
-extern const int s_readableStreamBYOBReaderCancelCodeLength;
-extern const JSC::ConstructAbility s_readableStreamBYOBReaderCancelCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamBYOBReaderCancelCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamBYOBReaderCancelCodeImplementationVisibility;
+ void init(JSC::JSGlobalObject&);
+ template<typename Visitor> void visit(Visitor&);
-// read
-#define WEBCORE_BUILTIN_READABLESTREAMBYOBREADER_READ 1
-extern const char* const s_readableStreamBYOBReaderReadCode;
-extern const int s_readableStreamBYOBReaderReadCodeLength;
-extern const JSC::ConstructAbility s_readableStreamBYOBReaderReadCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamBYOBReaderReadCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamBYOBReaderReadCodeImplementationVisibility;
+public:
+ JSC::VM& m_vm;
-// releaseLock
-#define WEBCORE_BUILTIN_READABLESTREAMBYOBREADER_RELEASELOCK 1
-extern const char* const s_readableStreamBYOBReaderReleaseLockCode;
-extern const int s_readableStreamBYOBReaderReleaseLockCodeLength;
-extern const JSC::ConstructAbility s_readableStreamBYOBReaderReleaseLockCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamBYOBReaderReleaseLockCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamBYOBReaderReleaseLockCodeImplementationVisibility;
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(functionName) \
+ JSC::WriteBarrier<JSC::JSFunction> m_##functionName##Function;
+ WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_SOURCE_MEMBERS)
+#undef DECLARE_BUILTIN_SOURCE_MEMBERS
+};
-// closed
-#define WEBCORE_BUILTIN_READABLESTREAMBYOBREADER_CLOSED 1
-extern const char* const s_readableStreamBYOBReaderClosedCode;
-extern const int s_readableStreamBYOBReaderClosedCodeLength;
-extern const JSC::ConstructAbility s_readableStreamBYOBReaderClosedCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamBYOBReaderClosedCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamBYOBReaderClosedCodeImplementationVisibility;
+inline void ReadableByteStreamInternalsBuiltinFunctions::init(JSC::JSGlobalObject& globalObject)
+{
+#define EXPORT_FUNCTION(codeName, functionName, overriddenName, length) \
+ m_##functionName##Function.set(m_vm, &globalObject, JSC::JSFunction::create(m_vm, codeName##Generator(m_vm), &globalObject));
+ WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_CODE(EXPORT_FUNCTION)
+#undef EXPORT_FUNCTION
+}
-#define WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_DATA(macro) \
- macro(initializeReadableStreamBYOBReader, readableStreamBYOBReaderInitializeReadableStreamBYOBReader, 1) \
- macro(cancel, readableStreamBYOBReaderCancel, 1) \
- macro(read, readableStreamBYOBReaderRead, 1) \
- macro(releaseLock, readableStreamBYOBReaderReleaseLock, 0) \
- macro(closed, readableStreamBYOBReaderClosed, 0) \
+template<typename Visitor>
+inline void ReadableByteStreamInternalsBuiltinFunctions::visit(Visitor& visitor)
+{
+#define VISIT_FUNCTION(name) visitor.append(m_##name##Function);
+ WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(VISIT_FUNCTION)
+#undef VISIT_FUNCTION
+}
-#define WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_CODE(macro) \
- macro(readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCode, initializeReadableStreamBYOBReader, ASCIILiteral(), s_readableStreamBYOBReaderInitializeReadableStreamBYOBReaderCodeLength) \
- macro(readableStreamBYOBReaderCancelCode, cancel, ASCIILiteral(), s_readableStreamBYOBReaderCancelCodeLength) \
- macro(readableStreamBYOBReaderReadCode, read, ASCIILiteral(), s_readableStreamBYOBReaderReadCodeLength) \
- macro(readableStreamBYOBReaderReleaseLockCode, releaseLock, ASCIILiteral(), s_readableStreamBYOBReaderReleaseLockCodeLength) \
- macro(readableStreamBYOBReaderClosedCode, closed, "get closed"_s, s_readableStreamBYOBReaderClosedCodeLength) \
+template void ReadableByteStreamInternalsBuiltinFunctions::visit(JSC::AbstractSlotVisitor&);
+template void ReadableByteStreamInternalsBuiltinFunctions::visit(JSC::SlotVisitor&);
+ /* UtilInspect.ts */
+// getStylizeWithColor
+#define WEBCORE_BUILTIN_UTILINSPECT_GETSTYLIZEWITHCOLOR 1
+extern const char* const s_utilInspectGetStylizeWithColorCode;
+extern const int s_utilInspectGetStylizeWithColorCodeLength;
+extern const JSC::ConstructAbility s_utilInspectGetStylizeWithColorCodeConstructAbility;
+extern const JSC::ConstructorKind s_utilInspectGetStylizeWithColorCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_utilInspectGetStylizeWithColorCodeImplementationVisibility;
-#define WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_FUNCTION_NAME(macro) \
- macro(initializeReadableStreamBYOBReader) \
- macro(cancel) \
- macro(read) \
- macro(releaseLock) \
- macro(closed) \
+// stylizeWithNoColor
+#define WEBCORE_BUILTIN_UTILINSPECT_STYLIZEWITHNOCOLOR 1
+extern const char* const s_utilInspectStylizeWithNoColorCode;
+extern const int s_utilInspectStylizeWithNoColorCodeLength;
+extern const JSC::ConstructAbility s_utilInspectStylizeWithNoColorCodeConstructAbility;
+extern const JSC::ConstructorKind s_utilInspectStylizeWithNoColorCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_utilInspectStylizeWithNoColorCodeImplementationVisibility;
+
+#define WEBCORE_FOREACH_UTILINSPECT_BUILTIN_DATA(macro) \
+ macro(getStylizeWithColor, utilInspectGetStylizeWithColor, 1) \
+ macro(stylizeWithNoColor, utilInspectStylizeWithNoColor, 1) \
+
+#define WEBCORE_FOREACH_UTILINSPECT_BUILTIN_CODE(macro) \
+ macro(utilInspectGetStylizeWithColorCode, getStylizeWithColor, ASCIILiteral(), s_utilInspectGetStylizeWithColorCodeLength) \
+ macro(utilInspectStylizeWithNoColorCode, stylizeWithNoColor, ASCIILiteral(), s_utilInspectStylizeWithNoColorCodeLength) \
+
+#define WEBCORE_FOREACH_UTILINSPECT_BUILTIN_FUNCTION_NAME(macro) \
+ macro(getStylizeWithColor) \
+ macro(stylizeWithNoColor) \
#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_UTILINSPECT_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
#undef DECLARE_BUILTIN_GENERATOR
-class ReadableStreamBYOBReaderBuiltinsWrapper : private JSC::WeakHandleOwner {
+class UtilInspectBuiltinsWrapper : private JSC::WeakHandleOwner {
public:
- explicit ReadableStreamBYOBReaderBuiltinsWrapper(JSC::VM& vm)
+ explicit UtilInspectBuiltinsWrapper(JSC::VM& vm)
: m_vm(vm)
- WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_UTILINSPECT_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_UTILINSPECT_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
{
}
@@ -3578,28 +3019,28 @@ public:
#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
JSC::UnlinkedFunctionExecutable* name##Executable(); \
const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+ WEBCORE_FOREACH_UTILINSPECT_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
#undef EXPOSE_BUILTIN_EXECUTABLES
- WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+ WEBCORE_FOREACH_UTILINSPECT_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
void exportNames();
private:
JSC::VM& m_vm;
- WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_UTILINSPECT_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
JSC::SourceCode m_##name##Source;\
JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_UTILINSPECT_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
#undef DECLARE_BUILTIN_SOURCE_MEMBERS
};
#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* ReadableStreamBYOBReaderBuiltinsWrapper::name##Executable() \
+inline JSC::UnlinkedFunctionExecutable* UtilInspectBuiltinsWrapper::name##Executable() \
{\
if (!m_##name##Executable) {\
JSC::Identifier executableName = functionName##PublicName();\
@@ -3609,57 +3050,761 @@ inline JSC::UnlinkedFunctionExecutable* ReadableStreamBYOBReaderBuiltinsWrapper:
}\
return m_##name##Executable.get();\
}
-WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+WEBCORE_FOREACH_UTILINSPECT_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
#undef DEFINE_BUILTIN_EXECUTABLES
-inline void ReadableStreamBYOBReaderBuiltinsWrapper::exportNames()
+inline void UtilInspectBuiltinsWrapper::exportNames()
{
#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_READABLESTREAMBYOBREADER_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+ WEBCORE_FOREACH_UTILINSPECT_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
-/* JSBufferConstructor.ts */
-// from
-#define WEBCORE_BUILTIN_JSBUFFERCONSTRUCTOR_FROM 1
-extern const char* const s_jsBufferConstructorFromCode;
-extern const int s_jsBufferConstructorFromCodeLength;
-extern const JSC::ConstructAbility s_jsBufferConstructorFromCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferConstructorFromCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferConstructorFromCodeImplementationVisibility;
+/* JSBufferPrototype.ts */
+// setBigUint64
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_SETBIGUINT64 1
+extern const char* const s_jsBufferPrototypeSetBigUint64Code;
+extern const int s_jsBufferPrototypeSetBigUint64CodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeSetBigUint64CodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeSetBigUint64CodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeSetBigUint64CodeImplementationVisibility;
-// isBuffer
-#define WEBCORE_BUILTIN_JSBUFFERCONSTRUCTOR_ISBUFFER 1
-extern const char* const s_jsBufferConstructorIsBufferCode;
-extern const int s_jsBufferConstructorIsBufferCodeLength;
-extern const JSC::ConstructAbility s_jsBufferConstructorIsBufferCodeConstructAbility;
-extern const JSC::ConstructorKind s_jsBufferConstructorIsBufferCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_jsBufferConstructorIsBufferCodeImplementationVisibility;
+// readInt8
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READINT8 1
+extern const char* const s_jsBufferPrototypeReadInt8Code;
+extern const int s_jsBufferPrototypeReadInt8CodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadInt8CodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadInt8CodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt8CodeImplementationVisibility;
-#define WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_DATA(macro) \
- macro(from, jsBufferConstructorFrom, 1) \
- macro(isBuffer, jsBufferConstructorIsBuffer, 1) \
+// readUInt8
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READUINT8 1
+extern const char* const s_jsBufferPrototypeReadUInt8Code;
+extern const int s_jsBufferPrototypeReadUInt8CodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadUInt8CodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadUInt8CodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt8CodeImplementationVisibility;
-#define WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_CODE(macro) \
- macro(jsBufferConstructorFromCode, from, ASCIILiteral(), s_jsBufferConstructorFromCodeLength) \
- macro(jsBufferConstructorIsBufferCode, isBuffer, ASCIILiteral(), s_jsBufferConstructorIsBufferCodeLength) \
+// readInt16LE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READINT16LE 1
+extern const char* const s_jsBufferPrototypeReadInt16LECode;
+extern const int s_jsBufferPrototypeReadInt16LECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadInt16LECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadInt16LECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt16LECodeImplementationVisibility;
-#define WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_FUNCTION_NAME(macro) \
- macro(from) \
- macro(isBuffer) \
+// readInt16BE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READINT16BE 1
+extern const char* const s_jsBufferPrototypeReadInt16BECode;
+extern const int s_jsBufferPrototypeReadInt16BECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadInt16BECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadInt16BECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt16BECodeImplementationVisibility;
+
+// readUInt16LE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READUINT16LE 1
+extern const char* const s_jsBufferPrototypeReadUInt16LECode;
+extern const int s_jsBufferPrototypeReadUInt16LECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadUInt16LECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadUInt16LECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt16LECodeImplementationVisibility;
+
+// readUInt16BE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READUINT16BE 1
+extern const char* const s_jsBufferPrototypeReadUInt16BECode;
+extern const int s_jsBufferPrototypeReadUInt16BECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadUInt16BECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadUInt16BECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt16BECodeImplementationVisibility;
+
+// readInt32LE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READINT32LE 1
+extern const char* const s_jsBufferPrototypeReadInt32LECode;
+extern const int s_jsBufferPrototypeReadInt32LECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadInt32LECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadInt32LECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt32LECodeImplementationVisibility;
+
+// readInt32BE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READINT32BE 1
+extern const char* const s_jsBufferPrototypeReadInt32BECode;
+extern const int s_jsBufferPrototypeReadInt32BECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadInt32BECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadInt32BECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadInt32BECodeImplementationVisibility;
+
+// readUInt32LE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READUINT32LE 1
+extern const char* const s_jsBufferPrototypeReadUInt32LECode;
+extern const int s_jsBufferPrototypeReadUInt32LECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadUInt32LECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadUInt32LECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt32LECodeImplementationVisibility;
+
+// readUInt32BE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READUINT32BE 1
+extern const char* const s_jsBufferPrototypeReadUInt32BECode;
+extern const int s_jsBufferPrototypeReadUInt32BECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadUInt32BECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadUInt32BECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadUInt32BECodeImplementationVisibility;
+
+// readIntLE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READINTLE 1
+extern const char* const s_jsBufferPrototypeReadIntLECode;
+extern const int s_jsBufferPrototypeReadIntLECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadIntLECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadIntLECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadIntLECodeImplementationVisibility;
+
+// readIntBE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READINTBE 1
+extern const char* const s_jsBufferPrototypeReadIntBECode;
+extern const int s_jsBufferPrototypeReadIntBECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadIntBECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadIntBECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadIntBECodeImplementationVisibility;
+
+// readUIntLE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READUINTLE 1
+extern const char* const s_jsBufferPrototypeReadUIntLECode;
+extern const int s_jsBufferPrototypeReadUIntLECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadUIntLECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadUIntLECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadUIntLECodeImplementationVisibility;
+
+// readUIntBE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READUINTBE 1
+extern const char* const s_jsBufferPrototypeReadUIntBECode;
+extern const int s_jsBufferPrototypeReadUIntBECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadUIntBECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadUIntBECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadUIntBECodeImplementationVisibility;
+
+// readFloatLE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READFLOATLE 1
+extern const char* const s_jsBufferPrototypeReadFloatLECode;
+extern const int s_jsBufferPrototypeReadFloatLECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadFloatLECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadFloatLECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadFloatLECodeImplementationVisibility;
+
+// readFloatBE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READFLOATBE 1
+extern const char* const s_jsBufferPrototypeReadFloatBECode;
+extern const int s_jsBufferPrototypeReadFloatBECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadFloatBECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadFloatBECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadFloatBECodeImplementationVisibility;
+
+// readDoubleLE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READDOUBLELE 1
+extern const char* const s_jsBufferPrototypeReadDoubleLECode;
+extern const int s_jsBufferPrototypeReadDoubleLECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadDoubleLECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadDoubleLECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadDoubleLECodeImplementationVisibility;
+
+// readDoubleBE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READDOUBLEBE 1
+extern const char* const s_jsBufferPrototypeReadDoubleBECode;
+extern const int s_jsBufferPrototypeReadDoubleBECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadDoubleBECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadDoubleBECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadDoubleBECodeImplementationVisibility;
+
+// readBigInt64LE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READBIGINT64LE 1
+extern const char* const s_jsBufferPrototypeReadBigInt64LECode;
+extern const int s_jsBufferPrototypeReadBigInt64LECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadBigInt64LECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadBigInt64LECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigInt64LECodeImplementationVisibility;
+
+// readBigInt64BE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READBIGINT64BE 1
+extern const char* const s_jsBufferPrototypeReadBigInt64BECode;
+extern const int s_jsBufferPrototypeReadBigInt64BECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadBigInt64BECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadBigInt64BECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigInt64BECodeImplementationVisibility;
+
+// readBigUInt64LE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READBIGUINT64LE 1
+extern const char* const s_jsBufferPrototypeReadBigUInt64LECode;
+extern const int s_jsBufferPrototypeReadBigUInt64LECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadBigUInt64LECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadBigUInt64LECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigUInt64LECodeImplementationVisibility;
+
+// readBigUInt64BE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_READBIGUINT64BE 1
+extern const char* const s_jsBufferPrototypeReadBigUInt64BECode;
+extern const int s_jsBufferPrototypeReadBigUInt64BECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeReadBigUInt64BECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeReadBigUInt64BECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeReadBigUInt64BECodeImplementationVisibility;
+
+// writeInt8
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEINT8 1
+extern const char* const s_jsBufferPrototypeWriteInt8Code;
+extern const int s_jsBufferPrototypeWriteInt8CodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteInt8CodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteInt8CodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt8CodeImplementationVisibility;
+
+// writeUInt8
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEUINT8 1
+extern const char* const s_jsBufferPrototypeWriteUInt8Code;
+extern const int s_jsBufferPrototypeWriteUInt8CodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt8CodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt8CodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt8CodeImplementationVisibility;
+
+// writeInt16LE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEINT16LE 1
+extern const char* const s_jsBufferPrototypeWriteInt16LECode;
+extern const int s_jsBufferPrototypeWriteInt16LECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteInt16LECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteInt16LECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt16LECodeImplementationVisibility;
+
+// writeInt16BE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEINT16BE 1
+extern const char* const s_jsBufferPrototypeWriteInt16BECode;
+extern const int s_jsBufferPrototypeWriteInt16BECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteInt16BECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteInt16BECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt16BECodeImplementationVisibility;
+
+// writeUInt16LE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEUINT16LE 1
+extern const char* const s_jsBufferPrototypeWriteUInt16LECode;
+extern const int s_jsBufferPrototypeWriteUInt16LECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt16LECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt16LECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt16LECodeImplementationVisibility;
+
+// writeUInt16BE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEUINT16BE 1
+extern const char* const s_jsBufferPrototypeWriteUInt16BECode;
+extern const int s_jsBufferPrototypeWriteUInt16BECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt16BECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt16BECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt16BECodeImplementationVisibility;
+
+// writeInt32LE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEINT32LE 1
+extern const char* const s_jsBufferPrototypeWriteInt32LECode;
+extern const int s_jsBufferPrototypeWriteInt32LECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteInt32LECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteInt32LECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt32LECodeImplementationVisibility;
+
+// writeInt32BE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEINT32BE 1
+extern const char* const s_jsBufferPrototypeWriteInt32BECode;
+extern const int s_jsBufferPrototypeWriteInt32BECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteInt32BECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteInt32BECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt32BECodeImplementationVisibility;
+
+// writeUInt32LE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEUINT32LE 1
+extern const char* const s_jsBufferPrototypeWriteUInt32LECode;
+extern const int s_jsBufferPrototypeWriteUInt32LECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt32LECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt32LECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt32LECodeImplementationVisibility;
+
+// writeUInt32BE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEUINT32BE 1
+extern const char* const s_jsBufferPrototypeWriteUInt32BECode;
+extern const int s_jsBufferPrototypeWriteUInt32BECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt32BECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt32BECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt32BECodeImplementationVisibility;
+
+// writeIntLE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEINTLE 1
+extern const char* const s_jsBufferPrototypeWriteIntLECode;
+extern const int s_jsBufferPrototypeWriteIntLECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteIntLECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteIntLECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteIntLECodeImplementationVisibility;
+
+// writeIntBE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEINTBE 1
+extern const char* const s_jsBufferPrototypeWriteIntBECode;
+extern const int s_jsBufferPrototypeWriteIntBECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteIntBECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteIntBECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteIntBECodeImplementationVisibility;
+
+// writeUIntLE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEUINTLE 1
+extern const char* const s_jsBufferPrototypeWriteUIntLECode;
+extern const int s_jsBufferPrototypeWriteUIntLECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteUIntLECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteUIntLECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUIntLECodeImplementationVisibility;
+
+// writeUIntBE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEUINTBE 1
+extern const char* const s_jsBufferPrototypeWriteUIntBECode;
+extern const int s_jsBufferPrototypeWriteUIntBECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteUIntBECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteUIntBECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUIntBECodeImplementationVisibility;
+
+// writeFloatLE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEFLOATLE 1
+extern const char* const s_jsBufferPrototypeWriteFloatLECode;
+extern const int s_jsBufferPrototypeWriteFloatLECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteFloatLECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteFloatLECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteFloatLECodeImplementationVisibility;
+
+// writeFloatBE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEFLOATBE 1
+extern const char* const s_jsBufferPrototypeWriteFloatBECode;
+extern const int s_jsBufferPrototypeWriteFloatBECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteFloatBECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteFloatBECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteFloatBECodeImplementationVisibility;
+
+// writeDoubleLE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEDOUBLELE 1
+extern const char* const s_jsBufferPrototypeWriteDoubleLECode;
+extern const int s_jsBufferPrototypeWriteDoubleLECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteDoubleLECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteDoubleLECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteDoubleLECodeImplementationVisibility;
+
+// writeDoubleBE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEDOUBLEBE 1
+extern const char* const s_jsBufferPrototypeWriteDoubleBECode;
+extern const int s_jsBufferPrototypeWriteDoubleBECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteDoubleBECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteDoubleBECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteDoubleBECodeImplementationVisibility;
+
+// writeBigInt64LE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEBIGINT64LE 1
+extern const char* const s_jsBufferPrototypeWriteBigInt64LECode;
+extern const int s_jsBufferPrototypeWriteBigInt64LECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteBigInt64LECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteBigInt64LECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigInt64LECodeImplementationVisibility;
+
+// writeBigInt64BE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEBIGINT64BE 1
+extern const char* const s_jsBufferPrototypeWriteBigInt64BECode;
+extern const int s_jsBufferPrototypeWriteBigInt64BECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteBigInt64BECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteBigInt64BECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigInt64BECodeImplementationVisibility;
+
+// writeBigUInt64LE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEBIGUINT64LE 1
+extern const char* const s_jsBufferPrototypeWriteBigUInt64LECode;
+extern const int s_jsBufferPrototypeWriteBigUInt64LECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteBigUInt64LECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteBigUInt64LECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigUInt64LECodeImplementationVisibility;
+
+// writeBigUInt64BE
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_WRITEBIGUINT64BE 1
+extern const char* const s_jsBufferPrototypeWriteBigUInt64BECode;
+extern const int s_jsBufferPrototypeWriteBigUInt64BECodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeWriteBigUInt64BECodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeWriteBigUInt64BECodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigUInt64BECodeImplementationVisibility;
+
+// utf8Write
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_UTF8WRITE 1
+extern const char* const s_jsBufferPrototypeUtf8WriteCode;
+extern const int s_jsBufferPrototypeUtf8WriteCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeUtf8WriteCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeUtf8WriteCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeUtf8WriteCodeImplementationVisibility;
+
+// ucs2Write
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_UCS2WRITE 1
+extern const char* const s_jsBufferPrototypeUcs2WriteCode;
+extern const int s_jsBufferPrototypeUcs2WriteCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeUcs2WriteCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeUcs2WriteCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeUcs2WriteCodeImplementationVisibility;
+
+// utf16leWrite
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_UTF16LEWRITE 1
+extern const char* const s_jsBufferPrototypeUtf16leWriteCode;
+extern const int s_jsBufferPrototypeUtf16leWriteCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeUtf16leWriteCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeUtf16leWriteCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeUtf16leWriteCodeImplementationVisibility;
+
+// latin1Write
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_LATIN1WRITE 1
+extern const char* const s_jsBufferPrototypeLatin1WriteCode;
+extern const int s_jsBufferPrototypeLatin1WriteCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeLatin1WriteCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeLatin1WriteCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeLatin1WriteCodeImplementationVisibility;
+
+// asciiWrite
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_ASCIIWRITE 1
+extern const char* const s_jsBufferPrototypeAsciiWriteCode;
+extern const int s_jsBufferPrototypeAsciiWriteCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeAsciiWriteCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeAsciiWriteCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeAsciiWriteCodeImplementationVisibility;
+
+// base64Write
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_BASE64WRITE 1
+extern const char* const s_jsBufferPrototypeBase64WriteCode;
+extern const int s_jsBufferPrototypeBase64WriteCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeBase64WriteCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeBase64WriteCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeBase64WriteCodeImplementationVisibility;
+
+// base64urlWrite
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_BASE64URLWRITE 1
+extern const char* const s_jsBufferPrototypeBase64urlWriteCode;
+extern const int s_jsBufferPrototypeBase64urlWriteCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeBase64urlWriteCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeBase64urlWriteCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeBase64urlWriteCodeImplementationVisibility;
+
+// hexWrite
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_HEXWRITE 1
+extern const char* const s_jsBufferPrototypeHexWriteCode;
+extern const int s_jsBufferPrototypeHexWriteCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeHexWriteCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeHexWriteCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeHexWriteCodeImplementationVisibility;
+
+// utf8Slice
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_UTF8SLICE 1
+extern const char* const s_jsBufferPrototypeUtf8SliceCode;
+extern const int s_jsBufferPrototypeUtf8SliceCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeUtf8SliceCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeUtf8SliceCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeUtf8SliceCodeImplementationVisibility;
+
+// ucs2Slice
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_UCS2SLICE 1
+extern const char* const s_jsBufferPrototypeUcs2SliceCode;
+extern const int s_jsBufferPrototypeUcs2SliceCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeUcs2SliceCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeUcs2SliceCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeUcs2SliceCodeImplementationVisibility;
+
+// utf16leSlice
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_UTF16LESLICE 1
+extern const char* const s_jsBufferPrototypeUtf16leSliceCode;
+extern const int s_jsBufferPrototypeUtf16leSliceCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeUtf16leSliceCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeUtf16leSliceCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeUtf16leSliceCodeImplementationVisibility;
+
+// latin1Slice
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_LATIN1SLICE 1
+extern const char* const s_jsBufferPrototypeLatin1SliceCode;
+extern const int s_jsBufferPrototypeLatin1SliceCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeLatin1SliceCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeLatin1SliceCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeLatin1SliceCodeImplementationVisibility;
+
+// asciiSlice
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_ASCIISLICE 1
+extern const char* const s_jsBufferPrototypeAsciiSliceCode;
+extern const int s_jsBufferPrototypeAsciiSliceCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeAsciiSliceCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeAsciiSliceCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeAsciiSliceCodeImplementationVisibility;
+
+// base64Slice
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_BASE64SLICE 1
+extern const char* const s_jsBufferPrototypeBase64SliceCode;
+extern const int s_jsBufferPrototypeBase64SliceCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeBase64SliceCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeBase64SliceCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeBase64SliceCodeImplementationVisibility;
+
+// base64urlSlice
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_BASE64URLSLICE 1
+extern const char* const s_jsBufferPrototypeBase64urlSliceCode;
+extern const int s_jsBufferPrototypeBase64urlSliceCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeBase64urlSliceCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeBase64urlSliceCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeBase64urlSliceCodeImplementationVisibility;
+
+// hexSlice
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_HEXSLICE 1
+extern const char* const s_jsBufferPrototypeHexSliceCode;
+extern const int s_jsBufferPrototypeHexSliceCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeHexSliceCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeHexSliceCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeHexSliceCodeImplementationVisibility;
+
+// toJSON
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_TOJSON 1
+extern const char* const s_jsBufferPrototypeToJSONCode;
+extern const int s_jsBufferPrototypeToJSONCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeToJSONCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeToJSONCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeToJSONCodeImplementationVisibility;
+
+// slice
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_SLICE 1
+extern const char* const s_jsBufferPrototypeSliceCode;
+extern const int s_jsBufferPrototypeSliceCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeSliceCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeSliceCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeSliceCodeImplementationVisibility;
+
+// parent
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_PARENT 1
+extern const char* const s_jsBufferPrototypeParentCode;
+extern const int s_jsBufferPrototypeParentCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeParentCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeParentCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeParentCodeImplementationVisibility;
+
+// offset
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_OFFSET 1
+extern const char* const s_jsBufferPrototypeOffsetCode;
+extern const int s_jsBufferPrototypeOffsetCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeOffsetCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeOffsetCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeOffsetCodeImplementationVisibility;
+
+// inspect
+#define WEBCORE_BUILTIN_JSBUFFERPROTOTYPE_INSPECT 1
+extern const char* const s_jsBufferPrototypeInspectCode;
+extern const int s_jsBufferPrototypeInspectCodeLength;
+extern const JSC::ConstructAbility s_jsBufferPrototypeInspectCodeConstructAbility;
+extern const JSC::ConstructorKind s_jsBufferPrototypeInspectCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_jsBufferPrototypeInspectCodeImplementationVisibility;
+
+#define WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_DATA(macro) \
+ macro(setBigUint64, jsBufferPrototypeSetBigUint64, 3) \
+ macro(readInt8, jsBufferPrototypeReadInt8, 1) \
+ macro(readUInt8, jsBufferPrototypeReadUInt8, 1) \
+ macro(readInt16LE, jsBufferPrototypeReadInt16LE, 1) \
+ macro(readInt16BE, jsBufferPrototypeReadInt16BE, 1) \
+ macro(readUInt16LE, jsBufferPrototypeReadUInt16LE, 1) \
+ macro(readUInt16BE, jsBufferPrototypeReadUInt16BE, 1) \
+ macro(readInt32LE, jsBufferPrototypeReadInt32LE, 1) \
+ macro(readInt32BE, jsBufferPrototypeReadInt32BE, 1) \
+ macro(readUInt32LE, jsBufferPrototypeReadUInt32LE, 1) \
+ macro(readUInt32BE, jsBufferPrototypeReadUInt32BE, 1) \
+ macro(readIntLE, jsBufferPrototypeReadIntLE, 2) \
+ macro(readIntBE, jsBufferPrototypeReadIntBE, 2) \
+ macro(readUIntLE, jsBufferPrototypeReadUIntLE, 2) \
+ macro(readUIntBE, jsBufferPrototypeReadUIntBE, 2) \
+ macro(readFloatLE, jsBufferPrototypeReadFloatLE, 1) \
+ macro(readFloatBE, jsBufferPrototypeReadFloatBE, 1) \
+ macro(readDoubleLE, jsBufferPrototypeReadDoubleLE, 1) \
+ macro(readDoubleBE, jsBufferPrototypeReadDoubleBE, 1) \
+ macro(readBigInt64LE, jsBufferPrototypeReadBigInt64LE, 1) \
+ macro(readBigInt64BE, jsBufferPrototypeReadBigInt64BE, 1) \
+ macro(readBigUInt64LE, jsBufferPrototypeReadBigUInt64LE, 1) \
+ macro(readBigUInt64BE, jsBufferPrototypeReadBigUInt64BE, 1) \
+ macro(writeInt8, jsBufferPrototypeWriteInt8, 2) \
+ macro(writeUInt8, jsBufferPrototypeWriteUInt8, 2) \
+ macro(writeInt16LE, jsBufferPrototypeWriteInt16LE, 2) \
+ macro(writeInt16BE, jsBufferPrototypeWriteInt16BE, 2) \
+ macro(writeUInt16LE, jsBufferPrototypeWriteUInt16LE, 2) \
+ macro(writeUInt16BE, jsBufferPrototypeWriteUInt16BE, 2) \
+ macro(writeInt32LE, jsBufferPrototypeWriteInt32LE, 2) \
+ macro(writeInt32BE, jsBufferPrototypeWriteInt32BE, 2) \
+ macro(writeUInt32LE, jsBufferPrototypeWriteUInt32LE, 2) \
+ macro(writeUInt32BE, jsBufferPrototypeWriteUInt32BE, 2) \
+ macro(writeIntLE, jsBufferPrototypeWriteIntLE, 3) \
+ macro(writeIntBE, jsBufferPrototypeWriteIntBE, 3) \
+ macro(writeUIntLE, jsBufferPrototypeWriteUIntLE, 3) \
+ macro(writeUIntBE, jsBufferPrototypeWriteUIntBE, 3) \
+ macro(writeFloatLE, jsBufferPrototypeWriteFloatLE, 2) \
+ macro(writeFloatBE, jsBufferPrototypeWriteFloatBE, 2) \
+ macro(writeDoubleLE, jsBufferPrototypeWriteDoubleLE, 2) \
+ macro(writeDoubleBE, jsBufferPrototypeWriteDoubleBE, 2) \
+ macro(writeBigInt64LE, jsBufferPrototypeWriteBigInt64LE, 2) \
+ macro(writeBigInt64BE, jsBufferPrototypeWriteBigInt64BE, 2) \
+ macro(writeBigUInt64LE, jsBufferPrototypeWriteBigUInt64LE, 2) \
+ macro(writeBigUInt64BE, jsBufferPrototypeWriteBigUInt64BE, 2) \
+ macro(utf8Write, jsBufferPrototypeUtf8Write, 3) \
+ macro(ucs2Write, jsBufferPrototypeUcs2Write, 3) \
+ macro(utf16leWrite, jsBufferPrototypeUtf16leWrite, 3) \
+ macro(latin1Write, jsBufferPrototypeLatin1Write, 3) \
+ macro(asciiWrite, jsBufferPrototypeAsciiWrite, 3) \
+ macro(base64Write, jsBufferPrototypeBase64Write, 3) \
+ macro(base64urlWrite, jsBufferPrototypeBase64urlWrite, 3) \
+ macro(hexWrite, jsBufferPrototypeHexWrite, 3) \
+ macro(utf8Slice, jsBufferPrototypeUtf8Slice, 2) \
+ macro(ucs2Slice, jsBufferPrototypeUcs2Slice, 2) \
+ macro(utf16leSlice, jsBufferPrototypeUtf16leSlice, 2) \
+ macro(latin1Slice, jsBufferPrototypeLatin1Slice, 2) \
+ macro(asciiSlice, jsBufferPrototypeAsciiSlice, 2) \
+ macro(base64Slice, jsBufferPrototypeBase64Slice, 2) \
+ macro(base64urlSlice, jsBufferPrototypeBase64urlSlice, 2) \
+ macro(hexSlice, jsBufferPrototypeHexSlice, 2) \
+ macro(toJSON, jsBufferPrototypeToJSON, 0) \
+ macro(slice, jsBufferPrototypeSlice, 2) \
+ macro(parent, jsBufferPrototypeParent, 0) \
+ macro(offset, jsBufferPrototypeOffset, 0) \
+ macro(inspect, jsBufferPrototypeInspect, 2) \
+
+#define WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_CODE(macro) \
+ macro(jsBufferPrototypeSetBigUint64Code, setBigUint64, ASCIILiteral(), s_jsBufferPrototypeSetBigUint64CodeLength) \
+ macro(jsBufferPrototypeReadInt8Code, readInt8, ASCIILiteral(), s_jsBufferPrototypeReadInt8CodeLength) \
+ macro(jsBufferPrototypeReadUInt8Code, readUInt8, ASCIILiteral(), s_jsBufferPrototypeReadUInt8CodeLength) \
+ macro(jsBufferPrototypeReadInt16LECode, readInt16LE, ASCIILiteral(), s_jsBufferPrototypeReadInt16LECodeLength) \
+ macro(jsBufferPrototypeReadInt16BECode, readInt16BE, ASCIILiteral(), s_jsBufferPrototypeReadInt16BECodeLength) \
+ macro(jsBufferPrototypeReadUInt16LECode, readUInt16LE, ASCIILiteral(), s_jsBufferPrototypeReadUInt16LECodeLength) \
+ macro(jsBufferPrototypeReadUInt16BECode, readUInt16BE, ASCIILiteral(), s_jsBufferPrototypeReadUInt16BECodeLength) \
+ macro(jsBufferPrototypeReadInt32LECode, readInt32LE, ASCIILiteral(), s_jsBufferPrototypeReadInt32LECodeLength) \
+ macro(jsBufferPrototypeReadInt32BECode, readInt32BE, ASCIILiteral(), s_jsBufferPrototypeReadInt32BECodeLength) \
+ macro(jsBufferPrototypeReadUInt32LECode, readUInt32LE, ASCIILiteral(), s_jsBufferPrototypeReadUInt32LECodeLength) \
+ macro(jsBufferPrototypeReadUInt32BECode, readUInt32BE, ASCIILiteral(), s_jsBufferPrototypeReadUInt32BECodeLength) \
+ macro(jsBufferPrototypeReadIntLECode, readIntLE, ASCIILiteral(), s_jsBufferPrototypeReadIntLECodeLength) \
+ macro(jsBufferPrototypeReadIntBECode, readIntBE, ASCIILiteral(), s_jsBufferPrototypeReadIntBECodeLength) \
+ macro(jsBufferPrototypeReadUIntLECode, readUIntLE, ASCIILiteral(), s_jsBufferPrototypeReadUIntLECodeLength) \
+ macro(jsBufferPrototypeReadUIntBECode, readUIntBE, ASCIILiteral(), s_jsBufferPrototypeReadUIntBECodeLength) \
+ macro(jsBufferPrototypeReadFloatLECode, readFloatLE, ASCIILiteral(), s_jsBufferPrototypeReadFloatLECodeLength) \
+ macro(jsBufferPrototypeReadFloatBECode, readFloatBE, ASCIILiteral(), s_jsBufferPrototypeReadFloatBECodeLength) \
+ macro(jsBufferPrototypeReadDoubleLECode, readDoubleLE, ASCIILiteral(), s_jsBufferPrototypeReadDoubleLECodeLength) \
+ macro(jsBufferPrototypeReadDoubleBECode, readDoubleBE, ASCIILiteral(), s_jsBufferPrototypeReadDoubleBECodeLength) \
+ macro(jsBufferPrototypeReadBigInt64LECode, readBigInt64LE, ASCIILiteral(), s_jsBufferPrototypeReadBigInt64LECodeLength) \
+ macro(jsBufferPrototypeReadBigInt64BECode, readBigInt64BE, ASCIILiteral(), s_jsBufferPrototypeReadBigInt64BECodeLength) \
+ macro(jsBufferPrototypeReadBigUInt64LECode, readBigUInt64LE, ASCIILiteral(), s_jsBufferPrototypeReadBigUInt64LECodeLength) \
+ macro(jsBufferPrototypeReadBigUInt64BECode, readBigUInt64BE, ASCIILiteral(), s_jsBufferPrototypeReadBigUInt64BECodeLength) \
+ macro(jsBufferPrototypeWriteInt8Code, writeInt8, ASCIILiteral(), s_jsBufferPrototypeWriteInt8CodeLength) \
+ macro(jsBufferPrototypeWriteUInt8Code, writeUInt8, ASCIILiteral(), s_jsBufferPrototypeWriteUInt8CodeLength) \
+ macro(jsBufferPrototypeWriteInt16LECode, writeInt16LE, ASCIILiteral(), s_jsBufferPrototypeWriteInt16LECodeLength) \
+ macro(jsBufferPrototypeWriteInt16BECode, writeInt16BE, ASCIILiteral(), s_jsBufferPrototypeWriteInt16BECodeLength) \
+ macro(jsBufferPrototypeWriteUInt16LECode, writeUInt16LE, ASCIILiteral(), s_jsBufferPrototypeWriteUInt16LECodeLength) \
+ macro(jsBufferPrototypeWriteUInt16BECode, writeUInt16BE, ASCIILiteral(), s_jsBufferPrototypeWriteUInt16BECodeLength) \
+ macro(jsBufferPrototypeWriteInt32LECode, writeInt32LE, ASCIILiteral(), s_jsBufferPrototypeWriteInt32LECodeLength) \
+ macro(jsBufferPrototypeWriteInt32BECode, writeInt32BE, ASCIILiteral(), s_jsBufferPrototypeWriteInt32BECodeLength) \
+ macro(jsBufferPrototypeWriteUInt32LECode, writeUInt32LE, ASCIILiteral(), s_jsBufferPrototypeWriteUInt32LECodeLength) \
+ macro(jsBufferPrototypeWriteUInt32BECode, writeUInt32BE, ASCIILiteral(), s_jsBufferPrototypeWriteUInt32BECodeLength) \
+ macro(jsBufferPrototypeWriteIntLECode, writeIntLE, ASCIILiteral(), s_jsBufferPrototypeWriteIntLECodeLength) \
+ macro(jsBufferPrototypeWriteIntBECode, writeIntBE, ASCIILiteral(), s_jsBufferPrototypeWriteIntBECodeLength) \
+ macro(jsBufferPrototypeWriteUIntLECode, writeUIntLE, ASCIILiteral(), s_jsBufferPrototypeWriteUIntLECodeLength) \
+ macro(jsBufferPrototypeWriteUIntBECode, writeUIntBE, ASCIILiteral(), s_jsBufferPrototypeWriteUIntBECodeLength) \
+ macro(jsBufferPrototypeWriteFloatLECode, writeFloatLE, ASCIILiteral(), s_jsBufferPrototypeWriteFloatLECodeLength) \
+ macro(jsBufferPrototypeWriteFloatBECode, writeFloatBE, ASCIILiteral(), s_jsBufferPrototypeWriteFloatBECodeLength) \
+ macro(jsBufferPrototypeWriteDoubleLECode, writeDoubleLE, ASCIILiteral(), s_jsBufferPrototypeWriteDoubleLECodeLength) \
+ macro(jsBufferPrototypeWriteDoubleBECode, writeDoubleBE, ASCIILiteral(), s_jsBufferPrototypeWriteDoubleBECodeLength) \
+ macro(jsBufferPrototypeWriteBigInt64LECode, writeBigInt64LE, ASCIILiteral(), s_jsBufferPrototypeWriteBigInt64LECodeLength) \
+ macro(jsBufferPrototypeWriteBigInt64BECode, writeBigInt64BE, ASCIILiteral(), s_jsBufferPrototypeWriteBigInt64BECodeLength) \
+ macro(jsBufferPrototypeWriteBigUInt64LECode, writeBigUInt64LE, ASCIILiteral(), s_jsBufferPrototypeWriteBigUInt64LECodeLength) \
+ macro(jsBufferPrototypeWriteBigUInt64BECode, writeBigUInt64BE, ASCIILiteral(), s_jsBufferPrototypeWriteBigUInt64BECodeLength) \
+ macro(jsBufferPrototypeUtf8WriteCode, utf8Write, ASCIILiteral(), s_jsBufferPrototypeUtf8WriteCodeLength) \
+ macro(jsBufferPrototypeUcs2WriteCode, ucs2Write, ASCIILiteral(), s_jsBufferPrototypeUcs2WriteCodeLength) \
+ macro(jsBufferPrototypeUtf16leWriteCode, utf16leWrite, ASCIILiteral(), s_jsBufferPrototypeUtf16leWriteCodeLength) \
+ macro(jsBufferPrototypeLatin1WriteCode, latin1Write, ASCIILiteral(), s_jsBufferPrototypeLatin1WriteCodeLength) \
+ macro(jsBufferPrototypeAsciiWriteCode, asciiWrite, ASCIILiteral(), s_jsBufferPrototypeAsciiWriteCodeLength) \
+ macro(jsBufferPrototypeBase64WriteCode, base64Write, ASCIILiteral(), s_jsBufferPrototypeBase64WriteCodeLength) \
+ macro(jsBufferPrototypeBase64urlWriteCode, base64urlWrite, ASCIILiteral(), s_jsBufferPrototypeBase64urlWriteCodeLength) \
+ macro(jsBufferPrototypeHexWriteCode, hexWrite, ASCIILiteral(), s_jsBufferPrototypeHexWriteCodeLength) \
+ macro(jsBufferPrototypeUtf8SliceCode, utf8Slice, ASCIILiteral(), s_jsBufferPrototypeUtf8SliceCodeLength) \
+ macro(jsBufferPrototypeUcs2SliceCode, ucs2Slice, ASCIILiteral(), s_jsBufferPrototypeUcs2SliceCodeLength) \
+ macro(jsBufferPrototypeUtf16leSliceCode, utf16leSlice, ASCIILiteral(), s_jsBufferPrototypeUtf16leSliceCodeLength) \
+ macro(jsBufferPrototypeLatin1SliceCode, latin1Slice, ASCIILiteral(), s_jsBufferPrototypeLatin1SliceCodeLength) \
+ macro(jsBufferPrototypeAsciiSliceCode, asciiSlice, ASCIILiteral(), s_jsBufferPrototypeAsciiSliceCodeLength) \
+ macro(jsBufferPrototypeBase64SliceCode, base64Slice, ASCIILiteral(), s_jsBufferPrototypeBase64SliceCodeLength) \
+ macro(jsBufferPrototypeBase64urlSliceCode, base64urlSlice, ASCIILiteral(), s_jsBufferPrototypeBase64urlSliceCodeLength) \
+ macro(jsBufferPrototypeHexSliceCode, hexSlice, ASCIILiteral(), s_jsBufferPrototypeHexSliceCodeLength) \
+ macro(jsBufferPrototypeToJSONCode, toJSON, ASCIILiteral(), s_jsBufferPrototypeToJSONCodeLength) \
+ macro(jsBufferPrototypeSliceCode, slice, ASCIILiteral(), s_jsBufferPrototypeSliceCodeLength) \
+ macro(jsBufferPrototypeParentCode, parent, "get parent"_s, s_jsBufferPrototypeParentCodeLength) \
+ macro(jsBufferPrototypeOffsetCode, offset, "get offset"_s, s_jsBufferPrototypeOffsetCodeLength) \
+ macro(jsBufferPrototypeInspectCode, inspect, ASCIILiteral(), s_jsBufferPrototypeInspectCodeLength) \
+
+#define WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_FUNCTION_NAME(macro) \
+ macro(setBigUint64) \
+ macro(readInt8) \
+ macro(readUInt8) \
+ macro(readInt16LE) \
+ macro(readInt16BE) \
+ macro(readUInt16LE) \
+ macro(readUInt16BE) \
+ macro(readInt32LE) \
+ macro(readInt32BE) \
+ macro(readUInt32LE) \
+ macro(readUInt32BE) \
+ macro(readIntLE) \
+ macro(readIntBE) \
+ macro(readUIntLE) \
+ macro(readUIntBE) \
+ macro(readFloatLE) \
+ macro(readFloatBE) \
+ macro(readDoubleLE) \
+ macro(readDoubleBE) \
+ macro(readBigInt64LE) \
+ macro(readBigInt64BE) \
+ macro(readBigUInt64LE) \
+ macro(readBigUInt64BE) \
+ macro(writeInt8) \
+ macro(writeUInt8) \
+ macro(writeInt16LE) \
+ macro(writeInt16BE) \
+ macro(writeUInt16LE) \
+ macro(writeUInt16BE) \
+ macro(writeInt32LE) \
+ macro(writeInt32BE) \
+ macro(writeUInt32LE) \
+ macro(writeUInt32BE) \
+ macro(writeIntLE) \
+ macro(writeIntBE) \
+ macro(writeUIntLE) \
+ macro(writeUIntBE) \
+ macro(writeFloatLE) \
+ macro(writeFloatBE) \
+ macro(writeDoubleLE) \
+ macro(writeDoubleBE) \
+ macro(writeBigInt64LE) \
+ macro(writeBigInt64BE) \
+ macro(writeBigUInt64LE) \
+ macro(writeBigUInt64BE) \
+ macro(utf8Write) \
+ macro(ucs2Write) \
+ macro(utf16leWrite) \
+ macro(latin1Write) \
+ macro(asciiWrite) \
+ macro(base64Write) \
+ macro(base64urlWrite) \
+ macro(hexWrite) \
+ macro(utf8Slice) \
+ macro(ucs2Slice) \
+ macro(utf16leSlice) \
+ macro(latin1Slice) \
+ macro(asciiSlice) \
+ macro(base64Slice) \
+ macro(base64urlSlice) \
+ macro(hexSlice) \
+ macro(toJSON) \
+ macro(slice) \
+ macro(parent) \
+ macro(offset) \
+ macro(inspect) \
#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
#undef DECLARE_BUILTIN_GENERATOR
-class JSBufferConstructorBuiltinsWrapper : private JSC::WeakHandleOwner {
+class JSBufferPrototypeBuiltinsWrapper : private JSC::WeakHandleOwner {
public:
- explicit JSBufferConstructorBuiltinsWrapper(JSC::VM& vm)
+ explicit JSBufferPrototypeBuiltinsWrapper(JSC::VM& vm)
: m_vm(vm)
- WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
{
}
@@ -3667,28 +3812,28 @@ public:
#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
JSC::UnlinkedFunctionExecutable* name##Executable(); \
const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+ WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
#undef EXPOSE_BUILTIN_EXECUTABLES
- WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+ WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
void exportNames();
private:
JSC::VM& m_vm;
- WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
JSC::SourceCode m_##name##Source;\
JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
#undef DECLARE_BUILTIN_SOURCE_MEMBERS
};
#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* JSBufferConstructorBuiltinsWrapper::name##Executable() \
+inline JSC::UnlinkedFunctionExecutable* JSBufferPrototypeBuiltinsWrapper::name##Executable() \
{\
if (!m_##name##Executable) {\
JSC::Identifier executableName = functionName##PublicName();\
@@ -3698,101 +3843,233 @@ inline JSC::UnlinkedFunctionExecutable* JSBufferConstructorBuiltinsWrapper::name
}\
return m_##name##Executable.get();\
}
-WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
#undef DEFINE_BUILTIN_EXECUTABLES
-inline void JSBufferConstructorBuiltinsWrapper::exportNames()
+inline void JSBufferPrototypeBuiltinsWrapper::exportNames()
{
#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_JSBUFFERCONSTRUCTOR_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+ WEBCORE_FOREACH_JSBUFFERPROTOTYPE_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
-/* ReadableStreamDefaultReader.ts */
-// initializeReadableStreamDefaultReader
-#define WEBCORE_BUILTIN_READABLESTREAMDEFAULTREADER_INITIALIZEREADABLESTREAMDEFAULTREADER 1
-extern const char* const s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCode;
-extern const int s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeLength;
-extern const JSC::ConstructAbility s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeImplementationVisibility;
+/* ReadableStream.ts */
+// initializeReadableStream
+#define WEBCORE_BUILTIN_READABLESTREAM_INITIALIZEREADABLESTREAM 1
+extern const char* const s_readableStreamInitializeReadableStreamCode;
+extern const int s_readableStreamInitializeReadableStreamCodeLength;
+extern const JSC::ConstructAbility s_readableStreamInitializeReadableStreamCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamInitializeReadableStreamCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamInitializeReadableStreamCodeImplementationVisibility;
+
+// readableStreamToArray
+#define WEBCORE_BUILTIN_READABLESTREAM_READABLESTREAMTOARRAY 1
+extern const char* const s_readableStreamReadableStreamToArrayCode;
+extern const int s_readableStreamReadableStreamToArrayCodeLength;
+extern const JSC::ConstructAbility s_readableStreamReadableStreamToArrayCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamReadableStreamToArrayCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamReadableStreamToArrayCodeImplementationVisibility;
+
+// readableStreamToText
+#define WEBCORE_BUILTIN_READABLESTREAM_READABLESTREAMTOTEXT 1
+extern const char* const s_readableStreamReadableStreamToTextCode;
+extern const int s_readableStreamReadableStreamToTextCodeLength;
+extern const JSC::ConstructAbility s_readableStreamReadableStreamToTextCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamReadableStreamToTextCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamReadableStreamToTextCodeImplementationVisibility;
+
+// readableStreamToArrayBuffer
+#define WEBCORE_BUILTIN_READABLESTREAM_READABLESTREAMTOARRAYBUFFER 1
+extern const char* const s_readableStreamReadableStreamToArrayBufferCode;
+extern const int s_readableStreamReadableStreamToArrayBufferCodeLength;
+extern const JSC::ConstructAbility s_readableStreamReadableStreamToArrayBufferCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamReadableStreamToArrayBufferCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamReadableStreamToArrayBufferCodeImplementationVisibility;
+
+// readableStreamToFormData
+#define WEBCORE_BUILTIN_READABLESTREAM_READABLESTREAMTOFORMDATA 1
+extern const char* const s_readableStreamReadableStreamToFormDataCode;
+extern const int s_readableStreamReadableStreamToFormDataCodeLength;
+extern const JSC::ConstructAbility s_readableStreamReadableStreamToFormDataCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamReadableStreamToFormDataCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamReadableStreamToFormDataCodeImplementationVisibility;
+
+// readableStreamToJSON
+#define WEBCORE_BUILTIN_READABLESTREAM_READABLESTREAMTOJSON 1
+extern const char* const s_readableStreamReadableStreamToJSONCode;
+extern const int s_readableStreamReadableStreamToJSONCodeLength;
+extern const JSC::ConstructAbility s_readableStreamReadableStreamToJSONCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamReadableStreamToJSONCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamReadableStreamToJSONCodeImplementationVisibility;
+
+// readableStreamToBlob
+#define WEBCORE_BUILTIN_READABLESTREAM_READABLESTREAMTOBLOB 1
+extern const char* const s_readableStreamReadableStreamToBlobCode;
+extern const int s_readableStreamReadableStreamToBlobCodeLength;
+extern const JSC::ConstructAbility s_readableStreamReadableStreamToBlobCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamReadableStreamToBlobCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamReadableStreamToBlobCodeImplementationVisibility;
+
+// consumeReadableStream
+#define WEBCORE_BUILTIN_READABLESTREAM_CONSUMEREADABLESTREAM 1
+extern const char* const s_readableStreamConsumeReadableStreamCode;
+extern const int s_readableStreamConsumeReadableStreamCodeLength;
+extern const JSC::ConstructAbility s_readableStreamConsumeReadableStreamCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamConsumeReadableStreamCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamConsumeReadableStreamCodeImplementationVisibility;
+
+// createEmptyReadableStream
+#define WEBCORE_BUILTIN_READABLESTREAM_CREATEEMPTYREADABLESTREAM 1
+extern const char* const s_readableStreamCreateEmptyReadableStreamCode;
+extern const int s_readableStreamCreateEmptyReadableStreamCodeLength;
+extern const JSC::ConstructAbility s_readableStreamCreateEmptyReadableStreamCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamCreateEmptyReadableStreamCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamCreateEmptyReadableStreamCodeImplementationVisibility;
+
+// createNativeReadableStream
+#define WEBCORE_BUILTIN_READABLESTREAM_CREATENATIVEREADABLESTREAM 1
+extern const char* const s_readableStreamCreateNativeReadableStreamCode;
+extern const int s_readableStreamCreateNativeReadableStreamCodeLength;
+extern const JSC::ConstructAbility s_readableStreamCreateNativeReadableStreamCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamCreateNativeReadableStreamCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamCreateNativeReadableStreamCodeImplementationVisibility;
// cancel
-#define WEBCORE_BUILTIN_READABLESTREAMDEFAULTREADER_CANCEL 1
-extern const char* const s_readableStreamDefaultReaderCancelCode;
-extern const int s_readableStreamDefaultReaderCancelCodeLength;
-extern const JSC::ConstructAbility s_readableStreamDefaultReaderCancelCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamDefaultReaderCancelCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamDefaultReaderCancelCodeImplementationVisibility;
+#define WEBCORE_BUILTIN_READABLESTREAM_CANCEL 1
+extern const char* const s_readableStreamCancelCode;
+extern const int s_readableStreamCancelCodeLength;
+extern const JSC::ConstructAbility s_readableStreamCancelCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamCancelCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamCancelCodeImplementationVisibility;
-// readMany
-#define WEBCORE_BUILTIN_READABLESTREAMDEFAULTREADER_READMANY 1
-extern const char* const s_readableStreamDefaultReaderReadManyCode;
-extern const int s_readableStreamDefaultReaderReadManyCodeLength;
-extern const JSC::ConstructAbility s_readableStreamDefaultReaderReadManyCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamDefaultReaderReadManyCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamDefaultReaderReadManyCodeImplementationVisibility;
+// getReader
+#define WEBCORE_BUILTIN_READABLESTREAM_GETREADER 1
+extern const char* const s_readableStreamGetReaderCode;
+extern const int s_readableStreamGetReaderCodeLength;
+extern const JSC::ConstructAbility s_readableStreamGetReaderCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamGetReaderCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamGetReaderCodeImplementationVisibility;
-// read
-#define WEBCORE_BUILTIN_READABLESTREAMDEFAULTREADER_READ 1
-extern const char* const s_readableStreamDefaultReaderReadCode;
-extern const int s_readableStreamDefaultReaderReadCodeLength;
-extern const JSC::ConstructAbility s_readableStreamDefaultReaderReadCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamDefaultReaderReadCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamDefaultReaderReadCodeImplementationVisibility;
+// pipeThrough
+#define WEBCORE_BUILTIN_READABLESTREAM_PIPETHROUGH 1
+extern const char* const s_readableStreamPipeThroughCode;
+extern const int s_readableStreamPipeThroughCodeLength;
+extern const JSC::ConstructAbility s_readableStreamPipeThroughCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamPipeThroughCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamPipeThroughCodeImplementationVisibility;
-// releaseLock
-#define WEBCORE_BUILTIN_READABLESTREAMDEFAULTREADER_RELEASELOCK 1
-extern const char* const s_readableStreamDefaultReaderReleaseLockCode;
-extern const int s_readableStreamDefaultReaderReleaseLockCodeLength;
-extern const JSC::ConstructAbility s_readableStreamDefaultReaderReleaseLockCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamDefaultReaderReleaseLockCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamDefaultReaderReleaseLockCodeImplementationVisibility;
+// pipeTo
+#define WEBCORE_BUILTIN_READABLESTREAM_PIPETO 1
+extern const char* const s_readableStreamPipeToCode;
+extern const int s_readableStreamPipeToCodeLength;
+extern const JSC::ConstructAbility s_readableStreamPipeToCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamPipeToCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamPipeToCodeImplementationVisibility;
-// closed
-#define WEBCORE_BUILTIN_READABLESTREAMDEFAULTREADER_CLOSED 1
-extern const char* const s_readableStreamDefaultReaderClosedCode;
-extern const int s_readableStreamDefaultReaderClosedCodeLength;
-extern const JSC::ConstructAbility s_readableStreamDefaultReaderClosedCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamDefaultReaderClosedCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamDefaultReaderClosedCodeImplementationVisibility;
+// tee
+#define WEBCORE_BUILTIN_READABLESTREAM_TEE 1
+extern const char* const s_readableStreamTeeCode;
+extern const int s_readableStreamTeeCodeLength;
+extern const JSC::ConstructAbility s_readableStreamTeeCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamTeeCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamTeeCodeImplementationVisibility;
-#define WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_DATA(macro) \
- macro(initializeReadableStreamDefaultReader, readableStreamDefaultReaderInitializeReadableStreamDefaultReader, 1) \
- macro(cancel, readableStreamDefaultReaderCancel, 1) \
- macro(readMany, readableStreamDefaultReaderReadMany, 0) \
- macro(read, readableStreamDefaultReaderRead, 0) \
- macro(releaseLock, readableStreamDefaultReaderReleaseLock, 0) \
- macro(closed, readableStreamDefaultReaderClosed, 0) \
+// locked
+#define WEBCORE_BUILTIN_READABLESTREAM_LOCKED 1
+extern const char* const s_readableStreamLockedCode;
+extern const int s_readableStreamLockedCodeLength;
+extern const JSC::ConstructAbility s_readableStreamLockedCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamLockedCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamLockedCodeImplementationVisibility;
-#define WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_CODE(macro) \
- macro(readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCode, initializeReadableStreamDefaultReader, ASCIILiteral(), s_readableStreamDefaultReaderInitializeReadableStreamDefaultReaderCodeLength) \
- macro(readableStreamDefaultReaderCancelCode, cancel, ASCIILiteral(), s_readableStreamDefaultReaderCancelCodeLength) \
- macro(readableStreamDefaultReaderReadManyCode, readMany, ASCIILiteral(), s_readableStreamDefaultReaderReadManyCodeLength) \
- macro(readableStreamDefaultReaderReadCode, read, ASCIILiteral(), s_readableStreamDefaultReaderReadCodeLength) \
- macro(readableStreamDefaultReaderReleaseLockCode, releaseLock, ASCIILiteral(), s_readableStreamDefaultReaderReleaseLockCodeLength) \
- macro(readableStreamDefaultReaderClosedCode, closed, "get closed"_s, s_readableStreamDefaultReaderClosedCodeLength) \
+// values
+#define WEBCORE_BUILTIN_READABLESTREAM_VALUES 1
+extern const char* const s_readableStreamValuesCode;
+extern const int s_readableStreamValuesCodeLength;
+extern const JSC::ConstructAbility s_readableStreamValuesCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamValuesCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamValuesCodeImplementationVisibility;
-#define WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_FUNCTION_NAME(macro) \
- macro(initializeReadableStreamDefaultReader) \
+// lazyAsyncIterator
+#define WEBCORE_BUILTIN_READABLESTREAM_LAZYASYNCITERATOR 1
+extern const char* const s_readableStreamLazyAsyncIteratorCode;
+extern const int s_readableStreamLazyAsyncIteratorCodeLength;
+extern const JSC::ConstructAbility s_readableStreamLazyAsyncIteratorCodeConstructAbility;
+extern const JSC::ConstructorKind s_readableStreamLazyAsyncIteratorCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_readableStreamLazyAsyncIteratorCodeImplementationVisibility;
+
+#define WEBCORE_FOREACH_READABLESTREAM_BUILTIN_DATA(macro) \
+ macro(initializeReadableStream, readableStreamInitializeReadableStream, 3) \
+ macro(readableStreamToArray, readableStreamReadableStreamToArray, 1) \
+ macro(readableStreamToText, readableStreamReadableStreamToText, 1) \
+ macro(readableStreamToArrayBuffer, readableStreamReadableStreamToArrayBuffer, 1) \
+ macro(readableStreamToFormData, readableStreamReadableStreamToFormData, 3) \
+ macro(readableStreamToJSON, readableStreamReadableStreamToJSON, 1) \
+ macro(readableStreamToBlob, readableStreamReadableStreamToBlob, 1) \
+ macro(consumeReadableStream, readableStreamConsumeReadableStream, 3) \
+ macro(createEmptyReadableStream, readableStreamCreateEmptyReadableStream, 0) \
+ macro(createNativeReadableStream, readableStreamCreateNativeReadableStream, 3) \
+ macro(cancel, readableStreamCancel, 1) \
+ macro(getReader, readableStreamGetReader, 1) \
+ macro(pipeThrough, readableStreamPipeThrough, 2) \
+ macro(pipeTo, readableStreamPipeTo, 1) \
+ macro(tee, readableStreamTee, 0) \
+ macro(locked, readableStreamLocked, 0) \
+ macro(values, readableStreamValues, 1) \
+ macro(lazyAsyncIterator, readableStreamLazyAsyncIterator, 0) \
+
+#define WEBCORE_FOREACH_READABLESTREAM_BUILTIN_CODE(macro) \
+ macro(readableStreamInitializeReadableStreamCode, initializeReadableStream, ASCIILiteral(), s_readableStreamInitializeReadableStreamCodeLength) \
+ macro(readableStreamReadableStreamToArrayCode, readableStreamToArray, ASCIILiteral(), s_readableStreamReadableStreamToArrayCodeLength) \
+ macro(readableStreamReadableStreamToTextCode, readableStreamToText, ASCIILiteral(), s_readableStreamReadableStreamToTextCodeLength) \
+ macro(readableStreamReadableStreamToArrayBufferCode, readableStreamToArrayBuffer, ASCIILiteral(), s_readableStreamReadableStreamToArrayBufferCodeLength) \
+ macro(readableStreamReadableStreamToFormDataCode, readableStreamToFormData, ASCIILiteral(), s_readableStreamReadableStreamToFormDataCodeLength) \
+ macro(readableStreamReadableStreamToJSONCode, readableStreamToJSON, ASCIILiteral(), s_readableStreamReadableStreamToJSONCodeLength) \
+ macro(readableStreamReadableStreamToBlobCode, readableStreamToBlob, ASCIILiteral(), s_readableStreamReadableStreamToBlobCodeLength) \
+ macro(readableStreamConsumeReadableStreamCode, consumeReadableStream, ASCIILiteral(), s_readableStreamConsumeReadableStreamCodeLength) \
+ macro(readableStreamCreateEmptyReadableStreamCode, createEmptyReadableStream, ASCIILiteral(), s_readableStreamCreateEmptyReadableStreamCodeLength) \
+ macro(readableStreamCreateNativeReadableStreamCode, createNativeReadableStream, ASCIILiteral(), s_readableStreamCreateNativeReadableStreamCodeLength) \
+ macro(readableStreamCancelCode, cancel, ASCIILiteral(), s_readableStreamCancelCodeLength) \
+ macro(readableStreamGetReaderCode, getReader, ASCIILiteral(), s_readableStreamGetReaderCodeLength) \
+ macro(readableStreamPipeThroughCode, pipeThrough, ASCIILiteral(), s_readableStreamPipeThroughCodeLength) \
+ macro(readableStreamPipeToCode, pipeTo, ASCIILiteral(), s_readableStreamPipeToCodeLength) \
+ macro(readableStreamTeeCode, tee, ASCIILiteral(), s_readableStreamTeeCodeLength) \
+ macro(readableStreamLockedCode, locked, "get locked"_s, s_readableStreamLockedCodeLength) \
+ macro(readableStreamValuesCode, values, ASCIILiteral(), s_readableStreamValuesCodeLength) \
+ macro(readableStreamLazyAsyncIteratorCode, lazyAsyncIterator, ASCIILiteral(), s_readableStreamLazyAsyncIteratorCodeLength) \
+
+#define WEBCORE_FOREACH_READABLESTREAM_BUILTIN_FUNCTION_NAME(macro) \
+ macro(initializeReadableStream) \
+ macro(readableStreamToArray) \
+ macro(readableStreamToText) \
+ macro(readableStreamToArrayBuffer) \
+ macro(readableStreamToFormData) \
+ macro(readableStreamToJSON) \
+ macro(readableStreamToBlob) \
+ macro(consumeReadableStream) \
+ macro(createEmptyReadableStream) \
+ macro(createNativeReadableStream) \
macro(cancel) \
- macro(readMany) \
- macro(read) \
- macro(releaseLock) \
- macro(closed) \
+ macro(getReader) \
+ macro(pipeThrough) \
+ macro(pipeTo) \
+ macro(tee) \
+ macro(locked) \
+ macro(values) \
+ macro(lazyAsyncIterator) \
#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_READABLESTREAM_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
#undef DECLARE_BUILTIN_GENERATOR
-class ReadableStreamDefaultReaderBuiltinsWrapper : private JSC::WeakHandleOwner {
+class ReadableStreamBuiltinsWrapper : private JSC::WeakHandleOwner {
public:
- explicit ReadableStreamDefaultReaderBuiltinsWrapper(JSC::VM& vm)
+ explicit ReadableStreamBuiltinsWrapper(JSC::VM& vm)
: m_vm(vm)
- WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_READABLESTREAM_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_READABLESTREAM_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
{
}
@@ -3800,28 +4077,28 @@ public:
#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
JSC::UnlinkedFunctionExecutable* name##Executable(); \
const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+ WEBCORE_FOREACH_READABLESTREAM_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
#undef EXPOSE_BUILTIN_EXECUTABLES
- WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+ WEBCORE_FOREACH_READABLESTREAM_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
void exportNames();
private:
JSC::VM& m_vm;
- WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_READABLESTREAM_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
JSC::SourceCode m_##name##Source;\
JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_READABLESTREAM_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
#undef DECLARE_BUILTIN_SOURCE_MEMBERS
};
#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* ReadableStreamDefaultReaderBuiltinsWrapper::name##Executable() \
+inline JSC::UnlinkedFunctionExecutable* ReadableStreamBuiltinsWrapper::name##Executable() \
{\
if (!m_##name##Executable) {\
JSC::Identifier executableName = functionName##PublicName();\
@@ -3831,13 +4108,113 @@ inline JSC::UnlinkedFunctionExecutable* ReadableStreamDefaultReaderBuiltinsWrapp
}\
return m_##name##Executable.get();\
}
-WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+WEBCORE_FOREACH_READABLESTREAM_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
#undef DEFINE_BUILTIN_EXECUTABLES
-inline void ReadableStreamDefaultReaderBuiltinsWrapper::exportNames()
+inline void ReadableStreamBuiltinsWrapper::exportNames()
{
#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_READABLESTREAMDEFAULTREADER_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+ WEBCORE_FOREACH_READABLESTREAM_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+#undef EXPORT_FUNCTION_NAME
+}
+/* BundlerPlugin.ts */
+// runSetupFunction
+#define WEBCORE_BUILTIN_BUNDLERPLUGIN_RUNSETUPFUNCTION 1
+extern const char* const s_bundlerPluginRunSetupFunctionCode;
+extern const int s_bundlerPluginRunSetupFunctionCodeLength;
+extern const JSC::ConstructAbility s_bundlerPluginRunSetupFunctionCodeConstructAbility;
+extern const JSC::ConstructorKind s_bundlerPluginRunSetupFunctionCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_bundlerPluginRunSetupFunctionCodeImplementationVisibility;
+
+// runOnResolvePlugins
+#define WEBCORE_BUILTIN_BUNDLERPLUGIN_RUNONRESOLVEPLUGINS 1
+extern const char* const s_bundlerPluginRunOnResolvePluginsCode;
+extern const int s_bundlerPluginRunOnResolvePluginsCodeLength;
+extern const JSC::ConstructAbility s_bundlerPluginRunOnResolvePluginsCodeConstructAbility;
+extern const JSC::ConstructorKind s_bundlerPluginRunOnResolvePluginsCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_bundlerPluginRunOnResolvePluginsCodeImplementationVisibility;
+
+// runOnLoadPlugins
+#define WEBCORE_BUILTIN_BUNDLERPLUGIN_RUNONLOADPLUGINS 1
+extern const char* const s_bundlerPluginRunOnLoadPluginsCode;
+extern const int s_bundlerPluginRunOnLoadPluginsCodeLength;
+extern const JSC::ConstructAbility s_bundlerPluginRunOnLoadPluginsCodeConstructAbility;
+extern const JSC::ConstructorKind s_bundlerPluginRunOnLoadPluginsCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_bundlerPluginRunOnLoadPluginsCodeImplementationVisibility;
+
+#define WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_DATA(macro) \
+ macro(runSetupFunction, bundlerPluginRunSetupFunction, 2) \
+ macro(runOnResolvePlugins, bundlerPluginRunOnResolvePlugins, 5) \
+ macro(runOnLoadPlugins, bundlerPluginRunOnLoadPlugins, 4) \
+
+#define WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_CODE(macro) \
+ macro(bundlerPluginRunSetupFunctionCode, runSetupFunction, ASCIILiteral(), s_bundlerPluginRunSetupFunctionCodeLength) \
+ macro(bundlerPluginRunOnResolvePluginsCode, runOnResolvePlugins, ASCIILiteral(), s_bundlerPluginRunOnResolvePluginsCodeLength) \
+ macro(bundlerPluginRunOnLoadPluginsCode, runOnLoadPlugins, ASCIILiteral(), s_bundlerPluginRunOnLoadPluginsCodeLength) \
+
+#define WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_FUNCTION_NAME(macro) \
+ macro(runSetupFunction) \
+ macro(runOnResolvePlugins) \
+ macro(runOnLoadPlugins) \
+
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+ JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
+
+WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+#undef DECLARE_BUILTIN_GENERATOR
+
+class BundlerPluginBuiltinsWrapper : private JSC::WeakHandleOwner {
+public:
+ explicit BundlerPluginBuiltinsWrapper(JSC::VM& vm)
+ : m_vm(vm)
+ WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
+ WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
+ {
+ }
+
+#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
+ JSC::UnlinkedFunctionExecutable* name##Executable(); \
+ const JSC::SourceCode& name##Source() const { return m_##name##Source; }
+ WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+#undef EXPOSE_BUILTIN_EXECUTABLES
+
+ WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+
+ void exportNames();
+
+private:
+ JSC::VM& m_vm;
+
+ WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
+ JSC::SourceCode m_##name##Source;\
+ JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
+ WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+#undef DECLARE_BUILTIN_SOURCE_MEMBERS
+
+};
+
+#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
+inline JSC::UnlinkedFunctionExecutable* BundlerPluginBuiltinsWrapper::name##Executable() \
+{\
+ if (!m_##name##Executable) {\
+ JSC::Identifier executableName = functionName##PublicName();\
+ if (overriddenName)\
+ executableName = JSC::Identifier::fromString(m_vm, overriddenName);\
+ m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, executableName, s_##name##ImplementationVisibility, s_##name##ConstructorKind, s_##name##ConstructAbility), this, &m_##name##Executable);\
+ }\
+ return m_##name##Executable.get();\
+}
+WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+#undef DEFINE_BUILTIN_EXECUTABLES
+
+inline void BundlerPluginBuiltinsWrapper::exportNames()
+{
+#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
+ WEBCORE_FOREACH_BUNDLERPLUGIN_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
/* StreamInternals.ts */
@@ -4150,81 +4527,81 @@ inline void StreamInternalsBuiltinFunctions::visit(Visitor& visitor)
template void StreamInternalsBuiltinFunctions::visit(JSC::AbstractSlotVisitor&);
template void StreamInternalsBuiltinFunctions::visit(JSC::SlotVisitor&);
- /* ImportMetaObject.ts */
-// loadCJS2ESM
-#define WEBCORE_BUILTIN_IMPORTMETAOBJECT_LOADCJS2ESM 1
-extern const char* const s_importMetaObjectLoadCJS2ESMCode;
-extern const int s_importMetaObjectLoadCJS2ESMCodeLength;
-extern const JSC::ConstructAbility s_importMetaObjectLoadCJS2ESMCodeConstructAbility;
-extern const JSC::ConstructorKind s_importMetaObjectLoadCJS2ESMCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_importMetaObjectLoadCJS2ESMCodeImplementationVisibility;
+ /* TransformStreamDefaultController.ts */
+// initializeTransformStreamDefaultController
+#define WEBCORE_BUILTIN_TRANSFORMSTREAMDEFAULTCONTROLLER_INITIALIZETRANSFORMSTREAMDEFAULTCONTROLLER 1
+extern const char* const s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCode;
+extern const int s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeLength;
+extern const JSC::ConstructAbility s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeConstructAbility;
+extern const JSC::ConstructorKind s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeImplementationVisibility;
-// requireESM
-#define WEBCORE_BUILTIN_IMPORTMETAOBJECT_REQUIREESM 1
-extern const char* const s_importMetaObjectRequireESMCode;
-extern const int s_importMetaObjectRequireESMCodeLength;
-extern const JSC::ConstructAbility s_importMetaObjectRequireESMCodeConstructAbility;
-extern const JSC::ConstructorKind s_importMetaObjectRequireESMCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_importMetaObjectRequireESMCodeImplementationVisibility;
+// desiredSize
+#define WEBCORE_BUILTIN_TRANSFORMSTREAMDEFAULTCONTROLLER_DESIREDSIZE 1
+extern const char* const s_transformStreamDefaultControllerDesiredSizeCode;
+extern const int s_transformStreamDefaultControllerDesiredSizeCodeLength;
+extern const JSC::ConstructAbility s_transformStreamDefaultControllerDesiredSizeCodeConstructAbility;
+extern const JSC::ConstructorKind s_transformStreamDefaultControllerDesiredSizeCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_transformStreamDefaultControllerDesiredSizeCodeImplementationVisibility;
-// internalRequire
-#define WEBCORE_BUILTIN_IMPORTMETAOBJECT_INTERNALREQUIRE 1
-extern const char* const s_importMetaObjectInternalRequireCode;
-extern const int s_importMetaObjectInternalRequireCodeLength;
-extern const JSC::ConstructAbility s_importMetaObjectInternalRequireCodeConstructAbility;
-extern const JSC::ConstructorKind s_importMetaObjectInternalRequireCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_importMetaObjectInternalRequireCodeImplementationVisibility;
+// enqueue
+#define WEBCORE_BUILTIN_TRANSFORMSTREAMDEFAULTCONTROLLER_ENQUEUE 1
+extern const char* const s_transformStreamDefaultControllerEnqueueCode;
+extern const int s_transformStreamDefaultControllerEnqueueCodeLength;
+extern const JSC::ConstructAbility s_transformStreamDefaultControllerEnqueueCodeConstructAbility;
+extern const JSC::ConstructorKind s_transformStreamDefaultControllerEnqueueCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_transformStreamDefaultControllerEnqueueCodeImplementationVisibility;
-// createRequireCache
-#define WEBCORE_BUILTIN_IMPORTMETAOBJECT_CREATEREQUIRECACHE 1
-extern const char* const s_importMetaObjectCreateRequireCacheCode;
-extern const int s_importMetaObjectCreateRequireCacheCodeLength;
-extern const JSC::ConstructAbility s_importMetaObjectCreateRequireCacheCodeConstructAbility;
-extern const JSC::ConstructorKind s_importMetaObjectCreateRequireCacheCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_importMetaObjectCreateRequireCacheCodeImplementationVisibility;
+// error
+#define WEBCORE_BUILTIN_TRANSFORMSTREAMDEFAULTCONTROLLER_ERROR 1
+extern const char* const s_transformStreamDefaultControllerErrorCode;
+extern const int s_transformStreamDefaultControllerErrorCodeLength;
+extern const JSC::ConstructAbility s_transformStreamDefaultControllerErrorCodeConstructAbility;
+extern const JSC::ConstructorKind s_transformStreamDefaultControllerErrorCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_transformStreamDefaultControllerErrorCodeImplementationVisibility;
-// main
-#define WEBCORE_BUILTIN_IMPORTMETAOBJECT_MAIN 1
-extern const char* const s_importMetaObjectMainCode;
-extern const int s_importMetaObjectMainCodeLength;
-extern const JSC::ConstructAbility s_importMetaObjectMainCodeConstructAbility;
-extern const JSC::ConstructorKind s_importMetaObjectMainCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_importMetaObjectMainCodeImplementationVisibility;
+// terminate
+#define WEBCORE_BUILTIN_TRANSFORMSTREAMDEFAULTCONTROLLER_TERMINATE 1
+extern const char* const s_transformStreamDefaultControllerTerminateCode;
+extern const int s_transformStreamDefaultControllerTerminateCodeLength;
+extern const JSC::ConstructAbility s_transformStreamDefaultControllerTerminateCodeConstructAbility;
+extern const JSC::ConstructorKind s_transformStreamDefaultControllerTerminateCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_transformStreamDefaultControllerTerminateCodeImplementationVisibility;
-#define WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_DATA(macro) \
- macro(loadCJS2ESM, importMetaObjectLoadCJS2ESM, 1) \
- macro(requireESM, importMetaObjectRequireESM, 1) \
- macro(internalRequire, importMetaObjectInternalRequire, 1) \
- macro(createRequireCache, importMetaObjectCreateRequireCache, 0) \
- macro(main, importMetaObjectMain, 0) \
+#define WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_DATA(macro) \
+ macro(initializeTransformStreamDefaultController, transformStreamDefaultControllerInitializeTransformStreamDefaultController, 0) \
+ macro(desiredSize, transformStreamDefaultControllerDesiredSize, 0) \
+ macro(enqueue, transformStreamDefaultControllerEnqueue, 1) \
+ macro(error, transformStreamDefaultControllerError, 1) \
+ macro(terminate, transformStreamDefaultControllerTerminate, 0) \
-#define WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_CODE(macro) \
- macro(importMetaObjectLoadCJS2ESMCode, loadCJS2ESM, ASCIILiteral(), s_importMetaObjectLoadCJS2ESMCodeLength) \
- macro(importMetaObjectRequireESMCode, requireESM, ASCIILiteral(), s_importMetaObjectRequireESMCodeLength) \
- macro(importMetaObjectInternalRequireCode, internalRequire, ASCIILiteral(), s_importMetaObjectInternalRequireCodeLength) \
- macro(importMetaObjectCreateRequireCacheCode, createRequireCache, ASCIILiteral(), s_importMetaObjectCreateRequireCacheCodeLength) \
- macro(importMetaObjectMainCode, main, "get main"_s, s_importMetaObjectMainCodeLength) \
+#define WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_CODE(macro) \
+ macro(transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCode, initializeTransformStreamDefaultController, ASCIILiteral(), s_transformStreamDefaultControllerInitializeTransformStreamDefaultControllerCodeLength) \
+ macro(transformStreamDefaultControllerDesiredSizeCode, desiredSize, "get desiredSize"_s, s_transformStreamDefaultControllerDesiredSizeCodeLength) \
+ macro(transformStreamDefaultControllerEnqueueCode, enqueue, ASCIILiteral(), s_transformStreamDefaultControllerEnqueueCodeLength) \
+ macro(transformStreamDefaultControllerErrorCode, error, ASCIILiteral(), s_transformStreamDefaultControllerErrorCodeLength) \
+ macro(transformStreamDefaultControllerTerminateCode, terminate, ASCIILiteral(), s_transformStreamDefaultControllerTerminateCodeLength) \
-#define WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_FUNCTION_NAME(macro) \
- macro(loadCJS2ESM) \
- macro(requireESM) \
- macro(internalRequire) \
- macro(createRequireCache) \
- macro(main) \
+#define WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(macro) \
+ macro(initializeTransformStreamDefaultController) \
+ macro(desiredSize) \
+ macro(enqueue) \
+ macro(error) \
+ macro(terminate) \
#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
#undef DECLARE_BUILTIN_GENERATOR
-class ImportMetaObjectBuiltinsWrapper : private JSC::WeakHandleOwner {
+class TransformStreamDefaultControllerBuiltinsWrapper : private JSC::WeakHandleOwner {
public:
- explicit ImportMetaObjectBuiltinsWrapper(JSC::VM& vm)
+ explicit TransformStreamDefaultControllerBuiltinsWrapper(JSC::VM& vm)
: m_vm(vm)
- WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
{
}
@@ -4232,28 +4609,28 @@ public:
#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
JSC::UnlinkedFunctionExecutable* name##Executable(); \
const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+ WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
#undef EXPOSE_BUILTIN_EXECUTABLES
- WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+ WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
void exportNames();
private:
JSC::VM& m_vm;
- WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
JSC::SourceCode m_##name##Source;\
JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
#undef DECLARE_BUILTIN_SOURCE_MEMBERS
};
#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* ImportMetaObjectBuiltinsWrapper::name##Executable() \
+inline JSC::UnlinkedFunctionExecutable* TransformStreamDefaultControllerBuiltinsWrapper::name##Executable() \
{\
if (!m_##name##Executable) {\
JSC::Identifier executableName = functionName##PublicName();\
@@ -4263,334 +4640,574 @@ inline JSC::UnlinkedFunctionExecutable* ImportMetaObjectBuiltinsWrapper::name##E
}\
return m_##name##Executable.get();\
}
-WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
#undef DEFINE_BUILTIN_EXECUTABLES
-inline void ImportMetaObjectBuiltinsWrapper::exportNames()
+inline void TransformStreamDefaultControllerBuiltinsWrapper::exportNames()
{
#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_IMPORTMETAOBJECT_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+ WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
-/* CountQueuingStrategy.ts */
-// highWaterMark
-#define WEBCORE_BUILTIN_COUNTQUEUINGSTRATEGY_HIGHWATERMARK 1
-extern const char* const s_countQueuingStrategyHighWaterMarkCode;
-extern const int s_countQueuingStrategyHighWaterMarkCodeLength;
-extern const JSC::ConstructAbility s_countQueuingStrategyHighWaterMarkCodeConstructAbility;
-extern const JSC::ConstructorKind s_countQueuingStrategyHighWaterMarkCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_countQueuingStrategyHighWaterMarkCodeImplementationVisibility;
+/* WritableStreamInternals.ts */
+// isWritableStream
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_ISWRITABLESTREAM 1
+extern const char* const s_writableStreamInternalsIsWritableStreamCode;
+extern const int s_writableStreamInternalsIsWritableStreamCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsIsWritableStreamCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsIsWritableStreamCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsIsWritableStreamCodeImplementationVisibility;
-// size
-#define WEBCORE_BUILTIN_COUNTQUEUINGSTRATEGY_SIZE 1
-extern const char* const s_countQueuingStrategySizeCode;
-extern const int s_countQueuingStrategySizeCodeLength;
-extern const JSC::ConstructAbility s_countQueuingStrategySizeCodeConstructAbility;
-extern const JSC::ConstructorKind s_countQueuingStrategySizeCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_countQueuingStrategySizeCodeImplementationVisibility;
+// isWritableStreamDefaultWriter
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_ISWRITABLESTREAMDEFAULTWRITER 1
+extern const char* const s_writableStreamInternalsIsWritableStreamDefaultWriterCode;
+extern const int s_writableStreamInternalsIsWritableStreamDefaultWriterCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsIsWritableStreamDefaultWriterCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsIsWritableStreamDefaultWriterCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsIsWritableStreamDefaultWriterCodeImplementationVisibility;
-// initializeCountQueuingStrategy
-#define WEBCORE_BUILTIN_COUNTQUEUINGSTRATEGY_INITIALIZECOUNTQUEUINGSTRATEGY 1
-extern const char* const s_countQueuingStrategyInitializeCountQueuingStrategyCode;
-extern const int s_countQueuingStrategyInitializeCountQueuingStrategyCodeLength;
-extern const JSC::ConstructAbility s_countQueuingStrategyInitializeCountQueuingStrategyCodeConstructAbility;
-extern const JSC::ConstructorKind s_countQueuingStrategyInitializeCountQueuingStrategyCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_countQueuingStrategyInitializeCountQueuingStrategyCodeImplementationVisibility;
+// acquireWritableStreamDefaultWriter
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_ACQUIREWRITABLESTREAMDEFAULTWRITER 1
+extern const char* const s_writableStreamInternalsAcquireWritableStreamDefaultWriterCode;
+extern const int s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeImplementationVisibility;
-#define WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_DATA(macro) \
- macro(highWaterMark, countQueuingStrategyHighWaterMark, 0) \
- macro(size, countQueuingStrategySize, 0) \
- macro(initializeCountQueuingStrategy, countQueuingStrategyInitializeCountQueuingStrategy, 1) \
+// createWritableStream
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_CREATEWRITABLESTREAM 1
+extern const char* const s_writableStreamInternalsCreateWritableStreamCode;
+extern const int s_writableStreamInternalsCreateWritableStreamCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsCreateWritableStreamCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsCreateWritableStreamCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsCreateWritableStreamCodeImplementationVisibility;
-#define WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_CODE(macro) \
- macro(countQueuingStrategyHighWaterMarkCode, highWaterMark, "get highWaterMark"_s, s_countQueuingStrategyHighWaterMarkCodeLength) \
- macro(countQueuingStrategySizeCode, size, ASCIILiteral(), s_countQueuingStrategySizeCodeLength) \
- macro(countQueuingStrategyInitializeCountQueuingStrategyCode, initializeCountQueuingStrategy, ASCIILiteral(), s_countQueuingStrategyInitializeCountQueuingStrategyCodeLength) \
+// createInternalWritableStreamFromUnderlyingSink
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_CREATEINTERNALWRITABLESTREAMFROMUNDERLYINGSINK 1
+extern const char* const s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCode;
+extern const int s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeImplementationVisibility;
-#define WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(macro) \
- macro(highWaterMark) \
- macro(size) \
- macro(initializeCountQueuingStrategy) \
+// initializeWritableStreamSlots
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_INITIALIZEWRITABLESTREAMSLOTS 1
+extern const char* const s_writableStreamInternalsInitializeWritableStreamSlotsCode;
+extern const int s_writableStreamInternalsInitializeWritableStreamSlotsCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsInitializeWritableStreamSlotsCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsInitializeWritableStreamSlotsCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsInitializeWritableStreamSlotsCodeImplementationVisibility;
-#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
- JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
+// writableStreamCloseForBindings
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMCLOSEFORBINDINGS 1
+extern const char* const s_writableStreamInternalsWritableStreamCloseForBindingsCode;
+extern const int s_writableStreamInternalsWritableStreamCloseForBindingsCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamCloseForBindingsCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamCloseForBindingsCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamCloseForBindingsCodeImplementationVisibility;
-WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
-#undef DECLARE_BUILTIN_GENERATOR
+// writableStreamAbortForBindings
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMABORTFORBINDINGS 1
+extern const char* const s_writableStreamInternalsWritableStreamAbortForBindingsCode;
+extern const int s_writableStreamInternalsWritableStreamAbortForBindingsCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamAbortForBindingsCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamAbortForBindingsCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamAbortForBindingsCodeImplementationVisibility;
-class CountQueuingStrategyBuiltinsWrapper : private JSC::WeakHandleOwner {
-public:
- explicit CountQueuingStrategyBuiltinsWrapper(JSC::VM& vm)
- : m_vm(vm)
- WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
-#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
-#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
- {
- }
+// isWritableStreamLocked
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_ISWRITABLESTREAMLOCKED 1
+extern const char* const s_writableStreamInternalsIsWritableStreamLockedCode;
+extern const int s_writableStreamInternalsIsWritableStreamLockedCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsIsWritableStreamLockedCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsIsWritableStreamLockedCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsIsWritableStreamLockedCodeImplementationVisibility;
-#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
- JSC::UnlinkedFunctionExecutable* name##Executable(); \
- const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
-#undef EXPOSE_BUILTIN_EXECUTABLES
+// setUpWritableStreamDefaultWriter
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_SETUPWRITABLESTREAMDEFAULTWRITER 1
+extern const char* const s_writableStreamInternalsSetUpWritableStreamDefaultWriterCode;
+extern const int s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeImplementationVisibility;
- WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+// writableStreamAbort
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMABORT 1
+extern const char* const s_writableStreamInternalsWritableStreamAbortCode;
+extern const int s_writableStreamInternalsWritableStreamAbortCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamAbortCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamAbortCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamAbortCodeImplementationVisibility;
- void exportNames();
+// writableStreamClose
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMCLOSE 1
+extern const char* const s_writableStreamInternalsWritableStreamCloseCode;
+extern const int s_writableStreamInternalsWritableStreamCloseCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamCloseCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamCloseCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamCloseCodeImplementationVisibility;
-private:
- JSC::VM& m_vm;
+// writableStreamAddWriteRequest
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMADDWRITEREQUEST 1
+extern const char* const s_writableStreamInternalsWritableStreamAddWriteRequestCode;
+extern const int s_writableStreamInternalsWritableStreamAddWriteRequestCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamAddWriteRequestCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamAddWriteRequestCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamAddWriteRequestCodeImplementationVisibility;
- WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+// writableStreamCloseQueuedOrInFlight
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMCLOSEQUEUEDORINFLIGHT 1
+extern const char* const s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCode;
+extern const int s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeImplementationVisibility;
-#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
- JSC::SourceCode m_##name##Source;\
- JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
-#undef DECLARE_BUILTIN_SOURCE_MEMBERS
+// writableStreamDealWithRejection
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEALWITHREJECTION 1
+extern const char* const s_writableStreamInternalsWritableStreamDealWithRejectionCode;
+extern const int s_writableStreamInternalsWritableStreamDealWithRejectionCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDealWithRejectionCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDealWithRejectionCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDealWithRejectionCodeImplementationVisibility;
-};
+// writableStreamFinishErroring
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMFINISHERRORING 1
+extern const char* const s_writableStreamInternalsWritableStreamFinishErroringCode;
+extern const int s_writableStreamInternalsWritableStreamFinishErroringCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishErroringCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishErroringCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishErroringCodeImplementationVisibility;
-#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* CountQueuingStrategyBuiltinsWrapper::name##Executable() \
-{\
- if (!m_##name##Executable) {\
- JSC::Identifier executableName = functionName##PublicName();\
- if (overriddenName)\
- executableName = JSC::Identifier::fromString(m_vm, overriddenName);\
- m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, executableName, s_##name##ImplementationVisibility, s_##name##ConstructorKind, s_##name##ConstructAbility), this, &m_##name##Executable);\
- }\
- return m_##name##Executable.get();\
-}
-WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
-#undef DEFINE_BUILTIN_EXECUTABLES
+// writableStreamFinishInFlightClose
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMFINISHINFLIGHTCLOSE 1
+extern const char* const s_writableStreamInternalsWritableStreamFinishInFlightCloseCode;
+extern const int s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeImplementationVisibility;
-inline void CountQueuingStrategyBuiltinsWrapper::exportNames()
-{
-#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
-#undef EXPORT_FUNCTION_NAME
-}
-/* ReadableStreamBYOBRequest.ts */
-// initializeReadableStreamBYOBRequest
-#define WEBCORE_BUILTIN_READABLESTREAMBYOBREQUEST_INITIALIZEREADABLESTREAMBYOBREQUEST 1
-extern const char* const s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCode;
-extern const int s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeLength;
-extern const JSC::ConstructAbility s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeImplementationVisibility;
+// writableStreamFinishInFlightCloseWithError
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMFINISHINFLIGHTCLOSEWITHERROR 1
+extern const char* const s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCode;
+extern const int s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeImplementationVisibility;
-// respond
-#define WEBCORE_BUILTIN_READABLESTREAMBYOBREQUEST_RESPOND 1
-extern const char* const s_readableStreamBYOBRequestRespondCode;
-extern const int s_readableStreamBYOBRequestRespondCodeLength;
-extern const JSC::ConstructAbility s_readableStreamBYOBRequestRespondCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamBYOBRequestRespondCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamBYOBRequestRespondCodeImplementationVisibility;
+// writableStreamFinishInFlightWrite
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMFINISHINFLIGHTWRITE 1
+extern const char* const s_writableStreamInternalsWritableStreamFinishInFlightWriteCode;
+extern const int s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeImplementationVisibility;
-// respondWithNewView
-#define WEBCORE_BUILTIN_READABLESTREAMBYOBREQUEST_RESPONDWITHNEWVIEW 1
-extern const char* const s_readableStreamBYOBRequestRespondWithNewViewCode;
-extern const int s_readableStreamBYOBRequestRespondWithNewViewCodeLength;
-extern const JSC::ConstructAbility s_readableStreamBYOBRequestRespondWithNewViewCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamBYOBRequestRespondWithNewViewCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamBYOBRequestRespondWithNewViewCodeImplementationVisibility;
+// writableStreamFinishInFlightWriteWithError
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMFINISHINFLIGHTWRITEWITHERROR 1
+extern const char* const s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCode;
+extern const int s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeImplementationVisibility;
-// view
-#define WEBCORE_BUILTIN_READABLESTREAMBYOBREQUEST_VIEW 1
-extern const char* const s_readableStreamBYOBRequestViewCode;
-extern const int s_readableStreamBYOBRequestViewCodeLength;
-extern const JSC::ConstructAbility s_readableStreamBYOBRequestViewCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamBYOBRequestViewCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamBYOBRequestViewCodeImplementationVisibility;
+// writableStreamHasOperationMarkedInFlight
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMHASOPERATIONMARKEDINFLIGHT 1
+extern const char* const s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCode;
+extern const int s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeImplementationVisibility;
-#define WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_DATA(macro) \
- macro(initializeReadableStreamBYOBRequest, readableStreamBYOBRequestInitializeReadableStreamBYOBRequest, 2) \
- macro(respond, readableStreamBYOBRequestRespond, 1) \
- macro(respondWithNewView, readableStreamBYOBRequestRespondWithNewView, 1) \
- macro(view, readableStreamBYOBRequestView, 0) \
+// writableStreamMarkCloseRequestInFlight
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMMARKCLOSEREQUESTINFLIGHT 1
+extern const char* const s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCode;
+extern const int s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeImplementationVisibility;
-#define WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_CODE(macro) \
- macro(readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCode, initializeReadableStreamBYOBRequest, ASCIILiteral(), s_readableStreamBYOBRequestInitializeReadableStreamBYOBRequestCodeLength) \
- macro(readableStreamBYOBRequestRespondCode, respond, ASCIILiteral(), s_readableStreamBYOBRequestRespondCodeLength) \
- macro(readableStreamBYOBRequestRespondWithNewViewCode, respondWithNewView, ASCIILiteral(), s_readableStreamBYOBRequestRespondWithNewViewCodeLength) \
- macro(readableStreamBYOBRequestViewCode, view, "get view"_s, s_readableStreamBYOBRequestViewCodeLength) \
+// writableStreamMarkFirstWriteRequestInFlight
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMMARKFIRSTWRITEREQUESTINFLIGHT 1
+extern const char* const s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCode;
+extern const int s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeImplementationVisibility;
-#define WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_FUNCTION_NAME(macro) \
- macro(initializeReadableStreamBYOBRequest) \
- macro(respond) \
- macro(respondWithNewView) \
- macro(view) \
+// writableStreamRejectCloseAndClosedPromiseIfNeeded
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMREJECTCLOSEANDCLOSEDPROMISEIFNEEDED 1
+extern const char* const s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCode;
+extern const int s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeImplementationVisibility;
-#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
- JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
+// writableStreamStartErroring
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMSTARTERRORING 1
+extern const char* const s_writableStreamInternalsWritableStreamStartErroringCode;
+extern const int s_writableStreamInternalsWritableStreamStartErroringCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamStartErroringCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamStartErroringCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamStartErroringCodeImplementationVisibility;
-WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
-#undef DECLARE_BUILTIN_GENERATOR
+// writableStreamUpdateBackpressure
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMUPDATEBACKPRESSURE 1
+extern const char* const s_writableStreamInternalsWritableStreamUpdateBackpressureCode;
+extern const int s_writableStreamInternalsWritableStreamUpdateBackpressureCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamUpdateBackpressureCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamUpdateBackpressureCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamUpdateBackpressureCodeImplementationVisibility;
-class ReadableStreamBYOBRequestBuiltinsWrapper : private JSC::WeakHandleOwner {
-public:
- explicit ReadableStreamBYOBRequestBuiltinsWrapper(JSC::VM& vm)
- : m_vm(vm)
- WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
-#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
-#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
- {
- }
+// writableStreamDefaultWriterAbort
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTWRITERABORT 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultWriterAbortCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeImplementationVisibility;
-#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
- JSC::UnlinkedFunctionExecutable* name##Executable(); \
- const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
-#undef EXPOSE_BUILTIN_EXECUTABLES
+// writableStreamDefaultWriterClose
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTWRITERCLOSE 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultWriterCloseCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeImplementationVisibility;
- WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+// writableStreamDefaultWriterCloseWithErrorPropagation
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTWRITERCLOSEWITHERRORPROPAGATION 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeImplementationVisibility;
- void exportNames();
+// writableStreamDefaultWriterEnsureClosedPromiseRejected
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTWRITERENSURECLOSEDPROMISEREJECTED 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeImplementationVisibility;
-private:
- JSC::VM& m_vm;
+// writableStreamDefaultWriterEnsureReadyPromiseRejected
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTWRITERENSUREREADYPROMISEREJECTED 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeImplementationVisibility;
- WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+// writableStreamDefaultWriterGetDesiredSize
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTWRITERGETDESIREDSIZE 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeImplementationVisibility;
-#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
- JSC::SourceCode m_##name##Source;\
- JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
-#undef DECLARE_BUILTIN_SOURCE_MEMBERS
+// writableStreamDefaultWriterRelease
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTWRITERRELEASE 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultWriterReleaseCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeImplementationVisibility;
-};
+// writableStreamDefaultWriterWrite
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTWRITERWRITE 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultWriterWriteCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeImplementationVisibility;
-#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* ReadableStreamBYOBRequestBuiltinsWrapper::name##Executable() \
-{\
- if (!m_##name##Executable) {\
- JSC::Identifier executableName = functionName##PublicName();\
- if (overriddenName)\
- executableName = JSC::Identifier::fromString(m_vm, overriddenName);\
- m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, executableName, s_##name##ImplementationVisibility, s_##name##ConstructorKind, s_##name##ConstructAbility), this, &m_##name##Executable);\
- }\
- return m_##name##Executable.get();\
-}
-WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
-#undef DEFINE_BUILTIN_EXECUTABLES
+// setUpWritableStreamDefaultController
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_SETUPWRITABLESTREAMDEFAULTCONTROLLER 1
+extern const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerCode;
+extern const int s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeImplementationVisibility;
-inline void ReadableStreamBYOBRequestBuiltinsWrapper::exportNames()
-{
-#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_READABLESTREAMBYOBREQUEST_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
-#undef EXPORT_FUNCTION_NAME
-}
-/* WritableStreamDefaultWriter.ts */
-// initializeWritableStreamDefaultWriter
-#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTWRITER_INITIALIZEWRITABLESTREAMDEFAULTWRITER 1
-extern const char* const s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCode;
-extern const int s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeLength;
-extern const JSC::ConstructAbility s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeImplementationVisibility;
+// writableStreamDefaultControllerStart
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERSTART 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerStartCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultControllerStartCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerStartCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerStartCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerStartCodeImplementationVisibility;
-// closed
-#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTWRITER_CLOSED 1
-extern const char* const s_writableStreamDefaultWriterClosedCode;
-extern const int s_writableStreamDefaultWriterClosedCodeLength;
-extern const JSC::ConstructAbility s_writableStreamDefaultWriterClosedCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamDefaultWriterClosedCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamDefaultWriterClosedCodeImplementationVisibility;
+// setUpWritableStreamDefaultControllerFromUnderlyingSink
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_SETUPWRITABLESTREAMDEFAULTCONTROLLERFROMUNDERLYINGSINK 1
+extern const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCode;
+extern const int s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeImplementationVisibility;
-// desiredSize
-#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTWRITER_DESIREDSIZE 1
-extern const char* const s_writableStreamDefaultWriterDesiredSizeCode;
-extern const int s_writableStreamDefaultWriterDesiredSizeCodeLength;
-extern const JSC::ConstructAbility s_writableStreamDefaultWriterDesiredSizeCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamDefaultWriterDesiredSizeCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamDefaultWriterDesiredSizeCodeImplementationVisibility;
+// writableStreamDefaultControllerAdvanceQueueIfNeeded
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERADVANCEQUEUEIFNEEDED 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeImplementationVisibility;
-// ready
-#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTWRITER_READY 1
-extern const char* const s_writableStreamDefaultWriterReadyCode;
-extern const int s_writableStreamDefaultWriterReadyCodeLength;
-extern const JSC::ConstructAbility s_writableStreamDefaultWriterReadyCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamDefaultWriterReadyCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamDefaultWriterReadyCodeImplementationVisibility;
+// isCloseSentinel
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_ISCLOSESENTINEL 1
+extern const char* const s_writableStreamInternalsIsCloseSentinelCode;
+extern const int s_writableStreamInternalsIsCloseSentinelCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsIsCloseSentinelCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsIsCloseSentinelCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsIsCloseSentinelCodeImplementationVisibility;
-// abort
-#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTWRITER_ABORT 1
-extern const char* const s_writableStreamDefaultWriterAbortCode;
-extern const int s_writableStreamDefaultWriterAbortCodeLength;
-extern const JSC::ConstructAbility s_writableStreamDefaultWriterAbortCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamDefaultWriterAbortCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamDefaultWriterAbortCodeImplementationVisibility;
+// writableStreamDefaultControllerClearAlgorithms
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERCLEARALGORITHMS 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeImplementationVisibility;
-// close
-#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTWRITER_CLOSE 1
-extern const char* const s_writableStreamDefaultWriterCloseCode;
-extern const int s_writableStreamDefaultWriterCloseCodeLength;
-extern const JSC::ConstructAbility s_writableStreamDefaultWriterCloseCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamDefaultWriterCloseCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamDefaultWriterCloseCodeImplementationVisibility;
+// writableStreamDefaultControllerClose
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERCLOSE 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerCloseCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeImplementationVisibility;
-// releaseLock
-#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTWRITER_RELEASELOCK 1
-extern const char* const s_writableStreamDefaultWriterReleaseLockCode;
-extern const int s_writableStreamDefaultWriterReleaseLockCodeLength;
-extern const JSC::ConstructAbility s_writableStreamDefaultWriterReleaseLockCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamDefaultWriterReleaseLockCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamDefaultWriterReleaseLockCodeImplementationVisibility;
+// writableStreamDefaultControllerError
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERERROR 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerErrorCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeImplementationVisibility;
-// write
-#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTWRITER_WRITE 1
-extern const char* const s_writableStreamDefaultWriterWriteCode;
-extern const int s_writableStreamDefaultWriterWriteCodeLength;
-extern const JSC::ConstructAbility s_writableStreamDefaultWriterWriteCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamDefaultWriterWriteCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamDefaultWriterWriteCodeImplementationVisibility;
+// writableStreamDefaultControllerErrorIfNeeded
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERERRORIFNEEDED 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeImplementationVisibility;
-#define WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_DATA(macro) \
- macro(initializeWritableStreamDefaultWriter, writableStreamDefaultWriterInitializeWritableStreamDefaultWriter, 1) \
- macro(closed, writableStreamDefaultWriterClosed, 0) \
- macro(desiredSize, writableStreamDefaultWriterDesiredSize, 0) \
- macro(ready, writableStreamDefaultWriterReady, 0) \
- macro(abort, writableStreamDefaultWriterAbort, 1) \
- macro(close, writableStreamDefaultWriterClose, 0) \
- macro(releaseLock, writableStreamDefaultWriterReleaseLock, 0) \
- macro(write, writableStreamDefaultWriterWrite, 1) \
+// writableStreamDefaultControllerGetBackpressure
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERGETBACKPRESSURE 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeImplementationVisibility;
-#define WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_CODE(macro) \
- macro(writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCode, initializeWritableStreamDefaultWriter, ASCIILiteral(), s_writableStreamDefaultWriterInitializeWritableStreamDefaultWriterCodeLength) \
- macro(writableStreamDefaultWriterClosedCode, closed, "get closed"_s, s_writableStreamDefaultWriterClosedCodeLength) \
- macro(writableStreamDefaultWriterDesiredSizeCode, desiredSize, "get desiredSize"_s, s_writableStreamDefaultWriterDesiredSizeCodeLength) \
- macro(writableStreamDefaultWriterReadyCode, ready, "get ready"_s, s_writableStreamDefaultWriterReadyCodeLength) \
- macro(writableStreamDefaultWriterAbortCode, abort, ASCIILiteral(), s_writableStreamDefaultWriterAbortCodeLength) \
- macro(writableStreamDefaultWriterCloseCode, close, ASCIILiteral(), s_writableStreamDefaultWriterCloseCodeLength) \
- macro(writableStreamDefaultWriterReleaseLockCode, releaseLock, ASCIILiteral(), s_writableStreamDefaultWriterReleaseLockCodeLength) \
- macro(writableStreamDefaultWriterWriteCode, write, ASCIILiteral(), s_writableStreamDefaultWriterWriteCodeLength) \
+// writableStreamDefaultControllerGetChunkSize
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERGETCHUNKSIZE 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeImplementationVisibility;
-#define WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_FUNCTION_NAME(macro) \
- macro(initializeWritableStreamDefaultWriter) \
- macro(closed) \
- macro(desiredSize) \
- macro(ready) \
- macro(abort) \
- macro(close) \
- macro(releaseLock) \
- macro(write) \
+// writableStreamDefaultControllerGetDesiredSize
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERGETDESIREDSIZE 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeImplementationVisibility;
+
+// writableStreamDefaultControllerProcessClose
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERPROCESSCLOSE 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeImplementationVisibility;
+
+// writableStreamDefaultControllerProcessWrite
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERPROCESSWRITE 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeImplementationVisibility;
+
+// writableStreamDefaultControllerWrite
+#define WEBCORE_BUILTIN_WRITABLESTREAMINTERNALS_WRITABLESTREAMDEFAULTCONTROLLERWRITE 1
+extern const char* const s_writableStreamInternalsWritableStreamDefaultControllerWriteCode;
+extern const int s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeLength;
+extern const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeConstructAbility;
+extern const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeImplementationVisibility;
+
+#define WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_DATA(macro) \
+ macro(isWritableStream, writableStreamInternalsIsWritableStream, 1) \
+ macro(isWritableStreamDefaultWriter, writableStreamInternalsIsWritableStreamDefaultWriter, 1) \
+ macro(acquireWritableStreamDefaultWriter, writableStreamInternalsAcquireWritableStreamDefaultWriter, 1) \
+ macro(createWritableStream, writableStreamInternalsCreateWritableStream, 7) \
+ macro(createInternalWritableStreamFromUnderlyingSink, writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSink, 2) \
+ macro(initializeWritableStreamSlots, writableStreamInternalsInitializeWritableStreamSlots, 2) \
+ macro(writableStreamCloseForBindings, writableStreamInternalsWritableStreamCloseForBindings, 1) \
+ macro(writableStreamAbortForBindings, writableStreamInternalsWritableStreamAbortForBindings, 2) \
+ macro(isWritableStreamLocked, writableStreamInternalsIsWritableStreamLocked, 1) \
+ macro(setUpWritableStreamDefaultWriter, writableStreamInternalsSetUpWritableStreamDefaultWriter, 2) \
+ macro(writableStreamAbort, writableStreamInternalsWritableStreamAbort, 2) \
+ macro(writableStreamClose, writableStreamInternalsWritableStreamClose, 1) \
+ macro(writableStreamAddWriteRequest, writableStreamInternalsWritableStreamAddWriteRequest, 1) \
+ macro(writableStreamCloseQueuedOrInFlight, writableStreamInternalsWritableStreamCloseQueuedOrInFlight, 1) \
+ macro(writableStreamDealWithRejection, writableStreamInternalsWritableStreamDealWithRejection, 2) \
+ macro(writableStreamFinishErroring, writableStreamInternalsWritableStreamFinishErroring, 1) \
+ macro(writableStreamFinishInFlightClose, writableStreamInternalsWritableStreamFinishInFlightClose, 1) \
+ macro(writableStreamFinishInFlightCloseWithError, writableStreamInternalsWritableStreamFinishInFlightCloseWithError, 2) \
+ macro(writableStreamFinishInFlightWrite, writableStreamInternalsWritableStreamFinishInFlightWrite, 1) \
+ macro(writableStreamFinishInFlightWriteWithError, writableStreamInternalsWritableStreamFinishInFlightWriteWithError, 2) \
+ macro(writableStreamHasOperationMarkedInFlight, writableStreamInternalsWritableStreamHasOperationMarkedInFlight, 1) \
+ macro(writableStreamMarkCloseRequestInFlight, writableStreamInternalsWritableStreamMarkCloseRequestInFlight, 1) \
+ macro(writableStreamMarkFirstWriteRequestInFlight, writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlight, 1) \
+ macro(writableStreamRejectCloseAndClosedPromiseIfNeeded, writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeeded, 1) \
+ macro(writableStreamStartErroring, writableStreamInternalsWritableStreamStartErroring, 2) \
+ macro(writableStreamUpdateBackpressure, writableStreamInternalsWritableStreamUpdateBackpressure, 2) \
+ macro(writableStreamDefaultWriterAbort, writableStreamInternalsWritableStreamDefaultWriterAbort, 2) \
+ macro(writableStreamDefaultWriterClose, writableStreamInternalsWritableStreamDefaultWriterClose, 1) \
+ macro(writableStreamDefaultWriterCloseWithErrorPropagation, writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagation, 1) \
+ macro(writableStreamDefaultWriterEnsureClosedPromiseRejected, writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejected, 2) \
+ macro(writableStreamDefaultWriterEnsureReadyPromiseRejected, writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejected, 2) \
+ macro(writableStreamDefaultWriterGetDesiredSize, writableStreamInternalsWritableStreamDefaultWriterGetDesiredSize, 1) \
+ macro(writableStreamDefaultWriterRelease, writableStreamInternalsWritableStreamDefaultWriterRelease, 1) \
+ macro(writableStreamDefaultWriterWrite, writableStreamInternalsWritableStreamDefaultWriterWrite, 2) \
+ macro(setUpWritableStreamDefaultController, writableStreamInternalsSetUpWritableStreamDefaultController, 9) \
+ macro(writableStreamDefaultControllerStart, writableStreamInternalsWritableStreamDefaultControllerStart, 1) \
+ macro(setUpWritableStreamDefaultControllerFromUnderlyingSink, writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSink, 6) \
+ macro(writableStreamDefaultControllerAdvanceQueueIfNeeded, writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeeded, 1) \
+ macro(isCloseSentinel, writableStreamInternalsIsCloseSentinel, 0) \
+ macro(writableStreamDefaultControllerClearAlgorithms, writableStreamInternalsWritableStreamDefaultControllerClearAlgorithms, 1) \
+ macro(writableStreamDefaultControllerClose, writableStreamInternalsWritableStreamDefaultControllerClose, 1) \
+ macro(writableStreamDefaultControllerError, writableStreamInternalsWritableStreamDefaultControllerError, 2) \
+ macro(writableStreamDefaultControllerErrorIfNeeded, writableStreamInternalsWritableStreamDefaultControllerErrorIfNeeded, 2) \
+ macro(writableStreamDefaultControllerGetBackpressure, writableStreamInternalsWritableStreamDefaultControllerGetBackpressure, 1) \
+ macro(writableStreamDefaultControllerGetChunkSize, writableStreamInternalsWritableStreamDefaultControllerGetChunkSize, 2) \
+ macro(writableStreamDefaultControllerGetDesiredSize, writableStreamInternalsWritableStreamDefaultControllerGetDesiredSize, 1) \
+ macro(writableStreamDefaultControllerProcessClose, writableStreamInternalsWritableStreamDefaultControllerProcessClose, 1) \
+ macro(writableStreamDefaultControllerProcessWrite, writableStreamInternalsWritableStreamDefaultControllerProcessWrite, 2) \
+ macro(writableStreamDefaultControllerWrite, writableStreamInternalsWritableStreamDefaultControllerWrite, 3) \
+
+#define WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_CODE(macro) \
+ macro(writableStreamInternalsIsWritableStreamCode, isWritableStream, ASCIILiteral(), s_writableStreamInternalsIsWritableStreamCodeLength) \
+ macro(writableStreamInternalsIsWritableStreamDefaultWriterCode, isWritableStreamDefaultWriter, ASCIILiteral(), s_writableStreamInternalsIsWritableStreamDefaultWriterCodeLength) \
+ macro(writableStreamInternalsAcquireWritableStreamDefaultWriterCode, acquireWritableStreamDefaultWriter, ASCIILiteral(), s_writableStreamInternalsAcquireWritableStreamDefaultWriterCodeLength) \
+ macro(writableStreamInternalsCreateWritableStreamCode, createWritableStream, ASCIILiteral(), s_writableStreamInternalsCreateWritableStreamCodeLength) \
+ macro(writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCode, createInternalWritableStreamFromUnderlyingSink, ASCIILiteral(), s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeLength) \
+ macro(writableStreamInternalsInitializeWritableStreamSlotsCode, initializeWritableStreamSlots, ASCIILiteral(), s_writableStreamInternalsInitializeWritableStreamSlotsCodeLength) \
+ macro(writableStreamInternalsWritableStreamCloseForBindingsCode, writableStreamCloseForBindings, ASCIILiteral(), s_writableStreamInternalsWritableStreamCloseForBindingsCodeLength) \
+ macro(writableStreamInternalsWritableStreamAbortForBindingsCode, writableStreamAbortForBindings, ASCIILiteral(), s_writableStreamInternalsWritableStreamAbortForBindingsCodeLength) \
+ macro(writableStreamInternalsIsWritableStreamLockedCode, isWritableStreamLocked, ASCIILiteral(), s_writableStreamInternalsIsWritableStreamLockedCodeLength) \
+ macro(writableStreamInternalsSetUpWritableStreamDefaultWriterCode, setUpWritableStreamDefaultWriter, ASCIILiteral(), s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeLength) \
+ macro(writableStreamInternalsWritableStreamAbortCode, writableStreamAbort, ASCIILiteral(), s_writableStreamInternalsWritableStreamAbortCodeLength) \
+ macro(writableStreamInternalsWritableStreamCloseCode, writableStreamClose, ASCIILiteral(), s_writableStreamInternalsWritableStreamCloseCodeLength) \
+ macro(writableStreamInternalsWritableStreamAddWriteRequestCode, writableStreamAddWriteRequest, ASCIILiteral(), s_writableStreamInternalsWritableStreamAddWriteRequestCodeLength) \
+ macro(writableStreamInternalsWritableStreamCloseQueuedOrInFlightCode, writableStreamCloseQueuedOrInFlight, ASCIILiteral(), s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeLength) \
+ macro(writableStreamInternalsWritableStreamDealWithRejectionCode, writableStreamDealWithRejection, ASCIILiteral(), s_writableStreamInternalsWritableStreamDealWithRejectionCodeLength) \
+ macro(writableStreamInternalsWritableStreamFinishErroringCode, writableStreamFinishErroring, ASCIILiteral(), s_writableStreamInternalsWritableStreamFinishErroringCodeLength) \
+ macro(writableStreamInternalsWritableStreamFinishInFlightCloseCode, writableStreamFinishInFlightClose, ASCIILiteral(), s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeLength) \
+ macro(writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCode, writableStreamFinishInFlightCloseWithError, ASCIILiteral(), s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeLength) \
+ macro(writableStreamInternalsWritableStreamFinishInFlightWriteCode, writableStreamFinishInFlightWrite, ASCIILiteral(), s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeLength) \
+ macro(writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCode, writableStreamFinishInFlightWriteWithError, ASCIILiteral(), s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeLength) \
+ macro(writableStreamInternalsWritableStreamHasOperationMarkedInFlightCode, writableStreamHasOperationMarkedInFlight, ASCIILiteral(), s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeLength) \
+ macro(writableStreamInternalsWritableStreamMarkCloseRequestInFlightCode, writableStreamMarkCloseRequestInFlight, ASCIILiteral(), s_writableStreamInternalsWritableStreamMarkCloseRequestInFlightCodeLength) \
+ macro(writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCode, writableStreamMarkFirstWriteRequestInFlight, ASCIILiteral(), s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeLength) \
+ macro(writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCode, writableStreamRejectCloseAndClosedPromiseIfNeeded, ASCIILiteral(), s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeLength) \
+ macro(writableStreamInternalsWritableStreamStartErroringCode, writableStreamStartErroring, ASCIILiteral(), s_writableStreamInternalsWritableStreamStartErroringCodeLength) \
+ macro(writableStreamInternalsWritableStreamUpdateBackpressureCode, writableStreamUpdateBackpressure, ASCIILiteral(), s_writableStreamInternalsWritableStreamUpdateBackpressureCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultWriterAbortCode, writableStreamDefaultWriterAbort, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultWriterCloseCode, writableStreamDefaultWriterClose, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCode, writableStreamDefaultWriterCloseWithErrorPropagation, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCode, writableStreamDefaultWriterEnsureClosedPromiseRejected, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCode, writableStreamDefaultWriterEnsureReadyPromiseRejected, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCode, writableStreamDefaultWriterGetDesiredSize, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultWriterReleaseCode, writableStreamDefaultWriterRelease, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultWriterWriteCode, writableStreamDefaultWriterWrite, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeLength) \
+ macro(writableStreamInternalsSetUpWritableStreamDefaultControllerCode, setUpWritableStreamDefaultController, ASCIILiteral(), s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultControllerStartCode, writableStreamDefaultControllerStart, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerStartCodeLength) \
+ macro(writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCode, setUpWritableStreamDefaultControllerFromUnderlyingSink, ASCIILiteral(), s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCode, writableStreamDefaultControllerAdvanceQueueIfNeeded, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeLength) \
+ macro(writableStreamInternalsIsCloseSentinelCode, isCloseSentinel, ASCIILiteral(), s_writableStreamInternalsIsCloseSentinelCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCode, writableStreamDefaultControllerClearAlgorithms, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerClearAlgorithmsCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultControllerCloseCode, writableStreamDefaultControllerClose, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerCloseCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultControllerErrorCode, writableStreamDefaultControllerError, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCode, writableStreamDefaultControllerErrorIfNeeded, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCode, writableStreamDefaultControllerGetBackpressure, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerGetBackpressureCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCode, writableStreamDefaultControllerGetChunkSize, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCode, writableStreamDefaultControllerGetDesiredSize, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultControllerProcessCloseCode, writableStreamDefaultControllerProcessClose, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerProcessCloseCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultControllerProcessWriteCode, writableStreamDefaultControllerProcessWrite, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeLength) \
+ macro(writableStreamInternalsWritableStreamDefaultControllerWriteCode, writableStreamDefaultControllerWrite, ASCIILiteral(), s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeLength) \
+
+#define WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(macro) \
+ macro(isWritableStream) \
+ macro(isWritableStreamDefaultWriter) \
+ macro(acquireWritableStreamDefaultWriter) \
+ macro(createWritableStream) \
+ macro(createInternalWritableStreamFromUnderlyingSink) \
+ macro(initializeWritableStreamSlots) \
+ macro(writableStreamCloseForBindings) \
+ macro(writableStreamAbortForBindings) \
+ macro(isWritableStreamLocked) \
+ macro(setUpWritableStreamDefaultWriter) \
+ macro(writableStreamAbort) \
+ macro(writableStreamClose) \
+ macro(writableStreamAddWriteRequest) \
+ macro(writableStreamCloseQueuedOrInFlight) \
+ macro(writableStreamDealWithRejection) \
+ macro(writableStreamFinishErroring) \
+ macro(writableStreamFinishInFlightClose) \
+ macro(writableStreamFinishInFlightCloseWithError) \
+ macro(writableStreamFinishInFlightWrite) \
+ macro(writableStreamFinishInFlightWriteWithError) \
+ macro(writableStreamHasOperationMarkedInFlight) \
+ macro(writableStreamMarkCloseRequestInFlight) \
+ macro(writableStreamMarkFirstWriteRequestInFlight) \
+ macro(writableStreamRejectCloseAndClosedPromiseIfNeeded) \
+ macro(writableStreamStartErroring) \
+ macro(writableStreamUpdateBackpressure) \
+ macro(writableStreamDefaultWriterAbort) \
+ macro(writableStreamDefaultWriterClose) \
+ macro(writableStreamDefaultWriterCloseWithErrorPropagation) \
+ macro(writableStreamDefaultWriterEnsureClosedPromiseRejected) \
+ macro(writableStreamDefaultWriterEnsureReadyPromiseRejected) \
+ macro(writableStreamDefaultWriterGetDesiredSize) \
+ macro(writableStreamDefaultWriterRelease) \
+ macro(writableStreamDefaultWriterWrite) \
+ macro(setUpWritableStreamDefaultController) \
+ macro(writableStreamDefaultControllerStart) \
+ macro(setUpWritableStreamDefaultControllerFromUnderlyingSink) \
+ macro(writableStreamDefaultControllerAdvanceQueueIfNeeded) \
+ macro(isCloseSentinel) \
+ macro(writableStreamDefaultControllerClearAlgorithms) \
+ macro(writableStreamDefaultControllerClose) \
+ macro(writableStreamDefaultControllerError) \
+ macro(writableStreamDefaultControllerErrorIfNeeded) \
+ macro(writableStreamDefaultControllerGetBackpressure) \
+ macro(writableStreamDefaultControllerGetChunkSize) \
+ macro(writableStreamDefaultControllerGetDesiredSize) \
+ macro(writableStreamDefaultControllerProcessClose) \
+ macro(writableStreamDefaultControllerProcessWrite) \
+ macro(writableStreamDefaultControllerWrite) \
#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
#undef DECLARE_BUILTIN_GENERATOR
-class WritableStreamDefaultWriterBuiltinsWrapper : private JSC::WeakHandleOwner {
+class WritableStreamInternalsBuiltinsWrapper : private JSC::WeakHandleOwner {
public:
- explicit WritableStreamDefaultWriterBuiltinsWrapper(JSC::VM& vm)
+ explicit WritableStreamInternalsBuiltinsWrapper(JSC::VM& vm)
: m_vm(vm)
- WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
{
}
@@ -4598,28 +5215,28 @@ public:
#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
JSC::UnlinkedFunctionExecutable* name##Executable(); \
const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+ WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
#undef EXPOSE_BUILTIN_EXECUTABLES
- WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+ WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
void exportNames();
private:
JSC::VM& m_vm;
- WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
JSC::SourceCode m_##name##Source;\
JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
#undef DECLARE_BUILTIN_SOURCE_MEMBERS
};
#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* WritableStreamDefaultWriterBuiltinsWrapper::name##Executable() \
+inline JSC::UnlinkedFunctionExecutable* WritableStreamInternalsBuiltinsWrapper::name##Executable() \
{\
if (!m_##name##Executable) {\
JSC::Identifier executableName = functionName##PublicName();\
@@ -4629,281 +5246,50 @@ inline JSC::UnlinkedFunctionExecutable* WritableStreamDefaultWriterBuiltinsWrapp
}\
return m_##name##Executable.get();\
}
-WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
#undef DEFINE_BUILTIN_EXECUTABLES
-inline void WritableStreamDefaultWriterBuiltinsWrapper::exportNames()
+inline void WritableStreamInternalsBuiltinsWrapper::exportNames()
{
#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_WRITABLESTREAMDEFAULTWRITER_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+ WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
-/* ReadableStream.ts */
-// initializeReadableStream
-#define WEBCORE_BUILTIN_READABLESTREAM_INITIALIZEREADABLESTREAM 1
-extern const char* const s_readableStreamInitializeReadableStreamCode;
-extern const int s_readableStreamInitializeReadableStreamCodeLength;
-extern const JSC::ConstructAbility s_readableStreamInitializeReadableStreamCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamInitializeReadableStreamCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamInitializeReadableStreamCodeImplementationVisibility;
-
-// readableStreamToArray
-#define WEBCORE_BUILTIN_READABLESTREAM_READABLESTREAMTOARRAY 1
-extern const char* const s_readableStreamReadableStreamToArrayCode;
-extern const int s_readableStreamReadableStreamToArrayCodeLength;
-extern const JSC::ConstructAbility s_readableStreamReadableStreamToArrayCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamReadableStreamToArrayCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamReadableStreamToArrayCodeImplementationVisibility;
-
-// readableStreamToText
-#define WEBCORE_BUILTIN_READABLESTREAM_READABLESTREAMTOTEXT 1
-extern const char* const s_readableStreamReadableStreamToTextCode;
-extern const int s_readableStreamReadableStreamToTextCodeLength;
-extern const JSC::ConstructAbility s_readableStreamReadableStreamToTextCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamReadableStreamToTextCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamReadableStreamToTextCodeImplementationVisibility;
-
-// readableStreamToArrayBuffer
-#define WEBCORE_BUILTIN_READABLESTREAM_READABLESTREAMTOARRAYBUFFER 1
-extern const char* const s_readableStreamReadableStreamToArrayBufferCode;
-extern const int s_readableStreamReadableStreamToArrayBufferCodeLength;
-extern const JSC::ConstructAbility s_readableStreamReadableStreamToArrayBufferCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamReadableStreamToArrayBufferCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamReadableStreamToArrayBufferCodeImplementationVisibility;
-
-// readableStreamToFormData
-#define WEBCORE_BUILTIN_READABLESTREAM_READABLESTREAMTOFORMDATA 1
-extern const char* const s_readableStreamReadableStreamToFormDataCode;
-extern const int s_readableStreamReadableStreamToFormDataCodeLength;
-extern const JSC::ConstructAbility s_readableStreamReadableStreamToFormDataCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamReadableStreamToFormDataCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamReadableStreamToFormDataCodeImplementationVisibility;
-
-// readableStreamToJSON
-#define WEBCORE_BUILTIN_READABLESTREAM_READABLESTREAMTOJSON 1
-extern const char* const s_readableStreamReadableStreamToJSONCode;
-extern const int s_readableStreamReadableStreamToJSONCodeLength;
-extern const JSC::ConstructAbility s_readableStreamReadableStreamToJSONCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamReadableStreamToJSONCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamReadableStreamToJSONCodeImplementationVisibility;
-
-// readableStreamToBlob
-#define WEBCORE_BUILTIN_READABLESTREAM_READABLESTREAMTOBLOB 1
-extern const char* const s_readableStreamReadableStreamToBlobCode;
-extern const int s_readableStreamReadableStreamToBlobCodeLength;
-extern const JSC::ConstructAbility s_readableStreamReadableStreamToBlobCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamReadableStreamToBlobCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamReadableStreamToBlobCodeImplementationVisibility;
-
-// consumeReadableStream
-#define WEBCORE_BUILTIN_READABLESTREAM_CONSUMEREADABLESTREAM 1
-extern const char* const s_readableStreamConsumeReadableStreamCode;
-extern const int s_readableStreamConsumeReadableStreamCodeLength;
-extern const JSC::ConstructAbility s_readableStreamConsumeReadableStreamCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamConsumeReadableStreamCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamConsumeReadableStreamCodeImplementationVisibility;
-
-// createEmptyReadableStream
-#define WEBCORE_BUILTIN_READABLESTREAM_CREATEEMPTYREADABLESTREAM 1
-extern const char* const s_readableStreamCreateEmptyReadableStreamCode;
-extern const int s_readableStreamCreateEmptyReadableStreamCodeLength;
-extern const JSC::ConstructAbility s_readableStreamCreateEmptyReadableStreamCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamCreateEmptyReadableStreamCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamCreateEmptyReadableStreamCodeImplementationVisibility;
-
-// createNativeReadableStream
-#define WEBCORE_BUILTIN_READABLESTREAM_CREATENATIVEREADABLESTREAM 1
-extern const char* const s_readableStreamCreateNativeReadableStreamCode;
-extern const int s_readableStreamCreateNativeReadableStreamCodeLength;
-extern const JSC::ConstructAbility s_readableStreamCreateNativeReadableStreamCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamCreateNativeReadableStreamCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamCreateNativeReadableStreamCodeImplementationVisibility;
-
-// cancel
-#define WEBCORE_BUILTIN_READABLESTREAM_CANCEL 1
-extern const char* const s_readableStreamCancelCode;
-extern const int s_readableStreamCancelCodeLength;
-extern const JSC::ConstructAbility s_readableStreamCancelCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamCancelCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamCancelCodeImplementationVisibility;
-
-// getReader
-#define WEBCORE_BUILTIN_READABLESTREAM_GETREADER 1
-extern const char* const s_readableStreamGetReaderCode;
-extern const int s_readableStreamGetReaderCodeLength;
-extern const JSC::ConstructAbility s_readableStreamGetReaderCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamGetReaderCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamGetReaderCodeImplementationVisibility;
-
-// pipeThrough
-#define WEBCORE_BUILTIN_READABLESTREAM_PIPETHROUGH 1
-extern const char* const s_readableStreamPipeThroughCode;
-extern const int s_readableStreamPipeThroughCodeLength;
-extern const JSC::ConstructAbility s_readableStreamPipeThroughCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamPipeThroughCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamPipeThroughCodeImplementationVisibility;
-
-// pipeTo
-#define WEBCORE_BUILTIN_READABLESTREAM_PIPETO 1
-extern const char* const s_readableStreamPipeToCode;
-extern const int s_readableStreamPipeToCodeLength;
-extern const JSC::ConstructAbility s_readableStreamPipeToCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamPipeToCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamPipeToCodeImplementationVisibility;
-
-// tee
-#define WEBCORE_BUILTIN_READABLESTREAM_TEE 1
-extern const char* const s_readableStreamTeeCode;
-extern const int s_readableStreamTeeCodeLength;
-extern const JSC::ConstructAbility s_readableStreamTeeCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamTeeCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamTeeCodeImplementationVisibility;
-
-// locked
-#define WEBCORE_BUILTIN_READABLESTREAM_LOCKED 1
-extern const char* const s_readableStreamLockedCode;
-extern const int s_readableStreamLockedCodeLength;
-extern const JSC::ConstructAbility s_readableStreamLockedCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamLockedCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamLockedCodeImplementationVisibility;
-
-// values
-#define WEBCORE_BUILTIN_READABLESTREAM_VALUES 1
-extern const char* const s_readableStreamValuesCode;
-extern const int s_readableStreamValuesCodeLength;
-extern const JSC::ConstructAbility s_readableStreamValuesCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamValuesCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamValuesCodeImplementationVisibility;
-
-// lazyAsyncIterator
-#define WEBCORE_BUILTIN_READABLESTREAM_LAZYASYNCITERATOR 1
-extern const char* const s_readableStreamLazyAsyncIteratorCode;
-extern const int s_readableStreamLazyAsyncIteratorCodeLength;
-extern const JSC::ConstructAbility s_readableStreamLazyAsyncIteratorCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableStreamLazyAsyncIteratorCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableStreamLazyAsyncIteratorCodeImplementationVisibility;
-
-#define WEBCORE_FOREACH_READABLESTREAM_BUILTIN_DATA(macro) \
- macro(initializeReadableStream, readableStreamInitializeReadableStream, 3) \
- macro(readableStreamToArray, readableStreamReadableStreamToArray, 1) \
- macro(readableStreamToText, readableStreamReadableStreamToText, 1) \
- macro(readableStreamToArrayBuffer, readableStreamReadableStreamToArrayBuffer, 1) \
- macro(readableStreamToFormData, readableStreamReadableStreamToFormData, 3) \
- macro(readableStreamToJSON, readableStreamReadableStreamToJSON, 1) \
- macro(readableStreamToBlob, readableStreamReadableStreamToBlob, 1) \
- macro(consumeReadableStream, readableStreamConsumeReadableStream, 3) \
- macro(createEmptyReadableStream, readableStreamCreateEmptyReadableStream, 0) \
- macro(createNativeReadableStream, readableStreamCreateNativeReadableStream, 3) \
- macro(cancel, readableStreamCancel, 1) \
- macro(getReader, readableStreamGetReader, 1) \
- macro(pipeThrough, readableStreamPipeThrough, 2) \
- macro(pipeTo, readableStreamPipeTo, 1) \
- macro(tee, readableStreamTee, 0) \
- macro(locked, readableStreamLocked, 0) \
- macro(values, readableStreamValues, 1) \
- macro(lazyAsyncIterator, readableStreamLazyAsyncIterator, 0) \
-
-#define WEBCORE_FOREACH_READABLESTREAM_BUILTIN_CODE(macro) \
- macro(readableStreamInitializeReadableStreamCode, initializeReadableStream, ASCIILiteral(), s_readableStreamInitializeReadableStreamCodeLength) \
- macro(readableStreamReadableStreamToArrayCode, readableStreamToArray, ASCIILiteral(), s_readableStreamReadableStreamToArrayCodeLength) \
- macro(readableStreamReadableStreamToTextCode, readableStreamToText, ASCIILiteral(), s_readableStreamReadableStreamToTextCodeLength) \
- macro(readableStreamReadableStreamToArrayBufferCode, readableStreamToArrayBuffer, ASCIILiteral(), s_readableStreamReadableStreamToArrayBufferCodeLength) \
- macro(readableStreamReadableStreamToFormDataCode, readableStreamToFormData, ASCIILiteral(), s_readableStreamReadableStreamToFormDataCodeLength) \
- macro(readableStreamReadableStreamToJSONCode, readableStreamToJSON, ASCIILiteral(), s_readableStreamReadableStreamToJSONCodeLength) \
- macro(readableStreamReadableStreamToBlobCode, readableStreamToBlob, ASCIILiteral(), s_readableStreamReadableStreamToBlobCodeLength) \
- macro(readableStreamConsumeReadableStreamCode, consumeReadableStream, ASCIILiteral(), s_readableStreamConsumeReadableStreamCodeLength) \
- macro(readableStreamCreateEmptyReadableStreamCode, createEmptyReadableStream, ASCIILiteral(), s_readableStreamCreateEmptyReadableStreamCodeLength) \
- macro(readableStreamCreateNativeReadableStreamCode, createNativeReadableStream, ASCIILiteral(), s_readableStreamCreateNativeReadableStreamCodeLength) \
- macro(readableStreamCancelCode, cancel, ASCIILiteral(), s_readableStreamCancelCodeLength) \
- macro(readableStreamGetReaderCode, getReader, ASCIILiteral(), s_readableStreamGetReaderCodeLength) \
- macro(readableStreamPipeThroughCode, pipeThrough, ASCIILiteral(), s_readableStreamPipeThroughCodeLength) \
- macro(readableStreamPipeToCode, pipeTo, ASCIILiteral(), s_readableStreamPipeToCodeLength) \
- macro(readableStreamTeeCode, tee, ASCIILiteral(), s_readableStreamTeeCodeLength) \
- macro(readableStreamLockedCode, locked, "get locked"_s, s_readableStreamLockedCodeLength) \
- macro(readableStreamValuesCode, values, ASCIILiteral(), s_readableStreamValuesCodeLength) \
- macro(readableStreamLazyAsyncIteratorCode, lazyAsyncIterator, ASCIILiteral(), s_readableStreamLazyAsyncIteratorCodeLength) \
-
-#define WEBCORE_FOREACH_READABLESTREAM_BUILTIN_FUNCTION_NAME(macro) \
- macro(initializeReadableStream) \
- macro(readableStreamToArray) \
- macro(readableStreamToText) \
- macro(readableStreamToArrayBuffer) \
- macro(readableStreamToFormData) \
- macro(readableStreamToJSON) \
- macro(readableStreamToBlob) \
- macro(consumeReadableStream) \
- macro(createEmptyReadableStream) \
- macro(createNativeReadableStream) \
- macro(cancel) \
- macro(getReader) \
- macro(pipeThrough) \
- macro(pipeTo) \
- macro(tee) \
- macro(locked) \
- macro(values) \
- macro(lazyAsyncIterator) \
-
-#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
- JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-
-WEBCORE_FOREACH_READABLESTREAM_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
-#undef DECLARE_BUILTIN_GENERATOR
-
-class ReadableStreamBuiltinsWrapper : private JSC::WeakHandleOwner {
+class WritableStreamInternalsBuiltinFunctions {
public:
- explicit ReadableStreamBuiltinsWrapper(JSC::VM& vm)
- : m_vm(vm)
- WEBCORE_FOREACH_READABLESTREAM_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
-#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_READABLESTREAM_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
-#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
- {
- }
-
-#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
- JSC::UnlinkedFunctionExecutable* name##Executable(); \
- const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_READABLESTREAM_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
-#undef EXPOSE_BUILTIN_EXECUTABLES
-
- WEBCORE_FOREACH_READABLESTREAM_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+ explicit WritableStreamInternalsBuiltinFunctions(JSC::VM& vm) : m_vm(vm) { }
- void exportNames();
+ void init(JSC::JSGlobalObject&);
+ template<typename Visitor> void visit(Visitor&);
-private:
+public:
JSC::VM& m_vm;
- WEBCORE_FOREACH_READABLESTREAM_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
-
-#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
- JSC::SourceCode m_##name##Source;\
- JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_READABLESTREAM_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(functionName) \
+ JSC::WriteBarrier<JSC::JSFunction> m_##functionName##Function;
+ WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_SOURCE_MEMBERS)
#undef DECLARE_BUILTIN_SOURCE_MEMBERS
-
};
-#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* ReadableStreamBuiltinsWrapper::name##Executable() \
-{\
- if (!m_##name##Executable) {\
- JSC::Identifier executableName = functionName##PublicName();\
- if (overriddenName)\
- executableName = JSC::Identifier::fromString(m_vm, overriddenName);\
- m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, executableName, s_##name##ImplementationVisibility, s_##name##ConstructorKind, s_##name##ConstructAbility), this, &m_##name##Executable);\
- }\
- return m_##name##Executable.get();\
+inline void WritableStreamInternalsBuiltinFunctions::init(JSC::JSGlobalObject& globalObject)
+{
+#define EXPORT_FUNCTION(codeName, functionName, overriddenName, length) \
+ m_##functionName##Function.set(m_vm, &globalObject, JSC::JSFunction::create(m_vm, codeName##Generator(m_vm), &globalObject));
+ WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_CODE(EXPORT_FUNCTION)
+#undef EXPORT_FUNCTION
}
-WEBCORE_FOREACH_READABLESTREAM_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
-#undef DEFINE_BUILTIN_EXECUTABLES
-inline void ReadableStreamBuiltinsWrapper::exportNames()
+template<typename Visitor>
+inline void WritableStreamInternalsBuiltinFunctions::visit(Visitor& visitor)
{
-#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_READABLESTREAM_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
-#undef EXPORT_FUNCTION_NAME
+#define VISIT_FUNCTION(name) visitor.append(m_##name##Function);
+ WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(VISIT_FUNCTION)
+#undef VISIT_FUNCTION
}
-/* ReadableStreamDefaultController.ts */
+
+template void WritableStreamInternalsBuiltinFunctions::visit(JSC::AbstractSlotVisitor&);
+template void WritableStreamInternalsBuiltinFunctions::visit(JSC::SlotVisitor&);
+ /* ReadableStreamDefaultController.ts */
// initializeReadableStreamDefaultController
#define WEBCORE_BUILTIN_READABLESTREAMDEFAULTCONTROLLER_INITIALIZEREADABLESTREAMDEFAULTCONTROLLER 1
extern const char* const s_readableStreamDefaultControllerInitializeReadableStreamDefaultControllerCode;
@@ -5025,422 +5411,59 @@ inline void ReadableStreamDefaultControllerBuiltinsWrapper::exportNames()
WEBCORE_FOREACH_READABLESTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
-/* ReadableByteStreamInternals.ts */
-// privateInitializeReadableByteStreamController
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_PRIVATEINITIALIZEREADABLEBYTESTREAMCONTROLLER 1
-extern const char* const s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCode;
-extern const int s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeImplementationVisibility;
-
-// readableStreamByteStreamControllerStart
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLESTREAMBYTESTREAMCONTROLLERSTART 1
-extern const char* const s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCode;
-extern const int s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeImplementationVisibility;
-
-// privateInitializeReadableStreamBYOBRequest
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_PRIVATEINITIALIZEREADABLESTREAMBYOBREQUEST 1
-extern const char* const s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCode;
-extern const int s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeImplementationVisibility;
-
-// isReadableByteStreamController
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_ISREADABLEBYTESTREAMCONTROLLER 1
-extern const char* const s_readableByteStreamInternalsIsReadableByteStreamControllerCode;
-extern const int s_readableByteStreamInternalsIsReadableByteStreamControllerCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsIsReadableByteStreamControllerCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsIsReadableByteStreamControllerCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsIsReadableByteStreamControllerCodeImplementationVisibility;
-
-// isReadableStreamBYOBRequest
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_ISREADABLESTREAMBYOBREQUEST 1
-extern const char* const s_readableByteStreamInternalsIsReadableStreamBYOBRequestCode;
-extern const int s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeImplementationVisibility;
-
-// isReadableStreamBYOBReader
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_ISREADABLESTREAMBYOBREADER 1
-extern const char* const s_readableByteStreamInternalsIsReadableStreamBYOBReaderCode;
-extern const int s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeImplementationVisibility;
-
-// readableByteStreamControllerCancel
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERCANCEL 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerCancelCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeImplementationVisibility;
-
-// readableByteStreamControllerError
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERERROR 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerErrorCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeImplementationVisibility;
-
-// readableByteStreamControllerClose
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERCLOSE 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerCloseCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeImplementationVisibility;
-
-// readableByteStreamControllerClearPendingPullIntos
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERCLEARPENDINGPULLINTOS 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeImplementationVisibility;
-
-// readableByteStreamControllerGetDesiredSize
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERGETDESIREDSIZE 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeImplementationVisibility;
-
-// readableStreamHasBYOBReader
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLESTREAMHASBYOBREADER 1
-extern const char* const s_readableByteStreamInternalsReadableStreamHasBYOBReaderCode;
-extern const int s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeImplementationVisibility;
-
-// readableStreamHasDefaultReader
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLESTREAMHASDEFAULTREADER 1
-extern const char* const s_readableByteStreamInternalsReadableStreamHasDefaultReaderCode;
-extern const int s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeImplementationVisibility;
-
-// readableByteStreamControllerHandleQueueDrain
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERHANDLEQUEUEDRAIN 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeImplementationVisibility;
-
-// readableByteStreamControllerPull
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERPULL 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerPullCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerPullCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerPullCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerPullCodeImplementationVisibility;
-
-// readableByteStreamControllerShouldCallPull
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERSHOULDCALLPULL 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeImplementationVisibility;
-
-// readableByteStreamControllerCallPullIfNeeded
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERCALLPULLIFNEEDED 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeImplementationVisibility;
-
-// transferBufferToCurrentRealm
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_TRANSFERBUFFERTOCURRENTREALM 1
-extern const char* const s_readableByteStreamInternalsTransferBufferToCurrentRealmCode;
-extern const int s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeImplementationVisibility;
-
-// readableStreamReaderKind
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLESTREAMREADERKIND 1
-extern const char* const s_readableByteStreamInternalsReadableStreamReaderKindCode;
-extern const int s_readableByteStreamInternalsReadableStreamReaderKindCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamReaderKindCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamReaderKindCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamReaderKindCodeImplementationVisibility;
-
-// readableByteStreamControllerEnqueue
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERENQUEUE 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeImplementationVisibility;
-
-// readableByteStreamControllerEnqueueChunk
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERENQUEUECHUNK 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeImplementationVisibility;
-
-// readableByteStreamControllerRespondWithNewView
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERRESPONDWITHNEWVIEW 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeImplementationVisibility;
-
-// readableByteStreamControllerRespond
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERRESPOND 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeImplementationVisibility;
-
-// readableByteStreamControllerRespondInternal
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERRESPONDINTERNAL 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeImplementationVisibility;
-
-// readableByteStreamControllerRespondInReadableState
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERRESPONDINREADABLESTATE 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeImplementationVisibility;
-
-// readableByteStreamControllerRespondInClosedState
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERRESPONDINCLOSEDSTATE 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeImplementationVisibility;
-
-// readableByteStreamControllerProcessPullDescriptors
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERPROCESSPULLDESCRIPTORS 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeImplementationVisibility;
-
-// readableByteStreamControllerFillDescriptorFromQueue
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERFILLDESCRIPTORFROMQUEUE 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeImplementationVisibility;
-
-// readableByteStreamControllerShiftPendingDescriptor
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERSHIFTPENDINGDESCRIPTOR 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeImplementationVisibility;
-
-// readableByteStreamControllerInvalidateBYOBRequest
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERINVALIDATEBYOBREQUEST 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeImplementationVisibility;
-
-// readableByteStreamControllerCommitDescriptor
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERCOMMITDESCRIPTOR 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeImplementationVisibility;
-
-// readableByteStreamControllerConvertDescriptor
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERCONVERTDESCRIPTOR 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeImplementationVisibility;
-
-// readableStreamFulfillReadIntoRequest
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLESTREAMFULFILLREADINTOREQUEST 1
-extern const char* const s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCode;
-extern const int s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeImplementationVisibility;
-
-// readableStreamBYOBReaderRead
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLESTREAMBYOBREADERREAD 1
-extern const char* const s_readableByteStreamInternalsReadableStreamBYOBReaderReadCode;
-extern const int s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeImplementationVisibility;
+/* CountQueuingStrategy.ts */
+// highWaterMark
+#define WEBCORE_BUILTIN_COUNTQUEUINGSTRATEGY_HIGHWATERMARK 1
+extern const char* const s_countQueuingStrategyHighWaterMarkCode;
+extern const int s_countQueuingStrategyHighWaterMarkCodeLength;
+extern const JSC::ConstructAbility s_countQueuingStrategyHighWaterMarkCodeConstructAbility;
+extern const JSC::ConstructorKind s_countQueuingStrategyHighWaterMarkCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_countQueuingStrategyHighWaterMarkCodeImplementationVisibility;
-// readableByteStreamControllerPullInto
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLEBYTESTREAMCONTROLLERPULLINTO 1
-extern const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCode;
-extern const int s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeImplementationVisibility;
+// size
+#define WEBCORE_BUILTIN_COUNTQUEUINGSTRATEGY_SIZE 1
+extern const char* const s_countQueuingStrategySizeCode;
+extern const int s_countQueuingStrategySizeCodeLength;
+extern const JSC::ConstructAbility s_countQueuingStrategySizeCodeConstructAbility;
+extern const JSC::ConstructorKind s_countQueuingStrategySizeCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_countQueuingStrategySizeCodeImplementationVisibility;
-// readableStreamAddReadIntoRequest
-#define WEBCORE_BUILTIN_READABLEBYTESTREAMINTERNALS_READABLESTREAMADDREADINTOREQUEST 1
-extern const char* const s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCode;
-extern const int s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeLength;
-extern const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeConstructAbility;
-extern const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeImplementationVisibility;
+// initializeCountQueuingStrategy
+#define WEBCORE_BUILTIN_COUNTQUEUINGSTRATEGY_INITIALIZECOUNTQUEUINGSTRATEGY 1
+extern const char* const s_countQueuingStrategyInitializeCountQueuingStrategyCode;
+extern const int s_countQueuingStrategyInitializeCountQueuingStrategyCodeLength;
+extern const JSC::ConstructAbility s_countQueuingStrategyInitializeCountQueuingStrategyCodeConstructAbility;
+extern const JSC::ConstructorKind s_countQueuingStrategyInitializeCountQueuingStrategyCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_countQueuingStrategyInitializeCountQueuingStrategyCodeImplementationVisibility;
-#define WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_DATA(macro) \
- macro(privateInitializeReadableByteStreamController, readableByteStreamInternalsPrivateInitializeReadableByteStreamController, 3) \
- macro(readableStreamByteStreamControllerStart, readableByteStreamInternalsReadableStreamByteStreamControllerStart, 1) \
- macro(privateInitializeReadableStreamBYOBRequest, readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequest, 2) \
- macro(isReadableByteStreamController, readableByteStreamInternalsIsReadableByteStreamController, 1) \
- macro(isReadableStreamBYOBRequest, readableByteStreamInternalsIsReadableStreamBYOBRequest, 1) \
- macro(isReadableStreamBYOBReader, readableByteStreamInternalsIsReadableStreamBYOBReader, 1) \
- macro(readableByteStreamControllerCancel, readableByteStreamInternalsReadableByteStreamControllerCancel, 2) \
- macro(readableByteStreamControllerError, readableByteStreamInternalsReadableByteStreamControllerError, 2) \
- macro(readableByteStreamControllerClose, readableByteStreamInternalsReadableByteStreamControllerClose, 1) \
- macro(readableByteStreamControllerClearPendingPullIntos, readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntos, 1) \
- macro(readableByteStreamControllerGetDesiredSize, readableByteStreamInternalsReadableByteStreamControllerGetDesiredSize, 1) \
- macro(readableStreamHasBYOBReader, readableByteStreamInternalsReadableStreamHasBYOBReader, 1) \
- macro(readableStreamHasDefaultReader, readableByteStreamInternalsReadableStreamHasDefaultReader, 1) \
- macro(readableByteStreamControllerHandleQueueDrain, readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrain, 1) \
- macro(readableByteStreamControllerPull, readableByteStreamInternalsReadableByteStreamControllerPull, 1) \
- macro(readableByteStreamControllerShouldCallPull, readableByteStreamInternalsReadableByteStreamControllerShouldCallPull, 1) \
- macro(readableByteStreamControllerCallPullIfNeeded, readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeeded, 1) \
- macro(transferBufferToCurrentRealm, readableByteStreamInternalsTransferBufferToCurrentRealm, 1) \
- macro(readableStreamReaderKind, readableByteStreamInternalsReadableStreamReaderKind, 1) \
- macro(readableByteStreamControllerEnqueue, readableByteStreamInternalsReadableByteStreamControllerEnqueue, 2) \
- macro(readableByteStreamControllerEnqueueChunk, readableByteStreamInternalsReadableByteStreamControllerEnqueueChunk, 4) \
- macro(readableByteStreamControllerRespondWithNewView, readableByteStreamInternalsReadableByteStreamControllerRespondWithNewView, 2) \
- macro(readableByteStreamControllerRespond, readableByteStreamInternalsReadableByteStreamControllerRespond, 2) \
- macro(readableByteStreamControllerRespondInternal, readableByteStreamInternalsReadableByteStreamControllerRespondInternal, 2) \
- macro(readableByteStreamControllerRespondInReadableState, readableByteStreamInternalsReadableByteStreamControllerRespondInReadableState, 3) \
- macro(readableByteStreamControllerRespondInClosedState, readableByteStreamInternalsReadableByteStreamControllerRespondInClosedState, 2) \
- macro(readableByteStreamControllerProcessPullDescriptors, readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptors, 1) \
- macro(readableByteStreamControllerFillDescriptorFromQueue, readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueue, 2) \
- macro(readableByteStreamControllerShiftPendingDescriptor, readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptor, 1) \
- macro(readableByteStreamControllerInvalidateBYOBRequest, readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequest, 1) \
- macro(readableByteStreamControllerCommitDescriptor, readableByteStreamInternalsReadableByteStreamControllerCommitDescriptor, 2) \
- macro(readableByteStreamControllerConvertDescriptor, readableByteStreamInternalsReadableByteStreamControllerConvertDescriptor, 1) \
- macro(readableStreamFulfillReadIntoRequest, readableByteStreamInternalsReadableStreamFulfillReadIntoRequest, 3) \
- macro(readableStreamBYOBReaderRead, readableByteStreamInternalsReadableStreamBYOBReaderRead, 2) \
- macro(readableByteStreamControllerPullInto, readableByteStreamInternalsReadableByteStreamControllerPullInto, 2) \
- macro(readableStreamAddReadIntoRequest, readableByteStreamInternalsReadableStreamAddReadIntoRequest, 1) \
+#define WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_DATA(macro) \
+ macro(highWaterMark, countQueuingStrategyHighWaterMark, 0) \
+ macro(size, countQueuingStrategySize, 0) \
+ macro(initializeCountQueuingStrategy, countQueuingStrategyInitializeCountQueuingStrategy, 1) \
-#define WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_CODE(macro) \
- macro(readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCode, privateInitializeReadableByteStreamController, ASCIILiteral(), s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeLength) \
- macro(readableByteStreamInternalsReadableStreamByteStreamControllerStartCode, readableStreamByteStreamControllerStart, ASCIILiteral(), s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeLength) \
- macro(readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCode, privateInitializeReadableStreamBYOBRequest, ASCIILiteral(), s_readableByteStreamInternalsPrivateInitializeReadableStreamBYOBRequestCodeLength) \
- macro(readableByteStreamInternalsIsReadableByteStreamControllerCode, isReadableByteStreamController, ASCIILiteral(), s_readableByteStreamInternalsIsReadableByteStreamControllerCodeLength) \
- macro(readableByteStreamInternalsIsReadableStreamBYOBRequestCode, isReadableStreamBYOBRequest, ASCIILiteral(), s_readableByteStreamInternalsIsReadableStreamBYOBRequestCodeLength) \
- macro(readableByteStreamInternalsIsReadableStreamBYOBReaderCode, isReadableStreamBYOBReader, ASCIILiteral(), s_readableByteStreamInternalsIsReadableStreamBYOBReaderCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerCancelCode, readableByteStreamControllerCancel, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerErrorCode, readableByteStreamControllerError, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerCloseCode, readableByteStreamControllerClose, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerCloseCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCode, readableByteStreamControllerClearPendingPullIntos, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerClearPendingPullIntosCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCode, readableByteStreamControllerGetDesiredSize, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeLength) \
- macro(readableByteStreamInternalsReadableStreamHasBYOBReaderCode, readableStreamHasBYOBReader, ASCIILiteral(), s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeLength) \
- macro(readableByteStreamInternalsReadableStreamHasDefaultReaderCode, readableStreamHasDefaultReader, ASCIILiteral(), s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCode, readableByteStreamControllerHandleQueueDrain, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerPullCode, readableByteStreamControllerPull, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerPullCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCode, readableByteStreamControllerShouldCallPull, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCode, readableByteStreamControllerCallPullIfNeeded, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeLength) \
- macro(readableByteStreamInternalsTransferBufferToCurrentRealmCode, transferBufferToCurrentRealm, ASCIILiteral(), s_readableByteStreamInternalsTransferBufferToCurrentRealmCodeLength) \
- macro(readableByteStreamInternalsReadableStreamReaderKindCode, readableStreamReaderKind, ASCIILiteral(), s_readableByteStreamInternalsReadableStreamReaderKindCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerEnqueueCode, readableByteStreamControllerEnqueue, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCode, readableByteStreamControllerEnqueueChunk, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCode, readableByteStreamControllerRespondWithNewView, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerRespondCode, readableByteStreamControllerRespond, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerRespondInternalCode, readableByteStreamControllerRespondInternal, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCode, readableByteStreamControllerRespondInReadableState, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCode, readableByteStreamControllerRespondInClosedState, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCode, readableByteStreamControllerProcessPullDescriptors, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerProcessPullDescriptorsCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCode, readableByteStreamControllerFillDescriptorFromQueue, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCode, readableByteStreamControllerShiftPendingDescriptor, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCode, readableByteStreamControllerInvalidateBYOBRequest, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCode, readableByteStreamControllerCommitDescriptor, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerCommitDescriptorCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCode, readableByteStreamControllerConvertDescriptor, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerConvertDescriptorCodeLength) \
- macro(readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCode, readableStreamFulfillReadIntoRequest, ASCIILiteral(), s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeLength) \
- macro(readableByteStreamInternalsReadableStreamBYOBReaderReadCode, readableStreamBYOBReaderRead, ASCIILiteral(), s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeLength) \
- macro(readableByteStreamInternalsReadableByteStreamControllerPullIntoCode, readableByteStreamControllerPullInto, ASCIILiteral(), s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeLength) \
- macro(readableByteStreamInternalsReadableStreamAddReadIntoRequestCode, readableStreamAddReadIntoRequest, ASCIILiteral(), s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeLength) \
+#define WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_CODE(macro) \
+ macro(countQueuingStrategyHighWaterMarkCode, highWaterMark, "get highWaterMark"_s, s_countQueuingStrategyHighWaterMarkCodeLength) \
+ macro(countQueuingStrategySizeCode, size, ASCIILiteral(), s_countQueuingStrategySizeCodeLength) \
+ macro(countQueuingStrategyInitializeCountQueuingStrategyCode, initializeCountQueuingStrategy, ASCIILiteral(), s_countQueuingStrategyInitializeCountQueuingStrategyCodeLength) \
-#define WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(macro) \
- macro(privateInitializeReadableByteStreamController) \
- macro(readableStreamByteStreamControllerStart) \
- macro(privateInitializeReadableStreamBYOBRequest) \
- macro(isReadableByteStreamController) \
- macro(isReadableStreamBYOBRequest) \
- macro(isReadableStreamBYOBReader) \
- macro(readableByteStreamControllerCancel) \
- macro(readableByteStreamControllerError) \
- macro(readableByteStreamControllerClose) \
- macro(readableByteStreamControllerClearPendingPullIntos) \
- macro(readableByteStreamControllerGetDesiredSize) \
- macro(readableStreamHasBYOBReader) \
- macro(readableStreamHasDefaultReader) \
- macro(readableByteStreamControllerHandleQueueDrain) \
- macro(readableByteStreamControllerPull) \
- macro(readableByteStreamControllerShouldCallPull) \
- macro(readableByteStreamControllerCallPullIfNeeded) \
- macro(transferBufferToCurrentRealm) \
- macro(readableStreamReaderKind) \
- macro(readableByteStreamControllerEnqueue) \
- macro(readableByteStreamControllerEnqueueChunk) \
- macro(readableByteStreamControllerRespondWithNewView) \
- macro(readableByteStreamControllerRespond) \
- macro(readableByteStreamControllerRespondInternal) \
- macro(readableByteStreamControllerRespondInReadableState) \
- macro(readableByteStreamControllerRespondInClosedState) \
- macro(readableByteStreamControllerProcessPullDescriptors) \
- macro(readableByteStreamControllerFillDescriptorFromQueue) \
- macro(readableByteStreamControllerShiftPendingDescriptor) \
- macro(readableByteStreamControllerInvalidateBYOBRequest) \
- macro(readableByteStreamControllerCommitDescriptor) \
- macro(readableByteStreamControllerConvertDescriptor) \
- macro(readableStreamFulfillReadIntoRequest) \
- macro(readableStreamBYOBReaderRead) \
- macro(readableByteStreamControllerPullInto) \
- macro(readableStreamAddReadIntoRequest) \
+#define WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(macro) \
+ macro(highWaterMark) \
+ macro(size) \
+ macro(initializeCountQueuingStrategy) \
#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
#undef DECLARE_BUILTIN_GENERATOR
-class ReadableByteStreamInternalsBuiltinsWrapper : private JSC::WeakHandleOwner {
+class CountQueuingStrategyBuiltinsWrapper : private JSC::WeakHandleOwner {
public:
- explicit ReadableByteStreamInternalsBuiltinsWrapper(JSC::VM& vm)
+ explicit CountQueuingStrategyBuiltinsWrapper(JSC::VM& vm)
: m_vm(vm)
- WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
{
}
@@ -5448,28 +5471,28 @@ public:
#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
JSC::UnlinkedFunctionExecutable* name##Executable(); \
const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+ WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
#undef EXPOSE_BUILTIN_EXECUTABLES
- WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+ WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
void exportNames();
private:
JSC::VM& m_vm;
- WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
JSC::SourceCode m_##name##Source;\
JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
#undef DECLARE_BUILTIN_SOURCE_MEMBERS
};
#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* ReadableByteStreamInternalsBuiltinsWrapper::name##Executable() \
+inline JSC::UnlinkedFunctionExecutable* CountQueuingStrategyBuiltinsWrapper::name##Executable() \
{\
if (!m_##name##Executable) {\
JSC::Identifier executableName = functionName##PublicName();\
@@ -5479,91 +5502,46 @@ inline JSC::UnlinkedFunctionExecutable* ReadableByteStreamInternalsBuiltinsWrapp
}\
return m_##name##Executable.get();\
}
-WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
#undef DEFINE_BUILTIN_EXECUTABLES
-inline void ReadableByteStreamInternalsBuiltinsWrapper::exportNames()
+inline void CountQueuingStrategyBuiltinsWrapper::exportNames()
{
#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+ WEBCORE_FOREACH_COUNTQUEUINGSTRATEGY_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
-class ReadableByteStreamInternalsBuiltinFunctions {
-public:
- explicit ReadableByteStreamInternalsBuiltinFunctions(JSC::VM& vm) : m_vm(vm) { }
-
- void init(JSC::JSGlobalObject&);
- template<typename Visitor> void visit(Visitor&);
-
-public:
- JSC::VM& m_vm;
-
-#define DECLARE_BUILTIN_SOURCE_MEMBERS(functionName) \
- JSC::WriteBarrier<JSC::JSFunction> m_##functionName##Function;
- WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_SOURCE_MEMBERS)
-#undef DECLARE_BUILTIN_SOURCE_MEMBERS
-};
-
-inline void ReadableByteStreamInternalsBuiltinFunctions::init(JSC::JSGlobalObject& globalObject)
-{
-#define EXPORT_FUNCTION(codeName, functionName, overriddenName, length) \
- m_##functionName##Function.set(m_vm, &globalObject, JSC::JSFunction::create(m_vm, codeName##Generator(m_vm), &globalObject));
- WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_CODE(EXPORT_FUNCTION)
-#undef EXPORT_FUNCTION
-}
-
-template<typename Visitor>
-inline void ReadableByteStreamInternalsBuiltinFunctions::visit(Visitor& visitor)
-{
-#define VISIT_FUNCTION(name) visitor.append(m_##name##Function);
- WEBCORE_FOREACH_READABLEBYTESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(VISIT_FUNCTION)
-#undef VISIT_FUNCTION
-}
-
-template void ReadableByteStreamInternalsBuiltinFunctions::visit(JSC::AbstractSlotVisitor&);
-template void ReadableByteStreamInternalsBuiltinFunctions::visit(JSC::SlotVisitor&);
- /* WritableStreamDefaultController.ts */
-// initializeWritableStreamDefaultController
-#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTCONTROLLER_INITIALIZEWRITABLESTREAMDEFAULTCONTROLLER 1
-extern const char* const s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCode;
-extern const int s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeLength;
-extern const JSC::ConstructAbility s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeImplementationVisibility;
-
-// error
-#define WEBCORE_BUILTIN_WRITABLESTREAMDEFAULTCONTROLLER_ERROR 1
-extern const char* const s_writableStreamDefaultControllerErrorCode;
-extern const int s_writableStreamDefaultControllerErrorCodeLength;
-extern const JSC::ConstructAbility s_writableStreamDefaultControllerErrorCodeConstructAbility;
-extern const JSC::ConstructorKind s_writableStreamDefaultControllerErrorCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_writableStreamDefaultControllerErrorCodeImplementationVisibility;
+/* EventSource.ts */
+// getEventSource
+#define WEBCORE_BUILTIN_EVENTSOURCE_GETEVENTSOURCE 1
+extern const char* const s_eventSourceGetEventSourceCode;
+extern const int s_eventSourceGetEventSourceCodeLength;
+extern const JSC::ConstructAbility s_eventSourceGetEventSourceCodeConstructAbility;
+extern const JSC::ConstructorKind s_eventSourceGetEventSourceCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_eventSourceGetEventSourceCodeImplementationVisibility;
-#define WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_DATA(macro) \
- macro(initializeWritableStreamDefaultController, writableStreamDefaultControllerInitializeWritableStreamDefaultController, 0) \
- macro(error, writableStreamDefaultControllerError, 1) \
+#define WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_DATA(macro) \
+ macro(getEventSource, eventSourceGetEventSource, 0) \
-#define WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_CODE(macro) \
- macro(writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCode, initializeWritableStreamDefaultController, ASCIILiteral(), s_writableStreamDefaultControllerInitializeWritableStreamDefaultControllerCodeLength) \
- macro(writableStreamDefaultControllerErrorCode, error, ASCIILiteral(), s_writableStreamDefaultControllerErrorCodeLength) \
+#define WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_CODE(macro) \
+ macro(eventSourceGetEventSourceCode, getEventSource, ASCIILiteral(), s_eventSourceGetEventSourceCodeLength) \
-#define WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(macro) \
- macro(initializeWritableStreamDefaultController) \
- macro(error) \
+#define WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_FUNCTION_NAME(macro) \
+ macro(getEventSource) \
#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
#undef DECLARE_BUILTIN_GENERATOR
-class WritableStreamDefaultControllerBuiltinsWrapper : private JSC::WeakHandleOwner {
+class EventSourceBuiltinsWrapper : private JSC::WeakHandleOwner {
public:
- explicit WritableStreamDefaultControllerBuiltinsWrapper(JSC::VM& vm)
+ explicit EventSourceBuiltinsWrapper(JSC::VM& vm)
: m_vm(vm)
- WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
{
}
@@ -5571,28 +5549,28 @@ public:
#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
JSC::UnlinkedFunctionExecutable* name##Executable(); \
const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+ WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
#undef EXPOSE_BUILTIN_EXECUTABLES
- WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+ WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
void exportNames();
private:
JSC::VM& m_vm;
- WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
JSC::SourceCode m_##name##Source;\
JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
#undef DECLARE_BUILTIN_SOURCE_MEMBERS
};
#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* WritableStreamDefaultControllerBuiltinsWrapper::name##Executable() \
+inline JSC::UnlinkedFunctionExecutable* EventSourceBuiltinsWrapper::name##Executable() \
{\
if (!m_##name##Executable) {\
JSC::Identifier executableName = functionName##PublicName();\
@@ -5602,46 +5580,68 @@ inline JSC::UnlinkedFunctionExecutable* WritableStreamDefaultControllerBuiltinsW
}\
return m_##name##Executable.get();\
}
-WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
#undef DEFINE_BUILTIN_EXECUTABLES
-inline void WritableStreamDefaultControllerBuiltinsWrapper::exportNames()
+inline void EventSourceBuiltinsWrapper::exportNames()
{
#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_WRITABLESTREAMDEFAULTCONTROLLER_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+ WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
-/* EventSource.ts */
-// getEventSource
-#define WEBCORE_BUILTIN_EVENTSOURCE_GETEVENTSOURCE 1
-extern const char* const s_eventSourceGetEventSourceCode;
-extern const int s_eventSourceGetEventSourceCodeLength;
-extern const JSC::ConstructAbility s_eventSourceGetEventSourceCodeConstructAbility;
-extern const JSC::ConstructorKind s_eventSourceGetEventSourceCodeConstructorKind;
-extern const JSC::ImplementationVisibility s_eventSourceGetEventSourceCodeImplementationVisibility;
+/* ProcessObjectInternals.ts */
+// binding
+#define WEBCORE_BUILTIN_PROCESSOBJECTINTERNALS_BINDING 1
+extern const char* const s_processObjectInternalsBindingCode;
+extern const int s_processObjectInternalsBindingCodeLength;
+extern const JSC::ConstructAbility s_processObjectInternalsBindingCodeConstructAbility;
+extern const JSC::ConstructorKind s_processObjectInternalsBindingCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_processObjectInternalsBindingCodeImplementationVisibility;
-#define WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_DATA(macro) \
- macro(getEventSource, eventSourceGetEventSource, 0) \
+// getStdioWriteStream
+#define WEBCORE_BUILTIN_PROCESSOBJECTINTERNALS_GETSTDIOWRITESTREAM 1
+extern const char* const s_processObjectInternalsGetStdioWriteStreamCode;
+extern const int s_processObjectInternalsGetStdioWriteStreamCodeLength;
+extern const JSC::ConstructAbility s_processObjectInternalsGetStdioWriteStreamCodeConstructAbility;
+extern const JSC::ConstructorKind s_processObjectInternalsGetStdioWriteStreamCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_processObjectInternalsGetStdioWriteStreamCodeImplementationVisibility;
-#define WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_CODE(macro) \
- macro(eventSourceGetEventSourceCode, getEventSource, ASCIILiteral(), s_eventSourceGetEventSourceCodeLength) \
+// getStdinStream
+#define WEBCORE_BUILTIN_PROCESSOBJECTINTERNALS_GETSTDINSTREAM 1
+extern const char* const s_processObjectInternalsGetStdinStreamCode;
+extern const int s_processObjectInternalsGetStdinStreamCodeLength;
+extern const JSC::ConstructAbility s_processObjectInternalsGetStdinStreamCodeConstructAbility;
+extern const JSC::ConstructorKind s_processObjectInternalsGetStdinStreamCodeConstructorKind;
+extern const JSC::ImplementationVisibility s_processObjectInternalsGetStdinStreamCodeImplementationVisibility;
-#define WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_FUNCTION_NAME(macro) \
- macro(getEventSource) \
+#define WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_DATA(macro) \
+ macro(binding, processObjectInternalsBinding, 1) \
+ macro(getStdioWriteStream, processObjectInternalsGetStdioWriteStream, 1) \
+ macro(getStdinStream, processObjectInternalsGetStdinStream, 1) \
+
+#define WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_CODE(macro) \
+ macro(processObjectInternalsBindingCode, binding, ASCIILiteral(), s_processObjectInternalsBindingCodeLength) \
+ macro(processObjectInternalsGetStdioWriteStreamCode, getStdioWriteStream, ASCIILiteral(), s_processObjectInternalsGetStdioWriteStreamCodeLength) \
+ macro(processObjectInternalsGetStdinStreamCode, getStdinStream, ASCIILiteral(), s_processObjectInternalsGetStdinStreamCodeLength) \
+
+#define WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_FUNCTION_NAME(macro) \
+ macro(binding) \
+ macro(getStdioWriteStream) \
+ macro(getStdinStream) \
#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
-WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
#undef DECLARE_BUILTIN_GENERATOR
-class EventSourceBuiltinsWrapper : private JSC::WeakHandleOwner {
+class ProcessObjectInternalsBuiltinsWrapper : private JSC::WeakHandleOwner {
public:
- explicit EventSourceBuiltinsWrapper(JSC::VM& vm)
+ explicit ProcessObjectInternalsBuiltinsWrapper(JSC::VM& vm)
: m_vm(vm)
- WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
- WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
{
}
@@ -5649,28 +5649,28 @@ public:
#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
JSC::UnlinkedFunctionExecutable* name##Executable(); \
const JSC::SourceCode& name##Source() const { return m_##name##Source; }
- WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+ WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
#undef EXPOSE_BUILTIN_EXECUTABLES
- WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+ WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
void exportNames();
private:
JSC::VM& m_vm;
- WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+ WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
JSC::SourceCode m_##name##Source;\
JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
- WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+ WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
#undef DECLARE_BUILTIN_SOURCE_MEMBERS
};
#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
-inline JSC::UnlinkedFunctionExecutable* EventSourceBuiltinsWrapper::name##Executable() \
+inline JSC::UnlinkedFunctionExecutable* ProcessObjectInternalsBuiltinsWrapper::name##Executable() \
{\
if (!m_##name##Executable) {\
JSC::Identifier executableName = functionName##PublicName();\
@@ -5680,108 +5680,108 @@ inline JSC::UnlinkedFunctionExecutable* EventSourceBuiltinsWrapper::name##Execut
}\
return m_##name##Executable.get();\
}
-WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
#undef DEFINE_BUILTIN_EXECUTABLES
-inline void EventSourceBuiltinsWrapper::exportNames()
+inline void ProcessObjectInternalsBuiltinsWrapper::exportNames()
{
#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
- WEBCORE_FOREACH_EVENTSOURCE_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+ WEBCORE_FOREACH_PROCESSOBJECTINTERNALS_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
#undef EXPORT_FUNCTION_NAME
}
class JSBuiltinFunctions {
public:
explicit JSBuiltinFunctions(JSC::VM& vm)
: m_vm(vm)
- , m_bundlerPluginBuiltins(m_vm)
- , m_byteLengthQueuingStrategyBuiltins(m_vm)
- , m_writableStreamInternalsBuiltins(m_vm)
+ , m_writableStreamDefaultWriterBuiltins(m_vm)
+ , m_consoleObjectBuiltins(m_vm)
, m_transformStreamInternalsBuiltins(m_vm)
- , m_processObjectInternalsBuiltins(m_vm)
- , m_transformStreamBuiltins(m_vm)
+ , m_readableStreamBYOBRequestBuiltins(m_vm)
+ , m_readableStreamBYOBReaderBuiltins(m_vm)
+ , m_writableStreamDefaultControllerBuiltins(m_vm)
, m_moduleBuiltins(m_vm)
- , m_jsBufferPrototypeBuiltins(m_vm)
, m_readableByteStreamControllerBuiltins(m_vm)
- , m_utilInspectBuiltins(m_vm)
- , m_consoleObjectBuiltins(m_vm)
- , m_readableStreamInternalsBuiltins(m_vm)
- , m_transformStreamDefaultControllerBuiltins(m_vm)
- , m_readableStreamBYOBReaderBuiltins(m_vm)
- , m_jsBufferConstructorBuiltins(m_vm)
, m_readableStreamDefaultReaderBuiltins(m_vm)
- , m_streamInternalsBuiltins(m_vm)
+ , m_byteLengthQueuingStrategyBuiltins(m_vm)
+ , m_jsBufferConstructorBuiltins(m_vm)
, m_importMetaObjectBuiltins(m_vm)
- , m_countQueuingStrategyBuiltins(m_vm)
- , m_readableStreamBYOBRequestBuiltins(m_vm)
- , m_writableStreamDefaultWriterBuiltins(m_vm)
+ , m_transformStreamBuiltins(m_vm)
+ , m_readableStreamInternalsBuiltins(m_vm)
+ , m_readableByteStreamInternalsBuiltins(m_vm)
+ , m_utilInspectBuiltins(m_vm)
+ , m_jsBufferPrototypeBuiltins(m_vm)
, m_readableStreamBuiltins(m_vm)
+ , m_bundlerPluginBuiltins(m_vm)
+ , m_streamInternalsBuiltins(m_vm)
+ , m_transformStreamDefaultControllerBuiltins(m_vm)
+ , m_writableStreamInternalsBuiltins(m_vm)
, m_readableStreamDefaultControllerBuiltins(m_vm)
- , m_readableByteStreamInternalsBuiltins(m_vm)
- , m_writableStreamDefaultControllerBuiltins(m_vm)
+ , m_countQueuingStrategyBuiltins(m_vm)
, m_eventSourceBuiltins(m_vm)
+ , m_processObjectInternalsBuiltins(m_vm)
{
- m_writableStreamInternalsBuiltins.exportNames();
m_transformStreamInternalsBuiltins.exportNames();
m_readableStreamInternalsBuiltins.exportNames();
- m_streamInternalsBuiltins.exportNames();
m_readableByteStreamInternalsBuiltins.exportNames();
+ m_streamInternalsBuiltins.exportNames();
+ m_writableStreamInternalsBuiltins.exportNames();
}
- BundlerPluginBuiltinsWrapper& bundlerPluginBuiltins() { return m_bundlerPluginBuiltins; }
- ByteLengthQueuingStrategyBuiltinsWrapper& byteLengthQueuingStrategyBuiltins() { return m_byteLengthQueuingStrategyBuiltins; }
- WritableStreamInternalsBuiltinsWrapper& writableStreamInternalsBuiltins() { return m_writableStreamInternalsBuiltins; }
+ WritableStreamDefaultWriterBuiltinsWrapper& writableStreamDefaultWriterBuiltins() { return m_writableStreamDefaultWriterBuiltins; }
+ ConsoleObjectBuiltinsWrapper& consoleObjectBuiltins() { return m_consoleObjectBuiltins; }
TransformStreamInternalsBuiltinsWrapper& transformStreamInternalsBuiltins() { return m_transformStreamInternalsBuiltins; }
- ProcessObjectInternalsBuiltinsWrapper& processObjectInternalsBuiltins() { return m_processObjectInternalsBuiltins; }
- TransformStreamBuiltinsWrapper& transformStreamBuiltins() { return m_transformStreamBuiltins; }
+ ReadableStreamBYOBRequestBuiltinsWrapper& readableStreamBYOBRequestBuiltins() { return m_readableStreamBYOBRequestBuiltins; }
+ ReadableStreamBYOBReaderBuiltinsWrapper& readableStreamBYOBReaderBuiltins() { return m_readableStreamBYOBReaderBuiltins; }
+ WritableStreamDefaultControllerBuiltinsWrapper& writableStreamDefaultControllerBuiltins() { return m_writableStreamDefaultControllerBuiltins; }
ModuleBuiltinsWrapper& moduleBuiltins() { return m_moduleBuiltins; }
- JSBufferPrototypeBuiltinsWrapper& jsBufferPrototypeBuiltins() { return m_jsBufferPrototypeBuiltins; }
ReadableByteStreamControllerBuiltinsWrapper& readableByteStreamControllerBuiltins() { return m_readableByteStreamControllerBuiltins; }
- UtilInspectBuiltinsWrapper& utilInspectBuiltins() { return m_utilInspectBuiltins; }
- ConsoleObjectBuiltinsWrapper& consoleObjectBuiltins() { return m_consoleObjectBuiltins; }
- ReadableStreamInternalsBuiltinsWrapper& readableStreamInternalsBuiltins() { return m_readableStreamInternalsBuiltins; }
- TransformStreamDefaultControllerBuiltinsWrapper& transformStreamDefaultControllerBuiltins() { return m_transformStreamDefaultControllerBuiltins; }
- ReadableStreamBYOBReaderBuiltinsWrapper& readableStreamBYOBReaderBuiltins() { return m_readableStreamBYOBReaderBuiltins; }
- JSBufferConstructorBuiltinsWrapper& jsBufferConstructorBuiltins() { return m_jsBufferConstructorBuiltins; }
ReadableStreamDefaultReaderBuiltinsWrapper& readableStreamDefaultReaderBuiltins() { return m_readableStreamDefaultReaderBuiltins; }
- StreamInternalsBuiltinsWrapper& streamInternalsBuiltins() { return m_streamInternalsBuiltins; }
+ ByteLengthQueuingStrategyBuiltinsWrapper& byteLengthQueuingStrategyBuiltins() { return m_byteLengthQueuingStrategyBuiltins; }
+ JSBufferConstructorBuiltinsWrapper& jsBufferConstructorBuiltins() { return m_jsBufferConstructorBuiltins; }
ImportMetaObjectBuiltinsWrapper& importMetaObjectBuiltins() { return m_importMetaObjectBuiltins; }
- CountQueuingStrategyBuiltinsWrapper& countQueuingStrategyBuiltins() { return m_countQueuingStrategyBuiltins; }
- ReadableStreamBYOBRequestBuiltinsWrapper& readableStreamBYOBRequestBuiltins() { return m_readableStreamBYOBRequestBuiltins; }
- WritableStreamDefaultWriterBuiltinsWrapper& writableStreamDefaultWriterBuiltins() { return m_writableStreamDefaultWriterBuiltins; }
+ TransformStreamBuiltinsWrapper& transformStreamBuiltins() { return m_transformStreamBuiltins; }
+ ReadableStreamInternalsBuiltinsWrapper& readableStreamInternalsBuiltins() { return m_readableStreamInternalsBuiltins; }
+ ReadableByteStreamInternalsBuiltinsWrapper& readableByteStreamInternalsBuiltins() { return m_readableByteStreamInternalsBuiltins; }
+ UtilInspectBuiltinsWrapper& utilInspectBuiltins() { return m_utilInspectBuiltins; }
+ JSBufferPrototypeBuiltinsWrapper& jsBufferPrototypeBuiltins() { return m_jsBufferPrototypeBuiltins; }
ReadableStreamBuiltinsWrapper& readableStreamBuiltins() { return m_readableStreamBuiltins; }
+ BundlerPluginBuiltinsWrapper& bundlerPluginBuiltins() { return m_bundlerPluginBuiltins; }
+ StreamInternalsBuiltinsWrapper& streamInternalsBuiltins() { return m_streamInternalsBuiltins; }
+ TransformStreamDefaultControllerBuiltinsWrapper& transformStreamDefaultControllerBuiltins() { return m_transformStreamDefaultControllerBuiltins; }
+ WritableStreamInternalsBuiltinsWrapper& writableStreamInternalsBuiltins() { return m_writableStreamInternalsBuiltins; }
ReadableStreamDefaultControllerBuiltinsWrapper& readableStreamDefaultControllerBuiltins() { return m_readableStreamDefaultControllerBuiltins; }
- ReadableByteStreamInternalsBuiltinsWrapper& readableByteStreamInternalsBuiltins() { return m_readableByteStreamInternalsBuiltins; }
- WritableStreamDefaultControllerBuiltinsWrapper& writableStreamDefaultControllerBuiltins() { return m_writableStreamDefaultControllerBuiltins; }
+ CountQueuingStrategyBuiltinsWrapper& countQueuingStrategyBuiltins() { return m_countQueuingStrategyBuiltins; }
EventSourceBuiltinsWrapper& eventSourceBuiltins() { return m_eventSourceBuiltins; }
+ ProcessObjectInternalsBuiltinsWrapper& processObjectInternalsBuiltins() { return m_processObjectInternalsBuiltins; }
private:
JSC::VM& m_vm;
- BundlerPluginBuiltinsWrapper m_bundlerPluginBuiltins;
- ByteLengthQueuingStrategyBuiltinsWrapper m_byteLengthQueuingStrategyBuiltins;
- WritableStreamInternalsBuiltinsWrapper m_writableStreamInternalsBuiltins;
+ WritableStreamDefaultWriterBuiltinsWrapper m_writableStreamDefaultWriterBuiltins;
+ ConsoleObjectBuiltinsWrapper m_consoleObjectBuiltins;
TransformStreamInternalsBuiltinsWrapper m_transformStreamInternalsBuiltins;
- ProcessObjectInternalsBuiltinsWrapper m_processObjectInternalsBuiltins;
- TransformStreamBuiltinsWrapper m_transformStreamBuiltins;
+ ReadableStreamBYOBRequestBuiltinsWrapper m_readableStreamBYOBRequestBuiltins;
+ ReadableStreamBYOBReaderBuiltinsWrapper m_readableStreamBYOBReaderBuiltins;
+ WritableStreamDefaultControllerBuiltinsWrapper m_writableStreamDefaultControllerBuiltins;
ModuleBuiltinsWrapper m_moduleBuiltins;
- JSBufferPrototypeBuiltinsWrapper m_jsBufferPrototypeBuiltins;
ReadableByteStreamControllerBuiltinsWrapper m_readableByteStreamControllerBuiltins;
- UtilInspectBuiltinsWrapper m_utilInspectBuiltins;
- ConsoleObjectBuiltinsWrapper m_consoleObjectBuiltins;
- ReadableStreamInternalsBuiltinsWrapper m_readableStreamInternalsBuiltins;
- TransformStreamDefaultControllerBuiltinsWrapper m_transformStreamDefaultControllerBuiltins;
- ReadableStreamBYOBReaderBuiltinsWrapper m_readableStreamBYOBReaderBuiltins;
- JSBufferConstructorBuiltinsWrapper m_jsBufferConstructorBuiltins;
ReadableStreamDefaultReaderBuiltinsWrapper m_readableStreamDefaultReaderBuiltins;
- StreamInternalsBuiltinsWrapper m_streamInternalsBuiltins;
+ ByteLengthQueuingStrategyBuiltinsWrapper m_byteLengthQueuingStrategyBuiltins;
+ JSBufferConstructorBuiltinsWrapper m_jsBufferConstructorBuiltins;
ImportMetaObjectBuiltinsWrapper m_importMetaObjectBuiltins;
- CountQueuingStrategyBuiltinsWrapper m_countQueuingStrategyBuiltins;
- ReadableStreamBYOBRequestBuiltinsWrapper m_readableStreamBYOBRequestBuiltins;
- WritableStreamDefaultWriterBuiltinsWrapper m_writableStreamDefaultWriterBuiltins;
+ TransformStreamBuiltinsWrapper m_transformStreamBuiltins;
+ ReadableStreamInternalsBuiltinsWrapper m_readableStreamInternalsBuiltins;
+ ReadableByteStreamInternalsBuiltinsWrapper m_readableByteStreamInternalsBuiltins;
+ UtilInspectBuiltinsWrapper m_utilInspectBuiltins;
+ JSBufferPrototypeBuiltinsWrapper m_jsBufferPrototypeBuiltins;
ReadableStreamBuiltinsWrapper m_readableStreamBuiltins;
+ BundlerPluginBuiltinsWrapper m_bundlerPluginBuiltins;
+ StreamInternalsBuiltinsWrapper m_streamInternalsBuiltins;
+ TransformStreamDefaultControllerBuiltinsWrapper m_transformStreamDefaultControllerBuiltins;
+ WritableStreamInternalsBuiltinsWrapper m_writableStreamInternalsBuiltins;
ReadableStreamDefaultControllerBuiltinsWrapper m_readableStreamDefaultControllerBuiltins;
- ReadableByteStreamInternalsBuiltinsWrapper m_readableByteStreamInternalsBuiltins;
- WritableStreamDefaultControllerBuiltinsWrapper m_writableStreamDefaultControllerBuiltins;
+ CountQueuingStrategyBuiltinsWrapper m_countQueuingStrategyBuiltins;
EventSourceBuiltinsWrapper m_eventSourceBuiltins;
+ ProcessObjectInternalsBuiltinsWrapper m_processObjectInternalsBuiltins;
;
};
@@ -5791,19 +5791,19 @@ public:
template<typename Visitor> void visit(Visitor&);
void initialize(Zig::GlobalObject&);
- WritableStreamInternalsBuiltinFunctions& writableStreamInternals() { return m_writableStreamInternals; }
TransformStreamInternalsBuiltinFunctions& transformStreamInternals() { return m_transformStreamInternals; }
ReadableStreamInternalsBuiltinFunctions& readableStreamInternals() { return m_readableStreamInternals; }
- StreamInternalsBuiltinFunctions& streamInternals() { return m_streamInternals; }
ReadableByteStreamInternalsBuiltinFunctions& readableByteStreamInternals() { return m_readableByteStreamInternals; }
+ StreamInternalsBuiltinFunctions& streamInternals() { return m_streamInternals; }
+ WritableStreamInternalsBuiltinFunctions& writableStreamInternals() { return m_writableStreamInternals; }
private:
JSC::VM& m_vm;
- WritableStreamInternalsBuiltinFunctions m_writableStreamInternals;
TransformStreamInternalsBuiltinFunctions m_transformStreamInternals;
ReadableStreamInternalsBuiltinFunctions m_readableStreamInternals;
- StreamInternalsBuiltinFunctions m_streamInternals;
ReadableByteStreamInternalsBuiltinFunctions m_readableByteStreamInternals;
+ StreamInternalsBuiltinFunctions m_streamInternals;
+ WritableStreamInternalsBuiltinFunctions m_writableStreamInternals;
};
diff --git a/test/js/third_party/got/got.test.ts b/test/js/third_party/got/got.test.ts
new file mode 100644
index 000000000..ea2f8e692
--- /dev/null
+++ b/test/js/third_party/got/got.test.ts
@@ -0,0 +1,56 @@
+import { test, expect, describe } from "bun:test";
+import got from "got";
+import { Readable } from "stream";
+
+describe("got", () => {
+ test("should work", async () => {
+ const server = Bun.serve({
+ port: 0,
+ fetch(request, server) {
+ return new Response("Hello World!");
+ },
+ });
+
+ const response = await got(`http://${server.hostname}:${server.port}/`);
+ expect(response.statusCode).toBe(200);
+ expect(response.body).toBe("Hello World!");
+ expect(response.headers["content-length"]).toBe("12");
+ expect(response.url).toBe(`http://${server.hostname}:${server.port}/`);
+
+ server.stop();
+ });
+
+ test("json response", async () => {
+ const server = Bun.serve({
+ port: 0,
+ async fetch(request, server) {
+ expect(request.method).toBe("POST");
+ const data = await request.json();
+ expect(data).toEqual({ hello: "world" });
+
+ return new Response("Hello world");
+ },
+ });
+
+ const stream = await got.post(`http://${server.hostname}:${server.port}/`, { json: { hello: "world" } });
+ expect(stream.body).toBe("Hello world");
+
+ server.stop();
+ });
+ // test("https plain", async () => {
+ // const stream = await got("https://bun.sh/", {
+ // headers: {
+ // "Accept-Encoding": "identity",
+ // },
+ // });
+ // expect(stream.statusCode).toBe(200);
+ // });
+ test("https gzip", async () => {
+ const stream = await got("https://bun.sh/", {
+ headers: {
+ "Accept-Encoding": "gzip",
+ },
+ });
+ expect(stream.statusCode).toBe(200);
+ });
+});