{"version":3,"sources":["../../../src/server/lib/mock-request.ts"],"names":["Stream","fromNodeOutgoingHttpHeaders","toNodeOutgoingHttpHeaders","MockedRequest","Readable","constructor","url","headers","method","socket","readable","httpVersion","httpVersionMajor","httpVersionMinor","Proxy","get","_target","prop","Error","bodyReadable","on","emit","headersDistinct","key","value","Object","entries","Array","isArray","_read","size","connection","aborted","complete","trailers","trailersDistinct","rawTrailers","rawHeaders","setTimeout","MockedResponse","Writable","res","statusMessage","finished","headersSent","buffers","statusCode","Headers","headPromise","Promise","resolve","headPromiseResolve","hasStreamed","reject","err","then","val","resWriter","appendHeader","name","values","v","append","isSent","write","chunk","push","Buffer","isBuffer","from","end","arguments","_implicitHeader","_write","_encoding","callback","writeHead","length","i","setHeader","hasHeader","has","getHeader","undefined","getHeaders","getHeaderNames","keys","delete","set","toString","removeHeader","strictContentLength","writeEarlyHints","req","assignSocket","detachSocket","writeContinue","writeProcessing","upgrading","chunkedEncoding","shouldKeepAlive","useChunkedEncodingByDefault","sendDate","addTrailers","flushHeaders","createRequestResponseMocks"],"mappings":"AAUA,OAAOA,YAAY,SAAQ;AAC3B,SACEC,2BAA2B,EAC3BC,yBAAyB,QACpB,eAAc;AAUrB,OAAO,MAAMC,sBAAsBH,OAAOI,QAAQ;IA4BhDC,YAAY,EACVC,GAAG,EACHC,OAAO,EACPC,MAAM,EACNC,SAAS,IAAI,EACbC,QAAQ,EACa,CAAE;QACvB,KAAK;QA5BP,8EAA8E;aAC9DC,cAAc;aACdC,mBAAmB;aACnBC,mBAAmB;QAInC,qEAAqE;QACrE,qDAAqD;aAC9CJ,SAAiB,IAAIK,MAAiB,CAAC,GAAgB;YAC5DC,KAAK,CAACC,SAASC;gBACb,IAAIA,SAAS,aAAa;oBACxB,MAAM,IAAIC,MAAM;gBAClB;gBAEA,0EAA0E;gBAC1E,kDAAkD;gBAClD,OAAO;YACT;QACF;QAWE,IAAI,CAACZ,GAAG,GAAGA;QACX,IAAI,CAACC,OAAO,GAAGA;QACf,I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