1
2
|
import{EventEmitter as Zq} from"bun:events_native";import{StringDecoder as Gq} from"node:string_decoder";var Eq=function(B){return typeof B==="object"&&B!==null&&B instanceof ReadableStream},Iq=function(B,IQ){if(typeof B!=="boolean")throw new Pq(IQ,"boolean",B)};var Pq=function(B,IQ,Y){return new Error(`The argument '${B}' is invalid. Received '${Y}' for type '${IQ}'`)},xq=function(B,IQ,Y){return new Error(`The value '${IQ}' is invalid for argument '${B}'. Reason: ${Y}`)},H=function(B,IQ){var[Y,kQ,yQ,$,TQ,z,hQ]=globalThis[Symbol.for("Bun.lazy")](B),pQ=[!1],V=function(G,M,ZQ,F){if(M>0){const L=ZQ.subarray(0,M),j=ZQ.subarray(M);if(L.byteLength>0)G.push(L);if(F)G.push(null);return j.byteLength>0?j:void 0}if(F)G.push(null);return ZQ},PQ=function(G,M,ZQ,F){if(M.byteLength>0)G.push(M);if(F)G.push(null);return ZQ},U=process.env.BUN_DISABLE_DYNAMIC_CHUNK_SIZE!=="1";const uQ=new FinalizationRegistry((G)=>G&&TQ(G)),bQ=512;var W=class G extends IQ{#q;#Q=1;#X=!1;#J=void 0;#H;#K=!1;#Z=!U;#B;constructor(M,ZQ={}){super(ZQ);if(typeof ZQ.highWaterMark==="number")this.#H=ZQ.highWaterMark;else this.#H=262144;this.#q=M,this.#X=!1,this.#J=void 0,this.#K=!1,this.#B={},uQ.register(this,this.#q,this.#B)}_read(M){if(Jq&&VQ("NativeReadable._read",this.__id),this.#K){Jq&&VQ("pendingRead is true",this.__id);return}var ZQ=this.#q;if(Jq&&VQ("ptr @ NativeReadable._read",ZQ,this.__id),ZQ===0){this.push(null);return}if(!this.#X)Jq&&VQ("NativeReadable not constructed yet",this.__id),this.#Y(ZQ);return this.#V(this.#$(M),ZQ)}#Y(M){this.#X=!0;const ZQ=kQ(M,this.#H);if(Jq&&VQ("NativeReadable internal `start` result",ZQ,this.__id),typeof ZQ==="number"&&ZQ>1)this.#Z=!0,Jq&&VQ("NativeReadable resized",this.__id),this.#H=Math.min(this.#H,ZQ);if(hQ){const F=hQ(M);if(Jq&&VQ("NativeReadable drain result",F,this.__id),(F?.byteLength??0)>0)this.push(F)}}#$(M=this.#H){var ZQ=this.#J;if(Jq&&VQ("chunk @ #getRemainingChunk",ZQ,this.__id),ZQ?.byteLength??0<bQ){var F=M>bQ?M:bQ;this.#J=ZQ=new Buffer(F)}return ZQ}push(M,ZQ){return Jq&&VQ("NativeReadable push -- result, encoding",M,ZQ,this.__id),super.push(...arguments)}#z(M,ZQ,F){if(Jq&&VQ("result, isClosed @ #handleResult",M,F,this.__id),typeof M==="number"){if(M>=this.#H&&!this.#Z&&!F)this.#H*=2,this.#Z=!0;return V(this,M,ZQ,F)}else if(typeof M==="boolean")return this.push(null),ZQ?.byteLength??0>0?ZQ:void 0;else if(ArrayBuffer.isView(M)){if(M.byteLength>=this.#H&&!this.#Z&&!F)this.#H*=2,this.#Z=!0,Jq&&VQ("Resized",this.__id);return PQ(this,M,ZQ,F)}else throw Jq&&VQ("Unknown result type",M,this.__id),new Error("Invalid result from pull")}#V(M,ZQ){Jq&&VQ("#internalRead()",this.__id),pQ[0]=!1;var F=Y(ZQ,M,pQ);if(Bq(F))return this.#K=!0,F.then((L)=>{this.#K=!1,Jq&&VQ("pending no longerrrrrrrr (result returned from pull)",this.__id),this.#J=this.#z(L,M,pQ[0])},(L)=>{Jq&&VQ("error from pull",L,this.__id),errorOrDestroy(this,L)});else this.#J=this.#z(F,M,pQ[0])}_destroy(M,ZQ){var F=this.#q;if(F===0){ZQ(M);return}if(uQ.unregister(this.#B),this.#q=0,z)z(F,!1);Jq&&VQ("NativeReadable destroyed",this.__id),yQ(F,M),ZQ(M)}ref(){var M=this.#q;if(M===0)return;if(this.#Q++===0)z(M,!0)}unref(){var M=this.#q;if(M===0)return;if(this.#Q--===1)z(M,!1)}};if(!z)W.prototype.ref=void 0,W.prototype.unref=void 0;return W},cq=function(B,IQ){return mq[B]||=H(B,IQ)},dq=function(B,IQ,Y){if(!(IQ&&typeof IQ==="object"&&IQ instanceof ReadableStream))return;const kQ=Vq(IQ);if(!kQ){VQ("no native readable stream");return}const{stream:yQ,data:$}=kQ;return new(cq($,B))(yQ,Y)},{isPromise:Bq,isCallable:X,direct:Vq,Object:Kq}=globalThis[Symbol.for("Bun.lazy")]("primordials");globalThis.__IDS_TO_TRACK=process.env.DEBUG_TRACK_EE?.length?process.env.DEBUG_TRACK_EE.split(","):process.env.DEBUG_STREAMS?.length?process.env.DEBUG_STREAMS.split(","):null;var UQ=!!process.env.DEBUG_TRACK_EE,Jq=!!(process.env.DEBUG||process.env.DEBUG_STREAMS||UQ),VQ=Jq?globalThis.__IDS_TO_TRACK?(...B)=>{const IQ=B[B.length-1];if(!globalThis.__IDS_TO_TRACK.includes(IQ))return;console.log(`ID: ${IQ}`,...B.slice(0,-1))}:(...B)=>console.log(...B.slice(0,-1)):()=>{},Mq=Kq.create,Fq=Kq.defineProperty,SQ=Kq.getOwnPropertyDescriptor,Lq=Kq.getOwnPropertyNames,jq=Kq.getPrototypeOf,Nq=Kq.prototype.hasOwnProperty,Aq=Kq.setPrototypeOf,gQ=(B,IQ)=>function Y(){return IQ||(0,B[Lq(B)[0]])((IQ={exports:{}}).exports,IQ),IQ.exports};var RQ=process.nextTick;var Tq=Array.isArray,Yq=gQ({"node_modules/readable-stream/lib/ours/primordials.js"(B,IQ){IQ.exports={ArrayIsArray(Y){return Array.isArray(Y)},ArrayPrototypeIncludes(Y,kQ){return Y.includes(kQ)},ArrayPrototypeIndexOf(Y,kQ){return Y.indexOf(kQ)},ArrayPrototypeJoin(Y,kQ){return Y.join(kQ)},ArrayPrototypeMap(Y,kQ){return Y.map(kQ)},ArrayPrototypePop(Y,kQ){return Y.pop(kQ)},ArrayPrototypePush(Y,kQ){return Y.push(kQ)},ArrayPrototypeSlice(Y,kQ,yQ){return Y.slice(kQ,yQ)},Error,FunctionPrototypeCall(Y,kQ,...yQ){return Y.call(kQ,...yQ)},FunctionPrototypeSymbolHasInstance(Y,kQ){return Function.prototype[Symbol.hasInstance].call(Y,kQ)},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(Y,kQ){return Kq.defineProperties(Y,kQ)},ObjectDefineProperty(Y,kQ,yQ){return Kq.defineProperty(Y,kQ,yQ)},ObjectGetOwnPropertyDescriptor(Y,kQ){return Kq.getOwnPropertyDescriptor(Y,kQ)},ObjectKeys(Y){return Kq.keys(Y)},ObjectSetPrototypeOf(Y,kQ){return Kq.setPrototypeOf(Y,kQ)},Promise,PromisePrototypeCatch(Y,kQ){return Y.catch(kQ)},PromisePrototypeThen(Y,kQ,yQ){return Y.then(kQ,yQ)},PromiseReject(Y){return Promise.reject(Y)},ReflectApply:Reflect.apply,RegExpPrototypeTest(Y,kQ){return Y.test(kQ)},SafeSet:Set,String,StringPrototypeSlice(Y,kQ,yQ){return Y.slice(kQ,yQ)},StringPrototypeToLowerCase(Y){return Y.toLowerCase()},StringPrototypeToUpperCase(Y){return Y.toUpperCase()},StringPrototypeTrim(Y){return Y.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(Y,kQ,yQ){return Y.set(kQ,yQ)},Uint8Array}}}),$q=gQ({"node_modules/readable-stream/lib/ours/util.js"(B,IQ){var Y=Kq.getPrototypeOf(async function(){}).constructor,kQ=typeof Blob!=="undefined"?function $(TQ){return TQ instanceof Blob}:function $(TQ){return!1},yQ=class extends Error{constructor($){if(!Array.isArray($))throw new TypeError(`Expected input to be an Array, got ${typeof $}`);let TQ="";for(let z=0;z<$.length;z++)TQ+=` ${$[z].stack}
`;super(TQ);this.name="AggregateError",this.errors=$}};IQ.exports={AggregateError:yQ,once($){let TQ=!1;return function(...z){if(TQ)return;TQ=!0,$.apply(this,z)}},createDeferredPromise:function(){let $,TQ;return{promise:new Promise((hQ,pQ)=>{$=hQ,TQ=pQ}),resolve:$,reject:TQ}},promisify($){return new Promise((TQ,z)=>{$((hQ,...pQ)=>{if(hQ)return z(hQ);return TQ(...pQ)})})},debuglog(){return function(){}},format($,...TQ){return $.replace(/%([sdifj])/g,function(...[z,hQ]){const pQ=TQ.shift();if(hQ==="f")return pQ.toFixed(6);else if(hQ==="j")return JSON.stringify(pQ);else if(hQ==="s"&&typeof pQ==="object")return`${pQ.constructor!==Kq?pQ.constructor.name:""} {}`.trim();else return pQ.toString()})},inspect($){switch(typeof $){case"string":if($.includes("'")){if(!$.includes('"'))return`"${$}"`;else if(!$.includes("`")&&!$.includes("${"))return`\`${$}\``}return`'${$}'`;case"number":if(isNaN($))return"NaN";else if(Kq.is($,-0))return String($);return $;case"bigint":return`${String($)}n`;case"boolean":case"undefined":return String($);case"object":return"{}"}},types:{isAsyncFunction($){return $ instanceof Y},isArrayBufferView($){return ArrayBuffer.isView($)}},isBlob:kQ},IQ.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}}),Oq=gQ({"node_modules/readable-stream/lib/ours/errors.js"(B,IQ){var{format:Y,inspect:kQ,AggregateError:yQ}=$q(),$=globalThis.AggregateError||yQ,TQ=Symbol("kIsNodeError"),z=["string","function","number","object","Function","Object","boolean","bigint","symbol"],hQ=/^([A-Z][a-z0-9]*)+$/,pQ="__node_internal_",V={};function PQ(ZQ,F){if(!ZQ)throw new V.ERR_INTERNAL_ASSERTION(F)}function U(ZQ){let F="",L=ZQ.length;const j=ZQ[0]==="-"?1:0;for(;L>=j+4;L-=3)F=`_${ZQ.slice(L-3,L)}${F}`;return`${ZQ.slice(0,L)}${F}`}function uQ(ZQ,F,L){if(typeof F==="function")return PQ(F.length<=L.length,`Code: ${ZQ}; The provided arguments length (${L.length}) does not match the required ones (${F.length}).`),F(...L);const j=(F.match(/%[dfijoOs]/g)||[]).length;if(PQ(j===L.length,`Code: ${ZQ}; The provided arguments length (${L.length}) does not match the required ones (${j}).`),L.length===0)return F;return Y(F,...L)}function bQ(ZQ,F,L){if(!L)L=Error;class j extends L{constructor(...N){super(uQ(ZQ,F,N))}toString(){return`${this.name} [${ZQ}]: ${this.message}`}}Kq.defineProperties(j.prototype,{name:{value:L.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${ZQ}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),j.prototype.code=ZQ,j.prototype[TQ]=!0,V[ZQ]=j}function W(ZQ){const F=pQ+ZQ.name;return Kq.defineProperty(ZQ,"name",{value:F}),ZQ}function G(ZQ,F){if(ZQ&&F&&ZQ!==F){if(Array.isArray(F.errors))return F.errors.push(ZQ),F;const L=new $([F,ZQ],F.message);return L.code=F.code,L}return ZQ||F}var M=class extends Error{constructor(ZQ="The operation was aborted",F=void 0){if(F!==void 0&&typeof F!=="object")throw new V.ERR_INVALID_ARG_TYPE("options","Object",F);super(ZQ,F);this.code="ABORT_ERR",this.name="AbortError"}};bQ("ERR_ASSERTION","%s",Error),bQ("ERR_INVALID_ARG_TYPE",(ZQ,F,L)=>{if(PQ(typeof ZQ==="string","'name' must be a string"),!Array.isArray(F))F=[F];let j="The ";if(ZQ.endsWith(" argument"))j+=`${ZQ} `;else j+=`"${ZQ}" ${ZQ.includes(".")?"property":"argument"} `;j+="must be ";const N=[],q=[],A=[];for(let I of F)if(PQ(typeof I==="string","All expected entries have to be of type string"),z.includes(I))N.push(I.toLowerCase());else if(hQ.test(I))q.push(I);else PQ(I!=="object",'The value "object" should be written as "Object"'),A.push(I);if(q.length>0){const I=N.indexOf("object");if(I!==-1)N.splice(N,I,1),q.push("Object")}if(N.length>0){switch(N.length){case 1:j+=`of type ${N[0]}`;break;case 2:j+=`one of type ${N[0]} or ${N[1]}`;break;default:{const I=N.pop();j+=`one of type ${N.join(", ")}, or ${I}`}}if(q.length>0||A.length>0)j+=" or "}if(q.length>0){switch(q.length){case 1:j+=`an instance of ${q[0]}`;break;case 2:j+=`an instance of ${q[0]} or ${q[1]}`;break;default:{const I=q.pop();j+=`an instance of ${q.join(", ")}, or ${I}`}}if(A.length>0)j+=" or "}switch(A.length){case 0:break;case 1:if(A[0].toLowerCase()!==A[0])j+="an ";j+=`${A[0]}`;break;case 2:j+=`one of ${A[0]} or ${A[1]}`;break;default:{const I=A.pop();j+=`one of ${A.join(", ")}, or ${I}`}}if(L==null)j+=`. Received ${L}`;else if(typeof L==="function"&&L.name)j+=`. Received function ${L.name}`;else if(typeof L==="object"){var E;if((E=L.constructor)!==null&&E!==void 0&&E.name)j+=`. Received an instance of ${L.constructor.name}`;else{const I=kQ(L,{depth:-1});j+=`. Received ${I}`}}else{let I=kQ(L,{colors:!1});if(I.length>25)I=`${I.slice(0,25)}...`;j+=`. Received type ${typeof L} (${I})`}return j},TypeError),bQ("ERR_INVALID_ARG_VALUE",(ZQ,F,L="is invalid")=>{let j=kQ(F);if(j.length>128)j=j.slice(0,128)+"...";return`The ${ZQ.includes(".")?"property":"argument"} '${ZQ}' ${L}. Received ${j}`},TypeError),bQ("ERR_INVALID_RETURN_VALUE",(ZQ,F,L)=>{var j;const N=L!==null&&L!==void 0&&(j=L.constructor)!==null&&j!==void 0&&j.name?`instance of ${L.constructor.name}`:`type ${typeof L}`;return`Expected ${ZQ} to be returned from the "${F}" function but got ${N}.`},TypeError),bQ("ERR_MISSING_ARGS",(...ZQ)=>{PQ(ZQ.length>0,"At least one arg needs to be specified");let F;const L=ZQ.length;switch(ZQ=(Array.isArray(ZQ)?ZQ:[ZQ]).map((j)=>`"${j}"`).join(" or "),L){case 1:F+=`The ${ZQ[0]} argument`;break;case 2:F+=`The ${ZQ[0]} and ${ZQ[1]} arguments`;break;default:{const j=ZQ.pop();F+=`The ${ZQ.join(", ")}, and ${j} arguments`}break}return`${F} must be specified`},TypeError),bQ("ERR_OUT_OF_RANGE",(ZQ,F,L)=>{PQ(F,'Missing "range" argument');let j;if(Number.isInteger(L)&&Math.abs(L)>4294967296)j=U(String(L));else if(typeof L==="bigint"){if(j=String(L),L>2n**32n||L<-(2n**32n))j=U(j);j+="n"}else j=kQ(L);return`The value of "${ZQ}" is out of range. It must be ${F}. Received ${j}`},RangeError),bQ("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),bQ("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),bQ("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),bQ("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),bQ("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),bQ("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),bQ("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),bQ("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),bQ("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),bQ("ERR_STREAM_WRITE_AFTER_END","write after end",Error),bQ("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),IQ.exports={AbortError:M,aggregateTwoErrors:W(G),hideStackFrames:W,codes:V}}}),WQ=gQ({"node_modules/readable-stream/lib/internal/validators.js"(B,IQ){var{ArrayIsArray:Y,ArrayPrototypeIncludes:kQ,ArrayPrototypeJoin:yQ,ArrayPrototypeMap:$,NumberIsInteger:TQ,NumberMAX_SAFE_INTEGER:z,NumberMIN_SAFE_INTEGER:hQ,NumberParseInt:pQ,RegExpPrototypeTest:V,String:PQ,StringPrototypeToUpperCase:U,StringPrototypeTrim:uQ}=Yq(),{hideStackFrames:bQ,codes:{ERR_SOCKET_BAD_PORT:W,ERR_INVALID_ARG_TYPE:G,ERR_INVALID_ARG_VALUE:M,ERR_OUT_OF_RANGE:ZQ,ERR_UNKNOWN_SIGNAL:F}}=Oq(),{normalizeEncoding:L}=$q(),{isAsyncFunction:j,isArrayBufferView:N}=$q().types,q={};function A(DQ){return DQ===(DQ|0)}function E(DQ){return DQ===DQ>>>0}var I=/^[0-7]+$/,T="must be a 32-bit unsigned integer or an octal string";function BQ(DQ,k,y){if(typeof DQ==="undefined")DQ=y;if(typeof DQ==="string"){if(!V(I,DQ))throw new M(k,DQ,T);DQ=pQ(DQ,8)}return x(DQ,k,0,4294967295),DQ}var P=bQ((DQ,k,y=hQ,wQ=z)=>{if(typeof DQ!=="number")throw new G(k,"number",DQ);if(!TQ(DQ))throw new ZQ(k,"an integer",DQ);if(DQ<y||DQ>wQ)throw new ZQ(k,`>= ${y} && <= ${wQ}`,DQ)}),x=bQ((DQ,k,y=-2147483648,wQ=2147483647)=>{if(typeof DQ!=="number")throw new G(k,"number",DQ);if(!A(DQ)){if(!TQ(DQ))throw new ZQ(k,"an integer",DQ);throw new ZQ(k,`>= ${y} && <= ${wQ}`,DQ)}if(DQ<y||DQ>wQ)throw new ZQ(k,`>= ${y} && <= ${wQ}`,DQ)}),xQ=bQ((DQ,k,y)=>{if(typeof DQ!=="number")throw new G(k,"number",DQ);if(!E(DQ)){if(!TQ(DQ))throw new ZQ(k,"an integer",DQ);throw new ZQ(k,`>= ${y?1:0} && < 4294967296`,DQ)}if(y&&DQ===0)throw new ZQ(k,">= 1 && < 4294967296",DQ)});function O(DQ,k){if(typeof DQ!=="string")throw new G(k,"string",DQ)}function _(DQ,k){if(typeof DQ!=="number")throw new G(k,"number",DQ)}var OQ=bQ((DQ,k,y)=>{if(!kQ(y,DQ)){const h="must be one of: "+yQ($(y,(p)=>typeof p==="string"?`'${p}'`:PQ(p)),", ");throw new M(k,DQ,h)}});function C(DQ,k){if(typeof DQ!=="boolean")throw new G(k,"boolean",DQ)}var _Q=bQ((DQ,k,y)=>{const wQ=y==null,h=wQ?!1:y.allowArray,p=wQ?!1:y.allowFunction;if(!(wQ?!1:y.nullable)&&DQ===null||!h&&Y(DQ)||typeof DQ!=="object"&&(!p||typeof DQ!=="function"))throw new G(k,"Object",DQ)}),D=bQ((DQ,k,y=0)=>{if(!Y(DQ))throw new G(k,"Array",DQ);if(DQ.length<y){const wQ=`must be longer than ${y}`;throw new M(k,DQ,wQ)}});function w(DQ,k="signal"){if(O(DQ,k),q[DQ]===void 0){if(q[U(DQ)]!==void 0)throw new F(DQ+" (signals must use all capital letters)");throw new F(DQ)}}var CQ=bQ((DQ,k="buffer")=>{if(!N(DQ))throw new G(k,["Buffer","TypedArray","DataView"],DQ)});function v(DQ,k){const y=L(k),wQ=DQ.length;if(y==="hex"&&wQ%2!==0)throw new M("encoding",k,`is invalid for data of length ${wQ}`)}function R(DQ,k="Port",y=!0){if(typeof DQ!=="number"&&typeof DQ!=="string"||typeof DQ==="string"&&uQ(DQ).length===0||+DQ!==+DQ>>>0||DQ>65535||DQ===0&&!y)throw new W(k,DQ,y);return DQ|0}var S=bQ((DQ,k)=>{if(DQ!==void 0&&(DQ===null||typeof DQ!=="object"||!("aborted"in DQ)))throw new G(k,"AbortSignal",DQ)}),YQ=bQ((DQ,k)=>{if(typeof DQ!=="function")throw new G(k,"Function",DQ)}),g=bQ((DQ,k)=>{if(typeof DQ!=="function"||j(DQ))throw new G(k,"Function",DQ)}),f=bQ((DQ,k)=>{if(DQ!==void 0)throw new G(k,"undefined",DQ)});IQ.exports={isInt32:A,isUint32:E,parseFileMode:BQ,validateArray:D,validateBoolean:C,validateBuffer:CQ,validateEncoding:v,validateFunction:YQ,validateInt32:x,validateInteger:P,validateNumber:_,validateObject:_Q,validateOneOf:OQ,validatePlainFunction:g,validatePort:R,validateSignalName:w,validateString:O,validateUint32:xQ,validateUndefined:f,validateAbortSignal:S}}}),_q=gQ({"node_modules/readable-stream/lib/internal/streams/utils.js"(B,IQ){var{Symbol:Y,SymbolAsyncIterator:kQ,SymbolIterator:yQ}=Yq(),$=Y("kDestroyed"),TQ=Y("kIsErrored"),z=Y("kIsReadable"),hQ=Y("kIsDisturbed");function pQ(xQ,O=!1){var _;return!!(xQ&&typeof xQ.pipe==="function"&&typeof xQ.on==="function"&&(!O||typeof xQ.pause==="function"&&typeof xQ.resume==="function")&&(!xQ._writableState||((_=xQ._readableState)===null||_===void 0?void 0:_.readable)!==!1)&&(!xQ._writableState||xQ._readableState))}function V(xQ){var O;return!!(xQ&&typeof xQ.write==="function"&&typeof xQ.on==="function"&&(!xQ._readableState||((O=xQ._writableState)===null||O===void 0?void 0:O.writable)!==!1))}function PQ(xQ){return!!(xQ&&typeof xQ.pipe==="function"&&xQ._readableState&&typeof xQ.on==="function"&&typeof xQ.write==="function")}function U(xQ){return xQ&&(xQ._readableState||xQ._writableState||typeof xQ.write==="function"&&typeof xQ.on==="function"||typeof xQ.pipe==="function"&&typeof xQ.on==="function")}function uQ(xQ,O){if(xQ==null)return!1;if(O===!0)return typeof xQ[kQ]==="function";if(O===!1)return typeof xQ[yQ]==="function";return typeof xQ[kQ]==="function"||typeof xQ[yQ]==="function"}function bQ(xQ){if(!U(xQ))return null;const{_writableState:O,_readableState:_}=xQ,OQ=O||_;return!!(xQ.destroyed||xQ[$]||OQ!==null&&OQ!==void 0&&OQ.destroyed)}function W(xQ){if(!V(xQ))return null;if(xQ.writableEnded===!0)return!0;const O=xQ._writableState;if(O!==null&&O!==void 0&&O.errored)return!1;if(typeof(O===null||O===void 0?void 0:O.ended)!=="boolean")return null;return O.ended}function G(xQ,O){if(!V(xQ))return null;if(xQ.writableFinished===!0)return!0;const _=xQ._writableState;if(_!==null&&_!==void 0&&_.errored)return!1;if(typeof(_===null||_===void 0?void 0:_.finished)!=="boolean")return null;return!!(_.finished||O===!1&&_.ended===!0&&_.length===0)}function M(xQ){if(!pQ(xQ))return null;if(xQ.readableEnded===!0)return!0;const O=xQ._readableState;if(!O||O.errored)return!1;if(typeof(O===null||O===void 0?void 0:O.ended)!=="boolean")return null;return O.ended}function ZQ(xQ,O){if(!pQ(xQ))return null;const _=xQ._readableState;if(_!==null&&_!==void 0&&_.errored)return!1;if(typeof(_===null||_===void 0?void 0:_.endEmitted)!=="boolean")return null;return!!(_.endEmitted||O===!1&&_.ended===!0&&_.length===0)}function F(xQ){if(xQ&&xQ[z]!=null)return xQ[z];if(typeof(xQ===null||xQ===void 0?void 0:xQ.readable)!=="boolean")return null;if(bQ(xQ))return!1;return pQ(xQ)&&xQ.readable&&!ZQ(xQ)}function L(xQ){if(typeof(xQ===null||xQ===void 0?void 0:xQ.writable)!=="boolean")return null;if(bQ(xQ))return!1;return V(xQ)&&xQ.writable&&!W(xQ)}function j(xQ,O){if(!U(xQ))return null;if(bQ(xQ))return!0;if((O===null||O===void 0?void 0:O.readable)!==!1&&F(xQ))return!1;if((O===null||O===void 0?void 0:O.writable)!==!1&&L(xQ))return!1;return!0}function N(xQ){var O,_;if(!U(xQ))return null;if(xQ.writableErrored)return xQ.writableErrored;return(O=(_=xQ._writableState)===null||_===void 0?void 0:_.errored)!==null&&O!==void 0?O:null}function q(xQ){var O,_;if(!U(xQ))return null;if(xQ.readableErrored)return xQ.readableErrored;return(O=(_=xQ._readableState)===null||_===void 0?void 0:_.errored)!==null&&O!==void 0?O:null}function A(xQ){if(!U(xQ))return null;if(typeof xQ.closed==="boolean")return xQ.closed;const{_writableState:O,_readableState:_}=xQ;if(typeof(O===null||O===void 0?void 0:O.closed)==="boolean"||typeof(_===null||_===void 0?void 0:_.closed)==="boolean")return(O===null||O===void 0?void 0:O.closed)||(_===null||_===void 0?void 0:_.closed);if(typeof xQ._closed==="boolean"&&E(xQ))return xQ._closed;return null}function E(xQ){return typeof xQ._closed==="boolean"&&typeof xQ._defaultKeepAlive==="boolean"&&typeof xQ._removedConnection==="boolean"&&typeof xQ._removedContLen==="boolean"}function I(xQ){return typeof xQ._sent100==="boolean"&&E(xQ)}function T(xQ){var O;return typeof xQ._consuming==="boolean"&&typeof xQ._dumped==="boolean"&&((O=xQ.req)===null||O===void 0?void 0:O.upgradeOrConnect)===void 0}function BQ(xQ){if(!U(xQ))return null;const{_writableState:O,_readableState:_}=xQ,OQ=O||_;return!OQ&&I(xQ)||!!(OQ&&OQ.autoDestroy&&OQ.emitClose&&OQ.closed===!1)}function P(xQ){var O;return!!(xQ&&((O=xQ[hQ])!==null&&O!==void 0?O:xQ.readableDidRead||xQ.readableAborted))}function x(xQ){var O,_,OQ,C,_Q,D,w,CQ,v,R;return!!(xQ&&((O=(_=(OQ=(C=(_Q=(D=xQ[TQ])!==null&&D!==void 0?D:xQ.readableErrored)!==null&&_Q!==void 0?_Q:xQ.writableErrored)!==null&&C!==void 0?C:(w=xQ._readableState)===null||w===void 0?void 0:w.errorEmitted)!==null&&OQ!==void 0?OQ:(CQ=xQ._writableState)===null||CQ===void 0?void 0:CQ.errorEmitted)!==null&&_!==void 0?_:(v=xQ._readableState)===null||v===void 0?void 0:v.errored)!==null&&O!==void 0?O:(R=xQ._writableState)===null||R===void 0?void 0:R.errored))}IQ.exports={kDestroyed:$,isDisturbed:P,kIsDisturbed:hQ,isErrored:x,kIsErrored:TQ,isReadable:F,kIsReadable:z,isClosed:A,isDestroyed:bQ,isDuplexNodeStream:PQ,isFinished:j,isIterable:uQ,isReadableNodeStream:pQ,isReadableEnded:M,isReadableFinished:ZQ,isReadableErrored:q,isNodeStream:U,isWritable:L,isWritableNodeStream:V,isWritableEnded:W,isWritableFinished:G,isWritableErrored:N,isServerRequest:T,isServerResponse:I,willEmitClose:BQ}}}),Cq=gQ({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(B,IQ){var{AbortError:Y,codes:kQ}=Oq(),{ERR_INVALID_ARG_TYPE:yQ,ERR_STREAM_PREMATURE_CLOSE:$}=kQ,{once:TQ}=$q(),{validateAbortSignal:z,validateFunction:hQ,validateObject:pQ}=WQ(),{Promise:V}=Yq(),{isClosed:PQ,isReadable:U,isReadableNodeStream:uQ,isReadableFinished:bQ,isReadableErrored:W,isWritable:G,isWritableNodeStream:M,isWritableFinished:ZQ,isWritableErrored:F,isNodeStream:L,willEmitClose:j}=_q();function N(I){return I.setHeader&&typeof I.abort==="function"}var q=()=>{};function A(I,T,BQ){var P,x;if(arguments.length===2)BQ=T,T={};else if(T==null)T={};else pQ(T,"options");hQ(BQ,"callback"),z(T.signal,"options.signal"),BQ=TQ(BQ);const xQ=(P=T.readable)!==null&&P!==void 0?P:uQ(I),O=(x=T.writable)!==null&&x!==void 0?x:M(I);if(!L(I))throw new yQ("stream","Stream",I);const{_writableState:_,_readableState:OQ}=I,C=()=>{if(!I.writable)w()};let _Q=j(I)&&uQ(I)===xQ&&M(I)===O,D=ZQ(I,!1);const w=()=>{if(D=!0,I.destroyed)_Q=!1;if(_Q&&(!I.readable||xQ))return;if(!xQ||CQ)BQ.call(I)};let CQ=bQ(I,!1);const v=()=>{if(CQ=!0,I.destroyed)_Q=!1;if(_Q&&(!I.writable||O))return;if(!O||D)BQ.call(I)},R=(DQ)=>{BQ.call(I,DQ)};let S=PQ(I);const YQ=()=>{S=!0;const DQ=F(I)||W(I);if(DQ&&typeof DQ!=="boolean")return BQ.call(I,DQ);if(xQ&&!CQ&&uQ(I,!0)){if(!bQ(I,!1))return BQ.call(I,new $)}if(O&&!D){if(!ZQ(I,!1))return BQ.call(I,new $)}BQ.call(I)},g=()=>{I.req.on("finish",w)};if(N(I)){if(I.on("complete",w),!_Q)I.on("abort",YQ);if(I.req)g();else I.on("request",g)}else if(O&&!_)I.on("end",C),I.on("close",C);if(!_Q&&typeof I.aborted==="boolean")I.on("aborted",YQ);if(I.on("end",v),I.on("finish",w),T.error!==!1)I.on("error",R);if(I.on("close",YQ),S)RQ(YQ);else if(_!==null&&_!==void 0&&_.errorEmitted||OQ!==null&&OQ!==void 0&&OQ.errorEmitted){if(!_Q)RQ(YQ)}else if(!xQ&&(!_Q||U(I))&&(D||G(I)===!1))RQ(YQ);else if(!O&&(!_Q||G(I))&&(CQ||U(I)===!1))RQ(YQ);else if(OQ&&I.req&&I.aborted)RQ(YQ);const f=()=>{if(BQ=q,I.removeListener("aborted",YQ),I.removeListener("complete",w),I.removeListener("abort",YQ),I.removeListener("request",g),I.req)I.req.removeListener("finish",w);I.removeListener("end",C),I.removeListener("close",C),I.removeListener("finish",w),I.removeListener("end",v),I.removeListener("error",R),I.removeListener("close",YQ)};if(T.signal&&!S){const DQ=()=>{const k=BQ;f(),k.call(I,new Y(void 0,{cause:T.signal.reason}))};if(T.signal.aborted)RQ(DQ);else{const k=BQ;BQ=TQ((...y)=>{T.signal.removeEventListener("abort",DQ),k.apply(I,y)}),T.signal.addEventListener("abort",DQ)}}return f}function E(I,T){return new V((BQ,P)=>{A(I,T,(x)=>{if(x)P(x);else BQ()})})}IQ.exports=A,IQ.exports.finished=E}}),fQ=gQ({"node_modules/readable-stream/lib/internal/streams/operators.js"(B,IQ){var{codes:{ERR_INVALID_ARG_TYPE:Y,ERR_MISSING_ARGS:kQ,ERR_OUT_OF_RANGE:yQ},AbortError:$}=Oq(),{validateAbortSignal:TQ,validateInteger:z,validateObject:hQ}=WQ(),pQ=Yq().Symbol("kWeak"),{finished:V}=Cq(),{ArrayPrototypePush:PQ,MathFloor:U,Number:uQ,NumberIsNaN:bQ,Promise:W,PromiseReject:G,PromisePrototypeCatch:M,Symbol:ZQ}=Yq(),F=ZQ("kEmpty"),L=ZQ("kEof");function j(C,_Q){if(typeof C!=="function")throw new Y("fn",["Function","AsyncFunction"],C);if(_Q!=null)hQ(_Q,"options");if((_Q===null||_Q===void 0?void 0:_Q.signal)!=null)TQ(_Q.signal,"options.signal");let D=1;if((_Q===null||_Q===void 0?void 0:_Q.concurrency)!=null)D=U(_Q.concurrency);return z(D,"concurrency",1),async function*w(){var CQ,v;const R=new AbortController,S=this,YQ=[],g=R.signal,f={signal:g},DQ=()=>R.abort();if(_Q!==null&&_Q!==void 0&&(CQ=_Q.signal)!==null&&CQ!==void 0&&CQ.aborted)DQ();_Q===null||_Q===void 0||(v=_Q.signal)===null||v===void 0||v.addEventListener("abort",DQ);let k,y,wQ=!1;function h(){wQ=!0}async function p(){try{for await(let b of S){var u;if(wQ)return;if(g.aborted)throw new $;try{b=C(b,f)}catch(m){b=G(m)}if(b===F)continue;if(typeof((u=b)===null||u===void 0?void 0:u.catch)==="function")b.catch(h);if(YQ.push(b),k)k(),k=null;if(!wQ&&YQ.length&&YQ.length>=D)await new W((m)=>{y=m})}YQ.push(L)}catch(b){const m=G(b);M(m,h),YQ.push(m)}finally{var $Q;if(wQ=!0,k)k(),k=null;_Q===null||_Q===void 0||($Q=_Q.signal)===null||$Q===void 0||$Q.removeEventListener("abort",DQ)}}p();try{while(!0){while(YQ.length>0){const u=await YQ[0];if(u===L)return;if(g.aborted)throw new $;if(u!==F)yield u;if(YQ.shift(),y)y(),y=null}await new W((u)=>{k=u})}}finally{if(R.abort(),wQ=!0,y)y(),y=null}}.call(this)}function N(C=void 0){if(C!=null)hQ(C,"options");if((C===null||C===void 0?void 0:C.signal)!=null)TQ(C.signal,"options.signal");return async function*_Q(){let D=0;for await(let CQ of this){var w;if(C!==null&&C!==void 0&&(w=C.signal)!==null&&w!==void 0&&w.aborted)throw new $({cause:C.signal.reason});yield[D++,CQ]}}.call(this)}async function q(C,_Q=void 0){for await(let D of T.call(this,C,_Q))return!0;return!1}async function A(C,_Q=void 0){if(typeof C!=="function")throw new Y("fn",["Function","AsyncFunction"],C);return!await q.call(this,async(...D)=>{return!await C(...D)},_Q)}async function E(C,_Q){for await(let D of T.call(this,C,_Q))return D;return}async function I(C,_Q){if(typeof C!=="function")throw new Y("fn",["Function","AsyncFunction"],C);async function D(w,CQ){return await C(w,CQ),F}for await(let w of j.call(this,D,_Q));}function T(C,_Q){if(typeof C!=="function")throw new Y("fn",["Function","AsyncFunction"],C);async function D(w,CQ){if(await C(w,CQ))return w;return F}return j.call(this,D,_Q)}var BQ=class extends kQ{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}};async function P(C,_Q,D){var w;if(typeof C!=="function")throw new Y("reducer",["Function","AsyncFunction"],C);if(D!=null)hQ(D,"options");if((D===null||D===void 0?void 0:D.signal)!=null)TQ(D.signal,"options.signal");let CQ=arguments.length>1;if(D!==null&&D!==void 0&&(w=D.signal)!==null&&w!==void 0&&w.aborted){const g=new $(void 0,{cause:D.signal.reason});throw this.once("error",()=>{}),await V(this.destroy(g)),g}const v=new AbortController,R=v.signal;if(D!==null&&D!==void 0&&D.signal){const g={once:!0,[pQ]:this};D.signal.addEventListener("abort",()=>v.abort(),g)}let S=!1;try{for await(let g of this){var YQ;if(S=!0,D!==null&&D!==void 0&&(YQ=D.signal)!==null&&YQ!==void 0&&YQ.aborted)throw new $;if(!CQ)_Q=g,CQ=!0;else _Q=await C(_Q,g,{signal:R})}if(!S&&!CQ)throw new BQ}finally{v.abort()}return _Q}async function x(C){if(C!=null)hQ(C,"options");if((C===null||C===void 0?void 0:C.signal)!=null)TQ(C.signal,"options.signal");const _Q=[];for await(let w of this){var D;if(C!==null&&C!==void 0&&(D=C.signal)!==null&&D!==void 0&&D.aborted)throw new $(void 0,{cause:C.signal.reason});PQ(_Q,w)}return _Q}function xQ(C,_Q){const D=j.call(this,C,_Q);return async function*w(){for await(let CQ of D)yield*CQ}.call(this)}function O(C){if(C=uQ(C),bQ(C))return 0;if(C<0)throw new yQ("number",">= 0",C);return C}function _(C,_Q=void 0){if(_Q!=null)hQ(_Q,"options");if((_Q===null||_Q===void 0?void 0:_Q.signal)!=null)TQ(_Q.signal,"options.signal");return C=O(C),async function*D(){var w;if(_Q!==null&&_Q!==void 0&&(w=_Q.signal)!==null&&w!==void 0&&w.aborted)throw new $;for await(let v of this){var CQ;if(_Q!==null&&_Q!==void 0&&(CQ=_Q.signal)!==null&&CQ!==void 0&&CQ.aborted)throw new $;if(C--<=0)yield v}}.call(this)}function OQ(C,_Q=void 0){if(_Q!=null)hQ(_Q,"options");if((_Q===null||_Q===void 0?void 0:_Q.signal)!=null)TQ(_Q.signal,"options.signal");return C=O(C),async function*D(){var w;if(_Q!==null&&_Q!==void 0&&(w=_Q.signal)!==null&&w!==void 0&&w.aborted)throw new $;for await(let v of this){var CQ;if(_Q!==null&&_Q!==void 0&&(CQ=_Q.signal)!==null&&CQ!==void 0&&CQ.aborted)throw new $;if(C-- >0)yield v;else return}}.call(this)}IQ.exports.streamReturningOperators={asIndexedPairs:N,drop:_,filter:T,flatMap:xQ,map:j,take:OQ},IQ.exports.promiseReturningOperators={every:A,forEach:I,reduce:P,toArray:x,some:q,find:E}}}),Dq=gQ({"node_modules/readable-stream/lib/internal/streams/destroy.js"(B,IQ){var{aggregateTwoErrors:Y,codes:{ERR_MULTIPLE_CALLBACK:kQ},AbortError:yQ}=Oq(),{Symbol:$}=Yq(),{kDestroyed:TQ,isDestroyed:z,isFinished:hQ,isServerRequest:pQ}=_q(),V="#kDestroy",PQ="#kConstruct";function U(T,BQ,P){if(T){if(T.stack,BQ&&!BQ.errored)BQ.errored=T;if(P&&!P.errored)P.errored=T}}function uQ(T,BQ){const P=this._readableState,x=this._writableState,xQ=x||P;if(x&&x.destroyed||P&&P.destroyed){if(typeof BQ==="function")BQ();return this}if(U(T,x,P),x)x.destroyed=!0;if(P)P.destroyed=!0;if(!xQ.constructed)this.once(V,(O)=>{bQ(this,Y(O,T),BQ)});else bQ(this,T,BQ);return this}function bQ(T,BQ,P){let x=!1;function xQ(O){if(x)return;x=!0;const{_readableState:_,_writableState:OQ}=T;if(U(O,OQ,_),OQ)OQ.closed=!0;if(_)_.closed=!0;if(typeof P==="function")P(O);if(O)RQ(W,T,O);else RQ(G,T)}try{T._destroy(BQ||null,xQ)}catch(O){xQ(O)}}function W(T,BQ){M(T,BQ),G(T)}function G(T){const{_readableState:BQ,_writableState:P}=T;if(P)P.closeEmitted=!0;if(BQ)BQ.closeEmitted=!0;if(P&&P.emitClose||BQ&&BQ.emitClose)T.emit("close")}function M(T,BQ){const P=T?._readableState,x=T?._writableState;if(x?.errorEmitted||P?.errorEmitted)return;if(x)x.errorEmitted=!0;if(P)P.errorEmitted=!0;T?.emit?.("error",BQ)}function ZQ(){const T=this._readableState,BQ=this._writableState;if(T)T.constructed=!0,T.closed=!1,T.closeEmitted=!1,T.destroyed=!1,T.errored=null,T.errorEmitted=!1,T.reading=!1,T.ended=T.readable===!1,T.endEmitted=T.readable===!1;if(BQ)BQ.constructed=!0,BQ.destroyed=!1,BQ.closed=!1,BQ.closeEmitted=!1,BQ.errored=null,BQ.errorEmitted=!1,BQ.finalCalled=!1,BQ.prefinished=!1,BQ.ended=BQ.writable===!1,BQ.ending=BQ.writable===!1,BQ.finished=BQ.writable===!1}function F(T,BQ,P){const x=T?._readableState,xQ=T?._writableState;if(xQ&&xQ.destroyed||x&&x.destroyed)return this;if(x&&x.autoDestroy||xQ&&xQ.autoDestroy)T.destroy(BQ);else if(BQ){if(Error.captureStackTrace(BQ),xQ&&!xQ.errored)xQ.errored=BQ;if(x&&!x.errored)x.errored=BQ;if(P)RQ(M,T,BQ);else M(T,BQ)}}function L(T,BQ){if(typeof T._construct!=="function")return;const{_readableState:P,_writableState:x}=T;if(P)P.constructed=!1;if(x)x.constructed=!1;if(T.once(PQ,BQ),T.listenerCount(PQ)>1)return;RQ(j,T)}function j(T){let BQ=!1;function P(x){if(BQ){F(T,x!==null&&x!==void 0?x:new kQ);return}BQ=!0;const{_readableState:xQ,_writableState:O}=T,_=O||xQ;if(xQ)xQ.constructed=!0;if(O)O.constructed=!0;if(_.destroyed)T.emit(V,x);else if(x)F(T,x,!0);else RQ(N,T)}try{T._construct(P)}catch(x){P(x)}}function N(T){T.emit(PQ)}function q(T){return T&&T.setHeader&&typeof T.abort==="function"}function A(T){T.emit("close")}function E(T,BQ){T.emit("error",BQ),RQ(A,T)}function I(T,BQ){if(!T||z(T))return;if(!BQ&&!hQ(T))BQ=new yQ;if(pQ(T))T.socket=null,T.destroy(BQ);else if(q(T))T.abort();else if(q(T.req))T.req.abort();else if(typeof T.destroy==="function")T.destroy(BQ);else if(typeof T.close==="function")T.close();else if(BQ)RQ(E,T);else RQ(A,T);if(!T.destroyed)T[TQ]=!0}IQ.exports={construct:L,destroyer:I,destroy:uQ,undestroy:ZQ,errorOrDestroy:F}}}),wq=gQ({"node_modules/readable-stream/lib/internal/streams/legacy.js"(B,IQ){var{ArrayIsArray:Y,ObjectSetPrototypeOf:kQ}=Yq();function yQ(TQ){if(!(this instanceof yQ))return new yQ(TQ);Zq.call(this,TQ)}kQ(yQ.prototype,Zq.prototype),kQ(yQ,Zq),yQ.prototype.pipe=function(TQ,z){const hQ=this;function pQ(G){if(TQ.writable&&TQ.write(G)===!1&&hQ.pause)hQ.pause()}hQ.on("data",pQ);function V(){if(hQ.readable&&hQ.resume)hQ.resume()}if(TQ.on("drain",V),!TQ._isStdio&&(!z||z.end!==!1))hQ.on("end",U),hQ.on("close",uQ);let PQ=!1;function U(){if(PQ)return;PQ=!0,TQ.end()}function uQ(){if(PQ)return;if(PQ=!0,typeof TQ.destroy==="function")TQ.destroy()}function bQ(G){if(W(),Zq.listenerCount(this,"error")===0)this.emit("error",G)}$(hQ,"error",bQ),$(TQ,"error",bQ);function W(){hQ.removeListener("data",pQ),TQ.removeListener("drain",V),hQ.removeListener("end",U),hQ.removeListener("close",uQ),hQ.removeListener("error",bQ),TQ.removeListener("error",bQ),hQ.removeListener("end",W),hQ.removeListener("close",W),TQ.removeListener("close",W)}return hQ.on("end",W),hQ.on("close",W),TQ.on("close",W),TQ.emit("pipe",hQ),TQ};function $(TQ,z,hQ){if(typeof TQ.prependListener==="function")return TQ.prependListener(z,hQ);if(!TQ._events||!TQ._events[z])TQ.on(z,hQ);else if(Y(TQ._events[z]))TQ._events[z].unshift(hQ);else TQ._events[z]=[hQ,TQ._events[z]]}IQ.exports={Stream:yQ,prependListener:$}}}),vq=gQ({"node_modules/readable-stream/lib/internal/streams/add-abort-signal.js"(B,IQ){var{AbortError:Y,codes:kQ}=Oq(),yQ=Cq(),{ERR_INVALID_ARG_TYPE:$}=kQ,TQ=(hQ,pQ)=>{if(typeof hQ!=="object"||!("aborted"in hQ))throw new $(pQ,"AbortSignal",hQ)};function z(hQ){return!!(hQ&&typeof hQ.pipe==="function")}IQ.exports.addAbortSignal=function hQ(pQ,V){if(TQ(pQ,"signal"),!z(V))throw new $("stream","stream.Stream",V);return IQ.exports.addAbortSignalNoValidate(pQ,V)},IQ.exports.addAbortSignalNoValidate=function(hQ,pQ){if(typeof hQ!=="object"||!("aborted"in hQ))return pQ;const V=()=>{pQ.destroy(new Y(void 0,{cause:hQ.reason}))};if(hQ.aborted)V();else hQ.addEventListener("abort",V),yQ(pQ,()=>hQ.removeEventListener("abort",V));return pQ}}}),Rq=gQ({"node_modules/readable-stream/lib/internal/streams/state.js"(B,IQ){var{MathFloor:Y,NumberIsInteger:kQ}=Yq(),{ERR_INVALID_ARG_VALUE:yQ}=Oq().codes;function $(hQ,pQ,V){return hQ.highWaterMark!=null?hQ.highWaterMark:pQ?hQ[V]:null}function TQ(hQ){return hQ?16:16384}function z(hQ,pQ,V,PQ){const U=$(pQ,PQ,V);if(U!=null){if(!kQ(U)||U<0){const uQ=PQ?`options.${V}`:"options.highWaterMark";throw new yQ(uQ,U)}return Y(U)}return TQ(hQ.objectMode)}IQ.exports={getHighWaterMark:z,getDefaultHighWaterMark:TQ}}}),Sq=gQ({"node_modules/readable-stream/lib/internal/streams/from.js"(B,IQ){var{PromisePrototypeThen:Y,SymbolAsyncIterator:kQ,SymbolIterator:yQ}=Yq(),{ERR_INVALID_ARG_TYPE:$,ERR_STREAM_NULL_VALUES:TQ}=Oq().codes;function z(hQ,pQ,V){let PQ;if(typeof pQ==="string"||pQ instanceof Buffer)return new hQ({objectMode:!0,...V,read(){this.push(pQ),this.push(null)}});let U;if(pQ&&pQ[kQ])U=!0,PQ=pQ[kQ]();else if(pQ&&pQ[yQ])U=!1,PQ=pQ[yQ]();else throw new $("iterable",["Iterable"],pQ);const uQ=new hQ({objectMode:!0,highWaterMark:1,...V});let bQ=!1;uQ._read=function(){if(!bQ)bQ=!0,G()},uQ._destroy=function(M,ZQ){Y(W(M),()=>RQ(ZQ,M),(F)=>RQ(ZQ,F||M))};async function W(M){const ZQ=M!==void 0&&M!==null,F=typeof PQ.throw==="function";if(ZQ&&F){const{value:L,done:j}=await PQ.throw(M);if(await L,j)return}if(typeof PQ.return==="function"){const{value:L}=await PQ.return();await L}}async function G(){for(;;){try{const{value:M,done:ZQ}=U?await PQ.next():PQ.next();if(ZQ)uQ.push(null);else{const F=M&&typeof M.then==="function"?await M:M;if(F===null)throw bQ=!1,new TQ;else if(uQ.push(F))continue;else bQ=!1}}catch(M){uQ.destroy(M)}break}}return uQ}IQ.exports=z}}),gq,GQ,fq=gQ({"node_modules/readable-stream/lib/internal/streams/readable.js"(B,IQ){var{ArrayPrototypeIndexOf:Y,NumberIsInteger:kQ,NumberIsNaN:yQ,NumberParseInt:$,ObjectDefineProperties:TQ,ObjectKeys:z,ObjectSetPrototypeOf:hQ,Promise:pQ,SafeSet:V,SymbolAsyncIterator:PQ,Symbol:U}=Yq(),uQ=globalThis[Symbol.for("Bun.lazy")]("bun:stream").ReadableState,{Stream:bQ,prependListener:W}=wq();function G(b){if(!(this instanceof G))return new G(b);const m=this instanceof zq();if(this._readableState=new uQ(b,this,m),b){const{read:c,destroy:d,construct:Q,signal:l}=b;if(typeof c==="function")this._read=c;if(typeof d==="function")this._destroy=d;if(typeof Q==="function")this._construct=Q;if(l&&!m)F(l,this)}bQ.call(this,b),T.construct(this,()=>{if(this._readableState.needReadable)E(this,this._readableState)})}hQ(G.prototype,bQ.prototype),hQ(G,bQ),G.prototype.on=function(b,m){const c=bQ.prototype.on.call(this,b,m),d=this._readableState;if(b==="data")if(d.readableListening=this.listenerCount("readable")>0,d.flowing!==!1)Jq&&VQ("in flowing mode!",this.__id),this.resume();else Jq&&VQ("in readable mode!",this.__id);else if(b==="readable"){if(Jq&&VQ("readable listener added!",this.__id),!d.endEmitted&&!d.readableListening){if(d.readableListening=d.needReadable=!0,d.flowing=!1,d.emittedReadable=!1,Jq&&VQ("on readable - state.length, reading, emittedReadable",d.length,d.reading,d.emittedReadable,this.__id),d.length)I(this,d);else if(!d.reading)RQ(f,this)}else if(d.endEmitted)Jq&&VQ("end already emitted...",this.__id)}return c};class M extends G{#q;#Q;#X;#J;constructor(b,m){const{objectMode:c,highWaterMark:d,encoding:Q,signal:l}=b;super({objectMode:c,highWaterMark:d,encoding:Q,signal:l});this.#X=[],this.#q=void 0,this.#J=m,this.#Q=!1}#H(){var b=this.#X,m=0,c=b.length;for(;m<c;m++){const d=b[m];if(b[m]=void 0,!this.push(d,void 0))return this.#X=b.slice(m+1),!0}if(c>0)this.#X=[];return!1}#K(b){b.releaseLock(),this.#q=void 0,this.#Q=!0,this.push(null);return}async _read(){Jq&&VQ("ReadableFromWeb _read()",this.__id);var b=this.#J,m=this.#q;if(b)m=this.#q=b.getReader(),this.#J=void 0;else if(this.#H())return;var c;try{do{var d=!1,Q;const l=m.readMany();if(Bq(l)){if({done:d,value:Q}=await l,this.#Q){this.#X.push(...Q);return}}else({done:d,value:Q}=l);if(d){this.#K(m);return}if(!this.push(Q[0])){this.#X=Q.slice(1);return}for(let i=1,n=Q.length;i<n;i++)if(!this.push(Q[i])){this.#X=Q.slice(i+1);return}}while(!this.#Q)}catch(l){c=l}finally{if(c)throw c}}_destroy(b,m){if(!this.#Q){var c=this.#q;if(c)this.#q=void 0,c.cancel(b).finally(()=>{this.#Q=!0,m(b)});return}try{m(b)}catch(d){globalThis.reportError(d)}}}GQ=M;function ZQ(b,m={}){if(!Eq(b))throw new P("readableStream","ReadableStream",b);OQ(m,"options");const{highWaterMark:c,encoding:d,objectMode:Q=!1,signal:l}=m;if(d!==void 0&&!Buffer.isEncoding(d))throw new xq(d,"options.encoding");return Iq(Q,"options.objectMode"),dq(G,b,m)||new M({highWaterMark:c,encoding:d,objectMode:Q,signal:l},b)}IQ.exports=G,gq=ZQ;var{addAbortSignal:F}=vq(),L=Cq();const{maybeReadMore:j,resume:N,emitReadable:q,onEofChunk:A}=globalThis[Symbol.for("Bun.lazy")]("bun:stream");function E(b,m){process.nextTick(j,b,m)}function I(b,m){Jq&&VQ("NativeReadable - emitReadable",b.__id),q(b,m)}var T=Dq(),{aggregateTwoErrors:BQ,codes:{ERR_INVALID_ARG_TYPE:P,ERR_METHOD_NOT_IMPLEMENTED:x,ERR_OUT_OF_RANGE:xQ,ERR_STREAM_PUSH_AFTER_EOF:O,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:_}}=Oq(),{validateObject:OQ}=WQ(),C=Sq(),_Q=()=>{},{errorOrDestroy:D}=T;G.prototype.destroy=T.destroy,G.prototype._undestroy=T.undestroy,G.prototype._destroy=function(b,m){m(b)},G.prototype[Zq.captureRejectionSymbol]=function(b){this.destroy(b)},G.prototype.push=function(b,m){return w(this,b,m,!1)},G.prototype.unshift=function(b,m){return w(this,b,m,!0)};function w(b,m,c,d){Jq&&VQ("readableAddChunk",m,b.__id);const Q=b._readableState;let l;if(!Q.objectMode){if(typeof m==="string"){if(c=c||Q.defaultEncoding,Q.encoding!==c)if(d&&Q.encoding)m=Buffer.from(m,c).toString(Q.encoding);else m=Buffer.from(m,c),c=""}else if(m instanceof Buffer)c="";else if(bQ._isUint8Array(m)){if(d||!Q.decoder)m=bQ._uint8ArrayToBuffer(m);c=""}else if(m!=null)l=new P("chunk",["string","Buffer","Uint8Array"],m)}if(l)D(b,l);else if(m===null)Q.reading=!1,A(b,Q);else if(Q.objectMode||m&&m.length>0)if(d)if(Q.endEmitted)D(b,new _);else if(Q.destroyed||Q.errored)return!1;else CQ(b,Q,m,!0);else if(Q.ended)D(b,new O);else if(Q.destroyed||Q.errored)return!1;else if(Q.reading=!1,Q.decoder&&!c)if(m=Q.decoder.write(m),Q.objectMode||m.length!==0)CQ(b,Q,m,!1);else E(b,Q);else CQ(b,Q,m,!1);else if(!d)Q.reading=!1,E(b,Q);return!Q.ended&&(Q.length<Q.highWaterMark||Q.length===0)}function CQ(b,m,c,d){if(Jq&&VQ("adding chunk",b.__id),Jq&&VQ("chunk",c.toString(),b.__id),m.flowing&&m.length===0&&!m.sync&&b.listenerCount("data")>0){if(m.multiAwaitDrain)m.awaitDrainWriters.clear();else m.awaitDrainWriters=null;m.dataEmitted=!0,b.emit("data",c)}else{if(m.length+=m.objectMode?1:c.length,d)m.buffer.unshift(c);else m.buffer.push(c);if(Jq&&VQ("needReadable @ addChunk",m.needReadable,b.__id),m.needReadable)I(b,m)}E(b,m)}G.prototype.isPaused=function(){const b=this._readableState;return b.paused===!0||b.flowing===!1},G.prototype.setEncoding=function(b){const m=new Gq(b);this._readableState.decoder=m,this._readableState.encoding=this._readableState.decoder.encoding;const c=this._readableState.buffer;let d="";for(let Q=c.length;Q>0;Q--)d+=m.write(c.shift());if(d!=="")c.push(d);return this._readableState.length=d.length,this};var v=1073741824;function R(b){if(b>v)throw new xQ("size","<= 1GiB",b);else b--,b|=b>>>1,b|=b>>>2,b|=b>>>4,b|=b>>>8,b|=b>>>16,b++;return b}function S(b,m){if(b<=0||m.length===0&&m.ended)return 0;if(m.objectMode)return 1;if(yQ(b)){if(m.flowing&&m.length)return m.buffer.first().length;return m.length}if(b<=m.length)return b;return m.ended?m.length:0}G.prototype.read=function(b){if(Jq&&VQ("read - n =",b,this.__id),!kQ(b))b=$(b,10);const m=this._readableState,c=b;if(b>m.highWaterMark)m.highWaterMark=R(b);if(b!==0)m.emittedReadable=!1;if(b===0&&m.needReadable&&((m.highWaterMark!==0?m.length>=m.highWaterMark:m.length>0)||m.ended)){if(Jq&&VQ("read: emitReadable or endReadable",m.length,m.ended,this.__id),m.length===0&&m.ended)wQ(this);else I(this,m);return null}if(b=S(b,m),b===0&&m.ended){if(Jq&&VQ("read: calling endReadable if length 0 -- length, state.ended",m.length,m.ended,this.__id),m.length===0)wQ(this);return null}let d=m.needReadable;if(Jq&&VQ("need readable",d,this.__id),m.length===0||m.length-b<m.highWaterMark)d=!0,Jq&&VQ("length less than watermark",d,this.__id);if(m.ended||m.reading||m.destroyed||m.errored||!m.constructed)Jq&&VQ("state.constructed?",m.constructed,this.__id),d=!1,Jq&&VQ("reading, ended or constructing",d,this.__id);else if(d){if(Jq&&VQ("do read",this.__id),m.reading=!0,m.sync=!0,m.length===0)m.needReadable=!0;try{var Q=this._read(m.highWaterMark);if(Bq(Q)){Jq&&VQ("async _read",this.__id);const i=Bun.peek(Q);if(Jq&&VQ("peeked promise",i,this.__id),i!==Q)Q=i}if(Bq(Q)&&Q?.then&&X(Q.then))Jq&&VQ("async _read result.then setup",this.__id),Q.then(_Q,function(i){D(this,i)})}catch(i){D(this,i)}if(m.sync=!1,!m.reading)b=S(c,m)}Jq&&VQ("n @ fromList",b,this.__id);let l;if(b>0)l=y(b,m);else l=null;if(Jq&&VQ("ret @ read",l,this.__id),l===null)m.needReadable=m.length<=m.highWaterMark,Jq&&VQ("state.length while ret = null",m.length,this.__id),b=0;else if(m.length-=b,m.multiAwaitDrain)m.awaitDrainWriters.clear();else m.awaitDrainWriters=null;if(m.length===0){if(!m.ended)m.needReadable=!0;if(c!==b&&m.ended)wQ(this)}if(l!==null&&!m.errorEmitted&&!m.closeEmitted)m.dataEmitted=!0,this.emit("data",l);return l},G.prototype._read=function(b){throw new x("_read()")},G.prototype.pipe=function(b,m){const c=this,d=this._readableState;if(d.pipes.length===1){if(!d.multiAwaitDrain)d.multiAwaitDrain=!0,d.awaitDrainWriters=new V(d.awaitDrainWriters?[d.awaitDrainWriters]:[])}d.pipes.push(b),Jq&&VQ("pipe count=%d opts=%j",d.pipes.length,m,c.__id);const l=(!m||m.end!==!1)&&b!==process.stdout&&b!==process.stderr?n:qq;if(d.endEmitted)RQ(l);else c.once("end",l);b.on("unpipe",i);function i(Qq,Xq){if(Jq&&VQ("onunpipe",c.__id),Qq===c){if(Xq&&Xq.hasUnpiped===!1)Xq.hasUnpiped=!0,s()}}function n(){Jq&&VQ("onend",c.__id),b.end()}let o,zQ=!1;function s(){if(Jq&&VQ("cleanup",c.__id),b.removeListener("close",t),b.removeListener("finish",e),o)b.removeListener("drain",o);if(b.removeListener("error",r),b.removeListener("unpipe",i),c.removeListener("end",n),c.removeListener("end",qq),c.removeListener("data",vQ),zQ=!0,o&&d.awaitDrainWriters&&(!b._writableState||b._writableState.needDrain))o()}function a(){if(!zQ){if(d.pipes.length===1&&d.pipes[0]===b)Jq&&VQ("false write response, pause",0,c.__id),d.awaitDrainWriters=b,d.multiAwaitDrain=!1;else if(d.pipes.length>1&&d.pipes.includes(b))Jq&&VQ("false write response, pause",d.awaitDrainWriters.size,c.__id),d.awaitDrainWriters.add(b);c.pause()}if(!o)o=YQ(c,b),b.on("drain",o)}c.on("data",vQ);function vQ(Qq){Jq&&VQ("ondata",c.__id);const Xq=b.write(Qq);if(Jq&&VQ("dest.write",Xq,c.__id),Xq===!1)a()}function r(Qq){if(VQ("onerror",Qq),qq(),b.removeListener("error",r),b.listenerCount("error")===0){const Xq=b._writableState||b._readableState;if(Xq&&!Xq.errorEmitted)D(b,Qq);else b.emit("error",Qq)}}W(b,"error",r);function t(){b.removeListener("finish",e),qq()}b.once("close",t);function e(){VQ("onfinish"),b.removeListener("close",t),qq()}b.once("finish",e);function qq(){VQ("unpipe"),c.unpipe(b)}if(b.emit("pipe",c),b.writableNeedDrain===!0){if(d.flowing)a()}else if(!d.flowing)VQ("pipe resume"),c.resume();return b};function YQ(b,m){return function c(){const d=b._readableState;if(d.awaitDrainWriters===m)VQ("pipeOnDrain",1),d.awaitDrainWriters=null;else if(d.multiAwaitDrain)VQ("pipeOnDrain",d.awaitDrainWriters.size),d.awaitDrainWriters.delete(m);if((!d.awaitDrainWriters||d.awaitDrainWriters.size===0)&&b.listenerCount("data"))b.resume()}}G.prototype.unpipe=function(b){const m=this._readableState,c={hasUnpiped:!1};if(m.pipes.length===0)return this;if(!b){const Q=m.pipes;m.pipes=[],this.pause();for(let l=0;l<Q.length;l++)Q[l].emit("unpipe",this,{hasUnpiped:!1});return this}const d=Y(m.pipes,b);if(d===-1)return this;if(m.pipes.splice(d,1),m.pipes.length===0)this.pause();return b.emit("unpipe",this,c),this},G.prototype.addListener=G.prototype.on,G.prototype.removeListener=function(b,m){const c=bQ.prototype.removeListener.call(this,b,m);if(b==="readable")RQ(g,this);return c},G.prototype.off=G.prototype.removeListener,G.prototype.removeAllListeners=function(b){const m=bQ.prototype.removeAllListeners.apply(this,arguments);if(b==="readable"||b===void 0)RQ(g,this);return m};function g(b){const m=b._readableState;if(m.readableListening=b.listenerCount("readable")>0,m.resumeScheduled&&m.paused===!1)m.flowing=!0;else if(b.listenerCount("data")>0)b.resume();else if(!m.readableListening)m.flowing=null}function f(b){Jq&&VQ("on readable nextTick, calling read(0)",b.__id),b.read(0)}G.prototype.resume=function(){const b=this._readableState;if(!b.flowing)Jq&&VQ("resume",this.__id),b.flowing=!b.readableListening,N(this,b);return b.paused=!1,this},G.prototype.pause=function(){if(Jq&&VQ("call pause flowing=%j",this._readableState.flowing,this.__id),this._readableState.flowing!==!1)Jq&&VQ("pause",this.__id),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this},G.prototype.wrap=function(b){let m=!1;b.on("data",(d)=>{if(!this.push(d)&&b.pause)m=!0,b.pause()}),b.on("end",()=>{this.push(null)}),b.on("error",(d)=>{D(this,d)}),b.on("close",()=>{this.destroy()}),b.on("destroy",()=>{this.destroy()}),this._read=()=>{if(m&&b.resume)m=!1,b.resume()};const c=z(b);for(let d=1;d<c.length;d++){const Q=c[d];if(this[Q]===void 0&&typeof b[Q]==="function")this[Q]=b[Q].bind(b)}return this},G.prototype[PQ]=function(){return DQ(this)},G.prototype.iterator=function(b){if(b!==void 0)OQ(b,"options");return DQ(this,b)};function DQ(b,m){if(typeof b.read!=="function")b=G.wrap(b,{objectMode:!0});const c=k(b,m);return c.stream=b,c}async function*k(b,m){let c=_Q;function d(i){if(this===b)c(),c=_Q;else c=i}b.on("readable",d);let Q;const l=L(b,{writable:!1},(i)=>{Q=i?BQ(Q,i):null,c(),c=_Q});try{while(!0){const i=b.destroyed?null:b.read();if(i!==null)yield i;else if(Q)throw Q;else if(Q===null)return;else await new pQ(d)}}catch(i){throw Q=BQ(Q,i),Q}finally{if((Q||(m===null||m===void 0?void 0:m.destroyOnReturn)!==!1)&&(Q===void 0||b._readableState.autoDestroy))T.destroyer(b,null);else b.off("readable",d),l()}}TQ(G.prototype,{readable:{get(){const b=this._readableState;return!!b&&b.readable!==!1&&!b.destroyed&&!b.errorEmitted&&!b.endEmitted},set(b){if(this._readableState)this._readableState.readable=!!b}},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(b){if(this._readableState)this._readableState.flowing=b}},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(b){if(!this._readableState)return;this._readableState.destroyed=b}},readableEnded:{enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),G._fromList=y;function y(b,m){if(m.length===0)return null;let c;if(m.objectMode)c=m.buffer.shift();else if(!b||b>=m.length){if(m.decoder)c=m.buffer.join("");else if(m.buffer.length===1)c=m.buffer.first();else c=m.buffer.concat(m.length);m.buffer.clear()}else c=m.buffer.consume(b,m.decoder);return c}function wQ(b){const m=b._readableState;if(Jq&&VQ("endEmitted @ endReadable",m.endEmitted,b.__id),!m.endEmitted)m.ended=!0,RQ(h,m,b)}function h(b,m){if(Jq&&VQ("endReadableNT -- endEmitted, state.length",b.endEmitted,b.length,m.__id),!b.errored&&!b.closeEmitted&&!b.endEmitted&&b.length===0){if(b.endEmitted=!0,m.emit("end"),Jq&&VQ("end emitted @ endReadableNT",m.__id),m.writable&&m.allowHalfOpen===!1)RQ(p,m);else if(b.autoDestroy){const c=m._writableState;if(!c||c.autoDestroy&&(c.finished||c.writable===!1))m.destroy()}}}function p(b){if(b.writable&&!b.writableEnded&&!b.destroyed)b.end()}G.from=function(b,m){return C(G,b,m)};var u={newStreamReadableFromReadableStream:ZQ};function $Q(){if(u===void 0)u={};return u}G.fromWeb=function(b,m){return $Q().newStreamReadableFromReadableStream(b,m)},G.toWeb=function(b){return $Q().newReadableStreamFromStreamReadable(b)},G.wrap=function(b,m){var c,d;return new G({objectMode:(c=(d=b.readableObjectMode)!==null&&d!==void 0?d:b.objectMode)!==null&&c!==void 0?c:!0,...m,destroy(Q,l){T.destroyer(b,Q),l(Q)}}).wrap(b)}}}),kq=gQ({"node_modules/readable-stream/lib/internal/streams/writable.js"(B,IQ){var{ArrayPrototypeSlice:Y,Error:kQ,FunctionPrototypeSymbolHasInstance:yQ,ObjectDefineProperty:$,ObjectDefineProperties:TQ,ObjectSetPrototypeOf:z,StringPrototypeToLowerCase:hQ,Symbol:pQ,SymbolHasInstance:V}=Yq(),PQ=wq().Stream,U=Dq(),{addAbortSignal:uQ}=vq(),{getHighWaterMark:bQ,getDefaultHighWaterMark:W}=Rq(),{ERR_INVALID_ARG_TYPE:G,ERR_METHOD_NOT_IMPLEMENTED:M,ERR_MULTIPLE_CALLBACK:ZQ,ERR_STREAM_CANNOT_PIPE:F,ERR_STREAM_DESTROYED:L,ERR_STREAM_ALREADY_FINISHED:j,ERR_STREAM_NULL_VALUES:N,ERR_STREAM_WRITE_AFTER_END:q,ERR_UNKNOWN_ENCODING:A}=Oq().codes,{errorOrDestroy:E}=U;function I(y={}){const wQ=this instanceof zq();if(!wQ&&!yQ(I,this))return new I(y);if(this._writableState=new P(y,this,wQ),y){if(typeof y.write==="function")this._write=y.write;if(typeof y.writev==="function")this._writev=y.writev;if(typeof y.destroy==="function")this._destroy=y.destroy;if(typeof y.final==="function")this._final=y.final;if(typeof y.construct==="function")this._construct=y.construct;if(y.signal)uQ(y.signal,this)}PQ.call(this,y),U.construct(this,()=>{const h=this._writableState;if(!h.writing)CQ(this,h);YQ(this,h)})}z(I.prototype,PQ.prototype),z(I,PQ),IQ.exports=I;function T(){}var BQ=pQ("kOnFinished");function P(y,wQ,h){if(typeof h!=="boolean")h=wQ instanceof zq();if(this.objectMode=!!(y&&y.objectMode),h)this.objectMode=this.objectMode||!!(y&&y.writableObjectMode);this.highWaterMark=y?bQ(this,y,"writableHighWaterMark",h):W(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const p=!!(y&&y.decodeStrings===!1);this.decodeStrings=!p,this.defaultEncoding=y&&y.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=C.bind(void 0,wQ),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,x(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!y||y.emitClose!==!1,this.autoDestroy=!y||y.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[BQ]=[]}function x(y){y.buffered=[],y.bufferedIndex=0,y.allBuffers=!0,y.allNoop=!0}P.prototype.getBuffer=function y(){return Y(this.buffered,this.bufferedIndex)},$(P.prototype,"bufferedRequestCount",{get(){return this.buffered.length-this.bufferedIndex}}),$(I,V,{value:function(y){if(yQ(this,y))return!0;if(this!==I)return!1;return y&&y._writableState instanceof P}}),I.prototype.pipe=function(){E(this,new F)};function xQ(y,wQ,h,p){const u=y._writableState;if(typeof h==="function")p=h,h=u.defaultEncoding;else{if(!h)h=u.defaultEncoding;else if(h!=="buffer"&&!Buffer.isEncoding(h))throw new A(h);if(typeof p!=="function")p=T}if(wQ===null)throw new N;else if(!u.objectMode)if(typeof wQ==="string"){if(u.decodeStrings!==!1)wQ=Buffer.from(wQ,h),h="buffer"}else if(wQ instanceof Buffer)h="buffer";else if(PQ._isUint8Array(wQ))wQ=PQ._uint8ArrayToBuffer(wQ),h="buffer";else throw new G("chunk",["string","Buffer","Uint8Array"],wQ);let $Q;if(u.ending)$Q=new q;else if(u.destroyed)$Q=new L("write");if($Q)return RQ(p,$Q),E(y,$Q,!0),$Q;return u.pendingcb++,O(y,u,wQ,h,p)}I.prototype.write=function(y,wQ,h){return xQ(this,y,wQ,h)===!0},I.prototype.cork=function(){this._writableState.corked++},I.prototype.uncork=function(){const y=this._writableState;if(y.corked){if(y.corked--,!y.writing)CQ(this,y)}},I.prototype.setDefaultEncoding=function y(wQ){if(typeof wQ==="string")wQ=hQ(wQ);if(!Buffer.isEncoding(wQ))throw new A(wQ);return this._writableState.defaultEncoding=wQ,this};function O(y,wQ,h,p,u){const $Q=wQ.objectMode?1:h.length;wQ.length+=$Q;const b=wQ.length<wQ.highWaterMark;if(!b)wQ.needDrain=!0;if(wQ.writing||wQ.corked||wQ.errored||!wQ.constructed){if(wQ.buffered.push({chunk:h,encoding:p,callback:u}),wQ.allBuffers&&p!=="buffer")wQ.allBuffers=!1;if(wQ.allNoop&&u!==T)wQ.allNoop=!1}else wQ.writelen=$Q,wQ.writecb=u,wQ.writing=!0,wQ.sync=!0,y._write(h,p,wQ.onwrite),wQ.sync=!1;return b&&!wQ.errored&&!wQ.destroyed}function _(y,wQ,h,p,u,$Q,b){if(wQ.writelen=p,wQ.writecb=b,wQ.writing=!0,wQ.sync=!0,wQ.destroyed)wQ.onwrite(new L("write"));else if(h)y._writev(u,wQ.onwrite);else y._write(u,$Q,wQ.onwrite);wQ.sync=!1}function OQ(y,wQ,h,p){--wQ.pendingcb,p(h),w(wQ),E(y,h)}function C(y,wQ){const h=y._writableState,p=h.sync,u=h.writecb;if(typeof u!=="function"){E(y,new ZQ);return}if(h.writing=!1,h.writecb=null,h.length-=h.writelen,h.writelen=0,wQ){if(Error.captureStackTrace(wQ),!h.errored)h.errored=wQ;if(y._readableState&&!y._readableState.errored)y._readableState.errored=wQ;if(p)RQ(OQ,y,h,wQ,u);else OQ(y,h,wQ,u)}else{if(h.buffered.length>h.bufferedIndex)CQ(y,h);if(p)if(h.afterWriteTickInfo!==null&&h.afterWriteTickInfo.cb===u)h.afterWriteTickInfo.count++;else h.afterWriteTickInfo={count:1,cb:u,stream:y,state:h},RQ(_Q,h.afterWriteTickInfo);else D(y,h,1,u)}}function _Q({stream:y,state:wQ,count:h,cb:p}){return wQ.afterWriteTickInfo=null,D(y,wQ,h,p)}function D(y,wQ,h,p){if(!wQ.ending&&!y.destroyed&&wQ.length===0&&wQ.needDrain)wQ.needDrain=!1,y.emit("drain");while(h-- >0)wQ.pendingcb--,p();if(wQ.destroyed)w(wQ);YQ(y,wQ)}function w(y){if(y.writing)return;for(let u=y.bufferedIndex;u<y.buffered.length;++u){var wQ;const{chunk:$Q,callback:b}=y.buffered[u],m=y.objectMode?1:$Q.length;y.length-=m,b((wQ=y.errored)!==null&&wQ!==void 0?wQ:new L("write"))}const h=y[BQ].splice(0);for(let u=0;u<h.length;u++){var p;h[u]((p=y.errored)!==null&&p!==void 0?p:new L("end"))}x(y)}function CQ(y,wQ){if(wQ.corked||wQ.bufferProcessing||wQ.destroyed||!wQ.constructed)return;const{buffered:h,bufferedIndex:p,objectMode:u}=wQ,$Q=h.length-p;if(!$Q)return;let b=p;if(wQ.bufferProcessing=!0,$Q>1&&y._writev){wQ.pendingcb-=$Q-1;const m=wQ.allNoop?T:(d)=>{for(let Q=b;Q<h.length;++Q)h[Q].callback(d)},c=wQ.allNoop&&b===0?h:Y(h,b);c.allBuffers=wQ.allBuffers,_(y,wQ,!0,wQ.length,c,"",m),x(wQ)}else{do{const{chunk:m,encoding:c,callback:d}=h[b];h[b++]=null;const Q=u?1:m.length;_(y,wQ,!1,Q,m,c,d)}while(b<h.length&&!wQ.writing);if(b===h.length)x(wQ);else if(b>256)h.splice(0,b),wQ.bufferedIndex=0;else wQ.bufferedIndex=b}wQ.bufferProcessing=!1}I.prototype._write=function(y,wQ,h){if(this._writev)this._writev([{chunk:y,encoding:wQ}],h);else throw new M("_write()")},I.prototype._writev=null,I.prototype.end=function(y,wQ,h,p=!1){const u=this._writableState;if(Jq&&VQ("end",u,this.__id),typeof y==="function")h=y,y=null,wQ=null;else if(typeof wQ==="function")h=wQ,wQ=null;let $Q;if(y!==null&&y!==void 0){let b;if(!p)b=xQ(this,y,wQ);else b=this.write(y,wQ);if(b instanceof kQ)$Q=b}if(u.corked)u.corked=1,this.uncork();if($Q)this.emit("error",$Q);else if(!u.errored&&!u.ending)u.ending=!0,YQ(this,u,!0),u.ended=!0;else if(u.finished)$Q=new j("end");else if(u.destroyed)$Q=new L("end");if(typeof h==="function")if($Q||u.finished)RQ(h,$Q);else u[BQ].push(h);return this};function v(y,wQ){var h=y.ending&&!y.destroyed&&y.constructed&&y.length===0&&!y.errored&&y.buffered.length===0&&!y.finished&&!y.writing&&!y.errorEmitted&&!y.closeEmitted;return VQ("needFinish",h,wQ),h}function R(y,wQ){let h=!1;function p(u){if(h){E(y,u!==null&&u!==void 0?u:ZQ());return}if(h=!0,wQ.pendingcb--,u){const $Q=wQ[BQ].splice(0);for(let b=0;b<$Q.length;b++)$Q[b](u);E(y,u,wQ.sync)}else if(v(wQ))wQ.prefinished=!0,y.emit("prefinish"),wQ.pendingcb++,RQ(g,y,wQ)}wQ.sync=!0,wQ.pendingcb++;try{y._final(p)}catch(u){p(u)}wQ.sync=!1}function S(y,wQ){if(!wQ.prefinished&&!wQ.finalCalled)if(typeof y._final==="function"&&!wQ.destroyed)wQ.finalCalled=!0,R(y,wQ);else wQ.prefinished=!0,y.emit("prefinish")}function YQ(y,wQ,h){if(Jq&&VQ("finishMaybe -- state, sync",wQ,h,y.__id),!v(wQ,y.__id))return;if(S(y,wQ),wQ.pendingcb===0){if(h)wQ.pendingcb++,RQ((p,u)=>{if(v(u))g(p,u);else u.pendingcb--},y,wQ);else if(v(wQ))wQ.pendingcb++,g(y,wQ)}}function g(y,wQ){wQ.pendingcb--,wQ.finished=!0;const h=wQ[BQ].splice(0);for(let p=0;p<h.length;p++)h[p]();if(y.emit("finish"),wQ.autoDestroy){const p=y._readableState;if(!p||p.autoDestroy&&(p.endEmitted||p.readable===!1))y.destroy()}}TQ(I.prototype,{closed:{get(){return this._writableState?this._writableState.closed:!1}},destroyed:{get(){return this._writableState?this._writableState.destroyed:!1},set(y){if(this._writableState)this._writableState.destroyed=y}},writable:{get(){const y=this._writableState;return!!y&&y.writable!==!1&&!y.destroyed&&!y.errored&&!y.ending&&!y.ended},set(y){if(this._writableState)this._writableState.writable=!!y}},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 y=this._writableState;if(!y)return!1;return!y.destroyed&&!y.ending&&y.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 f=U.destroy;I.prototype.destroy=function(y,wQ){const h=this._writableState;if(!h.destroyed&&(h.bufferedIndex<h.buffered.length||h[BQ].length))RQ(w,h);return f.call(this,y,wQ),this},I.prototype._undestroy=U.undestroy,I.prototype._destroy=function(y,wQ){wQ(y)},I.prototype[Zq.captureRejectionSymbol]=function(y){this.destroy(y)};var DQ;function k(){if(DQ===void 0)DQ={};return DQ}I.fromWeb=function(y,wQ){return k().newStreamWritableFromWritableStream(y,wQ)},I.toWeb=function(y){return k().newWritableStreamFromStreamWritable(y)}}}),yq=gQ({"node_modules/readable-stream/lib/internal/streams/duplexify.js"(B,IQ){var{isReadable:Y,isWritable:kQ,isIterable:yQ,isNodeStream:$,isReadableNodeStream:TQ,isWritableNodeStream:z,isDuplexNodeStream:hQ}=_q(),pQ=Cq(),{AbortError:V,codes:{ERR_INVALID_ARG_TYPE:PQ,ERR_INVALID_RETURN_VALUE:U}}=Oq(),{destroyer:uQ}=Dq(),bQ=zq(),W=fq(),{createDeferredPromise:G}=$q(),M=Sq(),ZQ=typeof Blob!=="undefined"?function q(A){return A instanceof Blob}:function q(A){return!1},{FunctionPrototypeCall:F}=Yq();class L extends bQ{constructor(q){super(q);if((q===null||q===void 0?void 0:q.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((q===null||q===void 0?void 0:q.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}IQ.exports=function q(A,E){if(hQ(A))return A;if(TQ(A))return N({readable:A});if(z(A))return N({writable:A});if($(A))return N({writable:!1,readable:!1});if(typeof A==="function"){const{value:T,write:BQ,final:P,destroy:x}=j(A);if(yQ(T))return M(L,T,{objectMode:!0,write:BQ,final:P,destroy:x});const xQ=T===null||T===void 0?void 0:T.then;if(typeof xQ==="function"){let O;const _=F(xQ,T,(OQ)=>{if(OQ!=null)throw new U("nully","body",OQ)},(OQ)=>{uQ(O,OQ)});return O=new L({objectMode:!0,readable:!1,write:BQ,final(OQ){P(async()=>{try{await _,RQ(OQ,null)}catch(C){RQ(OQ,C)}})},destroy:x})}throw new U("Iterable, AsyncIterable or AsyncFunction",E,T)}if(ZQ(A))return q(A.arrayBuffer());if(yQ(A))return M(L,A,{objectMode:!0,writable:!1});if(typeof(A===null||A===void 0?void 0:A.writable)==="object"||typeof(A===null||A===void 0?void 0:A.readable)==="object"){const T=A!==null&&A!==void 0&&A.readable?TQ(A===null||A===void 0?void 0:A.readable)?A===null||A===void 0?void 0:A.readable:q(A.readable):void 0,BQ=A!==null&&A!==void 0&&A.writable?z(A===null||A===void 0?void 0:A.writable)?A===null||A===void 0?void 0:A.writable:q(A.writable):void 0;return N({readable:T,writable:BQ})}const I=A===null||A===void 0?void 0:A.then;if(typeof I==="function"){let T;return F(I,A,(BQ)=>{if(BQ!=null)T.push(BQ);T.push(null)},(BQ)=>{uQ(T,BQ)}),T=new L({objectMode:!0,writable:!1,read(){}})}throw new PQ(E,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],A)};function j(q){let{promise:A,resolve:E}=G();const I=new AbortController,T=I.signal;return{value:q(async function*(){while(!0){const P=A;A=null;const{chunk:x,done:xQ,cb:O}=await P;if(RQ(O),xQ)return;if(T.aborted)throw new V(void 0,{cause:T.reason});({promise:A,resolve:E}=G()),yield x}}(),{signal:T}),write(P,x,xQ){const O=E;E=null,O({chunk:P,done:!1,cb:xQ})},final(P){const x=E;E=null,x({done:!0,cb:P})},destroy(P,x){I.abort(),x(P)}}}function N(q){const A=q.readable&&typeof q.readable.read!=="function"?W.wrap(q.readable):q.readable,E=q.writable;let I=!!Y(A),T=!!kQ(E),BQ,P,x,xQ,O;function _(OQ){const C=xQ;if(xQ=null,C)C(OQ);else if(OQ)O.destroy(OQ);else if(!I&&!T)O.destroy()}if(O=new L({readableObjectMode:!!(A!==null&&A!==void 0&&A.readableObjectMode),writableObjectMode:!!(E!==null&&E!==void 0&&E.writableObjectMode),readable:I,writable:T}),T)pQ(E,(OQ)=>{if(T=!1,OQ)uQ(A,OQ);_(OQ)}),O._write=function(OQ,C,_Q){if(E.write(OQ,C))_Q();else BQ=_Q},O._final=function(OQ){E.end(),P=OQ},E.on("drain",function(){if(BQ){const OQ=BQ;BQ=null,OQ()}}),E.on("finish",function(){if(P){const OQ=P;P=null,OQ()}});if(I)pQ(A,(OQ)=>{if(I=!1,OQ)uQ(A,OQ);_(OQ)}),A.on("readable",function(){if(x){const OQ=x;x=null,OQ()}}),A.on("end",function(){O.push(null)}),O._read=function(){while(!0){const OQ=A.read();if(OQ===null){x=O._read;return}if(!O.push(OQ))return}};return O._destroy=function(OQ,C){if(!OQ&&xQ!==null)OQ=new V;if(x=null,BQ=null,P=null,xQ===null)C(OQ);else xQ=C,uQ(E,OQ),uQ(A,OQ)},O}}}),zq=gQ({"node_modules/readable-stream/lib/internal/streams/duplex.js"(B,IQ){var{ObjectDefineProperties:Y,ObjectGetOwnPropertyDescriptor:kQ,ObjectKeys:yQ,ObjectSetPrototypeOf:$}=Yq(),TQ=fq();function z(U){if(!(this instanceof z))return new z(U);if(TQ.call(this,U),Hq.call(this,U),U){if(this.allowHalfOpen=U.allowHalfOpen!==!1,U.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(U.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}IQ.exports=z,$(z.prototype,TQ.prototype),$(z,TQ);for(var hQ in Hq.prototype)if(!z.prototype[hQ])z.prototype[hQ]=Hq.prototype[hQ];Y(z.prototype,{writable:kQ(Hq.prototype,"writable"),writableHighWaterMark:kQ(Hq.prototype,"writableHighWaterMark"),writableObjectMode:kQ(Hq.prototype,"writableObjectMode"),writableBuffer:kQ(Hq.prototype,"writableBuffer"),writableLength:kQ(Hq.prototype,"writableLength"),writableFinished:kQ(Hq.prototype,"writableFinished"),writableCorked:kQ(Hq.prototype,"writableCorked"),writableEnded:kQ(Hq.prototype,"writableEnded"),writableNeedDrain:kQ(Hq.prototype,"writableNeedDrain"),destroyed:{get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(U){if(this._readableState&&this._writableState)this._readableState.destroyed=U,this._writableState.destroyed=U}}});var pQ;function V(){if(pQ===void 0)pQ={};return pQ}z.fromWeb=function(U,uQ){return V().newStreamDuplexFromReadableWritablePair(U,uQ)},z.toWeb=function(U){return V().newReadableWritablePairFromDuplex(U)};var PQ;z.from=function(U){if(!PQ)PQ=yq();return PQ(U,"body")}}}),hq=gQ({"node_modules/readable-stream/lib/internal/streams/transform.js"(B,IQ){var{ObjectSetPrototypeOf:Y,Symbol:kQ}=Yq(),{ERR_METHOD_NOT_IMPLEMENTED:yQ}=Oq().codes,$=zq();function TQ(V){if(!(this instanceof TQ))return new TQ(V);if($.call(this,V),this._readableState.sync=!1,this[z]=null,V){if(typeof V.transform==="function")this._transform=V.transform;if(typeof V.flush==="function")this._flush=V.flush}this.on("prefinish",pQ.bind(this))}Y(TQ.prototype,$.prototype),Y(TQ,$),IQ.exports=TQ;var z=kQ("kCallback");function hQ(V){if(typeof this._flush==="function"&&!this.destroyed)this._flush((PQ,U)=>{if(PQ){if(V)V(PQ);else this.destroy(PQ);return}if(U!=null)this.push(U);if(this.push(null),V)V()});else if(this.push(null),V)V()}function pQ(){if(this._final!==hQ)hQ.call(this)}TQ.prototype._final=hQ,TQ.prototype._transform=function(V,PQ,U){throw new yQ("_transform()")},TQ.prototype._write=function(V,PQ,U){const uQ=this._readableState,bQ=this._writableState,W=uQ.length;this._transform(V,PQ,(G,M)=>{if(G){U(G);return}if(M!=null)this.push(M);if(bQ.ended||W===uQ.length||uQ.length<uQ.highWaterMark||uQ.highWaterMark===0||uQ.length===0)U();else this[z]=U})},TQ.prototype._read=function(){if(this[z]){const V=this[z];this[z]=null,V()}}}}),J=gQ({"node_modules/readable-stream/lib/internal/streams/passthrough.js"(B,IQ){var{ObjectSetPrototypeOf:Y}=Yq(),kQ=hq();function yQ($){if(!(this instanceof yQ))return new yQ($);kQ.call(this,$)}Y(yQ.prototype,kQ.prototype),Y(yQ,kQ),yQ.prototype._transform=function($,TQ,z){z(null,$)},IQ.exports=yQ}}),pq=gQ({"node_modules/readable-stream/lib/internal/streams/pipeline.js"(B,IQ){var{ArrayIsArray:Y,Promise:kQ,SymbolAsyncIterator:yQ}=Yq(),$=Cq(),{once:TQ}=$q(),z=Dq(),hQ=zq(),{aggregateTwoErrors:pQ,codes:{ERR_INVALID_ARG_TYPE:V,ERR_INVALID_RETURN_VALUE:PQ,ERR_MISSING_ARGS:U,ERR_STREAM_DESTROYED:uQ},AbortError:bQ}=Oq(),{validateFunction:W,validateAbortSignal:G}=WQ(),{isIterable:M,isReadable:ZQ,isReadableNodeStream:F,isNodeStream:L}=_q(),j,N;function q(xQ,O,_){let OQ=!1;xQ.on("close",()=>{OQ=!0});const C=$(xQ,{readable:O,writable:_},(_Q)=>{OQ=!_Q});return{destroy:(_Q)=>{if(OQ)return;OQ=!0,z.destroyer(xQ,_Q||new uQ("pipe"))},cleanup:C}}function A(xQ){return W(xQ[xQ.length-1],"streams[stream.length - 1]"),xQ.pop()}function E(xQ){if(M(xQ))return xQ;else if(F(xQ))return I(xQ);throw new V("val",["Readable","Iterable","AsyncIterable"],xQ)}async function*I(xQ){if(!N)N=fq();yield*N.prototype[yQ].call(xQ)}async function T(xQ,O,_,{end:OQ}){let C,_Q=null;const D=(v)=>{if(v)C=v;if(_Q){const R=_Q;_Q=null,R()}},w=()=>new kQ((v,R)=>{if(C)R(C);else _Q=()=>{if(C)R(C);else v()}});O.on("drain",D);const CQ=$(O,{readable:!1},D);try{if(O.writableNeedDrain)await w();for await(let v of xQ)if(!O.write(v))await w();if(OQ)O.end();await w(),_()}catch(v){_(C!==v?pQ(C,v):v)}finally{CQ(),O.off("drain",D)}}function BQ(...xQ){return P(xQ,TQ(A(xQ)))}function P(xQ,O,_){if(xQ.length===1&&Y(xQ[0]))xQ=xQ[0];if(xQ.length<2)throw new U("streams");const OQ=new AbortController,C=OQ.signal,_Q=_===null||_===void 0?void 0:_.signal,D=[];G(_Q,"options.signal");function w(){g(new bQ)}_Q===null||_Q===void 0||_Q.addEventListener("abort",w);let CQ,v;const R=[];let S=0;function YQ(k){g(k,--S===0)}function g(k,y){if(k&&(!CQ||CQ.code==="ERR_STREAM_PREMATURE_CLOSE"))CQ=k;if(!CQ&&!y)return;while(R.length)R.shift()(CQ);if(_Q===null||_Q===void 0||_Q.removeEventListener("abort",w),OQ.abort(),y){if(!CQ)D.forEach((wQ)=>wQ());RQ(O,CQ,v)}}let f;for(let k=0;k<xQ.length;k++){const y=xQ[k],wQ=k<xQ.length-1,h=k>0,p=wQ||(_===null||_===void 0?void 0:_.end)!==!1,u=k===xQ.length-1;if(L(y)){let $Q=function(b){if(b&&b.name!=="AbortError"&&b.code!=="ERR_STREAM_PREMATURE_CLOSE")YQ(b)};if(p){const{destroy:b,cleanup:m}=q(y,wQ,h);if(R.push(b),ZQ(y)&&u)D.push(m)}if(y.on("error",$Q),ZQ(y)&&u)D.push(()=>{y.removeListener("error",$Q)})}if(k===0)if(typeof y==="function"){if(f=y({signal:C}),!M(f))throw new PQ("Iterable, AsyncIterable or Stream","source",f)}else if(M(y)||F(y))f=y;else f=hQ.from(y);else if(typeof y==="function")if(f=E(f),f=y(f,{signal:C}),wQ){if(!M(f,!0))throw new PQ("AsyncIterable",`transform[${k-1}]`,f)}else{var DQ;if(!j)j=J();const $Q=new j({objectMode:!0}),b=(DQ=f)===null||DQ===void 0?void 0:DQ.then;if(typeof b==="function")S++,b.call(f,(d)=>{if(v=d,d!=null)$Q.write(d);if(p)$Q.end();RQ(YQ)},(d)=>{$Q.destroy(d),RQ(YQ,d)});else if(M(f,!0))S++,T(f,$Q,YQ,{end:p});else throw new PQ("AsyncIterable or Promise","destination",f);f=$Q;const{destroy:m,cleanup:c}=q(f,!1,!0);if(R.push(m),u)D.push(c)}else if(L(y)){if(F(f)){S+=2;const $Q=x(f,y,YQ,{end:p});if(ZQ(y)&&u)D.push($Q)}else if(M(f))S++,T(f,y,YQ,{end:p});else throw new V("val",["Readable","Iterable","AsyncIterable"],f);f=y}else f=hQ.from(y)}if(C!==null&&C!==void 0&&C.aborted||_Q!==null&&_Q!==void 0&&_Q.aborted)RQ(w);return f}function x(xQ,O,_,{end:OQ}){if(xQ.pipe(O,{end:OQ}),OQ)xQ.once("end",()=>O.end());else _();return $(xQ,{readable:!0,writable:!1},(C)=>{const _Q=xQ._readableState;if(C&&C.code==="ERR_STREAM_PREMATURE_CLOSE"&&_Q&&_Q.ended&&!_Q.errored&&!_Q.errorEmitted)xQ.once("end",_).once("error",_);else _(C)}),$(O,{readable:!1,writable:!0},_)}IQ.exports={pipelineImpl:P,pipeline:BQ}}}),uq=gQ({"node_modules/readable-stream/lib/internal/streams/compose.js"(B,IQ){var{pipeline:Y}=pq(),kQ=zq(),{destroyer:yQ}=Dq(),{isNodeStream:$,isReadable:TQ,isWritable:z}=_q(),{AbortError:hQ,codes:{ERR_INVALID_ARG_VALUE:pQ,ERR_MISSING_ARGS:V}}=Oq();IQ.exports=function PQ(...U){if(U.length===0)throw new V("streams");if(U.length===1)return kQ.from(U[0]);const uQ=[...U];if(typeof U[0]==="function")U[0]=kQ.from(U[0]);if(typeof U[U.length-1]==="function"){const A=U.length-1;U[A]=kQ.from(U[A])}for(let A=0;A<U.length;++A){if(!$(U[A]))continue;if(A<U.length-1&&!TQ(U[A]))throw new pQ(`streams[${A}]`,uQ[A],"must be readable");if(A>0&&!z(U[A]))throw new pQ(`streams[${A}]`,uQ[A],"must be writable")}let bQ,W,G,M,ZQ;function F(A){const E=M;if(M=null,E)E(A);else if(A)ZQ.destroy(A);else if(!q&&!N)ZQ.destroy()}const L=U[0],j=Y(U,F),N=!!z(L),q=!!TQ(j);if(ZQ=new kQ({writableObjectMode:!!(L!==null&&L!==void 0&&L.writableObjectMode),readableObjectMode:!!(j!==null&&j!==void 0&&j.writableObjectMode),writable:N,readable:q}),N)ZQ._write=function(A,E,I){if(L.write(A,E))I();else bQ=I},ZQ._final=function(A){L.end(),W=A},L.on("drain",function(){if(bQ){const A=bQ;bQ=null,A()}}),j.on("finish",function(){if(W){const A=W;W=null,A()}});if(q)j.on("readable",function(){if(G){const A=G;G=null,A()}}),j.on("end",function(){ZQ.push(null)}),ZQ._read=function(){while(!0){const A=j.read();if(A===null){G=ZQ._read;return}if(!ZQ.push(A))return}};return ZQ._destroy=function(A,E){if(!A&&M!==null)A=new hQ;if(G=null,bQ=null,W=null,M===null)E(A);else M=E,yQ(j,A)},ZQ}}}),mQ=gQ({"node_modules/readable-stream/lib/stream/promises.js"(B,IQ){var{ArrayPrototypePop:Y,Promise:kQ}=Yq(),{isIterable:yQ,isNodeStream:$}=_q(),{pipelineImpl:TQ}=pq(),{finished:z}=Cq();function hQ(...pQ){return new kQ((V,PQ)=>{let U,uQ;const bQ=pQ[pQ.length-1];if(bQ&&typeof bQ==="object"&&!$(bQ)&&!yQ(bQ)){const W=Y(pQ);U=W.signal,uQ=W.end}TQ(pQ,(W,G)=>{if(W)PQ(W);else V(G)},{signal:U,end:uQ})})}IQ.exports={finished:z,pipeline:hQ}}}),MQ=gQ({"node_modules/readable-stream/lib/stream.js"(B,IQ){var{ObjectDefineProperty:Y,ObjectKeys:kQ,ReflectApply:yQ}=Yq(),{promisify:{custom:$}}=$q(),{streamReturningOperators:TQ,promiseReturningOperators:z}=fQ(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:hQ}}=Oq(),pQ=uq(),{pipeline:V}=pq(),{destroyer:PQ}=Dq(),U=Cq(),uQ=mQ(),bQ=_q(),W=IQ.exports=wq().Stream;W.isDisturbed=bQ.isDisturbed,W.isErrored=bQ.isErrored,W.isWritable=bQ.isWritable,W.isReadable=bQ.isReadable,W.Readable=fq();for(let M of kQ(TQ)){let ZQ=function(...L){if(new.target)throw hQ();return W.Readable.from(yQ(F,this,L))};const F=TQ[M];Y(ZQ,"name",{value:F.name}),Y(ZQ,"length",{value:F.length}),Y(W.Readable.prototype,M,{value:ZQ,enumerable:!1,configurable:!0,writable:!0})}for(let M of kQ(z)){let ZQ=function(...L){if(new.target)throw hQ();return yQ(F,this,L)};const F=z[M];Y(ZQ,"name",{value:F.name}),Y(ZQ,"length",{value:F.length}),Y(W.Readable.prototype,M,{value:ZQ,enumerable:!1,configurable:!0,writable:!0})}W.Writable=kq(),W.Duplex=zq(),W.Transform=hq(),W.PassThrough=J(),W.pipeline=V;var{addAbortSignal:G}=vq();W.addAbortSignal=G,W.finished=U,W.destroy=PQ,W.compose=pQ,Y(W,"promises",{configurable:!0,enumerable:!0,get(){return uQ}}),Y(V,$,{enumerable:!0,get(){return uQ.pipeline}}),Y(U,$,{enumerable:!0,get(){return uQ.finished}}),W.Stream=W,W._isUint8Array=function M(ZQ){return ZQ instanceof Uint8Array},W._uint8ArrayToBuffer=function M(ZQ){return new Buffer(ZQ.buffer,ZQ.byteOffset,ZQ.byteLength)}}}),bq=gQ({"node_modules/readable-stream/lib/ours/index.js"(B,IQ){const Y=MQ(),kQ=mQ(),yQ=Y.Readable.destroy;IQ.exports=Y,IQ.exports._uint8ArrayToBuffer=Y._uint8ArrayToBuffer,IQ.exports._isUint8Array=Y._isUint8Array,IQ.exports.isDisturbed=Y.isDisturbed,IQ.exports.isErrored=Y.isErrored,IQ.exports.isWritable=Y.isWritable,IQ.exports.isReadable=Y.isReadable,IQ.exports.Readable=Y.Readable,IQ.exports.Writable=Y.Writable,IQ.exports.Duplex=Y.Duplex,IQ.exports.Transform=Y.Transform,IQ.exports.PassThrough=Y.PassThrough,IQ.exports.addAbortSignal=Y.addAbortSignal,IQ.exports.finished=Y.finished,IQ.exports.destroy=Y.destroy,IQ.exports.destroy=yQ,IQ.exports.pipeline=Y.pipeline,IQ.exports.compose=Y.compose,IQ.exports._getNativeReadableStreamPrototype=cq,IQ.exports.NativeWritable=XQ,Kq.defineProperty(Y,"promises",{configurable:!0,enumerable:!0,get(){return kQ}}),IQ.exports.Stream=Y.Stream,IQ.exports.default=IQ.exports}}),mq={0:void 0,1:void 0,2:void 0,3:void 0,4:void 0,5:void 0},Hq=kq(),XQ=class B extends Hq{#q;#Q;#X=!0;_construct;_destroy;_final;constructor(IQ,Y={}){super(Y);this._construct=this.#J,this._destroy=this.#K,this._final=this.#Z,this.#q=IQ}#J(IQ){this._writableState.constructed=!0,this.constructed=!0,IQ()}#H(){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(IQ,Y,kQ,yQ=this.#X){if(!yQ)return this.#X=!1,super.write(IQ,Y,kQ);if(!this.#Q)this.#H();var $=this.#Q,TQ=$.write(IQ);if(Bq(TQ))return TQ.then(()=>{this.emit("drain"),$.flush(!0)}),!1;if($.flush(!0),kQ)kQ(null,IQ.byteLength);return!0}end(IQ,Y,kQ,yQ=this.#X){return super.end(IQ,Y,kQ,yQ)}#K(IQ,Y){if(this._writableState.destroyed=!0,Y)Y(IQ)}#Z(IQ){if(this.#Q)this.#Q.end();if(IQ)IQ()}ref(){if(!this.#Q)this.#H();this.#Q.ref()}unref(){if(!this.#Q)return;this.#Q.unref()}},FQ=bq();FQ[Symbol.for("CommonJS")]=0;FQ[Symbol.for("::bunternal::")]={_ReadableFromWeb:gq,_ReadableFromWebForUndici:GQ};var KQ=FQ,lq=FQ._uint8ArrayToBuffer,iq=FQ._isUint8Array,cQ=FQ.isDisturbed,LQ=FQ.isErrored,nq=FQ.isWritable,K=FQ.isReadable,oq=FQ.Readable,Hq=FQ.Writable,sq=FQ.Duplex,aq=FQ.Transform,jQ=FQ.PassThrough,rq=FQ.addAbortSignal,tq=FQ.finished,dQ=FQ.destroy,NQ=FQ.pipeline,eq=FQ.compose,Z=FQ.Stream,qQ=FQ["eos"]=Cq,QQ=FQ._getNativeReadableStreamPrototype,XQ=FQ.NativeWritable,AQ=Z.promises;export{AQ as promises,NQ as pipeline,nq as isWritable,K as isReadable,LQ as isErrored,cQ as isDisturbed,tq as finished,qQ as eos,dQ as destroy,KQ as default,eq as compose,rq as addAbortSignal,lq as _uint8ArrayToBuffer,iq as _isUint8Array,QQ as _getNativeReadableStreamPrototype,Hq as Writable,aq as Transform,Z as Stream,oq as Readable,jQ as PassThrough,XQ as NativeWritable,sq as Duplex};
|