chunk-XVZDMLED.js 61 KB

1234567891011121314151617181920212223242526
  1. import { createRequire as topLevelCreateRequire } from 'module';
  2. const require = topLevelCreateRequire(import.meta.url);
  3. var To=Object.create;var In=Object.defineProperty;var Po=Object.getOwnPropertyDescriptor;var Eo=Object.getOwnPropertyNames;var vo=Object.getPrototypeOf,Wo=Object.prototype.hasOwnProperty;var At=(u=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(u,{get:(o,s)=>(typeof require!="undefined"?require:o)[s]}):u)(function(u){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+u+'" is not supported')});var hr=(u,o)=>()=>(o||u((o={exports:{}}).exports,o),o.exports);var qo=(u,o,s,c)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of Eo(o))!Wo.call(u,m)&&m!==s&&In(u,m,{get:()=>o[m],enumerable:!(c=Po(o,m))||c.enumerable});return u};var jn=(u,o,s)=>(s=u!=null?To(vo(u)):{},qo(o||!u||!u.__esModule?In(s,"default",{value:u,enumerable:!0}):s,u));var Dn=(u,o,s)=>{if(!o.has(u))throw TypeError("Cannot "+s)};var C=(u,o,s)=>(Dn(u,o,"read from private field"),s?s.call(u):o.get(u)),k=(u,o,s)=>{if(o.has(u))throw TypeError("Cannot add the same private member more than once");o instanceof WeakSet?o.add(u):o.set(u,s)},q=(u,o,s,c)=>(Dn(u,o,"write to private field"),c?c.call(u,s):o.set(u,s),s);var Ln=hr((Bt,Mn)=>{(function(u,o){typeof Bt=="object"&&typeof Mn!="undefined"?o(Bt):typeof define=="function"&&define.amd?define(["exports"],o):(u=typeof globalThis!="undefined"?globalThis:u||self,o(u.WebStreamsPolyfill={}))})(Bt,function(u){"use strict";let o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:e=>`Symbol(${e})`;function s(){}function c(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global}let m=c();function h(e){return typeof e=="object"&&e!==null||typeof e=="function"}let w=s,N=Promise,Ot=Promise.prototype.then,xe=Promise.resolve.bind(N),We=Promise.reject.bind(N);function P(e){return new N(e)}function _(e){return xe(e)}function d(e){return We(e)}function v(e,t,r){return Ot.call(e,t,r)}function F(e,t,r){v(v(e,t,r),void 0,w)}function zt(e,t){F(e,t)}function Ft(e,t){F(e,void 0,t)}function re(e,t,r){return v(e,t,r)}function qe(e){v(e,void 0,w)}let Ze=(()=>{let e=m&&m.queueMicrotask;if(typeof e=="function")return e;let t=_(void 0);return r=>v(t,r)})();function Xe(e,t,r){if(typeof e!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function ne(e,t,r){try{return _(Xe(e,t,r))}catch(n){return d(n)}}let Sr=16384;class I{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(t){let r=this._back,n=r;r._elements.length===Sr-1&&(n={_elements:[],_next:void 0}),r._elements.push(t),n!==r&&(this._back=n,r._next=n),++this._size}shift(){let t=this._front,r=t,n=this._cursor,a=n+1,i=t._elements,l=i[n];return a===Sr&&(r=t._next,a=0),--this._size,this._cursor=a,t!==r&&(this._front=r),i[n]=void 0,l}forEach(t){let r=this._cursor,n=this._front,a=n._elements;for(;(r!==a.length||n._next!==void 0)&&!(r===a.length&&(n=n._next,a=n._elements,r=0,a.length===0));)t(a[r]),++r}peek(){let t=this._front,r=this._cursor;return t._elements[r]}}function gr(e,t){e._ownerReadableStream=t,t._reader=e,t._state==="readable"?jt(e):t._state==="closed"?Jn(e):Rr(e,t._storedError)}function It(e,t){let r=e._ownerReadableStream;return M(r,t)}function Q(e){e._ownerReadableStream._state==="readable"?Dt(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Kn(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 be(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function jt(e){e._closedPromise=P((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r})}function Rr(e,t){jt(e),Dt(e,t)}function Jn(e){jt(e),wr(e)}function Dt(e,t){e._closedPromise_reject!==void 0&&(qe(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function Kn(e,t){Rr(e,t)}function wr(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}let Cr=o("[[AbortSteps]]"),Tr=o("[[ErrorSteps]]"),Mt=o("[[CancelSteps]]"),Lt=o("[[PullSteps]]"),Pr=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},ea=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function ta(e){return typeof e=="object"||typeof e=="function"}function U(e,t){if(e!==void 0&&!ta(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 ra(e){return typeof e=="object"&&e!==null||typeof e=="function"}function Er(e,t){if(!ra(e))throw new TypeError(`${t} is not an object.`)}function Y(e,t,r){if(e===void 0)throw new TypeError(`Parameter ${t} is required in '${r}'.`)}function $t(e,t,r){if(e===void 0)throw new TypeError(`${t} is required in '${r}'.`)}function Nt(e){return Number(e)}function vr(e){return e===0?0:e}function na(e){return vr(ea(e))}function Wr(e,t){let n=Number.MAX_SAFE_INTEGER,a=Number(e);if(a=vr(a),!Pr(a))throw new TypeError(`${t} is not a finite number`);if(a=na(a),a<0||a>n)throw new TypeError(`${t} is outside the accepted range of 0 to ${n}, inclusive`);return!Pr(a)||a===0?0:a}function Qt(e,t){if(!K(e))throw new TypeError(`${t} is not a ReadableStream.`)}function he(e){return new Ae(e)}function qr(e,t){e._reader._readRequests.push(t)}function Ut(e,t,r){let a=e._reader._readRequests.shift();r?a._closeSteps():a._chunkSteps(t)}function Je(e){return e._reader._readRequests.length}function Ar(e){let t=e._reader;return!(t===void 0||!x(t))}class Ae{constructor(t){if(Y(t,1,"ReadableStreamDefaultReader"),Qt(t,"First parameter"),ee(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");gr(this,t),this._readRequests=new I}get closed(){return x(this)?this._closedPromise:d(Ke("closed"))}cancel(t=void 0){return x(this)?this._ownerReadableStream===void 0?d(be("cancel")):It(this,t):d(Ke("cancel"))}read(){if(!x(this))return d(Ke("read"));if(this._ownerReadableStream===void 0)return d(be("read from"));let t,r,n=P((i,l)=>{t=i,r=l});return Be(this,{_chunkSteps:i=>t({value:i,done:!1}),_closeSteps:()=>t({value:void 0,done:!0}),_errorSteps:i=>r(i)}),n}releaseLock(){if(!x(this))throw Ke("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");Q(this)}}}Object.defineProperties(Ae.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof o.toStringTag=="symbol"&&Object.defineProperty(Ae.prototype,o.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function x(e){return!h(e)||!Object.prototype.hasOwnProperty.call(e,"_readRequests")?!1:e instanceof Ae}function Be(e,t){let r=e._ownerReadableStream;r._disturbed=!0,r._state==="closed"?t._closeSteps():r._state==="errored"?t._errorSteps(r._storedError):r._readableStreamController[Lt](t)}function Ke(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}let Br=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class kr{constructor(t,r){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=t,this._preventCancel=r}next(){let t=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?re(this._ongoingPromise,t,t):t(),this._ongoingPromise}return(t){let r=()=>this._returnSteps(t);return this._ongoingPromise?re(this._ongoingPromise,r,r):r()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let t=this._reader;if(t._ownerReadableStream===void 0)return d(be("iterate"));let r,n,a=P((l,f)=>{r=l,n=f});return Be(t,{_chunkSteps:l=>{this._ongoingPromise=void 0,Ze(()=>r({value:l,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,Q(t),r({value:void 0,done:!0})},_errorSteps:l=>{this._ongoingPromise=void 0,this._isFinished=!0,Q(t),n(l)}}),a}_returnSteps(t){if(this._isFinished)return Promise.resolve({value:t,done:!0});this._isFinished=!0;let r=this._reader;if(r._ownerReadableStream===void 0)return d(be("finish iterating"));if(!this._preventCancel){let n=It(r,t);return Q(r),re(n,()=>({value:t,done:!0}))}return Q(r),_({value:t,done:!0})}}let Or={next(){return zr(this)?this._asyncIteratorImpl.next():d(Fr("next"))},return(e){return zr(this)?this._asyncIteratorImpl.return(e):d(Fr("return"))}};Br!==void 0&&Object.setPrototypeOf(Or,Br);function aa(e,t){let r=he(e),n=new kr(r,t),a=Object.create(Or);return a._asyncIteratorImpl=n,a}function zr(e){if(!h(e)||!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof kr}catch(t){return!1}}function Fr(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}let Ir=Number.isNaN||function(e){return e!==e};function ke(e){return e.slice()}function jr(e,t,r,n,a){new Uint8Array(e).set(new Uint8Array(r,n,a),t)}function Mo(e){return e}function et(e){return!1}function Dr(e,t,r){if(e.slice)return e.slice(t,r);let n=r-t,a=new ArrayBuffer(n);return jr(a,0,e,t,n),a}function oa(e){return!(typeof e!="number"||Ir(e)||e<0)}function Mr(e){let t=Dr(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function Yt(e){let t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function Ht(e,t,r){if(!oa(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 ia(e){return e._queue.peek().value}function Z(e){e._queue=new I,e._queueTotalSize=0}class Oe{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Vt(this))throw Xt("view");return this._view}respond(t){if(!Vt(this))throw Xt("respond");if(Y(t,1,"respond"),t=Wr(t,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");et(this._view.buffer),ot(this._associatedReadableByteStreamController,t)}respondWithNewView(t){if(!Vt(this))throw Xt("respondWithNewView");if(Y(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");et(t.buffer),it(this._associatedReadableByteStreamController,t)}}Object.defineProperties(Oe.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof o.toStringTag=="symbol"&&Object.defineProperty(Oe.prototype,o.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class me{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!ae(this))throw Fe("byobRequest");return Zt(this)}get desiredSize(){if(!ae(this))throw Fe("desiredSize");return Vr(this)}close(){if(!ae(this))throw Fe("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let 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`);ze(this)}enqueue(t){if(!ae(this))throw Fe("enqueue");if(Y(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");let 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`);at(this,t)}error(t=void 0){if(!ae(this))throw Fe("error");D(this,t)}[Mt](t){Lr(this),Z(this);let r=this._cancelAlgorithm(t);return nt(this),r}[Lt](t){let r=this._controlledReadableByteStream;if(this._queueTotalSize>0){let a=this._queue.shift();this._queueTotalSize-=a.byteLength,Ur(this);let i=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);t._chunkSteps(i);return}let n=this._autoAllocateChunkSize;if(n!==void 0){let a;try{a=new ArrayBuffer(n)}catch(l){t._errorSteps(l);return}let i={buffer:a,bufferByteLength:n,byteOffset:0,byteLength:n,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(i)}qr(r,t),oe(this)}}Object.defineProperties(me.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof o.toStringTag=="symbol"&&Object.defineProperty(me.prototype,o.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function ae(e){return!h(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")?!1:e instanceof me}function Vt(e){return!h(e)||!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")?!1:e instanceof Oe}function oe(e){if(!fa(e))return;if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;let r=e._pullAlgorithm();F(r,()=>{e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,oe(e))},n=>{D(e,n)})}function Lr(e){xt(e),e._pendingPullIntos=new I}function Gt(e,t){let r=!1;e._state==="closed"&&(r=!0);let n=$r(t);t.readerType==="default"?Ut(e,n,r):ba(e,n,r)}function $r(e){let t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function tt(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function Nr(e,t){let r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,a=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),i=t.bytesFilled+a,l=i-i%r,f=a,p=!1;l>n&&(f=l-t.bytesFilled,p=!0);let S=e._queue;for(;f>0;){let g=S.peek(),R=Math.min(f,g.byteLength),E=t.byteOffset+t.bytesFilled;jr(t.buffer,E,g.buffer,g.byteOffset,R),g.byteLength===R?S.shift():(g.byteOffset+=R,g.byteLength-=R),e._queueTotalSize-=R,Qr(e,R,t),f-=R}return p}function Qr(e,t,r){r.bytesFilled+=t}function Ur(e){e._queueTotalSize===0&&e._closeRequested?(nt(e),Qe(e._controlledReadableByteStream)):oe(e)}function xt(e){e._byobRequest!==null&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Yr(e){for(;e._pendingPullIntos.length>0;){if(e._queueTotalSize===0)return;let t=e._pendingPullIntos.peek();Nr(e,t)&&(rt(e),Gt(e._controlledReadableByteStream,t))}}function sa(e,t,r){let n=e._controlledReadableByteStream,a=1;t.constructor!==DataView&&(a=t.constructor.BYTES_PER_ELEMENT);let i=t.constructor,l=t.buffer,f={buffer:l,bufferByteLength:l.byteLength,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:a,viewConstructor:i,readerType:"byob"};if(e._pendingPullIntos.length>0){e._pendingPullIntos.push(f),Zr(n,r);return}if(n._state==="closed"){let p=new i(f.buffer,f.byteOffset,0);r._closeSteps(p);return}if(e._queueTotalSize>0){if(Nr(e,f)){let p=$r(f);Ur(e),r._chunkSteps(p);return}if(e._closeRequested){let p=new TypeError("Insufficient bytes to fill elements in the given buffer");D(e,p),r._errorSteps(p);return}}e._pendingPullIntos.push(f),Zr(n,r),oe(e)}function la(e,t){let r=e._controlledReadableByteStream;if(Jt(r))for(;Xr(r)>0;){let n=rt(e);Gt(r,n)}}function ua(e,t,r){if(Qr(e,t,r),r.bytesFilled<r.elementSize)return;rt(e);let n=r.bytesFilled%r.elementSize;if(n>0){let a=r.byteOffset+r.bytesFilled,i=Dr(r.buffer,a-n,a);tt(e,i,0,i.byteLength)}r.bytesFilled-=n,Gt(e._controlledReadableByteStream,r),Yr(e)}function Hr(e,t){let r=e._pendingPullIntos.peek();xt(e),e._controlledReadableByteStream._state==="closed"?la(e):ua(e,t,r),oe(e)}function rt(e){return e._pendingPullIntos.shift()}function fa(e){let t=e._controlledReadableByteStream;return t._state!=="readable"||e._closeRequested||!e._started?!1:!!(Ar(t)&&Je(t)>0||Jt(t)&&Xr(t)>0||Vr(e)>0)}function nt(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function ze(e){let t=e._controlledReadableByteStream;if(!(e._closeRequested||t._state!=="readable")){if(e._queueTotalSize>0){e._closeRequested=!0;return}if(e._pendingPullIntos.length>0&&e._pendingPullIntos.peek().bytesFilled>0){let n=new TypeError("Insufficient bytes to fill elements in the given buffer");throw D(e,n),n}nt(e),Qe(t)}}function at(e,t){let r=e._controlledReadableByteStream;if(e._closeRequested||r._state!=="readable")return;let n=t.buffer,a=t.byteOffset,i=t.byteLength,l=n;if(e._pendingPullIntos.length>0){let f=e._pendingPullIntos.peek();et(f.buffer),f.buffer=f.buffer}if(xt(e),Ar(r))if(Je(r)===0)tt(e,l,a,i);else{e._pendingPullIntos.length>0&&rt(e);let f=new Uint8Array(l,a,i);Ut(r,f,!1)}else Jt(r)?(tt(e,l,a,i),Yr(e)):tt(e,l,a,i);oe(e)}function D(e,t){let r=e._controlledReadableByteStream;r._state==="readable"&&(Lr(e),Z(e),nt(e),wn(r,t))}function Zt(e){if(e._byobRequest===null&&e._pendingPullIntos.length>0){let t=e._pendingPullIntos.peek(),r=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),n=Object.create(Oe.prototype);ca(n,e,r),e._byobRequest=n}return e._byobRequest}function Vr(e){let t=e._controlledReadableByteStream._state;return t==="errored"?null:t==="closed"?0:e._strategyHWM-e._queueTotalSize}function ot(e,t){let r=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="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,Hr(e,t)}function it(e,t){let r=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="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");let a=t.byteLength;r.buffer=t.buffer,Hr(e,a)}function Gr(e,t,r,n,a,i,l){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,Z(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=i,t._pullAlgorithm=n,t._cancelAlgorithm=a,t._autoAllocateChunkSize=l,t._pendingPullIntos=new I,e._readableStreamController=t;let f=r();F(_(f),()=>{t._started=!0,oe(t)},p=>{D(t,p)})}function da(e,t,r){let n=Object.create(me.prototype),a=()=>{},i=()=>_(void 0),l=()=>_(void 0);t.start!==void 0&&(a=()=>t.start(n)),t.pull!==void 0&&(i=()=>t.pull(n)),t.cancel!==void 0&&(l=p=>t.cancel(p));let f=t.autoAllocateChunkSize;if(f===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Gr(e,n,a,i,l,r,f)}function ca(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}function Xt(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function Fe(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function xr(e){return new Ie(e)}function Zr(e,t){e._reader._readIntoRequests.push(t)}function ba(e,t,r){let a=e._reader._readIntoRequests.shift();r?a._closeSteps(t):a._chunkSteps(t)}function Xr(e){return e._reader._readIntoRequests.length}function Jt(e){let t=e._reader;return!(t===void 0||!ie(t))}class Ie{constructor(t){if(Y(t,1,"ReadableStreamBYOBReader"),Qt(t,"First parameter"),ee(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!ae(t._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");gr(this,t),this._readIntoRequests=new I}get closed(){return ie(this)?this._closedPromise:d(st("closed"))}cancel(t=void 0){return ie(this)?this._ownerReadableStream===void 0?d(be("cancel")):It(this,t):d(st("cancel"))}read(t){if(!ie(this))return d(st("read"));if(!ArrayBuffer.isView(t))return d(new TypeError("view must be an array buffer view"));if(t.byteLength===0)return d(new TypeError("view must have non-zero byteLength"));if(t.buffer.byteLength===0)return d(new TypeError("view's buffer must have non-zero byteLength"));if(et(t.buffer),this._ownerReadableStream===void 0)return d(be("read from"));let r,n,a=P((l,f)=>{r=l,n=f});return Jr(this,t,{_chunkSteps:l=>r({value:l,done:!1}),_closeSteps:l=>r({value:l,done:!0}),_errorSteps:l=>n(l)}),a}releaseLock(){if(!ie(this))throw st("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");Q(this)}}}Object.defineProperties(Ie.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof o.toStringTag=="symbol"&&Object.defineProperty(Ie.prototype,o.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function ie(e){return!h(e)||!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")?!1:e instanceof Ie}function Jr(e,t,r){let n=e._ownerReadableStream;n._disturbed=!0,n._state==="errored"?r._errorSteps(n._storedError):sa(n._readableStreamController,t,r)}function st(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function je(e,t){let{highWaterMark:r}=e;if(r===void 0)return t;if(Ir(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function lt(e){let{size:t}=e;return t||(()=>1)}function ut(e,t){U(e,t);let r=e==null?void 0:e.highWaterMark,n=e==null?void 0:e.size;return{highWaterMark:r===void 0?void 0:Nt(r),size:n===void 0?void 0:ha(n,`${t} has member 'size' that`)}}function ha(e,t){return j(e,t),r=>Nt(e(r))}function ma(e,t){U(e,t);let r=e==null?void 0:e.abort,n=e==null?void 0:e.close,a=e==null?void 0:e.start,i=e==null?void 0:e.type,l=e==null?void 0:e.write;return{abort:r===void 0?void 0:pa(r,e,`${t} has member 'abort' that`),close:n===void 0?void 0:_a(n,e,`${t} has member 'close' that`),start:a===void 0?void 0:ya(a,e,`${t} has member 'start' that`),write:l===void 0?void 0:Sa(l,e,`${t} has member 'write' that`),type:i}}function pa(e,t,r){return j(e,r),n=>ne(e,t,[n])}function _a(e,t,r){return j(e,r),()=>ne(e,t,[])}function ya(e,t,r){return j(e,r),n=>Xe(e,t,[n])}function Sa(e,t,r){return j(e,r),(n,a)=>ne(e,t,[n,a])}function Kr(e,t){if(!pe(e))throw new TypeError(`${t} is not a WritableStream.`)}function ga(e){if(typeof e!="object"||e===null)return!1;try{return typeof e.aborted=="boolean"}catch(t){return!1}}let Ra=typeof AbortController=="function";function wa(){if(Ra)return new AbortController}class De{constructor(t={},r={}){t===void 0?t=null:Er(t,"First parameter");let n=ut(r,"Second parameter"),a=ma(t,"First parameter");if(tn(this),a.type!==void 0)throw new RangeError("Invalid type is specified");let l=lt(n),f=je(n,1);Ia(this,a,f,l)}get locked(){if(!pe(this))throw ht("locked");return _e(this)}abort(t=void 0){return pe(this)?_e(this)?d(new TypeError("Cannot abort a stream that already has a writer")):ft(this,t):d(ht("abort"))}close(){return pe(this)?_e(this)?d(new TypeError("Cannot close a stream that already has a writer")):$(this)?d(new TypeError("Cannot close an already-closing stream")):rn(this):d(ht("close"))}getWriter(){if(!pe(this))throw ht("getWriter");return en(this)}}Object.defineProperties(De.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof o.toStringTag=="symbol"&&Object.defineProperty(De.prototype,o.toStringTag,{value:"WritableStream",configurable:!0});function en(e){return new Me(e)}function Ca(e,t,r,n,a=1,i=()=>1){let l=Object.create(De.prototype);tn(l);let f=Object.create(ye.prototype);return un(l,f,e,t,r,n,a,i),l}function tn(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new I,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function pe(e){return!h(e)||!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")?!1:e instanceof De}function _e(e){return e._writer!==void 0}function ft(e,t){var r;if(e._state==="closed"||e._state==="errored")return _(void 0);e._writableStreamController._abortReason=t,(r=e._writableStreamController._abortController)===null||r===void 0||r.abort();let n=e._state;if(n==="closed"||n==="errored")return _(void 0);if(e._pendingAbortRequest!==void 0)return e._pendingAbortRequest._promise;let a=!1;n==="erroring"&&(a=!0,t=void 0);let i=P((l,f)=>{e._pendingAbortRequest={_promise:void 0,_resolve:l,_reject:f,_reason:t,_wasAlreadyErroring:a}});return e._pendingAbortRequest._promise=i,a||er(e,t),i}function rn(e){let t=e._state;if(t==="closed"||t==="errored")return d(new TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));let r=P((a,i)=>{let l={_resolve:a,_reject:i};e._closeRequest=l}),n=e._writer;return n!==void 0&&e._backpressure&&t==="writable"&&ur(n),ja(e._writableStreamController),r}function Ta(e){return P((r,n)=>{let a={_resolve:r,_reject:n};e._writeRequests.push(a)})}function Kt(e,t){if(e._state==="writable"){er(e,t);return}tr(e)}function er(e,t){let r=e._writableStreamController;e._state="erroring",e._storedError=t;let n=e._writer;n!==void 0&&an(n,t),!qa(e)&&r._started&&tr(e)}function tr(e){e._state="errored",e._writableStreamController[Tr]();let t=e._storedError;if(e._writeRequests.forEach(a=>{a._reject(t)}),e._writeRequests=new I,e._pendingAbortRequest===void 0){dt(e);return}let r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring){r._reject(t),dt(e);return}let n=e._writableStreamController[Cr](r._reason);F(n,()=>{r._resolve(),dt(e)},a=>{r._reject(a),dt(e)})}function Pa(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function Ea(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,Kt(e,t)}function va(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,e._state==="erroring"&&(e._storedError=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";let r=e._writer;r!==void 0&&bn(r)}function Wa(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),Kt(e,t)}function $(e){return!(e._closeRequest===void 0&&e._inFlightCloseRequest===void 0)}function qa(e){return!(e._inFlightWriteRequest===void 0&&e._inFlightCloseRequest===void 0)}function Aa(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function Ba(e){e._inFlightWriteRequest=e._writeRequests.shift()}function dt(e){e._closeRequest!==void 0&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);let t=e._writer;t!==void 0&&sr(t,e._storedError)}function rr(e,t){let r=e._writer;r!==void 0&&t!==e._backpressure&&(t?Ua(r):ur(r)),e._backpressure=t}class Me{constructor(t){if(Y(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;let r=t._state;if(r==="writable")!$(t)&&t._backpressure?pt(this):hn(this),mt(this);else if(r==="erroring")lr(this,t._storedError),mt(this);else if(r==="closed")hn(this),Na(this);else{let n=t._storedError;lr(this,n),cn(this,n)}}get closed(){return se(this)?this._closedPromise:d(le("closed"))}get desiredSize(){if(!se(this))throw le("desiredSize");if(this._ownerWritableStream===void 0)throw Le("desiredSize");return Fa(this)}get ready(){return se(this)?this._readyPromise:d(le("ready"))}abort(t=void 0){return se(this)?this._ownerWritableStream===void 0?d(Le("abort")):ka(this,t):d(le("abort"))}close(){if(!se(this))return d(le("close"));let t=this._ownerWritableStream;return t===void 0?d(Le("close")):$(t)?d(new TypeError("Cannot close an already-closing stream")):nn(this)}releaseLock(){if(!se(this))throw le("releaseLock");this._ownerWritableStream!==void 0&&on(this)}write(t=void 0){return se(this)?this._ownerWritableStream===void 0?d(Le("write to")):sn(this,t):d(le("write"))}}Object.defineProperties(Me.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),typeof o.toStringTag=="symbol"&&Object.defineProperty(Me.prototype,o.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function se(e){return!h(e)||!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")?!1:e instanceof Me}function ka(e,t){let r=e._ownerWritableStream;return ft(r,t)}function nn(e){let t=e._ownerWritableStream;return rn(t)}function Oa(e){let t=e._ownerWritableStream,r=t._state;return $(t)||r==="closed"?_(void 0):r==="errored"?d(t._storedError):nn(e)}function za(e,t){e._closedPromiseState==="pending"?sr(e,t):Qa(e,t)}function an(e,t){e._readyPromiseState==="pending"?mn(e,t):Ya(e,t)}function Fa(e){let t=e._ownerWritableStream,r=t._state;return r==="errored"||r==="erroring"?null:r==="closed"?0:fn(t._writableStreamController)}function on(e){let t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");an(e,r),za(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function sn(e,t){let r=e._ownerWritableStream,n=r._writableStreamController,a=Da(n,t);if(r!==e._ownerWritableStream)return d(Le("write to"));let i=r._state;if(i==="errored")return d(r._storedError);if($(r)||i==="closed")return d(new TypeError("The stream is closing or closed and cannot be written to"));if(i==="erroring")return d(r._storedError);let l=Ta(r);return Ma(n,t,a),l}let ln={};class ye{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!nr(this))throw ir("abortReason");return this._abortReason}get signal(){if(!nr(this))throw ir("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(t=void 0){if(!nr(this))throw ir("error");this._controlledWritableStream._state==="writable"&&dn(this,t)}[Cr](t){let r=this._abortAlgorithm(t);return ct(this),r}[Tr](){Z(this)}}Object.defineProperties(ye.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof o.toStringTag=="symbol"&&Object.defineProperty(ye.prototype,o.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function nr(e){return!h(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")?!1:e instanceof ye}function un(e,t,r,n,a,i,l,f){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,Z(t),t._abortReason=void 0,t._abortController=wa(),t._started=!1,t._strategySizeAlgorithm=f,t._strategyHWM=l,t._writeAlgorithm=n,t._closeAlgorithm=a,t._abortAlgorithm=i;let p=or(t);rr(e,p);let S=r(),g=_(S);F(g,()=>{t._started=!0,bt(t)},R=>{t._started=!0,Kt(e,R)})}function Ia(e,t,r,n){let a=Object.create(ye.prototype),i=()=>{},l=()=>_(void 0),f=()=>_(void 0),p=()=>_(void 0);t.start!==void 0&&(i=()=>t.start(a)),t.write!==void 0&&(l=S=>t.write(S,a)),t.close!==void 0&&(f=()=>t.close()),t.abort!==void 0&&(p=S=>t.abort(S)),un(e,a,i,l,f,p,r,n)}function ct(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function ja(e){Ht(e,ln,0),bt(e)}function Da(e,t){try{return e._strategySizeAlgorithm(t)}catch(r){return ar(e,r),1}}function fn(e){return e._strategyHWM-e._queueTotalSize}function Ma(e,t,r){try{Ht(e,t,r)}catch(a){ar(e,a);return}let n=e._controlledWritableStream;if(!$(n)&&n._state==="writable"){let a=or(e);rr(n,a)}bt(e)}function bt(e){let t=e._controlledWritableStream;if(!e._started||t._inFlightWriteRequest!==void 0)return;if(t._state==="erroring"){tr(t);return}if(e._queue.length===0)return;let n=ia(e);n===ln?La(e):$a(e,n)}function ar(e,t){e._controlledWritableStream._state==="writable"&&dn(e,t)}function La(e){let t=e._controlledWritableStream;Aa(t),Yt(e);let r=e._closeAlgorithm();ct(e),F(r,()=>{va(t)},n=>{Wa(t,n)})}function $a(e,t){let r=e._controlledWritableStream;Ba(r);let n=e._writeAlgorithm(t);F(n,()=>{Pa(r);let a=r._state;if(Yt(e),!$(r)&&a==="writable"){let i=or(e);rr(r,i)}bt(e)},a=>{r._state==="writable"&&ct(e),Ea(r,a)})}function or(e){return fn(e)<=0}function dn(e,t){let r=e._controlledWritableStream;ct(e),er(r,t)}function ht(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function ir(e){return new TypeError(`WritableStreamDefaultController.prototype.${e} can only be used on a WritableStreamDefaultController`)}function le(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function Le(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function mt(e){e._closedPromise=P((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"})}function cn(e,t){mt(e),sr(e,t)}function Na(e){mt(e),bn(e)}function sr(e,t){e._closedPromise_reject!==void 0&&(qe(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function Qa(e,t){cn(e,t)}function bn(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 pt(e){e._readyPromise=P((t,r)=>{e._readyPromise_resolve=t,e._readyPromise_reject=r}),e._readyPromiseState="pending"}function lr(e,t){pt(e),mn(e,t)}function hn(e){pt(e),ur(e)}function mn(e,t){e._readyPromise_reject!==void 0&&(qe(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function Ua(e){pt(e)}function Ya(e,t){lr(e,t)}function ur(e){e._readyPromise_resolve!==void 0&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}let pn=typeof DOMException!="undefined"?DOMException:void 0;function Ha(e){if(!(typeof e=="function"||typeof e=="object"))return!1;try{return new e,!0}catch(t){return!1}}function Va(){let e=function(r,n){this.message=r||"",this.name=n||"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}let Ga=Ha(pn)?pn:Va();function _n(e,t,r,n,a,i){let l=he(e),f=en(t);e._disturbed=!0;let p=!1,S=_(void 0);return P((g,R)=>{let E;if(i!==void 0){if(E=()=>{let b=new Ga("Aborted","AbortError"),y=[];n||y.push(()=>t._state==="writable"?ft(t,b):_(void 0)),a||y.push(()=>e._state==="readable"?M(e,b):_(void 0)),A(()=>Promise.all(y.map(T=>T())),!0,b)},i.aborted){E();return}i.addEventListener("abort",E)}function L(){return P((b,y)=>{function T(B){B?b():v(Re(),T,y)}T(!1)})}function Re(){return p?_(!0):v(f._readyPromise,()=>P((b,y)=>{Be(l,{_chunkSteps:T=>{S=v(sn(f,T),void 0,s),b(!1)},_closeSteps:()=>b(!0),_errorSteps:y})}))}if(H(e,l._closedPromise,b=>{n?O(!0,b):A(()=>ft(t,b),!0,b)}),H(t,f._closedPromise,b=>{a?O(!0,b):A(()=>M(e,b),!0,b)}),W(e,l._closedPromise,()=>{r?O():A(()=>Oa(f))}),$(t)||t._state==="closed"){let b=new TypeError("the destination writable stream closed before all data could be piped to it");a?O(!0,b):A(()=>M(e,b),!0,b)}qe(L());function te(){let b=S;return v(S,()=>b!==S?te():void 0)}function H(b,y,T){b._state==="errored"?T(b._storedError):Ft(y,T)}function W(b,y,T){b._state==="closed"?T():zt(y,T)}function A(b,y,T){if(p)return;p=!0,t._state==="writable"&&!$(t)?zt(te(),B):B();function B(){F(b(),()=>V(y,T),we=>V(!0,we))}}function O(b,y){p||(p=!0,t._state==="writable"&&!$(t)?zt(te(),()=>V(b,y)):V(b,y))}function V(b,y){on(f),Q(l),i!==void 0&&i.removeEventListener("abort",E),b?R(y):g(void 0)}})}class Se{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!_t(this))throw gt("desiredSize");return fr(this)}close(){if(!_t(this))throw gt("close");if(!ge(this))throw new TypeError("The stream is not in a state that permits close");Ne(this)}enqueue(t=void 0){if(!_t(this))throw gt("enqueue");if(!ge(this))throw new TypeError("The stream is not in a state that permits enqueue");return St(this,t)}error(t=void 0){if(!_t(this))throw gt("error");X(this,t)}[Mt](t){Z(this);let r=this._cancelAlgorithm(t);return yt(this),r}[Lt](t){let r=this._controlledReadableStream;if(this._queue.length>0){let n=Yt(this);this._closeRequested&&this._queue.length===0?(yt(this),Qe(r)):$e(this),t._chunkSteps(n)}else qr(r,t),$e(this)}}Object.defineProperties(Se.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof o.toStringTag=="symbol"&&Object.defineProperty(Se.prototype,o.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function _t(e){return!h(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")?!1:e instanceof Se}function $e(e){if(!yn(e))return;if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;let r=e._pullAlgorithm();F(r,()=>{e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,$e(e))},n=>{X(e,n)})}function yn(e){let t=e._controlledReadableStream;return!ge(e)||!e._started?!1:!!(ee(t)&&Je(t)>0||fr(e)>0)}function yt(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ne(e){if(!ge(e))return;let t=e._controlledReadableStream;e._closeRequested=!0,e._queue.length===0&&(yt(e),Qe(t))}function St(e,t){if(!ge(e))return;let r=e._controlledReadableStream;if(ee(r)&&Je(r)>0)Ut(r,t,!1);else{let n;try{n=e._strategySizeAlgorithm(t)}catch(a){throw X(e,a),a}try{Ht(e,t,n)}catch(a){throw X(e,a),a}}$e(e)}function X(e,t){let r=e._controlledReadableStream;r._state==="readable"&&(Z(e),yt(e),wn(r,t))}function fr(e){let t=e._controlledReadableStream._state;return t==="errored"?null:t==="closed"?0:e._strategyHWM-e._queueTotalSize}function xa(e){return!yn(e)}function ge(e){let t=e._controlledReadableStream._state;return!e._closeRequested&&t==="readable"}function Sn(e,t,r,n,a,i,l){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Z(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=l,t._strategyHWM=i,t._pullAlgorithm=n,t._cancelAlgorithm=a,e._readableStreamController=t;let f=r();F(_(f),()=>{t._started=!0,$e(t)},p=>{X(t,p)})}function Za(e,t,r,n){let a=Object.create(Se.prototype),i=()=>{},l=()=>_(void 0),f=()=>_(void 0);t.start!==void 0&&(i=()=>t.start(a)),t.pull!==void 0&&(l=()=>t.pull(a)),t.cancel!==void 0&&(f=p=>t.cancel(p)),Sn(e,a,i,l,f,r,n)}function gt(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function Xa(e,t){return ae(e._readableStreamController)?Ka(e):Ja(e)}function Ja(e,t){let r=he(e),n=!1,a=!1,i=!1,l=!1,f,p,S,g,R,E=P(W=>{R=W});function L(){return n?(a=!0,_(void 0)):(n=!0,Be(r,{_chunkSteps:A=>{Ze(()=>{a=!1;let O=A,V=A;i||St(S._readableStreamController,O),l||St(g._readableStreamController,V),n=!1,a&&L()})},_closeSteps:()=>{n=!1,i||Ne(S._readableStreamController),l||Ne(g._readableStreamController),(!i||!l)&&R(void 0)},_errorSteps:()=>{n=!1}}),_(void 0))}function Re(W){if(i=!0,f=W,l){let A=ke([f,p]),O=M(e,A);R(O)}return E}function te(W){if(l=!0,p=W,i){let A=ke([f,p]),O=M(e,A);R(O)}return E}function H(){}return S=dr(H,L,Re),g=dr(H,L,te),Ft(r._closedPromise,W=>{X(S._readableStreamController,W),X(g._readableStreamController,W),(!i||!l)&&R(void 0)}),[S,g]}function Ka(e){let t=he(e),r=!1,n=!1,a=!1,i=!1,l=!1,f,p,S,g,R,E=P(b=>{R=b});function L(b){Ft(b._closedPromise,y=>{b===t&&(D(S._readableStreamController,y),D(g._readableStreamController,y),(!i||!l)&&R(void 0))})}function Re(){ie(t)&&(Q(t),t=he(e),L(t)),Be(t,{_chunkSteps:y=>{Ze(()=>{n=!1,a=!1;let T=y,B=y;if(!i&&!l)try{B=Mr(y)}catch(we){D(S._readableStreamController,we),D(g._readableStreamController,we),R(M(e,we));return}i||at(S._readableStreamController,T),l||at(g._readableStreamController,B),r=!1,n?H():a&&W()})},_closeSteps:()=>{r=!1,i||ze(S._readableStreamController),l||ze(g._readableStreamController),S._readableStreamController._pendingPullIntos.length>0&&ot(S._readableStreamController,0),g._readableStreamController._pendingPullIntos.length>0&&ot(g._readableStreamController,0),(!i||!l)&&R(void 0)},_errorSteps:()=>{r=!1}})}function te(b,y){x(t)&&(Q(t),t=xr(e),L(t));let T=y?g:S,B=y?S:g;Jr(t,b,{_chunkSteps:Ce=>{Ze(()=>{n=!1,a=!1;let Te=y?l:i;if(y?i:l)Te||it(T._readableStreamController,Ce);else{let Fn;try{Fn=Mr(Ce)}catch(br){D(T._readableStreamController,br),D(B._readableStreamController,br),R(M(e,br));return}Te||it(T._readableStreamController,Ce),at(B._readableStreamController,Fn)}r=!1,n?H():a&&W()})},_closeSteps:Ce=>{r=!1;let Te=y?l:i,qt=y?i:l;Te||ze(T._readableStreamController),qt||ze(B._readableStreamController),Ce!==void 0&&(Te||it(T._readableStreamController,Ce),!qt&&B._readableStreamController._pendingPullIntos.length>0&&ot(B._readableStreamController,0)),(!Te||!qt)&&R(void 0)},_errorSteps:()=>{r=!1}})}function H(){if(r)return n=!0,_(void 0);r=!0;let b=Zt(S._readableStreamController);return b===null?Re():te(b._view,!1),_(void 0)}function W(){if(r)return a=!0,_(void 0);r=!0;let b=Zt(g._readableStreamController);return b===null?Re():te(b._view,!0),_(void 0)}function A(b){if(i=!0,f=b,l){let y=ke([f,p]),T=M(e,y);R(T)}return E}function O(b){if(l=!0,p=b,i){let y=ke([f,p]),T=M(e,y);R(T)}return E}function V(){}return S=Rn(V,H,A),g=Rn(V,W,O),L(t),[S,g]}function eo(e,t){U(e,t);let r=e,n=r==null?void 0:r.autoAllocateChunkSize,a=r==null?void 0:r.cancel,i=r==null?void 0:r.pull,l=r==null?void 0:r.start,f=r==null?void 0:r.type;return{autoAllocateChunkSize:n===void 0?void 0:Wr(n,`${t} has member 'autoAllocateChunkSize' that`),cancel:a===void 0?void 0:to(a,r,`${t} has member 'cancel' that`),pull:i===void 0?void 0:ro(i,r,`${t} has member 'pull' that`),start:l===void 0?void 0:no(l,r,`${t} has member 'start' that`),type:f===void 0?void 0:ao(f,`${t} has member 'type' that`)}}function to(e,t,r){return j(e,r),n=>ne(e,t,[n])}function ro(e,t,r){return j(e,r),n=>ne(e,t,[n])}function no(e,t,r){return j(e,r),n=>Xe(e,t,[n])}function ao(e,t){if(e=`${e}`,e!=="bytes")throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function oo(e,t){U(e,t);let r=e==null?void 0:e.mode;return{mode:r===void 0?void 0:io(r,`${t} has member 'mode' that`)}}function io(e,t){if(e=`${e}`,e!=="byob")throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function so(e,t){return U(e,t),{preventCancel:!!(e==null?void 0:e.preventCancel)}}function gn(e,t){U(e,t);let r=e==null?void 0:e.preventAbort,n=e==null?void 0:e.preventCancel,a=e==null?void 0:e.preventClose,i=e==null?void 0:e.signal;return i!==void 0&&lo(i,`${t} has member 'signal' that`),{preventAbort:!!r,preventCancel:!!n,preventClose:!!a,signal:i}}function lo(e,t){if(!ga(e))throw new TypeError(`${t} is not an AbortSignal.`)}function uo(e,t){U(e,t);let r=e==null?void 0:e.readable;$t(r,"readable","ReadableWritablePair"),Qt(r,`${t} has member 'readable' that`);let n=e==null?void 0:e.writable;return $t(n,"writable","ReadableWritablePair"),Kr(n,`${t} has member 'writable' that`),{readable:r,writable:n}}class J{constructor(t={},r={}){t===void 0?t=null:Er(t,"First parameter");let n=ut(r,"Second parameter"),a=eo(t,"First parameter");if(cr(this),a.type==="bytes"){if(n.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let i=je(n,0);da(this,a,i)}else{let i=lt(n),l=je(n,1);Za(this,a,l,i)}}get locked(){if(!K(this))throw ue("locked");return ee(this)}cancel(t=void 0){return K(this)?ee(this)?d(new TypeError("Cannot cancel a stream that already has a reader")):M(this,t):d(ue("cancel"))}getReader(t=void 0){if(!K(this))throw ue("getReader");return oo(t,"First parameter").mode===void 0?he(this):xr(this)}pipeThrough(t,r={}){if(!K(this))throw ue("pipeThrough");Y(t,1,"pipeThrough");let n=uo(t,"First parameter"),a=gn(r,"Second parameter");if(ee(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");let i=_n(this,n.writable,a.preventClose,a.preventAbort,a.preventCancel,a.signal);return qe(i),n.readable}pipeTo(t,r={}){if(!K(this))return d(ue("pipeTo"));if(t===void 0)return d("Parameter 1 is required in 'pipeTo'.");if(!pe(t))return d(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let n;try{n=gn(r,"Second parameter")}catch(a){return d(a)}return ee(this)?d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):_e(t)?d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):_n(this,t,n.preventClose,n.preventAbort,n.preventCancel,n.signal)}tee(){if(!K(this))throw ue("tee");let t=Xa(this);return ke(t)}values(t=void 0){if(!K(this))throw ue("values");let r=so(t,"First parameter");return aa(this,r.preventCancel)}}Object.defineProperties(J.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),typeof o.toStringTag=="symbol"&&Object.defineProperty(J.prototype,o.toStringTag,{value:"ReadableStream",configurable:!0}),typeof o.asyncIterator=="symbol"&&Object.defineProperty(J.prototype,o.asyncIterator,{value:J.prototype.values,writable:!0,configurable:!0});function dr(e,t,r,n=1,a=()=>1){let i=Object.create(J.prototype);cr(i);let l=Object.create(Se.prototype);return Sn(i,l,e,t,r,n,a),i}function Rn(e,t,r){let n=Object.create(J.prototype);cr(n);let a=Object.create(me.prototype);return Gr(n,a,e,t,r,0,void 0),n}function cr(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function K(e){return!h(e)||!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")?!1:e instanceof J}function ee(e){return e._reader!==void 0}function M(e,t){if(e._disturbed=!0,e._state==="closed")return _(void 0);if(e._state==="errored")return d(e._storedError);Qe(e);let r=e._reader;r!==void 0&&ie(r)&&(r._readIntoRequests.forEach(a=>{a._closeSteps(void 0)}),r._readIntoRequests=new I);let n=e._readableStreamController[Mt](t);return re(n,s)}function Qe(e){e._state="closed";let t=e._reader;t!==void 0&&(wr(t),x(t)&&(t._readRequests.forEach(r=>{r._closeSteps()}),t._readRequests=new I))}function wn(e,t){e._state="errored",e._storedError=t;let r=e._reader;r!==void 0&&(Dt(r,t),x(r)?(r._readRequests.forEach(n=>{n._errorSteps(t)}),r._readRequests=new I):(r._readIntoRequests.forEach(n=>{n._errorSteps(t)}),r._readIntoRequests=new I))}function ue(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function Cn(e,t){U(e,t);let r=e==null?void 0:e.highWaterMark;return $t(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Nt(r)}}let Tn=e=>e.byteLength;try{Object.defineProperty(Tn,"name",{value:"size",configurable:!0})}catch(e){}class Rt{constructor(t){Y(t,1,"ByteLengthQueuingStrategy"),t=Cn(t,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=t.highWaterMark}get highWaterMark(){if(!En(this))throw Pn("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!En(this))throw Pn("size");return Tn}}Object.defineProperties(Rt.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof o.toStringTag=="symbol"&&Object.defineProperty(Rt.prototype,o.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Pn(e){return new TypeError(`ByteLengthQueuingStrategy.prototype.${e} can only be used on a ByteLengthQueuingStrategy`)}function En(e){return!h(e)||!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")?!1:e instanceof Rt}let vn=()=>1;try{Object.defineProperty(vn,"name",{value:"size",configurable:!0})}catch(e){}class wt{constructor(t){Y(t,1,"CountQueuingStrategy"),t=Cn(t,"First parameter"),this._countQueuingStrategyHighWaterMark=t.highWaterMark}get highWaterMark(){if(!qn(this))throw Wn("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!qn(this))throw Wn("size");return vn}}Object.defineProperties(wt.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof o.toStringTag=="symbol"&&Object.defineProperty(wt.prototype,o.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Wn(e){return new TypeError(`CountQueuingStrategy.prototype.${e} can only be used on a CountQueuingStrategy`)}function qn(e){return!h(e)||!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")?!1:e instanceof wt}function fo(e,t){U(e,t);let r=e==null?void 0:e.flush,n=e==null?void 0:e.readableType,a=e==null?void 0:e.start,i=e==null?void 0:e.transform,l=e==null?void 0:e.writableType;return{flush:r===void 0?void 0:co(r,e,`${t} has member 'flush' that`),readableType:n,start:a===void 0?void 0:bo(a,e,`${t} has member 'start' that`),transform:i===void 0?void 0:ho(i,e,`${t} has member 'transform' that`),writableType:l}}function co(e,t,r){return j(e,r),n=>ne(e,t,[n])}function bo(e,t,r){return j(e,r),n=>Xe(e,t,[n])}function ho(e,t,r){return j(e,r),(n,a)=>ne(e,t,[n,a])}class Ct{constructor(t={},r={},n={}){t===void 0&&(t=null);let a=ut(r,"Second parameter"),i=ut(n,"Third parameter"),l=fo(t,"First parameter");if(l.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(l.writableType!==void 0)throw new RangeError("Invalid writableType specified");let f=je(i,0),p=lt(i),S=je(a,1),g=lt(a),R,E=P(L=>{R=L});mo(this,E,S,g,f,p),_o(this,l),l.start!==void 0?R(l.start(this._transformStreamController)):R(void 0)}get readable(){if(!An(this))throw zn("readable");return this._readable}get writable(){if(!An(this))throw zn("writable");return this._writable}}Object.defineProperties(Ct.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof o.toStringTag=="symbol"&&Object.defineProperty(Ct.prototype,o.toStringTag,{value:"TransformStream",configurable:!0});function mo(e,t,r,n,a,i){function l(){return t}function f(E){return go(e,E)}function p(E){return Ro(e,E)}function S(){return wo(e)}e._writable=Ca(l,f,S,p,r,n);function g(){return Co(e)}function R(E){return Pt(e,E),_(void 0)}e._readable=dr(l,g,R,a,i),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Et(e,!0),e._transformStreamController=void 0}function An(e){return!h(e)||!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")?!1:e instanceof Ct}function Tt(e,t){X(e._readable._readableStreamController,t),Pt(e,t)}function Pt(e,t){Bn(e._transformStreamController),ar(e._writable._writableStreamController,t),e._backpressure&&Et(e,!1)}function Et(e,t){e._backpressureChangePromise!==void 0&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=P(r=>{e._backpressureChangePromise_resolve=r}),e._backpressure=t}class Ue{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!vt(this))throw Wt("desiredSize");let t=this._controlledTransformStream._readable._readableStreamController;return fr(t)}enqueue(t=void 0){if(!vt(this))throw Wt("enqueue");kn(this,t)}error(t=void 0){if(!vt(this))throw Wt("error");yo(this,t)}terminate(){if(!vt(this))throw Wt("terminate");So(this)}}Object.defineProperties(Ue.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof o.toStringTag=="symbol"&&Object.defineProperty(Ue.prototype,o.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function vt(e){return!h(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")?!1:e instanceof Ue}function po(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}function _o(e,t){let r=Object.create(Ue.prototype),n=i=>{try{return kn(r,i),_(void 0)}catch(l){return d(l)}},a=()=>_(void 0);t.transform!==void 0&&(n=i=>t.transform(i,r)),t.flush!==void 0&&(a=()=>t.flush(r)),po(e,r,n,a)}function Bn(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function kn(e,t){let r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!ge(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{St(n,t)}catch(i){throw Pt(r,i),r._readable._storedError}xa(n)!==r._backpressure&&Et(r,!0)}function yo(e,t){Tt(e._controlledTransformStream,t)}function On(e,t){let r=e._transformAlgorithm(t);return re(r,void 0,n=>{throw Tt(e._controlledTransformStream,n),n})}function So(e){let t=e._controlledTransformStream,r=t._readable._readableStreamController;Ne(r);let n=new TypeError("TransformStream terminated");Pt(t,n)}function go(e,t){let r=e._transformStreamController;if(e._backpressure){let n=e._backpressureChangePromise;return re(n,()=>{let a=e._writable;if(a._state==="erroring")throw a._storedError;return On(r,t)})}return On(r,t)}function Ro(e,t){return Tt(e,t),_(void 0)}function wo(e){let t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return Bn(r),re(n,()=>{if(t._state==="errored")throw t._storedError;Ne(t._readableStreamController)},a=>{throw Tt(e,a),t._storedError})}function Co(e){return Et(e,!1),e._backpressureChangePromise}function Wt(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}function zn(e){return new TypeError(`TransformStream.prototype.${e} can only be used on a TransformStream`)}u.ByteLengthQueuingStrategy=Rt,u.CountQueuingStrategy=wt,u.ReadableByteStreamController=me,u.ReadableStream=J,u.ReadableStreamBYOBReader=Ie,u.ReadableStreamBYOBRequest=Oe,u.ReadableStreamDefaultController=Se,u.ReadableStreamDefaultReader=Ae,u.TransformStream=Ct,u.TransformStreamDefaultController=Ue,u.WritableStream=De,u.WritableStreamDefaultController=ye,u.WritableStreamDefaultWriter=Me,Object.defineProperty(u,"__esModule",{value:!0})})});var $n=hr(()=>{if(!globalThis.ReadableStream)try{let u=At("process"),{emitWarning:o}=u;try{u.emitWarning=()=>{},Object.assign(globalThis,At("stream/web")),u.emitWarning=o}catch(s){throw u.emitWarning=o,s}}catch(u){Object.assign(globalThis,Ln())}try{let{Blob:u}=At("buffer");u&&!u.prototype.stream&&(u.prototype.stream=function(s){let c=0,m=this;return new ReadableStream({type:"bytes",async pull(h){let N=await m.slice(c,Math.min(m.size,c+65536)).arrayBuffer();c+=N.byteLength,h.enqueue(new Uint8Array(N)),c===m.size&&h.close()}})})}catch(u){}});var xn=hr((ni,Gn)=>{if(!globalThis.DOMException)try{let{MessageChannel:u}=At("worker_threads"),o=new u().port1,s=new ArrayBuffer;o.postMessage(s,[s,s])}catch(u){u.constructor.name==="DOMException"&&(globalThis.DOMException=u.constructor)}Gn.exports=globalThis.DOMException});var Qo=jn($n(),1);var Nn=65536;async function*mr(u,o=!0){for(let s of u)if("stream"in s)yield*s.stream();else if(ArrayBuffer.isView(s))if(o){let c=s.byteOffset,m=s.byteOffset+s.byteLength;for(;c!==m;){let h=Math.min(m-c,Nn),w=s.buffer.slice(c,c+h);c+=w.byteLength,yield new Uint8Array(w)}}else yield s;else{let c=0,m=s;for(;c!==m.size;){let w=await m.slice(c,Math.min(m.size,c+Nn)).arrayBuffer();c+=w.byteLength,yield new Uint8Array(w)}}}var G,Ye,Pe,kt,Ee,Qn=(Ee=class{constructor(o=[],s={}){k(this,G,[]);k(this,Ye,"");k(this,Pe,0);k(this,kt,"transparent");if(typeof o!="object"||o===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof o[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof s!="object"&&typeof s!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");s===null&&(s={});let c=new TextEncoder;for(let h of o){let w;ArrayBuffer.isView(h)?w=new Uint8Array(h.buffer.slice(h.byteOffset,h.byteOffset+h.byteLength)):h instanceof ArrayBuffer?w=new Uint8Array(h.slice(0)):h instanceof Ee?w=h:w=c.encode(`${h}`),q(this,Pe,C(this,Pe)+(ArrayBuffer.isView(w)?w.byteLength:w.size)),C(this,G).push(w)}q(this,kt,`${s.endings===void 0?"transparent":s.endings}`);let m=s.type===void 0?"":String(s.type);q(this,Ye,/^[\x20-\x7E]*$/.test(m)?m:"")}get size(){return C(this,Pe)}get type(){return C(this,Ye)}async text(){let o=new TextDecoder,s="";for await(let c of mr(C(this,G),!1))s+=o.decode(c,{stream:!0});return s+=o.decode(),s}async arrayBuffer(){let o=new Uint8Array(this.size),s=0;for await(let c of mr(C(this,G),!1))o.set(c,s),s+=c.length;return o.buffer}stream(){let o=mr(C(this,G),!0);return new globalThis.ReadableStream({type:"bytes",async pull(s){let c=await o.next();c.done?s.close():s.enqueue(c.value)},async cancel(){await o.return()}})}slice(o=0,s=this.size,c=""){let{size:m}=this,h=o<0?Math.max(m+o,0):Math.min(o,m),w=s<0?Math.max(m+s,0):Math.min(s,m),N=Math.max(w-h,0),Ot=C(this,G),xe=[],We=0;for(let _ of Ot){if(We>=N)break;let d=ArrayBuffer.isView(_)?_.byteLength:_.size;if(h&&d<=h)h-=d,w-=d;else{let v;ArrayBuffer.isView(_)?(v=_.subarray(h,Math.min(d,w)),We+=v.byteLength):(v=_.slice(h,Math.min(d,w)),We+=v.size),w-=d,xe.push(v),h=0}}let P=new Ee([],{type:String(c).toLowerCase()});return q(P,Pe,N),q(P,G,xe),P}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](o){return o&&typeof o=="object"&&typeof o.constructor=="function"&&(typeof o.stream=="function"||typeof o.arrayBuffer=="function")&&/^(Blob|File)$/.test(o[Symbol.toStringTag])}},G=new WeakMap,Ye=new WeakMap,Pe=new WeakMap,kt=new WeakMap,Ee);Object.defineProperties(Qn.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});var Ao=Qn,ve=Ao;var He,Ve,Un,Bo=(Un=class extends ve{constructor(s,c,m={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(s,m);k(this,He,0);k(this,Ve,"");m===null&&(m={});let h=m.lastModified===void 0?Date.now():Number(m.lastModified);Number.isNaN(h)||q(this,He,h),q(this,Ve,String(c))}get name(){return C(this,Ve)}get lastModified(){return C(this,He)}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](s){return!!s&&s instanceof ve&&/^(File)$/.test(s[Symbol.toStringTag])}},He=new WeakMap,Ve=new WeakMap,Un),ko=Bo,pr=ko;var{toStringTag:Ge,iterator:Oo,hasInstance:zo}=Symbol,Yn=Math.random,Fo="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),Hn=(u,o,s)=>(u+="",/^(Blob|File)$/.test(o&&o[Ge])?[(s=s!==void 0?s+"":o[Ge]=="File"?o.name:"blob",u),o.name!==s||o[Ge]=="blob"?new pr([o],s,o):o]:[u,o+""]),_r=(u,o)=>(o?u:u.replace(/\r?\n|\r/g,`\r
  4. `)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),fe=(u,o,s)=>{if(o.length<s)throw new TypeError(`Failed to execute '${u}' on 'FormData': ${s} arguments required, but only ${o.length} present.`)};var z,Vn,Jo=(Vn=class{constructor(...o){k(this,z,[]);if(o.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[Ge](){return"FormData"}[Oo](){return this.entries()}static[zo](o){return o&&typeof o=="object"&&o[Ge]==="FormData"&&!Fo.some(s=>typeof o[s]!="function")}append(...o){fe("append",arguments,2),C(this,z).push(Hn(...o))}delete(o){fe("delete",arguments,1),o+="",q(this,z,C(this,z).filter(([s])=>s!==o))}get(o){fe("get",arguments,1),o+="";for(var s=C(this,z),c=s.length,m=0;m<c;m++)if(s[m][0]===o)return s[m][1];return null}getAll(o,s){return fe("getAll",arguments,1),s=[],o+="",C(this,z).forEach(c=>c[0]===o&&s.push(c[1])),s}has(o){return fe("has",arguments,1),o+="",C(this,z).some(s=>s[0]===o)}forEach(o,s){fe("forEach",arguments,1);for(var[c,m]of this)o.call(s,m,c,this)}set(...o){fe("set",arguments,2);var s=[],c=!0;o=Hn(...o),C(this,z).forEach(m=>{m[0]===o[0]?c&&(c=!s.push(o)):s.push(m)}),c&&s.push(o),q(this,z,s)}*entries(){yield*C(this,z)}*keys(){for(var[o]of this)yield o}*values(){for(var[,o]of this)yield o}},z=new WeakMap,Vn);function ei(u,o=ve){var s=`${Yn()}${Yn()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),c=[],m=`--${s}\r
  5. Content-Disposition: form-data; name="`;return u.forEach((h,w)=>typeof h=="string"?c.push(m+_r(w)+`"\r
  6. \r
  7. ${h.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
  8. `)}\r
  9. `):c.push(m+_r(w)+`"; filename="${_r(h.name,1)}"\r
  10. Content-Type: ${h.type||"application/octet-stream"}\r
  11. \r
  12. `,h,`\r
  13. `)),c.push(`--${s}--`),new o(c,{type:"multipart/form-data; boundary="+s})}import{statSync as oi,createReadStream as Io,promises as jo}from"fs";var Xn=jn(xn(),1);var{stat:Do}=jo;var de,ce,yr=class{constructor(o){k(this,de,void 0);k(this,ce,void 0);q(this,de,o.path),q(this,ce,o.start),this.size=o.size,this.lastModified=o.lastModified}slice(o,s){return new yr({path:C(this,de),lastModified:this.lastModified,size:s-o,start:C(this,ce)+o})}async*stream(){let{mtimeMs:o}=await Do(C(this,de));if(o>this.lastModified)throw new Xn.default("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError");yield*Io(C(this,de),{start:C(this,ce),end:C(this,ce)+this.size-1})}get[Symbol.toStringTag](){return"Blob"}},Zn=yr;de=new WeakMap,ce=new WeakMap;export{At as a,hr as b,jn as c,ve as d,pr as e,Jo as f,ei as g};
  14. /*! Bundled license information:
  15. node-domexception/index.js:
  16. (*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
  17. fetch-blob/index.js:
  18. (*! fetch-blob. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
  19. formdata-polyfill/esm.min.js:
  20. (*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
  21. */