diff options
author | 2023-07-10 18:25:20 -0700 | |
---|---|---|
committer | 2023-07-10 18:25:20 -0700 | |
commit | b2c576bba2c3274eac32cd0a70318339c3683425 (patch) | |
tree | 8c5c41b25a424cf1f05b248a25a37fda0ce7eaf8 | |
parent | 4af4b508a1027ee837f69d4fed5a246629714398 (diff) | |
download | bun-b2c576bba2c3274eac32cd0a70318339c3683425.tar.gz bun-b2c576bba2c3274eac32cd0a70318339c3683425.tar.zst bun-b2c576bba2c3274eac32cd0a70318339c3683425.zip |
fix "readable" event being emitted incorrectly (#3475)
* fix "readable" event being emitted incorrectly
* fix impl and add test
* changes
* asdfghj
* esm
-rw-r--r-- | src/bun.js/bindings/JSReadableHelper.h | 1 | ||||
-rw-r--r-- | src/js/node/stream.js | 12 | ||||
-rw-r--r-- | src/js/out/WebCoreJSBuiltins.cpp | 300 | ||||
-rw-r--r-- | src/js/out/modules/node/stream.js | 4 | ||||
-rw-r--r-- | test/js/node/fs/fs.test.ts | 23 |
5 files changed, 182 insertions, 158 deletions
diff --git a/src/bun.js/bindings/JSReadableHelper.h b/src/bun.js/bindings/JSReadableHelper.h index 6746bcbec..3e2554c2b 100644 --- a/src/bun.js/bindings/JSReadableHelper.h +++ b/src/bun.js/bindings/JSReadableHelper.h @@ -8,7 +8,6 @@ JSC_DECLARE_HOST_FUNCTION(jsReadable_maybeReadMore); JSC_DECLARE_HOST_FUNCTION(jsReadable_resume); JSC_DECLARE_HOST_FUNCTION(jsReadable_emitReadable); JSC_DECLARE_HOST_FUNCTION(jsReadable_onEofChunk); -JSC_DECLARE_HOST_FUNCTION(jsReadable_resume_); JSC_DECLARE_HOST_FUNCTION(jsReadable_emitReadable_); } // namespace WebCore diff --git a/src/js/node/stream.js b/src/js/node/stream.js index 741b2f65c..30c76d797 100644 --- a/src/js/node/stream.js +++ b/src/js/node/stream.js @@ -5356,10 +5356,10 @@ function createNativeStreamReadable(nativeType, Readable) { return chunk; } - push(result, encoding) { - __DEBUG__ && debug("NativeReadable push -- result, encoding", result, encoding, this.__id); - return super.push(...arguments); - } + // push(result, encoding) { + // __DEBUG__ && debug("NativeReadable push -- result, encoding", result, encoding, this.__id); + // return super.push(...arguments); + // } #handleResult(result, view, isClosed) { __DEBUG__ && debug("result, isClosed @ #handleResult", result, isClosed, this.__id); @@ -5372,7 +5372,9 @@ function createNativeStreamReadable(nativeType, Readable) { return handleNumberResult(this, result, view, isClosed); } else if (typeof result === "boolean") { - this.push(null); + process.nextTick(() => { + this.push(null); + }); return view?.byteLength ?? 0 > 0 ? view : undefined; } else if (ArrayBuffer.isView(result)) { if (result.byteLength >= this.#highWaterMark && !this.#hasResized && !isClosed) { diff --git a/src/js/out/WebCoreJSBuiltins.cpp b/src/js/out/WebCoreJSBuiltins.cpp index f20f626d4..fb3100762 100644 --- a/src/js/out/WebCoreJSBuiltins.cpp +++ b/src/js/out/WebCoreJSBuiltins.cpp @@ -16,7 +16,7 @@ const JSC::ConstructorKind s_bundlerPluginRunSetupFunctionCodeConstructorKind = const JSC::ImplementationVisibility s_bundlerPluginRunSetupFunctionCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_bundlerPluginRunSetupFunctionCodeLength = 2165; static const JSC::Intrinsic s_bundlerPluginRunSetupFunctionCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_bundlerPluginRunSetupFunctionCode = "(function (J,_){\"use strict\";var D=new Map,F=new Map;function H(q,h,E){if(!q||!@isObject(q))@throwTypeError('Expected an object with \"filter\" RegExp');if(!h||!@isCallable(h))@throwTypeError(\"callback must be a function\");var{filter:w,namespace:z=\"file\"}=q;if(!w)@throwTypeError('Expected an object with \"filter\" RegExp');if(!@isRegExpObject(w))@throwTypeError(\"filter must be a RegExp\");if(z&&typeof z!==\"string\")@throwTypeError(\"namespace must be a string\");if((z\?.length\?\?0)===0)z=\"file\";if(!/^([/@a-zA-Z0-9_\\\\-]+)$/.test(z))@throwTypeError(\"namespace can only contain $a-zA-Z0-9_\\\\-\");var A=E.@get(z);if(!A)E.@set(z,[[w,h]]);else @arrayPush(A,[w,h])}function K(q,h){H(q,h,D)}function M(q,h){H(q,h,F)}const I=()=>{var q=!1,h=!1;for(var[E,w]of D.entries())for(var[z]of w)this.addFilter(z,E,1),q=!0;for(var[E,w]of F.entries())for(var[z]of w)this.addFilter(z,E,0),h=!0;if(h){var A=this.onResolve;if(!A)this.onResolve=F;else for(var[E,w]of F.entries()){var C=A.@get(E);if(!C)A.@set(E,w);else A.@set(E,C.concat(w))}}if(q){var G=this.onLoad;if(!G)this.onLoad=D;else for(var[E,w]of D.entries()){var C=G.@get(E);if(!C)G.@set(E,w);else G.@set(E,C.concat(w))}}return q||h};var B=J({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:K,onResolve:M,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:{..._,bundle:!0,entryPoints:_.entrypoints\?\?_.entryPoints\?\?[],minify:typeof _.minify===\"boolean\"\?_.minify:!1,minifyIdentifiers:_.minify===!0||_.minify\?.identifiers,minifyWhitespace:_.minify===!0||_.minify\?.whitespace,minifySyntax:_.minify===!0||_.minify\?.syntax,outbase:_.root,platform:_.target===\"bun\"\?\"node\":_.target},esbuild:{}});if(B&&@isPromise(B))if(@getPromiseInternalField(B,@promiseFieldFlags)&@promiseStateFulfilled)B=@getPromiseInternalField(B,@promiseFieldReactionsOrResult);else return B.@then(I);return I()})\n"; +const char* const s_bundlerPluginRunSetupFunctionCode = "(function (_,E){\"use strict\";var w=new Map,h=new Map;function q(D,F,G){if(!D||!@isObject(D))@throwTypeError('Expected an object with \"filter\" RegExp');if(!F||!@isCallable(F))@throwTypeError(\"callback must be a function\");var{filter:H,namespace:I=\"file\"}=D;if(!H)@throwTypeError('Expected an object with \"filter\" RegExp');if(!@isRegExpObject(H))@throwTypeError(\"filter must be a RegExp\");if(I&&typeof I!==\"string\")@throwTypeError(\"namespace must be a string\");if((I\?.length\?\?0)===0)I=\"file\";if(!/^([/@a-zA-Z0-9_\\\\-]+)$/.test(I))@throwTypeError(\"namespace can only contain $a-zA-Z0-9_\\\\-\");var J=G.@get(I);if(!J)G.@set(I,[[H,F]]);else @arrayPush(J,[H,F])}function z(D,F){q(D,F,w)}function A(D,F){q(D,F,h)}const B=()=>{var D=!1,F=!1;for(var[G,H]of w.entries())for(var[I]of H)this.addFilter(I,G,1),D=!0;for(var[G,H]of h.entries())for(var[I]of H)this.addFilter(I,G,0),F=!0;if(F){var J=this.onResolve;if(!J)this.onResolve=h;else for(var[G,H]of h.entries()){var K=J.@get(G);if(!K)J.@set(G,H);else J.@set(G,K.concat(H))}}if(D){var M=this.onLoad;if(!M)this.onLoad=w;else for(var[G,H]of w.entries()){var K=M.@get(G);if(!K)M.@set(G,H);else M.@set(G,K.concat(H))}}return D||F};var C=_({config:E,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:z,onResolve:A,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:{...E,bundle:!0,entryPoints:E.entrypoints\?\?E.entryPoints\?\?[],minify:typeof E.minify===\"boolean\"\?E.minify:!1,minifyIdentifiers:E.minify===!0||E.minify\?.identifiers,minifyWhitespace:E.minify===!0||E.minify\?.whitespace,minifySyntax:E.minify===!0||E.minify\?.syntax,outbase:E.root,platform:E.target===\"bun\"\?\"node\":E.target},esbuild:{}});if(C&&@isPromise(C))if(@getPromiseInternalField(C,@promiseFieldFlags)&@promiseStateFulfilled)C=@getPromiseInternalField(C,@promiseFieldReactionsOrResult);else return C.@then(B);return B()})\n"; // runOnResolvePlugins const JSC::ConstructAbility s_bundlerPluginRunOnResolvePluginsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -24,7 +24,7 @@ const JSC::ConstructorKind s_bundlerPluginRunOnResolvePluginsCodeConstructorKind const JSC::ImplementationVisibility s_bundlerPluginRunOnResolvePluginsCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_bundlerPluginRunOnResolvePluginsCodeLength = 1711; static const JSC::Intrinsic s_bundlerPluginRunOnResolvePluginsCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_bundlerPluginRunOnResolvePluginsCode = "(function (C,E,F,b,G){\"use strict\";const H=[\"entry-point\",\"import-statement\",\"require-call\",\"dynamic-import\",\"require-resolve\",\"import-rule\",\"url-token\",\"internal\"][G];var g=(async(j,q,J,K)=>{var{onResolve:M,onLoad:A}=this,B=M.@get(q);if(!B)return this.onResolveAsync(b,null,null,null),null;for(let[O,Q]of B)if(O.test(j)){var _=Q({path:j,importer:J,namespace:q,kind:K});while(_&&@isPromise(_)&&(@getPromiseInternalField(_,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)_=@getPromiseInternalField(_,@promiseFieldReactionsOrResult);if(_&&@isPromise(_))_=await _;if(!_||!@isObject(_))continue;var{path:y,namespace:w=q,external:z}=_;if(typeof y!==\"string\"||typeof w!==\"string\")@throwTypeError(\"onResolve plugins must return an object with a string 'path' and string 'loader' field\");if(!y)continue;if(!w)w=q;if(typeof z!==\"boolean\"&&!@isUndefinedOrNull(z))@throwTypeError('onResolve plugins \"external\" field must be boolean or unspecified');if(!z){if(w===\"file\"){if(darwin!==\"win32\"){if(y[0]!==\"/\"||y.includes(\"..\"))@throwTypeError('onResolve plugin \"path\" must be absolute when the namespace is \"file\"')}}if(w===\"dataurl\"){if(!y.startsWith(\"data:\"))@throwTypeError('onResolve plugin \"path\" must start with \"data:\" when the namespace is \"dataurl\"')}if(w&&w!==\"file\"&&(!A||!A.@has(w)))@throwTypeError(`Expected onLoad plugin for namespace ${w} to exist`)}return this.onResolveAsync(b,y,w,z),null}return this.onResolveAsync(b,null,null,null),null})(C,E,F,H);while(g&&@isPromise(g)&&(@getPromiseInternalField(g,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)g=@getPromiseInternalField(g,@promiseFieldReactionsOrResult);if(g&&@isPromise(g))g.then(()=>{},(j)=>{this.addError(b,j,0)})})\n"; +const char* const s_bundlerPluginRunOnResolvePluginsCode = "(function (_,w,g,y,b){\"use strict\";const j=[\"entry-point\",\"import-statement\",\"require-call\",\"dynamic-import\",\"require-resolve\",\"import-rule\",\"url-token\",\"internal\"][b];var q=(async(z,A,B,C)=>{var{onResolve:E,onLoad:F}=this,G=E.@get(A);if(!G)return this.onResolveAsync(y,null,null,null),null;for(let[O,Q]of G)if(O.test(z)){var H=Q({path:z,importer:B,namespace:A,kind:C});while(H&&@isPromise(H)&&(@getPromiseInternalField(H,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)H=@getPromiseInternalField(H,@promiseFieldReactionsOrResult);if(H&&@isPromise(H))H=await H;if(!H||!@isObject(H))continue;var{path:J,namespace:K=A,external:M}=H;if(typeof J!==\"string\"||typeof K!==\"string\")@throwTypeError(\"onResolve plugins must return an object with a string 'path' and string 'loader' field\");if(!J)continue;if(!K)K=A;if(typeof M!==\"boolean\"&&!@isUndefinedOrNull(M))@throwTypeError('onResolve plugins \"external\" field must be boolean or unspecified');if(!M){if(K===\"file\"){if(darwin!==\"win32\"){if(J[0]!==\"/\"||J.includes(\"..\"))@throwTypeError('onResolve plugin \"path\" must be absolute when the namespace is \"file\"')}}if(K===\"dataurl\"){if(!J.startsWith(\"data:\"))@throwTypeError('onResolve plugin \"path\" must start with \"data:\" when the namespace is \"dataurl\"')}if(K&&K!==\"file\"&&(!F||!F.@has(K)))@throwTypeError(`Expected onLoad plugin for namespace ${K} to exist`)}return this.onResolveAsync(y,J,K,M),null}return this.onResolveAsync(y,null,null,null),null})(_,w,g,j);while(q&&@isPromise(q)&&(@getPromiseInternalField(q,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)q=@getPromiseInternalField(q,@promiseFieldReactionsOrResult);if(q&&@isPromise(q))q.then(()=>{},(z)=>{this.addError(y,z,0)})})\n"; // runOnLoadPlugins const JSC::ConstructAbility s_bundlerPluginRunOnLoadPluginsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -32,7 +32,7 @@ const JSC::ConstructorKind s_bundlerPluginRunOnLoadPluginsCodeConstructorKind = const JSC::ImplementationVisibility s_bundlerPluginRunOnLoadPluginsCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_bundlerPluginRunOnLoadPluginsCodeLength = 1325; static const JSC::Intrinsic s_bundlerPluginRunOnLoadPluginsCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_bundlerPluginRunOnLoadPluginsCode = "(function (w,F,G,H){\"use strict\";const J={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},K=[\"jsx\",\"js\",\"ts\",\"tsx\",\"css\",\"file\",\"json\",\"toml\",\"wasm\",\"napi\",\"base64\",\"dataurl\",\"text\"][H];var g=(async(j,x,y,z)=>{var B=this.onLoad.@get(y);if(!B)return this.onLoadAsync(j,null,null),null;for(let[Q,T]of B)if(Q.test(x)){var b=T({path:x,namespace:y,loader:z});while(b&&@isPromise(b)&&(@getPromiseInternalField(b,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)b=@getPromiseInternalField(b,@promiseFieldReactionsOrResult);if(b&&@isPromise(b))b=await b;if(!b||!@isObject(b))continue;var{contents:q,loader:v=z}=b;if(typeof q!==\"string\"&&!@isTypedArrayView(q))@throwTypeError('onLoad plugins must return an object with \"contents\" as a string or Uint8Array');if(typeof v!==\"string\")@throwTypeError('onLoad plugins must return an object with \"loader\" as a string');const C=J[v];if(C===@undefined)@throwTypeError(`Loader ${v} is not supported.`);return this.onLoadAsync(j,q,C),null}return this.onLoadAsync(j,null,null),null})(w,F,G,K);while(g&&@isPromise(g)&&(@getPromiseInternalField(g,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)g=@getPromiseInternalField(g,@promiseFieldReactionsOrResult);if(g&&@isPromise(g))g.then(()=>{},(j)=>{this.addError(w,j,1)})})\n"; +const char* const s_bundlerPluginRunOnLoadPluginsCode = "(function (b,g,j,q){\"use strict\";const v={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},w=[\"jsx\",\"js\",\"ts\",\"tsx\",\"css\",\"file\",\"json\",\"toml\",\"wasm\",\"napi\",\"base64\",\"dataurl\",\"text\"][q];var x=(async(y,z,B,C)=>{var F=this.onLoad.@get(B);if(!F)return this.onLoadAsync(y,null,null),null;for(let[K,Q]of F)if(K.test(z)){var G=Q({path:z,namespace:B,loader:C});while(G&&@isPromise(G)&&(@getPromiseInternalField(G,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)G=@getPromiseInternalField(G,@promiseFieldReactionsOrResult);if(G&&@isPromise(G))G=await G;if(!G||!@isObject(G))continue;var{contents:H,loader:J=C}=G;if(typeof H!==\"string\"&&!@isTypedArrayView(H))@throwTypeError('onLoad plugins must return an object with \"contents\" as a string or Uint8Array');if(typeof J!==\"string\")@throwTypeError('onLoad plugins must return an object with \"loader\" as a string');const T=v[J];if(T===@undefined)@throwTypeError(`Loader ${J} is not supported.`);return this.onLoadAsync(y,H,T),null}return this.onLoadAsync(y,null,null),null})(b,g,j,w);while(x&&@isPromise(x)&&(@getPromiseInternalField(x,@promiseFieldFlags)&@promiseStateMask)===@promiseStateFulfilled)x=@getPromiseInternalField(x,@promiseFieldReactionsOrResult);if(x&&@isPromise(x))x.then(()=>{},(y)=>{this.addError(b,y,1)})})\n"; #define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \ @@ -108,7 +108,7 @@ const JSC::ConstructorKind s_writableStreamInternalsCreateWritableStreamCodeCons const JSC::ImplementationVisibility s_writableStreamInternalsCreateWritableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsCreateWritableStreamCodeLength = 278; static const JSC::Intrinsic s_writableStreamInternalsCreateWritableStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsCreateWritableStreamCode = "(function (p,N,_,f,u,j){\"use strict\";@assert(typeof u===\"number\"&&!@isNaN(u)&&u>=0);const d={};@initializeWritableStreamSlots(d,{});const q=new @WritableStreamDefaultController;return @setUpWritableStreamDefaultController(d,q,p,N,_,f,u,j),@createWritableStreamFromInternal(d)})\n"; +const char* const s_writableStreamInternalsCreateWritableStreamCode = "(function (u,N,d,f,p,_){\"use strict\";@assert(typeof p===\"number\"&&!@isNaN(p)&&p>=0);const j={};@initializeWritableStreamSlots(j,{});const q=new @WritableStreamDefaultController;return @setUpWritableStreamDefaultController(j,q,u,N,d,f,p,_),@createWritableStreamFromInternal(j)})\n"; // createInternalWritableStreamFromUnderlyingSink const JSC::ConstructAbility s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -116,7 +116,7 @@ const JSC::ConstructorKind s_writableStreamInternalsCreateInternalWritableStream const JSC::ImplementationVisibility s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeLength = 920; static const JSC::Intrinsic s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCode = "(function (f,w){\"use strict\";const C={};if(f===@undefined)f={};if(w===@undefined)w={};if(!@isObject(f))@throwTypeError(\"WritableStream constructor takes an object as first argument\");if(\"type\"in f)@throwRangeError(\"Invalid type is specified\");const E=@extractSizeAlgorithm(w),_=@extractHighWaterMark(w,1),o={};if(\"start\"in f){if(o.start=f.start,typeof o.start!==\"function\")@throwTypeError(\"underlyingSink.start should be a function\")}if(\"write\"in f){if(o.write=f.write,typeof o.write!==\"function\")@throwTypeError(\"underlyingSink.write should be a function\")}if(\"close\"in f){if(o.close=f.close,typeof o.close!==\"function\")@throwTypeError(\"underlyingSink.close should be a function\")}if(\"abort\"in f){if(o.abort=f.abort,typeof o.abort!==\"function\")@throwTypeError(\"underlyingSink.abort should be a function\")}return @initializeWritableStreamSlots(C,f),@setUpWritableStreamDefaultControllerFromUnderlyingSink(C,f,o,_,E),C})\n"; +const char* const s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCode = "(function (f,o){\"use strict\";const w={};if(f===@undefined)f={};if(o===@undefined)o={};if(!@isObject(f))@throwTypeError(\"WritableStream constructor takes an object as first argument\");if(\"type\"in f)@throwRangeError(\"Invalid type is specified\");const C=@extractSizeAlgorithm(o),E=@extractHighWaterMark(o,1),_={};if(\"start\"in f){if(_.start=f.start,typeof _.start!==\"function\")@throwTypeError(\"underlyingSink.start should be a function\")}if(\"write\"in f){if(_.write=f.write,typeof _.write!==\"function\")@throwTypeError(\"underlyingSink.write should be a function\")}if(\"close\"in f){if(_.close=f.close,typeof _.close!==\"function\")@throwTypeError(\"underlyingSink.close should be a function\")}if(\"abort\"in f){if(_.abort=f.abort,typeof _.abort!==\"function\")@throwTypeError(\"underlyingSink.abort should be a function\")}return @initializeWritableStreamSlots(w,f),@setUpWritableStreamDefaultControllerFromUnderlyingSink(w,f,_,E,C),w})\n"; // initializeWritableStreamSlots const JSC::ConstructAbility s_writableStreamInternalsInitializeWritableStreamSlotsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -156,7 +156,7 @@ const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultWr const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeLength = 887; static const JSC::Intrinsic s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsSetUpWritableStreamDefaultWriterCode = "(function (g,n){\"use strict\";if(@isWritableStreamLocked(n))@throwTypeError(\"WritableStream is locked\");@putByIdDirectPrivate(g,\"stream\",n),@putByIdDirectPrivate(n,\"writer\",g);const v=@newPromiseCapability(@Promise),h=@newPromiseCapability(@Promise);@putByIdDirectPrivate(g,\"readyPromise\",v),@putByIdDirectPrivate(g,\"closedPromise\",h);const B=@getByIdDirectPrivate(n,\"state\");if(B===\"writable\"){if(@writableStreamCloseQueuedOrInFlight(n)||!@getByIdDirectPrivate(n,\"backpressure\"))v.@resolve.@call()}else if(B===\"erroring\")v.@reject.@call(@undefined,@getByIdDirectPrivate(n,\"storedError\")),@markPromiseAsHandled(v.@promise);else if(B===\"closed\")v.@resolve.@call(),h.@resolve.@call();else{@assert(B===\"errored\");const _=@getByIdDirectPrivate(n,\"storedError\");v.@reject.@call(@undefined,_),@markPromiseAsHandled(v.@promise),h.@reject.@call(@undefined,_),@markPromiseAsHandled(h.@promise)}})\n"; +const char* const s_writableStreamInternalsSetUpWritableStreamDefaultWriterCode = "(function (n,v){\"use strict\";if(@isWritableStreamLocked(v))@throwTypeError(\"WritableStream is locked\");@putByIdDirectPrivate(n,\"stream\",v),@putByIdDirectPrivate(v,\"writer\",n);const g=@newPromiseCapability(@Promise),h=@newPromiseCapability(@Promise);@putByIdDirectPrivate(n,\"readyPromise\",g),@putByIdDirectPrivate(n,\"closedPromise\",h);const B=@getByIdDirectPrivate(v,\"state\");if(B===\"writable\"){if(@writableStreamCloseQueuedOrInFlight(v)||!@getByIdDirectPrivate(v,\"backpressure\"))g.@resolve.@call()}else if(B===\"erroring\")g.@reject.@call(@undefined,@getByIdDirectPrivate(v,\"storedError\")),@markPromiseAsHandled(g.@promise);else if(B===\"closed\")g.@resolve.@call(),h.@resolve.@call();else{@assert(B===\"errored\");const _=@getByIdDirectPrivate(v,\"storedError\");g.@reject.@call(@undefined,_),@markPromiseAsHandled(g.@promise),h.@reject.@call(@undefined,_),@markPromiseAsHandled(h.@promise)}})\n"; // writableStreamAbort const JSC::ConstructAbility s_writableStreamInternalsWritableStreamAbortCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -164,7 +164,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamAbortCodeConst const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamAbortCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamAbortCodeLength = 501; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamAbortCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamAbortCode = "(function (h,B){\"use strict\";const c=@getByIdDirectPrivate(h,\"state\");if(c===\"closed\"||c===\"errored\")return @Promise.@resolve();const f=@getByIdDirectPrivate(h,\"pendingAbortRequest\");if(f!==@undefined)return f.promise.@promise;@assert(c===\"writable\"||c===\"erroring\");let _=!1;if(c===\"erroring\")_=!0,B=@undefined;const j=@newPromiseCapability(@Promise);if(@putByIdDirectPrivate(h,\"pendingAbortRequest\",{promise:j,reason:B,wasAlreadyErroring:_}),!_)@writableStreamStartErroring(h,B);return j.@promise})\n"; +const char* const s_writableStreamInternalsWritableStreamAbortCode = "(function (c,h){\"use strict\";const B=@getByIdDirectPrivate(c,\"state\");if(B===\"closed\"||B===\"errored\")return @Promise.@resolve();const f=@getByIdDirectPrivate(c,\"pendingAbortRequest\");if(f!==@undefined)return f.promise.@promise;@assert(B===\"writable\"||B===\"erroring\");let _=!1;if(B===\"erroring\")_=!0,h=@undefined;const j=@newPromiseCapability(@Promise);if(@putByIdDirectPrivate(c,\"pendingAbortRequest\",{promise:j,reason:h,wasAlreadyErroring:_}),!_)@writableStreamStartErroring(c,h);return j.@promise})\n"; // writableStreamClose const JSC::ConstructAbility s_writableStreamInternalsWritableStreamCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -196,7 +196,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDealWithReject const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDealWithRejectionCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDealWithRejectionCodeLength = 189; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDealWithRejectionCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDealWithRejectionCode = "(function (i,c){\"use strict\";const n=@getByIdDirectPrivate(i,\"state\");if(n===\"writable\"){@writableStreamStartErroring(i,c);return}@assert(n===\"erroring\"),@writableStreamFinishErroring(i)})\n"; +const char* const s_writableStreamInternalsWritableStreamDealWithRejectionCode = "(function (i,n){\"use strict\";const c=@getByIdDirectPrivate(i,\"state\");if(c===\"writable\"){@writableStreamStartErroring(i,n);return}@assert(c===\"erroring\"),@writableStreamFinishErroring(i)})\n"; // writableStreamFinishErroring const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishErroringCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -204,7 +204,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishErroring const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishErroringCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamFinishErroringCodeLength = 1058; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishErroringCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamFinishErroringCode = "(function (i){\"use strict\";@assert(@getByIdDirectPrivate(i,\"state\")===\"erroring\"),@assert(!@writableStreamHasOperationMarkedInFlight(i)),@putByIdDirectPrivate(i,\"state\",\"errored\");const h=@getByIdDirectPrivate(i,\"controller\");@getByIdDirectPrivate(h,\"errorSteps\").@call();const A=@getByIdDirectPrivate(i,\"storedError\"),B=@getByIdDirectPrivate(i,\"writeRequests\");for(var p=B.shift();p;p=B.shift())p.@reject.@call(@undefined,A);@putByIdDirectPrivate(i,\"writeRequests\",@createFIFO());const _=@getByIdDirectPrivate(i,\"pendingAbortRequest\");if(_===@undefined){@writableStreamRejectCloseAndClosedPromiseIfNeeded(i);return}if(@putByIdDirectPrivate(i,\"pendingAbortRequest\",@undefined),_.wasAlreadyErroring){_.promise.@reject.@call(@undefined,A),@writableStreamRejectCloseAndClosedPromiseIfNeeded(i);return}@getByIdDirectPrivate(h,\"abortSteps\").@call(@undefined,_.reason).@then(()=>{_.promise.@resolve.@call(),@writableStreamRejectCloseAndClosedPromiseIfNeeded(i)},(I)=>{_.promise.@reject.@call(@undefined,I),@writableStreamRejectCloseAndClosedPromiseIfNeeded(i)})})\n"; +const char* const s_writableStreamInternalsWritableStreamFinishErroringCode = "(function (i){\"use strict\";@assert(@getByIdDirectPrivate(i,\"state\")===\"erroring\"),@assert(!@writableStreamHasOperationMarkedInFlight(i)),@putByIdDirectPrivate(i,\"state\",\"errored\");const _=@getByIdDirectPrivate(i,\"controller\");@getByIdDirectPrivate(_,\"errorSteps\").@call();const p=@getByIdDirectPrivate(i,\"storedError\"),h=@getByIdDirectPrivate(i,\"writeRequests\");for(var A=h.shift();A;A=h.shift())A.@reject.@call(@undefined,p);@putByIdDirectPrivate(i,\"writeRequests\",@createFIFO());const B=@getByIdDirectPrivate(i,\"pendingAbortRequest\");if(B===@undefined){@writableStreamRejectCloseAndClosedPromiseIfNeeded(i);return}if(@putByIdDirectPrivate(i,\"pendingAbortRequest\",@undefined),B.wasAlreadyErroring){B.promise.@reject.@call(@undefined,p),@writableStreamRejectCloseAndClosedPromiseIfNeeded(i);return}@getByIdDirectPrivate(_,\"abortSteps\").@call(@undefined,B.reason).@then(()=>{B.promise.@resolve.@call(),@writableStreamRejectCloseAndClosedPromiseIfNeeded(i)},(I)=>{B.promise.@reject.@call(@undefined,I),@writableStreamRejectCloseAndClosedPromiseIfNeeded(i)})})\n"; // writableStreamFinishInFlightClose const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -212,7 +212,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlight const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeLength = 751; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamFinishInFlightCloseCode = "(function (d){\"use strict\";@getByIdDirectPrivate(d,\"inFlightCloseRequest\").@resolve.@call(),@putByIdDirectPrivate(d,\"inFlightCloseRequest\",@undefined);const i=@getByIdDirectPrivate(d,\"state\");if(@assert(i===\"writable\"||i===\"erroring\"),i===\"erroring\"){@putByIdDirectPrivate(d,\"storedError\",@undefined);const _=@getByIdDirectPrivate(d,\"pendingAbortRequest\");if(_!==@undefined)_.promise.@resolve.@call(),@putByIdDirectPrivate(d,\"pendingAbortRequest\",@undefined)}@putByIdDirectPrivate(d,\"state\",\"closed\");const n=@getByIdDirectPrivate(d,\"writer\");if(n!==@undefined)@getByIdDirectPrivate(n,\"closedPromise\").@resolve.@call();@assert(@getByIdDirectPrivate(d,\"pendingAbortRequest\")===@undefined),@assert(@getByIdDirectPrivate(d,\"storedError\")===@undefined)})\n"; +const char* const s_writableStreamInternalsWritableStreamFinishInFlightCloseCode = "(function (d){\"use strict\";@getByIdDirectPrivate(d,\"inFlightCloseRequest\").@resolve.@call(),@putByIdDirectPrivate(d,\"inFlightCloseRequest\",@undefined);const n=@getByIdDirectPrivate(d,\"state\");if(@assert(n===\"writable\"||n===\"erroring\"),n===\"erroring\"){@putByIdDirectPrivate(d,\"storedError\",@undefined);const c=@getByIdDirectPrivate(d,\"pendingAbortRequest\");if(c!==@undefined)c.promise.@resolve.@call(),@putByIdDirectPrivate(d,\"pendingAbortRequest\",@undefined)}@putByIdDirectPrivate(d,\"state\",\"closed\");const _=@getByIdDirectPrivate(d,\"writer\");if(_!==@undefined)@getByIdDirectPrivate(_,\"closedPromise\").@resolve.@call();@assert(@getByIdDirectPrivate(d,\"pendingAbortRequest\")===@undefined),@assert(@getByIdDirectPrivate(d,\"storedError\")===@undefined)})\n"; // writableStreamFinishInFlightCloseWithError const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -292,7 +292,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterA const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeLength = 130; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterAbortCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultWriterAbortCode = "(function (d,f){\"use strict\";const c=@getByIdDirectPrivate(d,\"stream\");return @assert(c!==@undefined),@writableStreamAbort(c,f)})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultWriterAbortCode = "(function (c,d){\"use strict\";const f=@getByIdDirectPrivate(c,\"stream\");return @assert(f!==@undefined),@writableStreamAbort(f,d)})\n"; // writableStreamDefaultWriterClose const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -300,7 +300,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterC const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeLength = 126; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterCloseCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultWriterCloseCode = "(function (c){\"use strict\";const _=@getByIdDirectPrivate(c,\"stream\");return @assert(_!==@undefined),@writableStreamClose(_)})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultWriterCloseCode = "(function (_){\"use strict\";const c=@getByIdDirectPrivate(_,\"stream\");return @assert(c!==@undefined),@writableStreamClose(c)})\n"; // writableStreamDefaultWriterCloseWithErrorPropagation const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -308,7 +308,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterC const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeLength = 385; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCode = "(function (u){\"use strict\";const c=@getByIdDirectPrivate(u,\"stream\");@assert(c!==@undefined);const l=@getByIdDirectPrivate(c,\"state\");if(@writableStreamCloseQueuedOrInFlight(c)||l===\"closed\")return @Promise.@resolve();if(l===\"errored\")return @Promise.@reject(@getByIdDirectPrivate(c,\"storedError\"));return @assert(l===\"writable\"||l===\"erroring\"),@writableStreamDefaultWriterClose(u)})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultWriterCloseWithErrorPropagationCode = "(function (c){\"use strict\";const l=@getByIdDirectPrivate(c,\"stream\");@assert(l!==@undefined);const u=@getByIdDirectPrivate(l,\"state\");if(@writableStreamCloseQueuedOrInFlight(l)||u===\"closed\")return @Promise.@resolve();if(u===\"errored\")return @Promise.@reject(@getByIdDirectPrivate(l,\"storedError\"));return @assert(u===\"writable\"||u===\"erroring\"),@writableStreamDefaultWriterClose(c)})\n"; // writableStreamDefaultWriterEnsureClosedPromiseRejected const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -316,7 +316,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterE const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeLength = 329; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCode = "(function (h,u){\"use strict\";let _=@getByIdDirectPrivate(h,\"closedPromise\"),n=_.@promise;if((@getPromiseInternalField(n,@promiseFieldFlags)&@promiseStateMask)!==@promiseStatePending)_=@newPromiseCapability(@Promise),n=_.@promise,@putByIdDirectPrivate(h,\"closedPromise\",_);_.@reject.@call(@undefined,u),@markPromiseAsHandled(n)})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultWriterEnsureClosedPromiseRejectedCode = "(function (_,n){\"use strict\";let h=@getByIdDirectPrivate(_,\"closedPromise\"),u=h.@promise;if((@getPromiseInternalField(u,@promiseFieldFlags)&@promiseStateMask)!==@promiseStatePending)h=@newPromiseCapability(@Promise),u=h.@promise,@putByIdDirectPrivate(_,\"closedPromise\",h);h.@reject.@call(@undefined,n),@markPromiseAsHandled(u)})\n"; // writableStreamDefaultWriterEnsureReadyPromiseRejected const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -324,7 +324,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterE const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeLength = 327; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCode = "(function (h,n){\"use strict\";let c=@getByIdDirectPrivate(h,\"readyPromise\"),g=c.@promise;if((@getPromiseInternalField(g,@promiseFieldFlags)&@promiseStateMask)!==@promiseStatePending)c=@newPromiseCapability(@Promise),g=c.@promise,@putByIdDirectPrivate(h,\"readyPromise\",c);c.@reject.@call(@undefined,n),@markPromiseAsHandled(g)})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCode = "(function (c,g){\"use strict\";let h=@getByIdDirectPrivate(c,\"readyPromise\"),n=h.@promise;if((@getPromiseInternalField(n,@promiseFieldFlags)&@promiseStateMask)!==@promiseStatePending)h=@newPromiseCapability(@Promise),n=h.@promise,@putByIdDirectPrivate(c,\"readyPromise\",h);h.@reject.@call(@undefined,g),@markPromiseAsHandled(n)})\n"; // writableStreamDefaultWriterGetDesiredSize const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -332,7 +332,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterG const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeLength = 299; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCode = "(function (_){\"use strict\";const c=@getByIdDirectPrivate(_,\"stream\");@assert(c!==@undefined);const l=@getByIdDirectPrivate(c,\"state\");if(l===\"errored\"||l===\"erroring\")return null;if(l===\"closed\")return 0;return @writableStreamDefaultControllerGetDesiredSize(@getByIdDirectPrivate(c,\"controller\"))})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCode = "(function (c){\"use strict\";const l=@getByIdDirectPrivate(c,\"stream\");@assert(l!==@undefined);const _=@getByIdDirectPrivate(l,\"state\");if(_===\"errored\"||_===\"erroring\")return null;if(_===\"closed\")return 0;return @writableStreamDefaultControllerGetDesiredSize(@getByIdDirectPrivate(l,\"controller\"))})\n"; // writableStreamDefaultWriterRelease const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -340,7 +340,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterR const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeLength = 414; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterReleaseCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultWriterReleaseCode = "(function (_){\"use strict\";const c=@getByIdDirectPrivate(_,\"stream\");@assert(c!==@undefined),@assert(@getByIdDirectPrivate(c,\"writer\")===_);const h=@makeTypeError(\"writableStreamDefaultWriterRelease\");@writableStreamDefaultWriterEnsureReadyPromiseRejected(_,h),@writableStreamDefaultWriterEnsureClosedPromiseRejected(_,h),@putByIdDirectPrivate(c,\"writer\",@undefined),@putByIdDirectPrivate(_,\"stream\",@undefined)})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultWriterReleaseCode = "(function (_){\"use strict\";const h=@getByIdDirectPrivate(_,\"stream\");@assert(h!==@undefined),@assert(@getByIdDirectPrivate(h,\"writer\")===_);const c=@makeTypeError(\"writableStreamDefaultWriterRelease\");@writableStreamDefaultWriterEnsureReadyPromiseRejected(_,c),@writableStreamDefaultWriterEnsureClosedPromiseRejected(_,c),@putByIdDirectPrivate(h,\"writer\",@undefined),@putByIdDirectPrivate(_,\"stream\",@undefined)})\n"; // writableStreamDefaultWriterWrite const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -348,7 +348,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterW const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeLength = 919; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultWriterWriteCode = "(function (W,_){\"use strict\";const d=@getByIdDirectPrivate(W,\"stream\");@assert(d!==@undefined);const P=@getByIdDirectPrivate(d,\"controller\");@assert(P!==@undefined);const b=@writableStreamDefaultControllerGetChunkSize(P,_);if(d!==@getByIdDirectPrivate(W,\"stream\"))return @Promise.@reject(@makeTypeError(\"writer is not stream's writer\"));const g=@getByIdDirectPrivate(d,\"state\");if(g===\"errored\")return @Promise.@reject(@getByIdDirectPrivate(d,\"storedError\"));if(@writableStreamCloseQueuedOrInFlight(d)||g===\"closed\")return @Promise.@reject(@makeTypeError(\"stream is closing or closed\"));if(@writableStreamCloseQueuedOrInFlight(d)||g===\"closed\")return @Promise.@reject(@makeTypeError(\"stream is closing or closed\"));if(g===\"erroring\")return @Promise.@reject(@getByIdDirectPrivate(d,\"storedError\"));@assert(g===\"writable\");const f=@writableStreamAddWriteRequest(d);return @writableStreamDefaultControllerWrite(P,_,b),f})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultWriterWriteCode = "(function (d,g){\"use strict\";const P=@getByIdDirectPrivate(d,\"stream\");@assert(P!==@undefined);const W=@getByIdDirectPrivate(P,\"controller\");@assert(W!==@undefined);const _=@writableStreamDefaultControllerGetChunkSize(W,g);if(P!==@getByIdDirectPrivate(d,\"stream\"))return @Promise.@reject(@makeTypeError(\"writer is not stream's writer\"));const b=@getByIdDirectPrivate(P,\"state\");if(b===\"errored\")return @Promise.@reject(@getByIdDirectPrivate(P,\"storedError\"));if(@writableStreamCloseQueuedOrInFlight(P)||b===\"closed\")return @Promise.@reject(@makeTypeError(\"stream is closing or closed\"));if(@writableStreamCloseQueuedOrInFlight(P)||b===\"closed\")return @Promise.@reject(@makeTypeError(\"stream is closing or closed\"));if(b===\"erroring\")return @Promise.@reject(@getByIdDirectPrivate(P,\"storedError\"));@assert(b===\"writable\");const f=@writableStreamAddWriteRequest(P);return @writableStreamDefaultControllerWrite(W,g,_),f})\n"; // setUpWritableStreamDefaultController const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -356,7 +356,7 @@ const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultCo const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeLength = 700; static const JSC::Intrinsic s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerCode = "(function (B,_,v,P,U,d,f,j){\"use strict\";@assert(@isWritableStream(B)),@assert(@getByIdDirectPrivate(B,\"controller\")===@undefined),@putByIdDirectPrivate(_,\"stream\",B),@putByIdDirectPrivate(B,\"controller\",_),@resetQueue(@getByIdDirectPrivate(_,\"queue\")),@putByIdDirectPrivate(_,\"started\",-1),@putByIdDirectPrivate(_,\"startAlgorithm\",v),@putByIdDirectPrivate(_,\"strategySizeAlgorithm\",j),@putByIdDirectPrivate(_,\"strategyHWM\",f),@putByIdDirectPrivate(_,\"writeAlgorithm\",P),@putByIdDirectPrivate(_,\"closeAlgorithm\",U),@putByIdDirectPrivate(_,\"abortAlgorithm\",d);const q=@writableStreamDefaultControllerGetBackpressure(_);@writableStreamUpdateBackpressure(B,q),@writableStreamDefaultControllerStart(_)})\n"; +const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerCode = "(function (_,B,d,v,f,P,j,U){\"use strict\";@assert(@isWritableStream(_)),@assert(@getByIdDirectPrivate(_,\"controller\")===@undefined),@putByIdDirectPrivate(B,\"stream\",_),@putByIdDirectPrivate(_,\"controller\",B),@resetQueue(@getByIdDirectPrivate(B,\"queue\")),@putByIdDirectPrivate(B,\"started\",-1),@putByIdDirectPrivate(B,\"startAlgorithm\",d),@putByIdDirectPrivate(B,\"strategySizeAlgorithm\",U),@putByIdDirectPrivate(B,\"strategyHWM\",j),@putByIdDirectPrivate(B,\"writeAlgorithm\",v),@putByIdDirectPrivate(B,\"closeAlgorithm\",f),@putByIdDirectPrivate(B,\"abortAlgorithm\",P);const q=@writableStreamDefaultControllerGetBackpressure(B);@writableStreamUpdateBackpressure(_,q),@writableStreamDefaultControllerStart(B)})\n"; // writableStreamDefaultControllerStart const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerStartCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -364,7 +364,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControl const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerStartCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultControllerStartCodeLength = 647; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerStartCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultControllerStartCode = "(function (i){\"use strict\";if(@getByIdDirectPrivate(i,\"started\")!==-1)return;@putByIdDirectPrivate(i,\"started\",0);const p=@getByIdDirectPrivate(i,\"startAlgorithm\");@putByIdDirectPrivate(i,\"startAlgorithm\",@undefined);const d=@getByIdDirectPrivate(i,\"stream\");return @Promise.@resolve(p.@call()).@then(()=>{const _=@getByIdDirectPrivate(d,\"state\");@assert(_===\"writable\"||_===\"erroring\"),@putByIdDirectPrivate(i,\"started\",1),@writableStreamDefaultControllerAdvanceQueueIfNeeded(i)},(_)=>{const u=@getByIdDirectPrivate(d,\"state\");@assert(u===\"writable\"||u===\"erroring\"),@putByIdDirectPrivate(i,\"started\",1),@writableStreamDealWithRejection(d,_)})})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultControllerStartCode = "(function (i){\"use strict\";if(@getByIdDirectPrivate(i,\"started\")!==-1)return;@putByIdDirectPrivate(i,\"started\",0);const _=@getByIdDirectPrivate(i,\"startAlgorithm\");@putByIdDirectPrivate(i,\"startAlgorithm\",@undefined);const d=@getByIdDirectPrivate(i,\"stream\");return @Promise.@resolve(_.@call()).@then(()=>{const u=@getByIdDirectPrivate(d,\"state\");@assert(u===\"writable\"||u===\"erroring\"),@putByIdDirectPrivate(i,\"started\",1),@writableStreamDefaultControllerAdvanceQueueIfNeeded(i)},(u)=>{const p=@getByIdDirectPrivate(d,\"state\");@assert(p===\"writable\"||p===\"erroring\"),@putByIdDirectPrivate(i,\"started\",1),@writableStreamDealWithRejection(d,u)})})\n"; // setUpWritableStreamDefaultControllerFromUnderlyingSink const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -372,7 +372,7 @@ const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultCo const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeLength = 561; static const JSC::Intrinsic s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCode = "(function (C,O,_,E,F){\"use strict\";const f=new @WritableStreamDefaultController;let q=()=>{},v=()=>{return @Promise.@resolve()},x=()=>{return @Promise.@resolve()},B=()=>{return @Promise.@resolve()};if(\"start\"in _){const p=_.start;q=()=>@promiseInvokeOrNoopMethodNoCatch(O,p,[f])}if(\"write\"in _){const p=_.write;v=(j)=>@promiseInvokeOrNoopMethod(O,p,[j,f])}if(\"close\"in _){const p=_.close;x=()=>@promiseInvokeOrNoopMethod(O,p,[])}if(\"abort\"in _){const p=_.abort;B=(j)=>@promiseInvokeOrNoopMethod(O,p,[j])}@setUpWritableStreamDefaultController(C,f,q,v,x,B,E,F)})\n"; +const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCode = "(function (_,j,v,p,f){\"use strict\";const q=new @WritableStreamDefaultController;let x=()=>{},B=()=>{return @Promise.@resolve()},C=()=>{return @Promise.@resolve()},O=()=>{return @Promise.@resolve()};if(\"start\"in v){const E=v.start;x=()=>@promiseInvokeOrNoopMethodNoCatch(j,E,[q])}if(\"write\"in v){const E=v.write;B=(F)=>@promiseInvokeOrNoopMethod(j,E,[F,q])}if(\"close\"in v){const E=v.close;C=()=>@promiseInvokeOrNoopMethod(j,E,[])}if(\"abort\"in v){const E=v.abort;O=(F)=>@promiseInvokeOrNoopMethod(j,E,[F])}@setUpWritableStreamDefaultController(_,q,x,B,C,O,p,f)})\n"; // writableStreamDefaultControllerAdvanceQueueIfNeeded const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -412,7 +412,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControl const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeLength = 237; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerErrorCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultControllerErrorCode = "(function (h,b){\"use strict\";const i=@getByIdDirectPrivate(h,\"stream\");@assert(i!==@undefined),@assert(@getByIdDirectPrivate(i,\"state\")===\"writable\"),@writableStreamDefaultControllerClearAlgorithms(h),@writableStreamStartErroring(i,b)})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultControllerErrorCode = "(function (i,h){\"use strict\";const b=@getByIdDirectPrivate(i,\"stream\");@assert(b!==@undefined),@assert(@getByIdDirectPrivate(b,\"state\")===\"writable\"),@writableStreamDefaultControllerClearAlgorithms(i),@writableStreamStartErroring(b,h)})\n"; // writableStreamDefaultControllerErrorIfNeeded const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerErrorIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -460,7 +460,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControl const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeLength = 734; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCode = "(function (d,v){\"use strict\";const i=@getByIdDirectPrivate(d,\"stream\");@writableStreamMarkFirstWriteRequestInFlight(i),@getByIdDirectPrivate(d,\"writeAlgorithm\").@call(@undefined,v).@then(()=>{@writableStreamFinishInFlightWrite(i);const _=@getByIdDirectPrivate(i,\"state\");if(@assert(_===\"writable\"||_===\"erroring\"),@dequeueValue(@getByIdDirectPrivate(d,\"queue\")),!@writableStreamCloseQueuedOrInFlight(i)&&_===\"writable\"){const q=@writableStreamDefaultControllerGetBackpressure(d);@writableStreamUpdateBackpressure(i,q)}@writableStreamDefaultControllerAdvanceQueueIfNeeded(d)},(_)=>{if(@getByIdDirectPrivate(i,\"state\")===\"writable\")@writableStreamDefaultControllerClearAlgorithms(d);@writableStreamFinishInFlightWriteWithError(i,_)})})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCode = "(function (i,d){\"use strict\";const _=@getByIdDirectPrivate(i,\"stream\");@writableStreamMarkFirstWriteRequestInFlight(_),@getByIdDirectPrivate(i,\"writeAlgorithm\").@call(@undefined,d).@then(()=>{@writableStreamFinishInFlightWrite(_);const v=@getByIdDirectPrivate(_,\"state\");if(@assert(v===\"writable\"||v===\"erroring\"),@dequeueValue(@getByIdDirectPrivate(i,\"queue\")),!@writableStreamCloseQueuedOrInFlight(_)&&v===\"writable\"){const M=@writableStreamDefaultControllerGetBackpressure(i);@writableStreamUpdateBackpressure(_,M)}@writableStreamDefaultControllerAdvanceQueueIfNeeded(i)},(v)=>{if(@getByIdDirectPrivate(_,\"state\")===\"writable\")@writableStreamDefaultControllerClearAlgorithms(i);@writableStreamFinishInFlightWriteWithError(_,v)})})\n"; // writableStreamDefaultControllerWrite const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -468,7 +468,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControl const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeLength = 450; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultControllerWriteCode = "(function (d,B,D){\"use strict\";try{@enqueueValueWithSize(@getByIdDirectPrivate(d,\"queue\"),B,D);const y=@getByIdDirectPrivate(d,\"stream\"),I=@getByIdDirectPrivate(y,\"state\");if(!@writableStreamCloseQueuedOrInFlight(y)&&I===\"writable\"){const _=@writableStreamDefaultControllerGetBackpressure(d);@writableStreamUpdateBackpressure(y,_)}@writableStreamDefaultControllerAdvanceQueueIfNeeded(d)}catch(y){@writableStreamDefaultControllerErrorIfNeeded(d,y)}})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultControllerWriteCode = "(function (y,B,D){\"use strict\";try{@enqueueValueWithSize(@getByIdDirectPrivate(y,\"queue\"),B,D);const I=@getByIdDirectPrivate(y,\"stream\"),_=@getByIdDirectPrivate(I,\"state\");if(!@writableStreamCloseQueuedOrInFlight(I)&&_===\"writable\"){const d=@writableStreamDefaultControllerGetBackpressure(y);@writableStreamUpdateBackpressure(I,d)}@writableStreamDefaultControllerAdvanceQueueIfNeeded(y)}catch(I){@writableStreamDefaultControllerErrorIfNeeded(y,I)}})\n"; #define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \ @@ -502,7 +502,7 @@ const JSC::ConstructorKind s_transformStreamInternalsCreateTransformStreamCodeCo const JSC::ImplementationVisibility s_transformStreamInternalsCreateTransformStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsCreateTransformStreamCodeLength = 513; static const JSC::Intrinsic s_transformStreamInternalsCreateTransformStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsCreateTransformStreamCode = "(function (D,E,F,_,j,c,q){\"use strict\";if(_===@undefined)_=1;if(j===@undefined)j=()=>1;if(c===@undefined)c=0;if(q===@undefined)q=()=>1;@assert(_>=0),@assert(c>=0);const B={};@putByIdDirectPrivate(B,\"TransformStream\",!0);const v=new @TransformStream(B),x=@newPromiseCapability(@Promise);@initializeTransformStream(v,x.@promise,_,j,c,q);const G=new @TransformStreamDefaultController;return @setUpTransformStreamDefaultController(v,G,E,F),D().@then(()=>{x.@resolve.@call()},(I)=>{x.@reject.@call(@undefined,I)}),v})\n"; +const char* const s_transformStreamInternalsCreateTransformStreamCode = "(function (j,q,v,x,B,D,E){\"use strict\";if(x===@undefined)x=1;if(B===@undefined)B=()=>1;if(D===@undefined)D=0;if(E===@undefined)E=()=>1;@assert(x>=0),@assert(D>=0);const F={};@putByIdDirectPrivate(F,\"TransformStream\",!0);const G=new @TransformStream(F),I=@newPromiseCapability(@Promise);@initializeTransformStream(G,I.@promise,x,B,D,E);const _=new @TransformStreamDefaultController;return @setUpTransformStreamDefaultController(G,_,q,v),j().@then(()=>{I.@resolve.@call()},(c)=>{I.@reject.@call(@undefined,c)}),G})\n"; // initializeTransformStream const JSC::ConstructAbility s_transformStreamInternalsInitializeTransformStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -510,7 +510,7 @@ const JSC::ConstructorKind s_transformStreamInternalsInitializeTransformStreamCo const JSC::ImplementationVisibility s_transformStreamInternalsInitializeTransformStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsInitializeTransformStreamCodeLength = 1015; static const JSC::Intrinsic s_transformStreamInternalsInitializeTransformStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsInitializeTransformStreamCode = "(function (f,x,C,D,E,F){\"use strict\";const q=()=>{return x},G=(B)=>{return @transformStreamDefaultSinkWriteAlgorithm(f,B)},I=(B)=>{return @transformStreamDefaultSinkAbortAlgorithm(f,B)},J=()=>{return @transformStreamDefaultSinkCloseAlgorithm(f)},v=@createWritableStream(q,G,J,I,C,D),K=()=>{return @transformStreamDefaultSourcePullAlgorithm(f)},L=(B)=>{return @transformStreamErrorWritableAndUnblockWrite(f,B),@Promise.@resolve()},T={};@putByIdDirectPrivate(T,\"start\",q),@putByIdDirectPrivate(T,\"pull\",K),@putByIdDirectPrivate(T,\"cancel\",L);const j={};@putByIdDirectPrivate(j,\"size\",F),@putByIdDirectPrivate(j,\"highWaterMark\",E);const N=new @ReadableStream(T,j);@putByIdDirectPrivate(f,\"writable\",v),@putByIdDirectPrivate(f,\"internalWritable\",@getInternalWritableStream(v)),@putByIdDirectPrivate(f,\"readable\",N),@putByIdDirectPrivate(f,\"backpressure\",@undefined),@putByIdDirectPrivate(f,\"backpressureChangePromise\",@undefined),@transformStreamSetBackpressure(f,!0),@putByIdDirectPrivate(f,\"controller\",@undefined)})\n"; +const char* const s_transformStreamInternalsInitializeTransformStreamCode = "(function (f,G,B,T,C,F){\"use strict\";const I=()=>{return G},J=(x)=>{return @transformStreamDefaultSinkWriteAlgorithm(f,x)},K=(x)=>{return @transformStreamDefaultSinkAbortAlgorithm(f,x)},j=()=>{return @transformStreamDefaultSinkCloseAlgorithm(f)},L=@createWritableStream(I,J,j,K,B,T),N=()=>{return @transformStreamDefaultSourcePullAlgorithm(f)},q=(x)=>{return @transformStreamErrorWritableAndUnblockWrite(f,x),@Promise.@resolve()},D={};@putByIdDirectPrivate(D,\"start\",I),@putByIdDirectPrivate(D,\"pull\",N),@putByIdDirectPrivate(D,\"cancel\",q);const E={};@putByIdDirectPrivate(E,\"size\",F),@putByIdDirectPrivate(E,\"highWaterMark\",C);const v=new @ReadableStream(D,E);@putByIdDirectPrivate(f,\"writable\",L),@putByIdDirectPrivate(f,\"internalWritable\",@getInternalWritableStream(L)),@putByIdDirectPrivate(f,\"readable\",v),@putByIdDirectPrivate(f,\"backpressure\",@undefined),@putByIdDirectPrivate(f,\"backpressureChangePromise\",@undefined),@transformStreamSetBackpressure(f,!0),@putByIdDirectPrivate(f,\"controller\",@undefined)})\n"; // transformStreamError const JSC::ConstructAbility s_transformStreamInternalsTransformStreamErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -526,7 +526,7 @@ const JSC::ConstructorKind s_transformStreamInternalsTransformStreamErrorWritabl const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamErrorWritableAndUnblockWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsTransformStreamErrorWritableAndUnblockWriteCodeLength = 339; static const JSC::Intrinsic s_transformStreamInternalsTransformStreamErrorWritableAndUnblockWriteCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsTransformStreamErrorWritableAndUnblockWriteCode = "(function (_,n){\"use strict\";@transformStreamDefaultControllerClearAlgorithms(@getByIdDirectPrivate(_,\"controller\"));const o=@getByIdDirectPrivate(_,\"internalWritable\");if(@writableStreamDefaultControllerErrorIfNeeded(@getByIdDirectPrivate(o,\"controller\"),n),@getByIdDirectPrivate(_,\"backpressure\"))@transformStreamSetBackpressure(_,!1)})\n"; +const char* const s_transformStreamInternalsTransformStreamErrorWritableAndUnblockWriteCode = "(function (_,o){\"use strict\";@transformStreamDefaultControllerClearAlgorithms(@getByIdDirectPrivate(_,\"controller\"));const n=@getByIdDirectPrivate(_,\"internalWritable\");if(@writableStreamDefaultControllerErrorIfNeeded(@getByIdDirectPrivate(n,\"controller\"),o),@getByIdDirectPrivate(_,\"backpressure\"))@transformStreamSetBackpressure(_,!1)})\n"; // transformStreamSetBackpressure const JSC::ConstructAbility s_transformStreamInternalsTransformStreamSetBackpressureCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -550,7 +550,7 @@ const JSC::ConstructorKind s_transformStreamInternalsSetUpTransformStreamDefault const JSC::ImplementationVisibility s_transformStreamInternalsSetUpTransformStreamDefaultControllerFromTransformerCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsSetUpTransformStreamDefaultControllerFromTransformerCodeLength = 443; static const JSC::Intrinsic s_transformStreamInternalsSetUpTransformStreamDefaultControllerFromTransformerCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsSetUpTransformStreamDefaultControllerFromTransformerCode = "(function (q,v,_){\"use strict\";const d=new @TransformStreamDefaultController;let b=(p)=>{try{@transformStreamDefaultControllerEnqueue(d,p)}catch(w){return @Promise.@reject(w)}return @Promise.@resolve()},j=()=>{return @Promise.@resolve()};if(\"transform\"in _)b=(p)=>{return @promiseInvokeOrNoopMethod(v,_.transform,[p,d])};if(\"flush\"in _)j=()=>{return @promiseInvokeOrNoopMethod(v,_.flush,[d])};@setUpTransformStreamDefaultController(q,d,b,j)})\n"; +const char* const s_transformStreamInternalsSetUpTransformStreamDefaultControllerFromTransformerCode = "(function (_,d,p){\"use strict\";const v=new @TransformStreamDefaultController;let b=(q)=>{try{@transformStreamDefaultControllerEnqueue(v,q)}catch(w){return @Promise.@reject(w)}return @Promise.@resolve()},j=()=>{return @Promise.@resolve()};if(\"transform\"in p)b=(q)=>{return @promiseInvokeOrNoopMethod(d,p.transform,[q,v])};if(\"flush\"in p)j=()=>{return @promiseInvokeOrNoopMethod(d,p.flush,[v])};@setUpTransformStreamDefaultController(_,v,b,j)})\n"; // transformStreamDefaultControllerClearAlgorithms const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultControllerClearAlgorithmsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -566,7 +566,7 @@ const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultContr const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCodeLength = 622; static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCode = "(function (g,i){\"use strict\";const _=@getByIdDirectPrivate(g,\"stream\"),W=@getByIdDirectPrivate(_,\"readable\"),S=@getByIdDirectPrivate(W,\"readableStreamController\");if(@assert(S!==@undefined),!@readableStreamDefaultControllerCanCloseOrEnqueue(S))@throwTypeError(\"TransformStream.readable cannot close or enqueue\");try{@readableStreamDefaultControllerEnqueue(S,i)}catch(j){throw @transformStreamErrorWritableAndUnblockWrite(_,j),@getByIdDirectPrivate(W,\"storedError\")}const f=!@readableStreamDefaultControllerShouldCallPull(S);if(f!==@getByIdDirectPrivate(_,\"backpressure\"))@assert(f),@transformStreamSetBackpressure(_,!0)})\n"; +const char* const s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCode = "(function (S,W){\"use strict\";const f=@getByIdDirectPrivate(S,\"stream\"),g=@getByIdDirectPrivate(f,\"readable\"),i=@getByIdDirectPrivate(g,\"readableStreamController\");if(@assert(i!==@undefined),!@readableStreamDefaultControllerCanCloseOrEnqueue(i))@throwTypeError(\"TransformStream.readable cannot close or enqueue\");try{@readableStreamDefaultControllerEnqueue(i,W)}catch(j){throw @transformStreamErrorWritableAndUnblockWrite(f,j),@getByIdDirectPrivate(g,\"storedError\")}const _=!@readableStreamDefaultControllerShouldCallPull(i);if(_!==@getByIdDirectPrivate(f,\"backpressure\"))@assert(_),@transformStreamSetBackpressure(f,!0)})\n"; // transformStreamDefaultControllerError const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -582,7 +582,7 @@ const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultContr const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCodeLength = 277; static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCode = "(function (d,g){\"use strict\";const _=@newPromiseCapability(@Promise);return @getByIdDirectPrivate(d,\"transformAlgorithm\").@call(@undefined,g).@then(()=>{_.@resolve()},(f)=>{@transformStreamError(@getByIdDirectPrivate(d,\"stream\"),f),_.@reject.@call(@undefined,f)}),_.@promise})\n"; +const char* const s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCode = "(function (_,d){\"use strict\";const f=@newPromiseCapability(@Promise);return @getByIdDirectPrivate(_,\"transformAlgorithm\").@call(@undefined,d).@then(()=>{f.@resolve()},(j)=>{@transformStreamError(@getByIdDirectPrivate(_,\"stream\"),j),f.@reject.@call(@undefined,j)}),f.@promise})\n"; // transformStreamDefaultControllerTerminate const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultControllerTerminateCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -590,7 +590,7 @@ const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultContr const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultControllerTerminateCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsTransformStreamDefaultControllerTerminateCodeLength = 367; static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultControllerTerminateCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsTransformStreamDefaultControllerTerminateCode = "(function (f){\"use strict\";const i=@getByIdDirectPrivate(f,\"stream\"),k=@getByIdDirectPrivate(i,\"readable\"),_=@getByIdDirectPrivate(k,\"readableStreamController\");if(@readableStreamDefaultControllerCanCloseOrEnqueue(_))@readableStreamDefaultControllerClose(_);const u=@makeTypeError(\"the stream has been terminated\");@transformStreamErrorWritableAndUnblockWrite(i,u)})\n"; +const char* const s_transformStreamInternalsTransformStreamDefaultControllerTerminateCode = "(function (i){\"use strict\";const _=@getByIdDirectPrivate(i,\"stream\"),f=@getByIdDirectPrivate(_,\"readable\"),k=@getByIdDirectPrivate(f,\"readableStreamController\");if(@readableStreamDefaultControllerCanCloseOrEnqueue(k))@readableStreamDefaultControllerClose(k);const u=@makeTypeError(\"the stream has been terminated\");@transformStreamErrorWritableAndUnblockWrite(_,u)})\n"; // transformStreamDefaultSinkWriteAlgorithm const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultSinkWriteAlgorithmCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -598,7 +598,7 @@ const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultSinkW const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultSinkWriteAlgorithmCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsTransformStreamDefaultSinkWriteAlgorithmCodeLength = 764; static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultSinkWriteAlgorithmCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsTransformStreamDefaultSinkWriteAlgorithmCode = "(function (d,j){\"use strict\";const f=@getByIdDirectPrivate(d,\"internalWritable\");@assert(@getByIdDirectPrivate(f,\"state\")===\"writable\");const q=@getByIdDirectPrivate(d,\"controller\");if(@getByIdDirectPrivate(d,\"backpressure\")){const _=@newPromiseCapability(@Promise),x=@getByIdDirectPrivate(d,\"backpressureChangePromise\");return @assert(x!==@undefined),x.@promise.@then(()=>{const v=@getByIdDirectPrivate(f,\"state\");if(v===\"erroring\"){_.@reject.@call(@undefined,@getByIdDirectPrivate(f,\"storedError\"));return}@assert(v===\"writable\"),@transformStreamDefaultControllerPerformTransform(q,j).@then(()=>{_.@resolve()},(z)=>{_.@reject.@call(@undefined,z)})},(v)=>{_.@reject.@call(@undefined,v)}),_.@promise}return @transformStreamDefaultControllerPerformTransform(q,j)})\n"; +const char* const s_transformStreamInternalsTransformStreamDefaultSinkWriteAlgorithmCode = "(function (d,v){\"use strict\";const f=@getByIdDirectPrivate(d,\"internalWritable\");@assert(@getByIdDirectPrivate(f,\"state\")===\"writable\");const j=@getByIdDirectPrivate(d,\"controller\");if(@getByIdDirectPrivate(d,\"backpressure\")){const q=@newPromiseCapability(@Promise),_=@getByIdDirectPrivate(d,\"backpressureChangePromise\");return @assert(_!==@undefined),_.@promise.@then(()=>{const x=@getByIdDirectPrivate(f,\"state\");if(x===\"erroring\"){q.@reject.@call(@undefined,@getByIdDirectPrivate(f,\"storedError\"));return}@assert(x===\"writable\"),@transformStreamDefaultControllerPerformTransform(j,v).@then(()=>{q.@resolve()},(z)=>{q.@reject.@call(@undefined,z)})},(x)=>{q.@reject.@call(@undefined,x)}),q.@promise}return @transformStreamDefaultControllerPerformTransform(j,v)})\n"; // transformStreamDefaultSinkAbortAlgorithm const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultSinkAbortAlgorithmCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -606,7 +606,7 @@ const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultSinkA const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultSinkAbortAlgorithmCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsTransformStreamDefaultSinkAbortAlgorithmCodeLength = 85; static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultSinkAbortAlgorithmCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsTransformStreamDefaultSinkAbortAlgorithmCode = "(function (d,t){\"use strict\";return @transformStreamError(d,t),@Promise.@resolve()})\n"; +const char* const s_transformStreamInternalsTransformStreamDefaultSinkAbortAlgorithmCode = "(function (t,d){\"use strict\";return @transformStreamError(t,d),@Promise.@resolve()})\n"; // transformStreamDefaultSinkCloseAlgorithm const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultSinkCloseAlgorithmCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -614,7 +614,7 @@ const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultSinkC const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultSinkCloseAlgorithmCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsTransformStreamDefaultSinkCloseAlgorithmCodeLength = 789; static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultSinkCloseAlgorithmCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsTransformStreamDefaultSinkCloseAlgorithmCode = "(function (f){\"use strict\";const _=@getByIdDirectPrivate(f,\"readable\"),q=@getByIdDirectPrivate(f,\"controller\"),j=@getByIdDirectPrivate(_,\"readableStreamController\"),k=@getByIdDirectPrivate(q,\"flushAlgorithm\");@assert(k!==@undefined);const u=@getByIdDirectPrivate(q,\"flushAlgorithm\").@call();@transformStreamDefaultControllerClearAlgorithms(q);const I=@newPromiseCapability(@Promise);return u.@then(()=>{if(@getByIdDirectPrivate(_,\"state\")===@streamErrored){I.@reject.@call(@undefined,@getByIdDirectPrivate(_,\"storedError\"));return}if(@readableStreamDefaultControllerCanCloseOrEnqueue(j))@readableStreamDefaultControllerClose(j);I.@resolve()},(v)=>{@transformStreamError(@getByIdDirectPrivate(q,\"stream\"),v),I.@reject.@call(@undefined,@getByIdDirectPrivate(_,\"storedError\"))}),I.@promise})\n"; +const char* const s_transformStreamInternalsTransformStreamDefaultSinkCloseAlgorithmCode = "(function (_){\"use strict\";const I=@getByIdDirectPrivate(_,\"readable\"),k=@getByIdDirectPrivate(_,\"controller\"),f=@getByIdDirectPrivate(I,\"readableStreamController\"),u=@getByIdDirectPrivate(k,\"flushAlgorithm\");@assert(u!==@undefined);const v=@getByIdDirectPrivate(k,\"flushAlgorithm\").@call();@transformStreamDefaultControllerClearAlgorithms(k);const q=@newPromiseCapability(@Promise);return v.@then(()=>{if(@getByIdDirectPrivate(I,\"state\")===@streamErrored){q.@reject.@call(@undefined,@getByIdDirectPrivate(I,\"storedError\"));return}if(@readableStreamDefaultControllerCanCloseOrEnqueue(f))@readableStreamDefaultControllerClose(f);q.@resolve()},(j)=>{@transformStreamError(@getByIdDirectPrivate(k,\"stream\"),j),q.@reject.@call(@undefined,@getByIdDirectPrivate(I,\"storedError\"))}),q.@promise})\n"; // transformStreamDefaultSourcePullAlgorithm const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultSourcePullAlgorithmCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -640,7 +640,7 @@ const JSC::ConstructorKind s_processObjectInternalsBindingCodeConstructorKind = const JSC::ImplementationVisibility s_processObjectInternalsBindingCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_processObjectInternalsBindingCodeLength = 473; static const JSC::Intrinsic s_processObjectInternalsBindingCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_processObjectInternalsBindingCode = "(function (I){\"use strict\";if(I!==\"constants\")@throwTypeError(\"process.binding() is not supported in Bun. If that breaks something, please file an issue and include a reproducible code sample.\");var r=globalThis.Symbol.for(\"process.bindings.constants\"),l=globalThis[r];if(!l){const{constants:d}=globalThis[globalThis.Symbol.for(\"Bun.lazy\")](\"createImportMeta\",\"node:process\").require(\"node:fs\");l={fs:d,zlib:{},crypto:{},os:@Bun._Os().constants},globalThis[r]=l}return l})\n"; +const char* const s_processObjectInternalsBindingCode = "(function (d){\"use strict\";if(d!==\"constants\")@throwTypeError(\"process.binding() is not supported in Bun. If that breaks something, please file an issue and include a reproducible code sample.\");var l=globalThis.Symbol.for(\"process.bindings.constants\"),I=globalThis[l];if(!I){const{constants:r}=globalThis[globalThis.Symbol.for(\"Bun.lazy\")](\"createImportMeta\",\"node:process\").require(\"node:fs\");I={fs:r,zlib:{},crypto:{},os:@Bun._Os().constants},globalThis[l]=I}return I})\n"; // getStdioWriteStream const JSC::ConstructAbility s_processObjectInternalsGetStdioWriteStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -648,7 +648,7 @@ const JSC::ConstructorKind s_processObjectInternalsGetStdioWriteStreamCodeConstr const JSC::ImplementationVisibility s_processObjectInternalsGetStdioWriteStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_processObjectInternalsGetStdioWriteStreamCodeLength = 4311; static const JSC::Intrinsic s_processObjectInternalsGetStdioWriteStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_processObjectInternalsGetStdioWriteStreamCode = "(function (Z){\"use strict\";var L=(M)=>{var G=@requireMap.get(M);if(G)return G.exports;return @internalRequire(M)},D={path:\"node:process\",require:L};function Y(M){var{Duplex:G,eos:j,destroy:z}=L(\"node:stream\"),J=class O extends G{#j;#$;#M=!0;#N=!0;#J;#z;#G;#B;#H;#K;get isTTY(){return this.#K\?\?=L(\"node:tty\").isatty(M)}get fd(){return M}constructor(B){super({readable:!0,writable:!0});this.#J=`/dev/fd/${B}`}#L(B){const H=this.#z;if(this.#z=null,H)H(B);else if(B)this.destroy(B);else if(!this.#M&&!this.#N)this.destroy()}_destroy(B,H){if(!B&&this.#z!==null){var N=class X extends Error{code;name;constructor(Q=\"The operation was aborted\",K=void 0){if(K!==void 0&&typeof K!==\"object\")throw new Error(`Invalid AbortError options:\\n\\n${JSON.stringify(K,null,2)}`);super(Q,K);this.code=\"ABORT_ERR\",this.name=\"AbortError\"}};B=new N}if(this.#G=null,this.#B=null,this.#z===null)H(B);else{if(this.#z=H,this.#j)z(this.#j,B);if(this.#$)z(this.#$,B)}}_write(B,H,N){if(!this.#j){var{createWriteStream:X}=L(\"node:fs\"),Q=this.#j=X(this.#J);Q.on(\"finish\",()=>{if(this.#B){const K=this.#B;this.#B=null,K()}}),Q.on(\"drain\",()=>{if(this.#G){const K=this.#G;this.#G=null,K()}}),j(Q,(K)=>{if(this.#N=!1,K)z(Q,K);this.#L(K)})}if(Q.write(B,H))N();else this.#G=N}_final(B){this.#j&&this.#j.end(),this.#B=B}#O(){var{createReadStream:B}=L(\"node:fs\"),H=this.#$=B(this.#J);return H.on(\"readable\",()=>{if(this.#H){const N=this.#H;this.#H=null,N()}else this.read()}),H.on(\"end\",()=>{this.push(null)}),j(H,(N)=>{if(this.#M=!1,N)z(H,N);this.#L(N)}),H}_read(){var B=this.#$;if(!B)B=this.#O();while(!0){const H=B.read();if(H===null||!this.push(H))return}}};return new J(M)}var{EventEmitter:P}=L(\"node:events\");function V(M){if(!M)return!0;var G=M.toLowerCase();return G===\"utf8\"||G===\"utf-8\"||G===\"buffer\"||G===\"binary\"}var U,A=class M extends P{#j;#$;#M;#N;bytesWritten=0;setDefaultEncoding(G){if(this.#$||!V(G))return this.#G(),this.#$.setDefaultEncoding(G)}#J(){switch(this.#j){case 1:{var G=@Bun.stdout.writer({highWaterMark:0});return G.unref(),G}case 2:{var G=@Bun.stderr.writer({highWaterMark:0});return G.unref(),G}default:throw new Error(\"Unsupported writer\")}}#z(){return this.#M\?\?=this.#J()}constructor(G){super();this.#j=G}get fd(){return this.#j}get isTTY(){return this.#N\?\?=L(\"node:tty\").isatty(this.#j)}cursorTo(G,j,z){return(U\?\?=L(\"readline\")).cursorTo(this,G,j,z)}moveCursor(G,j,z){return(U\?\?=L(\"readline\")).moveCursor(this,G,j,z)}clearLine(G,j){return(U\?\?=L(\"readline\")).clearLine(this,G,j)}clearScreenDown(G){return(U\?\?=L(\"readline\")).clearScreenDown(this,G)}ref(){this.#z().ref()}unref(){this.#z().unref()}on(G,j){if(G===\"close\"||G===\"finish\")return this.#G(),this.#$.on(G,j);if(G===\"drain\")return super.on(\"drain\",j);if(G===\"error\")return super.on(\"error\",j);return super.on(G,j)}get _writableState(){return this.#G(),this.#$._writableState}get _readableState(){return this.#G(),this.#$._readableState}pipe(G){return this.#G(),this.#$.pipe(G)}unpipe(G){return this.#G(),this.#$.unpipe(G)}#G(){if(this.#$)return;this.#$=Y(this.#j);const G=this.eventNames();for(let j of G)this.#$.on(j,(...z)=>{this.emit(j,...z)})}#B(G){var j=this.#z();const z=j.write(G);this.bytesWritten+=z;const J=j.flush(!1);return!!(z||J)}#H(G,j){if(!V(j))return this.#G(),this.#$.write(G,j);return this.#B(G)}#K(G,j){if(j)this.emit(\"error\",j);try{G(j\?j:null)}catch(z){this.emit(\"error\",z)}}#L(G,j,z){if(!V(j))return this.#G(),this.#$.write(G,j,z);var J=this.#z();const O=J.write(G),B=J.flush(!0);if(B\?.then)return B.then(()=>{this.#K(z),this.emit(\"drain\")},(H)=>this.#K(z,H)),!1;return queueMicrotask(()=>{this.#K(z)}),!!(O||B)}write(G,j,z){const J=this._write(G,j,z);if(J)this.emit(\"drain\");return J}get hasColors(){return @Bun.tty[this.#j].hasColors}_write(G,j,z){var J=this.#$;if(J)return J.write(G,j,z);switch(arguments.length){case 0:{var O=new Error(\"Invalid arguments\");throw O.code=\"ERR_INVALID_ARG_TYPE\",O}case 1:return this.#B(G);case 2:if(typeof j===\"function\")return this.#L(G,\"\",j);else if(typeof j===\"string\")return this.#H(G,j);default:{if(typeof j!==\"undefined\"&&typeof j!==\"string\"||typeof z!==\"undefined\"&&typeof z!==\"function\"){var O=new Error(\"Invalid arguments\");throw O.code=\"ERR_INVALID_ARG_TYPE\",O}if(typeof z===\"undefined\")return this.#H(G,j);return this.#L(G,j,z)}}}destroy(){return this}end(){return this}};return new A(Z)})\n"; +const char* const s_processObjectInternalsGetStdioWriteStreamCode = "(function (z){\"use strict\";var G=(U)=>{var V=@requireMap.get(U);if(V)return V.exports;return @internalRequire(U)},J={path:\"node:process\",require:G};function K(U){var{Duplex:V,eos:X,destroy:j}=G(\"node:stream\"),B=class Z extends V{#$;#G;#j=!0;#z=!0;#B;#H;#J;#K;#L;#M;get isTTY(){return this.#M\?\?=G(\"node:tty\").isatty(U)}get fd(){return U}constructor(Y){super({readable:!0,writable:!0});this.#B=`/dev/fd/${Y}`}#N(Y){const P=this.#H;if(this.#H=null,P)P(Y);else if(Y)this.destroy(Y);else if(!this.#j&&!this.#z)this.destroy()}_destroy(Y,P){if(!Y&&this.#H!==null){var A=class D extends Error{code;name;constructor(H=\"The operation was aborted\",N=void 0){if(N!==void 0&&typeof N!==\"object\")throw new Error(`Invalid AbortError options:\\n\\n${JSON.stringify(N,null,2)}`);super(H,N);this.code=\"ABORT_ERR\",this.name=\"AbortError\"}};Y=new A}if(this.#J=null,this.#K=null,this.#H===null)P(Y);else{if(this.#H=P,this.#$)j(this.#$,Y);if(this.#G)j(this.#G,Y)}}_write(Y,P,A){if(!this.#$){var{createWriteStream:D}=G(\"node:fs\"),H=this.#$=D(this.#B);H.on(\"finish\",()=>{if(this.#K){const N=this.#K;this.#K=null,N()}}),H.on(\"drain\",()=>{if(this.#J){const N=this.#J;this.#J=null,N()}}),X(H,(N)=>{if(this.#z=!1,N)j(H,N);this.#N(N)})}if(H.write(Y,P))A();else this.#J=A}_final(Y){this.#$&&this.#$.end(),this.#K=Y}#O(){var{createReadStream:Y}=G(\"node:fs\"),P=this.#G=Y(this.#B);return P.on(\"readable\",()=>{if(this.#L){const A=this.#L;this.#L=null,A()}else this.read()}),P.on(\"end\",()=>{this.push(null)}),X(P,(A)=>{if(this.#j=!1,A)j(P,A);this.#N(A)}),P}_read(){var Y=this.#G;if(!Y)Y=this.#O();while(!0){const P=Y.read();if(P===null||!this.push(P))return}}};return new B(U)}var{EventEmitter:L}=G(\"node:events\");function O(U){if(!U)return!0;var V=U.toLowerCase();return V===\"utf8\"||V===\"utf-8\"||V===\"buffer\"||V===\"binary\"}var M,Q=class U extends L{#$;#G;#j;#z;bytesWritten=0;setDefaultEncoding(V){if(this.#G||!O(V))return this.#J(),this.#G.setDefaultEncoding(V)}#B(){switch(this.#$){case 1:{var V=@Bun.stdout.writer({highWaterMark:0});return V.unref(),V}case 2:{var V=@Bun.stderr.writer({highWaterMark:0});return V.unref(),V}default:throw new Error(\"Unsupported writer\")}}#H(){return this.#j\?\?=this.#B()}constructor(V){super();this.#$=V}get fd(){return this.#$}get isTTY(){return this.#z\?\?=G(\"node:tty\").isatty(this.#$)}cursorTo(V,X,j){return(M\?\?=G(\"readline\")).cursorTo(this,V,X,j)}moveCursor(V,X,j){return(M\?\?=G(\"readline\")).moveCursor(this,V,X,j)}clearLine(V,X){return(M\?\?=G(\"readline\")).clearLine(this,V,X)}clearScreenDown(V){return(M\?\?=G(\"readline\")).clearScreenDown(this,V)}ref(){this.#H().ref()}unref(){this.#H().unref()}on(V,X){if(V===\"close\"||V===\"finish\")return this.#J(),this.#G.on(V,X);if(V===\"drain\")return super.on(\"drain\",X);if(V===\"error\")return super.on(\"error\",X);return super.on(V,X)}get _writableState(){return this.#J(),this.#G._writableState}get _readableState(){return this.#J(),this.#G._readableState}pipe(V){return this.#J(),this.#G.pipe(V)}unpipe(V){return this.#J(),this.#G.unpipe(V)}#J(){if(this.#G)return;this.#G=K(this.#$);const V=this.eventNames();for(let X of V)this.#G.on(X,(...j)=>{this.emit(X,...j)})}#K(V){var X=this.#H();const j=X.write(V);this.bytesWritten+=j;const B=X.flush(!1);return!!(j||B)}#L(V,X){if(!O(X))return this.#J(),this.#G.write(V,X);return this.#K(V)}#M(V,X){if(X)this.emit(\"error\",X);try{V(X\?X:null)}catch(j){this.emit(\"error\",j)}}#N(V,X,j){if(!O(X))return this.#J(),this.#G.write(V,X,j);var B=this.#H();const Z=B.write(V),Y=B.flush(!0);if(Y\?.then)return Y.then(()=>{this.#M(j),this.emit(\"drain\")},(P)=>this.#M(j,P)),!1;return queueMicrotask(()=>{this.#M(j)}),!!(Z||Y)}write(V,X,j){const B=this._write(V,X,j);if(B)this.emit(\"drain\");return B}get hasColors(){return @Bun.tty[this.#$].hasColors}_write(V,X,j){var B=this.#G;if(B)return B.write(V,X,j);switch(arguments.length){case 0:{var Z=new Error(\"Invalid arguments\");throw Z.code=\"ERR_INVALID_ARG_TYPE\",Z}case 1:return this.#K(V);case 2:if(typeof X===\"function\")return this.#N(V,\"\",X);else if(typeof X===\"string\")return this.#L(V,X);default:{if(typeof X!==\"undefined\"&&typeof X!==\"string\"||typeof j!==\"undefined\"&&typeof j!==\"function\"){var Z=new Error(\"Invalid arguments\");throw Z.code=\"ERR_INVALID_ARG_TYPE\",Z}if(typeof j===\"undefined\")return this.#L(V,X);return this.#N(V,X,j)}}}destroy(){return this}end(){return this}};return new Q(z)})\n"; // getStdinStream const JSC::ConstructAbility s_processObjectInternalsGetStdinStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -656,7 +656,7 @@ const JSC::ConstructorKind s_processObjectInternalsGetStdinStreamCodeConstructor const JSC::ImplementationVisibility s_processObjectInternalsGetStdinStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_processObjectInternalsGetStdinStreamCodeLength = 1861; static const JSC::Intrinsic s_processObjectInternalsGetStdinStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_processObjectInternalsGetStdinStreamCode = "(function (K){\"use strict\";var H=(I)=>{var N=@requireMap.get(I);if(N)return N.exports;return @internalRequire(I)},T={path:\"node:process\",require:H},{Duplex:M,eos:P,destroy:L}=H(\"node:stream\"),Q=class I extends M{#J;#j;#$;#G=!0;#H=!1;#K=!0;#z;#N;#B;get isTTY(){return H(\"tty\").isatty(K)}get fd(){return K}constructor(){super({readable:!0,writable:!0})}#I(N){const j=this.#N;if(this.#N=null,j)j(N);else if(N)this.destroy(N);else if(!this.#G&&!this.#K)this.destroy()}_destroy(N,j){if(!N&&this.#N!==null){var z=class B extends Error{constructor(G=\"The operation was aborted\",J=void 0){if(J!==void 0&&typeof J!==\"object\")throw new Error(`Invalid AbortError options:\\n\\n${JSON.stringify(J,null,2)}`);super(G,J);this.code=\"ABORT_ERR\",this.name=\"AbortError\"}};N=new z}if(this.#N===null)j(N);else if(this.#N=j,this.#$)L(this.#$,N)}setRawMode(N){}on(N,j){if(N===\"readable\")this.ref(),this.#H=!0;return super.on(N,j)}pause(){return this.unref(),super.pause()}resume(){return this.ref(),super.resume()}ref(){this.#J\?\?=@Bun.stdin.stream().getReader(),this.#j\?\?=setInterval(()=>{},1<<30)}unref(){if(this.#j)clearInterval(this.#j),this.#j=null}async#L(){try{var N,j;const z=this.#J.readMany();if(!z\?.then)({done:N,value:j}=z);else({done:N,value:j}=await z);if(!N){this.push(j[0]);const B=j.length;for(let G=1;G<B;G++)this.push(j[G])}else this.push(null),this.pause(),this.#G=!1,this.#I()}catch(z){this.#G=!1,this.#I(z)}}_read(N){if(this.#H)this.unref(),this.#H=!1;this.#L()}#M(){var{createWriteStream:N}=H(\"node:fs\"),j=this.#$=N(\"/dev/fd/0\");return j.on(\"finish\",()=>{if(this.#z){const z=this.#z;this.#z=null,z()}}),j.on(\"drain\",()=>{if(this.#B){const z=this.#B;this.#B=null,z()}}),P(j,(z)=>{if(this.#K=!1,z)L(j,z);this.#I(z)}),j}_write(N,j,z){var B=this.#$;if(!B)B=this.#M();if(B.write(N,j))z();else this.#B=z}_final(N){this.#$.end(),this.#z=(...j)=>N(...j)}};return new Q})\n"; +const char* const s_processObjectInternalsGetStdinStreamCode = "(function (N){\"use strict\";var j=(J)=>{var K=@requireMap.get(J);if(K)return K.exports;return @internalRequire(J)},z={path:\"node:process\",require:j},{Duplex:B,eos:G,destroy:H}=j(\"node:stream\"),I=class J extends B{#$;#N;#j;#z=!0;#B=!1;#G=!0;#H;#I;#J;get isTTY(){return j(\"tty\").isatty(N)}get fd(){return N}constructor(){super({readable:!0,writable:!0})}#K(K){const L=this.#I;if(this.#I=null,L)L(K);else if(K)this.destroy(K);else if(!this.#z&&!this.#G)this.destroy()}_destroy(K,L){if(!K&&this.#I!==null){var M=class P extends Error{constructor(Q=\"The operation was aborted\",T=void 0){if(T!==void 0&&typeof T!==\"object\")throw new Error(`Invalid AbortError options:\\n\\n${JSON.stringify(T,null,2)}`);super(Q,T);this.code=\"ABORT_ERR\",this.name=\"AbortError\"}};K=new M}if(this.#I===null)L(K);else if(this.#I=L,this.#j)H(this.#j,K)}setRawMode(K){}on(K,L){if(K===\"readable\")this.ref(),this.#B=!0;return super.on(K,L)}pause(){return this.unref(),super.pause()}resume(){return this.ref(),super.resume()}ref(){this.#$\?\?=@Bun.stdin.stream().getReader(),this.#N\?\?=setInterval(()=>{},1<<30)}unref(){if(this.#N)clearInterval(this.#N),this.#N=null}async#L(){try{var K,L;const M=this.#$.readMany();if(!M\?.then)({done:K,value:L}=M);else({done:K,value:L}=await M);if(!K){this.push(L[0]);const P=L.length;for(let Q=1;Q<P;Q++)this.push(L[Q])}else this.push(null),this.pause(),this.#z=!1,this.#K()}catch(M){this.#z=!1,this.#K(M)}}_read(K){if(this.#B)this.unref(),this.#B=!1;this.#L()}#M(){var{createWriteStream:K}=j(\"node:fs\"),L=this.#j=K(\"/dev/fd/0\");return L.on(\"finish\",()=>{if(this.#H){const M=this.#H;this.#H=null,M()}}),L.on(\"drain\",()=>{if(this.#J){const M=this.#J;this.#J=null,M()}}),G(L,(M)=>{if(this.#G=!1,M)H(L,M);this.#K(M)}),L}_write(K,L,M){var P=this.#j;if(!P)P=this.#M();if(P.write(K,L))M();else this.#J=M}_final(K){this.#j.end(),this.#H=(...L)=>K(...L)}};return new I})\n"; #define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \ @@ -674,7 +674,7 @@ const JSC::ConstructorKind s_transformStreamInitializeTransformStreamCodeConstru const JSC::ImplementationVisibility s_transformStreamInitializeTransformStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInitializeTransformStreamCodeLength = 1304; static const JSC::Intrinsic s_transformStreamInitializeTransformStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInitializeTransformStreamCode = "(function (){\"use strict\";let _=arguments[0];if(@isObject(_)&&@getByIdDirectPrivate(_,\"TransformStream\"))return this;let j=arguments[1],q=arguments[2];if(_===@undefined)_=null;if(q===@undefined)q={};if(j===@undefined)j={};let u={};if(_!==null){if(\"start\"in _){if(u.start=_.start,typeof u.start!==\"function\")@throwTypeError(\"transformer.start should be a function\")}if(\"transform\"in _){if(u.transform=_.transform,typeof u.transform!==\"function\")@throwTypeError(\"transformer.transform should be a function\")}if(\"flush\"in _){if(u.flush=_.flush,typeof u.flush!==\"function\")@throwTypeError(\"transformer.flush should be a function\")}if(\"readableType\"in _)@throwRangeError(\"TransformStream transformer has a readableType\");if(\"writableType\"in _)@throwRangeError(\"TransformStream transformer has a writableType\")}const x=@extractHighWaterMark(q,0),B=@extractSizeAlgorithm(q),E=@extractHighWaterMark(j,1),F=@extractSizeAlgorithm(j),v=@newPromiseCapability(@Promise);if(@initializeTransformStream(this,v.@promise,E,F,x,B),@setUpTransformStreamDefaultControllerFromTransformer(this,_,u),(\"start\"in u)){const G=@getByIdDirectPrivate(this,\"controller\");(()=>@promiseInvokeOrNoopMethodNoCatch(_,u.start,[G]))().@then(()=>{v.@resolve.@call()},(I)=>{v.@reject.@call(@undefined,I)})}else v.@resolve.@call();return this})\n"; +const char* const s_transformStreamInitializeTransformStreamCode = "(function (){\"use strict\";let j=arguments[0];if(@isObject(j)&&@getByIdDirectPrivate(j,\"TransformStream\"))return this;let q=arguments[1],v=arguments[2];if(j===@undefined)j=null;if(v===@undefined)v={};if(q===@undefined)q={};let x={};if(j!==null){if(\"start\"in j){if(x.start=j.start,typeof x.start!==\"function\")@throwTypeError(\"transformer.start should be a function\")}if(\"transform\"in j){if(x.transform=j.transform,typeof x.transform!==\"function\")@throwTypeError(\"transformer.transform should be a function\")}if(\"flush\"in j){if(x.flush=j.flush,typeof x.flush!==\"function\")@throwTypeError(\"transformer.flush should be a function\")}if(\"readableType\"in j)@throwRangeError(\"TransformStream transformer has a readableType\");if(\"writableType\"in j)@throwRangeError(\"TransformStream transformer has a writableType\")}const B=@extractHighWaterMark(v,0),E=@extractSizeAlgorithm(v),F=@extractHighWaterMark(q,1),G=@extractSizeAlgorithm(q),I=@newPromiseCapability(@Promise);if(@initializeTransformStream(this,I.@promise,F,G,B,E),@setUpTransformStreamDefaultControllerFromTransformer(this,j,x),(\"start\"in x)){const J=@getByIdDirectPrivate(this,\"controller\");(()=>@promiseInvokeOrNoopMethodNoCatch(j,x.start,[J]))().@then(()=>{I.@resolve.@call()},(u)=>{I.@reject.@call(@undefined,u)})}else I.@resolve.@call();return this})\n"; // readable const JSC::ConstructAbility s_transformStreamReadableCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -716,7 +716,7 @@ const JSC::ConstructorKind s_moduleRequireCodeConstructorKind = JSC::Constructor const JSC::ImplementationVisibility s_moduleRequireCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_moduleRequireCodeLength = 1035; static const JSC::Intrinsic s_moduleRequireCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_moduleRequireCode = "(function (_){\"use strict\";const b=@requireMap.@get(_)||@requireMap.@get(_=@resolveSync(_,this.path,!1));if(b)return @evaluateCommonJSModule(b),b.exports;if(_.endsWith(\".json\")||_.endsWith(\".toml\")||_.endsWith(\".node\"))return @internalRequire(_);let S=@Loader.registry.@get(_);if(S\?.evaluated&&(S.state\?\?0)>=@ModuleReady){const M=S.module,f=@Loader.getModuleNamespaceObject(M),r=f\?.[@commonJSSymbol]===0||f\?.default\?.[@commonJSSymbol]===0\?f.default:f.__esModule\?f:Object.create(f,{__esModule:{value:!0}});return @requireMap.@set(_,@createCommonJSModule(_,r,!0)),r}const L=@createCommonJSModule(_,{},!1);@requireMap.@set(_,L);var h=this.@require(_,L);if(h===-1){try{h=@requireESM(_)}catch(M){throw @requireMap.@delete(_),M}if(S=@Loader.registry.@get(_),S\?.evaluated&&(S.state\?\?0)>=@ModuleReady){const M=@Loader.getModuleNamespaceObject(S.module);return L.exports=M\?.[@commonJSSymbol]===0||M\?.default\?.[@commonJSSymbol]===0\?M.default:M.__esModule\?M:Object.create(M,{__esModule:{value:!0}})}}return @evaluateCommonJSModule(L),L.exports})\n"; +const char* const s_moduleRequireCode = "(function (_){\"use strict\";const M=@requireMap.@get(_)||@requireMap.@get(_=@resolveSync(_,this.path,!1));if(M)return @evaluateCommonJSModule(M),M.exports;if(_.endsWith(\".json\")||_.endsWith(\".toml\")||_.endsWith(\".node\"))return @internalRequire(_);let S=@Loader.registry.@get(_);if(S\?.evaluated&&(S.state\?\?0)>=@ModuleReady){const b=S.module,h=@Loader.getModuleNamespaceObject(b),r=h\?.[@commonJSSymbol]===0||h\?.default\?.[@commonJSSymbol]===0\?h.default:h.__esModule\?h:Object.create(h,{__esModule:{value:!0}});return @requireMap.@set(_,@createCommonJSModule(_,r,!0)),r}const f=@createCommonJSModule(_,{},!1);@requireMap.@set(_,f);var L=this.@require(_,f);if(L===-1){try{L=@requireESM(_)}catch(b){throw @requireMap.@delete(_),b}if(S=@Loader.registry.@get(_),S\?.evaluated&&(S.state\?\?0)>=@ModuleReady){const b=@Loader.getModuleNamespaceObject(S.module);return f.exports=b\?.[@commonJSSymbol]===0||b\?.default\?.[@commonJSSymbol]===0\?b.default:b.__esModule\?b:Object.create(b,{__esModule:{value:!0}})}}return @evaluateCommonJSModule(f),f.exports})\n"; // requireResolve const JSC::ConstructAbility s_moduleRequireResolveCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -830,7 +830,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeReadIntLECodeConstructorKind = JSC const JSC::ImplementationVisibility s_jsBufferPrototypeReadIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeReadIntLECodeLength = 528; static const JSC::Intrinsic s_jsBufferPrototypeReadIntLECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeReadIntLECode = "(function (d,u){\"use strict\";const r=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(u){case 1:return r.getInt8(d);case 2:return r.getInt16(d,!0);case 3:{const _=r.getUint16(d,!0)+r.getUint8(d+2)*65536;return _|(_&8388608)*510}case 4:return r.getInt32(d,!0);case 5:{const _=r.getUint8(d+4);return(_|(_&128)*33554430)*4294967296+r.getUint32(d,!0)}case 6:{const _=r.getUint16(d+4,!0);return(_|(_&32768)*131070)*4294967296+r.getUint32(d,!0)}}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n"; +const char* const s_jsBufferPrototypeReadIntLECode = "(function (d,r){\"use strict\";const _=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(r){case 1:return _.getInt8(d);case 2:return _.getInt16(d,!0);case 3:{const u=_.getUint16(d,!0)+_.getUint8(d+2)*65536;return u|(u&8388608)*510}case 4:return _.getInt32(d,!0);case 5:{const u=_.getUint8(d+4);return(u|(u&128)*33554430)*4294967296+_.getUint32(d,!0)}case 6:{const u=_.getUint16(d+4,!0);return(u|(u&32768)*131070)*4294967296+_.getUint32(d,!0)}}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n"; // readIntBE const JSC::ConstructAbility s_jsBufferPrototypeReadIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -838,7 +838,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeReadIntBECodeConstructorKind = JSC const JSC::ImplementationVisibility s_jsBufferPrototypeReadIntBECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeReadIntBECodeLength = 528; static const JSC::Intrinsic s_jsBufferPrototypeReadIntBECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeReadIntBECode = "(function (r,c){\"use strict\";const d=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(c){case 1:return d.getInt8(r);case 2:return d.getInt16(r,!1);case 3:{const u=d.getUint16(r+1,!1)+d.getUint8(r)*65536;return u|(u&8388608)*510}case 4:return d.getInt32(r,!1);case 5:{const u=d.getUint8(r);return(u|(u&128)*33554430)*4294967296+d.getUint32(r+1,!1)}case 6:{const u=d.getUint16(r,!1);return(u|(u&32768)*131070)*4294967296+d.getUint32(r+2,!1)}}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n"; +const char* const s_jsBufferPrototypeReadIntBECode = "(function (r,d){\"use strict\";const u=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(d){case 1:return u.getInt8(r);case 2:return u.getInt16(r,!1);case 3:{const c=u.getUint16(r+1,!1)+u.getUint8(r)*65536;return c|(c&8388608)*510}case 4:return u.getInt32(r,!1);case 5:{const c=u.getUint8(r);return(c|(c&128)*33554430)*4294967296+u.getUint32(r+1,!1)}case 6:{const c=u.getUint16(r,!1);return(c|(c&32768)*131070)*4294967296+u.getUint32(r+2,!1)}}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n"; // readUIntLE const JSC::ConstructAbility s_jsBufferPrototypeReadUIntLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -846,7 +846,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeReadUIntLECodeConstructorKind = JS const JSC::ImplementationVisibility s_jsBufferPrototypeReadUIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeReadUIntLECodeLength = 445; static const JSC::Intrinsic s_jsBufferPrototypeReadUIntLECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeReadUIntLECode = "(function (a,r){\"use strict\";const d=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(r){case 1:return d.getUint8(a);case 2:return d.getUint16(a,!0);case 3:return d.getUint16(a,!0)+d.getUint8(a+2)*65536;case 4:return d.getUint32(a,!0);case 5:return d.getUint8(a+4)*4294967296+d.getUint32(a,!0);case 6:return d.getUint16(a+4,!0)*4294967296+d.getUint32(a,!0)}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n"; +const char* const s_jsBufferPrototypeReadUIntLECode = "(function (a,d){\"use strict\";const r=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(d){case 1:return r.getUint8(a);case 2:return r.getUint16(a,!0);case 3:return r.getUint16(a,!0)+r.getUint8(a+2)*65536;case 4:return r.getUint32(a,!0);case 5:return r.getUint8(a+4)*4294967296+r.getUint32(a,!0);case 6:return r.getUint16(a+4,!0)*4294967296+r.getUint32(a,!0)}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n"; // readUIntBE const JSC::ConstructAbility s_jsBufferPrototypeReadUIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -854,7 +854,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeReadUIntBECodeConstructorKind = JS const JSC::ImplementationVisibility s_jsBufferPrototypeReadUIntBECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeReadUIntBECodeLength = 504; static const JSC::Intrinsic s_jsBufferPrototypeReadUIntBECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeReadUIntBECode = "(function (d,p){\"use strict\";const r=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(p){case 1:return r.getUint8(d);case 2:return r.getUint16(d,!1);case 3:return r.getUint16(d+1,!1)+r.getUint8(d)*65536;case 4:return r.getUint32(d,!1);case 5:{const c=r.getUint8(d);return(c|(c&128)*33554430)*4294967296+r.getUint32(d+1,!1)}case 6:{const c=r.getUint16(d,!1);return(c|(c&32768)*131070)*4294967296+r.getUint32(d+2,!1)}}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n"; +const char* const s_jsBufferPrototypeReadUIntBECode = "(function (d,r){\"use strict\";const c=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(r){case 1:return c.getUint8(d);case 2:return c.getUint16(d,!1);case 3:return c.getUint16(d+1,!1)+c.getUint8(d)*65536;case 4:return c.getUint32(d,!1);case 5:{const p=c.getUint8(d);return(p|(p&128)*33554430)*4294967296+c.getUint32(d+1,!1)}case 6:{const p=c.getUint16(d,!1);return(p|(p&32768)*131070)*4294967296+c.getUint32(d+2,!1)}}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n"; // readFloatLE const JSC::ConstructAbility s_jsBufferPrototypeReadFloatLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -926,7 +926,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteInt8CodeConstructorKind = JSC const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt8CodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteInt8CodeLength = 131; static const JSC::Intrinsic s_jsBufferPrototypeWriteInt8CodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteInt8Code = "(function (r,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt8(d,r),d+1})\n"; +const char* const s_jsBufferPrototypeWriteInt8Code = "(function (d,r){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt8(r,d),r+1})\n"; // writeUInt8 const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt8CodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -934,7 +934,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt8CodeConstructorKind = JS const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt8CodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteUInt8CodeLength = 132; static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt8CodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteUInt8Code = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint8(c,d),c+1})\n"; +const char* const s_jsBufferPrototypeWriteUInt8Code = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint8(d,c),d+1})\n"; // writeInt16LE const JSC::ConstructAbility s_jsBufferPrototypeWriteInt16LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -942,7 +942,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteInt16LECodeConstructorKind = const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt16LECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteInt16LECodeLength = 135; static const JSC::Intrinsic s_jsBufferPrototypeWriteInt16LECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteInt16LECode = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt16(c,d,!0),c+2})\n"; +const char* const s_jsBufferPrototypeWriteInt16LECode = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt16(d,c,!0),d+2})\n"; // writeInt16BE const JSC::ConstructAbility s_jsBufferPrototypeWriteInt16BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -950,7 +950,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteInt16BECodeConstructorKind = const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt16BECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteInt16BECodeLength = 135; static const JSC::Intrinsic s_jsBufferPrototypeWriteInt16BECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteInt16BECode = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt16(c,d,!1),c+2})\n"; +const char* const s_jsBufferPrototypeWriteInt16BECode = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt16(d,c,!1),d+2})\n"; // writeUInt16LE const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt16LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -958,7 +958,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt16LECodeConstructorKind = const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt16LECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteUInt16LECodeLength = 136; static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt16LECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteUInt16LECode = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint16(c,d,!0),c+2})\n"; +const char* const s_jsBufferPrototypeWriteUInt16LECode = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint16(d,c,!0),d+2})\n"; // writeUInt16BE const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt16BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -966,7 +966,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt16BECodeConstructorKind = const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt16BECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteUInt16BECodeLength = 136; static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt16BECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteUInt16BECode = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint16(c,d,!1),c+2})\n"; +const char* const s_jsBufferPrototypeWriteUInt16BECode = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint16(d,c,!1),d+2})\n"; // writeInt32LE const JSC::ConstructAbility s_jsBufferPrototypeWriteInt32LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -974,7 +974,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteInt32LECodeConstructorKind = const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt32LECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteInt32LECodeLength = 135; static const JSC::Intrinsic s_jsBufferPrototypeWriteInt32LECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteInt32LECode = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt32(c,d,!0),c+4})\n"; +const char* const s_jsBufferPrototypeWriteInt32LECode = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt32(d,c,!0),d+4})\n"; // writeInt32BE const JSC::ConstructAbility s_jsBufferPrototypeWriteInt32BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -982,7 +982,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteInt32BECodeConstructorKind = const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt32BECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteInt32BECodeLength = 135; static const JSC::Intrinsic s_jsBufferPrototypeWriteInt32BECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteInt32BECode = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt32(c,d,!1),c+4})\n"; +const char* const s_jsBufferPrototypeWriteInt32BECode = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt32(d,c,!1),d+4})\n"; // writeUInt32LE const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt32LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -990,7 +990,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt32LECodeConstructorKind = const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt32LECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteUInt32LECodeLength = 136; static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt32LECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteUInt32LECode = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint32(c,d,!0),c+4})\n"; +const char* const s_jsBufferPrototypeWriteUInt32LECode = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint32(d,c,!0),d+4})\n"; // writeUInt32BE const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt32BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -998,7 +998,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteUInt32BECodeConstructorKind = const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUInt32BECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteUInt32BECodeLength = 136; static const JSC::Intrinsic s_jsBufferPrototypeWriteUInt32BECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteUInt32BECode = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint32(c,d,!1),c+4})\n"; +const char* const s_jsBufferPrototypeWriteUInt32BECode = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setUint32(d,c,!1),d+4})\n"; // writeIntLE const JSC::ConstructAbility s_jsBufferPrototypeWriteIntLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1006,7 +1006,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteIntLECodeConstructorKind = JS const JSC::ImplementationVisibility s_jsBufferPrototypeWriteIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteIntLECodeLength = 573; static const JSC::Intrinsic s_jsBufferPrototypeWriteIntLECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteIntLECode = "(function (r,d,j){\"use strict\";const c=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(j){case 1:{c.setInt8(d,r);break}case 2:{c.setInt16(d,r,!0);break}case 3:{c.setUint16(d,r&65535,!0),c.setInt8(d+2,Math.floor(r*0.0000152587890625));break}case 4:{c.setInt32(d,r,!0);break}case 5:{c.setUint32(d,r|0,!0),c.setInt8(d+4,Math.floor(r*0.00000000023283064365386964));break}case 6:{c.setUint32(d,r|0,!0),c.setInt16(d+4,Math.floor(r*0.00000000023283064365386964),!0);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return d+j})\n"; +const char* const s_jsBufferPrototypeWriteIntLECode = "(function (d,r,c){\"use strict\";const j=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(c){case 1:{j.setInt8(r,d);break}case 2:{j.setInt16(r,d,!0);break}case 3:{j.setUint16(r,d&65535,!0),j.setInt8(r+2,Math.floor(d*0.0000152587890625));break}case 4:{j.setInt32(r,d,!0);break}case 5:{j.setUint32(r,d|0,!0),j.setInt8(r+4,Math.floor(d*0.00000000023283064365386964));break}case 6:{j.setUint32(r,d|0,!0),j.setInt16(r+4,Math.floor(d*0.00000000023283064365386964),!0);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return r+c})\n"; // writeIntBE const JSC::ConstructAbility s_jsBufferPrototypeWriteIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1014,7 +1014,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteIntBECodeConstructorKind = JS const JSC::ImplementationVisibility s_jsBufferPrototypeWriteIntBECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteIntBECodeLength = 573; static const JSC::Intrinsic s_jsBufferPrototypeWriteIntBECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteIntBECode = "(function (r,d,c){\"use strict\";const E=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(c){case 1:{E.setInt8(d,r);break}case 2:{E.setInt16(d,r,!1);break}case 3:{E.setUint16(d+1,r&65535,!1),E.setInt8(d,Math.floor(r*0.0000152587890625));break}case 4:{E.setInt32(d,r,!1);break}case 5:{E.setUint32(d+1,r|0,!1),E.setInt8(d,Math.floor(r*0.00000000023283064365386964));break}case 6:{E.setUint32(d+2,r|0,!1),E.setInt16(d,Math.floor(r*0.00000000023283064365386964),!1);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return d+c})\n"; +const char* const s_jsBufferPrototypeWriteIntBECode = "(function (d,r,E){\"use strict\";const c=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(E){case 1:{c.setInt8(r,d);break}case 2:{c.setInt16(r,d,!1);break}case 3:{c.setUint16(r+1,d&65535,!1),c.setInt8(r,Math.floor(d*0.0000152587890625));break}case 4:{c.setInt32(r,d,!1);break}case 5:{c.setUint32(r+1,d|0,!1),c.setInt8(r,Math.floor(d*0.00000000023283064365386964));break}case 6:{c.setUint32(r+2,d|0,!1),c.setInt16(r,Math.floor(d*0.00000000023283064365386964),!1);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return r+E})\n"; // writeUIntLE const JSC::ConstructAbility s_jsBufferPrototypeWriteUIntLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1022,7 +1022,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteUIntLECodeConstructorKind = J const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteUIntLECodeLength = 579; static const JSC::Intrinsic s_jsBufferPrototypeWriteUIntLECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteUIntLECode = "(function (r,d,c){\"use strict\";const E=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(c){case 1:{E.setUint8(d,r);break}case 2:{E.setUint16(d,r,!0);break}case 3:{E.setUint16(d,r&65535,!0),E.setUint8(d+2,Math.floor(r*0.0000152587890625));break}case 4:{E.setUint32(d,r,!0);break}case 5:{E.setUint32(d,r|0,!0),E.setUint8(d+4,Math.floor(r*0.00000000023283064365386964));break}case 6:{E.setUint32(d,r|0,!0),E.setUint16(d+4,Math.floor(r*0.00000000023283064365386964),!0);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return d+c})\n"; +const char* const s_jsBufferPrototypeWriteUIntLECode = "(function (d,r,E){\"use strict\";const c=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(E){case 1:{c.setUint8(r,d);break}case 2:{c.setUint16(r,d,!0);break}case 3:{c.setUint16(r,d&65535,!0),c.setUint8(r+2,Math.floor(d*0.0000152587890625));break}case 4:{c.setUint32(r,d,!0);break}case 5:{c.setUint32(r,d|0,!0),c.setUint8(r+4,Math.floor(d*0.00000000023283064365386964));break}case 6:{c.setUint32(r,d|0,!0),c.setUint16(r+4,Math.floor(d*0.00000000023283064365386964),!0);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return r+E})\n"; // writeUIntBE const JSC::ConstructAbility s_jsBufferPrototypeWriteUIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1030,7 +1030,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteUIntBECodeConstructorKind = J const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUIntBECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteUIntBECodeLength = 579; static const JSC::Intrinsic s_jsBufferPrototypeWriteUIntBECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteUIntBECode = "(function (r,d,_){\"use strict\";const p=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(_){case 1:{p.setUint8(d,r);break}case 2:{p.setUint16(d,r,!1);break}case 3:{p.setUint16(d+1,r&65535,!1),p.setUint8(d,Math.floor(r*0.0000152587890625));break}case 4:{p.setUint32(d,r,!1);break}case 5:{p.setUint32(d+1,r|0,!1),p.setUint8(d,Math.floor(r*0.00000000023283064365386964));break}case 6:{p.setUint32(d+2,r|0,!1),p.setUint16(d,Math.floor(r*0.00000000023283064365386964),!1);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return d+_})\n"; +const char* const s_jsBufferPrototypeWriteUIntBECode = "(function (d,r,p){\"use strict\";const _=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(p){case 1:{_.setUint8(r,d);break}case 2:{_.setUint16(r,d,!1);break}case 3:{_.setUint16(r+1,d&65535,!1),_.setUint8(r,Math.floor(d*0.0000152587890625));break}case 4:{_.setUint32(r,d,!1);break}case 5:{_.setUint32(r+1,d|0,!1),_.setUint8(r,Math.floor(d*0.00000000023283064365386964));break}case 6:{_.setUint32(r+2,d|0,!1),_.setUint16(r,Math.floor(d*0.00000000023283064365386964),!1);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return r+p})\n"; // writeFloatLE const JSC::ConstructAbility s_jsBufferPrototypeWriteFloatLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1038,7 +1038,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteFloatLECodeConstructorKind = const JSC::ImplementationVisibility s_jsBufferPrototypeWriteFloatLECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteFloatLECodeLength = 137; static const JSC::Intrinsic s_jsBufferPrototypeWriteFloatLECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteFloatLECode = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat32(c,d,!0),c+4})\n"; +const char* const s_jsBufferPrototypeWriteFloatLECode = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat32(d,c,!0),d+4})\n"; // writeFloatBE const JSC::ConstructAbility s_jsBufferPrototypeWriteFloatBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1046,7 +1046,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteFloatBECodeConstructorKind = const JSC::ImplementationVisibility s_jsBufferPrototypeWriteFloatBECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteFloatBECodeLength = 137; static const JSC::Intrinsic s_jsBufferPrototypeWriteFloatBECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteFloatBECode = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat32(c,d,!1),c+4})\n"; +const char* const s_jsBufferPrototypeWriteFloatBECode = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat32(d,c,!1),d+4})\n"; // writeDoubleLE const JSC::ConstructAbility s_jsBufferPrototypeWriteDoubleLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1054,7 +1054,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteDoubleLECodeConstructorKind = const JSC::ImplementationVisibility s_jsBufferPrototypeWriteDoubleLECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteDoubleLECodeLength = 137; static const JSC::Intrinsic s_jsBufferPrototypeWriteDoubleLECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteDoubleLECode = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat64(c,d,!0),c+8})\n"; +const char* const s_jsBufferPrototypeWriteDoubleLECode = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat64(d,c,!0),d+8})\n"; // writeDoubleBE const JSC::ConstructAbility s_jsBufferPrototypeWriteDoubleBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1062,7 +1062,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteDoubleBECodeConstructorKind = const JSC::ImplementationVisibility s_jsBufferPrototypeWriteDoubleBECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteDoubleBECodeLength = 137; static const JSC::Intrinsic s_jsBufferPrototypeWriteDoubleBECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteDoubleBECode = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat64(c,d,!1),c+8})\n"; +const char* const s_jsBufferPrototypeWriteDoubleBECode = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setFloat64(d,c,!1),d+8})\n"; // writeBigInt64LE const JSC::ConstructAbility s_jsBufferPrototypeWriteBigInt64LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1070,7 +1070,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteBigInt64LECodeConstructorKind const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigInt64LECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteBigInt64LECodeLength = 138; static const JSC::Intrinsic s_jsBufferPrototypeWriteBigInt64LECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteBigInt64LECode = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigInt64(c,d,!0),c+8})\n"; +const char* const s_jsBufferPrototypeWriteBigInt64LECode = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigInt64(d,c,!0),d+8})\n"; // writeBigInt64BE const JSC::ConstructAbility s_jsBufferPrototypeWriteBigInt64BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1078,7 +1078,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteBigInt64BECodeConstructorKind const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigInt64BECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteBigInt64BECodeLength = 138; static const JSC::Intrinsic s_jsBufferPrototypeWriteBigInt64BECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteBigInt64BECode = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigInt64(c,d,!1),c+8})\n"; +const char* const s_jsBufferPrototypeWriteBigInt64BECode = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigInt64(d,c,!1),d+8})\n"; // writeBigUInt64LE const JSC::ConstructAbility s_jsBufferPrototypeWriteBigUInt64LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1086,7 +1086,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteBigUInt64LECodeConstructorKin const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigUInt64LECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteBigUInt64LECodeLength = 139; static const JSC::Intrinsic s_jsBufferPrototypeWriteBigUInt64LECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteBigUInt64LECode = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigUint64(c,d,!0),c+8})\n"; +const char* const s_jsBufferPrototypeWriteBigUInt64LECode = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigUint64(d,c,!0),d+8})\n"; // writeBigUInt64BE const JSC::ConstructAbility s_jsBufferPrototypeWriteBigUInt64BECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1094,7 +1094,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteBigUInt64BECodeConstructorKin const JSC::ImplementationVisibility s_jsBufferPrototypeWriteBigUInt64BECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteBigUInt64BECodeLength = 139; static const JSC::Intrinsic s_jsBufferPrototypeWriteBigUInt64BECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteBigUInt64BECode = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigUint64(c,d,!1),c+8})\n"; +const char* const s_jsBufferPrototypeWriteBigUInt64BECode = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setBigUint64(d,c,!1),d+8})\n"; // utf8Write const JSC::ConstructAbility s_jsBufferPrototypeUtf8WriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1118,7 +1118,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeUtf16leWriteCodeConstructorKind = const JSC::ImplementationVisibility s_jsBufferPrototypeUtf16leWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeUtf16leWriteCodeLength = 68; static const JSC::Intrinsic s_jsBufferPrototypeUtf16leWriteCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeUtf16leWriteCode = "(function (d,r,a){\"use strict\";return this.write(d,r,a,\"utf16le\")})\n"; +const char* const s_jsBufferPrototypeUtf16leWriteCode = "(function (r,d,a){\"use strict\";return this.write(r,d,a,\"utf16le\")})\n"; // latin1Write const JSC::ConstructAbility s_jsBufferPrototypeLatin1WriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1238,7 +1238,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeSliceCodeConstructorKind = JSC::Co const JSC::ImplementationVisibility s_jsBufferPrototypeSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeSliceCodeLength = 260; static const JSC::Intrinsic s_jsBufferPrototypeSliceCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeSliceCode = "(function (w,m){\"use strict\";var{buffer:x,byteOffset:z,byteLength:p}=this;function q(c,k){if(c=@trunc(c),c===0||@isNaN(c))return 0;else if(c<0)return c+=k,c>0\?c:0;else return c<k\?c:k}var i=q(w,p),v=m!==@undefined\?q(m,p):p;return new @Buffer(x,z+i,v>i\?v-i:0)})\n"; +const char* const s_jsBufferPrototypeSliceCode = "(function (i,q){\"use strict\";var{buffer:c,byteOffset:v,byteLength:p}=this;function w(z,m){if(z=@trunc(z),z===0||@isNaN(z))return 0;else if(z<0)return z+=m,z>0\?z:0;else return z<m\?z:m}var k=w(i,p),x=q!==@undefined\?w(q,p):p;return new @Buffer(c,v+k,x>k\?x-k:0)})\n"; // parent const JSC::ConstructAbility s_jsBufferPrototypeParentCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1312,7 +1312,7 @@ const JSC::ConstructorKind s_readableByteStreamControllerByobRequestCodeConstruc const JSC::ImplementationVisibility s_readableByteStreamControllerByobRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamControllerByobRequestCodeLength = 523; static const JSC::Intrinsic s_readableByteStreamControllerByobRequestCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamControllerByobRequestCode = "(function (){\"use strict\";if(!@isReadableByteStreamController(this))throw @makeGetterTypeError(\"ReadableByteStreamController\",\"byobRequest\");var a=@getByIdDirectPrivate(this,\"byobRequest\");if(a===@undefined){var l=@getByIdDirectPrivate(this,\"pendingPullIntos\");const _=l.peek();if(_){const m=new @Uint8Array(_.buffer,_.byteOffset+_.bytesFilled,_.byteLength-_.bytesFilled);@putByIdDirectPrivate(this,\"byobRequest\",new @ReadableStreamBYOBRequest(this,m,@isReadableStream))}}return @getByIdDirectPrivate(this,\"byobRequest\")})\n"; +const char* const s_readableByteStreamControllerByobRequestCode = "(function (){\"use strict\";if(!@isReadableByteStreamController(this))throw @makeGetterTypeError(\"ReadableByteStreamController\",\"byobRequest\");var _=@getByIdDirectPrivate(this,\"byobRequest\");if(_===@undefined){var a=@getByIdDirectPrivate(this,\"pendingPullIntos\");const l=a.peek();if(l){const m=new @Uint8Array(l.buffer,l.byteOffset+l.bytesFilled,l.byteLength-l.bytesFilled);@putByIdDirectPrivate(this,\"byobRequest\",new @ReadableStreamBYOBRequest(this,m,@isReadableStream))}}return @getByIdDirectPrivate(this,\"byobRequest\")})\n"; // desiredSize const JSC::ConstructAbility s_readableByteStreamControllerDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1338,7 +1338,7 @@ const JSC::ConstructorKind s_consoleObjectAsyncIteratorCodeConstructorKind = JSC const JSC::ImplementationVisibility s_consoleObjectAsyncIteratorCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_consoleObjectAsyncIteratorCodeLength = 577; static const JSC::Intrinsic s_consoleObjectAsyncIteratorCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_consoleObjectAsyncIteratorCode = "(function (){\"use strict\";const D=async function*L(){var F=@Bun.stdin.stream().getReader(),G=new globalThis.TextDecoder(\"utf-8\",{fatal:!1}),z,H=@Bun.indexOfLine;try{while(!0){var A,B,w;const m=F.readMany();if(@isPromise(m))({done:A,value:B}=await m);else({done:A,value:B}=m);if(A){if(w)yield G.decode(w);return}var _;for(let J of B){if(_=J,w)_=@Buffer.concat([w,J]),w=null;var j=0,q=H(_,j);while(q!==-1)yield G.decode(_.subarray(j,q)),j=q+1,q=H(_,j);w=_.subarray(j)}}}catch(m){z=m}finally{if(F.releaseLock(),z)throw z}},K=globalThis.Symbol.asyncIterator;return this[K]=D,D()})\n"; +const char* const s_consoleObjectAsyncIteratorCode = "(function (){\"use strict\";const w=async function*_(){var G=@Bun.stdin.stream().getReader(),B=new globalThis.TextDecoder(\"utf-8\",{fatal:!1}),H,J=@Bun.indexOfLine;try{while(!0){var j,D,K;const q=G.readMany();if(@isPromise(q))({done:j,value:D}=await q);else({done:j,value:D}=q);if(j){if(K)yield B.decode(K);return}var m;for(let M of D){if(m=M,K)m=@Buffer.concat([K,M]),K=null;var L=0,F=J(m,L);while(F!==-1)yield B.decode(m.subarray(L,F)),L=F+1,F=J(m,L);K=m.subarray(L)}}}catch(q){H=q}finally{if(G.releaseLock(),H)throw H}},z=globalThis.Symbol.asyncIterator;return this[z]=w,w()})\n"; // write const JSC::ConstructAbility s_consoleObjectWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1346,7 +1346,7 @@ const JSC::ConstructorKind s_consoleObjectWriteCodeConstructorKind = JSC::Constr const JSC::ImplementationVisibility s_consoleObjectWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_consoleObjectWriteCodeLength = 310; static const JSC::Intrinsic s_consoleObjectWriteCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_consoleObjectWriteCode = "(function (_){\"use strict\";var a=@getByIdDirectPrivate(this,\"writer\");if(!a){var b=@toLength(_\?.length\?\?0);a=@Bun.stdout.writer({highWaterMark:b>65536\?b:65536}),@putByIdDirectPrivate(this,\"writer\",a)}var c=a.write(_);const f=@argumentCount();for(var d=1;d<f;d++)c+=a.write(@argument(d));return a.flush(!0),c})\n"; +const char* const s_consoleObjectWriteCode = "(function (d){\"use strict\";var _=@getByIdDirectPrivate(this,\"writer\");if(!_){var b=@toLength(d\?.length\?\?0);_=@Bun.stdout.writer({highWaterMark:b>65536\?b:65536}),@putByIdDirectPrivate(this,\"writer\",_)}var c=_.write(d);const f=@argumentCount();for(var a=1;a<f;a++)c+=_.write(@argument(a));return _.flush(!0),c})\n"; #define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \ @@ -1364,7 +1364,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamReaderGenericI const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamReaderGenericInitializeCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamReaderGenericInitializeCodeLength = 585; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamReaderGenericInitializeCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamReaderGenericInitializeCode = "(function (_,i){\"use strict\";if(@putByIdDirectPrivate(_,\"ownerReadableStream\",i),@putByIdDirectPrivate(i,\"reader\",_),@getByIdDirectPrivate(i,\"state\")===@streamReadable)@putByIdDirectPrivate(_,\"closedPromiseCapability\",@newPromiseCapability(@Promise));else if(@getByIdDirectPrivate(i,\"state\")===@streamClosed)@putByIdDirectPrivate(_,\"closedPromiseCapability\",{@promise:@Promise.@resolve()});else @assert(@getByIdDirectPrivate(i,\"state\")===@streamErrored),@putByIdDirectPrivate(_,\"closedPromiseCapability\",{@promise:@newHandledRejectedPromise(@getByIdDirectPrivate(i,\"storedError\"))})})\n"; +const char* const s_readableStreamInternalsReadableStreamReaderGenericInitializeCode = "(function (i,_){\"use strict\";if(@putByIdDirectPrivate(i,\"ownerReadableStream\",_),@putByIdDirectPrivate(_,\"reader\",i),@getByIdDirectPrivate(_,\"state\")===@streamReadable)@putByIdDirectPrivate(i,\"closedPromiseCapability\",@newPromiseCapability(@Promise));else if(@getByIdDirectPrivate(_,\"state\")===@streamClosed)@putByIdDirectPrivate(i,\"closedPromiseCapability\",{@promise:@Promise.@resolve()});else @assert(@getByIdDirectPrivate(_,\"state\")===@streamErrored),@putByIdDirectPrivate(i,\"closedPromiseCapability\",{@promise:@newHandledRejectedPromise(@getByIdDirectPrivate(_,\"storedError\"))})})\n"; // privateInitializeReadableStreamDefaultController const JSC::ConstructAbility s_readableStreamInternalsPrivateInitializeReadableStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1380,7 +1380,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControl const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamDefaultControllerErrorCodeLength = 223; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerErrorCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamDefaultControllerErrorCode = "(function (i,d){\"use strict\";const u=@getByIdDirectPrivate(i,\"controlledReadableStream\");if(@getByIdDirectPrivate(u,\"state\")!==@streamReadable)return;@putByIdDirectPrivate(i,\"queue\",@newQueue()),@readableStreamError(u,d)})\n"; +const char* const s_readableStreamInternalsReadableStreamDefaultControllerErrorCode = "(function (i,u){\"use strict\";const d=@getByIdDirectPrivate(i,\"controlledReadableStream\");if(@getByIdDirectPrivate(d,\"state\")!==@streamReadable)return;@putByIdDirectPrivate(i,\"queue\",@newQueue()),@readableStreamError(d,u)})\n"; // readableStreamPipeTo const JSC::ConstructAbility s_readableStreamInternalsReadableStreamPipeToCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1388,7 +1388,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamPipeToCodeCons const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamPipeToCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamPipeToCodeLength = 427; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamPipeToCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamPipeToCode = "(function (g,c){\"use strict\";@assert(@isReadableStream(g));const h=new @ReadableStreamDefaultReader(g);@getByIdDirectPrivate(h,\"closedPromiseCapability\").@promise.@then(()=>{},(_)=>{c.error(_)});function y(){@readableStreamDefaultReaderRead(h).@then(function(_){if(_.done){c.close();return}try{c.enqueue(_.value)}catch(S){c.error(\"ReadableStream chunk enqueueing in the sink failed\");return}y()},function(_){c.error(_)})}y()})\n"; +const char* const s_readableStreamInternalsReadableStreamPipeToCode = "(function (_,h){\"use strict\";@assert(@isReadableStream(_));const y=new @ReadableStreamDefaultReader(_);@getByIdDirectPrivate(y,\"closedPromiseCapability\").@promise.@then(()=>{},(c)=>{h.error(c)});function S(){@readableStreamDefaultReaderRead(y).@then(function(c){if(c.done){h.close();return}try{h.enqueue(c.value)}catch(g){h.error(\"ReadableStream chunk enqueueing in the sink failed\");return}S()},function(c){h.error(c)})}S()})\n"; // acquireReadableStreamDefaultReader const JSC::ConstructAbility s_readableStreamInternalsAcquireReadableStreamDefaultReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1404,7 +1404,7 @@ const JSC::ConstructorKind s_readableStreamInternalsSetupReadableStreamDefaultCo const JSC::ImplementationVisibility s_readableStreamInternalsSetupReadableStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsSetupReadableStreamDefaultControllerCodeLength = 523; static const JSC::Intrinsic s_readableStreamInternalsSetupReadableStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsSetupReadableStreamDefaultControllerCode = "(function (b,f,j,q,D,v,w){\"use strict\";const _=new @ReadableStreamDefaultController(b,f,j,q,@isReadableStream),x=()=>@promiseInvokeOrNoopMethod(f,v,[_]),B=(C)=>@promiseInvokeOrNoopMethod(f,w,[C]);@putByIdDirectPrivate(_,\"pullAlgorithm\",x),@putByIdDirectPrivate(_,\"cancelAlgorithm\",B),@putByIdDirectPrivate(_,\"pull\",@readableStreamDefaultControllerPull),@putByIdDirectPrivate(_,\"cancel\",@readableStreamDefaultControllerCancel),@putByIdDirectPrivate(b,\"readableStreamController\",_),@readableStreamDefaultControllerStart(_)})\n"; +const char* const s_readableStreamInternalsSetupReadableStreamDefaultControllerCode = "(function (b,v,_,w,f,x,j){\"use strict\";const B=new @ReadableStreamDefaultController(b,v,_,w,@isReadableStream),C=()=>@promiseInvokeOrNoopMethod(v,x,[B]),q=(D)=>@promiseInvokeOrNoopMethod(v,j,[D]);@putByIdDirectPrivate(B,\"pullAlgorithm\",C),@putByIdDirectPrivate(B,\"cancelAlgorithm\",q),@putByIdDirectPrivate(B,\"pull\",@readableStreamDefaultControllerPull),@putByIdDirectPrivate(B,\"cancel\",@readableStreamDefaultControllerCancel),@putByIdDirectPrivate(b,\"readableStreamController\",B),@readableStreamDefaultControllerStart(B)})\n"; // createReadableStreamController const JSC::ConstructAbility s_readableStreamInternalsCreateReadableStreamControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1412,7 +1412,7 @@ const JSC::ConstructorKind s_readableStreamInternalsCreateReadableStreamControll const JSC::ImplementationVisibility s_readableStreamInternalsCreateReadableStreamControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsCreateReadableStreamControllerCodeLength = 671; static const JSC::Intrinsic s_readableStreamInternalsCreateReadableStreamControllerCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsCreateReadableStreamControllerCode = "(function (w,v,f){\"use strict\";const A=v.type,C=@toString(A);if(C===\"bytes\"){if(f.highWaterMark===@undefined)f.highWaterMark=0;if(f.size!==@undefined)@throwRangeError(\"Strategy for a ReadableByteStreamController cannot have a size\");@putByIdDirectPrivate(w,\"readableStreamController\",new @ReadableByteStreamController(w,v,f.highWaterMark,@isReadableStream))}else if(C===\"direct\"){var b=f\?.highWaterMark;@initializeArrayBufferStream.@call(w,v,b)}else if(A===@undefined){if(f.highWaterMark===@undefined)f.highWaterMark=1;@setupReadableStreamDefaultController(w,v,f.size,f.highWaterMark,v.start,v.pull,v.cancel)}else @throwRangeError(\"Invalid type for underlying source\")})\n"; +const char* const s_readableStreamInternalsCreateReadableStreamControllerCode = "(function (f,v,w){\"use strict\";const A=v.type,C=@toString(A);if(C===\"bytes\"){if(w.highWaterMark===@undefined)w.highWaterMark=0;if(w.size!==@undefined)@throwRangeError(\"Strategy for a ReadableByteStreamController cannot have a size\");@putByIdDirectPrivate(f,\"readableStreamController\",new @ReadableByteStreamController(f,v,w.highWaterMark,@isReadableStream))}else if(C===\"direct\"){var b=w\?.highWaterMark;@initializeArrayBufferStream.@call(f,v,b)}else if(A===@undefined){if(w.highWaterMark===@undefined)w.highWaterMark=1;@setupReadableStreamDefaultController(f,v,w.size,w.highWaterMark,v.start,v.pull,v.cancel)}else @throwRangeError(\"Invalid type for underlying source\")})\n"; // readableStreamDefaultControllerStart const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerStartCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1428,7 +1428,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamPipeToWritable const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamPipeToWritableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamPipeToWritableStreamCodeLength = 1631; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamPipeToWritableStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamPipeToWritableStreamCode = "(function (f,E,z,B,F,D){\"use strict\";if(@assert(@isReadableStream(f)),@assert(@isWritableStream(E)),@assert(!@isReadableStreamLocked(f)),@assert(!@isWritableStreamLocked(E)),@assert(D===@undefined||@isAbortSignal(D)),@getByIdDirectPrivate(f,\"underlyingByteSource\")!==@undefined)return @Promise.@reject(\"Piping to a readable bytestream is not supported\");let _={source:f,destination:E,preventAbort:B,preventCancel:F,preventClose:z,signal:D};if(_.reader=@acquireReadableStreamDefaultReader(f),_.writer=@acquireWritableStreamDefaultWriter(E),@putByIdDirectPrivate(f,\"disturbed\",!0),_.finalized=!1,_.shuttingDown=!1,_.promiseCapability=@newPromiseCapability(@Promise),_.pendingReadPromiseCapability=@newPromiseCapability(@Promise),_.pendingReadPromiseCapability.@resolve.@call(),_.pendingWritePromise=@Promise.@resolve(),D!==@undefined){const G=(T)=>{if(_.finalized)return;@pipeToShutdownWithAction(_,()=>{const H=!_.preventAbort&&@getByIdDirectPrivate(_.destination,\"state\")===\"writable\"\?@writableStreamAbort(_.destination,T):@Promise.@resolve(),I=!_.preventCancel&&@getByIdDirectPrivate(_.source,\"state\")===@streamReadable\?@readableStreamCancel(_.source,T):@Promise.@resolve();let k=@newPromiseCapability(@Promise),q=!0,w=()=>{if(q){q=!1;return}k.@resolve.@call()},x=(J)=>{k.@reject.@call(@undefined,J)};return H.@then(w,x),I.@then(w,x),k.@promise},T)};if(@whenSignalAborted(D,G))return _.promiseCapability.@promise}return @pipeToErrorsMustBePropagatedForward(_),@pipeToErrorsMustBePropagatedBackward(_),@pipeToClosingMustBePropagatedForward(_),@pipeToClosingMustBePropagatedBackward(_),@pipeToLoop(_),_.promiseCapability.@promise})\n"; +const char* const s_readableStreamInternalsReadableStreamPipeToWritableStreamCode = "(function (_,f,D,E,T,k){\"use strict\";if(@assert(@isReadableStream(_)),@assert(@isWritableStream(f)),@assert(!@isReadableStreamLocked(_)),@assert(!@isWritableStreamLocked(f)),@assert(k===@undefined||@isAbortSignal(k)),@getByIdDirectPrivate(_,\"underlyingByteSource\")!==@undefined)return @Promise.@reject(\"Piping to a readable bytestream is not supported\");let q={source:_,destination:f,preventAbort:E,preventCancel:T,preventClose:D,signal:k};if(q.reader=@acquireReadableStreamDefaultReader(_),q.writer=@acquireWritableStreamDefaultWriter(f),@putByIdDirectPrivate(_,\"disturbed\",!0),q.finalized=!1,q.shuttingDown=!1,q.promiseCapability=@newPromiseCapability(@Promise),q.pendingReadPromiseCapability=@newPromiseCapability(@Promise),q.pendingReadPromiseCapability.@resolve.@call(),q.pendingWritePromise=@Promise.@resolve(),k!==@undefined){const w=(x)=>{if(q.finalized)return;@pipeToShutdownWithAction(q,()=>{const B=!q.preventAbort&&@getByIdDirectPrivate(q.destination,\"state\")===\"writable\"\?@writableStreamAbort(q.destination,x):@Promise.@resolve(),G=!q.preventCancel&&@getByIdDirectPrivate(q.source,\"state\")===@streamReadable\?@readableStreamCancel(q.source,x):@Promise.@resolve();let H=@newPromiseCapability(@Promise),I=!0,J=()=>{if(I){I=!1;return}H.@resolve.@call()},K=(L)=>{H.@reject.@call(@undefined,L)};return B.@then(J,K),G.@then(J,K),H.@promise},x)};if(@whenSignalAborted(k,w))return q.promiseCapability.@promise}return @pipeToErrorsMustBePropagatedForward(q),@pipeToErrorsMustBePropagatedBackward(q),@pipeToClosingMustBePropagatedForward(q),@pipeToClosingMustBePropagatedBackward(q),@pipeToLoop(q),q.promiseCapability.@promise})\n"; // pipeToLoop const JSC::ConstructAbility s_readableStreamInternalsPipeToLoopCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1452,7 +1452,7 @@ const JSC::ConstructorKind s_readableStreamInternalsPipeToErrorsMustBePropagated const JSC::ImplementationVisibility s_readableStreamInternalsPipeToErrorsMustBePropagatedForwardCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsPipeToErrorsMustBePropagatedForwardCodeLength = 438; static const JSC::Intrinsic s_readableStreamInternalsPipeToErrorsMustBePropagatedForwardCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsPipeToErrorsMustBePropagatedForwardCode = "(function (_){\"use strict\";const d=()=>{_.pendingReadPromiseCapability.@resolve.@call(@undefined,!1);const b=@getByIdDirectPrivate(_.source,\"storedError\");if(!_.preventAbort){@pipeToShutdownWithAction(_,()=>@writableStreamAbort(_.destination,b),b);return}@pipeToShutdown(_,b)};if(@getByIdDirectPrivate(_.source,\"state\")===@streamErrored){d();return}@getByIdDirectPrivate(_.reader,\"closedPromiseCapability\").@promise.@then(@undefined,d)})\n"; +const char* const s_readableStreamInternalsPipeToErrorsMustBePropagatedForwardCode = "(function (_){\"use strict\";const b=()=>{_.pendingReadPromiseCapability.@resolve.@call(@undefined,!1);const d=@getByIdDirectPrivate(_.source,\"storedError\");if(!_.preventAbort){@pipeToShutdownWithAction(_,()=>@writableStreamAbort(_.destination,d),d);return}@pipeToShutdown(_,d)};if(@getByIdDirectPrivate(_.source,\"state\")===@streamErrored){b();return}@getByIdDirectPrivate(_.reader,\"closedPromiseCapability\").@promise.@then(@undefined,b)})\n"; // pipeToErrorsMustBePropagatedBackward const JSC::ConstructAbility s_readableStreamInternalsPipeToErrorsMustBePropagatedBackwardCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1460,7 +1460,7 @@ const JSC::ConstructorKind s_readableStreamInternalsPipeToErrorsMustBePropagated const JSC::ImplementationVisibility s_readableStreamInternalsPipeToErrorsMustBePropagatedBackwardCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsPipeToErrorsMustBePropagatedBackwardCodeLength = 369; static const JSC::Intrinsic s_readableStreamInternalsPipeToErrorsMustBePropagatedBackwardCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsPipeToErrorsMustBePropagatedBackwardCode = "(function (m){\"use strict\";const y=()=>{const h=@getByIdDirectPrivate(m.destination,\"storedError\");if(!m.preventCancel){@pipeToShutdownWithAction(m,()=>@readableStreamCancel(m.source,h),h);return}@pipeToShutdown(m,h)};if(@getByIdDirectPrivate(m.destination,\"state\")===\"errored\"){y();return}@getByIdDirectPrivate(m.writer,\"closedPromise\").@promise.@then(@undefined,y)})\n"; +const char* const s_readableStreamInternalsPipeToErrorsMustBePropagatedBackwardCode = "(function (m){\"use strict\";const h=()=>{const y=@getByIdDirectPrivate(m.destination,\"storedError\");if(!m.preventCancel){@pipeToShutdownWithAction(m,()=>@readableStreamCancel(m.source,y),y);return}@pipeToShutdown(m,y)};if(@getByIdDirectPrivate(m.destination,\"state\")===\"errored\"){h();return}@getByIdDirectPrivate(m.writer,\"closedPromise\").@promise.@then(@undefined,h)})\n"; // pipeToClosingMustBePropagatedForward const JSC::ConstructAbility s_readableStreamInternalsPipeToClosingMustBePropagatedForwardCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1484,7 +1484,7 @@ const JSC::ConstructorKind s_readableStreamInternalsPipeToShutdownWithActionCode const JSC::ImplementationVisibility s_readableStreamInternalsPipeToShutdownWithActionCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsPipeToShutdownWithActionCodeLength = 458; static const JSC::Intrinsic s_readableStreamInternalsPipeToShutdownWithActionCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsPipeToShutdownWithActionCode = "(function (_,d){\"use strict\";if(_.shuttingDown)return;_.shuttingDown=!0;const g=arguments.length>2,h=arguments[2],m=()=>{d().@then(()=>{if(g)@pipeToFinalize(_,h);else @pipeToFinalize(_)},(j)=>{@pipeToFinalize(_,j)})};if(@getByIdDirectPrivate(_.destination,\"state\")===\"writable\"&&!@writableStreamCloseQueuedOrInFlight(_.destination)){_.pendingReadPromiseCapability.@promise.@then(()=>{_.pendingWritePromise.@then(m,m)},(b)=>@pipeToFinalize(_,b));return}m()})\n"; +const char* const s_readableStreamInternalsPipeToShutdownWithActionCode = "(function (_,m){\"use strict\";if(_.shuttingDown)return;_.shuttingDown=!0;const b=arguments.length>2,d=arguments[2],g=()=>{m().@then(()=>{if(b)@pipeToFinalize(_,d);else @pipeToFinalize(_)},(j)=>{@pipeToFinalize(_,j)})};if(@getByIdDirectPrivate(_.destination,\"state\")===\"writable\"&&!@writableStreamCloseQueuedOrInFlight(_.destination)){_.pendingReadPromiseCapability.@promise.@then(()=>{_.pendingWritePromise.@then(g,g)},(h)=>@pipeToFinalize(_,h));return}g()})\n"; // pipeToShutdown const JSC::ConstructAbility s_readableStreamInternalsPipeToShutdownCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1492,7 +1492,7 @@ const JSC::ConstructorKind s_readableStreamInternalsPipeToShutdownCodeConstructo const JSC::ImplementationVisibility s_readableStreamInternalsPipeToShutdownCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsPipeToShutdownCodeLength = 411; static const JSC::Intrinsic s_readableStreamInternalsPipeToShutdownCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsPipeToShutdownCode = "(function (_){\"use strict\";if(_.shuttingDown)return;_.shuttingDown=!0;const m=arguments.length>1,u=arguments[1],d=()=>{if(m)@pipeToFinalize(_,u);else @pipeToFinalize(_)};if(@getByIdDirectPrivate(_.destination,\"state\")===\"writable\"&&!@writableStreamCloseQueuedOrInFlight(_.destination)){_.pendingReadPromiseCapability.@promise.@then(()=>{_.pendingWritePromise.@then(d,d)},(I)=>@pipeToFinalize(_,I));return}d()})\n"; +const char* const s_readableStreamInternalsPipeToShutdownCode = "(function (_){\"use strict\";if(_.shuttingDown)return;_.shuttingDown=!0;const d=arguments.length>1,m=arguments[1],u=()=>{if(d)@pipeToFinalize(_,m);else @pipeToFinalize(_)};if(@getByIdDirectPrivate(_.destination,\"state\")===\"writable\"&&!@writableStreamCloseQueuedOrInFlight(_.destination)){_.pendingReadPromiseCapability.@promise.@then(()=>{_.pendingWritePromise.@then(u,u)},(I)=>@pipeToFinalize(_,I));return}u()})\n"; // pipeToFinalize const JSC::ConstructAbility s_readableStreamInternalsPipeToFinalizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1508,7 +1508,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamTeeCodeConstru const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamTeeCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamTeeCodeLength = 1104; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamTeeCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamTeeCode = "(function (_,q){\"use strict\";@assert(@isReadableStream(_)),@assert(typeof q===\"boolean\");var v=@getByIdDirectPrivate(_,\"start\");if(v)@putByIdDirectPrivate(_,\"start\",@undefined),v();const w=new @ReadableStreamDefaultReader(_),i={closedOrErrored:!1,canceled1:!1,canceled2:!1,reason1:@undefined,reason2:@undefined};i.cancelPromiseCapability=@newPromiseCapability(@Promise);const x=@readableStreamTeePullFunction(i,w,q),f={};@putByIdDirectPrivate(f,\"pull\",x),@putByIdDirectPrivate(f,\"cancel\",@readableStreamTeeBranch1CancelFunction(i,_));const g={};@putByIdDirectPrivate(g,\"pull\",x),@putByIdDirectPrivate(g,\"cancel\",@readableStreamTeeBranch2CancelFunction(i,_));const j=new @ReadableStream(f),k=new @ReadableStream(g);return @getByIdDirectPrivate(w,\"closedPromiseCapability\").@promise.@then(@undefined,function(y){if(i.closedOrErrored)return;if(@readableStreamDefaultControllerError(j.@readableStreamController,y),@readableStreamDefaultControllerError(k.@readableStreamController,y),i.closedOrErrored=!0,!i.canceled1||!i.canceled2)i.cancelPromiseCapability.@resolve.@call()}),i.branch1=j,i.branch2=k,[j,k]})\n"; +const char* const s_readableStreamInternalsReadableStreamTeeCode = "(function (_,f){\"use strict\";@assert(@isReadableStream(_)),@assert(typeof f===\"boolean\");var g=@getByIdDirectPrivate(_,\"start\");if(g)@putByIdDirectPrivate(_,\"start\",@undefined),g();const j=new @ReadableStreamDefaultReader(_),k={closedOrErrored:!1,canceled1:!1,canceled2:!1,reason1:@undefined,reason2:@undefined};k.cancelPromiseCapability=@newPromiseCapability(@Promise);const q=@readableStreamTeePullFunction(k,j,f),v={};@putByIdDirectPrivate(v,\"pull\",q),@putByIdDirectPrivate(v,\"cancel\",@readableStreamTeeBranch1CancelFunction(k,_));const w={};@putByIdDirectPrivate(w,\"pull\",q),@putByIdDirectPrivate(w,\"cancel\",@readableStreamTeeBranch2CancelFunction(k,_));const x=new @ReadableStream(v),y=new @ReadableStream(w);return @getByIdDirectPrivate(j,\"closedPromiseCapability\").@promise.@then(@undefined,function(i){if(k.closedOrErrored)return;if(@readableStreamDefaultControllerError(x.@readableStreamController,i),@readableStreamDefaultControllerError(y.@readableStreamController,i),k.closedOrErrored=!0,!k.canceled1||!k.canceled2)k.cancelPromiseCapability.@resolve.@call()}),k.branch1=x,k.branch2=y,[x,y]})\n"; // readableStreamTeePullFunction const JSC::ConstructAbility s_readableStreamInternalsReadableStreamTeePullFunctionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1516,7 +1516,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamTeePullFunctio const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamTeePullFunctionCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamTeePullFunctionCodeLength = 764; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamTeePullFunctionCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamTeePullFunctionCode = "(function (i,f,m){\"use strict\";return function(){@Promise.prototype.@then.@call(@readableStreamDefaultReaderRead(f),function(_){if(@assert(@isObject(_)),@assert(typeof _.done===\"boolean\"),_.done&&!i.closedOrErrored){if(!i.canceled1)@readableStreamDefaultControllerClose(i.branch1.@readableStreamController);if(!i.canceled2)@readableStreamDefaultControllerClose(i.branch2.@readableStreamController);if(i.closedOrErrored=!0,!i.canceled1||!i.canceled2)i.cancelPromiseCapability.@resolve.@call()}if(i.closedOrErrored)return;if(!i.canceled1)@readableStreamDefaultControllerEnqueue(i.branch1.@readableStreamController,_.value);if(!i.canceled2)@readableStreamDefaultControllerEnqueue(i.branch2.@readableStreamController,m\?@structuredCloneForStream(_.value):_.value)})}})\n"; +const char* const s_readableStreamInternalsReadableStreamTeePullFunctionCode = "(function (i,_,f){\"use strict\";return function(){@Promise.prototype.@then.@call(@readableStreamDefaultReaderRead(_),function(m){if(@assert(@isObject(m)),@assert(typeof m.done===\"boolean\"),m.done&&!i.closedOrErrored){if(!i.canceled1)@readableStreamDefaultControllerClose(i.branch1.@readableStreamController);if(!i.canceled2)@readableStreamDefaultControllerClose(i.branch2.@readableStreamController);if(i.closedOrErrored=!0,!i.canceled1||!i.canceled2)i.cancelPromiseCapability.@resolve.@call()}if(i.closedOrErrored)return;if(!i.canceled1)@readableStreamDefaultControllerEnqueue(i.branch1.@readableStreamController,m.value);if(!i.canceled2)@readableStreamDefaultControllerEnqueue(i.branch2.@readableStreamController,f\?@structuredCloneForStream(m.value):m.value)})}})\n"; // readableStreamTeeBranch1CancelFunction const JSC::ConstructAbility s_readableStreamInternalsReadableStreamTeeBranch1CancelFunctionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1564,7 +1564,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadDirectStreamCodeConstruc const JSC::ImplementationVisibility s_readableStreamInternalsReadDirectStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadDirectStreamCodeLength = 900; static const JSC::Intrinsic s_readableStreamInternalsReadDirectStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadDirectStreamCode = "(function (j,q,_){\"use strict\";@putByIdDirectPrivate(j,\"underlyingSource\",@undefined),@putByIdDirectPrivate(j,\"start\",@undefined);function w(f,v){if(v&&_\?.cancel){try{var A=_.cancel(v);@markPromiseAsHandled(A)}catch(B){}_=@undefined}if(f){if(@putByIdDirectPrivate(f,\"readableStreamController\",@undefined),@putByIdDirectPrivate(f,\"reader\",@undefined),v)@putByIdDirectPrivate(f,\"state\",@streamErrored),@putByIdDirectPrivate(f,\"storedError\",v);else @putByIdDirectPrivate(f,\"state\",@streamClosed);f=@undefined}}if(!_.pull){w();return}if(!@isCallable(_.pull)){w(),@throwTypeError(\"pull is not a function\");return}@putByIdDirectPrivate(j,\"readableStreamController\",q);const x=@getByIdDirectPrivate(j,\"highWaterMark\");q.start({highWaterMark:!x||x<64\?64:x}),@startDirectStream.@call(q,j,_.pull,w),@putByIdDirectPrivate(j,\"reader\",{});var z=_.pull(q);if(q=@undefined,z&&@isPromise(z))return z.@then(()=>{})})\n"; +const char* const s_readableStreamInternalsReadDirectStreamCode = "(function (_,x,f){\"use strict\";@putByIdDirectPrivate(_,\"underlyingSource\",@undefined),@putByIdDirectPrivate(_,\"start\",@undefined);function j(v,A){if(A&&f\?.cancel){try{var w=f.cancel(A);@markPromiseAsHandled(w)}catch(B){}f=@undefined}if(v){if(@putByIdDirectPrivate(v,\"readableStreamController\",@undefined),@putByIdDirectPrivate(v,\"reader\",@undefined),A)@putByIdDirectPrivate(v,\"state\",@streamErrored),@putByIdDirectPrivate(v,\"storedError\",A);else @putByIdDirectPrivate(v,\"state\",@streamClosed);v=@undefined}}if(!f.pull){j();return}if(!@isCallable(f.pull)){j(),@throwTypeError(\"pull is not a function\");return}@putByIdDirectPrivate(_,\"readableStreamController\",x);const q=@getByIdDirectPrivate(_,\"highWaterMark\");x.start({highWaterMark:!q||q<64\?64:q}),@startDirectStream.@call(x,_,f.pull,j),@putByIdDirectPrivate(_,\"reader\",{});var z=f.pull(x);if(x=@undefined,z&&@isPromise(z))return z.@then(()=>{})})\n"; // assignToStream const JSC::ConstructAbility s_readableStreamInternalsAssignToStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1580,7 +1580,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadStreamIntoSinkCodeConstr const JSC::ImplementationVisibility s_readableStreamInternalsReadStreamIntoSinkCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadStreamIntoSinkCodeLength = 1395; static const JSC::Intrinsic s_readableStreamInternalsReadStreamIntoSinkCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadStreamIntoSinkCode = "(async function (_,c,E){\"use strict\";var x=!1,B=!1;try{var I=_.getReader(),f=I.readMany();if(f&&@isPromise(f))f=await f;if(f.done)return x=!0,c.end();var K=f.value.length;const q=@getByIdDirectPrivate(_,\"highWaterMark\");if(E)@startDirectStream.@call(c,_,@undefined,()=>!B&&@markPromiseAsHandled(_.cancel()));c.start({highWaterMark:q||0});for(var D=0,F=f.value,G=f.value.length;D<G;D++)c.write(F[D]);var A=@getByIdDirectPrivate(_,\"state\");if(A===@streamClosed)return x=!0,c.end();while(!0){var{value:H,done:J}=await I.read();if(J)return x=!0,c.end();c.write(H)}}catch(q){B=!0;try{I=@undefined;const z=_.cancel(q);@markPromiseAsHandled(z)}catch(z){}if(c&&!x){x=!0;try{c.close(q)}catch(z){throw new globalThis.AggregateError([q,z])}}throw q}finally{if(I){try{I.releaseLock()}catch(z){}I=@undefined}c=@undefined;var A=@getByIdDirectPrivate(_,\"state\");if(_){var P=@getByIdDirectPrivate(_,\"readableStreamController\");if(P){if(@getByIdDirectPrivate(P,\"underlyingSource\"))@putByIdDirectPrivate(P,\"underlyingSource\",@undefined);if(@getByIdDirectPrivate(P,\"controlledReadableStream\"))@putByIdDirectPrivate(P,\"controlledReadableStream\",@undefined);if(@putByIdDirectPrivate(_,\"readableStreamController\",null),@getByIdDirectPrivate(_,\"underlyingSource\"))@putByIdDirectPrivate(_,\"underlyingSource\",@undefined);P=@undefined}if(!B&&A!==@streamClosed&&A!==@streamErrored)@readableStreamClose(_);_=@undefined}}})\n"; +const char* const s_readableStreamInternalsReadStreamIntoSinkCode = "(async function (c,F,f){\"use strict\";var I=!1,D=!1;try{var E=c.getReader(),G=E.readMany();if(G&&@isPromise(G))G=await G;if(G.done)return I=!0,F.end();var H=G.value.length;const x=@getByIdDirectPrivate(c,\"highWaterMark\");if(f)@startDirectStream.@call(F,c,@undefined,()=>!D&&@markPromiseAsHandled(c.cancel()));F.start({highWaterMark:x||0});for(var J=0,P=G.value,z=G.value.length;J<z;J++)F.write(P[J]);var _=@getByIdDirectPrivate(c,\"state\");if(_===@streamClosed)return I=!0,F.end();while(!0){var{value:q,done:A}=await E.read();if(A)return I=!0,F.end();F.write(q)}}catch(x){D=!0;try{E=@undefined;const K=c.cancel(x);@markPromiseAsHandled(K)}catch(K){}if(F&&!I){I=!0;try{F.close(x)}catch(K){throw new globalThis.AggregateError([x,K])}}throw x}finally{if(E){try{E.releaseLock()}catch(K){}E=@undefined}F=@undefined;var _=@getByIdDirectPrivate(c,\"state\");if(c){var B=@getByIdDirectPrivate(c,\"readableStreamController\");if(B){if(@getByIdDirectPrivate(B,\"underlyingSource\"))@putByIdDirectPrivate(B,\"underlyingSource\",@undefined);if(@getByIdDirectPrivate(B,\"controlledReadableStream\"))@putByIdDirectPrivate(B,\"controlledReadableStream\",@undefined);if(@putByIdDirectPrivate(c,\"readableStreamController\",null),@getByIdDirectPrivate(c,\"underlyingSource\"))@putByIdDirectPrivate(c,\"underlyingSource\",@undefined);B=@undefined}if(!D&&_!==@streamClosed&&_!==@streamErrored)@readableStreamClose(c);c=@undefined}}})\n"; // handleDirectStreamError const JSC::ConstructAbility s_readableStreamInternalsHandleDirectStreamErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1588,7 +1588,7 @@ const JSC::ConstructorKind s_readableStreamInternalsHandleDirectStreamErrorCodeC const JSC::ImplementationVisibility s_readableStreamInternalsHandleDirectStreamErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsHandleDirectStreamErrorCodeLength = 496; static const JSC::Intrinsic s_readableStreamInternalsHandleDirectStreamErrorCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsHandleDirectStreamErrorCode = "(function (u){\"use strict\";var i=this,_=i.@sink;if(_){@putByIdDirectPrivate(i,\"sink\",@undefined);try{_.close(u)}catch(a){}}if(this.error=this.flush=this.write=this.close=this.end=@onReadableStreamDirectControllerClosed,typeof this.@underlyingSource.close===\"function\")try{this.@underlyingSource.close.@call(this.@underlyingSource,u)}catch(a){}try{var h=i._pendingRead;if(h)i._pendingRead=@undefined,@rejectPromise(h,u)}catch(a){}var R=i.@controlledReadableStream;if(R)@readableStreamError(R,u)})\n"; +const char* const s_readableStreamInternalsHandleDirectStreamErrorCode = "(function (i){\"use strict\";var u=this,h=u.@sink;if(h){@putByIdDirectPrivate(u,\"sink\",@undefined);try{h.close(i)}catch(R){}}if(this.error=this.flush=this.write=this.close=this.end=@onReadableStreamDirectControllerClosed,typeof this.@underlyingSource.close===\"function\")try{this.@underlyingSource.close.@call(this.@underlyingSource,i)}catch(R){}try{var _=u._pendingRead;if(_)u._pendingRead=@undefined,@rejectPromise(_,i)}catch(R){}var a=u.@controlledReadableStream;if(a)@readableStreamError(a,i)})\n"; // handleDirectStreamErrorReject const JSC::ConstructAbility s_readableStreamInternalsHandleDirectStreamErrorRejectCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1604,7 +1604,7 @@ const JSC::ConstructorKind s_readableStreamInternalsOnPullDirectStreamCodeConstr const JSC::ImplementationVisibility s_readableStreamInternalsOnPullDirectStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsOnPullDirectStreamCodeLength = 785; static const JSC::Intrinsic s_readableStreamInternalsOnPullDirectStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsOnPullDirectStreamCode = "(function (g){\"use strict\";var i=g.@controlledReadableStream;if(!i||@getByIdDirectPrivate(i,\"state\")!==@streamReadable)return;if(g._deferClose===-1)return;g._deferClose=-1,g._deferFlush=-1;var _,b;try{var y=g.@underlyingSource.pull(g);if(y&&@isPromise(y)){if(g._handleError===@undefined)g._handleError=@handleDirectStreamErrorReject.bind(g);@Promise.prototype.catch.@call(y,g._handleError)}}catch(k){return @handleDirectStreamErrorReject.@call(g,k)}finally{_=g._deferClose,b=g._deferFlush,g._deferFlush=g._deferClose=0}var h;if(g._pendingRead===@undefined)g._pendingRead=h=@newPromise();else h=@readableStreamAddReadRequest(i);if(_===1){var j=g._deferCloseReason;return g._deferCloseReason=@undefined,@onCloseDirectStream.@call(g,j),h}if(b===1)@onFlushDirectStream.@call(g);return h})\n"; +const char* const s_readableStreamInternalsOnPullDirectStreamCode = "(function (g){\"use strict\";var h=g.@controlledReadableStream;if(!h||@getByIdDirectPrivate(h,\"state\")!==@streamReadable)return;if(g._deferClose===-1)return;g._deferClose=-1,g._deferFlush=-1;var i,y;try{var _=g.@underlyingSource.pull(g);if(_&&@isPromise(_)){if(g._handleError===@undefined)g._handleError=@handleDirectStreamErrorReject.bind(g);@Promise.prototype.catch.@call(_,g._handleError)}}catch(k){return @handleDirectStreamErrorReject.@call(g,k)}finally{i=g._deferClose,y=g._deferFlush,g._deferFlush=g._deferClose=0}var b;if(g._pendingRead===@undefined)g._pendingRead=b=@newPromise();else b=@readableStreamAddReadRequest(h);if(i===1){var j=g._deferCloseReason;return g._deferCloseReason=@undefined,@onCloseDirectStream.@call(g,j),b}if(y===1)@onFlushDirectStream.@call(g);return b})\n"; // noopDoneFunction const JSC::ConstructAbility s_readableStreamInternalsNoopDoneFunctionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1628,7 +1628,7 @@ const JSC::ConstructorKind s_readableStreamInternalsOnCloseDirectStreamCodeConst const JSC::ImplementationVisibility s_readableStreamInternalsOnCloseDirectStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsOnCloseDirectStreamCodeLength = 1460; static const JSC::Intrinsic s_readableStreamInternalsOnCloseDirectStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsOnCloseDirectStreamCode = "(function (S){\"use strict\";var c=this.@controlledReadableStream;if(!c||@getByIdDirectPrivate(c,\"state\")!==@streamReadable)return;if(this._deferClose!==0){this._deferClose=1,this._deferCloseReason=S;return}if(@putByIdDirectPrivate(c,\"state\",@streamClosing),typeof this.@underlyingSource.close===\"function\")try{this.@underlyingSource.close.@call(this.@underlyingSource,S)}catch(b){}var v;try{v=this.@sink.end(),@putByIdDirectPrivate(this,\"sink\",@undefined)}catch(b){if(this._pendingRead){var y=this._pendingRead;this._pendingRead=@undefined,@rejectPromise(y,b)}@readableStreamError(c,b);return}this.error=this.flush=this.write=this.close=this.end=@onReadableStreamDirectControllerClosed;var B=@getByIdDirectPrivate(c,\"reader\");if(B&&@isReadableStreamDefaultReader(B)){var C=this._pendingRead;if(C&&@isPromise(C)&&v\?.byteLength){this._pendingRead=@undefined,@fulfillPromise(C,{value:v,done:!1}),@readableStreamClose(c);return}}if(v\?.byteLength){var j=@getByIdDirectPrivate(B,\"readRequests\");if(j\?.isNotEmpty()){@readableStreamFulfillReadRequest(c,v,!1),@readableStreamClose(c);return}@putByIdDirectPrivate(c,\"state\",@streamReadable),this.@pull=()=>{var b=@createFulfilledPromise({value:v,done:!1});return v=@undefined,@readableStreamClose(c),c=@undefined,b}}else if(this._pendingRead){var y=this._pendingRead;this._pendingRead=@undefined,@putByIdDirectPrivate(this,\"pull\",@noopDoneFunction),@fulfillPromise(y,{value:@undefined,done:!0})}@readableStreamClose(c)})\n"; +const char* const s_readableStreamInternalsOnCloseDirectStreamCode = "(function (c){\"use strict\";var b=this.@controlledReadableStream;if(!b||@getByIdDirectPrivate(b,\"state\")!==@streamReadable)return;if(this._deferClose!==0){this._deferClose=1,this._deferCloseReason=c;return}if(@putByIdDirectPrivate(b,\"state\",@streamClosing),typeof this.@underlyingSource.close===\"function\")try{this.@underlyingSource.close.@call(this.@underlyingSource,c)}catch(j){}var v;try{v=this.@sink.end(),@putByIdDirectPrivate(this,\"sink\",@undefined)}catch(j){if(this._pendingRead){var y=this._pendingRead;this._pendingRead=@undefined,@rejectPromise(y,j)}@readableStreamError(b,j);return}this.error=this.flush=this.write=this.close=this.end=@onReadableStreamDirectControllerClosed;var B=@getByIdDirectPrivate(b,\"reader\");if(B&&@isReadableStreamDefaultReader(B)){var C=this._pendingRead;if(C&&@isPromise(C)&&v\?.byteLength){this._pendingRead=@undefined,@fulfillPromise(C,{value:v,done:!1}),@readableStreamClose(b);return}}if(v\?.byteLength){var S=@getByIdDirectPrivate(B,\"readRequests\");if(S\?.isNotEmpty()){@readableStreamFulfillReadRequest(b,v,!1),@readableStreamClose(b);return}@putByIdDirectPrivate(b,\"state\",@streamReadable),this.@pull=()=>{var j=@createFulfilledPromise({value:v,done:!1});return v=@undefined,@readableStreamClose(b),b=@undefined,j}}else if(this._pendingRead){var y=this._pendingRead;this._pendingRead=@undefined,@putByIdDirectPrivate(this,\"pull\",@noopDoneFunction),@fulfillPromise(y,{value:@undefined,done:!0})}@readableStreamClose(b)})\n"; // onFlushDirectStream const JSC::ConstructAbility s_readableStreamInternalsOnFlushDirectStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1636,7 +1636,7 @@ const JSC::ConstructorKind s_readableStreamInternalsOnFlushDirectStreamCodeConst const JSC::ImplementationVisibility s_readableStreamInternalsOnFlushDirectStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsOnFlushDirectStreamCodeLength = 591; static const JSC::Intrinsic s_readableStreamInternalsOnFlushDirectStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsOnFlushDirectStreamCode = "(function (){\"use strict\";var B=this.@controlledReadableStream,i=@getByIdDirectPrivate(B,\"reader\");if(!i||!@isReadableStreamDefaultReader(i))return;var b=this._pendingRead;if(this._pendingRead=@undefined,b&&@isPromise(b)){var c=this.@sink.flush();if(c\?.byteLength)this._pendingRead=@getByIdDirectPrivate(B,\"readRequests\")\?.shift(),@fulfillPromise(b,{value:c,done:!1});else this._pendingRead=b}else if(@getByIdDirectPrivate(B,\"readRequests\")\?.isNotEmpty()){var c=this.@sink.flush();if(c\?.byteLength)@readableStreamFulfillReadRequest(B,c,!1)}else if(this._deferFlush===-1)this._deferFlush=1})\n"; +const char* const s_readableStreamInternalsOnFlushDirectStreamCode = "(function (){\"use strict\";var c=this.@controlledReadableStream,B=@getByIdDirectPrivate(c,\"reader\");if(!B||!@isReadableStreamDefaultReader(B))return;var b=this._pendingRead;if(this._pendingRead=@undefined,b&&@isPromise(b)){var i=this.@sink.flush();if(i\?.byteLength)this._pendingRead=@getByIdDirectPrivate(c,\"readRequests\")\?.shift(),@fulfillPromise(b,{value:i,done:!1});else this._pendingRead=b}else if(@getByIdDirectPrivate(c,\"readRequests\")\?.isNotEmpty()){var i=this.@sink.flush();if(i\?.byteLength)@readableStreamFulfillReadRequest(c,i,!1)}else if(this._deferFlush===-1)this._deferFlush=1})\n"; // createTextStream const JSC::ConstructAbility s_readableStreamInternalsCreateTextStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1644,7 +1644,7 @@ const JSC::ConstructorKind s_readableStreamInternalsCreateTextStreamCodeConstruc const JSC::ImplementationVisibility s_readableStreamInternalsCreateTextStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsCreateTextStreamCodeLength = 984; static const JSC::Intrinsic s_readableStreamInternalsCreateTextStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsCreateTextStreamCode = "(function (G){\"use strict\";var q,v=[],x=!1,z=!1,j=\"\",C=@toLength(0),F=@newPromiseCapability(@Promise),A=!1;return q={start(){},write(_){if(typeof _===\"string\"){var w=@toLength(_.length);if(w>0)j+=_,x=!0,C+=w;return w}if(!_||!(@ArrayBuffer.@isView(_)||_ instanceof @ArrayBuffer))@throwTypeError(\"Expected text, ArrayBuffer or ArrayBufferView\");const E=@toLength(_.byteLength);if(E>0)if(z=!0,j.length>0)@arrayPush(v,j,_),j=\"\";else @arrayPush(v,_);return C+=E,E},flush(){return 0},end(){if(A)return\"\";return q.fulfill()},fulfill(){A=!0;const _=q.finishInternal();return @fulfillPromise(F.@promise,_),_},finishInternal(){if(!x&&!z)return\"\";if(x&&!z)return j;if(z&&!x)return new globalThis.TextDecoder().decode(@Bun.concatArrayBuffers(v));var _=new @Bun.ArrayBufferSink;_.start({highWaterMark:C,asUint8Array:!0});for(let w of v)_.write(w);if(v.length=0,j.length>0)_.write(j),j=\"\";return new globalThis.TextDecoder().decode(_.end())},close(){try{if(!A)A=!0,q.fulfill()}catch(_){}}},[q,F]})\n"; +const char* const s_readableStreamInternalsCreateTextStreamCode = "(function (v){\"use strict\";var _,w=[],A=!1,C=!1,j=\"\",x=@toLength(0),E=@newPromiseCapability(@Promise),F=!1;return _={start(){},write(q){if(typeof q===\"string\"){var z=@toLength(q.length);if(z>0)j+=q,A=!0,x+=z;return z}if(!q||!(@ArrayBuffer.@isView(q)||q instanceof @ArrayBuffer))@throwTypeError(\"Expected text, ArrayBuffer or ArrayBufferView\");const G=@toLength(q.byteLength);if(G>0)if(C=!0,j.length>0)@arrayPush(w,j,q),j=\"\";else @arrayPush(w,q);return x+=G,G},flush(){return 0},end(){if(F)return\"\";return _.fulfill()},fulfill(){F=!0;const q=_.finishInternal();return @fulfillPromise(E.@promise,q),q},finishInternal(){if(!A&&!C)return\"\";if(A&&!C)return j;if(C&&!A)return new globalThis.TextDecoder().decode(@Bun.concatArrayBuffers(w));var q=new @Bun.ArrayBufferSink;q.start({highWaterMark:x,asUint8Array:!0});for(let z of w)q.write(z);if(w.length=0,j.length>0)q.write(j),j=\"\";return new globalThis.TextDecoder().decode(q.end())},close(){try{if(!F)F=!0,_.fulfill()}catch(q){}}},[_,E]})\n"; // initializeTextStream const JSC::ConstructAbility s_readableStreamInternalsInitializeTextStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1652,7 +1652,7 @@ const JSC::ConstructorKind s_readableStreamInternalsInitializeTextStreamCodeCons const JSC::ImplementationVisibility s_readableStreamInternalsInitializeTextStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsInitializeTextStreamCodeLength = 578; static const JSC::Intrinsic s_readableStreamInternalsInitializeTextStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsInitializeTextStreamCode = "(function (m,p){\"use strict\";var[_,b]=@createTextStream(p),f={@underlyingSource:m,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:_,close:@onCloseDirectStream,write:_.write,error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};return @putByIdDirectPrivate(this,\"readableStreamController\",f),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined),b})\n"; +const char* const s_readableStreamInternalsInitializeTextStreamCode = "(function (_,m){\"use strict\";var[p,b]=@createTextStream(m),f={@underlyingSource:_,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:p,close:@onCloseDirectStream,write:p.write,error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};return @putByIdDirectPrivate(this,\"readableStreamController\",f),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined),b})\n"; // initializeArrayStream const JSC::ConstructAbility s_readableStreamInternalsInitializeArrayStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1660,7 +1660,7 @@ const JSC::ConstructorKind s_readableStreamInternalsInitializeArrayStreamCodeCon const JSC::ImplementationVisibility s_readableStreamInternalsInitializeArrayStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsInitializeArrayStreamCodeLength = 797; static const JSC::Intrinsic s_readableStreamInternalsInitializeArrayStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsInitializeArrayStreamCode = "(function (m,v){\"use strict\";var _=[],b=@newPromiseCapability(@Promise),t=!1;function d(){return t=!0,b.@resolve.@call(@undefined,_),_}var j={start(){},write(p){return @arrayPush(_,p),p.byteLength||p.length},flush(){return 0},end(){if(t)return[];return d()},close(){if(!t)d()}},q={@underlyingSource:m,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:j,close:@onCloseDirectStream,write:j.write,error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};return @putByIdDirectPrivate(this,\"readableStreamController\",q),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined),b})\n"; +const char* const s_readableStreamInternalsInitializeArrayStreamCode = "(function (t,_){\"use strict\";var p=[],b=@newPromiseCapability(@Promise),d=!1;function m(){return d=!0,b.@resolve.@call(@undefined,p),p}var j={start(){},write(v){return @arrayPush(p,v),v.byteLength||v.length},flush(){return 0},end(){if(d)return[];return m()},close(){if(!d)m()}},q={@underlyingSource:t,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:j,close:@onCloseDirectStream,write:j.write,error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};return @putByIdDirectPrivate(this,\"readableStreamController\",q),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined),b})\n"; // initializeArrayBufferStream const JSC::ConstructAbility s_readableStreamInternalsInitializeArrayBufferStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1668,7 +1668,7 @@ const JSC::ConstructorKind s_readableStreamInternalsInitializeArrayBufferStreamC const JSC::ImplementationVisibility s_readableStreamInternalsInitializeArrayBufferStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsInitializeArrayBufferStreamCodeLength = 690; static const JSC::Intrinsic s_readableStreamInternalsInitializeArrayBufferStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsInitializeArrayBufferStreamCode = "(function (w,m){\"use strict\";var D=m&&typeof m===\"number\"\?{highWaterMark:m,stream:!0,asUint8Array:!0}:{stream:!0,asUint8Array:!0},_=new @Bun.ArrayBufferSink;_.start(D);var b={@underlyingSource:w,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:_,close:@onCloseDirectStream,write:_.write.bind(_),error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};@putByIdDirectPrivate(this,\"readableStreamController\",b),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined)})\n"; +const char* const s_readableStreamInternalsInitializeArrayBufferStreamCode = "(function (_,m){\"use strict\";var w=m&&typeof m===\"number\"\?{highWaterMark:m,stream:!0,asUint8Array:!0}:{stream:!0,asUint8Array:!0},D=new @Bun.ArrayBufferSink;D.start(w);var b={@underlyingSource:_,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:D,close:@onCloseDirectStream,write:D.write.bind(D),error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};@putByIdDirectPrivate(this,\"readableStreamController\",b),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined)})\n"; // readableStreamError const JSC::ConstructAbility s_readableStreamInternalsReadableStreamErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1676,7 +1676,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamErrorCodeConst const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamErrorCodeLength = 840; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamErrorCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamErrorCode = "(function (c,f){\"use strict\";@assert(@isReadableStream(c)),@assert(@getByIdDirectPrivate(c,\"state\")===@streamReadable),@putByIdDirectPrivate(c,\"state\",@streamErrored),@putByIdDirectPrivate(c,\"storedError\",f);const _=@getByIdDirectPrivate(c,\"reader\");if(!_)return;if(@isReadableStreamDefaultReader(_)){const n=@getByIdDirectPrivate(_,\"readRequests\");@putByIdDirectPrivate(_,\"readRequests\",@createFIFO());for(var i=n.shift();i;i=n.shift())@rejectPromise(i,f)}else{@assert(@isReadableStreamBYOBReader(_));const n=@getByIdDirectPrivate(_,\"readIntoRequests\");@putByIdDirectPrivate(_,\"readIntoRequests\",@createFIFO());for(var i=n.shift();i;i=n.shift())@rejectPromise(i,f)}@getByIdDirectPrivate(_,\"closedPromiseCapability\").@reject.@call(@undefined,f);const h=@getByIdDirectPrivate(_,\"closedPromiseCapability\").@promise;@markPromiseAsHandled(h)})\n"; +const char* const s_readableStreamInternalsReadableStreamErrorCode = "(function (i,c){\"use strict\";@assert(@isReadableStream(i)),@assert(@getByIdDirectPrivate(i,\"state\")===@streamReadable),@putByIdDirectPrivate(i,\"state\",@streamErrored),@putByIdDirectPrivate(i,\"storedError\",c);const n=@getByIdDirectPrivate(i,\"reader\");if(!n)return;if(@isReadableStreamDefaultReader(n)){const _=@getByIdDirectPrivate(n,\"readRequests\");@putByIdDirectPrivate(n,\"readRequests\",@createFIFO());for(var f=_.shift();f;f=_.shift())@rejectPromise(f,c)}else{@assert(@isReadableStreamBYOBReader(n));const _=@getByIdDirectPrivate(n,\"readIntoRequests\");@putByIdDirectPrivate(n,\"readIntoRequests\",@createFIFO());for(var f=_.shift();f;f=_.shift())@rejectPromise(f,c)}@getByIdDirectPrivate(n,\"closedPromiseCapability\").@reject.@call(@undefined,c);const h=@getByIdDirectPrivate(n,\"closedPromiseCapability\").@promise;@markPromiseAsHandled(h)})\n"; // readableStreamDefaultControllerShouldCallPull const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerShouldCallPullCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1708,7 +1708,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControl const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerGetDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamDefaultControllerGetDesiredSizeCodeLength = 283; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerGetDesiredSizeCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamDefaultControllerGetDesiredSizeCode = "(function (i){\"use strict\";const g=@getByIdDirectPrivate(i,\"controlledReadableStream\"),d=@getByIdDirectPrivate(g,\"state\");if(d===@streamErrored)return null;if(d===@streamClosed)return 0;return @getByIdDirectPrivate(i,\"strategy\").highWaterMark-@getByIdDirectPrivate(i,\"queue\").size})\n"; +const char* const s_readableStreamInternalsReadableStreamDefaultControllerGetDesiredSizeCode = "(function (i){\"use strict\";const d=@getByIdDirectPrivate(i,\"controlledReadableStream\"),g=@getByIdDirectPrivate(d,\"state\");if(g===@streamErrored)return null;if(g===@streamClosed)return 0;return @getByIdDirectPrivate(i,\"strategy\").highWaterMark-@getByIdDirectPrivate(i,\"queue\").size})\n"; // readableStreamReaderGenericCancel const JSC::ConstructAbility s_readableStreamInternalsReadableStreamReaderGenericCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1716,7 +1716,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamReaderGenericC const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamReaderGenericCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamReaderGenericCancelCodeLength = 133; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamReaderGenericCancelCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamReaderGenericCancelCode = "(function (h,i){\"use strict\";const c=@getByIdDirectPrivate(h,\"ownerReadableStream\");return @assert(!!c),@readableStreamCancel(c,i)})\n"; +const char* const s_readableStreamInternalsReadableStreamReaderGenericCancelCode = "(function (c,h){\"use strict\";const i=@getByIdDirectPrivate(c,\"ownerReadableStream\");return @assert(!!i),@readableStreamCancel(i,h)})\n"; // readableStreamCancel const JSC::ConstructAbility s_readableStreamInternalsReadableStreamCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1724,7 +1724,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamCancelCodeCons const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamCancelCodeLength = 509; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamCancelCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamCancelCode = "(function (i,d){\"use strict\";@putByIdDirectPrivate(i,\"disturbed\",!0);const h=@getByIdDirectPrivate(i,\"state\");if(h===@streamClosed)return @Promise.@resolve();if(h===@streamErrored)return @Promise.@reject(@getByIdDirectPrivate(i,\"storedError\"));@readableStreamClose(i);var _=@getByIdDirectPrivate(i,\"readableStreamController\"),p=_.@cancel;if(p)return p(_,d).@then(function(){});var u=_.close;if(u)return @Promise.@resolve(_.close(d));@throwTypeError(\"ReadableStreamController has no cancel or close method\")})\n"; +const char* const s_readableStreamInternalsReadableStreamCancelCode = "(function (_,d){\"use strict\";@putByIdDirectPrivate(_,\"disturbed\",!0);const h=@getByIdDirectPrivate(_,\"state\");if(h===@streamClosed)return @Promise.@resolve();if(h===@streamErrored)return @Promise.@reject(@getByIdDirectPrivate(_,\"storedError\"));@readableStreamClose(_);var p=@getByIdDirectPrivate(_,\"readableStreamController\"),u=p.@cancel;if(u)return u(p,d).@then(function(){});var i=p.close;if(i)return @Promise.@resolve(p.close(d));@throwTypeError(\"ReadableStreamController has no cancel or close method\")})\n"; // readableStreamDefaultControllerCancel const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1740,7 +1740,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControl const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerPullCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamDefaultControllerPullCodeLength = 519; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerPullCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamDefaultControllerPullCode = "(function (a){\"use strict\";var _=@getByIdDirectPrivate(a,\"queue\");if(_.content.isNotEmpty()){const f=@dequeueValue(_);if(@getByIdDirectPrivate(a,\"closeRequested\")&&_.content.isEmpty())@readableStreamClose(@getByIdDirectPrivate(a,\"controlledReadableStream\"));else @readableStreamDefaultControllerCallPullIfNeeded(a);return @createFulfilledPromise({value:f,done:!1})}const d=@readableStreamAddReadRequest(@getByIdDirectPrivate(a,\"controlledReadableStream\"));return @readableStreamDefaultControllerCallPullIfNeeded(a),d})\n"; +const char* const s_readableStreamInternalsReadableStreamDefaultControllerPullCode = "(function (a){\"use strict\";var d=@getByIdDirectPrivate(a,\"queue\");if(d.content.isNotEmpty()){const _=@dequeueValue(d);if(@getByIdDirectPrivate(a,\"closeRequested\")&&d.content.isEmpty())@readableStreamClose(@getByIdDirectPrivate(a,\"controlledReadableStream\"));else @readableStreamDefaultControllerCallPullIfNeeded(a);return @createFulfilledPromise({value:_,done:!1})}const f=@readableStreamAddReadRequest(@getByIdDirectPrivate(a,\"controlledReadableStream\"));return @readableStreamDefaultControllerCallPullIfNeeded(a),f})\n"; // readableStreamDefaultControllerClose const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1756,7 +1756,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamCloseCodeConst const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamCloseCodeLength = 617; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamCloseCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamCloseCode = "(function (_){\"use strict\";if(@assert(@getByIdDirectPrivate(_,\"state\")===@streamReadable),@putByIdDirectPrivate(_,\"state\",@streamClosed),!@getByIdDirectPrivate(_,\"reader\"))return;if(@isReadableStreamDefaultReader(@getByIdDirectPrivate(_,\"reader\"))){const i=@getByIdDirectPrivate(@getByIdDirectPrivate(_,\"reader\"),\"readRequests\");if(i.isNotEmpty()){@putByIdDirectPrivate(@getByIdDirectPrivate(_,\"reader\"),\"readRequests\",@createFIFO());for(var d=i.shift();d;d=i.shift())@fulfillPromise(d,{value:@undefined,done:!0})}}@getByIdDirectPrivate(@getByIdDirectPrivate(_,\"reader\"),\"closedPromiseCapability\").@resolve.@call()})\n"; +const char* const s_readableStreamInternalsReadableStreamCloseCode = "(function (_){\"use strict\";if(@assert(@getByIdDirectPrivate(_,\"state\")===@streamReadable),@putByIdDirectPrivate(_,\"state\",@streamClosed),!@getByIdDirectPrivate(_,\"reader\"))return;if(@isReadableStreamDefaultReader(@getByIdDirectPrivate(_,\"reader\"))){const d=@getByIdDirectPrivate(@getByIdDirectPrivate(_,\"reader\"),\"readRequests\");if(d.isNotEmpty()){@putByIdDirectPrivate(@getByIdDirectPrivate(_,\"reader\"),\"readRequests\",@createFIFO());for(var i=d.shift();i;i=d.shift())@fulfillPromise(i,{value:@undefined,done:!0})}}@getByIdDirectPrivate(@getByIdDirectPrivate(_,\"reader\"),\"closedPromiseCapability\").@resolve.@call()})\n"; // readableStreamFulfillReadRequest const JSC::ConstructAbility s_readableStreamInternalsReadableStreamFulfillReadRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1764,7 +1764,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamFulfillReadReq const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamFulfillReadRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamFulfillReadRequestCodeLength = 157; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamFulfillReadRequestCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamFulfillReadRequestCode = "(function (i,p,y){\"use strict\";const _=@getByIdDirectPrivate(@getByIdDirectPrivate(i,\"reader\"),\"readRequests\").shift();@fulfillPromise(_,{value:p,done:y})})\n"; +const char* const s_readableStreamInternalsReadableStreamFulfillReadRequestCode = "(function (p,y,_){\"use strict\";const i=@getByIdDirectPrivate(@getByIdDirectPrivate(p,\"reader\"),\"readRequests\").shift();@fulfillPromise(i,{value:y,done:_})})\n"; // readableStreamDefaultControllerEnqueue const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerEnqueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1772,7 +1772,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControl const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerEnqueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamDefaultControllerEnqueueCodeLength = 659; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerEnqueueCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamDefaultControllerEnqueueCode = "(function (_,D){\"use strict\";const E=@getByIdDirectPrivate(_,\"controlledReadableStream\");if(@assert(@readableStreamDefaultControllerCanCloseOrEnqueue(_)),@isReadableStreamLocked(E)&&@getByIdDirectPrivate(@getByIdDirectPrivate(E,\"reader\"),\"readRequests\")\?.isNotEmpty()){@readableStreamFulfillReadRequest(E,D,!1),@readableStreamDefaultControllerCallPullIfNeeded(_);return}try{let d=1;if(@getByIdDirectPrivate(_,\"strategy\").size!==@undefined)d=@getByIdDirectPrivate(_,\"strategy\").size(D);@enqueueValueWithSize(@getByIdDirectPrivate(_,\"queue\"),D,d)}catch(d){throw @readableStreamDefaultControllerError(_,d),d}@readableStreamDefaultControllerCallPullIfNeeded(_)})\n"; +const char* const s_readableStreamInternalsReadableStreamDefaultControllerEnqueueCode = "(function (_,d){\"use strict\";const D=@getByIdDirectPrivate(_,\"controlledReadableStream\");if(@assert(@readableStreamDefaultControllerCanCloseOrEnqueue(_)),@isReadableStreamLocked(D)&&@getByIdDirectPrivate(@getByIdDirectPrivate(D,\"reader\"),\"readRequests\")\?.isNotEmpty()){@readableStreamFulfillReadRequest(D,d,!1),@readableStreamDefaultControllerCallPullIfNeeded(_);return}try{let E=1;if(@getByIdDirectPrivate(_,\"strategy\").size!==@undefined)E=@getByIdDirectPrivate(_,\"strategy\").size(d);@enqueueValueWithSize(@getByIdDirectPrivate(_,\"queue\"),d,E)}catch(E){throw @readableStreamDefaultControllerError(_,E),E}@readableStreamDefaultControllerCallPullIfNeeded(_)})\n"; // readableStreamDefaultReaderRead const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultReaderReadCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1780,7 +1780,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultReaderR const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultReaderReadCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamDefaultReaderReadCodeLength = 491; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultReaderReadCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamDefaultReaderReadCode = "(function (y){\"use strict\";const i=@getByIdDirectPrivate(y,\"ownerReadableStream\");@assert(!!i);const n=@getByIdDirectPrivate(i,\"state\");if(@putByIdDirectPrivate(i,\"disturbed\",!0),n===@streamClosed)return @createFulfilledPromise({value:@undefined,done:!0});if(n===@streamErrored)return @Promise.@reject(@getByIdDirectPrivate(i,\"storedError\"));return @assert(n===@streamReadable),@getByIdDirectPrivate(i,\"readableStreamController\").@pull(@getByIdDirectPrivate(i,\"readableStreamController\"))})\n"; +const char* const s_readableStreamInternalsReadableStreamDefaultReaderReadCode = "(function (i){\"use strict\";const n=@getByIdDirectPrivate(i,\"ownerReadableStream\");@assert(!!n);const y=@getByIdDirectPrivate(n,\"state\");if(@putByIdDirectPrivate(n,\"disturbed\",!0),y===@streamClosed)return @createFulfilledPromise({value:@undefined,done:!0});if(y===@streamErrored)return @Promise.@reject(@getByIdDirectPrivate(n,\"storedError\"));return @assert(y===@streamReadable),@getByIdDirectPrivate(n,\"readableStreamController\").@pull(@getByIdDirectPrivate(n,\"readableStreamController\"))})\n"; // readableStreamAddReadRequest const JSC::ConstructAbility s_readableStreamInternalsReadableStreamAddReadRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1820,7 +1820,7 @@ const JSC::ConstructorKind s_readableStreamInternalsLazyLoadStreamCodeConstructo const JSC::ImplementationVisibility s_readableStreamInternalsLazyLoadStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsLazyLoadStreamCodeLength = 1589; static const JSC::Intrinsic s_readableStreamInternalsLazyLoadStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsLazyLoadStreamCode = "(function (J,P){\"use strict\";var G=@getByIdDirectPrivate(J,\"bunNativeType\"),B=@getByIdDirectPrivate(J,\"bunNativePtr\"),x=@lazyStreamPrototypeMap.@get(G);if(x===@undefined){let q=function(m){var{c:b,v:f}=this;this.c=@undefined,this.v=@undefined,I(m,b,f)},N=function(m){try{m.close()}catch(b){globalThis.reportError(b)}},O=function(m,b,f,j){j[0]=!1;var y;try{y=Q(m,f,j)}catch(Y){return b.error(Y)}return I(y,b,f)};var z=q,A=N,p=O,[Q,U,W,Z,D,K,X]=@lazyLoad(G),H=[!1],I;I=function m(b,f,j){if(b&&@isPromise(b))return b.then(q.bind({c:f,v:j}),(y)=>f.error(y));else if(typeof b===\"number\")if(j&&j.byteLength===b&&j.buffer===f.byobRequest\?.view\?.buffer)f.byobRequest.respondWithNewView(j);else f.byobRequest.respond(b);else if(b.constructor===@Uint8Array)f.enqueue(b);if(H[0]||b===!1)@enqueueJob(N,f),H[0]=!1};const F=D\?new FinalizationRegistry(D):null;x=class m{constructor(b,f,j){if(this.#f=b,this.#b={},this.pull=this.#j.bind(this),this.cancel=this.#m.bind(this),this.autoAllocateChunkSize=f,j!==@undefined)this.start=(y)=>{y.enqueue(j)};if(F)F.register(this,b,this.#b)}#b;pull;cancel;start;#f;type=\"bytes\";autoAllocateChunkSize=0;static startSync=U;#j(b){var f=this.#f;if(!f){b.close();return}O(f,b,b.byobRequest.view,H)}#m(b){var f=this.#f;F&&F.unregister(this.#b),K&&K(f,!1),W(f,b)}static deinit=D;static drain=X},@lazyStreamPrototypeMap.@set(G,x)}const L=x.startSync(B,P);var E;const{drain:M,deinit:_}=x;if(M)E=M(B);if(L===0){if(D&&B&&@enqueueJob(D,B),(E\?.byteLength\?\?0)>0)return{start(q){q.enqueue(E),q.close()},type:\"bytes\"};return{start(q){q.close()},type:\"bytes\"}}return new x(B,L,E)})\n"; +const char* const s_readableStreamInternalsLazyLoadStreamCode = "(function (P,F){\"use strict\";var L=@getByIdDirectPrivate(P,\"bunNativeType\"),G=@getByIdDirectPrivate(P,\"bunNativePtr\"),H=@lazyStreamPrototypeMap.@get(L);if(H===@undefined){let j=function(B){var{c:p,v:z}=this;this.c=@undefined,this.v=@undefined,W(B,p,z)},Z=function(B){try{B.close()}catch(p){globalThis.reportError(p)}},_=function(B,p,z,A){A[0]=!1;var D;try{D=b(B,z,A)}catch(E){return p.error(E)}return W(D,p,z)};var f=j,O=Z,m=_,[b,I,M,q,J,N,Q]=@lazyLoad(L),U=[!1],W;W=function B(p,z,A){if(p&&@isPromise(p))return p.then(j.bind({c:z,v:A}),(D)=>z.error(D));else if(typeof p===\"number\")if(A&&A.byteLength===p&&A.buffer===z.byobRequest\?.view\?.buffer)z.byobRequest.respondWithNewView(A);else z.byobRequest.respond(p);else if(p.constructor===@Uint8Array)z.enqueue(p);if(U[0]||p===!1)@enqueueJob(Z,z),U[0]=!1};const y=J\?new FinalizationRegistry(J):null;H=class B{constructor(p,z,A){if(this.#f=p,this.#b={},this.pull=this.#j.bind(this),this.cancel=this.#m.bind(this),this.autoAllocateChunkSize=z,A!==@undefined)this.start=(D)=>{D.enqueue(A)};if(y)y.register(this,p,this.#b)}#b;pull;cancel;start;#f;type=\"bytes\";autoAllocateChunkSize=0;static startSync=I;#j(p){var z=this.#f;if(!z){p.close();return}_(z,p,p.byobRequest.view,U)}#m(p){var z=this.#f;y&&y.unregister(this.#b),N&&N(z,!1),M(z,p)}static deinit=J;static drain=Q},@lazyStreamPrototypeMap.@set(L,H)}const X=H.startSync(G,F);var Y;const{drain:x,deinit:K}=H;if(x)Y=x(G);if(X===0){if(J&&G&&@enqueueJob(J,G),(Y\?.byteLength\?\?0)>0)return{start(j){j.enqueue(Y),j.close()},type:\"bytes\"};return{start(j){j.close()},type:\"bytes\"}}return new H(G,X,Y)})\n"; // readableStreamIntoArray const JSC::ConstructAbility s_readableStreamInternalsReadableStreamIntoArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1828,7 +1828,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamIntoArrayCodeC const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamIntoArrayCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamIntoArrayCodeLength = 247; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamIntoArrayCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamIntoArrayCode = "(function (q){\"use strict\";var b=q.getReader(),f=b.readMany();async function g(j){if(j.done)return[];var _=j.value||[];while(!0){var p=await b.read();if(p.done)break;_=_.concat(p.value)}return _}if(f&&@isPromise(f))return f.@then(g);return g(f)})\n"; +const char* const s_readableStreamInternalsReadableStreamIntoArrayCode = "(function (_){\"use strict\";var b=_.getReader(),g=b.readMany();async function j(p){if(p.done)return[];var f=p.value||[];while(!0){var q=await b.read();if(q.done)break;f=f.concat(q.value)}return f}if(g&&@isPromise(g))return g.@then(j);return j(g)})\n"; // readableStreamIntoText const JSC::ConstructAbility s_readableStreamInternalsReadableStreamIntoTextCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1836,7 +1836,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamIntoTextCodeCo const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamIntoTextCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamIntoTextCodeLength = 214; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamIntoTextCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamIntoTextCode = "(function (_){\"use strict\";const[h,d]=@createTextStream(@getByIdDirectPrivate(_,\"highWaterMark\")),i=@readStreamIntoSink(_,h,!1);if(i&&@isPromise(i))return @Promise.@resolve(i).@then(d.@promise);return d.@promise})\n"; +const char* const s_readableStreamInternalsReadableStreamIntoTextCode = "(function (i){\"use strict\";const[_,d]=@createTextStream(@getByIdDirectPrivate(i,\"highWaterMark\")),h=@readStreamIntoSink(i,_,!1);if(h&&@isPromise(h))return @Promise.@resolve(h).@then(d.@promise);return d.@promise})\n"; // readableStreamToArrayBufferDirect const JSC::ConstructAbility s_readableStreamInternalsReadableStreamToArrayBufferDirectCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1844,7 +1844,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamToArrayBufferD const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamToArrayBufferDirectCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamToArrayBufferDirectCodeLength = 727; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamToArrayBufferDirectCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamToArrayBufferDirectCode = "(function (O,A){\"use strict\";var j=new @Bun.ArrayBufferSink;@putByIdDirectPrivate(O,\"underlyingSource\",@undefined);var B=@getByIdDirectPrivate(O,\"highWaterMark\");j.start(B\?{highWaterMark:B}:{});var w=@newPromiseCapability(@Promise),q=!1,x=A.pull,v=A.close,z={start(){},close(_){if(!q){if(q=!0,v)v();@fulfillPromise(w.@promise,j.end())}},end(){if(!q){if(q=!0,v)v();@fulfillPromise(w.@promise,j.end())}},flush(){return 0},write:j.write.bind(j)},C=!1;try{const _=x(z);if(_&&@isObject(_)&&@isPromise(_))return async function(D,F,G){while(!q)await G(D);return await F}(z,promise,x);return w.@promise}catch(_){return C=!0,@readableStreamError(O,_),@Promise.@reject(_)}finally{if(!C&&O)@readableStreamClose(O);z=v=j=x=O=@undefined}})\n"; +const char* const s_readableStreamInternalsReadableStreamToArrayBufferDirectCode = "(function (O,_){\"use strict\";var q=new @Bun.ArrayBufferSink;@putByIdDirectPrivate(O,\"underlyingSource\",@undefined);var v=@getByIdDirectPrivate(O,\"highWaterMark\");q.start(v\?{highWaterMark:v}:{});var w=@newPromiseCapability(@Promise),A=!1,z=_.pull,B=_.close,C={start(){},close(F){if(!A){if(A=!0,B)B();@fulfillPromise(w.@promise,q.end())}},end(){if(!A){if(A=!0,B)B();@fulfillPromise(w.@promise,q.end())}},flush(){return 0},write:q.write.bind(q)},D=!1;try{const F=z(C);if(F&&@isObject(F)&&@isPromise(F))return async function(G,j,x){while(!A)await x(G);return await j}(C,promise,z);return w.@promise}catch(F){return D=!0,@readableStreamError(O,F),@Promise.@reject(F)}finally{if(!D&&O)@readableStreamClose(O);C=B=q=z=O=@undefined}})\n"; // readableStreamToTextDirect const JSC::ConstructAbility s_readableStreamInternalsReadableStreamToTextDirectCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1852,7 +1852,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamToTextDirectCo const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamToTextDirectCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamToTextDirectCodeLength = 278; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamToTextDirectCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamToTextDirectCode = "(async function (_,h){\"use strict\";const j=@initializeTextStream.@call(_,h,@undefined);var f=_.getReader();while(@getByIdDirectPrivate(_,\"state\")===@streamReadable){var k=await f.read();if(k.done)break}try{f.releaseLock()}catch(p){}return f=@undefined,_=@undefined,j.@promise})\n"; +const char* const s_readableStreamInternalsReadableStreamToTextDirectCode = "(async function (f,h){\"use strict\";const j=@initializeTextStream.@call(f,h,@undefined);var k=f.getReader();while(@getByIdDirectPrivate(f,\"state\")===@streamReadable){var p=await k.read();if(p.done)break}try{k.releaseLock()}catch(_){}return k=@undefined,f=@undefined,j.@promise})\n"; // readableStreamToArrayDirect const JSC::ConstructAbility s_readableStreamInternalsReadableStreamToArrayDirectCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1860,7 +1860,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamToArrayDirectC const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamToArrayDirectCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamToArrayDirectCodeLength = 354; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamToArrayDirectCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamToArrayDirectCode = "(async function (f,j){\"use strict\";const p=@initializeArrayStream.@call(f,j,@undefined);j=@undefined;var _=f.getReader();try{while(@getByIdDirectPrivate(f,\"state\")===@streamReadable){var q=await _.read();if(q.done)break}try{_.releaseLock()}catch(k){}return _=@undefined,@Promise.@resolve(p.@promise)}catch(k){throw k}finally{f=@undefined,_=@undefined}})\n"; +const char* const s_readableStreamInternalsReadableStreamToArrayDirectCode = "(async function (_,j){\"use strict\";const k=@initializeArrayStream.@call(_,j,@undefined);j=@undefined;var p=_.getReader();try{while(@getByIdDirectPrivate(_,\"state\")===@streamReadable){var q=await p.read();if(q.done)break}try{p.releaseLock()}catch(f){}return p=@undefined,@Promise.@resolve(k.@promise)}catch(f){throw f}finally{_=@undefined,p=@undefined}})\n"; // readableStreamDefineLazyIterators const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefineLazyIteratorsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1868,7 +1868,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefineLazyIter const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefineLazyIteratorsCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamDefineLazyIteratorsCodeLength = 516; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefineLazyIteratorsCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamDefineLazyIteratorsCode = "(function (i){\"use strict\";var B=globalThis.Symbol.asyncIterator,w=async function*x(k,G){var z=k.getReader(),g;try{while(!0){var j,q;const h=z.readMany();if(@isPromise(h))({done:j,value:q}=await h);else({done:j,value:q}=h);if(j)return;yield*q}}catch(h){g=h}finally{if(z.releaseLock(),!G)k.cancel(g);if(g)throw g}},D=function x(){return w(this,!1)},F=function x({preventCancel:k=!1}={preventCancel:!1}){return w(this,k)};return @Object.@defineProperty(i,B,{value:D}),@Object.@defineProperty(i,\"values\",{value:F}),i})\n"; +const char* const s_readableStreamInternalsReadableStreamDefineLazyIteratorsCode = "(function (k){\"use strict\";var B=globalThis.Symbol.asyncIterator,g=async function*z(D,F){var G=D.getReader(),j;try{while(!0){var x,h;const q=G.readMany();if(@isPromise(q))({done:x,value:h}=await q);else({done:x,value:h}=q);if(x)return;yield*h}}catch(q){j=q}finally{if(G.releaseLock(),!F)D.cancel(j);if(j)throw j}},i=function z(){return g(this,!1)},w=function z({preventCancel:D=!1}={preventCancel:!1}){return g(this,D)};return @Object.@defineProperty(k,B,{value:i}),@Object.@defineProperty(k,\"values\",{value:w}),k})\n"; #define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \ @@ -1894,7 +1894,7 @@ const JSC::ConstructorKind s_transformStreamDefaultControllerDesiredSizeCodeCons const JSC::ImplementationVisibility s_transformStreamDefaultControllerDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamDefaultControllerDesiredSizeCodeLength = 339; static const JSC::Intrinsic s_transformStreamDefaultControllerDesiredSizeCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamDefaultControllerDesiredSizeCode = "(function (){\"use strict\";if(!@isTransformStreamDefaultController(this))throw @makeThisTypeError(\"TransformStreamDefaultController\",\"enqueue\");const _=@getByIdDirectPrivate(this,\"stream\"),u=@getByIdDirectPrivate(_,\"readable\"),i=@getByIdDirectPrivate(u,\"readableStreamController\");return @readableStreamDefaultControllerGetDesiredSize(i)})\n"; +const char* const s_transformStreamDefaultControllerDesiredSizeCode = "(function (){\"use strict\";if(!@isTransformStreamDefaultController(this))throw @makeThisTypeError(\"TransformStreamDefaultController\",\"enqueue\");const _=@getByIdDirectPrivate(this,\"stream\"),i=@getByIdDirectPrivate(_,\"readable\"),u=@getByIdDirectPrivate(i,\"readableStreamController\");return @readableStreamDefaultControllerGetDesiredSize(u)})\n"; // enqueue const JSC::ConstructAbility s_transformStreamDefaultControllerEnqueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1986,7 +1986,7 @@ const JSC::ConstructorKind s_jsBufferConstructorFromCodeConstructorKind = JSC::C const JSC::ImplementationVisibility s_jsBufferConstructorFromCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferConstructorFromCodeLength = 1107; static const JSC::Intrinsic s_jsBufferConstructorFromCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferConstructorFromCode = "(function (n){\"use strict\";if(@isUndefinedOrNull(n))@throwTypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object.\");if(typeof n===\"string\"||typeof n===\"object\"&&(@isTypedArrayView(n)||n instanceof @ArrayBuffer||n instanceof SharedArrayBuffer||n instanceof String))switch(@argumentCount()){case 1:return new @Buffer(n);case 2:return new @Buffer(n,@argument(1));default:return new @Buffer(n,@argument(1),@argument(2))}var d=@toObject(n,\"The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object.\");if(!@isJSArray(d)){const u=@tryGetByIdWithWellKnownSymbol(n,\"toPrimitive\");if(u){const f=u.@call(n,\"string\");if(typeof f===\"string\")switch(@argumentCount()){case 1:return new @Buffer(f);case 2:return new @Buffer(f,@argument(1));default:return new @Buffer(f,@argument(1),@argument(2))}}if(!(\"length\"in d)||@isCallable(d))@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(d).buffer)})\n"; +const char* const s_jsBufferConstructorFromCode = "(function (n){\"use strict\";if(@isUndefinedOrNull(n))@throwTypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object.\");if(typeof n===\"string\"||typeof n===\"object\"&&(@isTypedArrayView(n)||n instanceof @ArrayBuffer||n instanceof SharedArrayBuffer||n instanceof String))switch(@argumentCount()){case 1:return new @Buffer(n);case 2:return new @Buffer(n,@argument(1));default:return new @Buffer(n,@argument(1),@argument(2))}var d=@toObject(n,\"The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object.\");if(!@isJSArray(d)){const f=@tryGetByIdWithWellKnownSymbol(n,\"toPrimitive\");if(f){const u=f.@call(n,\"string\");if(typeof u===\"string\")switch(@argumentCount()){case 1:return new @Buffer(u);case 2:return new @Buffer(u,@argument(1));default:return new @Buffer(u,@argument(1),@argument(2))}}if(!(\"length\"in d)||@isCallable(d))@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(d).buffer)})\n"; // isBuffer const JSC::ConstructAbility s_jsBufferConstructorIsBufferCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2028,7 +2028,7 @@ const JSC::ConstructorKind s_readableStreamDefaultReaderReadManyCodeConstructorK const JSC::ImplementationVisibility s_readableStreamDefaultReaderReadManyCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamDefaultReaderReadManyCodeLength = 2598; 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 j=@getByIdDirectPrivate(this,\"ownerReadableStream\");if(!j)@throwTypeError(\"readMany() called on a reader owned by no readable stream\");const I=@getByIdDirectPrivate(j,\"state\");if(@putByIdDirectPrivate(j,\"disturbed\",!0),I===@streamClosed)return{value:[],size:0,done:!0};else if(I===@streamErrored)throw @getByIdDirectPrivate(j,\"storedError\");var B=@getByIdDirectPrivate(j,\"readableStreamController\"),F=@getByIdDirectPrivate(B,\"queue\");if(!F)return B.@pull(B).@then(function({done:_,value:w}){return _\?{done:!0,value:[],size:0}:{value:[w],size:1,done:!1}});const N=F.content;var Q=F.size,x=N.toArray(!1),C=x.length;if(C>0){var D=@newArrayWithSize(C);if(@isReadableByteStreamController(B)){{const _=x[0];if(!(@ArrayBuffer.@isView(_)||_ instanceof @ArrayBuffer))@putByValDirect(D,0,new @Uint8Array(_.buffer,_.byteOffset,_.byteLength));else @putByValDirect(D,0,_)}for(var d=1;d<C;d++){const _=x[d];if(!(@ArrayBuffer.@isView(_)||_ instanceof @ArrayBuffer))@putByValDirect(D,d,new @Uint8Array(_.buffer,_.byteOffset,_.byteLength));else @putByValDirect(D,d,_)}}else{@putByValDirect(D,0,x[0].value);for(var d=1;d<C;d++)@putByValDirect(D,d,x[d].value)}if(@resetQueue(@getByIdDirectPrivate(B,\"queue\")),@getByIdDirectPrivate(B,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(B,\"controlledReadableStream\"));else if(@isReadableStreamDefaultController(B))@readableStreamDefaultControllerCallPullIfNeeded(B);else if(@isReadableByteStreamController(B))@readableByteStreamControllerCallPullIfNeeded(B);return{value:D,size:Q,done:!1}}var J=(_)=>{if(_.done)return{value:[],size:0,done:!0};var w=@getByIdDirectPrivate(j,\"readableStreamController\"),G=@getByIdDirectPrivate(w,\"queue\"),k=[_.value].concat(G.content.toArray(!1)),K=k.length;if(@isReadableByteStreamController(w))for(var A=0;A<K;A++){const H=k[A];if(!(@ArrayBuffer.@isView(H)||H instanceof @ArrayBuffer)){const{buffer:T,byteOffset:U,byteLength:W}=H;@putByValDirect(k,A,new @Uint8Array(T,U,W))}}else for(var A=1;A<K;A++)@putByValDirect(k,A,k[A].value);var S=G.size;if(@resetQueue(G),@getByIdDirectPrivate(w,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(w,\"controlledReadableStream\"));else if(@isReadableStreamDefaultController(w))@readableStreamDefaultControllerCallPullIfNeeded(w);else if(@isReadableByteStreamController(w))@readableByteStreamControllerCallPullIfNeeded(w);return{value:k,size:S,done:!1}},E=B.@pull(B);if(E&&@isPromise(E))return E.@then(J);return J(E)})\n"; +const char* const s_readableStreamDefaultReaderReadManyCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultReader(this))@throwTypeError(\"ReadableStreamDefaultReader.readMany() should not be called directly\");const S=@getByIdDirectPrivate(this,\"ownerReadableStream\");if(!S)@throwTypeError(\"readMany() called on a reader owned by no readable stream\");const k=@getByIdDirectPrivate(S,\"state\");if(@putByIdDirectPrivate(S,\"disturbed\",!0),k===@streamClosed)return{value:[],size:0,done:!0};else if(k===@streamErrored)throw @getByIdDirectPrivate(S,\"storedError\");var G=@getByIdDirectPrivate(S,\"readableStreamController\"),x=@getByIdDirectPrivate(G,\"queue\");if(!x)return G.@pull(G).@then(function({done:K,value:B}){return K\?{done:!0,value:[],size:0}:{value:[B],size:1,done:!1}});const C=x.content;var _=x.size,E=C.toArray(!1),I=E.length;if(I>0){var D=@newArrayWithSize(I);if(@isReadableByteStreamController(G)){{const K=E[0];if(!(@ArrayBuffer.@isView(K)||K instanceof @ArrayBuffer))@putByValDirect(D,0,new @Uint8Array(K.buffer,K.byteOffset,K.byteLength));else @putByValDirect(D,0,K)}for(var J=1;J<I;J++){const K=E[J];if(!(@ArrayBuffer.@isView(K)||K instanceof @ArrayBuffer))@putByValDirect(D,J,new @Uint8Array(K.buffer,K.byteOffset,K.byteLength));else @putByValDirect(D,J,K)}}else{@putByValDirect(D,0,E[0].value);for(var J=1;J<I;J++)@putByValDirect(D,J,E[J].value)}if(@resetQueue(@getByIdDirectPrivate(G,\"queue\")),@getByIdDirectPrivate(G,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(G,\"controlledReadableStream\"));else if(@isReadableStreamDefaultController(G))@readableStreamDefaultControllerCallPullIfNeeded(G);else if(@isReadableByteStreamController(G))@readableByteStreamControllerCallPullIfNeeded(G);return{value:D,size:_,done:!1}}var T=(K)=>{if(K.done)return{value:[],size:0,done:!0};var B=@getByIdDirectPrivate(S,\"readableStreamController\"),F=@getByIdDirectPrivate(B,\"queue\"),N=[K.value].concat(F.content.toArray(!1)),j=N.length;if(@isReadableByteStreamController(B))for(var H=0;H<j;H++){const d=N[H];if(!(@ArrayBuffer.@isView(d)||d instanceof @ArrayBuffer)){const{buffer:Q,byteOffset:w,byteLength:W}=d;@putByValDirect(N,H,new @Uint8Array(Q,w,W))}}else for(var H=1;H<j;H++)@putByValDirect(N,H,N[H].value);var A=F.size;if(@resetQueue(F),@getByIdDirectPrivate(B,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(B,\"controlledReadableStream\"));else if(@isReadableStreamDefaultController(B))@readableStreamDefaultControllerCallPullIfNeeded(B);else if(@isReadableByteStreamController(B))@readableByteStreamControllerCallPullIfNeeded(B);return{value:N,size:A,done:!1}},U=G.@pull(G);if(U&&@isPromise(U))return U.@then(T);return T(U)})\n"; // read const JSC::ConstructAbility s_readableStreamDefaultReaderReadCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2078,7 +2078,7 @@ const JSC::ConstructorKind s_streamInternalsShieldingPromiseResolveCodeConstruct const JSC::ImplementationVisibility s_streamInternalsShieldingPromiseResolveCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_streamInternalsShieldingPromiseResolveCodeLength = 124; static const JSC::Intrinsic s_streamInternalsShieldingPromiseResolveCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_streamInternalsShieldingPromiseResolveCode = "(function (a){\"use strict\";const _=@Promise.@resolve(a);if(_.@then===@undefined)_.@then=@Promise.prototype.@then;return _})\n"; +const char* const s_streamInternalsShieldingPromiseResolveCode = "(function (_){\"use strict\";const a=@Promise.@resolve(_);if(a.@then===@undefined)a.@then=@Promise.prototype.@then;return a})\n"; // promiseInvokeOrNoopMethodNoCatch const JSC::ConstructAbility s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2086,7 +2086,7 @@ const JSC::ConstructorKind s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCode const JSC::ImplementationVisibility s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeLength = 125; static const JSC::Intrinsic s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCode = "(function (l,i,n){\"use strict\";if(i===@undefined)return @Promise.@resolve();return @shieldingPromiseResolve(i.@apply(l,n))})\n"; +const char* const s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCode = "(function (i,l,n){\"use strict\";if(l===@undefined)return @Promise.@resolve();return @shieldingPromiseResolve(l.@apply(i,n))})\n"; // promiseInvokeOrNoopNoCatch const JSC::ConstructAbility s_streamInternalsPromiseInvokeOrNoopNoCatchCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2110,7 +2110,7 @@ const JSC::ConstructorKind s_streamInternalsPromiseInvokeOrNoopCodeConstructorKi const JSC::ImplementationVisibility s_streamInternalsPromiseInvokeOrNoopCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_streamInternalsPromiseInvokeOrNoopCodeLength = 116; static const JSC::Intrinsic s_streamInternalsPromiseInvokeOrNoopCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_streamInternalsPromiseInvokeOrNoopCode = "(function (n,d,l){\"use strict\";try{return @promiseInvokeOrNoopNoCatch(n,d,l)}catch(m){return @Promise.@reject(m)}})\n"; +const char* const s_streamInternalsPromiseInvokeOrNoopCode = "(function (n,m,d){\"use strict\";try{return @promiseInvokeOrNoopNoCatch(n,m,d)}catch(l){return @Promise.@reject(l)}})\n"; // promiseInvokeOrFallbackOrNoop const JSC::ConstructAbility s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2118,7 +2118,7 @@ const JSC::ConstructorKind s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeCon const JSC::ImplementationVisibility s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeLength = 198; static const JSC::Intrinsic s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_streamInternalsPromiseInvokeOrFallbackOrNoopCode = "(function (_,l,p,u,v){\"use strict\";try{const n=_[l];if(n===@undefined)return @promiseInvokeOrNoopNoCatch(_,u,v);return @shieldingPromiseResolve(n.@apply(_,p))}catch(n){return @Promise.@reject(n)}})\n"; +const char* const s_streamInternalsPromiseInvokeOrFallbackOrNoopCode = "(function (n,_,l,p,u){\"use strict\";try{const v=n[_];if(v===@undefined)return @promiseInvokeOrNoopNoCatch(n,p,u);return @shieldingPromiseResolve(v.@apply(n,l))}catch(v){return @Promise.@reject(v)}})\n"; // validateAndNormalizeQueuingStrategy const JSC::ConstructAbility s_streamInternalsValidateAndNormalizeQueuingStrategyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2126,7 +2126,7 @@ const JSC::ConstructorKind s_streamInternalsValidateAndNormalizeQueuingStrategyC const JSC::ImplementationVisibility s_streamInternalsValidateAndNormalizeQueuingStrategyCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_streamInternalsValidateAndNormalizeQueuingStrategyCodeLength = 263; static const JSC::Intrinsic s_streamInternalsValidateAndNormalizeQueuingStrategyCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_streamInternalsValidateAndNormalizeQueuingStrategyCode = "(function (d,l){\"use strict\";if(d!==@undefined&&typeof d!==\"function\")@throwTypeError(\"size parameter must be a function\");const f=@toNumber(l);if(@isNaN(f)||f<0)@throwRangeError(\"highWaterMark value is negative or not a number\");return{size:d,highWaterMark:f}})\n"; +const char* const s_streamInternalsValidateAndNormalizeQueuingStrategyCode = "(function (d,f){\"use strict\";if(d!==@undefined&&typeof d!==\"function\")@throwTypeError(\"size parameter must be a function\");const l=@toNumber(f);if(@isNaN(l)||l<0)@throwRangeError(\"highWaterMark value is negative or not a number\");return{size:d,highWaterMark:l}})\n"; // createFIFO const JSC::ConstructAbility s_streamInternalsCreateFIFOCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2134,7 +2134,7 @@ const JSC::ConstructorKind s_streamInternalsCreateFIFOCodeConstructorKind = JSC: const JSC::ImplementationVisibility s_streamInternalsCreateFIFOCodeImplementationVisibility = JSC::ImplementationVisibility::Private; const int s_streamInternalsCreateFIFOCodeLength = 1473; static const JSC::Intrinsic s_streamInternalsCreateFIFOCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_streamInternalsCreateFIFOCode = "(function (){\"use strict\";var E=@Array.prototype.slice;class A{constructor(){this._head=0,this._tail=0,this._capacityMask=3,this._list=@newArrayWithSize(4)}_head;_tail;_capacityMask;_list;size(){if(this._head===this._tail)return 0;if(this._head<this._tail)return this._tail-this._head;else return this._capacityMask+1-(this._head-this._tail)}isEmpty(){return this.size()==0}isNotEmpty(){return this.size()>0}shift(){var{_head:g,_tail:b,_list:x,_capacityMask:M}=this;if(g===b)return @undefined;var w=x[g];if(@putByValDirect(x,g,@undefined),g=this._head=g+1&M,g<2&&b>1e4&&b<=x.length>>>2)this._shrinkArray();return w}peek(){if(this._head===this._tail)return @undefined;return this._list[this._head]}push(g){var b=this._tail;if(@putByValDirect(this._list,b,g),this._tail=b+1&this._capacityMask,this._tail===this._head)this._growArray()}toArray(g){var b=this._list,x=@toLength(b.length);if(g||this._head>this._tail){var M=@toLength(this._head),w=@toLength(this._tail),F=@toLength(x-M+w),z=@newArrayWithSize(F),B=0;for(var v=M;v<x;v++)@putByValDirect(z,B++,b[v]);for(var v=0;v<w;v++)@putByValDirect(z,B++,b[v]);return z}else return E.@call(b,this._head,this._tail)}clear(){this._head=0,this._tail=0,this._list.fill(@undefined)}_growArray(){if(this._head)this._list=this.toArray(!0),this._head=0;this._tail=@toLength(this._list.length),this._list.length<<=1,this._capacityMask=this._capacityMask<<1|1}_shrinkArray(){this._list.length>>>=1,this._capacityMask>>>=1}}return new A})\n"; +const char* const s_streamInternalsCreateFIFOCode = "(function (){\"use strict\";var b=@Array.prototype.slice;class w{constructor(){this._head=0,this._tail=0,this._capacityMask=3,this._list=@newArrayWithSize(4)}_head;_tail;_capacityMask;_list;size(){if(this._head===this._tail)return 0;if(this._head<this._tail)return this._tail-this._head;else return this._capacityMask+1-(this._head-this._tail)}isEmpty(){return this.size()==0}isNotEmpty(){return this.size()>0}shift(){var{_head:x,_tail:g,_list:M,_capacityMask:z}=this;if(x===g)return @undefined;var A=M[x];if(@putByValDirect(M,x,@undefined),x=this._head=x+1&z,x<2&&g>1e4&&g<=M.length>>>2)this._shrinkArray();return A}peek(){if(this._head===this._tail)return @undefined;return this._list[this._head]}push(x){var g=this._tail;if(@putByValDirect(this._list,g,x),this._tail=g+1&this._capacityMask,this._tail===this._head)this._growArray()}toArray(x){var g=this._list,M=@toLength(g.length);if(x||this._head>this._tail){var z=@toLength(this._head),A=@toLength(this._tail),B=@toLength(M-z+A),E=@newArrayWithSize(B),v=0;for(var F=z;F<M;F++)@putByValDirect(E,v++,g[F]);for(var F=0;F<A;F++)@putByValDirect(E,v++,g[F]);return E}else return b.@call(g,this._head,this._tail)}clear(){this._head=0,this._tail=0,this._list.fill(@undefined)}_growArray(){if(this._head)this._list=this.toArray(!0),this._head=0;this._tail=@toLength(this._list.length),this._list.length<<=1,this._capacityMask=this._capacityMask<<1|1}_shrinkArray(){this._list.length>>>=1,this._capacityMask>>>=1}}return new w})\n"; // newQueue const JSC::ConstructAbility s_streamInternalsNewQueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2158,7 +2158,7 @@ const JSC::ConstructorKind s_streamInternalsEnqueueValueWithSizeCodeConstructorK const JSC::ImplementationVisibility s_streamInternalsEnqueueValueWithSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_streamInternalsEnqueueValueWithSizeCodeLength = 161; static const JSC::Intrinsic s_streamInternalsEnqueueValueWithSizeCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_streamInternalsEnqueueValueWithSizeCode = "(function (d,o,n){\"use strict\";if(n=@toNumber(n),!@isFinite(n)||n<0)@throwRangeError(\"size has an incorrect value\");d.content.push({value:o,size:n}),d.size+=n})\n"; +const char* const s_streamInternalsEnqueueValueWithSizeCode = "(function (n,d,o){\"use strict\";if(o=@toNumber(o),!@isFinite(o)||o<0)@throwRangeError(\"size has an incorrect value\");n.content.push({value:d,size:o}),n.size+=o})\n"; // peekQueueValue const JSC::ConstructAbility s_streamInternalsPeekQueueValueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2182,7 +2182,7 @@ const JSC::ConstructorKind s_streamInternalsExtractSizeAlgorithmCodeConstructorK const JSC::ImplementationVisibility s_streamInternalsExtractSizeAlgorithmCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_streamInternalsExtractSizeAlgorithmCodeLength = 176; static const JSC::Intrinsic s_streamInternalsExtractSizeAlgorithmCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_streamInternalsExtractSizeAlgorithmCode = "(function (p){\"use strict\";const d=p.size;if(d===@undefined)return()=>1;if(typeof d!==\"function\")@throwTypeError(\"strategy.size must be a function\");return(w)=>{return d(w)}})\n"; +const char* const s_streamInternalsExtractSizeAlgorithmCode = "(function (d){\"use strict\";const p=d.size;if(p===@undefined)return()=>1;if(typeof p!==\"function\")@throwTypeError(\"strategy.size must be a function\");return(w)=>{return p(w)}})\n"; // extractHighWaterMark const JSC::ConstructAbility s_streamInternalsExtractHighWaterMarkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2190,7 +2190,7 @@ const JSC::ConstructorKind s_streamInternalsExtractHighWaterMarkCodeConstructorK const JSC::ImplementationVisibility s_streamInternalsExtractHighWaterMarkCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_streamInternalsExtractHighWaterMarkCodeLength = 188; static const JSC::Intrinsic s_streamInternalsExtractHighWaterMarkCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_streamInternalsExtractHighWaterMarkCode = "(function (b,c){\"use strict\";const o=b.highWaterMark;if(o===@undefined)return c;if(@isNaN(o)||o<0)@throwRangeError(\"highWaterMark value is negative or not a number\");return @toNumber(o)})\n"; +const char* const s_streamInternalsExtractHighWaterMarkCode = "(function (o,b){\"use strict\";const c=o.highWaterMark;if(c===@undefined)return b;if(@isNaN(c)||c<0)@throwRangeError(\"highWaterMark value is negative or not a number\");return @toNumber(c)})\n"; // extractHighWaterMarkFromQueuingStrategyInit const JSC::ConstructAbility s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2206,7 +2206,7 @@ const JSC::ConstructorKind s_streamInternalsCreateFulfilledPromiseCodeConstructo const JSC::ImplementationVisibility s_streamInternalsCreateFulfilledPromiseCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_streamInternalsCreateFulfilledPromiseCodeLength = 81; static const JSC::Intrinsic s_streamInternalsCreateFulfilledPromiseCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_streamInternalsCreateFulfilledPromiseCode = "(function (n){\"use strict\";const d=@newPromise();return @fulfillPromise(d,n),d})\n"; +const char* const s_streamInternalsCreateFulfilledPromiseCode = "(function (d){\"use strict\";const n=@newPromise();return @fulfillPromise(n,d),n})\n"; // toDictionary const JSC::ConstructAbility s_streamInternalsToDictionaryCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2232,7 +2232,7 @@ const JSC::ConstructorKind s_importMetaObjectLoadCJS2ESMCodeConstructorKind = JS const JSC::ImplementationVisibility s_importMetaObjectLoadCJS2ESMCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_importMetaObjectLoadCJS2ESMCodeLength = 1387; static const JSC::Intrinsic s_importMetaObjectLoadCJS2ESMCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_importMetaObjectLoadCJS2ESMCode = "(function (B){\"use strict\";var D=@Loader,H=@createFIFO(),_=B;while(_){var w=D.registry.@get(_);if((w\?.state\?\?0)<=@ModuleFetch)@fulfillModuleSync(_),w=D.registry.@get(_);var W=@getPromiseInternalField(w.fetch,@promiseFieldReactionsOrResult),x=D.parseModule(_,W),z=w.module;if(x&&@isPromise(x)){var J=@getPromiseInternalField(x,@promiseFieldReactionsOrResult),X=@getPromiseInternalField(x,@promiseFieldFlags),Q=X&@promiseStateMask;if(Q===@promiseStatePending||J&&@isPromise(J))@throwTypeError(`require() async module \"${_}\" is unsupported. use \"await import()\" instead.`);else if(Q===@promiseStateRejected){if(!J\?.message)@throwTypeError(`${J+\"\"\?J:\"An error occurred\"} occurred while parsing module \\\"${_}\\\"`);throw J}w.module=z=J}else if(x&&!z)w.module=z=x;@setStateToMax(w,@ModuleLink);var Y=z.dependenciesMap,I=D.requestedModules(z),T=@newArrayWithSize(I.length);for(var F=0,Z=I.length;F<Z;++F){var G=I[F],U=G[0]===\"/\"\?G:D.resolve(G,_),L=D.ensureRegistered(U);if(L.state<@ModuleLink)H.push(U);@putByValDirect(T,F,L),Y.@set(G,L)}w.dependencies=T,w.instantiate=@Promise.resolve(w),w.satisfy=@Promise.resolve(w),_=H.shift();while(_&&(D.registry.@get(_)\?.state\?\?@ModuleFetch)>=@ModuleLink)_=H.shift()}var V=D.linkAndEvaluateModule(B,@undefined);if(V&&@isPromise(V))@throwTypeError(`require() async module \\\"${B}\\\" is unsupported. use \"await import()\" instead.`);return D.registry.@get(B)})\n"; +const char* const s_importMetaObjectLoadCJS2ESMCode = "(function (D){\"use strict\";var H=@Loader,_=@createFIFO(),I=D;while(I){var w=H.registry.@get(I);if((w\?.state\?\?0)<=@ModuleFetch)@fulfillModuleSync(I),w=H.registry.@get(I);var L=@getPromiseInternalField(w.fetch,@promiseFieldReactionsOrResult),J=H.parseModule(I,L),Q=w.module;if(J&&@isPromise(J)){var T=@getPromiseInternalField(J,@promiseFieldReactionsOrResult),x=@getPromiseInternalField(J,@promiseFieldFlags),U=x&@promiseStateMask;if(U===@promiseStatePending||T&&@isPromise(T))@throwTypeError(`require() async module \"${I}\" is unsupported. use \"await import()\" instead.`);else if(U===@promiseStateRejected){if(!T\?.message)@throwTypeError(`${T+\"\"\?T:\"An error occurred\"} occurred while parsing module \\\"${I}\\\"`);throw T}w.module=Q=T}else if(J&&!Q)w.module=Q=J;@setStateToMax(w,@ModuleLink);var V=Q.dependenciesMap,W=H.requestedModules(Q),X=@newArrayWithSize(W.length);for(var Y=0,Z=W.length;Y<Z;++Y){var z=W[Y],B=z[0]===\"/\"\?z:H.resolve(z,I),F=H.ensureRegistered(B);if(F.state<@ModuleLink)_.push(B);@putByValDirect(X,Y,F),V.@set(z,F)}w.dependencies=X,w.instantiate=@Promise.resolve(w),w.satisfy=@Promise.resolve(w),I=_.shift();while(I&&(H.registry.@get(I)\?.state\?\?@ModuleFetch)>=@ModuleLink)I=_.shift()}var G=H.linkAndEvaluateModule(D,@undefined);if(G&&@isPromise(G))@throwTypeError(`require() async module \\\"${D}\\\" is unsupported. use \"await import()\" instead.`);return H.registry.@get(D)})\n"; // requireESM const JSC::ConstructAbility s_importMetaObjectRequireESMCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2240,7 +2240,7 @@ const JSC::ConstructorKind s_importMetaObjectRequireESMCodeConstructorKind = JSC const JSC::ImplementationVisibility s_importMetaObjectRequireESMCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_importMetaObjectRequireESMCodeLength = 325; static const JSC::Intrinsic s_importMetaObjectRequireESMCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_importMetaObjectRequireESMCode = "(function (c){\"use strict\";var a=@Loader.registry.@get(c);if(!a||!a.evaluated)a=@loadCJS2ESM(c);if(!a||!a.evaluated||!a.module)@throwTypeError(`require() failed to evaluate module \"${c}\". This is an internal consistentency error.`);var _=@Loader.getModuleNamespaceObject(a.module);if(_[@commonJSSymbol]===0)return;return _})\n"; +const char* const s_importMetaObjectRequireESMCode = "(function (a){\"use strict\";var c=@Loader.registry.@get(a);if(!c||!c.evaluated)c=@loadCJS2ESM(a);if(!c||!c.evaluated||!c.module)@throwTypeError(`require() failed to evaluate module \"${a}\". This is an internal consistentency error.`);var _=@Loader.getModuleNamespaceObject(c.module);if(_[@commonJSSymbol]===0)return;return _})\n"; // internalRequire const JSC::ConstructAbility s_importMetaObjectInternalRequireCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2248,7 +2248,7 @@ const JSC::ConstructorKind s_importMetaObjectInternalRequireCodeConstructorKind const JSC::ImplementationVisibility s_importMetaObjectInternalRequireCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_importMetaObjectInternalRequireCodeLength = 747; static const JSC::Intrinsic s_importMetaObjectInternalRequireCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_importMetaObjectInternalRequireCode = "(function (_){\"use strict\";var n=@requireMap.@get(_);const g=_.substring(_.length-5);if(n)return n.exports;if(g===\".json\"){var j=globalThis[Symbol.for(\"_fs\")]||=@Bun.fs(),b=JSON.parse(j.readFileSync(_,\"utf8\"));return @requireMap.@set(_,@createCommonJSModule(_,b,!0)),b}else if(g===\".node\"){const k=@createCommonJSModule(_,{},!0);return process.dlopen(k,_),@requireMap.@set(_,k),k.exports}else if(g===\".toml\"){var j=globalThis[Symbol.for(\"_fs\")]||=@Bun.fs(),b=@Bun.TOML.parse(j.readFileSync(_,\"utf8\"));return @requireMap.@set(_,@createCommonJSModule(_,b,!0)),b}else{var b=@requireESM(_);const v=@requireMap.@get(_);if(v)return v.exports;var q=b\?.default;if(q\?.[@commonJSSymbol]===0)b=q;return @requireMap.@set(_,@createCommonJSModule(_,b,!0)),b}})\n"; +const char* const s_importMetaObjectInternalRequireCode = "(function (b){\"use strict\";var g=@requireMap.@get(b);const j=b.substring(b.length-5);if(g)return g.exports;if(j===\".json\"){var k=globalThis[Symbol.for(\"_fs\")]||=@Bun.fs(),n=JSON.parse(k.readFileSync(b,\"utf8\"));return @requireMap.@set(b,@createCommonJSModule(b,n,!0)),n}else if(j===\".node\"){const q=@createCommonJSModule(b,{},!0);return process.dlopen(q,b),@requireMap.@set(b,q),q.exports}else if(j===\".toml\"){var k=globalThis[Symbol.for(\"_fs\")]||=@Bun.fs(),n=@Bun.TOML.parse(k.readFileSync(b,\"utf8\"));return @requireMap.@set(b,@createCommonJSModule(b,n,!0)),n}else{var n=@requireESM(b);const v=@requireMap.@get(b);if(v)return v.exports;var _=n\?.default;if(_\?.[@commonJSSymbol]===0)n=_;return @requireMap.@set(b,@createCommonJSModule(b,n,!0)),n}})\n"; // createRequireCache const JSC::ConstructAbility s_importMetaObjectCreateRequireCacheCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2256,7 +2256,7 @@ const JSC::ConstructorKind s_importMetaObjectCreateRequireCacheCodeConstructorKi const JSC::ImplementationVisibility s_importMetaObjectCreateRequireCacheCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_importMetaObjectCreateRequireCacheCodeLength = 854; static const JSC::Intrinsic s_importMetaObjectCreateRequireCacheCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_importMetaObjectCreateRequireCacheCode = "(function (){\"use strict\";var c=new Map,L={};return new Proxy(L,{get(f,_){const h=@requireMap.@get(_);if(h)return h;const t=@Loader.registry.@get(_);if(t\?.evaluated){const u=@Loader.getModuleNamespaceObject(t.module),g=u[@commonJSSymbol]===0||u.default\?.[@commonJSSymbol]\?u.default:u,b=@createCommonJSModule(_,g,!0);return @requireMap.@set(_,b),b}return L[_]},set(f,_,h){return @requireMap.@set(_,h),!0},has(f,_){return @requireMap.@has(_)||@Loader.registry.@has(_)},deleteProperty(f,_){return c.@delete(_),@requireMap.@delete(_),@Loader.registry.@delete(_),!0},ownKeys(f){var _=[...@requireMap.@keys()];const h=[...@Loader.registry.@keys()];for(let t of h)if(!_.includes(t))@arrayPush(_,t);return _},getPrototypeOf(f){return null},getOwnPropertyDescriptor(f,_){if(@requireMap.@has(_)||@Loader.registry.@has(_))return{configurable:!0,enumerable:!0}}})})\n"; +const char* const s_importMetaObjectCreateRequireCacheCode = "(function (){\"use strict\";var _=new Map,f={};return new Proxy(f,{get(h,t){const u=@requireMap.@get(t);if(u)return u;const L=@Loader.registry.@get(t);if(L\?.evaluated){const b=@Loader.getModuleNamespaceObject(L.module),c=b[@commonJSSymbol]===0||b.default\?.[@commonJSSymbol]\?b.default:b,g=@createCommonJSModule(t,c,!0);return @requireMap.@set(t,g),g}return f[t]},set(h,t,u){return @requireMap.@set(t,u),!0},has(h,t){return @requireMap.@has(t)||@Loader.registry.@has(t)},deleteProperty(h,t){return _.@delete(t),@requireMap.@delete(t),@Loader.registry.@delete(t),!0},ownKeys(h){var t=[...@requireMap.@keys()];const u=[...@Loader.registry.@keys()];for(let L of u)if(!t.includes(L))@arrayPush(t,L);return t},getPrototypeOf(h){return null},getOwnPropertyDescriptor(h,t){if(@requireMap.@has(t)||@Loader.registry.@has(t))return{configurable:!0,enumerable:!0}}})})\n"; // require const JSC::ConstructAbility s_importMetaObjectRequireCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2440,7 +2440,7 @@ const JSC::ConstructorKind s_readableStreamInitializeReadableStreamCodeConstruct const JSC::ImplementationVisibility s_readableStreamInitializeReadableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInitializeReadableStreamCodeLength = 2065; static const JSC::Intrinsic s_readableStreamInitializeReadableStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInitializeReadableStreamCode = "(function (_,f){\"use strict\";if(_===@undefined)_={@bunNativeType:0,@bunNativePtr:0,@lazy:!1};if(f===@undefined)f={};if(!@isObject(_))@throwTypeError(\"ReadableStream constructor takes an object as first argument\");if(f!==@undefined&&!@isObject(f))@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(_,\"bunNativeType\")\?\?0),@putByIdDirectPrivate(this,\"bunNativePtr\",@getByIdDirectPrivate(_,\"bunNativePtr\")\?\?0);const B=_.type===\"direct\",b=!!_.@lazy,I=B||b;if(@getByIdDirectPrivate(_,\"pull\")!==@undefined&&!I){const v=@getByIdDirectPrivate(f,\"size\"),m=@getByIdDirectPrivate(f,\"highWaterMark\");return @putByIdDirectPrivate(this,\"highWaterMark\",m),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@setupReadableStreamDefaultController(this,_,v,m!==@undefined\?m:1,@getByIdDirectPrivate(_,\"start\"),@getByIdDirectPrivate(_,\"pull\"),@getByIdDirectPrivate(_,\"cancel\")),this}if(B)@putByIdDirectPrivate(this,\"underlyingSource\",_),@putByIdDirectPrivate(this,\"highWaterMark\",@getByIdDirectPrivate(f,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",()=>@createReadableStreamController(this,_,f));else if(I){const v=_.autoAllocateChunkSize;@putByIdDirectPrivate(this,\"highWaterMark\",@undefined),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"highWaterMark\",v||@getByIdDirectPrivate(f,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",()=>{const m=@lazyLoadStream(this,v);if(m)@createReadableStreamController(this,m,f)})}else @putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"highWaterMark\",@getByIdDirectPrivate(f,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",@undefined),@createReadableStreamController(this,_,f);return this})\n"; +const char* const s_readableStreamInitializeReadableStreamCode = "(function (f,m){\"use strict\";if(f===@undefined)f={@bunNativeType:0,@bunNativePtr:0,@lazy:!1};if(m===@undefined)m={};if(!@isObject(f))@throwTypeError(\"ReadableStream constructor takes an object as first argument\");if(m!==@undefined&&!@isObject(m))@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(f,\"bunNativeType\")\?\?0),@putByIdDirectPrivate(this,\"bunNativePtr\",@getByIdDirectPrivate(f,\"bunNativePtr\")\?\?0);const v=f.type===\"direct\",B=!!f.@lazy,I=v||B;if(@getByIdDirectPrivate(f,\"pull\")!==@undefined&&!I){const _=@getByIdDirectPrivate(m,\"size\"),b=@getByIdDirectPrivate(m,\"highWaterMark\");return @putByIdDirectPrivate(this,\"highWaterMark\",b),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@setupReadableStreamDefaultController(this,f,_,b!==@undefined\?b:1,@getByIdDirectPrivate(f,\"start\"),@getByIdDirectPrivate(f,\"pull\"),@getByIdDirectPrivate(f,\"cancel\")),this}if(v)@putByIdDirectPrivate(this,\"underlyingSource\",f),@putByIdDirectPrivate(this,\"highWaterMark\",@getByIdDirectPrivate(m,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",()=>@createReadableStreamController(this,f,m));else if(I){const _=f.autoAllocateChunkSize;@putByIdDirectPrivate(this,\"highWaterMark\",@undefined),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"highWaterMark\",_||@getByIdDirectPrivate(m,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",()=>{const b=@lazyLoadStream(this,_);if(b)@createReadableStreamController(this,b,m)})}else @putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"highWaterMark\",@getByIdDirectPrivate(m,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",@undefined),@createReadableStreamController(this,f,m);return this})\n"; // readableStreamToArray const JSC::ConstructAbility s_readableStreamReadableStreamToArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2448,7 +2448,7 @@ const JSC::ConstructorKind s_readableStreamReadableStreamToArrayCodeConstructorK const JSC::ImplementationVisibility s_readableStreamReadableStreamToArrayCodeImplementationVisibility = JSC::ImplementationVisibility::Private; const int s_readableStreamReadableStreamToArrayCodeLength = 173; static const JSC::Intrinsic s_readableStreamReadableStreamToArrayCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamReadableStreamToArrayCode = "(function (_){\"use strict\";var b=@getByIdDirectPrivate(_,\"underlyingSource\");if(b!==@undefined)return @readableStreamToArrayDirect(_,b);return @readableStreamIntoArray(_)})\n"; +const char* const s_readableStreamReadableStreamToArrayCode = "(function (b){\"use strict\";var _=@getByIdDirectPrivate(b,\"underlyingSource\");if(_!==@undefined)return @readableStreamToArrayDirect(b,_);return @readableStreamIntoArray(b)})\n"; // readableStreamToText const JSC::ConstructAbility s_readableStreamReadableStreamToTextCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2464,7 +2464,7 @@ const JSC::ConstructorKind s_readableStreamReadableStreamToArrayBufferCodeConstr const JSC::ImplementationVisibility s_readableStreamReadableStreamToArrayBufferCodeImplementationVisibility = JSC::ImplementationVisibility::Private; const int s_readableStreamReadableStreamToArrayBufferCodeLength = 270; static const JSC::Intrinsic s_readableStreamReadableStreamToArrayBufferCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamReadableStreamToArrayBufferCode = "(function (_){\"use strict\";var p=@getByIdDirectPrivate(_,\"underlyingSource\");if(p!==@undefined)return @readableStreamToArrayBufferDirect(_,p);var b=@Bun.readableStreamToArray(_);if(@isPromise(b))return b.then(@Bun.concatArrayBuffers);return @Bun.concatArrayBuffers(b)})\n"; +const char* const s_readableStreamReadableStreamToArrayBufferCode = "(function (_){\"use strict\";var b=@getByIdDirectPrivate(_,\"underlyingSource\");if(b!==@undefined)return @readableStreamToArrayBufferDirect(_,b);var p=@Bun.readableStreamToArray(_);if(@isPromise(p))return p.then(@Bun.concatArrayBuffers);return @Bun.concatArrayBuffers(p)})\n"; // readableStreamToJSON const JSC::ConstructAbility s_readableStreamReadableStreamToJSONCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2488,7 +2488,7 @@ const JSC::ConstructorKind s_readableStreamConsumeReadableStreamCodeConstructorK const JSC::ImplementationVisibility s_readableStreamConsumeReadableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Private; const int s_readableStreamConsumeReadableStreamCodeLength = 1603; static const JSC::Intrinsic s_readableStreamConsumeReadableStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamConsumeReadableStreamCode = "(function (G,k,x){\"use strict\";const A=globalThis.Symbol.for(\"Bun.consumeReadableStreamPrototype\");var j=globalThis[A];if(!j)j=globalThis[A]=[];var q=j[k];if(q===@undefined){var[L,H,I,J,N,B]=globalThis[globalThis.Symbol.for(\"Bun.lazy\")](k);q=class K{handleError;handleClosed;processResult;constructor(_,F){this.#_=F,this.#F=_,this.#$=!1,this.handleError=this._handleError.bind(this),this.handleClosed=this._handleClosed.bind(this),this.processResult=this._processResult.bind(this),_.closed.then(this.handleClosed,this.handleError)}_handleClosed(){if(this.#$)return;this.#$=!0;var _=this.#_;this.#_=0,J(_),B(_)}_handleError(_){if(this.#$)return;this.#$=!0;var F=this.#_;this.#_=0,H(F,_),B(F)}#_;#$=!1;#F;_handleReadMany({value:_,done:F,size:w}){if(F){this.handleClosed();return}if(this.#$)return;I(this.#_,_,F,w)}read(){if(!this.#_)return @throwTypeError(\"ReadableStreamSink is already closed\");return this.processResult(this.#F.read())}_processResult(_){if(_&&@isPromise(_)){if(@getPromiseInternalField(_,@promiseFieldFlags)&@promiseStateFulfilled){const w=@getPromiseInternalField(_,@promiseFieldReactionsOrResult);if(w)_=w}}if(_&&@isPromise(_))return _.then(this.processResult,this.handleError),null;if(_.done)return this.handleClosed(),0;else if(_.value)return _.value;else return-1}readMany(){if(!this.#_)return @throwTypeError(\"ReadableStreamSink is already closed\");return this.processResult(this.#F.readMany())}};const D=k+1;if(j.length<D)j.length=D;@putByValDirect(j,k,q)}if(@isReadableStreamLocked(x))@throwTypeError(\"Cannot start reading from a locked stream\");return new q(x.getReader(),G)})\n"; +const char* const s_readableStreamConsumeReadableStreamCode = "(function (w,x,A){\"use strict\";const B=globalThis.Symbol.for(\"Bun.consumeReadableStreamPrototype\");var j=globalThis[B];if(!j)j=globalThis[B]=[];var I=j[x];if(I===@undefined){var[k,J,K,L,G,_]=globalThis[globalThis.Symbol.for(\"Bun.lazy\")](x);I=class H{handleError;handleClosed;processResult;constructor(D,N){this.#_=N,this.#F=D,this.#$=!1,this.handleError=this._handleError.bind(this),this.handleClosed=this._handleClosed.bind(this),this.processResult=this._processResult.bind(this),D.closed.then(this.handleClosed,this.handleError)}_handleClosed(){if(this.#$)return;this.#$=!0;var D=this.#_;this.#_=0,L(D),_(D)}_handleError(D){if(this.#$)return;this.#$=!0;var N=this.#_;this.#_=0,J(N,D),_(N)}#_;#$=!1;#F;_handleReadMany({value:D,done:N,size:q}){if(N){this.handleClosed();return}if(this.#$)return;K(this.#_,D,N,q)}read(){if(!this.#_)return @throwTypeError(\"ReadableStreamSink is already closed\");return this.processResult(this.#F.read())}_processResult(D){if(D&&@isPromise(D)){if(@getPromiseInternalField(D,@promiseFieldFlags)&@promiseStateFulfilled){const q=@getPromiseInternalField(D,@promiseFieldReactionsOrResult);if(q)D=q}}if(D&&@isPromise(D))return D.then(this.processResult,this.handleError),null;if(D.done)return this.handleClosed(),0;else if(D.value)return D.value;else return-1}readMany(){if(!this.#_)return @throwTypeError(\"ReadableStreamSink is already closed\");return this.processResult(this.#F.readMany())}};const F=x+1;if(j.length<F)j.length=F;@putByValDirect(j,x,I)}if(@isReadableStreamLocked(A))@throwTypeError(\"Cannot start reading from a locked stream\");return new I(A.getReader(),w)})\n"; // createEmptyReadableStream const JSC::ConstructAbility s_readableStreamCreateEmptyReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2520,7 +2520,7 @@ const JSC::ConstructorKind s_readableStreamGetReaderCodeConstructorKind = JSC::C const JSC::ImplementationVisibility s_readableStreamGetReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamGetReaderCodeLength = 470; static const JSC::Intrinsic s_readableStreamGetReaderCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamGetReaderCode = "(function (b){\"use strict\";if(!@isReadableStream(this))throw @makeThisTypeError(\"ReadableStream\",\"getReader\");const e=@toDictionary(b,{},\"ReadableStream.getReader takes an object as first argument\").mode;if(e===@undefined){var n=@getByIdDirectPrivate(this,\"start\");if(n)@putByIdDirectPrivate(this,\"start\",@undefined),n();return new @ReadableStreamDefaultReader(this)}if(e==\"byob\")return new @ReadableStreamBYOBReader(this);@throwTypeError(\"Invalid mode is specified\")})\n"; +const char* const s_readableStreamGetReaderCode = "(function (e){\"use strict\";if(!@isReadableStream(this))throw @makeThisTypeError(\"ReadableStream\",\"getReader\");const n=@toDictionary(e,{},\"ReadableStream.getReader takes an object as first argument\").mode;if(n===@undefined){var b=@getByIdDirectPrivate(this,\"start\");if(b)@putByIdDirectPrivate(this,\"start\",@undefined),b();return new @ReadableStreamDefaultReader(this)}if(n==\"byob\")return new @ReadableStreamBYOBReader(this);@throwTypeError(\"Invalid mode is specified\")})\n"; // pipeThrough const JSC::ConstructAbility s_readableStreamPipeThroughCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2528,7 +2528,7 @@ const JSC::ConstructorKind s_readableStreamPipeThroughCodeConstructorKind = JSC: const JSC::ImplementationVisibility s_readableStreamPipeThroughCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamPipeThroughCodeLength = 859; static const JSC::Intrinsic s_readableStreamPipeThroughCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamPipeThroughCode = "(function (q,_){\"use strict\";const y=q,c=y.readable;if(!@isReadableStream(c))throw @makeTypeError(\"readable should be ReadableStream\");const x=y.writable,u=@getInternalWritableStream(x);if(!@isWritableStream(u))throw @makeTypeError(\"writable should be WritableStream\");let h=!1,j=!1,k=!1,d;if(!@isUndefinedOrNull(_)){if(!@isObject(_))throw @makeTypeError(\"options must be an object\");if(j=!!_.preventAbort,k=!!_.preventCancel,h=!!_.preventClose,d=_.signal,d!==@undefined&&!@isAbortSignal(d))throw @makeTypeError(\"options.signal must be AbortSignal\")}if(!@isReadableStream(this))throw @makeThisTypeError(\"ReadableStream\",\"pipeThrough\");if(@isReadableStreamLocked(this))throw @makeTypeError(\"ReadableStream is locked\");if(@isWritableStreamLocked(u))throw @makeTypeError(\"WritableStream is locked\");return @readableStreamPipeToWritableStream(this,u,h,j,k,d),c})\n"; +const char* const s_readableStreamPipeThroughCode = "(function (_,u){\"use strict\";const d=_,y=d.readable;if(!@isReadableStream(y))throw @makeTypeError(\"readable should be ReadableStream\");const c=d.writable,h=@getInternalWritableStream(c);if(!@isWritableStream(h))throw @makeTypeError(\"writable should be WritableStream\");let j=!1,k=!1,q=!1,x;if(!@isUndefinedOrNull(u)){if(!@isObject(u))throw @makeTypeError(\"options must be an object\");if(k=!!u.preventAbort,q=!!u.preventCancel,j=!!u.preventClose,x=u.signal,x!==@undefined&&!@isAbortSignal(x))throw @makeTypeError(\"options.signal must be AbortSignal\")}if(!@isReadableStream(this))throw @makeThisTypeError(\"ReadableStream\",\"pipeThrough\");if(@isReadableStreamLocked(this))throw @makeTypeError(\"ReadableStream is locked\");if(@isWritableStreamLocked(h))throw @makeTypeError(\"WritableStream is locked\");return @readableStreamPipeToWritableStream(this,h,j,k,q,x),y})\n"; // pipeTo const JSC::ConstructAbility s_readableStreamPipeToCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2536,7 +2536,7 @@ const JSC::ConstructorKind s_readableStreamPipeToCodeConstructorKind = JSC::Cons const JSC::ImplementationVisibility s_readableStreamPipeToCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamPipeToCodeLength = 914; static const JSC::Intrinsic s_readableStreamPipeToCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamPipeToCode = "(function (S){\"use strict\";if(!@isReadableStream(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStream\",\"pipeTo\"));if(@isReadableStreamLocked(this))return @Promise.@reject(@makeTypeError(\"ReadableStream is locked\"));let m=@argument(1),j=!1,E=!1,R=!1,u;if(!@isUndefinedOrNull(m)){if(!@isObject(m))return @Promise.@reject(@makeTypeError(\"options must be an object\"));try{E=!!m.preventAbort,R=!!m.preventCancel,j=!!m.preventClose,u=m.signal}catch(b){return @Promise.@reject(b)}if(u!==@undefined&&!@isAbortSignal(u))return @Promise.@reject(@makeTypeError(\"options.signal must be AbortSignal\"))}const _=@getInternalWritableStream(S);if(!@isWritableStream(_))return @Promise.@reject(@makeTypeError(\"ReadableStream pipeTo requires a WritableStream\"));if(@isWritableStreamLocked(_))return @Promise.@reject(@makeTypeError(\"WritableStream is locked\"));return @readableStreamPipeToWritableStream(this,_,j,E,R,u)})\n"; +const char* const s_readableStreamPipeToCode = "(function (u){\"use strict\";if(!@isReadableStream(this))return @Promise.@reject(@makeThisTypeError(\"ReadableStream\",\"pipeTo\"));if(@isReadableStreamLocked(this))return @Promise.@reject(@makeTypeError(\"ReadableStream is locked\"));let _=@argument(1),j=!1,E=!1,R=!1,m;if(!@isUndefinedOrNull(_)){if(!@isObject(_))return @Promise.@reject(@makeTypeError(\"options must be an object\"));try{E=!!_.preventAbort,R=!!_.preventCancel,j=!!_.preventClose,m=_.signal}catch(b){return @Promise.@reject(b)}if(m!==@undefined&&!@isAbortSignal(m))return @Promise.@reject(@makeTypeError(\"options.signal must be AbortSignal\"))}const S=@getInternalWritableStream(u);if(!@isWritableStream(S))return @Promise.@reject(@makeTypeError(\"ReadableStream pipeTo requires a WritableStream\"));if(@isWritableStreamLocked(S))return @Promise.@reject(@makeTypeError(\"WritableStream is locked\"));return @readableStreamPipeToWritableStream(this,S,j,E,R,m)})\n"; // tee const JSC::ConstructAbility s_readableStreamTeeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2560,7 +2560,7 @@ const JSC::ConstructorKind s_readableStreamValuesCodeConstructorKind = JSC::Cons const JSC::ImplementationVisibility s_readableStreamValuesCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamValuesCodeLength = 129; static const JSC::Intrinsic s_readableStreamValuesCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamValuesCode = "(function (_){\"use strict\";var r=@ReadableStream.prototype;return @readableStreamDefineLazyIterators(r),r.values.@call(this,_)})\n"; +const char* const s_readableStreamValuesCode = "(function (r){\"use strict\";var _=@ReadableStream.prototype;return @readableStreamDefineLazyIterators(_),_.values.@call(this,r)})\n"; // lazyAsyncIterator const JSC::ConstructAbility s_readableStreamLazyAsyncIteratorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2636,7 +2636,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsPrivateInitializeReadabl const JSC::ImplementationVisibility s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeLength = 1654; static const JSC::Intrinsic s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCode = "(function (b,p,R){\"use strict\";if(!@isReadableStream(b))@throwTypeError(\"ReadableByteStreamController needs a ReadableStream\");if(@getByIdDirectPrivate(b,\"readableStreamController\")!==null)@throwTypeError(\"ReadableStream already has a controller\");@putByIdDirectPrivate(this,\"controlledReadableStream\",b),@putByIdDirectPrivate(this,\"underlyingByteSource\",p),@putByIdDirectPrivate(this,\"pullAgain\",!1),@putByIdDirectPrivate(this,\"pulling\",!1),@readableByteStreamControllerClearPendingPullIntos(this),@putByIdDirectPrivate(this,\"queue\",@newQueue()),@putByIdDirectPrivate(this,\"started\",0),@putByIdDirectPrivate(this,\"closeRequested\",!1);let f=@toNumber(R);if(@isNaN(f)||f<0)@throwRangeError(\"highWaterMark value is negative or not a number\");@putByIdDirectPrivate(this,\"strategyHWM\",f);let _=p.autoAllocateChunkSize;if(_!==@undefined){if(_=@toNumber(_),_<=0||_===@Infinity||_===-@Infinity)@throwRangeError(\"autoAllocateChunkSize value is negative or equal to positive or negative infinity\")}@putByIdDirectPrivate(this,\"autoAllocateChunkSize\",_),@putByIdDirectPrivate(this,\"pendingPullIntos\",@createFIFO());const v=this;return @promiseInvokeOrNoopNoCatch(@getByIdDirectPrivate(v,\"underlyingByteSource\"),\"start\",[v]).@then(()=>{@putByIdDirectPrivate(v,\"started\",1),@assert(!@getByIdDirectPrivate(v,\"pulling\")),@assert(!@getByIdDirectPrivate(v,\"pullAgain\")),@readableByteStreamControllerCallPullIfNeeded(v)},(d)=>{if(@getByIdDirectPrivate(b,\"state\")===@streamReadable)@readableByteStreamControllerError(v,d)}),@putByIdDirectPrivate(this,\"cancel\",@readableByteStreamControllerCancel),@putByIdDirectPrivate(this,\"pull\",@readableByteStreamControllerPull),this})\n"; +const char* const s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCode = "(function (_,v,b){\"use strict\";if(!@isReadableStream(_))@throwTypeError(\"ReadableByteStreamController needs a ReadableStream\");if(@getByIdDirectPrivate(_,\"readableStreamController\")!==null)@throwTypeError(\"ReadableStream already has a controller\");@putByIdDirectPrivate(this,\"controlledReadableStream\",_),@putByIdDirectPrivate(this,\"underlyingByteSource\",v),@putByIdDirectPrivate(this,\"pullAgain\",!1),@putByIdDirectPrivate(this,\"pulling\",!1),@readableByteStreamControllerClearPendingPullIntos(this),@putByIdDirectPrivate(this,\"queue\",@newQueue()),@putByIdDirectPrivate(this,\"started\",0),@putByIdDirectPrivate(this,\"closeRequested\",!1);let p=@toNumber(b);if(@isNaN(p)||p<0)@throwRangeError(\"highWaterMark value is negative or not a number\");@putByIdDirectPrivate(this,\"strategyHWM\",p);let R=v.autoAllocateChunkSize;if(R!==@undefined){if(R=@toNumber(R),R<=0||R===@Infinity||R===-@Infinity)@throwRangeError(\"autoAllocateChunkSize value is negative or equal to positive or negative infinity\")}@putByIdDirectPrivate(this,\"autoAllocateChunkSize\",R),@putByIdDirectPrivate(this,\"pendingPullIntos\",@createFIFO());const d=this;return @promiseInvokeOrNoopNoCatch(@getByIdDirectPrivate(d,\"underlyingByteSource\"),\"start\",[d]).@then(()=>{@putByIdDirectPrivate(d,\"started\",1),@assert(!@getByIdDirectPrivate(d,\"pulling\")),@assert(!@getByIdDirectPrivate(d,\"pullAgain\")),@readableByteStreamControllerCallPullIfNeeded(d)},(f)=>{if(@getByIdDirectPrivate(_,\"state\")===@streamReadable)@readableByteStreamControllerError(d,f)}),@putByIdDirectPrivate(this,\"cancel\",@readableByteStreamControllerCancel),@putByIdDirectPrivate(this,\"pull\",@readableByteStreamControllerPull),this})\n"; // readableStreamByteStreamControllerStart const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2684,7 +2684,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeLength = 248; static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableByteStreamControllerCancelCode = "(function (a,u){\"use strict\";var _=@getByIdDirectPrivate(a,\"pendingPullIntos\"),p=_.peek();if(p)p.bytesFilled=0;return @putByIdDirectPrivate(a,\"queue\",@newQueue()),@promiseInvokeOrNoop(@getByIdDirectPrivate(a,\"underlyingByteSource\"),\"cancel\",[u])})\n"; +const char* const s_readableByteStreamInternalsReadableByteStreamControllerCancelCode = "(function (a,p){\"use strict\";var u=@getByIdDirectPrivate(a,\"pendingPullIntos\"),_=u.peek();if(_)_.bytesFilled=0;return @putByIdDirectPrivate(a,\"queue\",@newQueue()),@promiseInvokeOrNoop(@getByIdDirectPrivate(a,\"underlyingByteSource\"),\"cancel\",[p])})\n"; // readableByteStreamControllerError const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2716,7 +2716,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeLength = 272; static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCode = "(function (u){\"use strict\";const _=@getByIdDirectPrivate(u,\"controlledReadableStream\"),d=@getByIdDirectPrivate(_,\"state\");if(d===@streamErrored)return null;if(d===@streamClosed)return 0;return @getByIdDirectPrivate(u,\"strategyHWM\")-@getByIdDirectPrivate(u,\"queue\").size})\n"; +const char* const s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCode = "(function (u){\"use strict\";const d=@getByIdDirectPrivate(u,\"controlledReadableStream\"),_=@getByIdDirectPrivate(d,\"state\");if(_===@streamErrored)return null;if(_===@streamClosed)return 0;return @getByIdDirectPrivate(u,\"strategyHWM\")-@getByIdDirectPrivate(u,\"queue\").size})\n"; // readableStreamHasBYOBReader const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2724,7 +2724,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamHasBYOBRea const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeLength = 125; static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableStreamHasBYOBReaderCode = "(function (u){\"use strict\";const n=@getByIdDirectPrivate(u,\"reader\");return n!==@undefined&&@isReadableStreamBYOBReader(n)})\n"; +const char* const s_readableByteStreamInternalsReadableStreamHasBYOBReaderCode = "(function (n){\"use strict\";const u=@getByIdDirectPrivate(n,\"reader\");return u!==@undefined&&@isReadableStreamBYOBReader(u)})\n"; // readableStreamHasDefaultReader const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2732,7 +2732,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamHasDefault const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeLength = 128; static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamHasDefaultReaderCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableStreamHasDefaultReaderCode = "(function (n){\"use strict\";const l=@getByIdDirectPrivate(n,\"reader\");return l!==@undefined&&@isReadableStreamDefaultReader(l)})\n"; +const char* const s_readableByteStreamInternalsReadableStreamHasDefaultReaderCode = "(function (l){\"use strict\";const n=@getByIdDirectPrivate(l,\"reader\");return n!==@undefined&&@isReadableStreamDefaultReader(n)})\n"; // readableByteStreamControllerHandleQueueDrain const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerHandleQueueDrainCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2748,7 +2748,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerPullCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableByteStreamControllerPullCodeLength = 1005; static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerPullCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullCode = "(function (_){\"use strict\";const P=@getByIdDirectPrivate(_,\"controlledReadableStream\");if(@assert(@readableStreamHasDefaultReader(P)),@getByIdDirectPrivate(_,\"queue\").content\?.isNotEmpty()){const d=@getByIdDirectPrivate(_,\"queue\").content.shift();@getByIdDirectPrivate(_,\"queue\").size-=d.byteLength,@readableByteStreamControllerHandleQueueDrain(_);let h;try{h=new @Uint8Array(d.buffer,d.byteOffset,d.byteLength)}catch(F){return @Promise.@reject(F)}return @createFulfilledPromise({value:h,done:!1})}if(@getByIdDirectPrivate(_,\"autoAllocateChunkSize\")!==@undefined){let d;try{d=@createUninitializedArrayBuffer(@getByIdDirectPrivate(_,\"autoAllocateChunkSize\"))}catch(F){return @Promise.@reject(F)}const h={buffer:d,byteOffset:0,byteLength:@getByIdDirectPrivate(_,\"autoAllocateChunkSize\"),bytesFilled:0,elementSize:1,ctor:@Uint8Array,readerType:\"default\"};@getByIdDirectPrivate(_,\"pendingPullIntos\").push(h)}const R=@readableStreamAddReadRequest(P);return @readableByteStreamControllerCallPullIfNeeded(_),R})\n"; +const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullCode = "(function (_){\"use strict\";const h=@getByIdDirectPrivate(_,\"controlledReadableStream\");if(@assert(@readableStreamHasDefaultReader(h)),@getByIdDirectPrivate(_,\"queue\").content\?.isNotEmpty()){const F=@getByIdDirectPrivate(_,\"queue\").content.shift();@getByIdDirectPrivate(_,\"queue\").size-=F.byteLength,@readableByteStreamControllerHandleQueueDrain(_);let P;try{P=new @Uint8Array(F.buffer,F.byteOffset,F.byteLength)}catch(R){return @Promise.@reject(R)}return @createFulfilledPromise({value:P,done:!1})}if(@getByIdDirectPrivate(_,\"autoAllocateChunkSize\")!==@undefined){let F;try{F=@createUninitializedArrayBuffer(@getByIdDirectPrivate(_,\"autoAllocateChunkSize\"))}catch(R){return @Promise.@reject(R)}const P={buffer:F,byteOffset:0,byteLength:@getByIdDirectPrivate(_,\"autoAllocateChunkSize\"),bytesFilled:0,elementSize:1,ctor:@Uint8Array,readerType:\"default\"};@getByIdDirectPrivate(_,\"pendingPullIntos\").push(P)}const d=@readableStreamAddReadRequest(h);return @readableByteStreamControllerCallPullIfNeeded(_),d})\n"; // readableByteStreamControllerShouldCallPull const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2788,7 +2788,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeLength = 1076; static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCode = "(function (d,i){\"use strict\";const _=@getByIdDirectPrivate(d,\"controlledReadableStream\");switch(@assert(!@getByIdDirectPrivate(d,\"closeRequested\")),@assert(@getByIdDirectPrivate(_,\"state\")===@streamReadable),@getByIdDirectPrivate(_,\"reader\")\?@readableStreamReaderKind(@getByIdDirectPrivate(_,\"reader\")):0){case 1:{if(!@getByIdDirectPrivate(@getByIdDirectPrivate(_,\"reader\"),\"readRequests\")\?.isNotEmpty())@readableByteStreamControllerEnqueueChunk(d,@transferBufferToCurrentRealm(i.buffer),i.byteOffset,i.byteLength);else{@assert(!@getByIdDirectPrivate(d,\"queue\").content.size());const f=i.constructor===@Uint8Array\?i:new @Uint8Array(i.buffer,i.byteOffset,i.byteLength);@readableStreamFulfillReadRequest(_,f,!1)}break}case 2:{@readableByteStreamControllerEnqueueChunk(d,@transferBufferToCurrentRealm(i.buffer),i.byteOffset,i.byteLength),@readableByteStreamControllerProcessPullDescriptors(d);break}case 3:break;default:{@assert(!@isReadableStreamLocked(_)),@readableByteStreamControllerEnqueueChunk(d,@transferBufferToCurrentRealm(i.buffer),i.byteOffset,i.byteLength);break}}})\n"; +const char* const s_readableByteStreamInternalsReadableByteStreamControllerEnqueueCode = "(function (i,_){\"use strict\";const f=@getByIdDirectPrivate(i,\"controlledReadableStream\");switch(@assert(!@getByIdDirectPrivate(i,\"closeRequested\")),@assert(@getByIdDirectPrivate(f,\"state\")===@streamReadable),@getByIdDirectPrivate(f,\"reader\")\?@readableStreamReaderKind(@getByIdDirectPrivate(f,\"reader\")):0){case 1:{if(!@getByIdDirectPrivate(@getByIdDirectPrivate(f,\"reader\"),\"readRequests\")\?.isNotEmpty())@readableByteStreamControllerEnqueueChunk(i,@transferBufferToCurrentRealm(_.buffer),_.byteOffset,_.byteLength);else{@assert(!@getByIdDirectPrivate(i,\"queue\").content.size());const d=_.constructor===@Uint8Array\?_:new @Uint8Array(_.buffer,_.byteOffset,_.byteLength);@readableStreamFulfillReadRequest(f,d,!1)}break}case 2:{@readableByteStreamControllerEnqueueChunk(i,@transferBufferToCurrentRealm(_.buffer),_.byteOffset,_.byteLength),@readableByteStreamControllerProcessPullDescriptors(i);break}case 3:break;default:{@assert(!@isReadableStreamLocked(f)),@readableByteStreamControllerEnqueueChunk(i,@transferBufferToCurrentRealm(_.buffer),_.byteOffset,_.byteLength);break}}})\n"; // readableByteStreamControllerEnqueueChunk const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2796,7 +2796,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeLength = 160; static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCode = "(function (_,d,p,a){\"use strict\";@getByIdDirectPrivate(_,\"queue\").content.push({buffer:d,byteOffset:p,byteLength:a}),@getByIdDirectPrivate(_,\"queue\").size+=a})\n"; +const char* const s_readableByteStreamInternalsReadableByteStreamControllerEnqueueChunkCode = "(function (_,a,d,p){\"use strict\";@getByIdDirectPrivate(_,\"queue\").content.push({buffer:a,byteOffset:d,byteLength:p}),@getByIdDirectPrivate(_,\"queue\").size+=p})\n"; // readableByteStreamControllerRespondWithNewView const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2804,7 +2804,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeLength = 417; static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCode = "(function (d,u){\"use strict\";@assert(@getByIdDirectPrivate(d,\"pendingPullIntos\").isNotEmpty());let a=@getByIdDirectPrivate(d,\"pendingPullIntos\").peek();if(a.byteOffset+a.bytesFilled!==u.byteOffset)@throwRangeError(\"Invalid value for view.byteOffset\");if(a.byteLength!==u.byteLength)@throwRangeError(\"Invalid value for view.byteLength\");a.buffer=u.buffer,@readableByteStreamControllerRespondInternal(d,u.byteLength)})\n"; +const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondWithNewViewCode = "(function (u,a){\"use strict\";@assert(@getByIdDirectPrivate(u,\"pendingPullIntos\").isNotEmpty());let d=@getByIdDirectPrivate(u,\"pendingPullIntos\").peek();if(d.byteOffset+d.bytesFilled!==a.byteOffset)@throwRangeError(\"Invalid value for view.byteOffset\");if(d.byteLength!==a.byteLength)@throwRangeError(\"Invalid value for view.byteLength\");d.buffer=a.buffer,@readableByteStreamControllerRespondInternal(u,a.byteLength)})\n"; // readableByteStreamControllerRespond const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2812,7 +2812,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeLength = 251; static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondCode = "(function (I,u){\"use strict\";if(u=@toNumber(u),@isNaN(u)||u===@Infinity||u<0)@throwRangeError(\"bytesWritten has an incorrect value\");@assert(@getByIdDirectPrivate(I,\"pendingPullIntos\").isNotEmpty()),@readableByteStreamControllerRespondInternal(I,u)})\n"; +const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondCode = "(function (u,I){\"use strict\";if(I=@toNumber(I),@isNaN(I)||I===@Infinity||I<0)@throwRangeError(\"bytesWritten has an incorrect value\");@assert(@getByIdDirectPrivate(u,\"pendingPullIntos\").isNotEmpty()),@readableByteStreamControllerRespondInternal(u,I)})\n"; // readableByteStreamControllerRespondInternal const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2828,7 +2828,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeLength = 799; static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCode = "(function (w,_,f){\"use strict\";if(f.bytesFilled+_>f.byteLength)@throwRangeError(\"bytesWritten value is too great\");if(@assert(@getByIdDirectPrivate(w,\"pendingPullIntos\").isEmpty()||@getByIdDirectPrivate(w,\"pendingPullIntos\").peek()===f),@readableByteStreamControllerInvalidateBYOBRequest(w),f.bytesFilled+=_,f.bytesFilled<f.elementSize)return;@readableByteStreamControllerShiftPendingDescriptor(w);const R=f.bytesFilled%f.elementSize;if(R>0){const h=f.byteOffset+f.bytesFilled,g=@cloneArrayBuffer(f.buffer,h-R,R);@readableByteStreamControllerEnqueueChunk(w,g,0,g.byteLength)}f.buffer=@transferBufferToCurrentRealm(f.buffer),f.bytesFilled-=R,@readableByteStreamControllerCommitDescriptor(@getByIdDirectPrivate(w,\"controlledReadableStream\"),f),@readableByteStreamControllerProcessPullDescriptors(w)})\n"; +const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCode = "(function (f,R,w){\"use strict\";if(w.bytesFilled+R>w.byteLength)@throwRangeError(\"bytesWritten value is too great\");if(@assert(@getByIdDirectPrivate(f,\"pendingPullIntos\").isEmpty()||@getByIdDirectPrivate(f,\"pendingPullIntos\").peek()===w),@readableByteStreamControllerInvalidateBYOBRequest(f),w.bytesFilled+=R,w.bytesFilled<w.elementSize)return;@readableByteStreamControllerShiftPendingDescriptor(f);const _=w.bytesFilled%w.elementSize;if(_>0){const g=w.byteOffset+w.bytesFilled,h=@cloneArrayBuffer(w.buffer,g-_,_);@readableByteStreamControllerEnqueueChunk(f,h,0,h.byteLength)}w.buffer=@transferBufferToCurrentRealm(w.buffer),w.bytesFilled-=_,@readableByteStreamControllerCommitDescriptor(@getByIdDirectPrivate(f,\"controlledReadableStream\"),w),@readableByteStreamControllerProcessPullDescriptors(f)})\n"; // readableByteStreamControllerRespondInClosedState const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInClosedStateCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2852,7 +2852,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeLength = 970; static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCode = "(function (q,_){\"use strict\";const H=_.bytesFilled-_.bytesFilled%_.elementSize,z=@getByIdDirectPrivate(q,\"queue\").size<_.byteLength-_.bytesFilled\?@getByIdDirectPrivate(q,\"queue\").size:_.byteLength-_.bytesFilled,E=_.bytesFilled+z,G=E-E%_.elementSize;let v=z,w=!1;if(G>H)v=G-_.bytesFilled,w=!0;while(v>0){let j=@getByIdDirectPrivate(q,\"queue\").content.peek();const k=v<j.byteLength\?v:j.byteLength,J=_.byteOffset+_.bytesFilled;if(new @Uint8Array(_.buffer).set(new @Uint8Array(j.buffer,j.byteOffset,k),J),j.byteLength===k)@getByIdDirectPrivate(q,\"queue\").content.shift();else j.byteOffset+=k,j.byteLength-=k;@getByIdDirectPrivate(q,\"queue\").size-=k,@assert(@getByIdDirectPrivate(q,\"pendingPullIntos\").isEmpty()||@getByIdDirectPrivate(q,\"pendingPullIntos\").peek()===_),@readableByteStreamControllerInvalidateBYOBRequest(q),_.bytesFilled+=k,v-=k}if(!w)@assert(@getByIdDirectPrivate(q,\"queue\").size===0),@assert(_.bytesFilled>0),@assert(_.bytesFilled<_.elementSize);return w})\n"; +const char* const s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCode = "(function (_,q){\"use strict\";const z=q.bytesFilled-q.bytesFilled%q.elementSize,j=@getByIdDirectPrivate(_,\"queue\").size<q.byteLength-q.bytesFilled\?@getByIdDirectPrivate(_,\"queue\").size:q.byteLength-q.bytesFilled,E=q.bytesFilled+j,k=E-E%q.elementSize;let G=j,v=!1;if(k>z)G=k-q.bytesFilled,v=!0;while(G>0){let H=@getByIdDirectPrivate(_,\"queue\").content.peek();const w=G<H.byteLength\?G:H.byteLength,J=q.byteOffset+q.bytesFilled;if(new @Uint8Array(q.buffer).set(new @Uint8Array(H.buffer,H.byteOffset,w),J),H.byteLength===w)@getByIdDirectPrivate(_,\"queue\").content.shift();else H.byteOffset+=w,H.byteLength-=w;@getByIdDirectPrivate(_,\"queue\").size-=w,@assert(@getByIdDirectPrivate(_,\"pendingPullIntos\").isEmpty()||@getByIdDirectPrivate(_,\"pendingPullIntos\").peek()===q),@readableByteStreamControllerInvalidateBYOBRequest(_),q.bytesFilled+=w,G-=w}if(!v)@assert(@getByIdDirectPrivate(_,\"queue\").size===0),@assert(q.bytesFilled>0),@assert(q.bytesFilled<q.elementSize);return v})\n"; // readableByteStreamControllerShiftPendingDescriptor const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2892,7 +2892,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamFulfillRea const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeLength = 161; static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCode = "(function (l,i,p){\"use strict\";const _=@getByIdDirectPrivate(@getByIdDirectPrivate(l,\"reader\"),\"readIntoRequests\").shift();@fulfillPromise(_,{value:i,done:p})})\n"; +const char* const s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCode = "(function (l,p,_){\"use strict\";const i=@getByIdDirectPrivate(@getByIdDirectPrivate(l,\"reader\"),\"readIntoRequests\").shift();@fulfillPromise(i,{value:p,done:_})})\n"; // readableStreamBYOBReaderRead const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2900,7 +2900,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamBYOBReader const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeLength = 356; static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableStreamBYOBReaderReadCode = "(function (c,l){\"use strict\";const o=@getByIdDirectPrivate(c,\"ownerReadableStream\");if(@assert(!!o),@putByIdDirectPrivate(o,\"disturbed\",!0),@getByIdDirectPrivate(o,\"state\")===@streamErrored)return @Promise.@reject(@getByIdDirectPrivate(o,\"storedError\"));return @readableByteStreamControllerPullInto(@getByIdDirectPrivate(o,\"readableStreamController\"),l)})\n"; +const char* const s_readableByteStreamInternalsReadableStreamBYOBReaderReadCode = "(function (o,c){\"use strict\";const l=@getByIdDirectPrivate(o,\"ownerReadableStream\");if(@assert(!!l),@putByIdDirectPrivate(l,\"disturbed\",!0),@getByIdDirectPrivate(l,\"state\")===@streamErrored)return @Promise.@reject(@getByIdDirectPrivate(l,\"storedError\"));return @readableByteStreamControllerPullInto(@getByIdDirectPrivate(l,\"readableStreamController\"),c)})\n"; // readableByteStreamControllerPullInto const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2908,7 +2908,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeLength = 1255; static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCode = "(function (b,d){\"use strict\";const A=@getByIdDirectPrivate(b,\"controlledReadableStream\");let E=1;if(d.BYTES_PER_ELEMENT!==@undefined)E=d.BYTES_PER_ELEMENT;const L=d.constructor,_={buffer:d.buffer,byteOffset:d.byteOffset,byteLength:d.byteLength,bytesFilled:0,elementSize:E,ctor:L,readerType:\"byob\"};var N=@getByIdDirectPrivate(b,\"pendingPullIntos\");if(N\?.isNotEmpty())return _.buffer=@transferBufferToCurrentRealm(_.buffer),N.push(_),@readableStreamAddReadIntoRequest(A);if(@getByIdDirectPrivate(A,\"state\")===@streamClosed){const k=new L(_.buffer,_.byteOffset,0);return @createFulfilledPromise({value:k,done:!0})}if(@getByIdDirectPrivate(b,\"queue\").size>0){if(@readableByteStreamControllerFillDescriptorFromQueue(b,_)){const k=@readableByteStreamControllerConvertDescriptor(_);return @readableByteStreamControllerHandleQueueDrain(b),@createFulfilledPromise({value:k,done:!1})}if(@getByIdDirectPrivate(b,\"closeRequested\")){const k=@makeTypeError(\"Closing stream has been requested\");return @readableByteStreamControllerError(b,k),@Promise.@reject(k)}}_.buffer=@transferBufferToCurrentRealm(_.buffer),@getByIdDirectPrivate(b,\"pendingPullIntos\").push(_);const R=@readableStreamAddReadIntoRequest(A);return @readableByteStreamControllerCallPullIfNeeded(b),R})\n"; +const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCode = "(function (_,E){\"use strict\";const b=@getByIdDirectPrivate(_,\"controlledReadableStream\");let d=1;if(E.BYTES_PER_ELEMENT!==@undefined)d=E.BYTES_PER_ELEMENT;const k=E.constructor,A={buffer:E.buffer,byteOffset:E.byteOffset,byteLength:E.byteLength,bytesFilled:0,elementSize:d,ctor:k,readerType:\"byob\"};var L=@getByIdDirectPrivate(_,\"pendingPullIntos\");if(L\?.isNotEmpty())return A.buffer=@transferBufferToCurrentRealm(A.buffer),L.push(A),@readableStreamAddReadIntoRequest(b);if(@getByIdDirectPrivate(b,\"state\")===@streamClosed){const R=new k(A.buffer,A.byteOffset,0);return @createFulfilledPromise({value:R,done:!0})}if(@getByIdDirectPrivate(_,\"queue\").size>0){if(@readableByteStreamControllerFillDescriptorFromQueue(_,A)){const R=@readableByteStreamControllerConvertDescriptor(A);return @readableByteStreamControllerHandleQueueDrain(_),@createFulfilledPromise({value:R,done:!1})}if(@getByIdDirectPrivate(_,\"closeRequested\")){const R=@makeTypeError(\"Closing stream has been requested\");return @readableByteStreamControllerError(_,R),@Promise.@reject(R)}}A.buffer=@transferBufferToCurrentRealm(A.buffer),@getByIdDirectPrivate(_,\"pendingPullIntos\").push(A);const N=@readableStreamAddReadIntoRequest(b);return @readableByteStreamControllerCallPullIfNeeded(_),N})\n"; // readableStreamAddReadIntoRequest const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2942,7 +2942,7 @@ const JSC::ConstructorKind s_writableStreamDefaultControllerErrorCodeConstructor const JSC::ImplementationVisibility s_writableStreamDefaultControllerErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamDefaultControllerErrorCodeLength = 301; static const JSC::Intrinsic s_writableStreamDefaultControllerErrorCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamDefaultControllerErrorCode = "(function (r){\"use strict\";if(@getByIdDirectPrivate(this,\"abortSteps\")===@undefined)throw @makeThisTypeError(\"WritableStreamDefaultController\",\"error\");const t=@getByIdDirectPrivate(this,\"stream\");if(@getByIdDirectPrivate(t,\"state\")!==\"writable\")return;@writableStreamDefaultControllerError(this,r)})\n"; +const char* const s_writableStreamDefaultControllerErrorCode = "(function (t){\"use strict\";if(@getByIdDirectPrivate(this,\"abortSteps\")===@undefined)throw @makeThisTypeError(\"WritableStreamDefaultController\",\"error\");const r=@getByIdDirectPrivate(this,\"stream\");if(@getByIdDirectPrivate(r,\"state\")!==\"writable\")return;@writableStreamDefaultControllerError(this,t)})\n"; #define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \ @@ -2960,7 +2960,7 @@ const JSC::ConstructorKind s_eventSourceGetEventSourceCodeConstructorKind = JSC: const JSC::ImplementationVisibility s_eventSourceGetEventSourceCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_eventSourceGetEventSourceCodeLength = 5477; static const JSC::Intrinsic s_eventSourceGetEventSourceCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_eventSourceGetEventSourceCode = "(function (){\"use strict\";class F extends EventTarget{#B;#$;#J;#K;#L;#M=!1;#A=null;#j=\"\";#O=\"\";#Q=\"\";#U=!0;#F=0;#G=0;#X=0;#w=null;static#V(j){j.#H()}static#Y(j,A){const w=j.data,B=w.#Q\?`Last-Event-ID: ${w.#Q}\\r\\n`:\"\",K=`GET ${A.pathname}${A.search} HTTP/1.1\\r\\nHost: bun\\r\\nContent-type: text/event-stream\\r\\nContent-length: 0\\r\\n${B}\\r\\n`,G=j.write(K);if(G!==K.length)w.#O=K.substring(G)}static#Z(j,A,w){for(;;){if(w>=A.length)return;let B=-1,K=A.indexOf(\"\\r\\n\",w);const G=K+2;if(K>0)if(j.#F===0){const J=parseInt(A.substring(w,K),16);if(J===0){j.#$=2,j.#A\?.end();return}B=G+J}else B=A.length;else{if(j.#j.length===0){j.#j+=A.substring(w);return}B=A.length}let M=A.substring(G,B);w=B+2;let Z=0,L=M.indexOf(\"\\n\\n\");if(L==-1){j.#j+=A.substring(G);return}if(j.#j.length)j.#j+=M,M=j.#j,j.#j=\"\";let X=!0;while(X){const J=M.substring(Z,L);let Y,O=\"\",Q,W=0,V=-1;for(;;){let z=J.indexOf(\"\\n\",W);if(z===-1){if(W>=J.length)break;z=J.length}const U=J.substring(W,z);if(U.startsWith(\"data:\"))if(O.length)O+=`\\n${U.substring(5).trim()}`;else O=U.substring(5).trim();else if(U.startsWith(\"event:\"))Y=U.substring(6).trim();else if(U.startsWith(\"id:\"))Q=U.substring(3).trim();else if(U.startsWith(\"retry:\")){if(V=parseInt(U.substring(6).trim(),10),@isNaN(V))V=-1}W=z+1}if(j.#Q=Q||\"\",V>=0)j.#X=V;if(O||Q||Y)j.dispatchEvent(new MessageEvent(Y||\"message\",{data:O||\"\",origin:j.#B.origin,source:j,lastEventId:Q}));if(M.length===L+2){X=!1;break}const H=M.indexOf(\"\\n\\n\",L+1);if(H===-1)break;Z=L,L=H}}}static#z={open(j){const A=j.data;if(A.#A=j,!A.#M)F.#Y(j,A.#B)},handshake(j,A,w){const B=j.data;if(A)F.#Y(j,B.#B);else B.#$=2,B.dispatchEvent(new ErrorEvent(\"error\",{error:w})),j.end()},data(j,A){const w=j.data;switch(w.#$){case 0:{let B=A.toString();const K=B.indexOf(\"\\r\\n\\r\\n\");if(K===-1){w.#j+=B;return}if(w.#j.length)w.#j+=B,B=w.#j,w.#j=\"\";const G=B.substring(0,K),M=G.indexOf(\"\\r\\n\");if(M===-1){w.#$=2,w.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Invalid HTTP request\")})),j.end();return}const Z=G.substring(0,M);if(Z!==\"HTTP/1.1 200 OK\"){w.#$=2,w.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(Z)})),j.end();return}let L=M+1,X=!1,J=-1;for(;;){let O=G.indexOf(\"\\r\\n\",L);if(O===-1){if(L>=G.length){if(!X)w.#$=2,w.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's response has no MIME type and \"text/event-stream\" is required. Aborting the connection.`)})),j.end();return}O=G.length}const Q=G.substring(L+1,O),W=Q.indexOf(\":\"),V=Q.substring(0,W),H=V.localeCompare(\"content-type\",@undefined,{sensitivity:\"accent\"})===0;if(L=O+1,H)if(Q.endsWith(\" text/event-stream\"))X=!0;else{w.#$=2,w.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's response has a MIME type that is not \"text/event-stream\". Aborting the connection.`)})),j.end();return}else if(V.localeCompare(\"content-length\",@undefined,{sensitivity:\"accent\"})===0){if(J=parseInt(Q.substring(W+1).trim(),10),@isNaN(J)||J<=0){w.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's Content-Length is invalid. Aborting the connection.`)})),j.end();return}if(X)break}else if(V.localeCompare(\"transfer-encoding\",@undefined,{sensitivity:\"accent\"})===0){if(Q.substring(W+1).trim()!==\"chunked\"){w.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's Transfer-Encoding is invalid. Aborting the connection.`)})),j.end();return}if(J=0,X)break}}w.#F=J,w.#$=1,w.dispatchEvent(new Event(\"open\"));const Y=B.substring(K+4);if(F.#Z(w,Y,0),w.#F>0){if(w.#G+=Y.length,w.#G>=w.#F)w.#$=2,j.end()}return}case 1:if(F.#Z(w,A.toString(),2),w.#F>0){if(w.#G+=A.byteLength,w.#G>=w.#F)w.#$=2,j.end()}return;default:break}},drain(j){const A=j.data;if(A.#$===0){const w=A.#j;if(w.length){const B=j.write(w);if(B!==w.length)j.data.#O=w.substring(B);else j.data.#O=\"\"}}},close:F.#W,end(j){F.#W(j).dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Connection closed by server\")}))},timeout(j){F.#W(j).dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Timeout\")}))},binaryType:\"buffer\"};static#W(j){const A=j.data;if(A.#A=null,A.#G=0,A.#$=2,A.#U){if(A.#w)clearTimeout(A.#w);A.#w=setTimeout(F.#V,A.#X,A)}return A}constructor(j,A=@undefined){super();const w=new URL(j);this.#M=w.protocol===\"https:\",this.#B=w,this.#$=2,process.nextTick(F.#V,this)}ref(){this.#w\?.ref(),this.#A\?.ref()}unref(){this.#w\?.unref(),this.#A\?.unref()}#H(){if(this.#$!==2)return;const j=this.#B,A=this.#M;this.#$=0,@Bun.connect({data:this,socket:F.#z,hostname:j.hostname,port:parseInt(j.port||(A\?\"443\":\"80\"),10),tls:A\?{requestCert:!0,rejectUnauthorized:!1}:!1}).catch((w)=>{if(super.dispatchEvent(new ErrorEvent(\"error\",{error:w})),this.#U){if(this.#w)this.#w.unref\?.();this.#w=setTimeout(F.#V,1000,this)}})}get url(){return this.#B.href}get readyState(){return this.#$}close(){this.#U=!1,this.#$=2,this.#A\?.unref(),this.#A\?.end()}get onopen(){return this.#L}get onerror(){return this.#J}get onmessage(){return this.#K}set onopen(j){if(this.#L)super.removeEventListener(\"close\",this.#L);super.addEventListener(\"open\",j),this.#L=j}set onerror(j){if(this.#J)super.removeEventListener(\"error\",this.#J);super.addEventListener(\"error\",j),this.#J=j}set onmessage(j){if(this.#K)super.removeEventListener(\"message\",this.#K);super.addEventListener(\"message\",j),this.#K=j}}return Object.defineProperty(F.prototype,\"CONNECTING\",{enumerable:!0,value:0}),Object.defineProperty(F.prototype,\"OPEN\",{enumerable:!0,value:1}),Object.defineProperty(F.prototype,\"CLOSED\",{enumerable:!0,value:2}),F[Symbol.for(\"CommonJS\")]=0,F})\n"; +const char* const s_eventSourceGetEventSourceCode = "(function (){\"use strict\";class F extends EventTarget{#$;#j;#w;#A;#B;#F=!1;#G=null;#J=\"\";#K=\"\";#L=\"\";#M=!0;#O=0;#Q=0;#U=0;#V=null;static#W(W){W.#H()}static#X(W,Y){const O=W.data,Z=O.#L\?`Last-Event-ID: ${O.#L}\\r\\n`:\"\",j=`GET ${Y.pathname}${Y.search} HTTP/1.1\\r\\nHost: bun\\r\\nContent-type: text/event-stream\\r\\nContent-length: 0\\r\\n${Z}\\r\\n`,G=W.write(j);if(G!==j.length)O.#K=j.substring(G)}static#Y(W,Y,O){for(;;){if(O>=Y.length)return;let Z=-1,j=Y.indexOf(\"\\r\\n\",O);const G=j+2;if(j>0)if(W.#O===0){const w=parseInt(Y.substring(O,j),16);if(w===0){W.#j=2,W.#G\?.end();return}Z=G+w}else Z=Y.length;else{if(W.#J.length===0){W.#J+=Y.substring(O);return}Z=Y.length}let z=Y.substring(G,Z);O=Z+2;let B=0,J=z.indexOf(\"\\n\\n\");if(J==-1){W.#J+=Y.substring(G);return}if(W.#J.length)W.#J+=z,z=W.#J,W.#J=\"\";let K=!0;while(K){const w=z.substring(B,J);let Q,L=\"\",X,A=0,U=-1;for(;;){let V=w.indexOf(\"\\n\",A);if(V===-1){if(A>=w.length)break;V=w.length}const H=w.substring(A,V);if(H.startsWith(\"data:\"))if(L.length)L+=`\\n${H.substring(5).trim()}`;else L=H.substring(5).trim();else if(H.startsWith(\"event:\"))Q=H.substring(6).trim();else if(H.startsWith(\"id:\"))X=H.substring(3).trim();else if(H.startsWith(\"retry:\")){if(U=parseInt(H.substring(6).trim(),10),@isNaN(U))U=-1}A=V+1}if(W.#L=X||\"\",U>=0)W.#U=U;if(L||X||Q)W.dispatchEvent(new MessageEvent(Q||\"message\",{data:L||\"\",origin:W.#$.origin,source:W,lastEventId:X}));if(z.length===J+2){K=!1;break}const M=z.indexOf(\"\\n\\n\",J+1);if(M===-1)break;B=J,J=M}}}static#Z={open(W){const Y=W.data;if(Y.#G=W,!Y.#F)F.#X(W,Y.#$)},handshake(W,Y,O){const Z=W.data;if(Y)F.#X(W,Z.#$);else Z.#j=2,Z.dispatchEvent(new ErrorEvent(\"error\",{error:O})),W.end()},data(W,Y){const O=W.data;switch(O.#j){case 0:{let Z=Y.toString();const j=Z.indexOf(\"\\r\\n\\r\\n\");if(j===-1){O.#J+=Z;return}if(O.#J.length)O.#J+=Z,Z=O.#J,O.#J=\"\";const G=Z.substring(0,j),z=G.indexOf(\"\\r\\n\");if(z===-1){O.#j=2,O.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Invalid HTTP request\")})),W.end();return}const B=G.substring(0,z);if(B!==\"HTTP/1.1 200 OK\"){O.#j=2,O.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(B)})),W.end();return}let J=z+1,K=!1,w=-1;for(;;){let L=G.indexOf(\"\\r\\n\",J);if(L===-1){if(J>=G.length){if(!K)O.#j=2,O.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's response has no MIME type and \"text/event-stream\" is required. Aborting the connection.`)})),W.end();return}L=G.length}const X=G.substring(J+1,L),A=X.indexOf(\":\"),U=X.substring(0,A),M=U.localeCompare(\"content-type\",@undefined,{sensitivity:\"accent\"})===0;if(J=L+1,M)if(X.endsWith(\" text/event-stream\"))K=!0;else{O.#j=2,O.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's response has a MIME type that is not \"text/event-stream\". Aborting the connection.`)})),W.end();return}else if(U.localeCompare(\"content-length\",@undefined,{sensitivity:\"accent\"})===0){if(w=parseInt(X.substring(A+1).trim(),10),@isNaN(w)||w<=0){O.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's Content-Length is invalid. Aborting the connection.`)})),W.end();return}if(K)break}else if(U.localeCompare(\"transfer-encoding\",@undefined,{sensitivity:\"accent\"})===0){if(X.substring(A+1).trim()!==\"chunked\"){O.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's Transfer-Encoding is invalid. Aborting the connection.`)})),W.end();return}if(w=0,K)break}}O.#O=w,O.#j=1,O.dispatchEvent(new Event(\"open\"));const Q=Z.substring(j+4);if(F.#Y(O,Q,0),O.#O>0){if(O.#Q+=Q.length,O.#Q>=O.#O)O.#j=2,W.end()}return}case 1:if(F.#Y(O,Y.toString(),2),O.#O>0){if(O.#Q+=Y.byteLength,O.#Q>=O.#O)O.#j=2,W.end()}return;default:break}},drain(W){const Y=W.data;if(Y.#j===0){const O=Y.#J;if(O.length){const Z=W.write(O);if(Z!==O.length)W.data.#K=O.substring(Z);else W.data.#K=\"\"}}},close:F.#z,end(W){F.#z(W).dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Connection closed by server\")}))},timeout(W){F.#z(W).dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Timeout\")}))},binaryType:\"buffer\"};static#z(W){const Y=W.data;if(Y.#G=null,Y.#Q=0,Y.#j=2,Y.#M){if(Y.#V)clearTimeout(Y.#V);Y.#V=setTimeout(F.#W,Y.#U,Y)}return Y}constructor(W,Y=@undefined){super();const O=new URL(W);this.#F=O.protocol===\"https:\",this.#$=O,this.#j=2,process.nextTick(F.#W,this)}ref(){this.#V\?.ref(),this.#G\?.ref()}unref(){this.#V\?.unref(),this.#G\?.unref()}#H(){if(this.#j!==2)return;const W=this.#$,Y=this.#F;this.#j=0,@Bun.connect({data:this,socket:F.#Z,hostname:W.hostname,port:parseInt(W.port||(Y\?\"443\":\"80\"),10),tls:Y\?{requestCert:!0,rejectUnauthorized:!1}:!1}).catch((O)=>{if(super.dispatchEvent(new ErrorEvent(\"error\",{error:O})),this.#M){if(this.#V)this.#V.unref\?.();this.#V=setTimeout(F.#W,1000,this)}})}get url(){return this.#$.href}get readyState(){return this.#j}close(){this.#M=!1,this.#j=2,this.#G\?.unref(),this.#G\?.end()}get onopen(){return this.#B}get onerror(){return this.#w}get onmessage(){return this.#A}set onopen(W){if(this.#B)super.removeEventListener(\"close\",this.#B);super.addEventListener(\"open\",W),this.#B=W}set onerror(W){if(this.#w)super.removeEventListener(\"error\",this.#w);super.addEventListener(\"error\",W),this.#w=W}set onmessage(W){if(this.#A)super.removeEventListener(\"message\",this.#A);super.addEventListener(\"message\",W),this.#A=W}}return Object.defineProperty(F.prototype,\"CONNECTING\",{enumerable:!0,value:0}),Object.defineProperty(F.prototype,\"OPEN\",{enumerable:!0,value:1}),Object.defineProperty(F.prototype,\"CLOSED\",{enumerable:!0,value:2}),F[Symbol.for(\"CommonJS\")]=0,F})\n"; #define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \ diff --git a/src/js/out/modules/node/stream.js b/src/js/out/modules/node/stream.js index 0497ffd82..06727e66e 100644 --- a/src/js/out/modules/node/stream.js +++ b/src/js/out/modules/node/stream.js @@ -1,2 +1,2 @@ -import{EventEmitter as Iq} from"bun:events_native";import{StringDecoder as aq} from"node:string_decoder";var tq=function(a){return typeof a==="object"&&a!==null&&a instanceof ReadableStream},eq=function(a,j){if(typeof a!=="boolean")throw new qQ(j,"boolean",a)};var qQ=function(a,j,B){return new Error(`The argument '${a}' is invalid. Received '${B}' for type '${j}'`)},QQ=function(a,j,B){return new Error(`The value '${j}' is invalid for argument '${a}'. Reason: ${B}`)},YQ=function(a,j){var[B,G,y,A,M,R,P]=globalThis[Symbol.for("Bun.lazy")](a),g=[!1],k=function(E,I,Z,U){if(I>0){const T=Z.subarray(0,I),_=Z.subarray(I);if(T.byteLength>0)E.push(T);if(U)E.push(null);return _.byteLength>0?_:void 0}if(U)E.push(null);return Z},c=function(E,I,Z,U){if(I.byteLength>0)E.push(I);if(U)E.push(null);return Z},O=process.env.BUN_DISABLE_DYNAMIC_CHUNK_SIZE!=="1";const l=new FinalizationRegistry((E)=>E&&M(E)),D=512;var p=class E extends j{#q;#Q=1;#X=!1;#H=void 0;#J;#K=!1;#Z=!O;#B;constructor(I,Z={}){super(Z);if(typeof Z.highWaterMark==="number")this.#J=Z.highWaterMark;else this.#J=262144;this.#q=I,this.#X=!1,this.#H=void 0,this.#K=!1,this.#B={},l.register(this,this.#q,this.#B)}_read(I){if(this.#K)return;var Z=this.#q;if(Z===0){this.push(null);return}if(!this.#X)this.#$(Z);return this.#V(this.#z(I),Z)}#$(I){this.#X=!0;const Z=G(I,this.#J);if(typeof Z==="number"&&Z>1)this.#Z=!0,this.#J=Math.min(this.#J,Z);if(P){const U=P(I);if((U?.byteLength??0)>0)this.push(U)}}#z(I=this.#J){var Z=this.#H;if(Z?.byteLength??0<D){var U=I>D?I:D;this.#H=Z=new Buffer(U)}return Z}push(I,Z){return super.push(...arguments)}#Y(I,Z,U){if(typeof I==="number"){if(I>=this.#J&&!this.#Z&&!U)this.#J*=2,this.#Z=!0;return k(this,I,Z,U)}else if(typeof I==="boolean")return this.push(null),Z?.byteLength??0>0?Z:void 0;else if(ArrayBuffer.isView(I)){if(I.byteLength>=this.#J&&!this.#Z&&!U)this.#J*=2,this.#Z=!0;return c(this,I,Z,U)}else throw new Error("Invalid result from pull")}#V(I,Z){g[0]=!1;var U=B(Z,I,g);if(xq(U))return this.#K=!0,U.then((T)=>{this.#K=!1,this.#H=this.#Y(T,I,g[0])},(T)=>{errorOrDestroy(this,T)});else this.#H=this.#Y(U,I,g[0])}_destroy(I,Z){var U=this.#q;if(U===0){Z(I);return}if(l.unregister(this.#B),this.#q=0,R)R(U,!1);y(U,I),Z(I)}ref(){var I=this.#q;if(I===0)return;if(this.#Q++===0)R(I,!0)}unref(){var I=this.#q;if(I===0)return;if(this.#Q--===1)R(I,!1)}};if(!R)p.prototype.ref=void 0,p.prototype.unref=void 0;return p},lq=function(a,j){return $Q[a]||=YQ(a,j)},zQ=function(a,j,B){if(!(j&&typeof j==="object"&&j instanceof ReadableStream))return;const G=sq(j);if(!G){Gq("no native readable stream");return}const{stream:y,data:A}=G;return new(lq(A,a))(y,B)};var Gq=()=>{},{isPromise:xq,isCallable:oq,direct:sq,Object:zq}=globalThis[Symbol.for("Bun.lazy")]("primordials"),GQ=zq.create,MQ=zq.defineProperty,FQ=zq.getOwnPropertyDescriptor,rq=zq.getOwnPropertyNames,LQ=zq.getPrototypeOf,jQ=zq.prototype.hasOwnProperty,NQ=zq.setPrototypeOf,Bq=(a,j)=>function B(){return j||(0,a[rq(a)[0]])((j={exports:{}}).exports,j),j.exports};var Xq=process.nextTick;var AQ=Array.isArray,Vq=Bq({"node_modules/readable-stream/lib/ours/primordials.js"(a,j){j.exports={ArrayIsArray(B){return Array.isArray(B)},ArrayPrototypeIncludes(B,G){return B.includes(G)},ArrayPrototypeIndexOf(B,G){return B.indexOf(G)},ArrayPrototypeJoin(B,G){return B.join(G)},ArrayPrototypeMap(B,G){return B.map(G)},ArrayPrototypePop(B,G){return B.pop(G)},ArrayPrototypePush(B,G){return B.push(G)},ArrayPrototypeSlice(B,G,y){return B.slice(G,y)},Error,FunctionPrototypeCall(B,G,...y){return B.call(G,...y)},FunctionPrototypeSymbolHasInstance(B,G){return Function.prototype[Symbol.hasInstance].call(B,G)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(B,G){return zq.defineProperties(B,G)},ObjectDefineProperty(B,G,y){return zq.defineProperty(B,G,y)},ObjectGetOwnPropertyDescriptor(B,G){return zq.getOwnPropertyDescriptor(B,G)},ObjectKeys(B){return zq.keys(B)},ObjectSetPrototypeOf(B,G){return zq.setPrototypeOf(B,G)},Promise,PromisePrototypeCatch(B,G){return B.catch(G)},PromisePrototypeThen(B,G,y){return B.then(G,y)},PromiseReject(B){return Promise.reject(B)},ReflectApply:Reflect.apply,RegExpPrototypeTest(B,G){return B.test(G)},SafeSet:Set,String,StringPrototypeSlice(B,G,y){return B.slice(G,y)},StringPrototypeToLowerCase(B){return B.toLowerCase()},StringPrototypeToUpperCase(B){return B.toUpperCase()},StringPrototypeTrim(B){return B.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(B,G,y){return B.set(G,y)},Uint8Array}}}),Aq=Bq({"node_modules/readable-stream/lib/ours/util.js"(a,j){var B=zq.getPrototypeOf(async function(){}).constructor,G=typeof Blob!=="undefined"?function A(M){return M instanceof Blob}:function A(M){return!1},y=class extends Error{constructor(A){if(!Array.isArray(A))throw new TypeError(`Expected input to be an Array, got ${typeof A}`);let M="";for(let R=0;R<A.length;R++)M+=` ${A[R].stack} -`;super(M);this.name="AggregateError",this.errors=A}};j.exports={AggregateError:y,once(A){let M=!1;return function(...R){if(M)return;M=!0,A.apply(this,R)}},createDeferredPromise:function(){let A,M;return{promise:new Promise((P,g)=>{A=P,M=g}),resolve:A,reject:M}},promisify(A){return new Promise((M,R)=>{A((P,...g)=>{if(P)return R(P);return M(...g)})})},debuglog(){return function(){}},format(A,...M){return A.replace(/%([sdifj])/g,function(...[R,P]){const g=M.shift();if(P==="f")return g.toFixed(6);else if(P==="j")return JSON.stringify(g);else if(P==="s"&&typeof g==="object")return`${g.constructor!==zq?g.constructor.name:""} {}`.trim();else return g.toString()})},inspect(A){switch(typeof A){case"string":if(A.includes("'")){if(!A.includes('"'))return`"${A}"`;else if(!A.includes("`")&&!A.includes("${"))return`\`${A}\``}return`'${A}'`;case"number":if(isNaN(A))return"NaN";else if(zq.is(A,-0))return String(A);return A;case"bigint":return`${String(A)}n`;case"boolean":case"undefined":return String(A);case"object":return"{}"}},types:{isAsyncFunction(A){return A instanceof B},isArrayBufferView(A){return ArrayBuffer.isView(A)}},isBlob:G},j.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}}),Wq=Bq({"node_modules/readable-stream/lib/ours/errors.js"(a,j){var{format:B,inspect:G,AggregateError:y}=Aq(),A=globalThis.AggregateError||y,M=Symbol("kIsNodeError"),R=["string","function","number","object","Function","Object","boolean","bigint","symbol"],P=/^([A-Z][a-z0-9]*)+$/,g="__node_internal_",k={};function c(Z,U){if(!Z)throw new k.ERR_INTERNAL_ASSERTION(U)}function O(Z){let U="",T=Z.length;const _=Z[0]==="-"?1:0;for(;T>=_+4;T-=3)U=`_${Z.slice(T-3,T)}${U}`;return`${Z.slice(0,T)}${U}`}function l(Z,U,T){if(typeof U==="function")return c(U.length<=T.length,`Code: ${Z}; The provided arguments length (${T.length}) does not match the required ones (${U.length}).`),U(...T);const _=(U.match(/%[dfijoOs]/g)||[]).length;if(c(_===T.length,`Code: ${Z}; The provided arguments length (${T.length}) does not match the required ones (${_}).`),T.length===0)return U;return B(U,...T)}function D(Z,U,T){if(!T)T=Error;class _ extends T{constructor(...t){super(l(Z,U,t))}toString(){return`${this.name} [${Z}]: ${this.message}`}}zq.defineProperties(_.prototype,{name:{value:T.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${Z}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),_.prototype.code=Z,_.prototype[M]=!0,k[Z]=_}function p(Z){const U=g+Z.name;return zq.defineProperty(Z,"name",{value:U}),Z}function E(Z,U){if(Z&&U&&Z!==U){if(Array.isArray(U.errors))return U.errors.push(Z),U;const T=new A([U,Z],U.message);return T.code=U.code,T}return Z||U}var I=class extends Error{constructor(Z="The operation was aborted",U=void 0){if(U!==void 0&&typeof U!=="object")throw new k.ERR_INVALID_ARG_TYPE("options","Object",U);super(Z,U);this.code="ABORT_ERR",this.name="AbortError"}};D("ERR_ASSERTION","%s",Error),D("ERR_INVALID_ARG_TYPE",(Z,U,T)=>{if(c(typeof Z==="string","'name' must be a string"),!Array.isArray(U))U=[U];let _="The ";if(Z.endsWith(" argument"))_+=`${Z} `;else _+=`"${Z}" ${Z.includes(".")?"property":"argument"} `;_+="must be ";const t=[],i=[],$=[];for(let Y of U)if(c(typeof Y==="string","All expected entries have to be of type string"),R.includes(Y))t.push(Y.toLowerCase());else if(P.test(Y))i.push(Y);else c(Y!=="object",'The value "object" should be written as "Object"'),$.push(Y);if(i.length>0){const Y=t.indexOf("object");if(Y!==-1)t.splice(t,Y,1),i.push("Object")}if(t.length>0){switch(t.length){case 1:_+=`of type ${t[0]}`;break;case 2:_+=`one of type ${t[0]} or ${t[1]}`;break;default:{const Y=t.pop();_+=`one of type ${t.join(", ")}, or ${Y}`}}if(i.length>0||$.length>0)_+=" or "}if(i.length>0){switch(i.length){case 1:_+=`an instance of ${i[0]}`;break;case 2:_+=`an instance of ${i[0]} or ${i[1]}`;break;default:{const Y=i.pop();_+=`an instance of ${i.join(", ")}, or ${Y}`}}if($.length>0)_+=" or "}switch($.length){case 0:break;case 1:if($[0].toLowerCase()!==$[0])_+="an ";_+=`${$[0]}`;break;case 2:_+=`one of ${$[0]} or ${$[1]}`;break;default:{const Y=$.pop();_+=`one of ${$.join(", ")}, or ${Y}`}}if(T==null)_+=`. Received ${T}`;else if(typeof T==="function"&&T.name)_+=`. Received function ${T.name}`;else if(typeof T==="object"){var n;if((n=T.constructor)!==null&&n!==void 0&&n.name)_+=`. Received an instance of ${T.constructor.name}`;else{const Y=G(T,{depth:-1});_+=`. Received ${Y}`}}else{let Y=G(T,{colors:!1});if(Y.length>25)Y=`${Y.slice(0,25)}...`;_+=`. Received type ${typeof T} (${Y})`}return _},TypeError),D("ERR_INVALID_ARG_VALUE",(Z,U,T="is invalid")=>{let _=G(U);if(_.length>128)_=_.slice(0,128)+"...";return`The ${Z.includes(".")?"property":"argument"} '${Z}' ${T}. Received ${_}`},TypeError),D("ERR_INVALID_RETURN_VALUE",(Z,U,T)=>{var _;const t=T!==null&&T!==void 0&&(_=T.constructor)!==null&&_!==void 0&&_.name?`instance of ${T.constructor.name}`:`type ${typeof T}`;return`Expected ${Z} to be returned from the "${U}" function but got ${t}.`},TypeError),D("ERR_MISSING_ARGS",(...Z)=>{c(Z.length>0,"At least one arg needs to be specified");let U;const T=Z.length;switch(Z=(Array.isArray(Z)?Z:[Z]).map((_)=>`"${_}"`).join(" or "),T){case 1:U+=`The ${Z[0]} argument`;break;case 2:U+=`The ${Z[0]} and ${Z[1]} arguments`;break;default:{const _=Z.pop();U+=`The ${Z.join(", ")}, and ${_} arguments`}break}return`${U} must be specified`},TypeError),D("ERR_OUT_OF_RANGE",(Z,U,T)=>{c(U,'Missing "range" argument');let _;if(Number.isInteger(T)&&Math.abs(T)>4294967296)_=O(String(T));else if(typeof T==="bigint"){if(_=String(T),T>2n**32n||T<-(2n**32n))_=O(_);_+="n"}else _=G(T);return`The value of "${Z}" is out of range. It must be ${U}. Received ${_}`},RangeError),D("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),D("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),D("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),D("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),D("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),D("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),D("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),D("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),D("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),D("ERR_STREAM_WRITE_AFTER_END","write after end",Error),D("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),j.exports={AbortError:I,aggregateTwoErrors:p(E),hideStackFrames:p,codes:k}}}),Cq=Bq({"node_modules/readable-stream/lib/internal/validators.js"(a,j){var{ArrayIsArray:B,ArrayPrototypeIncludes:G,ArrayPrototypeJoin:y,ArrayPrototypeMap:A,NumberIsInteger:M,NumberMAX_SAFE_INTEGER:R,NumberMIN_SAFE_INTEGER:P,NumberParseInt:g,RegExpPrototypeTest:k,String:c,StringPrototypeToUpperCase:O,StringPrototypeTrim:l}=Vq(),{hideStackFrames:D,codes:{ERR_SOCKET_BAD_PORT:p,ERR_INVALID_ARG_TYPE:E,ERR_INVALID_ARG_VALUE:I,ERR_OUT_OF_RANGE:Z,ERR_UNKNOWN_SIGNAL:U}}=Wq(),{normalizeEncoding:T}=Aq(),{isAsyncFunction:_,isArrayBufferView:t}=Aq().types,i={};function $(V){return V===(V|0)}function n(V){return V===V>>>0}var Y=/^[0-7]+$/,K="must be a 32-bit unsigned integer or an octal string";function F(V,h,Q){if(typeof V==="undefined")V=Q;if(typeof V==="string"){if(!k(Y,V))throw new I(h,V,K);V=g(V,8)}return u(V,h,0,4294967295),V}var m=D((V,h,Q=P,H=R)=>{if(typeof V!=="number")throw new E(h,"number",V);if(!M(V))throw new Z(h,"an integer",V);if(V<Q||V>H)throw new Z(h,`>= ${Q} && <= ${H}`,V)}),u=D((V,h,Q=-2147483648,H=2147483647)=>{if(typeof V!=="number")throw new E(h,"number",V);if(!$(V)){if(!M(V))throw new Z(h,"an integer",V);throw new Z(h,`>= ${Q} && <= ${H}`,V)}if(V<Q||V>H)throw new Z(h,`>= ${Q} && <= ${H}`,V)}),J=D((V,h,Q)=>{if(typeof V!=="number")throw new E(h,"number",V);if(!n(V)){if(!M(V))throw new Z(h,"an integer",V);throw new Z(h,`>= ${Q?1:0} && < 4294967296`,V)}if(Q&&V===0)throw new Z(h,">= 1 && < 4294967296",V)});function z(V,h){if(typeof V!=="string")throw new E(h,"string",V)}function w(V,h){if(typeof V!=="number")throw new E(h,"number",V)}var S=D((V,h,Q)=>{if(!G(Q,V)){const L="must be one of: "+y(A(Q,(d)=>typeof d==="string"?`'${d}'`:c(d)),", ");throw new I(h,V,L)}});function N(V,h){if(typeof V!=="boolean")throw new E(h,"boolean",V)}var W=D((V,h,Q)=>{const H=Q==null,L=H?!1:Q.allowArray,d=H?!1:Q.allowFunction;if(!(H?!1:Q.nullable)&&V===null||!L&&B(V)||typeof V!=="object"&&(!d||typeof V!=="function"))throw new E(h,"Object",V)}),b=D((V,h,Q=0)=>{if(!B(V))throw new E(h,"Array",V);if(V.length<Q){const H=`must be longer than ${Q}`;throw new I(h,V,H)}});function o(V,h="signal"){if(z(V,h),i[V]===void 0){if(i[O(V)]!==void 0)throw new U(V+" (signals must use all capital letters)");throw new U(V)}}var s=D((V,h="buffer")=>{if(!t(V))throw new E(h,["Buffer","TypedArray","DataView"],V)});function e(V,h){const Q=T(h),H=V.length;if(Q==="hex"&&H%2!==0)throw new I("encoding",h,`is invalid for data of length ${H}`)}function Hq(V,h="Port",Q=!0){if(typeof V!=="number"&&typeof V!=="string"||typeof V==="string"&&l(V).length===0||+V!==+V>>>0||V>65535||V===0&&!Q)throw new p(h,V,Q);return V|0}var $q=D((V,h)=>{if(V!==void 0&&(V===null||typeof V!=="object"||!("aborted"in V)))throw new E(h,"AbortSignal",V)}),qq=D((V,h)=>{if(typeof V!=="function")throw new E(h,"Function",V)}),Kq=D((V,h)=>{if(typeof V!=="function"||_(V))throw new E(h,"Function",V)}),Qq=D((V,h)=>{if(V!==void 0)throw new E(h,"undefined",V)});j.exports={isInt32:$,isUint32:n,parseFileMode:F,validateArray:b,validateBoolean:N,validateBuffer:s,validateEncoding:e,validateFunction:qq,validateInt32:u,validateInteger:m,validateNumber:w,validateObject:W,validateOneOf:S,validatePlainFunction:Kq,validatePort:Hq,validateSignalName:o,validateString:z,validateUint32:J,validateUndefined:Qq,validateAbortSignal:$q}}}),Eq=Bq({"node_modules/readable-stream/lib/internal/streams/utils.js"(a,j){var{Symbol:B,SymbolAsyncIterator:G,SymbolIterator:y}=Vq(),A=B("kDestroyed"),M=B("kIsErrored"),R=B("kIsReadable"),P=B("kIsDisturbed");function g(J,z=!1){var w;return!!(J&&typeof J.pipe==="function"&&typeof J.on==="function"&&(!z||typeof J.pause==="function"&&typeof J.resume==="function")&&(!J._writableState||((w=J._readableState)===null||w===void 0?void 0:w.readable)!==!1)&&(!J._writableState||J._readableState))}function k(J){var z;return!!(J&&typeof J.write==="function"&&typeof J.on==="function"&&(!J._readableState||((z=J._writableState)===null||z===void 0?void 0:z.writable)!==!1))}function c(J){return!!(J&&typeof J.pipe==="function"&&J._readableState&&typeof J.on==="function"&&typeof J.write==="function")}function O(J){return J&&(J._readableState||J._writableState||typeof J.write==="function"&&typeof J.on==="function"||typeof J.pipe==="function"&&typeof J.on==="function")}function l(J,z){if(J==null)return!1;if(z===!0)return typeof J[G]==="function";if(z===!1)return typeof J[y]==="function";return typeof J[G]==="function"||typeof J[y]==="function"}function D(J){if(!O(J))return null;const{_writableState:z,_readableState:w}=J,S=z||w;return!!(J.destroyed||J[A]||S!==null&&S!==void 0&&S.destroyed)}function p(J){if(!k(J))return null;if(J.writableEnded===!0)return!0;const z=J._writableState;if(z!==null&&z!==void 0&&z.errored)return!1;if(typeof(z===null||z===void 0?void 0:z.ended)!=="boolean")return null;return z.ended}function E(J,z){if(!k(J))return null;if(J.writableFinished===!0)return!0;const w=J._writableState;if(w!==null&&w!==void 0&&w.errored)return!1;if(typeof(w===null||w===void 0?void 0:w.finished)!=="boolean")return null;return!!(w.finished||z===!1&&w.ended===!0&&w.length===0)}function I(J){if(!g(J))return null;if(J.readableEnded===!0)return!0;const z=J._readableState;if(!z||z.errored)return!1;if(typeof(z===null||z===void 0?void 0:z.ended)!=="boolean")return null;return z.ended}function Z(J,z){if(!g(J))return null;const w=J._readableState;if(w!==null&&w!==void 0&&w.errored)return!1;if(typeof(w===null||w===void 0?void 0:w.endEmitted)!=="boolean")return null;return!!(w.endEmitted||z===!1&&w.ended===!0&&w.length===0)}function U(J){if(J&&J[R]!=null)return J[R];if(typeof(J===null||J===void 0?void 0:J.readable)!=="boolean")return null;if(D(J))return!1;return g(J)&&J.readable&&!Z(J)}function T(J){if(typeof(J===null||J===void 0?void 0:J.writable)!=="boolean")return null;if(D(J))return!1;return k(J)&&J.writable&&!p(J)}function _(J,z){if(!O(J))return null;if(D(J))return!0;if((z===null||z===void 0?void 0:z.readable)!==!1&&U(J))return!1;if((z===null||z===void 0?void 0:z.writable)!==!1&&T(J))return!1;return!0}function t(J){var z,w;if(!O(J))return null;if(J.writableErrored)return J.writableErrored;return(z=(w=J._writableState)===null||w===void 0?void 0:w.errored)!==null&&z!==void 0?z:null}function i(J){var z,w;if(!O(J))return null;if(J.readableErrored)return J.readableErrored;return(z=(w=J._readableState)===null||w===void 0?void 0:w.errored)!==null&&z!==void 0?z:null}function $(J){if(!O(J))return null;if(typeof J.closed==="boolean")return J.closed;const{_writableState:z,_readableState:w}=J;if(typeof(z===null||z===void 0?void 0:z.closed)==="boolean"||typeof(w===null||w===void 0?void 0:w.closed)==="boolean")return(z===null||z===void 0?void 0:z.closed)||(w===null||w===void 0?void 0:w.closed);if(typeof J._closed==="boolean"&&n(J))return J._closed;return null}function n(J){return typeof J._closed==="boolean"&&typeof J._defaultKeepAlive==="boolean"&&typeof J._removedConnection==="boolean"&&typeof J._removedContLen==="boolean"}function Y(J){return typeof J._sent100==="boolean"&&n(J)}function K(J){var z;return typeof J._consuming==="boolean"&&typeof J._dumped==="boolean"&&((z=J.req)===null||z===void 0?void 0:z.upgradeOrConnect)===void 0}function F(J){if(!O(J))return null;const{_writableState:z,_readableState:w}=J,S=z||w;return!S&&Y(J)||!!(S&&S.autoDestroy&&S.emitClose&&S.closed===!1)}function m(J){var z;return!!(J&&((z=J[P])!==null&&z!==void 0?z:J.readableDidRead||J.readableAborted))}function u(J){var z,w,S,N,W,b,o,s,e,Hq;return!!(J&&((z=(w=(S=(N=(W=(b=J[M])!==null&&b!==void 0?b:J.readableErrored)!==null&&W!==void 0?W:J.writableErrored)!==null&&N!==void 0?N:(o=J._readableState)===null||o===void 0?void 0:o.errorEmitted)!==null&&S!==void 0?S:(s=J._writableState)===null||s===void 0?void 0:s.errorEmitted)!==null&&w!==void 0?w:(e=J._readableState)===null||e===void 0?void 0:e.errored)!==null&&z!==void 0?z:(Hq=J._writableState)===null||Hq===void 0?void 0:Hq.errored))}j.exports={kDestroyed:A,isDisturbed:m,kIsDisturbed:P,isErrored:u,kIsErrored:M,isReadable:U,kIsReadable:R,isClosed:$,isDestroyed:D,isDuplexNodeStream:c,isFinished:_,isIterable:l,isReadableNodeStream:g,isReadableEnded:I,isReadableFinished:Z,isReadableErrored:i,isNodeStream:O,isWritable:T,isWritableNodeStream:k,isWritableEnded:p,isWritableFinished:E,isWritableErrored:t,isServerRequest:K,isServerResponse:Y,willEmitClose:F}}}),Fq=Bq({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(a,j){var{AbortError:B,codes:G}=Wq(),{ERR_INVALID_ARG_TYPE:y,ERR_STREAM_PREMATURE_CLOSE:A}=G,{once:M}=Aq(),{validateAbortSignal:R,validateFunction:P,validateObject:g}=Cq(),{Promise:k}=Vq(),{isClosed:c,isReadable:O,isReadableNodeStream:l,isReadableFinished:D,isReadableErrored:p,isWritable:E,isWritableNodeStream:I,isWritableFinished:Z,isWritableErrored:U,isNodeStream:T,willEmitClose:_}=Eq();function t(Y){return Y.setHeader&&typeof Y.abort==="function"}var i=()=>{};function $(Y,K,F){var m,u;if(arguments.length===2)F=K,K={};else if(K==null)K={};else g(K,"options");P(F,"callback"),R(K.signal,"options.signal"),F=M(F);const J=(m=K.readable)!==null&&m!==void 0?m:l(Y),z=(u=K.writable)!==null&&u!==void 0?u:I(Y);if(!T(Y))throw new y("stream","Stream",Y);const{_writableState:w,_readableState:S}=Y,N=()=>{if(!Y.writable)o()};let W=_(Y)&&l(Y)===J&&I(Y)===z,b=Z(Y,!1);const o=()=>{if(b=!0,Y.destroyed)W=!1;if(W&&(!Y.readable||J))return;if(!J||s)F.call(Y)};let s=D(Y,!1);const e=()=>{if(s=!0,Y.destroyed)W=!1;if(W&&(!Y.writable||z))return;if(!z||b)F.call(Y)},Hq=(V)=>{F.call(Y,V)};let $q=c(Y);const qq=()=>{$q=!0;const V=U(Y)||p(Y);if(V&&typeof V!=="boolean")return F.call(Y,V);if(J&&!s&&l(Y,!0)){if(!D(Y,!1))return F.call(Y,new A)}if(z&&!b){if(!Z(Y,!1))return F.call(Y,new A)}F.call(Y)},Kq=()=>{Y.req.on("finish",o)};if(t(Y)){if(Y.on("complete",o),!W)Y.on("abort",qq);if(Y.req)Kq();else Y.on("request",Kq)}else if(z&&!w)Y.on("end",N),Y.on("close",N);if(!W&&typeof Y.aborted==="boolean")Y.on("aborted",qq);if(Y.on("end",e),Y.on("finish",o),K.error!==!1)Y.on("error",Hq);if(Y.on("close",qq),$q)Xq(qq);else if(w!==null&&w!==void 0&&w.errorEmitted||S!==null&&S!==void 0&&S.errorEmitted){if(!W)Xq(qq)}else if(!J&&(!W||O(Y))&&(b||E(Y)===!1))Xq(qq);else if(!z&&(!W||E(Y))&&(s||O(Y)===!1))Xq(qq);else if(S&&Y.req&&Y.aborted)Xq(qq);const Qq=()=>{if(F=i,Y.removeListener("aborted",qq),Y.removeListener("complete",o),Y.removeListener("abort",qq),Y.removeListener("request",Kq),Y.req)Y.req.removeListener("finish",o);Y.removeListener("end",N),Y.removeListener("close",N),Y.removeListener("finish",o),Y.removeListener("end",e),Y.removeListener("error",Hq),Y.removeListener("close",qq)};if(K.signal&&!$q){const V=()=>{const h=F;Qq(),h.call(Y,new B(void 0,{cause:K.signal.reason}))};if(K.signal.aborted)Xq(V);else{const h=F;F=M((...Q)=>{K.signal.removeEventListener("abort",V),h.apply(Y,Q)}),K.signal.addEventListener("abort",V)}}return Qq}function n(Y,K){return new k((F,m)=>{$(Y,K,(u)=>{if(u)m(u);else F()})})}j.exports=$,j.exports.finished=n}}),XQ=Bq({"node_modules/readable-stream/lib/internal/streams/operators.js"(a,j){var{codes:{ERR_INVALID_ARG_TYPE:B,ERR_MISSING_ARGS:G,ERR_OUT_OF_RANGE:y},AbortError:A}=Wq(),{validateAbortSignal:M,validateInteger:R,validateObject:P}=Cq(),g=Vq().Symbol("kWeak"),{finished:k}=Fq(),{ArrayPrototypePush:c,MathFloor:O,Number:l,NumberIsNaN:D,Promise:p,PromiseReject:E,PromisePrototypeCatch:I,Symbol:Z}=Vq(),U=Z("kEmpty"),T=Z("kEof");function _(N,W){if(typeof N!=="function")throw new B("fn",["Function","AsyncFunction"],N);if(W!=null)P(W,"options");if((W===null||W===void 0?void 0:W.signal)!=null)M(W.signal,"options.signal");let b=1;if((W===null||W===void 0?void 0:W.concurrency)!=null)b=O(W.concurrency);return R(b,"concurrency",1),async function*o(){var s,e;const Hq=new AbortController,$q=this,qq=[],Kq=Hq.signal,Qq={signal:Kq},V=()=>Hq.abort();if(W!==null&&W!==void 0&&(s=W.signal)!==null&&s!==void 0&&s.aborted)V();W===null||W===void 0||(e=W.signal)===null||e===void 0||e.addEventListener("abort",V);let h,Q,H=!1;function L(){H=!0}async function d(){try{for await(let q of $q){var f;if(H)return;if(Kq.aborted)throw new A;try{q=N(q,Qq)}catch(X){q=E(X)}if(q===U)continue;if(typeof((f=q)===null||f===void 0?void 0:f.catch)==="function")q.catch(L);if(qq.push(q),h)h(),h=null;if(!H&&qq.length&&qq.length>=b)await new p((X)=>{Q=X})}qq.push(T)}catch(q){const X=E(q);I(X,L),qq.push(X)}finally{var r;if(H=!0,h)h(),h=null;W===null||W===void 0||(r=W.signal)===null||r===void 0||r.removeEventListener("abort",V)}}d();try{while(!0){while(qq.length>0){const f=await qq[0];if(f===T)return;if(Kq.aborted)throw new A;if(f!==U)yield f;if(qq.shift(),Q)Q(),Q=null}await new p((f)=>{h=f})}}finally{if(Hq.abort(),H=!0,Q)Q(),Q=null}}.call(this)}function t(N=void 0){if(N!=null)P(N,"options");if((N===null||N===void 0?void 0:N.signal)!=null)M(N.signal,"options.signal");return async function*W(){let b=0;for await(let s of this){var o;if(N!==null&&N!==void 0&&(o=N.signal)!==null&&o!==void 0&&o.aborted)throw new A({cause:N.signal.reason});yield[b++,s]}}.call(this)}async function i(N,W=void 0){for await(let b of K.call(this,N,W))return!0;return!1}async function $(N,W=void 0){if(typeof N!=="function")throw new B("fn",["Function","AsyncFunction"],N);return!await i.call(this,async(...b)=>{return!await N(...b)},W)}async function n(N,W){for await(let b of K.call(this,N,W))return b;return}async function Y(N,W){if(typeof N!=="function")throw new B("fn",["Function","AsyncFunction"],N);async function b(o,s){return await N(o,s),U}for await(let o of _.call(this,b,W));}function K(N,W){if(typeof N!=="function")throw new B("fn",["Function","AsyncFunction"],N);async function b(o,s){if(await N(o,s))return o;return U}return _.call(this,b,W)}var F=class extends G{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}};async function m(N,W,b){var o;if(typeof N!=="function")throw new B("reducer",["Function","AsyncFunction"],N);if(b!=null)P(b,"options");if((b===null||b===void 0?void 0:b.signal)!=null)M(b.signal,"options.signal");let s=arguments.length>1;if(b!==null&&b!==void 0&&(o=b.signal)!==null&&o!==void 0&&o.aborted){const Kq=new A(void 0,{cause:b.signal.reason});throw this.once("error",()=>{}),await k(this.destroy(Kq)),Kq}const e=new AbortController,Hq=e.signal;if(b!==null&&b!==void 0&&b.signal){const Kq={once:!0,[g]:this};b.signal.addEventListener("abort",()=>e.abort(),Kq)}let $q=!1;try{for await(let Kq of this){var qq;if($q=!0,b!==null&&b!==void 0&&(qq=b.signal)!==null&&qq!==void 0&&qq.aborted)throw new A;if(!s)W=Kq,s=!0;else W=await N(W,Kq,{signal:Hq})}if(!$q&&!s)throw new F}finally{e.abort()}return W}async function u(N){if(N!=null)P(N,"options");if((N===null||N===void 0?void 0:N.signal)!=null)M(N.signal,"options.signal");const W=[];for await(let o of this){var b;if(N!==null&&N!==void 0&&(b=N.signal)!==null&&b!==void 0&&b.aborted)throw new A(void 0,{cause:N.signal.reason});c(W,o)}return W}function J(N,W){const b=_.call(this,N,W);return async function*o(){for await(let s of b)yield*s}.call(this)}function z(N){if(N=l(N),D(N))return 0;if(N<0)throw new y("number",">= 0",N);return N}function w(N,W=void 0){if(W!=null)P(W,"options");if((W===null||W===void 0?void 0:W.signal)!=null)M(W.signal,"options.signal");return N=z(N),async function*b(){var o;if(W!==null&&W!==void 0&&(o=W.signal)!==null&&o!==void 0&&o.aborted)throw new A;for await(let e of this){var s;if(W!==null&&W!==void 0&&(s=W.signal)!==null&&s!==void 0&&s.aborted)throw new A;if(N--<=0)yield e}}.call(this)}function S(N,W=void 0){if(W!=null)P(W,"options");if((W===null||W===void 0?void 0:W.signal)!=null)M(W.signal,"options.signal");return N=z(N),async function*b(){var o;if(W!==null&&W!==void 0&&(o=W.signal)!==null&&o!==void 0&&o.aborted)throw new A;for await(let e of this){var s;if(W!==null&&W!==void 0&&(s=W.signal)!==null&&s!==void 0&&s.aborted)throw new A;if(N-- >0)yield e;else return}}.call(this)}j.exports.streamReturningOperators={asIndexedPairs:t,drop:w,filter:K,flatMap:J,map:_,take:S},j.exports.promiseReturningOperators={every:$,forEach:Y,reduce:m,toArray:u,some:i,find:n}}}),Tq=Bq({"node_modules/readable-stream/lib/internal/streams/destroy.js"(a,j){var{aggregateTwoErrors:B,codes:{ERR_MULTIPLE_CALLBACK:G},AbortError:y}=Wq(),{Symbol:A}=Vq(),{kDestroyed:M,isDestroyed:R,isFinished:P,isServerRequest:g}=Eq(),k="#kDestroy",c="#kConstruct";function O(K,F,m){if(K){if(K.stack,F&&!F.errored)F.errored=K;if(m&&!m.errored)m.errored=K}}function l(K,F){const m=this._readableState,u=this._writableState,J=u||m;if(u&&u.destroyed||m&&m.destroyed){if(typeof F==="function")F();return this}if(O(K,u,m),u)u.destroyed=!0;if(m)m.destroyed=!0;if(!J.constructed)this.once(k,(z)=>{D(this,B(z,K),F)});else D(this,K,F);return this}function D(K,F,m){let u=!1;function J(z){if(u)return;u=!0;const{_readableState:w,_writableState:S}=K;if(O(z,S,w),S)S.closed=!0;if(w)w.closed=!0;if(typeof m==="function")m(z);if(z)Xq(p,K,z);else Xq(E,K)}try{K._destroy(F||null,J)}catch(z){J(z)}}function p(K,F){I(K,F),E(K)}function E(K){const{_readableState:F,_writableState:m}=K;if(m)m.closeEmitted=!0;if(F)F.closeEmitted=!0;if(m&&m.emitClose||F&&F.emitClose)K.emit("close")}function I(K,F){const m=K?._readableState,u=K?._writableState;if(u?.errorEmitted||m?.errorEmitted)return;if(u)u.errorEmitted=!0;if(m)m.errorEmitted=!0;K?.emit?.("error",F)}function Z(){const K=this._readableState,F=this._writableState;if(K)K.constructed=!0,K.closed=!1,K.closeEmitted=!1,K.destroyed=!1,K.errored=null,K.errorEmitted=!1,K.reading=!1,K.ended=K.readable===!1,K.endEmitted=K.readable===!1;if(F)F.constructed=!0,F.destroyed=!1,F.closed=!1,F.closeEmitted=!1,F.errored=null,F.errorEmitted=!1,F.finalCalled=!1,F.prefinished=!1,F.ended=F.writable===!1,F.ending=F.writable===!1,F.finished=F.writable===!1}function U(K,F,m){const u=K?._readableState,J=K?._writableState;if(J&&J.destroyed||u&&u.destroyed)return this;if(u&&u.autoDestroy||J&&J.autoDestroy)K.destroy(F);else if(F){if(Error.captureStackTrace(F),J&&!J.errored)J.errored=F;if(u&&!u.errored)u.errored=F;if(m)Xq(I,K,F);else I(K,F)}}function T(K,F){if(typeof K._construct!=="function")return;const{_readableState:m,_writableState:u}=K;if(m)m.constructed=!1;if(u)u.constructed=!1;if(K.once(c,F),K.listenerCount(c)>1)return;Xq(_,K)}function _(K){let F=!1;function m(u){if(F){U(K,u!==null&&u!==void 0?u:new G);return}F=!0;const{_readableState:J,_writableState:z}=K,w=z||J;if(J)J.constructed=!0;if(z)z.constructed=!0;if(w.destroyed)K.emit(k,u);else if(u)U(K,u,!0);else Xq(t,K)}try{K._construct(m)}catch(u){m(u)}}function t(K){K.emit(c)}function i(K){return K&&K.setHeader&&typeof K.abort==="function"}function $(K){K.emit("close")}function n(K,F){K.emit("error",F),Xq($,K)}function Y(K,F){if(!K||R(K))return;if(!F&&!P(K))F=new y;if(g(K))K.socket=null,K.destroy(F);else if(i(K))K.abort();else if(i(K.req))K.req.abort();else if(typeof K.destroy==="function")K.destroy(F);else if(typeof K.close==="function")K.close();else if(F)Xq(n,K);else Xq($,K);if(!K.destroyed)K[M]=!0}j.exports={construct:T,destroyer:Y,destroy:l,undestroy:Z,errorOrDestroy:U}}}),Rq=Bq({"node_modules/readable-stream/lib/internal/streams/legacy.js"(a,j){var{ArrayIsArray:B,ObjectSetPrototypeOf:G}=Vq();function y(M){if(!(this instanceof y))return new y(M);Iq.call(this,M)}G(y.prototype,Iq.prototype),G(y,Iq),y.prototype.pipe=function(M,R){const P=this;function g(E){if(M.writable&&M.write(E)===!1&&P.pause)P.pause()}P.on("data",g);function k(){if(P.readable&&P.resume)P.resume()}if(M.on("drain",k),!M._isStdio&&(!R||R.end!==!1))P.on("end",O),P.on("close",l);let c=!1;function O(){if(c)return;c=!0,M.end()}function l(){if(c)return;if(c=!0,typeof M.destroy==="function")M.destroy()}function D(E){if(p(),Iq.listenerCount(this,"error")===0)this.emit("error",E)}A(P,"error",D),A(M,"error",D);function p(){P.removeListener("data",g),M.removeListener("drain",k),P.removeListener("end",O),P.removeListener("close",l),P.removeListener("error",D),M.removeListener("error",D),P.removeListener("end",p),P.removeListener("close",p),M.removeListener("close",p)}return P.on("end",p),P.on("close",p),M.on("close",p),M.emit("pipe",P),M};function A(M,R,P){if(typeof M.prependListener==="function")return M.prependListener(R,P);if(!M._events||!M._events[R])M.on(R,P);else if(B(M._events[R]))M._events[R].unshift(P);else M._events[R]=[P,M._events[R]]}j.exports={Stream:y,prependListener:A}}}),Sq=Bq({"node_modules/readable-stream/lib/internal/streams/add-abort-signal.js"(a,j){var{AbortError:B,codes:G}=Wq(),y=Fq(),{ERR_INVALID_ARG_TYPE:A}=G,M=(P,g)=>{if(typeof P!=="object"||!("aborted"in P))throw new A(g,"AbortSignal",P)};function R(P){return!!(P&&typeof P.pipe==="function")}j.exports.addAbortSignal=function P(g,k){if(M(g,"signal"),!R(k))throw new A("stream","stream.Stream",k);return j.exports.addAbortSignalNoValidate(g,k)},j.exports.addAbortSignalNoValidate=function(P,g){if(typeof P!=="object"||!("aborted"in P))return g;const k=()=>{g.destroy(new B(void 0,{cause:P.reason}))};if(P.aborted)k();else P.addEventListener("abort",k),y(g,()=>P.removeEventListener("abort",k));return g}}}),JQ=Bq({"node_modules/readable-stream/lib/internal/streams/state.js"(a,j){var{MathFloor:B,NumberIsInteger:G}=Vq(),{ERR_INVALID_ARG_VALUE:y}=Wq().codes;function A(P,g,k){return P.highWaterMark!=null?P.highWaterMark:g?P[k]:null}function M(P){return P?16:16384}function R(P,g,k,c){const O=A(g,c,k);if(O!=null){if(!G(O)||O<0){const l=c?`options.${k}`:"options.highWaterMark";throw new y(l,O)}return B(O)}return M(P.objectMode)}j.exports={getHighWaterMark:R,getDefaultHighWaterMark:M}}}),hq=Bq({"node_modules/readable-stream/lib/internal/streams/from.js"(a,j){var{PromisePrototypeThen:B,SymbolAsyncIterator:G,SymbolIterator:y}=Vq(),{ERR_INVALID_ARG_TYPE:A,ERR_STREAM_NULL_VALUES:M}=Wq().codes;function R(P,g,k){let c;if(typeof g==="string"||g instanceof Buffer)return new P({objectMode:!0,...k,read(){this.push(g),this.push(null)}});let O;if(g&&g[G])O=!0,c=g[G]();else if(g&&g[y])O=!1,c=g[y]();else throw new A("iterable",["Iterable"],g);const l=new P({objectMode:!0,highWaterMark:1,...k});let D=!1;l._read=function(){if(!D)D=!0,E()},l._destroy=function(I,Z){B(p(I),()=>Xq(Z,I),(U)=>Xq(Z,U||I))};async function p(I){const Z=I!==void 0&&I!==null,U=typeof c.throw==="function";if(Z&&U){const{value:T,done:_}=await c.throw(I);if(await T,_)return}if(typeof c.return==="function"){const{value:T}=await c.return();await T}}async function E(){for(;;){try{const{value:I,done:Z}=O?await c.next():c.next();if(Z)l.push(null);else{const U=I&&typeof I.then==="function"?await I:I;if(U===null)throw D=!1,new M;else if(l.push(U))continue;else D=!1}}catch(I){l.destroy(I)}break}}return l}j.exports=R}}),pq,uq,_q=Bq({"node_modules/readable-stream/lib/internal/streams/readable.js"(a,j){var{ArrayPrototypeIndexOf:B,NumberIsInteger:G,NumberIsNaN:y,NumberParseInt:A,ObjectDefineProperties:M,ObjectKeys:R,ObjectSetPrototypeOf:P,Promise:g,SafeSet:k,SymbolAsyncIterator:c,Symbol:O}=Vq(),l=globalThis[Symbol.for("Bun.lazy")]("bun:stream").ReadableState,{Stream:D,prependListener:p}=Rq();function E(q){if(!(this instanceof E))return new E(q);const X=this instanceof Mq();if(this._readableState=new l(q,this,X),q){const{read:C,destroy:x,construct:v,signal:Jq}=q;if(typeof C==="function")this._read=C;if(typeof x==="function")this._destroy=x;if(typeof v==="function")this._construct=v;if(Jq&&!X)U(Jq,this)}D.call(this,q),K.construct(this,()=>{if(this._readableState.needReadable)n(this,this._readableState)})}P(E.prototype,D.prototype),P(E,D),E.prototype.on=function(q,X){const C=D.prototype.on.call(this,q,X),x=this._readableState;if(q==="data"){if(x.readableListening=this.listenerCount("readable")>0,x.flowing!==!1)this.resume()}else if(q==="readable"){if(!x.endEmitted&&!x.readableListening){if(x.readableListening=x.needReadable=!0,x.flowing=!1,x.emittedReadable=!1,x.length)Y(this,x);else if(!x.reading)Xq(Qq,this)}else if(x.endEmitted);}return C};class I extends E{#q;#Q;#X;#H;constructor(q,X){const{objectMode:C,highWaterMark:x,encoding:v,signal:Jq}=q;super({objectMode:C,highWaterMark:x,encoding:v,signal:Jq});this.#X=[],this.#q=void 0,this.#H=X,this.#Q=!1}#J(){var q=this.#X,X=0,C=q.length;for(;X<C;X++){const x=q[X];if(q[X]=void 0,!this.push(x,void 0))return this.#X=q.slice(X+1),!0}if(C>0)this.#X=[];return!1}#K(q){q.releaseLock(),this.#q=void 0,this.#Q=!0,this.push(null);return}async _read(){var q=this.#H,X=this.#q;if(q)X=this.#q=q.getReader(),this.#H=void 0;else if(this.#J())return;var C;try{do{var x=!1,v;const Jq=X.readMany();if(xq(Jq)){if({done:x,value:v}=await Jq,this.#Q){this.#X.push(...v);return}}else({done:x,value:v}=Jq);if(x){this.#K(X);return}if(!this.push(v[0])){this.#X=v.slice(1);return}for(let Zq=1,Oq=v.length;Zq<Oq;Zq++)if(!this.push(v[Zq])){this.#X=v.slice(Zq+1);return}}while(!this.#Q)}catch(Jq){C=Jq}finally{if(C)throw C}}_destroy(q,X){if(!this.#Q){var C=this.#q;if(C)this.#q=void 0,C.cancel(q).finally(()=>{this.#Q=!0,X(q)});return}try{X(q)}catch(x){globalThis.reportError(x)}}}uq=I;function Z(q,X={}){if(!tq(q))throw new m("readableStream","ReadableStream",q);S(X,"options");const{highWaterMark:C,encoding:x,objectMode:v=!1,signal:Jq}=X;if(x!==void 0&&!Buffer.isEncoding(x))throw new QQ(x,"options.encoding");return eq(v,"options.objectMode"),zQ(E,q,X)||new I({highWaterMark:C,encoding:x,objectMode:v,signal:Jq},q)}j.exports=E,pq=Z;var{addAbortSignal:U}=Sq(),T=Fq();const{maybeReadMore:_,resume:t,emitReadable:i,onEofChunk:$}=globalThis[Symbol.for("Bun.lazy")]("bun:stream");function n(q,X){process.nextTick(_,q,X)}function Y(q,X){i(q,X)}var K=Tq(),{aggregateTwoErrors:F,codes:{ERR_INVALID_ARG_TYPE:m,ERR_METHOD_NOT_IMPLEMENTED:u,ERR_OUT_OF_RANGE:J,ERR_STREAM_PUSH_AFTER_EOF:z,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:w}}=Wq(),{validateObject:S}=Cq(),N=hq(),W=()=>{},{errorOrDestroy:b}=K;E.prototype.destroy=K.destroy,E.prototype._undestroy=K.undestroy,E.prototype._destroy=function(q,X){X(q)},E.prototype[Iq.captureRejectionSymbol]=function(q){this.destroy(q)},E.prototype.push=function(q,X){return o(this,q,X,!1)},E.prototype.unshift=function(q,X){return o(this,q,X,!0)};function o(q,X,C,x){const v=q._readableState;let Jq;if(!v.objectMode){if(typeof X==="string"){if(C=C||v.defaultEncoding,v.encoding!==C)if(x&&v.encoding)X=Buffer.from(X,C).toString(v.encoding);else X=Buffer.from(X,C),C=""}else if(X instanceof Buffer)C="";else if(D._isUint8Array(X)){if(x||!v.decoder)X=D._uint8ArrayToBuffer(X);C=""}else if(X!=null)Jq=new m("chunk",["string","Buffer","Uint8Array"],X)}if(Jq)b(q,Jq);else if(X===null)v.reading=!1,$(q,v);else if(v.objectMode||X&&X.length>0)if(x)if(v.endEmitted)b(q,new w);else if(v.destroyed||v.errored)return!1;else s(q,v,X,!0);else if(v.ended)b(q,new z);else if(v.destroyed||v.errored)return!1;else if(v.reading=!1,v.decoder&&!C)if(X=v.decoder.write(X),v.objectMode||X.length!==0)s(q,v,X,!1);else n(q,v);else s(q,v,X,!1);else if(!x)v.reading=!1,n(q,v);return!v.ended&&(v.length<v.highWaterMark||v.length===0)}function s(q,X,C,x){if(X.flowing&&X.length===0&&!X.sync&&q.listenerCount("data")>0){if(X.multiAwaitDrain)X.awaitDrainWriters.clear();else X.awaitDrainWriters=null;X.dataEmitted=!0,q.emit("data",C)}else{if(X.length+=X.objectMode?1:C.length,x)X.buffer.unshift(C);else X.buffer.push(C);if(X.needReadable)Y(q,X)}n(q,X)}E.prototype.isPaused=function(){const q=this._readableState;return q.paused===!0||q.flowing===!1},E.prototype.setEncoding=function(q){const X=new aq(q);this._readableState.decoder=X,this._readableState.encoding=this._readableState.decoder.encoding;const C=this._readableState.buffer;let x="";for(let v=C.length;v>0;v--)x+=X.write(C.shift());if(x!=="")C.push(x);return this._readableState.length=x.length,this};var e=1073741824;function Hq(q){if(q>e)throw new J("size","<= 1GiB",q);else q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++;return q}function $q(q,X){if(q<=0||X.length===0&&X.ended)return 0;if(X.objectMode)return 1;if(y(q)){if(X.flowing&&X.length)return X.buffer.first().length;return X.length}if(q<=X.length)return q;return X.ended?X.length:0}E.prototype.read=function(q){if(!G(q))q=A(q,10);const X=this._readableState,C=q;if(q>X.highWaterMark)X.highWaterMark=Hq(q);if(q!==0)X.emittedReadable=!1;if(q===0&&X.needReadable&&((X.highWaterMark!==0?X.length>=X.highWaterMark:X.length>0)||X.ended)){if(X.length===0&&X.ended)H(this);else Y(this,X);return null}if(q=$q(q,X),q===0&&X.ended){if(X.length===0)H(this);return null}let x=X.needReadable;if(X.length===0||X.length-q<X.highWaterMark)x=!0;if(X.ended||X.reading||X.destroyed||X.errored||!X.constructed)x=!1;else if(x){if(X.reading=!0,X.sync=!0,X.length===0)X.needReadable=!0;try{var v=this._read(X.highWaterMark);if(xq(v)){const Zq=Bun.peek(v);if(Zq!==v)v=Zq}if(xq(v)&&v?.then&&oq(v.then))v.then(W,function(Zq){b(this,Zq)})}catch(Zq){b(this,Zq)}if(X.sync=!1,!X.reading)q=$q(C,X)}let Jq;if(q>0)Jq=Q(q,X);else Jq=null;if(Jq===null)X.needReadable=X.length<=X.highWaterMark,q=0;else if(X.length-=q,X.multiAwaitDrain)X.awaitDrainWriters.clear();else X.awaitDrainWriters=null;if(X.length===0){if(!X.ended)X.needReadable=!0;if(C!==q&&X.ended)H(this)}if(Jq!==null&&!X.errorEmitted&&!X.closeEmitted)X.dataEmitted=!0,this.emit("data",Jq);return Jq},E.prototype._read=function(q){throw new u("_read()")},E.prototype.pipe=function(q,X){const C=this,x=this._readableState;if(x.pipes.length===1){if(!x.multiAwaitDrain)x.multiAwaitDrain=!0,x.awaitDrainWriters=new k(x.awaitDrainWriters?[x.awaitDrainWriters]:[])}x.pipes.push(q);const Jq=(!X||X.end!==!1)&&q!==process.stdout&&q!==process.stderr?Oq:Pq;if(x.endEmitted)Xq(Jq);else C.once("end",Jq);q.on("unpipe",Zq);function Zq(jq,Nq){if(jq===C){if(Nq&&Nq.hasUnpiped===!1)Nq.hasUnpiped=!0,nq()}}function Oq(){q.end()}let Lq,kq=!1;function nq(){if(q.removeListener("close",wq),q.removeListener("finish",vq),Lq)q.removeListener("drain",Lq);if(q.removeListener("error",Dq),q.removeListener("unpipe",Zq),C.removeListener("end",Oq),C.removeListener("end",Pq),C.removeListener("data",yq),kq=!0,Lq&&x.awaitDrainWriters&&(!q._writableState||q._writableState.needDrain))Lq()}function fq(){if(!kq){if(x.pipes.length===1&&x.pipes[0]===q)x.awaitDrainWriters=q,x.multiAwaitDrain=!1;else if(x.pipes.length>1&&x.pipes.includes(q))x.awaitDrainWriters.add(q);C.pause()}if(!Lq)Lq=qq(C,q),q.on("drain",Lq)}C.on("data",yq);function yq(jq){if(q.write(jq)===!1)fq()}function Dq(jq){if(Gq("onerror",jq),Pq(),q.removeListener("error",Dq),q.listenerCount("error")===0){const Nq=q._writableState||q._readableState;if(Nq&&!Nq.errorEmitted)b(q,jq);else q.emit("error",jq)}}p(q,"error",Dq);function wq(){q.removeListener("finish",vq),Pq()}q.once("close",wq);function vq(){Gq("onfinish"),q.removeListener("close",wq),Pq()}q.once("finish",vq);function Pq(){Gq("unpipe"),C.unpipe(q)}if(q.emit("pipe",C),q.writableNeedDrain===!0){if(x.flowing)fq()}else if(!x.flowing)Gq("pipe resume"),C.resume();return q};function qq(q,X){return function C(){const x=q._readableState;if(x.awaitDrainWriters===X)Gq("pipeOnDrain",1),x.awaitDrainWriters=null;else if(x.multiAwaitDrain)Gq("pipeOnDrain",x.awaitDrainWriters.size),x.awaitDrainWriters.delete(X);if((!x.awaitDrainWriters||x.awaitDrainWriters.size===0)&&q.listenerCount("data"))q.resume()}}E.prototype.unpipe=function(q){const X=this._readableState,C={hasUnpiped:!1};if(X.pipes.length===0)return this;if(!q){const v=X.pipes;X.pipes=[],this.pause();for(let Jq=0;Jq<v.length;Jq++)v[Jq].emit("unpipe",this,{hasUnpiped:!1});return this}const x=B(X.pipes,q);if(x===-1)return this;if(X.pipes.splice(x,1),X.pipes.length===0)this.pause();return q.emit("unpipe",this,C),this},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(q,X){const C=D.prototype.removeListener.call(this,q,X);if(q==="readable")Xq(Kq,this);return C},E.prototype.off=E.prototype.removeListener,E.prototype.removeAllListeners=function(q){const X=D.prototype.removeAllListeners.apply(this,arguments);if(q==="readable"||q===void 0)Xq(Kq,this);return X};function Kq(q){const X=q._readableState;if(X.readableListening=q.listenerCount("readable")>0,X.resumeScheduled&&X.paused===!1)X.flowing=!0;else if(q.listenerCount("data")>0)q.resume();else if(!X.readableListening)X.flowing=null}function Qq(q){q.read(0)}E.prototype.resume=function(){const q=this._readableState;if(!q.flowing)q.flowing=!q.readableListening,t(this,q);return q.paused=!1,this},E.prototype.pause=function(){if(this._readableState.flowing!==!1)this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this},E.prototype.wrap=function(q){let X=!1;q.on("data",(x)=>{if(!this.push(x)&&q.pause)X=!0,q.pause()}),q.on("end",()=>{this.push(null)}),q.on("error",(x)=>{b(this,x)}),q.on("close",()=>{this.destroy()}),q.on("destroy",()=>{this.destroy()}),this._read=()=>{if(X&&q.resume)X=!1,q.resume()};const C=R(q);for(let x=1;x<C.length;x++){const v=C[x];if(this[v]===void 0&&typeof q[v]==="function")this[v]=q[v].bind(q)}return this},E.prototype[c]=function(){return V(this)},E.prototype.iterator=function(q){if(q!==void 0)S(q,"options");return V(this,q)};function V(q,X){if(typeof q.read!=="function")q=E.wrap(q,{objectMode:!0});const C=h(q,X);return C.stream=q,C}async function*h(q,X){let C=W;function x(Zq){if(this===q)C(),C=W;else C=Zq}q.on("readable",x);let v;const Jq=T(q,{writable:!1},(Zq)=>{v=Zq?F(v,Zq):null,C(),C=W});try{while(!0){const Zq=q.destroyed?null:q.read();if(Zq!==null)yield Zq;else if(v)throw v;else if(v===null)return;else await new g(x)}}catch(Zq){throw v=F(v,Zq),v}finally{if((v||(X===null||X===void 0?void 0:X.destroyOnReturn)!==!1)&&(v===void 0||q._readableState.autoDestroy))K.destroyer(q,null);else q.off("readable",x),Jq()}}M(E.prototype,{readable:{get(){const q=this._readableState;return!!q&&q.readable!==!1&&!q.destroyed&&!q.errorEmitted&&!q.endEmitted},set(q){if(this._readableState)this._readableState.readable=!!q}},readableDidRead:{enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{enumerable:!1,get:function(){return this._readableState.flowing},set:function(q){if(this._readableState)this._readableState.flowing=q}},readableLength:{enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{get(){return this._readableState?this._readableState.closed:!1}},destroyed:{enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(q){if(!this._readableState)return;this._readableState.destroyed=q}},readableEnded:{enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),E._fromList=Q;function Q(q,X){if(X.length===0)return null;let C;if(X.objectMode)C=X.buffer.shift();else if(!q||q>=X.length){if(X.decoder)C=X.buffer.join("");else if(X.buffer.length===1)C=X.buffer.first();else C=X.buffer.concat(X.length);X.buffer.clear()}else C=X.buffer.consume(q,X.decoder);return C}function H(q){const X=q._readableState;if(!X.endEmitted)X.ended=!0,Xq(L,X,q)}function L(q,X){if(!q.errored&&!q.closeEmitted&&!q.endEmitted&&q.length===0){if(q.endEmitted=!0,X.emit("end"),X.writable&&X.allowHalfOpen===!1)Xq(d,X);else if(q.autoDestroy){const C=X._writableState;if(!C||C.autoDestroy&&(C.finished||C.writable===!1))X.destroy()}}}function d(q){if(q.writable&&!q.writableEnded&&!q.destroyed)q.end()}E.from=function(q,X){return N(E,q,X)};var f={newStreamReadableFromReadableStream:Z};function r(){if(f===void 0)f={};return f}E.fromWeb=function(q,X){return r().newStreamReadableFromReadableStream(q,X)},E.toWeb=function(q){return r().newReadableStreamFromStreamReadable(q)},E.wrap=function(q,X){var C,x;return new E({objectMode:(C=(x=q.readableObjectMode)!==null&&x!==void 0?x:q.objectMode)!==null&&C!==void 0?C:!0,...X,destroy(v,Jq){K.destroyer(q,v),Jq(v)}}).wrap(q)}}}),bq=Bq({"node_modules/readable-stream/lib/internal/streams/writable.js"(a,j){var{ArrayPrototypeSlice:B,Error:G,FunctionPrototypeSymbolHasInstance:y,ObjectDefineProperty:A,ObjectDefineProperties:M,ObjectSetPrototypeOf:R,StringPrototypeToLowerCase:P,Symbol:g,SymbolHasInstance:k}=Vq(),c=Rq().Stream,O=Tq(),{addAbortSignal:l}=Sq(),{getHighWaterMark:D,getDefaultHighWaterMark:p}=JQ(),{ERR_INVALID_ARG_TYPE:E,ERR_METHOD_NOT_IMPLEMENTED:I,ERR_MULTIPLE_CALLBACK:Z,ERR_STREAM_CANNOT_PIPE:U,ERR_STREAM_DESTROYED:T,ERR_STREAM_ALREADY_FINISHED:_,ERR_STREAM_NULL_VALUES:t,ERR_STREAM_WRITE_AFTER_END:i,ERR_UNKNOWN_ENCODING:$}=Wq().codes,{errorOrDestroy:n}=O;function Y(Q={}){const H=this instanceof Mq();if(!H&&!y(Y,this))return new Y(Q);if(this._writableState=new m(Q,this,H),Q){if(typeof Q.write==="function")this._write=Q.write;if(typeof Q.writev==="function")this._writev=Q.writev;if(typeof Q.destroy==="function")this._destroy=Q.destroy;if(typeof Q.final==="function")this._final=Q.final;if(typeof Q.construct==="function")this._construct=Q.construct;if(Q.signal)l(Q.signal,this)}c.call(this,Q),O.construct(this,()=>{const L=this._writableState;if(!L.writing)s(this,L);qq(this,L)})}R(Y.prototype,c.prototype),R(Y,c),j.exports=Y;function K(){}var F=g("kOnFinished");function m(Q,H,L){if(typeof L!=="boolean")L=H instanceof Mq();if(this.objectMode=!!(Q&&Q.objectMode),L)this.objectMode=this.objectMode||!!(Q&&Q.writableObjectMode);this.highWaterMark=Q?D(this,Q,"writableHighWaterMark",L):p(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const d=!!(Q&&Q.decodeStrings===!1);this.decodeStrings=!d,this.defaultEncoding=Q&&Q.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=N.bind(void 0,H),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,u(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!Q||Q.emitClose!==!1,this.autoDestroy=!Q||Q.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[F]=[]}function u(Q){Q.buffered=[],Q.bufferedIndex=0,Q.allBuffers=!0,Q.allNoop=!0}m.prototype.getBuffer=function Q(){return B(this.buffered,this.bufferedIndex)},A(m.prototype,"bufferedRequestCount",{get(){return this.buffered.length-this.bufferedIndex}}),A(Y,k,{value:function(Q){if(y(this,Q))return!0;if(this!==Y)return!1;return Q&&Q._writableState instanceof m}}),Y.prototype.pipe=function(){n(this,new U)};function J(Q,H,L,d){const f=Q._writableState;if(typeof L==="function")d=L,L=f.defaultEncoding;else{if(!L)L=f.defaultEncoding;else if(L!=="buffer"&&!Buffer.isEncoding(L))throw new $(L);if(typeof d!=="function")d=K}if(H===null)throw new t;else if(!f.objectMode)if(typeof H==="string"){if(f.decodeStrings!==!1)H=Buffer.from(H,L),L="buffer"}else if(H instanceof Buffer)L="buffer";else if(c._isUint8Array(H))H=c._uint8ArrayToBuffer(H),L="buffer";else throw new E("chunk",["string","Buffer","Uint8Array"],H);let r;if(f.ending)r=new i;else if(f.destroyed)r=new T("write");if(r)return Xq(d,r),n(Q,r,!0),r;return f.pendingcb++,z(Q,f,H,L,d)}Y.prototype.write=function(Q,H,L){return J(this,Q,H,L)===!0},Y.prototype.cork=function(){this._writableState.corked++},Y.prototype.uncork=function(){const Q=this._writableState;if(Q.corked){if(Q.corked--,!Q.writing)s(this,Q)}},Y.prototype.setDefaultEncoding=function Q(H){if(typeof H==="string")H=P(H);if(!Buffer.isEncoding(H))throw new $(H);return this._writableState.defaultEncoding=H,this};function z(Q,H,L,d,f){const r=H.objectMode?1:L.length;H.length+=r;const q=H.length<H.highWaterMark;if(!q)H.needDrain=!0;if(H.writing||H.corked||H.errored||!H.constructed){if(H.buffered.push({chunk:L,encoding:d,callback:f}),H.allBuffers&&d!=="buffer")H.allBuffers=!1;if(H.allNoop&&f!==K)H.allNoop=!1}else H.writelen=r,H.writecb=f,H.writing=!0,H.sync=!0,Q._write(L,d,H.onwrite),H.sync=!1;return q&&!H.errored&&!H.destroyed}function w(Q,H,L,d,f,r,q){if(H.writelen=d,H.writecb=q,H.writing=!0,H.sync=!0,H.destroyed)H.onwrite(new T("write"));else if(L)Q._writev(f,H.onwrite);else Q._write(f,r,H.onwrite);H.sync=!1}function S(Q,H,L,d){--H.pendingcb,d(L),o(H),n(Q,L)}function N(Q,H){const L=Q._writableState,d=L.sync,f=L.writecb;if(typeof f!=="function"){n(Q,new Z);return}if(L.writing=!1,L.writecb=null,L.length-=L.writelen,L.writelen=0,H){if(Error.captureStackTrace(H),!L.errored)L.errored=H;if(Q._readableState&&!Q._readableState.errored)Q._readableState.errored=H;if(d)Xq(S,Q,L,H,f);else S(Q,L,H,f)}else{if(L.buffered.length>L.bufferedIndex)s(Q,L);if(d)if(L.afterWriteTickInfo!==null&&L.afterWriteTickInfo.cb===f)L.afterWriteTickInfo.count++;else L.afterWriteTickInfo={count:1,cb:f,stream:Q,state:L},Xq(W,L.afterWriteTickInfo);else b(Q,L,1,f)}}function W({stream:Q,state:H,count:L,cb:d}){return H.afterWriteTickInfo=null,b(Q,H,L,d)}function b(Q,H,L,d){if(!H.ending&&!Q.destroyed&&H.length===0&&H.needDrain)H.needDrain=!1,Q.emit("drain");while(L-- >0)H.pendingcb--,d();if(H.destroyed)o(H);qq(Q,H)}function o(Q){if(Q.writing)return;for(let f=Q.bufferedIndex;f<Q.buffered.length;++f){var H;const{chunk:r,callback:q}=Q.buffered[f],X=Q.objectMode?1:r.length;Q.length-=X,q((H=Q.errored)!==null&&H!==void 0?H:new T("write"))}const L=Q[F].splice(0);for(let f=0;f<L.length;f++){var d;L[f]((d=Q.errored)!==null&&d!==void 0?d:new T("end"))}u(Q)}function s(Q,H){if(H.corked||H.bufferProcessing||H.destroyed||!H.constructed)return;const{buffered:L,bufferedIndex:d,objectMode:f}=H,r=L.length-d;if(!r)return;let q=d;if(H.bufferProcessing=!0,r>1&&Q._writev){H.pendingcb-=r-1;const X=H.allNoop?K:(x)=>{for(let v=q;v<L.length;++v)L[v].callback(x)},C=H.allNoop&&q===0?L:B(L,q);C.allBuffers=H.allBuffers,w(Q,H,!0,H.length,C,"",X),u(H)}else{do{const{chunk:X,encoding:C,callback:x}=L[q];L[q++]=null;const v=f?1:X.length;w(Q,H,!1,v,X,C,x)}while(q<L.length&&!H.writing);if(q===L.length)u(H);else if(q>256)L.splice(0,q),H.bufferedIndex=0;else H.bufferedIndex=q}H.bufferProcessing=!1}Y.prototype._write=function(Q,H,L){if(this._writev)this._writev([{chunk:Q,encoding:H}],L);else throw new I("_write()")},Y.prototype._writev=null,Y.prototype.end=function(Q,H,L,d=!1){const f=this._writableState;if(typeof Q==="function")L=Q,Q=null,H=null;else if(typeof H==="function")L=H,H=null;let r;if(Q!==null&&Q!==void 0){let q;if(!d)q=J(this,Q,H);else q=this.write(Q,H);if(q instanceof G)r=q}if(f.corked)f.corked=1,this.uncork();if(r)this.emit("error",r);else if(!f.errored&&!f.ending)f.ending=!0,qq(this,f,!0),f.ended=!0;else if(f.finished)r=new _("end");else if(f.destroyed)r=new T("end");if(typeof L==="function")if(r||f.finished)Xq(L,r);else f[F].push(L);return this};function e(Q,H){var L=Q.ending&&!Q.destroyed&&Q.constructed&&Q.length===0&&!Q.errored&&Q.buffered.length===0&&!Q.finished&&!Q.writing&&!Q.errorEmitted&&!Q.closeEmitted;return Gq("needFinish",L,H),L}function Hq(Q,H){let L=!1;function d(f){if(L){n(Q,f!==null&&f!==void 0?f:Z());return}if(L=!0,H.pendingcb--,f){const r=H[F].splice(0);for(let q=0;q<r.length;q++)r[q](f);n(Q,f,H.sync)}else if(e(H))H.prefinished=!0,Q.emit("prefinish"),H.pendingcb++,Xq(Kq,Q,H)}H.sync=!0,H.pendingcb++;try{Q._final(d)}catch(f){d(f)}H.sync=!1}function $q(Q,H){if(!H.prefinished&&!H.finalCalled)if(typeof Q._final==="function"&&!H.destroyed)H.finalCalled=!0,Hq(Q,H);else H.prefinished=!0,Q.emit("prefinish")}function qq(Q,H,L){if(!e(H,Q.__id))return;if($q(Q,H),H.pendingcb===0){if(L)H.pendingcb++,Xq((d,f)=>{if(e(f))Kq(d,f);else f.pendingcb--},Q,H);else if(e(H))H.pendingcb++,Kq(Q,H)}}function Kq(Q,H){H.pendingcb--,H.finished=!0;const L=H[F].splice(0);for(let d=0;d<L.length;d++)L[d]();if(Q.emit("finish"),H.autoDestroy){const d=Q._readableState;if(!d||d.autoDestroy&&(d.endEmitted||d.readable===!1))Q.destroy()}}M(Y.prototype,{closed:{get(){return this._writableState?this._writableState.closed:!1}},destroyed:{get(){return this._writableState?this._writableState.destroyed:!1},set(Q){if(this._writableState)this._writableState.destroyed=Q}},writable:{get(){const Q=this._writableState;return!!Q&&Q.writable!==!1&&!Q.destroyed&&!Q.errored&&!Q.ending&&!Q.ended},set(Q){if(this._writableState)this._writableState.writable=!!Q}},writableFinished:{get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{get(){const Q=this._writableState;if(!Q)return!1;return!Q.destroyed&&!Q.ending&&Q.needDrain}},writableHighWaterMark:{get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{get(){return this._writableState?this._writableState.corked:0}},writableLength:{get(){return this._writableState&&this._writableState.length}},errored:{enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var Qq=O.destroy;Y.prototype.destroy=function(Q,H){const L=this._writableState;if(!L.destroyed&&(L.bufferedIndex<L.buffered.length||L[F].length))Xq(o,L);return Qq.call(this,Q,H),this},Y.prototype._undestroy=O.undestroy,Y.prototype._destroy=function(Q,H){H(Q)},Y.prototype[Iq.captureRejectionSymbol]=function(Q){this.destroy(Q)};var V;function h(){if(V===void 0)V={};return V}Y.fromWeb=function(Q,H){return h().newStreamWritableFromWritableStream(Q,H)},Y.toWeb=function(Q){return h().newWritableStreamFromStreamWritable(Q)}}}),HQ=Bq({"node_modules/readable-stream/lib/internal/streams/duplexify.js"(a,j){var{isReadable:B,isWritable:G,isIterable:y,isNodeStream:A,isReadableNodeStream:M,isWritableNodeStream:R,isDuplexNodeStream:P}=Eq(),g=Fq(),{AbortError:k,codes:{ERR_INVALID_ARG_TYPE:c,ERR_INVALID_RETURN_VALUE:O}}=Wq(),{destroyer:l}=Tq(),D=Mq(),p=_q(),{createDeferredPromise:E}=Aq(),I=hq(),Z=typeof Blob!=="undefined"?function i($){return $ instanceof Blob}:function i($){return!1},{FunctionPrototypeCall:U}=Vq();class T extends D{constructor(i){super(i);if((i===null||i===void 0?void 0:i.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((i===null||i===void 0?void 0:i.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}j.exports=function i($,n){if(P($))return $;if(M($))return t({readable:$});if(R($))return t({writable:$});if(A($))return t({writable:!1,readable:!1});if(typeof $==="function"){const{value:K,write:F,final:m,destroy:u}=_($);if(y(K))return I(T,K,{objectMode:!0,write:F,final:m,destroy:u});const J=K===null||K===void 0?void 0:K.then;if(typeof J==="function"){let z;const w=U(J,K,(S)=>{if(S!=null)throw new O("nully","body",S)},(S)=>{l(z,S)});return z=new T({objectMode:!0,readable:!1,write:F,final(S){m(async()=>{try{await w,Xq(S,null)}catch(N){Xq(S,N)}})},destroy:u})}throw new O("Iterable, AsyncIterable or AsyncFunction",n,K)}if(Z($))return i($.arrayBuffer());if(y($))return I(T,$,{objectMode:!0,writable:!1});if(typeof($===null||$===void 0?void 0:$.writable)==="object"||typeof($===null||$===void 0?void 0:$.readable)==="object"){const K=$!==null&&$!==void 0&&$.readable?M($===null||$===void 0?void 0:$.readable)?$===null||$===void 0?void 0:$.readable:i($.readable):void 0,F=$!==null&&$!==void 0&&$.writable?R($===null||$===void 0?void 0:$.writable)?$===null||$===void 0?void 0:$.writable:i($.writable):void 0;return t({readable:K,writable:F})}const Y=$===null||$===void 0?void 0:$.then;if(typeof Y==="function"){let K;return U(Y,$,(F)=>{if(F!=null)K.push(F);K.push(null)},(F)=>{l(K,F)}),K=new T({objectMode:!0,writable:!1,read(){}})}throw new c(n,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],$)};function _(i){let{promise:$,resolve:n}=E();const Y=new AbortController,K=Y.signal;return{value:i(async function*(){while(!0){const m=$;$=null;const{chunk:u,done:J,cb:z}=await m;if(Xq(z),J)return;if(K.aborted)throw new k(void 0,{cause:K.reason});({promise:$,resolve:n}=E()),yield u}}(),{signal:K}),write(m,u,J){const z=n;n=null,z({chunk:m,done:!1,cb:J})},final(m){const u=n;n=null,u({done:!0,cb:m})},destroy(m,u){Y.abort(),u(m)}}}function t(i){const $=i.readable&&typeof i.readable.read!=="function"?p.wrap(i.readable):i.readable,n=i.writable;let Y=!!B($),K=!!G(n),F,m,u,J,z;function w(S){const N=J;if(J=null,N)N(S);else if(S)z.destroy(S);else if(!Y&&!K)z.destroy()}if(z=new T({readableObjectMode:!!($!==null&&$!==void 0&&$.readableObjectMode),writableObjectMode:!!(n!==null&&n!==void 0&&n.writableObjectMode),readable:Y,writable:K}),K)g(n,(S)=>{if(K=!1,S)l($,S);w(S)}),z._write=function(S,N,W){if(n.write(S,N))W();else F=W},z._final=function(S){n.end(),m=S},n.on("drain",function(){if(F){const S=F;F=null,S()}}),n.on("finish",function(){if(m){const S=m;m=null,S()}});if(Y)g($,(S)=>{if(Y=!1,S)l($,S);w(S)}),$.on("readable",function(){if(u){const S=u;u=null,S()}}),$.on("end",function(){z.push(null)}),z._read=function(){while(!0){const S=$.read();if(S===null){u=z._read;return}if(!z.push(S))return}};return z._destroy=function(S,N){if(!S&&J!==null)S=new k;if(u=null,F=null,m=null,J===null)N(S);else J=N,l(n,S),l($,S)},z}}}),Mq=Bq({"node_modules/readable-stream/lib/internal/streams/duplex.js"(a,j){var{ObjectDefineProperties:B,ObjectGetOwnPropertyDescriptor:G,ObjectKeys:y,ObjectSetPrototypeOf:A}=Vq(),M=_q();function R(O){if(!(this instanceof R))return new R(O);if(M.call(this,O),Uq.call(this,O),O){if(this.allowHalfOpen=O.allowHalfOpen!==!1,O.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(O.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}j.exports=R,A(R.prototype,M.prototype),A(R,M);for(var P in Uq.prototype)if(!R.prototype[P])R.prototype[P]=Uq.prototype[P];B(R.prototype,{writable:G(Uq.prototype,"writable"),writableHighWaterMark:G(Uq.prototype,"writableHighWaterMark"),writableObjectMode:G(Uq.prototype,"writableObjectMode"),writableBuffer:G(Uq.prototype,"writableBuffer"),writableLength:G(Uq.prototype,"writableLength"),writableFinished:G(Uq.prototype,"writableFinished"),writableCorked:G(Uq.prototype,"writableCorked"),writableEnded:G(Uq.prototype,"writableEnded"),writableNeedDrain:G(Uq.prototype,"writableNeedDrain"),destroyed:{get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(O){if(this._readableState&&this._writableState)this._readableState.destroyed=O,this._writableState.destroyed=O}}});var g;function k(){if(g===void 0)g={};return g}R.fromWeb=function(O,l){return k().newStreamDuplexFromReadableWritablePair(O,l)},R.toWeb=function(O){return k().newReadableWritablePairFromDuplex(O)};var c;R.from=function(O){if(!c)c=HQ();return c(O,"body")}}}),mq=Bq({"node_modules/readable-stream/lib/internal/streams/transform.js"(a,j){var{ObjectSetPrototypeOf:B,Symbol:G}=Vq(),{ERR_METHOD_NOT_IMPLEMENTED:y}=Wq().codes,A=Mq();function M(k){if(!(this instanceof M))return new M(k);if(A.call(this,k),this._readableState.sync=!1,this[R]=null,k){if(typeof k.transform==="function")this._transform=k.transform;if(typeof k.flush==="function")this._flush=k.flush}this.on("prefinish",g.bind(this))}B(M.prototype,A.prototype),B(M,A),j.exports=M;var R=G("kCallback");function P(k){if(typeof this._flush==="function"&&!this.destroyed)this._flush((c,O)=>{if(c){if(k)k(c);else this.destroy(c);return}if(O!=null)this.push(O);if(this.push(null),k)k()});else if(this.push(null),k)k()}function g(){if(this._final!==P)P.call(this)}M.prototype._final=P,M.prototype._transform=function(k,c,O){throw new y("_transform()")},M.prototype._write=function(k,c,O){const l=this._readableState,D=this._writableState,p=l.length;this._transform(k,c,(E,I)=>{if(E){O(E);return}if(I!=null)this.push(I);if(D.ended||p===l.length||l.length<l.highWaterMark||l.highWaterMark===0||l.length===0)O();else this[R]=O})},M.prototype._read=function(){if(this[R]){const k=this[R];this[R]=null,k()}}}}),cq=Bq({"node_modules/readable-stream/lib/internal/streams/passthrough.js"(a,j){var{ObjectSetPrototypeOf:B}=Vq(),G=mq();function y(A){if(!(this instanceof y))return new y(A);G.call(this,A)}B(y.prototype,G.prototype),B(y,G),y.prototype._transform=function(A,M,R){R(null,A)},j.exports=y}}),gq=Bq({"node_modules/readable-stream/lib/internal/streams/pipeline.js"(a,j){var{ArrayIsArray:B,Promise:G,SymbolAsyncIterator:y}=Vq(),A=Fq(),{once:M}=Aq(),R=Tq(),P=Mq(),{aggregateTwoErrors:g,codes:{ERR_INVALID_ARG_TYPE:k,ERR_INVALID_RETURN_VALUE:c,ERR_MISSING_ARGS:O,ERR_STREAM_DESTROYED:l},AbortError:D}=Wq(),{validateFunction:p,validateAbortSignal:E}=Cq(),{isIterable:I,isReadable:Z,isReadableNodeStream:U,isNodeStream:T}=Eq(),_,t;function i(J,z,w){let S=!1;J.on("close",()=>{S=!0});const N=A(J,{readable:z,writable:w},(W)=>{S=!W});return{destroy:(W)=>{if(S)return;S=!0,R.destroyer(J,W||new l("pipe"))},cleanup:N}}function $(J){return p(J[J.length-1],"streams[stream.length - 1]"),J.pop()}function n(J){if(I(J))return J;else if(U(J))return Y(J);throw new k("val",["Readable","Iterable","AsyncIterable"],J)}async function*Y(J){if(!t)t=_q();yield*t.prototype[y].call(J)}async function K(J,z,w,{end:S}){let N,W=null;const b=(e)=>{if(e)N=e;if(W){const Hq=W;W=null,Hq()}},o=()=>new G((e,Hq)=>{if(N)Hq(N);else W=()=>{if(N)Hq(N);else e()}});z.on("drain",b);const s=A(z,{readable:!1},b);try{if(z.writableNeedDrain)await o();for await(let e of J)if(!z.write(e))await o();if(S)z.end();await o(),w()}catch(e){w(N!==e?g(N,e):e)}finally{s(),z.off("drain",b)}}function F(...J){return m(J,M($(J)))}function m(J,z,w){if(J.length===1&&B(J[0]))J=J[0];if(J.length<2)throw new O("streams");const S=new AbortController,N=S.signal,W=w===null||w===void 0?void 0:w.signal,b=[];E(W,"options.signal");function o(){Kq(new D)}W===null||W===void 0||W.addEventListener("abort",o);let s,e;const Hq=[];let $q=0;function qq(h){Kq(h,--$q===0)}function Kq(h,Q){if(h&&(!s||s.code==="ERR_STREAM_PREMATURE_CLOSE"))s=h;if(!s&&!Q)return;while(Hq.length)Hq.shift()(s);if(W===null||W===void 0||W.removeEventListener("abort",o),S.abort(),Q){if(!s)b.forEach((H)=>H());Xq(z,s,e)}}let Qq;for(let h=0;h<J.length;h++){const Q=J[h],H=h<J.length-1,L=h>0,d=H||(w===null||w===void 0?void 0:w.end)!==!1,f=h===J.length-1;if(T(Q)){let r=function(q){if(q&&q.name!=="AbortError"&&q.code!=="ERR_STREAM_PREMATURE_CLOSE")qq(q)};if(d){const{destroy:q,cleanup:X}=i(Q,H,L);if(Hq.push(q),Z(Q)&&f)b.push(X)}if(Q.on("error",r),Z(Q)&&f)b.push(()=>{Q.removeListener("error",r)})}if(h===0)if(typeof Q==="function"){if(Qq=Q({signal:N}),!I(Qq))throw new c("Iterable, AsyncIterable or Stream","source",Qq)}else if(I(Q)||U(Q))Qq=Q;else Qq=P.from(Q);else if(typeof Q==="function")if(Qq=n(Qq),Qq=Q(Qq,{signal:N}),H){if(!I(Qq,!0))throw new c("AsyncIterable",`transform[${h-1}]`,Qq)}else{var V;if(!_)_=cq();const r=new _({objectMode:!0}),q=(V=Qq)===null||V===void 0?void 0:V.then;if(typeof q==="function")$q++,q.call(Qq,(x)=>{if(e=x,x!=null)r.write(x);if(d)r.end();Xq(qq)},(x)=>{r.destroy(x),Xq(qq,x)});else if(I(Qq,!0))$q++,K(Qq,r,qq,{end:d});else throw new c("AsyncIterable or Promise","destination",Qq);Qq=r;const{destroy:X,cleanup:C}=i(Qq,!1,!0);if(Hq.push(X),f)b.push(C)}else if(T(Q)){if(U(Qq)){$q+=2;const r=u(Qq,Q,qq,{end:d});if(Z(Q)&&f)b.push(r)}else if(I(Qq))$q++,K(Qq,Q,qq,{end:d});else throw new k("val",["Readable","Iterable","AsyncIterable"],Qq);Qq=Q}else Qq=P.from(Q)}if(N!==null&&N!==void 0&&N.aborted||W!==null&&W!==void 0&&W.aborted)Xq(o);return Qq}function u(J,z,w,{end:S}){if(J.pipe(z,{end:S}),S)J.once("end",()=>z.end());else w();return A(J,{readable:!0,writable:!1},(N)=>{const W=J._readableState;if(N&&N.code==="ERR_STREAM_PREMATURE_CLOSE"&&W&&W.ended&&!W.errored&&!W.errorEmitted)J.once("end",w).once("error",w);else w(N)}),A(z,{readable:!1,writable:!0},w)}j.exports={pipelineImpl:m,pipeline:F}}}),KQ=Bq({"node_modules/readable-stream/lib/internal/streams/compose.js"(a,j){var{pipeline:B}=gq(),G=Mq(),{destroyer:y}=Tq(),{isNodeStream:A,isReadable:M,isWritable:R}=Eq(),{AbortError:P,codes:{ERR_INVALID_ARG_VALUE:g,ERR_MISSING_ARGS:k}}=Wq();j.exports=function c(...O){if(O.length===0)throw new k("streams");if(O.length===1)return G.from(O[0]);const l=[...O];if(typeof O[0]==="function")O[0]=G.from(O[0]);if(typeof O[O.length-1]==="function"){const $=O.length-1;O[$]=G.from(O[$])}for(let $=0;$<O.length;++$){if(!A(O[$]))continue;if($<O.length-1&&!M(O[$]))throw new g(`streams[${$}]`,l[$],"must be readable");if($>0&&!R(O[$]))throw new g(`streams[${$}]`,l[$],"must be writable")}let D,p,E,I,Z;function U($){const n=I;if(I=null,n)n($);else if($)Z.destroy($);else if(!i&&!t)Z.destroy()}const T=O[0],_=B(O,U),t=!!R(T),i=!!M(_);if(Z=new G({writableObjectMode:!!(T!==null&&T!==void 0&&T.writableObjectMode),readableObjectMode:!!(_!==null&&_!==void 0&&_.writableObjectMode),writable:t,readable:i}),t)Z._write=function($,n,Y){if(T.write($,n))Y();else D=Y},Z._final=function($){T.end(),p=$},T.on("drain",function(){if(D){const $=D;D=null,$()}}),_.on("finish",function(){if(p){const $=p;p=null,$()}});if(i)_.on("readable",function(){if(E){const $=E;E=null,$()}}),_.on("end",function(){Z.push(null)}),Z._read=function(){while(!0){const $=_.read();if($===null){E=Z._read;return}if(!Z.push($))return}};return Z._destroy=function($,n){if(!$&&I!==null)$=new P;if(E=null,D=null,p=null,I===null)n($);else I=n,y(_,$)},Z}}}),dq=Bq({"node_modules/readable-stream/lib/stream/promises.js"(a,j){var{ArrayPrototypePop:B,Promise:G}=Vq(),{isIterable:y,isNodeStream:A}=Eq(),{pipelineImpl:M}=gq(),{finished:R}=Fq();function P(...g){return new G((k,c)=>{let O,l;const D=g[g.length-1];if(D&&typeof D==="object"&&!A(D)&&!y(D)){const p=B(g);O=p.signal,l=p.end}M(g,(p,E)=>{if(p)c(p);else k(E)},{signal:O,end:l})})}j.exports={finished:R,pipeline:P}}}),ZQ=Bq({"node_modules/readable-stream/lib/stream.js"(a,j){var{ObjectDefineProperty:B,ObjectKeys:G,ReflectApply:y}=Vq(),{promisify:{custom:A}}=Aq(),{streamReturningOperators:M,promiseReturningOperators:R}=XQ(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:P}}=Wq(),g=KQ(),{pipeline:k}=gq(),{destroyer:c}=Tq(),O=Fq(),l=dq(),D=Eq(),p=j.exports=Rq().Stream;p.isDisturbed=D.isDisturbed,p.isErrored=D.isErrored,p.isWritable=D.isWritable,p.isReadable=D.isReadable,p.Readable=_q();for(let I of G(M)){let Z=function(...T){if(new.target)throw P();return p.Readable.from(y(U,this,T))};const U=M[I];B(Z,"name",{value:U.name}),B(Z,"length",{value:U.length}),B(p.Readable.prototype,I,{value:Z,enumerable:!1,configurable:!0,writable:!0})}for(let I of G(R)){let Z=function(...T){if(new.target)throw P();return y(U,this,T)};const U=R[I];B(Z,"name",{value:U.name}),B(Z,"length",{value:U.length}),B(p.Readable.prototype,I,{value:Z,enumerable:!1,configurable:!0,writable:!0})}p.Writable=bq(),p.Duplex=Mq(),p.Transform=mq(),p.PassThrough=cq(),p.pipeline=k;var{addAbortSignal:E}=Sq();p.addAbortSignal=E,p.finished=O,p.destroy=c,p.compose=g,B(p,"promises",{configurable:!0,enumerable:!0,get(){return l}}),B(k,A,{enumerable:!0,get(){return l.pipeline}}),B(O,A,{enumerable:!0,get(){return l.finished}}),p.Stream=p,p._isUint8Array=function I(Z){return Z instanceof Uint8Array},p._uint8ArrayToBuffer=function I(Z){return new Buffer(Z.buffer,Z.byteOffset,Z.byteLength)}}}),BQ=Bq({"node_modules/readable-stream/lib/ours/index.js"(a,j){const B=ZQ(),G=dq(),y=B.Readable.destroy;j.exports=B,j.exports._uint8ArrayToBuffer=B._uint8ArrayToBuffer,j.exports._isUint8Array=B._isUint8Array,j.exports.isDisturbed=B.isDisturbed,j.exports.isErrored=B.isErrored,j.exports.isWritable=B.isWritable,j.exports.isReadable=B.isReadable,j.exports.Readable=B.Readable,j.exports.Writable=B.Writable,j.exports.Duplex=B.Duplex,j.exports.Transform=B.Transform,j.exports.PassThrough=B.PassThrough,j.exports.addAbortSignal=B.addAbortSignal,j.exports.finished=B.finished,j.exports.destroy=B.destroy,j.exports.destroy=y,j.exports.pipeline=B.pipeline,j.exports.compose=B.compose,j.exports._getNativeReadableStreamPrototype=lq,j.exports.NativeWritable=iq,zq.defineProperty(B,"promises",{configurable:!0,enumerable:!0,get(){return G}}),j.exports.Stream=B.Stream,j.exports.default=j.exports}}),$Q={0:void 0,1:void 0,2:void 0,3:void 0,4:void 0,5:void 0},Uq=bq(),iq=class a extends Uq{#q;#Q;#X=!0;_construct;_destroy;_final;constructor(j,B={}){super(B);this._construct=this.#H,this._destroy=this.#K,this._final=this.#Z,this.#q=j}#H(j){this._writableState.constructed=!0,this.constructed=!0,j()}#J(){if(typeof this.#q==="object")if(typeof this.#q.write==="function")this.#Q=this.#q;else throw new Error("Invalid FileSink");else this.#Q=Bun.file(this.#q).writer()}write(j,B,G,y=this.#X){if(!y)return this.#X=!1,super.write(j,B,G);if(!this.#Q)this.#J();var A=this.#Q,M=A.write(j);if(xq(M))return M.then(()=>{this.emit("drain"),A.flush(!0)}),!1;if(A.flush(!0),G)G(null,j.byteLength);return!0}end(j,B,G,y=this.#X){return super.end(j,B,G,y)}#K(j,B){if(this._writableState.destroyed=!0,B)B(j)}#Z(j){if(this.#Q)this.#Q.end();if(j)j()}ref(){if(!this.#Q)this.#J();this.#Q.ref()}unref(){if(!this.#Q)return;this.#Q.unref()}},Yq=BQ();Yq[Symbol.for("CommonJS")]=0;Yq[Symbol.for("::bunternal::")]={_ReadableFromWeb:pq,_ReadableFromWebForUndici:uq};var cQ=Yq,EQ=Yq._uint8ArrayToBuffer,IQ=Yq._isUint8Array,TQ=Yq.isDisturbed,PQ=Yq.isErrored,xQ=Yq.isWritable,OQ=Yq.isReadable,CQ=Yq.Readable,Uq=Yq.Writable,_Q=Yq.Duplex,DQ=Yq.Transform,wQ=Yq.PassThrough,vQ=Yq.addAbortSignal,RQ=Yq.finished,SQ=Yq.destroy,gQ=Yq.pipeline,kQ=Yq.compose,VQ=Yq.Stream,fQ=Yq.eos=Fq,yQ=Yq._getNativeReadableStreamPrototype,iq=Yq.NativeWritable,hQ=VQ.promises;export{hQ as promises,gQ as pipeline,xQ as isWritable,OQ as isReadable,PQ as isErrored,TQ as isDisturbed,RQ as finished,fQ as eos,SQ as destroy,cQ as default,kQ as compose,vQ as addAbortSignal,EQ as _uint8ArrayToBuffer,IQ as _isUint8Array,yQ as _getNativeReadableStreamPrototype,Uq as Writable,DQ as Transform,VQ as Stream,CQ as Readable,wQ as PassThrough,iq as NativeWritable,_Q as Duplex}; +import{EventEmitter as Iq} from"bun:events_native";import{StringDecoder as aq} from"node:string_decoder";var tq=function(a){return typeof a==="object"&&a!==null&&a instanceof ReadableStream},eq=function(a,j){if(typeof a!=="boolean")throw new qQ(j,"boolean",a)};var qQ=function(a,j,B){return new Error(`The argument '${a}' is invalid. Received '${B}' for type '${j}'`)},QQ=function(a,j,B){return new Error(`The value '${j}' is invalid for argument '${a}'. Reason: ${B}`)},YQ=function(a,j){var[B,G,y,A,M,R,T]=globalThis[Symbol.for("Bun.lazy")](a),g=[!1],k=function(E,P,Z,U){if(P>0){const I=Z.subarray(0,P),_=Z.subarray(P);if(I.byteLength>0)E.push(I);if(U)E.push(null);return _.byteLength>0?_:void 0}if(U)E.push(null);return Z},c=function(E,P,Z,U){if(P.byteLength>0)E.push(P);if(U)E.push(null);return Z},O=process.env.BUN_DISABLE_DYNAMIC_CHUNK_SIZE!=="1";const l=new FinalizationRegistry((E)=>E&&M(E)),D=512;var p=class E extends j{#q;#Q=1;#X=!1;#H=void 0;#J;#K=!1;#Z=!O;#B;constructor(P,Z={}){super(Z);if(typeof Z.highWaterMark==="number")this.#J=Z.highWaterMark;else this.#J=262144;this.#q=P,this.#X=!1,this.#H=void 0,this.#K=!1,this.#B={},l.register(this,this.#q,this.#B)}_read(P){if(this.#K)return;var Z=this.#q;if(Z===0){this.push(null);return}if(!this.#X)this.#$(Z);return this.#V(this.#z(P),Z)}#$(P){this.#X=!0;const Z=G(P,this.#J);if(typeof Z==="number"&&Z>1)this.#Z=!0,this.#J=Math.min(this.#J,Z);if(T){const U=T(P);if((U?.byteLength??0)>0)this.push(U)}}#z(P=this.#J){var Z=this.#H;if(Z?.byteLength??0<D){var U=P>D?P:D;this.#H=Z=new Buffer(U)}return Z}#Y(P,Z,U){if(typeof P==="number"){if(P>=this.#J&&!this.#Z&&!U)this.#J*=2,this.#Z=!0;return k(this,P,Z,U)}else if(typeof P==="boolean")return process.nextTick(()=>{this.push(null)}),Z?.byteLength??0>0?Z:void 0;else if(ArrayBuffer.isView(P)){if(P.byteLength>=this.#J&&!this.#Z&&!U)this.#J*=2,this.#Z=!0;return c(this,P,Z,U)}else throw new Error("Invalid result from pull")}#V(P,Z){g[0]=!1;var U=B(Z,P,g);if(xq(U))return this.#K=!0,U.then((I)=>{this.#K=!1,this.#H=this.#Y(I,P,g[0])},(I)=>{errorOrDestroy(this,I)});else this.#H=this.#Y(U,P,g[0])}_destroy(P,Z){var U=this.#q;if(U===0){Z(P);return}if(l.unregister(this.#B),this.#q=0,R)R(U,!1);y(U,P),Z(P)}ref(){var P=this.#q;if(P===0)return;if(this.#Q++===0)R(P,!0)}unref(){var P=this.#q;if(P===0)return;if(this.#Q--===1)R(P,!1)}};if(!R)p.prototype.ref=void 0,p.prototype.unref=void 0;return p},lq=function(a,j){return $Q[a]||=YQ(a,j)},zQ=function(a,j,B){if(!(j&&typeof j==="object"&&j instanceof ReadableStream))return;const G=sq(j);if(!G){Gq("no native readable stream");return}const{stream:y,data:A}=G;return new(lq(A,a))(y,B)};var Gq=()=>{},{isPromise:xq,isCallable:oq,direct:sq,Object:zq}=globalThis[Symbol.for("Bun.lazy")]("primordials"),GQ=zq.create,MQ=zq.defineProperty,FQ=zq.getOwnPropertyDescriptor,rq=zq.getOwnPropertyNames,LQ=zq.getPrototypeOf,jQ=zq.prototype.hasOwnProperty,NQ=zq.setPrototypeOf,Bq=(a,j)=>function B(){return j||(0,a[rq(a)[0]])((j={exports:{}}).exports,j),j.exports};var Xq=process.nextTick;var AQ=Array.isArray,Vq=Bq({"node_modules/readable-stream/lib/ours/primordials.js"(a,j){j.exports={ArrayIsArray(B){return Array.isArray(B)},ArrayPrototypeIncludes(B,G){return B.includes(G)},ArrayPrototypeIndexOf(B,G){return B.indexOf(G)},ArrayPrototypeJoin(B,G){return B.join(G)},ArrayPrototypeMap(B,G){return B.map(G)},ArrayPrototypePop(B,G){return B.pop(G)},ArrayPrototypePush(B,G){return B.push(G)},ArrayPrototypeSlice(B,G,y){return B.slice(G,y)},Error,FunctionPrototypeCall(B,G,...y){return B.call(G,...y)},FunctionPrototypeSymbolHasInstance(B,G){return Function.prototype[Symbol.hasInstance].call(B,G)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(B,G){return zq.defineProperties(B,G)},ObjectDefineProperty(B,G,y){return zq.defineProperty(B,G,y)},ObjectGetOwnPropertyDescriptor(B,G){return zq.getOwnPropertyDescriptor(B,G)},ObjectKeys(B){return zq.keys(B)},ObjectSetPrototypeOf(B,G){return zq.setPrototypeOf(B,G)},Promise,PromisePrototypeCatch(B,G){return B.catch(G)},PromisePrototypeThen(B,G,y){return B.then(G,y)},PromiseReject(B){return Promise.reject(B)},ReflectApply:Reflect.apply,RegExpPrototypeTest(B,G){return B.test(G)},SafeSet:Set,String,StringPrototypeSlice(B,G,y){return B.slice(G,y)},StringPrototypeToLowerCase(B){return B.toLowerCase()},StringPrototypeToUpperCase(B){return B.toUpperCase()},StringPrototypeTrim(B){return B.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(B,G,y){return B.set(G,y)},Uint8Array}}}),Aq=Bq({"node_modules/readable-stream/lib/ours/util.js"(a,j){var B=zq.getPrototypeOf(async function(){}).constructor,G=typeof Blob!=="undefined"?function A(M){return M instanceof Blob}:function A(M){return!1},y=class extends Error{constructor(A){if(!Array.isArray(A))throw new TypeError(`Expected input to be an Array, got ${typeof A}`);let M="";for(let R=0;R<A.length;R++)M+=` ${A[R].stack} +`;super(M);this.name="AggregateError",this.errors=A}};j.exports={AggregateError:y,once(A){let M=!1;return function(...R){if(M)return;M=!0,A.apply(this,R)}},createDeferredPromise:function(){let A,M;return{promise:new Promise((T,g)=>{A=T,M=g}),resolve:A,reject:M}},promisify(A){return new Promise((M,R)=>{A((T,...g)=>{if(T)return R(T);return M(...g)})})},debuglog(){return function(){}},format(A,...M){return A.replace(/%([sdifj])/g,function(...[R,T]){const g=M.shift();if(T==="f")return g.toFixed(6);else if(T==="j")return JSON.stringify(g);else if(T==="s"&&typeof g==="object")return`${g.constructor!==zq?g.constructor.name:""} {}`.trim();else return g.toString()})},inspect(A){switch(typeof A){case"string":if(A.includes("'")){if(!A.includes('"'))return`"${A}"`;else if(!A.includes("`")&&!A.includes("${"))return`\`${A}\``}return`'${A}'`;case"number":if(isNaN(A))return"NaN";else if(zq.is(A,-0))return String(A);return A;case"bigint":return`${String(A)}n`;case"boolean":case"undefined":return String(A);case"object":return"{}"}},types:{isAsyncFunction(A){return A instanceof B},isArrayBufferView(A){return ArrayBuffer.isView(A)}},isBlob:G},j.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}}),Wq=Bq({"node_modules/readable-stream/lib/ours/errors.js"(a,j){var{format:B,inspect:G,AggregateError:y}=Aq(),A=globalThis.AggregateError||y,M=Symbol("kIsNodeError"),R=["string","function","number","object","Function","Object","boolean","bigint","symbol"],T=/^([A-Z][a-z0-9]*)+$/,g="__node_internal_",k={};function c(Z,U){if(!Z)throw new k.ERR_INTERNAL_ASSERTION(U)}function O(Z){let U="",I=Z.length;const _=Z[0]==="-"?1:0;for(;I>=_+4;I-=3)U=`_${Z.slice(I-3,I)}${U}`;return`${Z.slice(0,I)}${U}`}function l(Z,U,I){if(typeof U==="function")return c(U.length<=I.length,`Code: ${Z}; The provided arguments length (${I.length}) does not match the required ones (${U.length}).`),U(...I);const _=(U.match(/%[dfijoOs]/g)||[]).length;if(c(_===I.length,`Code: ${Z}; The provided arguments length (${I.length}) does not match the required ones (${_}).`),I.length===0)return U;return B(U,...I)}function D(Z,U,I){if(!I)I=Error;class _ extends I{constructor(...t){super(l(Z,U,t))}toString(){return`${this.name} [${Z}]: ${this.message}`}}zq.defineProperties(_.prototype,{name:{value:I.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${Z}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),_.prototype.code=Z,_.prototype[M]=!0,k[Z]=_}function p(Z){const U=g+Z.name;return zq.defineProperty(Z,"name",{value:U}),Z}function E(Z,U){if(Z&&U&&Z!==U){if(Array.isArray(U.errors))return U.errors.push(Z),U;const I=new A([U,Z],U.message);return I.code=U.code,I}return Z||U}var P=class extends Error{constructor(Z="The operation was aborted",U=void 0){if(U!==void 0&&typeof U!=="object")throw new k.ERR_INVALID_ARG_TYPE("options","Object",U);super(Z,U);this.code="ABORT_ERR",this.name="AbortError"}};D("ERR_ASSERTION","%s",Error),D("ERR_INVALID_ARG_TYPE",(Z,U,I)=>{if(c(typeof Z==="string","'name' must be a string"),!Array.isArray(U))U=[U];let _="The ";if(Z.endsWith(" argument"))_+=`${Z} `;else _+=`"${Z}" ${Z.includes(".")?"property":"argument"} `;_+="must be ";const t=[],i=[],$=[];for(let Y of U)if(c(typeof Y==="string","All expected entries have to be of type string"),R.includes(Y))t.push(Y.toLowerCase());else if(T.test(Y))i.push(Y);else c(Y!=="object",'The value "object" should be written as "Object"'),$.push(Y);if(i.length>0){const Y=t.indexOf("object");if(Y!==-1)t.splice(t,Y,1),i.push("Object")}if(t.length>0){switch(t.length){case 1:_+=`of type ${t[0]}`;break;case 2:_+=`one of type ${t[0]} or ${t[1]}`;break;default:{const Y=t.pop();_+=`one of type ${t.join(", ")}, or ${Y}`}}if(i.length>0||$.length>0)_+=" or "}if(i.length>0){switch(i.length){case 1:_+=`an instance of ${i[0]}`;break;case 2:_+=`an instance of ${i[0]} or ${i[1]}`;break;default:{const Y=i.pop();_+=`an instance of ${i.join(", ")}, or ${Y}`}}if($.length>0)_+=" or "}switch($.length){case 0:break;case 1:if($[0].toLowerCase()!==$[0])_+="an ";_+=`${$[0]}`;break;case 2:_+=`one of ${$[0]} or ${$[1]}`;break;default:{const Y=$.pop();_+=`one of ${$.join(", ")}, or ${Y}`}}if(I==null)_+=`. Received ${I}`;else if(typeof I==="function"&&I.name)_+=`. Received function ${I.name}`;else if(typeof I==="object"){var n;if((n=I.constructor)!==null&&n!==void 0&&n.name)_+=`. Received an instance of ${I.constructor.name}`;else{const Y=G(I,{depth:-1});_+=`. Received ${Y}`}}else{let Y=G(I,{colors:!1});if(Y.length>25)Y=`${Y.slice(0,25)}...`;_+=`. Received type ${typeof I} (${Y})`}return _},TypeError),D("ERR_INVALID_ARG_VALUE",(Z,U,I="is invalid")=>{let _=G(U);if(_.length>128)_=_.slice(0,128)+"...";return`The ${Z.includes(".")?"property":"argument"} '${Z}' ${I}. Received ${_}`},TypeError),D("ERR_INVALID_RETURN_VALUE",(Z,U,I)=>{var _;const t=I!==null&&I!==void 0&&(_=I.constructor)!==null&&_!==void 0&&_.name?`instance of ${I.constructor.name}`:`type ${typeof I}`;return`Expected ${Z} to be returned from the "${U}" function but got ${t}.`},TypeError),D("ERR_MISSING_ARGS",(...Z)=>{c(Z.length>0,"At least one arg needs to be specified");let U;const I=Z.length;switch(Z=(Array.isArray(Z)?Z:[Z]).map((_)=>`"${_}"`).join(" or "),I){case 1:U+=`The ${Z[0]} argument`;break;case 2:U+=`The ${Z[0]} and ${Z[1]} arguments`;break;default:{const _=Z.pop();U+=`The ${Z.join(", ")}, and ${_} arguments`}break}return`${U} must be specified`},TypeError),D("ERR_OUT_OF_RANGE",(Z,U,I)=>{c(U,'Missing "range" argument');let _;if(Number.isInteger(I)&&Math.abs(I)>4294967296)_=O(String(I));else if(typeof I==="bigint"){if(_=String(I),I>2n**32n||I<-(2n**32n))_=O(_);_+="n"}else _=G(I);return`The value of "${Z}" is out of range. It must be ${U}. Received ${_}`},RangeError),D("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),D("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),D("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),D("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),D("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),D("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),D("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),D("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),D("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),D("ERR_STREAM_WRITE_AFTER_END","write after end",Error),D("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),j.exports={AbortError:P,aggregateTwoErrors:p(E),hideStackFrames:p,codes:k}}}),Cq=Bq({"node_modules/readable-stream/lib/internal/validators.js"(a,j){var{ArrayIsArray:B,ArrayPrototypeIncludes:G,ArrayPrototypeJoin:y,ArrayPrototypeMap:A,NumberIsInteger:M,NumberMAX_SAFE_INTEGER:R,NumberMIN_SAFE_INTEGER:T,NumberParseInt:g,RegExpPrototypeTest:k,String:c,StringPrototypeToUpperCase:O,StringPrototypeTrim:l}=Vq(),{hideStackFrames:D,codes:{ERR_SOCKET_BAD_PORT:p,ERR_INVALID_ARG_TYPE:E,ERR_INVALID_ARG_VALUE:P,ERR_OUT_OF_RANGE:Z,ERR_UNKNOWN_SIGNAL:U}}=Wq(),{normalizeEncoding:I}=Aq(),{isAsyncFunction:_,isArrayBufferView:t}=Aq().types,i={};function $(V){return V===(V|0)}function n(V){return V===V>>>0}var Y=/^[0-7]+$/,K="must be a 32-bit unsigned integer or an octal string";function F(V,h,Q){if(typeof V==="undefined")V=Q;if(typeof V==="string"){if(!k(Y,V))throw new P(h,V,K);V=g(V,8)}return u(V,h,0,4294967295),V}var m=D((V,h,Q=T,H=R)=>{if(typeof V!=="number")throw new E(h,"number",V);if(!M(V))throw new Z(h,"an integer",V);if(V<Q||V>H)throw new Z(h,`>= ${Q} && <= ${H}`,V)}),u=D((V,h,Q=-2147483648,H=2147483647)=>{if(typeof V!=="number")throw new E(h,"number",V);if(!$(V)){if(!M(V))throw new Z(h,"an integer",V);throw new Z(h,`>= ${Q} && <= ${H}`,V)}if(V<Q||V>H)throw new Z(h,`>= ${Q} && <= ${H}`,V)}),J=D((V,h,Q)=>{if(typeof V!=="number")throw new E(h,"number",V);if(!n(V)){if(!M(V))throw new Z(h,"an integer",V);throw new Z(h,`>= ${Q?1:0} && < 4294967296`,V)}if(Q&&V===0)throw new Z(h,">= 1 && < 4294967296",V)});function z(V,h){if(typeof V!=="string")throw new E(h,"string",V)}function w(V,h){if(typeof V!=="number")throw new E(h,"number",V)}var S=D((V,h,Q)=>{if(!G(Q,V)){const L="must be one of: "+y(A(Q,(d)=>typeof d==="string"?`'${d}'`:c(d)),", ");throw new P(h,V,L)}});function N(V,h){if(typeof V!=="boolean")throw new E(h,"boolean",V)}var W=D((V,h,Q)=>{const H=Q==null,L=H?!1:Q.allowArray,d=H?!1:Q.allowFunction;if(!(H?!1:Q.nullable)&&V===null||!L&&B(V)||typeof V!=="object"&&(!d||typeof V!=="function"))throw new E(h,"Object",V)}),b=D((V,h,Q=0)=>{if(!B(V))throw new E(h,"Array",V);if(V.length<Q){const H=`must be longer than ${Q}`;throw new P(h,V,H)}});function o(V,h="signal"){if(z(V,h),i[V]===void 0){if(i[O(V)]!==void 0)throw new U(V+" (signals must use all capital letters)");throw new U(V)}}var s=D((V,h="buffer")=>{if(!t(V))throw new E(h,["Buffer","TypedArray","DataView"],V)});function e(V,h){const Q=I(h),H=V.length;if(Q==="hex"&&H%2!==0)throw new P("encoding",h,`is invalid for data of length ${H}`)}function Hq(V,h="Port",Q=!0){if(typeof V!=="number"&&typeof V!=="string"||typeof V==="string"&&l(V).length===0||+V!==+V>>>0||V>65535||V===0&&!Q)throw new p(h,V,Q);return V|0}var $q=D((V,h)=>{if(V!==void 0&&(V===null||typeof V!=="object"||!("aborted"in V)))throw new E(h,"AbortSignal",V)}),qq=D((V,h)=>{if(typeof V!=="function")throw new E(h,"Function",V)}),Kq=D((V,h)=>{if(typeof V!=="function"||_(V))throw new E(h,"Function",V)}),Qq=D((V,h)=>{if(V!==void 0)throw new E(h,"undefined",V)});j.exports={isInt32:$,isUint32:n,parseFileMode:F,validateArray:b,validateBoolean:N,validateBuffer:s,validateEncoding:e,validateFunction:qq,validateInt32:u,validateInteger:m,validateNumber:w,validateObject:W,validateOneOf:S,validatePlainFunction:Kq,validatePort:Hq,validateSignalName:o,validateString:z,validateUint32:J,validateUndefined:Qq,validateAbortSignal:$q}}}),Eq=Bq({"node_modules/readable-stream/lib/internal/streams/utils.js"(a,j){var{Symbol:B,SymbolAsyncIterator:G,SymbolIterator:y}=Vq(),A=B("kDestroyed"),M=B("kIsErrored"),R=B("kIsReadable"),T=B("kIsDisturbed");function g(J,z=!1){var w;return!!(J&&typeof J.pipe==="function"&&typeof J.on==="function"&&(!z||typeof J.pause==="function"&&typeof J.resume==="function")&&(!J._writableState||((w=J._readableState)===null||w===void 0?void 0:w.readable)!==!1)&&(!J._writableState||J._readableState))}function k(J){var z;return!!(J&&typeof J.write==="function"&&typeof J.on==="function"&&(!J._readableState||((z=J._writableState)===null||z===void 0?void 0:z.writable)!==!1))}function c(J){return!!(J&&typeof J.pipe==="function"&&J._readableState&&typeof J.on==="function"&&typeof J.write==="function")}function O(J){return J&&(J._readableState||J._writableState||typeof J.write==="function"&&typeof J.on==="function"||typeof J.pipe==="function"&&typeof J.on==="function")}function l(J,z){if(J==null)return!1;if(z===!0)return typeof J[G]==="function";if(z===!1)return typeof J[y]==="function";return typeof J[G]==="function"||typeof J[y]==="function"}function D(J){if(!O(J))return null;const{_writableState:z,_readableState:w}=J,S=z||w;return!!(J.destroyed||J[A]||S!==null&&S!==void 0&&S.destroyed)}function p(J){if(!k(J))return null;if(J.writableEnded===!0)return!0;const z=J._writableState;if(z!==null&&z!==void 0&&z.errored)return!1;if(typeof(z===null||z===void 0?void 0:z.ended)!=="boolean")return null;return z.ended}function E(J,z){if(!k(J))return null;if(J.writableFinished===!0)return!0;const w=J._writableState;if(w!==null&&w!==void 0&&w.errored)return!1;if(typeof(w===null||w===void 0?void 0:w.finished)!=="boolean")return null;return!!(w.finished||z===!1&&w.ended===!0&&w.length===0)}function P(J){if(!g(J))return null;if(J.readableEnded===!0)return!0;const z=J._readableState;if(!z||z.errored)return!1;if(typeof(z===null||z===void 0?void 0:z.ended)!=="boolean")return null;return z.ended}function Z(J,z){if(!g(J))return null;const w=J._readableState;if(w!==null&&w!==void 0&&w.errored)return!1;if(typeof(w===null||w===void 0?void 0:w.endEmitted)!=="boolean")return null;return!!(w.endEmitted||z===!1&&w.ended===!0&&w.length===0)}function U(J){if(J&&J[R]!=null)return J[R];if(typeof(J===null||J===void 0?void 0:J.readable)!=="boolean")return null;if(D(J))return!1;return g(J)&&J.readable&&!Z(J)}function I(J){if(typeof(J===null||J===void 0?void 0:J.writable)!=="boolean")return null;if(D(J))return!1;return k(J)&&J.writable&&!p(J)}function _(J,z){if(!O(J))return null;if(D(J))return!0;if((z===null||z===void 0?void 0:z.readable)!==!1&&U(J))return!1;if((z===null||z===void 0?void 0:z.writable)!==!1&&I(J))return!1;return!0}function t(J){var z,w;if(!O(J))return null;if(J.writableErrored)return J.writableErrored;return(z=(w=J._writableState)===null||w===void 0?void 0:w.errored)!==null&&z!==void 0?z:null}function i(J){var z,w;if(!O(J))return null;if(J.readableErrored)return J.readableErrored;return(z=(w=J._readableState)===null||w===void 0?void 0:w.errored)!==null&&z!==void 0?z:null}function $(J){if(!O(J))return null;if(typeof J.closed==="boolean")return J.closed;const{_writableState:z,_readableState:w}=J;if(typeof(z===null||z===void 0?void 0:z.closed)==="boolean"||typeof(w===null||w===void 0?void 0:w.closed)==="boolean")return(z===null||z===void 0?void 0:z.closed)||(w===null||w===void 0?void 0:w.closed);if(typeof J._closed==="boolean"&&n(J))return J._closed;return null}function n(J){return typeof J._closed==="boolean"&&typeof J._defaultKeepAlive==="boolean"&&typeof J._removedConnection==="boolean"&&typeof J._removedContLen==="boolean"}function Y(J){return typeof J._sent100==="boolean"&&n(J)}function K(J){var z;return typeof J._consuming==="boolean"&&typeof J._dumped==="boolean"&&((z=J.req)===null||z===void 0?void 0:z.upgradeOrConnect)===void 0}function F(J){if(!O(J))return null;const{_writableState:z,_readableState:w}=J,S=z||w;return!S&&Y(J)||!!(S&&S.autoDestroy&&S.emitClose&&S.closed===!1)}function m(J){var z;return!!(J&&((z=J[T])!==null&&z!==void 0?z:J.readableDidRead||J.readableAborted))}function u(J){var z,w,S,N,W,b,o,s,e,Hq;return!!(J&&((z=(w=(S=(N=(W=(b=J[M])!==null&&b!==void 0?b:J.readableErrored)!==null&&W!==void 0?W:J.writableErrored)!==null&&N!==void 0?N:(o=J._readableState)===null||o===void 0?void 0:o.errorEmitted)!==null&&S!==void 0?S:(s=J._writableState)===null||s===void 0?void 0:s.errorEmitted)!==null&&w!==void 0?w:(e=J._readableState)===null||e===void 0?void 0:e.errored)!==null&&z!==void 0?z:(Hq=J._writableState)===null||Hq===void 0?void 0:Hq.errored))}j.exports={kDestroyed:A,isDisturbed:m,kIsDisturbed:T,isErrored:u,kIsErrored:M,isReadable:U,kIsReadable:R,isClosed:$,isDestroyed:D,isDuplexNodeStream:c,isFinished:_,isIterable:l,isReadableNodeStream:g,isReadableEnded:P,isReadableFinished:Z,isReadableErrored:i,isNodeStream:O,isWritable:I,isWritableNodeStream:k,isWritableEnded:p,isWritableFinished:E,isWritableErrored:t,isServerRequest:K,isServerResponse:Y,willEmitClose:F}}}),Fq=Bq({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(a,j){var{AbortError:B,codes:G}=Wq(),{ERR_INVALID_ARG_TYPE:y,ERR_STREAM_PREMATURE_CLOSE:A}=G,{once:M}=Aq(),{validateAbortSignal:R,validateFunction:T,validateObject:g}=Cq(),{Promise:k}=Vq(),{isClosed:c,isReadable:O,isReadableNodeStream:l,isReadableFinished:D,isReadableErrored:p,isWritable:E,isWritableNodeStream:P,isWritableFinished:Z,isWritableErrored:U,isNodeStream:I,willEmitClose:_}=Eq();function t(Y){return Y.setHeader&&typeof Y.abort==="function"}var i=()=>{};function $(Y,K,F){var m,u;if(arguments.length===2)F=K,K={};else if(K==null)K={};else g(K,"options");T(F,"callback"),R(K.signal,"options.signal"),F=M(F);const J=(m=K.readable)!==null&&m!==void 0?m:l(Y),z=(u=K.writable)!==null&&u!==void 0?u:P(Y);if(!I(Y))throw new y("stream","Stream",Y);const{_writableState:w,_readableState:S}=Y,N=()=>{if(!Y.writable)o()};let W=_(Y)&&l(Y)===J&&P(Y)===z,b=Z(Y,!1);const o=()=>{if(b=!0,Y.destroyed)W=!1;if(W&&(!Y.readable||J))return;if(!J||s)F.call(Y)};let s=D(Y,!1);const e=()=>{if(s=!0,Y.destroyed)W=!1;if(W&&(!Y.writable||z))return;if(!z||b)F.call(Y)},Hq=(V)=>{F.call(Y,V)};let $q=c(Y);const qq=()=>{$q=!0;const V=U(Y)||p(Y);if(V&&typeof V!=="boolean")return F.call(Y,V);if(J&&!s&&l(Y,!0)){if(!D(Y,!1))return F.call(Y,new A)}if(z&&!b){if(!Z(Y,!1))return F.call(Y,new A)}F.call(Y)},Kq=()=>{Y.req.on("finish",o)};if(t(Y)){if(Y.on("complete",o),!W)Y.on("abort",qq);if(Y.req)Kq();else Y.on("request",Kq)}else if(z&&!w)Y.on("end",N),Y.on("close",N);if(!W&&typeof Y.aborted==="boolean")Y.on("aborted",qq);if(Y.on("end",e),Y.on("finish",o),K.error!==!1)Y.on("error",Hq);if(Y.on("close",qq),$q)Xq(qq);else if(w!==null&&w!==void 0&&w.errorEmitted||S!==null&&S!==void 0&&S.errorEmitted){if(!W)Xq(qq)}else if(!J&&(!W||O(Y))&&(b||E(Y)===!1))Xq(qq);else if(!z&&(!W||E(Y))&&(s||O(Y)===!1))Xq(qq);else if(S&&Y.req&&Y.aborted)Xq(qq);const Qq=()=>{if(F=i,Y.removeListener("aborted",qq),Y.removeListener("complete",o),Y.removeListener("abort",qq),Y.removeListener("request",Kq),Y.req)Y.req.removeListener("finish",o);Y.removeListener("end",N),Y.removeListener("close",N),Y.removeListener("finish",o),Y.removeListener("end",e),Y.removeListener("error",Hq),Y.removeListener("close",qq)};if(K.signal&&!$q){const V=()=>{const h=F;Qq(),h.call(Y,new B(void 0,{cause:K.signal.reason}))};if(K.signal.aborted)Xq(V);else{const h=F;F=M((...Q)=>{K.signal.removeEventListener("abort",V),h.apply(Y,Q)}),K.signal.addEventListener("abort",V)}}return Qq}function n(Y,K){return new k((F,m)=>{$(Y,K,(u)=>{if(u)m(u);else F()})})}j.exports=$,j.exports.finished=n}}),XQ=Bq({"node_modules/readable-stream/lib/internal/streams/operators.js"(a,j){var{codes:{ERR_INVALID_ARG_TYPE:B,ERR_MISSING_ARGS:G,ERR_OUT_OF_RANGE:y},AbortError:A}=Wq(),{validateAbortSignal:M,validateInteger:R,validateObject:T}=Cq(),g=Vq().Symbol("kWeak"),{finished:k}=Fq(),{ArrayPrototypePush:c,MathFloor:O,Number:l,NumberIsNaN:D,Promise:p,PromiseReject:E,PromisePrototypeCatch:P,Symbol:Z}=Vq(),U=Z("kEmpty"),I=Z("kEof");function _(N,W){if(typeof N!=="function")throw new B("fn",["Function","AsyncFunction"],N);if(W!=null)T(W,"options");if((W===null||W===void 0?void 0:W.signal)!=null)M(W.signal,"options.signal");let b=1;if((W===null||W===void 0?void 0:W.concurrency)!=null)b=O(W.concurrency);return R(b,"concurrency",1),async function*o(){var s,e;const Hq=new AbortController,$q=this,qq=[],Kq=Hq.signal,Qq={signal:Kq},V=()=>Hq.abort();if(W!==null&&W!==void 0&&(s=W.signal)!==null&&s!==void 0&&s.aborted)V();W===null||W===void 0||(e=W.signal)===null||e===void 0||e.addEventListener("abort",V);let h,Q,H=!1;function L(){H=!0}async function d(){try{for await(let q of $q){var f;if(H)return;if(Kq.aborted)throw new A;try{q=N(q,Qq)}catch(X){q=E(X)}if(q===U)continue;if(typeof((f=q)===null||f===void 0?void 0:f.catch)==="function")q.catch(L);if(qq.push(q),h)h(),h=null;if(!H&&qq.length&&qq.length>=b)await new p((X)=>{Q=X})}qq.push(I)}catch(q){const X=E(q);P(X,L),qq.push(X)}finally{var r;if(H=!0,h)h(),h=null;W===null||W===void 0||(r=W.signal)===null||r===void 0||r.removeEventListener("abort",V)}}d();try{while(!0){while(qq.length>0){const f=await qq[0];if(f===I)return;if(Kq.aborted)throw new A;if(f!==U)yield f;if(qq.shift(),Q)Q(),Q=null}await new p((f)=>{h=f})}}finally{if(Hq.abort(),H=!0,Q)Q(),Q=null}}.call(this)}function t(N=void 0){if(N!=null)T(N,"options");if((N===null||N===void 0?void 0:N.signal)!=null)M(N.signal,"options.signal");return async function*W(){let b=0;for await(let s of this){var o;if(N!==null&&N!==void 0&&(o=N.signal)!==null&&o!==void 0&&o.aborted)throw new A({cause:N.signal.reason});yield[b++,s]}}.call(this)}async function i(N,W=void 0){for await(let b of K.call(this,N,W))return!0;return!1}async function $(N,W=void 0){if(typeof N!=="function")throw new B("fn",["Function","AsyncFunction"],N);return!await i.call(this,async(...b)=>{return!await N(...b)},W)}async function n(N,W){for await(let b of K.call(this,N,W))return b;return}async function Y(N,W){if(typeof N!=="function")throw new B("fn",["Function","AsyncFunction"],N);async function b(o,s){return await N(o,s),U}for await(let o of _.call(this,b,W));}function K(N,W){if(typeof N!=="function")throw new B("fn",["Function","AsyncFunction"],N);async function b(o,s){if(await N(o,s))return o;return U}return _.call(this,b,W)}var F=class extends G{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}};async function m(N,W,b){var o;if(typeof N!=="function")throw new B("reducer",["Function","AsyncFunction"],N);if(b!=null)T(b,"options");if((b===null||b===void 0?void 0:b.signal)!=null)M(b.signal,"options.signal");let s=arguments.length>1;if(b!==null&&b!==void 0&&(o=b.signal)!==null&&o!==void 0&&o.aborted){const Kq=new A(void 0,{cause:b.signal.reason});throw this.once("error",()=>{}),await k(this.destroy(Kq)),Kq}const e=new AbortController,Hq=e.signal;if(b!==null&&b!==void 0&&b.signal){const Kq={once:!0,[g]:this};b.signal.addEventListener("abort",()=>e.abort(),Kq)}let $q=!1;try{for await(let Kq of this){var qq;if($q=!0,b!==null&&b!==void 0&&(qq=b.signal)!==null&&qq!==void 0&&qq.aborted)throw new A;if(!s)W=Kq,s=!0;else W=await N(W,Kq,{signal:Hq})}if(!$q&&!s)throw new F}finally{e.abort()}return W}async function u(N){if(N!=null)T(N,"options");if((N===null||N===void 0?void 0:N.signal)!=null)M(N.signal,"options.signal");const W=[];for await(let o of this){var b;if(N!==null&&N!==void 0&&(b=N.signal)!==null&&b!==void 0&&b.aborted)throw new A(void 0,{cause:N.signal.reason});c(W,o)}return W}function J(N,W){const b=_.call(this,N,W);return async function*o(){for await(let s of b)yield*s}.call(this)}function z(N){if(N=l(N),D(N))return 0;if(N<0)throw new y("number",">= 0",N);return N}function w(N,W=void 0){if(W!=null)T(W,"options");if((W===null||W===void 0?void 0:W.signal)!=null)M(W.signal,"options.signal");return N=z(N),async function*b(){var o;if(W!==null&&W!==void 0&&(o=W.signal)!==null&&o!==void 0&&o.aborted)throw new A;for await(let e of this){var s;if(W!==null&&W!==void 0&&(s=W.signal)!==null&&s!==void 0&&s.aborted)throw new A;if(N--<=0)yield e}}.call(this)}function S(N,W=void 0){if(W!=null)T(W,"options");if((W===null||W===void 0?void 0:W.signal)!=null)M(W.signal,"options.signal");return N=z(N),async function*b(){var o;if(W!==null&&W!==void 0&&(o=W.signal)!==null&&o!==void 0&&o.aborted)throw new A;for await(let e of this){var s;if(W!==null&&W!==void 0&&(s=W.signal)!==null&&s!==void 0&&s.aborted)throw new A;if(N-- >0)yield e;else return}}.call(this)}j.exports.streamReturningOperators={asIndexedPairs:t,drop:w,filter:K,flatMap:J,map:_,take:S},j.exports.promiseReturningOperators={every:$,forEach:Y,reduce:m,toArray:u,some:i,find:n}}}),Tq=Bq({"node_modules/readable-stream/lib/internal/streams/destroy.js"(a,j){var{aggregateTwoErrors:B,codes:{ERR_MULTIPLE_CALLBACK:G},AbortError:y}=Wq(),{Symbol:A}=Vq(),{kDestroyed:M,isDestroyed:R,isFinished:T,isServerRequest:g}=Eq(),k="#kDestroy",c="#kConstruct";function O(K,F,m){if(K){if(K.stack,F&&!F.errored)F.errored=K;if(m&&!m.errored)m.errored=K}}function l(K,F){const m=this._readableState,u=this._writableState,J=u||m;if(u&&u.destroyed||m&&m.destroyed){if(typeof F==="function")F();return this}if(O(K,u,m),u)u.destroyed=!0;if(m)m.destroyed=!0;if(!J.constructed)this.once(k,(z)=>{D(this,B(z,K),F)});else D(this,K,F);return this}function D(K,F,m){let u=!1;function J(z){if(u)return;u=!0;const{_readableState:w,_writableState:S}=K;if(O(z,S,w),S)S.closed=!0;if(w)w.closed=!0;if(typeof m==="function")m(z);if(z)Xq(p,K,z);else Xq(E,K)}try{K._destroy(F||null,J)}catch(z){J(z)}}function p(K,F){P(K,F),E(K)}function E(K){const{_readableState:F,_writableState:m}=K;if(m)m.closeEmitted=!0;if(F)F.closeEmitted=!0;if(m&&m.emitClose||F&&F.emitClose)K.emit("close")}function P(K,F){const m=K?._readableState,u=K?._writableState;if(u?.errorEmitted||m?.errorEmitted)return;if(u)u.errorEmitted=!0;if(m)m.errorEmitted=!0;K?.emit?.("error",F)}function Z(){const K=this._readableState,F=this._writableState;if(K)K.constructed=!0,K.closed=!1,K.closeEmitted=!1,K.destroyed=!1,K.errored=null,K.errorEmitted=!1,K.reading=!1,K.ended=K.readable===!1,K.endEmitted=K.readable===!1;if(F)F.constructed=!0,F.destroyed=!1,F.closed=!1,F.closeEmitted=!1,F.errored=null,F.errorEmitted=!1,F.finalCalled=!1,F.prefinished=!1,F.ended=F.writable===!1,F.ending=F.writable===!1,F.finished=F.writable===!1}function U(K,F,m){const u=K?._readableState,J=K?._writableState;if(J&&J.destroyed||u&&u.destroyed)return this;if(u&&u.autoDestroy||J&&J.autoDestroy)K.destroy(F);else if(F){if(Error.captureStackTrace(F),J&&!J.errored)J.errored=F;if(u&&!u.errored)u.errored=F;if(m)Xq(P,K,F);else P(K,F)}}function I(K,F){if(typeof K._construct!=="function")return;const{_readableState:m,_writableState:u}=K;if(m)m.constructed=!1;if(u)u.constructed=!1;if(K.once(c,F),K.listenerCount(c)>1)return;Xq(_,K)}function _(K){let F=!1;function m(u){if(F){U(K,u!==null&&u!==void 0?u:new G);return}F=!0;const{_readableState:J,_writableState:z}=K,w=z||J;if(J)J.constructed=!0;if(z)z.constructed=!0;if(w.destroyed)K.emit(k,u);else if(u)U(K,u,!0);else Xq(t,K)}try{K._construct(m)}catch(u){m(u)}}function t(K){K.emit(c)}function i(K){return K&&K.setHeader&&typeof K.abort==="function"}function $(K){K.emit("close")}function n(K,F){K.emit("error",F),Xq($,K)}function Y(K,F){if(!K||R(K))return;if(!F&&!T(K))F=new y;if(g(K))K.socket=null,K.destroy(F);else if(i(K))K.abort();else if(i(K.req))K.req.abort();else if(typeof K.destroy==="function")K.destroy(F);else if(typeof K.close==="function")K.close();else if(F)Xq(n,K);else Xq($,K);if(!K.destroyed)K[M]=!0}j.exports={construct:I,destroyer:Y,destroy:l,undestroy:Z,errorOrDestroy:U}}}),Rq=Bq({"node_modules/readable-stream/lib/internal/streams/legacy.js"(a,j){var{ArrayIsArray:B,ObjectSetPrototypeOf:G}=Vq();function y(M){if(!(this instanceof y))return new y(M);Iq.call(this,M)}G(y.prototype,Iq.prototype),G(y,Iq),y.prototype.pipe=function(M,R){const T=this;function g(E){if(M.writable&&M.write(E)===!1&&T.pause)T.pause()}T.on("data",g);function k(){if(T.readable&&T.resume)T.resume()}if(M.on("drain",k),!M._isStdio&&(!R||R.end!==!1))T.on("end",O),T.on("close",l);let c=!1;function O(){if(c)return;c=!0,M.end()}function l(){if(c)return;if(c=!0,typeof M.destroy==="function")M.destroy()}function D(E){if(p(),Iq.listenerCount(this,"error")===0)this.emit("error",E)}A(T,"error",D),A(M,"error",D);function p(){T.removeListener("data",g),M.removeListener("drain",k),T.removeListener("end",O),T.removeListener("close",l),T.removeListener("error",D),M.removeListener("error",D),T.removeListener("end",p),T.removeListener("close",p),M.removeListener("close",p)}return T.on("end",p),T.on("close",p),M.on("close",p),M.emit("pipe",T),M};function A(M,R,T){if(typeof M.prependListener==="function")return M.prependListener(R,T);if(!M._events||!M._events[R])M.on(R,T);else if(B(M._events[R]))M._events[R].unshift(T);else M._events[R]=[T,M._events[R]]}j.exports={Stream:y,prependListener:A}}}),Sq=Bq({"node_modules/readable-stream/lib/internal/streams/add-abort-signal.js"(a,j){var{AbortError:B,codes:G}=Wq(),y=Fq(),{ERR_INVALID_ARG_TYPE:A}=G,M=(T,g)=>{if(typeof T!=="object"||!("aborted"in T))throw new A(g,"AbortSignal",T)};function R(T){return!!(T&&typeof T.pipe==="function")}j.exports.addAbortSignal=function T(g,k){if(M(g,"signal"),!R(k))throw new A("stream","stream.Stream",k);return j.exports.addAbortSignalNoValidate(g,k)},j.exports.addAbortSignalNoValidate=function(T,g){if(typeof T!=="object"||!("aborted"in T))return g;const k=()=>{g.destroy(new B(void 0,{cause:T.reason}))};if(T.aborted)k();else T.addEventListener("abort",k),y(g,()=>T.removeEventListener("abort",k));return g}}}),JQ=Bq({"node_modules/readable-stream/lib/internal/streams/state.js"(a,j){var{MathFloor:B,NumberIsInteger:G}=Vq(),{ERR_INVALID_ARG_VALUE:y}=Wq().codes;function A(T,g,k){return T.highWaterMark!=null?T.highWaterMark:g?T[k]:null}function M(T){return T?16:16384}function R(T,g,k,c){const O=A(g,c,k);if(O!=null){if(!G(O)||O<0){const l=c?`options.${k}`:"options.highWaterMark";throw new y(l,O)}return B(O)}return M(T.objectMode)}j.exports={getHighWaterMark:R,getDefaultHighWaterMark:M}}}),hq=Bq({"node_modules/readable-stream/lib/internal/streams/from.js"(a,j){var{PromisePrototypeThen:B,SymbolAsyncIterator:G,SymbolIterator:y}=Vq(),{ERR_INVALID_ARG_TYPE:A,ERR_STREAM_NULL_VALUES:M}=Wq().codes;function R(T,g,k){let c;if(typeof g==="string"||g instanceof Buffer)return new T({objectMode:!0,...k,read(){this.push(g),this.push(null)}});let O;if(g&&g[G])O=!0,c=g[G]();else if(g&&g[y])O=!1,c=g[y]();else throw new A("iterable",["Iterable"],g);const l=new T({objectMode:!0,highWaterMark:1,...k});let D=!1;l._read=function(){if(!D)D=!0,E()},l._destroy=function(P,Z){B(p(P),()=>Xq(Z,P),(U)=>Xq(Z,U||P))};async function p(P){const Z=P!==void 0&&P!==null,U=typeof c.throw==="function";if(Z&&U){const{value:I,done:_}=await c.throw(P);if(await I,_)return}if(typeof c.return==="function"){const{value:I}=await c.return();await I}}async function E(){for(;;){try{const{value:P,done:Z}=O?await c.next():c.next();if(Z)l.push(null);else{const U=P&&typeof P.then==="function"?await P:P;if(U===null)throw D=!1,new M;else if(l.push(U))continue;else D=!1}}catch(P){l.destroy(P)}break}}return l}j.exports=R}}),pq,uq,_q=Bq({"node_modules/readable-stream/lib/internal/streams/readable.js"(a,j){var{ArrayPrototypeIndexOf:B,NumberIsInteger:G,NumberIsNaN:y,NumberParseInt:A,ObjectDefineProperties:M,ObjectKeys:R,ObjectSetPrototypeOf:T,Promise:g,SafeSet:k,SymbolAsyncIterator:c,Symbol:O}=Vq(),l=globalThis[Symbol.for("Bun.lazy")]("bun:stream").ReadableState,{Stream:D,prependListener:p}=Rq();function E(q){if(!(this instanceof E))return new E(q);const X=this instanceof Mq();if(this._readableState=new l(q,this,X),q){const{read:C,destroy:x,construct:v,signal:Jq}=q;if(typeof C==="function")this._read=C;if(typeof x==="function")this._destroy=x;if(typeof v==="function")this._construct=v;if(Jq&&!X)U(Jq,this)}D.call(this,q),K.construct(this,()=>{if(this._readableState.needReadable)n(this,this._readableState)})}T(E.prototype,D.prototype),T(E,D),E.prototype.on=function(q,X){const C=D.prototype.on.call(this,q,X),x=this._readableState;if(q==="data"){if(x.readableListening=this.listenerCount("readable")>0,x.flowing!==!1)this.resume()}else if(q==="readable"){if(!x.endEmitted&&!x.readableListening){if(x.readableListening=x.needReadable=!0,x.flowing=!1,x.emittedReadable=!1,x.length)Y(this,x);else if(!x.reading)Xq(Qq,this)}else if(x.endEmitted);}return C};class P extends E{#q;#Q;#X;#H;constructor(q,X){const{objectMode:C,highWaterMark:x,encoding:v,signal:Jq}=q;super({objectMode:C,highWaterMark:x,encoding:v,signal:Jq});this.#X=[],this.#q=void 0,this.#H=X,this.#Q=!1}#J(){var q=this.#X,X=0,C=q.length;for(;X<C;X++){const x=q[X];if(q[X]=void 0,!this.push(x,void 0))return this.#X=q.slice(X+1),!0}if(C>0)this.#X=[];return!1}#K(q){q.releaseLock(),this.#q=void 0,this.#Q=!0,this.push(null);return}async _read(){var q=this.#H,X=this.#q;if(q)X=this.#q=q.getReader(),this.#H=void 0;else if(this.#J())return;var C;try{do{var x=!1,v;const Jq=X.readMany();if(xq(Jq)){if({done:x,value:v}=await Jq,this.#Q){this.#X.push(...v);return}}else({done:x,value:v}=Jq);if(x){this.#K(X);return}if(!this.push(v[0])){this.#X=v.slice(1);return}for(let Zq=1,Oq=v.length;Zq<Oq;Zq++)if(!this.push(v[Zq])){this.#X=v.slice(Zq+1);return}}while(!this.#Q)}catch(Jq){C=Jq}finally{if(C)throw C}}_destroy(q,X){if(!this.#Q){var C=this.#q;if(C)this.#q=void 0,C.cancel(q).finally(()=>{this.#Q=!0,X(q)});return}try{X(q)}catch(x){globalThis.reportError(x)}}}uq=P;function Z(q,X={}){if(!tq(q))throw new m("readableStream","ReadableStream",q);S(X,"options");const{highWaterMark:C,encoding:x,objectMode:v=!1,signal:Jq}=X;if(x!==void 0&&!Buffer.isEncoding(x))throw new QQ(x,"options.encoding");return eq(v,"options.objectMode"),zQ(E,q,X)||new P({highWaterMark:C,encoding:x,objectMode:v,signal:Jq},q)}j.exports=E,pq=Z;var{addAbortSignal:U}=Sq(),I=Fq();const{maybeReadMore:_,resume:t,emitReadable:i,onEofChunk:$}=globalThis[Symbol.for("Bun.lazy")]("bun:stream");function n(q,X){process.nextTick(_,q,X)}function Y(q,X){i(q,X)}var K=Tq(),{aggregateTwoErrors:F,codes:{ERR_INVALID_ARG_TYPE:m,ERR_METHOD_NOT_IMPLEMENTED:u,ERR_OUT_OF_RANGE:J,ERR_STREAM_PUSH_AFTER_EOF:z,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:w}}=Wq(),{validateObject:S}=Cq(),N=hq(),W=()=>{},{errorOrDestroy:b}=K;E.prototype.destroy=K.destroy,E.prototype._undestroy=K.undestroy,E.prototype._destroy=function(q,X){X(q)},E.prototype[Iq.captureRejectionSymbol]=function(q){this.destroy(q)},E.prototype.push=function(q,X){return o(this,q,X,!1)},E.prototype.unshift=function(q,X){return o(this,q,X,!0)};function o(q,X,C,x){const v=q._readableState;let Jq;if(!v.objectMode){if(typeof X==="string"){if(C=C||v.defaultEncoding,v.encoding!==C)if(x&&v.encoding)X=Buffer.from(X,C).toString(v.encoding);else X=Buffer.from(X,C),C=""}else if(X instanceof Buffer)C="";else if(D._isUint8Array(X)){if(x||!v.decoder)X=D._uint8ArrayToBuffer(X);C=""}else if(X!=null)Jq=new m("chunk",["string","Buffer","Uint8Array"],X)}if(Jq)b(q,Jq);else if(X===null)v.reading=!1,$(q,v);else if(v.objectMode||X&&X.length>0)if(x)if(v.endEmitted)b(q,new w);else if(v.destroyed||v.errored)return!1;else s(q,v,X,!0);else if(v.ended)b(q,new z);else if(v.destroyed||v.errored)return!1;else if(v.reading=!1,v.decoder&&!C)if(X=v.decoder.write(X),v.objectMode||X.length!==0)s(q,v,X,!1);else n(q,v);else s(q,v,X,!1);else if(!x)v.reading=!1,n(q,v);return!v.ended&&(v.length<v.highWaterMark||v.length===0)}function s(q,X,C,x){if(X.flowing&&X.length===0&&!X.sync&&q.listenerCount("data")>0){if(X.multiAwaitDrain)X.awaitDrainWriters.clear();else X.awaitDrainWriters=null;X.dataEmitted=!0,q.emit("data",C)}else{if(X.length+=X.objectMode?1:C.length,x)X.buffer.unshift(C);else X.buffer.push(C);if(X.needReadable)Y(q,X)}n(q,X)}E.prototype.isPaused=function(){const q=this._readableState;return q.paused===!0||q.flowing===!1},E.prototype.setEncoding=function(q){const X=new aq(q);this._readableState.decoder=X,this._readableState.encoding=this._readableState.decoder.encoding;const C=this._readableState.buffer;let x="";for(let v=C.length;v>0;v--)x+=X.write(C.shift());if(x!=="")C.push(x);return this._readableState.length=x.length,this};var e=1073741824;function Hq(q){if(q>e)throw new J("size","<= 1GiB",q);else q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++;return q}function $q(q,X){if(q<=0||X.length===0&&X.ended)return 0;if(X.objectMode)return 1;if(y(q)){if(X.flowing&&X.length)return X.buffer.first().length;return X.length}if(q<=X.length)return q;return X.ended?X.length:0}E.prototype.read=function(q){if(!G(q))q=A(q,10);const X=this._readableState,C=q;if(q>X.highWaterMark)X.highWaterMark=Hq(q);if(q!==0)X.emittedReadable=!1;if(q===0&&X.needReadable&&((X.highWaterMark!==0?X.length>=X.highWaterMark:X.length>0)||X.ended)){if(X.length===0&&X.ended)H(this);else Y(this,X);return null}if(q=$q(q,X),q===0&&X.ended){if(X.length===0)H(this);return null}let x=X.needReadable;if(X.length===0||X.length-q<X.highWaterMark)x=!0;if(X.ended||X.reading||X.destroyed||X.errored||!X.constructed)x=!1;else if(x){if(X.reading=!0,X.sync=!0,X.length===0)X.needReadable=!0;try{var v=this._read(X.highWaterMark);if(xq(v)){const Zq=Bun.peek(v);if(Zq!==v)v=Zq}if(xq(v)&&v?.then&&oq(v.then))v.then(W,function(Zq){b(this,Zq)})}catch(Zq){b(this,Zq)}if(X.sync=!1,!X.reading)q=$q(C,X)}let Jq;if(q>0)Jq=Q(q,X);else Jq=null;if(Jq===null)X.needReadable=X.length<=X.highWaterMark,q=0;else if(X.length-=q,X.multiAwaitDrain)X.awaitDrainWriters.clear();else X.awaitDrainWriters=null;if(X.length===0){if(!X.ended)X.needReadable=!0;if(C!==q&&X.ended)H(this)}if(Jq!==null&&!X.errorEmitted&&!X.closeEmitted)X.dataEmitted=!0,this.emit("data",Jq);return Jq},E.prototype._read=function(q){throw new u("_read()")},E.prototype.pipe=function(q,X){const C=this,x=this._readableState;if(x.pipes.length===1){if(!x.multiAwaitDrain)x.multiAwaitDrain=!0,x.awaitDrainWriters=new k(x.awaitDrainWriters?[x.awaitDrainWriters]:[])}x.pipes.push(q);const Jq=(!X||X.end!==!1)&&q!==process.stdout&&q!==process.stderr?Oq:Pq;if(x.endEmitted)Xq(Jq);else C.once("end",Jq);q.on("unpipe",Zq);function Zq(jq,Nq){if(jq===C){if(Nq&&Nq.hasUnpiped===!1)Nq.hasUnpiped=!0,nq()}}function Oq(){q.end()}let Lq,kq=!1;function nq(){if(q.removeListener("close",wq),q.removeListener("finish",vq),Lq)q.removeListener("drain",Lq);if(q.removeListener("error",Dq),q.removeListener("unpipe",Zq),C.removeListener("end",Oq),C.removeListener("end",Pq),C.removeListener("data",yq),kq=!0,Lq&&x.awaitDrainWriters&&(!q._writableState||q._writableState.needDrain))Lq()}function fq(){if(!kq){if(x.pipes.length===1&&x.pipes[0]===q)x.awaitDrainWriters=q,x.multiAwaitDrain=!1;else if(x.pipes.length>1&&x.pipes.includes(q))x.awaitDrainWriters.add(q);C.pause()}if(!Lq)Lq=qq(C,q),q.on("drain",Lq)}C.on("data",yq);function yq(jq){if(q.write(jq)===!1)fq()}function Dq(jq){if(Gq("onerror",jq),Pq(),q.removeListener("error",Dq),q.listenerCount("error")===0){const Nq=q._writableState||q._readableState;if(Nq&&!Nq.errorEmitted)b(q,jq);else q.emit("error",jq)}}p(q,"error",Dq);function wq(){q.removeListener("finish",vq),Pq()}q.once("close",wq);function vq(){Gq("onfinish"),q.removeListener("close",wq),Pq()}q.once("finish",vq);function Pq(){Gq("unpipe"),C.unpipe(q)}if(q.emit("pipe",C),q.writableNeedDrain===!0){if(x.flowing)fq()}else if(!x.flowing)Gq("pipe resume"),C.resume();return q};function qq(q,X){return function C(){const x=q._readableState;if(x.awaitDrainWriters===X)Gq("pipeOnDrain",1),x.awaitDrainWriters=null;else if(x.multiAwaitDrain)Gq("pipeOnDrain",x.awaitDrainWriters.size),x.awaitDrainWriters.delete(X);if((!x.awaitDrainWriters||x.awaitDrainWriters.size===0)&&q.listenerCount("data"))q.resume()}}E.prototype.unpipe=function(q){const X=this._readableState,C={hasUnpiped:!1};if(X.pipes.length===0)return this;if(!q){const v=X.pipes;X.pipes=[],this.pause();for(let Jq=0;Jq<v.length;Jq++)v[Jq].emit("unpipe",this,{hasUnpiped:!1});return this}const x=B(X.pipes,q);if(x===-1)return this;if(X.pipes.splice(x,1),X.pipes.length===0)this.pause();return q.emit("unpipe",this,C),this},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(q,X){const C=D.prototype.removeListener.call(this,q,X);if(q==="readable")Xq(Kq,this);return C},E.prototype.off=E.prototype.removeListener,E.prototype.removeAllListeners=function(q){const X=D.prototype.removeAllListeners.apply(this,arguments);if(q==="readable"||q===void 0)Xq(Kq,this);return X};function Kq(q){const X=q._readableState;if(X.readableListening=q.listenerCount("readable")>0,X.resumeScheduled&&X.paused===!1)X.flowing=!0;else if(q.listenerCount("data")>0)q.resume();else if(!X.readableListening)X.flowing=null}function Qq(q){q.read(0)}E.prototype.resume=function(){const q=this._readableState;if(!q.flowing)q.flowing=!q.readableListening,t(this,q);return q.paused=!1,this},E.prototype.pause=function(){if(this._readableState.flowing!==!1)this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this},E.prototype.wrap=function(q){let X=!1;q.on("data",(x)=>{if(!this.push(x)&&q.pause)X=!0,q.pause()}),q.on("end",()=>{this.push(null)}),q.on("error",(x)=>{b(this,x)}),q.on("close",()=>{this.destroy()}),q.on("destroy",()=>{this.destroy()}),this._read=()=>{if(X&&q.resume)X=!1,q.resume()};const C=R(q);for(let x=1;x<C.length;x++){const v=C[x];if(this[v]===void 0&&typeof q[v]==="function")this[v]=q[v].bind(q)}return this},E.prototype[c]=function(){return V(this)},E.prototype.iterator=function(q){if(q!==void 0)S(q,"options");return V(this,q)};function V(q,X){if(typeof q.read!=="function")q=E.wrap(q,{objectMode:!0});const C=h(q,X);return C.stream=q,C}async function*h(q,X){let C=W;function x(Zq){if(this===q)C(),C=W;else C=Zq}q.on("readable",x);let v;const Jq=I(q,{writable:!1},(Zq)=>{v=Zq?F(v,Zq):null,C(),C=W});try{while(!0){const Zq=q.destroyed?null:q.read();if(Zq!==null)yield Zq;else if(v)throw v;else if(v===null)return;else await new g(x)}}catch(Zq){throw v=F(v,Zq),v}finally{if((v||(X===null||X===void 0?void 0:X.destroyOnReturn)!==!1)&&(v===void 0||q._readableState.autoDestroy))K.destroyer(q,null);else q.off("readable",x),Jq()}}M(E.prototype,{readable:{get(){const q=this._readableState;return!!q&&q.readable!==!1&&!q.destroyed&&!q.errorEmitted&&!q.endEmitted},set(q){if(this._readableState)this._readableState.readable=!!q}},readableDidRead:{enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{enumerable:!1,get:function(){return this._readableState.flowing},set:function(q){if(this._readableState)this._readableState.flowing=q}},readableLength:{enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{get(){return this._readableState?this._readableState.closed:!1}},destroyed:{enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(q){if(!this._readableState)return;this._readableState.destroyed=q}},readableEnded:{enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),E._fromList=Q;function Q(q,X){if(X.length===0)return null;let C;if(X.objectMode)C=X.buffer.shift();else if(!q||q>=X.length){if(X.decoder)C=X.buffer.join("");else if(X.buffer.length===1)C=X.buffer.first();else C=X.buffer.concat(X.length);X.buffer.clear()}else C=X.buffer.consume(q,X.decoder);return C}function H(q){const X=q._readableState;if(!X.endEmitted)X.ended=!0,Xq(L,X,q)}function L(q,X){if(!q.errored&&!q.closeEmitted&&!q.endEmitted&&q.length===0){if(q.endEmitted=!0,X.emit("end"),X.writable&&X.allowHalfOpen===!1)Xq(d,X);else if(q.autoDestroy){const C=X._writableState;if(!C||C.autoDestroy&&(C.finished||C.writable===!1))X.destroy()}}}function d(q){if(q.writable&&!q.writableEnded&&!q.destroyed)q.end()}E.from=function(q,X){return N(E,q,X)};var f={newStreamReadableFromReadableStream:Z};function r(){if(f===void 0)f={};return f}E.fromWeb=function(q,X){return r().newStreamReadableFromReadableStream(q,X)},E.toWeb=function(q){return r().newReadableStreamFromStreamReadable(q)},E.wrap=function(q,X){var C,x;return new E({objectMode:(C=(x=q.readableObjectMode)!==null&&x!==void 0?x:q.objectMode)!==null&&C!==void 0?C:!0,...X,destroy(v,Jq){K.destroyer(q,v),Jq(v)}}).wrap(q)}}}),bq=Bq({"node_modules/readable-stream/lib/internal/streams/writable.js"(a,j){var{ArrayPrototypeSlice:B,Error:G,FunctionPrototypeSymbolHasInstance:y,ObjectDefineProperty:A,ObjectDefineProperties:M,ObjectSetPrototypeOf:R,StringPrototypeToLowerCase:T,Symbol:g,SymbolHasInstance:k}=Vq(),c=Rq().Stream,O=Tq(),{addAbortSignal:l}=Sq(),{getHighWaterMark:D,getDefaultHighWaterMark:p}=JQ(),{ERR_INVALID_ARG_TYPE:E,ERR_METHOD_NOT_IMPLEMENTED:P,ERR_MULTIPLE_CALLBACK:Z,ERR_STREAM_CANNOT_PIPE:U,ERR_STREAM_DESTROYED:I,ERR_STREAM_ALREADY_FINISHED:_,ERR_STREAM_NULL_VALUES:t,ERR_STREAM_WRITE_AFTER_END:i,ERR_UNKNOWN_ENCODING:$}=Wq().codes,{errorOrDestroy:n}=O;function Y(Q={}){const H=this instanceof Mq();if(!H&&!y(Y,this))return new Y(Q);if(this._writableState=new m(Q,this,H),Q){if(typeof Q.write==="function")this._write=Q.write;if(typeof Q.writev==="function")this._writev=Q.writev;if(typeof Q.destroy==="function")this._destroy=Q.destroy;if(typeof Q.final==="function")this._final=Q.final;if(typeof Q.construct==="function")this._construct=Q.construct;if(Q.signal)l(Q.signal,this)}c.call(this,Q),O.construct(this,()=>{const L=this._writableState;if(!L.writing)s(this,L);qq(this,L)})}R(Y.prototype,c.prototype),R(Y,c),j.exports=Y;function K(){}var F=g("kOnFinished");function m(Q,H,L){if(typeof L!=="boolean")L=H instanceof Mq();if(this.objectMode=!!(Q&&Q.objectMode),L)this.objectMode=this.objectMode||!!(Q&&Q.writableObjectMode);this.highWaterMark=Q?D(this,Q,"writableHighWaterMark",L):p(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const d=!!(Q&&Q.decodeStrings===!1);this.decodeStrings=!d,this.defaultEncoding=Q&&Q.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=N.bind(void 0,H),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,u(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!Q||Q.emitClose!==!1,this.autoDestroy=!Q||Q.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[F]=[]}function u(Q){Q.buffered=[],Q.bufferedIndex=0,Q.allBuffers=!0,Q.allNoop=!0}m.prototype.getBuffer=function Q(){return B(this.buffered,this.bufferedIndex)},A(m.prototype,"bufferedRequestCount",{get(){return this.buffered.length-this.bufferedIndex}}),A(Y,k,{value:function(Q){if(y(this,Q))return!0;if(this!==Y)return!1;return Q&&Q._writableState instanceof m}}),Y.prototype.pipe=function(){n(this,new U)};function J(Q,H,L,d){const f=Q._writableState;if(typeof L==="function")d=L,L=f.defaultEncoding;else{if(!L)L=f.defaultEncoding;else if(L!=="buffer"&&!Buffer.isEncoding(L))throw new $(L);if(typeof d!=="function")d=K}if(H===null)throw new t;else if(!f.objectMode)if(typeof H==="string"){if(f.decodeStrings!==!1)H=Buffer.from(H,L),L="buffer"}else if(H instanceof Buffer)L="buffer";else if(c._isUint8Array(H))H=c._uint8ArrayToBuffer(H),L="buffer";else throw new E("chunk",["string","Buffer","Uint8Array"],H);let r;if(f.ending)r=new i;else if(f.destroyed)r=new I("write");if(r)return Xq(d,r),n(Q,r,!0),r;return f.pendingcb++,z(Q,f,H,L,d)}Y.prototype.write=function(Q,H,L){return J(this,Q,H,L)===!0},Y.prototype.cork=function(){this._writableState.corked++},Y.prototype.uncork=function(){const Q=this._writableState;if(Q.corked){if(Q.corked--,!Q.writing)s(this,Q)}},Y.prototype.setDefaultEncoding=function Q(H){if(typeof H==="string")H=T(H);if(!Buffer.isEncoding(H))throw new $(H);return this._writableState.defaultEncoding=H,this};function z(Q,H,L,d,f){const r=H.objectMode?1:L.length;H.length+=r;const q=H.length<H.highWaterMark;if(!q)H.needDrain=!0;if(H.writing||H.corked||H.errored||!H.constructed){if(H.buffered.push({chunk:L,encoding:d,callback:f}),H.allBuffers&&d!=="buffer")H.allBuffers=!1;if(H.allNoop&&f!==K)H.allNoop=!1}else H.writelen=r,H.writecb=f,H.writing=!0,H.sync=!0,Q._write(L,d,H.onwrite),H.sync=!1;return q&&!H.errored&&!H.destroyed}function w(Q,H,L,d,f,r,q){if(H.writelen=d,H.writecb=q,H.writing=!0,H.sync=!0,H.destroyed)H.onwrite(new I("write"));else if(L)Q._writev(f,H.onwrite);else Q._write(f,r,H.onwrite);H.sync=!1}function S(Q,H,L,d){--H.pendingcb,d(L),o(H),n(Q,L)}function N(Q,H){const L=Q._writableState,d=L.sync,f=L.writecb;if(typeof f!=="function"){n(Q,new Z);return}if(L.writing=!1,L.writecb=null,L.length-=L.writelen,L.writelen=0,H){if(Error.captureStackTrace(H),!L.errored)L.errored=H;if(Q._readableState&&!Q._readableState.errored)Q._readableState.errored=H;if(d)Xq(S,Q,L,H,f);else S(Q,L,H,f)}else{if(L.buffered.length>L.bufferedIndex)s(Q,L);if(d)if(L.afterWriteTickInfo!==null&&L.afterWriteTickInfo.cb===f)L.afterWriteTickInfo.count++;else L.afterWriteTickInfo={count:1,cb:f,stream:Q,state:L},Xq(W,L.afterWriteTickInfo);else b(Q,L,1,f)}}function W({stream:Q,state:H,count:L,cb:d}){return H.afterWriteTickInfo=null,b(Q,H,L,d)}function b(Q,H,L,d){if(!H.ending&&!Q.destroyed&&H.length===0&&H.needDrain)H.needDrain=!1,Q.emit("drain");while(L-- >0)H.pendingcb--,d();if(H.destroyed)o(H);qq(Q,H)}function o(Q){if(Q.writing)return;for(let f=Q.bufferedIndex;f<Q.buffered.length;++f){var H;const{chunk:r,callback:q}=Q.buffered[f],X=Q.objectMode?1:r.length;Q.length-=X,q((H=Q.errored)!==null&&H!==void 0?H:new I("write"))}const L=Q[F].splice(0);for(let f=0;f<L.length;f++){var d;L[f]((d=Q.errored)!==null&&d!==void 0?d:new I("end"))}u(Q)}function s(Q,H){if(H.corked||H.bufferProcessing||H.destroyed||!H.constructed)return;const{buffered:L,bufferedIndex:d,objectMode:f}=H,r=L.length-d;if(!r)return;let q=d;if(H.bufferProcessing=!0,r>1&&Q._writev){H.pendingcb-=r-1;const X=H.allNoop?K:(x)=>{for(let v=q;v<L.length;++v)L[v].callback(x)},C=H.allNoop&&q===0?L:B(L,q);C.allBuffers=H.allBuffers,w(Q,H,!0,H.length,C,"",X),u(H)}else{do{const{chunk:X,encoding:C,callback:x}=L[q];L[q++]=null;const v=f?1:X.length;w(Q,H,!1,v,X,C,x)}while(q<L.length&&!H.writing);if(q===L.length)u(H);else if(q>256)L.splice(0,q),H.bufferedIndex=0;else H.bufferedIndex=q}H.bufferProcessing=!1}Y.prototype._write=function(Q,H,L){if(this._writev)this._writev([{chunk:Q,encoding:H}],L);else throw new P("_write()")},Y.prototype._writev=null,Y.prototype.end=function(Q,H,L,d=!1){const f=this._writableState;if(typeof Q==="function")L=Q,Q=null,H=null;else if(typeof H==="function")L=H,H=null;let r;if(Q!==null&&Q!==void 0){let q;if(!d)q=J(this,Q,H);else q=this.write(Q,H);if(q instanceof G)r=q}if(f.corked)f.corked=1,this.uncork();if(r)this.emit("error",r);else if(!f.errored&&!f.ending)f.ending=!0,qq(this,f,!0),f.ended=!0;else if(f.finished)r=new _("end");else if(f.destroyed)r=new I("end");if(typeof L==="function")if(r||f.finished)Xq(L,r);else f[F].push(L);return this};function e(Q,H){var L=Q.ending&&!Q.destroyed&&Q.constructed&&Q.length===0&&!Q.errored&&Q.buffered.length===0&&!Q.finished&&!Q.writing&&!Q.errorEmitted&&!Q.closeEmitted;return Gq("needFinish",L,H),L}function Hq(Q,H){let L=!1;function d(f){if(L){n(Q,f!==null&&f!==void 0?f:Z());return}if(L=!0,H.pendingcb--,f){const r=H[F].splice(0);for(let q=0;q<r.length;q++)r[q](f);n(Q,f,H.sync)}else if(e(H))H.prefinished=!0,Q.emit("prefinish"),H.pendingcb++,Xq(Kq,Q,H)}H.sync=!0,H.pendingcb++;try{Q._final(d)}catch(f){d(f)}H.sync=!1}function $q(Q,H){if(!H.prefinished&&!H.finalCalled)if(typeof Q._final==="function"&&!H.destroyed)H.finalCalled=!0,Hq(Q,H);else H.prefinished=!0,Q.emit("prefinish")}function qq(Q,H,L){if(!e(H,Q.__id))return;if($q(Q,H),H.pendingcb===0){if(L)H.pendingcb++,Xq((d,f)=>{if(e(f))Kq(d,f);else f.pendingcb--},Q,H);else if(e(H))H.pendingcb++,Kq(Q,H)}}function Kq(Q,H){H.pendingcb--,H.finished=!0;const L=H[F].splice(0);for(let d=0;d<L.length;d++)L[d]();if(Q.emit("finish"),H.autoDestroy){const d=Q._readableState;if(!d||d.autoDestroy&&(d.endEmitted||d.readable===!1))Q.destroy()}}M(Y.prototype,{closed:{get(){return this._writableState?this._writableState.closed:!1}},destroyed:{get(){return this._writableState?this._writableState.destroyed:!1},set(Q){if(this._writableState)this._writableState.destroyed=Q}},writable:{get(){const Q=this._writableState;return!!Q&&Q.writable!==!1&&!Q.destroyed&&!Q.errored&&!Q.ending&&!Q.ended},set(Q){if(this._writableState)this._writableState.writable=!!Q}},writableFinished:{get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{get(){const Q=this._writableState;if(!Q)return!1;return!Q.destroyed&&!Q.ending&&Q.needDrain}},writableHighWaterMark:{get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{get(){return this._writableState?this._writableState.corked:0}},writableLength:{get(){return this._writableState&&this._writableState.length}},errored:{enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var Qq=O.destroy;Y.prototype.destroy=function(Q,H){const L=this._writableState;if(!L.destroyed&&(L.bufferedIndex<L.buffered.length||L[F].length))Xq(o,L);return Qq.call(this,Q,H),this},Y.prototype._undestroy=O.undestroy,Y.prototype._destroy=function(Q,H){H(Q)},Y.prototype[Iq.captureRejectionSymbol]=function(Q){this.destroy(Q)};var V;function h(){if(V===void 0)V={};return V}Y.fromWeb=function(Q,H){return h().newStreamWritableFromWritableStream(Q,H)},Y.toWeb=function(Q){return h().newWritableStreamFromStreamWritable(Q)}}}),HQ=Bq({"node_modules/readable-stream/lib/internal/streams/duplexify.js"(a,j){var{isReadable:B,isWritable:G,isIterable:y,isNodeStream:A,isReadableNodeStream:M,isWritableNodeStream:R,isDuplexNodeStream:T}=Eq(),g=Fq(),{AbortError:k,codes:{ERR_INVALID_ARG_TYPE:c,ERR_INVALID_RETURN_VALUE:O}}=Wq(),{destroyer:l}=Tq(),D=Mq(),p=_q(),{createDeferredPromise:E}=Aq(),P=hq(),Z=typeof Blob!=="undefined"?function i($){return $ instanceof Blob}:function i($){return!1},{FunctionPrototypeCall:U}=Vq();class I extends D{constructor(i){super(i);if((i===null||i===void 0?void 0:i.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((i===null||i===void 0?void 0:i.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}j.exports=function i($,n){if(T($))return $;if(M($))return t({readable:$});if(R($))return t({writable:$});if(A($))return t({writable:!1,readable:!1});if(typeof $==="function"){const{value:K,write:F,final:m,destroy:u}=_($);if(y(K))return P(I,K,{objectMode:!0,write:F,final:m,destroy:u});const J=K===null||K===void 0?void 0:K.then;if(typeof J==="function"){let z;const w=U(J,K,(S)=>{if(S!=null)throw new O("nully","body",S)},(S)=>{l(z,S)});return z=new I({objectMode:!0,readable:!1,write:F,final(S){m(async()=>{try{await w,Xq(S,null)}catch(N){Xq(S,N)}})},destroy:u})}throw new O("Iterable, AsyncIterable or AsyncFunction",n,K)}if(Z($))return i($.arrayBuffer());if(y($))return P(I,$,{objectMode:!0,writable:!1});if(typeof($===null||$===void 0?void 0:$.writable)==="object"||typeof($===null||$===void 0?void 0:$.readable)==="object"){const K=$!==null&&$!==void 0&&$.readable?M($===null||$===void 0?void 0:$.readable)?$===null||$===void 0?void 0:$.readable:i($.readable):void 0,F=$!==null&&$!==void 0&&$.writable?R($===null||$===void 0?void 0:$.writable)?$===null||$===void 0?void 0:$.writable:i($.writable):void 0;return t({readable:K,writable:F})}const Y=$===null||$===void 0?void 0:$.then;if(typeof Y==="function"){let K;return U(Y,$,(F)=>{if(F!=null)K.push(F);K.push(null)},(F)=>{l(K,F)}),K=new I({objectMode:!0,writable:!1,read(){}})}throw new c(n,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],$)};function _(i){let{promise:$,resolve:n}=E();const Y=new AbortController,K=Y.signal;return{value:i(async function*(){while(!0){const m=$;$=null;const{chunk:u,done:J,cb:z}=await m;if(Xq(z),J)return;if(K.aborted)throw new k(void 0,{cause:K.reason});({promise:$,resolve:n}=E()),yield u}}(),{signal:K}),write(m,u,J){const z=n;n=null,z({chunk:m,done:!1,cb:J})},final(m){const u=n;n=null,u({done:!0,cb:m})},destroy(m,u){Y.abort(),u(m)}}}function t(i){const $=i.readable&&typeof i.readable.read!=="function"?p.wrap(i.readable):i.readable,n=i.writable;let Y=!!B($),K=!!G(n),F,m,u,J,z;function w(S){const N=J;if(J=null,N)N(S);else if(S)z.destroy(S);else if(!Y&&!K)z.destroy()}if(z=new I({readableObjectMode:!!($!==null&&$!==void 0&&$.readableObjectMode),writableObjectMode:!!(n!==null&&n!==void 0&&n.writableObjectMode),readable:Y,writable:K}),K)g(n,(S)=>{if(K=!1,S)l($,S);w(S)}),z._write=function(S,N,W){if(n.write(S,N))W();else F=W},z._final=function(S){n.end(),m=S},n.on("drain",function(){if(F){const S=F;F=null,S()}}),n.on("finish",function(){if(m){const S=m;m=null,S()}});if(Y)g($,(S)=>{if(Y=!1,S)l($,S);w(S)}),$.on("readable",function(){if(u){const S=u;u=null,S()}}),$.on("end",function(){z.push(null)}),z._read=function(){while(!0){const S=$.read();if(S===null){u=z._read;return}if(!z.push(S))return}};return z._destroy=function(S,N){if(!S&&J!==null)S=new k;if(u=null,F=null,m=null,J===null)N(S);else J=N,l(n,S),l($,S)},z}}}),Mq=Bq({"node_modules/readable-stream/lib/internal/streams/duplex.js"(a,j){var{ObjectDefineProperties:B,ObjectGetOwnPropertyDescriptor:G,ObjectKeys:y,ObjectSetPrototypeOf:A}=Vq(),M=_q();function R(O){if(!(this instanceof R))return new R(O);if(M.call(this,O),Uq.call(this,O),O){if(this.allowHalfOpen=O.allowHalfOpen!==!1,O.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(O.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}j.exports=R,A(R.prototype,M.prototype),A(R,M);for(var T in Uq.prototype)if(!R.prototype[T])R.prototype[T]=Uq.prototype[T];B(R.prototype,{writable:G(Uq.prototype,"writable"),writableHighWaterMark:G(Uq.prototype,"writableHighWaterMark"),writableObjectMode:G(Uq.prototype,"writableObjectMode"),writableBuffer:G(Uq.prototype,"writableBuffer"),writableLength:G(Uq.prototype,"writableLength"),writableFinished:G(Uq.prototype,"writableFinished"),writableCorked:G(Uq.prototype,"writableCorked"),writableEnded:G(Uq.prototype,"writableEnded"),writableNeedDrain:G(Uq.prototype,"writableNeedDrain"),destroyed:{get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(O){if(this._readableState&&this._writableState)this._readableState.destroyed=O,this._writableState.destroyed=O}}});var g;function k(){if(g===void 0)g={};return g}R.fromWeb=function(O,l){return k().newStreamDuplexFromReadableWritablePair(O,l)},R.toWeb=function(O){return k().newReadableWritablePairFromDuplex(O)};var c;R.from=function(O){if(!c)c=HQ();return c(O,"body")}}}),mq=Bq({"node_modules/readable-stream/lib/internal/streams/transform.js"(a,j){var{ObjectSetPrototypeOf:B,Symbol:G}=Vq(),{ERR_METHOD_NOT_IMPLEMENTED:y}=Wq().codes,A=Mq();function M(k){if(!(this instanceof M))return new M(k);if(A.call(this,k),this._readableState.sync=!1,this[R]=null,k){if(typeof k.transform==="function")this._transform=k.transform;if(typeof k.flush==="function")this._flush=k.flush}this.on("prefinish",g.bind(this))}B(M.prototype,A.prototype),B(M,A),j.exports=M;var R=G("kCallback");function T(k){if(typeof this._flush==="function"&&!this.destroyed)this._flush((c,O)=>{if(c){if(k)k(c);else this.destroy(c);return}if(O!=null)this.push(O);if(this.push(null),k)k()});else if(this.push(null),k)k()}function g(){if(this._final!==T)T.call(this)}M.prototype._final=T,M.prototype._transform=function(k,c,O){throw new y("_transform()")},M.prototype._write=function(k,c,O){const l=this._readableState,D=this._writableState,p=l.length;this._transform(k,c,(E,P)=>{if(E){O(E);return}if(P!=null)this.push(P);if(D.ended||p===l.length||l.length<l.highWaterMark||l.highWaterMark===0||l.length===0)O();else this[R]=O})},M.prototype._read=function(){if(this[R]){const k=this[R];this[R]=null,k()}}}}),cq=Bq({"node_modules/readable-stream/lib/internal/streams/passthrough.js"(a,j){var{ObjectSetPrototypeOf:B}=Vq(),G=mq();function y(A){if(!(this instanceof y))return new y(A);G.call(this,A)}B(y.prototype,G.prototype),B(y,G),y.prototype._transform=function(A,M,R){R(null,A)},j.exports=y}}),gq=Bq({"node_modules/readable-stream/lib/internal/streams/pipeline.js"(a,j){var{ArrayIsArray:B,Promise:G,SymbolAsyncIterator:y}=Vq(),A=Fq(),{once:M}=Aq(),R=Tq(),T=Mq(),{aggregateTwoErrors:g,codes:{ERR_INVALID_ARG_TYPE:k,ERR_INVALID_RETURN_VALUE:c,ERR_MISSING_ARGS:O,ERR_STREAM_DESTROYED:l},AbortError:D}=Wq(),{validateFunction:p,validateAbortSignal:E}=Cq(),{isIterable:P,isReadable:Z,isReadableNodeStream:U,isNodeStream:I}=Eq(),_,t;function i(J,z,w){let S=!1;J.on("close",()=>{S=!0});const N=A(J,{readable:z,writable:w},(W)=>{S=!W});return{destroy:(W)=>{if(S)return;S=!0,R.destroyer(J,W||new l("pipe"))},cleanup:N}}function $(J){return p(J[J.length-1],"streams[stream.length - 1]"),J.pop()}function n(J){if(P(J))return J;else if(U(J))return Y(J);throw new k("val",["Readable","Iterable","AsyncIterable"],J)}async function*Y(J){if(!t)t=_q();yield*t.prototype[y].call(J)}async function K(J,z,w,{end:S}){let N,W=null;const b=(e)=>{if(e)N=e;if(W){const Hq=W;W=null,Hq()}},o=()=>new G((e,Hq)=>{if(N)Hq(N);else W=()=>{if(N)Hq(N);else e()}});z.on("drain",b);const s=A(z,{readable:!1},b);try{if(z.writableNeedDrain)await o();for await(let e of J)if(!z.write(e))await o();if(S)z.end();await o(),w()}catch(e){w(N!==e?g(N,e):e)}finally{s(),z.off("drain",b)}}function F(...J){return m(J,M($(J)))}function m(J,z,w){if(J.length===1&&B(J[0]))J=J[0];if(J.length<2)throw new O("streams");const S=new AbortController,N=S.signal,W=w===null||w===void 0?void 0:w.signal,b=[];E(W,"options.signal");function o(){Kq(new D)}W===null||W===void 0||W.addEventListener("abort",o);let s,e;const Hq=[];let $q=0;function qq(h){Kq(h,--$q===0)}function Kq(h,Q){if(h&&(!s||s.code==="ERR_STREAM_PREMATURE_CLOSE"))s=h;if(!s&&!Q)return;while(Hq.length)Hq.shift()(s);if(W===null||W===void 0||W.removeEventListener("abort",o),S.abort(),Q){if(!s)b.forEach((H)=>H());Xq(z,s,e)}}let Qq;for(let h=0;h<J.length;h++){const Q=J[h],H=h<J.length-1,L=h>0,d=H||(w===null||w===void 0?void 0:w.end)!==!1,f=h===J.length-1;if(I(Q)){let r=function(q){if(q&&q.name!=="AbortError"&&q.code!=="ERR_STREAM_PREMATURE_CLOSE")qq(q)};if(d){const{destroy:q,cleanup:X}=i(Q,H,L);if(Hq.push(q),Z(Q)&&f)b.push(X)}if(Q.on("error",r),Z(Q)&&f)b.push(()=>{Q.removeListener("error",r)})}if(h===0)if(typeof Q==="function"){if(Qq=Q({signal:N}),!P(Qq))throw new c("Iterable, AsyncIterable or Stream","source",Qq)}else if(P(Q)||U(Q))Qq=Q;else Qq=T.from(Q);else if(typeof Q==="function")if(Qq=n(Qq),Qq=Q(Qq,{signal:N}),H){if(!P(Qq,!0))throw new c("AsyncIterable",`transform[${h-1}]`,Qq)}else{var V;if(!_)_=cq();const r=new _({objectMode:!0}),q=(V=Qq)===null||V===void 0?void 0:V.then;if(typeof q==="function")$q++,q.call(Qq,(x)=>{if(e=x,x!=null)r.write(x);if(d)r.end();Xq(qq)},(x)=>{r.destroy(x),Xq(qq,x)});else if(P(Qq,!0))$q++,K(Qq,r,qq,{end:d});else throw new c("AsyncIterable or Promise","destination",Qq);Qq=r;const{destroy:X,cleanup:C}=i(Qq,!1,!0);if(Hq.push(X),f)b.push(C)}else if(I(Q)){if(U(Qq)){$q+=2;const r=u(Qq,Q,qq,{end:d});if(Z(Q)&&f)b.push(r)}else if(P(Qq))$q++,K(Qq,Q,qq,{end:d});else throw new k("val",["Readable","Iterable","AsyncIterable"],Qq);Qq=Q}else Qq=T.from(Q)}if(N!==null&&N!==void 0&&N.aborted||W!==null&&W!==void 0&&W.aborted)Xq(o);return Qq}function u(J,z,w,{end:S}){if(J.pipe(z,{end:S}),S)J.once("end",()=>z.end());else w();return A(J,{readable:!0,writable:!1},(N)=>{const W=J._readableState;if(N&&N.code==="ERR_STREAM_PREMATURE_CLOSE"&&W&&W.ended&&!W.errored&&!W.errorEmitted)J.once("end",w).once("error",w);else w(N)}),A(z,{readable:!1,writable:!0},w)}j.exports={pipelineImpl:m,pipeline:F}}}),KQ=Bq({"node_modules/readable-stream/lib/internal/streams/compose.js"(a,j){var{pipeline:B}=gq(),G=Mq(),{destroyer:y}=Tq(),{isNodeStream:A,isReadable:M,isWritable:R}=Eq(),{AbortError:T,codes:{ERR_INVALID_ARG_VALUE:g,ERR_MISSING_ARGS:k}}=Wq();j.exports=function c(...O){if(O.length===0)throw new k("streams");if(O.length===1)return G.from(O[0]);const l=[...O];if(typeof O[0]==="function")O[0]=G.from(O[0]);if(typeof O[O.length-1]==="function"){const $=O.length-1;O[$]=G.from(O[$])}for(let $=0;$<O.length;++$){if(!A(O[$]))continue;if($<O.length-1&&!M(O[$]))throw new g(`streams[${$}]`,l[$],"must be readable");if($>0&&!R(O[$]))throw new g(`streams[${$}]`,l[$],"must be writable")}let D,p,E,P,Z;function U($){const n=P;if(P=null,n)n($);else if($)Z.destroy($);else if(!i&&!t)Z.destroy()}const I=O[0],_=B(O,U),t=!!R(I),i=!!M(_);if(Z=new G({writableObjectMode:!!(I!==null&&I!==void 0&&I.writableObjectMode),readableObjectMode:!!(_!==null&&_!==void 0&&_.writableObjectMode),writable:t,readable:i}),t)Z._write=function($,n,Y){if(I.write($,n))Y();else D=Y},Z._final=function($){I.end(),p=$},I.on("drain",function(){if(D){const $=D;D=null,$()}}),_.on("finish",function(){if(p){const $=p;p=null,$()}});if(i)_.on("readable",function(){if(E){const $=E;E=null,$()}}),_.on("end",function(){Z.push(null)}),Z._read=function(){while(!0){const $=_.read();if($===null){E=Z._read;return}if(!Z.push($))return}};return Z._destroy=function($,n){if(!$&&P!==null)$=new T;if(E=null,D=null,p=null,P===null)n($);else P=n,y(_,$)},Z}}}),dq=Bq({"node_modules/readable-stream/lib/stream/promises.js"(a,j){var{ArrayPrototypePop:B,Promise:G}=Vq(),{isIterable:y,isNodeStream:A}=Eq(),{pipelineImpl:M}=gq(),{finished:R}=Fq();function T(...g){return new G((k,c)=>{let O,l;const D=g[g.length-1];if(D&&typeof D==="object"&&!A(D)&&!y(D)){const p=B(g);O=p.signal,l=p.end}M(g,(p,E)=>{if(p)c(p);else k(E)},{signal:O,end:l})})}j.exports={finished:R,pipeline:T}}}),ZQ=Bq({"node_modules/readable-stream/lib/stream.js"(a,j){var{ObjectDefineProperty:B,ObjectKeys:G,ReflectApply:y}=Vq(),{promisify:{custom:A}}=Aq(),{streamReturningOperators:M,promiseReturningOperators:R}=XQ(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:T}}=Wq(),g=KQ(),{pipeline:k}=gq(),{destroyer:c}=Tq(),O=Fq(),l=dq(),D=Eq(),p=j.exports=Rq().Stream;p.isDisturbed=D.isDisturbed,p.isErrored=D.isErrored,p.isWritable=D.isWritable,p.isReadable=D.isReadable,p.Readable=_q();for(let P of G(M)){let Z=function(...I){if(new.target)throw T();return p.Readable.from(y(U,this,I))};const U=M[P];B(Z,"name",{value:U.name}),B(Z,"length",{value:U.length}),B(p.Readable.prototype,P,{value:Z,enumerable:!1,configurable:!0,writable:!0})}for(let P of G(R)){let Z=function(...I){if(new.target)throw T();return y(U,this,I)};const U=R[P];B(Z,"name",{value:U.name}),B(Z,"length",{value:U.length}),B(p.Readable.prototype,P,{value:Z,enumerable:!1,configurable:!0,writable:!0})}p.Writable=bq(),p.Duplex=Mq(),p.Transform=mq(),p.PassThrough=cq(),p.pipeline=k;var{addAbortSignal:E}=Sq();p.addAbortSignal=E,p.finished=O,p.destroy=c,p.compose=g,B(p,"promises",{configurable:!0,enumerable:!0,get(){return l}}),B(k,A,{enumerable:!0,get(){return l.pipeline}}),B(O,A,{enumerable:!0,get(){return l.finished}}),p.Stream=p,p._isUint8Array=function P(Z){return Z instanceof Uint8Array},p._uint8ArrayToBuffer=function P(Z){return new Buffer(Z.buffer,Z.byteOffset,Z.byteLength)}}}),BQ=Bq({"node_modules/readable-stream/lib/ours/index.js"(a,j){const B=ZQ(),G=dq(),y=B.Readable.destroy;j.exports=B,j.exports._uint8ArrayToBuffer=B._uint8ArrayToBuffer,j.exports._isUint8Array=B._isUint8Array,j.exports.isDisturbed=B.isDisturbed,j.exports.isErrored=B.isErrored,j.exports.isWritable=B.isWritable,j.exports.isReadable=B.isReadable,j.exports.Readable=B.Readable,j.exports.Writable=B.Writable,j.exports.Duplex=B.Duplex,j.exports.Transform=B.Transform,j.exports.PassThrough=B.PassThrough,j.exports.addAbortSignal=B.addAbortSignal,j.exports.finished=B.finished,j.exports.destroy=B.destroy,j.exports.destroy=y,j.exports.pipeline=B.pipeline,j.exports.compose=B.compose,j.exports._getNativeReadableStreamPrototype=lq,j.exports.NativeWritable=iq,zq.defineProperty(B,"promises",{configurable:!0,enumerable:!0,get(){return G}}),j.exports.Stream=B.Stream,j.exports.default=j.exports}}),$Q={0:void 0,1:void 0,2:void 0,3:void 0,4:void 0,5:void 0},Uq=bq(),iq=class a extends Uq{#q;#Q;#X=!0;_construct;_destroy;_final;constructor(j,B={}){super(B);this._construct=this.#H,this._destroy=this.#K,this._final=this.#Z,this.#q=j}#H(j){this._writableState.constructed=!0,this.constructed=!0,j()}#J(){if(typeof this.#q==="object")if(typeof this.#q.write==="function")this.#Q=this.#q;else throw new Error("Invalid FileSink");else this.#Q=Bun.file(this.#q).writer()}write(j,B,G,y=this.#X){if(!y)return this.#X=!1,super.write(j,B,G);if(!this.#Q)this.#J();var A=this.#Q,M=A.write(j);if(xq(M))return M.then(()=>{this.emit("drain"),A.flush(!0)}),!1;if(A.flush(!0),G)G(null,j.byteLength);return!0}end(j,B,G,y=this.#X){return super.end(j,B,G,y)}#K(j,B){if(this._writableState.destroyed=!0,B)B(j)}#Z(j){if(this.#Q)this.#Q.end();if(j)j()}ref(){if(!this.#Q)this.#J();this.#Q.ref()}unref(){if(!this.#Q)return;this.#Q.unref()}},Yq=BQ();Yq[Symbol.for("CommonJS")]=0;Yq[Symbol.for("::bunternal::")]={_ReadableFromWeb:pq,_ReadableFromWebForUndici:uq};var cQ=Yq,EQ=Yq._uint8ArrayToBuffer,IQ=Yq._isUint8Array,TQ=Yq.isDisturbed,PQ=Yq.isErrored,xQ=Yq.isWritable,OQ=Yq.isReadable,CQ=Yq.Readable,Uq=Yq.Writable,_Q=Yq.Duplex,DQ=Yq.Transform,wQ=Yq.PassThrough,vQ=Yq.addAbortSignal,RQ=Yq.finished,SQ=Yq.destroy,gQ=Yq.pipeline,kQ=Yq.compose,VQ=Yq.Stream,fQ=Yq.eos=Fq,yQ=Yq._getNativeReadableStreamPrototype,iq=Yq.NativeWritable,hQ=VQ.promises;export{hQ as promises,gQ as pipeline,xQ as isWritable,OQ as isReadable,PQ as isErrored,TQ as isDisturbed,RQ as finished,fQ as eos,SQ as destroy,cQ as default,kQ as compose,vQ as addAbortSignal,EQ as _uint8ArrayToBuffer,IQ as _isUint8Array,yQ as _getNativeReadableStreamPrototype,Uq as Writable,DQ as Transform,VQ as Stream,CQ as Readable,wQ as PassThrough,iq as NativeWritable,_Q as Duplex}; diff --git a/test/js/node/fs/fs.test.ts b/test/js/node/fs/fs.test.ts index 3b1688c15..0236010be 100644 --- a/test/js/node/fs/fs.test.ts +++ b/test/js/node/fs/fs.test.ts @@ -1448,3 +1448,26 @@ describe("utimesSync", () => { expect(finalStats.atime).toEqual(prevAccessTime); }); }); + +it("createReadStream on a large file emits readable event correctly", () => { + return new Promise<void>((resolve, reject) => { + const tmp = mkdtempSync(`${tmpdir()}/readable`); + // write a 10mb file + writeFileSync(`${tmp}/large.txt`, "a".repeat(10 * 1024 * 1024)); + var stream = createReadStream(`${tmp}/large.txt`); + var ended = false; + var timer: Timer; + stream.on("readable", () => { + const v = stream.read(); + if (ended) { + clearTimeout(timer); + reject(new Error("readable emitted after end")); + } else if (v == null) { + ended = true; + timer = setTimeout(() => { + resolve(); + }, 20); + } + }); + }); +}); |