@toruslabs/openlogin-jrpc
Version:
OpenLogin is a plug & play authentication suite that combines the simplicity of passwordless authentication with the security of non-custodial public key infrastructure (PKI).
2 lines • 144 kB
JavaScript
/*! For license information please see openloginJrpc.umd.min.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.OpenloginJrpc=t():e.OpenloginJrpc=t()}(self,(()=>(()=>{var e={7083:e=>{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},2681:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(8158),o=r(9198);function i(){}const s="ACK";class a extends o.Duplex{constructor(e){let{name:t,target:r,targetWindow:o=window,targetOrigin:i="*"}=e;if(super({objectMode:!0}),(0,n.A)(this,"_init",void 0),(0,n.A)(this,"_haveSyn",void 0),(0,n.A)(this,"_name",void 0),(0,n.A)(this,"_target",void 0),(0,n.A)(this,"_targetWindow",void 0),(0,n.A)(this,"_targetOrigin",void 0),(0,n.A)(this,"_onMessage",void 0),(0,n.A)(this,"_synIntervalId",void 0),!t||!r)throw new Error("Invalid input.");this._init=!1,this._haveSyn=!1,this._name=t,this._target=r,this._targetWindow=o,this._targetOrigin=i,this._onMessage=this.onMessage.bind(this),this._synIntervalId=null,window.addEventListener("message",this._onMessage,!1),this._handShake()}_break(){this.cork(),this._write("BRK",null,i),this._haveSyn=!1,this._init=!1}_handShake(){this._write("SYN",null,i),this.cork()}_onData(e){if(this._init)if("BRK"===e)this._break();else try{this.push(e)}catch(e){this.emit("error",e)}else"SYN"===e?(this._haveSyn=!0,this._write(s,null,i)):e===s&&(this._init=!0,this._haveSyn||this._write(s,null,i),this.uncork())}_postMessage(e){const t=this._targetOrigin;this._targetWindow.postMessage({target:this._target,data:e},t)}onMessage(e){const t=e.data;"*"!==this._targetOrigin&&e.origin!==this._targetOrigin||e.source!==this._targetWindow||"object"!=typeof t||t.target!==this._name||!t.data||this._onData(t.data)}_read(){}_write(e,t,r){this._postMessage(e),r()}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}},2537:(e,t,r)=>{"use strict";r.d(t,{f:()=>n,z:()=>o});const n={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},o={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},869:(e,t,r)=>{"use strict";r.d(t,{B:()=>u,G:()=>l});var n=r(8158),o=r(282),i=r.n(o),s=r(1330);function a(e,t){if("[Circular]"!==t)return t}class l extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a non-empty string.');(0,s.el)(r)?(super(t,{cause:r.cause}),(0,n.A)(this,"cause",void 0),(0,n.A)(this,"code",void 0),(0,n.A)(this,"data",void 0),Object.hasOwn(this,"cause")||Object.assign(this,{cause:r.cause})):(super(t),(0,n.A)(this,"cause",void 0),(0,n.A)(this,"code",void 0),(0,n.A)(this,"data",void 0)),void 0!==r&&(this.data=r),this.code=e,this.cause=null==r?void 0:r.cause}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,(0,s.Qd)(this.data)&&(e.data.cause=(0,s._K)(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return i()(this.serialize(),a,2)}}class u extends l{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}},3832:(e,t,r)=>{"use strict";r.d(t,{P:()=>c,r:()=>u});var n=r(2537),o=r(869),i=r(1330);function s(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[null!=t?t:void 0,r]}}return[]}function a(e,t){const[r,n]=s(t);return new o.G(e,null!=r?r:(0,i.DW)(e),n)}function l(e,t){const[r,n]=s(t);return new o.B(e,null!=r?r:(0,i.DW)(e),n)}const u={parse:e=>a(n.f.rpc.parse,e),invalidRequest:e=>a(n.f.rpc.invalidRequest,e),invalidParams:e=>a(n.f.rpc.invalidParams,e),methodNotFound:e=>a(n.f.rpc.methodNotFound,e),internal:e=>a(n.f.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return a(t,e)},invalidInput:e=>a(n.f.rpc.invalidInput,e),resourceNotFound:e=>a(n.f.rpc.resourceNotFound,e),resourceUnavailable:e=>a(n.f.rpc.resourceUnavailable,e),transactionRejected:e=>a(n.f.rpc.transactionRejected,e),methodNotSupported:e=>a(n.f.rpc.methodNotSupported,e),limitExceeded:e=>a(n.f.rpc.limitExceeded,e)},c={userRejectedRequest:e=>l(n.f.provider.userRejectedRequest,e),unauthorized:e=>l(n.f.provider.unauthorized,e),unsupportedMethod:e=>l(n.f.provider.unsupportedMethod,e),disconnected:e=>l(n.f.provider.disconnected,e),chainDisconnected:e=>l(n.f.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new o.B(t,r,n)}}},1835:(e,t,r)=>{"use strict";r.d(t,{AG:()=>s.AG,B:()=>o.B,DW:()=>s.DW,Gm:()=>o.G,Gv:()=>s.Gv,I5:()=>s.I5,P5:()=>s.P5,Pm:()=>i.P,Qd:()=>s.Qd,Qh:()=>s.Qh,_K:()=>s._K,el:()=>s.el,fv:()=>n.f,rK:()=>i.r,zI:()=>n.z});var n=r(2537),o=r(869),i=r(3832),s=r(1330)},1330:(e,t,r)=>{"use strict";r.d(t,{AG:()=>a,DW:()=>h,Gv:()=>c,I5:()=>l,P5:()=>w,Qd:()=>f,Qh:()=>u,_K:()=>g,el:()=>m});var n=r(9740),o=r(2537);const i=o.f.rpc.internal,s="Unspecified error message. This is a bug, please report it.",a="Unspecified server error.";function l(e){return Number.isInteger(e)}function u(e){return"string"==typeof e&&e.length>0}function c(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)}function f(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}}function d(e){const t=e;return!(!t||!l(t.code)||!u(t.message)||t.stack&&!u(t.stack))}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;if(l(e)){const t=e.toString();if(Object.hasOwn(o.z,t))return o.z[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return a}return t}const p={code:i,message:h(i)};function b(e){try{JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"===e||"constructor"===e)throw new Error("Not valid json");if("function"==typeof t||"symbol"==typeof t)throw new Error("Not valid json");return t})),((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t}))}catch(e){return!1}return!0}function y(e){return Object.getOwnPropertyNames(e).reduce(((t,r)=>{const n=e[r];return b(n)&&(t[r]=n),t}),{})}function g(e){return Array.isArray(e)?e.map((e=>b(e)?e:c(e)?y(e):null)):c(e)?y(e):b(e)?e:null}function w(e){let{fallbackError:t=p,shouldIncludeStack:r=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!d(t))throw new Error("Must provide fallback error with integer number code and string message.");const o=function(e,t){if(e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize)return e.serialize();if(d(e))return e;const r=g(e);return(0,n.A)((0,n.A)({},t),{},{data:{cause:r}})}(e,t);return r||delete o.stack,o}function m(e){return c(e)&&Object.hasOwn(e,"cause")&&c(e.cause)}},7927:()=>{},786:(e,t,r)=>{"use strict";r.d(t,{$R:()=>c,BY:()=>f,dw:()=>l,jg:()=>d,jh:()=>a,ld:()=>u,m4:()=>s});var n=r(9198),o=r(3836),i=r(2680);const s=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(n,o)=>{n||o.error?t(n||o.error):!r||Array.isArray(o)?e(o):e(o.result)}};function a(e){return(t,r,n,o)=>{try{if("string"!=typeof t.method||!t.method)return r.error=new i.A({code:-32603,message:"invalid method"}),void o();n((t=>{const{error:n}=r;return n?(e.error(`OpenLogin - RPC Error: ${n.message}`,n),t()):t()}))}catch(t){e.error(`OpenLogin - RPC Error thrown: ${t.message}`,t),r.error=new i.A({code:-32603,message:t.message}),o()}}}function l(){const e={},t=new o.A,r=new n.Duplex({objectMode:!0,read:function(){return!1},write:function(r,n,o){let i;try{r.id?function(t){const r=e[t.id];if(!r)throw new Error(`StreamMiddleware - Unknown response id "${t.id}"`);delete e[t.id],Object.assign(r.res,t),setTimeout(r.end)}(r):function(e){t.emit("notification",e)}(r)}catch(e){i=e}o(i)}});return{events:t,middleware:(t,n,o,i)=>{r.push(t),e[t.id]={req:t,res:n,next:o,end:i}},stream:r}}function u(e){return(t,r,n,o)=>{const i=e[t.method];return void 0===i?n():"function"==typeof i?i(t,r,n,o):(r.result=i,o())}}function c(){return(e,t,r,n)=>{const o=e.id,i=Math.random().toString(36).slice(2);e.id=i,t.id=i,r((r=>{e.id=o,t.id=o,r()}))}}function f(e){return(t,r,n,o)=>{e.debug("REQ",t,"RES",r),n()}}function d(e){return async(t,r,n,o)=>{let i;const s=new Promise((e=>{i=e}));let a=null,l=!1;const u=async()=>{l=!0,n((e=>{a=e,i()})),await s};try{await e(t,r,u),l?(await s,a(null)):o(null)}catch(e){const t=e;a?a(t):o(t)}}}},1548:(e,t,r)=>{"use strict";r.d(t,{Vv:()=>f,WJ:()=>c,iQ:()=>p,iR:()=>h,kl:()=>b,lr:()=>d});var n=r(9740),o=r(8158),i=r(9198),s=r(3832),a=r(1330),l=r(3836),u=r(2680);class c extends l.A{constructor(){super(),(0,o.A)(this,"_middleware",void 0),this._middleware=[]}static async _runAllMiddleware(e,t,r){const n=[];let o=null,i=!1;for(const s of r)if([o,i]=await c._runMiddleware(e,t,s,n),i)break;return[o,i,n.reverse()]}static _runMiddleware(e,t,r,n){return new Promise((o=>{const i=e=>{const r=e||t.error;r&&("object"==typeof r&&!1===Object.keys(r).includes("stack")&&(r.stack="Stack trace is not available."),t.error=(0,a.P5)(r,{shouldIncludeStack:!0,fallbackError:{message:(null==r?void 0:r.message)||(null==r?void 0:r.toString()),code:(null==r?void 0:r.code)||-32603,stack:(null==r?void 0:r.stack)||"Stack trace is not available.",data:(null==r?void 0:r.data)||(null==r?void 0:r.message)||(null==r?void 0:r.toString())}})),o([r,!0])},s=e=>{t.error?i(t.error):(e&&("function"!=typeof e&&i(new u.A({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),n.push(e)),o([null,!1]))};try{r(e,t,s,i)}catch(e){i(e)}}))}static async _runReturnHandlers(e){for(const t of e)await new Promise(((e,r)=>{t((t=>t?r(t):e()))}))}static _checkForCompletion(e,t,r){if(!("result"in t)&&!("error"in t))throw new u.A({code:-32603,message:"Response has no error or result for request"});if(!r)throw new u.A({code:-32603,message:"Nothing ended request"})}push(e){this._middleware.push(e)}handle(e,t){if(t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,r,n)=>{try{const[o,i,s]=await c._runAllMiddleware(e,t,this._middleware);return i?(await c._runReturnHandlers(s),n(o)):r((async e=>{try{await c._runReturnHandlers(s)}catch(t){return e(t)}return e()}))}catch(e){return n(e)}}}async _handleBatch(e,t){try{const r=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}}_promiseHandle(e){return new Promise(((t,r)=>{this._handle(e,((e,n)=>{e&&void 0===n?r(e):t(n)})).catch(r)}))}async _handle(e,t){if(!e||Array.isArray(e)||"object"!=typeof e){const e=new u.A({code:-32603,message:"request must be plain object"});return t(e,{id:void 0,jsonrpc:"2.0",error:e})}if("string"!=typeof e.method){const r=new u.A({code:-32603,message:"method must be string"});return t(r,{id:e.id,jsonrpc:"2.0",error:r})}const r=(0,n.A)({},e),o={id:r.id,jsonrpc:r.jsonrpc};let i=null;try{await this._processRequest(r,o)}catch(e){i=e}var s,l,c,f,d,h,p;return i&&(delete o.result,o.error||("object"==typeof i&&!1===Object.keys(i).includes("stack")&&(i.stack="Stack trace is not available."),o.error=(0,a.P5)(i,{shouldIncludeStack:!0,fallbackError:{message:(null===(s=i)||void 0===s?void 0:s.message)||(null===(l=i)||void 0===l?void 0:l.toString()),code:(null===(c=i)||void 0===c?void 0:c.code)||-32603,stack:(null===(f=i)||void 0===f?void 0:f.stack)||"Stack trace is not available.",data:(null===(d=i)||void 0===d?void 0:d.data)||(null===(h=i)||void 0===h?void 0:h.message)||(null===(p=i)||void 0===p?void 0:p.toString())}}))),t(i,o)}async _processRequest(e,t){const[r,n,o]=await c._runAllMiddleware(e,t,this._middleware);if(c._checkForCompletion(e,t,n),await c._runReturnHandlers(o),r)throw r}}function f(e){const t=new c;return e.forEach((e=>t.push(e))),t.asMiddleware()}function d(e){if(!e||!e.engine)throw new Error("Missing engine parameter!");const{engine:t}=e;let r;return r=new i.Duplex({objectMode:!0,read:function(){},write:function(e,n,o){t.handle(e,((e,t)=>{r.push(t)})),o()}}),t.on&&t.on("notification",(e=>{r.push(e)})),r}function h(e){const t=new l.A;return t.sendAsync=async t=>{const r=await e.handle(t);if(r.error){var n,o,i,l,u,c,f;"object"==typeof r.error&&!1===Object.keys(r.error).includes("stack")&&(r.error.stack="Stack trace is not available.");const e=(0,a.P5)(r.error,{fallbackError:{message:(null===(n=r.error)||void 0===n?void 0:n.message)||(null===(o=r.error)||void 0===o?void 0:o.toString()),code:(null===(i=r.error)||void 0===i?void 0:i.code)||-32603,stack:(null===(l=r.error)||void 0===l?void 0:l.stack)||"Stack trace is not available.",data:(null===(u=r.error)||void 0===u?void 0:u.data)||(null===(c=r.error)||void 0===c?void 0:c.message)||(null===(f=r.error)||void 0===f?void 0:f.toString())},shouldIncludeStack:!0});throw s.r.internal(e)}return r.result},t.send=(t,r)=>{if("function"!=typeof r)throw new Error('Must provide callback to "send" method.');e.handle(t,r)},e.on&&e.on("notification",(e=>{t.emit("data",null,e)})),t.request=async e=>{const r=(0,n.A)((0,n.A)({},e),{},{id:Math.random().toString(36).slice(2),jsonrpc:"2.0"});return await t.sendAsync(r)},t}function p(e){const t=new c;return t.push(e),h(t)}function b(e){return async(t,r,n,o)=>{try{const n=await e.sendAsync(t);return r.result=n,o()}catch(e){return o(e)}}}},657:(e,t,r)=>{"use strict";r.d(t,{QW:()=>b,W7:()=>h,Wv:()=>p});var n=r(9740),o=r(8158),i=r(1822),s=r.n(i),a=r(3358),l=r.n(a),u=r(2720),c=r.n(u),f=r(9198),d=r(4577);const h=Symbol("IGNORE_SUBSTREAM");class p extends f.Duplex{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super((0,n.A)((0,n.A)({},e),{},{objectMode:!0})),(0,o.A)(this,"_substreams",void 0),(0,o.A)(this,"getStream",void 0),this._substreams={}}createStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);const t=new d.A({parent:this,name:e});return this._substreams[e]=t,function(e,r){const n=l()((e=>t.destroy(e||void 0)));s()(e,{readable:!1},n),s()(e,{writable:!1},n)}(this),t}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);this._substreams[e]=h}_read(){}_write(e,t,r){const{name:n,data:o}=e;if(!n)return window.console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),r();const i=this._substreams[n];return i?(i!==h&&i.push(o),r()):(window.console.warn(`ObjectMultiplex - orphaned data for stream "${n}"`),r())}}function b(e){const t=new p;return t.getStream=function(e){return this._substreams[e]?this._substreams[e]:this.createStream(e)},c()(e,t,e,(e=>{e&&window.console.error(e)})),t}},8770:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(2681);class o extends n.A{_postMessage(e){let t=this._targetOrigin;if("object"==typeof e){const r=e;if("object"==typeof r.data){const e=r.data;if(Array.isArray(e.params)&&e.params.length>0){const r=e.params[0];r._origin&&(t=r._origin),r._origin=window.location.origin}}}this._targetWindow.postMessage({target:this._target,data:e},t)}}},3836:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(46);function o(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}class i extends n.EventEmitter{emit(e){let t="error"===e;const r=this._events;if(void 0!==r)t=t&&void 0===r.error;else if(!t)return!1;for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];if(t){let e;if(i.length>0&&([e]=i),e instanceof Error)throw e;const t=new Error("Unhandled error."+(e?` (${e.message})`:""));throw t.context=e,t}const a=r[e];if(void 0===a)return!1;if("function"==typeof a)o(a,this,i);else{const e=a.length,t=function(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}(a);for(let r=0;r<e;r+=1)o(t[r],this,i)}return!0}}},2680:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(8158),o=r(282),i=r.n(o);class s extends Error{constructor(e){let{code:t,message:r,data:o}=e;if(!Number.isInteger(t))throw new Error("code must be an integer");if(!r||"string"!=typeof r)throw new Error("message must be string");super(r),(0,n.A)(this,"code",void 0),(0,n.A)(this,"data",void 0),this.code=t,void 0!==o&&(this.data=o)}toString(){return i()({code:this.code,message:this.message,data:this.data,stack:this.stack})}}},4577:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(8158),o=r(9198);class i extends o.Duplex{constructor(e){let{parent:t,name:r}=e;super({objectMode:!0}),(0,n.A)(this,"_parent",void 0),(0,n.A)(this,"_name",void 0),this._parent=t,this._name=r}_read(){}_write(e,t,r){this._parent.push({name:this._name,data:e}),r()}}},7991:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=a(e),s=i[0],l=i[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,l)),c=0,f=l>0?s-4:s;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=16383,a=0,u=n-o;a<u;a+=s)i.push(l(e,a,a+s>u?u:a+s));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=i[s],n[i.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var o,i,s=[],a=t;a<n;a+=3)o=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},1048:(e,t,r)=>{"use strict";const n=r(7991),o=r(9318),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|b(e,t);let n=a(r);const o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,r);const o=function(e){if(l.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||K(e.length)?a(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return c(e),a(e<0?0:0|p(e))}function d(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,l.prototype),n}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function b(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(o)return n?-1:q(e).length;t=(""+t).toLowerCase(),o=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return O(this,t,r);case"latin1":case"binary":return N(this,t,r);case"base64":return R(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function w(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),K(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,o){let i,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){let n=-1;for(i=r;i<a;i++)if(u(e,i)===u(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===l)return n*s}else-1!==n&&(i-=i-n),n=-1}else for(r+l>a&&(r=a-l),i=r;i>=0;i--){let r=!0;for(let n=0;n<l;n++)if(u(e,i+n)!==u(t,n)){r=!1;break}if(r)return i}return-1}function _(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=t.length;let s;for(n>i/2&&(n=i/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(K(n))return s;e[r+s]=n}return s}function v(e,t,r,n){return J(q(t,e.length-r),e,r,n)}function E(e,t,r,n){return J(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return J(z(t),e,r,n)}function A(e,t,r,n){return J(function(e,t){let r,n,o;const i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function R(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let i=null,s=t>239?4:t>223?3:t>191?2:1;if(o+s<=r){let r,n,a,l;switch(s){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(l=(31&t)<<6|63&r,l>127&&(i=l));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(l=(15&t)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(i=l));break;case 4:r=e[o+1],n=e[o+2],a=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,l>65535&&l<1114112&&(i=l))}}null===i?(i=65533,s=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=s}return function(e){const t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=I));return r}(n)}t.kMaxLength=s,l.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,r){return function(e,t,r){return c(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},l.allocUnsafe=function(e){return f(e)},l.allocUnsafeSlow=function(e){return f(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(Y(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=l.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(Y(t,Uint8Array))o+t.length>n.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},l.byteLength=b,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)g(this,t,t+1);return this},l.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},l.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},l.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):y.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(l.prototype[i]=l.prototype.inspect),l.prototype.compare=function(e,t,r,n,o){if(Y(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(i,s),u=this.slice(n,o),c=e.slice(t,r);for(let e=0;e<a;++e)if(u[e]!==c[e]){i=u[e],s=c[e];break}return i<s?-1:s<i?1:0},l.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},l.prototype.indexOf=function(e,t,r){return w(this,e,t,r,!0)},l.prototype.lastIndexOf=function(e,t,r){return w(this,e,t,r,!1)},l.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const I=4096;function O(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function N(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function k(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=Q[e[n]];return o}function L(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function j(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,o,i){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function P(e,t,r,n,o){F(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function x(e,t,r,n,o){F(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function B(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,i){return t=+t,r>>>=0,i||B(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function C(e,t,r,n,i){return t=+t,r>>>=0,i||B(e,0,r,8),o.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,l.prototype),n},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||j(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||j(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=X((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),l.prototype.readBigUInt64BE=X((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),l.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||j(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||j(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},l.prototype.readInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||j(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||j(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=X((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),l.prototype.readBigInt64BE=X((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||j(e,4,this.length),o.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||j(e,4,this.length),o.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||j(e,8,this.length),o.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||j(e,8,this.length),o.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=X((function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=X((function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let o=0,i=1,s=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let o=r-1,i=1,s=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=X((function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=X((function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return C(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return C(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},l.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const i=l.isBuffer(e)?e:l.from(e,n),s=i.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%s]}return this};const U={};function W(e,t,r){U[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function $(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function F(e,t,r,n,o,i){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new U.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||V(t,e.length-(r+1))}(n,o,i)}function G(e,t){if("number"!=typeof e)throw new U.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,r){if(Math.floor(e)!==e)throw G(e,r),new U.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}W("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),W("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),W("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=$(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=$(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function q(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function z(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function J(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}const Q=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function X(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},1822:(e,t,r)=>{var n=r(9907),o=r(3358),i=function(){},s=function(e,t,r){if("function"==typeof t)return s(e,null,t);t||(t={}),r=o(r||i);var a=e._writableState,l=e._readableState,u=t.readable||!1!==t.readable&&e.readable,c=t.writable||!1!==t.writable&&e.writable,f=!1,d=function(){e.writable||h()},h=function(){c=!1,u||r.call(e)},p=function(){u=!1,c||r.call(e)},b=function(t){r.call(e,t?new Error("exited with error code: "+t):null)},y=function(t){r.call(e,t)},g=function(){n.nextTick(w)},w=function(){if(!f)return(!u||l&&l.ended&&!l.destroyed)&&(!c||a&&a.ended&&!a.destroyed)?void 0:r.call(e,new Error("premature close"))},m=function(){e.req.on("finish",h)};return function(e){return e.setHeader&&"function"==typeof e.abort}(e)?(e.on("complete",h),e.on("abort",g),e.req?m():e.on("request",m)):c&&!a&&(e.on("end",d),e.on("close",d)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",b),e.on("end",p),e.on("finish",h),!1!==t.error&&e.on("error",y),e.on("close",g),function(){f=!0,e.removeListener("complete",h),e.removeListener("abort",g),e.removeListener("request",m),e.req&&e.req.removeListener("finish",h),e.removeListener("end",d),e.removeListener("close",d),e.removeListener("finish",h),e.removeListener("exit",b),e.removeListener("end",p),e.removeListener("error",y),e.removeListener("close",g)}};e.exports=s},46:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}b(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&b(e,"error",t,{once:!0})}(e,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var o,i,s,u;if(a(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=l(e))>0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,u=c,console&&console.warn&&console.warn(u)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=c.bind(n);return o.listener=r,n.wrapFn=o,o}function d(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):p(o,o.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function b(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return l(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var u=l.length,c=p(l,u);for(r=0;r<u;++r)n(c[r],this,t)}return!0},i.prototype.addListener=function(e,t){return u(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return u(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,o,i,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return d(this,e,!0)},i.prototype.rawListeners=function(e){return d(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},282:e=>{e.exports=s,s.default=s,s.stable=c,s.stableStringify=c;var t="[...]",r="[Circular]",n=[],o=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,r,s){var a;void 0===s&&(s=i()),l(e,"",0,[],void 0,0,s);try{a=0===o.length?JSON.stringify(e,t,r):JSON.stringify(e,d(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return a}function a(e,t,r,i){var s=Object.getOwnPropertyDescriptor(i,r);void 0!==s.get?s.configurable?(Object.defineProperty(i,r,{value:e}),n.push([i,r,t,s])):o.push([t,r,e]):(i[r]=e,n.push([i,r,t]))}function l(e,n,o,i,s,u,c){var f;if(u+=1,"object"==typeof e&&null!==e){for(f=0;f<i.length;f++)if(i[f]===e)return void a(r,e,n,s);if(void 0!==c.depthLimit&&u>c.depthLimit)return void a(t,e,n,s);if(void 0!==c.edgesLimit&&o+1>c.edgesLimit)return void a(t,e,n,s);if(i.push(e),Array.isArray(e))for(f=0;f<e.length;f++)l(e[f],f,f,i,e,u,c);else{var d=Object.keys(e);for(f=0;f<d.length;f++){var h=d[f];l(e[h],h,f,i,e,u,c)}}i.pop()}}function u(e,t){return e<t?-1:e>t?1:0}function c(e,t,r,s){void 0===s&&(s=i());var a,l=f(e,"",0,[],void 0,0,s)||e;try{a=0===o.length?JSON.stringify(l,t,r):JSON.stringify(l,d(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return a}function f(e,o,i,s,l,c,d){var h;if(c+=1,"object"==typeof e&&null!==e){for(h=0;h<s.length;h++)if(s[h]===e)return void a(r,e,o,l);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==d.depthLimit&&c>d.depthLimit)return void a(t,e,o,l);if(void 0!==d.edgesLimit&&i+1>d.edgesLimit)return void a(t,e,o,l);if(s.push(e),Array.isArray(e))for(h=0;h<e.length;h++)f(e[h],h,h,s,e,c,d);else{var p={},b=Object.keys(e).sort(u);for(h=0;h<b.length;h++){var y=b[h];f(e[y],y,h,s,e,c,d),p[y]=e[y]}if(void 0===l)return p;n.push([l,o,e]),l[o]=p}s.pop()}}function d(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(o.length>0)for(var n=0;n<o.length;n++){var i=o[n];if(i[1]===t&&i[0]===r){r=i[2],o.splice(n,1);break}}return e.call(this,t,r)}}},9318:(e,t)=>{t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,l=(1<<a)-1,u=l>>1,c=-7,f=r?o-1:0,d=r?-1:1,h=e[t+f];for(f+=d,i=h&(1<<-c)-1,h>>=-c,c+=a;c>0;i=256*i+e[t+f],f+=d,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=n;c>0;s=256*s+e[t+f],f+=d,c-=8);if(0===i)i=1-u;else{if(i===l)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),i-=u}return(h?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,l,u=8*i-o-1,c=(1<<u)-1,f=c>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+f>=1?d/l:d*Math.pow(2,1-f))*l>=2&&(s++,l/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(t*l-1)*Math.pow(2,o),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[r+h]=255&a,h+=p,a/=256,o-=8);for(s=s<<o|a,u+=o;u>0;e[r+h]=255&s,h+=p,s/=256,u-=8);e[r+h-p]|=128*b}},3358:(e,t,r)=>{var n=r(7086);function o(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function i(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}e.exports=n(o),e.exports.strict=n(i),o.proto=o((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return o(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return i(this)},configurable:!0})}))},9907:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var a,l=[],u=!1,c=-1;function f(){u&&a&&(u=!1,a.length?l=a.concat(l):c=-1,l.length&&d())}function d(){if(!u){var e=s(f);u=!0;for(var t=l.length;t;){for(a=l,l=[];++c<t;)a&&a[c].run();c=-1,t=l.length}a=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new h(e,t)),1!==l.length||u||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},2720:(e,t,r)=>{var n=r(9907),o=r(3358),i=r(1822),s=r(9467),a=function(){},l=/^v?\.0/.test(n.version),u=function(e){return"function"==typeof e},c=function(e){e()},f=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=u(t[t.length-1]||a)&&t.pop()||a;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var n=t.map((function(f,d){var h=d<t.length-1;return function(e,t,r,n){n=o(n);var c=!1;e.on("close",(function(){c=!0})),i(e,{readable:t,writable:r},(function(e){if(e)return n(e);c=!0,n()}));var f=!1;return function(t){if(!c&&!f)return f=!0,function(e){return!!l&&!!s&&(e instanceof(s.ReadStream||a)||e instanceof(s.WriteStream||a))&&u(e.close)}(e)?e.close(a):function(e){return e.setHeader&&u(e.abort)}(e)?e.abort():u(e.destroy)?e.destroy():void n(t||new Error("stream was destroyed"))}}(f,h,d>0,(function(t){e||(e=t),t&&n.forEach(c),h||(n.forEach(c),r(e))}))}));return t.reduce(f)}},5636:(e,t,r)=>{var n=r(1048),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=s),s.prototype=Object.create(o.prototype),i(o,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},8888:(e,t,r)=>{"use strict";var n=r(5636).Buffer,o=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=s(t[n]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--n<r||-2===o?0:(o=s(t[n]))>=0?(o>0&&(e.lastNeed=o-2),o):--n<r||-2===o?0:(o=s(t[n]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},7086:e=>{e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),o=e[e.length-1];return"function"==typeof n&&n!==o&&Object.keys(o).forEach((function(e){n[e]=o[e]})),n}}},4147:(e,t,r)=>{"use strict";const{SymbolDispose:n}=r(4134),{AbortError:o,codes:i}=r(6371),{isNodeStream:s,isWebStream:a,kControllerErrorFunction:l}=r(6115),u=r(6238),{ERR_INVALID_ARG_TYPE:c}=i;let f;e.exports.addAbortSignal=function(t,r){if(((e,t)=>{if("object"!=typeof e||!("aborted"in e))throw new c("signal","AbortSignal",e)})(t),!s(r)&&!a(r))throw new c("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const i=s(t)?()=>{t.destroy(new o(void 0,{cause:e.reason}))}:()=>{t[l](new o(void 0,{cause:e.reason}))};if(e.aborted)i();else{f=f||r(7760).addAbortListener;const o=f(e,i);u(t,o[n])}return t}},345:(e,t,r)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:o,TypedArrayPrototypeSet:i,Uint8Array:s}=r(4134),{Buffer:a}=r(1048),{inspect:l}=r(7760);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return a.alloc(0);const t=a.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)i(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(e<r.length){const t=r.slice(0,e);return this.head.data=r.slice(e),t}return e===r.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[o](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t="",r=this.head,o=0;do{const i=r.data;if(!(e>i.length)){e===i.length?(t+=i,++o,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(i,0,e),this.head=r,r.data=n(i,e));break}t+=i,e-=i.length,++o}while(null!==(r=r.next));return this.length-=o,t}_getBuffer(e){const t=a.allocUnsafe(e),r=e;let n=this.head,o=0;do{const a=n.data;if(!(e>a.length)){e===a.length?(i(t,a,r-e),++o,n.next?this.head=n.next:this.head=this.tail=null):(i(t,new s(a.buffer,a.byteOffset,e),r-e),this.head=n,n.data=a.slice(e));break}i(t,a,r-e),e-=a.length,++o}while(null!==(n=n.next));return this.length-=o,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return l(this,{...t,depth:0,customInspect:!1})}}},7830:(e,t,r)=>{"use strict";const{pipeline:n}=r(7758),o=r(3370),{destroyer:i}=r(5896),{isNodeStream:s,isReadable:a,isWritable:l,isWebStream:u,isTransformStream:c,isWritableStream:f,isReadableStream:d}=r(6115),{AbortError:h,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:b}}=r(6371),y=r(6238);e.exports=function(...e){if(0===e.length)throw new b("streams");if(1===e.length)return o.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=o.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=o.from(e[t])}for(let r=0;r<e.length;++r)if(s(e[r])||u(e[r])){if(r<e.length-1&&!(a(e[r])||d(e[r])||c(e[r])))throw new p(`streams[${r}]`,t[r],"must be readable");if(r>0&&!(l(e[r])||f(e[r])||c(e[r])))throw new p(`streams[${r}]`,t[r],"must be writable")}let r,g,w,m,_;const v=e[0],E=n(e,(function(e){const t=m;m=null,t?t(e):e?_.destroy(e):A||S||_.destroy()})),S=!!(l(v)||f(v)||c(v)),A=!!(a(E)||d(E)||c(E));if(_=new o({writableObjectMode:!(null==v||!v.writableObjectMode),readableObjectMode:!(null==E||!E.readableObjectMode),writable:S,readable:A}),S){if(s(v))_._write=function(e,t,n){v.write(e,t)?n():r=n},_._final=function(e){v.end(),g=e},v.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(u(v)){const e=(c(v)?v.writable:v).getWriter();_._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(e){n(e)}},_._final=async function(t){try{await e.ready,e.close().catch((()=>{})),g=t}catch(e){t(e)}}}const e=c(E)?E.readable:E;y(e,(()=>{if(g){const e=g;g=null,e()}}))}if(A)if(s(E))E.on("readable",(function(){if(w){const e=w;w=null,e()}})),E.on("end",(function(){_.push(null)})),_._read=function(){for(;;){const e=E.read();if(null===e)return void(w=_._read);if(!_.push(e))return}};else if(u(E)){const e=(c(E)?E.readable:E).getReader();_._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!_.push(t))return;if(r)return void _.push(null)}catch{return}}}return _._destroy=function(e,t){e||null===m||(e=new h),w=null,r=null,g=null,null===m?t(e):(m=t,s(E)&&i(E,e))},_}},5896:(e,t,r)=>{"use strict";const n=r(9907),{aggregateTwoErrors:o,codes:{ERR_MULTIPLE_CALLBACK:i},AbortError:s}=r(6371),{Symbol:a}=r(4134),{kIsDestroyed:l,isDestroyed:u,isFinished:c,isServerRequest:f}=r(6115),d=a("kDestroy"),h=a("kConstruct");function p(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function b(e,t,r){let o=!1;function i(t){if(o)return;o=!0;const i=e._readableState,s=e._writableState;p(t,s,i),s&&(s.closed=!0),i&&(i.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(y,e,t):n.nextTick(g,e)}try{e._destroy(t||null,i)}catch(t){i(t)}}function y(e,t){w(e,t),g(e)}function g(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function w(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function m(e,t,r){const o=e._readableState,i=e._writableState;if(null!=i&&i.destroyed||null!=o&&o.destroyed)return this;null!=o&&o.autoDestroy||null!=i&&i.autoDestroy?e.destroy(t):t&&(t.stack,i&&!i.errored&&(i.errored=t),o&&!o.errored&&(o.errored=t),r?n.nextTick(w,e,t):w(e,t))}function _(e){let t=!1;function r(r){if(t)return void m(e,null!=r?r:new i);t=!0;const o=e._readableState,s=e._writableState,a=s||o;o&&(o.constructed=!0),s&&(s.constructed=!0),a.destroyed?e.emit(d,r):r?m(e,r,!0):n.nextTick(v,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(e){n.nextTick(r,e)}}function v(e){e.emit(h)}function E(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function S(e){e.emit("close")}function A(e,t){e.emit("error",t),n.nextTick(S,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,o=e._writableState;r&&(r.constructed=!1),o&&(o.constructed=!1),e.once(h,t),e.listenerCount(h)>1||n.nextTick(_,e)},destroyer:function(e,t){e&&!u(e)&&(t||c(e)||(t=new s),f(e)?(e.socket=null,e.destroy(t)):E(e)?e.abort():E(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(A,e,t):n.nextTick(S,e),e.destroyed||(e[l]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,i=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(p(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),i.constructed?b(this,e,t):this.once(d,(function(r){b(this,o(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:m}},3370:(e,t,r)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:o,ObjectKeys:i,ObjectSetPrototypeOf:s}=r(4134);e.exports=u;const a=r(7576),l=r(8584);s(u.prototype,a.prototype),s(u,a);{const e=i(l.prototype);for(let t=0;t<e.length;t++){const r=e[t];u.prototype[r]||(u.prototype[r]=l.prototype[r])}}function u(e){if(!(this instanceof u))return new u(e);a.call(this,e),l.call(this,e),e?(this.allowHalfOpen=!1!==e.allowHalfOpen,!1===e.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===e.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}let c,f;function d(){return void 0===c&&(c={}),c}n(u.prototype,{writable:{__proto__:null,...o(l.prototype,"writable")},writableHighWaterMark:{__proto__:null,...o(l.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...o(l.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...o(l.prototype,"writableBuffer")},writableLength:{__proto__:null,...o(l.prototype,"writableLength")},writableFinished:{__proto__:null,...o(l.prototype,"writableFinished")},writableCorked:{__proto__:null,...o(l.prototype,"writableCorked")},writableEnded:{__proto__:null,...o(l.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...o(l.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set(e){this._readableState&&this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}}),u.fromWeb=function(e,t){return d().newStreamDuplexFromReadableWritablePair(e,t)},u.toWeb=function(e){return d().newReadableWritablePairFromDuplex(e)},u.from=function(e){return f||(f=r(6706)),f(e,"body")}},6706:(e,t,r)=>{const n=r(9907),o=r(1048),{isReadable:i,isWritable:s,isIterable:a,isNodeStream:l,isReadableNodeStream:u,isWritableNodeStream:c,isDuplexNodeStream:f,isReadableStream:d,isWritableStream:h}=r(6115),p=r(6238),{AbortError:b,codes:{ERR_INVALID_ARG_TYPE:y,ERR_INVALID_RETURN_VALUE:g}}=r(6371),{destroyer:w}=r(5896),m=r(3370),_=r(7576),v=r(8584),{createDeferredPromise:E}=r(7760),S=r(6532),A=globalThis.Blob||o.Blob,R=void 0!==A?function(e){return e instanceof A}:function(e){return!1},T=globalThis.AbortController||r(7083).AbortController,{FunctionPrototypeCall:I}=r(4134);class O extends m{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function N(e){const t=e.readable&&"function"!=typeof e.readable.read?_.wrap(e.readable):e.readable,r=e.writable;let n,o,a,l,u,c=!!i(t),f=!!s(r);function d(e){const t=l;l=null,t?t(e):e&&u.destroy(e)}return u=new O({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:c,writable:f}),f&&(p(r,(e=>{f=!1,e&&w(t,e),d(e)})),u._write=function(e,t,o){r.write(e,t)?o():n=o},u._final=function(e){r.end(),o=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(o){const e=o;o=null,e()}}))),c&&(p(t,(e=>{c=!1,e&&w(t,e),d(e)})),t.on("readable",(function(){if(a){const e=a;a=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(a=u._read);if(!u.push(e))return}}),u._destroy=function(e,i){e||null===l||(e=new b),a=null,n=null,o=null,null===l?i(e):(l=i,w(r,e),w(t,e))},u}e.exports=function e(t,r){if(f(t))return t;if(u(t))return N({readable:t});if(c(t))return N({writable:t});if(l(t))return N({writable:!1,readable:!1});if(d(t))return N({readable:_.fromWeb(t)});if(h(t))return N({writable:v.fromWeb(t)});if("function"==typeof t){const{value:e,write:o,final:i,destroy:s}=function(e){let{promise:t,resolve:r}=E();const o=new T,i=o.signal;return{value:e(async function*(){for(;;){const e=t;t=null;const{chunk:o,done:s,cb:a}=await e;if(n.nextTick(a),s)return;if(i.aborted)throw new b(void 0,{cause:i.reason});({promise:t,resolve:r}=E()),yield o}}(),{signal:i}),write(e,t,n){const o=r;r=null,o({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){o.abort(),t(e)}}}(t);if(a(e))return S(O,e,{objectMode:!0,write:o,final:i,destroy:s});const l=null==e?void 0:e.then;if("function"==typeof l){let t;const r=I(l,e,(e=>{if(null!=e)throw new g("nully","body",e)}),(e=>{w(t,e)}));return t=new O({objectMode:!0,readable:!1,write:o,final(e){i((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:s})}throw new g("Iterable, AsyncIterable or AsyncFunction",r,e)}if(R(t))return e(t.arrayBuffer());if(a(t))return S(O,t,{objectMode:!0,writable:!1});if(d(null==t?void 0:t.readable)&&h(null==t?void 0:t.writable))return O.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return N({readable:null!=t&&t.readable?u(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?c(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});const o=null==t?void 0:t.then;if("function"==typeof o){let e;return I(o,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{w(e,t)})),e=new O({objectMode:!0,writable:!1,read(){}})}throw new y(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},6238:(e,t,r)=>{const n=r(9907),{AbortError:o,codes:i}=r(6371),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_PREMATURE_CLOSE:a}=i,{kEmptyObject:l,once:u}=r(7760),{validateAbortSignal:c,validateFunction:f,validateObject:d,validateBoolean:h}=r(277),{Promise:p,PromisePrototypeThen:b,SymbolDispose:y}=r(4134),{isClosed:g,isReadable:w,isReadableNodeStream:m,isReadableStream:_,isReadableFinished:v,isReadableErrored:E,isWritable:S,isWritableNodeStream:A,isWritableStream:R,isWritableFinished:T,isWritableErrored:I,isNodeStream:O,willEmitClose:N,kIsClosedPromise:k}=r(6115);let L;const j=()=>{};function M(e,t,i){var h,p;if(2===arguments.length?(i=t,t=l):null==t?t=l:d(t,"options"),f(i,"callback"),c(t.signal,"options.signal"),i=u(i),_(e)||R(e))return function(e,t,i){let s=!1,a=j;if(t.signal)if(a=()=>{s=!0,i.call(e,new o(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(a);else{L=L||r(7760).addAbortListener;const n=L(t.signal,a),o=i;i=u(((...t)=>{n[y](),o.apply(e,t)}))}const l=(...t)=>{s||n.nextTick((()=>i.apply(e,t)))};return b(e[k].promise,l,l),j}(e,t,i);if(!O(e))throw new s("stream",["ReadableStream","WritableStream","Stream"],e);const M=null!==(h=t.readable)&&void 0!==h?h:m(e),P=null!==(p=t.writable)&&void 0!==p?p:A(e),x=e._writableState,B=e._readableState,D=()=>{e.writable||W()};let C=N(e)&&m(e)===M&&A(e)===P,U=T(e,!1);const W=()=>{U=!0,e.destroyed&&(C=!1),(!C||e.readable&&!M)&&(M&&!$||i.call(e))};let $=v(e,!1);const F=()=>{$=!0,e.destroyed&&(C=!1),(!C||e.writable&&!P)&&(P&&!U||i.call(e))},G=t=>{i.call(e,t)};let V=g(e);const H=()=>{V=!0;const t=I(e)||E(e);return t&&"boolean"!=typeof t?i.call(e,t):M&&!$&&m(e,!0)&&!v(e,!1)?i.call(e,new a):!P||U||T(e,!1)?void i.call(e):i.call(e,new a)},q=()=>{V=!0;const t=I(e)||E(e);if(t&&"boolean"!=typeof t)return i.call(e,t);i.call(e)},z=()=>{e.req.on("finish",W)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?P&&!x&&(e.on("end",D),e.on("close",D)):(e.on("complete",W),C||e.on("abort",H),e.req?z():e.on("request",z)),C||"boolean"!=typeof e.aborted||e.on("aborted",H),e.on("end",F),e.on("finish",W),!1!==t.error&&e.on("error",G),e.on("close",H),V?n.nextTick(H):null!=x&&x.errorEmitted||null!=B&&B.errorEmitted?C||n.nextTick(q):(M||C&&!w(e)||!U&&!1!==S(e))&&(P||C&&!S(e)||!$&&!1!==w(e))?B&&e.req&&e.aborted&&n.nextTick(q):n.nextTick(q);const J=()=>{i=j,e.removeListener("aborted",H),e.removeListener("complete",W),e.removeListener("abort",H),e.removeListener("request",z),e.req&&e.req.removeListener("finish",W),e.removeListener("end",D),e.removeListener("close",D),e.removeListener("finish",W),e.removeListener("end",F),e.removeListener("error",G),e.removeListener("close",H)};if(t.signal&&!V){const s=()=>{const r=i;J(),r.call(e,new o(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(s);else{L=L||r(7760).addAbortListener;const n=L(t.signal,s),o=i;i=u(((...t)=>{n[y](),o.apply(e,t)}))}}return J}e.exports=M,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=l),null!==(r=t)&&void 0!==r&&r.cleanup&&(h(t.cleanup,"cleanup"),n=t.cleanup),new p(((r,o)=>{const i=M(e,t,(e=>{n&&i(),e?o(e):r()}))}))}},6532:(e,t,r)=>{"use strict";const n=r(9907),{PromisePrototypeThen:o,SymbolAsyncIterator:i,SymbolIterator:s}=r(4134),{Buffer:a}=r(1048),{ERR_INVALID_ARG_TYPE:l,ERR_STREAM_NULL_VALUES:u}=r(6371).codes;e.exports=function(e,t,r){let c,f;if("string"==typeof t||t instanceof a)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[i])f=!0,c=t[i]();else{if(!t||!t[s])throw new l("iterable",["Iterable"],t);f=!1,c=t[s]()}const d=new e({objectMode:!0,highWaterMark:1,...r});let h=!1;return d._read=function(){h||(h=!0,async function(){for(;;){try{const{value:e,done:t}=f?await c.next():c.next();if(t)d.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw h=!1,new u;if(d.push(t))continue;h=!1}}catch(e){d.destroy(e)}break}}())},d._destroy=function(e,t){o(async function(e){const t=null!=e,r="function"==typeof c.throw;if(t&&r){const{value:t,done:r}=await c.throw(e);if(await t,r)return}if("function"==typeof c.return){const{value:e}=await c.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},d}},4259:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:o}=r(4134),{EventEmitter:i}=r(46);function s(e){i.call(this,e)}function a(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}o(s.prototype,i.prototype),o(s,i),s.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",l),r.on("close",u));let s=!1;function l(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){f(),0===i.listenerCount(this,"error")&&this.emit("error",e)}function f(){r.removeListener("data",n),e.removeListener("drain",o),r.removeListener("end",l),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return a(r,"error",c),a(e,"error",c),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e},e.exports={Stream:s,prependListener:a}},823:(e,t,r)=>{"use strict";const n=globalThis.AbortController||r(7083).AbortController,{codes:{ERR_INVALID_ARG_VALUE:o,ERR_INVALID_ARG_TYPE:i,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:l}=r(6371),{validateAbortSignal:u,validateInteger:c,validateObject:f}=r(277),d=r(4134).Symbol("kWeak"),h=r(4134).Symbol("kResistStopPropagation"),{finished:p}=r(6238),b=r(7830),{addAbortSignalNoValidate:y}=r(4147),{isWritable:g,isNodeStream:w}=r(6115),{deprecate:m}=r(7760),{ArrayPrototypePush:_,Boolean:v,MathFloor:E,Number:S,NumberIsNaN:A,Promise:R,PromiseReject:T,PromiseResolve:I,PromisePrototypeThen:O,Symbol:N}=r(4134),k=N("kEmpty"),L=N("kEof");function j(e,t){if("function"!=typeof e)throw new i("fn",["Function","AsyncFunction"],e);null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=E(t.concurrency));let o=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(o=E(t.highWaterMark)),c(n,"options.concurrency",1),c(o,"options.highWaterMark",0),o+=n,async function*(){const i=r(7760).AbortSignalAny([null==t?void 0:t.signal].filter(v)),s=this,a=[],u={signal:i};let c,f,d=!1,h=0;function p(){d=!0,b()}function b(){h-=1,y()}function y(){f&&!d&&h<n&&a.length<o&&(f(),f=null)}!async function(){try{for await(let t of s){if(d)return;if(i.aborted)throw new l;try{if(t=e(t,u),t===k)continue;t=I(t)}catch(e){t=T(e)}h+=1,O(t,b,p),a.push(t),c&&(c(),c=null),!d&&(a.length>=o||h>=n)&&await new R((e=>{f=e}))}a.push(L)}catch(e){const t=T(e);O(t,b,p),a.push(t)}finally{d=!0,c&&(c(),c=null)}}();try{for(;;){for(;a.length>0;){const e=await a[0];if(e===L)return;if(i.aborted)throw new l;e!==k&&(yield e),a.shift(),y()}await new R((e=>{c=e}))}}finally{d=!0,f&&(f(),f=null)}}.call(this)}async function M(e,t=void 0){for await(const r of P.call(this,e,t))return!0;return!1}function P(e,t){if("function"!=typeof e)throw new i("fn",["Function","AsyncFunction"],e);return j.call(this,(async function(t,r){return await e(t,r)?t:k}),t)}class x extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function B(e){if(e=S(e),A(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:m((function(e=void 0){return null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=B(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;e--<=0&&(yield r)}}.call(this)},filter:P,flatMap:function(e,t){const r=j.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:j,take:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=B(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),w(e)&&!g(e))throw new o("stream",e,"must be writable");const r=b(this,e);return null!=t&&t.signal&&y(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new i("fn",["Function","AsyncFunction"],e);return!await M.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new i("fn",["Function","AsyncFunction"],e);for await(const r of j.call(this,(async function(t,r){return await e(t,r),k}),t));},reduce:async function(e,t,r){var o;if("function"!=typeof e)throw new i("reducer",["Function","AsyncFunction"],e);null!=r&&f(r,"options"),null!=(null==r?void 0:r.signal)&&u(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(o=r.signal)&&void 0!==o&&o.aborted){const e=new l(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await p(this.destroy(e)),e}const a=new n,c=a.signal;if(null!=r&&r.signal){const e={once:!0,[d]:this,[h]:!0};r.signal.addEventListener("abort",(()=>a.abort()),e)}let b=!1;try{for await(const n of this){var y;if(b=!0,null!=r&&null!==(y=r.signal)&&void 0!==y&&y.aborted)throw new l;s?t=await e(t,n,{signal:c}):(t=n,s=!0)}if(!b&&!s)throw new x}finally{a.abort()}return t},toArray:async function(e){null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l(void 0,{cause:e.signal.reason});_(t,n)}return t},some:M,find:async function(e,t){for await(const r of P.call(this,e,t))return r}}},6524:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n}=r(4134);e.exports=i;const o=r(7382);function i(e){if(!(this instanceof i))return new i(e);o.call(this,e)}n(i.prototype,o.prototype),n(i,o),i.prototype._transform=function(e,t,r){r(null,e)}},7758:(e,t,r)=>{const n=r(9907),{ArrayIsArray:o,Promise:i,SymbolAsyncIterator:s,SymbolDispose:a}=r(4134),l=r(6238),{once:u}=r(7760),c=r(5896),f=r(3370),{aggregateTwoErrors:d,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:p,ERR_MISSING_ARGS:b,ERR_STREAM_DESTROYED:y,ERR_STREAM_PREMATURE_CLOSE:g},AbortError:w}=r(6371),{validateFunction:m,validateAbortSignal:_}=r(277),{isIterable:v,isReadable:E,isReadableNodeStream:S,isNodeStream:A,isTransformStream:R,isWebStream:T,isReadableStream:I,isReadableFinished:O}=r(6115),N=globalThis.AbortController||r(7083).AbortController;let k,L,j;function M(e,t,r){let n=!1;return e.on("close",(()=>{n=!0})),{destroy:t=>{n||(n=!0,c.destroyer(e,t||new y("pipe")))},cleanup:l(e,{readable:t,writable:r},(e=>{n=!e}))}}function P(e){if(v(e))return e;if(S(e))return async function*(e){L||(L=r(7576)),yield*L.prototype[s].call(e)}(e);throw new h("val",["Readable","Iterable","AsyncIterable"],e)}async function x(e,t,r,{end:n}){let o,s=null;const a=e=>{if(e&&(o=e),s){const e=s;s=null,e()}},u=()=>new i(((e,t)=>{o?t(o):s=()=>{o?t(o):e()}}));t.on("drain",a);const c=l(t,{readable:!1},a);try{t.writableNeedDrain&&await u();for await(const r of e)t.write(r)||await u();n&&(t.end(),await u()),r()}catch(e){r(o!==e?d(o,e):e)}finally{c(),t.off("drain",a)}}async function B(e,t,r,{end:n}){R(t)&&(t=t.writable);const o=t.getWriter();try{for await(const t of e)await o.ready,o.write(t).catch((()=>{}));await o.ready,n&&await o.close(),r()}catch(e){try{await o.abort(e),r(e)}catch(e){r(e)}}}function D(e,t,i){if(1===e.length&&o(e[0])&&(e=e[0]),e.length<2)throw new b("streams");const s=new N,l=s.signal,u=null==i?void 0:i.signal,c=[];function d(){W(new w)}let y,g,m;_(u,"options.signal"),j=j||r(7760).addAbortListener,u&&(y=j(u,d));const O=[];let L,D=0;function U(e){W(e,0==--D)}function W(e,r){var o;if(!e||g&&"ERR_STREAM_PREMATURE_CLOSE"!==g.code||(g=e),g||r){for(;O.length;)O.shift()(g);null===(o=y)||void 0===o||o[a](),s.abort(),r&&(g||c.forEach((e=>e())),n.nextTick(t,g,m))}}for(let V=0;V<e.length;V++){const H=e[V],q=V<e.length-1,z=V>0,J=q||!1!==(null==i?void 0:i.end),Y=V===e.length-1;if(A(H)){if(J){const{destroy:K,cleanup:Q}=M(H,q,z);O.push(K),E(H)&&Y&&c.push(Q)}function $(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&U(e)}H.on("error",$),E(H)&&Y&&c.push((()=>{H.removeListener("error",$)}))}if(0===V)if("function"==typeof H){if(L=H({signal:l}),!v(L))throw new p("Iterable, AsyncIterable or Stream","source",L)}else L=v(H)||S(H)||R(H)?H:f.from(H);else if("function"==typeof H){var F;if(L=R(L)?P(null===(F=L)||void 0===F?void 0:F.readable):P(L),L=H(L,{signal:l}),q){if(!v(L,!0))throw new p("AsyncIterable",`transform[${V-1}]`,L)}else{var G;k||(k=r(6524));const X=new k({objectMode:!0}),Z=null===(G=L)||void 0===G?void 0:G.then;if("function"==typeof Z)D++,Z.call(L,(e=>{m=e,null!=e&&X.write(e),J&&X.end(),n.nextTick(U)}),(e=>{X.destroy(e),n.nextTick(U,e)}));else if(v(L,!0))D++,x(L,X,U,{end:J});else{if(!I(L)&&!R(L))throw new p("AsyncIterable or Promise","destination",L);{const re=L.readable||L;D++,x(re,X,U,{end:J})}}L=X;const{destroy:ee,cleanup:te}=M(L,!1,!0);O.push(ee),Y&&c.push(te)}}else if(A(H)){if(S(L)){D+=2;const ne=C(L,H,U,{end:J});E(H)&&Y&&c.push(ne)}else if(R(L)||I(L)){const oe=L.readable||L;D++,x(oe,H,U,{end:J})}else{if(!v(L))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],L);D++,x(L,H,U,{end:J})}L=H}else if(T(H)){if(S(L))D++,B(P(L),H,U,{end:J});else if(I(L)||v(L))D++,B(L,H,U,{end:J});else{if(!R(L))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],L);D++,B(L.readable,H,U,{end:J})}L=H}else L=f.from(H)}return(null!=l&&l.aborted||null!=u&&u.aborted)&&n.nextTick(d),L}function C(e,t,r,{end:o}){let i=!1;if(t.on("close",(()=>{i||r(new g)})),e.pipe(t,{end:!1}),o){function s(){i=!0,t.end()}O(e)?n.nextTick(s):e.once("end",s)}else r();return l(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),l(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:D,pipeline:function(...e){return D(e,u(function(e){return m(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},7576:(e,t,r)=>{const n=r(9907),{ArrayPrototypeIndexOf:o,NumberIsInteger:i,NumberIsNaN:s,NumberParseInt:a,ObjectDefineProperties:l,ObjectKeys:u,ObjectSetPrototypeOf:c,Promise:f,SafeSet:d,SymbolAsyncDispose:h,SymbolAsyncIterator:p,Symbol:b}=r(4134);e.exports=Y,Y.ReadableState=J;const{EventEmitter:y}=r(46),{Stream:g,prependListener:w}=r(4259),{Buffer:m}=r(1048),{addAbortSignal:_}=r(4147),v=r(6238);let E=r(7760).debuglog("stream",(e=>{E=e}));const S=r(345),A=r(5896),{getHighWaterMark:R,getDefaultHighWaterMark:T}=r(5291),{aggregateTwoErrors:I,codes:{ERR_INVALID_ARG_TYPE:O,ERR_METHOD_NOT_IMPLEMENTED:N,ERR_OUT_OF_RANGE:k,ERR_STREAM_PUSH_AFTER_EOF:L,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:j},AbortError:M}=r(6371),{validateObject:P}=r(277),x=b("kPaused"),{StringDecoder:B}=r(8888),D=r(6532);c(Y.prototype,g.prototype),c(Y,g);const C=()=>{},{errorOrDestroy:U}=A,W=1,$=16,F=32,G=64,V=2048,H=4096,q=65536;function z(e){return{enumerable:!1,get(){return 0!=(this.state&e)},set(t){t?this.state|=e:this.state&=~e}}}function J(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(3370)),this.state=V|H|$|F,e&&e.objectMode&&(this.state|=W),n&&e&&e.readableObjectMode&&(this.state|=W),this.highWaterMark=e?R(this,e,"readableHighWaterMark",n):T(!1),this.buffer=new S,this.length=0,this.pipes=[],this.flowing=null,this[x]=null,e&&!1===e.emitClose&&(this.state&=~V),e&&!1===e.autoDestroy&&(this.state&=~H),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new B(e.encoding),this.encoding=e.encoding)}function Y(e){if(!(this instanceof Y))return new Y(e);const t=this instanceof r(3370);this._readableState=new J(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&_(e.signal,this)),g.call(this,e),A.construct(this,(()=>{this._readableState.needReadable&&te(this,this._readableState)}))}function K(e,t,r,n){E("readableAddChunk",t);const o=e._readableState;let i;if(0==(o.state&W)&&("string"==typeof t?(r=r||o.defaultEncoding,o.encoding!==r&&(n&&o.encoding?t=m.from(t,r).toString(o.encoding):(t=m.from(t,r),r=""))):t instanceof m?r="":g._isUint8Array(t)?(t=g._uint8ArrayToBuffer(t),r=""):null!=t&&(i=new O("chunk",["string","Buffer","Uint8Array"],t))),i)U(e,i);else if(null===t)o.state&=-9,function(e,t){if(E("onEofChunk"),!t.ended){if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?Z(e):(t.needReadable=!1,t.emittedReadable=!0,ee(e))}}(e,o);else if(0!=(o.state&W)||t&&t.length>0)if(n)if(0!=(4&o.state))U(e,new j);else{if(o.destroyed||o.errored)return!1;Q(e,o,t,!0)}else if(o.ended)U(e,new L);else{if(o.destroyed||o.errored)return!1;o.state&=-9,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?Q(e,o,t,!1):te(e,o)):Q(e,o,t,!1)}else n||(o.state&=-9,te(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function Q(e,t,r,n){t.flowing&&0===t.length&&!t.sync&&e.listenerCount("data")>0?(0!=(t.state&q)?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),0!=(t.state&G)&&Z(e)),te(e,t)}function X(e,t){return e<=0||0===t.length&&t.ended?0:0!=(t.state&W)?1:s(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function Z(e){const t=e._readableState;E("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(E("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(ee,e))}function ee(e){const t=e._readableState;E("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,se(e)}function te(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(re,e,t))}function re(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){const r=t.length;if(E("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function ne(e){const t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!1===t[x]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function oe(e){E("readable nexttick read 0"),e.read(0)}function ie(e,t){E("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),se(e),t.flowing&&!t.reading&&e.read(0)}function se(e){const t=e._readableState;for(E("flow",t.flowing);t.flowing&&null!==e.read(););}function ae(e,t){"function"!=typeof e.read&&(e=Y.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=C;function o(t){this===e?(n(),n=C):n=t}e.on("readable",o);const i=v(e,{writable:!1},(e=>{r=e?I(r,e):null,n(),n=C}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new f(o)}}}catch(e){throw r=I(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",o),i()):A.destroyer(e,null)}}(e,t);return r.stream=e,r}function le(e,t){if(0===t.length)return null;let r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function ue(e){const t=e._readableState;E("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(ce,t,e))}function ce(e,t){if(E("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(fe,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function fe(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let de;function he(){return void 0===de&&(de={}),de}l(J.prototype,{objectMode:z(W),ended:z(2),endEmitted:z(4),reading:z(8),constructed:z($),sync:z(F),needReadable:z(G),emittedReadable:z(128),readableListening:z(256),resumeScheduled:z(512),errorEmitted:z(1024),emitClose:z(V),autoDestroy:z(H),destroyed:z(8192),closed:z(16384),closeEmitted:z(32768),multiAwaitDrain:z(q),readingMore:z(1<<17),dataEmitted:z(1<<18)}),Y.prototype.destroy=A.destroy,Y.prototype._undestroy=A.undestroy,Y.prototype._destroy=function(e,t){t(e)},Y.prototype[y.captureRejectionSymbol]=function(e){this.destroy(e)},Y.prototype[h]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new M,this.destroy(e)),new f(((t,r)=>v(this,(n=>n&&n!==e?r(n):t(null)))))},Y.prototype.push=function(e,t){return K(this,e,t,!1)},Y.prototype.unshift=function(e,t){return K(this,e,t,!0)},Y.prototype.isPaused=function(){const e=this._readableState;return!0===e[x]||!1===e.flowing},Y.prototype.setEncoding=function(e){const t=new B(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},Y.prototype.read=function(e){E("read",e),void 0===e?e=NaN:i(e)||(e=a(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new k("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.state&=-129),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return E("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?ue(this):Z(this),null;if(0===(e=X(e,t))&&t.ended)return 0===t.length&&ue(this),null;let n,o=0!=(t.state&G);if(E("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&(o=!0,E("length less than watermark",o)),t.ended||t.reading||t.destroyed||t.errored||!t.constructed)o=!1,E("reading, ended or constructing",o);else if(o){E("do read"),t.state|=8|F,0===t.length&&(t.state|=G);try{this._read(t.highWaterMark)}catch(e){U(this,e)}t.state&=~F,t.reading||(e=X(r,t))}return n=e>0?le(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ue(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},Y.prototype._read=function(e){throw new N("_read()")},Y.prototype.pipe=function(e,t){const r=this,o=this._readableState;1===o.pipes.length&&(o.multiAwaitDrain||(o.multiAwaitDrain=!0,o.awaitDrainWriters=new d(o.awaitDrainWriters?[o.awaitDrainWriters]:[]))),o.pipes.push(e),E("pipe count=%d opts=%j",o.pipes.length,t);const i=t&&!1===t.end||e===n.stdout||e===n.stderr?b:s;function s(){E("onend"),e.end()}let a;o.endEmitted?n.nextTick(i):r.once("end",i),e.on("unpipe",(function t(n,i){E("onunpipe"),n===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,E("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),a&&e.removeListener("drain",a),e.removeListener("error",f),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",b),r.removeListener("data",c),l=!0,a&&o.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&a())}));let l=!1;function u(){l||(1===o.pipes.length&&o.pipes[0]===e?(E("false write response, pause",0),o.awaitDrainWriters=e,o.multiAwaitDrain=!1):o.pipes.length>1&&o.pipes.includes(e)&&(E("false write response, pause",o.awaitDrainWriters.size),o.awaitDrainWriters.add(e)),r.pause()),a||(a=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(E("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(E("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",a))}function c(t){E("ondata");const r=e.write(t);E("dest.write",r),!1===r&&u()}function f(t){if(E("onerror",t),b(),e.removeListener("error",f),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?U(e,t):e.emit("error",t)}}function h(){e.removeListener("finish",p),b()}function p(){E("onfinish"),e.removeListener("close",h),b()}function b(){E("unpipe"),r.unpipe(e)}return r.on("data",c),w(e,"error",f),e.once("close",h),e.once("finish",p),e.emit("pipe",r),!0===e.writableNeedDrain?u():o.flowing||(E("pipe resume"),r.resume()),e},Y.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t<e.length;t++)e[t].emit("unpipe",this,{hasUnpiped:!1});return this}const r=o(t.pipes,e);return-1===r||(t.pipes.splice(r,1),0===t.pipes.length&&this.pause(),e.emit("unpipe",this,{hasUnpiped:!1})),this},Y.prototype.on=function(e,t){const r=g.prototype.on.call(this,e,t),o=this._readableState;return"data"===e?(o.readableListening=this.listenerCount("readable")>0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,E("on readable",o.length,o.reading),o.length?Z(this):o.reading||n.nextTick(oe,this))),r},Y.prototype.addListener=Y.prototype.on,Y.prototype.removeListener=function(e,t){const r=g.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(ne,this),r},Y.prototype.off=Y.prototype.removeListener,Y.prototype.removeAllListeners=function(e){const t=g.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(ne,this),t},Y.prototype.resume=function(){const e=this._readableState;return e.flowing||(E("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(ie,e,t))}(this,e)),e[x]=!1,this},Y.prototype.pause=function(){return E("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(E("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[x]=!0,this},Y.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{U(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=u(e);for(let t=1;t<r.length;t++){const n=r[t];void 0===this[n]&&"function"==typeof e[n]&&(this[n]=e[n].bind(e))}return this},Y.prototype[p]=function(){return ae(this)},Y.prototype.iterator=function(e){return void 0!==e&&P(e,"options"),ae(this,e)},l(Y.prototype,{readable:{__proto__:null,get(){const e=this._readableState;return!(!e||!1===e.readable||e.destroyed||e.errorEmitted||e.endEmitted)},set(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._readableState.readable||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(e){this._readableState&&(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),l(J.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[x]},set(e){this[x]=!!e}}}),Y._fromList=le,Y.from=function(e,t){return D(Y,e,t)},Y.fromWeb=function(e,t){return he().newStreamReadableFromReadableStream(e,t)},Y.toWeb=function(e,t){return he().newReadableStreamFromStreamReadable(e,t)},Y.wrap=function(e,t){var r,n;return new Y({objectMode:null===(r=null!==(n=e.readableObjectMode)&&void 0!==n?n:e.objectMode)||void 0===r||r,...t,destroy(t,r){A.destroyer(e,t),r(t)}}).wrap(e)}},5291:(e,t,r)=>{"use strict";const{MathFloor:n,NumberIsInteger:o}=r(4134),{validateInteger:i}=r(277),{ERR_INVALID_ARG_VALUE:s}=r(6371).codes;let a=16384,l=16;function u(e){return e?l:a}e.exports={getHighWaterMark:function(e,t,r,i){const a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=a){if(!o(a)||a<0)throw new s(i?`options.${r}`:"options.highWaterMark",a);return n(a)}return u(e.objectMode)},getDefaultHighWaterMark:u,setDefaultHighWaterMark:function(e,t){i(t,"value",0),e?l=t:a=t}}},7382:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:o}=r(4134);e.exports=u;const{ERR_METHOD_NOT_IMPLEMENTED:i}=r(6371).codes,s=r(3370),{getHighWaterMark:a}=r(5291);n(u.prototype,s.prototype),n(u,s);const l=o("kCallback");function u(e){if(!(this instanceof u))return new u(e);const t=e?a(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),s.call(this,e),this._readableState.sync=!1,this[l]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function c(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function f(){this._final!==c&&c.call(this)}u.prototype._final=c,u.prototype._transform=function(e,t,r){throw new i("_transform()")},u.prototype._write=function(e,t,r){const n=this._readableState,o=this._writableState,i=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),o.ended||i===n.length||n.length<n.highWaterMark?r():this[l]=r)}))},u.prototype._read=function(){if(this[l]){const e=this[l];this[l]=null,e()}}},6115:(e,t,r)=>{"use strict";const{SymbolAsyncIterator:n,SymbolIterator:o,SymbolFor:i}=r(4134),s=i("nodejs.stream.destroyed"),a=i("nodejs.stream.errored"),l=i("nodejs.stream.readable"),u=i("nodejs.stream.writable"),c=i("nodejs.stream.disturbed"),f=i("nodejs.webstream.isClosedPromise"),d=i("nodejs.webstream.controllerErrorFunction");function h(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function p(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function b(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function y(e){return!(!e||b(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function g(e){return!(!e||b(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function w(e){return!(!e||b(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function m(e){if(!b(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[s]||null!=n&&n.destroyed)}function _(e){if(!p(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function v(e,t){if(!h(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function E(e){return e&&null!=e[l]?e[l]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!m(e)&&h(e)&&e.readable&&!v(e)}function S(e){return e&&null!=e[u]?e[u]:"boolean"!=typeof(null==e?void 0:e.writable)?null:!m(e)&&p(e)&&e.writable&&!_(e)}function A(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function R(e){return"boolean"==typeof e._sent100&&A(e)}e.exports={isDestroyed:m,kIsDestroyed:s,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[c])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:c,isErrored:function(e){var t,r,n,o,i,s,l,u,c,f;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(o=null!==(i=null!==(s=e[a])&&void 0!==s?s:e.readableErrored)&&void 0!==i?i:e.writableErrored)&&void 0!==o?o:null===(l=e._readableState)||void 0===l?void 0:l.errorEmitted)&&void 0!==n?n:null===(u=e._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==r?r:null===(c=e._readableState)||void 0===c?void 0:c.errored)&&void 0!==t?t:null===(f=e._writableState)||void 0===f?void 0:f.errored))},kIsErrored:a,isReadable:E,kIsReadable:l,kIsClosedPromise:f,kControllerErrorFunction:d,kIsWritable:u,isClosed:function(e){if(!b(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&A(e)?e._closed:null},isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return b(e)?!(!m(e)&&(!1!==(null==t?void 0:t.readable)&&E(e)||!1!==(null==t?void 0:t.writable)&&S(e))):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[n]:!1===t?"function"==typeof e[o]:"function"==typeof e[n]||"function"==typeof e[o])},isReadableNodeStream:h,isReadableStream:y,isReadableEnded:function(e){if(!h(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:v,isReadableErrored:function(e){var t,r;return b(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:b,isWebStream:function(e){return y(e)||g(e)||w(e)},isWritable:S,isWritableNodeStream:p,isWritableStream:g,isWritableEnded:_,isWritableFinished:function(e,t){if(!p(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return b(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:R,willEmitClose:function(e){if(!b(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&R(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:w}},8584:(e,t,r)=>{const n=r(9907),{ArrayPrototypeSlice:o,Error:i,FunctionPrototypeSymbolHasInstance:s,ObjectDefineProperty:a,ObjectDefineProperties:l,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:c,Symbol:f,SymbolHasInstance:d}=r(4134);e.exports=P,P.WritableState=j;const{EventEmitter:h}=r(46),p=r(4259).Stream,{Buffer:b}=r(1048),y=r(5896),{addAbortSignal:g}=r(4147),{getHighWaterMark:w,getDefaultHighWaterMark:m}=r(5291),{ERR_INVALID_ARG_TYPE:_,ERR_METHOD_NOT_IMPLEMENTED:v,ERR_MULTIPLE_CALLBACK:E,ERR_STREAM_CANNOT_PIPE:S,ERR_STREAM_DESTROYED:A,ERR_STREAM_ALREADY_FINISHED:R,ERR_STREAM_NULL_VALUES:T,ERR_STREAM_WRITE_AFTER_END:I,ERR_UNKNOWN_ENCODING:O}=r(6371).codes,{errorOrDestroy:N}=y;function k(){}u(P.prototype,p.prototype),u(P,p);const L=f("kOnFinished");function j(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(3370)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?w(this,e,"writableHighWaterMark",n):m(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const o=!(!e||!1!==e.decodeStrings);this.decodeStrings=!o,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=C.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,M(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[L]=[]}function M(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function P(e){const t=this instanceof r(3370);if(!t&&!s(P,this))return new P(e);this._writableState=new j(e,this,t),e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&g(e.signal,this)),p.call(this,e),y.construct(this,(()=>{const e=this._writableState;e.writing||F(this,e),V(this,e)}))}function x(e,t,r,o){const i=e._writableState;if("function"==typeof r)o=r,r=i.defaultEncoding;else{if(r){if("buffer"!==r&&!b.isEncoding(r))throw new O(r)}else r=i.defaultEncoding;"function"!=typeof o&&(o=k)}if(null===t)throw new T;if(!i.objectMode)if("string"==typeof t)!1!==i.decodeStrings&&(t=b.from(t,r),r="buffer");else if(t instanceof b)r="buffer";else{if(!p._isUint8Array(t))throw new _("chunk",["string","Buffer","Uint8Array"],t);t=p._uint8ArrayToBuffer(t),r="buffer"}let s;return i.ending?s=new I:i.destroyed&&(s=new A("write")),s?(n.nextTick(o,s),N(e,s,!0),s):(i.pendingcb++,function(e,t,r,n,o){const i=t.objectMode?1:r.length;t.length+=i;const s=t.length<t.highWaterMark;return s||(t.needDrain=!0),t.writing||t.corked||t.errored||!t.constructed?(t.buffered.push({chunk:r,encoding:n,callback:o}),t.allBuffers&&"buffer"!==n&&(t.allBuffers=!1),t.allNoop&&o!==k&&(t.allNoop=!1)):(t.writelen=i,t.writecb=o,t.writing=!0,t.sync=!0,e._write(r,n,t.onwrite),t.sync=!1),s&&!t.errored&&!t.destroyed}(e,i,t,r,o))}function B(e,t,r,n,o,i,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new A("write")):r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function D(e,t,r,n){--t.pendingcb,n(r),$(t),N(e,r)}function C(e,t){const r=e._writableState,o=r.sync,i=r.writecb;"function"==typeof i?(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t?(t.stack,r.errored||(r.errored=t),e._readableState&&!e._readableState.errored&&(e._readableState.errored=t),o?n.nextTick(D,e,r,t,i):D(e,r,t,i)):(r.buffered.length>r.bufferedIndex&&F(e,r),o?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===i?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:i,stream:e,state:r},n.nextTick(U,r.afterWriteTickInfo)):W(e,r,1,i))):N(e,new E)}function U({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,W(e,t,r,n)}function W(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&$(t),V(e,t)}function $(e){if(e.writing)return;for(let r=e.bufferedIndex;r<e.buffered.length;++r){var t;const{chunk:n,callback:o}=e.buffered[r],i=e.objectMode?1:n.length;e.length-=i,o(null!==(t=e.errored)&&void 0!==t?t:new A("write"))}const r=e[L].splice(0);for(let t=0;t<r.length;t++){var n;r[t](null!==(n=e.errored)&&void 0!==n?n:new A("end"))}M(e)}function F(e,t){if(t.corked||t.bufferProcessing||t.destroyed||!t.constructed)return;const{buffered:r,bufferedIndex:n,objectMode:i}=t,s=r.length-n;if(!s)return;let a=n;if(t.bufferProcessing=!0,s>1&&e._writev){t.pendingcb-=s-1;const n=t.allNoop?k:e=>{for(let t=a;t<r.length;++t)r[t].callback(e)},i=t.allNoop&&0===a?r:o(r,a);i.allBuffers=t.allBuffers,B(e,t,!0,t.length,i,"",n),M(t)}else{do{const{chunk:n,encoding:o,callback:s}=r[a];r[a++]=null,B(e,t,!1,i?1:n.length,n,o,s)}while(a<r.length&&!t.writing);a===r.length?M(t):a>256?(r.splice(0,a),t.bufferedIndex=0):t.bufferedIndex=a}t.bufferProcessing=!1}function G(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function V(e,t,r){G(t)&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function o(o){if(r)N(e,null!=o?o:E());else if(r=!0,t.pendingcb--,o){const r=t[L].splice(0);for(let e=0;e<r.length;e++)r[e](o);N(e,o,t.sync)}else G(t)&&(t.prefinished=!0,e.emit("prefinish"),t.pendingcb++,n.nextTick(H,e,t))}t.sync=!0,t.pendingcb++;try{e._final(o)}catch(e){o(e)}t.sync=!1}(e,t)))}(e,t),0===t.pendingcb&&(r?(t.pendingcb++,n.nextTick(((e,t)=>{G(t)?H(e,t):t.pendingcb--}),e,t)):G(t)&&(t.pendingcb++,H(e,t))))}function H(e,t){t.pendingcb--,t.finished=!0;const r=t[L].splice(0);for(let e=0;e<r.length;e++)r[e]();if(e.emit("finish"),t.autoDestroy){const t=e._readableState;(!t||t.autoDestroy&&(t.endEmitted||!1===t.readable))&&e.destroy()}}j.prototype.getBuffer=function(){return o(this.buffered,this.bufferedIndex)},a(j.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),a(P,d,{__proto__:null,value:function(e){return!!s(this,e)||this===P&&e&&e._writableState instanceof j}}),P.prototype.pipe=function(){N(this,new S)},P.prototype.write=function(e,t,r){return!0===x(this,e,t,r)},P.prototype.cork=function(){this._writableState.corked++},P.prototype.uncork=function(){const e=this._writableState;e.corked&&(e.corked--,e.writing||F(this,e))},P.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=c(e)),!b.isEncoding(e))throw new O(e);return this._writableState.defaultEncoding=e,this},P.prototype._write=function(e,t,r){if(!this._writev)throw new v("_write()");this._writev([{chunk:e,encoding:t}],r)},P.prototype._writev=null,P.prototype.end=function(e,t,r){const o=this._writableState;let s;if("function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e){const r=x(this,e,t);r instanceof i&&(s=r)}return o.corked&&(o.corked=1,this.uncork()),s||(o.errored||o.ending?o.finished?s=new R("end"):o.destroyed&&(s=new A("end")):(o.ending=!0,V(this,o,!0),o.ended=!0)),"function"==typeof r&&(s||o.finished?n.nextTick(r,s):o[L].push(r)),this},l(P.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(e){this._writableState&&(this._writableState.destroyed=e)}},writable:{__proto__:null,get(){const e=this._writableState;return!(!e||!1===e.writable||e.destroyed||e.errored||e.ending||e.ended)},set(e){this._writableState&&(this._writableState.writable=!!e)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){const e=this._writableState;return!!e&&!e.destroyed&&!e.ending&&e.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._writableState.writable||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});const q=y.destroy;let z;function J(){return void 0===z&&(z={}),z}P.prototype.destroy=function(e,t){const r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[L].length)&&n.nextTick($,r),q.call(this,e,t),this},P.prototype._undestroy=y.undestroy,P.prototype._destroy=function(e,t){t(e)},P.prototype[h.captureRejectionSymbol]=function(e){this.destroy(e)},P.fromWeb=function(e,t){return J().newStreamWritableFromWritableStream(e,t)},P.toWeb=function(e){return J().newWritableStreamFromStreamWritable(e)}},277:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:o,ArrayPrototypeJoin:i,ArrayPrototypeMap:s,NumberIsInteger:a,NumberIsNaN:l,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:c,NumberParseInt:f,ObjectPrototypeHasOwnProperty:d,RegExpPrototypeExec:h,String:p,StringPrototypeToUpperCase:b,StringPrototypeTrim:y}=r(4134),{hideStackFrames:g,codes:{ERR_SOCKET_BAD_PORT:w,ERR_INVALID_ARG_TYPE:m,ERR_INVALID_ARG_VALUE:_,ERR_OUT_OF_RANGE:v,ERR_UNKNOWN_SIGNAL:E}}=r(6371),{normalizeEncoding:S}=r(7760),{isAsyncFunction:A,isArrayBufferView:R}=r(7760).types,T={},I=/^[0-7]+$/,O=g(((e,t,r=c,n=u)=>{if("number"!=typeof e)throw new m(t,"number",e);if(!a(e))throw new v(t,"an integer",e);if(e<r||e>n)throw new v(t,`>= ${r} && <= ${n}`,e)})),N=g(((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new m(t,"number",e);if(!a(e))throw new v(t,"an integer",e);if(e<r||e>n)throw new v(t,`>= ${r} && <= ${n}`,e)})),k=g(((e,t,r=!1)=>{if("number"!=typeof e)throw new m(t,"number",e);if(!a(e))throw new v(t,"an integer",e);const n=r?1:0,o=4294967295;if(e<n||e>o)throw new v(t,`>= ${n} && <= ${o}`,e)}));function L(e,t){if("string"!=typeof e)throw new m(t,"string",e)}const j=g(((e,t,r)=>{if(!o(r,e)){const n=i(s(r,(e=>"string"==typeof e?`'${e}'`:p(e))),", ");throw new _(t,e,"must be one of: "+n)}}));function M(e,t){if("boolean"!=typeof e)throw new m(t,"boolean",e)}function P(e,t,r){return null!=e&&d(e,t)?e[t]:r}const x=g(((e,t,r=null)=>{const o=P(r,"allowArray",!1),i=P(r,"allowFunction",!1);if(!P(r,"nullable",!1)&&null===e||!o&&n(e)||"object"!=typeof e&&(!i||"function"!=typeof e))throw new m(t,"Object",e)})),B=g(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new m(t,"a dictionary",e)})),D=g(((e,t,r=0)=>{if(!n(e))throw new m(t,"Array",e);if(e.length<r)throw new _(t,e,`must be longer than ${r}`)})),C=g(((e,t="buffer")=>{if(!R(e))throw new m(t,["Buffer","TypedArray","DataView"],e)})),U=g(((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new m(t,"AbortSignal",e)})),W=g(((e,t)=>{if("function"!=typeof e)throw new m(t,"Function",e)})),$=g(((e,t)=>{if("function"!=typeof e||A(e))throw new m(t,"Function",e)})),F=g(((e,t)=>{if(void 0!==e)throw new m(t,"undefined",e)})),G=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function V(e,t){if(void 0===e||!h(G,e))throw new _(t,e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===h(I,e))throw new _(t,e,"must be a 32-bit unsigned integer or an octal string");e=f(e,8)}return k(e,t),e},validateArray:D,validateStringArray:function(e,t){D(e,t);for(let r=0;r<e.length;r++)L(e[r],`${t}[${r}]`)},validateBooleanArray:function(e,t){D(e,t);for(let r=0;r<e.length;r++)M(e[r],`${t}[${r}]`)},validateAbortSignalArray:function(e,t){D(e,t);for(let r=0;r<e.length;r++){const n=e[r],o=`${t}[${r}]`;if(null==n)throw new m(o,"AbortSignal",n);U(n,o)}},validateBoolean:M,validateBuffer:C,validateDictionary:B,validateEncoding:function(e,t){const r=S(t),n=e.length;if("hex"===r&&n%2!=0)throw new _("encoding",t,`is invalid for data of length ${n}`)},validateFunction:W,validateInt32:N,validateInteger:O,validateNumber:function(e,t,r=void 0,n){if("number"!=typeof e)throw new m(t,"number",e);if(null!=r&&e<r||null!=n&&e>n||(null!=r||null!=n)&&l(e))throw new v(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:x,validateOneOf:j,validatePlainFunction:$,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===y(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new w(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(L(e,t),void 0===T[e]){if(void 0!==T[b(e)])throw new E(e+" (signals must use all capital letters)");throw new E(e)}},validateString:L,validateUint32:k,validateUndefined:F,validateUnion:function(e,t,r){if(!o(r,e))throw new m(t,`('${i(r,"|")}')`,e)},validateAbortSignal:U,validateLinkHeaderValue:function(e){if("string"==typeof e)return V(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n<t;n++){const o=e[n];V(o,"hints"),r+=o,n!==t-1&&(r+=", ")}return r}throw new _("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}},9198:(e,t,r)=>{"use strict";const n=r(5506),o=r(3095),i=n.Readable.destroy;e.exports=n.Readable,e.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,e.exports._isUint8Array=n._isUint8Array,e.exports.isDisturbed=n.isDisturbed,e.exports.isErrored=n.isErrored,e.exports.isReadable=n.isReadable,e.exports.Readable=n.Readable,e.exports.Writable=n.Writable,e.exports.Duplex=n.Duplex,e.exports.Transform=n.Transform,e.exports.PassThrough=n.PassThrough,e.exports.addAbortSignal=n.addAbortSignal,e.exports.finished=n.finished,e.exports.destroy=n.destroy,e.exports.destroy=i,e.exports.pipeline=n.pipeline,e.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>o}),e.exports.Stream=n.Stream,e.exports.default=e.exports},6371:(e,t,r)=>{"use strict";const{format:n,inspect:o,AggregateError:i}=r(7760),s=globalThis.AggregateError||i,a=Symbol("kIsNodeError"),l=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,c={};function f(e,t){if(!e)throw new c.ERR_INTERNAL_ASSERTION(t)}function d(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function h(e,t,r){r||(r=Error);class o extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return f(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const o=(t.match(/%[dfijoOs]/g)||[]).length;return f(o===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${o}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(o.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),o.prototype.code=e,o.prototype[a]=!0,c[e]=o}function p(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class b extends Error{constructor(e="The operation was aborted",t=void 0){if(void 0!==t&&"object"!=typeof t)throw new c.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}h("ERR_ASSERTION","%s",Error),h("ERR_INVALID_ARG_TYPE",((e,t,r)=>{f("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const i=[],s=[],a=[];for(const e of t)f("string"==typeof e,"All expected entries have to be of type string"),l.includes(e)?i.push(e.toLowerCase()):u.test(e)?s.push(e):(f("object"!==e,'The value "object" should be written as "Object"'),a.push(e));if(s.length>0){const e=i.indexOf("object");-1!==e&&(i.splice(i,e,1),s.push("Object"))}if(i.length>0){switch(i.length){case 1:n+=`of type ${i[0]}`;break;case 2:n+=`one of type ${i[0]} or ${i[1]}`;break;default:{const e=i.pop();n+=`one of type ${i.join(", ")}, or ${e}`}}(s.length>0||a.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+=`an instance of ${s[0]}`;break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`an instance of ${s.join(", ")}, or ${e}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`one of ${a.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var c;null!==(c=r.constructor)&&void 0!==c&&c.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${o(r,{depth:-1})}`}else{let e=o(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),h("ERR_INVALID_ARG_VALUE",((e,t,r="is invalid")=>{let n=o(t);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),h("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),h("ERR_MISSING_ARGS",((...e)=>{let t;f(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`}),TypeError),h("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return f(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=d(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=d(n)),n+="n"):n=o(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),h("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),h("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),h("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),h("ERR_STREAM_WRITE_AFTER_END","write after end",Error),h("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:b,aggregateTwoErrors:p((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new s([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:p,codes:c}},4134:e=>{"use strict";e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),PromiseResolve:e=>Promise.resolve(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Boolean,Uint8Array}},7760:(e,t,r)=>{"use strict";const n=r(1048),{kResistStopPropagation:o,SymbolDispose:i}=r(4134),s=globalThis.AbortSignal||r(7083).AbortSignal,a=globalThis.AbortController||r(7083).AbortController,l=Object.getPrototypeOf((async function(){})).constructor,u=globalThis.Blob||n.Blob,c=void 0!==u?function(e){return e instanceof u}:function(e){return!1},f=(e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new ERR_INVALID_ARG_TYPE(t,"AbortSignal",e)};class d extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r<e.length;r++)t+=` ${e[r].stack}\n`;super(t),this.name="AggregateError",this.errors=e}}e.exports={AggregateError:d,kEmptyObject:Object.freeze({}),once(e){let t=!1;return function(...r){t||(t=!0,e.apply(this,r))}},createDeferredPromise:function(){let e,t;return{promise:new Promise(((r,n)=>{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e(((e,...n)=>e?r(e):t(...n)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof l,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:c,deprecate:(e,t)=>e,addAbortListener:r(46).addAbortListener||function(e,t){if(void 0===e)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);let r;return f(e,"signal"),((e,t)=>{if("function"!=typeof e)throw new ERR_INVALID_ARG_TYPE("listener","Function",e)})(t),e.aborted?queueMicrotask((()=>t())):(e.addEventListener("abort",t,{__proto__:null,once:!0,[o]:!0}),r=()=>{e.removeEventListener("abort",t)}),{__proto__:null,[i](){var e;null===(e=r)||void 0===e||e()}}},AbortSignalAny:s.any||function(e){if(1===e.length)return e[0];const t=new a,r=()=>t.abort();return e.forEach((e=>{f(e,"signals"),e.addEventListener("abort",r,{once:!0})})),t.signal.addEventListener("abort",(()=>{e.forEach((e=>e.removeEventListener("abort",r)))}),{once:!0}),t.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},5506:(e,t,r)=>{const{Buffer:n}=r(1048),{ObjectDefineProperty:o,ObjectKeys:i,ReflectApply:s}=r(4134),{promisify:{custom:a}}=r(7760),{streamReturningOperators:l,promiseReturningOperators:u}=r(823),{codes:{ERR_ILLEGAL_CONSTRUCTOR:c}}=r(6371),f=r(7830),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:h}=r(5291),{pipeline:p}=r(7758),{destroyer:b}=r(5896),y=r(6238),g=r(3095),w=r(6115),m=e.exports=r(4259).Stream;m.isDestroyed=w.isDestroyed,m.isDisturbed=w.isDisturbed,m.isErrored=w.isErrored,m.isReadable=w.isReadable,m.isWritable=w.isWritable,m.Readable=r(7576);for(const E of i(l)){const S=l[E];function _(...e){if(new.target)throw c();return m.Readable.from(s(S,this,e))}o(_,"name",{__proto__:null,value:S.name}),o(_,"length",{__proto__:null,value:S.length}),o(m.Readable.prototype,E,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}for(const A of i(u)){const R=u[A];function _(...e){if(new.target)throw c();return s(R,this,e)}o(_,"name",{__proto__:null,value:R.name}),o(_,"length",{__proto__:null,value:R.length}),o(m.Readable.prototype,A,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}m.Writable=r(8584),m.Duplex=r(3370),m.Transform=r(7382),m.PassThrough=r(6524),m.pipeline=p;const{addAbortSignal:v}=r(4147);m.addAbortSignal=v,m.finished=y,m.destroy=b,m.compose=f,m.setDefaultHighWaterMark=d,m.getDefaultHighWaterMark=h,o(m,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>g}),o(p,a,{__proto__:null,enumerable:!0,get:()=>g.pipeline}),o(y,a,{__proto__:null,enumerable:!0,get:()=>g.finished}),m.Stream=m,m._isUint8Array=function(e){return e instanceof Uint8Array},m._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},3095:(e,t,r)=>{"use strict";const{ArrayPrototypePop:n,Promise:o}=r(4134),{isIterable:i,isNodeStream:s,isWebStream:a}=r(6115),{pipelineImpl:l}=r(7758),{finished:u}=r(6238);r(5506),e.exports={finished:u,pipeline:function(...e){return new o(((t,r)=>{let o,u;const c=e[e.length-1];if(c&&"object"==typeof c&&!s(c)&&!i(c)&&!a(c)){const t=n(e);o=t.signal,u=t.end}l(e,((e,n)=>{e?r(e):t(n)}),{signal:o,end:u})}))}}},9467:()=>{},8158:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t,r){return o=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==n(o)?o:o+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e;var o}r.d(t,{A:()=>o})},9740:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(8158);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){(0,n.A)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{BasePostMessageStream:()=>e.A,EthereumProviderError:()=>t.B,IGNORE_SUBSTREAM:()=>l.W7,JRPCEngine:()=>a.WJ,JSON_RPC_SERVER_ERROR_MESSAGE:()=>t.AG,JsonRpcError:()=>t.Gm,ObjectMultiplex:()=>l.Wv,PostMessageStream:()=>u.A,SafeEventEmitter:()=>c.A,SerializableError:()=>f.A,Substream:()=>d.A,createAsyncMiddleware:()=>s.jg,createEngineStream:()=>a.lr,createErrorMiddleware:()=>s.jh,createIdRemapMiddleware:()=>s.$R,createLoggerMiddleware:()=>s.BY,createScaffoldMiddleware:()=>s.ld,createStreamMiddleware:()=>s.dw,dataHasCause:()=>t.el,errorCodes:()=>t.fv,errorValues:()=>t.zI,getMessageFromCode:()=>t.DW,getRpcPromiseCallback:()=>s.m4,isObject:()=>t.Gv,isPlainObject:()=>t.Qd,isValidCode:()=>t.I5,isValidString:()=>t.Qh,mergeMiddleware:()=>a.Vv,providerAsMiddleware:()=>a.kl,providerErrors:()=>t.Pm,providerFromEngine:()=>a.iR,providerFromMiddleware:()=>a.iQ,rpcErrors:()=>t.rK,serializeCause:()=>t._K,serializeError:()=>t.P5,setupMultiplex:()=>l.QW});var e=r(2681),t=r(1835),o=r(7927),i={};for(const e in o)["default","BasePostMessageStream","PostMessageStream","SafeEventEmitter","SerializableError","Substream","EthereumProviderError","JSON_RPC_SERVER_ERROR_MESSAGE","JsonRpcError","dataHasCause","errorCodes","errorValues","getMessageFromCode","isObject","isPlainObject","isValidCode","isValidString","providerErrors","rpcErrors","serializeCause","serializeError"].indexOf(e)<0&&(i[e]=()=>o[e]);r.d(n,i);var s=r(786),a=r(1548),l=r(657),u=r(8770),c=r(3836),f=r(2680),d=r(4577)})(),n})()));