yield-stream
Advanced tools
Comparing version 1.0.5 to 2.0.0
@@ -0,1 +1,2 @@ | ||
import "shim-streams"; | ||
import { GeneratorFn, StreamGenerator } from "./types"; | ||
@@ -2,0 +3,0 @@ /** |
@@ -1,1 +0,6 @@ | ||
const s=(...r)=>r.reduce((e,t)=>async function*(a){for await(const n of e(a))yield*t(n)}),T=(r,...e)=>{const t=s(...e);return c(async function*(){for await(const a of o(r))yield*t(a)})},o=async function*(r,e){const t=r.getReader();for(;!e?.signal.aborted;){const{done:a,value:n}=await t.read();if(a)break;yield n}},c=(r,e)=>new ReadableStream({async start(t){for await(const a of r(e))t.enqueue(a);t.close()}}),d=r=>c(function*(){for(const e of r)yield e}),l=async function*(r){const e=[];for await(const t of o(r))e.push(t),yield e};export*from"./types.js";export{l as buffer,s as compose,c as generateStream,T as pipeline,d as streamArray,o as yieldStream}; | ||
/** __ESM_SHIM_START */ | ||
if(typeof process<"u"){let{dirname:e}=await import("path"),{fileURLToPath:i}=await import("url");globalThis.__filename=i(import.meta.url),globalThis.__dirname=e(globalThis.__filename);let{default:a}=await import("module");globalThis.require=a.createRequire(import.meta.url)} | ||
/** __ESM_SHIM_END */ | ||
if(typeof process<"u"){let{dirname:y}=await import("path"),{fileURLToPath:m}=await import("url");globalThis.__filename=m(import.meta.url),globalThis.__dirname=y(globalThis.__filename);let{default:d}=await import("module");globalThis.require=d.createRequire(import.meta.url)}var Uo=Object.create,pn=Object.defineProperty,Go=Object.getOwnPropertyDescriptor,Jo=Object.getOwnPropertyNames,Ko=Object.getPrototypeOf,Zo=Object.prototype.hasOwnProperty,$o=(y,m)=>()=>(m||y((m={exports:{}}).exports,m),m.exports),Xo=(y,m,d,l)=>{if(m&&typeof m=="object"||typeof m=="function")for(let C of Jo(m))!Zo.call(y,C)&&C!==d&&pn(y,C,{get:()=>m[C],enumerable:!(l=Go(m,C))||l.enumerable});return y},ea=(y,m,d)=>(d=y!=null?Uo(Ko(y)):{},Xo(m||!y||!y.__esModule?pn(d,"default",{value:y,enumerable:!0}):d,y)),ta=$o((y,m)=>{(function(d,l){typeof y=="object"&&typeof m<"u"?l(y):typeof define=="function"&&define.amd?define(["exports"],l):(d=typeof globalThis<"u"?globalThis:d||self,l(d.WebStreamsPolyfill={}))})(y,function(d){"use strict";var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:function(e){return"Symbol("+e+")"};function C(){}function yn(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}var Be=yn();function P(e){return typeof e=="object"&&e!==null||typeof e=="function"}var Zt=C,bt=Promise,mn=Promise.prototype.then,vn=Promise.resolve.bind(bt),gn=Promise.reject.bind(bt);function T(e){return new bt(e)}function h(e){return vn(e)}function s(e){return gn(e)}function L(e,t,r){return mn.call(e,t,r)}function O(e,t,r){L(L(e,t,r),void 0,Zt)}function pt(e,t){O(e,t)}function _t(e,t){O(e,void 0,t)}function Z(e,t,r){return L(e,t,r)}function we(e){L(e,void 0,Zt)}var Fe=function(){var e=Be&&Be.queueMicrotask;if(typeof e=="function")return e;var t=h(void 0);return function(r){return L(t,r)}}();function Ie(e,t,r){if(typeof e!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function $(e,t,r){try{return h(Ie(e,t,r))}catch(n){return s(n)}}var $t=16384,E=function(){function e(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(e.prototype,"length",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.push=function(t){var r=this._back,n=r;r._elements.length===$t-1&&(n={_elements:[],_next:void 0}),r._elements.push(t),n!==r&&(this._back=n,r._next=n),++this._size},e.prototype.shift=function(){var t=this._front,r=t,n=this._cursor,o=n+1,a=t._elements,i=a[n];return o===$t&&(r=t._next,o=0),--this._size,this._cursor=o,t!==r&&(this._front=r),a[n]=void 0,i},e.prototype.forEach=function(t){for(var r=this._cursor,n=this._front,o=n._elements;(r!==o.length||n._next!==void 0)&&!(r===o.length&&(n=n._next,o=n._elements,r=0,o.length===0));)t(o[r]),++r},e.prototype.peek=function(){var t=this._front,r=this._cursor;return t._elements[r]},e}();function Xt(e,t){e._ownerReadableStream=t,t._reader=e,t._state==="readable"?yt(e):t._state==="closed"?wn(e):er(e,t._storedError)}function ht(e,t){var r=e._ownerReadableStream;return W(r,t)}function M(e){e._ownerReadableStream._state==="readable"?mt(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Sn(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function le(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function yt(e){e._closedPromise=T(function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r})}function er(e,t){yt(e),mt(e,t)}function wn(e){yt(e),tr(e)}function mt(e,t){e._closedPromise_reject!==void 0&&(we(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function Sn(e,t){er(e,t)}function tr(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}var rr=l("[[AbortSteps]]"),nr=l("[[ErrorSteps]]"),vt=l("[[CancelSteps]]"),gt=l("[[PullSteps]]"),or=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},Rn=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function Tn(e){return typeof e=="object"||typeof e=="function"}function D(e,t){if(e!==void 0&&!Tn(e))throw new TypeError(t+" is not an object.")}function j(e,t){if(typeof e!="function")throw new TypeError(t+" is not a function.")}function Pn(e){return typeof e=="object"&&e!==null||typeof e=="function"}function ar(e,t){if(!Pn(e))throw new TypeError(t+" is not an object.")}function x(e,t,r){if(e===void 0)throw new TypeError("Parameter "+t+" is required in '"+r+"'.")}function wt(e,t,r){if(e===void 0)throw new TypeError(t+" is required in '"+r+"'.")}function St(e){return Number(e)}function ir(e){return e===0?0:e}function Cn(e){return ir(Rn(e))}function ur(e,t){var r=0,n=Number.MAX_SAFE_INTEGER,o=Number(e);if(o=ir(o),!or(o))throw new TypeError(t+" is not a finite number");if(o=Cn(o),o<r||o>n)throw new TypeError(t+" is outside the accepted range of "+r+" to "+n+", inclusive");return!or(o)||o===0?0:o}function Rt(e,t){if(!U(e))throw new TypeError(t+" is not a ReadableStream.")}function se(e){return new ce(e)}function lr(e,t){e._reader._readRequests.push(t)}function Tt(e,t,r){var n=e._reader,o=n._readRequests.shift();r?o._closeSteps():o._chunkSteps(t)}function Le(e){return e._reader._readRequests.length}function sr(e){var t=e._reader;return!(t===void 0||!Y(t))}var ce=function(){function e(t){if(x(t,1,"ReadableStreamDefaultReader"),Rt(t,"First parameter"),G(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Xt(this,t),this._readRequests=new E}return Object.defineProperty(e.prototype,"closed",{get:function(){return Y(this)?this._closedPromise:s(Me("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(t){return t===void 0&&(t=void 0),Y(this)?this._ownerReadableStream===void 0?s(le("cancel")):ht(this,t):s(Me("cancel"))},e.prototype.read=function(){if(!Y(this))return s(Me("read"));if(this._ownerReadableStream===void 0)return s(le("read from"));var t,r,n=T(function(a,i){t=a,r=i}),o={_chunkSteps:function(a){return t({value:a,done:!1})},_closeSteps:function(){return t({value:void 0,done:!0})},_errorSteps:function(a){return r(a)}};return Se(this,o),n},e.prototype.releaseLock=function(){if(!Y(this))throw Me("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");M(this)}},e}();Object.defineProperties(ce.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof l.toStringTag=="symbol"&&Object.defineProperty(ce.prototype,l.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Y(e){return!P(e)||!Object.prototype.hasOwnProperty.call(e,"_readRequests")?!1:e instanceof ce}function Se(e,t){var r=e._ownerReadableStream;r._disturbed=!0,r._state==="closed"?t._closeSteps():r._state==="errored"?t._errorSteps(r._storedError):r._readableStreamController[gt](t)}function Me(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}var Pt,De;typeof l.asyncIterator=="symbol"&&(De=(Pt={},Pt[l.asyncIterator]=function(){return this},Pt),Object.defineProperty(De,l.asyncIterator,{enumerable:!1}));var cr=function(){function e(t,r){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=t,this._preventCancel=r}return e.prototype.next=function(){var t=this,r=function(){return t._nextSteps()};return this._ongoingPromise=this._ongoingPromise?Z(this._ongoingPromise,r,r):r(),this._ongoingPromise},e.prototype.return=function(t){var r=this,n=function(){return r._returnSteps(t)};return this._ongoingPromise?Z(this._ongoingPromise,n,n):n()},e.prototype._nextSteps=function(){var t=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var r=this._reader;if(r._ownerReadableStream===void 0)return s(le("iterate"));var n,o,a=T(function(u,f){n=u,o=f}),i={_chunkSteps:function(u){t._ongoingPromise=void 0,Fe(function(){return n({value:u,done:!1})})},_closeSteps:function(){t._ongoingPromise=void 0,t._isFinished=!0,M(r),n({value:void 0,done:!0})},_errorSteps:function(u){t._ongoingPromise=void 0,t._isFinished=!0,M(r),o(u)}};return Se(r,i),a},e.prototype._returnSteps=function(t){if(this._isFinished)return Promise.resolve({value:t,done:!0});this._isFinished=!0;var r=this._reader;if(r._ownerReadableStream===void 0)return s(le("finish iterating"));if(!this._preventCancel){var n=ht(r,t);return M(r),Z(n,function(){return{value:t,done:!0}})}return M(r),h({value:t,done:!0})},e}(),fr={next:function(){return dr(this)?this._asyncIteratorImpl.next():s(br("next"))},return:function(e){return dr(this)?this._asyncIteratorImpl.return(e):s(br("return"))}};De!==void 0&&Object.setPrototypeOf(fr,De);function qn(e,t){var r=se(e),n=new cr(r,t),o=Object.create(fr);return o._asyncIteratorImpl=n,o}function dr(e){if(!P(e)||!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof cr}catch{return!1}}function br(e){return new TypeError("ReadableStreamAsyncIterator."+e+" can only be used on a ReadableSteamAsyncIterator")}var pr=Number.isNaN||function(e){return e!==e};function Re(e){return e.slice()}function _r(e,t,r,n,o){new Uint8Array(e).set(new Uint8Array(r,n,o),t)}function oa(e){return e}function xe(e){return!1}function hr(e,t,r){if(e.slice)return e.slice(t,r);var n=r-t,o=new ArrayBuffer(n);return _r(o,0,e,t,n),o}function On(e){return!(typeof e!="number"||pr(e)||e<0)}function yr(e){var t=hr(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function Ct(e){var t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function qt(e,t,r){if(!On(r)||r===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function En(e){var t=e._queue.peek();return t.value}function H(e){e._queue=new E,e._queueTotalSize=0}var fe=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!Ot(this))throw Wt("view");return this._view},enumerable:!1,configurable:!0}),e.prototype.respond=function(t){if(!Ot(this))throw Wt("respond");if(x(t,1,"respond"),t=ur(t,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");xe(this._view.buffer),Ve(this._associatedReadableByteStreamController,t)},e.prototype.respondWithNewView=function(t){if(!Ot(this))throw Wt("respondWithNewView");if(x(t,1,"respondWithNewView"),!ArrayBuffer.isView(t))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");xe(t.buffer),Ue(this._associatedReadableByteStreamController,t)},e}();Object.defineProperties(fe.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof l.toStringTag=="symbol"&&Object.defineProperty(fe.prototype,l.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var X=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"byobRequest",{get:function(){if(!ee(this))throw Pe("byobRequest");return kt(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!ee(this))throw Pe("desiredSize");return Pr(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!ee(this))throw Pe("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var t=this._controlledReadableByteStream._state;if(t!=="readable")throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be closed");Te(this)},e.prototype.enqueue=function(t){if(!ee(this))throw Pe("enqueue");if(x(t,1,"enqueue"),!ArrayBuffer.isView(t))throw new TypeError("chunk must be an array buffer view");if(t.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(t.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");var r=this._controlledReadableByteStream._state;if(r!=="readable")throw new TypeError("The stream (in "+r+" state) is not in the readable state and cannot be enqueued to");He(this,t)},e.prototype.error=function(t){if(t===void 0&&(t=void 0),!ee(this))throw Pe("error");k(this,t)},e.prototype[vt]=function(t){mr(this),H(this);var r=this._cancelAlgorithm(t);return Ye(this),r},e.prototype[gt]=function(t){var r=this._controlledReadableByteStream;if(this._queueTotalSize>0){var n=this._queue.shift();this._queueTotalSize-=n.byteLength,Sr(this);var o=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);t._chunkSteps(o);return}var a=this._autoAllocateChunkSize;if(a!==void 0){var i=void 0;try{i=new ArrayBuffer(a)}catch(f){t._errorSteps(f);return}var u={buffer:i,bufferByteLength:a,byteOffset:0,byteLength:a,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(u)}lr(r,t),te(this)},e}();Object.defineProperties(X.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof l.toStringTag=="symbol"&&Object.defineProperty(X.prototype,l.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function ee(e){return!P(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")?!1:e instanceof X}function Ot(e){return!P(e)||!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")?!1:e instanceof fe}function te(e){var t=An(e);if(t){if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;var r=e._pullAlgorithm();O(r,function(){e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,te(e))},function(n){k(e,n)})}}function mr(e){jt(e),e._pendingPullIntos=new E}function Et(e,t){var r=!1;e._state==="closed"&&(r=!0);var n=vr(t);t.readerType==="default"?Tt(e,n,r):Fn(e,n,r)}function vr(e){var t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function Ne(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function gr(e,t){var r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,o=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+o,i=a-a%r,u=o,f=!1;i>n&&(u=i-t.bytesFilled,f=!0);for(var b=e._queue;u>0;){var p=b.peek(),_=Math.min(u,p.byteLength),S=t.byteOffset+t.bytesFilled;_r(t.buffer,S,p.buffer,p.byteOffset,_),p.byteLength===_?b.shift():(p.byteOffset+=_,p.byteLength-=_),e._queueTotalSize-=_,wr(e,_,t),u-=_}return f}function wr(e,t,r){r.bytesFilled+=t}function Sr(e){e._queueTotalSize===0&&e._closeRequested?(Ye(e),je(e._controlledReadableByteStream)):te(e)}function jt(e){e._byobRequest!==null&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Rr(e){for(;e._pendingPullIntos.length>0;){if(e._queueTotalSize===0)return;var t=e._pendingPullIntos.peek();gr(e,t)&&(Qe(e),Et(e._controlledReadableByteStream,t))}}function jn(e,t,r){var n=e._controlledReadableByteStream,o=1;t.constructor!==DataView&&(o=t.constructor.BYTES_PER_ELEMENT);var a=t.constructor,i=t.buffer,u={buffer:i,bufferByteLength:i.byteLength,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:o,viewConstructor:a,readerType:"byob"};if(e._pendingPullIntos.length>0){e._pendingPullIntos.push(u),Or(n,r);return}if(n._state==="closed"){var f=new a(u.buffer,u.byteOffset,0);r._closeSteps(f);return}if(e._queueTotalSize>0){if(gr(e,u)){var b=vr(u);Sr(e),r._chunkSteps(b);return}if(e._closeRequested){var p=new TypeError("Insufficient bytes to fill elements in the given buffer");k(e,p),r._errorSteps(p);return}}e._pendingPullIntos.push(u),Or(n,r),te(e)}function kn(e,t){var r=e._controlledReadableByteStream;if(At(r))for(;Er(r)>0;){var n=Qe(e);Et(r,n)}}function Wn(e,t,r){if(wr(e,t,r),!(r.bytesFilled<r.elementSize)){Qe(e);var n=r.bytesFilled%r.elementSize;if(n>0){var o=r.byteOffset+r.bytesFilled,a=hr(r.buffer,o-n,o);Ne(e,a,0,a.byteLength)}r.bytesFilled-=n,Et(e._controlledReadableByteStream,r),Rr(e)}}function Tr(e,t){var r=e._pendingPullIntos.peek();jt(e);var n=e._controlledReadableByteStream._state;n==="closed"?kn(e):Wn(e,t,r),te(e)}function Qe(e){var t=e._pendingPullIntos.shift();return t}function An(e){var t=e._controlledReadableByteStream;if(t._state!=="readable"||e._closeRequested||!e._started)return!1;if(sr(t)&&Le(t)>0||At(t)&&Er(t)>0)return!0;var r=Pr(e);return r>0}function Ye(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function Te(e){var t=e._controlledReadableByteStream;if(!(e._closeRequested||t._state!=="readable")){if(e._queueTotalSize>0){e._closeRequested=!0;return}if(e._pendingPullIntos.length>0){var r=e._pendingPullIntos.peek();if(r.bytesFilled>0){var n=new TypeError("Insufficient bytes to fill elements in the given buffer");throw k(e,n),n}}Ye(e),je(t)}}function He(e,t){var r=e._controlledReadableByteStream;if(!(e._closeRequested||r._state!=="readable")){var n=t.buffer,o=t.byteOffset,a=t.byteLength,i=n;if(e._pendingPullIntos.length>0){var u=e._pendingPullIntos.peek();xe(u.buffer),u.buffer=u.buffer}if(jt(e),sr(r))if(Le(r)===0)Ne(e,i,o,a);else{e._pendingPullIntos.length>0&&Qe(e);var f=new Uint8Array(i,o,a);Tt(r,f,!1)}else At(r)?(Ne(e,i,o,a),Rr(e)):Ne(e,i,o,a);te(e)}}function k(e,t){var r=e._controlledReadableByteStream;r._state==="readable"&&(mr(e),H(e),Ye(e),Xr(r,t))}function kt(e){if(e._byobRequest===null&&e._pendingPullIntos.length>0){var t=e._pendingPullIntos.peek(),r=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),n=Object.create(fe.prototype);Bn(n,e,r),e._byobRequest=n}return e._byobRequest}function Pr(e){var t=e._controlledReadableByteStream._state;return t==="errored"?null:t==="closed"?0:e._strategyHWM-e._queueTotalSize}function Ve(e,t){var r=e._pendingPullIntos.peek(),n=e._controlledReadableByteStream._state;if(n==="closed"){if(t!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(t===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range")}r.buffer=r.buffer,Tr(e,t)}function Ue(e,t){var r=e._pendingPullIntos.peek(),n=e._controlledReadableByteStream._state;if(n==="closed"){if(t.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(t.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(r.bytesFilled+t.byteLength>r.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");var o=t.byteLength;r.buffer=t.buffer,Tr(e,o)}function Cr(e,t,r,n,o,a,i){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,H(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=o,t._autoAllocateChunkSize=i,t._pendingPullIntos=new E,e._readableStreamController=t;var u=r();O(h(u),function(){t._started=!0,te(t)},function(f){k(t,f)})}function zn(e,t,r){var n=Object.create(X.prototype),o=function(){},a=function(){return h(void 0)},i=function(){return h(void 0)};t.start!==void 0&&(o=function(){return t.start(n)}),t.pull!==void 0&&(a=function(){return t.pull(n)}),t.cancel!==void 0&&(i=function(f){return t.cancel(f)});var u=t.autoAllocateChunkSize;if(u===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Cr(e,n,o,a,i,r,u)}function Bn(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}function Wt(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function Pe(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}function qr(e){return new de(e)}function Or(e,t){e._reader._readIntoRequests.push(t)}function Fn(e,t,r){var n=e._reader,o=n._readIntoRequests.shift();r?o._closeSteps(t):o._chunkSteps(t)}function Er(e){return e._reader._readIntoRequests.length}function At(e){var t=e._reader;return!(t===void 0||!re(t))}var de=function(){function e(t){if(x(t,1,"ReadableStreamBYOBReader"),Rt(t,"First parameter"),G(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!ee(t._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Xt(this,t),this._readIntoRequests=new E}return Object.defineProperty(e.prototype,"closed",{get:function(){return re(this)?this._closedPromise:s(Ge("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(t){return t===void 0&&(t=void 0),re(this)?this._ownerReadableStream===void 0?s(le("cancel")):ht(this,t):s(Ge("cancel"))},e.prototype.read=function(t){if(!re(this))return s(Ge("read"));if(!ArrayBuffer.isView(t))return s(new TypeError("view must be an array buffer view"));if(t.byteLength===0)return s(new TypeError("view must have non-zero byteLength"));if(t.buffer.byteLength===0)return s(new TypeError("view's buffer must have non-zero byteLength"));if(xe(t.buffer),this._ownerReadableStream===void 0)return s(le("read from"));var r,n,o=T(function(i,u){r=i,n=u}),a={_chunkSteps:function(i){return r({value:i,done:!1})},_closeSteps:function(i){return r({value:i,done:!0})},_errorSteps:function(i){return n(i)}};return jr(this,t,a),o},e.prototype.releaseLock=function(){if(!re(this))throw Ge("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");M(this)}},e}();Object.defineProperties(de.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof l.toStringTag=="symbol"&&Object.defineProperty(de.prototype,l.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function re(e){return!P(e)||!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")?!1:e instanceof de}function jr(e,t,r){var n=e._ownerReadableStream;n._disturbed=!0,n._state==="errored"?r._errorSteps(n._storedError):jn(n._readableStreamController,t,r)}function Ge(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}function Ce(e,t){var r=e.highWaterMark;if(r===void 0)return t;if(pr(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function Je(e){var t=e.size;return t||function(){return 1}}function Ke(e,t){D(e,t);var r=e?.highWaterMark,n=e?.size;return{highWaterMark:r===void 0?void 0:St(r),size:n===void 0?void 0:In(n,t+" has member 'size' that")}}function In(e,t){return j(e,t),function(r){return St(e(r))}}function Ln(e,t){D(e,t);var r=e?.abort,n=e?.close,o=e?.start,a=e?.type,i=e?.write;return{abort:r===void 0?void 0:Mn(r,e,t+" has member 'abort' that"),close:n===void 0?void 0:Dn(n,e,t+" has member 'close' that"),start:o===void 0?void 0:xn(o,e,t+" has member 'start' that"),write:i===void 0?void 0:Nn(i,e,t+" has member 'write' that"),type:a}}function Mn(e,t,r){return j(e,r),function(n){return $(e,t,[n])}}function Dn(e,t,r){return j(e,r),function(){return $(e,t,[])}}function xn(e,t,r){return j(e,r),function(n){return Ie(e,t,[n])}}function Nn(e,t,r){return j(e,r),function(n,o){return $(e,t,[n,o])}}function kr(e,t){if(!pe(e))throw new TypeError(t+" is not a WritableStream.")}function Qn(e){if(typeof e!="object"||e===null)return!1;try{return typeof e.aborted=="boolean"}catch{return!1}}var Yn=typeof AbortController=="function";function Hn(){if(Yn)return new AbortController}var be=function(){function e(t,r){t===void 0&&(t={}),r===void 0&&(r={}),t===void 0?t=null:ar(t,"First parameter");var n=Ke(r,"Second parameter"),o=Ln(t,"First parameter");Ar(this);var a=o.type;if(a!==void 0)throw new RangeError("Invalid type is specified");var i=Je(n),u=Ce(n,1);ao(this,o,u,i)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!pe(this))throw tt("locked");return _e(this)},enumerable:!1,configurable:!0}),e.prototype.abort=function(t){return t===void 0&&(t=void 0),pe(this)?_e(this)?s(new TypeError("Cannot abort a stream that already has a writer")):Ze(this,t):s(tt("abort"))},e.prototype.close=function(){return pe(this)?_e(this)?s(new TypeError("Cannot close a stream that already has a writer")):z(this)?s(new TypeError("Cannot close an already-closing stream")):zr(this):s(tt("close"))},e.prototype.getWriter=function(){if(!pe(this))throw tt("getWriter");return Wr(this)},e}();Object.defineProperties(be.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof l.toStringTag=="symbol"&&Object.defineProperty(be.prototype,l.toStringTag,{value:"WritableStream",configurable:!0});function Wr(e){return new he(e)}function Vn(e,t,r,n,o,a){o===void 0&&(o=1),a===void 0&&(a=function(){return 1});var i=Object.create(be.prototype);Ar(i);var u=Object.create(oe.prototype);return Dr(i,u,e,t,r,n,o,a),i}function Ar(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new E,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function pe(e){return!P(e)||!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")?!1:e instanceof be}function _e(e){return e._writer!==void 0}function Ze(e,t){var r;if(e._state==="closed"||e._state==="errored")return h(void 0);e._writableStreamController._abortReason=t,(r=e._writableStreamController._abortController)===null||r===void 0||r.abort();var n=e._state;if(n==="closed"||n==="errored")return h(void 0);if(e._pendingAbortRequest!==void 0)return e._pendingAbortRequest._promise;var o=!1;n==="erroring"&&(o=!0,t=void 0);var a=T(function(i,u){e._pendingAbortRequest={_promise:void 0,_resolve:i,_reject:u,_reason:t,_wasAlreadyErroring:o}});return e._pendingAbortRequest._promise=a,o||Bt(e,t),a}function zr(e){var t=e._state;if(t==="closed"||t==="errored")return s(new TypeError("The stream (in "+t+" state) is not in the writable state and cannot be closed"));var r=T(function(o,a){var i={_resolve:o,_reject:a};e._closeRequest=i}),n=e._writer;return n!==void 0&&e._backpressure&&t==="writable"&&Yt(n),io(e._writableStreamController),r}function Un(e){var t=T(function(r,n){var o={_resolve:r,_reject:n};e._writeRequests.push(o)});return t}function zt(e,t){var r=e._state;if(r==="writable"){Bt(e,t);return}Ft(e)}function Bt(e,t){var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;n!==void 0&&Fr(n,t),!$n(e)&&r._started&&Ft(e)}function Ft(e){e._state="errored",e._writableStreamController[nr]();var t=e._storedError;if(e._writeRequests.forEach(function(o){o._reject(t)}),e._writeRequests=new E,e._pendingAbortRequest===void 0){$e(e);return}var r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring){r._reject(t),$e(e);return}var n=e._writableStreamController[rr](r._reason);O(n,function(){r._resolve(),$e(e)},function(o){r._reject(o),$e(e)})}function Gn(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function Jn(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,zt(e,t)}function Kn(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0;var t=e._state;t==="erroring"&&(e._storedError=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var r=e._writer;r!==void 0&&Yr(r)}function Zn(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),zt(e,t)}function z(e){return!(e._closeRequest===void 0&&e._inFlightCloseRequest===void 0)}function $n(e){return!(e._inFlightWriteRequest===void 0&&e._inFlightCloseRequest===void 0)}function Xn(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function eo(e){e._inFlightWriteRequest=e._writeRequests.shift()}function $e(e){e._closeRequest!==void 0&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;t!==void 0&&Nt(t,e._storedError)}function It(e,t){var r=e._writer;r!==void 0&&t!==e._backpressure&&(t?po(r):Yt(r)),e._backpressure=t}var he=function(){function e(t){if(x(t,1,"WritableStreamDefaultWriter"),kr(t,"First parameter"),_e(t))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=t,t._writer=this;var r=t._state;if(r==="writable")!z(t)&&t._backpressure?nt(this):Hr(this),rt(this);else if(r==="erroring")Qt(this,t._storedError),rt(this);else if(r==="closed")Hr(this),fo(this);else{var n=t._storedError;Qt(this,n),Qr(this,n)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return ne(this)?this._closedPromise:s(ae("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!ne(this))throw ae("desiredSize");if(this._ownerWritableStream===void 0)throw qe("desiredSize");return oo(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return ne(this)?this._readyPromise:s(ae("ready"))},enumerable:!1,configurable:!0}),e.prototype.abort=function(t){return t===void 0&&(t=void 0),ne(this)?this._ownerWritableStream===void 0?s(qe("abort")):to(this,t):s(ae("abort"))},e.prototype.close=function(){if(!ne(this))return s(ae("close"));var t=this._ownerWritableStream;return t===void 0?s(qe("close")):z(t)?s(new TypeError("Cannot close an already-closing stream")):Br(this)},e.prototype.releaseLock=function(){if(!ne(this))throw ae("releaseLock");var t=this._ownerWritableStream;t!==void 0&&Ir(this)},e.prototype.write=function(t){return t===void 0&&(t=void 0),ne(this)?this._ownerWritableStream===void 0?s(qe("write to")):Lr(this,t):s(ae("write"))},e}();Object.defineProperties(he.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),typeof l.toStringTag=="symbol"&&Object.defineProperty(he.prototype,l.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function ne(e){return!P(e)||!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")?!1:e instanceof he}function to(e,t){var r=e._ownerWritableStream;return Ze(r,t)}function Br(e){var t=e._ownerWritableStream;return zr(t)}function ro(e){var t=e._ownerWritableStream,r=t._state;return z(t)||r==="closed"?h(void 0):r==="errored"?s(t._storedError):Br(e)}function no(e,t){e._closedPromiseState==="pending"?Nt(e,t):bo(e,t)}function Fr(e,t){e._readyPromiseState==="pending"?Vr(e,t):_o(e,t)}function oo(e){var t=e._ownerWritableStream,r=t._state;return r==="errored"||r==="erroring"?null:r==="closed"?0:xr(t._writableStreamController)}function Ir(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Fr(e,r),no(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function Lr(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,o=uo(n,t);if(r!==e._ownerWritableStream)return s(qe("write to"));var a=r._state;if(a==="errored")return s(r._storedError);if(z(r)||a==="closed")return s(new TypeError("The stream is closing or closed and cannot be written to"));if(a==="erroring")return s(r._storedError);var i=Un(r);return lo(n,t,o),i}var Mr={},oe=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"abortReason",{get:function(){if(!Lt(this))throw xt("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"signal",{get:function(){if(!Lt(this))throw xt("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal},enumerable:!1,configurable:!0}),e.prototype.error=function(t){if(t===void 0&&(t=void 0),!Lt(this))throw xt("error");var r=this._controlledWritableStream._state;r==="writable"&&Nr(this,t)},e.prototype[rr]=function(t){var r=this._abortAlgorithm(t);return Xe(this),r},e.prototype[nr]=function(){H(this)},e}();Object.defineProperties(oe.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof l.toStringTag=="symbol"&&Object.defineProperty(oe.prototype,l.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Lt(e){return!P(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")?!1:e instanceof oe}function Dr(e,t,r,n,o,a,i,u){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,H(t),t._abortReason=void 0,t._abortController=Hn(),t._started=!1,t._strategySizeAlgorithm=u,t._strategyHWM=i,t._writeAlgorithm=n,t._closeAlgorithm=o,t._abortAlgorithm=a;var f=Dt(t);It(e,f);var b=r(),p=h(b);O(p,function(){t._started=!0,et(t)},function(_){t._started=!0,zt(e,_)})}function ao(e,t,r,n){var o=Object.create(oe.prototype),a=function(){},i=function(){return h(void 0)},u=function(){return h(void 0)},f=function(){return h(void 0)};t.start!==void 0&&(a=function(){return t.start(o)}),t.write!==void 0&&(i=function(b){return t.write(b,o)}),t.close!==void 0&&(u=function(){return t.close()}),t.abort!==void 0&&(f=function(b){return t.abort(b)}),Dr(e,o,a,i,u,f,r,n)}function Xe(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function io(e){qt(e,Mr,0),et(e)}function uo(e,t){try{return e._strategySizeAlgorithm(t)}catch(r){return Mt(e,r),1}}function xr(e){return e._strategyHWM-e._queueTotalSize}function lo(e,t,r){try{qt(e,t,r)}catch(a){Mt(e,a);return}var n=e._controlledWritableStream;if(!z(n)&&n._state==="writable"){var o=Dt(e);It(n,o)}et(e)}function et(e){var t=e._controlledWritableStream;if(!!e._started&&t._inFlightWriteRequest===void 0){var r=t._state;if(r==="erroring"){Ft(t);return}if(e._queue.length!==0){var n=En(e);n===Mr?so(e):co(e,n)}}}function Mt(e,t){e._controlledWritableStream._state==="writable"&&Nr(e,t)}function so(e){var t=e._controlledWritableStream;Xn(t),Ct(e);var r=e._closeAlgorithm();Xe(e),O(r,function(){Kn(t)},function(n){Zn(t,n)})}function co(e,t){var r=e._controlledWritableStream;eo(r);var n=e._writeAlgorithm(t);O(n,function(){Gn(r);var o=r._state;if(Ct(e),!z(r)&&o==="writable"){var a=Dt(e);It(r,a)}et(e)},function(o){r._state==="writable"&&Xe(e),Jn(r,o)})}function Dt(e){var t=xr(e);return t<=0}function Nr(e,t){var r=e._controlledWritableStream;Xe(e),Bt(r,t)}function tt(e){return new TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function xt(e){return new TypeError("WritableStreamDefaultController.prototype."+e+" can only be used on a WritableStreamDefaultController")}function ae(e){return new TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function qe(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function rt(e){e._closedPromise=T(function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"})}function Qr(e,t){rt(e),Nt(e,t)}function fo(e){rt(e),Yr(e)}function Nt(e,t){e._closedPromise_reject!==void 0&&(we(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function bo(e,t){Qr(e,t)}function Yr(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function nt(e){e._readyPromise=T(function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r}),e._readyPromiseState="pending"}function Qt(e,t){nt(e),Vr(e,t)}function Hr(e){nt(e),Yt(e)}function Vr(e,t){e._readyPromise_reject!==void 0&&(we(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function po(e){nt(e)}function _o(e,t){Qt(e,t)}function Yt(e){e._readyPromise_resolve!==void 0&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}var Ur=typeof DOMException<"u"?DOMException:void 0;function ho(e){if(!(typeof e=="function"||typeof e=="object"))return!1;try{return new e,!0}catch{return!1}}function yo(){var e=function(t,r){this.message=t||"",this.name=r||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}var mo=ho(Ur)?Ur:yo();function Gr(e,t,r,n,o,a){var i=se(e),u=Wr(t);e._disturbed=!0;var f=!1,b=h(void 0);return T(function(p,_){var S;if(a!==void 0){if(S=function(){var c=new mo("Aborted","AbortError"),v=[];n||v.push(function(){return t._state==="writable"?Ze(t,c):h(void 0)}),o||v.push(function(){return e._state==="readable"?W(e,c):h(void 0)}),q(function(){return Promise.all(v.map(function(w){return w()}))},!0,c)},a.aborted){S();return}a.addEventListener("abort",S)}function A(){return T(function(c,v){function w(I){I?c():L(ve(),w,v)}w(!1)})}function ve(){return f?h(!0):L(u._readyPromise,function(){return T(function(c,v){Se(i,{_chunkSteps:function(w){b=L(Lr(u,w),void 0,C),c(!1)},_closeSteps:function(){return c(!0)},_errorSteps:v})})})}if(R(e,i._closedPromise,function(c){n?Q(!0,c):q(function(){return Ze(t,c)},!0,c)}),R(t,u._closedPromise,function(c){o?Q(!0,c):q(function(){return W(e,c)},!0,c)}),F(e,i._closedPromise,function(){r?Q():q(function(){return ro(u)})}),z(t)||t._state==="closed"){var J=new TypeError("the destination writable stream closed before all data could be piped to it");o?Q(!0,J):q(function(){return W(e,J)},!0,J)}we(A());function B(){var c=b;return L(b,function(){return c!==b?B():void 0})}function R(c,v,w){c._state==="errored"?w(c._storedError):_t(v,w)}function F(c,v,w){c._state==="closed"?w():pt(v,w)}function q(c,v,w){if(f)return;f=!0,t._state==="writable"&&!z(t)?pt(B(),I):I();function I(){O(c(),function(){return g(v,w)},function(K){return g(!0,K)})}}function Q(c,v){f||(f=!0,t._state==="writable"&&!z(t)?pt(B(),function(){return g(c,v)}):g(c,v))}function g(c,v){Ir(u),M(i),a!==void 0&&a.removeEventListener("abort",S),c?_(v):p(void 0)}})}var ie=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!ot(this))throw ut("desiredSize");return Ht(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!ot(this))throw ut("close");if(!ye(this))throw new TypeError("The stream is not in a state that permits close");Ee(this)},e.prototype.enqueue=function(t){if(t===void 0&&(t=void 0),!ot(this))throw ut("enqueue");if(!ye(this))throw new TypeError("The stream is not in a state that permits enqueue");return it(this,t)},e.prototype.error=function(t){if(t===void 0&&(t=void 0),!ot(this))throw ut("error");V(this,t)},e.prototype[vt]=function(t){H(this);var r=this._cancelAlgorithm(t);return at(this),r},e.prototype[gt]=function(t){var r=this._controlledReadableStream;if(this._queue.length>0){var n=Ct(this);this._closeRequested&&this._queue.length===0?(at(this),je(r)):Oe(this),t._chunkSteps(n)}else lr(r,t),Oe(this)},e}();Object.defineProperties(ie.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof l.toStringTag=="symbol"&&Object.defineProperty(ie.prototype,l.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function ot(e){return!P(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")?!1:e instanceof ie}function Oe(e){var t=Jr(e);if(t){if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;var r=e._pullAlgorithm();O(r,function(){e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Oe(e))},function(n){V(e,n)})}}function Jr(e){var t=e._controlledReadableStream;if(!ye(e)||!e._started)return!1;if(G(t)&&Le(t)>0)return!0;var r=Ht(e);return r>0}function at(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ee(e){if(ye(e)){var t=e._controlledReadableStream;e._closeRequested=!0,e._queue.length===0&&(at(e),je(t))}}function it(e,t){if(ye(e)){var r=e._controlledReadableStream;if(G(r)&&Le(r)>0)Tt(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(o){throw V(e,o),o}try{qt(e,t,n)}catch(o){throw V(e,o),o}}Oe(e)}}function V(e,t){var r=e._controlledReadableStream;r._state==="readable"&&(H(e),at(e),Xr(r,t))}function Ht(e){var t=e._controlledReadableStream._state;return t==="errored"?null:t==="closed"?0:e._strategyHWM-e._queueTotalSize}function vo(e){return!Jr(e)}function ye(e){var t=e._controlledReadableStream._state;return!e._closeRequested&&t==="readable"}function Kr(e,t,r,n,o,a,i){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,H(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=i,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=o,e._readableStreamController=t;var u=r();O(h(u),function(){t._started=!0,Oe(t)},function(f){V(t,f)})}function go(e,t,r,n){var o=Object.create(ie.prototype),a=function(){},i=function(){return h(void 0)},u=function(){return h(void 0)};t.start!==void 0&&(a=function(){return t.start(o)}),t.pull!==void 0&&(i=function(){return t.pull(o)}),t.cancel!==void 0&&(u=function(f){return t.cancel(f)}),Kr(e,o,a,i,u,r,n)}function ut(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function wo(e,t){return ee(e._readableStreamController)?Ro(e):So(e)}function So(e,t){var r=se(e),n=!1,o=!1,a=!1,i=!1,u,f,b,p,_,S=T(function(R){_=R});function A(){if(n)return o=!0,h(void 0);n=!0;var R={_chunkSteps:function(F){Fe(function(){o=!1;var q=F,Q=F;a||it(b._readableStreamController,q),i||it(p._readableStreamController,Q),n=!1,o&&A()})},_closeSteps:function(){n=!1,a||Ee(b._readableStreamController),i||Ee(p._readableStreamController),(!a||!i)&&_(void 0)},_errorSteps:function(){n=!1}};return Se(r,R),h(void 0)}function ve(R){if(a=!0,u=R,i){var F=Re([u,f]),q=W(e,F);_(q)}return S}function J(R){if(i=!0,f=R,a){var F=Re([u,f]),q=W(e,F);_(q)}return S}function B(){}return b=Vt(B,A,ve),p=Vt(B,A,J),_t(r._closedPromise,function(R){V(b._readableStreamController,R),V(p._readableStreamController,R),(!a||!i)&&_(void 0)}),[b,p]}function Ro(e){var t=se(e),r=!1,n=!1,o=!1,a=!1,i=!1,u,f,b,p,_,S=T(function(g){_=g});function A(g){_t(g._closedPromise,function(c){g===t&&(k(b._readableStreamController,c),k(p._readableStreamController,c),(!a||!i)&&_(void 0))})}function ve(){re(t)&&(M(t),t=se(e),A(t));var g={_chunkSteps:function(c){Fe(function(){n=!1,o=!1;var v=c,w=c;if(!a&&!i)try{w=yr(c)}catch(I){k(b._readableStreamController,I),k(p._readableStreamController,I),_(W(e,I));return}a||He(b._readableStreamController,v),i||He(p._readableStreamController,w),r=!1,n?B():o&&R()})},_closeSteps:function(){r=!1,a||Te(b._readableStreamController),i||Te(p._readableStreamController),b._readableStreamController._pendingPullIntos.length>0&&Ve(b._readableStreamController,0),p._readableStreamController._pendingPullIntos.length>0&&Ve(p._readableStreamController,0),(!a||!i)&&_(void 0)},_errorSteps:function(){r=!1}};Se(t,g)}function J(g,c){Y(t)&&(M(t),t=qr(e),A(t));var v=c?p:b,w=c?b:p,I={_chunkSteps:function(K){Fe(function(){n=!1,o=!1;var ge=c?i:a,ze=c?a:i;if(ze)ge||Ue(v._readableStreamController,K);else{var bn=void 0;try{bn=yr(K)}catch(Kt){k(v._readableStreamController,Kt),k(w._readableStreamController,Kt),_(W(e,Kt));return}ge||Ue(v._readableStreamController,K),He(w._readableStreamController,bn)}r=!1,n?B():o&&R()})},_closeSteps:function(K){r=!1;var ge=c?i:a,ze=c?a:i;ge||Te(v._readableStreamController),ze||Te(w._readableStreamController),K!==void 0&&(ge||Ue(v._readableStreamController,K),!ze&&w._readableStreamController._pendingPullIntos.length>0&&Ve(w._readableStreamController,0)),(!ge||!ze)&&_(void 0)},_errorSteps:function(){r=!1}};jr(t,g,I)}function B(){if(r)return n=!0,h(void 0);r=!0;var g=kt(b._readableStreamController);return g===null?ve():J(g._view,!1),h(void 0)}function R(){if(r)return o=!0,h(void 0);r=!0;var g=kt(p._readableStreamController);return g===null?ve():J(g._view,!0),h(void 0)}function F(g){if(a=!0,u=g,i){var c=Re([u,f]),v=W(e,c);_(v)}return S}function q(g){if(i=!0,f=g,a){var c=Re([u,f]),v=W(e,c);_(v)}return S}function Q(){}return b=$r(Q,B,F),p=$r(Q,R,q),A(t),[b,p]}function To(e,t){D(e,t);var r=e,n=r?.autoAllocateChunkSize,o=r?.cancel,a=r?.pull,i=r?.start,u=r?.type;return{autoAllocateChunkSize:n===void 0?void 0:ur(n,t+" has member 'autoAllocateChunkSize' that"),cancel:o===void 0?void 0:Po(o,r,t+" has member 'cancel' that"),pull:a===void 0?void 0:Co(a,r,t+" has member 'pull' that"),start:i===void 0?void 0:qo(i,r,t+" has member 'start' that"),type:u===void 0?void 0:Oo(u,t+" has member 'type' that")}}function Po(e,t,r){return j(e,r),function(n){return $(e,t,[n])}}function Co(e,t,r){return j(e,r),function(n){return $(e,t,[n])}}function qo(e,t,r){return j(e,r),function(n){return Ie(e,t,[n])}}function Oo(e,t){if(e=""+e,e!=="bytes")throw new TypeError(t+" '"+e+"' is not a valid enumeration value for ReadableStreamType");return e}function Eo(e,t){D(e,t);var r=e?.mode;return{mode:r===void 0?void 0:jo(r,t+" has member 'mode' that")}}function jo(e,t){if(e=""+e,e!=="byob")throw new TypeError(t+" '"+e+"' is not a valid enumeration value for ReadableStreamReaderMode");return e}function ko(e,t){D(e,t);var r=e?.preventCancel;return{preventCancel:Boolean(r)}}function Zr(e,t){D(e,t);var r=e?.preventAbort,n=e?.preventCancel,o=e?.preventClose,a=e?.signal;return a!==void 0&&Wo(a,t+" has member 'signal' that"),{preventAbort:Boolean(r),preventCancel:Boolean(n),preventClose:Boolean(o),signal:a}}function Wo(e,t){if(!Qn(e))throw new TypeError(t+" is not an AbortSignal.")}function Ao(e,t){D(e,t);var r=e?.readable;wt(r,"readable","ReadableWritablePair"),Rt(r,t+" has member 'readable' that");var n=e?.writable;return wt(n,"writable","ReadableWritablePair"),kr(n,t+" has member 'writable' that"),{readable:r,writable:n}}var N=function(){function e(t,r){t===void 0&&(t={}),r===void 0&&(r={}),t===void 0?t=null:ar(t,"First parameter");var n=Ke(r,"Second parameter"),o=To(t,"First parameter");if(Ut(this),o.type==="bytes"){if(n.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");var a=Ce(n,0);zn(this,o,a)}else{var i=Je(n),a=Ce(n,1);go(this,o,a,i)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!U(this))throw ue("locked");return G(this)},enumerable:!1,configurable:!0}),e.prototype.cancel=function(t){return t===void 0&&(t=void 0),U(this)?G(this)?s(new TypeError("Cannot cancel a stream that already has a reader")):W(this,t):s(ue("cancel"))},e.prototype.getReader=function(t){if(t===void 0&&(t=void 0),!U(this))throw ue("getReader");var r=Eo(t,"First parameter");return r.mode===void 0?se(this):qr(this)},e.prototype.pipeThrough=function(t,r){if(r===void 0&&(r={}),!U(this))throw ue("pipeThrough");x(t,1,"pipeThrough");var n=Ao(t,"First parameter"),o=Zr(r,"Second parameter");if(G(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(_e(n.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var a=Gr(this,n.writable,o.preventClose,o.preventAbort,o.preventCancel,o.signal);return we(a),n.readable},e.prototype.pipeTo=function(t,r){if(r===void 0&&(r={}),!U(this))return s(ue("pipeTo"));if(t===void 0)return s("Parameter 1 is required in 'pipeTo'.");if(!pe(t))return s(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var n;try{n=Zr(r,"Second parameter")}catch(o){return s(o)}return G(this)?s(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):_e(t)?s(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Gr(this,t,n.preventClose,n.preventAbort,n.preventCancel,n.signal)},e.prototype.tee=function(){if(!U(this))throw ue("tee");var t=wo(this);return Re(t)},e.prototype.values=function(t){if(t===void 0&&(t=void 0),!U(this))throw ue("values");var r=ko(t,"First parameter");return qn(this,r.preventCancel)},e}();Object.defineProperties(N.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),typeof l.toStringTag=="symbol"&&Object.defineProperty(N.prototype,l.toStringTag,{value:"ReadableStream",configurable:!0}),typeof l.asyncIterator=="symbol"&&Object.defineProperty(N.prototype,l.asyncIterator,{value:N.prototype.values,writable:!0,configurable:!0});function Vt(e,t,r,n,o){n===void 0&&(n=1),o===void 0&&(o=function(){return 1});var a=Object.create(N.prototype);Ut(a);var i=Object.create(ie.prototype);return Kr(a,i,e,t,r,n,o),a}function $r(e,t,r){var n=Object.create(N.prototype);Ut(n);var o=Object.create(X.prototype);return Cr(n,o,e,t,r,0,void 0),n}function Ut(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function U(e){return!P(e)||!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")?!1:e instanceof N}function G(e){return e._reader!==void 0}function W(e,t){if(e._disturbed=!0,e._state==="closed")return h(void 0);if(e._state==="errored")return s(e._storedError);je(e);var r=e._reader;r!==void 0&&re(r)&&(r._readIntoRequests.forEach(function(o){o._closeSteps(void 0)}),r._readIntoRequests=new E);var n=e._readableStreamController[vt](t);return Z(n,C)}function je(e){e._state="closed";var t=e._reader;t!==void 0&&(tr(t),Y(t)&&(t._readRequests.forEach(function(r){r._closeSteps()}),t._readRequests=new E))}function Xr(e,t){e._state="errored",e._storedError=t;var r=e._reader;r!==void 0&&(mt(r,t),Y(r)?(r._readRequests.forEach(function(n){n._errorSteps(t)}),r._readRequests=new E):(r._readIntoRequests.forEach(function(n){n._errorSteps(t)}),r._readIntoRequests=new E))}function ue(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}function en(e,t){D(e,t);var r=e?.highWaterMark;return wt(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:St(r)}}var tn=function(e){return e.byteLength};try{Object.defineProperty(tn,"name",{value:"size",configurable:!0})}catch{}var ke=function(){function e(t){x(t,1,"ByteLengthQueuingStrategy"),t=en(t,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=t.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!nn(this))throw rn("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!nn(this))throw rn("size");return tn},enumerable:!1,configurable:!0}),e}();Object.defineProperties(ke.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof l.toStringTag=="symbol"&&Object.defineProperty(ke.prototype,l.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function rn(e){return new TypeError("ByteLengthQueuingStrategy.prototype."+e+" can only be used on a ByteLengthQueuingStrategy")}function nn(e){return!P(e)||!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")?!1:e instanceof ke}var on=function(){return 1};try{Object.defineProperty(on,"name",{value:"size",configurable:!0})}catch{}var We=function(){function e(t){x(t,1,"CountQueuingStrategy"),t=en(t,"First parameter"),this._countQueuingStrategyHighWaterMark=t.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!un(this))throw an("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!un(this))throw an("size");return on},enumerable:!1,configurable:!0}),e}();Object.defineProperties(We.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof l.toStringTag=="symbol"&&Object.defineProperty(We.prototype,l.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function an(e){return new TypeError("CountQueuingStrategy.prototype."+e+" can only be used on a CountQueuingStrategy")}function un(e){return!P(e)||!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")?!1:e instanceof We}function zo(e,t){D(e,t);var r=e?.flush,n=e?.readableType,o=e?.start,a=e?.transform,i=e?.writableType;return{flush:r===void 0?void 0:Bo(r,e,t+" has member 'flush' that"),readableType:n,start:o===void 0?void 0:Fo(o,e,t+" has member 'start' that"),transform:a===void 0?void 0:Io(a,e,t+" has member 'transform' that"),writableType:i}}function Bo(e,t,r){return j(e,r),function(n){return $(e,t,[n])}}function Fo(e,t,r){return j(e,r),function(n){return Ie(e,t,[n])}}function Io(e,t,r){return j(e,r),function(n,o){return $(e,t,[n,o])}}var Ae=function(){function e(t,r,n){t===void 0&&(t={}),r===void 0&&(r={}),n===void 0&&(n={}),t===void 0&&(t=null);var o=Ke(r,"Second parameter"),a=Ke(n,"Third parameter"),i=zo(t,"First parameter");if(i.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(i.writableType!==void 0)throw new RangeError("Invalid writableType specified");var u=Ce(a,0),f=Je(a),b=Ce(o,1),p=Je(o),_,S=T(function(A){_=A});Lo(this,S,b,p,u,f),Do(this,i),i.start!==void 0?_(i.start(this._transformStreamController)):_(void 0)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!ln(this))throw dn("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!ln(this))throw dn("writable");return this._writable},enumerable:!1,configurable:!0}),e}();Object.defineProperties(Ae.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof l.toStringTag=="symbol"&&Object.defineProperty(Ae.prototype,l.toStringTag,{value:"TransformStream",configurable:!0});function Lo(e,t,r,n,o,a){function i(){return t}function u(S){return Qo(e,S)}function f(S){return Yo(e,S)}function b(){return Ho(e)}e._writable=Vn(i,u,b,f,r,n);function p(){return Vo(e)}function _(S){return st(e,S),h(void 0)}e._readable=Vt(i,p,_,o,a),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,ct(e,!0),e._transformStreamController=void 0}function ln(e){return!P(e)||!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")?!1:e instanceof Ae}function lt(e,t){V(e._readable._readableStreamController,t),st(e,t)}function st(e,t){sn(e._transformStreamController),Mt(e._writable._writableStreamController,t),e._backpressure&&ct(e,!1)}function ct(e,t){e._backpressureChangePromise!==void 0&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=T(function(r){e._backpressureChangePromise_resolve=r}),e._backpressure=t}var me=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!ft(this))throw dt("desiredSize");var t=this._controlledTransformStream._readable._readableStreamController;return Ht(t)},enumerable:!1,configurable:!0}),e.prototype.enqueue=function(t){if(t===void 0&&(t=void 0),!ft(this))throw dt("enqueue");cn(this,t)},e.prototype.error=function(t){if(t===void 0&&(t=void 0),!ft(this))throw dt("error");xo(this,t)},e.prototype.terminate=function(){if(!ft(this))throw dt("terminate");No(this)},e}();Object.defineProperties(me.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof l.toStringTag=="symbol"&&Object.defineProperty(me.prototype,l.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function ft(e){return!P(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")?!1:e instanceof me}function Mo(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}function Do(e,t){var r=Object.create(me.prototype),n=function(a){try{return cn(r,a),h(void 0)}catch(i){return s(i)}},o=function(){return h(void 0)};t.transform!==void 0&&(n=function(a){return t.transform(a,r)}),t.flush!==void 0&&(o=function(){return t.flush(r)}),Mo(e,r,n,o)}function sn(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function cn(e,t){var r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!ye(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{it(n,t)}catch(a){throw st(r,a),r._readable._storedError}var o=vo(n);o!==r._backpressure&&ct(r,!0)}function xo(e,t){lt(e._controlledTransformStream,t)}function fn(e,t){var r=e._transformAlgorithm(t);return Z(r,void 0,function(n){throw lt(e._controlledTransformStream,n),n})}function No(e){var t=e._controlledTransformStream,r=t._readable._readableStreamController;Ee(r);var n=new TypeError("TransformStream terminated");st(t,n)}function Qo(e,t){var r=e._transformStreamController;if(e._backpressure){var n=e._backpressureChangePromise;return Z(n,function(){var o=e._writable,a=o._state;if(a==="erroring")throw o._storedError;return fn(r,t)})}return fn(r,t)}function Yo(e,t){return lt(e,t),h(void 0)}function Ho(e){var t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return sn(r),Z(n,function(){if(t._state==="errored")throw t._storedError;Ee(t._readableStreamController)},function(o){throw lt(e,o),t._storedError})}function Vo(e){return ct(e,!1),e._backpressureChangePromise}function dt(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function dn(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}var Gt={ReadableStream:N,ReadableStreamDefaultController:ie,ReadableByteStreamController:X,ReadableStreamBYOBRequest:fe,ReadableStreamDefaultReader:ce,ReadableStreamBYOBReader:de,WritableStream:be,WritableStreamDefaultController:oe,WritableStreamDefaultWriter:he,ByteLengthQueuingStrategy:ke,CountQueuingStrategy:We,TransformStream:Ae,TransformStreamDefaultController:me};if(typeof Be<"u")for(var Jt in Gt)Object.prototype.hasOwnProperty.call(Gt,Jt)&&Object.defineProperty(Be,Jt,{value:Gt[Jt],writable:!0,configurable:!0});d.ByteLengthQueuingStrategy=ke,d.CountQueuingStrategy=We,d.ReadableByteStreamController=X,d.ReadableStream=N,d.ReadableStreamBYOBReader=de,d.ReadableStreamBYOBRequest=fe,d.ReadableStreamDefaultController=ie,d.ReadableStreamDefaultReader=ce,d.TransformStream=Ae,d.TransformStreamDefaultController=me,d.WritableStream=be,d.WritableStreamDefaultController=oe,d.WritableStreamDefaultWriter=he,Object.defineProperty(d,"__esModule",{value:!0})})}),ra=ea(ta(),1);globalThis.ReadableStream||Object.assign(globalThis,{ReadableStream:ra.ReadableStream});export*from"./types.js";var na=(...y)=>y.reduce((m,d)=>async function*(l){for await(let C of m(l))yield*d(C)}),ia=(y,...m)=>{let d=na(...m);return hn(async function*(){for await(let l of _n(y))yield*d(l)})},_n=async function*(y,m){let d=y.getReader();for(;!m?.signal.aborted;){let{done:l,value:C}=await d.read();if(l)break;yield C}},hn=(y,m)=>new ReadableStream({async start(d){for await(let l of y(m))d.enqueue(l);d.close()}}),ua=y=>hn(function*(){for(let m of y)yield m}),la=async function*(y){let m=[];for await(let d of _n(y))m.push(d),yield m};export{la as buffer,na as compose,hn as generateStream,ia as pipeline,ua as streamArray,_n as yieldStream}; |
{ | ||
"name": "yield-stream", | ||
"version": "1.0.5", | ||
"version": "2.0.0", | ||
"license": "MIT", | ||
@@ -8,3 +8,3 @@ "type": "module", | ||
"engines": { | ||
"node": ">=18" | ||
"node": ">=14" | ||
}, | ||
@@ -24,3 +24,3 @@ "types": "dist/index.d.ts", | ||
"prebuild": "yarn docs", | ||
"build": "tsmodule build", | ||
"build": "tsmodule build -b", | ||
"test": "ava", | ||
@@ -41,3 +41,7 @@ "pretest": "yarn build", | ||
}, | ||
"homepage": "https://github.com/gptlabs/yield-stream" | ||
"homepage": "https://github.com/gptlabs/yield-stream", | ||
"dependencies": { | ||
"shim-streams": "^0.0.2", | ||
"web-streams-polyfill": "^3.2.1" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67542
282
2
1
+ Addedshim-streams@^0.0.2
+ Addedweb-streams-polyfill@^3.2.1
+ Addedshim-streams@0.0.2(transitive)
+ Addedweb-streams-polyfill@3.3.3(transitive)